From 3bd24b222b970d1b33093aee2585aadc01279161 Mon Sep 17 00:00:00 2001 From: git-directory-deploy <> Date: Thu, 3 Mar 2022 16:03:39 +0100 Subject: [PATCH] publish: update version number to 1.0.4 generated from commit 594be99e426b20bfffaf529a5645c53efc874a13 --- 1.index.js | 47062 -------------------------- index.js | 87473 ++++++++++++++++++++++++------------------------- package.json | 3 +- 3 files changed, 42367 insertions(+), 92171 deletions(-) delete mode 100644 1.index.js diff --git a/1.index.js b/1.index.js deleted file mode 100644 index bb9421b..0000000 --- a/1.index.js +++ /dev/null @@ -1,47062 +0,0 @@ -exports.ids = [1]; -exports.modules = { - -/***/ 1177: -/***/ (function(module, exports, __webpack_require__) { - -/** - * @licstart The following is the entire license notice for the - * Javascript code in this page - * - * Copyright 2018 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * @licend The above is the entire license notice for the - * Javascript code in this page - */ - -(function webpackUniversalModuleDefinition(root, factory) { - if(true) - module.exports = factory(); - else {} -})(this, function() { -return /******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __w_pdfjs_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __w_pdfjs_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __w_pdfjs_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __w_pdfjs_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __w_pdfjs_require__.d = function(exports, name, getter) { -/******/ if(!__w_pdfjs_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __w_pdfjs_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __w_pdfjs_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __w_pdfjs_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __w_pdfjs_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __w_pdfjs_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __w_pdfjs_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __w_pdfjs_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __w_pdfjs_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __w_pdfjs_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __w_pdfjs_require__(__w_pdfjs_require__.s = 0); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var pdfjsVersion = '2.0.943'; -var pdfjsBuild = 'dc98bf76'; -var pdfjsCoreWorker = __w_pdfjs_require__(1); -exports.WorkerMessageHandler = pdfjsCoreWorker.WorkerMessageHandler; - -/***/ }), -/* 1 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.WorkerMessageHandler = exports.WorkerTask = undefined; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _util = __w_pdfjs_require__(2); - -var _pdf_manager = __w_pdfjs_require__(130); - -var _is_node = __w_pdfjs_require__(5); - -var _is_node2 = _interopRequireDefault(_is_node); - -var _message_handler = __w_pdfjs_require__(172); - -var _primitives = __w_pdfjs_require__(138); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var WorkerTask = function WorkerTaskClosure() { - function WorkerTask(name) { - this.name = name; - this.terminated = false; - this._capability = (0, _util.createPromiseCapability)(); - } - WorkerTask.prototype = { - get finished() { - return this._capability.promise; - }, - finish: function finish() { - this._capability.resolve(); - }, - terminate: function terminate() { - this.terminated = true; - }, - ensureNotTerminated: function ensureNotTerminated() { - if (this.terminated) { - throw new Error('Worker task was terminated'); - } - } - }; - return WorkerTask; -}(); -; -var PDFWorkerStream = function PDFWorkerStreamClosure() { - function PDFWorkerStream(msgHandler) { - this._msgHandler = msgHandler; - this._contentLength = null; - this._fullRequestReader = null; - this._rangeRequestReaders = []; - } - PDFWorkerStream.prototype = { - getFullReader: function getFullReader() { - (0, _util.assert)(!this._fullRequestReader); - this._fullRequestReader = new PDFWorkerStreamReader(this._msgHandler); - return this._fullRequestReader; - }, - getRangeReader: function getRangeReader(begin, end) { - var reader = new PDFWorkerStreamRangeReader(begin, end, this._msgHandler); - this._rangeRequestReaders.push(reader); - return reader; - }, - cancelAllRequests: function cancelAllRequests(reason) { - if (this._fullRequestReader) { - this._fullRequestReader.cancel(reason); - } - var readers = this._rangeRequestReaders.slice(0); - readers.forEach(function (reader) { - reader.cancel(reason); - }); - } - }; - function PDFWorkerStreamReader(msgHandler) { - var _this = this; - - this._msgHandler = msgHandler; - this._contentLength = null; - this._isRangeSupported = false; - this._isStreamingSupported = false; - var readableStream = this._msgHandler.sendWithStream('GetReader'); - this._reader = readableStream.getReader(); - this._headersReady = this._msgHandler.sendWithPromise('ReaderHeadersReady').then(function (data) { - _this._isStreamingSupported = data.isStreamingSupported; - _this._isRangeSupported = data.isRangeSupported; - _this._contentLength = data.contentLength; - }); - } - PDFWorkerStreamReader.prototype = { - get headersReady() { - return this._headersReady; - }, - get contentLength() { - return this._contentLength; - }, - get isStreamingSupported() { - return this._isStreamingSupported; - }, - get isRangeSupported() { - return this._isRangeSupported; - }, - read: function read() { - return this._reader.read().then(function (_ref) { - var value = _ref.value, - done = _ref.done; - - if (done) { - return { - value: undefined, - done: true - }; - } - return { - value: value.buffer, - done: false - }; - }); - }, - cancel: function cancel(reason) { - this._reader.cancel(reason); - } - }; - function PDFWorkerStreamRangeReader(begin, end, msgHandler) { - this._msgHandler = msgHandler; - this.onProgress = null; - var readableStream = this._msgHandler.sendWithStream('GetRangeReader', { - begin: begin, - end: end - }); - this._reader = readableStream.getReader(); - } - PDFWorkerStreamRangeReader.prototype = { - get isStreamingSupported() { - return false; - }, - read: function read() { - return this._reader.read().then(function (_ref2) { - var value = _ref2.value, - done = _ref2.done; - - if (done) { - return { - value: undefined, - done: true - }; - } - return { - value: value.buffer, - done: false - }; - }); - }, - cancel: function cancel(reason) { - this._reader.cancel(reason); - } - }; - return PDFWorkerStream; -}(); -var WorkerMessageHandler = { - setup: function setup(handler, port) { - var testMessageProcessed = false; - handler.on('test', function wphSetupTest(data) { - if (testMessageProcessed) { - return; - } - testMessageProcessed = true; - if (!(data instanceof Uint8Array)) { - handler.send('test', false); - return; - } - var supportTransfers = data[0] === 255; - handler.postMessageTransfers = supportTransfers; - var xhr = new XMLHttpRequest(); - var responseExists = 'response' in xhr; - try { - xhr.responseType; - } catch (e) { - responseExists = false; - } - if (!responseExists) { - handler.send('test', false); - return; - } - handler.send('test', { - supportTypedArray: true, - supportTransfers: supportTransfers - }); - }); - handler.on('configure', function wphConfigure(data) { - (0, _util.setVerbosityLevel)(data.verbosity); - }); - handler.on('GetDocRequest', function wphSetupDoc(data) { - return WorkerMessageHandler.createDocumentHandler(data, port); - }); - }, - createDocumentHandler: function createDocumentHandler(docParams, port) { - var pdfManager; - var terminated = false; - var cancelXHRs = null; - var WorkerTasks = []; - var apiVersion = docParams.apiVersion; - var workerVersion = '2.0.943'; - if (apiVersion !== workerVersion) { - throw new Error('The API version "' + apiVersion + '" does not match ' + ('the Worker version "' + workerVersion + '".')); - } - var docId = docParams.docId; - var docBaseUrl = docParams.docBaseUrl; - var workerHandlerName = docParams.docId + '_worker'; - var handler = new _message_handler.MessageHandler(workerHandlerName, docId, port); - handler.postMessageTransfers = docParams.postMessageTransfers; - function ensureNotTerminated() { - if (terminated) { - throw new Error('Worker was terminated'); - } - } - function startWorkerTask(task) { - WorkerTasks.push(task); - } - function finishWorkerTask(task) { - task.finish(); - var i = WorkerTasks.indexOf(task); - WorkerTasks.splice(i, 1); - } - function loadDocument(recoveryMode) { - var loadDocumentCapability = (0, _util.createPromiseCapability)(); - var parseSuccess = function parseSuccess() { - Promise.all([pdfManager.ensureDoc('numPages'), pdfManager.ensureDoc('fingerprint')]).then(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 2), - numPages = _ref4[0], - fingerprint = _ref4[1]; - - loadDocumentCapability.resolve({ - numPages: numPages, - fingerprint: fingerprint - }); - }, parseFailure); - }; - var parseFailure = function parseFailure(e) { - loadDocumentCapability.reject(e); - }; - pdfManager.ensureDoc('checkHeader', []).then(function () { - pdfManager.ensureDoc('parseStartXRef', []).then(function () { - pdfManager.ensureDoc('parse', [recoveryMode]).then(parseSuccess, parseFailure); - }, parseFailure); - }, parseFailure); - return loadDocumentCapability.promise; - } - function getPdfManager(data, evaluatorOptions) { - var pdfManagerCapability = (0, _util.createPromiseCapability)(); - var pdfManager; - var source = data.source; - if (source.data) { - try { - pdfManager = new _pdf_manager.LocalPdfManager(docId, source.data, source.password, evaluatorOptions, docBaseUrl); - pdfManagerCapability.resolve(pdfManager); - } catch (ex) { - pdfManagerCapability.reject(ex); - } - return pdfManagerCapability.promise; - } - var pdfStream, - cachedChunks = []; - try { - pdfStream = new PDFWorkerStream(handler); - } catch (ex) { - pdfManagerCapability.reject(ex); - return pdfManagerCapability.promise; - } - var fullRequest = pdfStream.getFullReader(); - fullRequest.headersReady.then(function () { - if (!fullRequest.isRangeSupported) { - return; - } - var disableAutoFetch = source.disableAutoFetch || fullRequest.isStreamingSupported; - pdfManager = new _pdf_manager.NetworkPdfManager(docId, pdfStream, { - msgHandler: handler, - url: source.url, - password: source.password, - length: fullRequest.contentLength, - disableAutoFetch: disableAutoFetch, - rangeChunkSize: source.rangeChunkSize - }, evaluatorOptions, docBaseUrl); - for (var i = 0; i < cachedChunks.length; i++) { - pdfManager.sendProgressiveData(cachedChunks[i]); - } - cachedChunks = []; - pdfManagerCapability.resolve(pdfManager); - cancelXHRs = null; - }).catch(function (reason) { - pdfManagerCapability.reject(reason); - cancelXHRs = null; - }); - var loaded = 0; - var flushChunks = function flushChunks() { - var pdfFile = (0, _util.arraysToBytes)(cachedChunks); - if (source.length && pdfFile.length !== source.length) { - (0, _util.warn)('reported HTTP length is different from actual'); - } - try { - pdfManager = new _pdf_manager.LocalPdfManager(docId, pdfFile, source.password, evaluatorOptions, docBaseUrl); - pdfManagerCapability.resolve(pdfManager); - } catch (ex) { - pdfManagerCapability.reject(ex); - } - cachedChunks = []; - }; - var readPromise = new Promise(function (resolve, reject) { - var readChunk = function readChunk(chunk) { - try { - ensureNotTerminated(); - if (chunk.done) { - if (!pdfManager) { - flushChunks(); - } - cancelXHRs = null; - return; - } - var data = chunk.value; - loaded += (0, _util.arrayByteLength)(data); - if (!fullRequest.isStreamingSupported) { - handler.send('DocProgress', { - loaded: loaded, - total: Math.max(loaded, fullRequest.contentLength || 0) - }); - } - if (pdfManager) { - pdfManager.sendProgressiveData(data); - } else { - cachedChunks.push(data); - } - fullRequest.read().then(readChunk, reject); - } catch (e) { - reject(e); - } - }; - fullRequest.read().then(readChunk, reject); - }); - readPromise.catch(function (e) { - pdfManagerCapability.reject(e); - cancelXHRs = null; - }); - cancelXHRs = function cancelXHRs() { - pdfStream.cancelAllRequests('abort'); - }; - return pdfManagerCapability.promise; - } - function setupDoc(data) { - function onSuccess(doc) { - ensureNotTerminated(); - handler.send('GetDoc', { pdfInfo: doc }); - } - function onFailure(e) { - ensureNotTerminated(); - if (e instanceof _util.PasswordException) { - var task = new WorkerTask('PasswordException: response ' + e.code); - startWorkerTask(task); - handler.sendWithPromise('PasswordRequest', e).then(function (data) { - finishWorkerTask(task); - pdfManager.updatePassword(data.password); - pdfManagerReady(); - }).catch(function (boundException) { - finishWorkerTask(task); - handler.send('PasswordException', boundException); - }.bind(null, e)); - } else if (e instanceof _util.InvalidPDFException) { - handler.send('InvalidPDF', e); - } else if (e instanceof _util.MissingPDFException) { - handler.send('MissingPDF', e); - } else if (e instanceof _util.UnexpectedResponseException) { - handler.send('UnexpectedResponse', e); - } else { - handler.send('UnknownError', new _util.UnknownErrorException(e.message, e.toString())); - } - } - function pdfManagerReady() { - ensureNotTerminated(); - loadDocument(false).then(onSuccess, function loadFailure(ex) { - ensureNotTerminated(); - if (!(ex instanceof _util.XRefParseException)) { - onFailure(ex); - return; - } - pdfManager.requestLoadedStream(); - pdfManager.onLoadedStream().then(function () { - ensureNotTerminated(); - loadDocument(true).then(onSuccess, onFailure); - }); - }, onFailure); - } - ensureNotTerminated(); - var evaluatorOptions = { - forceDataSchema: data.disableCreateObjectURL, - maxImageSize: data.maxImageSize, - disableFontFace: data.disableFontFace, - nativeImageDecoderSupport: data.nativeImageDecoderSupport, - ignoreErrors: data.ignoreErrors, - isEvalSupported: data.isEvalSupported - }; - getPdfManager(data, evaluatorOptions).then(function (newPdfManager) { - if (terminated) { - newPdfManager.terminate(); - throw new Error('Worker was terminated'); - } - pdfManager = newPdfManager; - pdfManager.onLoadedStream().then(function (stream) { - handler.send('DataLoaded', { length: stream.bytes.byteLength }); - }); - }).then(pdfManagerReady, onFailure); - } - handler.on('GetPage', function wphSetupGetPage(data) { - return pdfManager.getPage(data.pageIndex).then(function (page) { - return Promise.all([pdfManager.ensure(page, 'rotate'), pdfManager.ensure(page, 'ref'), pdfManager.ensure(page, 'userUnit'), pdfManager.ensure(page, 'view')]).then(function (_ref5) { - var _ref6 = _slicedToArray(_ref5, 4), - rotate = _ref6[0], - ref = _ref6[1], - userUnit = _ref6[2], - view = _ref6[3]; - - return { - rotate: rotate, - ref: ref, - userUnit: userUnit, - view: view - }; - }); - }); - }); - handler.on('GetPageIndex', function wphSetupGetPageIndex(data) { - var ref = new _primitives.Ref(data.ref.num, data.ref.gen); - var catalog = pdfManager.pdfDocument.catalog; - return catalog.getPageIndex(ref); - }); - handler.on('GetDestinations', function wphSetupGetDestinations(data) { - return pdfManager.ensureCatalog('destinations'); - }); - handler.on('GetDestination', function wphSetupGetDestination(data) { - return pdfManager.ensureCatalog('getDestination', [data.id]); - }); - handler.on('GetPageLabels', function wphSetupGetPageLabels(data) { - return pdfManager.ensureCatalog('pageLabels'); - }); - handler.on('GetPageMode', function wphSetupGetPageMode(data) { - return pdfManager.ensureCatalog('pageMode'); - }); - handler.on('GetAttachments', function wphSetupGetAttachments(data) { - return pdfManager.ensureCatalog('attachments'); - }); - handler.on('GetJavaScript', function wphSetupGetJavaScript(data) { - return pdfManager.ensureCatalog('javaScript'); - }); - handler.on('GetOutline', function wphSetupGetOutline(data) { - return pdfManager.ensureCatalog('documentOutline'); - }); - handler.on('GetPermissions', function (data) { - return pdfManager.ensureCatalog('permissions'); - }); - handler.on('GetMetadata', function wphSetupGetMetadata(data) { - return Promise.all([pdfManager.ensureDoc('documentInfo'), pdfManager.ensureCatalog('metadata')]); - }); - handler.on('GetData', function wphSetupGetData(data) { - pdfManager.requestLoadedStream(); - return pdfManager.onLoadedStream().then(function (stream) { - return stream.bytes; - }); - }); - handler.on('GetStats', function wphSetupGetStats(data) { - return pdfManager.pdfDocument.xref.stats; - }); - handler.on('GetAnnotations', function (_ref7) { - var pageIndex = _ref7.pageIndex, - intent = _ref7.intent; - - return pdfManager.getPage(pageIndex).then(function (page) { - return page.getAnnotationsData(intent); - }); - }); - handler.on('RenderPageRequest', function wphSetupRenderPage(data) { - var pageIndex = data.pageIndex; - pdfManager.getPage(pageIndex).then(function (page) { - var task = new WorkerTask('RenderPageRequest: page ' + pageIndex); - startWorkerTask(task); - var pageNum = pageIndex + 1; - var start = Date.now(); - page.getOperatorList({ - handler: handler, - task: task, - intent: data.intent, - renderInteractiveForms: data.renderInteractiveForms - }).then(function (operatorList) { - finishWorkerTask(task); - (0, _util.info)('page=' + pageNum + ' - getOperatorList: time=' + (Date.now() - start) + 'ms, len=' + operatorList.totalLength); - }, function (e) { - finishWorkerTask(task); - if (task.terminated) { - return; - } - handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.unknown }); - var minimumStackMessage = 'worker.js: while trying to getPage() and getOperatorList()'; - var wrappedException; - if (typeof e === 'string') { - wrappedException = { - message: e, - stack: minimumStackMessage - }; - } else if ((typeof e === 'undefined' ? 'undefined' : _typeof(e)) === 'object') { - wrappedException = { - message: e.message || e.toString(), - stack: e.stack || minimumStackMessage - }; - } else { - wrappedException = { - message: 'Unknown exception type: ' + (typeof e === 'undefined' ? 'undefined' : _typeof(e)), - stack: minimumStackMessage - }; - } - handler.send('PageError', { - pageNum: pageNum, - error: wrappedException, - intent: data.intent - }); - }); - }); - }, this); - handler.on('GetTextContent', function wphExtractText(data, sink) { - var pageIndex = data.pageIndex; - sink.onPull = function (desiredSize) {}; - sink.onCancel = function (reason) {}; - pdfManager.getPage(pageIndex).then(function (page) { - var task = new WorkerTask('GetTextContent: page ' + pageIndex); - startWorkerTask(task); - var pageNum = pageIndex + 1; - var start = Date.now(); - page.extractTextContent({ - handler: handler, - task: task, - sink: sink, - normalizeWhitespace: data.normalizeWhitespace, - combineTextItems: data.combineTextItems - }).then(function () { - finishWorkerTask(task); - (0, _util.info)('text indexing: page=' + pageNum + ' - time=' + (Date.now() - start) + 'ms'); - sink.close(); - }, function (reason) { - finishWorkerTask(task); - if (task.terminated) { - return; - } - sink.error(reason); - throw reason; - }); - }); - }); - handler.on('Cleanup', function wphCleanup(data) { - return pdfManager.cleanup(); - }); - handler.on('Terminate', function wphTerminate(data) { - terminated = true; - if (pdfManager) { - pdfManager.terminate(); - pdfManager = null; - } - if (cancelXHRs) { - cancelXHRs(); - } - var waitOn = []; - WorkerTasks.forEach(function (task) { - waitOn.push(task.finished); - task.terminate(); - }); - return Promise.all(waitOn).then(function () { - handler.destroy(); - handler = null; - }); - }); - handler.on('Ready', function wphReady(data) { - setupDoc(docParams); - docParams = null; - }); - return workerHandlerName; - }, - initializeFromPort: function initializeFromPort(port) { - var handler = new _message_handler.MessageHandler('worker', 'main', port); - WorkerMessageHandler.setup(handler, port); - handler.send('ready', null); - } -}; -function isMessagePort(maybePort) { - return typeof maybePort.postMessage === 'function' && 'onmessage' in maybePort; -} -if (typeof window === 'undefined' && !(0, _is_node2.default)() && typeof self !== 'undefined' && isMessagePort(self)) { - WorkerMessageHandler.initializeFromPort(self); -} -exports.WorkerTask = WorkerTask; -exports.WorkerMessageHandler = WorkerMessageHandler; - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.unreachable = exports.warn = exports.utf8StringToString = exports.stringToUTF8String = exports.stringToPDFString = exports.stringToBytes = exports.string32 = exports.shadow = exports.setVerbosityLevel = exports.URL = exports.ReadableStream = exports.removeNullCharacters = exports.readUint32 = exports.readUint16 = exports.readInt8 = exports.log2 = exports.isEvalSupported = exports.isLittleEndian = exports.createValidAbsoluteUrl = exports.isSameOrigin = exports.isSpace = exports.isString = exports.isNum = exports.isEmptyObj = exports.isBool = exports.isArrayBuffer = exports.info = exports.getVerbosityLevel = exports.getLookupTableFactory = exports.getInheritableProperty = exports.deprecated = exports.createObjectURL = exports.createPromiseCapability = exports.bytesToString = exports.assert = exports.arraysToBytes = exports.arrayByteLength = exports.FormatError = exports.XRefParseException = exports.toRomanNumerals = exports.Util = exports.UnknownErrorException = exports.UnexpectedResponseException = exports.TextRenderingMode = exports.StreamType = exports.PermissionFlag = exports.PasswordResponses = exports.PasswordException = exports.NativeImageDecoding = exports.MissingPDFException = exports.MissingDataException = exports.InvalidPDFException = exports.AbortException = exports.CMapCompressionType = exports.ImageKind = exports.FontType = exports.AnnotationType = exports.AnnotationFlag = exports.AnnotationFieldFlag = exports.AnnotationBorderStyleType = exports.UNSUPPORTED_FEATURES = exports.VerbosityLevel = exports.OPS = exports.IDENTITY_MATRIX = exports.FONT_IDENTITY_MATRIX = undefined; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -__w_pdfjs_require__(3); - -var _streams_polyfill = __w_pdfjs_require__(126); - -var _url_polyfill = __w_pdfjs_require__(128); - -var IDENTITY_MATRIX = [1, 0, 0, 1, 0, 0]; -var FONT_IDENTITY_MATRIX = [0.001, 0, 0, 0.001, 0, 0]; -var NativeImageDecoding = { - NONE: 'none', - DECODE: 'decode', - DISPLAY: 'display' -}; -var PermissionFlag = { - PRINT: 0x04, - MODIFY_CONTENTS: 0x08, - COPY: 0x10, - MODIFY_ANNOTATIONS: 0x20, - FILL_INTERACTIVE_FORMS: 0x100, - COPY_FOR_ACCESSIBILITY: 0x200, - ASSEMBLE: 0x400, - PRINT_HIGH_QUALITY: 0x800 -}; -var TextRenderingMode = { - FILL: 0, - STROKE: 1, - FILL_STROKE: 2, - INVISIBLE: 3, - FILL_ADD_TO_PATH: 4, - STROKE_ADD_TO_PATH: 5, - FILL_STROKE_ADD_TO_PATH: 6, - ADD_TO_PATH: 7, - FILL_STROKE_MASK: 3, - ADD_TO_PATH_FLAG: 4 -}; -var ImageKind = { - GRAYSCALE_1BPP: 1, - RGB_24BPP: 2, - RGBA_32BPP: 3 -}; -var AnnotationType = { - TEXT: 1, - LINK: 2, - FREETEXT: 3, - LINE: 4, - SQUARE: 5, - CIRCLE: 6, - POLYGON: 7, - POLYLINE: 8, - HIGHLIGHT: 9, - UNDERLINE: 10, - SQUIGGLY: 11, - STRIKEOUT: 12, - STAMP: 13, - CARET: 14, - INK: 15, - POPUP: 16, - FILEATTACHMENT: 17, - SOUND: 18, - MOVIE: 19, - WIDGET: 20, - SCREEN: 21, - PRINTERMARK: 22, - TRAPNET: 23, - WATERMARK: 24, - THREED: 25, - REDACT: 26 -}; -var AnnotationFlag = { - INVISIBLE: 0x01, - HIDDEN: 0x02, - PRINT: 0x04, - NOZOOM: 0x08, - NOROTATE: 0x10, - NOVIEW: 0x20, - READONLY: 0x40, - LOCKED: 0x80, - TOGGLENOVIEW: 0x100, - LOCKEDCONTENTS: 0x200 -}; -var AnnotationFieldFlag = { - READONLY: 0x0000001, - REQUIRED: 0x0000002, - NOEXPORT: 0x0000004, - MULTILINE: 0x0001000, - PASSWORD: 0x0002000, - NOTOGGLETOOFF: 0x0004000, - RADIO: 0x0008000, - PUSHBUTTON: 0x0010000, - COMBO: 0x0020000, - EDIT: 0x0040000, - SORT: 0x0080000, - FILESELECT: 0x0100000, - MULTISELECT: 0x0200000, - DONOTSPELLCHECK: 0x0400000, - DONOTSCROLL: 0x0800000, - COMB: 0x1000000, - RICHTEXT: 0x2000000, - RADIOSINUNISON: 0x2000000, - COMMITONSELCHANGE: 0x4000000 -}; -var AnnotationBorderStyleType = { - SOLID: 1, - DASHED: 2, - BEVELED: 3, - INSET: 4, - UNDERLINE: 5 -}; -var StreamType = { - UNKNOWN: 0, - FLATE: 1, - LZW: 2, - DCT: 3, - JPX: 4, - JBIG: 5, - A85: 6, - AHX: 7, - CCF: 8, - RL: 9 -}; -var FontType = { - UNKNOWN: 0, - TYPE1: 1, - TYPE1C: 2, - CIDFONTTYPE0: 3, - CIDFONTTYPE0C: 4, - TRUETYPE: 5, - CIDFONTTYPE2: 6, - TYPE3: 7, - OPENTYPE: 8, - TYPE0: 9, - MMTYPE1: 10 -}; -var VerbosityLevel = { - ERRORS: 0, - WARNINGS: 1, - INFOS: 5 -}; -var CMapCompressionType = { - NONE: 0, - BINARY: 1, - STREAM: 2 -}; -var OPS = { - dependency: 1, - setLineWidth: 2, - setLineCap: 3, - setLineJoin: 4, - setMiterLimit: 5, - setDash: 6, - setRenderingIntent: 7, - setFlatness: 8, - setGState: 9, - save: 10, - restore: 11, - transform: 12, - moveTo: 13, - lineTo: 14, - curveTo: 15, - curveTo2: 16, - curveTo3: 17, - closePath: 18, - rectangle: 19, - stroke: 20, - closeStroke: 21, - fill: 22, - eoFill: 23, - fillStroke: 24, - eoFillStroke: 25, - closeFillStroke: 26, - closeEOFillStroke: 27, - endPath: 28, - clip: 29, - eoClip: 30, - beginText: 31, - endText: 32, - setCharSpacing: 33, - setWordSpacing: 34, - setHScale: 35, - setLeading: 36, - setFont: 37, - setTextRenderingMode: 38, - setTextRise: 39, - moveText: 40, - setLeadingMoveText: 41, - setTextMatrix: 42, - nextLine: 43, - showText: 44, - showSpacedText: 45, - nextLineShowText: 46, - nextLineSetSpacingShowText: 47, - setCharWidth: 48, - setCharWidthAndBounds: 49, - setStrokeColorSpace: 50, - setFillColorSpace: 51, - setStrokeColor: 52, - setStrokeColorN: 53, - setFillColor: 54, - setFillColorN: 55, - setStrokeGray: 56, - setFillGray: 57, - setStrokeRGBColor: 58, - setFillRGBColor: 59, - setStrokeCMYKColor: 60, - setFillCMYKColor: 61, - shadingFill: 62, - beginInlineImage: 63, - beginImageData: 64, - endInlineImage: 65, - paintXObject: 66, - markPoint: 67, - markPointProps: 68, - beginMarkedContent: 69, - beginMarkedContentProps: 70, - endMarkedContent: 71, - beginCompat: 72, - endCompat: 73, - paintFormXObjectBegin: 74, - paintFormXObjectEnd: 75, - beginGroup: 76, - endGroup: 77, - beginAnnotations: 78, - endAnnotations: 79, - beginAnnotation: 80, - endAnnotation: 81, - paintJpegXObject: 82, - paintImageMaskXObject: 83, - paintImageMaskXObjectGroup: 84, - paintImageXObject: 85, - paintInlineImageXObject: 86, - paintInlineImageXObjectGroup: 87, - paintImageXObjectRepeat: 88, - paintImageMaskXObjectRepeat: 89, - paintSolidColorImageMask: 90, - constructPath: 91 -}; -var UNSUPPORTED_FEATURES = { - unknown: 'unknown', - forms: 'forms', - javaScript: 'javaScript', - smask: 'smask', - shadingPattern: 'shadingPattern', - font: 'font' -}; -var PasswordResponses = { - NEED_PASSWORD: 1, - INCORRECT_PASSWORD: 2 -}; -var verbosity = VerbosityLevel.WARNINGS; -function setVerbosityLevel(level) { - if (Number.isInteger(level)) { - verbosity = level; - } -} -function getVerbosityLevel() { - return verbosity; -} -function info(msg) { - if (verbosity >= VerbosityLevel.INFOS) { - console.log('Info: ' + msg); - } -} -function warn(msg) { - if (verbosity >= VerbosityLevel.WARNINGS) { - console.log('Warning: ' + msg); - } -} -function deprecated(details) { - console.log('Deprecated API usage: ' + details); -} -function unreachable(msg) { - throw new Error(msg); -} -function assert(cond, msg) { - if (!cond) { - unreachable(msg); - } -} -function isSameOrigin(baseUrl, otherUrl) { - try { - var base = new _url_polyfill.URL(baseUrl); - if (!base.origin || base.origin === 'null') { - return false; - } - } catch (e) { - return false; - } - var other = new _url_polyfill.URL(otherUrl, base); - return base.origin === other.origin; -} -function _isValidProtocol(url) { - if (!url) { - return false; - } - switch (url.protocol) { - case 'http:': - case 'https:': - case 'ftp:': - case 'mailto:': - case 'tel:': - return true; - default: - return false; - } -} -function createValidAbsoluteUrl(url, baseUrl) { - if (!url) { - return null; - } - try { - var absoluteUrl = baseUrl ? new _url_polyfill.URL(url, baseUrl) : new _url_polyfill.URL(url); - if (_isValidProtocol(absoluteUrl)) { - return absoluteUrl; - } - } catch (ex) {} - return null; -} -function shadow(obj, prop, value) { - Object.defineProperty(obj, prop, { - value: value, - enumerable: true, - configurable: true, - writable: false - }); - return value; -} -function getLookupTableFactory(initializer) { - var lookup; - return function () { - if (initializer) { - lookup = Object.create(null); - initializer(lookup); - initializer = null; - } - return lookup; - }; -} -var PasswordException = function PasswordExceptionClosure() { - function PasswordException(msg, code) { - this.name = 'PasswordException'; - this.message = msg; - this.code = code; - } - PasswordException.prototype = new Error(); - PasswordException.constructor = PasswordException; - return PasswordException; -}(); -var UnknownErrorException = function UnknownErrorExceptionClosure() { - function UnknownErrorException(msg, details) { - this.name = 'UnknownErrorException'; - this.message = msg; - this.details = details; - } - UnknownErrorException.prototype = new Error(); - UnknownErrorException.constructor = UnknownErrorException; - return UnknownErrorException; -}(); -var InvalidPDFException = function InvalidPDFExceptionClosure() { - function InvalidPDFException(msg) { - this.name = 'InvalidPDFException'; - this.message = msg; - } - InvalidPDFException.prototype = new Error(); - InvalidPDFException.constructor = InvalidPDFException; - return InvalidPDFException; -}(); -var MissingPDFException = function MissingPDFExceptionClosure() { - function MissingPDFException(msg) { - this.name = 'MissingPDFException'; - this.message = msg; - } - MissingPDFException.prototype = new Error(); - MissingPDFException.constructor = MissingPDFException; - return MissingPDFException; -}(); -var UnexpectedResponseException = function UnexpectedResponseExceptionClosure() { - function UnexpectedResponseException(msg, status) { - this.name = 'UnexpectedResponseException'; - this.message = msg; - this.status = status; - } - UnexpectedResponseException.prototype = new Error(); - UnexpectedResponseException.constructor = UnexpectedResponseException; - return UnexpectedResponseException; -}(); -var MissingDataException = function MissingDataExceptionClosure() { - function MissingDataException(begin, end) { - this.begin = begin; - this.end = end; - this.message = 'Missing data [' + begin + ', ' + end + ')'; - } - MissingDataException.prototype = new Error(); - MissingDataException.prototype.name = 'MissingDataException'; - MissingDataException.constructor = MissingDataException; - return MissingDataException; -}(); -var XRefParseException = function XRefParseExceptionClosure() { - function XRefParseException(msg) { - this.message = msg; - } - XRefParseException.prototype = new Error(); - XRefParseException.prototype.name = 'XRefParseException'; - XRefParseException.constructor = XRefParseException; - return XRefParseException; -}(); -var FormatError = function FormatErrorClosure() { - function FormatError(msg) { - this.message = msg; - } - FormatError.prototype = new Error(); - FormatError.prototype.name = 'FormatError'; - FormatError.constructor = FormatError; - return FormatError; -}(); -var AbortException = function AbortExceptionClosure() { - function AbortException(msg) { - this.name = 'AbortException'; - this.message = msg; - } - AbortException.prototype = new Error(); - AbortException.constructor = AbortException; - return AbortException; -}(); -var NullCharactersRegExp = /\x00/g; -function removeNullCharacters(str) { - if (typeof str !== 'string') { - warn('The argument for removeNullCharacters must be a string.'); - return str; - } - return str.replace(NullCharactersRegExp, ''); -} -function bytesToString(bytes) { - assert(bytes !== null && (typeof bytes === 'undefined' ? 'undefined' : _typeof(bytes)) === 'object' && bytes.length !== undefined, 'Invalid argument for bytesToString'); - var length = bytes.length; - var MAX_ARGUMENT_COUNT = 8192; - if (length < MAX_ARGUMENT_COUNT) { - return String.fromCharCode.apply(null, bytes); - } - var strBuf = []; - for (var i = 0; i < length; i += MAX_ARGUMENT_COUNT) { - var chunkEnd = Math.min(i + MAX_ARGUMENT_COUNT, length); - var chunk = bytes.subarray(i, chunkEnd); - strBuf.push(String.fromCharCode.apply(null, chunk)); - } - return strBuf.join(''); -} -function stringToBytes(str) { - assert(typeof str === 'string', 'Invalid argument for stringToBytes'); - var length = str.length; - var bytes = new Uint8Array(length); - for (var i = 0; i < length; ++i) { - bytes[i] = str.charCodeAt(i) & 0xFF; - } - return bytes; -} -function arrayByteLength(arr) { - if (arr.length !== undefined) { - return arr.length; - } - assert(arr.byteLength !== undefined); - return arr.byteLength; -} -function arraysToBytes(arr) { - if (arr.length === 1 && arr[0] instanceof Uint8Array) { - return arr[0]; - } - var resultLength = 0; - var i, - ii = arr.length; - var item, itemLength; - for (i = 0; i < ii; i++) { - item = arr[i]; - itemLength = arrayByteLength(item); - resultLength += itemLength; - } - var pos = 0; - var data = new Uint8Array(resultLength); - for (i = 0; i < ii; i++) { - item = arr[i]; - if (!(item instanceof Uint8Array)) { - if (typeof item === 'string') { - item = stringToBytes(item); - } else { - item = new Uint8Array(item); - } - } - itemLength = item.byteLength; - data.set(item, pos); - pos += itemLength; - } - return data; -} -function string32(value) { - return String.fromCharCode(value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff); -} -function log2(x) { - if (x <= 0) { - return 0; - } - return Math.ceil(Math.log2(x)); -} -function readInt8(data, start) { - return data[start] << 24 >> 24; -} -function readUint16(data, offset) { - return data[offset] << 8 | data[offset + 1]; -} -function readUint32(data, offset) { - return (data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]) >>> 0; -} -function isLittleEndian() { - var buffer8 = new Uint8Array(4); - buffer8[0] = 1; - var view32 = new Uint32Array(buffer8.buffer, 0, 1); - return view32[0] === 1; -} -function isEvalSupported() { - try { - new Function(''); - return true; - } catch (e) { - return false; - } -} -function getInheritableProperty(_ref) { - var dict = _ref.dict, - key = _ref.key, - _ref$getArray = _ref.getArray, - getArray = _ref$getArray === undefined ? false : _ref$getArray, - _ref$stopWhenFound = _ref.stopWhenFound, - stopWhenFound = _ref$stopWhenFound === undefined ? true : _ref$stopWhenFound; - - var LOOP_LIMIT = 100; - var loopCount = 0; - var values = void 0; - while (dict) { - var value = getArray ? dict.getArray(key) : dict.get(key); - if (value !== undefined) { - if (stopWhenFound) { - return value; - } - if (!values) { - values = []; - } - values.push(value); - } - if (++loopCount > LOOP_LIMIT) { - warn('getInheritableProperty: maximum loop count exceeded for "' + key + '"'); - break; - } - dict = dict.get('Parent'); - } - return values; -} -var Util = function UtilClosure() { - function Util() {} - var rgbBuf = ['rgb(', 0, ',', 0, ',', 0, ')']; - Util.makeCssRgb = function Util_makeCssRgb(r, g, b) { - rgbBuf[1] = r; - rgbBuf[3] = g; - rgbBuf[5] = b; - return rgbBuf.join(''); - }; - Util.transform = function Util_transform(m1, m2) { - return [m1[0] * m2[0] + m1[2] * m2[1], m1[1] * m2[0] + m1[3] * m2[1], m1[0] * m2[2] + m1[2] * m2[3], m1[1] * m2[2] + m1[3] * m2[3], m1[0] * m2[4] + m1[2] * m2[5] + m1[4], m1[1] * m2[4] + m1[3] * m2[5] + m1[5]]; - }; - Util.applyTransform = function Util_applyTransform(p, m) { - var xt = p[0] * m[0] + p[1] * m[2] + m[4]; - var yt = p[0] * m[1] + p[1] * m[3] + m[5]; - return [xt, yt]; - }; - Util.applyInverseTransform = function Util_applyInverseTransform(p, m) { - var d = m[0] * m[3] - m[1] * m[2]; - var xt = (p[0] * m[3] - p[1] * m[2] + m[2] * m[5] - m[4] * m[3]) / d; - var yt = (-p[0] * m[1] + p[1] * m[0] + m[4] * m[1] - m[5] * m[0]) / d; - return [xt, yt]; - }; - Util.getAxialAlignedBoundingBox = function Util_getAxialAlignedBoundingBox(r, m) { - var p1 = Util.applyTransform(r, m); - var p2 = Util.applyTransform(r.slice(2, 4), m); - var p3 = Util.applyTransform([r[0], r[3]], m); - var p4 = Util.applyTransform([r[2], r[1]], m); - return [Math.min(p1[0], p2[0], p3[0], p4[0]), Math.min(p1[1], p2[1], p3[1], p4[1]), Math.max(p1[0], p2[0], p3[0], p4[0]), Math.max(p1[1], p2[1], p3[1], p4[1])]; - }; - Util.inverseTransform = function Util_inverseTransform(m) { - var d = m[0] * m[3] - m[1] * m[2]; - return [m[3] / d, -m[1] / d, -m[2] / d, m[0] / d, (m[2] * m[5] - m[4] * m[3]) / d, (m[4] * m[1] - m[5] * m[0]) / d]; - }; - Util.apply3dTransform = function Util_apply3dTransform(m, v) { - return [m[0] * v[0] + m[1] * v[1] + m[2] * v[2], m[3] * v[0] + m[4] * v[1] + m[5] * v[2], m[6] * v[0] + m[7] * v[1] + m[8] * v[2]]; - }; - Util.singularValueDecompose2dScale = function Util_singularValueDecompose2dScale(m) { - var transpose = [m[0], m[2], m[1], m[3]]; - var a = m[0] * transpose[0] + m[1] * transpose[2]; - var b = m[0] * transpose[1] + m[1] * transpose[3]; - var c = m[2] * transpose[0] + m[3] * transpose[2]; - var d = m[2] * transpose[1] + m[3] * transpose[3]; - var first = (a + d) / 2; - var second = Math.sqrt((a + d) * (a + d) - 4 * (a * d - c * b)) / 2; - var sx = first + second || 1; - var sy = first - second || 1; - return [Math.sqrt(sx), Math.sqrt(sy)]; - }; - Util.normalizeRect = function Util_normalizeRect(rect) { - var r = rect.slice(0); - if (rect[0] > rect[2]) { - r[0] = rect[2]; - r[2] = rect[0]; - } - if (rect[1] > rect[3]) { - r[1] = rect[3]; - r[3] = rect[1]; - } - return r; - }; - Util.intersect = function Util_intersect(rect1, rect2) { - function compare(a, b) { - return a - b; - } - var orderedX = [rect1[0], rect1[2], rect2[0], rect2[2]].sort(compare), - orderedY = [rect1[1], rect1[3], rect2[1], rect2[3]].sort(compare), - result = []; - rect1 = Util.normalizeRect(rect1); - rect2 = Util.normalizeRect(rect2); - if (orderedX[0] === rect1[0] && orderedX[1] === rect2[0] || orderedX[0] === rect2[0] && orderedX[1] === rect1[0]) { - result[0] = orderedX[1]; - result[2] = orderedX[2]; - } else { - return false; - } - if (orderedY[0] === rect1[1] && orderedY[1] === rect2[1] || orderedY[0] === rect2[1] && orderedY[1] === rect1[1]) { - result[1] = orderedY[1]; - result[3] = orderedY[2]; - } else { - return false; - } - return result; - }; - return Util; -}(); -var ROMAN_NUMBER_MAP = ['', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM', '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC', '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX']; -function toRomanNumerals(number) { - var lowerCase = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - assert(Number.isInteger(number) && number > 0, 'The number should be a positive integer.'); - var pos = void 0, - romanBuf = []; - while (number >= 1000) { - number -= 1000; - romanBuf.push('M'); - } - pos = number / 100 | 0; - number %= 100; - romanBuf.push(ROMAN_NUMBER_MAP[pos]); - pos = number / 10 | 0; - number %= 10; - romanBuf.push(ROMAN_NUMBER_MAP[10 + pos]); - romanBuf.push(ROMAN_NUMBER_MAP[20 + number]); - var romanStr = romanBuf.join(''); - return lowerCase ? romanStr.toLowerCase() : romanStr; -} -var PDFStringTranslateTable = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2022, 0x2020, 0x2021, 0x2026, 0x2014, 0x2013, 0x192, 0x2044, 0x2039, 0x203A, 0x2212, 0x2030, 0x201E, 0x201C, 0x201D, 0x2018, 0x2019, 0x201A, 0x2122, 0xFB01, 0xFB02, 0x141, 0x152, 0x160, 0x178, 0x17D, 0x131, 0x142, 0x153, 0x161, 0x17E, 0, 0x20AC]; -function stringToPDFString(str) { - var i, - n = str.length, - strBuf = []; - if (str[0] === '\xFE' && str[1] === '\xFF') { - for (i = 2; i < n; i += 2) { - strBuf.push(String.fromCharCode(str.charCodeAt(i) << 8 | str.charCodeAt(i + 1))); - } - } else { - for (i = 0; i < n; ++i) { - var code = PDFStringTranslateTable[str.charCodeAt(i)]; - strBuf.push(code ? String.fromCharCode(code) : str.charAt(i)); - } - } - return strBuf.join(''); -} -function stringToUTF8String(str) { - return decodeURIComponent(escape(str)); -} -function utf8StringToString(str) { - return unescape(encodeURIComponent(str)); -} -function isEmptyObj(obj) { - for (var key in obj) { - return false; - } - return true; -} -function isBool(v) { - return typeof v === 'boolean'; -} -function isNum(v) { - return typeof v === 'number'; -} -function isString(v) { - return typeof v === 'string'; -} -function isArrayBuffer(v) { - return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' && v !== null && v.byteLength !== undefined; -} -function isSpace(ch) { - return ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A; -} -function createPromiseCapability() { - var capability = {}; - capability.promise = new Promise(function (resolve, reject) { - capability.resolve = resolve; - capability.reject = reject; - }); - return capability; -} -var createObjectURL = function createObjectURLClosure() { - var digits = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - return function createObjectURL(data, contentType) { - var forceDataSchema = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - if (!forceDataSchema && _url_polyfill.URL.createObjectURL) { - var blob = new Blob([data], { type: contentType }); - return _url_polyfill.URL.createObjectURL(blob); - } - var buffer = 'data:' + contentType + ';base64,'; - for (var i = 0, ii = data.length; i < ii; i += 3) { - var b1 = data[i] & 0xFF; - var b2 = data[i + 1] & 0xFF; - var b3 = data[i + 2] & 0xFF; - var d1 = b1 >> 2, - d2 = (b1 & 3) << 4 | b2 >> 4; - var d3 = i + 1 < ii ? (b2 & 0xF) << 2 | b3 >> 6 : 64; - var d4 = i + 2 < ii ? b3 & 0x3F : 64; - buffer += digits[d1] + digits[d2] + digits[d3] + digits[d4]; - } - return buffer; - }; -}(); -exports.FONT_IDENTITY_MATRIX = FONT_IDENTITY_MATRIX; -exports.IDENTITY_MATRIX = IDENTITY_MATRIX; -exports.OPS = OPS; -exports.VerbosityLevel = VerbosityLevel; -exports.UNSUPPORTED_FEATURES = UNSUPPORTED_FEATURES; -exports.AnnotationBorderStyleType = AnnotationBorderStyleType; -exports.AnnotationFieldFlag = AnnotationFieldFlag; -exports.AnnotationFlag = AnnotationFlag; -exports.AnnotationType = AnnotationType; -exports.FontType = FontType; -exports.ImageKind = ImageKind; -exports.CMapCompressionType = CMapCompressionType; -exports.AbortException = AbortException; -exports.InvalidPDFException = InvalidPDFException; -exports.MissingDataException = MissingDataException; -exports.MissingPDFException = MissingPDFException; -exports.NativeImageDecoding = NativeImageDecoding; -exports.PasswordException = PasswordException; -exports.PasswordResponses = PasswordResponses; -exports.PermissionFlag = PermissionFlag; -exports.StreamType = StreamType; -exports.TextRenderingMode = TextRenderingMode; -exports.UnexpectedResponseException = UnexpectedResponseException; -exports.UnknownErrorException = UnknownErrorException; -exports.Util = Util; -exports.toRomanNumerals = toRomanNumerals; -exports.XRefParseException = XRefParseException; -exports.FormatError = FormatError; -exports.arrayByteLength = arrayByteLength; -exports.arraysToBytes = arraysToBytes; -exports.assert = assert; -exports.bytesToString = bytesToString; -exports.createPromiseCapability = createPromiseCapability; -exports.createObjectURL = createObjectURL; -exports.deprecated = deprecated; -exports.getInheritableProperty = getInheritableProperty; -exports.getLookupTableFactory = getLookupTableFactory; -exports.getVerbosityLevel = getVerbosityLevel; -exports.info = info; -exports.isArrayBuffer = isArrayBuffer; -exports.isBool = isBool; -exports.isEmptyObj = isEmptyObj; -exports.isNum = isNum; -exports.isString = isString; -exports.isSpace = isSpace; -exports.isSameOrigin = isSameOrigin; -exports.createValidAbsoluteUrl = createValidAbsoluteUrl; -exports.isLittleEndian = isLittleEndian; -exports.isEvalSupported = isEvalSupported; -exports.log2 = log2; -exports.readInt8 = readInt8; -exports.readUint16 = readUint16; -exports.readUint32 = readUint32; -exports.removeNullCharacters = removeNullCharacters; -exports.ReadableStream = _streams_polyfill.ReadableStream; -exports.URL = _url_polyfill.URL; -exports.setVerbosityLevel = setVerbosityLevel; -exports.shadow = shadow; -exports.string32 = string32; -exports.stringToBytes = stringToBytes; -exports.stringToPDFString = stringToPDFString; -exports.stringToUTF8String = stringToUTF8String; -exports.utf8StringToString = utf8StringToString; -exports.warn = warn; -exports.unreachable = unreachable; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var globalScope = __w_pdfjs_require__(4); -if (!globalScope._pdfjsCompatibilityChecked) { - globalScope._pdfjsCompatibilityChecked = true; - var isNodeJS = __w_pdfjs_require__(5); - var hasDOM = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) === 'object' && (typeof document === 'undefined' ? 'undefined' : _typeof(document)) === 'object'; - (function checkNodeBtoa() { - if (globalScope.btoa || !isNodeJS()) { - return; - } - globalScope.btoa = function (chars) { - return Buffer.from(chars, 'binary').toString('base64'); - }; - })(); - (function checkNodeAtob() { - if (globalScope.atob || !isNodeJS()) { - return; - } - globalScope.atob = function (input) { - return Buffer.from(input, 'base64').toString('binary'); - }; - })(); - (function checkCurrentScript() { - if (!hasDOM) { - return; - } - if ('currentScript' in document) { - return; - } - Object.defineProperty(document, 'currentScript', { - get: function get() { - var scripts = document.getElementsByTagName('script'); - return scripts[scripts.length - 1]; - }, - - enumerable: true, - configurable: true - }); - })(); - (function checkChildNodeRemove() { - if (!hasDOM) { - return; - } - if (typeof Element.prototype.remove !== 'undefined') { - return; - } - Element.prototype.remove = function () { - if (this.parentNode) { - this.parentNode.removeChild(this); - } - }; - })(); - (function checkDOMTokenListToggle() { - if (!hasDOM || isNodeJS()) { - return; - } - var div = document.createElement('div'); - if (div.classList.toggle('test', 0) === false) { - return; - } - var originalDOMTokenListToggle = DOMTokenList.prototype.toggle; - DOMTokenList.prototype.toggle = function (token) { - if (arguments.length > 1) { - var force = !!arguments[1]; - return this[force ? 'add' : 'remove'](token), force; - } - return originalDOMTokenListToggle(token); - }; - })(); - (function checkStringIncludes() { - if (String.prototype.includes) { - return; - } - __w_pdfjs_require__(6); - })(); - (function checkArrayIncludes() { - if (Array.prototype.includes) { - return; - } - __w_pdfjs_require__(34); - })(); - (function checkObjectAssign() { - if (Object.assign) { - return; - } - __w_pdfjs_require__(43); - })(); - (function checkMathLog2() { - if (Math.log2) { - return; - } - Math.log2 = __w_pdfjs_require__(53); - })(); - (function checkNumberIsNaN() { - if (Number.isNaN) { - return; - } - Number.isNaN = __w_pdfjs_require__(55); - })(); - (function checkNumberIsInteger() { - if (Number.isInteger) { - return; - } - Number.isInteger = __w_pdfjs_require__(57); - })(); - (function checkPromise() { - if (globalScope.Promise) { - return; - } - globalScope.Promise = __w_pdfjs_require__(60); - })(); - (function checkWeakMap() { - if (globalScope.WeakMap) { - return; - } - globalScope.WeakMap = __w_pdfjs_require__(95); - })(); - (function checkStringCodePointAt() { - if (String.codePointAt) { - return; - } - String.codePointAt = __w_pdfjs_require__(112); - })(); - (function checkStringFromCodePoint() { - if (String.fromCodePoint) { - return; - } - String.fromCodePoint = __w_pdfjs_require__(114); - })(); - (function checkSymbol() { - if (globalScope.Symbol) { - return; - } - __w_pdfjs_require__(116); - })(); - (function checkObjectValues() { - if (Object.values) { - return; - } - Object.values = __w_pdfjs_require__(123); - })(); -} - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = typeof window !== 'undefined' && window.Math === Math ? window : typeof global !== 'undefined' && global.Math === Math ? global : typeof self !== 'undefined' && self.Math === Math ? self : {}; - -/***/ }), -/* 5 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -module.exports = function isNodeJS() { - return (typeof process === 'undefined' ? 'undefined' : _typeof(process)) === 'object' && process + '' === '[object process]'; -}; - -/***/ }), -/* 6 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(7); -module.exports = __w_pdfjs_require__(10).String.includes; - -/***/ }), -/* 7 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -var context = __w_pdfjs_require__(26); -var INCLUDES = 'includes'; -$export($export.P + $export.F * __w_pdfjs_require__(33)(INCLUDES), 'String', { - includes: function includes(searchString) { - return !!~context(this, searchString, INCLUDES).indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); - } -}); - -/***/ }), -/* 8 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var global = __w_pdfjs_require__(9); -var core = __w_pdfjs_require__(10); -var hide = __w_pdfjs_require__(11); -var redefine = __w_pdfjs_require__(21); -var ctx = __w_pdfjs_require__(24); -var PROTOTYPE = 'prototype'; -var $export = function $export(type, name, source) { - var IS_FORCED = type & $export.F; - var IS_GLOBAL = type & $export.G; - var IS_STATIC = type & $export.S; - var IS_PROTO = type & $export.P; - var IS_BIND = type & $export.B; - var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; - var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); - var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); - var key, own, out, exp; - if (IS_GLOBAL) source = name; - for (key in source) { - own = !IS_FORCED && target && target[key] !== undefined; - out = (own ? target : source)[key]; - exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; - if (target) redefine(target, key, out, type & $export.U); - if (exports[key] != out) hide(exports, key, exp); - if (IS_PROTO && expProto[key] != out) expProto[key] = out; - } -}; -global.core = core; -$export.F = 1; -$export.G = 2; -$export.S = 4; -$export.P = 8; -$export.B = 16; -$export.W = 32; -$export.U = 64; -$export.R = 128; -module.exports = $export; - -/***/ }), -/* 9 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); -if (typeof __g == 'number') __g = global; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var core = module.exports = { version: '2.5.7' }; -if (typeof __e == 'number') __e = core; - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var dP = __w_pdfjs_require__(12); -var createDesc = __w_pdfjs_require__(20); -module.exports = __w_pdfjs_require__(16) ? function (object, key, value) { - return dP.f(object, key, createDesc(1, value)); -} : function (object, key, value) { - object[key] = value; - return object; -}; - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var anObject = __w_pdfjs_require__(13); -var IE8_DOM_DEFINE = __w_pdfjs_require__(15); -var toPrimitive = __w_pdfjs_require__(19); -var dP = Object.defineProperty; -exports.f = __w_pdfjs_require__(16) ? Object.defineProperty : function defineProperty(O, P, Attributes) { - anObject(O); - P = toPrimitive(P, true); - anObject(Attributes); - if (IE8_DOM_DEFINE) try { - return dP(O, P, Attributes); - } catch (e) {} - if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!'); - if ('value' in Attributes) O[P] = Attributes.value; - return O; -}; - -/***/ }), -/* 13 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -module.exports = function (it) { - if (!isObject(it)) throw TypeError(it + ' is not an object!'); - return it; -}; - -/***/ }), -/* 14 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -module.exports = function (it) { - return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) === 'object' ? it !== null : typeof it === 'function'; -}; - -/***/ }), -/* 15 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = !__w_pdfjs_require__(16) && !__w_pdfjs_require__(17)(function () { - return Object.defineProperty(__w_pdfjs_require__(18)('div'), 'a', { - get: function get() { - return 7; - } - }).a != 7; -}); - -/***/ }), -/* 16 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = !__w_pdfjs_require__(17)(function () { - return Object.defineProperty({}, 'a', { - get: function get() { - return 7; - } - }).a != 7; -}); - -/***/ }), -/* 17 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (exec) { - try { - return !!exec(); - } catch (e) { - return true; - } -}; - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -var document = __w_pdfjs_require__(9).document; -var is = isObject(document) && isObject(document.createElement); -module.exports = function (it) { - return is ? document.createElement(it) : {}; -}; - -/***/ }), -/* 19 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -module.exports = function (it, S) { - if (!isObject(it)) return it; - var fn, val; - if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val; - if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val; - throw TypeError("Can't convert object to primitive value"); -}; - -/***/ }), -/* 20 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (bitmap, value) { - return { - enumerable: !(bitmap & 1), - configurable: !(bitmap & 2), - writable: !(bitmap & 4), - value: value - }; -}; - -/***/ }), -/* 21 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var global = __w_pdfjs_require__(9); -var hide = __w_pdfjs_require__(11); -var has = __w_pdfjs_require__(22); -var SRC = __w_pdfjs_require__(23)('src'); -var TO_STRING = 'toString'; -var $toString = Function[TO_STRING]; -var TPL = ('' + $toString).split(TO_STRING); -__w_pdfjs_require__(10).inspectSource = function (it) { - return $toString.call(it); -}; -(module.exports = function (O, key, val, safe) { - var isFunction = typeof val == 'function'; - if (isFunction) has(val, 'name') || hide(val, 'name', key); - if (O[key] === val) return; - if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); - if (O === global) { - O[key] = val; - } else if (!safe) { - delete O[key]; - hide(O, key, val); - } else if (O[key]) { - O[key] = val; - } else { - hide(O, key, val); - } -})(Function.prototype, TO_STRING, function toString() { - return typeof this == 'function' && this[SRC] || $toString.call(this); -}); - -/***/ }), -/* 22 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var hasOwnProperty = {}.hasOwnProperty; -module.exports = function (it, key) { - return hasOwnProperty.call(it, key); -}; - -/***/ }), -/* 23 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var id = 0; -var px = Math.random(); -module.exports = function (key) { - return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); -}; - -/***/ }), -/* 24 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var aFunction = __w_pdfjs_require__(25); -module.exports = function (fn, that, length) { - aFunction(fn); - if (that === undefined) return fn; - switch (length) { - case 1: - return function (a) { - return fn.call(that, a); - }; - case 2: - return function (a, b) { - return fn.call(that, a, b); - }; - case 3: - return function (a, b, c) { - return fn.call(that, a, b, c); - }; - } - return function () { - return fn.apply(that, arguments); - }; -}; - -/***/ }), -/* 25 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (it) { - if (typeof it != 'function') throw TypeError(it + ' is not a function!'); - return it; -}; - -/***/ }), -/* 26 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isRegExp = __w_pdfjs_require__(27); -var defined = __w_pdfjs_require__(32); -module.exports = function (that, searchString, NAME) { - if (isRegExp(searchString)) throw TypeError('String#' + NAME + " doesn't accept regex!"); - return String(defined(that)); -}; - -/***/ }), -/* 27 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -var cof = __w_pdfjs_require__(28); -var MATCH = __w_pdfjs_require__(29)('match'); -module.exports = function (it) { - var isRegExp; - return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); -}; - -/***/ }), -/* 28 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var toString = {}.toString; -module.exports = function (it) { - return toString.call(it).slice(8, -1); -}; - -/***/ }), -/* 29 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var store = __w_pdfjs_require__(30)('wks'); -var uid = __w_pdfjs_require__(23); -var _Symbol = __w_pdfjs_require__(9).Symbol; -var USE_SYMBOL = typeof _Symbol == 'function'; -var $exports = module.exports = function (name) { - return store[name] || (store[name] = USE_SYMBOL && _Symbol[name] || (USE_SYMBOL ? _Symbol : uid)('Symbol.' + name)); -}; -$exports.store = store; - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var core = __w_pdfjs_require__(10); -var global = __w_pdfjs_require__(9); -var SHARED = '__core-js_shared__'; -var store = global[SHARED] || (global[SHARED] = {}); -(module.exports = function (key, value) { - return store[key] || (store[key] = value !== undefined ? value : {}); -})('versions', []).push({ - version: core.version, - mode: __w_pdfjs_require__(31) ? 'pure' : 'global', - copyright: '© 2018 Denis Pushkarev (zloirock.ru)' -}); - -/***/ }), -/* 31 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = false; - -/***/ }), -/* 32 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (it) { - if (it == undefined) throw TypeError("Can't call method on " + it); - return it; -}; - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var MATCH = __w_pdfjs_require__(29)('match'); -module.exports = function (KEY) { - var re = /./; - try { - '/./'[KEY](re); - } catch (e) { - try { - re[MATCH] = false; - return !'/./'[KEY](re); - } catch (f) {} - } - return true; -}; - -/***/ }), -/* 34 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(35); -module.exports = __w_pdfjs_require__(10).Array.includes; - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -var $includes = __w_pdfjs_require__(36)(true); -$export($export.P, 'Array', { - includes: function includes(el) { - return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); - } -}); -__w_pdfjs_require__(42)('includes'); - -/***/ }), -/* 36 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var toIObject = __w_pdfjs_require__(37); -var toLength = __w_pdfjs_require__(39); -var toAbsoluteIndex = __w_pdfjs_require__(41); -module.exports = function (IS_INCLUDES) { - return function ($this, el, fromIndex) { - var O = toIObject($this); - var length = toLength(O.length); - var index = toAbsoluteIndex(fromIndex, length); - var value; - if (IS_INCLUDES && el != el) while (length > index) { - value = O[index++]; - if (value != value) return true; - } else for (; length > index; index++) { - if (IS_INCLUDES || index in O) { - if (O[index] === el) return IS_INCLUDES || index || 0; - } - }return !IS_INCLUDES && -1; - }; -}; - -/***/ }), -/* 37 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var IObject = __w_pdfjs_require__(38); -var defined = __w_pdfjs_require__(32); -module.exports = function (it) { - return IObject(defined(it)); -}; - -/***/ }), -/* 38 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var cof = __w_pdfjs_require__(28); -module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { - return cof(it) == 'String' ? it.split('') : Object(it); -}; - -/***/ }), -/* 39 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var toInteger = __w_pdfjs_require__(40); -var min = Math.min; -module.exports = function (it) { - return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; -}; - -/***/ }), -/* 40 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var ceil = Math.ceil; -var floor = Math.floor; -module.exports = function (it) { - return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); -}; - -/***/ }), -/* 41 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var toInteger = __w_pdfjs_require__(40); -var max = Math.max; -var min = Math.min; -module.exports = function (index, length) { - index = toInteger(index); - return index < 0 ? max(index + length, 0) : min(index, length); -}; - -/***/ }), -/* 42 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var UNSCOPABLES = __w_pdfjs_require__(29)('unscopables'); -var ArrayProto = Array.prototype; -if (ArrayProto[UNSCOPABLES] == undefined) __w_pdfjs_require__(11)(ArrayProto, UNSCOPABLES, {}); -module.exports = function (key) { - ArrayProto[UNSCOPABLES][key] = true; -}; - -/***/ }), -/* 43 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(44); -module.exports = __w_pdfjs_require__(10).Object.assign; - -/***/ }), -/* 44 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -$export($export.S + $export.F, 'Object', { assign: __w_pdfjs_require__(45) }); - -/***/ }), -/* 45 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var getKeys = __w_pdfjs_require__(46); -var gOPS = __w_pdfjs_require__(50); -var pIE = __w_pdfjs_require__(51); -var toObject = __w_pdfjs_require__(52); -var IObject = __w_pdfjs_require__(38); -var $assign = Object.assign; -module.exports = !$assign || __w_pdfjs_require__(17)(function () { - var A = {}; - var B = {}; - var S = Symbol(); - var K = 'abcdefghijklmnopqrst'; - A[S] = 7; - K.split('').forEach(function (k) { - B[k] = k; - }); - return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; -}) ? function assign(target, source) { - var T = toObject(target); - var aLen = arguments.length; - var index = 1; - var getSymbols = gOPS.f; - var isEnum = pIE.f; - while (aLen > index) { - var S = IObject(arguments[index++]); - var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S); - var length = keys.length; - var j = 0; - var key; - while (length > j) { - if (isEnum.call(S, key = keys[j++])) T[key] = S[key]; - } - } - return T; -} : $assign; - -/***/ }), -/* 46 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $keys = __w_pdfjs_require__(47); -var enumBugKeys = __w_pdfjs_require__(49); -module.exports = Object.keys || function keys(O) { - return $keys(O, enumBugKeys); -}; - -/***/ }), -/* 47 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var has = __w_pdfjs_require__(22); -var toIObject = __w_pdfjs_require__(37); -var arrayIndexOf = __w_pdfjs_require__(36)(false); -var IE_PROTO = __w_pdfjs_require__(48)('IE_PROTO'); -module.exports = function (object, names) { - var O = toIObject(object); - var i = 0; - var result = []; - var key; - for (key in O) { - if (key != IE_PROTO) has(O, key) && result.push(key); - }while (names.length > i) { - if (has(O, key = names[i++])) { - ~arrayIndexOf(result, key) || result.push(key); - } - }return result; -}; - -/***/ }), -/* 48 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var shared = __w_pdfjs_require__(30)('keys'); -var uid = __w_pdfjs_require__(23); -module.exports = function (key) { - return shared[key] || (shared[key] = uid(key)); -}; - -/***/ }), -/* 49 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'.split(','); - -/***/ }), -/* 50 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -exports.f = Object.getOwnPropertySymbols; - -/***/ }), -/* 51 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -exports.f = {}.propertyIsEnumerable; - -/***/ }), -/* 52 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var defined = __w_pdfjs_require__(32); -module.exports = function (it) { - return Object(defined(it)); -}; - -/***/ }), -/* 53 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(54); -module.exports = __w_pdfjs_require__(10).Math.log2; - -/***/ }), -/* 54 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -$export($export.S, 'Math', { - log2: function log2(x) { - return Math.log(x) / Math.LN2; - } -}); - -/***/ }), -/* 55 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(56); -module.exports = __w_pdfjs_require__(10).Number.isNaN; - -/***/ }), -/* 56 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -$export($export.S, 'Number', { - isNaN: function isNaN(number) { - return number != number; - } -}); - -/***/ }), -/* 57 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(58); -module.exports = __w_pdfjs_require__(10).Number.isInteger; - -/***/ }), -/* 58 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -$export($export.S, 'Number', { isInteger: __w_pdfjs_require__(59) }); - -/***/ }), -/* 59 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -var floor = Math.floor; -module.exports = function isInteger(it) { - return !isObject(it) && isFinite(it) && floor(it) === it; -}; - -/***/ }), -/* 60 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(61); -__w_pdfjs_require__(63); -__w_pdfjs_require__(73); -__w_pdfjs_require__(76); -__w_pdfjs_require__(93); -__w_pdfjs_require__(94); -module.exports = __w_pdfjs_require__(10).Promise; - -/***/ }), -/* 61 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var classof = __w_pdfjs_require__(62); -var test = {}; -test[__w_pdfjs_require__(29)('toStringTag')] = 'z'; -if (test + '' != '[object z]') { - __w_pdfjs_require__(21)(Object.prototype, 'toString', function toString() { - return '[object ' + classof(this) + ']'; - }, true); -} - -/***/ }), -/* 62 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var cof = __w_pdfjs_require__(28); -var TAG = __w_pdfjs_require__(29)('toStringTag'); -var ARG = cof(function () { - return arguments; -}()) == 'Arguments'; -var tryGet = function tryGet(it, key) { - try { - return it[key]; - } catch (e) {} -}; -module.exports = function (it) { - var O, T, B; - return it === undefined ? 'Undefined' : it === null ? 'Null' : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T : ARG ? cof(O) : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; -}; - -/***/ }), -/* 63 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $at = __w_pdfjs_require__(64)(true); -__w_pdfjs_require__(65)(String, 'String', function (iterated) { - this._t = String(iterated); - this._i = 0; -}, function () { - var O = this._t; - var index = this._i; - var point; - if (index >= O.length) return { - value: undefined, - done: true - }; - point = $at(O, index); - this._i += point.length; - return { - value: point, - done: false - }; -}); - -/***/ }), -/* 64 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var toInteger = __w_pdfjs_require__(40); -var defined = __w_pdfjs_require__(32); -module.exports = function (TO_STRING) { - return function (that, pos) { - var s = String(defined(that)); - var i = toInteger(pos); - var l = s.length; - var a, b; - if (i < 0 || i >= l) return TO_STRING ? '' : undefined; - a = s.charCodeAt(i); - return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; - }; -}; - -/***/ }), -/* 65 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var LIBRARY = __w_pdfjs_require__(31); -var $export = __w_pdfjs_require__(8); -var redefine = __w_pdfjs_require__(21); -var hide = __w_pdfjs_require__(11); -var Iterators = __w_pdfjs_require__(66); -var $iterCreate = __w_pdfjs_require__(67); -var setToStringTag = __w_pdfjs_require__(71); -var getPrototypeOf = __w_pdfjs_require__(72); -var ITERATOR = __w_pdfjs_require__(29)('iterator'); -var BUGGY = !([].keys && 'next' in [].keys()); -var FF_ITERATOR = '@@iterator'; -var KEYS = 'keys'; -var VALUES = 'values'; -var returnThis = function returnThis() { - return this; -}; -module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { - $iterCreate(Constructor, NAME, next); - var getMethod = function getMethod(kind) { - if (!BUGGY && kind in proto) return proto[kind]; - switch (kind) { - case KEYS: - return function keys() { - return new Constructor(this, kind); - }; - case VALUES: - return function values() { - return new Constructor(this, kind); - }; - } - return function entries() { - return new Constructor(this, kind); - }; - }; - var TAG = NAME + ' Iterator'; - var DEF_VALUES = DEFAULT == VALUES; - var VALUES_BUG = false; - var proto = Base.prototype; - var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; - var $default = $native || getMethod(DEFAULT); - var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; - var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; - var methods, key, IteratorPrototype; - if ($anyNative) { - IteratorPrototype = getPrototypeOf($anyNative.call(new Base())); - if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) { - setToStringTag(IteratorPrototype, TAG, true); - if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis); - } - } - if (DEF_VALUES && $native && $native.name !== VALUES) { - VALUES_BUG = true; - $default = function values() { - return $native.call(this); - }; - } - if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) { - hide(proto, ITERATOR, $default); - } - Iterators[NAME] = $default; - Iterators[TAG] = returnThis; - if (DEFAULT) { - methods = { - values: DEF_VALUES ? $default : getMethod(VALUES), - keys: IS_SET ? $default : getMethod(KEYS), - entries: $entries - }; - if (FORCED) for (key in methods) { - if (!(key in proto)) redefine(proto, key, methods[key]); - } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); - } - return methods; -}; - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = {}; - -/***/ }), -/* 67 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var create = __w_pdfjs_require__(68); -var descriptor = __w_pdfjs_require__(20); -var setToStringTag = __w_pdfjs_require__(71); -var IteratorPrototype = {}; -__w_pdfjs_require__(11)(IteratorPrototype, __w_pdfjs_require__(29)('iterator'), function () { - return this; -}); -module.exports = function (Constructor, NAME, next) { - Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); - setToStringTag(Constructor, NAME + ' Iterator'); -}; - -/***/ }), -/* 68 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var anObject = __w_pdfjs_require__(13); -var dPs = __w_pdfjs_require__(69); -var enumBugKeys = __w_pdfjs_require__(49); -var IE_PROTO = __w_pdfjs_require__(48)('IE_PROTO'); -var Empty = function Empty() {}; -var PROTOTYPE = 'prototype'; -var _createDict = function createDict() { - var iframe = __w_pdfjs_require__(18)('iframe'); - var i = enumBugKeys.length; - var lt = '<'; - var gt = '>'; - var iframeDocument; - iframe.style.display = 'none'; - __w_pdfjs_require__(70).appendChild(iframe); - iframe.src = 'javascript:'; - iframeDocument = iframe.contentWindow.document; - iframeDocument.open(); - iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); - iframeDocument.close(); - _createDict = iframeDocument.F; - while (i--) { - delete _createDict[PROTOTYPE][enumBugKeys[i]]; - }return _createDict(); -}; -module.exports = Object.create || function create(O, Properties) { - var result; - if (O !== null) { - Empty[PROTOTYPE] = anObject(O); - result = new Empty(); - Empty[PROTOTYPE] = null; - result[IE_PROTO] = O; - } else result = _createDict(); - return Properties === undefined ? result : dPs(result, Properties); -}; - -/***/ }), -/* 69 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var dP = __w_pdfjs_require__(12); -var anObject = __w_pdfjs_require__(13); -var getKeys = __w_pdfjs_require__(46); -module.exports = __w_pdfjs_require__(16) ? Object.defineProperties : function defineProperties(O, Properties) { - anObject(O); - var keys = getKeys(Properties); - var length = keys.length; - var i = 0; - var P; - while (length > i) { - dP.f(O, P = keys[i++], Properties[P]); - }return O; -}; - -/***/ }), -/* 70 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var document = __w_pdfjs_require__(9).document; -module.exports = document && document.documentElement; - -/***/ }), -/* 71 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var def = __w_pdfjs_require__(12).f; -var has = __w_pdfjs_require__(22); -var TAG = __w_pdfjs_require__(29)('toStringTag'); -module.exports = function (it, tag, stat) { - if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { - configurable: true, - value: tag - }); -}; - -/***/ }), -/* 72 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var has = __w_pdfjs_require__(22); -var toObject = __w_pdfjs_require__(52); -var IE_PROTO = __w_pdfjs_require__(48)('IE_PROTO'); -var ObjectProto = Object.prototype; -module.exports = Object.getPrototypeOf || function (O) { - O = toObject(O); - if (has(O, IE_PROTO)) return O[IE_PROTO]; - if (typeof O.constructor == 'function' && O instanceof O.constructor) { - return O.constructor.prototype; - } - return O instanceof Object ? ObjectProto : null; -}; - -/***/ }), -/* 73 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $iterators = __w_pdfjs_require__(74); -var getKeys = __w_pdfjs_require__(46); -var redefine = __w_pdfjs_require__(21); -var global = __w_pdfjs_require__(9); -var hide = __w_pdfjs_require__(11); -var Iterators = __w_pdfjs_require__(66); -var wks = __w_pdfjs_require__(29); -var ITERATOR = wks('iterator'); -var TO_STRING_TAG = wks('toStringTag'); -var ArrayValues = Iterators.Array; -var DOMIterables = { - CSSRuleList: true, - CSSStyleDeclaration: false, - CSSValueList: false, - ClientRectList: false, - DOMRectList: false, - DOMStringList: false, - DOMTokenList: true, - DataTransferItemList: false, - FileList: false, - HTMLAllCollection: false, - HTMLCollection: false, - HTMLFormElement: false, - HTMLSelectElement: false, - MediaList: true, - MimeTypeArray: false, - NamedNodeMap: false, - NodeList: true, - PaintRequestList: false, - Plugin: false, - PluginArray: false, - SVGLengthList: false, - SVGNumberList: false, - SVGPathSegList: false, - SVGPointList: false, - SVGStringList: false, - SVGTransformList: false, - SourceBufferList: false, - StyleSheetList: true, - TextTrackCueList: false, - TextTrackList: false, - TouchList: false -}; -for (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) { - var NAME = collections[i]; - var explicit = DOMIterables[NAME]; - var Collection = global[NAME]; - var proto = Collection && Collection.prototype; - var key; - if (proto) { - if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues); - if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME); - Iterators[NAME] = ArrayValues; - if (explicit) for (key in $iterators) { - if (!proto[key]) redefine(proto, key, $iterators[key], true); - } - } -} - -/***/ }), -/* 74 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var addToUnscopables = __w_pdfjs_require__(42); -var step = __w_pdfjs_require__(75); -var Iterators = __w_pdfjs_require__(66); -var toIObject = __w_pdfjs_require__(37); -module.exports = __w_pdfjs_require__(65)(Array, 'Array', function (iterated, kind) { - this._t = toIObject(iterated); - this._i = 0; - this._k = kind; -}, function () { - var O = this._t; - var kind = this._k; - var index = this._i++; - if (!O || index >= O.length) { - this._t = undefined; - return step(1); - } - if (kind == 'keys') return step(0, index); - if (kind == 'values') return step(0, O[index]); - return step(0, [index, O[index]]); -}, 'values'); -Iterators.Arguments = Iterators.Array; -addToUnscopables('keys'); -addToUnscopables('values'); -addToUnscopables('entries'); - -/***/ }), -/* 75 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (done, value) { - return { - value: value, - done: !!done - }; -}; - -/***/ }), -/* 76 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var LIBRARY = __w_pdfjs_require__(31); -var global = __w_pdfjs_require__(9); -var ctx = __w_pdfjs_require__(24); -var classof = __w_pdfjs_require__(62); -var $export = __w_pdfjs_require__(8); -var isObject = __w_pdfjs_require__(14); -var aFunction = __w_pdfjs_require__(25); -var anInstance = __w_pdfjs_require__(77); -var forOf = __w_pdfjs_require__(78); -var speciesConstructor = __w_pdfjs_require__(82); -var task = __w_pdfjs_require__(83).set; -var microtask = __w_pdfjs_require__(85)(); -var newPromiseCapabilityModule = __w_pdfjs_require__(86); -var perform = __w_pdfjs_require__(87); -var userAgent = __w_pdfjs_require__(88); -var promiseResolve = __w_pdfjs_require__(89); -var PROMISE = 'Promise'; -var TypeError = global.TypeError; -var process = global.process; -var versions = process && process.versions; -var v8 = versions && versions.v8 || ''; -var $Promise = global[PROMISE]; -var isNode = classof(process) == 'process'; -var empty = function empty() {}; -var Internal, newGenericPromiseCapability, OwnPromiseCapability, Wrapper; -var newPromiseCapability = newGenericPromiseCapability = newPromiseCapabilityModule.f; -var USE_NATIVE = !!function () { - try { - var promise = $Promise.resolve(1); - var FakePromise = (promise.constructor = {})[__w_pdfjs_require__(29)('species')] = function (exec) { - exec(empty, empty); - }; - return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise && v8.indexOf('6.6') !== 0 && userAgent.indexOf('Chrome/66') === -1; - } catch (e) {} -}(); -var isThenable = function isThenable(it) { - var then; - return isObject(it) && typeof (then = it.then) == 'function' ? then : false; -}; -var notify = function notify(promise, isReject) { - if (promise._n) return; - promise._n = true; - var chain = promise._c; - microtask(function () { - var value = promise._v; - var ok = promise._s == 1; - var i = 0; - var run = function run(reaction) { - var handler = ok ? reaction.ok : reaction.fail; - var resolve = reaction.resolve; - var reject = reaction.reject; - var domain = reaction.domain; - var result, then, exited; - try { - if (handler) { - if (!ok) { - if (promise._h == 2) onHandleUnhandled(promise); - promise._h = 1; - } - if (handler === true) result = value;else { - if (domain) domain.enter(); - result = handler(value); - if (domain) { - domain.exit(); - exited = true; - } - } - if (result === reaction.promise) { - reject(TypeError('Promise-chain cycle')); - } else if (then = isThenable(result)) { - then.call(result, resolve, reject); - } else resolve(result); - } else reject(value); - } catch (e) { - if (domain && !exited) domain.exit(); - reject(e); - } - }; - while (chain.length > i) { - run(chain[i++]); - }promise._c = []; - promise._n = false; - if (isReject && !promise._h) onUnhandled(promise); - }); -}; -var onUnhandled = function onUnhandled(promise) { - task.call(global, function () { - var value = promise._v; - var unhandled = isUnhandled(promise); - var result, handler, console; - if (unhandled) { - result = perform(function () { - if (isNode) { - process.emit('unhandledRejection', value, promise); - } else if (handler = global.onunhandledrejection) { - handler({ - promise: promise, - reason: value - }); - } else if ((console = global.console) && console.error) { - console.error('Unhandled promise rejection', value); - } - }); - promise._h = isNode || isUnhandled(promise) ? 2 : 1; - } - promise._a = undefined; - if (unhandled && result.e) throw result.v; - }); -}; -var isUnhandled = function isUnhandled(promise) { - return promise._h !== 1 && (promise._a || promise._c).length === 0; -}; -var onHandleUnhandled = function onHandleUnhandled(promise) { - task.call(global, function () { - var handler; - if (isNode) { - process.emit('rejectionHandled', promise); - } else if (handler = global.onrejectionhandled) { - handler({ - promise: promise, - reason: promise._v - }); - } - }); -}; -var $reject = function $reject(value) { - var promise = this; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; - promise._v = value; - promise._s = 2; - if (!promise._a) promise._a = promise._c.slice(); - notify(promise, true); -}; -var $resolve = function $resolve(value) { - var promise = this; - var then; - if (promise._d) return; - promise._d = true; - promise = promise._w || promise; - try { - if (promise === value) throw TypeError("Promise can't be resolved itself"); - if (then = isThenable(value)) { - microtask(function () { - var wrapper = { - _w: promise, - _d: false - }; - try { - then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); - } catch (e) { - $reject.call(wrapper, e); - } - }); - } else { - promise._v = value; - promise._s = 1; - notify(promise, false); - } - } catch (e) { - $reject.call({ - _w: promise, - _d: false - }, e); - } -}; -if (!USE_NATIVE) { - $Promise = function Promise(executor) { - anInstance(this, $Promise, PROMISE, '_h'); - aFunction(executor); - Internal.call(this); - try { - executor(ctx($resolve, this, 1), ctx($reject, this, 1)); - } catch (err) { - $reject.call(this, err); - } - }; - Internal = function Promise(executor) { - this._c = []; - this._a = undefined; - this._s = 0; - this._d = false; - this._v = undefined; - this._h = 0; - this._n = false; - }; - Internal.prototype = __w_pdfjs_require__(90)($Promise.prototype, { - then: function then(onFulfilled, onRejected) { - var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); - reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; - reaction.fail = typeof onRejected == 'function' && onRejected; - reaction.domain = isNode ? process.domain : undefined; - this._c.push(reaction); - if (this._a) this._a.push(reaction); - if (this._s) notify(this, false); - return reaction.promise; - }, - 'catch': function _catch(onRejected) { - return this.then(undefined, onRejected); - } - }); - OwnPromiseCapability = function OwnPromiseCapability() { - var promise = new Internal(); - this.promise = promise; - this.resolve = ctx($resolve, promise, 1); - this.reject = ctx($reject, promise, 1); - }; - newPromiseCapabilityModule.f = newPromiseCapability = function newPromiseCapability(C) { - return C === $Promise || C === Wrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); - }; -} -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Promise: $Promise }); -__w_pdfjs_require__(71)($Promise, PROMISE); -__w_pdfjs_require__(91)(PROMISE); -Wrapper = __w_pdfjs_require__(10)[PROMISE]; -$export($export.S + $export.F * !USE_NATIVE, PROMISE, { - reject: function reject(r) { - var capability = newPromiseCapability(this); - var $$reject = capability.reject; - $$reject(r); - return capability.promise; - } -}); -$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { - resolve: function resolve(x) { - return promiseResolve(LIBRARY && this === Wrapper ? $Promise : this, x); - } -}); -$export($export.S + $export.F * !(USE_NATIVE && __w_pdfjs_require__(92)(function (iter) { - $Promise.all(iter)['catch'](empty); -})), PROMISE, { - all: function all(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var resolve = capability.resolve; - var reject = capability.reject; - var result = perform(function () { - var values = []; - var index = 0; - var remaining = 1; - forOf(iterable, false, function (promise) { - var $index = index++; - var alreadyCalled = false; - values.push(undefined); - remaining++; - C.resolve(promise).then(function (value) { - if (alreadyCalled) return; - alreadyCalled = true; - values[$index] = value; - --remaining || resolve(values); - }, reject); - }); - --remaining || resolve(values); - }); - if (result.e) reject(result.v); - return capability.promise; - }, - race: function race(iterable) { - var C = this; - var capability = newPromiseCapability(C); - var reject = capability.reject; - var result = perform(function () { - forOf(iterable, false, function (promise) { - C.resolve(promise).then(capability.resolve, reject); - }); - }); - if (result.e) reject(result.v); - return capability.promise; - } -}); - -/***/ }), -/* 77 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (it, Constructor, name, forbiddenField) { - if (!(it instanceof Constructor) || forbiddenField !== undefined && forbiddenField in it) { - throw TypeError(name + ': incorrect invocation!'); - } - return it; -}; - -/***/ }), -/* 78 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var ctx = __w_pdfjs_require__(24); -var call = __w_pdfjs_require__(79); -var isArrayIter = __w_pdfjs_require__(80); -var anObject = __w_pdfjs_require__(13); -var toLength = __w_pdfjs_require__(39); -var getIterFn = __w_pdfjs_require__(81); -var BREAK = {}; -var RETURN = {}; -var _exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { - var iterFn = ITERATOR ? function () { - return iterable; - } : getIterFn(iterable); - var f = ctx(fn, that, entries ? 2 : 1); - var index = 0; - var length, step, iterator, result; - if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); - if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { - result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); - if (result === BREAK || result === RETURN) return result; - } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { - result = call(iterator, f, step.value, entries); - if (result === BREAK || result === RETURN) return result; - } -}; -_exports.BREAK = BREAK; -_exports.RETURN = RETURN; - -/***/ }), -/* 79 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var anObject = __w_pdfjs_require__(13); -module.exports = function (iterator, fn, value, entries) { - try { - return entries ? fn(anObject(value)[0], value[1]) : fn(value); - } catch (e) { - var ret = iterator['return']; - if (ret !== undefined) anObject(ret.call(iterator)); - throw e; - } -}; - -/***/ }), -/* 80 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var Iterators = __w_pdfjs_require__(66); -var ITERATOR = __w_pdfjs_require__(29)('iterator'); -var ArrayProto = Array.prototype; -module.exports = function (it) { - return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); -}; - -/***/ }), -/* 81 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var classof = __w_pdfjs_require__(62); -var ITERATOR = __w_pdfjs_require__(29)('iterator'); -var Iterators = __w_pdfjs_require__(66); -module.exports = __w_pdfjs_require__(10).getIteratorMethod = function (it) { - if (it != undefined) return it[ITERATOR] || it['@@iterator'] || Iterators[classof(it)]; -}; - -/***/ }), -/* 82 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var anObject = __w_pdfjs_require__(13); -var aFunction = __w_pdfjs_require__(25); -var SPECIES = __w_pdfjs_require__(29)('species'); -module.exports = function (O, D) { - var C = anObject(O).constructor; - var S; - return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); -}; - -/***/ }), -/* 83 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var ctx = __w_pdfjs_require__(24); -var invoke = __w_pdfjs_require__(84); -var html = __w_pdfjs_require__(70); -var cel = __w_pdfjs_require__(18); -var global = __w_pdfjs_require__(9); -var process = global.process; -var setTask = global.setImmediate; -var clearTask = global.clearImmediate; -var MessageChannel = global.MessageChannel; -var Dispatch = global.Dispatch; -var counter = 0; -var queue = {}; -var ONREADYSTATECHANGE = 'onreadystatechange'; -var defer, channel, port; -var run = function run() { - var id = +this; - if (queue.hasOwnProperty(id)) { - var fn = queue[id]; - delete queue[id]; - fn(); - } -}; -var listener = function listener(event) { - run.call(event.data); -}; -if (!setTask || !clearTask) { - setTask = function setImmediate(fn) { - var args = []; - var i = 1; - while (arguments.length > i) { - args.push(arguments[i++]); - }queue[++counter] = function () { - invoke(typeof fn == 'function' ? fn : Function(fn), args); - }; - defer(counter); - return counter; - }; - clearTask = function clearImmediate(id) { - delete queue[id]; - }; - if (__w_pdfjs_require__(28)(process) == 'process') { - defer = function defer(id) { - process.nextTick(ctx(run, id, 1)); - }; - } else if (Dispatch && Dispatch.now) { - defer = function defer(id) { - Dispatch.now(ctx(run, id, 1)); - }; - } else if (MessageChannel) { - channel = new MessageChannel(); - port = channel.port2; - channel.port1.onmessage = listener; - defer = ctx(port.postMessage, port, 1); - } else if (global.addEventListener && typeof postMessage == 'function' && !global.importScripts) { - defer = function defer(id) { - global.postMessage(id + '', '*'); - }; - global.addEventListener('message', listener, false); - } else if (ONREADYSTATECHANGE in cel('script')) { - defer = function defer(id) { - html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function () { - html.removeChild(this); - run.call(id); - }; - }; - } else { - defer = function defer(id) { - setTimeout(ctx(run, id, 1), 0); - }; - } -} -module.exports = { - set: setTask, - clear: clearTask -}; - -/***/ }), -/* 84 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (fn, args, that) { - var un = that === undefined; - switch (args.length) { - case 0: - return un ? fn() : fn.call(that); - case 1: - return un ? fn(args[0]) : fn.call(that, args[0]); - case 2: - return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); - case 3: - return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); - case 4: - return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); - } - return fn.apply(that, args); -}; - -/***/ }), -/* 85 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var global = __w_pdfjs_require__(9); -var macrotask = __w_pdfjs_require__(83).set; -var Observer = global.MutationObserver || global.WebKitMutationObserver; -var process = global.process; -var Promise = global.Promise; -var isNode = __w_pdfjs_require__(28)(process) == 'process'; -module.exports = function () { - var head, last, notify; - var flush = function flush() { - var parent, fn; - if (isNode && (parent = process.domain)) parent.exit(); - while (head) { - fn = head.fn; - head = head.next; - try { - fn(); - } catch (e) { - if (head) notify();else last = undefined; - throw e; - } - } - last = undefined; - if (parent) parent.enter(); - }; - if (isNode) { - notify = function notify() { - process.nextTick(flush); - }; - } else if (Observer && !(global.navigator && global.navigator.standalone)) { - var toggle = true; - var node = document.createTextNode(''); - new Observer(flush).observe(node, { characterData: true }); - notify = function notify() { - node.data = toggle = !toggle; - }; - } else if (Promise && Promise.resolve) { - var promise = Promise.resolve(undefined); - notify = function notify() { - promise.then(flush); - }; - } else { - notify = function notify() { - macrotask.call(global, flush); - }; - } - return function (fn) { - var task = { - fn: fn, - next: undefined - }; - if (last) last.next = task; - if (!head) { - head = task; - notify(); - } - last = task; - }; -}; - -/***/ }), -/* 86 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var aFunction = __w_pdfjs_require__(25); -function PromiseCapability(C) { - var resolve, reject; - this.promise = new C(function ($$resolve, $$reject) { - if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); - resolve = $$resolve; - reject = $$reject; - }); - this.resolve = aFunction(resolve); - this.reject = aFunction(reject); -} -module.exports.f = function (C) { - return new PromiseCapability(C); -}; - -/***/ }), -/* 87 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (exec) { - try { - return { - e: false, - v: exec() - }; - } catch (e) { - return { - e: true, - v: e - }; - } -}; - -/***/ }), -/* 88 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var global = __w_pdfjs_require__(9); -var navigator = global.navigator; -module.exports = navigator && navigator.userAgent || ''; - -/***/ }), -/* 89 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var anObject = __w_pdfjs_require__(13); -var isObject = __w_pdfjs_require__(14); -var newPromiseCapability = __w_pdfjs_require__(86); -module.exports = function (C, x) { - anObject(C); - if (isObject(x) && x.constructor === C) return x; - var promiseCapability = newPromiseCapability.f(C); - var resolve = promiseCapability.resolve; - resolve(x); - return promiseCapability.promise; -}; - -/***/ }), -/* 90 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var redefine = __w_pdfjs_require__(21); -module.exports = function (target, src, safe) { - for (var key in src) { - redefine(target, key, src[key], safe); - }return target; -}; - -/***/ }), -/* 91 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var global = __w_pdfjs_require__(9); -var dP = __w_pdfjs_require__(12); -var DESCRIPTORS = __w_pdfjs_require__(16); -var SPECIES = __w_pdfjs_require__(29)('species'); -module.exports = function (KEY) { - var C = global[KEY]; - if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, { - configurable: true, - get: function get() { - return this; - } - }); -}; - -/***/ }), -/* 92 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var ITERATOR = __w_pdfjs_require__(29)('iterator'); -var SAFE_CLOSING = false; -try { - var riter = [7][ITERATOR](); - riter['return'] = function () { - SAFE_CLOSING = true; - }; - Array.from(riter, function () { - throw 2; - }); -} catch (e) {} -module.exports = function (exec, skipClosing) { - if (!skipClosing && !SAFE_CLOSING) return false; - var safe = false; - try { - var arr = [7]; - var iter = arr[ITERATOR](); - iter.next = function () { - return { done: safe = true }; - }; - arr[ITERATOR] = function () { - return iter; - }; - exec(arr); - } catch (e) {} - return safe; -}; - -/***/ }), -/* 93 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -var core = __w_pdfjs_require__(10); -var global = __w_pdfjs_require__(9); -var speciesConstructor = __w_pdfjs_require__(82); -var promiseResolve = __w_pdfjs_require__(89); -$export($export.P + $export.R, 'Promise', { - 'finally': function _finally(onFinally) { - var C = speciesConstructor(this, core.Promise || global.Promise); - var isFunction = typeof onFinally == 'function'; - return this.then(isFunction ? function (x) { - return promiseResolve(C, onFinally()).then(function () { - return x; - }); - } : onFinally, isFunction ? function (e) { - return promiseResolve(C, onFinally()).then(function () { - throw e; - }); - } : onFinally); - } -}); - -/***/ }), -/* 94 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -var newPromiseCapability = __w_pdfjs_require__(86); -var perform = __w_pdfjs_require__(87); -$export($export.S, 'Promise', { - 'try': function _try(callbackfn) { - var promiseCapability = newPromiseCapability.f(this); - var result = perform(callbackfn); - (result.e ? promiseCapability.reject : promiseCapability.resolve)(result.v); - return promiseCapability.promise; - } -}); - -/***/ }), -/* 95 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(61); -__w_pdfjs_require__(73); -__w_pdfjs_require__(96); -__w_pdfjs_require__(108); -__w_pdfjs_require__(110); -module.exports = __w_pdfjs_require__(10).WeakMap; - -/***/ }), -/* 96 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var each = __w_pdfjs_require__(97)(0); -var redefine = __w_pdfjs_require__(21); -var meta = __w_pdfjs_require__(101); -var assign = __w_pdfjs_require__(45); -var weak = __w_pdfjs_require__(102); -var isObject = __w_pdfjs_require__(14); -var fails = __w_pdfjs_require__(17); -var validate = __w_pdfjs_require__(103); -var WEAK_MAP = 'WeakMap'; -var getWeak = meta.getWeak; -var isExtensible = Object.isExtensible; -var uncaughtFrozenStore = weak.ufstore; -var tmp = {}; -var InternalMap; -var wrapper = function wrapper(get) { - return function WeakMap() { - return get(this, arguments.length > 0 ? arguments[0] : undefined); - }; -}; -var methods = { - get: function get(key) { - if (isObject(key)) { - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, WEAK_MAP)).get(key); - return data ? data[this._i] : undefined; - } - }, - set: function set(key, value) { - return weak.def(validate(this, WEAK_MAP), key, value); - } -}; -var $WeakMap = module.exports = __w_pdfjs_require__(104)(WEAK_MAP, wrapper, methods, weak, true, true); -if (fails(function () { - return new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7; -})) { - InternalMap = weak.getConstructor(wrapper, WEAK_MAP); - assign(InternalMap.prototype, methods); - meta.NEED = true; - each(['delete', 'has', 'get', 'set'], function (key) { - var proto = $WeakMap.prototype; - var method = proto[key]; - redefine(proto, key, function (a, b) { - if (isObject(a) && !isExtensible(a)) { - if (!this._f) this._f = new InternalMap(); - var result = this._f[key](a, b); - return key == 'set' ? this : result; - } - return method.call(this, a, b); - }); - }); -} - -/***/ }), -/* 97 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var ctx = __w_pdfjs_require__(24); -var IObject = __w_pdfjs_require__(38); -var toObject = __w_pdfjs_require__(52); -var toLength = __w_pdfjs_require__(39); -var asc = __w_pdfjs_require__(98); -module.exports = function (TYPE, $create) { - var IS_MAP = TYPE == 1; - var IS_FILTER = TYPE == 2; - var IS_SOME = TYPE == 3; - var IS_EVERY = TYPE == 4; - var IS_FIND_INDEX = TYPE == 6; - var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; - var create = $create || asc; - return function ($this, callbackfn, that) { - var O = toObject($this); - var self = IObject(O); - var f = ctx(callbackfn, that, 3); - var length = toLength(self.length); - var index = 0; - var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; - var val, res; - for (; length > index; index++) { - if (NO_HOLES || index in self) { - val = self[index]; - res = f(val, index, O); - if (TYPE) { - if (IS_MAP) result[index] = res;else if (res) switch (TYPE) { - case 3: - return true; - case 5: - return val; - case 6: - return index; - case 2: - result.push(val); - } else if (IS_EVERY) return false; - } - } - }return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; - }; -}; - -/***/ }), -/* 98 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var speciesConstructor = __w_pdfjs_require__(99); -module.exports = function (original, length) { - return new (speciesConstructor(original))(length); -}; - -/***/ }), -/* 99 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -var isArray = __w_pdfjs_require__(100); -var SPECIES = __w_pdfjs_require__(29)('species'); -module.exports = function (original) { - var C; - if (isArray(original)) { - C = original.constructor; - if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; - if (isObject(C)) { - C = C[SPECIES]; - if (C === null) C = undefined; - } - } - return C === undefined ? Array : C; -}; - -/***/ }), -/* 100 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var cof = __w_pdfjs_require__(28); -module.exports = Array.isArray || function isArray(arg) { - return cof(arg) == 'Array'; -}; - -/***/ }), -/* 101 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var META = __w_pdfjs_require__(23)('meta'); -var isObject = __w_pdfjs_require__(14); -var has = __w_pdfjs_require__(22); -var setDesc = __w_pdfjs_require__(12).f; -var id = 0; -var isExtensible = Object.isExtensible || function () { - return true; -}; -var FREEZE = !__w_pdfjs_require__(17)(function () { - return isExtensible(Object.preventExtensions({})); -}); -var setMeta = function setMeta(it) { - setDesc(it, META, { - value: { - i: 'O' + ++id, - w: {} - } - }); -}; -var fastKey = function fastKey(it, create) { - if (!isObject(it)) return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; - if (!has(it, META)) { - if (!isExtensible(it)) return 'F'; - if (!create) return 'E'; - setMeta(it); - } - return it[META].i; -}; -var getWeak = function getWeak(it, create) { - if (!has(it, META)) { - if (!isExtensible(it)) return true; - if (!create) return false; - setMeta(it); - } - return it[META].w; -}; -var onFreeze = function onFreeze(it) { - if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it); - return it; -}; -var meta = module.exports = { - KEY: META, - NEED: false, - fastKey: fastKey, - getWeak: getWeak, - onFreeze: onFreeze -}; - -/***/ }), -/* 102 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var redefineAll = __w_pdfjs_require__(90); -var getWeak = __w_pdfjs_require__(101).getWeak; -var anObject = __w_pdfjs_require__(13); -var isObject = __w_pdfjs_require__(14); -var anInstance = __w_pdfjs_require__(77); -var forOf = __w_pdfjs_require__(78); -var createArrayMethod = __w_pdfjs_require__(97); -var $has = __w_pdfjs_require__(22); -var validate = __w_pdfjs_require__(103); -var arrayFind = createArrayMethod(5); -var arrayFindIndex = createArrayMethod(6); -var id = 0; -var uncaughtFrozenStore = function uncaughtFrozenStore(that) { - return that._l || (that._l = new UncaughtFrozenStore()); -}; -var UncaughtFrozenStore = function UncaughtFrozenStore() { - this.a = []; -}; -var findUncaughtFrozen = function findUncaughtFrozen(store, key) { - return arrayFind(store.a, function (it) { - return it[0] === key; - }); -}; -UncaughtFrozenStore.prototype = { - get: function get(key) { - var entry = findUncaughtFrozen(this, key); - if (entry) return entry[1]; - }, - has: function has(key) { - return !!findUncaughtFrozen(this, key); - }, - set: function set(key, value) { - var entry = findUncaughtFrozen(this, key); - if (entry) entry[1] = value;else this.a.push([key, value]); - }, - 'delete': function _delete(key) { - var index = arrayFindIndex(this.a, function (it) { - return it[0] === key; - }); - if (~index) this.a.splice(index, 1); - return !!~index; - } -}; -module.exports = { - getConstructor: function getConstructor(wrapper, NAME, IS_MAP, ADDER) { - var C = wrapper(function (that, iterable) { - anInstance(that, C, NAME, '_i'); - that._t = NAME; - that._i = id++; - that._l = undefined; - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - }); - redefineAll(C.prototype, { - 'delete': function _delete(key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); - return data && $has(data, this._i) && delete data[this._i]; - }, - has: function has(key) { - if (!isObject(key)) return false; - var data = getWeak(key); - if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); - return data && $has(data, this._i); - } - }); - return C; - }, - def: function def(that, key, value) { - var data = getWeak(anObject(key), true); - if (data === true) uncaughtFrozenStore(that).set(key, value);else data[that._i] = value; - return that; - }, - ufstore: uncaughtFrozenStore -}; - -/***/ }), -/* 103 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -module.exports = function (it, TYPE) { - if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!'); - return it; -}; - -/***/ }), -/* 104 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var global = __w_pdfjs_require__(9); -var $export = __w_pdfjs_require__(8); -var redefine = __w_pdfjs_require__(21); -var redefineAll = __w_pdfjs_require__(90); -var meta = __w_pdfjs_require__(101); -var forOf = __w_pdfjs_require__(78); -var anInstance = __w_pdfjs_require__(77); -var isObject = __w_pdfjs_require__(14); -var fails = __w_pdfjs_require__(17); -var $iterDetect = __w_pdfjs_require__(92); -var setToStringTag = __w_pdfjs_require__(71); -var inheritIfRequired = __w_pdfjs_require__(105); -module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { - var Base = global[NAME]; - var C = Base; - var ADDER = IS_MAP ? 'set' : 'add'; - var proto = C && C.prototype; - var O = {}; - var fixMethod = function fixMethod(KEY) { - var fn = proto[KEY]; - redefine(proto, KEY, KEY == 'delete' ? function (a) { - return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'has' ? function has(a) { - return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'get' ? function get(a) { - return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); - } : KEY == 'add' ? function add(a) { - fn.call(this, a === 0 ? 0 : a); - return this; - } : function set(a, b) { - fn.call(this, a === 0 ? 0 : a, b); - return this; - }); - }; - if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { - new C().entries().next(); - }))) { - C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); - redefineAll(C.prototype, methods); - meta.NEED = true; - } else { - var instance = new C(); - var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; - var THROWS_ON_PRIMITIVES = fails(function () { - instance.has(1); - }); - var ACCEPT_ITERABLES = $iterDetect(function (iter) { - new C(iter); - }); - var BUGGY_ZERO = !IS_WEAK && fails(function () { - var $instance = new C(); - var index = 5; - while (index--) { - $instance[ADDER](index, index); - }return !$instance.has(-0); - }); - if (!ACCEPT_ITERABLES) { - C = wrapper(function (target, iterable) { - anInstance(target, C, NAME); - var that = inheritIfRequired(new Base(), target, C); - if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); - return that; - }); - C.prototype = proto; - proto.constructor = C; - } - if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { - fixMethod('delete'); - fixMethod('has'); - IS_MAP && fixMethod('get'); - } - if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); - if (IS_WEAK && proto.clear) delete proto.clear; - } - setToStringTag(C, NAME); - O[NAME] = C; - $export($export.G + $export.W + $export.F * (C != Base), O); - if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); - return C; -}; - -/***/ }), -/* 105 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -var setPrototypeOf = __w_pdfjs_require__(106).set; -module.exports = function (that, target, C) { - var S = target.constructor; - var P; - if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { - setPrototypeOf(that, P); - } - return that; -}; - -/***/ }), -/* 106 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isObject = __w_pdfjs_require__(14); -var anObject = __w_pdfjs_require__(13); -var check = function check(O, proto) { - anObject(O); - if (!isObject(proto) && proto !== null) throw TypeError(proto + ": can't set as prototype!"); -}; -module.exports = { - set: Object.setPrototypeOf || ('__proto__' in {} ? function (test, buggy, set) { - try { - set = __w_pdfjs_require__(24)(Function.call, __w_pdfjs_require__(107).f(Object.prototype, '__proto__').set, 2); - set(test, []); - buggy = !(test instanceof Array); - } catch (e) { - buggy = true; - } - return function setPrototypeOf(O, proto) { - check(O, proto); - if (buggy) O.__proto__ = proto;else set(O, proto); - return O; - }; - }({}, false) : undefined), - check: check -}; - -/***/ }), -/* 107 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var pIE = __w_pdfjs_require__(51); -var createDesc = __w_pdfjs_require__(20); -var toIObject = __w_pdfjs_require__(37); -var toPrimitive = __w_pdfjs_require__(19); -var has = __w_pdfjs_require__(22); -var IE8_DOM_DEFINE = __w_pdfjs_require__(15); -var gOPD = Object.getOwnPropertyDescriptor; -exports.f = __w_pdfjs_require__(16) ? gOPD : function getOwnPropertyDescriptor(O, P) { - O = toIObject(O); - P = toPrimitive(P, true); - if (IE8_DOM_DEFINE) try { - return gOPD(O, P); - } catch (e) {} - if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]); -}; - -/***/ }), -/* 108 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(109)('WeakMap'); - -/***/ }), -/* 109 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -module.exports = function (COLLECTION) { - $export($export.S, COLLECTION, { - of: function of() { - var length = arguments.length; - var A = new Array(length); - while (length--) { - A[length] = arguments[length]; - }return new this(A); - } - }); -}; - -/***/ }), -/* 110 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(111)('WeakMap'); - -/***/ }), -/* 111 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -var aFunction = __w_pdfjs_require__(25); -var ctx = __w_pdfjs_require__(24); -var forOf = __w_pdfjs_require__(78); -module.exports = function (COLLECTION) { - $export($export.S, COLLECTION, { - from: function from(source) { - var mapFn = arguments[1]; - var mapping, A, n, cb; - aFunction(this); - mapping = mapFn !== undefined; - if (mapping) aFunction(mapFn); - if (source == undefined) return new this(); - A = []; - if (mapping) { - n = 0; - cb = ctx(mapFn, arguments[2], 2); - forOf(source, false, function (nextItem) { - A.push(cb(nextItem, n++)); - }); - } else { - forOf(source, false, A.push, A); - } - return new this(A); - } - }); -}; - -/***/ }), -/* 112 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(113); -module.exports = __w_pdfjs_require__(10).String.codePointAt; - -/***/ }), -/* 113 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -var $at = __w_pdfjs_require__(64)(false); -$export($export.P, 'String', { - codePointAt: function codePointAt(pos) { - return $at(this, pos); - } -}); - -/***/ }), -/* 114 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(115); -module.exports = __w_pdfjs_require__(10).String.fromCodePoint; - -/***/ }), -/* 115 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -var toAbsoluteIndex = __w_pdfjs_require__(41); -var fromCharCode = String.fromCharCode; -var $fromCodePoint = String.fromCodePoint; -$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { - fromCodePoint: function fromCodePoint(x) { - var res = []; - var aLen = arguments.length; - var i = 0; - var code; - while (aLen > i) { - code = +arguments[i++]; - if (toAbsoluteIndex(code, 0x10ffff) !== code) throw RangeError(code + ' is not a valid code point'); - res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)); - } - return res.join(''); - } -}); - -/***/ }), -/* 116 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(117); -__w_pdfjs_require__(61); -module.exports = __w_pdfjs_require__(10).Symbol; - -/***/ }), -/* 117 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var global = __w_pdfjs_require__(9); -var has = __w_pdfjs_require__(22); -var DESCRIPTORS = __w_pdfjs_require__(16); -var $export = __w_pdfjs_require__(8); -var redefine = __w_pdfjs_require__(21); -var META = __w_pdfjs_require__(101).KEY; -var $fails = __w_pdfjs_require__(17); -var shared = __w_pdfjs_require__(30); -var setToStringTag = __w_pdfjs_require__(71); -var uid = __w_pdfjs_require__(23); -var wks = __w_pdfjs_require__(29); -var wksExt = __w_pdfjs_require__(118); -var wksDefine = __w_pdfjs_require__(119); -var enumKeys = __w_pdfjs_require__(120); -var isArray = __w_pdfjs_require__(100); -var anObject = __w_pdfjs_require__(13); -var isObject = __w_pdfjs_require__(14); -var toIObject = __w_pdfjs_require__(37); -var toPrimitive = __w_pdfjs_require__(19); -var createDesc = __w_pdfjs_require__(20); -var _create = __w_pdfjs_require__(68); -var gOPNExt = __w_pdfjs_require__(121); -var $GOPD = __w_pdfjs_require__(107); -var $DP = __w_pdfjs_require__(12); -var $keys = __w_pdfjs_require__(46); -var gOPD = $GOPD.f; -var dP = $DP.f; -var gOPN = gOPNExt.f; -var $Symbol = global.Symbol; -var $JSON = global.JSON; -var _stringify = $JSON && $JSON.stringify; -var PROTOTYPE = 'prototype'; -var HIDDEN = wks('_hidden'); -var TO_PRIMITIVE = wks('toPrimitive'); -var isEnum = {}.propertyIsEnumerable; -var SymbolRegistry = shared('symbol-registry'); -var AllSymbols = shared('symbols'); -var OPSymbols = shared('op-symbols'); -var ObjectProto = Object[PROTOTYPE]; -var USE_NATIVE = typeof $Symbol == 'function'; -var QObject = global.QObject; -var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; -var setSymbolDesc = DESCRIPTORS && $fails(function () { - return _create(dP({}, 'a', { - get: function get() { - return dP(this, 'a', { value: 7 }).a; - } - })).a != 7; -}) ? function (it, key, D) { - var protoDesc = gOPD(ObjectProto, key); - if (protoDesc) delete ObjectProto[key]; - dP(it, key, D); - if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc); -} : dP; -var wrap = function wrap(tag) { - var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); - sym._k = tag; - return sym; -}; -var isSymbol = USE_NATIVE && _typeof($Symbol.iterator) == 'symbol' ? function (it) { - return (typeof it === 'undefined' ? 'undefined' : _typeof(it)) == 'symbol'; -} : function (it) { - return it instanceof $Symbol; -}; -var $defineProperty = function defineProperty(it, key, D) { - if (it === ObjectProto) $defineProperty(OPSymbols, key, D); - anObject(it); - key = toPrimitive(key, true); - anObject(D); - if (has(AllSymbols, key)) { - if (!D.enumerable) { - if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {})); - it[HIDDEN][key] = true; - } else { - if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false; - D = _create(D, { enumerable: createDesc(0, false) }); - } - return setSymbolDesc(it, key, D); - } - return dP(it, key, D); -}; -var $defineProperties = function defineProperties(it, P) { - anObject(it); - var keys = enumKeys(P = toIObject(P)); - var i = 0; - var l = keys.length; - var key; - while (l > i) { - $defineProperty(it, key = keys[i++], P[key]); - }return it; -}; -var $create = function create(it, P) { - return P === undefined ? _create(it) : $defineProperties(_create(it), P); -}; -var $propertyIsEnumerable = function propertyIsEnumerable(key) { - var E = isEnum.call(this, key = toPrimitive(key, true)); - if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false; - return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; -}; -var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) { - it = toIObject(it); - key = toPrimitive(key, true); - if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return; - var D = gOPD(it, key); - if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true; - return D; -}; -var $getOwnPropertyNames = function getOwnPropertyNames(it) { - var names = gOPN(toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key); - } - return result; -}; -var $getOwnPropertySymbols = function getOwnPropertySymbols(it) { - var IS_OP = it === ObjectProto; - var names = gOPN(IS_OP ? OPSymbols : toIObject(it)); - var result = []; - var i = 0; - var key; - while (names.length > i) { - if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]); - } - return result; -}; -if (!USE_NATIVE) { - $Symbol = function _Symbol() { - if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!'); - var tag = uid(arguments.length > 0 ? arguments[0] : undefined); - var $set = function $set(value) { - if (this === ObjectProto) $set.call(OPSymbols, value); - if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false; - setSymbolDesc(this, tag, createDesc(1, value)); - }; - if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { - configurable: true, - set: $set - }); - return wrap(tag); - }; - redefine($Symbol[PROTOTYPE], 'toString', function toString() { - return this._k; - }); - $GOPD.f = $getOwnPropertyDescriptor; - $DP.f = $defineProperty; - __w_pdfjs_require__(122).f = gOPNExt.f = $getOwnPropertyNames; - __w_pdfjs_require__(51).f = $propertyIsEnumerable; - __w_pdfjs_require__(50).f = $getOwnPropertySymbols; - if (DESCRIPTORS && !__w_pdfjs_require__(31)) { - redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); - } - wksExt.f = function (name) { - return wrap(wks(name)); - }; -} -$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol }); -for (var es6Symbols = 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'.split(','), j = 0; es6Symbols.length > j;) { - wks(es6Symbols[j++]); -}for (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) { - wksDefine(wellKnownSymbols[k++]); -}$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { - 'for': function _for(key) { - return has(SymbolRegistry, key += '') ? SymbolRegistry[key] : SymbolRegistry[key] = $Symbol(key); - }, - keyFor: function keyFor(sym) { - if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!'); - for (var key in SymbolRegistry) { - if (SymbolRegistry[key] === sym) return key; - } - }, - useSetter: function useSetter() { - setter = true; - }, - useSimple: function useSimple() { - setter = false; - } -}); -$export($export.S + $export.F * !USE_NATIVE, 'Object', { - create: $create, - defineProperty: $defineProperty, - defineProperties: $defineProperties, - getOwnPropertyDescriptor: $getOwnPropertyDescriptor, - getOwnPropertyNames: $getOwnPropertyNames, - getOwnPropertySymbols: $getOwnPropertySymbols -}); -$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () { - var S = $Symbol(); - return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}'; -})), 'JSON', { - stringify: function stringify(it) { - var args = [it]; - var i = 1; - var replacer, $replacer; - while (arguments.length > i) { - args.push(arguments[i++]); - }$replacer = replacer = args[1]; - if (!isObject(replacer) && it === undefined || isSymbol(it)) return; - if (!isArray(replacer)) replacer = function replacer(key, value) { - if (typeof $replacer == 'function') value = $replacer.call(this, key, value); - if (!isSymbol(value)) return value; - }; - args[1] = replacer; - return _stringify.apply($JSON, args); - } -}); -$Symbol[PROTOTYPE][TO_PRIMITIVE] || __w_pdfjs_require__(11)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); -setToStringTag($Symbol, 'Symbol'); -setToStringTag(Math, 'Math', true); -setToStringTag(global.JSON, 'JSON', true); - -/***/ }), -/* 118 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -exports.f = __w_pdfjs_require__(29); - -/***/ }), -/* 119 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var global = __w_pdfjs_require__(9); -var core = __w_pdfjs_require__(10); -var LIBRARY = __w_pdfjs_require__(31); -var wksExt = __w_pdfjs_require__(118); -var defineProperty = __w_pdfjs_require__(12).f; -module.exports = function (name) { - var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); - if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) }); -}; - -/***/ }), -/* 120 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var getKeys = __w_pdfjs_require__(46); -var gOPS = __w_pdfjs_require__(50); -var pIE = __w_pdfjs_require__(51); -module.exports = function (it) { - var result = getKeys(it); - var getSymbols = gOPS.f; - if (getSymbols) { - var symbols = getSymbols(it); - var isEnum = pIE.f; - var i = 0; - var key; - while (symbols.length > i) { - if (isEnum.call(it, key = symbols[i++])) result.push(key); - } - } - return result; -}; - -/***/ }), -/* 121 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var toIObject = __w_pdfjs_require__(37); -var gOPN = __w_pdfjs_require__(122).f; -var toString = {}.toString; -var windowNames = (typeof window === 'undefined' ? 'undefined' : _typeof(window)) == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; -var getWindowNames = function getWindowNames(it) { - try { - return gOPN(it); - } catch (e) { - return windowNames.slice(); - } -}; -module.exports.f = function getOwnPropertyNames(it) { - return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); -}; - -/***/ }), -/* 122 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $keys = __w_pdfjs_require__(47); -var hiddenKeys = __w_pdfjs_require__(49).concat('length', 'prototype'); -exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { - return $keys(O, hiddenKeys); -}; - -/***/ }), -/* 123 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -__w_pdfjs_require__(124); -module.exports = __w_pdfjs_require__(10).Object.values; - -/***/ }), -/* 124 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var $export = __w_pdfjs_require__(8); -var $values = __w_pdfjs_require__(125)(false); -$export($export.S, 'Object', { - values: function values(it) { - return $values(it); - } -}); - -/***/ }), -/* 125 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var getKeys = __w_pdfjs_require__(46); -var toIObject = __w_pdfjs_require__(37); -var isEnum = __w_pdfjs_require__(51).f; -module.exports = function (isEntries) { - return function (it) { - var O = toIObject(it); - var keys = getKeys(O); - var length = keys.length; - var i = 0; - var result = []; - var key; - while (length > i) { - if (isEnum.call(O, key = keys[i++])) { - result.push(isEntries ? [key, O[key]] : O[key]); - } - }return result; - }; -}; - -/***/ }), -/* 126 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var isReadableStreamSupported = false; -if (typeof ReadableStream !== 'undefined') { - try { - new ReadableStream({ - start: function start(controller) { - controller.close(); - } - }); - isReadableStreamSupported = true; - } catch (e) {} -} -if (isReadableStreamSupported) { - exports.ReadableStream = ReadableStream; -} else { - exports.ReadableStream = __w_pdfjs_require__(127).ReadableStream; -} - -/***/ }), -/* 127 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var _typeof2 = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -(function (e, a) { - for (var i in a) { - e[i] = a[i]; - } -})(exports, function (modules) { - var installedModules = {}; - function __w_pdfjs_require__(moduleId) { - if (installedModules[moduleId]) return installedModules[moduleId].exports; - var module = installedModules[moduleId] = { - i: moduleId, - l: false, - exports: {} - }; - modules[moduleId].call(module.exports, module, module.exports, __w_pdfjs_require__); - module.l = true; - return module.exports; - } - __w_pdfjs_require__.m = modules; - __w_pdfjs_require__.c = installedModules; - __w_pdfjs_require__.i = function (value) { - return value; - }; - __w_pdfjs_require__.d = function (exports, name, getter) { - if (!__w_pdfjs_require__.o(exports, name)) { - Object.defineProperty(exports, name, { - configurable: false, - enumerable: true, - get: getter - }); - } - }; - __w_pdfjs_require__.n = function (module) { - var getter = module && module.__esModule ? function getDefault() { - return module['default']; - } : function getModuleExports() { - return module; - }; - __w_pdfjs_require__.d(getter, 'a', getter); - return getter; - }; - __w_pdfjs_require__.o = function (object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - __w_pdfjs_require__.p = ""; - return __w_pdfjs_require__(__w_pdfjs_require__.s = 7); -}([function (module, exports, __w_pdfjs_require__) { - "use strict"; - - var _typeof = typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol" ? function (obj) { - return typeof obj === 'undefined' ? 'undefined' : _typeof2(obj); - } : function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj === 'undefined' ? 'undefined' : _typeof2(obj); - }; - var _require = __w_pdfjs_require__(1), - assert = _require.assert; - function IsPropertyKey(argument) { - return typeof argument === 'string' || (typeof argument === 'undefined' ? 'undefined' : _typeof(argument)) === 'symbol'; - } - exports.typeIsObject = function (x) { - return (typeof x === 'undefined' ? 'undefined' : _typeof(x)) === 'object' && x !== null || typeof x === 'function'; - }; - exports.createDataProperty = function (o, p, v) { - assert(exports.typeIsObject(o)); - Object.defineProperty(o, p, { - value: v, - writable: true, - enumerable: true, - configurable: true - }); - }; - exports.createArrayFromList = function (elements) { - return elements.slice(); - }; - exports.ArrayBufferCopy = function (dest, destOffset, src, srcOffset, n) { - new Uint8Array(dest).set(new Uint8Array(src, srcOffset, n), destOffset); - }; - exports.CreateIterResultObject = function (value, done) { - assert(typeof done === 'boolean'); - var obj = {}; - Object.defineProperty(obj, 'value', { - value: value, - enumerable: true, - writable: true, - configurable: true - }); - Object.defineProperty(obj, 'done', { - value: done, - enumerable: true, - writable: true, - configurable: true - }); - return obj; - }; - exports.IsFiniteNonNegativeNumber = function (v) { - if (Number.isNaN(v)) { - return false; - } - if (v === Infinity) { - return false; - } - if (v < 0) { - return false; - } - return true; - }; - function Call(F, V, args) { - if (typeof F !== 'function') { - throw new TypeError('Argument is not a function'); - } - return Function.prototype.apply.call(F, V, args); - } - exports.InvokeOrNoop = function (O, P, args) { - assert(O !== undefined); - assert(IsPropertyKey(P)); - assert(Array.isArray(args)); - var method = O[P]; - if (method === undefined) { - return undefined; - } - return Call(method, O, args); - }; - exports.PromiseInvokeOrNoop = function (O, P, args) { - assert(O !== undefined); - assert(IsPropertyKey(P)); - assert(Array.isArray(args)); - try { - return Promise.resolve(exports.InvokeOrNoop(O, P, args)); - } catch (returnValueE) { - return Promise.reject(returnValueE); - } - }; - exports.PromiseInvokeOrPerformFallback = function (O, P, args, F, argsF) { - assert(O !== undefined); - assert(IsPropertyKey(P)); - assert(Array.isArray(args)); - assert(Array.isArray(argsF)); - var method = void 0; - try { - method = O[P]; - } catch (methodE) { - return Promise.reject(methodE); - } - if (method === undefined) { - return F.apply(null, argsF); - } - try { - return Promise.resolve(Call(method, O, args)); - } catch (e) { - return Promise.reject(e); - } - }; - exports.TransferArrayBuffer = function (O) { - return O.slice(); - }; - exports.ValidateAndNormalizeHighWaterMark = function (highWaterMark) { - highWaterMark = Number(highWaterMark); - if (Number.isNaN(highWaterMark) || highWaterMark < 0) { - throw new RangeError('highWaterMark property of a queuing strategy must be non-negative and non-NaN'); - } - return highWaterMark; - }; - exports.ValidateAndNormalizeQueuingStrategy = function (size, highWaterMark) { - if (size !== undefined && typeof size !== 'function') { - throw new TypeError('size property of a queuing strategy must be a function'); - } - highWaterMark = exports.ValidateAndNormalizeHighWaterMark(highWaterMark); - return { - size: size, - highWaterMark: highWaterMark - }; - }; -}, function (module, exports, __w_pdfjs_require__) { - "use strict"; - - function rethrowAssertionErrorRejection(e) { - if (e && e.constructor === AssertionError) { - setTimeout(function () { - throw e; - }, 0); - } - } - function AssertionError(message) { - this.name = 'AssertionError'; - this.message = message || ''; - this.stack = new Error().stack; - } - AssertionError.prototype = Object.create(Error.prototype); - AssertionError.prototype.constructor = AssertionError; - function assert(value, message) { - if (!value) { - throw new AssertionError(message); - } - } - module.exports = { - rethrowAssertionErrorRejection: rethrowAssertionErrorRejection, - AssertionError: AssertionError, - assert: assert - }; -}, function (module, exports, __w_pdfjs_require__) { - "use strict"; - - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - var _require = __w_pdfjs_require__(0), - InvokeOrNoop = _require.InvokeOrNoop, - PromiseInvokeOrNoop = _require.PromiseInvokeOrNoop, - ValidateAndNormalizeQueuingStrategy = _require.ValidateAndNormalizeQueuingStrategy, - typeIsObject = _require.typeIsObject; - var _require2 = __w_pdfjs_require__(1), - assert = _require2.assert, - rethrowAssertionErrorRejection = _require2.rethrowAssertionErrorRejection; - var _require3 = __w_pdfjs_require__(3), - DequeueValue = _require3.DequeueValue, - EnqueueValueWithSize = _require3.EnqueueValueWithSize, - PeekQueueValue = _require3.PeekQueueValue, - ResetQueue = _require3.ResetQueue; - var WritableStream = function () { - function WritableStream() { - var underlyingSink = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - size = _ref.size, - _ref$highWaterMark = _ref.highWaterMark, - highWaterMark = _ref$highWaterMark === undefined ? 1 : _ref$highWaterMark; - _classCallCheck(this, WritableStream); - this._state = 'writable'; - this._storedError = undefined; - this._writer = undefined; - this._writableStreamController = undefined; - this._writeRequests = []; - this._inFlightWriteRequest = undefined; - this._closeRequest = undefined; - this._inFlightCloseRequest = undefined; - this._pendingAbortRequest = undefined; - this._backpressure = false; - var type = underlyingSink.type; - if (type !== undefined) { - throw new RangeError('Invalid type is specified'); - } - this._writableStreamController = new WritableStreamDefaultController(this, underlyingSink, size, highWaterMark); - this._writableStreamController.__startSteps(); - } - _createClass(WritableStream, [{ - key: 'abort', - value: function abort(reason) { - if (IsWritableStream(this) === false) { - return Promise.reject(streamBrandCheckException('abort')); - } - if (IsWritableStreamLocked(this) === true) { - return Promise.reject(new TypeError('Cannot abort a stream that already has a writer')); - } - return WritableStreamAbort(this, reason); - } - }, { - key: 'getWriter', - value: function getWriter() { - if (IsWritableStream(this) === false) { - throw streamBrandCheckException('getWriter'); - } - return AcquireWritableStreamDefaultWriter(this); - } - }, { - key: 'locked', - get: function get() { - if (IsWritableStream(this) === false) { - throw streamBrandCheckException('locked'); - } - return IsWritableStreamLocked(this); - } - }]); - return WritableStream; - }(); - module.exports = { - AcquireWritableStreamDefaultWriter: AcquireWritableStreamDefaultWriter, - IsWritableStream: IsWritableStream, - IsWritableStreamLocked: IsWritableStreamLocked, - WritableStream: WritableStream, - WritableStreamAbort: WritableStreamAbort, - WritableStreamDefaultControllerError: WritableStreamDefaultControllerError, - WritableStreamDefaultWriterCloseWithErrorPropagation: WritableStreamDefaultWriterCloseWithErrorPropagation, - WritableStreamDefaultWriterRelease: WritableStreamDefaultWriterRelease, - WritableStreamDefaultWriterWrite: WritableStreamDefaultWriterWrite, - WritableStreamCloseQueuedOrInFlight: WritableStreamCloseQueuedOrInFlight - }; - function AcquireWritableStreamDefaultWriter(stream) { - return new WritableStreamDefaultWriter(stream); - } - function IsWritableStream(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_writableStreamController')) { - return false; - } - return true; - } - function IsWritableStreamLocked(stream) { - assert(IsWritableStream(stream) === true, 'IsWritableStreamLocked should only be used on known writable streams'); - if (stream._writer === undefined) { - return false; - } - return true; - } - function WritableStreamAbort(stream, reason) { - var state = stream._state; - if (state === 'closed') { - return Promise.resolve(undefined); - } - if (state === 'errored') { - return Promise.reject(stream._storedError); - } - var error = new TypeError('Requested to abort'); - if (stream._pendingAbortRequest !== undefined) { - return Promise.reject(error); - } - assert(state === 'writable' || state === 'erroring', 'state must be writable or erroring'); - var wasAlreadyErroring = false; - if (state === 'erroring') { - wasAlreadyErroring = true; - reason = undefined; - } - var promise = new Promise(function (resolve, reject) { - stream._pendingAbortRequest = { - _resolve: resolve, - _reject: reject, - _reason: reason, - _wasAlreadyErroring: wasAlreadyErroring - }; - }); - if (wasAlreadyErroring === false) { - WritableStreamStartErroring(stream, error); - } - return promise; - } - function WritableStreamAddWriteRequest(stream) { - assert(IsWritableStreamLocked(stream) === true); - assert(stream._state === 'writable'); - var promise = new Promise(function (resolve, reject) { - var writeRequest = { - _resolve: resolve, - _reject: reject - }; - stream._writeRequests.push(writeRequest); - }); - return promise; - } - function WritableStreamDealWithRejection(stream, error) { - var state = stream._state; - if (state === 'writable') { - WritableStreamStartErroring(stream, error); - return; - } - assert(state === 'erroring'); - WritableStreamFinishErroring(stream); - } - function WritableStreamStartErroring(stream, reason) { - assert(stream._storedError === undefined, 'stream._storedError === undefined'); - assert(stream._state === 'writable', 'state must be writable'); - var controller = stream._writableStreamController; - assert(controller !== undefined, 'controller must not be undefined'); - stream._state = 'erroring'; - stream._storedError = reason; - var writer = stream._writer; - if (writer !== undefined) { - WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, reason); - } - if (WritableStreamHasOperationMarkedInFlight(stream) === false && controller._started === true) { - WritableStreamFinishErroring(stream); - } - } - function WritableStreamFinishErroring(stream) { - assert(stream._state === 'erroring', 'stream._state === erroring'); - assert(WritableStreamHasOperationMarkedInFlight(stream) === false, 'WritableStreamHasOperationMarkedInFlight(stream) === false'); - stream._state = 'errored'; - stream._writableStreamController.__errorSteps(); - var storedError = stream._storedError; - for (var i = 0; i < stream._writeRequests.length; i++) { - var writeRequest = stream._writeRequests[i]; - writeRequest._reject(storedError); - } - stream._writeRequests = []; - if (stream._pendingAbortRequest === undefined) { - WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); - return; - } - var abortRequest = stream._pendingAbortRequest; - stream._pendingAbortRequest = undefined; - if (abortRequest._wasAlreadyErroring === true) { - abortRequest._reject(storedError); - WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); - return; - } - var promise = stream._writableStreamController.__abortSteps(abortRequest._reason); - promise.then(function () { - abortRequest._resolve(); - WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); - }, function (reason) { - abortRequest._reject(reason); - WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream); - }); - } - function WritableStreamFinishInFlightWrite(stream) { - assert(stream._inFlightWriteRequest !== undefined); - stream._inFlightWriteRequest._resolve(undefined); - stream._inFlightWriteRequest = undefined; - } - function WritableStreamFinishInFlightWriteWithError(stream, error) { - assert(stream._inFlightWriteRequest !== undefined); - stream._inFlightWriteRequest._reject(error); - stream._inFlightWriteRequest = undefined; - assert(stream._state === 'writable' || stream._state === 'erroring'); - WritableStreamDealWithRejection(stream, error); - } - function WritableStreamFinishInFlightClose(stream) { - assert(stream._inFlightCloseRequest !== undefined); - stream._inFlightCloseRequest._resolve(undefined); - stream._inFlightCloseRequest = undefined; - var state = stream._state; - assert(state === 'writable' || state === 'erroring'); - if (state === 'erroring') { - stream._storedError = undefined; - if (stream._pendingAbortRequest !== undefined) { - stream._pendingAbortRequest._resolve(); - stream._pendingAbortRequest = undefined; - } - } - stream._state = 'closed'; - var writer = stream._writer; - if (writer !== undefined) { - defaultWriterClosedPromiseResolve(writer); - } - assert(stream._pendingAbortRequest === undefined, 'stream._pendingAbortRequest === undefined'); - assert(stream._storedError === undefined, 'stream._storedError === undefined'); - } - function WritableStreamFinishInFlightCloseWithError(stream, error) { - assert(stream._inFlightCloseRequest !== undefined); - stream._inFlightCloseRequest._reject(error); - stream._inFlightCloseRequest = undefined; - assert(stream._state === 'writable' || stream._state === 'erroring'); - if (stream._pendingAbortRequest !== undefined) { - stream._pendingAbortRequest._reject(error); - stream._pendingAbortRequest = undefined; - } - WritableStreamDealWithRejection(stream, error); - } - function WritableStreamCloseQueuedOrInFlight(stream) { - if (stream._closeRequest === undefined && stream._inFlightCloseRequest === undefined) { - return false; - } - return true; - } - function WritableStreamHasOperationMarkedInFlight(stream) { - if (stream._inFlightWriteRequest === undefined && stream._inFlightCloseRequest === undefined) { - return false; - } - return true; - } - function WritableStreamMarkCloseRequestInFlight(stream) { - assert(stream._inFlightCloseRequest === undefined); - assert(stream._closeRequest !== undefined); - stream._inFlightCloseRequest = stream._closeRequest; - stream._closeRequest = undefined; - } - function WritableStreamMarkFirstWriteRequestInFlight(stream) { - assert(stream._inFlightWriteRequest === undefined, 'there must be no pending write request'); - assert(stream._writeRequests.length !== 0, 'writeRequests must not be empty'); - stream._inFlightWriteRequest = stream._writeRequests.shift(); - } - function WritableStreamRejectCloseAndClosedPromiseIfNeeded(stream) { - assert(stream._state === 'errored', '_stream_.[[state]] is `"errored"`'); - if (stream._closeRequest !== undefined) { - assert(stream._inFlightCloseRequest === undefined); - stream._closeRequest._reject(stream._storedError); - stream._closeRequest = undefined; - } - var writer = stream._writer; - if (writer !== undefined) { - defaultWriterClosedPromiseReject(writer, stream._storedError); - writer._closedPromise.catch(function () {}); - } - } - function WritableStreamUpdateBackpressure(stream, backpressure) { - assert(stream._state === 'writable'); - assert(WritableStreamCloseQueuedOrInFlight(stream) === false); - var writer = stream._writer; - if (writer !== undefined && backpressure !== stream._backpressure) { - if (backpressure === true) { - defaultWriterReadyPromiseReset(writer); - } else { - assert(backpressure === false); - defaultWriterReadyPromiseResolve(writer); - } - } - stream._backpressure = backpressure; - } - var WritableStreamDefaultWriter = function () { - function WritableStreamDefaultWriter(stream) { - _classCallCheck(this, WritableStreamDefaultWriter); - if (IsWritableStream(stream) === false) { - throw new TypeError('WritableStreamDefaultWriter can only be constructed with a WritableStream instance'); - } - if (IsWritableStreamLocked(stream) === true) { - throw new TypeError('This stream has already been locked for exclusive writing by another writer'); - } - this._ownerWritableStream = stream; - stream._writer = this; - var state = stream._state; - if (state === 'writable') { - if (WritableStreamCloseQueuedOrInFlight(stream) === false && stream._backpressure === true) { - defaultWriterReadyPromiseInitialize(this); - } else { - defaultWriterReadyPromiseInitializeAsResolved(this); - } - defaultWriterClosedPromiseInitialize(this); - } else if (state === 'erroring') { - defaultWriterReadyPromiseInitializeAsRejected(this, stream._storedError); - this._readyPromise.catch(function () {}); - defaultWriterClosedPromiseInitialize(this); - } else if (state === 'closed') { - defaultWriterReadyPromiseInitializeAsResolved(this); - defaultWriterClosedPromiseInitializeAsResolved(this); - } else { - assert(state === 'errored', 'state must be errored'); - var storedError = stream._storedError; - defaultWriterReadyPromiseInitializeAsRejected(this, storedError); - this._readyPromise.catch(function () {}); - defaultWriterClosedPromiseInitializeAsRejected(this, storedError); - this._closedPromise.catch(function () {}); - } - } - _createClass(WritableStreamDefaultWriter, [{ - key: 'abort', - value: function abort(reason) { - if (IsWritableStreamDefaultWriter(this) === false) { - return Promise.reject(defaultWriterBrandCheckException('abort')); - } - if (this._ownerWritableStream === undefined) { - return Promise.reject(defaultWriterLockException('abort')); - } - return WritableStreamDefaultWriterAbort(this, reason); - } - }, { - key: 'close', - value: function close() { - if (IsWritableStreamDefaultWriter(this) === false) { - return Promise.reject(defaultWriterBrandCheckException('close')); - } - var stream = this._ownerWritableStream; - if (stream === undefined) { - return Promise.reject(defaultWriterLockException('close')); - } - if (WritableStreamCloseQueuedOrInFlight(stream) === true) { - return Promise.reject(new TypeError('cannot close an already-closing stream')); - } - return WritableStreamDefaultWriterClose(this); - } - }, { - key: 'releaseLock', - value: function releaseLock() { - if (IsWritableStreamDefaultWriter(this) === false) { - throw defaultWriterBrandCheckException('releaseLock'); - } - var stream = this._ownerWritableStream; - if (stream === undefined) { - return; - } - assert(stream._writer !== undefined); - WritableStreamDefaultWriterRelease(this); - } - }, { - key: 'write', - value: function write(chunk) { - if (IsWritableStreamDefaultWriter(this) === false) { - return Promise.reject(defaultWriterBrandCheckException('write')); - } - if (this._ownerWritableStream === undefined) { - return Promise.reject(defaultWriterLockException('write to')); - } - return WritableStreamDefaultWriterWrite(this, chunk); - } - }, { - key: 'closed', - get: function get() { - if (IsWritableStreamDefaultWriter(this) === false) { - return Promise.reject(defaultWriterBrandCheckException('closed')); - } - return this._closedPromise; - } - }, { - key: 'desiredSize', - get: function get() { - if (IsWritableStreamDefaultWriter(this) === false) { - throw defaultWriterBrandCheckException('desiredSize'); - } - if (this._ownerWritableStream === undefined) { - throw defaultWriterLockException('desiredSize'); - } - return WritableStreamDefaultWriterGetDesiredSize(this); - } - }, { - key: 'ready', - get: function get() { - if (IsWritableStreamDefaultWriter(this) === false) { - return Promise.reject(defaultWriterBrandCheckException('ready')); - } - return this._readyPromise; - } - }]); - return WritableStreamDefaultWriter; - }(); - function IsWritableStreamDefaultWriter(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_ownerWritableStream')) { - return false; - } - return true; - } - function WritableStreamDefaultWriterAbort(writer, reason) { - var stream = writer._ownerWritableStream; - assert(stream !== undefined); - return WritableStreamAbort(stream, reason); - } - function WritableStreamDefaultWriterClose(writer) { - var stream = writer._ownerWritableStream; - assert(stream !== undefined); - var state = stream._state; - if (state === 'closed' || state === 'errored') { - return Promise.reject(new TypeError('The stream (in ' + state + ' state) is not in the writable state and cannot be closed')); - } - assert(state === 'writable' || state === 'erroring'); - assert(WritableStreamCloseQueuedOrInFlight(stream) === false); - var promise = new Promise(function (resolve, reject) { - var closeRequest = { - _resolve: resolve, - _reject: reject - }; - stream._closeRequest = closeRequest; - }); - if (stream._backpressure === true && state === 'writable') { - defaultWriterReadyPromiseResolve(writer); - } - WritableStreamDefaultControllerClose(stream._writableStreamController); - return promise; - } - function WritableStreamDefaultWriterCloseWithErrorPropagation(writer) { - var stream = writer._ownerWritableStream; - assert(stream !== undefined); - var state = stream._state; - if (WritableStreamCloseQueuedOrInFlight(stream) === true || state === 'closed') { - return Promise.resolve(); - } - if (state === 'errored') { - return Promise.reject(stream._storedError); - } - assert(state === 'writable' || state === 'erroring'); - return WritableStreamDefaultWriterClose(writer); - } - function WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, error) { - if (writer._closedPromiseState === 'pending') { - defaultWriterClosedPromiseReject(writer, error); - } else { - defaultWriterClosedPromiseResetToRejected(writer, error); - } - writer._closedPromise.catch(function () {}); - } - function WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, error) { - if (writer._readyPromiseState === 'pending') { - defaultWriterReadyPromiseReject(writer, error); - } else { - defaultWriterReadyPromiseResetToRejected(writer, error); - } - writer._readyPromise.catch(function () {}); - } - function WritableStreamDefaultWriterGetDesiredSize(writer) { - var stream = writer._ownerWritableStream; - var state = stream._state; - if (state === 'errored' || state === 'erroring') { - return null; - } - if (state === 'closed') { - return 0; - } - return WritableStreamDefaultControllerGetDesiredSize(stream._writableStreamController); - } - function WritableStreamDefaultWriterRelease(writer) { - var stream = writer._ownerWritableStream; - assert(stream !== undefined); - assert(stream._writer === writer); - var releasedError = new TypeError('Writer was released and can no longer be used to monitor the stream\'s closedness'); - WritableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError); - WritableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError); - stream._writer = undefined; - writer._ownerWritableStream = undefined; - } - function WritableStreamDefaultWriterWrite(writer, chunk) { - var stream = writer._ownerWritableStream; - assert(stream !== undefined); - var controller = stream._writableStreamController; - var chunkSize = WritableStreamDefaultControllerGetChunkSize(controller, chunk); - if (stream !== writer._ownerWritableStream) { - return Promise.reject(defaultWriterLockException('write to')); - } - var state = stream._state; - if (state === 'errored') { - return Promise.reject(stream._storedError); - } - if (WritableStreamCloseQueuedOrInFlight(stream) === true || state === 'closed') { - return Promise.reject(new TypeError('The stream is closing or closed and cannot be written to')); - } - if (state === 'erroring') { - return Promise.reject(stream._storedError); - } - assert(state === 'writable'); - var promise = WritableStreamAddWriteRequest(stream); - WritableStreamDefaultControllerWrite(controller, chunk, chunkSize); - return promise; - } - var WritableStreamDefaultController = function () { - function WritableStreamDefaultController(stream, underlyingSink, size, highWaterMark) { - _classCallCheck(this, WritableStreamDefaultController); - if (IsWritableStream(stream) === false) { - throw new TypeError('WritableStreamDefaultController can only be constructed with a WritableStream instance'); - } - if (stream._writableStreamController !== undefined) { - throw new TypeError('WritableStreamDefaultController instances can only be created by the WritableStream constructor'); - } - this._controlledWritableStream = stream; - this._underlyingSink = underlyingSink; - this._queue = undefined; - this._queueTotalSize = undefined; - ResetQueue(this); - this._started = false; - var normalizedStrategy = ValidateAndNormalizeQueuingStrategy(size, highWaterMark); - this._strategySize = normalizedStrategy.size; - this._strategyHWM = normalizedStrategy.highWaterMark; - var backpressure = WritableStreamDefaultControllerGetBackpressure(this); - WritableStreamUpdateBackpressure(stream, backpressure); - } - _createClass(WritableStreamDefaultController, [{ - key: 'error', - value: function error(e) { - if (IsWritableStreamDefaultController(this) === false) { - throw new TypeError('WritableStreamDefaultController.prototype.error can only be used on a WritableStreamDefaultController'); - } - var state = this._controlledWritableStream._state; - if (state !== 'writable') { - return; - } - WritableStreamDefaultControllerError(this, e); - } - }, { - key: '__abortSteps', - value: function __abortSteps(reason) { - return PromiseInvokeOrNoop(this._underlyingSink, 'abort', [reason]); - } - }, { - key: '__errorSteps', - value: function __errorSteps() { - ResetQueue(this); - } - }, { - key: '__startSteps', - value: function __startSteps() { - var _this = this; - var startResult = InvokeOrNoop(this._underlyingSink, 'start', [this]); - var stream = this._controlledWritableStream; - Promise.resolve(startResult).then(function () { - assert(stream._state === 'writable' || stream._state === 'erroring'); - _this._started = true; - WritableStreamDefaultControllerAdvanceQueueIfNeeded(_this); - }, function (r) { - assert(stream._state === 'writable' || stream._state === 'erroring'); - _this._started = true; - WritableStreamDealWithRejection(stream, r); - }).catch(rethrowAssertionErrorRejection); - } - }]); - return WritableStreamDefaultController; - }(); - function WritableStreamDefaultControllerClose(controller) { - EnqueueValueWithSize(controller, 'close', 0); - WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); - } - function WritableStreamDefaultControllerGetChunkSize(controller, chunk) { - var strategySize = controller._strategySize; - if (strategySize === undefined) { - return 1; - } - try { - return strategySize(chunk); - } catch (chunkSizeE) { - WritableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE); - return 1; - } - } - function WritableStreamDefaultControllerGetDesiredSize(controller) { - return controller._strategyHWM - controller._queueTotalSize; - } - function WritableStreamDefaultControllerWrite(controller, chunk, chunkSize) { - var writeRecord = { chunk: chunk }; - try { - EnqueueValueWithSize(controller, writeRecord, chunkSize); - } catch (enqueueE) { - WritableStreamDefaultControllerErrorIfNeeded(controller, enqueueE); - return; - } - var stream = controller._controlledWritableStream; - if (WritableStreamCloseQueuedOrInFlight(stream) === false && stream._state === 'writable') { - var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); - WritableStreamUpdateBackpressure(stream, backpressure); - } - WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); - } - function IsWritableStreamDefaultController(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_underlyingSink')) { - return false; - } - return true; - } - function WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller) { - var stream = controller._controlledWritableStream; - if (controller._started === false) { - return; - } - if (stream._inFlightWriteRequest !== undefined) { - return; - } - var state = stream._state; - if (state === 'closed' || state === 'errored') { - return; - } - if (state === 'erroring') { - WritableStreamFinishErroring(stream); - return; - } - if (controller._queue.length === 0) { - return; - } - var writeRecord = PeekQueueValue(controller); - if (writeRecord === 'close') { - WritableStreamDefaultControllerProcessClose(controller); - } else { - WritableStreamDefaultControllerProcessWrite(controller, writeRecord.chunk); - } - } - function WritableStreamDefaultControllerErrorIfNeeded(controller, error) { - if (controller._controlledWritableStream._state === 'writable') { - WritableStreamDefaultControllerError(controller, error); - } - } - function WritableStreamDefaultControllerProcessClose(controller) { - var stream = controller._controlledWritableStream; - WritableStreamMarkCloseRequestInFlight(stream); - DequeueValue(controller); - assert(controller._queue.length === 0, 'queue must be empty once the final write record is dequeued'); - var sinkClosePromise = PromiseInvokeOrNoop(controller._underlyingSink, 'close', []); - sinkClosePromise.then(function () { - WritableStreamFinishInFlightClose(stream); - }, function (reason) { - WritableStreamFinishInFlightCloseWithError(stream, reason); - }).catch(rethrowAssertionErrorRejection); - } - function WritableStreamDefaultControllerProcessWrite(controller, chunk) { - var stream = controller._controlledWritableStream; - WritableStreamMarkFirstWriteRequestInFlight(stream); - var sinkWritePromise = PromiseInvokeOrNoop(controller._underlyingSink, 'write', [chunk, controller]); - sinkWritePromise.then(function () { - WritableStreamFinishInFlightWrite(stream); - var state = stream._state; - assert(state === 'writable' || state === 'erroring'); - DequeueValue(controller); - if (WritableStreamCloseQueuedOrInFlight(stream) === false && state === 'writable') { - var backpressure = WritableStreamDefaultControllerGetBackpressure(controller); - WritableStreamUpdateBackpressure(stream, backpressure); - } - WritableStreamDefaultControllerAdvanceQueueIfNeeded(controller); - }, function (reason) { - WritableStreamFinishInFlightWriteWithError(stream, reason); - }).catch(rethrowAssertionErrorRejection); - } - function WritableStreamDefaultControllerGetBackpressure(controller) { - var desiredSize = WritableStreamDefaultControllerGetDesiredSize(controller); - return desiredSize <= 0; - } - function WritableStreamDefaultControllerError(controller, error) { - var stream = controller._controlledWritableStream; - assert(stream._state === 'writable'); - WritableStreamStartErroring(stream, error); - } - function streamBrandCheckException(name) { - return new TypeError('WritableStream.prototype.' + name + ' can only be used on a WritableStream'); - } - function defaultWriterBrandCheckException(name) { - return new TypeError('WritableStreamDefaultWriter.prototype.' + name + ' can only be used on a WritableStreamDefaultWriter'); - } - function defaultWriterLockException(name) { - return new TypeError('Cannot ' + name + ' a stream using a released writer'); - } - function defaultWriterClosedPromiseInitialize(writer) { - writer._closedPromise = new Promise(function (resolve, reject) { - writer._closedPromise_resolve = resolve; - writer._closedPromise_reject = reject; - writer._closedPromiseState = 'pending'; - }); - } - function defaultWriterClosedPromiseInitializeAsRejected(writer, reason) { - writer._closedPromise = Promise.reject(reason); - writer._closedPromise_resolve = undefined; - writer._closedPromise_reject = undefined; - writer._closedPromiseState = 'rejected'; - } - function defaultWriterClosedPromiseInitializeAsResolved(writer) { - writer._closedPromise = Promise.resolve(undefined); - writer._closedPromise_resolve = undefined; - writer._closedPromise_reject = undefined; - writer._closedPromiseState = 'resolved'; - } - function defaultWriterClosedPromiseReject(writer, reason) { - assert(writer._closedPromise_resolve !== undefined, 'writer._closedPromise_resolve !== undefined'); - assert(writer._closedPromise_reject !== undefined, 'writer._closedPromise_reject !== undefined'); - assert(writer._closedPromiseState === 'pending', 'writer._closedPromiseState is pending'); - writer._closedPromise_reject(reason); - writer._closedPromise_resolve = undefined; - writer._closedPromise_reject = undefined; - writer._closedPromiseState = 'rejected'; - } - function defaultWriterClosedPromiseResetToRejected(writer, reason) { - assert(writer._closedPromise_resolve === undefined, 'writer._closedPromise_resolve === undefined'); - assert(writer._closedPromise_reject === undefined, 'writer._closedPromise_reject === undefined'); - assert(writer._closedPromiseState !== 'pending', 'writer._closedPromiseState is not pending'); - writer._closedPromise = Promise.reject(reason); - writer._closedPromiseState = 'rejected'; - } - function defaultWriterClosedPromiseResolve(writer) { - assert(writer._closedPromise_resolve !== undefined, 'writer._closedPromise_resolve !== undefined'); - assert(writer._closedPromise_reject !== undefined, 'writer._closedPromise_reject !== undefined'); - assert(writer._closedPromiseState === 'pending', 'writer._closedPromiseState is pending'); - writer._closedPromise_resolve(undefined); - writer._closedPromise_resolve = undefined; - writer._closedPromise_reject = undefined; - writer._closedPromiseState = 'resolved'; - } - function defaultWriterReadyPromiseInitialize(writer) { - writer._readyPromise = new Promise(function (resolve, reject) { - writer._readyPromise_resolve = resolve; - writer._readyPromise_reject = reject; - }); - writer._readyPromiseState = 'pending'; - } - function defaultWriterReadyPromiseInitializeAsRejected(writer, reason) { - writer._readyPromise = Promise.reject(reason); - writer._readyPromise_resolve = undefined; - writer._readyPromise_reject = undefined; - writer._readyPromiseState = 'rejected'; - } - function defaultWriterReadyPromiseInitializeAsResolved(writer) { - writer._readyPromise = Promise.resolve(undefined); - writer._readyPromise_resolve = undefined; - writer._readyPromise_reject = undefined; - writer._readyPromiseState = 'fulfilled'; - } - function defaultWriterReadyPromiseReject(writer, reason) { - assert(writer._readyPromise_resolve !== undefined, 'writer._readyPromise_resolve !== undefined'); - assert(writer._readyPromise_reject !== undefined, 'writer._readyPromise_reject !== undefined'); - writer._readyPromise_reject(reason); - writer._readyPromise_resolve = undefined; - writer._readyPromise_reject = undefined; - writer._readyPromiseState = 'rejected'; - } - function defaultWriterReadyPromiseReset(writer) { - assert(writer._readyPromise_resolve === undefined, 'writer._readyPromise_resolve === undefined'); - assert(writer._readyPromise_reject === undefined, 'writer._readyPromise_reject === undefined'); - writer._readyPromise = new Promise(function (resolve, reject) { - writer._readyPromise_resolve = resolve; - writer._readyPromise_reject = reject; - }); - writer._readyPromiseState = 'pending'; - } - function defaultWriterReadyPromiseResetToRejected(writer, reason) { - assert(writer._readyPromise_resolve === undefined, 'writer._readyPromise_resolve === undefined'); - assert(writer._readyPromise_reject === undefined, 'writer._readyPromise_reject === undefined'); - writer._readyPromise = Promise.reject(reason); - writer._readyPromiseState = 'rejected'; - } - function defaultWriterReadyPromiseResolve(writer) { - assert(writer._readyPromise_resolve !== undefined, 'writer._readyPromise_resolve !== undefined'); - assert(writer._readyPromise_reject !== undefined, 'writer._readyPromise_reject !== undefined'); - writer._readyPromise_resolve(undefined); - writer._readyPromise_resolve = undefined; - writer._readyPromise_reject = undefined; - writer._readyPromiseState = 'fulfilled'; - } -}, function (module, exports, __w_pdfjs_require__) { - "use strict"; - - var _require = __w_pdfjs_require__(0), - IsFiniteNonNegativeNumber = _require.IsFiniteNonNegativeNumber; - var _require2 = __w_pdfjs_require__(1), - assert = _require2.assert; - exports.DequeueValue = function (container) { - assert('_queue' in container && '_queueTotalSize' in container, 'Spec-level failure: DequeueValue should only be used on containers with [[queue]] and [[queueTotalSize]].'); - assert(container._queue.length > 0, 'Spec-level failure: should never dequeue from an empty queue.'); - var pair = container._queue.shift(); - container._queueTotalSize -= pair.size; - if (container._queueTotalSize < 0) { - container._queueTotalSize = 0; - } - return pair.value; - }; - exports.EnqueueValueWithSize = function (container, value, size) { - assert('_queue' in container && '_queueTotalSize' in container, 'Spec-level failure: EnqueueValueWithSize should only be used on containers with [[queue]] and ' + '[[queueTotalSize]].'); - size = Number(size); - if (!IsFiniteNonNegativeNumber(size)) { - throw new RangeError('Size must be a finite, non-NaN, non-negative number.'); - } - container._queue.push({ - value: value, - size: size - }); - container._queueTotalSize += size; - }; - exports.PeekQueueValue = function (container) { - assert('_queue' in container && '_queueTotalSize' in container, 'Spec-level failure: PeekQueueValue should only be used on containers with [[queue]] and [[queueTotalSize]].'); - assert(container._queue.length > 0, 'Spec-level failure: should never peek at an empty queue.'); - var pair = container._queue[0]; - return pair.value; - }; - exports.ResetQueue = function (container) { - assert('_queue' in container && '_queueTotalSize' in container, 'Spec-level failure: ResetQueue should only be used on containers with [[queue]] and [[queueTotalSize]].'); - container._queue = []; - container._queueTotalSize = 0; - }; -}, function (module, exports, __w_pdfjs_require__) { - "use strict"; - - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - var _require = __w_pdfjs_require__(0), - ArrayBufferCopy = _require.ArrayBufferCopy, - CreateIterResultObject = _require.CreateIterResultObject, - IsFiniteNonNegativeNumber = _require.IsFiniteNonNegativeNumber, - InvokeOrNoop = _require.InvokeOrNoop, - PromiseInvokeOrNoop = _require.PromiseInvokeOrNoop, - TransferArrayBuffer = _require.TransferArrayBuffer, - ValidateAndNormalizeQueuingStrategy = _require.ValidateAndNormalizeQueuingStrategy, - ValidateAndNormalizeHighWaterMark = _require.ValidateAndNormalizeHighWaterMark; - var _require2 = __w_pdfjs_require__(0), - createArrayFromList = _require2.createArrayFromList, - createDataProperty = _require2.createDataProperty, - typeIsObject = _require2.typeIsObject; - var _require3 = __w_pdfjs_require__(1), - assert = _require3.assert, - rethrowAssertionErrorRejection = _require3.rethrowAssertionErrorRejection; - var _require4 = __w_pdfjs_require__(3), - DequeueValue = _require4.DequeueValue, - EnqueueValueWithSize = _require4.EnqueueValueWithSize, - ResetQueue = _require4.ResetQueue; - var _require5 = __w_pdfjs_require__(2), - AcquireWritableStreamDefaultWriter = _require5.AcquireWritableStreamDefaultWriter, - IsWritableStream = _require5.IsWritableStream, - IsWritableStreamLocked = _require5.IsWritableStreamLocked, - WritableStreamAbort = _require5.WritableStreamAbort, - WritableStreamDefaultWriterCloseWithErrorPropagation = _require5.WritableStreamDefaultWriterCloseWithErrorPropagation, - WritableStreamDefaultWriterRelease = _require5.WritableStreamDefaultWriterRelease, - WritableStreamDefaultWriterWrite = _require5.WritableStreamDefaultWriterWrite, - WritableStreamCloseQueuedOrInFlight = _require5.WritableStreamCloseQueuedOrInFlight; - var ReadableStream = function () { - function ReadableStream() { - var underlyingSource = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - size = _ref.size, - highWaterMark = _ref.highWaterMark; - _classCallCheck(this, ReadableStream); - this._state = 'readable'; - this._reader = undefined; - this._storedError = undefined; - this._disturbed = false; - this._readableStreamController = undefined; - var type = underlyingSource.type; - var typeString = String(type); - if (typeString === 'bytes') { - if (highWaterMark === undefined) { - highWaterMark = 0; - } - this._readableStreamController = new ReadableByteStreamController(this, underlyingSource, highWaterMark); - } else if (type === undefined) { - if (highWaterMark === undefined) { - highWaterMark = 1; - } - this._readableStreamController = new ReadableStreamDefaultController(this, underlyingSource, size, highWaterMark); - } else { - throw new RangeError('Invalid type is specified'); - } - } - _createClass(ReadableStream, [{ - key: 'cancel', - value: function cancel(reason) { - if (IsReadableStream(this) === false) { - return Promise.reject(streamBrandCheckException('cancel')); - } - if (IsReadableStreamLocked(this) === true) { - return Promise.reject(new TypeError('Cannot cancel a stream that already has a reader')); - } - return ReadableStreamCancel(this, reason); - } - }, { - key: 'getReader', - value: function getReader() { - var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - mode = _ref2.mode; - if (IsReadableStream(this) === false) { - throw streamBrandCheckException('getReader'); - } - if (mode === undefined) { - return AcquireReadableStreamDefaultReader(this); - } - mode = String(mode); - if (mode === 'byob') { - return AcquireReadableStreamBYOBReader(this); - } - throw new RangeError('Invalid mode is specified'); - } - }, { - key: 'pipeThrough', - value: function pipeThrough(_ref3, options) { - var writable = _ref3.writable, - readable = _ref3.readable; - var promise = this.pipeTo(writable, options); - ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue(promise); - return readable; - } - }, { - key: 'pipeTo', - value: function pipeTo(dest) { - var _this = this; - var _ref4 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - preventClose = _ref4.preventClose, - preventAbort = _ref4.preventAbort, - preventCancel = _ref4.preventCancel; - if (IsReadableStream(this) === false) { - return Promise.reject(streamBrandCheckException('pipeTo')); - } - if (IsWritableStream(dest) === false) { - return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo\'s first argument must be a WritableStream')); - } - preventClose = Boolean(preventClose); - preventAbort = Boolean(preventAbort); - preventCancel = Boolean(preventCancel); - if (IsReadableStreamLocked(this) === true) { - return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream')); - } - if (IsWritableStreamLocked(dest) === true) { - return Promise.reject(new TypeError('ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream')); - } - var reader = AcquireReadableStreamDefaultReader(this); - var writer = AcquireWritableStreamDefaultWriter(dest); - var shuttingDown = false; - var currentWrite = Promise.resolve(); - return new Promise(function (resolve, reject) { - function pipeLoop() { - currentWrite = Promise.resolve(); - if (shuttingDown === true) { - return Promise.resolve(); - } - return writer._readyPromise.then(function () { - return ReadableStreamDefaultReaderRead(reader).then(function (_ref5) { - var value = _ref5.value, - done = _ref5.done; - if (done === true) { - return; - } - currentWrite = WritableStreamDefaultWriterWrite(writer, value).catch(function () {}); - }); - }).then(pipeLoop); - } - isOrBecomesErrored(_this, reader._closedPromise, function (storedError) { - if (preventAbort === false) { - shutdownWithAction(function () { - return WritableStreamAbort(dest, storedError); - }, true, storedError); - } else { - shutdown(true, storedError); - } - }); - isOrBecomesErrored(dest, writer._closedPromise, function (storedError) { - if (preventCancel === false) { - shutdownWithAction(function () { - return ReadableStreamCancel(_this, storedError); - }, true, storedError); - } else { - shutdown(true, storedError); - } - }); - isOrBecomesClosed(_this, reader._closedPromise, function () { - if (preventClose === false) { - shutdownWithAction(function () { - return WritableStreamDefaultWriterCloseWithErrorPropagation(writer); - }); - } else { - shutdown(); - } - }); - if (WritableStreamCloseQueuedOrInFlight(dest) === true || dest._state === 'closed') { - var destClosed = new TypeError('the destination writable stream closed before all data could be piped to it'); - if (preventCancel === false) { - shutdownWithAction(function () { - return ReadableStreamCancel(_this, destClosed); - }, true, destClosed); - } else { - shutdown(true, destClosed); - } - } - pipeLoop().catch(function (err) { - currentWrite = Promise.resolve(); - rethrowAssertionErrorRejection(err); - }); - function waitForWritesToFinish() { - var oldCurrentWrite = currentWrite; - return currentWrite.then(function () { - return oldCurrentWrite !== currentWrite ? waitForWritesToFinish() : undefined; - }); - } - function isOrBecomesErrored(stream, promise, action) { - if (stream._state === 'errored') { - action(stream._storedError); - } else { - promise.catch(action).catch(rethrowAssertionErrorRejection); - } - } - function isOrBecomesClosed(stream, promise, action) { - if (stream._state === 'closed') { - action(); - } else { - promise.then(action).catch(rethrowAssertionErrorRejection); - } - } - function shutdownWithAction(action, originalIsError, originalError) { - if (shuttingDown === true) { - return; - } - shuttingDown = true; - if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) { - waitForWritesToFinish().then(doTheRest); - } else { - doTheRest(); - } - function doTheRest() { - action().then(function () { - return finalize(originalIsError, originalError); - }, function (newError) { - return finalize(true, newError); - }).catch(rethrowAssertionErrorRejection); - } - } - function shutdown(isError, error) { - if (shuttingDown === true) { - return; - } - shuttingDown = true; - if (dest._state === 'writable' && WritableStreamCloseQueuedOrInFlight(dest) === false) { - waitForWritesToFinish().then(function () { - return finalize(isError, error); - }).catch(rethrowAssertionErrorRejection); - } else { - finalize(isError, error); - } - } - function finalize(isError, error) { - WritableStreamDefaultWriterRelease(writer); - ReadableStreamReaderGenericRelease(reader); - if (isError) { - reject(error); - } else { - resolve(undefined); - } - } - }); - } - }, { - key: 'tee', - value: function tee() { - if (IsReadableStream(this) === false) { - throw streamBrandCheckException('tee'); - } - var branches = ReadableStreamTee(this, false); - return createArrayFromList(branches); - } - }, { - key: 'locked', - get: function get() { - if (IsReadableStream(this) === false) { - throw streamBrandCheckException('locked'); - } - return IsReadableStreamLocked(this); - } - }]); - return ReadableStream; - }(); - module.exports = { - ReadableStream: ReadableStream, - IsReadableStreamDisturbed: IsReadableStreamDisturbed, - ReadableStreamDefaultControllerClose: ReadableStreamDefaultControllerClose, - ReadableStreamDefaultControllerEnqueue: ReadableStreamDefaultControllerEnqueue, - ReadableStreamDefaultControllerError: ReadableStreamDefaultControllerError, - ReadableStreamDefaultControllerGetDesiredSize: ReadableStreamDefaultControllerGetDesiredSize - }; - function AcquireReadableStreamBYOBReader(stream) { - return new ReadableStreamBYOBReader(stream); - } - function AcquireReadableStreamDefaultReader(stream) { - return new ReadableStreamDefaultReader(stream); - } - function IsReadableStream(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_readableStreamController')) { - return false; - } - return true; - } - function IsReadableStreamDisturbed(stream) { - assert(IsReadableStream(stream) === true, 'IsReadableStreamDisturbed should only be used on known readable streams'); - return stream._disturbed; - } - function IsReadableStreamLocked(stream) { - assert(IsReadableStream(stream) === true, 'IsReadableStreamLocked should only be used on known readable streams'); - if (stream._reader === undefined) { - return false; - } - return true; - } - function ReadableStreamTee(stream, cloneForBranch2) { - assert(IsReadableStream(stream) === true); - assert(typeof cloneForBranch2 === 'boolean'); - var reader = AcquireReadableStreamDefaultReader(stream); - var teeState = { - closedOrErrored: false, - canceled1: false, - canceled2: false, - reason1: undefined, - reason2: undefined - }; - teeState.promise = new Promise(function (resolve) { - teeState._resolve = resolve; - }); - var pull = create_ReadableStreamTeePullFunction(); - pull._reader = reader; - pull._teeState = teeState; - pull._cloneForBranch2 = cloneForBranch2; - var cancel1 = create_ReadableStreamTeeBranch1CancelFunction(); - cancel1._stream = stream; - cancel1._teeState = teeState; - var cancel2 = create_ReadableStreamTeeBranch2CancelFunction(); - cancel2._stream = stream; - cancel2._teeState = teeState; - var underlyingSource1 = Object.create(Object.prototype); - createDataProperty(underlyingSource1, 'pull', pull); - createDataProperty(underlyingSource1, 'cancel', cancel1); - var branch1Stream = new ReadableStream(underlyingSource1); - var underlyingSource2 = Object.create(Object.prototype); - createDataProperty(underlyingSource2, 'pull', pull); - createDataProperty(underlyingSource2, 'cancel', cancel2); - var branch2Stream = new ReadableStream(underlyingSource2); - pull._branch1 = branch1Stream._readableStreamController; - pull._branch2 = branch2Stream._readableStreamController; - reader._closedPromise.catch(function (r) { - if (teeState.closedOrErrored === true) { - return; - } - ReadableStreamDefaultControllerError(pull._branch1, r); - ReadableStreamDefaultControllerError(pull._branch2, r); - teeState.closedOrErrored = true; - }); - return [branch1Stream, branch2Stream]; - } - function create_ReadableStreamTeePullFunction() { - function f() { - var reader = f._reader, - branch1 = f._branch1, - branch2 = f._branch2, - teeState = f._teeState; - return ReadableStreamDefaultReaderRead(reader).then(function (result) { - assert(typeIsObject(result)); - var value = result.value; - var done = result.done; - assert(typeof done === 'boolean'); - if (done === true && teeState.closedOrErrored === false) { - if (teeState.canceled1 === false) { - ReadableStreamDefaultControllerClose(branch1); - } - if (teeState.canceled2 === false) { - ReadableStreamDefaultControllerClose(branch2); - } - teeState.closedOrErrored = true; - } - if (teeState.closedOrErrored === true) { - return; - } - var value1 = value; - var value2 = value; - if (teeState.canceled1 === false) { - ReadableStreamDefaultControllerEnqueue(branch1, value1); - } - if (teeState.canceled2 === false) { - ReadableStreamDefaultControllerEnqueue(branch2, value2); - } - }); - } - return f; - } - function create_ReadableStreamTeeBranch1CancelFunction() { - function f(reason) { - var stream = f._stream, - teeState = f._teeState; - teeState.canceled1 = true; - teeState.reason1 = reason; - if (teeState.canceled2 === true) { - var compositeReason = createArrayFromList([teeState.reason1, teeState.reason2]); - var cancelResult = ReadableStreamCancel(stream, compositeReason); - teeState._resolve(cancelResult); - } - return teeState.promise; - } - return f; - } - function create_ReadableStreamTeeBranch2CancelFunction() { - function f(reason) { - var stream = f._stream, - teeState = f._teeState; - teeState.canceled2 = true; - teeState.reason2 = reason; - if (teeState.canceled1 === true) { - var compositeReason = createArrayFromList([teeState.reason1, teeState.reason2]); - var cancelResult = ReadableStreamCancel(stream, compositeReason); - teeState._resolve(cancelResult); - } - return teeState.promise; - } - return f; - } - function ReadableStreamAddReadIntoRequest(stream) { - assert(IsReadableStreamBYOBReader(stream._reader) === true); - assert(stream._state === 'readable' || stream._state === 'closed'); - var promise = new Promise(function (resolve, reject) { - var readIntoRequest = { - _resolve: resolve, - _reject: reject - }; - stream._reader._readIntoRequests.push(readIntoRequest); - }); - return promise; - } - function ReadableStreamAddReadRequest(stream) { - assert(IsReadableStreamDefaultReader(stream._reader) === true); - assert(stream._state === 'readable'); - var promise = new Promise(function (resolve, reject) { - var readRequest = { - _resolve: resolve, - _reject: reject - }; - stream._reader._readRequests.push(readRequest); - }); - return promise; - } - function ReadableStreamCancel(stream, reason) { - stream._disturbed = true; - if (stream._state === 'closed') { - return Promise.resolve(undefined); - } - if (stream._state === 'errored') { - return Promise.reject(stream._storedError); - } - ReadableStreamClose(stream); - var sourceCancelPromise = stream._readableStreamController.__cancelSteps(reason); - return sourceCancelPromise.then(function () { - return undefined; - }); - } - function ReadableStreamClose(stream) { - assert(stream._state === 'readable'); - stream._state = 'closed'; - var reader = stream._reader; - if (reader === undefined) { - return undefined; - } - if (IsReadableStreamDefaultReader(reader) === true) { - for (var i = 0; i < reader._readRequests.length; i++) { - var _resolve = reader._readRequests[i]._resolve; - _resolve(CreateIterResultObject(undefined, true)); - } - reader._readRequests = []; - } - defaultReaderClosedPromiseResolve(reader); - return undefined; - } - function ReadableStreamError(stream, e) { - assert(IsReadableStream(stream) === true, 'stream must be ReadableStream'); - assert(stream._state === 'readable', 'state must be readable'); - stream._state = 'errored'; - stream._storedError = e; - var reader = stream._reader; - if (reader === undefined) { - return undefined; - } - if (IsReadableStreamDefaultReader(reader) === true) { - for (var i = 0; i < reader._readRequests.length; i++) { - var readRequest = reader._readRequests[i]; - readRequest._reject(e); - } - reader._readRequests = []; - } else { - assert(IsReadableStreamBYOBReader(reader), 'reader must be ReadableStreamBYOBReader'); - for (var _i = 0; _i < reader._readIntoRequests.length; _i++) { - var readIntoRequest = reader._readIntoRequests[_i]; - readIntoRequest._reject(e); - } - reader._readIntoRequests = []; - } - defaultReaderClosedPromiseReject(reader, e); - reader._closedPromise.catch(function () {}); - } - function ReadableStreamFulfillReadIntoRequest(stream, chunk, done) { - var reader = stream._reader; - assert(reader._readIntoRequests.length > 0); - var readIntoRequest = reader._readIntoRequests.shift(); - readIntoRequest._resolve(CreateIterResultObject(chunk, done)); - } - function ReadableStreamFulfillReadRequest(stream, chunk, done) { - var reader = stream._reader; - assert(reader._readRequests.length > 0); - var readRequest = reader._readRequests.shift(); - readRequest._resolve(CreateIterResultObject(chunk, done)); - } - function ReadableStreamGetNumReadIntoRequests(stream) { - return stream._reader._readIntoRequests.length; - } - function ReadableStreamGetNumReadRequests(stream) { - return stream._reader._readRequests.length; - } - function ReadableStreamHasBYOBReader(stream) { - var reader = stream._reader; - if (reader === undefined) { - return false; - } - if (IsReadableStreamBYOBReader(reader) === false) { - return false; - } - return true; - } - function ReadableStreamHasDefaultReader(stream) { - var reader = stream._reader; - if (reader === undefined) { - return false; - } - if (IsReadableStreamDefaultReader(reader) === false) { - return false; - } - return true; - } - var ReadableStreamDefaultReader = function () { - function ReadableStreamDefaultReader(stream) { - _classCallCheck(this, ReadableStreamDefaultReader); - if (IsReadableStream(stream) === false) { - throw new TypeError('ReadableStreamDefaultReader can only be constructed with a ReadableStream instance'); - } - if (IsReadableStreamLocked(stream) === true) { - throw new TypeError('This stream has already been locked for exclusive reading by another reader'); - } - ReadableStreamReaderGenericInitialize(this, stream); - this._readRequests = []; - } - _createClass(ReadableStreamDefaultReader, [{ - key: 'cancel', - value: function cancel(reason) { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise.reject(defaultReaderBrandCheckException('cancel')); - } - if (this._ownerReadableStream === undefined) { - return Promise.reject(readerLockException('cancel')); - } - return ReadableStreamReaderGenericCancel(this, reason); - } - }, { - key: 'read', - value: function read() { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise.reject(defaultReaderBrandCheckException('read')); - } - if (this._ownerReadableStream === undefined) { - return Promise.reject(readerLockException('read from')); - } - return ReadableStreamDefaultReaderRead(this); - } - }, { - key: 'releaseLock', - value: function releaseLock() { - if (IsReadableStreamDefaultReader(this) === false) { - throw defaultReaderBrandCheckException('releaseLock'); - } - if (this._ownerReadableStream === undefined) { - return; - } - if (this._readRequests.length > 0) { - throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); - } - ReadableStreamReaderGenericRelease(this); - } - }, { - key: 'closed', - get: function get() { - if (IsReadableStreamDefaultReader(this) === false) { - return Promise.reject(defaultReaderBrandCheckException('closed')); - } - return this._closedPromise; - } - }]); - return ReadableStreamDefaultReader; - }(); - var ReadableStreamBYOBReader = function () { - function ReadableStreamBYOBReader(stream) { - _classCallCheck(this, ReadableStreamBYOBReader); - if (!IsReadableStream(stream)) { - throw new TypeError('ReadableStreamBYOBReader can only be constructed with a ReadableStream instance given a ' + 'byte source'); - } - if (IsReadableByteStreamController(stream._readableStreamController) === false) { - throw new TypeError('Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte ' + 'source'); - } - if (IsReadableStreamLocked(stream)) { - throw new TypeError('This stream has already been locked for exclusive reading by another reader'); - } - ReadableStreamReaderGenericInitialize(this, stream); - this._readIntoRequests = []; - } - _createClass(ReadableStreamBYOBReader, [{ - key: 'cancel', - value: function cancel(reason) { - if (!IsReadableStreamBYOBReader(this)) { - return Promise.reject(byobReaderBrandCheckException('cancel')); - } - if (this._ownerReadableStream === undefined) { - return Promise.reject(readerLockException('cancel')); - } - return ReadableStreamReaderGenericCancel(this, reason); - } - }, { - key: 'read', - value: function read(view) { - if (!IsReadableStreamBYOBReader(this)) { - return Promise.reject(byobReaderBrandCheckException('read')); - } - if (this._ownerReadableStream === undefined) { - return Promise.reject(readerLockException('read from')); - } - if (!ArrayBuffer.isView(view)) { - return Promise.reject(new TypeError('view must be an array buffer view')); - } - if (view.byteLength === 0) { - return Promise.reject(new TypeError('view must have non-zero byteLength')); - } - return ReadableStreamBYOBReaderRead(this, view); - } - }, { - key: 'releaseLock', - value: function releaseLock() { - if (!IsReadableStreamBYOBReader(this)) { - throw byobReaderBrandCheckException('releaseLock'); - } - if (this._ownerReadableStream === undefined) { - return; - } - if (this._readIntoRequests.length > 0) { - throw new TypeError('Tried to release a reader lock when that reader has pending read() calls un-settled'); - } - ReadableStreamReaderGenericRelease(this); - } - }, { - key: 'closed', - get: function get() { - if (!IsReadableStreamBYOBReader(this)) { - return Promise.reject(byobReaderBrandCheckException('closed')); - } - return this._closedPromise; - } - }]); - return ReadableStreamBYOBReader; - }(); - function IsReadableStreamBYOBReader(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_readIntoRequests')) { - return false; - } - return true; - } - function IsReadableStreamDefaultReader(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_readRequests')) { - return false; - } - return true; - } - function ReadableStreamReaderGenericInitialize(reader, stream) { - reader._ownerReadableStream = stream; - stream._reader = reader; - if (stream._state === 'readable') { - defaultReaderClosedPromiseInitialize(reader); - } else if (stream._state === 'closed') { - defaultReaderClosedPromiseInitializeAsResolved(reader); - } else { - assert(stream._state === 'errored', 'state must be errored'); - defaultReaderClosedPromiseInitializeAsRejected(reader, stream._storedError); - reader._closedPromise.catch(function () {}); - } - } - function ReadableStreamReaderGenericCancel(reader, reason) { - var stream = reader._ownerReadableStream; - assert(stream !== undefined); - return ReadableStreamCancel(stream, reason); - } - function ReadableStreamReaderGenericRelease(reader) { - assert(reader._ownerReadableStream !== undefined); - assert(reader._ownerReadableStream._reader === reader); - if (reader._ownerReadableStream._state === 'readable') { - defaultReaderClosedPromiseReject(reader, new TypeError('Reader was released and can no longer be used to monitor the stream\'s closedness')); - } else { - defaultReaderClosedPromiseResetToRejected(reader, new TypeError('Reader was released and can no longer be used to monitor the stream\'s closedness')); - } - reader._closedPromise.catch(function () {}); - reader._ownerReadableStream._reader = undefined; - reader._ownerReadableStream = undefined; - } - function ReadableStreamBYOBReaderRead(reader, view) { - var stream = reader._ownerReadableStream; - assert(stream !== undefined); - stream._disturbed = true; - if (stream._state === 'errored') { - return Promise.reject(stream._storedError); - } - return ReadableByteStreamControllerPullInto(stream._readableStreamController, view); - } - function ReadableStreamDefaultReaderRead(reader) { - var stream = reader._ownerReadableStream; - assert(stream !== undefined); - stream._disturbed = true; - if (stream._state === 'closed') { - return Promise.resolve(CreateIterResultObject(undefined, true)); - } - if (stream._state === 'errored') { - return Promise.reject(stream._storedError); - } - assert(stream._state === 'readable'); - return stream._readableStreamController.__pullSteps(); - } - var ReadableStreamDefaultController = function () { - function ReadableStreamDefaultController(stream, underlyingSource, size, highWaterMark) { - _classCallCheck(this, ReadableStreamDefaultController); - if (IsReadableStream(stream) === false) { - throw new TypeError('ReadableStreamDefaultController can only be constructed with a ReadableStream instance'); - } - if (stream._readableStreamController !== undefined) { - throw new TypeError('ReadableStreamDefaultController instances can only be created by the ReadableStream constructor'); - } - this._controlledReadableStream = stream; - this._underlyingSource = underlyingSource; - this._queue = undefined; - this._queueTotalSize = undefined; - ResetQueue(this); - this._started = false; - this._closeRequested = false; - this._pullAgain = false; - this._pulling = false; - var normalizedStrategy = ValidateAndNormalizeQueuingStrategy(size, highWaterMark); - this._strategySize = normalizedStrategy.size; - this._strategyHWM = normalizedStrategy.highWaterMark; - var controller = this; - var startResult = InvokeOrNoop(underlyingSource, 'start', [this]); - Promise.resolve(startResult).then(function () { - controller._started = true; - assert(controller._pulling === false); - assert(controller._pullAgain === false); - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - }, function (r) { - ReadableStreamDefaultControllerErrorIfNeeded(controller, r); - }).catch(rethrowAssertionErrorRejection); - } - _createClass(ReadableStreamDefaultController, [{ - key: 'close', - value: function close() { - if (IsReadableStreamDefaultController(this) === false) { - throw defaultControllerBrandCheckException('close'); - } - if (this._closeRequested === true) { - throw new TypeError('The stream has already been closed; do not close it again!'); - } - var state = this._controlledReadableStream._state; - if (state !== 'readable') { - throw new TypeError('The stream (in ' + state + ' state) is not in the readable state and cannot be closed'); - } - ReadableStreamDefaultControllerClose(this); - } - }, { - key: 'enqueue', - value: function enqueue(chunk) { - if (IsReadableStreamDefaultController(this) === false) { - throw defaultControllerBrandCheckException('enqueue'); - } - if (this._closeRequested === true) { - throw new TypeError('stream is closed or draining'); - } - var state = this._controlledReadableStream._state; - if (state !== 'readable') { - throw new TypeError('The stream (in ' + state + ' state) is not in the readable state and cannot be enqueued to'); - } - return ReadableStreamDefaultControllerEnqueue(this, chunk); - } - }, { - key: 'error', - value: function error(e) { - if (IsReadableStreamDefaultController(this) === false) { - throw defaultControllerBrandCheckException('error'); - } - var stream = this._controlledReadableStream; - if (stream._state !== 'readable') { - throw new TypeError('The stream is ' + stream._state + ' and so cannot be errored'); - } - ReadableStreamDefaultControllerError(this, e); - } - }, { - key: '__cancelSteps', - value: function __cancelSteps(reason) { - ResetQueue(this); - return PromiseInvokeOrNoop(this._underlyingSource, 'cancel', [reason]); - } - }, { - key: '__pullSteps', - value: function __pullSteps() { - var stream = this._controlledReadableStream; - if (this._queue.length > 0) { - var chunk = DequeueValue(this); - if (this._closeRequested === true && this._queue.length === 0) { - ReadableStreamClose(stream); - } else { - ReadableStreamDefaultControllerCallPullIfNeeded(this); - } - return Promise.resolve(CreateIterResultObject(chunk, false)); - } - var pendingPromise = ReadableStreamAddReadRequest(stream); - ReadableStreamDefaultControllerCallPullIfNeeded(this); - return pendingPromise; - } - }, { - key: 'desiredSize', - get: function get() { - if (IsReadableStreamDefaultController(this) === false) { - throw defaultControllerBrandCheckException('desiredSize'); - } - return ReadableStreamDefaultControllerGetDesiredSize(this); - } - }]); - return ReadableStreamDefaultController; - }(); - function IsReadableStreamDefaultController(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_underlyingSource')) { - return false; - } - return true; - } - function ReadableStreamDefaultControllerCallPullIfNeeded(controller) { - var shouldPull = ReadableStreamDefaultControllerShouldCallPull(controller); - if (shouldPull === false) { - return undefined; - } - if (controller._pulling === true) { - controller._pullAgain = true; - return undefined; - } - assert(controller._pullAgain === false); - controller._pulling = true; - var pullPromise = PromiseInvokeOrNoop(controller._underlyingSource, 'pull', [controller]); - pullPromise.then(function () { - controller._pulling = false; - if (controller._pullAgain === true) { - controller._pullAgain = false; - return ReadableStreamDefaultControllerCallPullIfNeeded(controller); - } - return undefined; - }, function (e) { - ReadableStreamDefaultControllerErrorIfNeeded(controller, e); - }).catch(rethrowAssertionErrorRejection); - return undefined; - } - function ReadableStreamDefaultControllerShouldCallPull(controller) { - var stream = controller._controlledReadableStream; - if (stream._state === 'closed' || stream._state === 'errored') { - return false; - } - if (controller._closeRequested === true) { - return false; - } - if (controller._started === false) { - return false; - } - if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { - return true; - } - var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); - if (desiredSize > 0) { - return true; - } - return false; - } - function ReadableStreamDefaultControllerClose(controller) { - var stream = controller._controlledReadableStream; - assert(controller._closeRequested === false); - assert(stream._state === 'readable'); - controller._closeRequested = true; - if (controller._queue.length === 0) { - ReadableStreamClose(stream); - } - } - function ReadableStreamDefaultControllerEnqueue(controller, chunk) { - var stream = controller._controlledReadableStream; - assert(controller._closeRequested === false); - assert(stream._state === 'readable'); - if (IsReadableStreamLocked(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { - ReadableStreamFulfillReadRequest(stream, chunk, false); - } else { - var chunkSize = 1; - if (controller._strategySize !== undefined) { - var strategySize = controller._strategySize; - try { - chunkSize = strategySize(chunk); - } catch (chunkSizeE) { - ReadableStreamDefaultControllerErrorIfNeeded(controller, chunkSizeE); - throw chunkSizeE; - } - } - try { - EnqueueValueWithSize(controller, chunk, chunkSize); - } catch (enqueueE) { - ReadableStreamDefaultControllerErrorIfNeeded(controller, enqueueE); - throw enqueueE; - } - } - ReadableStreamDefaultControllerCallPullIfNeeded(controller); - return undefined; - } - function ReadableStreamDefaultControllerError(controller, e) { - var stream = controller._controlledReadableStream; - assert(stream._state === 'readable'); - ResetQueue(controller); - ReadableStreamError(stream, e); - } - function ReadableStreamDefaultControllerErrorIfNeeded(controller, e) { - if (controller._controlledReadableStream._state === 'readable') { - ReadableStreamDefaultControllerError(controller, e); - } - } - function ReadableStreamDefaultControllerGetDesiredSize(controller) { - var stream = controller._controlledReadableStream; - var state = stream._state; - if (state === 'errored') { - return null; - } - if (state === 'closed') { - return 0; - } - return controller._strategyHWM - controller._queueTotalSize; - } - var ReadableStreamBYOBRequest = function () { - function ReadableStreamBYOBRequest(controller, view) { - _classCallCheck(this, ReadableStreamBYOBRequest); - this._associatedReadableByteStreamController = controller; - this._view = view; - } - _createClass(ReadableStreamBYOBRequest, [{ - key: 'respond', - value: function respond(bytesWritten) { - if (IsReadableStreamBYOBRequest(this) === false) { - throw byobRequestBrandCheckException('respond'); - } - if (this._associatedReadableByteStreamController === undefined) { - throw new TypeError('This BYOB request has been invalidated'); - } - ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController, bytesWritten); - } - }, { - key: 'respondWithNewView', - value: function respondWithNewView(view) { - if (IsReadableStreamBYOBRequest(this) === false) { - throw byobRequestBrandCheckException('respond'); - } - if (this._associatedReadableByteStreamController === undefined) { - throw new TypeError('This BYOB request has been invalidated'); - } - if (!ArrayBuffer.isView(view)) { - throw new TypeError('You can only respond with array buffer views'); - } - ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController, view); - } - }, { - key: 'view', - get: function get() { - return this._view; - } - }]); - return ReadableStreamBYOBRequest; - }(); - var ReadableByteStreamController = function () { - function ReadableByteStreamController(stream, underlyingByteSource, highWaterMark) { - _classCallCheck(this, ReadableByteStreamController); - if (IsReadableStream(stream) === false) { - throw new TypeError('ReadableByteStreamController can only be constructed with a ReadableStream instance given ' + 'a byte source'); - } - if (stream._readableStreamController !== undefined) { - throw new TypeError('ReadableByteStreamController instances can only be created by the ReadableStream constructor given a byte ' + 'source'); - } - this._controlledReadableStream = stream; - this._underlyingByteSource = underlyingByteSource; - this._pullAgain = false; - this._pulling = false; - ReadableByteStreamControllerClearPendingPullIntos(this); - this._queue = this._queueTotalSize = undefined; - ResetQueue(this); - this._closeRequested = false; - this._started = false; - this._strategyHWM = ValidateAndNormalizeHighWaterMark(highWaterMark); - var autoAllocateChunkSize = underlyingByteSource.autoAllocateChunkSize; - if (autoAllocateChunkSize !== undefined) { - if (Number.isInteger(autoAllocateChunkSize) === false || autoAllocateChunkSize <= 0) { - throw new RangeError('autoAllocateChunkSize must be a positive integer'); - } - } - this._autoAllocateChunkSize = autoAllocateChunkSize; - this._pendingPullIntos = []; - var controller = this; - var startResult = InvokeOrNoop(underlyingByteSource, 'start', [this]); - Promise.resolve(startResult).then(function () { - controller._started = true; - assert(controller._pulling === false); - assert(controller._pullAgain === false); - ReadableByteStreamControllerCallPullIfNeeded(controller); - }, function (r) { - if (stream._state === 'readable') { - ReadableByteStreamControllerError(controller, r); - } - }).catch(rethrowAssertionErrorRejection); - } - _createClass(ReadableByteStreamController, [{ - key: 'close', - value: function close() { - if (IsReadableByteStreamController(this) === false) { - throw byteStreamControllerBrandCheckException('close'); - } - if (this._closeRequested === true) { - throw new TypeError('The stream has already been closed; do not close it again!'); - } - var state = this._controlledReadableStream._state; - if (state !== 'readable') { - throw new TypeError('The stream (in ' + state + ' state) is not in the readable state and cannot be closed'); - } - ReadableByteStreamControllerClose(this); - } - }, { - key: 'enqueue', - value: function enqueue(chunk) { - if (IsReadableByteStreamController(this) === false) { - throw byteStreamControllerBrandCheckException('enqueue'); - } - if (this._closeRequested === true) { - throw new TypeError('stream is closed or draining'); - } - var state = this._controlledReadableStream._state; - if (state !== 'readable') { - throw new TypeError('The stream (in ' + state + ' state) is not in the readable state and cannot be enqueued to'); - } - if (!ArrayBuffer.isView(chunk)) { - throw new TypeError('You can only enqueue array buffer views when using a ReadableByteStreamController'); - } - ReadableByteStreamControllerEnqueue(this, chunk); - } - }, { - key: 'error', - value: function error(e) { - if (IsReadableByteStreamController(this) === false) { - throw byteStreamControllerBrandCheckException('error'); - } - var stream = this._controlledReadableStream; - if (stream._state !== 'readable') { - throw new TypeError('The stream is ' + stream._state + ' and so cannot be errored'); - } - ReadableByteStreamControllerError(this, e); - } - }, { - key: '__cancelSteps', - value: function __cancelSteps(reason) { - if (this._pendingPullIntos.length > 0) { - var firstDescriptor = this._pendingPullIntos[0]; - firstDescriptor.bytesFilled = 0; - } - ResetQueue(this); - return PromiseInvokeOrNoop(this._underlyingByteSource, 'cancel', [reason]); - } - }, { - key: '__pullSteps', - value: function __pullSteps() { - var stream = this._controlledReadableStream; - assert(ReadableStreamHasDefaultReader(stream) === true); - if (this._queueTotalSize > 0) { - assert(ReadableStreamGetNumReadRequests(stream) === 0); - var entry = this._queue.shift(); - this._queueTotalSize -= entry.byteLength; - ReadableByteStreamControllerHandleQueueDrain(this); - var view = void 0; - try { - view = new Uint8Array(entry.buffer, entry.byteOffset, entry.byteLength); - } catch (viewE) { - return Promise.reject(viewE); - } - return Promise.resolve(CreateIterResultObject(view, false)); - } - var autoAllocateChunkSize = this._autoAllocateChunkSize; - if (autoAllocateChunkSize !== undefined) { - var buffer = void 0; - try { - buffer = new ArrayBuffer(autoAllocateChunkSize); - } catch (bufferE) { - return Promise.reject(bufferE); - } - var pullIntoDescriptor = { - buffer: buffer, - byteOffset: 0, - byteLength: autoAllocateChunkSize, - bytesFilled: 0, - elementSize: 1, - ctor: Uint8Array, - readerType: 'default' - }; - this._pendingPullIntos.push(pullIntoDescriptor); - } - var promise = ReadableStreamAddReadRequest(stream); - ReadableByteStreamControllerCallPullIfNeeded(this); - return promise; - } - }, { - key: 'byobRequest', - get: function get() { - if (IsReadableByteStreamController(this) === false) { - throw byteStreamControllerBrandCheckException('byobRequest'); - } - if (this._byobRequest === undefined && this._pendingPullIntos.length > 0) { - var firstDescriptor = this._pendingPullIntos[0]; - var view = new Uint8Array(firstDescriptor.buffer, firstDescriptor.byteOffset + firstDescriptor.bytesFilled, firstDescriptor.byteLength - firstDescriptor.bytesFilled); - this._byobRequest = new ReadableStreamBYOBRequest(this, view); - } - return this._byobRequest; - } - }, { - key: 'desiredSize', - get: function get() { - if (IsReadableByteStreamController(this) === false) { - throw byteStreamControllerBrandCheckException('desiredSize'); - } - return ReadableByteStreamControllerGetDesiredSize(this); - } - }]); - return ReadableByteStreamController; - }(); - function IsReadableByteStreamController(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_underlyingByteSource')) { - return false; - } - return true; - } - function IsReadableStreamBYOBRequest(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_associatedReadableByteStreamController')) { - return false; - } - return true; - } - function ReadableByteStreamControllerCallPullIfNeeded(controller) { - var shouldPull = ReadableByteStreamControllerShouldCallPull(controller); - if (shouldPull === false) { - return undefined; - } - if (controller._pulling === true) { - controller._pullAgain = true; - return undefined; - } - assert(controller._pullAgain === false); - controller._pulling = true; - var pullPromise = PromiseInvokeOrNoop(controller._underlyingByteSource, 'pull', [controller]); - pullPromise.then(function () { - controller._pulling = false; - if (controller._pullAgain === true) { - controller._pullAgain = false; - ReadableByteStreamControllerCallPullIfNeeded(controller); - } - }, function (e) { - if (controller._controlledReadableStream._state === 'readable') { - ReadableByteStreamControllerError(controller, e); - } - }).catch(rethrowAssertionErrorRejection); - return undefined; - } - function ReadableByteStreamControllerClearPendingPullIntos(controller) { - ReadableByteStreamControllerInvalidateBYOBRequest(controller); - controller._pendingPullIntos = []; - } - function ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor) { - assert(stream._state !== 'errored', 'state must not be errored'); - var done = false; - if (stream._state === 'closed') { - assert(pullIntoDescriptor.bytesFilled === 0); - done = true; - } - var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); - if (pullIntoDescriptor.readerType === 'default') { - ReadableStreamFulfillReadRequest(stream, filledView, done); - } else { - assert(pullIntoDescriptor.readerType === 'byob'); - ReadableStreamFulfillReadIntoRequest(stream, filledView, done); - } - } - function ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor) { - var bytesFilled = pullIntoDescriptor.bytesFilled; - var elementSize = pullIntoDescriptor.elementSize; - assert(bytesFilled <= pullIntoDescriptor.byteLength); - assert(bytesFilled % elementSize === 0); - return new pullIntoDescriptor.ctor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, bytesFilled / elementSize); - } - function ReadableByteStreamControllerEnqueueChunkToQueue(controller, buffer, byteOffset, byteLength) { - controller._queue.push({ - buffer: buffer, - byteOffset: byteOffset, - byteLength: byteLength - }); - controller._queueTotalSize += byteLength; - } - function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) { - var elementSize = pullIntoDescriptor.elementSize; - var currentAlignedBytes = pullIntoDescriptor.bytesFilled - pullIntoDescriptor.bytesFilled % elementSize; - var maxBytesToCopy = Math.min(controller._queueTotalSize, pullIntoDescriptor.byteLength - pullIntoDescriptor.bytesFilled); - var maxBytesFilled = pullIntoDescriptor.bytesFilled + maxBytesToCopy; - var maxAlignedBytes = maxBytesFilled - maxBytesFilled % elementSize; - var totalBytesToCopyRemaining = maxBytesToCopy; - var ready = false; - if (maxAlignedBytes > currentAlignedBytes) { - totalBytesToCopyRemaining = maxAlignedBytes - pullIntoDescriptor.bytesFilled; - ready = true; - } - var queue = controller._queue; - while (totalBytesToCopyRemaining > 0) { - var headOfQueue = queue[0]; - var bytesToCopy = Math.min(totalBytesToCopyRemaining, headOfQueue.byteLength); - var destStart = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; - ArrayBufferCopy(pullIntoDescriptor.buffer, destStart, headOfQueue.buffer, headOfQueue.byteOffset, bytesToCopy); - if (headOfQueue.byteLength === bytesToCopy) { - queue.shift(); - } else { - headOfQueue.byteOffset += bytesToCopy; - headOfQueue.byteLength -= bytesToCopy; - } - controller._queueTotalSize -= bytesToCopy; - ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesToCopy, pullIntoDescriptor); - totalBytesToCopyRemaining -= bytesToCopy; - } - if (ready === false) { - assert(controller._queueTotalSize === 0, 'queue must be empty'); - assert(pullIntoDescriptor.bytesFilled > 0); - assert(pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize); - } - return ready; - } - function ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, size, pullIntoDescriptor) { - assert(controller._pendingPullIntos.length === 0 || controller._pendingPullIntos[0] === pullIntoDescriptor); - ReadableByteStreamControllerInvalidateBYOBRequest(controller); - pullIntoDescriptor.bytesFilled += size; - } - function ReadableByteStreamControllerHandleQueueDrain(controller) { - assert(controller._controlledReadableStream._state === 'readable'); - if (controller._queueTotalSize === 0 && controller._closeRequested === true) { - ReadableStreamClose(controller._controlledReadableStream); - } else { - ReadableByteStreamControllerCallPullIfNeeded(controller); - } - } - function ReadableByteStreamControllerInvalidateBYOBRequest(controller) { - if (controller._byobRequest === undefined) { - return; - } - controller._byobRequest._associatedReadableByteStreamController = undefined; - controller._byobRequest._view = undefined; - controller._byobRequest = undefined; - } - function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller) { - assert(controller._closeRequested === false); - while (controller._pendingPullIntos.length > 0) { - if (controller._queueTotalSize === 0) { - return; - } - var pullIntoDescriptor = controller._pendingPullIntos[0]; - if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) === true) { - ReadableByteStreamControllerShiftPendingPullInto(controller); - ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableStream, pullIntoDescriptor); - } - } - } - function ReadableByteStreamControllerPullInto(controller, view) { - var stream = controller._controlledReadableStream; - var elementSize = 1; - if (view.constructor !== DataView) { - elementSize = view.constructor.BYTES_PER_ELEMENT; - } - var ctor = view.constructor; - var pullIntoDescriptor = { - buffer: view.buffer, - byteOffset: view.byteOffset, - byteLength: view.byteLength, - bytesFilled: 0, - elementSize: elementSize, - ctor: ctor, - readerType: 'byob' - }; - if (controller._pendingPullIntos.length > 0) { - pullIntoDescriptor.buffer = TransferArrayBuffer(pullIntoDescriptor.buffer); - controller._pendingPullIntos.push(pullIntoDescriptor); - return ReadableStreamAddReadIntoRequest(stream); - } - if (stream._state === 'closed') { - var emptyView = new view.constructor(pullIntoDescriptor.buffer, pullIntoDescriptor.byteOffset, 0); - return Promise.resolve(CreateIterResultObject(emptyView, true)); - } - if (controller._queueTotalSize > 0) { - if (ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(controller, pullIntoDescriptor) === true) { - var filledView = ReadableByteStreamControllerConvertPullIntoDescriptor(pullIntoDescriptor); - ReadableByteStreamControllerHandleQueueDrain(controller); - return Promise.resolve(CreateIterResultObject(filledView, false)); - } - if (controller._closeRequested === true) { - var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); - ReadableByteStreamControllerError(controller, e); - return Promise.reject(e); - } - } - pullIntoDescriptor.buffer = TransferArrayBuffer(pullIntoDescriptor.buffer); - controller._pendingPullIntos.push(pullIntoDescriptor); - var promise = ReadableStreamAddReadIntoRequest(stream); - ReadableByteStreamControllerCallPullIfNeeded(controller); - return promise; - } - function ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor) { - firstDescriptor.buffer = TransferArrayBuffer(firstDescriptor.buffer); - assert(firstDescriptor.bytesFilled === 0, 'bytesFilled must be 0'); - var stream = controller._controlledReadableStream; - if (ReadableStreamHasBYOBReader(stream) === true) { - while (ReadableStreamGetNumReadIntoRequests(stream) > 0) { - var pullIntoDescriptor = ReadableByteStreamControllerShiftPendingPullInto(controller); - ReadableByteStreamControllerCommitPullIntoDescriptor(stream, pullIntoDescriptor); - } - } - } - function ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, pullIntoDescriptor) { - if (pullIntoDescriptor.bytesFilled + bytesWritten > pullIntoDescriptor.byteLength) { - throw new RangeError('bytesWritten out of range'); - } - ReadableByteStreamControllerFillHeadPullIntoDescriptor(controller, bytesWritten, pullIntoDescriptor); - if (pullIntoDescriptor.bytesFilled < pullIntoDescriptor.elementSize) { - return; - } - ReadableByteStreamControllerShiftPendingPullInto(controller); - var remainderSize = pullIntoDescriptor.bytesFilled % pullIntoDescriptor.elementSize; - if (remainderSize > 0) { - var end = pullIntoDescriptor.byteOffset + pullIntoDescriptor.bytesFilled; - var remainder = pullIntoDescriptor.buffer.slice(end - remainderSize, end); - ReadableByteStreamControllerEnqueueChunkToQueue(controller, remainder, 0, remainder.byteLength); - } - pullIntoDescriptor.buffer = TransferArrayBuffer(pullIntoDescriptor.buffer); - pullIntoDescriptor.bytesFilled -= remainderSize; - ReadableByteStreamControllerCommitPullIntoDescriptor(controller._controlledReadableStream, pullIntoDescriptor); - ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); - } - function ReadableByteStreamControllerRespondInternal(controller, bytesWritten) { - var firstDescriptor = controller._pendingPullIntos[0]; - var stream = controller._controlledReadableStream; - if (stream._state === 'closed') { - if (bytesWritten !== 0) { - throw new TypeError('bytesWritten must be 0 when calling respond() on a closed stream'); - } - ReadableByteStreamControllerRespondInClosedState(controller, firstDescriptor); - } else { - assert(stream._state === 'readable'); - ReadableByteStreamControllerRespondInReadableState(controller, bytesWritten, firstDescriptor); - } - } - function ReadableByteStreamControllerShiftPendingPullInto(controller) { - var descriptor = controller._pendingPullIntos.shift(); - ReadableByteStreamControllerInvalidateBYOBRequest(controller); - return descriptor; - } - function ReadableByteStreamControllerShouldCallPull(controller) { - var stream = controller._controlledReadableStream; - if (stream._state !== 'readable') { - return false; - } - if (controller._closeRequested === true) { - return false; - } - if (controller._started === false) { - return false; - } - if (ReadableStreamHasDefaultReader(stream) === true && ReadableStreamGetNumReadRequests(stream) > 0) { - return true; - } - if (ReadableStreamHasBYOBReader(stream) === true && ReadableStreamGetNumReadIntoRequests(stream) > 0) { - return true; - } - if (ReadableByteStreamControllerGetDesiredSize(controller) > 0) { - return true; - } - return false; - } - function ReadableByteStreamControllerClose(controller) { - var stream = controller._controlledReadableStream; - assert(controller._closeRequested === false); - assert(stream._state === 'readable'); - if (controller._queueTotalSize > 0) { - controller._closeRequested = true; - return; - } - if (controller._pendingPullIntos.length > 0) { - var firstPendingPullInto = controller._pendingPullIntos[0]; - if (firstPendingPullInto.bytesFilled > 0) { - var e = new TypeError('Insufficient bytes to fill elements in the given buffer'); - ReadableByteStreamControllerError(controller, e); - throw e; - } - } - ReadableStreamClose(stream); - } - function ReadableByteStreamControllerEnqueue(controller, chunk) { - var stream = controller._controlledReadableStream; - assert(controller._closeRequested === false); - assert(stream._state === 'readable'); - var buffer = chunk.buffer; - var byteOffset = chunk.byteOffset; - var byteLength = chunk.byteLength; - var transferredBuffer = TransferArrayBuffer(buffer); - if (ReadableStreamHasDefaultReader(stream) === true) { - if (ReadableStreamGetNumReadRequests(stream) === 0) { - ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); - } else { - assert(controller._queue.length === 0); - var transferredView = new Uint8Array(transferredBuffer, byteOffset, byteLength); - ReadableStreamFulfillReadRequest(stream, transferredView, false); - } - } else if (ReadableStreamHasBYOBReader(stream) === true) { - ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); - ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(controller); - } else { - assert(IsReadableStreamLocked(stream) === false, 'stream must not be locked'); - ReadableByteStreamControllerEnqueueChunkToQueue(controller, transferredBuffer, byteOffset, byteLength); - } - } - function ReadableByteStreamControllerError(controller, e) { - var stream = controller._controlledReadableStream; - assert(stream._state === 'readable'); - ReadableByteStreamControllerClearPendingPullIntos(controller); - ResetQueue(controller); - ReadableStreamError(stream, e); - } - function ReadableByteStreamControllerGetDesiredSize(controller) { - var stream = controller._controlledReadableStream; - var state = stream._state; - if (state === 'errored') { - return null; - } - if (state === 'closed') { - return 0; - } - return controller._strategyHWM - controller._queueTotalSize; - } - function ReadableByteStreamControllerRespond(controller, bytesWritten) { - bytesWritten = Number(bytesWritten); - if (IsFiniteNonNegativeNumber(bytesWritten) === false) { - throw new RangeError('bytesWritten must be a finite'); - } - assert(controller._pendingPullIntos.length > 0); - ReadableByteStreamControllerRespondInternal(controller, bytesWritten); - } - function ReadableByteStreamControllerRespondWithNewView(controller, view) { - assert(controller._pendingPullIntos.length > 0); - var firstDescriptor = controller._pendingPullIntos[0]; - if (firstDescriptor.byteOffset + firstDescriptor.bytesFilled !== view.byteOffset) { - throw new RangeError('The region specified by view does not match byobRequest'); - } - if (firstDescriptor.byteLength !== view.byteLength) { - throw new RangeError('The buffer of view has different capacity than byobRequest'); - } - firstDescriptor.buffer = view.buffer; - ReadableByteStreamControllerRespondInternal(controller, view.byteLength); - } - function streamBrandCheckException(name) { - return new TypeError('ReadableStream.prototype.' + name + ' can only be used on a ReadableStream'); - } - function readerLockException(name) { - return new TypeError('Cannot ' + name + ' a stream using a released reader'); - } - function defaultReaderBrandCheckException(name) { - return new TypeError('ReadableStreamDefaultReader.prototype.' + name + ' can only be used on a ReadableStreamDefaultReader'); - } - function defaultReaderClosedPromiseInitialize(reader) { - reader._closedPromise = new Promise(function (resolve, reject) { - reader._closedPromise_resolve = resolve; - reader._closedPromise_reject = reject; - }); - } - function defaultReaderClosedPromiseInitializeAsRejected(reader, reason) { - reader._closedPromise = Promise.reject(reason); - reader._closedPromise_resolve = undefined; - reader._closedPromise_reject = undefined; - } - function defaultReaderClosedPromiseInitializeAsResolved(reader) { - reader._closedPromise = Promise.resolve(undefined); - reader._closedPromise_resolve = undefined; - reader._closedPromise_reject = undefined; - } - function defaultReaderClosedPromiseReject(reader, reason) { - assert(reader._closedPromise_resolve !== undefined); - assert(reader._closedPromise_reject !== undefined); - reader._closedPromise_reject(reason); - reader._closedPromise_resolve = undefined; - reader._closedPromise_reject = undefined; - } - function defaultReaderClosedPromiseResetToRejected(reader, reason) { - assert(reader._closedPromise_resolve === undefined); - assert(reader._closedPromise_reject === undefined); - reader._closedPromise = Promise.reject(reason); - } - function defaultReaderClosedPromiseResolve(reader) { - assert(reader._closedPromise_resolve !== undefined); - assert(reader._closedPromise_reject !== undefined); - reader._closedPromise_resolve(undefined); - reader._closedPromise_resolve = undefined; - reader._closedPromise_reject = undefined; - } - function byobReaderBrandCheckException(name) { - return new TypeError('ReadableStreamBYOBReader.prototype.' + name + ' can only be used on a ReadableStreamBYOBReader'); - } - function defaultControllerBrandCheckException(name) { - return new TypeError('ReadableStreamDefaultController.prototype.' + name + ' can only be used on a ReadableStreamDefaultController'); - } - function byobRequestBrandCheckException(name) { - return new TypeError('ReadableStreamBYOBRequest.prototype.' + name + ' can only be used on a ReadableStreamBYOBRequest'); - } - function byteStreamControllerBrandCheckException(name) { - return new TypeError('ReadableByteStreamController.prototype.' + name + ' can only be used on a ReadableByteStreamController'); - } - function ifIsObjectAndHasAPromiseIsHandledInternalSlotSetPromiseIsHandledToTrue(promise) { - try { - Promise.prototype.then.call(promise, undefined, function () {}); - } catch (e) {} - } -}, function (module, exports, __w_pdfjs_require__) { - "use strict"; - - var transformStream = __w_pdfjs_require__(6); - var readableStream = __w_pdfjs_require__(4); - var writableStream = __w_pdfjs_require__(2); - exports.TransformStream = transformStream.TransformStream; - exports.ReadableStream = readableStream.ReadableStream; - exports.IsReadableStreamDisturbed = readableStream.IsReadableStreamDisturbed; - exports.ReadableStreamDefaultControllerClose = readableStream.ReadableStreamDefaultControllerClose; - exports.ReadableStreamDefaultControllerEnqueue = readableStream.ReadableStreamDefaultControllerEnqueue; - exports.ReadableStreamDefaultControllerError = readableStream.ReadableStreamDefaultControllerError; - exports.ReadableStreamDefaultControllerGetDesiredSize = readableStream.ReadableStreamDefaultControllerGetDesiredSize; - exports.AcquireWritableStreamDefaultWriter = writableStream.AcquireWritableStreamDefaultWriter; - exports.IsWritableStream = writableStream.IsWritableStream; - exports.IsWritableStreamLocked = writableStream.IsWritableStreamLocked; - exports.WritableStream = writableStream.WritableStream; - exports.WritableStreamAbort = writableStream.WritableStreamAbort; - exports.WritableStreamDefaultControllerError = writableStream.WritableStreamDefaultControllerError; - exports.WritableStreamDefaultWriterCloseWithErrorPropagation = writableStream.WritableStreamDefaultWriterCloseWithErrorPropagation; - exports.WritableStreamDefaultWriterRelease = writableStream.WritableStreamDefaultWriterRelease; - exports.WritableStreamDefaultWriterWrite = writableStream.WritableStreamDefaultWriterWrite; -}, function (module, exports, __w_pdfjs_require__) { - "use strict"; - - var _createClass = function () { - function defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - return function (Constructor, protoProps, staticProps) { - if (protoProps) defineProperties(Constructor.prototype, protoProps); - if (staticProps) defineProperties(Constructor, staticProps); - return Constructor; - }; - }(); - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - var _require = __w_pdfjs_require__(1), - assert = _require.assert; - var _require2 = __w_pdfjs_require__(0), - InvokeOrNoop = _require2.InvokeOrNoop, - PromiseInvokeOrPerformFallback = _require2.PromiseInvokeOrPerformFallback, - PromiseInvokeOrNoop = _require2.PromiseInvokeOrNoop, - typeIsObject = _require2.typeIsObject; - var _require3 = __w_pdfjs_require__(4), - ReadableStream = _require3.ReadableStream, - ReadableStreamDefaultControllerClose = _require3.ReadableStreamDefaultControllerClose, - ReadableStreamDefaultControllerEnqueue = _require3.ReadableStreamDefaultControllerEnqueue, - ReadableStreamDefaultControllerError = _require3.ReadableStreamDefaultControllerError, - ReadableStreamDefaultControllerGetDesiredSize = _require3.ReadableStreamDefaultControllerGetDesiredSize; - var _require4 = __w_pdfjs_require__(2), - WritableStream = _require4.WritableStream, - WritableStreamDefaultControllerError = _require4.WritableStreamDefaultControllerError; - function TransformStreamCloseReadable(transformStream) { - if (transformStream._errored === true) { - throw new TypeError('TransformStream is already errored'); - } - if (transformStream._readableClosed === true) { - throw new TypeError('Readable side is already closed'); - } - TransformStreamCloseReadableInternal(transformStream); - } - function TransformStreamEnqueueToReadable(transformStream, chunk) { - if (transformStream._errored === true) { - throw new TypeError('TransformStream is already errored'); - } - if (transformStream._readableClosed === true) { - throw new TypeError('Readable side is already closed'); - } - var controller = transformStream._readableController; - try { - ReadableStreamDefaultControllerEnqueue(controller, chunk); - } catch (e) { - transformStream._readableClosed = true; - TransformStreamErrorIfNeeded(transformStream, e); - throw transformStream._storedError; - } - var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(controller); - var maybeBackpressure = desiredSize <= 0; - if (maybeBackpressure === true && transformStream._backpressure === false) { - TransformStreamSetBackpressure(transformStream, true); - } - } - function TransformStreamError(transformStream, e) { - if (transformStream._errored === true) { - throw new TypeError('TransformStream is already errored'); - } - TransformStreamErrorInternal(transformStream, e); - } - function TransformStreamCloseReadableInternal(transformStream) { - assert(transformStream._errored === false); - assert(transformStream._readableClosed === false); - try { - ReadableStreamDefaultControllerClose(transformStream._readableController); - } catch (e) { - assert(false); - } - transformStream._readableClosed = true; - } - function TransformStreamErrorIfNeeded(transformStream, e) { - if (transformStream._errored === false) { - TransformStreamErrorInternal(transformStream, e); - } - } - function TransformStreamErrorInternal(transformStream, e) { - assert(transformStream._errored === false); - transformStream._errored = true; - transformStream._storedError = e; - if (transformStream._writableDone === false) { - WritableStreamDefaultControllerError(transformStream._writableController, e); - } - if (transformStream._readableClosed === false) { - ReadableStreamDefaultControllerError(transformStream._readableController, e); - } - } - function TransformStreamReadableReadyPromise(transformStream) { - assert(transformStream._backpressureChangePromise !== undefined, '_backpressureChangePromise should have been initialized'); - if (transformStream._backpressure === false) { - return Promise.resolve(); - } - assert(transformStream._backpressure === true, '_backpressure should have been initialized'); - return transformStream._backpressureChangePromise; - } - function TransformStreamSetBackpressure(transformStream, backpressure) { - assert(transformStream._backpressure !== backpressure, 'TransformStreamSetBackpressure() should be called only when backpressure is changed'); - if (transformStream._backpressureChangePromise !== undefined) { - transformStream._backpressureChangePromise_resolve(backpressure); - } - transformStream._backpressureChangePromise = new Promise(function (resolve) { - transformStream._backpressureChangePromise_resolve = resolve; - }); - transformStream._backpressureChangePromise.then(function (resolution) { - assert(resolution !== backpressure, '_backpressureChangePromise should be fulfilled only when backpressure is changed'); - }); - transformStream._backpressure = backpressure; - } - function TransformStreamDefaultTransform(chunk, transformStreamController) { - var transformStream = transformStreamController._controlledTransformStream; - TransformStreamEnqueueToReadable(transformStream, chunk); - return Promise.resolve(); - } - function TransformStreamTransform(transformStream, chunk) { - assert(transformStream._errored === false); - assert(transformStream._transforming === false); - assert(transformStream._backpressure === false); - transformStream._transforming = true; - var transformer = transformStream._transformer; - var controller = transformStream._transformStreamController; - var transformPromise = PromiseInvokeOrPerformFallback(transformer, 'transform', [chunk, controller], TransformStreamDefaultTransform, [chunk, controller]); - return transformPromise.then(function () { - transformStream._transforming = false; - return TransformStreamReadableReadyPromise(transformStream); - }, function (e) { - TransformStreamErrorIfNeeded(transformStream, e); - return Promise.reject(e); - }); - } - function IsTransformStreamDefaultController(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_controlledTransformStream')) { - return false; - } - return true; - } - function IsTransformStream(x) { - if (!typeIsObject(x)) { - return false; - } - if (!Object.prototype.hasOwnProperty.call(x, '_transformStreamController')) { - return false; - } - return true; - } - var TransformStreamSink = function () { - function TransformStreamSink(transformStream, startPromise) { - _classCallCheck(this, TransformStreamSink); - this._transformStream = transformStream; - this._startPromise = startPromise; - } - _createClass(TransformStreamSink, [{ - key: 'start', - value: function start(c) { - var transformStream = this._transformStream; - transformStream._writableController = c; - return this._startPromise.then(function () { - return TransformStreamReadableReadyPromise(transformStream); - }); - } - }, { - key: 'write', - value: function write(chunk) { - var transformStream = this._transformStream; - return TransformStreamTransform(transformStream, chunk); - } - }, { - key: 'abort', - value: function abort() { - var transformStream = this._transformStream; - transformStream._writableDone = true; - TransformStreamErrorInternal(transformStream, new TypeError('Writable side aborted')); - } - }, { - key: 'close', - value: function close() { - var transformStream = this._transformStream; - assert(transformStream._transforming === false); - transformStream._writableDone = true; - var flushPromise = PromiseInvokeOrNoop(transformStream._transformer, 'flush', [transformStream._transformStreamController]); - return flushPromise.then(function () { - if (transformStream._errored === true) { - return Promise.reject(transformStream._storedError); - } - if (transformStream._readableClosed === false) { - TransformStreamCloseReadableInternal(transformStream); - } - return Promise.resolve(); - }).catch(function (r) { - TransformStreamErrorIfNeeded(transformStream, r); - return Promise.reject(transformStream._storedError); - }); - } - }]); - return TransformStreamSink; - }(); - var TransformStreamSource = function () { - function TransformStreamSource(transformStream, startPromise) { - _classCallCheck(this, TransformStreamSource); - this._transformStream = transformStream; - this._startPromise = startPromise; - } - _createClass(TransformStreamSource, [{ - key: 'start', - value: function start(c) { - var transformStream = this._transformStream; - transformStream._readableController = c; - return this._startPromise.then(function () { - assert(transformStream._backpressureChangePromise !== undefined, '_backpressureChangePromise should have been initialized'); - if (transformStream._backpressure === true) { - return Promise.resolve(); - } - assert(transformStream._backpressure === false, '_backpressure should have been initialized'); - return transformStream._backpressureChangePromise; - }); - } - }, { - key: 'pull', - value: function pull() { - var transformStream = this._transformStream; - assert(transformStream._backpressure === true, 'pull() should be never called while _backpressure is false'); - assert(transformStream._backpressureChangePromise !== undefined, '_backpressureChangePromise should have been initialized'); - TransformStreamSetBackpressure(transformStream, false); - return transformStream._backpressureChangePromise; - } - }, { - key: 'cancel', - value: function cancel() { - var transformStream = this._transformStream; - transformStream._readableClosed = true; - TransformStreamErrorInternal(transformStream, new TypeError('Readable side canceled')); - } - }]); - return TransformStreamSource; - }(); - var TransformStreamDefaultController = function () { - function TransformStreamDefaultController(transformStream) { - _classCallCheck(this, TransformStreamDefaultController); - if (IsTransformStream(transformStream) === false) { - throw new TypeError('TransformStreamDefaultController can only be ' + 'constructed with a TransformStream instance'); - } - if (transformStream._transformStreamController !== undefined) { - throw new TypeError('TransformStreamDefaultController instances can ' + 'only be created by the TransformStream constructor'); - } - this._controlledTransformStream = transformStream; - } - _createClass(TransformStreamDefaultController, [{ - key: 'enqueue', - value: function enqueue(chunk) { - if (IsTransformStreamDefaultController(this) === false) { - throw defaultControllerBrandCheckException('enqueue'); - } - TransformStreamEnqueueToReadable(this._controlledTransformStream, chunk); - } - }, { - key: 'close', - value: function close() { - if (IsTransformStreamDefaultController(this) === false) { - throw defaultControllerBrandCheckException('close'); - } - TransformStreamCloseReadable(this._controlledTransformStream); - } - }, { - key: 'error', - value: function error(reason) { - if (IsTransformStreamDefaultController(this) === false) { - throw defaultControllerBrandCheckException('error'); - } - TransformStreamError(this._controlledTransformStream, reason); - } - }, { - key: 'desiredSize', - get: function get() { - if (IsTransformStreamDefaultController(this) === false) { - throw defaultControllerBrandCheckException('desiredSize'); - } - var transformStream = this._controlledTransformStream; - var readableController = transformStream._readableController; - return ReadableStreamDefaultControllerGetDesiredSize(readableController); - } - }]); - return TransformStreamDefaultController; - }(); - var TransformStream = function () { - function TransformStream() { - var transformer = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - _classCallCheck(this, TransformStream); - this._transformer = transformer; - var readableStrategy = transformer.readableStrategy, - writableStrategy = transformer.writableStrategy; - this._transforming = false; - this._errored = false; - this._storedError = undefined; - this._writableController = undefined; - this._readableController = undefined; - this._transformStreamController = undefined; - this._writableDone = false; - this._readableClosed = false; - this._backpressure = undefined; - this._backpressureChangePromise = undefined; - this._backpressureChangePromise_resolve = undefined; - this._transformStreamController = new TransformStreamDefaultController(this); - var startPromise_resolve = void 0; - var startPromise = new Promise(function (resolve) { - startPromise_resolve = resolve; - }); - var source = new TransformStreamSource(this, startPromise); - this._readable = new ReadableStream(source, readableStrategy); - var sink = new TransformStreamSink(this, startPromise); - this._writable = new WritableStream(sink, writableStrategy); - assert(this._writableController !== undefined); - assert(this._readableController !== undefined); - var desiredSize = ReadableStreamDefaultControllerGetDesiredSize(this._readableController); - TransformStreamSetBackpressure(this, desiredSize <= 0); - var transformStream = this; - var startResult = InvokeOrNoop(transformer, 'start', [transformStream._transformStreamController]); - startPromise_resolve(startResult); - startPromise.catch(function (e) { - if (transformStream._errored === false) { - transformStream._errored = true; - transformStream._storedError = e; - } - }); - } - _createClass(TransformStream, [{ - key: 'readable', - get: function get() { - if (IsTransformStream(this) === false) { - throw streamBrandCheckException('readable'); - } - return this._readable; - } - }, { - key: 'writable', - get: function get() { - if (IsTransformStream(this) === false) { - throw streamBrandCheckException('writable'); - } - return this._writable; - } - }]); - return TransformStream; - }(); - module.exports = { TransformStream: TransformStream }; - function defaultControllerBrandCheckException(name) { - return new TypeError('TransformStreamDefaultController.prototype.' + name + ' can only be used on a TransformStreamDefaultController'); - } - function streamBrandCheckException(name) { - return new TypeError('TransformStream.prototype.' + name + ' can only be used on a TransformStream'); - } -}, function (module, exports, __w_pdfjs_require__) { - module.exports = __w_pdfjs_require__(5); -}])); - -/***/ }), -/* 128 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -{ - var isURLSupported = false; - try { - if (typeof URL === 'function' && _typeof(URL.prototype) === 'object' && 'origin' in URL.prototype) { - var u = new URL('b', 'http://a'); - u.pathname = 'c%20d'; - isURLSupported = u.href === 'http://a/c%20d'; - } - } catch (ex) {} - if (isURLSupported) { - exports.URL = URL; - } else { - var PolyfillURL = __w_pdfjs_require__(129).URL; - var OriginalURL = __w_pdfjs_require__(4).URL; - if (OriginalURL) { - PolyfillURL.createObjectURL = function (blob) { - return OriginalURL.createObjectURL.apply(OriginalURL, arguments); - }; - PolyfillURL.revokeObjectURL = function (url) { - OriginalURL.revokeObjectURL(url); - }; - } - exports.URL = PolyfillURL; - } -} - -/***/ }), -/* 129 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -(function URLConstructorClosure() { - 'use strict'; - - var relative = Object.create(null); - relative['ftp'] = 21; - relative['file'] = 0; - relative['gopher'] = 70; - relative['http'] = 80; - relative['https'] = 443; - relative['ws'] = 80; - relative['wss'] = 443; - var relativePathDotMapping = Object.create(null); - relativePathDotMapping['%2e'] = '.'; - relativePathDotMapping['.%2e'] = '..'; - relativePathDotMapping['%2e.'] = '..'; - relativePathDotMapping['%2e%2e'] = '..'; - function isRelativeScheme(scheme) { - return relative[scheme] !== undefined; - } - function invalid() { - clear.call(this); - this._isInvalid = true; - } - function IDNAToASCII(h) { - if (h === '') { - invalid.call(this); - } - return h.toLowerCase(); - } - function percentEscape(c) { - var unicode = c.charCodeAt(0); - if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x3F, 0x60].indexOf(unicode) === -1) { - return c; - } - return encodeURIComponent(c); - } - function percentEscapeQuery(c) { - var unicode = c.charCodeAt(0); - if (unicode > 0x20 && unicode < 0x7F && [0x22, 0x23, 0x3C, 0x3E, 0x60].indexOf(unicode) === -1) { - return c; - } - return encodeURIComponent(c); - } - var EOF, - ALPHA = /[a-zA-Z]/, - ALPHANUMERIC = /[a-zA-Z0-9\+\-\.]/; - function parse(input, stateOverride, base) { - function err(message) { - errors.push(message); - } - var state = stateOverride || 'scheme start', - cursor = 0, - buffer = '', - seenAt = false, - seenBracket = false, - errors = []; - loop: while ((input[cursor - 1] !== EOF || cursor === 0) && !this._isInvalid) { - var c = input[cursor]; - switch (state) { - case 'scheme start': - if (c && ALPHA.test(c)) { - buffer += c.toLowerCase(); - state = 'scheme'; - } else if (!stateOverride) { - buffer = ''; - state = 'no scheme'; - continue; - } else { - err('Invalid scheme.'); - break loop; - } - break; - case 'scheme': - if (c && ALPHANUMERIC.test(c)) { - buffer += c.toLowerCase(); - } else if (c === ':') { - this._scheme = buffer; - buffer = ''; - if (stateOverride) { - break loop; - } - if (isRelativeScheme(this._scheme)) { - this._isRelative = true; - } - if (this._scheme === 'file') { - state = 'relative'; - } else if (this._isRelative && base && base._scheme === this._scheme) { - state = 'relative or authority'; - } else if (this._isRelative) { - state = 'authority first slash'; - } else { - state = 'scheme data'; - } - } else if (!stateOverride) { - buffer = ''; - cursor = 0; - state = 'no scheme'; - continue; - } else if (c === EOF) { - break loop; - } else { - err('Code point not allowed in scheme: ' + c); - break loop; - } - break; - case 'scheme data': - if (c === '?') { - this._query = '?'; - state = 'query'; - } else if (c === '#') { - this._fragment = '#'; - state = 'fragment'; - } else { - if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') { - this._schemeData += percentEscape(c); - } - } - break; - case 'no scheme': - if (!base || !isRelativeScheme(base._scheme)) { - err('Missing scheme.'); - invalid.call(this); - } else { - state = 'relative'; - continue; - } - break; - case 'relative or authority': - if (c === '/' && input[cursor + 1] === '/') { - state = 'authority ignore slashes'; - } else { - err('Expected /, got: ' + c); - state = 'relative'; - continue; - } - break; - case 'relative': - this._isRelative = true; - if (this._scheme !== 'file') { - this._scheme = base._scheme; - } - if (c === EOF) { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = base._query; - this._username = base._username; - this._password = base._password; - break loop; - } else if (c === '/' || c === '\\') { - if (c === '\\') { - err('\\ is an invalid code point.'); - } - state = 'relative slash'; - } else if (c === '?') { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = '?'; - this._username = base._username; - this._password = base._password; - state = 'query'; - } else if (c === '#') { - this._host = base._host; - this._port = base._port; - this._path = base._path.slice(); - this._query = base._query; - this._fragment = '#'; - this._username = base._username; - this._password = base._password; - state = 'fragment'; - } else { - var nextC = input[cursor + 1]; - var nextNextC = input[cursor + 2]; - if (this._scheme !== 'file' || !ALPHA.test(c) || nextC !== ':' && nextC !== '|' || nextNextC !== EOF && nextNextC !== '/' && nextNextC !== '\\' && nextNextC !== '?' && nextNextC !== '#') { - this._host = base._host; - this._port = base._port; - this._username = base._username; - this._password = base._password; - this._path = base._path.slice(); - this._path.pop(); - } - state = 'relative path'; - continue; - } - break; - case 'relative slash': - if (c === '/' || c === '\\') { - if (c === '\\') { - err('\\ is an invalid code point.'); - } - if (this._scheme === 'file') { - state = 'file host'; - } else { - state = 'authority ignore slashes'; - } - } else { - if (this._scheme !== 'file') { - this._host = base._host; - this._port = base._port; - this._username = base._username; - this._password = base._password; - } - state = 'relative path'; - continue; - } - break; - case 'authority first slash': - if (c === '/') { - state = 'authority second slash'; - } else { - err('Expected \'/\', got: ' + c); - state = 'authority ignore slashes'; - continue; - } - break; - case 'authority second slash': - state = 'authority ignore slashes'; - if (c !== '/') { - err('Expected \'/\', got: ' + c); - continue; - } - break; - case 'authority ignore slashes': - if (c !== '/' && c !== '\\') { - state = 'authority'; - continue; - } else { - err('Expected authority, got: ' + c); - } - break; - case 'authority': - if (c === '@') { - if (seenAt) { - err('@ already seen.'); - buffer += '%40'; - } - seenAt = true; - for (var i = 0; i < buffer.length; i++) { - var cp = buffer[i]; - if (cp === '\t' || cp === '\n' || cp === '\r') { - err('Invalid whitespace in authority.'); - continue; - } - if (cp === ':' && this._password === null) { - this._password = ''; - continue; - } - var tempC = percentEscape(cp); - if (this._password !== null) { - this._password += tempC; - } else { - this._username += tempC; - } - } - buffer = ''; - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - cursor -= buffer.length; - buffer = ''; - state = 'host'; - continue; - } else { - buffer += c; - } - break; - case 'file host': - if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - if (buffer.length === 2 && ALPHA.test(buffer[0]) && (buffer[1] === ':' || buffer[1] === '|')) { - state = 'relative path'; - } else if (buffer.length === 0) { - state = 'relative path start'; - } else { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'relative path start'; - } - continue; - } else if (c === '\t' || c === '\n' || c === '\r') { - err('Invalid whitespace in file host.'); - } else { - buffer += c; - } - break; - case 'host': - case 'hostname': - if (c === ':' && !seenBracket) { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'port'; - if (stateOverride === 'hostname') { - break loop; - } - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#') { - this._host = IDNAToASCII.call(this, buffer); - buffer = ''; - state = 'relative path start'; - if (stateOverride) { - break loop; - } - continue; - } else if (c !== '\t' && c !== '\n' && c !== '\r') { - if (c === '[') { - seenBracket = true; - } else if (c === ']') { - seenBracket = false; - } - buffer += c; - } else { - err('Invalid code point in host/hostname: ' + c); - } - break; - case 'port': - if (/[0-9]/.test(c)) { - buffer += c; - } else if (c === EOF || c === '/' || c === '\\' || c === '?' || c === '#' || stateOverride) { - if (buffer !== '') { - var temp = parseInt(buffer, 10); - if (temp !== relative[this._scheme]) { - this._port = temp + ''; - } - buffer = ''; - } - if (stateOverride) { - break loop; - } - state = 'relative path start'; - continue; - } else if (c === '\t' || c === '\n' || c === '\r') { - err('Invalid code point in port: ' + c); - } else { - invalid.call(this); - } - break; - case 'relative path start': - if (c === '\\') { - err('\'\\\' not allowed in path.'); - } - state = 'relative path'; - if (c !== '/' && c !== '\\') { - continue; - } - break; - case 'relative path': - if (c === EOF || c === '/' || c === '\\' || !stateOverride && (c === '?' || c === '#')) { - if (c === '\\') { - err('\\ not allowed in relative path.'); - } - var tmp; - if (tmp = relativePathDotMapping[buffer.toLowerCase()]) { - buffer = tmp; - } - if (buffer === '..') { - this._path.pop(); - if (c !== '/' && c !== '\\') { - this._path.push(''); - } - } else if (buffer === '.' && c !== '/' && c !== '\\') { - this._path.push(''); - } else if (buffer !== '.') { - if (this._scheme === 'file' && this._path.length === 0 && buffer.length === 2 && ALPHA.test(buffer[0]) && buffer[1] === '|') { - buffer = buffer[0] + ':'; - } - this._path.push(buffer); - } - buffer = ''; - if (c === '?') { - this._query = '?'; - state = 'query'; - } else if (c === '#') { - this._fragment = '#'; - state = 'fragment'; - } - } else if (c !== '\t' && c !== '\n' && c !== '\r') { - buffer += percentEscape(c); - } - break; - case 'query': - if (!stateOverride && c === '#') { - this._fragment = '#'; - state = 'fragment'; - } else if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') { - this._query += percentEscapeQuery(c); - } - break; - case 'fragment': - if (c !== EOF && c !== '\t' && c !== '\n' && c !== '\r') { - this._fragment += c; - } - break; - } - cursor++; - } - } - function clear() { - this._scheme = ''; - this._schemeData = ''; - this._username = ''; - this._password = null; - this._host = ''; - this._port = ''; - this._path = []; - this._query = ''; - this._fragment = ''; - this._isInvalid = false; - this._isRelative = false; - } - function JURL(url, base) { - if (base !== undefined && !(base instanceof JURL)) { - base = new JURL(String(base)); - } - this._url = url; - clear.call(this); - var input = url.replace(/^[ \t\r\n\f]+|[ \t\r\n\f]+$/g, ''); - parse.call(this, input, null, base); - } - JURL.prototype = { - toString: function toString() { - return this.href; - }, - - get href() { - if (this._isInvalid) { - return this._url; - } - var authority = ''; - if (this._username !== '' || this._password !== null) { - authority = this._username + (this._password !== null ? ':' + this._password : '') + '@'; - } - return this.protocol + (this._isRelative ? '//' + authority + this.host : '') + this.pathname + this._query + this._fragment; - }, - set href(value) { - clear.call(this); - parse.call(this, value); - }, - get protocol() { - return this._scheme + ':'; - }, - set protocol(value) { - if (this._isInvalid) { - return; - } - parse.call(this, value + ':', 'scheme start'); - }, - get host() { - return this._isInvalid ? '' : this._port ? this._host + ':' + this._port : this._host; - }, - set host(value) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, value, 'host'); - }, - get hostname() { - return this._host; - }, - set hostname(value) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, value, 'hostname'); - }, - get port() { - return this._port; - }, - set port(value) { - if (this._isInvalid || !this._isRelative) { - return; - } - parse.call(this, value, 'port'); - }, - get pathname() { - return this._isInvalid ? '' : this._isRelative ? '/' + this._path.join('/') : this._schemeData; - }, - set pathname(value) { - if (this._isInvalid || !this._isRelative) { - return; - } - this._path = []; - parse.call(this, value, 'relative path start'); - }, - get search() { - return this._isInvalid || !this._query || this._query === '?' ? '' : this._query; - }, - set search(value) { - if (this._isInvalid || !this._isRelative) { - return; - } - this._query = '?'; - if (value[0] === '?') { - value = value.slice(1); - } - parse.call(this, value, 'query'); - }, - get hash() { - return this._isInvalid || !this._fragment || this._fragment === '#' ? '' : this._fragment; - }, - set hash(value) { - if (this._isInvalid) { - return; - } - this._fragment = '#'; - if (value[0] === '#') { - value = value.slice(1); - } - parse.call(this, value, 'fragment'); - }, - get origin() { - var host; - if (this._isInvalid || !this._scheme) { - return ''; - } - switch (this._scheme) { - case 'data': - case 'file': - case 'javascript': - case 'mailto': - return 'null'; - case 'blob': - try { - return new JURL(this._schemeData).origin || 'null'; - } catch (_) {} - return 'null'; - } - host = this.host; - if (!host) { - return ''; - } - return this._scheme + '://' + host; - } - }; - exports.URL = JURL; -})(); - -/***/ }), -/* 130 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.NetworkPdfManager = exports.LocalPdfManager = undefined; - -var _regenerator = __w_pdfjs_require__(131); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _util = __w_pdfjs_require__(2); - -var _chunked_stream = __w_pdfjs_require__(135); - -var _document = __w_pdfjs_require__(136); - -var _stream = __w_pdfjs_require__(140); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var BasePdfManager = function () { - function BasePdfManager() { - _classCallCheck(this, BasePdfManager); - - if (this.constructor === BasePdfManager) { - (0, _util.unreachable)('Cannot initialize BasePdfManager.'); - } - } - - _createClass(BasePdfManager, [{ - key: 'onLoadedStream', - value: function onLoadedStream() { - (0, _util.unreachable)('Abstract method `onLoadedStream` called'); - } - }, { - key: 'ensureDoc', - value: function ensureDoc(prop, args) { - return this.ensure(this.pdfDocument, prop, args); - } - }, { - key: 'ensureXRef', - value: function ensureXRef(prop, args) { - return this.ensure(this.pdfDocument.xref, prop, args); - } - }, { - key: 'ensureCatalog', - value: function ensureCatalog(prop, args) { - return this.ensure(this.pdfDocument.catalog, prop, args); - } - }, { - key: 'getPage', - value: function getPage(pageIndex) { - return this.pdfDocument.getPage(pageIndex); - } - }, { - key: 'cleanup', - value: function cleanup() { - return this.pdfDocument.cleanup(); - } - }, { - key: 'ensure', - value: function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee(obj, prop, args) { - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - (0, _util.unreachable)('Abstract method `ensure` called'); - - case 1: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); - - function ensure(_x, _x2, _x3) { - return _ref.apply(this, arguments); - } - - return ensure; - }() - }, { - key: 'requestRange', - value: function requestRange(begin, end) { - (0, _util.unreachable)('Abstract method `requestRange` called'); - } - }, { - key: 'requestLoadedStream', - value: function requestLoadedStream() { - (0, _util.unreachable)('Abstract method `requestLoadedStream` called'); - } - }, { - key: 'sendProgressiveData', - value: function sendProgressiveData(chunk) { - (0, _util.unreachable)('Abstract method `sendProgressiveData` called'); - } - }, { - key: 'updatePassword', - value: function updatePassword(password) { - this._password = password; - } - }, { - key: 'terminate', - value: function terminate() { - (0, _util.unreachable)('Abstract method `terminate` called'); - } - }, { - key: 'docId', - get: function get() { - return this._docId; - } - }, { - key: 'password', - get: function get() { - return this._password; - } - }, { - key: 'docBaseUrl', - get: function get() { - var docBaseUrl = null; - if (this._docBaseUrl) { - var absoluteUrl = (0, _util.createValidAbsoluteUrl)(this._docBaseUrl); - if (absoluteUrl) { - docBaseUrl = absoluteUrl.href; - } else { - (0, _util.warn)('Invalid absolute docBaseUrl: "' + this._docBaseUrl + '".'); - } - } - return (0, _util.shadow)(this, 'docBaseUrl', docBaseUrl); - } - }]); - - return BasePdfManager; -}(); - -var LocalPdfManager = function (_BasePdfManager) { - _inherits(LocalPdfManager, _BasePdfManager); - - function LocalPdfManager(docId, data, password, evaluatorOptions, docBaseUrl) { - _classCallCheck(this, LocalPdfManager); - - var _this = _possibleConstructorReturn(this, (LocalPdfManager.__proto__ || Object.getPrototypeOf(LocalPdfManager)).call(this)); - - _this._docId = docId; - _this._password = password; - _this._docBaseUrl = docBaseUrl; - _this.evaluatorOptions = evaluatorOptions; - var stream = new _stream.Stream(data); - _this.pdfDocument = new _document.PDFDocument(_this, stream); - _this._loadedStreamPromise = Promise.resolve(stream); - return _this; - } - - _createClass(LocalPdfManager, [{ - key: 'ensure', - value: function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee2(obj, prop, args) { - var value; - return _regenerator2.default.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - value = obj[prop]; - - if (!(typeof value === 'function')) { - _context2.next = 3; - break; - } - - return _context2.abrupt('return', value.apply(obj, args)); - - case 3: - return _context2.abrupt('return', value); - - case 4: - case 'end': - return _context2.stop(); - } - } - }, _callee2, this); - })); - - function ensure(_x4, _x5, _x6) { - return _ref2.apply(this, arguments); - } - - return ensure; - }() - }, { - key: 'requestRange', - value: function requestRange(begin, end) { - return Promise.resolve(); - } - }, { - key: 'requestLoadedStream', - value: function requestLoadedStream() {} - }, { - key: 'onLoadedStream', - value: function onLoadedStream() { - return this._loadedStreamPromise; - } - }, { - key: 'terminate', - value: function terminate() {} - }]); - - return LocalPdfManager; -}(BasePdfManager); - -var NetworkPdfManager = function (_BasePdfManager2) { - _inherits(NetworkPdfManager, _BasePdfManager2); - - function NetworkPdfManager(docId, pdfNetworkStream, args, evaluatorOptions, docBaseUrl) { - _classCallCheck(this, NetworkPdfManager); - - var _this2 = _possibleConstructorReturn(this, (NetworkPdfManager.__proto__ || Object.getPrototypeOf(NetworkPdfManager)).call(this)); - - _this2._docId = docId; - _this2._password = args.password; - _this2._docBaseUrl = docBaseUrl; - _this2.msgHandler = args.msgHandler; - _this2.evaluatorOptions = evaluatorOptions; - _this2.streamManager = new _chunked_stream.ChunkedStreamManager(pdfNetworkStream, { - msgHandler: args.msgHandler, - url: args.url, - length: args.length, - disableAutoFetch: args.disableAutoFetch, - rangeChunkSize: args.rangeChunkSize - }); - _this2.pdfDocument = new _document.PDFDocument(_this2, _this2.streamManager.getStream()); - return _this2; - } - - _createClass(NetworkPdfManager, [{ - key: 'ensure', - value: function () { - var _ref3 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee3(obj, prop, args) { - var value; - return _regenerator2.default.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _context3.prev = 0; - value = obj[prop]; - - if (!(typeof value === 'function')) { - _context3.next = 4; - break; - } - - return _context3.abrupt('return', value.apply(obj, args)); - - case 4: - return _context3.abrupt('return', value); - - case 7: - _context3.prev = 7; - _context3.t0 = _context3['catch'](0); - - if (_context3.t0 instanceof _util.MissingDataException) { - _context3.next = 11; - break; - } - - throw _context3.t0; - - case 11: - _context3.next = 13; - return this.requestRange(_context3.t0.begin, _context3.t0.end); - - case 13: - return _context3.abrupt('return', this.ensure(obj, prop, args)); - - case 14: - case 'end': - return _context3.stop(); - } - } - }, _callee3, this, [[0, 7]]); - })); - - function ensure(_x7, _x8, _x9) { - return _ref3.apply(this, arguments); - } - - return ensure; - }() - }, { - key: 'requestRange', - value: function requestRange(begin, end) { - return this.streamManager.requestRange(begin, end); - } - }, { - key: 'requestLoadedStream', - value: function requestLoadedStream() { - this.streamManager.requestAllChunks(); - } - }, { - key: 'sendProgressiveData', - value: function sendProgressiveData(chunk) { - this.streamManager.onReceiveData({ chunk: chunk }); - } - }, { - key: 'onLoadedStream', - value: function onLoadedStream() { - return this.streamManager.onLoadedStream(); - } - }, { - key: 'terminate', - value: function terminate() { - this.streamManager.abort(); - } - }]); - - return NetworkPdfManager; -}(BasePdfManager); - -exports.LocalPdfManager = LocalPdfManager; -exports.NetworkPdfManager = NetworkPdfManager; - -/***/ }), -/* 131 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = __w_pdfjs_require__(132); - -/***/ }), -/* 132 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -var g = function () { - return this; -}() || Function("return this")(); -var hadRuntime = g.regeneratorRuntime && Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; -var oldRuntime = hadRuntime && g.regeneratorRuntime; -g.regeneratorRuntime = undefined; -module.exports = __w_pdfjs_require__(133); -if (hadRuntime) { - g.regeneratorRuntime = oldRuntime; -} else { - try { - delete g.regeneratorRuntime; - } catch (e) { - g.regeneratorRuntime = undefined; - } -} - -/***/ }), -/* 133 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; -/* WEBPACK VAR INJECTION */(function(module) { - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -!function (global) { - "use strict"; - - var Op = Object.prototype; - var hasOwn = Op.hasOwnProperty; - var undefined; - var $Symbol = typeof Symbol === "function" ? Symbol : {}; - var iteratorSymbol = $Symbol.iterator || "@@iterator"; - var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; - var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; - var inModule = ( false ? undefined : _typeof(module)) === "object"; - var runtime = global.regeneratorRuntime; - if (runtime) { - if (inModule) { - module.exports = runtime; - } - return; - } - runtime = global.regeneratorRuntime = inModule ? module.exports : {}; - function wrap(innerFn, outerFn, self, tryLocsList) { - var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; - var generator = Object.create(protoGenerator.prototype); - var context = new Context(tryLocsList || []); - generator._invoke = makeInvokeMethod(innerFn, self, context); - return generator; - } - runtime.wrap = wrap; - function tryCatch(fn, obj, arg) { - try { - return { - type: "normal", - arg: fn.call(obj, arg) - }; - } catch (err) { - return { - type: "throw", - arg: err - }; - } - } - var GenStateSuspendedStart = "suspendedStart"; - var GenStateSuspendedYield = "suspendedYield"; - var GenStateExecuting = "executing"; - var GenStateCompleted = "completed"; - var ContinueSentinel = {}; - function Generator() {} - function GeneratorFunction() {} - function GeneratorFunctionPrototype() {} - var IteratorPrototype = {}; - IteratorPrototype[iteratorSymbol] = function () { - return this; - }; - var getProto = Object.getPrototypeOf; - var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); - if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { - IteratorPrototype = NativeIteratorPrototype; - } - var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); - GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; - GeneratorFunctionPrototype.constructor = GeneratorFunction; - GeneratorFunctionPrototype[toStringTagSymbol] = GeneratorFunction.displayName = "GeneratorFunction"; - function defineIteratorMethods(prototype) { - ["next", "throw", "return"].forEach(function (method) { - prototype[method] = function (arg) { - return this._invoke(method, arg); - }; - }); - } - runtime.isGeneratorFunction = function (genFun) { - var ctor = typeof genFun === "function" && genFun.constructor; - return ctor ? ctor === GeneratorFunction || (ctor.displayName || ctor.name) === "GeneratorFunction" : false; - }; - runtime.mark = function (genFun) { - if (Object.setPrototypeOf) { - Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); - } else { - genFun.__proto__ = GeneratorFunctionPrototype; - if (!(toStringTagSymbol in genFun)) { - genFun[toStringTagSymbol] = "GeneratorFunction"; - } - } - genFun.prototype = Object.create(Gp); - return genFun; - }; - runtime.awrap = function (arg) { - return { __await: arg }; - }; - function AsyncIterator(generator) { - function invoke(method, arg, resolve, reject) { - var record = tryCatch(generator[method], generator, arg); - if (record.type === "throw") { - reject(record.arg); - } else { - var result = record.arg; - var value = result.value; - if (value && (typeof value === "undefined" ? "undefined" : _typeof(value)) === "object" && hasOwn.call(value, "__await")) { - return Promise.resolve(value.__await).then(function (value) { - invoke("next", value, resolve, reject); - }, function (err) { - invoke("throw", err, resolve, reject); - }); - } - return Promise.resolve(value).then(function (unwrapped) { - result.value = unwrapped; - resolve(result); - }, reject); - } - } - var previousPromise; - function enqueue(method, arg) { - function callInvokeWithMethodAndArg() { - return new Promise(function (resolve, reject) { - invoke(method, arg, resolve, reject); - }); - } - return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); - } - this._invoke = enqueue; - } - defineIteratorMethods(AsyncIterator.prototype); - AsyncIterator.prototype[asyncIteratorSymbol] = function () { - return this; - }; - runtime.AsyncIterator = AsyncIterator; - runtime.async = function (innerFn, outerFn, self, tryLocsList) { - var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList)); - return runtime.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { - return result.done ? result.value : iter.next(); - }); - }; - function makeInvokeMethod(innerFn, self, context) { - var state = GenStateSuspendedStart; - return function invoke(method, arg) { - if (state === GenStateExecuting) { - throw new Error("Generator is already running"); - } - if (state === GenStateCompleted) { - if (method === "throw") { - throw arg; - } - return doneResult(); - } - context.method = method; - context.arg = arg; - while (true) { - var delegate = context.delegate; - if (delegate) { - var delegateResult = maybeInvokeDelegate(delegate, context); - if (delegateResult) { - if (delegateResult === ContinueSentinel) continue; - return delegateResult; - } - } - if (context.method === "next") { - context.sent = context._sent = context.arg; - } else if (context.method === "throw") { - if (state === GenStateSuspendedStart) { - state = GenStateCompleted; - throw context.arg; - } - context.dispatchException(context.arg); - } else if (context.method === "return") { - context.abrupt("return", context.arg); - } - state = GenStateExecuting; - var record = tryCatch(innerFn, self, context); - if (record.type === "normal") { - state = context.done ? GenStateCompleted : GenStateSuspendedYield; - if (record.arg === ContinueSentinel) { - continue; - } - return { - value: record.arg, - done: context.done - }; - } else if (record.type === "throw") { - state = GenStateCompleted; - context.method = "throw"; - context.arg = record.arg; - } - } - }; - } - function maybeInvokeDelegate(delegate, context) { - var method = delegate.iterator[context.method]; - if (method === undefined) { - context.delegate = null; - if (context.method === "throw") { - if (delegate.iterator.return) { - context.method = "return"; - context.arg = undefined; - maybeInvokeDelegate(delegate, context); - if (context.method === "throw") { - return ContinueSentinel; - } - } - context.method = "throw"; - context.arg = new TypeError("The iterator does not provide a 'throw' method"); - } - return ContinueSentinel; - } - var record = tryCatch(method, delegate.iterator, context.arg); - if (record.type === "throw") { - context.method = "throw"; - context.arg = record.arg; - context.delegate = null; - return ContinueSentinel; - } - var info = record.arg; - if (!info) { - context.method = "throw"; - context.arg = new TypeError("iterator result is not an object"); - context.delegate = null; - return ContinueSentinel; - } - if (info.done) { - context[delegate.resultName] = info.value; - context.next = delegate.nextLoc; - if (context.method !== "return") { - context.method = "next"; - context.arg = undefined; - } - } else { - return info; - } - context.delegate = null; - return ContinueSentinel; - } - defineIteratorMethods(Gp); - Gp[toStringTagSymbol] = "Generator"; - Gp[iteratorSymbol] = function () { - return this; - }; - Gp.toString = function () { - return "[object Generator]"; - }; - function pushTryEntry(locs) { - var entry = { tryLoc: locs[0] }; - if (1 in locs) { - entry.catchLoc = locs[1]; - } - if (2 in locs) { - entry.finallyLoc = locs[2]; - entry.afterLoc = locs[3]; - } - this.tryEntries.push(entry); - } - function resetTryEntry(entry) { - var record = entry.completion || {}; - record.type = "normal"; - delete record.arg; - entry.completion = record; - } - function Context(tryLocsList) { - this.tryEntries = [{ tryLoc: "root" }]; - tryLocsList.forEach(pushTryEntry, this); - this.reset(true); - } - runtime.keys = function (object) { - var keys = []; - for (var key in object) { - keys.push(key); - } - keys.reverse(); - return function next() { - while (keys.length) { - var key = keys.pop(); - if (key in object) { - next.value = key; - next.done = false; - return next; - } - } - next.done = true; - return next; - }; - }; - function values(iterable) { - if (iterable) { - var iteratorMethod = iterable[iteratorSymbol]; - if (iteratorMethod) { - return iteratorMethod.call(iterable); - } - if (typeof iterable.next === "function") { - return iterable; - } - if (!isNaN(iterable.length)) { - var i = -1, - next = function next() { - while (++i < iterable.length) { - if (hasOwn.call(iterable, i)) { - next.value = iterable[i]; - next.done = false; - return next; - } - } - next.value = undefined; - next.done = true; - return next; - }; - return next.next = next; - } - } - return { next: doneResult }; - } - runtime.values = values; - function doneResult() { - return { - value: undefined, - done: true - }; - } - Context.prototype = { - constructor: Context, - reset: function reset(skipTempReset) { - this.prev = 0; - this.next = 0; - this.sent = this._sent = undefined; - this.done = false; - this.delegate = null; - this.method = "next"; - this.arg = undefined; - this.tryEntries.forEach(resetTryEntry); - if (!skipTempReset) { - for (var name in this) { - if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { - this[name] = undefined; - } - } - } - }, - stop: function stop() { - this.done = true; - var rootEntry = this.tryEntries[0]; - var rootRecord = rootEntry.completion; - if (rootRecord.type === "throw") { - throw rootRecord.arg; - } - return this.rval; - }, - dispatchException: function dispatchException(exception) { - if (this.done) { - throw exception; - } - var context = this; - function handle(loc, caught) { - record.type = "throw"; - record.arg = exception; - context.next = loc; - if (caught) { - context.method = "next"; - context.arg = undefined; - } - return !!caught; - } - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - var record = entry.completion; - if (entry.tryLoc === "root") { - return handle("end"); - } - if (entry.tryLoc <= this.prev) { - var hasCatch = hasOwn.call(entry, "catchLoc"); - var hasFinally = hasOwn.call(entry, "finallyLoc"); - if (hasCatch && hasFinally) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } else if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else if (hasCatch) { - if (this.prev < entry.catchLoc) { - return handle(entry.catchLoc, true); - } - } else if (hasFinally) { - if (this.prev < entry.finallyLoc) { - return handle(entry.finallyLoc); - } - } else { - throw new Error("try statement without catch or finally"); - } - } - } - }, - abrupt: function abrupt(type, arg) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { - var finallyEntry = entry; - break; - } - } - if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { - finallyEntry = null; - } - var record = finallyEntry ? finallyEntry.completion : {}; - record.type = type; - record.arg = arg; - if (finallyEntry) { - this.method = "next"; - this.next = finallyEntry.finallyLoc; - return ContinueSentinel; - } - return this.complete(record); - }, - complete: function complete(record, afterLoc) { - if (record.type === "throw") { - throw record.arg; - } - if (record.type === "break" || record.type === "continue") { - this.next = record.arg; - } else if (record.type === "return") { - this.rval = this.arg = record.arg; - this.method = "return"; - this.next = "end"; - } else if (record.type === "normal" && afterLoc) { - this.next = afterLoc; - } - return ContinueSentinel; - }, - finish: function finish(finallyLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.finallyLoc === finallyLoc) { - this.complete(entry.completion, entry.afterLoc); - resetTryEntry(entry); - return ContinueSentinel; - } - } - }, - "catch": function _catch(tryLoc) { - for (var i = this.tryEntries.length - 1; i >= 0; --i) { - var entry = this.tryEntries[i]; - if (entry.tryLoc === tryLoc) { - var record = entry.completion; - if (record.type === "throw") { - var thrown = record.arg; - resetTryEntry(entry); - } - return thrown; - } - } - throw new Error("illegal catch attempt"); - }, - delegateYield: function delegateYield(iterable, resultName, nextLoc) { - this.delegate = { - iterator: values(iterable), - resultName: resultName, - nextLoc: nextLoc - }; - if (this.method === "next") { - this.arg = undefined; - } - return ContinueSentinel; - } - }; -}(function () { - return this; -}() || Function("return this")()); -/* WEBPACK VAR INJECTION */}.call(this, __w_pdfjs_require__(134)(module))) - -/***/ }), -/* 134 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -module.exports = function (module) { - if (!module.webpackPolyfill) { - module.deprecate = function () {}; - module.paths = []; - if (!module.children) module.children = []; - Object.defineProperty(module, "loaded", { - enumerable: true, - get: function get() { - return module.l; - } - }); - Object.defineProperty(module, "id", { - enumerable: true, - get: function get() { - return module.i; - } - }); - module.webpackPolyfill = 1; - } - return module; -}; - -/***/ }), -/* 135 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ChunkedStreamManager = exports.ChunkedStream = undefined; - -var _util = __w_pdfjs_require__(2); - -var ChunkedStream = function ChunkedStreamClosure() { - function ChunkedStream(length, chunkSize, manager) { - this.bytes = new Uint8Array(length); - this.start = 0; - this.pos = 0; - this.end = length; - this.chunkSize = chunkSize; - this.loadedChunks = []; - this.numChunksLoaded = 0; - this.numChunks = Math.ceil(length / chunkSize); - this.manager = manager; - this.progressiveDataLength = 0; - this.lastSuccessfulEnsureByteChunk = -1; - } - ChunkedStream.prototype = { - getMissingChunks: function ChunkedStream_getMissingChunks() { - var chunks = []; - for (var chunk = 0, n = this.numChunks; chunk < n; ++chunk) { - if (!this.loadedChunks[chunk]) { - chunks.push(chunk); - } - } - return chunks; - }, - getBaseStreams: function ChunkedStream_getBaseStreams() { - return [this]; - }, - allChunksLoaded: function ChunkedStream_allChunksLoaded() { - return this.numChunksLoaded === this.numChunks; - }, - onReceiveData: function ChunkedStream_onReceiveData(begin, chunk) { - var end = begin + chunk.byteLength; - if (begin % this.chunkSize !== 0) { - throw new Error('Bad begin offset: ' + begin); - } - var length = this.bytes.length; - if (end % this.chunkSize !== 0 && end !== length) { - throw new Error('Bad end offset: ' + end); - } - this.bytes.set(new Uint8Array(chunk), begin); - var chunkSize = this.chunkSize; - var beginChunk = Math.floor(begin / chunkSize); - var endChunk = Math.floor((end - 1) / chunkSize) + 1; - var curChunk; - for (curChunk = beginChunk; curChunk < endChunk; ++curChunk) { - if (!this.loadedChunks[curChunk]) { - this.loadedChunks[curChunk] = true; - ++this.numChunksLoaded; - } - } - }, - onReceiveProgressiveData: function ChunkedStream_onReceiveProgressiveData(data) { - var position = this.progressiveDataLength; - var beginChunk = Math.floor(position / this.chunkSize); - this.bytes.set(new Uint8Array(data), position); - position += data.byteLength; - this.progressiveDataLength = position; - var endChunk = position >= this.end ? this.numChunks : Math.floor(position / this.chunkSize); - var curChunk; - for (curChunk = beginChunk; curChunk < endChunk; ++curChunk) { - if (!this.loadedChunks[curChunk]) { - this.loadedChunks[curChunk] = true; - ++this.numChunksLoaded; - } - } - }, - ensureByte: function ChunkedStream_ensureByte(pos) { - var chunk = Math.floor(pos / this.chunkSize); - if (chunk === this.lastSuccessfulEnsureByteChunk) { - return; - } - if (!this.loadedChunks[chunk]) { - throw new _util.MissingDataException(pos, pos + 1); - } - this.lastSuccessfulEnsureByteChunk = chunk; - }, - ensureRange: function ChunkedStream_ensureRange(begin, end) { - if (begin >= end) { - return; - } - if (end <= this.progressiveDataLength) { - return; - } - var chunkSize = this.chunkSize; - var beginChunk = Math.floor(begin / chunkSize); - var endChunk = Math.floor((end - 1) / chunkSize) + 1; - for (var chunk = beginChunk; chunk < endChunk; ++chunk) { - if (!this.loadedChunks[chunk]) { - throw new _util.MissingDataException(begin, end); - } - } - }, - nextEmptyChunk: function ChunkedStream_nextEmptyChunk(beginChunk) { - var chunk, - numChunks = this.numChunks; - for (var i = 0; i < numChunks; ++i) { - chunk = (beginChunk + i) % numChunks; - if (!this.loadedChunks[chunk]) { - return chunk; - } - } - return null; - }, - hasChunk: function ChunkedStream_hasChunk(chunk) { - return !!this.loadedChunks[chunk]; - }, - get length() { - return this.end - this.start; - }, - get isEmpty() { - return this.length === 0; - }, - getByte: function ChunkedStream_getByte() { - var pos = this.pos; - if (pos >= this.end) { - return -1; - } - this.ensureByte(pos); - return this.bytes[this.pos++]; - }, - getUint16: function ChunkedStream_getUint16() { - var b0 = this.getByte(); - var b1 = this.getByte(); - if (b0 === -1 || b1 === -1) { - return -1; - } - return (b0 << 8) + b1; - }, - getInt32: function ChunkedStream_getInt32() { - var b0 = this.getByte(); - var b1 = this.getByte(); - var b2 = this.getByte(); - var b3 = this.getByte(); - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - }, - getBytes: function getBytes(length) { - var forceClamped = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var bytes = this.bytes; - var pos = this.pos; - var strEnd = this.end; - if (!length) { - this.ensureRange(pos, strEnd); - var _subarray = bytes.subarray(pos, strEnd); - return forceClamped ? new Uint8ClampedArray(_subarray) : _subarray; - } - var end = pos + length; - if (end > strEnd) { - end = strEnd; - } - this.ensureRange(pos, end); - this.pos = end; - var subarray = bytes.subarray(pos, end); - return forceClamped ? new Uint8ClampedArray(subarray) : subarray; - }, - - peekByte: function ChunkedStream_peekByte() { - var peekedByte = this.getByte(); - this.pos--; - return peekedByte; - }, - peekBytes: function peekBytes(length) { - var forceClamped = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var bytes = this.getBytes(length, forceClamped); - this.pos -= bytes.length; - return bytes; - }, - - getByteRange: function ChunkedStream_getBytes(begin, end) { - this.ensureRange(begin, end); - return this.bytes.subarray(begin, end); - }, - skip: function ChunkedStream_skip(n) { - if (!n) { - n = 1; - } - this.pos += n; - }, - reset: function ChunkedStream_reset() { - this.pos = this.start; - }, - moveStart: function ChunkedStream_moveStart() { - this.start = this.pos; - }, - makeSubStream: function ChunkedStream_makeSubStream(start, length, dict) { - this.ensureRange(start, start + length); - function ChunkedStreamSubstream() {} - ChunkedStreamSubstream.prototype = Object.create(this); - ChunkedStreamSubstream.prototype.getMissingChunks = function () { - var chunkSize = this.chunkSize; - var beginChunk = Math.floor(this.start / chunkSize); - var endChunk = Math.floor((this.end - 1) / chunkSize) + 1; - var missingChunks = []; - for (var chunk = beginChunk; chunk < endChunk; ++chunk) { - if (!this.loadedChunks[chunk]) { - missingChunks.push(chunk); - } - } - return missingChunks; - }; - var subStream = new ChunkedStreamSubstream(); - subStream.pos = subStream.start = start; - subStream.end = start + length || this.end; - subStream.dict = dict; - return subStream; - } - }; - return ChunkedStream; -}(); -var ChunkedStreamManager = function ChunkedStreamManagerClosure() { - function ChunkedStreamManager(pdfNetworkStream, args) { - var chunkSize = args.rangeChunkSize; - var length = args.length; - this.stream = new ChunkedStream(length, chunkSize, this); - this.length = length; - this.chunkSize = chunkSize; - this.pdfNetworkStream = pdfNetworkStream; - this.url = args.url; - this.disableAutoFetch = args.disableAutoFetch; - this.msgHandler = args.msgHandler; - this.currRequestId = 0; - this.chunksNeededByRequest = Object.create(null); - this.requestsByChunk = Object.create(null); - this.promisesByRequest = Object.create(null); - this.progressiveDataLength = 0; - this.aborted = false; - this._loadedStreamCapability = (0, _util.createPromiseCapability)(); - } - ChunkedStreamManager.prototype = { - onLoadedStream: function ChunkedStreamManager_getLoadedStream() { - return this._loadedStreamCapability.promise; - }, - sendRequest: function ChunkedStreamManager_sendRequest(begin, end) { - var _this = this; - - var rangeReader = this.pdfNetworkStream.getRangeReader(begin, end); - if (!rangeReader.isStreamingSupported) { - rangeReader.onProgress = this.onProgress.bind(this); - } - var chunks = [], - loaded = 0; - var manager = this; - var promise = new Promise(function (resolve, reject) { - var readChunk = function readChunk(chunk) { - try { - if (!chunk.done) { - var data = chunk.value; - chunks.push(data); - loaded += (0, _util.arrayByteLength)(data); - if (rangeReader.isStreamingSupported) { - manager.onProgress({ loaded: loaded }); - } - rangeReader.read().then(readChunk, reject); - return; - } - var chunkData = (0, _util.arraysToBytes)(chunks); - chunks = null; - resolve(chunkData); - } catch (e) { - reject(e); - } - }; - rangeReader.read().then(readChunk, reject); - }); - promise.then(function (data) { - if (_this.aborted) { - return; - } - _this.onReceiveData({ - chunk: data, - begin: begin - }); - }); - }, - requestAllChunks: function ChunkedStreamManager_requestAllChunks() { - var missingChunks = this.stream.getMissingChunks(); - this._requestChunks(missingChunks); - return this._loadedStreamCapability.promise; - }, - _requestChunks: function ChunkedStreamManager_requestChunks(chunks) { - var requestId = this.currRequestId++; - var i, ii; - var chunksNeeded = Object.create(null); - this.chunksNeededByRequest[requestId] = chunksNeeded; - for (i = 0, ii = chunks.length; i < ii; i++) { - if (!this.stream.hasChunk(chunks[i])) { - chunksNeeded[chunks[i]] = true; - } - } - if ((0, _util.isEmptyObj)(chunksNeeded)) { - return Promise.resolve(); - } - var capability = (0, _util.createPromiseCapability)(); - this.promisesByRequest[requestId] = capability; - var chunksToRequest = []; - for (var chunk in chunksNeeded) { - chunk = chunk | 0; - if (!(chunk in this.requestsByChunk)) { - this.requestsByChunk[chunk] = []; - chunksToRequest.push(chunk); - } - this.requestsByChunk[chunk].push(requestId); - } - if (!chunksToRequest.length) { - return capability.promise; - } - var groupedChunksToRequest = this.groupChunks(chunksToRequest); - for (i = 0; i < groupedChunksToRequest.length; ++i) { - var groupedChunk = groupedChunksToRequest[i]; - var begin = groupedChunk.beginChunk * this.chunkSize; - var end = Math.min(groupedChunk.endChunk * this.chunkSize, this.length); - this.sendRequest(begin, end); - } - return capability.promise; - }, - getStream: function ChunkedStreamManager_getStream() { - return this.stream; - }, - requestRange: function ChunkedStreamManager_requestRange(begin, end) { - end = Math.min(end, this.length); - var beginChunk = this.getBeginChunk(begin); - var endChunk = this.getEndChunk(end); - var chunks = []; - for (var chunk = beginChunk; chunk < endChunk; ++chunk) { - chunks.push(chunk); - } - return this._requestChunks(chunks); - }, - requestRanges: function ChunkedStreamManager_requestRanges(ranges) { - ranges = ranges || []; - var chunksToRequest = []; - for (var i = 0; i < ranges.length; i++) { - var beginChunk = this.getBeginChunk(ranges[i].begin); - var endChunk = this.getEndChunk(ranges[i].end); - for (var chunk = beginChunk; chunk < endChunk; ++chunk) { - if (!chunksToRequest.includes(chunk)) { - chunksToRequest.push(chunk); - } - } - } - chunksToRequest.sort(function (a, b) { - return a - b; - }); - return this._requestChunks(chunksToRequest); - }, - groupChunks: function ChunkedStreamManager_groupChunks(chunks) { - var groupedChunks = []; - var beginChunk = -1; - var prevChunk = -1; - for (var i = 0; i < chunks.length; ++i) { - var chunk = chunks[i]; - if (beginChunk < 0) { - beginChunk = chunk; - } - if (prevChunk >= 0 && prevChunk + 1 !== chunk) { - groupedChunks.push({ - beginChunk: beginChunk, - endChunk: prevChunk + 1 - }); - beginChunk = chunk; - } - if (i + 1 === chunks.length) { - groupedChunks.push({ - beginChunk: beginChunk, - endChunk: chunk + 1 - }); - } - prevChunk = chunk; - } - return groupedChunks; - }, - onProgress: function ChunkedStreamManager_onProgress(args) { - var bytesLoaded = this.stream.numChunksLoaded * this.chunkSize + args.loaded; - this.msgHandler.send('DocProgress', { - loaded: bytesLoaded, - total: this.length - }); - }, - onReceiveData: function ChunkedStreamManager_onReceiveData(args) { - var chunk = args.chunk; - var isProgressive = args.begin === undefined; - var begin = isProgressive ? this.progressiveDataLength : args.begin; - var end = begin + chunk.byteLength; - var beginChunk = Math.floor(begin / this.chunkSize); - var endChunk = end < this.length ? Math.floor(end / this.chunkSize) : Math.ceil(end / this.chunkSize); - if (isProgressive) { - this.stream.onReceiveProgressiveData(chunk); - this.progressiveDataLength = end; - } else { - this.stream.onReceiveData(begin, chunk); - } - if (this.stream.allChunksLoaded()) { - this._loadedStreamCapability.resolve(this.stream); - } - var loadedRequests = []; - var i, requestId; - for (chunk = beginChunk; chunk < endChunk; ++chunk) { - var requestIds = this.requestsByChunk[chunk] || []; - delete this.requestsByChunk[chunk]; - for (i = 0; i < requestIds.length; ++i) { - requestId = requestIds[i]; - var chunksNeeded = this.chunksNeededByRequest[requestId]; - if (chunk in chunksNeeded) { - delete chunksNeeded[chunk]; - } - if (!(0, _util.isEmptyObj)(chunksNeeded)) { - continue; - } - loadedRequests.push(requestId); - } - } - if (!this.disableAutoFetch && (0, _util.isEmptyObj)(this.requestsByChunk)) { - var nextEmptyChunk; - if (this.stream.numChunksLoaded === 1) { - var lastChunk = this.stream.numChunks - 1; - if (!this.stream.hasChunk(lastChunk)) { - nextEmptyChunk = lastChunk; - } - } else { - nextEmptyChunk = this.stream.nextEmptyChunk(endChunk); - } - if (Number.isInteger(nextEmptyChunk)) { - this._requestChunks([nextEmptyChunk]); - } - } - for (i = 0; i < loadedRequests.length; ++i) { - requestId = loadedRequests[i]; - var capability = this.promisesByRequest[requestId]; - delete this.promisesByRequest[requestId]; - capability.resolve(); - } - this.msgHandler.send('DocProgress', { - loaded: this.stream.numChunksLoaded * this.chunkSize, - total: this.length - }); - }, - onError: function ChunkedStreamManager_onError(err) { - this._loadedStreamCapability.reject(err); - }, - getBeginChunk: function ChunkedStreamManager_getBeginChunk(begin) { - var chunk = Math.floor(begin / this.chunkSize); - return chunk; - }, - getEndChunk: function ChunkedStreamManager_getEndChunk(end) { - var chunk = Math.floor((end - 1) / this.chunkSize) + 1; - return chunk; - }, - abort: function ChunkedStreamManager_abort() { - this.aborted = true; - if (this.pdfNetworkStream) { - this.pdfNetworkStream.cancelAllRequests('abort'); - } - for (var requestId in this.promisesByRequest) { - var capability = this.promisesByRequest[requestId]; - capability.reject(new Error('Request was aborted')); - } - } - }; - return ChunkedStreamManager; -}(); -exports.ChunkedStream = ChunkedStream; -exports.ChunkedStreamManager = ChunkedStreamManager; - -/***/ }), -/* 136 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PDFDocument = exports.Page = undefined; - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _util = __w_pdfjs_require__(2); - -var _obj = __w_pdfjs_require__(137); - -var _primitives = __w_pdfjs_require__(138); - -var _stream = __w_pdfjs_require__(140); - -var _annotation = __w_pdfjs_require__(152); - -var _crypto = __w_pdfjs_require__(150); - -var _parser = __w_pdfjs_require__(139); - -var _operator_list = __w_pdfjs_require__(153); - -var _evaluator = __w_pdfjs_require__(154); - -var _function = __w_pdfjs_require__(168); - -var Page = function PageClosure() { - var DEFAULT_USER_UNIT = 1.0; - var LETTER_SIZE_MEDIABOX = [0, 0, 612, 792]; - function isAnnotationRenderable(annotation, intent) { - return intent === 'display' && annotation.viewable || intent === 'print' && annotation.printable; - } - function Page(_ref) { - var pdfManager = _ref.pdfManager, - xref = _ref.xref, - pageIndex = _ref.pageIndex, - pageDict = _ref.pageDict, - ref = _ref.ref, - fontCache = _ref.fontCache, - builtInCMapCache = _ref.builtInCMapCache, - pdfFunctionFactory = _ref.pdfFunctionFactory; - - this.pdfManager = pdfManager; - this.pageIndex = pageIndex; - this.pageDict = pageDict; - this.xref = xref; - this.ref = ref; - this.fontCache = fontCache; - this.builtInCMapCache = builtInCMapCache; - this.pdfFunctionFactory = pdfFunctionFactory; - this.evaluatorOptions = pdfManager.evaluatorOptions; - this.resourcesPromise = null; - var uniquePrefix = 'p' + this.pageIndex + '_'; - var idCounters = { obj: 0 }; - this.idFactory = { - createObjId: function createObjId() { - return uniquePrefix + ++idCounters.obj; - } - }; - } - Page.prototype = { - _getInheritableProperty: function _getInheritableProperty(key) { - var getArray = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var value = (0, _util.getInheritableProperty)({ - dict: this.pageDict, - key: key, - getArray: getArray, - stopWhenFound: false - }); - if (!Array.isArray(value)) { - return value; - } - if (value.length === 1 || !(0, _primitives.isDict)(value[0])) { - return value[0]; - } - return _primitives.Dict.merge(this.xref, value); - }, - - get content() { - return this.pageDict.get('Contents'); - }, - get resources() { - return (0, _util.shadow)(this, 'resources', this._getInheritableProperty('Resources') || _primitives.Dict.empty); - }, - get mediaBox() { - var mediaBox = this._getInheritableProperty('MediaBox', true); - if (!Array.isArray(mediaBox) || mediaBox.length !== 4) { - return (0, _util.shadow)(this, 'mediaBox', LETTER_SIZE_MEDIABOX); - } - return (0, _util.shadow)(this, 'mediaBox', mediaBox); - }, - get cropBox() { - var cropBox = this._getInheritableProperty('CropBox', true); - if (!Array.isArray(cropBox) || cropBox.length !== 4) { - return (0, _util.shadow)(this, 'cropBox', this.mediaBox); - } - return (0, _util.shadow)(this, 'cropBox', cropBox); - }, - get userUnit() { - var obj = this.pageDict.get('UserUnit'); - if (!(0, _util.isNum)(obj) || obj <= 0) { - obj = DEFAULT_USER_UNIT; - } - return (0, _util.shadow)(this, 'userUnit', obj); - }, - get view() { - var mediaBox = this.mediaBox, - cropBox = this.cropBox; - if (mediaBox === cropBox) { - return (0, _util.shadow)(this, 'view', mediaBox); - } - var intersection = _util.Util.intersect(cropBox, mediaBox); - return (0, _util.shadow)(this, 'view', intersection || mediaBox); - }, - get rotate() { - var rotate = this._getInheritableProperty('Rotate') || 0; - if (rotate % 90 !== 0) { - rotate = 0; - } else if (rotate >= 360) { - rotate = rotate % 360; - } else if (rotate < 0) { - rotate = (rotate % 360 + 360) % 360; - } - return (0, _util.shadow)(this, 'rotate', rotate); - }, - getContentStream: function Page_getContentStream() { - var content = this.content; - var stream; - if (Array.isArray(content)) { - var xref = this.xref; - var i, - n = content.length; - var streams = []; - for (i = 0; i < n; ++i) { - streams.push(xref.fetchIfRef(content[i])); - } - stream = new _stream.StreamsSequenceStream(streams); - } else if ((0, _primitives.isStream)(content)) { - stream = content; - } else { - stream = new _stream.NullStream(); - } - return stream; - }, - loadResources: function Page_loadResources(keys) { - var _this = this; - - if (!this.resourcesPromise) { - this.resourcesPromise = this.pdfManager.ensure(this, 'resources'); - } - return this.resourcesPromise.then(function () { - var objectLoader = new _obj.ObjectLoader(_this.resources, keys, _this.xref); - return objectLoader.load(); - }); - }, - getOperatorList: function getOperatorList(_ref2) { - var _this2 = this; - - var handler = _ref2.handler, - task = _ref2.task, - intent = _ref2.intent, - renderInteractiveForms = _ref2.renderInteractiveForms; - - var contentStreamPromise = this.pdfManager.ensure(this, 'getContentStream'); - var resourcesPromise = this.loadResources(['ExtGState', 'ColorSpace', 'Pattern', 'Shading', 'XObject', 'Font']); - var partialEvaluator = new _evaluator.PartialEvaluator({ - pdfManager: this.pdfManager, - xref: this.xref, - handler: handler, - pageIndex: this.pageIndex, - idFactory: this.idFactory, - fontCache: this.fontCache, - builtInCMapCache: this.builtInCMapCache, - options: this.evaluatorOptions, - pdfFunctionFactory: this.pdfFunctionFactory - }); - var dataPromises = Promise.all([contentStreamPromise, resourcesPromise]); - var pageListPromise = dataPromises.then(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 1), - contentStream = _ref4[0]; - - var opList = new _operator_list.OperatorList(intent, handler, _this2.pageIndex); - handler.send('StartRenderPage', { - transparency: partialEvaluator.hasBlendModes(_this2.resources), - pageIndex: _this2.pageIndex, - intent: intent - }); - return partialEvaluator.getOperatorList({ - stream: contentStream, - task: task, - resources: _this2.resources, - operatorList: opList - }).then(function () { - return opList; - }); - }); - return Promise.all([pageListPromise, this._parsedAnnotations]).then(function (_ref5) { - var _ref6 = _slicedToArray(_ref5, 2), - pageOpList = _ref6[0], - annotations = _ref6[1]; - - if (annotations.length === 0) { - pageOpList.flush(true); - return pageOpList; - } - var i, - ii, - opListPromises = []; - for (i = 0, ii = annotations.length; i < ii; i++) { - if (isAnnotationRenderable(annotations[i], intent)) { - opListPromises.push(annotations[i].getOperatorList(partialEvaluator, task, renderInteractiveForms)); - } - } - return Promise.all(opListPromises).then(function (opLists) { - pageOpList.addOp(_util.OPS.beginAnnotations, []); - for (i = 0, ii = opLists.length; i < ii; i++) { - pageOpList.addOpList(opLists[i]); - } - pageOpList.addOp(_util.OPS.endAnnotations, []); - pageOpList.flush(true); - return pageOpList; - }); - }); - }, - extractTextContent: function extractTextContent(_ref7) { - var _this3 = this; - - var handler = _ref7.handler, - task = _ref7.task, - normalizeWhitespace = _ref7.normalizeWhitespace, - sink = _ref7.sink, - combineTextItems = _ref7.combineTextItems; - - var contentStreamPromise = this.pdfManager.ensure(this, 'getContentStream'); - var resourcesPromise = this.loadResources(['ExtGState', 'XObject', 'Font']); - var dataPromises = Promise.all([contentStreamPromise, resourcesPromise]); - return dataPromises.then(function (_ref8) { - var _ref9 = _slicedToArray(_ref8, 1), - contentStream = _ref9[0]; - - var partialEvaluator = new _evaluator.PartialEvaluator({ - pdfManager: _this3.pdfManager, - xref: _this3.xref, - handler: handler, - pageIndex: _this3.pageIndex, - idFactory: _this3.idFactory, - fontCache: _this3.fontCache, - builtInCMapCache: _this3.builtInCMapCache, - options: _this3.evaluatorOptions, - pdfFunctionFactory: _this3.pdfFunctionFactory - }); - return partialEvaluator.getTextContent({ - stream: contentStream, - task: task, - resources: _this3.resources, - normalizeWhitespace: normalizeWhitespace, - combineTextItems: combineTextItems, - sink: sink - }); - }); - }, - getAnnotationsData: function getAnnotationsData(intent) { - return this._parsedAnnotations.then(function (annotations) { - var annotationsData = []; - for (var i = 0, ii = annotations.length; i < ii; i++) { - if (!intent || isAnnotationRenderable(annotations[i], intent)) { - annotationsData.push(annotations[i].data); - } - } - return annotationsData; - }); - }, - - get annotations() { - return (0, _util.shadow)(this, 'annotations', this._getInheritableProperty('Annots') || []); - }, - get _parsedAnnotations() { - var _this4 = this; - - var parsedAnnotations = this.pdfManager.ensure(this, 'annotations').then(function () { - var annotationRefs = _this4.annotations; - var annotationPromises = []; - for (var i = 0, ii = annotationRefs.length; i < ii; i++) { - annotationPromises.push(_annotation.AnnotationFactory.create(_this4.xref, annotationRefs[i], _this4.pdfManager, _this4.idFactory)); - } - return Promise.all(annotationPromises).then(function (annotations) { - return annotations.filter(function isDefined(annotation) { - return !!annotation; - }); - }, function (reason) { - (0, _util.warn)('_parsedAnnotations: "' + reason + '".'); - return []; - }); - }); - return (0, _util.shadow)(this, '_parsedAnnotations', parsedAnnotations); - } - }; - return Page; -}(); -var PDFDocument = function PDFDocumentClosure() { - var FINGERPRINT_FIRST_BYTES = 1024; - var EMPTY_FINGERPRINT = '\x00\x00\x00\x00\x00\x00\x00' + '\x00\x00\x00\x00\x00\x00\x00\x00\x00'; - function PDFDocument(pdfManager, arg) { - var stream; - if ((0, _primitives.isStream)(arg)) { - stream = arg; - } else if ((0, _util.isArrayBuffer)(arg)) { - stream = new _stream.Stream(arg); - } else { - throw new Error('PDFDocument: Unknown argument type'); - } - if (stream.length <= 0) { - throw new Error('PDFDocument: stream must have data'); - } - this.pdfManager = pdfManager; - this.stream = stream; - this.xref = new _obj.XRef(stream, pdfManager); - var evaluatorOptions = pdfManager.evaluatorOptions; - this.pdfFunctionFactory = new _function.PDFFunctionFactory({ - xref: this.xref, - isEvalSupported: evaluatorOptions.isEvalSupported - }); - this._pagePromises = []; - } - function find(stream, needle, limit, backwards) { - var pos = stream.pos; - var end = stream.end; - var strBuf = []; - if (pos + limit > end) { - limit = end - pos; - } - for (var n = 0; n < limit; ++n) { - strBuf.push(String.fromCharCode(stream.getByte())); - } - var str = strBuf.join(''); - stream.pos = pos; - var index = backwards ? str.lastIndexOf(needle) : str.indexOf(needle); - if (index === -1) { - return false; - } - stream.pos += index; - return true; - } - var DocumentInfoValidators = { - Title: _util.isString, - Author: _util.isString, - Subject: _util.isString, - Keywords: _util.isString, - Creator: _util.isString, - Producer: _util.isString, - CreationDate: _util.isString, - ModDate: _util.isString, - Trapped: _primitives.isName - }; - PDFDocument.prototype = { - parse: function PDFDocument_parse(recoveryMode) { - this.setup(recoveryMode); - var version = this.catalog.catDict.get('Version'); - if ((0, _primitives.isName)(version)) { - this.pdfFormatVersion = version.name; - } - try { - this.acroForm = this.catalog.catDict.get('AcroForm'); - if (this.acroForm) { - this.xfa = this.acroForm.get('XFA'); - var fields = this.acroForm.get('Fields'); - if ((!fields || !Array.isArray(fields) || fields.length === 0) && !this.xfa) { - this.acroForm = null; - } - } - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - (0, _util.info)('Something wrong with AcroForm entry'); - this.acroForm = null; - } - }, - get linearization() { - var linearization = null; - try { - linearization = _parser.Linearization.create(this.stream); - } catch (err) { - if (err instanceof _util.MissingDataException) { - throw err; - } - (0, _util.info)(err); - } - return (0, _util.shadow)(this, 'linearization', linearization); - }, - get startXRef() { - var stream = this.stream; - var startXRef = 0; - var linearization = this.linearization; - if (linearization) { - stream.reset(); - if (find(stream, 'endobj', 1024)) { - startXRef = stream.pos + 6; - } - } else { - var step = 1024; - var found = false, - pos = stream.end; - while (!found && pos > 0) { - pos -= step - 'startxref'.length; - if (pos < 0) { - pos = 0; - } - stream.pos = pos; - found = find(stream, 'startxref', step, true); - } - if (found) { - stream.skip(9); - var ch; - do { - ch = stream.getByte(); - } while ((0, _util.isSpace)(ch)); - var str = ''; - while (ch >= 0x20 && ch <= 0x39) { - str += String.fromCharCode(ch); - ch = stream.getByte(); - } - startXRef = parseInt(str, 10); - if (isNaN(startXRef)) { - startXRef = 0; - } - } - } - return (0, _util.shadow)(this, 'startXRef', startXRef); - }, - checkHeader: function PDFDocument_checkHeader() { - var stream = this.stream; - stream.reset(); - if (find(stream, '%PDF-', 1024)) { - stream.moveStart(); - var MAX_VERSION_LENGTH = 12; - var version = '', - ch; - while ((ch = stream.getByte()) > 0x20) { - if (version.length >= MAX_VERSION_LENGTH) { - break; - } - version += String.fromCharCode(ch); - } - if (!this.pdfFormatVersion) { - this.pdfFormatVersion = version.substring(5); - } - return; - } - }, - parseStartXRef: function PDFDocument_parseStartXRef() { - var startXRef = this.startXRef; - this.xref.setStartXRef(startXRef); - }, - setup: function PDFDocument_setup(recoveryMode) { - this.xref.parse(recoveryMode); - this.catalog = new _obj.Catalog(this.pdfManager, this.xref); - }, - get numPages() { - var linearization = this.linearization; - var num = linearization ? linearization.numPages : this.catalog.numPages; - return (0, _util.shadow)(this, 'numPages', num); - }, - get documentInfo() { - var docInfo = { - PDFFormatVersion: this.pdfFormatVersion, - IsLinearized: !!this.linearization, - IsAcroFormPresent: !!this.acroForm, - IsXFAPresent: !!this.xfa - }; - var infoDict = void 0; - try { - infoDict = this.xref.trailer.get('Info'); - } catch (err) { - if (err instanceof _util.MissingDataException) { - throw err; - } - (0, _util.info)('The document information dictionary is invalid.'); - } - if ((0, _primitives.isDict)(infoDict)) { - for (var key in DocumentInfoValidators) { - if (infoDict.has(key)) { - var value = infoDict.get(key); - if (DocumentInfoValidators[key](value)) { - docInfo[key] = typeof value !== 'string' ? value : (0, _util.stringToPDFString)(value); - } else { - (0, _util.info)('Bad value in document info for "' + key + '"'); - } - } - } - } - return (0, _util.shadow)(this, 'documentInfo', docInfo); - }, - get fingerprint() { - var xref = this.xref, - hash, - fileID = ''; - var idArray = xref.trailer.get('ID'); - if (Array.isArray(idArray) && idArray[0] && (0, _util.isString)(idArray[0]) && idArray[0] !== EMPTY_FINGERPRINT) { - hash = (0, _util.stringToBytes)(idArray[0]); - } else { - if (this.stream.ensureRange) { - this.stream.ensureRange(0, Math.min(FINGERPRINT_FIRST_BYTES, this.stream.end)); - } - hash = (0, _crypto.calculateMD5)(this.stream.bytes.subarray(0, FINGERPRINT_FIRST_BYTES), 0, FINGERPRINT_FIRST_BYTES); - } - for (var i = 0, n = hash.length; i < n; i++) { - var hex = hash[i].toString(16); - fileID += hex.length === 1 ? '0' + hex : hex; - } - return (0, _util.shadow)(this, 'fingerprint', fileID); - }, - _getLinearizationPage: function _getLinearizationPage(pageIndex) { - var catalog = this.catalog, - linearization = this.linearization; - - (0, _util.assert)(linearization && linearization.pageFirst === pageIndex); - var ref = new _primitives.Ref(linearization.objectNumberFirst, 0); - return this.xref.fetchAsync(ref).then(function (obj) { - if ((0, _primitives.isDict)(obj, 'Page') || (0, _primitives.isDict)(obj) && !obj.has('Type') && obj.has('Contents')) { - if (ref && !catalog.pageKidsCountCache.has(ref)) { - catalog.pageKidsCountCache.put(ref, 1); - } - return [obj, ref]; - } - throw new _util.FormatError('The Linearization dictionary doesn\'t point ' + 'to a valid Page dictionary.'); - }).catch(function (reason) { - (0, _util.info)(reason); - return catalog.getPageDict(pageIndex); - }); - }, - getPage: function getPage(pageIndex) { - var _this5 = this; - - if (this._pagePromises[pageIndex] !== undefined) { - return this._pagePromises[pageIndex]; - } - var catalog = this.catalog, - linearization = this.linearization; - - var promise = linearization && linearization.pageFirst === pageIndex ? this._getLinearizationPage(pageIndex) : catalog.getPageDict(pageIndex); - return this._pagePromises[pageIndex] = promise.then(function (_ref10) { - var _ref11 = _slicedToArray(_ref10, 2), - pageDict = _ref11[0], - ref = _ref11[1]; - - return new Page({ - pdfManager: _this5.pdfManager, - xref: _this5.xref, - pageIndex: pageIndex, - pageDict: pageDict, - ref: ref, - fontCache: catalog.fontCache, - builtInCMapCache: catalog.builtInCMapCache, - pdfFunctionFactory: _this5.pdfFunctionFactory - }); - }); - }, - - cleanup: function PDFDocument_cleanup() { - return this.catalog.cleanup(); - } - }; - return PDFDocument; -}(); -exports.Page = Page; -exports.PDFDocument = PDFDocument; - -/***/ }), -/* 137 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.FileSpec = exports.XRef = exports.ObjectLoader = exports.Catalog = undefined; - -var _regenerator = __w_pdfjs_require__(131); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -var _parser = __w_pdfjs_require__(139); - -var _chunked_stream = __w_pdfjs_require__(135); - -var _crypto = __w_pdfjs_require__(150); - -var _colorspace = __w_pdfjs_require__(151); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function fetchDestination(dest) { - return (0, _primitives.isDict)(dest) ? dest.get('D') : dest; -} - -var Catalog = function () { - function Catalog(pdfManager, xref) { - _classCallCheck(this, Catalog); - - this.pdfManager = pdfManager; - this.xref = xref; - this.catDict = xref.getCatalogObj(); - if (!(0, _primitives.isDict)(this.catDict)) { - throw new _util.FormatError('Catalog object is not a dictionary.'); - } - this.fontCache = new _primitives.RefSetCache(); - this.builtInCMapCache = new Map(); - this.pageKidsCountCache = new _primitives.RefSetCache(); - } - - _createClass(Catalog, [{ - key: '_readDocumentOutline', - value: function _readDocumentOutline() { - var obj = this.catDict.get('Outlines'); - if (!(0, _primitives.isDict)(obj)) { - return null; - } - obj = obj.getRaw('First'); - if (!(0, _primitives.isRef)(obj)) { - return null; - } - var root = { items: [] }; - var queue = [{ - obj: obj, - parent: root - }]; - var processed = new _primitives.RefSet(); - processed.put(obj); - var xref = this.xref, - blackColor = new Uint8ClampedArray(3); - while (queue.length > 0) { - var i = queue.shift(); - var outlineDict = xref.fetchIfRef(i.obj); - if (outlineDict === null) { - continue; - } - if (!outlineDict.has('Title')) { - throw new _util.FormatError('Invalid outline item encountered.'); - } - var data = { - url: null, - dest: null - }; - Catalog.parseDestDictionary({ - destDict: outlineDict, - resultObj: data, - docBaseUrl: this.pdfManager.docBaseUrl - }); - var title = outlineDict.get('Title'); - var flags = outlineDict.get('F') || 0; - var color = outlineDict.getArray('C'); - var rgbColor = blackColor; - if (Array.isArray(color) && color.length === 3 && (color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) { - rgbColor = _colorspace.ColorSpace.singletons.rgb.getRgb(color, 0); - } - var outlineItem = { - dest: data.dest, - url: data.url, - unsafeUrl: data.unsafeUrl, - newWindow: data.newWindow, - title: (0, _util.stringToPDFString)(title), - color: rgbColor, - count: outlineDict.get('Count'), - bold: !!(flags & 2), - italic: !!(flags & 1), - items: [] - }; - i.parent.items.push(outlineItem); - obj = outlineDict.getRaw('First'); - if ((0, _primitives.isRef)(obj) && !processed.has(obj)) { - queue.push({ - obj: obj, - parent: outlineItem - }); - processed.put(obj); - } - obj = outlineDict.getRaw('Next'); - if ((0, _primitives.isRef)(obj) && !processed.has(obj)) { - queue.push({ - obj: obj, - parent: i.parent - }); - processed.put(obj); - } - } - return root.items.length > 0 ? root.items : null; - } - }, { - key: '_readPermissions', - value: function _readPermissions() { - var encrypt = this.xref.trailer.get('Encrypt'); - if (!(0, _primitives.isDict)(encrypt)) { - return null; - } - var flags = encrypt.get('P'); - if (!(0, _util.isNum)(flags)) { - return null; - } - flags += Math.pow(2, 32); - var permissions = []; - for (var key in _util.PermissionFlag) { - var value = _util.PermissionFlag[key]; - if (flags & value) { - permissions.push(value); - } - } - return permissions; - } - }, { - key: 'getDestination', - value: function getDestination(destinationId) { - var obj = this._readDests(); - if (obj instanceof NameTree || obj instanceof _primitives.Dict) { - return fetchDestination(obj.get(destinationId) || null); - } - return null; - } - }, { - key: '_readDests', - value: function _readDests() { - var obj = this.catDict.get('Names'); - if (obj && obj.has('Dests')) { - return new NameTree(obj.getRaw('Dests'), this.xref); - } else if (this.catDict.has('Dests')) { - return this.catDict.get('Dests'); - } - } - }, { - key: '_readPageLabels', - value: function _readPageLabels() { - var obj = this.catDict.getRaw('PageLabels'); - if (!obj) { - return null; - } - var pageLabels = new Array(this.numPages); - var style = null, - prefix = ''; - var numberTree = new NumberTree(obj, this.xref); - var nums = numberTree.getAll(); - var currentLabel = '', - currentIndex = 1; - for (var i = 0, ii = this.numPages; i < ii; i++) { - if (i in nums) { - var labelDict = nums[i]; - if (!(0, _primitives.isDict)(labelDict)) { - throw new _util.FormatError('PageLabel is not a dictionary.'); - } - if (labelDict.has('Type') && !(0, _primitives.isName)(labelDict.get('Type'), 'PageLabel')) { - throw new _util.FormatError('Invalid type in PageLabel dictionary.'); - } - if (labelDict.has('S')) { - var s = labelDict.get('S'); - if (!(0, _primitives.isName)(s)) { - throw new _util.FormatError('Invalid style in PageLabel dictionary.'); - } - style = s.name; - } else { - style = null; - } - if (labelDict.has('P')) { - var p = labelDict.get('P'); - if (!(0, _util.isString)(p)) { - throw new _util.FormatError('Invalid prefix in PageLabel dictionary.'); - } - prefix = (0, _util.stringToPDFString)(p); - } else { - prefix = ''; - } - if (labelDict.has('St')) { - var st = labelDict.get('St'); - if (!(Number.isInteger(st) && st >= 1)) { - throw new _util.FormatError('Invalid start in PageLabel dictionary.'); - } - currentIndex = st; - } else { - currentIndex = 1; - } - } - switch (style) { - case 'D': - currentLabel = currentIndex; - break; - case 'R': - case 'r': - currentLabel = (0, _util.toRomanNumerals)(currentIndex, style === 'r'); - break; - case 'A': - case 'a': - var LIMIT = 26; - var A_UPPER_CASE = 0x41, - A_LOWER_CASE = 0x61; - var baseCharCode = style === 'a' ? A_LOWER_CASE : A_UPPER_CASE; - var letterIndex = currentIndex - 1; - var character = String.fromCharCode(baseCharCode + letterIndex % LIMIT); - var charBuf = []; - for (var j = 0, jj = letterIndex / LIMIT | 0; j <= jj; j++) { - charBuf.push(character); - } - currentLabel = charBuf.join(''); - break; - default: - if (style) { - throw new _util.FormatError('Invalid style "' + style + '" in PageLabel dictionary.'); - } - currentLabel = ''; - } - pageLabels[i] = prefix + currentLabel; - currentIndex++; - } - return pageLabels; - } - }, { - key: 'cleanup', - value: function cleanup() { - var _this = this; - - this.pageKidsCountCache.clear(); - var promises = []; - this.fontCache.forEach(function (promise) { - promises.push(promise); - }); - return Promise.all(promises).then(function (translatedFonts) { - for (var i = 0, ii = translatedFonts.length; i < ii; i++) { - var font = translatedFonts[i].dict; - delete font.translated; - } - _this.fontCache.clear(); - _this.builtInCMapCache.clear(); - }); - } - }, { - key: 'getPageDict', - value: function getPageDict(pageIndex) { - var capability = (0, _util.createPromiseCapability)(); - var nodesToVisit = [this.catDict.getRaw('Pages')]; - var xref = this.xref, - pageKidsCountCache = this.pageKidsCountCache; - var count = void 0, - currentPageIndex = 0; - function next() { - var _loop = function _loop() { - var currentNode = nodesToVisit.pop(); - if ((0, _primitives.isRef)(currentNode)) { - count = pageKidsCountCache.get(currentNode); - if (count > 0 && currentPageIndex + count < pageIndex) { - currentPageIndex += count; - return 'continue'; - } - xref.fetchAsync(currentNode).then(function (obj) { - if ((0, _primitives.isDict)(obj, 'Page') || (0, _primitives.isDict)(obj) && !obj.has('Kids')) { - if (pageIndex === currentPageIndex) { - if (currentNode && !pageKidsCountCache.has(currentNode)) { - pageKidsCountCache.put(currentNode, 1); - } - capability.resolve([obj, currentNode]); - } else { - currentPageIndex++; - next(); - } - return; - } - nodesToVisit.push(obj); - next(); - }, capability.reject); - return { - v: void 0 - }; - } - if (!(0, _primitives.isDict)(currentNode)) { - capability.reject(new _util.FormatError('Page dictionary kid reference points to wrong type of object.')); - return { - v: void 0 - }; - } - count = currentNode.get('Count'); - if (Number.isInteger(count) && count >= 0) { - var objId = currentNode.objId; - if (objId && !pageKidsCountCache.has(objId)) { - pageKidsCountCache.put(objId, count); - } - if (currentPageIndex + count <= pageIndex) { - currentPageIndex += count; - return 'continue'; - } - } - var kids = currentNode.get('Kids'); - if (!Array.isArray(kids)) { - if ((0, _primitives.isName)(currentNode.get('Type'), 'Page') || !currentNode.has('Type') && currentNode.has('Contents')) { - if (currentPageIndex === pageIndex) { - capability.resolve([currentNode, null]); - return { - v: void 0 - }; - } - currentPageIndex++; - return 'continue'; - } - capability.reject(new _util.FormatError('Page dictionary kids object is not an array.')); - return { - v: void 0 - }; - } - for (var last = kids.length - 1; last >= 0; last--) { - nodesToVisit.push(kids[last]); - } - }; - - while (nodesToVisit.length) { - var _ret = _loop(); - - switch (_ret) { - case 'continue': - continue; - - default: - if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; - } - } - capability.reject(new Error('Page index ' + pageIndex + ' not found.')); - } - next(); - return capability.promise; - } - }, { - key: 'getPageIndex', - value: function getPageIndex(pageRef) { - var xref = this.xref; - function pagesBeforeRef(kidRef) { - var total = 0, - parentRef = void 0; - return xref.fetchAsync(kidRef).then(function (node) { - if ((0, _primitives.isRefsEqual)(kidRef, pageRef) && !(0, _primitives.isDict)(node, 'Page') && !((0, _primitives.isDict)(node) && !node.has('Type') && node.has('Contents'))) { - throw new _util.FormatError('The reference does not point to a /Page dictionary.'); - } - if (!node) { - return null; - } - if (!(0, _primitives.isDict)(node)) { - throw new _util.FormatError('Node must be a dictionary.'); - } - parentRef = node.getRaw('Parent'); - return node.getAsync('Parent'); - }).then(function (parent) { - if (!parent) { - return null; - } - if (!(0, _primitives.isDict)(parent)) { - throw new _util.FormatError('Parent must be a dictionary.'); - } - return parent.getAsync('Kids'); - }).then(function (kids) { - if (!kids) { - return null; - } - var kidPromises = []; - var found = false; - for (var i = 0, ii = kids.length; i < ii; i++) { - var kid = kids[i]; - if (!(0, _primitives.isRef)(kid)) { - throw new _util.FormatError('Kid must be a reference.'); - } - if ((0, _primitives.isRefsEqual)(kid, kidRef)) { - found = true; - break; - } - kidPromises.push(xref.fetchAsync(kid).then(function (kid) { - if (!(0, _primitives.isDict)(kid)) { - throw new _util.FormatError('Kid node must be a dictionary.'); - } - if (kid.has('Count')) { - total += kid.get('Count'); - } else { - total++; - } - })); - } - if (!found) { - throw new _util.FormatError('Kid reference not found in parent\'s kids.'); - } - return Promise.all(kidPromises).then(function () { - return [total, parentRef]; - }); - }); - } - var total = 0; - function next(ref) { - return pagesBeforeRef(ref).then(function (args) { - if (!args) { - return total; - } - - var _args = _slicedToArray(args, 2), - count = _args[0], - parentRef = _args[1]; - - total += count; - return next(parentRef); - }); - } - return next(pageRef); - } - }, { - key: 'metadata', - get: function get() { - var streamRef = this.catDict.getRaw('Metadata'); - if (!(0, _primitives.isRef)(streamRef)) { - return (0, _util.shadow)(this, 'metadata', null); - } - var suppressEncryption = !(this.xref.encrypt && this.xref.encrypt.encryptMetadata); - var stream = this.xref.fetch(streamRef, suppressEncryption); - var metadata = void 0; - if (stream && (0, _primitives.isDict)(stream.dict)) { - var type = stream.dict.get('Type'); - var subtype = stream.dict.get('Subtype'); - if ((0, _primitives.isName)(type, 'Metadata') && (0, _primitives.isName)(subtype, 'XML')) { - try { - metadata = (0, _util.stringToUTF8String)((0, _util.bytesToString)(stream.getBytes())); - } catch (e) { - if (e instanceof _util.MissingDataException) { - throw e; - } - (0, _util.info)('Skipping invalid metadata.'); - } - } - } - return (0, _util.shadow)(this, 'metadata', metadata); - } - }, { - key: 'toplevelPagesDict', - get: function get() { - var pagesObj = this.catDict.get('Pages'); - if (!(0, _primitives.isDict)(pagesObj)) { - throw new _util.FormatError('Invalid top-level pages dictionary.'); - } - return (0, _util.shadow)(this, 'toplevelPagesDict', pagesObj); - } - }, { - key: 'documentOutline', - get: function get() { - var obj = null; - try { - obj = this._readDocumentOutline(); - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - (0, _util.warn)('Unable to read document outline.'); - } - return (0, _util.shadow)(this, 'documentOutline', obj); - } - }, { - key: 'permissions', - get: function get() { - var permissions = null; - try { - permissions = this._readPermissions(); - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - (0, _util.warn)('Unable to read permissions.'); - } - return (0, _util.shadow)(this, 'permissions', permissions); - } - }, { - key: 'numPages', - get: function get() { - var obj = this.toplevelPagesDict.get('Count'); - if (!Number.isInteger(obj)) { - throw new _util.FormatError('Page count in top-level pages dictionary is not an integer.'); - } - return (0, _util.shadow)(this, 'numPages', obj); - } - }, { - key: 'destinations', - get: function get() { - var obj = this._readDests(), - dests = Object.create(null); - if (obj instanceof NameTree) { - var names = obj.getAll(); - for (var name in names) { - dests[name] = fetchDestination(names[name]); - } - } else if (obj instanceof _primitives.Dict) { - obj.forEach(function (key, value) { - if (value) { - dests[key] = fetchDestination(value); - } - }); - } - return (0, _util.shadow)(this, 'destinations', dests); - } - }, { - key: 'pageLabels', - get: function get() { - var obj = null; - try { - obj = this._readPageLabels(); - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - (0, _util.warn)('Unable to read page labels.'); - } - return (0, _util.shadow)(this, 'pageLabels', obj); - } - }, { - key: 'pageMode', - get: function get() { - var obj = this.catDict.get('PageMode'); - var pageMode = 'UseNone'; - if ((0, _primitives.isName)(obj)) { - switch (obj.name) { - case 'UseNone': - case 'UseOutlines': - case 'UseThumbs': - case 'FullScreen': - case 'UseOC': - case 'UseAttachments': - pageMode = obj.name; - } - } - return (0, _util.shadow)(this, 'pageMode', pageMode); - } - }, { - key: 'attachments', - get: function get() { - var obj = this.catDict.get('Names'); - var attachments = null; - if (obj && obj.has('EmbeddedFiles')) { - var nameTree = new NameTree(obj.getRaw('EmbeddedFiles'), this.xref); - var names = nameTree.getAll(); - for (var name in names) { - var fs = new FileSpec(names[name], this.xref); - if (!attachments) { - attachments = Object.create(null); - } - attachments[(0, _util.stringToPDFString)(name)] = fs.serializable; - } - } - return (0, _util.shadow)(this, 'attachments', attachments); - } - }, { - key: 'javaScript', - get: function get() { - var obj = this.catDict.get('Names'); - var javaScript = null; - function appendIfJavaScriptDict(jsDict) { - var type = jsDict.get('S'); - if (!(0, _primitives.isName)(type, 'JavaScript')) { - return; - } - var js = jsDict.get('JS'); - if ((0, _primitives.isStream)(js)) { - js = (0, _util.bytesToString)(js.getBytes()); - } else if (!(0, _util.isString)(js)) { - return; - } - if (!javaScript) { - javaScript = []; - } - javaScript.push((0, _util.stringToPDFString)(js)); - } - if (obj && obj.has('JavaScript')) { - var nameTree = new NameTree(obj.getRaw('JavaScript'), this.xref); - var names = nameTree.getAll(); - for (var name in names) { - var jsDict = names[name]; - if ((0, _primitives.isDict)(jsDict)) { - appendIfJavaScriptDict(jsDict); - } - } - } - var openActionDict = this.catDict.get('OpenAction'); - if ((0, _primitives.isDict)(openActionDict, 'Action')) { - var actionType = openActionDict.get('S'); - if ((0, _primitives.isName)(actionType, 'Named')) { - var action = openActionDict.get('N'); - if ((0, _primitives.isName)(action, 'Print')) { - if (!javaScript) { - javaScript = []; - } - javaScript.push('print({});'); - } - } else { - appendIfJavaScriptDict(openActionDict); - } - } - return (0, _util.shadow)(this, 'javaScript', javaScript); - } - }], [{ - key: 'parseDestDictionary', - value: function parseDestDictionary(params) { - function addDefaultProtocolToUrl(url) { - if (url.indexOf('www.') === 0) { - return 'http://' + url; - } - return url; - } - function tryConvertUrlEncoding(url) { - try { - return (0, _util.stringToUTF8String)(url); - } catch (e) { - return url; - } - } - var destDict = params.destDict; - if (!(0, _primitives.isDict)(destDict)) { - (0, _util.warn)('parseDestDictionary: `destDict` must be a dictionary.'); - return; - } - var resultObj = params.resultObj; - if ((typeof resultObj === 'undefined' ? 'undefined' : _typeof(resultObj)) !== 'object') { - (0, _util.warn)('parseDestDictionary: `resultObj` must be an object.'); - return; - } - var docBaseUrl = params.docBaseUrl || null; - var action = destDict.get('A'), - url = void 0, - dest = void 0; - if (!(0, _primitives.isDict)(action) && destDict.has('Dest')) { - action = destDict.get('Dest'); - } - if ((0, _primitives.isDict)(action)) { - var actionType = action.get('S'); - if (!(0, _primitives.isName)(actionType)) { - (0, _util.warn)('parseDestDictionary: Invalid type in Action dictionary.'); - return; - } - var actionName = actionType.name; - switch (actionName) { - case 'URI': - url = action.get('URI'); - if ((0, _primitives.isName)(url)) { - url = '/' + url.name; - } else if ((0, _util.isString)(url)) { - url = addDefaultProtocolToUrl(url); - } - break; - case 'GoTo': - dest = action.get('D'); - break; - case 'Launch': - case 'GoToR': - var urlDict = action.get('F'); - if ((0, _primitives.isDict)(urlDict)) { - url = urlDict.get('F') || null; - } else if ((0, _util.isString)(urlDict)) { - url = urlDict; - } - var remoteDest = action.get('D'); - if (remoteDest) { - if ((0, _primitives.isName)(remoteDest)) { - remoteDest = remoteDest.name; - } - if ((0, _util.isString)(url)) { - var baseUrl = url.split('#')[0]; - if ((0, _util.isString)(remoteDest)) { - url = baseUrl + '#' + remoteDest; - } else if (Array.isArray(remoteDest)) { - url = baseUrl + '#' + JSON.stringify(remoteDest); - } - } - } - var newWindow = action.get('NewWindow'); - if ((0, _util.isBool)(newWindow)) { - resultObj.newWindow = newWindow; - } - break; - case 'Named': - var namedAction = action.get('N'); - if ((0, _primitives.isName)(namedAction)) { - resultObj.action = namedAction.name; - } - break; - case 'JavaScript': - var jsAction = action.get('JS'); - var js = void 0; - if ((0, _primitives.isStream)(jsAction)) { - js = (0, _util.bytesToString)(jsAction.getBytes()); - } else if ((0, _util.isString)(jsAction)) { - js = jsAction; - } - if (js) { - var URL_OPEN_METHODS = ['app.launchURL', 'window.open']; - var regex = new RegExp('^\\s*(' + URL_OPEN_METHODS.join('|').split('.').join('\\.') + ')\\((?:\'|\")([^\'\"]*)(?:\'|\")(?:,\\s*(\\w+)\\)|\\))', 'i'); - var jsUrl = regex.exec((0, _util.stringToPDFString)(js)); - if (jsUrl && jsUrl[2]) { - url = jsUrl[2]; - if (jsUrl[3] === 'true' && jsUrl[1] === 'app.launchURL') { - resultObj.newWindow = true; - } - break; - } - } - default: - (0, _util.warn)('parseDestDictionary: unsupported action type "' + actionName + '".'); - break; - } - } else if (destDict.has('Dest')) { - dest = destDict.get('Dest'); - } - if ((0, _util.isString)(url)) { - url = tryConvertUrlEncoding(url); - var absoluteUrl = (0, _util.createValidAbsoluteUrl)(url, docBaseUrl); - if (absoluteUrl) { - resultObj.url = absoluteUrl.href; - } - resultObj.unsafeUrl = url; - } - if (dest) { - if ((0, _primitives.isName)(dest)) { - dest = dest.name; - } - if ((0, _util.isString)(dest) || Array.isArray(dest)) { - resultObj.dest = dest; - } - } - } - }]); - - return Catalog; -}(); - -var XRef = function XRefClosure() { - function XRef(stream, pdfManager) { - this.stream = stream; - this.pdfManager = pdfManager; - this.entries = []; - this.xrefstms = Object.create(null); - this.cache = []; - this.stats = { - streamTypes: [], - fontTypes: [] - }; - } - XRef.prototype = { - setStartXRef: function XRef_setStartXRef(startXRef) { - this.startXRefQueue = [startXRef]; - }, - parse: function XRef_parse(recoveryMode) { - var trailerDict; - if (!recoveryMode) { - trailerDict = this.readXRef(); - } else { - (0, _util.warn)('Indexing all PDF objects'); - trailerDict = this.indexObjects(); - } - trailerDict.assignXref(this); - this.trailer = trailerDict; - var encrypt = void 0; - try { - encrypt = trailerDict.get('Encrypt'); - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - (0, _util.warn)('XRef.parse - Invalid "Encrypt" reference: "' + ex + '".'); - } - if ((0, _primitives.isDict)(encrypt)) { - var ids = trailerDict.get('ID'); - var fileId = ids && ids.length ? ids[0] : ''; - encrypt.suppressEncryption = true; - this.encrypt = new _crypto.CipherTransformFactory(encrypt, fileId, this.pdfManager.password); - } - var root = void 0; - try { - root = trailerDict.get('Root'); - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - (0, _util.warn)('XRef.parse - Invalid "Root" reference: "' + ex + '".'); - } - if ((0, _primitives.isDict)(root) && root.has('Pages')) { - this.root = root; - } else { - if (!recoveryMode) { - throw new _util.XRefParseException(); - } - throw new _util.FormatError('Invalid root reference'); - } - }, - processXRefTable: function XRef_processXRefTable(parser) { - if (!('tableState' in this)) { - this.tableState = { - entryNum: 0, - streamPos: parser.lexer.stream.pos, - parserBuf1: parser.buf1, - parserBuf2: parser.buf2 - }; - } - var obj = this.readXRefTable(parser); - if (!(0, _primitives.isCmd)(obj, 'trailer')) { - throw new _util.FormatError('Invalid XRef table: could not find trailer dictionary'); - } - var dict = parser.getObj(); - if (!(0, _primitives.isDict)(dict) && dict.dict) { - dict = dict.dict; - } - if (!(0, _primitives.isDict)(dict)) { - throw new _util.FormatError('Invalid XRef table: could not parse trailer dictionary'); - } - delete this.tableState; - return dict; - }, - readXRefTable: function XRef_readXRefTable(parser) { - var stream = parser.lexer.stream; - var tableState = this.tableState; - stream.pos = tableState.streamPos; - parser.buf1 = tableState.parserBuf1; - parser.buf2 = tableState.parserBuf2; - var obj; - while (true) { - if (!('firstEntryNum' in tableState) || !('entryCount' in tableState)) { - if ((0, _primitives.isCmd)(obj = parser.getObj(), 'trailer')) { - break; - } - tableState.firstEntryNum = obj; - tableState.entryCount = parser.getObj(); - } - var first = tableState.firstEntryNum; - var count = tableState.entryCount; - if (!Number.isInteger(first) || !Number.isInteger(count)) { - throw new _util.FormatError('Invalid XRef table: wrong types in subsection header'); - } - for (var i = tableState.entryNum; i < count; i++) { - tableState.streamPos = stream.pos; - tableState.entryNum = i; - tableState.parserBuf1 = parser.buf1; - tableState.parserBuf2 = parser.buf2; - var entry = {}; - entry.offset = parser.getObj(); - entry.gen = parser.getObj(); - var type = parser.getObj(); - if ((0, _primitives.isCmd)(type, 'f')) { - entry.free = true; - } else if ((0, _primitives.isCmd)(type, 'n')) { - entry.uncompressed = true; - } - if (!Number.isInteger(entry.offset) || !Number.isInteger(entry.gen) || !(entry.free || entry.uncompressed)) { - throw new _util.FormatError('Invalid entry in XRef subsection: ' + first + ', ' + count); - } - if (i === 0 && entry.free && first === 1) { - first = 0; - } - if (!this.entries[i + first]) { - this.entries[i + first] = entry; - } - } - tableState.entryNum = 0; - tableState.streamPos = stream.pos; - tableState.parserBuf1 = parser.buf1; - tableState.parserBuf2 = parser.buf2; - delete tableState.firstEntryNum; - delete tableState.entryCount; - } - if (this.entries[0] && !this.entries[0].free) { - throw new _util.FormatError('Invalid XRef table: unexpected first object'); - } - return obj; - }, - processXRefStream: function XRef_processXRefStream(stream) { - if (!('streamState' in this)) { - var streamParameters = stream.dict; - var byteWidths = streamParameters.get('W'); - var range = streamParameters.get('Index'); - if (!range) { - range = [0, streamParameters.get('Size')]; - } - this.streamState = { - entryRanges: range, - byteWidths: byteWidths, - entryNum: 0, - streamPos: stream.pos - }; - } - this.readXRefStream(stream); - delete this.streamState; - return stream.dict; - }, - readXRefStream: function XRef_readXRefStream(stream) { - var i, j; - var streamState = this.streamState; - stream.pos = streamState.streamPos; - var byteWidths = streamState.byteWidths; - var typeFieldWidth = byteWidths[0]; - var offsetFieldWidth = byteWidths[1]; - var generationFieldWidth = byteWidths[2]; - var entryRanges = streamState.entryRanges; - while (entryRanges.length > 0) { - var first = entryRanges[0]; - var n = entryRanges[1]; - if (!Number.isInteger(first) || !Number.isInteger(n)) { - throw new _util.FormatError('Invalid XRef range fields: ' + first + ', ' + n); - } - if (!Number.isInteger(typeFieldWidth) || !Number.isInteger(offsetFieldWidth) || !Number.isInteger(generationFieldWidth)) { - throw new _util.FormatError('Invalid XRef entry fields length: ' + first + ', ' + n); - } - for (i = streamState.entryNum; i < n; ++i) { - streamState.entryNum = i; - streamState.streamPos = stream.pos; - var type = 0, - offset = 0, - generation = 0; - for (j = 0; j < typeFieldWidth; ++j) { - type = type << 8 | stream.getByte(); - } - if (typeFieldWidth === 0) { - type = 1; - } - for (j = 0; j < offsetFieldWidth; ++j) { - offset = offset << 8 | stream.getByte(); - } - for (j = 0; j < generationFieldWidth; ++j) { - generation = generation << 8 | stream.getByte(); - } - var entry = {}; - entry.offset = offset; - entry.gen = generation; - switch (type) { - case 0: - entry.free = true; - break; - case 1: - entry.uncompressed = true; - break; - case 2: - break; - default: - throw new _util.FormatError('Invalid XRef entry type: ' + type); - } - if (!this.entries[first + i]) { - this.entries[first + i] = entry; - } - } - streamState.entryNum = 0; - streamState.streamPos = stream.pos; - entryRanges.splice(0, 2); - } - }, - indexObjects: function XRef_indexObjects() { - var TAB = 0x9, - LF = 0xA, - CR = 0xD, - SPACE = 0x20; - var PERCENT = 0x25, - LT = 0x3C; - function readToken(data, offset) { - var token = '', - ch = data[offset]; - while (ch !== LF && ch !== CR && ch !== LT) { - if (++offset >= data.length) { - break; - } - token += String.fromCharCode(ch); - ch = data[offset]; - } - return token; - } - function skipUntil(data, offset, what) { - var length = what.length, - dataLength = data.length; - var skipped = 0; - while (offset < dataLength) { - var i = 0; - while (i < length && data[offset + i] === what[i]) { - ++i; - } - if (i >= length) { - break; - } - offset++; - skipped++; - } - return skipped; - } - var objRegExp = /^(\d+)\s+(\d+)\s+obj\b/; - var endobjRegExp = /\bendobj[\b\s]$/; - var nestedObjRegExp = /\s+(\d+\s+\d+\s+obj[\b\s])$/; - var CHECK_CONTENT_LENGTH = 25; - var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]); - var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114, 101, 102]); - var objBytes = new Uint8Array([111, 98, 106]); - var xrefBytes = new Uint8Array([47, 88, 82, 101, 102]); - this.entries.length = 0; - var stream = this.stream; - stream.pos = 0; - var buffer = stream.getBytes(); - var position = stream.start, - length = buffer.length; - var trailers = [], - xrefStms = []; - while (position < length) { - var ch = buffer[position]; - if (ch === TAB || ch === LF || ch === CR || ch === SPACE) { - ++position; - continue; - } - if (ch === PERCENT) { - do { - ++position; - if (position >= length) { - break; - } - ch = buffer[position]; - } while (ch !== LF && ch !== CR); - continue; - } - var token = readToken(buffer, position); - var m; - if (token.indexOf('xref') === 0 && (token.length === 4 || /\s/.test(token[4]))) { - position += skipUntil(buffer, position, trailerBytes); - trailers.push(position); - position += skipUntil(buffer, position, startxrefBytes); - } else if (m = objRegExp.exec(token)) { - if (typeof this.entries[m[1]] === 'undefined') { - this.entries[m[1]] = { - offset: position - stream.start, - gen: m[2] | 0, - uncompressed: true - }; - } - var contentLength = void 0, - startPos = position + token.length; - while (startPos < buffer.length) { - var endPos = startPos + skipUntil(buffer, startPos, objBytes) + 4; - contentLength = endPos - position; - var checkPos = Math.max(endPos - CHECK_CONTENT_LENGTH, startPos); - var tokenStr = (0, _util.bytesToString)(buffer.subarray(checkPos, endPos)); - if (endobjRegExp.test(tokenStr)) { - break; - } else { - var objToken = nestedObjRegExp.exec(tokenStr); - if (objToken && objToken[1]) { - (0, _util.warn)('indexObjects: Found new "obj" inside of another "obj", ' + 'caused by missing "endobj" -- trying to recover.'); - contentLength -= objToken[1].length; - break; - } - } - startPos = endPos; - } - var content = buffer.subarray(position, position + contentLength); - var xrefTagOffset = skipUntil(content, 0, xrefBytes); - if (xrefTagOffset < contentLength && content[xrefTagOffset + 5] < 64) { - xrefStms.push(position - stream.start); - this.xrefstms[position - stream.start] = 1; - } - position += contentLength; - } else if (token.indexOf('trailer') === 0 && (token.length === 7 || /\s/.test(token[7]))) { - trailers.push(position); - position += skipUntil(buffer, position, startxrefBytes); - } else { - position += token.length + 1; - } - } - var i, ii; - for (i = 0, ii = xrefStms.length; i < ii; ++i) { - this.startXRefQueue.push(xrefStms[i]); - this.readXRef(true); - } - var trailerDict = void 0; - for (i = 0, ii = trailers.length; i < ii; ++i) { - stream.pos = trailers[i]; - var parser = new _parser.Parser(new _parser.Lexer(stream), true, this, true); - var obj = parser.getObj(); - if (!(0, _primitives.isCmd)(obj, 'trailer')) { - continue; - } - var dict = parser.getObj(); - if (!(0, _primitives.isDict)(dict)) { - continue; - } - var rootDict = void 0; - try { - rootDict = dict.get('Root'); - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - continue; - } - if (!(0, _primitives.isDict)(rootDict) || !rootDict.has('Pages')) { - continue; - } - if (dict.has('ID')) { - return dict; - } - trailerDict = dict; - } - if (trailerDict) { - return trailerDict; - } - throw new _util.InvalidPDFException('Invalid PDF structure'); - }, - readXRef: function XRef_readXRef(recoveryMode) { - var stream = this.stream; - var startXRefParsedCache = Object.create(null); - try { - while (this.startXRefQueue.length) { - var startXRef = this.startXRefQueue[0]; - if (startXRefParsedCache[startXRef]) { - (0, _util.warn)('readXRef - skipping XRef table since it was already parsed.'); - this.startXRefQueue.shift(); - continue; - } - startXRefParsedCache[startXRef] = true; - stream.pos = startXRef + stream.start; - var parser = new _parser.Parser(new _parser.Lexer(stream), true, this); - var obj = parser.getObj(); - var dict; - if ((0, _primitives.isCmd)(obj, 'xref')) { - dict = this.processXRefTable(parser); - if (!this.topDict) { - this.topDict = dict; - } - obj = dict.get('XRefStm'); - if (Number.isInteger(obj)) { - var pos = obj; - if (!(pos in this.xrefstms)) { - this.xrefstms[pos] = 1; - this.startXRefQueue.push(pos); - } - } - } else if (Number.isInteger(obj)) { - if (!Number.isInteger(parser.getObj()) || !(0, _primitives.isCmd)(parser.getObj(), 'obj') || !(0, _primitives.isStream)(obj = parser.getObj())) { - throw new _util.FormatError('Invalid XRef stream'); - } - dict = this.processXRefStream(obj); - if (!this.topDict) { - this.topDict = dict; - } - if (!dict) { - throw new _util.FormatError('Failed to read XRef stream'); - } - } else { - throw new _util.FormatError('Invalid XRef stream header'); - } - obj = dict.get('Prev'); - if (Number.isInteger(obj)) { - this.startXRefQueue.push(obj); - } else if ((0, _primitives.isRef)(obj)) { - this.startXRefQueue.push(obj.num); - } - this.startXRefQueue.shift(); - } - return this.topDict; - } catch (e) { - if (e instanceof _util.MissingDataException) { - throw e; - } - (0, _util.info)('(while reading XRef): ' + e); - } - if (recoveryMode) { - return; - } - throw new _util.XRefParseException(); - }, - getEntry: function XRef_getEntry(i) { - var xrefEntry = this.entries[i]; - if (xrefEntry && !xrefEntry.free && xrefEntry.offset) { - return xrefEntry; - } - return null; - }, - fetchIfRef: function XRef_fetchIfRef(obj, suppressEncryption) { - if (!(0, _primitives.isRef)(obj)) { - return obj; - } - return this.fetch(obj, suppressEncryption); - }, - fetch: function XRef_fetch(ref, suppressEncryption) { - if (!(0, _primitives.isRef)(ref)) { - throw new Error('ref object is not a reference'); - } - var num = ref.num; - if (num in this.cache) { - var cacheEntry = this.cache[num]; - if (cacheEntry instanceof _primitives.Dict && !cacheEntry.objId) { - cacheEntry.objId = ref.toString(); - } - return cacheEntry; - } - var xrefEntry = this.getEntry(num); - if (xrefEntry === null) { - return this.cache[num] = null; - } - if (xrefEntry.uncompressed) { - xrefEntry = this.fetchUncompressed(ref, xrefEntry, suppressEncryption); - } else { - xrefEntry = this.fetchCompressed(xrefEntry, suppressEncryption); - } - if ((0, _primitives.isDict)(xrefEntry)) { - xrefEntry.objId = ref.toString(); - } else if ((0, _primitives.isStream)(xrefEntry)) { - xrefEntry.dict.objId = ref.toString(); - } - return xrefEntry; - }, - fetchUncompressed: function XRef_fetchUncompressed(ref, xrefEntry, suppressEncryption) { - var gen = ref.gen; - var num = ref.num; - if (xrefEntry.gen !== gen) { - throw new _util.FormatError('inconsistent generation in XRef'); - } - var stream = this.stream.makeSubStream(xrefEntry.offset + this.stream.start); - var parser = new _parser.Parser(new _parser.Lexer(stream), true, this); - var obj1 = parser.getObj(); - var obj2 = parser.getObj(); - var obj3 = parser.getObj(); - if (!Number.isInteger(obj1)) { - obj1 = parseInt(obj1, 10); - } - if (!Number.isInteger(obj2)) { - obj2 = parseInt(obj2, 10); - } - if (obj1 !== num || obj2 !== gen || !(0, _primitives.isCmd)(obj3)) { - throw new _util.FormatError('bad XRef entry'); - } - if (obj3.cmd !== 'obj') { - if (obj3.cmd.indexOf('obj') === 0) { - num = parseInt(obj3.cmd.substring(3), 10); - if (!Number.isNaN(num)) { - return num; - } - } - throw new _util.FormatError('bad XRef entry'); - } - if (this.encrypt && !suppressEncryption) { - xrefEntry = parser.getObj(this.encrypt.createCipherTransform(num, gen)); - } else { - xrefEntry = parser.getObj(); - } - if (!(0, _primitives.isStream)(xrefEntry)) { - this.cache[num] = xrefEntry; - } - return xrefEntry; - }, - fetchCompressed: function XRef_fetchCompressed(xrefEntry, suppressEncryption) { - var tableOffset = xrefEntry.offset; - var stream = this.fetch(new _primitives.Ref(tableOffset, 0)); - if (!(0, _primitives.isStream)(stream)) { - throw new _util.FormatError('bad ObjStm stream'); - } - var first = stream.dict.get('First'); - var n = stream.dict.get('N'); - if (!Number.isInteger(first) || !Number.isInteger(n)) { - throw new _util.FormatError('invalid first and n parameters for ObjStm stream'); - } - var parser = new _parser.Parser(new _parser.Lexer(stream), false, this); - parser.allowStreams = true; - var i, - entries = [], - num, - nums = []; - for (i = 0; i < n; ++i) { - num = parser.getObj(); - if (!Number.isInteger(num)) { - throw new _util.FormatError('invalid object number in the ObjStm stream: ' + num); - } - nums.push(num); - var offset = parser.getObj(); - if (!Number.isInteger(offset)) { - throw new _util.FormatError('invalid object offset in the ObjStm stream: ' + offset); - } - } - for (i = 0; i < n; ++i) { - entries.push(parser.getObj()); - if ((0, _primitives.isCmd)(parser.buf1, 'endobj')) { - parser.shift(); - } - num = nums[i]; - var entry = this.entries[num]; - if (entry && entry.offset === tableOffset && entry.gen === i) { - this.cache[num] = entries[i]; - } - } - xrefEntry = entries[xrefEntry.gen]; - if (xrefEntry === undefined) { - throw new _util.FormatError('bad XRef entry for compressed object'); - } - return xrefEntry; - }, - fetchIfRefAsync: function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee(obj, suppressEncryption) { - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if ((0, _primitives.isRef)(obj)) { - _context.next = 2; - break; - } - - return _context.abrupt('return', obj); - - case 2: - return _context.abrupt('return', this.fetchAsync(obj, suppressEncryption)); - - case 3: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); - - function fetchIfRefAsync(_x, _x2) { - return _ref.apply(this, arguments); - } - - return fetchIfRefAsync; - }(), - fetchAsync: function () { - var _ref2 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee2(ref, suppressEncryption) { - return _regenerator2.default.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - _context2.prev = 0; - return _context2.abrupt('return', this.fetch(ref, suppressEncryption)); - - case 4: - _context2.prev = 4; - _context2.t0 = _context2['catch'](0); - - if (_context2.t0 instanceof _util.MissingDataException) { - _context2.next = 8; - break; - } - - throw _context2.t0; - - case 8: - _context2.next = 10; - return this.pdfManager.requestRange(_context2.t0.begin, _context2.t0.end); - - case 10: - return _context2.abrupt('return', this.fetchAsync(ref, suppressEncryption)); - - case 11: - case 'end': - return _context2.stop(); - } - } - }, _callee2, this, [[0, 4]]); - })); - - function fetchAsync(_x3, _x4) { - return _ref2.apply(this, arguments); - } - - return fetchAsync; - }(), - - getCatalogObj: function XRef_getCatalogObj() { - return this.root; - } - }; - return XRef; -}(); - -var NameOrNumberTree = function () { - function NameOrNumberTree(root, xref, type) { - _classCallCheck(this, NameOrNumberTree); - - if (this.constructor === NameOrNumberTree) { - (0, _util.unreachable)('Cannot initialize NameOrNumberTree.'); - } - this.root = root; - this.xref = xref; - this._type = type; - } - - _createClass(NameOrNumberTree, [{ - key: 'getAll', - value: function getAll() { - var dict = Object.create(null); - if (!this.root) { - return dict; - } - var xref = this.xref; - var processed = new _primitives.RefSet(); - processed.put(this.root); - var queue = [this.root]; - while (queue.length > 0) { - var obj = xref.fetchIfRef(queue.shift()); - if (!(0, _primitives.isDict)(obj)) { - continue; - } - if (obj.has('Kids')) { - var _kids = obj.get('Kids'); - for (var i = 0, ii = _kids.length; i < ii; i++) { - var kid = _kids[i]; - if (processed.has(kid)) { - throw new _util.FormatError('Duplicate entry in "' + this._type + '" tree.'); - } - queue.push(kid); - processed.put(kid); - } - continue; - } - var entries = obj.get(this._type); - if (Array.isArray(entries)) { - for (var _i2 = 0, _ii = entries.length; _i2 < _ii; _i2 += 2) { - dict[xref.fetchIfRef(entries[_i2])] = xref.fetchIfRef(entries[_i2 + 1]); - } - } - } - return dict; - } - }, { - key: 'get', - value: function get(key) { - if (!this.root) { - return null; - } - var xref = this.xref; - var kidsOrEntries = xref.fetchIfRef(this.root); - var loopCount = 0; - var MAX_LEVELS = 10; - while (kidsOrEntries.has('Kids')) { - if (++loopCount > MAX_LEVELS) { - (0, _util.warn)('Search depth limit reached for "' + this._type + '" tree.'); - return null; - } - var _kids2 = kidsOrEntries.get('Kids'); - if (!Array.isArray(_kids2)) { - return null; - } - var l = 0, - r = _kids2.length - 1; - while (l <= r) { - var m = l + r >> 1; - var kid = xref.fetchIfRef(_kids2[m]); - var limits = kid.get('Limits'); - if (key < xref.fetchIfRef(limits[0])) { - r = m - 1; - } else if (key > xref.fetchIfRef(limits[1])) { - l = m + 1; - } else { - kidsOrEntries = xref.fetchIfRef(_kids2[m]); - break; - } - } - if (l > r) { - return null; - } - } - var entries = kidsOrEntries.get(this._type); - if (Array.isArray(entries)) { - var _l = 0, - _r = entries.length - 2; - while (_l <= _r) { - var _m = _l + _r & ~1; - var currentKey = xref.fetchIfRef(entries[_m]); - if (key < currentKey) { - _r = _m - 2; - } else if (key > currentKey) { - _l = _m + 2; - } else { - return xref.fetchIfRef(entries[_m + 1]); - } - } - } - return null; - } - }]); - - return NameOrNumberTree; -}(); - -var NameTree = function (_NameOrNumberTree) { - _inherits(NameTree, _NameOrNumberTree); - - function NameTree(root, xref) { - _classCallCheck(this, NameTree); - - return _possibleConstructorReturn(this, (NameTree.__proto__ || Object.getPrototypeOf(NameTree)).call(this, root, xref, 'Names')); - } - - return NameTree; -}(NameOrNumberTree); - -var NumberTree = function (_NameOrNumberTree2) { - _inherits(NumberTree, _NameOrNumberTree2); - - function NumberTree(root, xref) { - _classCallCheck(this, NumberTree); - - return _possibleConstructorReturn(this, (NumberTree.__proto__ || Object.getPrototypeOf(NumberTree)).call(this, root, xref, 'Nums')); - } - - return NumberTree; -}(NameOrNumberTree); - -var FileSpec = function FileSpecClosure() { - function FileSpec(root, xref) { - if (!root || !(0, _primitives.isDict)(root)) { - return; - } - this.xref = xref; - this.root = root; - if (root.has('FS')) { - this.fs = root.get('FS'); - } - this.description = root.has('Desc') ? (0, _util.stringToPDFString)(root.get('Desc')) : ''; - if (root.has('RF')) { - (0, _util.warn)('Related file specifications are not supported'); - } - this.contentAvailable = true; - if (!root.has('EF')) { - this.contentAvailable = false; - (0, _util.warn)('Non-embedded file specifications are not supported'); - } - } - function pickPlatformItem(dict) { - if (dict.has('UF')) { - return dict.get('UF'); - } else if (dict.has('F')) { - return dict.get('F'); - } else if (dict.has('Unix')) { - return dict.get('Unix'); - } else if (dict.has('Mac')) { - return dict.get('Mac'); - } else if (dict.has('DOS')) { - return dict.get('DOS'); - } - return null; - } - FileSpec.prototype = { - get filename() { - if (!this._filename && this.root) { - var filename = pickPlatformItem(this.root) || 'unnamed'; - this._filename = (0, _util.stringToPDFString)(filename).replace(/\\\\/g, '\\').replace(/\\\//g, '/').replace(/\\/g, '/'); - } - return this._filename; - }, - get content() { - if (!this.contentAvailable) { - return null; - } - if (!this.contentRef && this.root) { - this.contentRef = pickPlatformItem(this.root.get('EF')); - } - var content = null; - if (this.contentRef) { - var xref = this.xref; - var fileObj = xref.fetchIfRef(this.contentRef); - if (fileObj && (0, _primitives.isStream)(fileObj)) { - content = fileObj.getBytes(); - } else { - (0, _util.warn)('Embedded file specification points to non-existing/invalid ' + 'content'); - } - } else { - (0, _util.warn)('Embedded file specification does not have a content'); - } - return content; - }, - get serializable() { - return { - filename: this.filename, - content: this.content - }; - } - }; - return FileSpec; -}(); -var ObjectLoader = function () { - function mayHaveChildren(value) { - return (0, _primitives.isRef)(value) || (0, _primitives.isDict)(value) || Array.isArray(value) || (0, _primitives.isStream)(value); - } - function addChildren(node, nodesToVisit) { - if ((0, _primitives.isDict)(node) || (0, _primitives.isStream)(node)) { - var dict = (0, _primitives.isDict)(node) ? node : node.dict; - var dictKeys = dict.getKeys(); - for (var i = 0, ii = dictKeys.length; i < ii; i++) { - var rawValue = dict.getRaw(dictKeys[i]); - if (mayHaveChildren(rawValue)) { - nodesToVisit.push(rawValue); - } - } - } else if (Array.isArray(node)) { - for (var _i3 = 0, _ii2 = node.length; _i3 < _ii2; _i3++) { - var value = node[_i3]; - if (mayHaveChildren(value)) { - nodesToVisit.push(value); - } - } - } - } - function ObjectLoader(dict, keys, xref) { - this.dict = dict; - this.keys = keys; - this.xref = xref; - this.refSet = null; - this.capability = null; - } - ObjectLoader.prototype = { - load: function load() { - this.capability = (0, _util.createPromiseCapability)(); - if (!(this.xref.stream instanceof _chunked_stream.ChunkedStream) || this.xref.stream.getMissingChunks().length === 0) { - this.capability.resolve(); - return this.capability.promise; - } - var keys = this.keys, - dict = this.dict; - - this.refSet = new _primitives.RefSet(); - var nodesToVisit = []; - for (var i = 0, ii = keys.length; i < ii; i++) { - var rawValue = dict.getRaw(keys[i]); - if (rawValue !== undefined) { - nodesToVisit.push(rawValue); - } - } - this._walk(nodesToVisit); - return this.capability.promise; - }, - _walk: function _walk(nodesToVisit) { - var _this4 = this; - - var nodesToRevisit = []; - var pendingRequests = []; - while (nodesToVisit.length) { - var _currentNode = nodesToVisit.pop(); - if ((0, _primitives.isRef)(_currentNode)) { - if (this.refSet.has(_currentNode)) { - continue; - } - try { - this.refSet.put(_currentNode); - _currentNode = this.xref.fetch(_currentNode); - } catch (ex) { - if (!(ex instanceof _util.MissingDataException)) { - throw ex; - } - nodesToRevisit.push(_currentNode); - pendingRequests.push({ - begin: ex.begin, - end: ex.end - }); - } - } - if (_currentNode && _currentNode.getBaseStreams) { - var baseStreams = _currentNode.getBaseStreams(); - var foundMissingData = false; - for (var i = 0, ii = baseStreams.length; i < ii; i++) { - var stream = baseStreams[i]; - if (stream.getMissingChunks && stream.getMissingChunks().length) { - foundMissingData = true; - pendingRequests.push({ - begin: stream.start, - end: stream.end - }); - } - } - if (foundMissingData) { - nodesToRevisit.push(_currentNode); - } - } - addChildren(_currentNode, nodesToVisit); - } - if (pendingRequests.length) { - this.xref.stream.manager.requestRanges(pendingRequests).then(function () { - for (var _i4 = 0, _ii3 = nodesToRevisit.length; _i4 < _ii3; _i4++) { - var node = nodesToRevisit[_i4]; - if ((0, _primitives.isRef)(node)) { - _this4.refSet.remove(node); - } - } - _this4._walk(nodesToRevisit); - }, this.capability.reject); - return; - } - this.refSet = null; - this.capability.resolve(); - } - }; - return ObjectLoader; -}(); -exports.Catalog = Catalog; -exports.ObjectLoader = ObjectLoader; -exports.XRef = XRef; -exports.FileSpec = FileSpec; - -/***/ }), -/* 138 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var EOF = {}; -var Name = function NameClosure() { - function Name(name) { - this.name = name; - } - Name.prototype = {}; - var nameCache = Object.create(null); - Name.get = function Name_get(name) { - var nameValue = nameCache[name]; - return nameValue ? nameValue : nameCache[name] = new Name(name); - }; - return Name; -}(); -var Cmd = function CmdClosure() { - function Cmd(cmd) { - this.cmd = cmd; - } - Cmd.prototype = {}; - var cmdCache = Object.create(null); - Cmd.get = function Cmd_get(cmd) { - var cmdValue = cmdCache[cmd]; - return cmdValue ? cmdValue : cmdCache[cmd] = new Cmd(cmd); - }; - return Cmd; -}(); -var Dict = function DictClosure() { - var nonSerializable = function nonSerializableClosure() { - return nonSerializable; - }; - function Dict(xref) { - this._map = Object.create(null); - this.xref = xref; - this.objId = null; - this.suppressEncryption = false; - this.__nonSerializable__ = nonSerializable; - } - Dict.prototype = { - assignXref: function Dict_assignXref(newXref) { - this.xref = newXref; - }, - get: function Dict_get(key1, key2, key3) { - var value; - var xref = this.xref, - suppressEncryption = this.suppressEncryption; - if (typeof (value = this._map[key1]) !== 'undefined' || key1 in this._map || typeof key2 === 'undefined') { - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - } - if (typeof (value = this._map[key2]) !== 'undefined' || key2 in this._map || typeof key3 === 'undefined') { - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - } - value = this._map[key3] || null; - return xref ? xref.fetchIfRef(value, suppressEncryption) : value; - }, - getAsync: function Dict_getAsync(key1, key2, key3) { - var value; - var xref = this.xref, - suppressEncryption = this.suppressEncryption; - if (typeof (value = this._map[key1]) !== 'undefined' || key1 in this._map || typeof key2 === 'undefined') { - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - return Promise.resolve(value); - } - if (typeof (value = this._map[key2]) !== 'undefined' || key2 in this._map || typeof key3 === 'undefined') { - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - return Promise.resolve(value); - } - value = this._map[key3] || null; - if (xref) { - return xref.fetchIfRefAsync(value, suppressEncryption); - } - return Promise.resolve(value); - }, - getArray: function Dict_getArray(key1, key2, key3) { - var value = this.get(key1, key2, key3); - var xref = this.xref, - suppressEncryption = this.suppressEncryption; - if (!Array.isArray(value) || !xref) { - return value; - } - value = value.slice(); - for (var i = 0, ii = value.length; i < ii; i++) { - if (!isRef(value[i])) { - continue; - } - value[i] = xref.fetch(value[i], suppressEncryption); - } - return value; - }, - getRaw: function Dict_getRaw(key) { - return this._map[key]; - }, - getKeys: function Dict_getKeys() { - return Object.keys(this._map); - }, - set: function Dict_set(key, value) { - this._map[key] = value; - }, - has: function Dict_has(key) { - return key in this._map; - }, - forEach: function Dict_forEach(callback) { - for (var key in this._map) { - callback(key, this.get(key)); - } - } - }; - Dict.empty = new Dict(null); - Dict.merge = function (xref, dictArray) { - var mergedDict = new Dict(xref); - for (var i = 0, ii = dictArray.length; i < ii; i++) { - var dict = dictArray[i]; - if (!isDict(dict)) { - continue; - } - for (var keyName in dict._map) { - if (mergedDict._map[keyName] !== undefined) { - continue; - } - mergedDict._map[keyName] = dict._map[keyName]; - } - } - return mergedDict; - }; - return Dict; -}(); -var Ref = function RefClosure() { - function Ref(num, gen) { - this.num = num; - this.gen = gen; - } - Ref.prototype = { - toString: function Ref_toString() { - var str = this.num + 'R'; - if (this.gen !== 0) { - str += this.gen; - } - return str; - } - }; - return Ref; -}(); -var RefSet = function RefSetClosure() { - function RefSet() { - this.dict = Object.create(null); - } - RefSet.prototype = { - has: function RefSet_has(ref) { - return ref.toString() in this.dict; - }, - put: function RefSet_put(ref) { - this.dict[ref.toString()] = true; - }, - remove: function RefSet_remove(ref) { - delete this.dict[ref.toString()]; - } - }; - return RefSet; -}(); -var RefSetCache = function RefSetCacheClosure() { - function RefSetCache() { - this.dict = Object.create(null); - } - RefSetCache.prototype = { - get: function RefSetCache_get(ref) { - return this.dict[ref.toString()]; - }, - has: function RefSetCache_has(ref) { - return ref.toString() in this.dict; - }, - put: function RefSetCache_put(ref, obj) { - this.dict[ref.toString()] = obj; - }, - putAlias: function RefSetCache_putAlias(ref, aliasRef) { - this.dict[ref.toString()] = this.get(aliasRef); - }, - forEach: function RefSetCache_forEach(fn, thisArg) { - for (var i in this.dict) { - fn.call(thisArg, this.dict[i]); - } - }, - clear: function RefSetCache_clear() { - this.dict = Object.create(null); - } - }; - return RefSetCache; -}(); -function isEOF(v) { - return v === EOF; -} -function isName(v, name) { - return v instanceof Name && (name === undefined || v.name === name); -} -function isCmd(v, cmd) { - return v instanceof Cmd && (cmd === undefined || v.cmd === cmd); -} -function isDict(v, type) { - return v instanceof Dict && (type === undefined || isName(v.get('Type'), type)); -} -function isRef(v) { - return v instanceof Ref; -} -function isRefsEqual(v1, v2) { - return v1.num === v2.num && v1.gen === v2.gen; -} -function isStream(v) { - return (typeof v === 'undefined' ? 'undefined' : _typeof(v)) === 'object' && v !== null && v.getBytes !== undefined; -} -exports.EOF = EOF; -exports.Cmd = Cmd; -exports.Dict = Dict; -exports.Name = Name; -exports.Ref = Ref; -exports.RefSet = RefSet; -exports.RefSetCache = RefSetCache; -exports.isEOF = isEOF; -exports.isCmd = isCmd; -exports.isDict = isDict; -exports.isName = isName; -exports.isRef = isRef; -exports.isRefsEqual = isRefsEqual; -exports.isStream = isStream; - -/***/ }), -/* 139 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Parser = exports.Linearization = exports.Lexer = undefined; - -var _stream = __w_pdfjs_require__(140); - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -var _ccitt_stream = __w_pdfjs_require__(141); - -var _jbig2_stream = __w_pdfjs_require__(143); - -var _jpeg_stream = __w_pdfjs_require__(146); - -var _jpx_stream = __w_pdfjs_require__(148); - -var MAX_LENGTH_TO_CACHE = 1000; -var MAX_ADLER32_LENGTH = 5552; -function computeAdler32(bytes) { - var bytesLength = bytes.length; - var a = 1, - b = 0; - for (var i = 0; i < bytesLength; ++i) { - a += bytes[i] & 0xFF; - b += a; - } - return b % 65521 << 16 | a % 65521; -} -var Parser = function ParserClosure() { - function Parser(lexer, allowStreams, xref, recoveryMode) { - this.lexer = lexer; - this.allowStreams = allowStreams; - this.xref = xref; - this.recoveryMode = recoveryMode || false; - this.imageCache = Object.create(null); - this.refill(); - } - Parser.prototype = { - refill: function Parser_refill() { - this.buf1 = this.lexer.getObj(); - this.buf2 = this.lexer.getObj(); - }, - shift: function Parser_shift() { - if ((0, _primitives.isCmd)(this.buf2, 'ID')) { - this.buf1 = this.buf2; - this.buf2 = null; - } else { - this.buf1 = this.buf2; - this.buf2 = this.lexer.getObj(); - } - }, - tryShift: function Parser_tryShift() { - try { - this.shift(); - return true; - } catch (e) { - if (e instanceof _util.MissingDataException) { - throw e; - } - return false; - } - }, - getObj: function Parser_getObj(cipherTransform) { - var buf1 = this.buf1; - this.shift(); - if (buf1 instanceof _primitives.Cmd) { - switch (buf1.cmd) { - case 'BI': - return this.makeInlineImage(cipherTransform); - case '[': - var array = []; - while (!(0, _primitives.isCmd)(this.buf1, ']') && !(0, _primitives.isEOF)(this.buf1)) { - array.push(this.getObj(cipherTransform)); - } - if ((0, _primitives.isEOF)(this.buf1)) { - if (!this.recoveryMode) { - throw new _util.FormatError('End of file inside array'); - } - return array; - } - this.shift(); - return array; - case '<<': - var dict = new _primitives.Dict(this.xref); - while (!(0, _primitives.isCmd)(this.buf1, '>>') && !(0, _primitives.isEOF)(this.buf1)) { - if (!(0, _primitives.isName)(this.buf1)) { - (0, _util.info)('Malformed dictionary: key must be a name object'); - this.shift(); - continue; - } - var key = this.buf1.name; - this.shift(); - if ((0, _primitives.isEOF)(this.buf1)) { - break; - } - dict.set(key, this.getObj(cipherTransform)); - } - if ((0, _primitives.isEOF)(this.buf1)) { - if (!this.recoveryMode) { - throw new _util.FormatError('End of file inside dictionary'); - } - return dict; - } - if ((0, _primitives.isCmd)(this.buf2, 'stream')) { - return this.allowStreams ? this.makeStream(dict, cipherTransform) : dict; - } - this.shift(); - return dict; - default: - return buf1; - } - } - if (Number.isInteger(buf1)) { - var num = buf1; - if (Number.isInteger(this.buf1) && (0, _primitives.isCmd)(this.buf2, 'R')) { - var ref = new _primitives.Ref(num, this.buf1); - this.shift(); - this.shift(); - return ref; - } - return num; - } - if ((0, _util.isString)(buf1)) { - var str = buf1; - if (cipherTransform) { - str = cipherTransform.decryptString(str); - } - return str; - } - return buf1; - }, - findDefaultInlineStreamEnd: function findDefaultInlineStreamEnd(stream) { - var E = 0x45, - I = 0x49, - SPACE = 0x20, - LF = 0xA, - CR = 0xD; - var n = 10, - NUL = 0x0; - var startPos = stream.pos, - state = 0, - ch = void 0, - maybeEIPos = void 0; - while ((ch = stream.getByte()) !== -1) { - if (state === 0) { - state = ch === E ? 1 : 0; - } else if (state === 1) { - state = ch === I ? 2 : 0; - } else { - (0, _util.assert)(state === 2); - if (ch === SPACE || ch === LF || ch === CR) { - maybeEIPos = stream.pos; - var followingBytes = stream.peekBytes(n); - for (var i = 0, ii = followingBytes.length; i < ii; i++) { - ch = followingBytes[i]; - if (ch === NUL && followingBytes[i + 1] !== NUL) { - continue; - } - if (ch !== LF && ch !== CR && (ch < SPACE || ch > 0x7F)) { - state = 0; - break; - } - } - if (state === 2) { - break; - } - } else { - state = 0; - } - } - } - if (ch === -1) { - (0, _util.warn)('findDefaultInlineStreamEnd: ' + 'Reached the end of the stream without finding a valid EI marker'); - if (maybeEIPos) { - (0, _util.warn)('... trying to recover by using the last "EI" occurrence.'); - stream.skip(-(stream.pos - maybeEIPos)); - } - } - return stream.pos - 4 - startPos; - }, - - findDCTDecodeInlineStreamEnd: function Parser_findDCTDecodeInlineStreamEnd(stream) { - var startPos = stream.pos, - foundEOI = false, - b, - markerLength, - length; - while ((b = stream.getByte()) !== -1) { - if (b !== 0xFF) { - continue; - } - switch (stream.getByte()) { - case 0x00: - break; - case 0xFF: - stream.skip(-1); - break; - case 0xD9: - foundEOI = true; - break; - case 0xC0: - case 0xC1: - case 0xC2: - case 0xC3: - case 0xC5: - case 0xC6: - case 0xC7: - case 0xC9: - case 0xCA: - case 0xCB: - case 0xCD: - case 0xCE: - case 0xCF: - case 0xC4: - case 0xCC: - case 0xDA: - case 0xDB: - case 0xDC: - case 0xDD: - case 0xDE: - case 0xDF: - case 0xE0: - case 0xE1: - case 0xE2: - case 0xE3: - case 0xE4: - case 0xE5: - case 0xE6: - case 0xE7: - case 0xE8: - case 0xE9: - case 0xEA: - case 0xEB: - case 0xEC: - case 0xED: - case 0xEE: - case 0xEF: - case 0xFE: - markerLength = stream.getUint16(); - if (markerLength > 2) { - stream.skip(markerLength - 2); - } else { - stream.skip(-2); - } - break; - } - if (foundEOI) { - break; - } - } - length = stream.pos - startPos; - if (b === -1) { - (0, _util.warn)('Inline DCTDecode image stream: ' + 'EOI marker not found, searching for /EI/ instead.'); - stream.skip(-length); - return this.findDefaultInlineStreamEnd(stream); - } - this.inlineStreamSkipEI(stream); - return length; - }, - findASCII85DecodeInlineStreamEnd: function Parser_findASCII85DecodeInlineStreamEnd(stream) { - var TILDE = 0x7E, - GT = 0x3E; - var startPos = stream.pos, - ch, - length; - while ((ch = stream.getByte()) !== -1) { - if (ch === TILDE && stream.peekByte() === GT) { - stream.skip(); - break; - } - } - length = stream.pos - startPos; - if (ch === -1) { - (0, _util.warn)('Inline ASCII85Decode image stream: ' + 'EOD marker not found, searching for /EI/ instead.'); - stream.skip(-length); - return this.findDefaultInlineStreamEnd(stream); - } - this.inlineStreamSkipEI(stream); - return length; - }, - findASCIIHexDecodeInlineStreamEnd: function Parser_findASCIIHexDecodeInlineStreamEnd(stream) { - var GT = 0x3E; - var startPos = stream.pos, - ch, - length; - while ((ch = stream.getByte()) !== -1) { - if (ch === GT) { - break; - } - } - length = stream.pos - startPos; - if (ch === -1) { - (0, _util.warn)('Inline ASCIIHexDecode image stream: ' + 'EOD marker not found, searching for /EI/ instead.'); - stream.skip(-length); - return this.findDefaultInlineStreamEnd(stream); - } - this.inlineStreamSkipEI(stream); - return length; - }, - inlineStreamSkipEI: function Parser_inlineStreamSkipEI(stream) { - var E = 0x45, - I = 0x49; - var state = 0, - ch; - while ((ch = stream.getByte()) !== -1) { - if (state === 0) { - state = ch === E ? 1 : 0; - } else if (state === 1) { - state = ch === I ? 2 : 0; - } else if (state === 2) { - break; - } - } - }, - makeInlineImage: function Parser_makeInlineImage(cipherTransform) { - var lexer = this.lexer; - var stream = lexer.stream; - var dict = new _primitives.Dict(this.xref), - dictLength = void 0; - while (!(0, _primitives.isCmd)(this.buf1, 'ID') && !(0, _primitives.isEOF)(this.buf1)) { - if (!(0, _primitives.isName)(this.buf1)) { - throw new _util.FormatError('Dictionary key must be a name object'); - } - var key = this.buf1.name; - this.shift(); - if ((0, _primitives.isEOF)(this.buf1)) { - break; - } - dict.set(key, this.getObj(cipherTransform)); - } - if (lexer.beginInlineImagePos !== -1) { - dictLength = stream.pos - lexer.beginInlineImagePos; - } - var filter = dict.get('Filter', 'F'), - filterName; - if ((0, _primitives.isName)(filter)) { - filterName = filter.name; - } else if (Array.isArray(filter)) { - var filterZero = this.xref.fetchIfRef(filter[0]); - if ((0, _primitives.isName)(filterZero)) { - filterName = filterZero.name; - } - } - var startPos = stream.pos, - length = void 0; - if (filterName === 'DCTDecode' || filterName === 'DCT') { - length = this.findDCTDecodeInlineStreamEnd(stream); - } else if (filterName === 'ASCII85Decode' || filterName === 'A85') { - length = this.findASCII85DecodeInlineStreamEnd(stream); - } else if (filterName === 'ASCIIHexDecode' || filterName === 'AHx') { - length = this.findASCIIHexDecodeInlineStreamEnd(stream); - } else { - length = this.findDefaultInlineStreamEnd(stream); - } - var imageStream = stream.makeSubStream(startPos, length, dict); - var cacheKey = void 0; - if (length < MAX_LENGTH_TO_CACHE && dictLength < MAX_ADLER32_LENGTH) { - var imageBytes = imageStream.getBytes(); - imageStream.reset(); - var initialStreamPos = stream.pos; - stream.pos = lexer.beginInlineImagePos; - var dictBytes = stream.getBytes(dictLength); - stream.pos = initialStreamPos; - cacheKey = computeAdler32(imageBytes) + '_' + computeAdler32(dictBytes); - var cacheEntry = this.imageCache[cacheKey]; - if (cacheEntry !== undefined) { - this.buf2 = _primitives.Cmd.get('EI'); - this.shift(); - cacheEntry.reset(); - return cacheEntry; - } - } - if (cipherTransform) { - imageStream = cipherTransform.createStream(imageStream, length); - } - imageStream = this.filter(imageStream, dict, length); - imageStream.dict = dict; - if (cacheKey !== undefined) { - imageStream.cacheKey = 'inline_' + length + '_' + cacheKey; - this.imageCache[cacheKey] = imageStream; - } - this.buf2 = _primitives.Cmd.get('EI'); - this.shift(); - return imageStream; - }, - _findStreamLength: function _findStreamLength(startPos, signature) { - var stream = this.lexer.stream; - - stream.pos = startPos; - var SCAN_BLOCK_LENGTH = 2048; - var signatureLength = signature.length; - while (stream.pos < stream.end) { - var scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); - var scanLength = scanBytes.length - signatureLength; - if (scanLength <= 0) { - break; - } - var pos = 0; - while (pos < scanLength) { - var j = 0; - while (j < signatureLength && scanBytes[pos + j] === signature[j]) { - j++; - } - if (j >= signatureLength) { - stream.pos += pos; - return stream.pos - startPos; - } - pos++; - } - stream.pos += scanLength; - } - return -1; - }, - - makeStream: function Parser_makeStream(dict, cipherTransform) { - var lexer = this.lexer; - var stream = lexer.stream; - lexer.skipToNextLine(); - var startPos = stream.pos - 1; - var length = dict.get('Length'); - if (!Number.isInteger(length)) { - (0, _util.info)('Bad ' + length + ' attribute in stream'); - length = 0; - } - stream.pos = startPos + length; - lexer.nextChar(); - if (this.tryShift() && (0, _primitives.isCmd)(this.buf2, 'endstream')) { - this.shift(); - } else { - var ENDSTREAM_SIGNATURE = new Uint8Array([0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6D]); - var actualLength = this._findStreamLength(startPos, ENDSTREAM_SIGNATURE); - if (actualLength < 0) { - var MAX_TRUNCATION = 1; - for (var i = 1; i <= MAX_TRUNCATION; i++) { - var end = ENDSTREAM_SIGNATURE.length - i; - var TRUNCATED_SIGNATURE = ENDSTREAM_SIGNATURE.slice(0, end); - var maybeLength = this._findStreamLength(startPos, TRUNCATED_SIGNATURE); - if (maybeLength >= 0) { - var lastByte = stream.peekBytes(end + 1)[end]; - if (!(0, _util.isSpace)(lastByte)) { - break; - } - (0, _util.info)('Found "' + (0, _util.bytesToString)(TRUNCATED_SIGNATURE) + '" when ' + 'searching for endstream command.'); - actualLength = maybeLength; - break; - } - } - if (actualLength < 0) { - throw new _util.FormatError('Missing endstream command.'); - } - } - length = actualLength; - lexer.nextChar(); - this.shift(); - this.shift(); - } - this.shift(); - stream = stream.makeSubStream(startPos, length, dict); - if (cipherTransform) { - stream = cipherTransform.createStream(stream, length); - } - stream = this.filter(stream, dict, length); - stream.dict = dict; - return stream; - }, - filter: function Parser_filter(stream, dict, length) { - var filter = dict.get('Filter', 'F'); - var params = dict.get('DecodeParms', 'DP'); - if ((0, _primitives.isName)(filter)) { - if (Array.isArray(params)) { - (0, _util.warn)('/DecodeParms should not contain an Array, ' + 'when /Filter contains a Name.'); - } - return this.makeFilter(stream, filter.name, length, params); - } - var maybeLength = length; - if (Array.isArray(filter)) { - var filterArray = filter; - var paramsArray = params; - for (var i = 0, ii = filterArray.length; i < ii; ++i) { - filter = this.xref.fetchIfRef(filterArray[i]); - if (!(0, _primitives.isName)(filter)) { - throw new _util.FormatError('Bad filter name: ' + filter); - } - params = null; - if (Array.isArray(paramsArray) && i in paramsArray) { - params = this.xref.fetchIfRef(paramsArray[i]); - } - stream = this.makeFilter(stream, filter.name, maybeLength, params); - maybeLength = null; - } - } - return stream; - }, - makeFilter: function Parser_makeFilter(stream, name, maybeLength, params) { - if (maybeLength === 0) { - (0, _util.warn)('Empty "' + name + '" stream.'); - return new _stream.NullStream(); - } - try { - var xrefStreamStats = this.xref.stats.streamTypes; - if (name === 'FlateDecode' || name === 'Fl') { - xrefStreamStats[_util.StreamType.FLATE] = true; - if (params) { - return new _stream.PredictorStream(new _stream.FlateStream(stream, maybeLength), maybeLength, params); - } - return new _stream.FlateStream(stream, maybeLength); - } - if (name === 'LZWDecode' || name === 'LZW') { - xrefStreamStats[_util.StreamType.LZW] = true; - var earlyChange = 1; - if (params) { - if (params.has('EarlyChange')) { - earlyChange = params.get('EarlyChange'); - } - return new _stream.PredictorStream(new _stream.LZWStream(stream, maybeLength, earlyChange), maybeLength, params); - } - return new _stream.LZWStream(stream, maybeLength, earlyChange); - } - if (name === 'DCTDecode' || name === 'DCT') { - xrefStreamStats[_util.StreamType.DCT] = true; - return new _jpeg_stream.JpegStream(stream, maybeLength, stream.dict, params); - } - if (name === 'JPXDecode' || name === 'JPX') { - xrefStreamStats[_util.StreamType.JPX] = true; - return new _jpx_stream.JpxStream(stream, maybeLength, stream.dict, params); - } - if (name === 'ASCII85Decode' || name === 'A85') { - xrefStreamStats[_util.StreamType.A85] = true; - return new _stream.Ascii85Stream(stream, maybeLength); - } - if (name === 'ASCIIHexDecode' || name === 'AHx') { - xrefStreamStats[_util.StreamType.AHX] = true; - return new _stream.AsciiHexStream(stream, maybeLength); - } - if (name === 'CCITTFaxDecode' || name === 'CCF') { - xrefStreamStats[_util.StreamType.CCF] = true; - return new _ccitt_stream.CCITTFaxStream(stream, maybeLength, params); - } - if (name === 'RunLengthDecode' || name === 'RL') { - xrefStreamStats[_util.StreamType.RL] = true; - return new _stream.RunLengthStream(stream, maybeLength); - } - if (name === 'JBIG2Decode') { - xrefStreamStats[_util.StreamType.JBIG] = true; - return new _jbig2_stream.Jbig2Stream(stream, maybeLength, stream.dict, params); - } - (0, _util.warn)('filter "' + name + '" not supported yet'); - return stream; - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - (0, _util.warn)('Invalid stream: \"' + ex + '\"'); - return new _stream.NullStream(); - } - } - }; - return Parser; -}(); -var Lexer = function LexerClosure() { - function Lexer(stream, knownCommands) { - this.stream = stream; - this.nextChar(); - this.strBuf = []; - this.knownCommands = knownCommands; - this.beginInlineImagePos = -1; - } - var specialChars = [1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - function toHexDigit(ch) { - if (ch >= 0x30 && ch <= 0x39) { - return ch & 0x0F; - } - if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { - return (ch & 0x0F) + 9; - } - return -1; - } - Lexer.prototype = { - nextChar: function Lexer_nextChar() { - return this.currentChar = this.stream.getByte(); - }, - peekChar: function Lexer_peekChar() { - return this.stream.peekByte(); - }, - getNumber: function Lexer_getNumber() { - var ch = this.currentChar; - var eNotation = false; - var divideBy = 0; - var sign = 0; - if (ch === 0x2D) { - sign = -1; - ch = this.nextChar(); - if (ch === 0x2D) { - ch = this.nextChar(); - } - } else if (ch === 0x2B) { - sign = 1; - ch = this.nextChar(); - } - if (ch === 0x0A || ch === 0x0D) { - do { - ch = this.nextChar(); - } while (ch === 0x0A || ch === 0x0D); - } - if (ch === 0x2E) { - divideBy = 10; - ch = this.nextChar(); - } - if (ch < 0x30 || ch > 0x39) { - if (divideBy === 10 && sign === 0 && ((0, _util.isSpace)(ch) || ch === -1)) { - (0, _util.warn)('Lexer.getNumber - treating a single decimal point as zero.'); - return 0; - } - throw new _util.FormatError('Invalid number: ' + String.fromCharCode(ch) + ' (charCode ' + ch + ')'); - } - sign = sign || 1; - var baseValue = ch - 0x30; - var powerValue = 0; - var powerValueSign = 1; - while ((ch = this.nextChar()) >= 0) { - if (0x30 <= ch && ch <= 0x39) { - var currentDigit = ch - 0x30; - if (eNotation) { - powerValue = powerValue * 10 + currentDigit; - } else { - if (divideBy !== 0) { - divideBy *= 10; - } - baseValue = baseValue * 10 + currentDigit; - } - } else if (ch === 0x2E) { - if (divideBy === 0) { - divideBy = 1; - } else { - break; - } - } else if (ch === 0x2D) { - (0, _util.warn)('Badly formatted number'); - } else if (ch === 0x45 || ch === 0x65) { - ch = this.peekChar(); - if (ch === 0x2B || ch === 0x2D) { - powerValueSign = ch === 0x2D ? -1 : 1; - this.nextChar(); - } else if (ch < 0x30 || ch > 0x39) { - break; - } - eNotation = true; - } else { - break; - } - } - if (divideBy !== 0) { - baseValue /= divideBy; - } - if (eNotation) { - baseValue *= Math.pow(10, powerValueSign * powerValue); - } - return sign * baseValue; - }, - getString: function Lexer_getString() { - var numParen = 1; - var done = false; - var strBuf = this.strBuf; - strBuf.length = 0; - var ch = this.nextChar(); - while (true) { - var charBuffered = false; - switch (ch | 0) { - case -1: - (0, _util.warn)('Unterminated string'); - done = true; - break; - case 0x28: - ++numParen; - strBuf.push('('); - break; - case 0x29: - if (--numParen === 0) { - this.nextChar(); - done = true; - } else { - strBuf.push(')'); - } - break; - case 0x5C: - ch = this.nextChar(); - switch (ch) { - case -1: - (0, _util.warn)('Unterminated string'); - done = true; - break; - case 0x6E: - strBuf.push('\n'); - break; - case 0x72: - strBuf.push('\r'); - break; - case 0x74: - strBuf.push('\t'); - break; - case 0x62: - strBuf.push('\b'); - break; - case 0x66: - strBuf.push('\f'); - break; - case 0x5C: - case 0x28: - case 0x29: - strBuf.push(String.fromCharCode(ch)); - break; - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - var x = ch & 0x0F; - ch = this.nextChar(); - charBuffered = true; - if (ch >= 0x30 && ch <= 0x37) { - x = (x << 3) + (ch & 0x0F); - ch = this.nextChar(); - if (ch >= 0x30 && ch <= 0x37) { - charBuffered = false; - x = (x << 3) + (ch & 0x0F); - } - } - strBuf.push(String.fromCharCode(x)); - break; - case 0x0D: - if (this.peekChar() === 0x0A) { - this.nextChar(); - } - break; - case 0x0A: - break; - default: - strBuf.push(String.fromCharCode(ch)); - break; - } - break; - default: - strBuf.push(String.fromCharCode(ch)); - break; - } - if (done) { - break; - } - if (!charBuffered) { - ch = this.nextChar(); - } - } - return strBuf.join(''); - }, - getName: function Lexer_getName() { - var ch, previousCh; - var strBuf = this.strBuf; - strBuf.length = 0; - while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { - if (ch === 0x23) { - ch = this.nextChar(); - if (specialChars[ch]) { - (0, _util.warn)('Lexer_getName: ' + 'NUMBER SIGN (#) should be followed by a hexadecimal number.'); - strBuf.push('#'); - break; - } - var x = toHexDigit(ch); - if (x !== -1) { - previousCh = ch; - ch = this.nextChar(); - var x2 = toHexDigit(ch); - if (x2 === -1) { - (0, _util.warn)('Lexer_getName: Illegal digit (' + String.fromCharCode(ch) + ') in hexadecimal number.'); - strBuf.push('#', String.fromCharCode(previousCh)); - if (specialChars[ch]) { - break; - } - strBuf.push(String.fromCharCode(ch)); - continue; - } - strBuf.push(String.fromCharCode(x << 4 | x2)); - } else { - strBuf.push('#', String.fromCharCode(ch)); - } - } else { - strBuf.push(String.fromCharCode(ch)); - } - } - if (strBuf.length > 127) { - (0, _util.warn)('name token is longer than allowed by the spec: ' + strBuf.length); - } - return _primitives.Name.get(strBuf.join('')); - }, - getHexString: function Lexer_getHexString() { - var strBuf = this.strBuf; - strBuf.length = 0; - var ch = this.currentChar; - var isFirstHex = true; - var firstDigit; - var secondDigit; - while (true) { - if (ch < 0) { - (0, _util.warn)('Unterminated hex string'); - break; - } else if (ch === 0x3E) { - this.nextChar(); - break; - } else if (specialChars[ch] === 1) { - ch = this.nextChar(); - continue; - } else { - if (isFirstHex) { - firstDigit = toHexDigit(ch); - if (firstDigit === -1) { - (0, _util.warn)('Ignoring invalid character "' + ch + '" in hex string'); - ch = this.nextChar(); - continue; - } - } else { - secondDigit = toHexDigit(ch); - if (secondDigit === -1) { - (0, _util.warn)('Ignoring invalid character "' + ch + '" in hex string'); - ch = this.nextChar(); - continue; - } - strBuf.push(String.fromCharCode(firstDigit << 4 | secondDigit)); - } - isFirstHex = !isFirstHex; - ch = this.nextChar(); - } - } - return strBuf.join(''); - }, - getObj: function Lexer_getObj() { - var comment = false; - var ch = this.currentChar; - while (true) { - if (ch < 0) { - return _primitives.EOF; - } - if (comment) { - if (ch === 0x0A || ch === 0x0D) { - comment = false; - } - } else if (ch === 0x25) { - comment = true; - } else if (specialChars[ch] !== 1) { - break; - } - ch = this.nextChar(); - } - switch (ch | 0) { - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - case 0x38: - case 0x39: - case 0x2B: - case 0x2D: - case 0x2E: - return this.getNumber(); - case 0x28: - return this.getString(); - case 0x2F: - return this.getName(); - case 0x5B: - this.nextChar(); - return _primitives.Cmd.get('['); - case 0x5D: - this.nextChar(); - return _primitives.Cmd.get(']'); - case 0x3C: - ch = this.nextChar(); - if (ch === 0x3C) { - this.nextChar(); - return _primitives.Cmd.get('<<'); - } - return this.getHexString(); - case 0x3E: - ch = this.nextChar(); - if (ch === 0x3E) { - this.nextChar(); - return _primitives.Cmd.get('>>'); - } - return _primitives.Cmd.get('>'); - case 0x7B: - this.nextChar(); - return _primitives.Cmd.get('{'); - case 0x7D: - this.nextChar(); - return _primitives.Cmd.get('}'); - case 0x29: - this.nextChar(); - throw new _util.FormatError('Illegal character: ' + ch); - } - var str = String.fromCharCode(ch); - var knownCommands = this.knownCommands; - var knownCommandFound = knownCommands && knownCommands[str] !== undefined; - while ((ch = this.nextChar()) >= 0 && !specialChars[ch]) { - var possibleCommand = str + String.fromCharCode(ch); - if (knownCommandFound && knownCommands[possibleCommand] === undefined) { - break; - } - if (str.length === 128) { - throw new _util.FormatError('Command token too long: ' + str.length); - } - str = possibleCommand; - knownCommandFound = knownCommands && knownCommands[str] !== undefined; - } - if (str === 'true') { - return true; - } - if (str === 'false') { - return false; - } - if (str === 'null') { - return null; - } - if (str === 'BI') { - this.beginInlineImagePos = this.stream.pos; - } - return _primitives.Cmd.get(str); - }, - skipToNextLine: function Lexer_skipToNextLine() { - var ch = this.currentChar; - while (ch >= 0) { - if (ch === 0x0D) { - ch = this.nextChar(); - if (ch === 0x0A) { - this.nextChar(); - } - break; - } else if (ch === 0x0A) { - this.nextChar(); - break; - } - ch = this.nextChar(); - } - } - }; - return Lexer; -}(); -var Linearization = { - create: function LinearizationCreate(stream) { - function getInt(name, allowZeroValue) { - var obj = linDict.get(name); - if (Number.isInteger(obj) && (allowZeroValue ? obj >= 0 : obj > 0)) { - return obj; - } - throw new Error('The "' + name + '" parameter in the linearization ' + 'dictionary is invalid.'); - } - function getHints() { - var hints = linDict.get('H'), - hintsLength, - item; - if (Array.isArray(hints) && ((hintsLength = hints.length) === 2 || hintsLength === 4)) { - for (var index = 0; index < hintsLength; index++) { - if (!(Number.isInteger(item = hints[index]) && item > 0)) { - throw new Error('Hint (' + index + ') in the linearization dictionary is invalid.'); - } - } - return hints; - } - throw new Error('Hint array in the linearization dictionary is invalid.'); - } - var parser = new Parser(new Lexer(stream), false, null); - var obj1 = parser.getObj(); - var obj2 = parser.getObj(); - var obj3 = parser.getObj(); - var linDict = parser.getObj(); - var obj, length; - if (!(Number.isInteger(obj1) && Number.isInteger(obj2) && (0, _primitives.isCmd)(obj3, 'obj') && (0, _primitives.isDict)(linDict) && (0, _util.isNum)(obj = linDict.get('Linearized')) && obj > 0)) { - return null; - } else if ((length = getInt('L')) !== stream.length) { - throw new Error('The "L" parameter in the linearization dictionary ' + 'does not equal the stream length.'); - } - return { - length: length, - hints: getHints(), - objectNumberFirst: getInt('O'), - endFirst: getInt('E'), - numPages: getInt('N'), - mainXRefEntriesOffset: getInt('T'), - pageFirst: linDict.has('P') ? getInt('P', true) : 0 - }; - } -}; -exports.Lexer = Lexer; -exports.Linearization = Linearization; -exports.Parser = Parser; - -/***/ }), -/* 140 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.LZWStream = exports.StringStream = exports.StreamsSequenceStream = exports.Stream = exports.RunLengthStream = exports.PredictorStream = exports.NullStream = exports.FlateStream = exports.DecodeStream = exports.DecryptStream = exports.AsciiHexStream = exports.Ascii85Stream = undefined; - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } - -var Stream = function StreamClosure() { - function Stream(arrayBuffer, start, length, dict) { - this.bytes = arrayBuffer instanceof Uint8Array ? arrayBuffer : new Uint8Array(arrayBuffer); - this.start = start || 0; - this.pos = this.start; - this.end = start + length || this.bytes.length; - this.dict = dict; - } - Stream.prototype = { - get length() { - return this.end - this.start; - }, - get isEmpty() { - return this.length === 0; - }, - getByte: function Stream_getByte() { - if (this.pos >= this.end) { - return -1; - } - return this.bytes[this.pos++]; - }, - getUint16: function Stream_getUint16() { - var b0 = this.getByte(); - var b1 = this.getByte(); - if (b0 === -1 || b1 === -1) { - return -1; - } - return (b0 << 8) + b1; - }, - getInt32: function Stream_getInt32() { - var b0 = this.getByte(); - var b1 = this.getByte(); - var b2 = this.getByte(); - var b3 = this.getByte(); - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - }, - getBytes: function getBytes(length) { - var forceClamped = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var bytes = this.bytes; - var pos = this.pos; - var strEnd = this.end; - if (!length) { - var _subarray = bytes.subarray(pos, strEnd); - return forceClamped ? new Uint8ClampedArray(_subarray) : _subarray; - } - var end = pos + length; - if (end > strEnd) { - end = strEnd; - } - this.pos = end; - var subarray = bytes.subarray(pos, end); - return forceClamped ? new Uint8ClampedArray(subarray) : subarray; - }, - - peekByte: function Stream_peekByte() { - var peekedByte = this.getByte(); - this.pos--; - return peekedByte; - }, - peekBytes: function peekBytes(length) { - var forceClamped = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var bytes = this.getBytes(length, forceClamped); - this.pos -= bytes.length; - return bytes; - }, - - skip: function Stream_skip(n) { - if (!n) { - n = 1; - } - this.pos += n; - }, - reset: function Stream_reset() { - this.pos = this.start; - }, - moveStart: function Stream_moveStart() { - this.start = this.pos; - }, - makeSubStream: function Stream_makeSubStream(start, length, dict) { - return new Stream(this.bytes.buffer, start, length, dict); - } - }; - return Stream; -}(); -var StringStream = function StringStreamClosure() { - function StringStream(str) { - var bytes = (0, _util.stringToBytes)(str); - Stream.call(this, bytes); - } - StringStream.prototype = Stream.prototype; - return StringStream; -}(); -var DecodeStream = function DecodeStreamClosure() { - var emptyBuffer = new Uint8Array(0); - function DecodeStream(maybeMinBufferLength) { - this._rawMinBufferLength = maybeMinBufferLength || 0; - this.pos = 0; - this.bufferLength = 0; - this.eof = false; - this.buffer = emptyBuffer; - this.minBufferLength = 512; - if (maybeMinBufferLength) { - while (this.minBufferLength < maybeMinBufferLength) { - this.minBufferLength *= 2; - } - } - } - DecodeStream.prototype = { - get isEmpty() { - while (!this.eof && this.bufferLength === 0) { - this.readBlock(); - } - return this.bufferLength === 0; - }, - ensureBuffer: function DecodeStream_ensureBuffer(requested) { - var buffer = this.buffer; - if (requested <= buffer.byteLength) { - return buffer; - } - var size = this.minBufferLength; - while (size < requested) { - size *= 2; - } - var buffer2 = new Uint8Array(size); - buffer2.set(buffer); - return this.buffer = buffer2; - }, - getByte: function DecodeStream_getByte() { - var pos = this.pos; - while (this.bufferLength <= pos) { - if (this.eof) { - return -1; - } - this.readBlock(); - } - return this.buffer[this.pos++]; - }, - getUint16: function DecodeStream_getUint16() { - var b0 = this.getByte(); - var b1 = this.getByte(); - if (b0 === -1 || b1 === -1) { - return -1; - } - return (b0 << 8) + b1; - }, - getInt32: function DecodeStream_getInt32() { - var b0 = this.getByte(); - var b1 = this.getByte(); - var b2 = this.getByte(); - var b3 = this.getByte(); - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - }, - getBytes: function getBytes(length) { - var forceClamped = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var end, - pos = this.pos; - if (length) { - this.ensureBuffer(pos + length); - end = pos + length; - while (!this.eof && this.bufferLength < end) { - this.readBlock(); - } - var bufEnd = this.bufferLength; - if (end > bufEnd) { - end = bufEnd; - } - } else { - while (!this.eof) { - this.readBlock(); - } - end = this.bufferLength; - } - this.pos = end; - var subarray = this.buffer.subarray(pos, end); - return forceClamped && !(subarray instanceof Uint8ClampedArray) ? new Uint8ClampedArray(subarray) : subarray; - }, - - peekByte: function DecodeStream_peekByte() { - var peekedByte = this.getByte(); - this.pos--; - return peekedByte; - }, - peekBytes: function peekBytes(length) { - var forceClamped = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; - - var bytes = this.getBytes(length, forceClamped); - this.pos -= bytes.length; - return bytes; - }, - - makeSubStream: function DecodeStream_makeSubStream(start, length, dict) { - var end = start + length; - while (this.bufferLength <= end && !this.eof) { - this.readBlock(); - } - return new Stream(this.buffer, start, length, dict); - }, - skip: function DecodeStream_skip(n) { - if (!n) { - n = 1; - } - this.pos += n; - }, - reset: function DecodeStream_reset() { - this.pos = 0; - }, - getBaseStreams: function DecodeStream_getBaseStreams() { - if (this.str && this.str.getBaseStreams) { - return this.str.getBaseStreams(); - } - return []; - } - }; - return DecodeStream; -}(); -var StreamsSequenceStream = function StreamsSequenceStreamClosure() { - function StreamsSequenceStream(streams) { - this.streams = streams; - var maybeLength = 0; - for (var i = 0, ii = streams.length; i < ii; i++) { - var stream = streams[i]; - if (stream instanceof DecodeStream) { - maybeLength += stream._rawMinBufferLength; - } else { - maybeLength += stream.length; - } - } - DecodeStream.call(this, maybeLength); - } - StreamsSequenceStream.prototype = Object.create(DecodeStream.prototype); - StreamsSequenceStream.prototype.readBlock = function streamSequenceStreamReadBlock() { - var streams = this.streams; - if (streams.length === 0) { - this.eof = true; - return; - } - var stream = streams.shift(); - var chunk = stream.getBytes(); - var bufferLength = this.bufferLength; - var newLength = bufferLength + chunk.length; - var buffer = this.ensureBuffer(newLength); - buffer.set(chunk, bufferLength); - this.bufferLength = newLength; - }; - StreamsSequenceStream.prototype.getBaseStreams = function StreamsSequenceStream_getBaseStreams() { - var baseStreams = []; - for (var i = 0, ii = this.streams.length; i < ii; i++) { - var stream = this.streams[i]; - if (stream.getBaseStreams) { - baseStreams.push.apply(baseStreams, _toConsumableArray(stream.getBaseStreams())); - } - } - return baseStreams; - }; - return StreamsSequenceStream; -}(); -var FlateStream = function FlateStreamClosure() { - var codeLenCodeMap = new Int32Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]); - var lengthDecode = new Int32Array([0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a, 0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f, 0x30023, 0x3002b, 0x30033, 0x3003b, 0x40043, 0x40053, 0x40063, 0x40073, 0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102]); - var distDecode = new Int32Array([0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d, 0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1, 0x70101, 0x70181, 0x80201, 0x80301, 0x90401, 0x90601, 0xa0801, 0xa0c01, 0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001]); - var fixedLitCodeTab = [new Int32Array([0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0, 0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0, 0x70104, 0x80058, 0x80018, 0x90090, 0x70114, 0x80078, 0x80038, 0x900d0, 0x7010c, 0x80068, 0x80028, 0x900b0, 0x80008, 0x80088, 0x80048, 0x900f0, 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c8, 0x7010a, 0x80064, 0x80024, 0x900a8, 0x80004, 0x80084, 0x80044, 0x900e8, 0x70106, 0x8005c, 0x8001c, 0x90098, 0x70116, 0x8007c, 0x8003c, 0x900d8, 0x7010e, 0x8006c, 0x8002c, 0x900b8, 0x8000c, 0x8008c, 0x8004c, 0x900f8, 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c4, 0x70109, 0x80062, 0x80022, 0x900a4, 0x80002, 0x80082, 0x80042, 0x900e4, 0x70105, 0x8005a, 0x8001a, 0x90094, 0x70115, 0x8007a, 0x8003a, 0x900d4, 0x7010d, 0x8006a, 0x8002a, 0x900b4, 0x8000a, 0x8008a, 0x8004a, 0x900f4, 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cc, 0x7010b, 0x80066, 0x80026, 0x900ac, 0x80006, 0x80086, 0x80046, 0x900ec, 0x70107, 0x8005e, 0x8001e, 0x9009c, 0x70117, 0x8007e, 0x8003e, 0x900dc, 0x7010f, 0x8006e, 0x8002e, 0x900bc, 0x8000e, 0x8008e, 0x8004e, 0x900fc, 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c2, 0x70108, 0x80061, 0x80021, 0x900a2, 0x80001, 0x80081, 0x80041, 0x900e2, 0x70104, 0x80059, 0x80019, 0x90092, 0x70114, 0x80079, 0x80039, 0x900d2, 0x7010c, 0x80069, 0x80029, 0x900b2, 0x80009, 0x80089, 0x80049, 0x900f2, 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900ca, 0x7010a, 0x80065, 0x80025, 0x900aa, 0x80005, 0x80085, 0x80045, 0x900ea, 0x70106, 0x8005d, 0x8001d, 0x9009a, 0x70116, 0x8007d, 0x8003d, 0x900da, 0x7010e, 0x8006d, 0x8002d, 0x900ba, 0x8000d, 0x8008d, 0x8004d, 0x900fa, 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c6, 0x70109, 0x80063, 0x80023, 0x900a6, 0x80003, 0x80083, 0x80043, 0x900e6, 0x70105, 0x8005b, 0x8001b, 0x90096, 0x70115, 0x8007b, 0x8003b, 0x900d6, 0x7010d, 0x8006b, 0x8002b, 0x900b6, 0x8000b, 0x8008b, 0x8004b, 0x900f6, 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900ce, 0x7010b, 0x80067, 0x80027, 0x900ae, 0x80007, 0x80087, 0x80047, 0x900ee, 0x70107, 0x8005f, 0x8001f, 0x9009e, 0x70117, 0x8007f, 0x8003f, 0x900de, 0x7010f, 0x8006f, 0x8002f, 0x900be, 0x8000f, 0x8008f, 0x8004f, 0x900fe, 0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c1, 0x70108, 0x80060, 0x80020, 0x900a1, 0x80000, 0x80080, 0x80040, 0x900e1, 0x70104, 0x80058, 0x80018, 0x90091, 0x70114, 0x80078, 0x80038, 0x900d1, 0x7010c, 0x80068, 0x80028, 0x900b1, 0x80008, 0x80088, 0x80048, 0x900f1, 0x70102, 0x80054, 0x80014, 0x8011c, 0x70112, 0x80074, 0x80034, 0x900c9, 0x7010a, 0x80064, 0x80024, 0x900a9, 0x80004, 0x80084, 0x80044, 0x900e9, 0x70106, 0x8005c, 0x8001c, 0x90099, 0x70116, 0x8007c, 0x8003c, 0x900d9, 0x7010e, 0x8006c, 0x8002c, 0x900b9, 0x8000c, 0x8008c, 0x8004c, 0x900f9, 0x70101, 0x80052, 0x80012, 0x8011a, 0x70111, 0x80072, 0x80032, 0x900c5, 0x70109, 0x80062, 0x80022, 0x900a5, 0x80002, 0x80082, 0x80042, 0x900e5, 0x70105, 0x8005a, 0x8001a, 0x90095, 0x70115, 0x8007a, 0x8003a, 0x900d5, 0x7010d, 0x8006a, 0x8002a, 0x900b5, 0x8000a, 0x8008a, 0x8004a, 0x900f5, 0x70103, 0x80056, 0x80016, 0x8011e, 0x70113, 0x80076, 0x80036, 0x900cd, 0x7010b, 0x80066, 0x80026, 0x900ad, 0x80006, 0x80086, 0x80046, 0x900ed, 0x70107, 0x8005e, 0x8001e, 0x9009d, 0x70117, 0x8007e, 0x8003e, 0x900dd, 0x7010f, 0x8006e, 0x8002e, 0x900bd, 0x8000e, 0x8008e, 0x8004e, 0x900fd, 0x70100, 0x80051, 0x80011, 0x80119, 0x70110, 0x80071, 0x80031, 0x900c3, 0x70108, 0x80061, 0x80021, 0x900a3, 0x80001, 0x80081, 0x80041, 0x900e3, 0x70104, 0x80059, 0x80019, 0x90093, 0x70114, 0x80079, 0x80039, 0x900d3, 0x7010c, 0x80069, 0x80029, 0x900b3, 0x80009, 0x80089, 0x80049, 0x900f3, 0x70102, 0x80055, 0x80015, 0x8011d, 0x70112, 0x80075, 0x80035, 0x900cb, 0x7010a, 0x80065, 0x80025, 0x900ab, 0x80005, 0x80085, 0x80045, 0x900eb, 0x70106, 0x8005d, 0x8001d, 0x9009b, 0x70116, 0x8007d, 0x8003d, 0x900db, 0x7010e, 0x8006d, 0x8002d, 0x900bb, 0x8000d, 0x8008d, 0x8004d, 0x900fb, 0x70101, 0x80053, 0x80013, 0x8011b, 0x70111, 0x80073, 0x80033, 0x900c7, 0x70109, 0x80063, 0x80023, 0x900a7, 0x80003, 0x80083, 0x80043, 0x900e7, 0x70105, 0x8005b, 0x8001b, 0x90097, 0x70115, 0x8007b, 0x8003b, 0x900d7, 0x7010d, 0x8006b, 0x8002b, 0x900b7, 0x8000b, 0x8008b, 0x8004b, 0x900f7, 0x70103, 0x80057, 0x80017, 0x8011f, 0x70113, 0x80077, 0x80037, 0x900cf, 0x7010b, 0x80067, 0x80027, 0x900af, 0x80007, 0x80087, 0x80047, 0x900ef, 0x70107, 0x8005f, 0x8001f, 0x9009f, 0x70117, 0x8007f, 0x8003f, 0x900df, 0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff]), 9]; - var fixedDistCodeTab = [new Int32Array([0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c, 0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000, 0x50001, 0x50011, 0x50009, 0x50019, 0x50005, 0x50015, 0x5000d, 0x5001d, 0x50003, 0x50013, 0x5000b, 0x5001b, 0x50007, 0x50017, 0x5000f, 0x00000]), 5]; - function FlateStream(str, maybeLength) { - this.str = str; - this.dict = str.dict; - var cmf = str.getByte(); - var flg = str.getByte(); - if (cmf === -1 || flg === -1) { - throw new _util.FormatError('Invalid header in flate stream: ' + cmf + ', ' + flg); - } - if ((cmf & 0x0f) !== 0x08) { - throw new _util.FormatError('Unknown compression method in flate stream: ' + cmf + ', ' + flg); - } - if (((cmf << 8) + flg) % 31 !== 0) { - throw new _util.FormatError('Bad FCHECK in flate stream: ' + cmf + ', ' + flg); - } - if (flg & 0x20) { - throw new _util.FormatError('FDICT bit set in flate stream: ' + cmf + ', ' + flg); - } - this.codeSize = 0; - this.codeBuf = 0; - DecodeStream.call(this, maybeLength); - } - FlateStream.prototype = Object.create(DecodeStream.prototype); - FlateStream.prototype.getBits = function FlateStream_getBits(bits) { - var str = this.str; - var codeSize = this.codeSize; - var codeBuf = this.codeBuf; - var b; - while (codeSize < bits) { - if ((b = str.getByte()) === -1) { - throw new _util.FormatError('Bad encoding in flate stream'); - } - codeBuf |= b << codeSize; - codeSize += 8; - } - b = codeBuf & (1 << bits) - 1; - this.codeBuf = codeBuf >> bits; - this.codeSize = codeSize -= bits; - return b; - }; - FlateStream.prototype.getCode = function FlateStream_getCode(table) { - var str = this.str; - var codes = table[0]; - var maxLen = table[1]; - var codeSize = this.codeSize; - var codeBuf = this.codeBuf; - var b; - while (codeSize < maxLen) { - if ((b = str.getByte()) === -1) { - break; - } - codeBuf |= b << codeSize; - codeSize += 8; - } - var code = codes[codeBuf & (1 << maxLen) - 1]; - var codeLen = code >> 16; - var codeVal = code & 0xffff; - if (codeLen < 1 || codeSize < codeLen) { - throw new _util.FormatError('Bad encoding in flate stream'); - } - this.codeBuf = codeBuf >> codeLen; - this.codeSize = codeSize - codeLen; - return codeVal; - }; - FlateStream.prototype.generateHuffmanTable = function flateStreamGenerateHuffmanTable(lengths) { - var n = lengths.length; - var maxLen = 0; - var i; - for (i = 0; i < n; ++i) { - if (lengths[i] > maxLen) { - maxLen = lengths[i]; - } - } - var size = 1 << maxLen; - var codes = new Int32Array(size); - for (var len = 1, code = 0, skip = 2; len <= maxLen; ++len, code <<= 1, skip <<= 1) { - for (var val = 0; val < n; ++val) { - if (lengths[val] === len) { - var code2 = 0; - var t = code; - for (i = 0; i < len; ++i) { - code2 = code2 << 1 | t & 1; - t >>= 1; - } - for (i = code2; i < size; i += skip) { - codes[i] = len << 16 | val; - } - ++code; - } - } - } - return [codes, maxLen]; - }; - FlateStream.prototype.readBlock = function FlateStream_readBlock() { - var buffer, len; - var str = this.str; - var hdr = this.getBits(3); - if (hdr & 1) { - this.eof = true; - } - hdr >>= 1; - if (hdr === 0) { - var b; - if ((b = str.getByte()) === -1) { - throw new _util.FormatError('Bad block header in flate stream'); - } - var blockLen = b; - if ((b = str.getByte()) === -1) { - throw new _util.FormatError('Bad block header in flate stream'); - } - blockLen |= b << 8; - if ((b = str.getByte()) === -1) { - throw new _util.FormatError('Bad block header in flate stream'); - } - var check = b; - if ((b = str.getByte()) === -1) { - throw new _util.FormatError('Bad block header in flate stream'); - } - check |= b << 8; - if (check !== (~blockLen & 0xffff) && (blockLen !== 0 || check !== 0)) { - throw new _util.FormatError('Bad uncompressed block length in flate stream'); - } - this.codeBuf = 0; - this.codeSize = 0; - var bufferLength = this.bufferLength; - buffer = this.ensureBuffer(bufferLength + blockLen); - var end = bufferLength + blockLen; - this.bufferLength = end; - if (blockLen === 0) { - if (str.peekByte() === -1) { - this.eof = true; - } - } else { - for (var n = bufferLength; n < end; ++n) { - if ((b = str.getByte()) === -1) { - this.eof = true; - break; - } - buffer[n] = b; - } - } - return; - } - var litCodeTable; - var distCodeTable; - if (hdr === 1) { - litCodeTable = fixedLitCodeTab; - distCodeTable = fixedDistCodeTab; - } else if (hdr === 2) { - var numLitCodes = this.getBits(5) + 257; - var numDistCodes = this.getBits(5) + 1; - var numCodeLenCodes = this.getBits(4) + 4; - var codeLenCodeLengths = new Uint8Array(codeLenCodeMap.length); - var i; - for (i = 0; i < numCodeLenCodes; ++i) { - codeLenCodeLengths[codeLenCodeMap[i]] = this.getBits(3); - } - var codeLenCodeTab = this.generateHuffmanTable(codeLenCodeLengths); - len = 0; - i = 0; - var codes = numLitCodes + numDistCodes; - var codeLengths = new Uint8Array(codes); - var bitsLength, bitsOffset, what; - while (i < codes) { - var code = this.getCode(codeLenCodeTab); - if (code === 16) { - bitsLength = 2; - bitsOffset = 3; - what = len; - } else if (code === 17) { - bitsLength = 3; - bitsOffset = 3; - what = len = 0; - } else if (code === 18) { - bitsLength = 7; - bitsOffset = 11; - what = len = 0; - } else { - codeLengths[i++] = len = code; - continue; - } - var repeatLength = this.getBits(bitsLength) + bitsOffset; - while (repeatLength-- > 0) { - codeLengths[i++] = what; - } - } - litCodeTable = this.generateHuffmanTable(codeLengths.subarray(0, numLitCodes)); - distCodeTable = this.generateHuffmanTable(codeLengths.subarray(numLitCodes, codes)); - } else { - throw new _util.FormatError('Unknown block type in flate stream'); - } - buffer = this.buffer; - var limit = buffer ? buffer.length : 0; - var pos = this.bufferLength; - while (true) { - var code1 = this.getCode(litCodeTable); - if (code1 < 256) { - if (pos + 1 >= limit) { - buffer = this.ensureBuffer(pos + 1); - limit = buffer.length; - } - buffer[pos++] = code1; - continue; - } - if (code1 === 256) { - this.bufferLength = pos; - return; - } - code1 -= 257; - code1 = lengthDecode[code1]; - var code2 = code1 >> 16; - if (code2 > 0) { - code2 = this.getBits(code2); - } - len = (code1 & 0xffff) + code2; - code1 = this.getCode(distCodeTable); - code1 = distDecode[code1]; - code2 = code1 >> 16; - if (code2 > 0) { - code2 = this.getBits(code2); - } - var dist = (code1 & 0xffff) + code2; - if (pos + len >= limit) { - buffer = this.ensureBuffer(pos + len); - limit = buffer.length; - } - for (var k = 0; k < len; ++k, ++pos) { - buffer[pos] = buffer[pos - dist]; - } - } - }; - return FlateStream; -}(); -var PredictorStream = function PredictorStreamClosure() { - function PredictorStream(str, maybeLength, params) { - if (!(0, _primitives.isDict)(params)) { - return str; - } - var predictor = this.predictor = params.get('Predictor') || 1; - if (predictor <= 1) { - return str; - } - if (predictor !== 2 && (predictor < 10 || predictor > 15)) { - throw new _util.FormatError('Unsupported predictor: ' + predictor); - } - if (predictor === 2) { - this.readBlock = this.readBlockTiff; - } else { - this.readBlock = this.readBlockPng; - } - this.str = str; - this.dict = str.dict; - var colors = this.colors = params.get('Colors') || 1; - var bits = this.bits = params.get('BitsPerComponent') || 8; - var columns = this.columns = params.get('Columns') || 1; - this.pixBytes = colors * bits + 7 >> 3; - this.rowBytes = columns * colors * bits + 7 >> 3; - DecodeStream.call(this, maybeLength); - return this; - } - PredictorStream.prototype = Object.create(DecodeStream.prototype); - PredictorStream.prototype.readBlockTiff = function predictorStreamReadBlockTiff() { - var rowBytes = this.rowBytes; - var bufferLength = this.bufferLength; - var buffer = this.ensureBuffer(bufferLength + rowBytes); - var bits = this.bits; - var colors = this.colors; - var rawBytes = this.str.getBytes(rowBytes); - this.eof = !rawBytes.length; - if (this.eof) { - return; - } - var inbuf = 0, - outbuf = 0; - var inbits = 0, - outbits = 0; - var pos = bufferLength; - var i; - if (bits === 1 && colors === 1) { - for (i = 0; i < rowBytes; ++i) { - var c = rawBytes[i] ^ inbuf; - c ^= c >> 1; - c ^= c >> 2; - c ^= c >> 4; - inbuf = (c & 1) << 7; - buffer[pos++] = c; - } - } else if (bits === 8) { - for (i = 0; i < colors; ++i) { - buffer[pos++] = rawBytes[i]; - } - for (; i < rowBytes; ++i) { - buffer[pos] = buffer[pos - colors] + rawBytes[i]; - pos++; - } - } else if (bits === 16) { - var bytesPerPixel = colors * 2; - for (i = 0; i < bytesPerPixel; ++i) { - buffer[pos++] = rawBytes[i]; - } - for (; i < rowBytes; i += 2) { - var sum = ((rawBytes[i] & 0xFF) << 8) + (rawBytes[i + 1] & 0xFF) + ((buffer[pos - bytesPerPixel] & 0xFF) << 8) + (buffer[pos - bytesPerPixel + 1] & 0xFF); - buffer[pos++] = sum >> 8 & 0xFF; - buffer[pos++] = sum & 0xFF; - } - } else { - var compArray = new Uint8Array(colors + 1); - var bitMask = (1 << bits) - 1; - var j = 0, - k = bufferLength; - var columns = this.columns; - for (i = 0; i < columns; ++i) { - for (var kk = 0; kk < colors; ++kk) { - if (inbits < bits) { - inbuf = inbuf << 8 | rawBytes[j++] & 0xFF; - inbits += 8; - } - compArray[kk] = compArray[kk] + (inbuf >> inbits - bits) & bitMask; - inbits -= bits; - outbuf = outbuf << bits | compArray[kk]; - outbits += bits; - if (outbits >= 8) { - buffer[k++] = outbuf >> outbits - 8 & 0xFF; - outbits -= 8; - } - } - } - if (outbits > 0) { - buffer[k++] = (outbuf << 8 - outbits) + (inbuf & (1 << 8 - outbits) - 1); - } - } - this.bufferLength += rowBytes; - }; - PredictorStream.prototype.readBlockPng = function predictorStreamReadBlockPng() { - var rowBytes = this.rowBytes; - var pixBytes = this.pixBytes; - var predictor = this.str.getByte(); - var rawBytes = this.str.getBytes(rowBytes); - this.eof = !rawBytes.length; - if (this.eof) { - return; - } - var bufferLength = this.bufferLength; - var buffer = this.ensureBuffer(bufferLength + rowBytes); - var prevRow = buffer.subarray(bufferLength - rowBytes, bufferLength); - if (prevRow.length === 0) { - prevRow = new Uint8Array(rowBytes); - } - var i, - j = bufferLength, - up, - c; - switch (predictor) { - case 0: - for (i = 0; i < rowBytes; ++i) { - buffer[j++] = rawBytes[i]; - } - break; - case 1: - for (i = 0; i < pixBytes; ++i) { - buffer[j++] = rawBytes[i]; - } - for (; i < rowBytes; ++i) { - buffer[j] = buffer[j - pixBytes] + rawBytes[i] & 0xFF; - j++; - } - break; - case 2: - for (i = 0; i < rowBytes; ++i) { - buffer[j++] = prevRow[i] + rawBytes[i] & 0xFF; - } - break; - case 3: - for (i = 0; i < pixBytes; ++i) { - buffer[j++] = (prevRow[i] >> 1) + rawBytes[i]; - } - for (; i < rowBytes; ++i) { - buffer[j] = (prevRow[i] + buffer[j - pixBytes] >> 1) + rawBytes[i] & 0xFF; - j++; - } - break; - case 4: - for (i = 0; i < pixBytes; ++i) { - up = prevRow[i]; - c = rawBytes[i]; - buffer[j++] = up + c; - } - for (; i < rowBytes; ++i) { - up = prevRow[i]; - var upLeft = prevRow[i - pixBytes]; - var left = buffer[j - pixBytes]; - var p = left + up - upLeft; - var pa = p - left; - if (pa < 0) { - pa = -pa; - } - var pb = p - up; - if (pb < 0) { - pb = -pb; - } - var pc = p - upLeft; - if (pc < 0) { - pc = -pc; - } - c = rawBytes[i]; - if (pa <= pb && pa <= pc) { - buffer[j++] = left + c; - } else if (pb <= pc) { - buffer[j++] = up + c; - } else { - buffer[j++] = upLeft + c; - } - } - break; - default: - throw new _util.FormatError('Unsupported predictor: ' + predictor); - } - this.bufferLength += rowBytes; - }; - return PredictorStream; -}(); -var DecryptStream = function DecryptStreamClosure() { - function DecryptStream(str, maybeLength, decrypt) { - this.str = str; - this.dict = str.dict; - this.decrypt = decrypt; - this.nextChunk = null; - this.initialized = false; - DecodeStream.call(this, maybeLength); - } - var chunkSize = 512; - DecryptStream.prototype = Object.create(DecodeStream.prototype); - DecryptStream.prototype.readBlock = function DecryptStream_readBlock() { - var chunk; - if (this.initialized) { - chunk = this.nextChunk; - } else { - chunk = this.str.getBytes(chunkSize); - this.initialized = true; - } - if (!chunk || chunk.length === 0) { - this.eof = true; - return; - } - this.nextChunk = this.str.getBytes(chunkSize); - var hasMoreData = this.nextChunk && this.nextChunk.length > 0; - var decrypt = this.decrypt; - chunk = decrypt(chunk, !hasMoreData); - var bufferLength = this.bufferLength; - var i, - n = chunk.length; - var buffer = this.ensureBuffer(bufferLength + n); - for (i = 0; i < n; i++) { - buffer[bufferLength++] = chunk[i]; - } - this.bufferLength = bufferLength; - }; - return DecryptStream; -}(); -var Ascii85Stream = function Ascii85StreamClosure() { - function Ascii85Stream(str, maybeLength) { - this.str = str; - this.dict = str.dict; - this.input = new Uint8Array(5); - if (maybeLength) { - maybeLength = 0.8 * maybeLength; - } - DecodeStream.call(this, maybeLength); - } - Ascii85Stream.prototype = Object.create(DecodeStream.prototype); - Ascii85Stream.prototype.readBlock = function Ascii85Stream_readBlock() { - var TILDA_CHAR = 0x7E; - var Z_LOWER_CHAR = 0x7A; - var EOF = -1; - var str = this.str; - var c = str.getByte(); - while ((0, _util.isSpace)(c)) { - c = str.getByte(); - } - if (c === EOF || c === TILDA_CHAR) { - this.eof = true; - return; - } - var bufferLength = this.bufferLength, - buffer; - var i; - if (c === Z_LOWER_CHAR) { - buffer = this.ensureBuffer(bufferLength + 4); - for (i = 0; i < 4; ++i) { - buffer[bufferLength + i] = 0; - } - this.bufferLength += 4; - } else { - var input = this.input; - input[0] = c; - for (i = 1; i < 5; ++i) { - c = str.getByte(); - while ((0, _util.isSpace)(c)) { - c = str.getByte(); - } - input[i] = c; - if (c === EOF || c === TILDA_CHAR) { - break; - } - } - buffer = this.ensureBuffer(bufferLength + i - 1); - this.bufferLength += i - 1; - if (i < 5) { - for (; i < 5; ++i) { - input[i] = 0x21 + 84; - } - this.eof = true; - } - var t = 0; - for (i = 0; i < 5; ++i) { - t = t * 85 + (input[i] - 0x21); - } - for (i = 3; i >= 0; --i) { - buffer[bufferLength + i] = t & 0xFF; - t >>= 8; - } - } - }; - return Ascii85Stream; -}(); -var AsciiHexStream = function AsciiHexStreamClosure() { - function AsciiHexStream(str, maybeLength) { - this.str = str; - this.dict = str.dict; - this.firstDigit = -1; - if (maybeLength) { - maybeLength = 0.5 * maybeLength; - } - DecodeStream.call(this, maybeLength); - } - AsciiHexStream.prototype = Object.create(DecodeStream.prototype); - AsciiHexStream.prototype.readBlock = function AsciiHexStream_readBlock() { - var UPSTREAM_BLOCK_SIZE = 8000; - var bytes = this.str.getBytes(UPSTREAM_BLOCK_SIZE); - if (!bytes.length) { - this.eof = true; - return; - } - var maxDecodeLength = bytes.length + 1 >> 1; - var buffer = this.ensureBuffer(this.bufferLength + maxDecodeLength); - var bufferLength = this.bufferLength; - var firstDigit = this.firstDigit; - for (var i = 0, ii = bytes.length; i < ii; i++) { - var ch = bytes[i], - digit; - if (ch >= 0x30 && ch <= 0x39) { - digit = ch & 0x0F; - } else if (ch >= 0x41 && ch <= 0x46 || ch >= 0x61 && ch <= 0x66) { - digit = (ch & 0x0F) + 9; - } else if (ch === 0x3E) { - this.eof = true; - break; - } else { - continue; - } - if (firstDigit < 0) { - firstDigit = digit; - } else { - buffer[bufferLength++] = firstDigit << 4 | digit; - firstDigit = -1; - } - } - if (firstDigit >= 0 && this.eof) { - buffer[bufferLength++] = firstDigit << 4; - firstDigit = -1; - } - this.firstDigit = firstDigit; - this.bufferLength = bufferLength; - }; - return AsciiHexStream; -}(); -var RunLengthStream = function RunLengthStreamClosure() { - function RunLengthStream(str, maybeLength) { - this.str = str; - this.dict = str.dict; - DecodeStream.call(this, maybeLength); - } - RunLengthStream.prototype = Object.create(DecodeStream.prototype); - RunLengthStream.prototype.readBlock = function RunLengthStream_readBlock() { - var repeatHeader = this.str.getBytes(2); - if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) { - this.eof = true; - return; - } - var buffer; - var bufferLength = this.bufferLength; - var n = repeatHeader[0]; - if (n < 128) { - buffer = this.ensureBuffer(bufferLength + n + 1); - buffer[bufferLength++] = repeatHeader[1]; - if (n > 0) { - var source = this.str.getBytes(n); - buffer.set(source, bufferLength); - bufferLength += n; - } - } else { - n = 257 - n; - var b = repeatHeader[1]; - buffer = this.ensureBuffer(bufferLength + n + 1); - for (var i = 0; i < n; i++) { - buffer[bufferLength++] = b; - } - } - this.bufferLength = bufferLength; - }; - return RunLengthStream; -}(); -var LZWStream = function LZWStreamClosure() { - function LZWStream(str, maybeLength, earlyChange) { - this.str = str; - this.dict = str.dict; - this.cachedData = 0; - this.bitsCached = 0; - var maxLzwDictionarySize = 4096; - var lzwState = { - earlyChange: earlyChange, - codeLength: 9, - nextCode: 258, - dictionaryValues: new Uint8Array(maxLzwDictionarySize), - dictionaryLengths: new Uint16Array(maxLzwDictionarySize), - dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize), - currentSequence: new Uint8Array(maxLzwDictionarySize), - currentSequenceLength: 0 - }; - for (var i = 0; i < 256; ++i) { - lzwState.dictionaryValues[i] = i; - lzwState.dictionaryLengths[i] = 1; - } - this.lzwState = lzwState; - DecodeStream.call(this, maybeLength); - } - LZWStream.prototype = Object.create(DecodeStream.prototype); - LZWStream.prototype.readBits = function LZWStream_readBits(n) { - var bitsCached = this.bitsCached; - var cachedData = this.cachedData; - while (bitsCached < n) { - var c = this.str.getByte(); - if (c === -1) { - this.eof = true; - return null; - } - cachedData = cachedData << 8 | c; - bitsCached += 8; - } - this.bitsCached = bitsCached -= n; - this.cachedData = cachedData; - this.lastCode = null; - return cachedData >>> bitsCached & (1 << n) - 1; - }; - LZWStream.prototype.readBlock = function LZWStream_readBlock() { - var blockSize = 512; - var estimatedDecodedSize = blockSize * 2, - decodedSizeDelta = blockSize; - var i, j, q; - var lzwState = this.lzwState; - if (!lzwState) { - return; - } - var earlyChange = lzwState.earlyChange; - var nextCode = lzwState.nextCode; - var dictionaryValues = lzwState.dictionaryValues; - var dictionaryLengths = lzwState.dictionaryLengths; - var dictionaryPrevCodes = lzwState.dictionaryPrevCodes; - var codeLength = lzwState.codeLength; - var prevCode = lzwState.prevCode; - var currentSequence = lzwState.currentSequence; - var currentSequenceLength = lzwState.currentSequenceLength; - var decodedLength = 0; - var currentBufferLength = this.bufferLength; - var buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); - for (i = 0; i < blockSize; i++) { - var code = this.readBits(codeLength); - var hasPrev = currentSequenceLength > 0; - if (code < 256) { - currentSequence[0] = code; - currentSequenceLength = 1; - } else if (code >= 258) { - if (code < nextCode) { - currentSequenceLength = dictionaryLengths[code]; - for (j = currentSequenceLength - 1, q = code; j >= 0; j--) { - currentSequence[j] = dictionaryValues[q]; - q = dictionaryPrevCodes[q]; - } - } else { - currentSequence[currentSequenceLength++] = currentSequence[0]; - } - } else if (code === 256) { - codeLength = 9; - nextCode = 258; - currentSequenceLength = 0; - continue; - } else { - this.eof = true; - delete this.lzwState; - break; - } - if (hasPrev) { - dictionaryPrevCodes[nextCode] = prevCode; - dictionaryLengths[nextCode] = dictionaryLengths[prevCode] + 1; - dictionaryValues[nextCode] = currentSequence[0]; - nextCode++; - codeLength = nextCode + earlyChange & nextCode + earlyChange - 1 ? codeLength : Math.min(Math.log(nextCode + earlyChange) / 0.6931471805599453 + 1, 12) | 0; - } - prevCode = code; - decodedLength += currentSequenceLength; - if (estimatedDecodedSize < decodedLength) { - do { - estimatedDecodedSize += decodedSizeDelta; - } while (estimatedDecodedSize < decodedLength); - buffer = this.ensureBuffer(this.bufferLength + estimatedDecodedSize); - } - for (j = 0; j < currentSequenceLength; j++) { - buffer[currentBufferLength++] = currentSequence[j]; - } - } - lzwState.nextCode = nextCode; - lzwState.codeLength = codeLength; - lzwState.prevCode = prevCode; - lzwState.currentSequenceLength = currentSequenceLength; - this.bufferLength = currentBufferLength; - }; - return LZWStream; -}(); -var NullStream = function NullStreamClosure() { - function NullStream() { - Stream.call(this, new Uint8Array(0)); - } - NullStream.prototype = Stream.prototype; - return NullStream; -}(); -exports.Ascii85Stream = Ascii85Stream; -exports.AsciiHexStream = AsciiHexStream; -exports.DecryptStream = DecryptStream; -exports.DecodeStream = DecodeStream; -exports.FlateStream = FlateStream; -exports.NullStream = NullStream; -exports.PredictorStream = PredictorStream; -exports.RunLengthStream = RunLengthStream; -exports.Stream = Stream; -exports.StreamsSequenceStream = StreamsSequenceStream; -exports.StringStream = StringStream; -exports.LZWStream = LZWStream; - -/***/ }), -/* 141 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.CCITTFaxStream = undefined; - -var _primitives = __w_pdfjs_require__(138); - -var _ccitt = __w_pdfjs_require__(142); - -var _stream = __w_pdfjs_require__(140); - -var CCITTFaxStream = function CCITTFaxStreamClosure() { - function CCITTFaxStream(str, maybeLength, params) { - this.str = str; - this.dict = str.dict; - if (!(0, _primitives.isDict)(params)) { - params = _primitives.Dict.empty; - } - var source = { - next: function next() { - return str.getByte(); - } - }; - this.ccittFaxDecoder = new _ccitt.CCITTFaxDecoder(source, { - K: params.get('K'), - EndOfLine: params.get('EndOfLine'), - EncodedByteAlign: params.get('EncodedByteAlign'), - Columns: params.get('Columns'), - Rows: params.get('Rows'), - EndOfBlock: params.get('EndOfBlock'), - BlackIs1: params.get('BlackIs1') - }); - _stream.DecodeStream.call(this, maybeLength); - } - CCITTFaxStream.prototype = Object.create(_stream.DecodeStream.prototype); - CCITTFaxStream.prototype.readBlock = function () { - while (!this.eof) { - var c = this.ccittFaxDecoder.readNextChar(); - if (c === -1) { - this.eof = true; - return; - } - this.ensureBuffer(this.bufferLength + 1); - this.buffer[this.bufferLength++] = c; - } - }; - return CCITTFaxStream; -}(); -exports.CCITTFaxStream = CCITTFaxStream; - -/***/ }), -/* 142 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.CCITTFaxDecoder = undefined; - -var _util = __w_pdfjs_require__(2); - -var CCITTFaxDecoder = function CCITTFaxDecoder() { - var ccittEOL = -2; - var ccittEOF = -1; - var twoDimPass = 0; - var twoDimHoriz = 1; - var twoDimVert0 = 2; - var twoDimVertR1 = 3; - var twoDimVertL1 = 4; - var twoDimVertR2 = 5; - var twoDimVertL2 = 6; - var twoDimVertR3 = 7; - var twoDimVertL3 = 8; - var twoDimTable = [[-1, -1], [-1, -1], [7, twoDimVertL3], [7, twoDimVertR3], [6, twoDimVertL2], [6, twoDimVertL2], [6, twoDimVertR2], [6, twoDimVertR2], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [4, twoDimPass], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimHoriz], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertL1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [3, twoDimVertR1], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0], [1, twoDimVert0]]; - var whiteTable1 = [[-1, -1], [12, ccittEOL], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [11, 1792], [11, 1792], [12, 1984], [12, 2048], [12, 2112], [12, 2176], [12, 2240], [12, 2304], [11, 1856], [11, 1856], [11, 1920], [11, 1920], [12, 2368], [12, 2432], [12, 2496], [12, 2560]]; - var whiteTable2 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [8, 29], [8, 29], [8, 30], [8, 30], [8, 45], [8, 45], [8, 46], [8, 46], [7, 22], [7, 22], [7, 22], [7, 22], [7, 23], [7, 23], [7, 23], [7, 23], [8, 47], [8, 47], [8, 48], [8, 48], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [6, 13], [7, 20], [7, 20], [7, 20], [7, 20], [8, 33], [8, 33], [8, 34], [8, 34], [8, 35], [8, 35], [8, 36], [8, 36], [8, 37], [8, 37], [8, 38], [8, 38], [7, 19], [7, 19], [7, 19], [7, 19], [8, 31], [8, 31], [8, 32], [8, 32], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 1], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [6, 12], [8, 53], [8, 53], [8, 54], [8, 54], [7, 26], [7, 26], [7, 26], [7, 26], [8, 39], [8, 39], [8, 40], [8, 40], [8, 41], [8, 41], [8, 42], [8, 42], [8, 43], [8, 43], [8, 44], [8, 44], [7, 21], [7, 21], [7, 21], [7, 21], [7, 28], [7, 28], [7, 28], [7, 28], [8, 61], [8, 61], [8, 62], [8, 62], [8, 63], [8, 63], [8, 0], [8, 0], [8, 320], [8, 320], [8, 384], [8, 384], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 10], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [5, 11], [7, 27], [7, 27], [7, 27], [7, 27], [8, 59], [8, 59], [8, 60], [8, 60], [9, 1472], [9, 1536], [9, 1600], [9, 1728], [7, 18], [7, 18], [7, 18], [7, 18], [7, 24], [7, 24], [7, 24], [7, 24], [8, 49], [8, 49], [8, 50], [8, 50], [8, 51], [8, 51], [8, 52], [8, 52], [7, 25], [7, 25], [7, 25], [7, 25], [8, 55], [8, 55], [8, 56], [8, 56], [8, 57], [8, 57], [8, 58], [8, 58], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 192], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [6, 1664], [8, 448], [8, 448], [8, 512], [8, 512], [9, 704], [9, 768], [8, 640], [8, 640], [8, 576], [8, 576], [9, 832], [9, 896], [9, 960], [9, 1024], [9, 1088], [9, 1152], [9, 1216], [9, 1280], [9, 1344], [9, 1408], [7, 256], [7, 256], [7, 256], [7, 256], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 2], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [4, 3], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 128], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 8], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [5, 9], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 16], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [6, 17], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 4], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [4, 5], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 14], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [6, 15], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [5, 64], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 6], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7], [4, 7]]; - var blackTable1 = [[-1, -1], [-1, -1], [12, ccittEOL], [12, ccittEOL], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [-1, -1], [11, 1792], [11, 1792], [11, 1792], [11, 1792], [12, 1984], [12, 1984], [12, 2048], [12, 2048], [12, 2112], [12, 2112], [12, 2176], [12, 2176], [12, 2240], [12, 2240], [12, 2304], [12, 2304], [11, 1856], [11, 1856], [11, 1856], [11, 1856], [11, 1920], [11, 1920], [11, 1920], [11, 1920], [12, 2368], [12, 2368], [12, 2432], [12, 2432], [12, 2496], [12, 2496], [12, 2560], [12, 2560], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [10, 18], [12, 52], [12, 52], [13, 640], [13, 704], [13, 768], [13, 832], [12, 55], [12, 55], [12, 56], [12, 56], [13, 1280], [13, 1344], [13, 1408], [13, 1472], [12, 59], [12, 59], [12, 60], [12, 60], [13, 1536], [13, 1600], [11, 24], [11, 24], [11, 24], [11, 24], [11, 25], [11, 25], [11, 25], [11, 25], [13, 1664], [13, 1728], [12, 320], [12, 320], [12, 384], [12, 384], [12, 448], [12, 448], [13, 512], [13, 576], [12, 53], [12, 53], [12, 54], [12, 54], [13, 896], [13, 960], [13, 1024], [13, 1088], [13, 1152], [13, 1216], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64], [10, 64]]; - var blackTable2 = [[8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [8, 13], [11, 23], [11, 23], [12, 50], [12, 51], [12, 44], [12, 45], [12, 46], [12, 47], [12, 57], [12, 58], [12, 61], [12, 256], [10, 16], [10, 16], [10, 16], [10, 16], [10, 17], [10, 17], [10, 17], [10, 17], [12, 48], [12, 49], [12, 62], [12, 63], [12, 30], [12, 31], [12, 32], [12, 33], [12, 40], [12, 41], [11, 22], [11, 22], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [8, 14], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 10], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [7, 11], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [9, 15], [12, 128], [12, 192], [12, 26], [12, 27], [12, 28], [12, 29], [11, 19], [11, 19], [11, 20], [11, 20], [12, 34], [12, 35], [12, 36], [12, 37], [12, 38], [12, 39], [11, 21], [11, 21], [12, 42], [12, 43], [10, 0], [10, 0], [10, 0], [10, 0], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12], [7, 12]]; - var blackTable3 = [[-1, -1], [-1, -1], [-1, -1], [-1, -1], [6, 9], [6, 8], [5, 7], [5, 7], [4, 6], [4, 6], [4, 6], [4, 6], [4, 5], [4, 5], [4, 5], [4, 5], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 1], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [3, 4], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 3], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2], [2, 2]]; - function CCITTFaxDecoder(source) { - var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - if (!source || typeof source.next !== 'function') { - throw new Error('CCITTFaxDecoder - invalid "source" parameter.'); - } - this.source = source; - this.eof = false; - this.encoding = options['K'] || 0; - this.eoline = options['EndOfLine'] || false; - this.byteAlign = options['EncodedByteAlign'] || false; - this.columns = options['Columns'] || 1728; - this.rows = options['Rows'] || 0; - var eoblock = options['EndOfBlock']; - if (eoblock === null || eoblock === undefined) { - eoblock = true; - } - this.eoblock = eoblock; - this.black = options['BlackIs1'] || false; - this.codingLine = new Uint32Array(this.columns + 1); - this.refLine = new Uint32Array(this.columns + 2); - this.codingLine[0] = this.columns; - this.codingPos = 0; - this.row = 0; - this.nextLine2D = this.encoding < 0; - this.inputBits = 0; - this.inputBuf = 0; - this.outputBits = 0; - this.rowsDone = false; - var code1 = void 0; - while ((code1 = this._lookBits(12)) === 0) { - this._eatBits(1); - } - if (code1 === 1) { - this._eatBits(12); - } - if (this.encoding > 0) { - this.nextLine2D = !this._lookBits(1); - this._eatBits(1); - } - } - CCITTFaxDecoder.prototype = { - readNextChar: function readNextChar() { - if (this.eof) { - return -1; - } - var refLine = this.refLine; - var codingLine = this.codingLine; - var columns = this.columns; - var refPos = void 0, - blackPixels = void 0, - bits = void 0, - i = void 0; - if (this.outputBits === 0) { - if (this.rowsDone) { - this.eof = true; - } - if (this.eof) { - return -1; - } - this.err = false; - var code1 = void 0, - code2 = void 0, - code3 = void 0; - if (this.nextLine2D) { - for (i = 0; codingLine[i] < columns; ++i) { - refLine[i] = codingLine[i]; - } - refLine[i++] = columns; - refLine[i] = columns; - codingLine[0] = 0; - this.codingPos = 0; - refPos = 0; - blackPixels = 0; - while (codingLine[this.codingPos] < columns) { - code1 = this._getTwoDimCode(); - switch (code1) { - case twoDimPass: - this._addPixels(refLine[refPos + 1], blackPixels); - if (refLine[refPos + 1] < columns) { - refPos += 2; - } - break; - case twoDimHoriz: - code1 = code2 = 0; - if (blackPixels) { - do { - code1 += code3 = this._getBlackCode(); - } while (code3 >= 64); - do { - code2 += code3 = this._getWhiteCode(); - } while (code3 >= 64); - } else { - do { - code1 += code3 = this._getWhiteCode(); - } while (code3 >= 64); - do { - code2 += code3 = this._getBlackCode(); - } while (code3 >= 64); - } - this._addPixels(codingLine[this.codingPos] + code1, blackPixels); - if (codingLine[this.codingPos] < columns) { - this._addPixels(codingLine[this.codingPos] + code2, blackPixels ^ 1); - } - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - break; - case twoDimVertR3: - this._addPixels(refLine[refPos] + 3, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - ++refPos; - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertR2: - this._addPixels(refLine[refPos] + 2, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - ++refPos; - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertR1: - this._addPixels(refLine[refPos] + 1, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - ++refPos; - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVert0: - this._addPixels(refLine[refPos], blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - ++refPos; - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertL3: - this._addPixelsNeg(refLine[refPos] - 3, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - if (refPos > 0) { - --refPos; - } else { - ++refPos; - } - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertL2: - this._addPixelsNeg(refLine[refPos] - 2, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - if (refPos > 0) { - --refPos; - } else { - ++refPos; - } - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case twoDimVertL1: - this._addPixelsNeg(refLine[refPos] - 1, blackPixels); - blackPixels ^= 1; - if (codingLine[this.codingPos] < columns) { - if (refPos > 0) { - --refPos; - } else { - ++refPos; - } - while (refLine[refPos] <= codingLine[this.codingPos] && refLine[refPos] < columns) { - refPos += 2; - } - } - break; - case ccittEOF: - this._addPixels(columns, 0); - this.eof = true; - break; - default: - (0, _util.info)('bad 2d code'); - this._addPixels(columns, 0); - this.err = true; - } - } - } else { - codingLine[0] = 0; - this.codingPos = 0; - blackPixels = 0; - while (codingLine[this.codingPos] < columns) { - code1 = 0; - if (blackPixels) { - do { - code1 += code3 = this._getBlackCode(); - } while (code3 >= 64); - } else { - do { - code1 += code3 = this._getWhiteCode(); - } while (code3 >= 64); - } - this._addPixels(codingLine[this.codingPos] + code1, blackPixels); - blackPixels ^= 1; - } - } - var gotEOL = false; - if (this.byteAlign) { - this.inputBits &= ~7; - } - if (!this.eoblock && this.row === this.rows - 1) { - this.rowsDone = true; - } else { - code1 = this._lookBits(12); - if (this.eoline) { - while (code1 !== ccittEOF && code1 !== 1) { - this._eatBits(1); - code1 = this._lookBits(12); - } - } else { - while (code1 === 0) { - this._eatBits(1); - code1 = this._lookBits(12); - } - } - if (code1 === 1) { - this._eatBits(12); - gotEOL = true; - } else if (code1 === ccittEOF) { - this.eof = true; - } - } - if (!this.eof && this.encoding > 0 && !this.rowsDone) { - this.nextLine2D = !this._lookBits(1); - this._eatBits(1); - } - if (this.eoblock && gotEOL && this.byteAlign) { - code1 = this._lookBits(12); - if (code1 === 1) { - this._eatBits(12); - if (this.encoding > 0) { - this._lookBits(1); - this._eatBits(1); - } - if (this.encoding >= 0) { - for (i = 0; i < 4; ++i) { - code1 = this._lookBits(12); - if (code1 !== 1) { - (0, _util.info)('bad rtc code: ' + code1); - } - this._eatBits(12); - if (this.encoding > 0) { - this._lookBits(1); - this._eatBits(1); - } - } - } - this.eof = true; - } - } else if (this.err && this.eoline) { - while (true) { - code1 = this._lookBits(13); - if (code1 === ccittEOF) { - this.eof = true; - return -1; - } - if (code1 >> 1 === 1) { - break; - } - this._eatBits(1); - } - this._eatBits(12); - if (this.encoding > 0) { - this._eatBits(1); - this.nextLine2D = !(code1 & 1); - } - } - if (codingLine[0] > 0) { - this.outputBits = codingLine[this.codingPos = 0]; - } else { - this.outputBits = codingLine[this.codingPos = 1]; - } - this.row++; - } - var c = void 0; - if (this.outputBits >= 8) { - c = this.codingPos & 1 ? 0 : 0xFF; - this.outputBits -= 8; - if (this.outputBits === 0 && codingLine[this.codingPos] < columns) { - this.codingPos++; - this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; - } - } else { - bits = 8; - c = 0; - do { - if (this.outputBits > bits) { - c <<= bits; - if (!(this.codingPos & 1)) { - c |= 0xFF >> 8 - bits; - } - this.outputBits -= bits; - bits = 0; - } else { - c <<= this.outputBits; - if (!(this.codingPos & 1)) { - c |= 0xFF >> 8 - this.outputBits; - } - bits -= this.outputBits; - this.outputBits = 0; - if (codingLine[this.codingPos] < columns) { - this.codingPos++; - this.outputBits = codingLine[this.codingPos] - codingLine[this.codingPos - 1]; - } else if (bits > 0) { - c <<= bits; - bits = 0; - } - } - } while (bits); - } - if (this.black) { - c ^= 0xFF; - } - return c; - }, - _addPixels: function _addPixels(a1, blackPixels) { - var codingLine = this.codingLine; - var codingPos = this.codingPos; - if (a1 > codingLine[codingPos]) { - if (a1 > this.columns) { - (0, _util.info)('row is wrong length'); - this.err = true; - a1 = this.columns; - } - if (codingPos & 1 ^ blackPixels) { - ++codingPos; - } - codingLine[codingPos] = a1; - } - this.codingPos = codingPos; - }, - _addPixelsNeg: function _addPixelsNeg(a1, blackPixels) { - var codingLine = this.codingLine; - var codingPos = this.codingPos; - if (a1 > codingLine[codingPos]) { - if (a1 > this.columns) { - (0, _util.info)('row is wrong length'); - this.err = true; - a1 = this.columns; - } - if (codingPos & 1 ^ blackPixels) { - ++codingPos; - } - codingLine[codingPos] = a1; - } else if (a1 < codingLine[codingPos]) { - if (a1 < 0) { - (0, _util.info)('invalid code'); - this.err = true; - a1 = 0; - } - while (codingPos > 0 && a1 < codingLine[codingPos - 1]) { - --codingPos; - } - codingLine[codingPos] = a1; - } - this.codingPos = codingPos; - }, - _findTableCode: function _findTableCode(start, end, table, limit) { - var limitValue = limit || 0; - for (var i = start; i <= end; ++i) { - var code = this._lookBits(i); - if (code === ccittEOF) { - return [true, 1, false]; - } - if (i < end) { - code <<= end - i; - } - if (!limitValue || code >= limitValue) { - var p = table[code - limitValue]; - if (p[0] === i) { - this._eatBits(i); - return [true, p[1], true]; - } - } - } - return [false, 0, false]; - }, - _getTwoDimCode: function _getTwoDimCode() { - var code = 0; - var p = void 0; - if (this.eoblock) { - code = this._lookBits(7); - p = twoDimTable[code]; - if (p && p[0] > 0) { - this._eatBits(p[0]); - return p[1]; - } - } else { - var result = this._findTableCode(1, 7, twoDimTable); - if (result[0] && result[2]) { - return result[1]; - } - } - (0, _util.info)('Bad two dim code'); - return ccittEOF; - }, - _getWhiteCode: function _getWhiteCode() { - var code = 0; - var p = void 0; - if (this.eoblock) { - code = this._lookBits(12); - if (code === ccittEOF) { - return 1; - } - if (code >> 5 === 0) { - p = whiteTable1[code]; - } else { - p = whiteTable2[code >> 3]; - } - if (p[0] > 0) { - this._eatBits(p[0]); - return p[1]; - } - } else { - var result = this._findTableCode(1, 9, whiteTable2); - if (result[0]) { - return result[1]; - } - result = this._findTableCode(11, 12, whiteTable1); - if (result[0]) { - return result[1]; - } - } - (0, _util.info)('bad white code'); - this._eatBits(1); - return 1; - }, - _getBlackCode: function _getBlackCode() { - var code = void 0, - p = void 0; - if (this.eoblock) { - code = this._lookBits(13); - if (code === ccittEOF) { - return 1; - } - if (code >> 7 === 0) { - p = blackTable1[code]; - } else if (code >> 9 === 0 && code >> 7 !== 0) { - p = blackTable2[(code >> 1) - 64]; - } else { - p = blackTable3[code >> 7]; - } - if (p[0] > 0) { - this._eatBits(p[0]); - return p[1]; - } - } else { - var result = this._findTableCode(2, 6, blackTable3); - if (result[0]) { - return result[1]; - } - result = this._findTableCode(7, 12, blackTable2, 64); - if (result[0]) { - return result[1]; - } - result = this._findTableCode(10, 13, blackTable1); - if (result[0]) { - return result[1]; - } - } - (0, _util.info)('bad black code'); - this._eatBits(1); - return 1; - }, - _lookBits: function _lookBits(n) { - var c = void 0; - while (this.inputBits < n) { - if ((c = this.source.next()) === -1) { - if (this.inputBits === 0) { - return ccittEOF; - } - return this.inputBuf << n - this.inputBits & 0xFFFF >> 16 - n; - } - this.inputBuf = this.inputBuf << 8 | c; - this.inputBits += 8; - } - return this.inputBuf >> this.inputBits - n & 0xFFFF >> 16 - n; - }, - _eatBits: function _eatBits(n) { - if ((this.inputBits -= n) < 0) { - this.inputBits = 0; - } - } - }; - return CCITTFaxDecoder; -}(); -exports.CCITTFaxDecoder = CCITTFaxDecoder; - -/***/ }), -/* 143 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Jbig2Stream = undefined; - -var _primitives = __w_pdfjs_require__(138); - -var _stream = __w_pdfjs_require__(140); - -var _jbig = __w_pdfjs_require__(144); - -var _util = __w_pdfjs_require__(2); - -var Jbig2Stream = function Jbig2StreamClosure() { - function Jbig2Stream(stream, maybeLength, dict, params) { - this.stream = stream; - this.maybeLength = maybeLength; - this.dict = dict; - this.params = params; - _stream.DecodeStream.call(this, maybeLength); - } - Jbig2Stream.prototype = Object.create(_stream.DecodeStream.prototype); - Object.defineProperty(Jbig2Stream.prototype, 'bytes', { - get: function get() { - return (0, _util.shadow)(this, 'bytes', this.stream.getBytes(this.maybeLength)); - }, - - configurable: true - }); - Jbig2Stream.prototype.ensureBuffer = function (requested) {}; - Jbig2Stream.prototype.readBlock = function () { - if (this.eof) { - return; - } - var jbig2Image = new _jbig.Jbig2Image(); - var chunks = []; - if ((0, _primitives.isDict)(this.params)) { - var globalsStream = this.params.get('JBIG2Globals'); - if ((0, _primitives.isStream)(globalsStream)) { - var globals = globalsStream.getBytes(); - chunks.push({ - data: globals, - start: 0, - end: globals.length - }); - } - } - chunks.push({ - data: this.bytes, - start: 0, - end: this.bytes.length - }); - var data = jbig2Image.parseChunks(chunks); - var dataLength = data.length; - for (var i = 0; i < dataLength; i++) { - data[i] ^= 0xFF; - } - this.buffer = data; - this.bufferLength = dataLength; - this.eof = true; - }; - return Jbig2Stream; -}(); -exports.Jbig2Stream = Jbig2Stream; - -/***/ }), -/* 144 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Jbig2Image = undefined; - -var _util = __w_pdfjs_require__(2); - -var _arithmetic_decoder = __w_pdfjs_require__(145); - -var _ccitt = __w_pdfjs_require__(142); - -var Jbig2Error = function Jbig2ErrorClosure() { - function Jbig2Error(msg) { - this.message = 'JBIG2 error: ' + msg; - } - Jbig2Error.prototype = new Error(); - Jbig2Error.prototype.name = 'Jbig2Error'; - Jbig2Error.constructor = Jbig2Error; - return Jbig2Error; -}(); -var Jbig2Image = function Jbig2ImageClosure() { - function ContextCache() {} - ContextCache.prototype = { - getContexts: function getContexts(id) { - if (id in this) { - return this[id]; - } - return this[id] = new Int8Array(1 << 16); - } - }; - function DecodingContext(data, start, end) { - this.data = data; - this.start = start; - this.end = end; - } - DecodingContext.prototype = { - get decoder() { - var decoder = new _arithmetic_decoder.ArithmeticDecoder(this.data, this.start, this.end); - return (0, _util.shadow)(this, 'decoder', decoder); - }, - get contextCache() { - var cache = new ContextCache(); - return (0, _util.shadow)(this, 'contextCache', cache); - } - }; - function decodeInteger(contextCache, procedure, decoder) { - var contexts = contextCache.getContexts(procedure); - var prev = 1; - function readBits(length) { - var v = 0; - for (var i = 0; i < length; i++) { - var bit = decoder.readBit(contexts, prev); - prev = prev < 256 ? prev << 1 | bit : (prev << 1 | bit) & 511 | 256; - v = v << 1 | bit; - } - return v >>> 0; - } - var sign = readBits(1); - var value = readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(1) ? readBits(32) + 4436 : readBits(12) + 340 : readBits(8) + 84 : readBits(6) + 20 : readBits(4) + 4 : readBits(2); - return sign === 0 ? value : value > 0 ? -value : null; - } - function decodeIAID(contextCache, decoder, codeLength) { - var contexts = contextCache.getContexts('IAID'); - var prev = 1; - for (var i = 0; i < codeLength; i++) { - var bit = decoder.readBit(contexts, prev); - prev = prev << 1 | bit; - } - if (codeLength < 31) { - return prev & (1 << codeLength) - 1; - } - return prev & 0x7FFFFFFF; - } - var SegmentTypes = ['SymbolDictionary', null, null, null, 'IntermediateTextRegion', null, 'ImmediateTextRegion', 'ImmediateLosslessTextRegion', null, null, null, null, null, null, null, null, 'PatternDictionary', null, null, null, 'IntermediateHalftoneRegion', null, 'ImmediateHalftoneRegion', 'ImmediateLosslessHalftoneRegion', null, null, null, null, null, null, null, null, null, null, null, null, 'IntermediateGenericRegion', null, 'ImmediateGenericRegion', 'ImmediateLosslessGenericRegion', 'IntermediateGenericRefinementRegion', null, 'ImmediateGenericRefinementRegion', 'ImmediateLosslessGenericRefinementRegion', null, null, null, null, 'PageInformation', 'EndOfPage', 'EndOfStripe', 'EndOfFile', 'Profiles', 'Tables', null, null, null, null, null, null, null, null, 'Extension']; - var CodingTemplates = [[{ - x: -1, - y: -2 - }, { - x: 0, - y: -2 - }, { - x: 1, - y: -2 - }, { - x: -2, - y: -1 - }, { - x: -1, - y: -1 - }, { - x: 0, - y: -1 - }, { - x: 1, - y: -1 - }, { - x: 2, - y: -1 - }, { - x: -4, - y: 0 - }, { - x: -3, - y: 0 - }, { - x: -2, - y: 0 - }, { - x: -1, - y: 0 - }], [{ - x: -1, - y: -2 - }, { - x: 0, - y: -2 - }, { - x: 1, - y: -2 - }, { - x: 2, - y: -2 - }, { - x: -2, - y: -1 - }, { - x: -1, - y: -1 - }, { - x: 0, - y: -1 - }, { - x: 1, - y: -1 - }, { - x: 2, - y: -1 - }, { - x: -3, - y: 0 - }, { - x: -2, - y: 0 - }, { - x: -1, - y: 0 - }], [{ - x: -1, - y: -2 - }, { - x: 0, - y: -2 - }, { - x: 1, - y: -2 - }, { - x: -2, - y: -1 - }, { - x: -1, - y: -1 - }, { - x: 0, - y: -1 - }, { - x: 1, - y: -1 - }, { - x: -2, - y: 0 - }, { - x: -1, - y: 0 - }], [{ - x: -3, - y: -1 - }, { - x: -2, - y: -1 - }, { - x: -1, - y: -1 - }, { - x: 0, - y: -1 - }, { - x: 1, - y: -1 - }, { - x: -4, - y: 0 - }, { - x: -3, - y: 0 - }, { - x: -2, - y: 0 - }, { - x: -1, - y: 0 - }]]; - var RefinementTemplates = [{ - coding: [{ - x: 0, - y: -1 - }, { - x: 1, - y: -1 - }, { - x: -1, - y: 0 - }], - reference: [{ - x: 0, - y: -1 - }, { - x: 1, - y: -1 - }, { - x: -1, - y: 0 - }, { - x: 0, - y: 0 - }, { - x: 1, - y: 0 - }, { - x: -1, - y: 1 - }, { - x: 0, - y: 1 - }, { - x: 1, - y: 1 - }] - }, { - coding: [{ - x: -1, - y: -1 - }, { - x: 0, - y: -1 - }, { - x: 1, - y: -1 - }, { - x: -1, - y: 0 - }], - reference: [{ - x: 0, - y: -1 - }, { - x: -1, - y: 0 - }, { - x: 0, - y: 0 - }, { - x: 1, - y: 0 - }, { - x: 0, - y: 1 - }, { - x: 1, - y: 1 - }] - }]; - var ReusedContexts = [0x9B25, 0x0795, 0x00E5, 0x0195]; - var RefinementReusedContexts = [0x0020, 0x0008]; - function decodeBitmapTemplate0(width, height, decodingContext) { - var decoder = decodingContext.decoder; - var contexts = decodingContext.contextCache.getContexts('GB'); - var contextLabel, - i, - j, - pixel, - row, - row1, - row2, - bitmap = []; - var OLD_PIXEL_MASK = 0x7BF7; - for (i = 0; i < height; i++) { - row = bitmap[i] = new Uint8Array(width); - row1 = i < 1 ? row : bitmap[i - 1]; - row2 = i < 2 ? row : bitmap[i - 2]; - contextLabel = row2[0] << 13 | row2[1] << 12 | row2[2] << 11 | row1[0] << 7 | row1[1] << 6 | row1[2] << 5 | row1[3] << 4; - for (j = 0; j < width; j++) { - row[j] = pixel = decoder.readBit(contexts, contextLabel); - contextLabel = (contextLabel & OLD_PIXEL_MASK) << 1 | (j + 3 < width ? row2[j + 3] << 11 : 0) | (j + 4 < width ? row1[j + 4] << 4 : 0) | pixel; - } - } - return bitmap; - } - function decodeBitmap(mmr, width, height, templateIndex, prediction, skip, at, decodingContext) { - if (mmr) { - var input = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); - return decodeMMRBitmap(input, width, height, false); - } - if (templateIndex === 0 && !skip && !prediction && at.length === 4 && at[0].x === 3 && at[0].y === -1 && at[1].x === -3 && at[1].y === -1 && at[2].x === 2 && at[2].y === -2 && at[3].x === -2 && at[3].y === -2) { - return decodeBitmapTemplate0(width, height, decodingContext); - } - var useskip = !!skip; - var template = CodingTemplates[templateIndex].concat(at); - template.sort(function (a, b) { - return a.y - b.y || a.x - b.x; - }); - var templateLength = template.length; - var templateX = new Int8Array(templateLength); - var templateY = new Int8Array(templateLength); - var changingTemplateEntries = []; - var reuseMask = 0, - minX = 0, - maxX = 0, - minY = 0; - var c, k; - for (k = 0; k < templateLength; k++) { - templateX[k] = template[k].x; - templateY[k] = template[k].y; - minX = Math.min(minX, template[k].x); - maxX = Math.max(maxX, template[k].x); - minY = Math.min(minY, template[k].y); - if (k < templateLength - 1 && template[k].y === template[k + 1].y && template[k].x === template[k + 1].x - 1) { - reuseMask |= 1 << templateLength - 1 - k; - } else { - changingTemplateEntries.push(k); - } - } - var changingEntriesLength = changingTemplateEntries.length; - var changingTemplateX = new Int8Array(changingEntriesLength); - var changingTemplateY = new Int8Array(changingEntriesLength); - var changingTemplateBit = new Uint16Array(changingEntriesLength); - for (c = 0; c < changingEntriesLength; c++) { - k = changingTemplateEntries[c]; - changingTemplateX[c] = template[k].x; - changingTemplateY[c] = template[k].y; - changingTemplateBit[c] = 1 << templateLength - 1 - k; - } - var sbb_left = -minX; - var sbb_top = -minY; - var sbb_right = width - maxX; - var pseudoPixelContext = ReusedContexts[templateIndex]; - var row = new Uint8Array(width); - var bitmap = []; - var decoder = decodingContext.decoder; - var contexts = decodingContext.contextCache.getContexts('GB'); - var ltp = 0, - j, - i0, - j0, - contextLabel = 0, - bit, - shift; - for (var i = 0; i < height; i++) { - if (prediction) { - var sltp = decoder.readBit(contexts, pseudoPixelContext); - ltp ^= sltp; - if (ltp) { - bitmap.push(row); - continue; - } - } - row = new Uint8Array(row); - bitmap.push(row); - for (j = 0; j < width; j++) { - if (useskip && skip[i][j]) { - row[j] = 0; - continue; - } - if (j >= sbb_left && j < sbb_right && i >= sbb_top) { - contextLabel = contextLabel << 1 & reuseMask; - for (k = 0; k < changingEntriesLength; k++) { - i0 = i + changingTemplateY[k]; - j0 = j + changingTemplateX[k]; - bit = bitmap[i0][j0]; - if (bit) { - bit = changingTemplateBit[k]; - contextLabel |= bit; - } - } - } else { - contextLabel = 0; - shift = templateLength - 1; - for (k = 0; k < templateLength; k++, shift--) { - j0 = j + templateX[k]; - if (j0 >= 0 && j0 < width) { - i0 = i + templateY[k]; - if (i0 >= 0) { - bit = bitmap[i0][j0]; - if (bit) { - contextLabel |= bit << shift; - } - } - } - } - } - var pixel = decoder.readBit(contexts, contextLabel); - row[j] = pixel; - } - } - return bitmap; - } - function decodeRefinement(width, height, templateIndex, referenceBitmap, offsetX, offsetY, prediction, at, decodingContext) { - var codingTemplate = RefinementTemplates[templateIndex].coding; - if (templateIndex === 0) { - codingTemplate = codingTemplate.concat([at[0]]); - } - var codingTemplateLength = codingTemplate.length; - var codingTemplateX = new Int32Array(codingTemplateLength); - var codingTemplateY = new Int32Array(codingTemplateLength); - var k; - for (k = 0; k < codingTemplateLength; k++) { - codingTemplateX[k] = codingTemplate[k].x; - codingTemplateY[k] = codingTemplate[k].y; - } - var referenceTemplate = RefinementTemplates[templateIndex].reference; - if (templateIndex === 0) { - referenceTemplate = referenceTemplate.concat([at[1]]); - } - var referenceTemplateLength = referenceTemplate.length; - var referenceTemplateX = new Int32Array(referenceTemplateLength); - var referenceTemplateY = new Int32Array(referenceTemplateLength); - for (k = 0; k < referenceTemplateLength; k++) { - referenceTemplateX[k] = referenceTemplate[k].x; - referenceTemplateY[k] = referenceTemplate[k].y; - } - var referenceWidth = referenceBitmap[0].length; - var referenceHeight = referenceBitmap.length; - var pseudoPixelContext = RefinementReusedContexts[templateIndex]; - var bitmap = []; - var decoder = decodingContext.decoder; - var contexts = decodingContext.contextCache.getContexts('GR'); - var ltp = 0; - for (var i = 0; i < height; i++) { - if (prediction) { - var sltp = decoder.readBit(contexts, pseudoPixelContext); - ltp ^= sltp; - if (ltp) { - throw new Jbig2Error('prediction is not supported'); - } - } - var row = new Uint8Array(width); - bitmap.push(row); - for (var j = 0; j < width; j++) { - var i0, j0; - var contextLabel = 0; - for (k = 0; k < codingTemplateLength; k++) { - i0 = i + codingTemplateY[k]; - j0 = j + codingTemplateX[k]; - if (i0 < 0 || j0 < 0 || j0 >= width) { - contextLabel <<= 1; - } else { - contextLabel = contextLabel << 1 | bitmap[i0][j0]; - } - } - for (k = 0; k < referenceTemplateLength; k++) { - i0 = i + referenceTemplateY[k] - offsetY; - j0 = j + referenceTemplateX[k] - offsetX; - if (i0 < 0 || i0 >= referenceHeight || j0 < 0 || j0 >= referenceWidth) { - contextLabel <<= 1; - } else { - contextLabel = contextLabel << 1 | referenceBitmap[i0][j0]; - } - } - var pixel = decoder.readBit(contexts, contextLabel); - row[j] = pixel; - } - } - return bitmap; - } - function decodeSymbolDictionary(huffman, refinement, symbols, numberOfNewSymbols, numberOfExportedSymbols, huffmanTables, templateIndex, at, refinementTemplateIndex, refinementAt, decodingContext, huffmanInput) { - if (huffman && refinement) { - throw new Jbig2Error('symbol refinement with Huffman is not supported'); - } - var newSymbols = []; - var currentHeight = 0; - var symbolCodeLength = (0, _util.log2)(symbols.length + numberOfNewSymbols); - var decoder = decodingContext.decoder; - var contextCache = decodingContext.contextCache; - var tableB1 = void 0, - symbolWidths = void 0; - if (huffman) { - tableB1 = getStandardTable(1); - symbolWidths = []; - symbolCodeLength = Math.max(symbolCodeLength, 1); - } - while (newSymbols.length < numberOfNewSymbols) { - var deltaHeight = huffman ? huffmanTables.tableDeltaHeight.decode(huffmanInput) : decodeInteger(contextCache, 'IADH', decoder); - currentHeight += deltaHeight; - var currentWidth = 0, - totalWidth = 0; - var firstSymbol = huffman ? symbolWidths.length : 0; - while (true) { - var deltaWidth = huffman ? huffmanTables.tableDeltaWidth.decode(huffmanInput) : decodeInteger(contextCache, 'IADW', decoder); - if (deltaWidth === null) { - break; - } - currentWidth += deltaWidth; - totalWidth += currentWidth; - var bitmap; - if (refinement) { - var numberOfInstances = decodeInteger(contextCache, 'IAAI', decoder); - if (numberOfInstances > 1) { - bitmap = decodeTextRegion(huffman, refinement, currentWidth, currentHeight, 0, numberOfInstances, 1, symbols.concat(newSymbols), symbolCodeLength, 0, 0, 1, 0, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, 0, huffmanInput); - } else { - var symbolId = decodeIAID(contextCache, decoder, symbolCodeLength); - var rdx = decodeInteger(contextCache, 'IARDX', decoder); - var rdy = decodeInteger(contextCache, 'IARDY', decoder); - var symbol = symbolId < symbols.length ? symbols[symbolId] : newSymbols[symbolId - symbols.length]; - bitmap = decodeRefinement(currentWidth, currentHeight, refinementTemplateIndex, symbol, rdx, rdy, false, refinementAt, decodingContext); - } - newSymbols.push(bitmap); - } else if (huffman) { - symbolWidths.push(currentWidth); - } else { - bitmap = decodeBitmap(false, currentWidth, currentHeight, templateIndex, false, null, at, decodingContext); - newSymbols.push(bitmap); - } - } - if (huffman && !refinement) { - var bitmapSize = huffmanTables.tableBitmapSize.decode(huffmanInput); - huffmanInput.byteAlign(); - var collectiveBitmap = void 0; - if (bitmapSize === 0) { - collectiveBitmap = readUncompressedBitmap(huffmanInput, totalWidth, currentHeight); - } else { - var originalEnd = huffmanInput.end; - var bitmapEnd = huffmanInput.position + bitmapSize; - huffmanInput.end = bitmapEnd; - collectiveBitmap = decodeMMRBitmap(huffmanInput, totalWidth, currentHeight, false); - huffmanInput.end = originalEnd; - huffmanInput.position = bitmapEnd; - } - var numberOfSymbolsDecoded = symbolWidths.length; - if (firstSymbol === numberOfSymbolsDecoded - 1) { - newSymbols.push(collectiveBitmap); - } else { - var _i = void 0, - y = void 0, - xMin = 0, - xMax = void 0, - bitmapWidth = void 0, - symbolBitmap = void 0; - for (_i = firstSymbol; _i < numberOfSymbolsDecoded; _i++) { - bitmapWidth = symbolWidths[_i]; - xMax = xMin + bitmapWidth; - symbolBitmap = []; - for (y = 0; y < currentHeight; y++) { - symbolBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); - } - newSymbols.push(symbolBitmap); - xMin = xMax; - } - } - } - } - var exportedSymbols = []; - var flags = [], - currentFlag = false; - var totalSymbolsLength = symbols.length + numberOfNewSymbols; - while (flags.length < totalSymbolsLength) { - var runLength = huffman ? tableB1.decode(huffmanInput) : decodeInteger(contextCache, 'IAEX', decoder); - while (runLength--) { - flags.push(currentFlag); - } - currentFlag = !currentFlag; - } - for (var i = 0, ii = symbols.length; i < ii; i++) { - if (flags[i]) { - exportedSymbols.push(symbols[i]); - } - } - for (var j = 0; j < numberOfNewSymbols; i++, j++) { - if (flags[i]) { - exportedSymbols.push(newSymbols[j]); - } - } - return exportedSymbols; - } - function decodeTextRegion(huffman, refinement, width, height, defaultPixelValue, numberOfSymbolInstances, stripSize, inputSymbols, symbolCodeLength, transposed, dsOffset, referenceCorner, combinationOperator, huffmanTables, refinementTemplateIndex, refinementAt, decodingContext, logStripSize, huffmanInput) { - if (huffman && refinement) { - throw new Jbig2Error('refinement with Huffman is not supported'); - } - var bitmap = []; - var i, row; - for (i = 0; i < height; i++) { - row = new Uint8Array(width); - if (defaultPixelValue) { - for (var j = 0; j < width; j++) { - row[j] = defaultPixelValue; - } - } - bitmap.push(row); - } - var decoder = decodingContext.decoder; - var contextCache = decodingContext.contextCache; - var stripT = huffman ? -huffmanTables.tableDeltaT.decode(huffmanInput) : -decodeInteger(contextCache, 'IADT', decoder); - var firstS = 0; - i = 0; - while (i < numberOfSymbolInstances) { - var deltaT = huffman ? huffmanTables.tableDeltaT.decode(huffmanInput) : decodeInteger(contextCache, 'IADT', decoder); - stripT += deltaT; - var deltaFirstS = huffman ? huffmanTables.tableFirstS.decode(huffmanInput) : decodeInteger(contextCache, 'IAFS', decoder); - firstS += deltaFirstS; - var currentS = firstS; - do { - var currentT = 0; - if (stripSize > 1) { - currentT = huffman ? huffmanInput.readBits(logStripSize) : decodeInteger(contextCache, 'IAIT', decoder); - } - var t = stripSize * stripT + currentT; - var symbolId = huffman ? huffmanTables.symbolIDTable.decode(huffmanInput) : decodeIAID(contextCache, decoder, symbolCodeLength); - var applyRefinement = refinement && (huffman ? huffmanInput.readBit() : decodeInteger(contextCache, 'IARI', decoder)); - var symbolBitmap = inputSymbols[symbolId]; - var symbolWidth = symbolBitmap[0].length; - var symbolHeight = symbolBitmap.length; - if (applyRefinement) { - var rdw = decodeInteger(contextCache, 'IARDW', decoder); - var rdh = decodeInteger(contextCache, 'IARDH', decoder); - var rdx = decodeInteger(contextCache, 'IARDX', decoder); - var rdy = decodeInteger(contextCache, 'IARDY', decoder); - symbolWidth += rdw; - symbolHeight += rdh; - symbolBitmap = decodeRefinement(symbolWidth, symbolHeight, refinementTemplateIndex, symbolBitmap, (rdw >> 1) + rdx, (rdh >> 1) + rdy, false, refinementAt, decodingContext); - } - var offsetT = t - (referenceCorner & 1 ? 0 : symbolHeight - 1); - var offsetS = currentS - (referenceCorner & 2 ? symbolWidth - 1 : 0); - var s2, t2, symbolRow; - if (transposed) { - for (s2 = 0; s2 < symbolHeight; s2++) { - row = bitmap[offsetS + s2]; - if (!row) { - continue; - } - symbolRow = symbolBitmap[s2]; - var maxWidth = Math.min(width - offsetT, symbolWidth); - switch (combinationOperator) { - case 0: - for (t2 = 0; t2 < maxWidth; t2++) { - row[offsetT + t2] |= symbolRow[t2]; - } - break; - case 2: - for (t2 = 0; t2 < maxWidth; t2++) { - row[offsetT + t2] ^= symbolRow[t2]; - } - break; - default: - throw new Jbig2Error('operator ' + combinationOperator + ' is not supported'); - } - } - currentS += symbolHeight - 1; - } else { - for (t2 = 0; t2 < symbolHeight; t2++) { - row = bitmap[offsetT + t2]; - if (!row) { - continue; - } - symbolRow = symbolBitmap[t2]; - switch (combinationOperator) { - case 0: - for (s2 = 0; s2 < symbolWidth; s2++) { - row[offsetS + s2] |= symbolRow[s2]; - } - break; - case 2: - for (s2 = 0; s2 < symbolWidth; s2++) { - row[offsetS + s2] ^= symbolRow[s2]; - } - break; - default: - throw new Jbig2Error('operator ' + combinationOperator + ' is not supported'); - } - } - currentS += symbolWidth - 1; - } - i++; - var deltaS = huffman ? huffmanTables.tableDeltaS.decode(huffmanInput) : decodeInteger(contextCache, 'IADS', decoder); - if (deltaS === null) { - break; - } - currentS += deltaS + dsOffset; - } while (true); - } - return bitmap; - } - function decodePatternDictionary(mmr, patternWidth, patternHeight, maxPatternIndex, template, decodingContext) { - var at = []; - if (!mmr) { - at.push({ - x: -patternWidth, - y: 0 - }); - if (template === 0) { - at.push({ - x: -3, - y: -1 - }); - at.push({ - x: 2, - y: -2 - }); - at.push({ - x: -2, - y: -2 - }); - } - } - var collectiveWidth = (maxPatternIndex + 1) * patternWidth; - var collectiveBitmap = decodeBitmap(mmr, collectiveWidth, patternHeight, template, false, null, at, decodingContext); - var patterns = [], - i = 0, - patternBitmap = void 0, - xMin = void 0, - xMax = void 0, - y = void 0; - while (i <= maxPatternIndex) { - patternBitmap = []; - xMin = patternWidth * i; - xMax = xMin + patternWidth; - for (y = 0; y < patternHeight; y++) { - patternBitmap.push(collectiveBitmap[y].subarray(xMin, xMax)); - } - patterns.push(patternBitmap); - i++; - } - return patterns; - } - function decodeHalftoneRegion(mmr, patterns, template, regionWidth, regionHeight, defaultPixelValue, enableSkip, combinationOperator, gridWidth, gridHeight, gridOffsetX, gridOffsetY, gridVectorX, gridVectorY, decodingContext) { - var skip = null; - if (enableSkip) { - throw new Jbig2Error('skip is not supported'); - } - if (combinationOperator !== 0) { - throw new Jbig2Error('operator ' + combinationOperator + ' is not supported in halftone region'); - } - var regionBitmap = []; - var i = void 0, - j = void 0, - row = void 0; - for (i = 0; i < regionHeight; i++) { - row = new Uint8Array(regionWidth); - if (defaultPixelValue) { - for (j = 0; j < regionWidth; j++) { - row[j] = defaultPixelValue; - } - } - regionBitmap.push(row); - } - var numberOfPatterns = patterns.length; - var pattern0 = patterns[0]; - var patternWidth = pattern0[0].length, - patternHeight = pattern0.length; - var bitsPerValue = (0, _util.log2)(numberOfPatterns); - var at = []; - if (!mmr) { - at.push({ - x: template <= 1 ? 3 : 2, - y: -1 - }); - if (template === 0) { - at.push({ - x: -3, - y: -1 - }); - at.push({ - x: 2, - y: -2 - }); - at.push({ - x: -2, - y: -2 - }); - } - } - var grayScaleBitPlanes = [], - mmrInput = void 0, - bitmap = void 0; - if (mmr) { - mmrInput = new Reader(decodingContext.data, decodingContext.start, decodingContext.end); - } - for (i = bitsPerValue - 1; i >= 0; i--) { - if (mmr) { - bitmap = decodeMMRBitmap(mmrInput, gridWidth, gridHeight, true); - } else { - bitmap = decodeBitmap(false, gridWidth, gridHeight, template, false, skip, at, decodingContext); - } - grayScaleBitPlanes[i] = bitmap; - } - var mg = void 0, - ng = void 0, - bit = void 0, - patternIndex = void 0, - patternBitmap = void 0, - x = void 0, - y = void 0, - patternRow = void 0, - regionRow = void 0; - for (mg = 0; mg < gridHeight; mg++) { - for (ng = 0; ng < gridWidth; ng++) { - bit = 0; - patternIndex = 0; - for (j = bitsPerValue - 1; j >= 0; j--) { - bit = grayScaleBitPlanes[j][mg][ng] ^ bit; - patternIndex |= bit << j; - } - patternBitmap = patterns[patternIndex]; - x = gridOffsetX + mg * gridVectorY + ng * gridVectorX >> 8; - y = gridOffsetY + mg * gridVectorX - ng * gridVectorY >> 8; - if (x >= 0 && x + patternWidth <= regionWidth && y >= 0 && y + patternHeight <= regionHeight) { - for (i = 0; i < patternHeight; i++) { - regionRow = regionBitmap[y + i]; - patternRow = patternBitmap[i]; - for (j = 0; j < patternWidth; j++) { - regionRow[x + j] |= patternRow[j]; - } - } - } else { - var regionX = void 0, - regionY = void 0; - for (i = 0; i < patternHeight; i++) { - regionY = y + i; - if (regionY < 0 || regionY >= regionHeight) { - continue; - } - regionRow = regionBitmap[regionY]; - patternRow = patternBitmap[i]; - for (j = 0; j < patternWidth; j++) { - regionX = x + j; - if (regionX >= 0 && regionX < regionWidth) { - regionRow[regionX] |= patternRow[j]; - } - } - } - } - } - } - return regionBitmap; - } - function readSegmentHeader(data, start) { - var segmentHeader = {}; - segmentHeader.number = (0, _util.readUint32)(data, start); - var flags = data[start + 4]; - var segmentType = flags & 0x3F; - if (!SegmentTypes[segmentType]) { - throw new Jbig2Error('invalid segment type: ' + segmentType); - } - segmentHeader.type = segmentType; - segmentHeader.typeName = SegmentTypes[segmentType]; - segmentHeader.deferredNonRetain = !!(flags & 0x80); - var pageAssociationFieldSize = !!(flags & 0x40); - var referredFlags = data[start + 5]; - var referredToCount = referredFlags >> 5 & 7; - var retainBits = [referredFlags & 31]; - var position = start + 6; - if (referredFlags === 7) { - referredToCount = (0, _util.readUint32)(data, position - 1) & 0x1FFFFFFF; - position += 3; - var bytes = referredToCount + 7 >> 3; - retainBits[0] = data[position++]; - while (--bytes > 0) { - retainBits.push(data[position++]); - } - } else if (referredFlags === 5 || referredFlags === 6) { - throw new Jbig2Error('invalid referred-to flags'); - } - segmentHeader.retainBits = retainBits; - var referredToSegmentNumberSize = segmentHeader.number <= 256 ? 1 : segmentHeader.number <= 65536 ? 2 : 4; - var referredTo = []; - var i, ii; - for (i = 0; i < referredToCount; i++) { - var number = referredToSegmentNumberSize === 1 ? data[position] : referredToSegmentNumberSize === 2 ? (0, _util.readUint16)(data, position) : (0, _util.readUint32)(data, position); - referredTo.push(number); - position += referredToSegmentNumberSize; - } - segmentHeader.referredTo = referredTo; - if (!pageAssociationFieldSize) { - segmentHeader.pageAssociation = data[position++]; - } else { - segmentHeader.pageAssociation = (0, _util.readUint32)(data, position); - position += 4; - } - segmentHeader.length = (0, _util.readUint32)(data, position); - position += 4; - if (segmentHeader.length === 0xFFFFFFFF) { - if (segmentType === 38) { - var genericRegionInfo = readRegionSegmentInformation(data, position); - var genericRegionSegmentFlags = data[position + RegionSegmentInformationFieldLength]; - var genericRegionMmr = !!(genericRegionSegmentFlags & 1); - var searchPatternLength = 6; - var searchPattern = new Uint8Array(searchPatternLength); - if (!genericRegionMmr) { - searchPattern[0] = 0xFF; - searchPattern[1] = 0xAC; - } - searchPattern[2] = genericRegionInfo.height >>> 24 & 0xFF; - searchPattern[3] = genericRegionInfo.height >> 16 & 0xFF; - searchPattern[4] = genericRegionInfo.height >> 8 & 0xFF; - searchPattern[5] = genericRegionInfo.height & 0xFF; - for (i = position, ii = data.length; i < ii; i++) { - var j = 0; - while (j < searchPatternLength && searchPattern[j] === data[i + j]) { - j++; - } - if (j === searchPatternLength) { - segmentHeader.length = i + searchPatternLength; - break; - } - } - if (segmentHeader.length === 0xFFFFFFFF) { - throw new Jbig2Error('segment end was not found'); - } - } else { - throw new Jbig2Error('invalid unknown segment length'); - } - } - segmentHeader.headerEnd = position; - return segmentHeader; - } - function readSegments(header, data, start, end) { - var segments = []; - var position = start; - while (position < end) { - var segmentHeader = readSegmentHeader(data, position); - position = segmentHeader.headerEnd; - var segment = { - header: segmentHeader, - data: data - }; - if (!header.randomAccess) { - segment.start = position; - position += segmentHeader.length; - segment.end = position; - } - segments.push(segment); - if (segmentHeader.type === 51) { - break; - } - } - if (header.randomAccess) { - for (var i = 0, ii = segments.length; i < ii; i++) { - segments[i].start = position; - position += segments[i].header.length; - segments[i].end = position; - } - } - return segments; - } - function readRegionSegmentInformation(data, start) { - return { - width: (0, _util.readUint32)(data, start), - height: (0, _util.readUint32)(data, start + 4), - x: (0, _util.readUint32)(data, start + 8), - y: (0, _util.readUint32)(data, start + 12), - combinationOperator: data[start + 16] & 7 - }; - } - var RegionSegmentInformationFieldLength = 17; - function processSegment(segment, visitor) { - var header = segment.header; - var data = segment.data, - position = segment.start, - end = segment.end; - var args, at, i, atLength; - switch (header.type) { - case 0: - var dictionary = {}; - var dictionaryFlags = (0, _util.readUint16)(data, position); - dictionary.huffman = !!(dictionaryFlags & 1); - dictionary.refinement = !!(dictionaryFlags & 2); - dictionary.huffmanDHSelector = dictionaryFlags >> 2 & 3; - dictionary.huffmanDWSelector = dictionaryFlags >> 4 & 3; - dictionary.bitmapSizeSelector = dictionaryFlags >> 6 & 1; - dictionary.aggregationInstancesSelector = dictionaryFlags >> 7 & 1; - dictionary.bitmapCodingContextUsed = !!(dictionaryFlags & 256); - dictionary.bitmapCodingContextRetained = !!(dictionaryFlags & 512); - dictionary.template = dictionaryFlags >> 10 & 3; - dictionary.refinementTemplate = dictionaryFlags >> 12 & 1; - position += 2; - if (!dictionary.huffman) { - atLength = dictionary.template === 0 ? 4 : 1; - at = []; - for (i = 0; i < atLength; i++) { - at.push({ - x: (0, _util.readInt8)(data, position), - y: (0, _util.readInt8)(data, position + 1) - }); - position += 2; - } - dictionary.at = at; - } - if (dictionary.refinement && !dictionary.refinementTemplate) { - at = []; - for (i = 0; i < 2; i++) { - at.push({ - x: (0, _util.readInt8)(data, position), - y: (0, _util.readInt8)(data, position + 1) - }); - position += 2; - } - dictionary.refinementAt = at; - } - dictionary.numberOfExportedSymbols = (0, _util.readUint32)(data, position); - position += 4; - dictionary.numberOfNewSymbols = (0, _util.readUint32)(data, position); - position += 4; - args = [dictionary, header.number, header.referredTo, data, position, end]; - break; - case 6: - case 7: - var textRegion = {}; - textRegion.info = readRegionSegmentInformation(data, position); - position += RegionSegmentInformationFieldLength; - var textRegionSegmentFlags = (0, _util.readUint16)(data, position); - position += 2; - textRegion.huffman = !!(textRegionSegmentFlags & 1); - textRegion.refinement = !!(textRegionSegmentFlags & 2); - textRegion.logStripSize = textRegionSegmentFlags >> 2 & 3; - textRegion.stripSize = 1 << textRegion.logStripSize; - textRegion.referenceCorner = textRegionSegmentFlags >> 4 & 3; - textRegion.transposed = !!(textRegionSegmentFlags & 64); - textRegion.combinationOperator = textRegionSegmentFlags >> 7 & 3; - textRegion.defaultPixelValue = textRegionSegmentFlags >> 9 & 1; - textRegion.dsOffset = textRegionSegmentFlags << 17 >> 27; - textRegion.refinementTemplate = textRegionSegmentFlags >> 15 & 1; - if (textRegion.huffman) { - var textRegionHuffmanFlags = (0, _util.readUint16)(data, position); - position += 2; - textRegion.huffmanFS = textRegionHuffmanFlags & 3; - textRegion.huffmanDS = textRegionHuffmanFlags >> 2 & 3; - textRegion.huffmanDT = textRegionHuffmanFlags >> 4 & 3; - textRegion.huffmanRefinementDW = textRegionHuffmanFlags >> 6 & 3; - textRegion.huffmanRefinementDH = textRegionHuffmanFlags >> 8 & 3; - textRegion.huffmanRefinementDX = textRegionHuffmanFlags >> 10 & 3; - textRegion.huffmanRefinementDY = textRegionHuffmanFlags >> 12 & 3; - textRegion.huffmanRefinementSizeSelector = !!(textRegionHuffmanFlags & 0x4000); - } - if (textRegion.refinement && !textRegion.refinementTemplate) { - at = []; - for (i = 0; i < 2; i++) { - at.push({ - x: (0, _util.readInt8)(data, position), - y: (0, _util.readInt8)(data, position + 1) - }); - position += 2; - } - textRegion.refinementAt = at; - } - textRegion.numberOfSymbolInstances = (0, _util.readUint32)(data, position); - position += 4; - args = [textRegion, header.referredTo, data, position, end]; - break; - case 16: - var patternDictionary = {}; - var patternDictionaryFlags = data[position++]; - patternDictionary.mmr = !!(patternDictionaryFlags & 1); - patternDictionary.template = patternDictionaryFlags >> 1 & 3; - patternDictionary.patternWidth = data[position++]; - patternDictionary.patternHeight = data[position++]; - patternDictionary.maxPatternIndex = (0, _util.readUint32)(data, position); - position += 4; - args = [patternDictionary, header.number, data, position, end]; - break; - case 22: - case 23: - var halftoneRegion = {}; - halftoneRegion.info = readRegionSegmentInformation(data, position); - position += RegionSegmentInformationFieldLength; - var halftoneRegionFlags = data[position++]; - halftoneRegion.mmr = !!(halftoneRegionFlags & 1); - halftoneRegion.template = halftoneRegionFlags >> 1 & 3; - halftoneRegion.enableSkip = !!(halftoneRegionFlags & 8); - halftoneRegion.combinationOperator = halftoneRegionFlags >> 4 & 7; - halftoneRegion.defaultPixelValue = halftoneRegionFlags >> 7 & 1; - halftoneRegion.gridWidth = (0, _util.readUint32)(data, position); - position += 4; - halftoneRegion.gridHeight = (0, _util.readUint32)(data, position); - position += 4; - halftoneRegion.gridOffsetX = (0, _util.readUint32)(data, position) & 0xFFFFFFFF; - position += 4; - halftoneRegion.gridOffsetY = (0, _util.readUint32)(data, position) & 0xFFFFFFFF; - position += 4; - halftoneRegion.gridVectorX = (0, _util.readUint16)(data, position); - position += 2; - halftoneRegion.gridVectorY = (0, _util.readUint16)(data, position); - position += 2; - args = [halftoneRegion, header.referredTo, data, position, end]; - break; - case 38: - case 39: - var genericRegion = {}; - genericRegion.info = readRegionSegmentInformation(data, position); - position += RegionSegmentInformationFieldLength; - var genericRegionSegmentFlags = data[position++]; - genericRegion.mmr = !!(genericRegionSegmentFlags & 1); - genericRegion.template = genericRegionSegmentFlags >> 1 & 3; - genericRegion.prediction = !!(genericRegionSegmentFlags & 8); - if (!genericRegion.mmr) { - atLength = genericRegion.template === 0 ? 4 : 1; - at = []; - for (i = 0; i < atLength; i++) { - at.push({ - x: (0, _util.readInt8)(data, position), - y: (0, _util.readInt8)(data, position + 1) - }); - position += 2; - } - genericRegion.at = at; - } - args = [genericRegion, data, position, end]; - break; - case 48: - var pageInfo = { - width: (0, _util.readUint32)(data, position), - height: (0, _util.readUint32)(data, position + 4), - resolutionX: (0, _util.readUint32)(data, position + 8), - resolutionY: (0, _util.readUint32)(data, position + 12) - }; - if (pageInfo.height === 0xFFFFFFFF) { - delete pageInfo.height; - } - var pageSegmentFlags = data[position + 16]; - (0, _util.readUint16)(data, position + 17); - pageInfo.lossless = !!(pageSegmentFlags & 1); - pageInfo.refinement = !!(pageSegmentFlags & 2); - pageInfo.defaultPixelValue = pageSegmentFlags >> 2 & 1; - pageInfo.combinationOperator = pageSegmentFlags >> 3 & 3; - pageInfo.requiresBuffer = !!(pageSegmentFlags & 32); - pageInfo.combinationOperatorOverride = !!(pageSegmentFlags & 64); - args = [pageInfo]; - break; - case 49: - break; - case 50: - break; - case 51: - break; - case 53: - args = [header.number, data, position, end]; - break; - case 62: - break; - default: - throw new Jbig2Error('segment type ' + header.typeName + '(' + header.type + ')' + ' is not implemented'); - } - var callbackName = 'on' + header.typeName; - if (callbackName in visitor) { - visitor[callbackName].apply(visitor, args); - } - } - function processSegments(segments, visitor) { - for (var i = 0, ii = segments.length; i < ii; i++) { - processSegment(segments[i], visitor); - } - } - function parseJbig2Chunks(chunks) { - var visitor = new SimpleSegmentVisitor(); - for (var i = 0, ii = chunks.length; i < ii; i++) { - var chunk = chunks[i]; - var segments = readSegments({}, chunk.data, chunk.start, chunk.end); - processSegments(segments, visitor); - } - return visitor.buffer; - } - function parseJbig2(data) { - var position = 0, - end = data.length; - if (data[position] !== 0x97 || data[position + 1] !== 0x4A || data[position + 2] !== 0x42 || data[position + 3] !== 0x32 || data[position + 4] !== 0x0D || data[position + 5] !== 0x0A || data[position + 6] !== 0x1A || data[position + 7] !== 0x0A) { - throw new Jbig2Error('parseJbig2 - invalid header.'); - } - var header = Object.create(null); - position += 8; - var flags = data[position++]; - header.randomAccess = !(flags & 1); - if (!(flags & 2)) { - header.numberOfPages = (0, _util.readUint32)(data, position); - position += 4; - } - var segments = readSegments(header, data, position, end); - var visitor = new SimpleSegmentVisitor(); - processSegments(segments, visitor); - var _visitor$currentPageI = visitor.currentPageInfo, - width = _visitor$currentPageI.width, - height = _visitor$currentPageI.height; - - var bitPacked = visitor.buffer; - var imgData = new Uint8ClampedArray(width * height); - var q = 0, - k = 0; - for (var i = 0; i < height; i++) { - var mask = 0, - buffer = void 0; - for (var j = 0; j < width; j++) { - if (!mask) { - mask = 128; - buffer = bitPacked[k++]; - } - imgData[q++] = buffer & mask ? 0 : 255; - mask >>= 1; - } - } - return { - imgData: imgData, - width: width, - height: height - }; - } - function SimpleSegmentVisitor() {} - SimpleSegmentVisitor.prototype = { - onPageInformation: function SimpleSegmentVisitor_onPageInformation(info) { - this.currentPageInfo = info; - var rowSize = info.width + 7 >> 3; - var buffer = new Uint8ClampedArray(rowSize * info.height); - if (info.defaultPixelValue) { - for (var i = 0, ii = buffer.length; i < ii; i++) { - buffer[i] = 0xFF; - } - } - this.buffer = buffer; - }, - drawBitmap: function SimpleSegmentVisitor_drawBitmap(regionInfo, bitmap) { - var pageInfo = this.currentPageInfo; - var width = regionInfo.width, - height = regionInfo.height; - var rowSize = pageInfo.width + 7 >> 3; - var combinationOperator = pageInfo.combinationOperatorOverride ? regionInfo.combinationOperator : pageInfo.combinationOperator; - var buffer = this.buffer; - var mask0 = 128 >> (regionInfo.x & 7); - var offset0 = regionInfo.y * rowSize + (regionInfo.x >> 3); - var i, j, mask, offset; - switch (combinationOperator) { - case 0: - for (i = 0; i < height; i++) { - mask = mask0; - offset = offset0; - for (j = 0; j < width; j++) { - if (bitmap[i][j]) { - buffer[offset] |= mask; - } - mask >>= 1; - if (!mask) { - mask = 128; - offset++; - } - } - offset0 += rowSize; - } - break; - case 2: - for (i = 0; i < height; i++) { - mask = mask0; - offset = offset0; - for (j = 0; j < width; j++) { - if (bitmap[i][j]) { - buffer[offset] ^= mask; - } - mask >>= 1; - if (!mask) { - mask = 128; - offset++; - } - } - offset0 += rowSize; - } - break; - default: - throw new Jbig2Error('operator ' + combinationOperator + ' is not supported'); - } - }, - onImmediateGenericRegion: function SimpleSegmentVisitor_onImmediateGenericRegion(region, data, start, end) { - var regionInfo = region.info; - var decodingContext = new DecodingContext(data, start, end); - var bitmap = decodeBitmap(region.mmr, regionInfo.width, regionInfo.height, region.template, region.prediction, null, region.at, decodingContext); - this.drawBitmap(regionInfo, bitmap); - }, - onImmediateLosslessGenericRegion: function SimpleSegmentVisitor_onImmediateLosslessGenericRegion() { - this.onImmediateGenericRegion.apply(this, arguments); - }, - onSymbolDictionary: function SimpleSegmentVisitor_onSymbolDictionary(dictionary, currentSegment, referredSegments, data, start, end) { - var huffmanTables = void 0, - huffmanInput = void 0; - if (dictionary.huffman) { - huffmanTables = getSymbolDictionaryHuffmanTables(dictionary, referredSegments, this.customTables); - huffmanInput = new Reader(data, start, end); - } - var symbols = this.symbols; - if (!symbols) { - this.symbols = symbols = {}; - } - var inputSymbols = []; - for (var i = 0, ii = referredSegments.length; i < ii; i++) { - var referredSymbols = symbols[referredSegments[i]]; - if (referredSymbols) { - inputSymbols = inputSymbols.concat(referredSymbols); - } - } - var decodingContext = new DecodingContext(data, start, end); - symbols[currentSegment] = decodeSymbolDictionary(dictionary.huffman, dictionary.refinement, inputSymbols, dictionary.numberOfNewSymbols, dictionary.numberOfExportedSymbols, huffmanTables, dictionary.template, dictionary.at, dictionary.refinementTemplate, dictionary.refinementAt, decodingContext, huffmanInput); - }, - onImmediateTextRegion: function SimpleSegmentVisitor_onImmediateTextRegion(region, referredSegments, data, start, end) { - var regionInfo = region.info; - var huffmanTables = void 0, - huffmanInput = void 0; - var symbols = this.symbols; - var inputSymbols = []; - for (var i = 0, ii = referredSegments.length; i < ii; i++) { - var referredSymbols = symbols[referredSegments[i]]; - if (referredSymbols) { - inputSymbols = inputSymbols.concat(referredSymbols); - } - } - var symbolCodeLength = (0, _util.log2)(inputSymbols.length); - if (region.huffman) { - huffmanInput = new Reader(data, start, end); - huffmanTables = getTextRegionHuffmanTables(region, referredSegments, this.customTables, inputSymbols.length, huffmanInput); - } - var decodingContext = new DecodingContext(data, start, end); - var bitmap = decodeTextRegion(region.huffman, region.refinement, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.numberOfSymbolInstances, region.stripSize, inputSymbols, symbolCodeLength, region.transposed, region.dsOffset, region.referenceCorner, region.combinationOperator, huffmanTables, region.refinementTemplate, region.refinementAt, decodingContext, region.logStripSize, huffmanInput); - this.drawBitmap(regionInfo, bitmap); - }, - onImmediateLosslessTextRegion: function SimpleSegmentVisitor_onImmediateLosslessTextRegion() { - this.onImmediateTextRegion.apply(this, arguments); - }, - onPatternDictionary: function onPatternDictionary(dictionary, currentSegment, data, start, end) { - var patterns = this.patterns; - if (!patterns) { - this.patterns = patterns = {}; - } - var decodingContext = new DecodingContext(data, start, end); - patterns[currentSegment] = decodePatternDictionary(dictionary.mmr, dictionary.patternWidth, dictionary.patternHeight, dictionary.maxPatternIndex, dictionary.template, decodingContext); - }, - onImmediateHalftoneRegion: function onImmediateHalftoneRegion(region, referredSegments, data, start, end) { - var patterns = this.patterns[referredSegments[0]]; - var regionInfo = region.info; - var decodingContext = new DecodingContext(data, start, end); - var bitmap = decodeHalftoneRegion(region.mmr, patterns, region.template, regionInfo.width, regionInfo.height, region.defaultPixelValue, region.enableSkip, region.combinationOperator, region.gridWidth, region.gridHeight, region.gridOffsetX, region.gridOffsetY, region.gridVectorX, region.gridVectorY, decodingContext); - this.drawBitmap(regionInfo, bitmap); - }, - onImmediateLosslessHalftoneRegion: function onImmediateLosslessHalftoneRegion() { - this.onImmediateHalftoneRegion.apply(this, arguments); - }, - onTables: function onTables(currentSegment, data, start, end) { - var customTables = this.customTables; - if (!customTables) { - this.customTables = customTables = {}; - } - customTables[currentSegment] = decodeTablesSegment(data, start, end); - } - }; - function HuffmanLine(lineData) { - if (lineData.length === 2) { - this.isOOB = true; - this.rangeLow = 0; - this.prefixLength = lineData[0]; - this.rangeLength = 0; - this.prefixCode = lineData[1]; - this.isLowerRange = false; - } else { - this.isOOB = false; - this.rangeLow = lineData[0]; - this.prefixLength = lineData[1]; - this.rangeLength = lineData[2]; - this.prefixCode = lineData[3]; - this.isLowerRange = lineData[4] === 'lower'; - } - } - function HuffmanTreeNode(line) { - this.children = []; - if (line) { - this.isLeaf = true; - this.rangeLength = line.rangeLength; - this.rangeLow = line.rangeLow; - this.isLowerRange = line.isLowerRange; - this.isOOB = line.isOOB; - } else { - this.isLeaf = false; - } - } - HuffmanTreeNode.prototype = { - buildTree: function buildTree(line, shift) { - var bit = line.prefixCode >> shift & 1; - if (shift <= 0) { - this.children[bit] = new HuffmanTreeNode(line); - } else { - var node = this.children[bit]; - if (!node) { - this.children[bit] = node = new HuffmanTreeNode(null); - } - node.buildTree(line, shift - 1); - } - }, - decodeNode: function decodeNode(reader) { - if (this.isLeaf) { - if (this.isOOB) { - return null; - } - var htOffset = reader.readBits(this.rangeLength); - return this.rangeLow + (this.isLowerRange ? -htOffset : htOffset); - } - var node = this.children[reader.readBit()]; - if (!node) { - throw new Jbig2Error('invalid Huffman data'); - } - return node.decodeNode(reader); - } - }; - function HuffmanTable(lines, prefixCodesDone) { - if (!prefixCodesDone) { - this.assignPrefixCodes(lines); - } - this.rootNode = new HuffmanTreeNode(null); - var i = void 0, - ii = lines.length, - line = void 0; - for (i = 0; i < ii; i++) { - line = lines[i]; - if (line.prefixLength > 0) { - this.rootNode.buildTree(line, line.prefixLength - 1); - } - } - } - HuffmanTable.prototype = { - decode: function decode(reader) { - return this.rootNode.decodeNode(reader); - }, - assignPrefixCodes: function assignPrefixCodes(lines) { - var linesLength = lines.length, - prefixLengthMax = 0, - i = void 0; - for (i = 0; i < linesLength; i++) { - prefixLengthMax = Math.max(prefixLengthMax, lines[i].prefixLength); - } - var histogram = new Uint32Array(prefixLengthMax + 1); - for (i = 0; i < linesLength; i++) { - histogram[lines[i].prefixLength]++; - } - var currentLength = 1, - firstCode = 0, - currentCode = void 0, - currentTemp = void 0, - line = void 0; - histogram[0] = 0; - while (currentLength <= prefixLengthMax) { - firstCode = firstCode + histogram[currentLength - 1] << 1; - currentCode = firstCode; - currentTemp = 0; - while (currentTemp < linesLength) { - line = lines[currentTemp]; - if (line.prefixLength === currentLength) { - line.prefixCode = currentCode; - currentCode++; - } - currentTemp++; - } - currentLength++; - } - } - }; - function decodeTablesSegment(data, start, end) { - var flags = data[start]; - var lowestValue = (0, _util.readUint32)(data, start + 1) & 0xFFFFFFFF; - var highestValue = (0, _util.readUint32)(data, start + 5) & 0xFFFFFFFF; - var reader = new Reader(data, start + 9, end); - var prefixSizeBits = (flags >> 1 & 7) + 1; - var rangeSizeBits = (flags >> 4 & 7) + 1; - var lines = []; - var prefixLength = void 0, - rangeLength = void 0, - currentRangeLow = lowestValue; - do { - prefixLength = reader.readBits(prefixSizeBits); - rangeLength = reader.readBits(rangeSizeBits); - lines.push(new HuffmanLine([currentRangeLow, prefixLength, rangeLength, 0])); - currentRangeLow += 1 << rangeLength; - } while (currentRangeLow < highestValue); - prefixLength = reader.readBits(prefixSizeBits); - lines.push(new HuffmanLine([lowestValue - 1, prefixLength, 32, 0, 'lower'])); - prefixLength = reader.readBits(prefixSizeBits); - lines.push(new HuffmanLine([highestValue, prefixLength, 32, 0])); - if (flags & 1) { - prefixLength = reader.readBits(prefixSizeBits); - lines.push(new HuffmanLine([prefixLength, 0])); - } - return new HuffmanTable(lines, false); - } - var standardTablesCache = {}; - function getStandardTable(number) { - var table = standardTablesCache[number]; - if (table) { - return table; - } - var lines = void 0; - switch (number) { - case 1: - lines = [[0, 1, 4, 0x0], [16, 2, 8, 0x2], [272, 3, 16, 0x6], [65808, 3, 32, 0x7]]; - break; - case 2: - lines = [[0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xE], [11, 5, 6, 0x1E], [75, 6, 32, 0x3E], [6, 0x3F]]; - break; - case 3: - lines = [[-256, 8, 8, 0xFE], [0, 1, 0, 0x0], [1, 2, 0, 0x2], [2, 3, 0, 0x6], [3, 4, 3, 0xE], [11, 5, 6, 0x1E], [-257, 8, 32, 0xFF, 'lower'], [75, 7, 32, 0x7E], [6, 0x3E]]; - break; - case 4: - lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xE], [12, 5, 6, 0x1E], [76, 5, 32, 0x1F]]; - break; - case 5: - lines = [[-255, 7, 8, 0x7E], [1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 0, 0x6], [4, 4, 3, 0xE], [12, 5, 6, 0x1E], [-256, 7, 32, 0x7F, 'lower'], [76, 6, 32, 0x3E]]; - break; - case 6: - lines = [[-2048, 5, 10, 0x1C], [-1024, 4, 9, 0x8], [-512, 4, 8, 0x9], [-256, 4, 7, 0xA], [-128, 5, 6, 0x1D], [-64, 5, 5, 0x1E], [-32, 4, 5, 0xB], [0, 2, 7, 0x0], [128, 3, 7, 0x2], [256, 3, 8, 0x3], [512, 4, 9, 0xC], [1024, 4, 10, 0xD], [-2049, 6, 32, 0x3E, 'lower'], [2048, 6, 32, 0x3F]]; - break; - case 7: - lines = [[-1024, 4, 9, 0x8], [-512, 3, 8, 0x0], [-256, 4, 7, 0x9], [-128, 5, 6, 0x1A], [-64, 5, 5, 0x1B], [-32, 4, 5, 0xA], [0, 4, 5, 0xB], [32, 5, 5, 0x1C], [64, 5, 6, 0x1D], [128, 4, 7, 0xC], [256, 3, 8, 0x1], [512, 3, 9, 0x2], [1024, 3, 10, 0x3], [-1025, 5, 32, 0x1E, 'lower'], [2048, 5, 32, 0x1F]]; - break; - case 8: - lines = [[-15, 8, 3, 0xFC], [-7, 9, 1, 0x1FC], [-5, 8, 1, 0xFD], [-3, 9, 0, 0x1FD], [-2, 7, 0, 0x7C], [-1, 4, 0, 0xA], [0, 2, 1, 0x0], [2, 5, 0, 0x1A], [3, 6, 0, 0x3A], [4, 3, 4, 0x4], [20, 6, 1, 0x3B], [22, 4, 4, 0xB], [38, 4, 5, 0xC], [70, 5, 6, 0x1B], [134, 5, 7, 0x1C], [262, 6, 7, 0x3C], [390, 7, 8, 0x7D], [646, 6, 10, 0x3D], [-16, 9, 32, 0x1FE, 'lower'], [1670, 9, 32, 0x1FF], [2, 0x1]]; - break; - case 9: - lines = [[-31, 8, 4, 0xFC], [-15, 9, 2, 0x1FC], [-11, 8, 2, 0xFD], [-7, 9, 1, 0x1FD], [-5, 7, 1, 0x7C], [-3, 4, 1, 0xA], [-1, 3, 1, 0x2], [1, 3, 1, 0x3], [3, 5, 1, 0x1A], [5, 6, 1, 0x3A], [7, 3, 5, 0x4], [39, 6, 2, 0x3B], [43, 4, 5, 0xB], [75, 4, 6, 0xC], [139, 5, 7, 0x1B], [267, 5, 8, 0x1C], [523, 6, 8, 0x3C], [779, 7, 9, 0x7D], [1291, 6, 11, 0x3D], [-32, 9, 32, 0x1FE, 'lower'], [3339, 9, 32, 0x1FF], [2, 0x0]]; - break; - case 10: - lines = [[-21, 7, 4, 0x7A], [-5, 8, 0, 0xFC], [-4, 7, 0, 0x7B], [-3, 5, 0, 0x18], [-2, 2, 2, 0x0], [2, 5, 0, 0x19], [3, 6, 0, 0x36], [4, 7, 0, 0x7C], [5, 8, 0, 0xFD], [6, 2, 6, 0x1], [70, 5, 5, 0x1A], [102, 6, 5, 0x37], [134, 6, 6, 0x38], [198, 6, 7, 0x39], [326, 6, 8, 0x3A], [582, 6, 9, 0x3B], [1094, 6, 10, 0x3C], [2118, 7, 11, 0x7D], [-22, 8, 32, 0xFE, 'lower'], [4166, 8, 32, 0xFF], [2, 0x2]]; - break; - case 11: - lines = [[1, 1, 0, 0x0], [2, 2, 1, 0x2], [4, 4, 0, 0xC], [5, 4, 1, 0xD], [7, 5, 1, 0x1C], [9, 5, 2, 0x1D], [13, 6, 2, 0x3C], [17, 7, 2, 0x7A], [21, 7, 3, 0x7B], [29, 7, 4, 0x7C], [45, 7, 5, 0x7D], [77, 7, 6, 0x7E], [141, 7, 32, 0x7F]]; - break; - case 12: - lines = [[1, 1, 0, 0x0], [2, 2, 0, 0x2], [3, 3, 1, 0x6], [5, 5, 0, 0x1C], [6, 5, 1, 0x1D], [8, 6, 1, 0x3C], [10, 7, 0, 0x7A], [11, 7, 1, 0x7B], [13, 7, 2, 0x7C], [17, 7, 3, 0x7D], [25, 7, 4, 0x7E], [41, 8, 5, 0xFE], [73, 8, 32, 0xFF]]; - break; - case 13: - lines = [[1, 1, 0, 0x0], [2, 3, 0, 0x4], [3, 4, 0, 0xC], [4, 5, 0, 0x1C], [5, 4, 1, 0xD], [7, 3, 3, 0x5], [15, 6, 1, 0x3A], [17, 6, 2, 0x3B], [21, 6, 3, 0x3C], [29, 6, 4, 0x3D], [45, 6, 5, 0x3E], [77, 7, 6, 0x7E], [141, 7, 32, 0x7F]]; - break; - case 14: - lines = [[-2, 3, 0, 0x4], [-1, 3, 0, 0x5], [0, 1, 0, 0x0], [1, 3, 0, 0x6], [2, 3, 0, 0x7]]; - break; - case 15: - lines = [[-24, 7, 4, 0x7C], [-8, 6, 2, 0x3C], [-4, 5, 1, 0x1C], [-2, 4, 0, 0xC], [-1, 3, 0, 0x4], [0, 1, 0, 0x0], [1, 3, 0, 0x5], [2, 4, 0, 0xD], [3, 5, 1, 0x1D], [5, 6, 2, 0x3D], [9, 7, 4, 0x7D], [-25, 7, 32, 0x7E, 'lower'], [25, 7, 32, 0x7F]]; - break; - default: - throw new Jbig2Error('standard table B.' + number + ' does not exist'); - } - var length = lines.length, - i = void 0; - for (i = 0; i < length; i++) { - lines[i] = new HuffmanLine(lines[i]); - } - table = new HuffmanTable(lines, true); - standardTablesCache[number] = table; - return table; - } - function Reader(data, start, end) { - this.data = data; - this.start = start; - this.end = end; - this.position = start; - this.shift = -1; - this.currentByte = 0; - } - Reader.prototype = { - readBit: function readBit() { - if (this.shift < 0) { - if (this.position >= this.end) { - throw new Jbig2Error('end of data while reading bit'); - } - this.currentByte = this.data[this.position++]; - this.shift = 7; - } - var bit = this.currentByte >> this.shift & 1; - this.shift--; - return bit; - }, - readBits: function readBits(numBits) { - var result = 0, - i = void 0; - for (i = numBits - 1; i >= 0; i--) { - result |= this.readBit() << i; - } - return result; - }, - byteAlign: function byteAlign() { - this.shift = -1; - }, - next: function next() { - if (this.position >= this.end) { - return -1; - } - return this.data[this.position++]; - } - }; - function getCustomHuffmanTable(index, referredTo, customTables) { - var currentIndex = 0, - i = void 0, - ii = referredTo.length, - table = void 0; - for (i = 0; i < ii; i++) { - table = customTables[referredTo[i]]; - if (table) { - if (index === currentIndex) { - return table; - } - currentIndex++; - } - } - throw new Jbig2Error('can\'t find custom Huffman table'); - } - function getTextRegionHuffmanTables(textRegion, referredTo, customTables, numberOfSymbols, reader) { - var codes = [], - i = void 0, - codeLength = void 0; - for (i = 0; i <= 34; i++) { - codeLength = reader.readBits(4); - codes.push(new HuffmanLine([i, codeLength, 0, 0])); - } - var runCodesTable = new HuffmanTable(codes, false); - codes.length = 0; - for (i = 0; i < numberOfSymbols;) { - codeLength = runCodesTable.decode(reader); - if (codeLength >= 32) { - var repeatedLength = void 0, - numberOfRepeats = void 0, - j = void 0; - switch (codeLength) { - case 32: - if (i === 0) { - throw new Jbig2Error('no previous value in symbol ID table'); - } - numberOfRepeats = reader.readBits(2) + 3; - repeatedLength = codes[i - 1].prefixLength; - break; - case 33: - numberOfRepeats = reader.readBits(3) + 3; - repeatedLength = 0; - break; - case 34: - numberOfRepeats = reader.readBits(7) + 11; - repeatedLength = 0; - break; - default: - throw new Jbig2Error('invalid code length in symbol ID table'); - } - for (j = 0; j < numberOfRepeats; j++) { - codes.push(new HuffmanLine([i, repeatedLength, 0, 0])); - i++; - } - } else { - codes.push(new HuffmanLine([i, codeLength, 0, 0])); - i++; - } - } - reader.byteAlign(); - var symbolIDTable = new HuffmanTable(codes, false); - var customIndex = 0, - tableFirstS = void 0, - tableDeltaS = void 0, - tableDeltaT = void 0; - switch (textRegion.huffmanFS) { - case 0: - case 1: - tableFirstS = getStandardTable(textRegion.huffmanFS + 6); - break; - case 3: - tableFirstS = getCustomHuffmanTable(customIndex, referredTo, customTables); - customIndex++; - break; - default: - throw new Jbig2Error('invalid Huffman FS selector'); - } - switch (textRegion.huffmanDS) { - case 0: - case 1: - case 2: - tableDeltaS = getStandardTable(textRegion.huffmanDS + 8); - break; - case 3: - tableDeltaS = getCustomHuffmanTable(customIndex, referredTo, customTables); - customIndex++; - break; - default: - throw new Jbig2Error('invalid Huffman DS selector'); - } - switch (textRegion.huffmanDT) { - case 0: - case 1: - case 2: - tableDeltaT = getStandardTable(textRegion.huffmanDT + 11); - break; - case 3: - tableDeltaT = getCustomHuffmanTable(customIndex, referredTo, customTables); - customIndex++; - break; - default: - throw new Jbig2Error('invalid Huffman DT selector'); - } - if (textRegion.refinement) { - throw new Jbig2Error('refinement with Huffman is not supported'); - } - return { - symbolIDTable: symbolIDTable, - tableFirstS: tableFirstS, - tableDeltaS: tableDeltaS, - tableDeltaT: tableDeltaT - }; - } - function getSymbolDictionaryHuffmanTables(dictionary, referredTo, customTables) { - var customIndex = 0, - tableDeltaHeight = void 0, - tableDeltaWidth = void 0; - switch (dictionary.huffmanDHSelector) { - case 0: - case 1: - tableDeltaHeight = getStandardTable(dictionary.huffmanDHSelector + 4); - break; - case 3: - tableDeltaHeight = getCustomHuffmanTable(customIndex, referredTo, customTables); - customIndex++; - break; - default: - throw new Jbig2Error('invalid Huffman DH selector'); - } - switch (dictionary.huffmanDWSelector) { - case 0: - case 1: - tableDeltaWidth = getStandardTable(dictionary.huffmanDWSelector + 2); - break; - case 3: - tableDeltaWidth = getCustomHuffmanTable(customIndex, referredTo, customTables); - customIndex++; - break; - default: - throw new Jbig2Error('invalid Huffman DW selector'); - } - var tableBitmapSize = void 0, - tableAggregateInstances = void 0; - if (dictionary.bitmapSizeSelector) { - tableBitmapSize = getCustomHuffmanTable(customIndex, referredTo, customTables); - customIndex++; - } else { - tableBitmapSize = getStandardTable(1); - } - if (dictionary.aggregationInstancesSelector) { - tableAggregateInstances = getCustomHuffmanTable(customIndex, referredTo, customTables); - } else { - tableAggregateInstances = getStandardTable(1); - } - return { - tableDeltaHeight: tableDeltaHeight, - tableDeltaWidth: tableDeltaWidth, - tableBitmapSize: tableBitmapSize, - tableAggregateInstances: tableAggregateInstances - }; - } - function readUncompressedBitmap(reader, width, height) { - var bitmap = [], - x = void 0, - y = void 0, - row = void 0; - for (y = 0; y < height; y++) { - row = new Uint8Array(width); - bitmap.push(row); - for (x = 0; x < width; x++) { - row[x] = reader.readBit(); - } - reader.byteAlign(); - } - return bitmap; - } - function decodeMMRBitmap(input, width, height, endOfBlock) { - var params = { - K: -1, - Columns: width, - Rows: height, - BlackIs1: true, - EndOfBlock: endOfBlock - }; - var decoder = new _ccitt.CCITTFaxDecoder(input, params); - var bitmap = [], - x = void 0, - y = void 0, - row = void 0, - currentByte = void 0, - shift = void 0, - eof = false; - for (y = 0; y < height; y++) { - row = new Uint8Array(width); - bitmap.push(row); - shift = -1; - for (x = 0; x < width; x++) { - if (shift < 0) { - currentByte = decoder.readNextChar(); - if (currentByte === -1) { - currentByte = 0; - eof = true; - } - shift = 7; - } - row[x] = currentByte >> shift & 1; - shift--; - } - } - if (endOfBlock && !eof) { - var lookForEOFLimit = 5; - for (var i = 0; i < lookForEOFLimit; i++) { - if (decoder.readNextChar() === -1) { - break; - } - } - } - return bitmap; - } - function Jbig2Image() {} - Jbig2Image.prototype = { - parseChunks: function parseChunks(chunks) { - return parseJbig2Chunks(chunks); - }, - parse: function parse(data) { - var _parseJbig = parseJbig2(data), - imgData = _parseJbig.imgData, - width = _parseJbig.width, - height = _parseJbig.height; - - this.width = width; - this.height = height; - return imgData; - } - }; - return Jbig2Image; -}(); -exports.Jbig2Image = Jbig2Image; - -/***/ }), -/* 145 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var ArithmeticDecoder = function ArithmeticDecoderClosure() { - var QeTable = [{ - qe: 0x5601, - nmps: 1, - nlps: 1, - switchFlag: 1 - }, { - qe: 0x3401, - nmps: 2, - nlps: 6, - switchFlag: 0 - }, { - qe: 0x1801, - nmps: 3, - nlps: 9, - switchFlag: 0 - }, { - qe: 0x0AC1, - nmps: 4, - nlps: 12, - switchFlag: 0 - }, { - qe: 0x0521, - nmps: 5, - nlps: 29, - switchFlag: 0 - }, { - qe: 0x0221, - nmps: 38, - nlps: 33, - switchFlag: 0 - }, { - qe: 0x5601, - nmps: 7, - nlps: 6, - switchFlag: 1 - }, { - qe: 0x5401, - nmps: 8, - nlps: 14, - switchFlag: 0 - }, { - qe: 0x4801, - nmps: 9, - nlps: 14, - switchFlag: 0 - }, { - qe: 0x3801, - nmps: 10, - nlps: 14, - switchFlag: 0 - }, { - qe: 0x3001, - nmps: 11, - nlps: 17, - switchFlag: 0 - }, { - qe: 0x2401, - nmps: 12, - nlps: 18, - switchFlag: 0 - }, { - qe: 0x1C01, - nmps: 13, - nlps: 20, - switchFlag: 0 - }, { - qe: 0x1601, - nmps: 29, - nlps: 21, - switchFlag: 0 - }, { - qe: 0x5601, - nmps: 15, - nlps: 14, - switchFlag: 1 - }, { - qe: 0x5401, - nmps: 16, - nlps: 14, - switchFlag: 0 - }, { - qe: 0x5101, - nmps: 17, - nlps: 15, - switchFlag: 0 - }, { - qe: 0x4801, - nmps: 18, - nlps: 16, - switchFlag: 0 - }, { - qe: 0x3801, - nmps: 19, - nlps: 17, - switchFlag: 0 - }, { - qe: 0x3401, - nmps: 20, - nlps: 18, - switchFlag: 0 - }, { - qe: 0x3001, - nmps: 21, - nlps: 19, - switchFlag: 0 - }, { - qe: 0x2801, - nmps: 22, - nlps: 19, - switchFlag: 0 - }, { - qe: 0x2401, - nmps: 23, - nlps: 20, - switchFlag: 0 - }, { - qe: 0x2201, - nmps: 24, - nlps: 21, - switchFlag: 0 - }, { - qe: 0x1C01, - nmps: 25, - nlps: 22, - switchFlag: 0 - }, { - qe: 0x1801, - nmps: 26, - nlps: 23, - switchFlag: 0 - }, { - qe: 0x1601, - nmps: 27, - nlps: 24, - switchFlag: 0 - }, { - qe: 0x1401, - nmps: 28, - nlps: 25, - switchFlag: 0 - }, { - qe: 0x1201, - nmps: 29, - nlps: 26, - switchFlag: 0 - }, { - qe: 0x1101, - nmps: 30, - nlps: 27, - switchFlag: 0 - }, { - qe: 0x0AC1, - nmps: 31, - nlps: 28, - switchFlag: 0 - }, { - qe: 0x09C1, - nmps: 32, - nlps: 29, - switchFlag: 0 - }, { - qe: 0x08A1, - nmps: 33, - nlps: 30, - switchFlag: 0 - }, { - qe: 0x0521, - nmps: 34, - nlps: 31, - switchFlag: 0 - }, { - qe: 0x0441, - nmps: 35, - nlps: 32, - switchFlag: 0 - }, { - qe: 0x02A1, - nmps: 36, - nlps: 33, - switchFlag: 0 - }, { - qe: 0x0221, - nmps: 37, - nlps: 34, - switchFlag: 0 - }, { - qe: 0x0141, - nmps: 38, - nlps: 35, - switchFlag: 0 - }, { - qe: 0x0111, - nmps: 39, - nlps: 36, - switchFlag: 0 - }, { - qe: 0x0085, - nmps: 40, - nlps: 37, - switchFlag: 0 - }, { - qe: 0x0049, - nmps: 41, - nlps: 38, - switchFlag: 0 - }, { - qe: 0x0025, - nmps: 42, - nlps: 39, - switchFlag: 0 - }, { - qe: 0x0015, - nmps: 43, - nlps: 40, - switchFlag: 0 - }, { - qe: 0x0009, - nmps: 44, - nlps: 41, - switchFlag: 0 - }, { - qe: 0x0005, - nmps: 45, - nlps: 42, - switchFlag: 0 - }, { - qe: 0x0001, - nmps: 45, - nlps: 43, - switchFlag: 0 - }, { - qe: 0x5601, - nmps: 46, - nlps: 46, - switchFlag: 0 - }]; - function ArithmeticDecoder(data, start, end) { - this.data = data; - this.bp = start; - this.dataEnd = end; - this.chigh = data[start]; - this.clow = 0; - this.byteIn(); - this.chigh = this.chigh << 7 & 0xFFFF | this.clow >> 9 & 0x7F; - this.clow = this.clow << 7 & 0xFFFF; - this.ct -= 7; - this.a = 0x8000; - } - ArithmeticDecoder.prototype = { - byteIn: function ArithmeticDecoder_byteIn() { - var data = this.data; - var bp = this.bp; - if (data[bp] === 0xFF) { - var b1 = data[bp + 1]; - if (b1 > 0x8F) { - this.clow += 0xFF00; - this.ct = 8; - } else { - bp++; - this.clow += data[bp] << 9; - this.ct = 7; - this.bp = bp; - } - } else { - bp++; - this.clow += bp < this.dataEnd ? data[bp] << 8 : 0xFF00; - this.ct = 8; - this.bp = bp; - } - if (this.clow > 0xFFFF) { - this.chigh += this.clow >> 16; - this.clow &= 0xFFFF; - } - }, - readBit: function ArithmeticDecoder_readBit(contexts, pos) { - var cx_index = contexts[pos] >> 1, - cx_mps = contexts[pos] & 1; - var qeTableIcx = QeTable[cx_index]; - var qeIcx = qeTableIcx.qe; - var d; - var a = this.a - qeIcx; - if (this.chigh < qeIcx) { - if (a < qeIcx) { - a = qeIcx; - d = cx_mps; - cx_index = qeTableIcx.nmps; - } else { - a = qeIcx; - d = 1 ^ cx_mps; - if (qeTableIcx.switchFlag === 1) { - cx_mps = d; - } - cx_index = qeTableIcx.nlps; - } - } else { - this.chigh -= qeIcx; - if ((a & 0x8000) !== 0) { - this.a = a; - return cx_mps; - } - if (a < qeIcx) { - d = 1 ^ cx_mps; - if (qeTableIcx.switchFlag === 1) { - cx_mps = d; - } - cx_index = qeTableIcx.nlps; - } else { - d = cx_mps; - cx_index = qeTableIcx.nmps; - } - } - do { - if (this.ct === 0) { - this.byteIn(); - } - a <<= 1; - this.chigh = this.chigh << 1 & 0xFFFF | this.clow >> 15 & 1; - this.clow = this.clow << 1 & 0xFFFF; - this.ct--; - } while ((a & 0x8000) === 0); - this.a = a; - contexts[pos] = cx_index << 1 | cx_mps; - return d; - } - }; - return ArithmeticDecoder; -}(); -exports.ArithmeticDecoder = ArithmeticDecoder; - -/***/ }), -/* 146 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.JpegStream = undefined; - -var _util = __w_pdfjs_require__(2); - -var _stream = __w_pdfjs_require__(140); - -var _primitives = __w_pdfjs_require__(138); - -var _jpg = __w_pdfjs_require__(147); - -var JpegStream = function JpegStreamClosure() { - function JpegStream(stream, maybeLength, dict, params) { - var ch = void 0; - while ((ch = stream.getByte()) !== -1) { - if (ch === 0xFF) { - stream.skip(-1); - break; - } - } - this.stream = stream; - this.maybeLength = maybeLength; - this.dict = dict; - this.params = params; - _stream.DecodeStream.call(this, maybeLength); - } - JpegStream.prototype = Object.create(_stream.DecodeStream.prototype); - Object.defineProperty(JpegStream.prototype, 'bytes', { - get: function JpegStream_bytes() { - return (0, _util.shadow)(this, 'bytes', this.stream.getBytes(this.maybeLength)); - }, - configurable: true - }); - JpegStream.prototype.ensureBuffer = function (requested) {}; - JpegStream.prototype.readBlock = function () { - if (this.eof) { - return; - } - var jpegOptions = { - decodeTransform: undefined, - colorTransform: undefined - }; - var decodeArr = this.dict.getArray('Decode', 'D'); - if (this.forceRGB && Array.isArray(decodeArr)) { - var bitsPerComponent = this.dict.get('BitsPerComponent') || 8; - var decodeArrLength = decodeArr.length; - var transform = new Int32Array(decodeArrLength); - var transformNeeded = false; - var maxValue = (1 << bitsPerComponent) - 1; - for (var i = 0; i < decodeArrLength; i += 2) { - transform[i] = (decodeArr[i + 1] - decodeArr[i]) * 256 | 0; - transform[i + 1] = decodeArr[i] * maxValue | 0; - if (transform[i] !== 256 || transform[i + 1] !== 0) { - transformNeeded = true; - } - } - if (transformNeeded) { - jpegOptions.decodeTransform = transform; - } - } - if ((0, _primitives.isDict)(this.params)) { - var colorTransform = this.params.get('ColorTransform'); - if (Number.isInteger(colorTransform)) { - jpegOptions.colorTransform = colorTransform; - } - } - var jpegImage = new _jpg.JpegImage(jpegOptions); - jpegImage.parse(this.bytes); - var data = jpegImage.getData({ - width: this.drawWidth, - height: this.drawHeight, - forceRGB: this.forceRGB, - isSourcePDF: true - }); - this.buffer = data; - this.bufferLength = data.length; - this.eof = true; - }; - JpegStream.prototype.getIR = function () { - var forceDataSchema = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - return (0, _util.createObjectURL)(this.bytes, 'image/jpeg', forceDataSchema); - }; - return JpegStream; -}(); -exports.JpegStream = JpegStream; - -/***/ }), -/* 147 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.JpegImage = undefined; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _util = __w_pdfjs_require__(2); - -var JpegError = function JpegErrorClosure() { - function JpegError(msg) { - this.message = 'JPEG error: ' + msg; - } - JpegError.prototype = new Error(); - JpegError.prototype.name = 'JpegError'; - JpegError.constructor = JpegError; - return JpegError; -}(); -var DNLMarkerError = function DNLMarkerErrorClosure() { - function DNLMarkerError(message, scanLines) { - this.message = message; - this.scanLines = scanLines; - } - DNLMarkerError.prototype = new Error(); - DNLMarkerError.prototype.name = 'DNLMarkerError'; - DNLMarkerError.constructor = DNLMarkerError; - return DNLMarkerError; -}(); -var EOIMarkerError = function EOIMarkerErrorClosure() { - function EOIMarkerError(message) { - this.message = message; - } - EOIMarkerError.prototype = new Error(); - EOIMarkerError.prototype.name = 'EOIMarkerError'; - EOIMarkerError.constructor = EOIMarkerError; - return EOIMarkerError; -}(); -var JpegImage = function JpegImageClosure() { - var dctZigZag = new Uint8Array([0, 1, 8, 16, 9, 2, 3, 10, 17, 24, 32, 25, 18, 11, 4, 5, 12, 19, 26, 33, 40, 48, 41, 34, 27, 20, 13, 6, 7, 14, 21, 28, 35, 42, 49, 56, 57, 50, 43, 36, 29, 22, 15, 23, 30, 37, 44, 51, 58, 59, 52, 45, 38, 31, 39, 46, 53, 60, 61, 54, 47, 55, 62, 63]); - var dctCos1 = 4017; - var dctSin1 = 799; - var dctCos3 = 3406; - var dctSin3 = 2276; - var dctCos6 = 1567; - var dctSin6 = 3784; - var dctSqrt2 = 5793; - var dctSqrt1d2 = 2896; - function JpegImage() { - var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}, - _ref$decodeTransform = _ref.decodeTransform, - decodeTransform = _ref$decodeTransform === undefined ? null : _ref$decodeTransform, - _ref$colorTransform = _ref.colorTransform, - colorTransform = _ref$colorTransform === undefined ? -1 : _ref$colorTransform; - - this._decodeTransform = decodeTransform; - this._colorTransform = colorTransform; - } - function buildHuffmanTable(codeLengths, values) { - var k = 0, - code = [], - i, - j, - length = 16; - while (length > 0 && !codeLengths[length - 1]) { - length--; - } - code.push({ - children: [], - index: 0 - }); - var p = code[0], - q; - for (i = 0; i < length; i++) { - for (j = 0; j < codeLengths[i]; j++) { - p = code.pop(); - p.children[p.index] = values[k]; - while (p.index > 0) { - p = code.pop(); - } - p.index++; - code.push(p); - while (code.length <= i) { - code.push(q = { - children: [], - index: 0 - }); - p.children[p.index] = q.children; - p = q; - } - k++; - } - if (i + 1 < length) { - code.push(q = { - children: [], - index: 0 - }); - p.children[p.index] = q.children; - p = q; - } - } - return code[0].children; - } - function getBlockBufferOffset(component, row, col) { - return 64 * ((component.blocksPerLine + 1) * row + col); - } - function decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successivePrev, successive) { - var parseDNLMarker = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : false; - - var mcusPerLine = frame.mcusPerLine; - var progressive = frame.progressive; - var startOffset = offset, - bitsData = 0, - bitsCount = 0; - function readBit() { - if (bitsCount > 0) { - bitsCount--; - return bitsData >> bitsCount & 1; - } - bitsData = data[offset++]; - if (bitsData === 0xFF) { - var nextByte = data[offset++]; - if (nextByte) { - if (nextByte === 0xDC && parseDNLMarker) { - offset += 2; - var scanLines = data[offset++] << 8 | data[offset++]; - if (scanLines > 0 && scanLines !== frame.scanLines) { - throw new DNLMarkerError('Found DNL marker (0xFFDC) while parsing scan data', scanLines); - } - } else if (nextByte === 0xD9) { - throw new EOIMarkerError('Found EOI marker (0xFFD9) while parsing scan data'); - } - throw new JpegError('unexpected marker ' + (bitsData << 8 | nextByte).toString(16)); - } - } - bitsCount = 7; - return bitsData >>> 7; - } - function decodeHuffman(tree) { - var node = tree; - while (true) { - node = node[readBit()]; - if (typeof node === 'number') { - return node; - } - if ((typeof node === 'undefined' ? 'undefined' : _typeof(node)) !== 'object') { - throw new JpegError('invalid huffman sequence'); - } - } - } - function receive(length) { - var n = 0; - while (length > 0) { - n = n << 1 | readBit(); - length--; - } - return n; - } - function receiveAndExtend(length) { - if (length === 1) { - return readBit() === 1 ? 1 : -1; - } - var n = receive(length); - if (n >= 1 << length - 1) { - return n; - } - return n + (-1 << length) + 1; - } - function decodeBaseline(component, offset) { - var t = decodeHuffman(component.huffmanTableDC); - var diff = t === 0 ? 0 : receiveAndExtend(t); - component.blockData[offset] = component.pred += diff; - var k = 1; - while (k < 64) { - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15, - r = rs >> 4; - if (s === 0) { - if (r < 15) { - break; - } - k += 16; - continue; - } - k += r; - var z = dctZigZag[k]; - component.blockData[offset + z] = receiveAndExtend(s); - k++; - } - } - function decodeDCFirst(component, offset) { - var t = decodeHuffman(component.huffmanTableDC); - var diff = t === 0 ? 0 : receiveAndExtend(t) << successive; - component.blockData[offset] = component.pred += diff; - } - function decodeDCSuccessive(component, offset) { - component.blockData[offset] |= readBit() << successive; - } - var eobrun = 0; - function decodeACFirst(component, offset) { - if (eobrun > 0) { - eobrun--; - return; - } - var k = spectralStart, - e = spectralEnd; - while (k <= e) { - var rs = decodeHuffman(component.huffmanTableAC); - var s = rs & 15, - r = rs >> 4; - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r) - 1; - break; - } - k += 16; - continue; - } - k += r; - var z = dctZigZag[k]; - component.blockData[offset + z] = receiveAndExtend(s) * (1 << successive); - k++; - } - } - var successiveACState = 0, - successiveACNextValue; - function decodeACSuccessive(component, offset) { - var k = spectralStart; - var e = spectralEnd; - var r = 0; - var s; - var rs; - while (k <= e) { - var offsetZ = offset + dctZigZag[k]; - var sign = component.blockData[offsetZ] < 0 ? -1 : 1; - switch (successiveACState) { - case 0: - rs = decodeHuffman(component.huffmanTableAC); - s = rs & 15; - r = rs >> 4; - if (s === 0) { - if (r < 15) { - eobrun = receive(r) + (1 << r); - successiveACState = 4; - } else { - r = 16; - successiveACState = 1; - } - } else { - if (s !== 1) { - throw new JpegError('invalid ACn encoding'); - } - successiveACNextValue = receiveAndExtend(s); - successiveACState = r ? 2 : 3; - } - continue; - case 1: - case 2: - if (component.blockData[offsetZ]) { - component.blockData[offsetZ] += sign * (readBit() << successive); - } else { - r--; - if (r === 0) { - successiveACState = successiveACState === 2 ? 3 : 0; - } - } - break; - case 3: - if (component.blockData[offsetZ]) { - component.blockData[offsetZ] += sign * (readBit() << successive); - } else { - component.blockData[offsetZ] = successiveACNextValue << successive; - successiveACState = 0; - } - break; - case 4: - if (component.blockData[offsetZ]) { - component.blockData[offsetZ] += sign * (readBit() << successive); - } - break; - } - k++; - } - if (successiveACState === 4) { - eobrun--; - if (eobrun === 0) { - successiveACState = 0; - } - } - } - function decodeMcu(component, decode, mcu, row, col) { - var mcuRow = mcu / mcusPerLine | 0; - var mcuCol = mcu % mcusPerLine; - var blockRow = mcuRow * component.v + row; - var blockCol = mcuCol * component.h + col; - var offset = getBlockBufferOffset(component, blockRow, blockCol); - decode(component, offset); - } - function decodeBlock(component, decode, mcu) { - var blockRow = mcu / component.blocksPerLine | 0; - var blockCol = mcu % component.blocksPerLine; - var offset = getBlockBufferOffset(component, blockRow, blockCol); - decode(component, offset); - } - var componentsLength = components.length; - var component, i, j, k, n; - var decodeFn; - if (progressive) { - if (spectralStart === 0) { - decodeFn = successivePrev === 0 ? decodeDCFirst : decodeDCSuccessive; - } else { - decodeFn = successivePrev === 0 ? decodeACFirst : decodeACSuccessive; - } - } else { - decodeFn = decodeBaseline; - } - var mcu = 0, - fileMarker; - var mcuExpected; - if (componentsLength === 1) { - mcuExpected = components[0].blocksPerLine * components[0].blocksPerColumn; - } else { - mcuExpected = mcusPerLine * frame.mcusPerColumn; - } - var h, v; - while (mcu < mcuExpected) { - var mcuToRead = resetInterval ? Math.min(mcuExpected - mcu, resetInterval) : mcuExpected; - for (i = 0; i < componentsLength; i++) { - components[i].pred = 0; - } - eobrun = 0; - if (componentsLength === 1) { - component = components[0]; - for (n = 0; n < mcuToRead; n++) { - decodeBlock(component, decodeFn, mcu); - mcu++; - } - } else { - for (n = 0; n < mcuToRead; n++) { - for (i = 0; i < componentsLength; i++) { - component = components[i]; - h = component.h; - v = component.v; - for (j = 0; j < v; j++) { - for (k = 0; k < h; k++) { - decodeMcu(component, decodeFn, mcu, j, k); - } - } - } - mcu++; - } - } - bitsCount = 0; - fileMarker = findNextFileMarker(data, offset); - if (fileMarker && fileMarker.invalid) { - (0, _util.warn)('decodeScan - unexpected MCU data, current marker is: ' + fileMarker.invalid); - offset = fileMarker.offset; - } - var marker = fileMarker && fileMarker.marker; - if (!marker || marker <= 0xFF00) { - throw new JpegError('marker was not found'); - } - if (marker >= 0xFFD0 && marker <= 0xFFD7) { - offset += 2; - } else { - break; - } - } - fileMarker = findNextFileMarker(data, offset); - if (fileMarker && fileMarker.invalid) { - (0, _util.warn)('decodeScan - unexpected Scan data, current marker is: ' + fileMarker.invalid); - offset = fileMarker.offset; - } - return offset - startOffset; - } - function quantizeAndInverse(component, blockBufferOffset, p) { - var qt = component.quantizationTable, - blockData = component.blockData; - var v0, v1, v2, v3, v4, v5, v6, v7; - var p0, p1, p2, p3, p4, p5, p6, p7; - var t; - if (!qt) { - throw new JpegError('missing required Quantization Table.'); - } - for (var row = 0; row < 64; row += 8) { - p0 = blockData[blockBufferOffset + row]; - p1 = blockData[blockBufferOffset + row + 1]; - p2 = blockData[blockBufferOffset + row + 2]; - p3 = blockData[blockBufferOffset + row + 3]; - p4 = blockData[blockBufferOffset + row + 4]; - p5 = blockData[blockBufferOffset + row + 5]; - p6 = blockData[blockBufferOffset + row + 6]; - p7 = blockData[blockBufferOffset + row + 7]; - p0 *= qt[row]; - if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { - t = dctSqrt2 * p0 + 512 >> 10; - p[row] = t; - p[row + 1] = t; - p[row + 2] = t; - p[row + 3] = t; - p[row + 4] = t; - p[row + 5] = t; - p[row + 6] = t; - p[row + 7] = t; - continue; - } - p1 *= qt[row + 1]; - p2 *= qt[row + 2]; - p3 *= qt[row + 3]; - p4 *= qt[row + 4]; - p5 *= qt[row + 5]; - p6 *= qt[row + 6]; - p7 *= qt[row + 7]; - v0 = dctSqrt2 * p0 + 128 >> 8; - v1 = dctSqrt2 * p4 + 128 >> 8; - v2 = p2; - v3 = p6; - v4 = dctSqrt1d2 * (p1 - p7) + 128 >> 8; - v7 = dctSqrt1d2 * (p1 + p7) + 128 >> 8; - v5 = p3 << 4; - v6 = p5 << 4; - v0 = v0 + v1 + 1 >> 1; - v1 = v0 - v1; - t = v2 * dctSin6 + v3 * dctCos6 + 128 >> 8; - v2 = v2 * dctCos6 - v3 * dctSin6 + 128 >> 8; - v3 = t; - v4 = v4 + v6 + 1 >> 1; - v6 = v4 - v6; - v7 = v7 + v5 + 1 >> 1; - v5 = v7 - v5; - v0 = v0 + v3 + 1 >> 1; - v3 = v0 - v3; - v1 = v1 + v2 + 1 >> 1; - v2 = v1 - v2; - t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; - v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; - v7 = t; - t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; - v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; - v6 = t; - p[row] = v0 + v7; - p[row + 7] = v0 - v7; - p[row + 1] = v1 + v6; - p[row + 6] = v1 - v6; - p[row + 2] = v2 + v5; - p[row + 5] = v2 - v5; - p[row + 3] = v3 + v4; - p[row + 4] = v3 - v4; - } - for (var col = 0; col < 8; ++col) { - p0 = p[col]; - p1 = p[col + 8]; - p2 = p[col + 16]; - p3 = p[col + 24]; - p4 = p[col + 32]; - p5 = p[col + 40]; - p6 = p[col + 48]; - p7 = p[col + 56]; - if ((p1 | p2 | p3 | p4 | p5 | p6 | p7) === 0) { - t = dctSqrt2 * p0 + 8192 >> 14; - t = t < -2040 ? 0 : t >= 2024 ? 255 : t + 2056 >> 4; - blockData[blockBufferOffset + col] = t; - blockData[blockBufferOffset + col + 8] = t; - blockData[blockBufferOffset + col + 16] = t; - blockData[blockBufferOffset + col + 24] = t; - blockData[blockBufferOffset + col + 32] = t; - blockData[blockBufferOffset + col + 40] = t; - blockData[blockBufferOffset + col + 48] = t; - blockData[blockBufferOffset + col + 56] = t; - continue; - } - v0 = dctSqrt2 * p0 + 2048 >> 12; - v1 = dctSqrt2 * p4 + 2048 >> 12; - v2 = p2; - v3 = p6; - v4 = dctSqrt1d2 * (p1 - p7) + 2048 >> 12; - v7 = dctSqrt1d2 * (p1 + p7) + 2048 >> 12; - v5 = p3; - v6 = p5; - v0 = (v0 + v1 + 1 >> 1) + 4112; - v1 = v0 - v1; - t = v2 * dctSin6 + v3 * dctCos6 + 2048 >> 12; - v2 = v2 * dctCos6 - v3 * dctSin6 + 2048 >> 12; - v3 = t; - v4 = v4 + v6 + 1 >> 1; - v6 = v4 - v6; - v7 = v7 + v5 + 1 >> 1; - v5 = v7 - v5; - v0 = v0 + v3 + 1 >> 1; - v3 = v0 - v3; - v1 = v1 + v2 + 1 >> 1; - v2 = v1 - v2; - t = v4 * dctSin3 + v7 * dctCos3 + 2048 >> 12; - v4 = v4 * dctCos3 - v7 * dctSin3 + 2048 >> 12; - v7 = t; - t = v5 * dctSin1 + v6 * dctCos1 + 2048 >> 12; - v5 = v5 * dctCos1 - v6 * dctSin1 + 2048 >> 12; - v6 = t; - p0 = v0 + v7; - p7 = v0 - v7; - p1 = v1 + v6; - p6 = v1 - v6; - p2 = v2 + v5; - p5 = v2 - v5; - p3 = v3 + v4; - p4 = v3 - v4; - p0 = p0 < 16 ? 0 : p0 >= 4080 ? 255 : p0 >> 4; - p1 = p1 < 16 ? 0 : p1 >= 4080 ? 255 : p1 >> 4; - p2 = p2 < 16 ? 0 : p2 >= 4080 ? 255 : p2 >> 4; - p3 = p3 < 16 ? 0 : p3 >= 4080 ? 255 : p3 >> 4; - p4 = p4 < 16 ? 0 : p4 >= 4080 ? 255 : p4 >> 4; - p5 = p5 < 16 ? 0 : p5 >= 4080 ? 255 : p5 >> 4; - p6 = p6 < 16 ? 0 : p6 >= 4080 ? 255 : p6 >> 4; - p7 = p7 < 16 ? 0 : p7 >= 4080 ? 255 : p7 >> 4; - blockData[blockBufferOffset + col] = p0; - blockData[blockBufferOffset + col + 8] = p1; - blockData[blockBufferOffset + col + 16] = p2; - blockData[blockBufferOffset + col + 24] = p3; - blockData[blockBufferOffset + col + 32] = p4; - blockData[blockBufferOffset + col + 40] = p5; - blockData[blockBufferOffset + col + 48] = p6; - blockData[blockBufferOffset + col + 56] = p7; - } - } - function buildComponentData(frame, component) { - var blocksPerLine = component.blocksPerLine; - var blocksPerColumn = component.blocksPerColumn; - var computationBuffer = new Int16Array(64); - for (var blockRow = 0; blockRow < blocksPerColumn; blockRow++) { - for (var blockCol = 0; blockCol < blocksPerLine; blockCol++) { - var offset = getBlockBufferOffset(component, blockRow, blockCol); - quantizeAndInverse(component, offset, computationBuffer); - } - } - return component.blockData; - } - function findNextFileMarker(data, currentPos) { - var startPos = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : currentPos; - - function peekUint16(pos) { - return data[pos] << 8 | data[pos + 1]; - } - var maxPos = data.length - 1; - var newPos = startPos < currentPos ? startPos : currentPos; - if (currentPos >= maxPos) { - return null; - } - var currentMarker = peekUint16(currentPos); - if (currentMarker >= 0xFFC0 && currentMarker <= 0xFFFE) { - return { - invalid: null, - marker: currentMarker, - offset: currentPos - }; - } - var newMarker = peekUint16(newPos); - while (!(newMarker >= 0xFFC0 && newMarker <= 0xFFFE)) { - if (++newPos >= maxPos) { - return null; - } - newMarker = peekUint16(newPos); - } - return { - invalid: currentMarker.toString(16), - marker: newMarker, - offset: newPos - }; - } - JpegImage.prototype = { - parse: function parse(data) { - var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref2$dnlScanLines = _ref2.dnlScanLines, - dnlScanLines = _ref2$dnlScanLines === undefined ? null : _ref2$dnlScanLines; - - function readUint16() { - var value = data[offset] << 8 | data[offset + 1]; - offset += 2; - return value; - } - function readDataBlock() { - var length = readUint16(); - var endOffset = offset + length - 2; - var fileMarker = findNextFileMarker(data, endOffset, offset); - if (fileMarker && fileMarker.invalid) { - (0, _util.warn)('readDataBlock - incorrect length, current marker is: ' + fileMarker.invalid); - endOffset = fileMarker.offset; - } - var array = data.subarray(offset, endOffset); - offset += array.length; - return array; - } - function prepareComponents(frame) { - var mcusPerLine = Math.ceil(frame.samplesPerLine / 8 / frame.maxH); - var mcusPerColumn = Math.ceil(frame.scanLines / 8 / frame.maxV); - for (var i = 0; i < frame.components.length; i++) { - component = frame.components[i]; - var blocksPerLine = Math.ceil(Math.ceil(frame.samplesPerLine / 8) * component.h / frame.maxH); - var blocksPerColumn = Math.ceil(Math.ceil(frame.scanLines / 8) * component.v / frame.maxV); - var blocksPerLineForMcu = mcusPerLine * component.h; - var blocksPerColumnForMcu = mcusPerColumn * component.v; - var blocksBufferSize = 64 * blocksPerColumnForMcu * (blocksPerLineForMcu + 1); - component.blockData = new Int16Array(blocksBufferSize); - component.blocksPerLine = blocksPerLine; - component.blocksPerColumn = blocksPerColumn; - } - frame.mcusPerLine = mcusPerLine; - frame.mcusPerColumn = mcusPerColumn; - } - var offset = 0; - var jfif = null; - var adobe = null; - var frame, resetInterval; - var numSOSMarkers = 0; - var quantizationTables = []; - var huffmanTablesAC = [], - huffmanTablesDC = []; - var fileMarker = readUint16(); - if (fileMarker !== 0xFFD8) { - throw new JpegError('SOI not found'); - } - fileMarker = readUint16(); - markerLoop: while (fileMarker !== 0xFFD9) { - var i, j, l; - switch (fileMarker) { - case 0xFFE0: - case 0xFFE1: - case 0xFFE2: - case 0xFFE3: - case 0xFFE4: - case 0xFFE5: - case 0xFFE6: - case 0xFFE7: - case 0xFFE8: - case 0xFFE9: - case 0xFFEA: - case 0xFFEB: - case 0xFFEC: - case 0xFFED: - case 0xFFEE: - case 0xFFEF: - case 0xFFFE: - var appData = readDataBlock(); - if (fileMarker === 0xFFE0) { - if (appData[0] === 0x4A && appData[1] === 0x46 && appData[2] === 0x49 && appData[3] === 0x46 && appData[4] === 0) { - jfif = { - version: { - major: appData[5], - minor: appData[6] - }, - densityUnits: appData[7], - xDensity: appData[8] << 8 | appData[9], - yDensity: appData[10] << 8 | appData[11], - thumbWidth: appData[12], - thumbHeight: appData[13], - thumbData: appData.subarray(14, 14 + 3 * appData[12] * appData[13]) - }; - } - } - if (fileMarker === 0xFFEE) { - if (appData[0] === 0x41 && appData[1] === 0x64 && appData[2] === 0x6F && appData[3] === 0x62 && appData[4] === 0x65) { - adobe = { - version: appData[5] << 8 | appData[6], - flags0: appData[7] << 8 | appData[8], - flags1: appData[9] << 8 | appData[10], - transformCode: appData[11] - }; - } - } - break; - case 0xFFDB: - var quantizationTablesLength = readUint16(); - var quantizationTablesEnd = quantizationTablesLength + offset - 2; - var z; - while (offset < quantizationTablesEnd) { - var quantizationTableSpec = data[offset++]; - var tableData = new Uint16Array(64); - if (quantizationTableSpec >> 4 === 0) { - for (j = 0; j < 64; j++) { - z = dctZigZag[j]; - tableData[z] = data[offset++]; - } - } else if (quantizationTableSpec >> 4 === 1) { - for (j = 0; j < 64; j++) { - z = dctZigZag[j]; - tableData[z] = readUint16(); - } - } else { - throw new JpegError('DQT - invalid table spec'); - } - quantizationTables[quantizationTableSpec & 15] = tableData; - } - break; - case 0xFFC0: - case 0xFFC1: - case 0xFFC2: - if (frame) { - throw new JpegError('Only single frame JPEGs supported'); - } - readUint16(); - frame = {}; - frame.extended = fileMarker === 0xFFC1; - frame.progressive = fileMarker === 0xFFC2; - frame.precision = data[offset++]; - var sofScanLines = readUint16(); - frame.scanLines = dnlScanLines || sofScanLines; - frame.samplesPerLine = readUint16(); - frame.components = []; - frame.componentIds = {}; - var componentsCount = data[offset++], - componentId; - var maxH = 0, - maxV = 0; - for (i = 0; i < componentsCount; i++) { - componentId = data[offset]; - var h = data[offset + 1] >> 4; - var v = data[offset + 1] & 15; - if (maxH < h) { - maxH = h; - } - if (maxV < v) { - maxV = v; - } - var qId = data[offset + 2]; - l = frame.components.push({ - h: h, - v: v, - quantizationId: qId, - quantizationTable: null - }); - frame.componentIds[componentId] = l - 1; - offset += 3; - } - frame.maxH = maxH; - frame.maxV = maxV; - prepareComponents(frame); - break; - case 0xFFC4: - var huffmanLength = readUint16(); - for (i = 2; i < huffmanLength;) { - var huffmanTableSpec = data[offset++]; - var codeLengths = new Uint8Array(16); - var codeLengthSum = 0; - for (j = 0; j < 16; j++, offset++) { - codeLengthSum += codeLengths[j] = data[offset]; - } - var huffmanValues = new Uint8Array(codeLengthSum); - for (j = 0; j < codeLengthSum; j++, offset++) { - huffmanValues[j] = data[offset]; - } - i += 17 + codeLengthSum; - (huffmanTableSpec >> 4 === 0 ? huffmanTablesDC : huffmanTablesAC)[huffmanTableSpec & 15] = buildHuffmanTable(codeLengths, huffmanValues); - } - break; - case 0xFFDD: - readUint16(); - resetInterval = readUint16(); - break; - case 0xFFDA: - var parseDNLMarker = ++numSOSMarkers === 1 && !dnlScanLines; - readUint16(); - var selectorsCount = data[offset++]; - var components = [], - component; - for (i = 0; i < selectorsCount; i++) { - var componentIndex = frame.componentIds[data[offset++]]; - component = frame.components[componentIndex]; - var tableSpec = data[offset++]; - component.huffmanTableDC = huffmanTablesDC[tableSpec >> 4]; - component.huffmanTableAC = huffmanTablesAC[tableSpec & 15]; - components.push(component); - } - var spectralStart = data[offset++]; - var spectralEnd = data[offset++]; - var successiveApproximation = data[offset++]; - try { - var processed = decodeScan(data, offset, frame, components, resetInterval, spectralStart, spectralEnd, successiveApproximation >> 4, successiveApproximation & 15, parseDNLMarker); - offset += processed; - } catch (ex) { - if (ex instanceof DNLMarkerError) { - (0, _util.warn)(ex.message + ' -- attempting to re-parse the JPEG image.'); - return this.parse(data, { dnlScanLines: ex.scanLines }); - } else if (ex instanceof EOIMarkerError) { - (0, _util.warn)(ex.message + ' -- ignoring the rest of the image data.'); - break markerLoop; - } - throw ex; - } - break; - case 0xFFDC: - offset += 4; - break; - case 0xFFFF: - if (data[offset] !== 0xFF) { - offset--; - } - break; - default: - if (data[offset - 3] === 0xFF && data[offset - 2] >= 0xC0 && data[offset - 2] <= 0xFE) { - offset -= 3; - break; - } - var nextFileMarker = findNextFileMarker(data, offset - 2); - if (nextFileMarker && nextFileMarker.invalid) { - (0, _util.warn)('JpegImage.parse - unexpected data, current marker is: ' + nextFileMarker.invalid); - offset = nextFileMarker.offset; - break; - } - throw new JpegError('unknown marker ' + fileMarker.toString(16)); - } - fileMarker = readUint16(); - } - this.width = frame.samplesPerLine; - this.height = frame.scanLines; - this.jfif = jfif; - this.adobe = adobe; - this.components = []; - for (i = 0; i < frame.components.length; i++) { - component = frame.components[i]; - var quantizationTable = quantizationTables[component.quantizationId]; - if (quantizationTable) { - component.quantizationTable = quantizationTable; - } - this.components.push({ - output: buildComponentData(frame, component), - scaleX: component.h / frame.maxH, - scaleY: component.v / frame.maxV, - blocksPerLine: component.blocksPerLine, - blocksPerColumn: component.blocksPerColumn - }); - } - this.numComponents = this.components.length; - }, - _getLinearizedBlockData: function _getLinearizedBlockData(width, height) { - var isSourcePDF = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false; - - var scaleX = this.width / width, - scaleY = this.height / height; - var component, componentScaleX, componentScaleY, blocksPerScanline; - var x, y, i, j, k; - var index; - var offset = 0; - var output; - var numComponents = this.components.length; - var dataLength = width * height * numComponents; - var data = new Uint8ClampedArray(dataLength); - var xScaleBlockOffset = new Uint32Array(width); - var mask3LSB = 0xfffffff8; - for (i = 0; i < numComponents; i++) { - component = this.components[i]; - componentScaleX = component.scaleX * scaleX; - componentScaleY = component.scaleY * scaleY; - offset = i; - output = component.output; - blocksPerScanline = component.blocksPerLine + 1 << 3; - for (x = 0; x < width; x++) { - j = 0 | x * componentScaleX; - xScaleBlockOffset[x] = (j & mask3LSB) << 3 | j & 7; - } - for (y = 0; y < height; y++) { - j = 0 | y * componentScaleY; - index = blocksPerScanline * (j & mask3LSB) | (j & 7) << 3; - for (x = 0; x < width; x++) { - data[offset] = output[index + xScaleBlockOffset[x]]; - offset += numComponents; - } - } - } - var transform = this._decodeTransform; - if (!isSourcePDF && numComponents === 4 && !transform) { - transform = new Int32Array([-256, 255, -256, 255, -256, 255, -256, 255]); - } - if (transform) { - for (i = 0; i < dataLength;) { - for (j = 0, k = 0; j < numComponents; j++, i++, k += 2) { - data[i] = (data[i] * transform[k] >> 8) + transform[k + 1]; - } - } - } - return data; - }, - - get _isColorConversionNeeded() { - if (this.adobe) { - return !!this.adobe.transformCode; - } - if (this.numComponents === 3) { - if (this._colorTransform === 0) { - return false; - } - return true; - } - if (this._colorTransform === 1) { - return true; - } - return false; - }, - _convertYccToRgb: function convertYccToRgb(data) { - var Y, Cb, Cr; - for (var i = 0, length = data.length; i < length; i += 3) { - Y = data[i]; - Cb = data[i + 1]; - Cr = data[i + 2]; - data[i] = Y - 179.456 + 1.402 * Cr; - data[i + 1] = Y + 135.459 - 0.344 * Cb - 0.714 * Cr; - data[i + 2] = Y - 226.816 + 1.772 * Cb; - } - return data; - }, - _convertYcckToRgb: function convertYcckToRgb(data) { - var Y, Cb, Cr, k; - var offset = 0; - for (var i = 0, length = data.length; i < length; i += 4) { - Y = data[i]; - Cb = data[i + 1]; - Cr = data[i + 2]; - k = data[i + 3]; - data[offset++] = -122.67195406894 + Cb * (-6.60635669420364e-5 * Cb + 0.000437130475926232 * Cr - 5.4080610064599e-5 * Y + 0.00048449797120281 * k - 0.154362151871126) + Cr * (-0.000957964378445773 * Cr + 0.000817076911346625 * Y - 0.00477271405408747 * k + 1.53380253221734) + Y * (0.000961250184130688 * Y - 0.00266257332283933 * k + 0.48357088451265) + k * (-0.000336197177618394 * k + 0.484791561490776); - data[offset++] = 107.268039397724 + Cb * (2.19927104525741e-5 * Cb - 0.000640992018297945 * Cr + 0.000659397001245577 * Y + 0.000426105652938837 * k - 0.176491792462875) + Cr * (-0.000778269941513683 * Cr + 0.00130872261408275 * Y + 0.000770482631801132 * k - 0.151051492775562) + Y * (0.00126935368114843 * Y - 0.00265090189010898 * k + 0.25802910206845) + k * (-0.000318913117588328 * k - 0.213742400323665); - data[offset++] = -20.810012546947 + Cb * (-0.000570115196973677 * Cb - 2.63409051004589e-5 * Cr + 0.0020741088115012 * Y - 0.00288260236853442 * k + 0.814272968359295) + Cr * (-1.53496057440975e-5 * Cr - 0.000132689043961446 * Y + 0.000560833691242812 * k - 0.195152027534049) + Y * (0.00174418132927582 * Y - 0.00255243321439347 * k + 0.116935020465145) + k * (-0.000343531996510555 * k + 0.24165260232407); - } - return data.subarray(0, offset); - }, - _convertYcckToCmyk: function convertYcckToCmyk(data) { - var Y, Cb, Cr; - for (var i = 0, length = data.length; i < length; i += 4) { - Y = data[i]; - Cb = data[i + 1]; - Cr = data[i + 2]; - data[i] = 434.456 - Y - 1.402 * Cr; - data[i + 1] = 119.541 - Y + 0.344 * Cb + 0.714 * Cr; - data[i + 2] = 481.816 - Y - 1.772 * Cb; - } - return data; - }, - _convertCmykToRgb: function convertCmykToRgb(data) { - var c, m, y, k; - var offset = 0; - var scale = 1 / 255; - for (var i = 0, length = data.length; i < length; i += 4) { - c = data[i] * scale; - m = data[i + 1] * scale; - y = data[i + 2] * scale; - k = data[i + 3] * scale; - data[offset++] = 255 + c * (-4.387332384609988 * c + 54.48615194189176 * m + 18.82290502165302 * y + 212.25662451639585 * k - 285.2331026137004) + m * (1.7149763477362134 * m - 5.6096736904047315 * y - 17.873870861415444 * k - 5.497006427196366) + y * (-2.5217340131683033 * y - 21.248923337353073 * k + 17.5119270841813) - k * (21.86122147463605 * k + 189.48180835922747); - data[offset++] = 255 + c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k - 79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 190.9453302588951) + y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) - k * (20.737325471181034 * k + 187.80453709719578); - data[offset++] = 255 + c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k - 14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 112.23884253719248) + y * (0.03296041114873217 * y + 115.60384449646641 * k - 193.58209356861505) - k * (22.33816807309886 * k + 180.12613974708367); - } - return data.subarray(0, offset); - }, - getData: function getData(_ref3) { - var width = _ref3.width, - height = _ref3.height, - _ref3$forceRGB = _ref3.forceRGB, - forceRGB = _ref3$forceRGB === undefined ? false : _ref3$forceRGB, - _ref3$isSourcePDF = _ref3.isSourcePDF, - isSourcePDF = _ref3$isSourcePDF === undefined ? false : _ref3$isSourcePDF; - - if (this.numComponents > 4) { - throw new JpegError('Unsupported color mode'); - } - var data = this._getLinearizedBlockData(width, height, isSourcePDF); - if (this.numComponents === 1 && forceRGB) { - var dataLength = data.length; - var rgbData = new Uint8ClampedArray(dataLength * 3); - var offset = 0; - for (var i = 0; i < dataLength; i++) { - var grayColor = data[i]; - rgbData[offset++] = grayColor; - rgbData[offset++] = grayColor; - rgbData[offset++] = grayColor; - } - return rgbData; - } else if (this.numComponents === 3 && this._isColorConversionNeeded) { - return this._convertYccToRgb(data); - } else if (this.numComponents === 4) { - if (this._isColorConversionNeeded) { - if (forceRGB) { - return this._convertYcckToRgb(data); - } - return this._convertYcckToCmyk(data); - } else if (forceRGB) { - return this._convertCmykToRgb(data); - } - } - return data; - } - }; - return JpegImage; -}(); -exports.JpegImage = JpegImage; - -/***/ }), -/* 148 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.JpxStream = undefined; - -var _stream = __w_pdfjs_require__(140); - -var _jpx = __w_pdfjs_require__(149); - -var _util = __w_pdfjs_require__(2); - -var JpxStream = function JpxStreamClosure() { - function JpxStream(stream, maybeLength, dict, params) { - this.stream = stream; - this.maybeLength = maybeLength; - this.dict = dict; - this.params = params; - _stream.DecodeStream.call(this, maybeLength); - } - JpxStream.prototype = Object.create(_stream.DecodeStream.prototype); - Object.defineProperty(JpxStream.prototype, 'bytes', { - get: function JpxStream_bytes() { - return (0, _util.shadow)(this, 'bytes', this.stream.getBytes(this.maybeLength)); - }, - configurable: true - }); - JpxStream.prototype.ensureBuffer = function (requested) {}; - JpxStream.prototype.readBlock = function () { - if (this.eof) { - return; - } - var jpxImage = new _jpx.JpxImage(); - jpxImage.parse(this.bytes); - var width = jpxImage.width; - var height = jpxImage.height; - var componentsCount = jpxImage.componentsCount; - var tileCount = jpxImage.tiles.length; - if (tileCount === 1) { - this.buffer = jpxImage.tiles[0].items; - } else { - var data = new Uint8ClampedArray(width * height * componentsCount); - for (var k = 0; k < tileCount; k++) { - var tileComponents = jpxImage.tiles[k]; - var tileWidth = tileComponents.width; - var tileHeight = tileComponents.height; - var tileLeft = tileComponents.left; - var tileTop = tileComponents.top; - var src = tileComponents.items; - var srcPosition = 0; - var dataPosition = (width * tileTop + tileLeft) * componentsCount; - var imgRowSize = width * componentsCount; - var tileRowSize = tileWidth * componentsCount; - for (var j = 0; j < tileHeight; j++) { - var rowBytes = src.subarray(srcPosition, srcPosition + tileRowSize); - data.set(rowBytes, dataPosition); - srcPosition += tileRowSize; - dataPosition += imgRowSize; - } - } - this.buffer = data; - } - this.bufferLength = this.buffer.length; - this.eof = true; - }; - return JpxStream; -}(); -exports.JpxStream = JpxStream; - -/***/ }), -/* 149 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.JpxImage = undefined; - -var _util = __w_pdfjs_require__(2); - -var _arithmetic_decoder = __w_pdfjs_require__(145); - -var JpxError = function JpxErrorClosure() { - function JpxError(msg) { - this.message = 'JPX error: ' + msg; - } - JpxError.prototype = new Error(); - JpxError.prototype.name = 'JpxError'; - JpxError.constructor = JpxError; - return JpxError; -}(); -var JpxImage = function JpxImageClosure() { - var SubbandsGainLog2 = { - 'LL': 0, - 'LH': 1, - 'HL': 1, - 'HH': 2 - }; - function JpxImage() { - this.failOnCorruptedImage = false; - } - JpxImage.prototype = { - parse: function JpxImage_parse(data) { - var head = (0, _util.readUint16)(data, 0); - if (head === 0xFF4F) { - this.parseCodestream(data, 0, data.length); - return; - } - var position = 0, - length = data.length; - while (position < length) { - var headerSize = 8; - var lbox = (0, _util.readUint32)(data, position); - var tbox = (0, _util.readUint32)(data, position + 4); - position += headerSize; - if (lbox === 1) { - lbox = (0, _util.readUint32)(data, position) * 4294967296 + (0, _util.readUint32)(data, position + 4); - position += 8; - headerSize += 8; - } - if (lbox === 0) { - lbox = length - position + headerSize; - } - if (lbox < headerSize) { - throw new JpxError('Invalid box field size'); - } - var dataLength = lbox - headerSize; - var jumpDataLength = true; - switch (tbox) { - case 0x6A703268: - jumpDataLength = false; - break; - case 0x636F6C72: - var method = data[position]; - if (method === 1) { - var colorspace = (0, _util.readUint32)(data, position + 3); - switch (colorspace) { - case 16: - case 17: - case 18: - break; - default: - (0, _util.warn)('Unknown colorspace ' + colorspace); - break; - } - } else if (method === 2) { - (0, _util.info)('ICC profile not supported'); - } - break; - case 0x6A703263: - this.parseCodestream(data, position, position + dataLength); - break; - case 0x6A502020: - if ((0, _util.readUint32)(data, position) !== 0x0d0a870a) { - (0, _util.warn)('Invalid JP2 signature'); - } - break; - case 0x6A501A1A: - case 0x66747970: - case 0x72726571: - case 0x72657320: - case 0x69686472: - break; - default: - var headerType = String.fromCharCode(tbox >> 24 & 0xFF, tbox >> 16 & 0xFF, tbox >> 8 & 0xFF, tbox & 0xFF); - (0, _util.warn)('Unsupported header type ' + tbox + ' (' + headerType + ')'); - break; - } - if (jumpDataLength) { - position += dataLength; - } - } - }, - parseImageProperties: function JpxImage_parseImageProperties(stream) { - var newByte = stream.getByte(); - while (newByte >= 0) { - var oldByte = newByte; - newByte = stream.getByte(); - var code = oldByte << 8 | newByte; - if (code === 0xFF51) { - stream.skip(4); - var Xsiz = stream.getInt32() >>> 0; - var Ysiz = stream.getInt32() >>> 0; - var XOsiz = stream.getInt32() >>> 0; - var YOsiz = stream.getInt32() >>> 0; - stream.skip(16); - var Csiz = stream.getUint16(); - this.width = Xsiz - XOsiz; - this.height = Ysiz - YOsiz; - this.componentsCount = Csiz; - this.bitsPerComponent = 8; - return; - } - } - throw new JpxError('No size marker found in JPX stream'); - }, - parseCodestream: function JpxImage_parseCodestream(data, start, end) { - var context = {}; - var doNotRecover = false; - try { - var position = start; - while (position + 1 < end) { - var code = (0, _util.readUint16)(data, position); - position += 2; - var length = 0, - j, - sqcd, - spqcds, - spqcdSize, - scalarExpounded, - tile; - switch (code) { - case 0xFF4F: - context.mainHeader = true; - break; - case 0xFFD9: - break; - case 0xFF51: - length = (0, _util.readUint16)(data, position); - var siz = {}; - siz.Xsiz = (0, _util.readUint32)(data, position + 4); - siz.Ysiz = (0, _util.readUint32)(data, position + 8); - siz.XOsiz = (0, _util.readUint32)(data, position + 12); - siz.YOsiz = (0, _util.readUint32)(data, position + 16); - siz.XTsiz = (0, _util.readUint32)(data, position + 20); - siz.YTsiz = (0, _util.readUint32)(data, position + 24); - siz.XTOsiz = (0, _util.readUint32)(data, position + 28); - siz.YTOsiz = (0, _util.readUint32)(data, position + 32); - var componentsCount = (0, _util.readUint16)(data, position + 36); - siz.Csiz = componentsCount; - var components = []; - j = position + 38; - for (var i = 0; i < componentsCount; i++) { - var component = { - precision: (data[j] & 0x7F) + 1, - isSigned: !!(data[j] & 0x80), - XRsiz: data[j + 1], - YRsiz: data[j + 2] - }; - j += 3; - calculateComponentDimensions(component, siz); - components.push(component); - } - context.SIZ = siz; - context.components = components; - calculateTileGrids(context, components); - context.QCC = []; - context.COC = []; - break; - case 0xFF5C: - length = (0, _util.readUint16)(data, position); - var qcd = {}; - j = position + 2; - sqcd = data[j++]; - switch (sqcd & 0x1F) { - case 0: - spqcdSize = 8; - scalarExpounded = true; - break; - case 1: - spqcdSize = 16; - scalarExpounded = false; - break; - case 2: - spqcdSize = 16; - scalarExpounded = true; - break; - default: - throw new Error('Invalid SQcd value ' + sqcd); - } - qcd.noQuantization = spqcdSize === 8; - qcd.scalarExpounded = scalarExpounded; - qcd.guardBits = sqcd >> 5; - spqcds = []; - while (j < length + position) { - var spqcd = {}; - if (spqcdSize === 8) { - spqcd.epsilon = data[j++] >> 3; - spqcd.mu = 0; - } else { - spqcd.epsilon = data[j] >> 3; - spqcd.mu = (data[j] & 0x7) << 8 | data[j + 1]; - j += 2; - } - spqcds.push(spqcd); - } - qcd.SPqcds = spqcds; - if (context.mainHeader) { - context.QCD = qcd; - } else { - context.currentTile.QCD = qcd; - context.currentTile.QCC = []; - } - break; - case 0xFF5D: - length = (0, _util.readUint16)(data, position); - var qcc = {}; - j = position + 2; - var cqcc; - if (context.SIZ.Csiz < 257) { - cqcc = data[j++]; - } else { - cqcc = (0, _util.readUint16)(data, j); - j += 2; - } - sqcd = data[j++]; - switch (sqcd & 0x1F) { - case 0: - spqcdSize = 8; - scalarExpounded = true; - break; - case 1: - spqcdSize = 16; - scalarExpounded = false; - break; - case 2: - spqcdSize = 16; - scalarExpounded = true; - break; - default: - throw new Error('Invalid SQcd value ' + sqcd); - } - qcc.noQuantization = spqcdSize === 8; - qcc.scalarExpounded = scalarExpounded; - qcc.guardBits = sqcd >> 5; - spqcds = []; - while (j < length + position) { - spqcd = {}; - if (spqcdSize === 8) { - spqcd.epsilon = data[j++] >> 3; - spqcd.mu = 0; - } else { - spqcd.epsilon = data[j] >> 3; - spqcd.mu = (data[j] & 0x7) << 8 | data[j + 1]; - j += 2; - } - spqcds.push(spqcd); - } - qcc.SPqcds = spqcds; - if (context.mainHeader) { - context.QCC[cqcc] = qcc; - } else { - context.currentTile.QCC[cqcc] = qcc; - } - break; - case 0xFF52: - length = (0, _util.readUint16)(data, position); - var cod = {}; - j = position + 2; - var scod = data[j++]; - cod.entropyCoderWithCustomPrecincts = !!(scod & 1); - cod.sopMarkerUsed = !!(scod & 2); - cod.ephMarkerUsed = !!(scod & 4); - cod.progressionOrder = data[j++]; - cod.layersCount = (0, _util.readUint16)(data, j); - j += 2; - cod.multipleComponentTransform = data[j++]; - cod.decompositionLevelsCount = data[j++]; - cod.xcb = (data[j++] & 0xF) + 2; - cod.ycb = (data[j++] & 0xF) + 2; - var blockStyle = data[j++]; - cod.selectiveArithmeticCodingBypass = !!(blockStyle & 1); - cod.resetContextProbabilities = !!(blockStyle & 2); - cod.terminationOnEachCodingPass = !!(blockStyle & 4); - cod.verticallyStripe = !!(blockStyle & 8); - cod.predictableTermination = !!(blockStyle & 16); - cod.segmentationSymbolUsed = !!(blockStyle & 32); - cod.reversibleTransformation = data[j++]; - if (cod.entropyCoderWithCustomPrecincts) { - var precinctsSizes = []; - while (j < length + position) { - var precinctsSize = data[j++]; - precinctsSizes.push({ - PPx: precinctsSize & 0xF, - PPy: precinctsSize >> 4 - }); - } - cod.precinctsSizes = precinctsSizes; - } - var unsupported = []; - if (cod.selectiveArithmeticCodingBypass) { - unsupported.push('selectiveArithmeticCodingBypass'); - } - if (cod.resetContextProbabilities) { - unsupported.push('resetContextProbabilities'); - } - if (cod.terminationOnEachCodingPass) { - unsupported.push('terminationOnEachCodingPass'); - } - if (cod.verticallyStripe) { - unsupported.push('verticallyStripe'); - } - if (cod.predictableTermination) { - unsupported.push('predictableTermination'); - } - if (unsupported.length > 0) { - doNotRecover = true; - throw new Error('Unsupported COD options (' + unsupported.join(', ') + ')'); - } - if (context.mainHeader) { - context.COD = cod; - } else { - context.currentTile.COD = cod; - context.currentTile.COC = []; - } - break; - case 0xFF90: - length = (0, _util.readUint16)(data, position); - tile = {}; - tile.index = (0, _util.readUint16)(data, position + 2); - tile.length = (0, _util.readUint32)(data, position + 4); - tile.dataEnd = tile.length + position - 2; - tile.partIndex = data[position + 8]; - tile.partsCount = data[position + 9]; - context.mainHeader = false; - if (tile.partIndex === 0) { - tile.COD = context.COD; - tile.COC = context.COC.slice(0); - tile.QCD = context.QCD; - tile.QCC = context.QCC.slice(0); - } - context.currentTile = tile; - break; - case 0xFF93: - tile = context.currentTile; - if (tile.partIndex === 0) { - initializeTile(context, tile.index); - buildPackets(context); - } - length = tile.dataEnd - position; - parseTilePackets(context, data, position, length); - break; - case 0xFF55: - case 0xFF57: - case 0xFF58: - case 0xFF64: - length = (0, _util.readUint16)(data, position); - break; - case 0xFF53: - throw new Error('Codestream code 0xFF53 (COC) is ' + 'not implemented'); - default: - throw new Error('Unknown codestream code: ' + code.toString(16)); - } - position += length; - } - } catch (e) { - if (doNotRecover || this.failOnCorruptedImage) { - throw new JpxError(e.message); - } else { - (0, _util.warn)('JPX: Trying to recover from: ' + e.message); - } - } - this.tiles = transformComponents(context); - this.width = context.SIZ.Xsiz - context.SIZ.XOsiz; - this.height = context.SIZ.Ysiz - context.SIZ.YOsiz; - this.componentsCount = context.SIZ.Csiz; - } - }; - function calculateComponentDimensions(component, siz) { - component.x0 = Math.ceil(siz.XOsiz / component.XRsiz); - component.x1 = Math.ceil(siz.Xsiz / component.XRsiz); - component.y0 = Math.ceil(siz.YOsiz / component.YRsiz); - component.y1 = Math.ceil(siz.Ysiz / component.YRsiz); - component.width = component.x1 - component.x0; - component.height = component.y1 - component.y0; - } - function calculateTileGrids(context, components) { - var siz = context.SIZ; - var tile, - tiles = []; - var numXtiles = Math.ceil((siz.Xsiz - siz.XTOsiz) / siz.XTsiz); - var numYtiles = Math.ceil((siz.Ysiz - siz.YTOsiz) / siz.YTsiz); - for (var q = 0; q < numYtiles; q++) { - for (var p = 0; p < numXtiles; p++) { - tile = {}; - tile.tx0 = Math.max(siz.XTOsiz + p * siz.XTsiz, siz.XOsiz); - tile.ty0 = Math.max(siz.YTOsiz + q * siz.YTsiz, siz.YOsiz); - tile.tx1 = Math.min(siz.XTOsiz + (p + 1) * siz.XTsiz, siz.Xsiz); - tile.ty1 = Math.min(siz.YTOsiz + (q + 1) * siz.YTsiz, siz.Ysiz); - tile.width = tile.tx1 - tile.tx0; - tile.height = tile.ty1 - tile.ty0; - tile.components = []; - tiles.push(tile); - } - } - context.tiles = tiles; - var componentsCount = siz.Csiz; - for (var i = 0, ii = componentsCount; i < ii; i++) { - var component = components[i]; - for (var j = 0, jj = tiles.length; j < jj; j++) { - var tileComponent = {}; - tile = tiles[j]; - tileComponent.tcx0 = Math.ceil(tile.tx0 / component.XRsiz); - tileComponent.tcy0 = Math.ceil(tile.ty0 / component.YRsiz); - tileComponent.tcx1 = Math.ceil(tile.tx1 / component.XRsiz); - tileComponent.tcy1 = Math.ceil(tile.ty1 / component.YRsiz); - tileComponent.width = tileComponent.tcx1 - tileComponent.tcx0; - tileComponent.height = tileComponent.tcy1 - tileComponent.tcy0; - tile.components[i] = tileComponent; - } - } - } - function getBlocksDimensions(context, component, r) { - var codOrCoc = component.codingStyleParameters; - var result = {}; - if (!codOrCoc.entropyCoderWithCustomPrecincts) { - result.PPx = 15; - result.PPy = 15; - } else { - result.PPx = codOrCoc.precinctsSizes[r].PPx; - result.PPy = codOrCoc.precinctsSizes[r].PPy; - } - result.xcb_ = r > 0 ? Math.min(codOrCoc.xcb, result.PPx - 1) : Math.min(codOrCoc.xcb, result.PPx); - result.ycb_ = r > 0 ? Math.min(codOrCoc.ycb, result.PPy - 1) : Math.min(codOrCoc.ycb, result.PPy); - return result; - } - function buildPrecincts(context, resolution, dimensions) { - var precinctWidth = 1 << dimensions.PPx; - var precinctHeight = 1 << dimensions.PPy; - var isZeroRes = resolution.resLevel === 0; - var precinctWidthInSubband = 1 << dimensions.PPx + (isZeroRes ? 0 : -1); - var precinctHeightInSubband = 1 << dimensions.PPy + (isZeroRes ? 0 : -1); - var numprecinctswide = resolution.trx1 > resolution.trx0 ? Math.ceil(resolution.trx1 / precinctWidth) - Math.floor(resolution.trx0 / precinctWidth) : 0; - var numprecinctshigh = resolution.try1 > resolution.try0 ? Math.ceil(resolution.try1 / precinctHeight) - Math.floor(resolution.try0 / precinctHeight) : 0; - var numprecincts = numprecinctswide * numprecinctshigh; - resolution.precinctParameters = { - precinctWidth: precinctWidth, - precinctHeight: precinctHeight, - numprecinctswide: numprecinctswide, - numprecinctshigh: numprecinctshigh, - numprecincts: numprecincts, - precinctWidthInSubband: precinctWidthInSubband, - precinctHeightInSubband: precinctHeightInSubband - }; - } - function buildCodeblocks(context, subband, dimensions) { - var xcb_ = dimensions.xcb_; - var ycb_ = dimensions.ycb_; - var codeblockWidth = 1 << xcb_; - var codeblockHeight = 1 << ycb_; - var cbx0 = subband.tbx0 >> xcb_; - var cby0 = subband.tby0 >> ycb_; - var cbx1 = subband.tbx1 + codeblockWidth - 1 >> xcb_; - var cby1 = subband.tby1 + codeblockHeight - 1 >> ycb_; - var precinctParameters = subband.resolution.precinctParameters; - var codeblocks = []; - var precincts = []; - var i, j, codeblock, precinctNumber; - for (j = cby0; j < cby1; j++) { - for (i = cbx0; i < cbx1; i++) { - codeblock = { - cbx: i, - cby: j, - tbx0: codeblockWidth * i, - tby0: codeblockHeight * j, - tbx1: codeblockWidth * (i + 1), - tby1: codeblockHeight * (j + 1) - }; - codeblock.tbx0_ = Math.max(subband.tbx0, codeblock.tbx0); - codeblock.tby0_ = Math.max(subband.tby0, codeblock.tby0); - codeblock.tbx1_ = Math.min(subband.tbx1, codeblock.tbx1); - codeblock.tby1_ = Math.min(subband.tby1, codeblock.tby1); - var pi = Math.floor((codeblock.tbx0_ - subband.tbx0) / precinctParameters.precinctWidthInSubband); - var pj = Math.floor((codeblock.tby0_ - subband.tby0) / precinctParameters.precinctHeightInSubband); - precinctNumber = pi + pj * precinctParameters.numprecinctswide; - codeblock.precinctNumber = precinctNumber; - codeblock.subbandType = subband.type; - codeblock.Lblock = 3; - if (codeblock.tbx1_ <= codeblock.tbx0_ || codeblock.tby1_ <= codeblock.tby0_) { - continue; - } - codeblocks.push(codeblock); - var precinct = precincts[precinctNumber]; - if (precinct !== undefined) { - if (i < precinct.cbxMin) { - precinct.cbxMin = i; - } else if (i > precinct.cbxMax) { - precinct.cbxMax = i; - } - if (j < precinct.cbyMin) { - precinct.cbxMin = j; - } else if (j > precinct.cbyMax) { - precinct.cbyMax = j; - } - } else { - precincts[precinctNumber] = precinct = { - cbxMin: i, - cbyMin: j, - cbxMax: i, - cbyMax: j - }; - } - codeblock.precinct = precinct; - } - } - subband.codeblockParameters = { - codeblockWidth: xcb_, - codeblockHeight: ycb_, - numcodeblockwide: cbx1 - cbx0 + 1, - numcodeblockhigh: cby1 - cby0 + 1 - }; - subband.codeblocks = codeblocks; - subband.precincts = precincts; - } - function createPacket(resolution, precinctNumber, layerNumber) { - var precinctCodeblocks = []; - var subbands = resolution.subbands; - for (var i = 0, ii = subbands.length; i < ii; i++) { - var subband = subbands[i]; - var codeblocks = subband.codeblocks; - for (var j = 0, jj = codeblocks.length; j < jj; j++) { - var codeblock = codeblocks[j]; - if (codeblock.precinctNumber !== precinctNumber) { - continue; - } - precinctCodeblocks.push(codeblock); - } - } - return { - layerNumber: layerNumber, - codeblocks: precinctCodeblocks - }; - } - function LayerResolutionComponentPositionIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var maxDecompositionLevelsCount = 0; - for (var q = 0; q < componentsCount; q++) { - maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, tile.components[q].codingStyleParameters.decompositionLevelsCount); - } - var l = 0, - r = 0, - i = 0, - k = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; l < layersCount; l++) { - for (; r <= maxDecompositionLevelsCount; r++) { - for (; i < componentsCount; i++) { - var component = tile.components[i]; - if (r > component.codingStyleParameters.decompositionLevelsCount) { - continue; - } - var resolution = component.resolutions[r]; - var numprecincts = resolution.precinctParameters.numprecincts; - for (; k < numprecincts;) { - var packet = createPacket(resolution, k, l); - k++; - return packet; - } - k = 0; - } - i = 0; - } - r = 0; - } - throw new JpxError('Out of packets'); - }; - } - function ResolutionLayerComponentPositionIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var maxDecompositionLevelsCount = 0; - for (var q = 0; q < componentsCount; q++) { - maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, tile.components[q].codingStyleParameters.decompositionLevelsCount); - } - var r = 0, - l = 0, - i = 0, - k = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; r <= maxDecompositionLevelsCount; r++) { - for (; l < layersCount; l++) { - for (; i < componentsCount; i++) { - var component = tile.components[i]; - if (r > component.codingStyleParameters.decompositionLevelsCount) { - continue; - } - var resolution = component.resolutions[r]; - var numprecincts = resolution.precinctParameters.numprecincts; - for (; k < numprecincts;) { - var packet = createPacket(resolution, k, l); - k++; - return packet; - } - k = 0; - } - i = 0; - } - l = 0; - } - throw new JpxError('Out of packets'); - }; - } - function ResolutionPositionComponentLayerIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var l, r, c, p; - var maxDecompositionLevelsCount = 0; - for (c = 0; c < componentsCount; c++) { - var component = tile.components[c]; - maxDecompositionLevelsCount = Math.max(maxDecompositionLevelsCount, component.codingStyleParameters.decompositionLevelsCount); - } - var maxNumPrecinctsInLevel = new Int32Array(maxDecompositionLevelsCount + 1); - for (r = 0; r <= maxDecompositionLevelsCount; ++r) { - var maxNumPrecincts = 0; - for (c = 0; c < componentsCount; ++c) { - var resolutions = tile.components[c].resolutions; - if (r < resolutions.length) { - maxNumPrecincts = Math.max(maxNumPrecincts, resolutions[r].precinctParameters.numprecincts); - } - } - maxNumPrecinctsInLevel[r] = maxNumPrecincts; - } - l = 0; - r = 0; - c = 0; - p = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; r <= maxDecompositionLevelsCount; r++) { - for (; p < maxNumPrecinctsInLevel[r]; p++) { - for (; c < componentsCount; c++) { - var component = tile.components[c]; - if (r > component.codingStyleParameters.decompositionLevelsCount) { - continue; - } - var resolution = component.resolutions[r]; - var numprecincts = resolution.precinctParameters.numprecincts; - if (p >= numprecincts) { - continue; - } - for (; l < layersCount;) { - var packet = createPacket(resolution, p, l); - l++; - return packet; - } - l = 0; - } - c = 0; - } - p = 0; - } - throw new JpxError('Out of packets'); - }; - } - function PositionComponentResolutionLayerIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var precinctsSizes = getPrecinctSizesInImageScale(tile); - var precinctsIterationSizes = precinctsSizes; - var l = 0, - r = 0, - c = 0, - px = 0, - py = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; py < precinctsIterationSizes.maxNumHigh; py++) { - for (; px < precinctsIterationSizes.maxNumWide; px++) { - for (; c < componentsCount; c++) { - var component = tile.components[c]; - var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; - for (; r <= decompositionLevelsCount; r++) { - var resolution = component.resolutions[r]; - var sizeInImageScale = precinctsSizes.components[c].resolutions[r]; - var k = getPrecinctIndexIfExist(px, py, sizeInImageScale, precinctsIterationSizes, resolution); - if (k === null) { - continue; - } - for (; l < layersCount;) { - var packet = createPacket(resolution, k, l); - l++; - return packet; - } - l = 0; - } - r = 0; - } - c = 0; - } - px = 0; - } - throw new JpxError('Out of packets'); - }; - } - function ComponentPositionResolutionLayerIterator(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var layersCount = tile.codingStyleDefaultParameters.layersCount; - var componentsCount = siz.Csiz; - var precinctsSizes = getPrecinctSizesInImageScale(tile); - var l = 0, - r = 0, - c = 0, - px = 0, - py = 0; - this.nextPacket = function JpxImage_nextPacket() { - for (; c < componentsCount; ++c) { - var component = tile.components[c]; - var precinctsIterationSizes = precinctsSizes.components[c]; - var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; - for (; py < precinctsIterationSizes.maxNumHigh; py++) { - for (; px < precinctsIterationSizes.maxNumWide; px++) { - for (; r <= decompositionLevelsCount; r++) { - var resolution = component.resolutions[r]; - var sizeInImageScale = precinctsIterationSizes.resolutions[r]; - var k = getPrecinctIndexIfExist(px, py, sizeInImageScale, precinctsIterationSizes, resolution); - if (k === null) { - continue; - } - for (; l < layersCount;) { - var packet = createPacket(resolution, k, l); - l++; - return packet; - } - l = 0; - } - r = 0; - } - px = 0; - } - py = 0; - } - throw new JpxError('Out of packets'); - }; - } - function getPrecinctIndexIfExist(pxIndex, pyIndex, sizeInImageScale, precinctIterationSizes, resolution) { - var posX = pxIndex * precinctIterationSizes.minWidth; - var posY = pyIndex * precinctIterationSizes.minHeight; - if (posX % sizeInImageScale.width !== 0 || posY % sizeInImageScale.height !== 0) { - return null; - } - var startPrecinctRowIndex = posY / sizeInImageScale.width * resolution.precinctParameters.numprecinctswide; - return posX / sizeInImageScale.height + startPrecinctRowIndex; - } - function getPrecinctSizesInImageScale(tile) { - var componentsCount = tile.components.length; - var minWidth = Number.MAX_VALUE; - var minHeight = Number.MAX_VALUE; - var maxNumWide = 0; - var maxNumHigh = 0; - var sizePerComponent = new Array(componentsCount); - for (var c = 0; c < componentsCount; c++) { - var component = tile.components[c]; - var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; - var sizePerResolution = new Array(decompositionLevelsCount + 1); - var minWidthCurrentComponent = Number.MAX_VALUE; - var minHeightCurrentComponent = Number.MAX_VALUE; - var maxNumWideCurrentComponent = 0; - var maxNumHighCurrentComponent = 0; - var scale = 1; - for (var r = decompositionLevelsCount; r >= 0; --r) { - var resolution = component.resolutions[r]; - var widthCurrentResolution = scale * resolution.precinctParameters.precinctWidth; - var heightCurrentResolution = scale * resolution.precinctParameters.precinctHeight; - minWidthCurrentComponent = Math.min(minWidthCurrentComponent, widthCurrentResolution); - minHeightCurrentComponent = Math.min(minHeightCurrentComponent, heightCurrentResolution); - maxNumWideCurrentComponent = Math.max(maxNumWideCurrentComponent, resolution.precinctParameters.numprecinctswide); - maxNumHighCurrentComponent = Math.max(maxNumHighCurrentComponent, resolution.precinctParameters.numprecinctshigh); - sizePerResolution[r] = { - width: widthCurrentResolution, - height: heightCurrentResolution - }; - scale <<= 1; - } - minWidth = Math.min(minWidth, minWidthCurrentComponent); - minHeight = Math.min(minHeight, minHeightCurrentComponent); - maxNumWide = Math.max(maxNumWide, maxNumWideCurrentComponent); - maxNumHigh = Math.max(maxNumHigh, maxNumHighCurrentComponent); - sizePerComponent[c] = { - resolutions: sizePerResolution, - minWidth: minWidthCurrentComponent, - minHeight: minHeightCurrentComponent, - maxNumWide: maxNumWideCurrentComponent, - maxNumHigh: maxNumHighCurrentComponent - }; - } - return { - components: sizePerComponent, - minWidth: minWidth, - minHeight: minHeight, - maxNumWide: maxNumWide, - maxNumHigh: maxNumHigh - }; - } - function buildPackets(context) { - var siz = context.SIZ; - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var componentsCount = siz.Csiz; - for (var c = 0; c < componentsCount; c++) { - var component = tile.components[c]; - var decompositionLevelsCount = component.codingStyleParameters.decompositionLevelsCount; - var resolutions = []; - var subbands = []; - for (var r = 0; r <= decompositionLevelsCount; r++) { - var blocksDimensions = getBlocksDimensions(context, component, r); - var resolution = {}; - var scale = 1 << decompositionLevelsCount - r; - resolution.trx0 = Math.ceil(component.tcx0 / scale); - resolution.try0 = Math.ceil(component.tcy0 / scale); - resolution.trx1 = Math.ceil(component.tcx1 / scale); - resolution.try1 = Math.ceil(component.tcy1 / scale); - resolution.resLevel = r; - buildPrecincts(context, resolution, blocksDimensions); - resolutions.push(resolution); - var subband; - if (r === 0) { - subband = {}; - subband.type = 'LL'; - subband.tbx0 = Math.ceil(component.tcx0 / scale); - subband.tby0 = Math.ceil(component.tcy0 / scale); - subband.tbx1 = Math.ceil(component.tcx1 / scale); - subband.tby1 = Math.ceil(component.tcy1 / scale); - subband.resolution = resolution; - buildCodeblocks(context, subband, blocksDimensions); - subbands.push(subband); - resolution.subbands = [subband]; - } else { - var bscale = 1 << decompositionLevelsCount - r + 1; - var resolutionSubbands = []; - subband = {}; - subband.type = 'HL'; - subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5); - subband.tby0 = Math.ceil(component.tcy0 / bscale); - subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5); - subband.tby1 = Math.ceil(component.tcy1 / bscale); - subband.resolution = resolution; - buildCodeblocks(context, subband, blocksDimensions); - subbands.push(subband); - resolutionSubbands.push(subband); - subband = {}; - subband.type = 'LH'; - subband.tbx0 = Math.ceil(component.tcx0 / bscale); - subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5); - subband.tbx1 = Math.ceil(component.tcx1 / bscale); - subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5); - subband.resolution = resolution; - buildCodeblocks(context, subband, blocksDimensions); - subbands.push(subband); - resolutionSubbands.push(subband); - subband = {}; - subband.type = 'HH'; - subband.tbx0 = Math.ceil(component.tcx0 / bscale - 0.5); - subband.tby0 = Math.ceil(component.tcy0 / bscale - 0.5); - subband.tbx1 = Math.ceil(component.tcx1 / bscale - 0.5); - subband.tby1 = Math.ceil(component.tcy1 / bscale - 0.5); - subband.resolution = resolution; - buildCodeblocks(context, subband, blocksDimensions); - subbands.push(subband); - resolutionSubbands.push(subband); - resolution.subbands = resolutionSubbands; - } - } - component.resolutions = resolutions; - component.subbands = subbands; - } - var progressionOrder = tile.codingStyleDefaultParameters.progressionOrder; - switch (progressionOrder) { - case 0: - tile.packetsIterator = new LayerResolutionComponentPositionIterator(context); - break; - case 1: - tile.packetsIterator = new ResolutionLayerComponentPositionIterator(context); - break; - case 2: - tile.packetsIterator = new ResolutionPositionComponentLayerIterator(context); - break; - case 3: - tile.packetsIterator = new PositionComponentResolutionLayerIterator(context); - break; - case 4: - tile.packetsIterator = new ComponentPositionResolutionLayerIterator(context); - break; - default: - throw new JpxError('Unsupported progression order ' + progressionOrder); - } - } - function parseTilePackets(context, data, offset, dataLength) { - var position = 0; - var buffer, - bufferSize = 0, - skipNextBit = false; - function readBits(count) { - while (bufferSize < count) { - var b = data[offset + position]; - position++; - if (skipNextBit) { - buffer = buffer << 7 | b; - bufferSize += 7; - skipNextBit = false; - } else { - buffer = buffer << 8 | b; - bufferSize += 8; - } - if (b === 0xFF) { - skipNextBit = true; - } - } - bufferSize -= count; - return buffer >>> bufferSize & (1 << count) - 1; - } - function skipMarkerIfEqual(value) { - if (data[offset + position - 1] === 0xFF && data[offset + position] === value) { - skipBytes(1); - return true; - } else if (data[offset + position] === 0xFF && data[offset + position + 1] === value) { - skipBytes(2); - return true; - } - return false; - } - function skipBytes(count) { - position += count; - } - function alignToByte() { - bufferSize = 0; - if (skipNextBit) { - position++; - skipNextBit = false; - } - } - function readCodingpasses() { - if (readBits(1) === 0) { - return 1; - } - if (readBits(1) === 0) { - return 2; - } - var value = readBits(2); - if (value < 3) { - return value + 3; - } - value = readBits(5); - if (value < 31) { - return value + 6; - } - value = readBits(7); - return value + 37; - } - var tileIndex = context.currentTile.index; - var tile = context.tiles[tileIndex]; - var sopMarkerUsed = context.COD.sopMarkerUsed; - var ephMarkerUsed = context.COD.ephMarkerUsed; - var packetsIterator = tile.packetsIterator; - while (position < dataLength) { - alignToByte(); - if (sopMarkerUsed && skipMarkerIfEqual(0x91)) { - skipBytes(4); - } - var packet = packetsIterator.nextPacket(); - if (!readBits(1)) { - continue; - } - var layerNumber = packet.layerNumber; - var queue = [], - codeblock; - for (var i = 0, ii = packet.codeblocks.length; i < ii; i++) { - codeblock = packet.codeblocks[i]; - var precinct = codeblock.precinct; - var codeblockColumn = codeblock.cbx - precinct.cbxMin; - var codeblockRow = codeblock.cby - precinct.cbyMin; - var codeblockIncluded = false; - var firstTimeInclusion = false; - var valueReady; - if (codeblock['included'] !== undefined) { - codeblockIncluded = !!readBits(1); - } else { - precinct = codeblock.precinct; - var inclusionTree, zeroBitPlanesTree; - if (precinct['inclusionTree'] !== undefined) { - inclusionTree = precinct.inclusionTree; - } else { - var width = precinct.cbxMax - precinct.cbxMin + 1; - var height = precinct.cbyMax - precinct.cbyMin + 1; - inclusionTree = new InclusionTree(width, height, layerNumber); - zeroBitPlanesTree = new TagTree(width, height); - precinct.inclusionTree = inclusionTree; - precinct.zeroBitPlanesTree = zeroBitPlanesTree; - } - if (inclusionTree.reset(codeblockColumn, codeblockRow, layerNumber)) { - while (true) { - if (readBits(1)) { - valueReady = !inclusionTree.nextLevel(); - if (valueReady) { - codeblock.included = true; - codeblockIncluded = firstTimeInclusion = true; - break; - } - } else { - inclusionTree.incrementValue(layerNumber); - break; - } - } - } - } - if (!codeblockIncluded) { - continue; - } - if (firstTimeInclusion) { - zeroBitPlanesTree = precinct.zeroBitPlanesTree; - zeroBitPlanesTree.reset(codeblockColumn, codeblockRow); - while (true) { - if (readBits(1)) { - valueReady = !zeroBitPlanesTree.nextLevel(); - if (valueReady) { - break; - } - } else { - zeroBitPlanesTree.incrementValue(); - } - } - codeblock.zeroBitPlanes = zeroBitPlanesTree.value; - } - var codingpasses = readCodingpasses(); - while (readBits(1)) { - codeblock.Lblock++; - } - var codingpassesLog2 = (0, _util.log2)(codingpasses); - var bits = (codingpasses < 1 << codingpassesLog2 ? codingpassesLog2 - 1 : codingpassesLog2) + codeblock.Lblock; - var codedDataLength = readBits(bits); - queue.push({ - codeblock: codeblock, - codingpasses: codingpasses, - dataLength: codedDataLength - }); - } - alignToByte(); - if (ephMarkerUsed) { - skipMarkerIfEqual(0x92); - } - while (queue.length > 0) { - var packetItem = queue.shift(); - codeblock = packetItem.codeblock; - if (codeblock['data'] === undefined) { - codeblock.data = []; - } - codeblock.data.push({ - data: data, - start: offset + position, - end: offset + position + packetItem.dataLength, - codingpasses: packetItem.codingpasses - }); - position += packetItem.dataLength; - } - } - return position; - } - function copyCoefficients(coefficients, levelWidth, levelHeight, subband, delta, mb, reversible, segmentationSymbolUsed) { - var x0 = subband.tbx0; - var y0 = subband.tby0; - var width = subband.tbx1 - subband.tbx0; - var codeblocks = subband.codeblocks; - var right = subband.type.charAt(0) === 'H' ? 1 : 0; - var bottom = subband.type.charAt(1) === 'H' ? levelWidth : 0; - for (var i = 0, ii = codeblocks.length; i < ii; ++i) { - var codeblock = codeblocks[i]; - var blockWidth = codeblock.tbx1_ - codeblock.tbx0_; - var blockHeight = codeblock.tby1_ - codeblock.tby0_; - if (blockWidth === 0 || blockHeight === 0) { - continue; - } - if (codeblock['data'] === undefined) { - continue; - } - var bitModel, currentCodingpassType; - bitModel = new BitModel(blockWidth, blockHeight, codeblock.subbandType, codeblock.zeroBitPlanes, mb); - currentCodingpassType = 2; - var data = codeblock.data, - totalLength = 0, - codingpasses = 0; - var j, jj, dataItem; - for (j = 0, jj = data.length; j < jj; j++) { - dataItem = data[j]; - totalLength += dataItem.end - dataItem.start; - codingpasses += dataItem.codingpasses; - } - var encodedData = new Uint8Array(totalLength); - var position = 0; - for (j = 0, jj = data.length; j < jj; j++) { - dataItem = data[j]; - var chunk = dataItem.data.subarray(dataItem.start, dataItem.end); - encodedData.set(chunk, position); - position += chunk.length; - } - var decoder = new _arithmetic_decoder.ArithmeticDecoder(encodedData, 0, totalLength); - bitModel.setDecoder(decoder); - for (j = 0; j < codingpasses; j++) { - switch (currentCodingpassType) { - case 0: - bitModel.runSignificancePropagationPass(); - break; - case 1: - bitModel.runMagnitudeRefinementPass(); - break; - case 2: - bitModel.runCleanupPass(); - if (segmentationSymbolUsed) { - bitModel.checkSegmentationSymbol(); - } - break; - } - currentCodingpassType = (currentCodingpassType + 1) % 3; - } - var offset = codeblock.tbx0_ - x0 + (codeblock.tby0_ - y0) * width; - var sign = bitModel.coefficentsSign; - var magnitude = bitModel.coefficentsMagnitude; - var bitsDecoded = bitModel.bitsDecoded; - var magnitudeCorrection = reversible ? 0 : 0.5; - var k, n, nb; - position = 0; - var interleave = subband.type !== 'LL'; - for (j = 0; j < blockHeight; j++) { - var row = offset / width | 0; - var levelOffset = 2 * row * (levelWidth - width) + right + bottom; - for (k = 0; k < blockWidth; k++) { - n = magnitude[position]; - if (n !== 0) { - n = (n + magnitudeCorrection) * delta; - if (sign[position] !== 0) { - n = -n; - } - nb = bitsDecoded[position]; - var pos = interleave ? levelOffset + (offset << 1) : offset; - if (reversible && nb >= mb) { - coefficients[pos] = n; - } else { - coefficients[pos] = n * (1 << mb - nb); - } - } - offset++; - position++; - } - offset += width - blockWidth; - } - } - } - function transformTile(context, tile, c) { - var component = tile.components[c]; - var codingStyleParameters = component.codingStyleParameters; - var quantizationParameters = component.quantizationParameters; - var decompositionLevelsCount = codingStyleParameters.decompositionLevelsCount; - var spqcds = quantizationParameters.SPqcds; - var scalarExpounded = quantizationParameters.scalarExpounded; - var guardBits = quantizationParameters.guardBits; - var segmentationSymbolUsed = codingStyleParameters.segmentationSymbolUsed; - var precision = context.components[c].precision; - var reversible = codingStyleParameters.reversibleTransformation; - var transform = reversible ? new ReversibleTransform() : new IrreversibleTransform(); - var subbandCoefficients = []; - var b = 0; - for (var i = 0; i <= decompositionLevelsCount; i++) { - var resolution = component.resolutions[i]; - var width = resolution.trx1 - resolution.trx0; - var height = resolution.try1 - resolution.try0; - var coefficients = new Float32Array(width * height); - for (var j = 0, jj = resolution.subbands.length; j < jj; j++) { - var mu, epsilon; - if (!scalarExpounded) { - mu = spqcds[0].mu; - epsilon = spqcds[0].epsilon + (i > 0 ? 1 - i : 0); - } else { - mu = spqcds[b].mu; - epsilon = spqcds[b].epsilon; - b++; - } - var subband = resolution.subbands[j]; - var gainLog2 = SubbandsGainLog2[subband.type]; - var delta = reversible ? 1 : Math.pow(2, precision + gainLog2 - epsilon) * (1 + mu / 2048); - var mb = guardBits + epsilon - 1; - copyCoefficients(coefficients, width, height, subband, delta, mb, reversible, segmentationSymbolUsed); - } - subbandCoefficients.push({ - width: width, - height: height, - items: coefficients - }); - } - var result = transform.calculate(subbandCoefficients, component.tcx0, component.tcy0); - return { - left: component.tcx0, - top: component.tcy0, - width: result.width, - height: result.height, - items: result.items - }; - } - function transformComponents(context) { - var siz = context.SIZ; - var components = context.components; - var componentsCount = siz.Csiz; - var resultImages = []; - for (var i = 0, ii = context.tiles.length; i < ii; i++) { - var tile = context.tiles[i]; - var transformedTiles = []; - var c; - for (c = 0; c < componentsCount; c++) { - transformedTiles[c] = transformTile(context, tile, c); - } - var tile0 = transformedTiles[0]; - var out = new Uint8ClampedArray(tile0.items.length * componentsCount); - var result = { - left: tile0.left, - top: tile0.top, - width: tile0.width, - height: tile0.height, - items: out - }; - var shift, offset; - var pos = 0, - j, - jj, - y0, - y1, - y2; - if (tile.codingStyleDefaultParameters.multipleComponentTransform) { - var fourComponents = componentsCount === 4; - var y0items = transformedTiles[0].items; - var y1items = transformedTiles[1].items; - var y2items = transformedTiles[2].items; - var y3items = fourComponents ? transformedTiles[3].items : null; - shift = components[0].precision - 8; - offset = (128 << shift) + 0.5; - var component0 = tile.components[0]; - var alpha01 = componentsCount - 3; - jj = y0items.length; - if (!component0.codingStyleParameters.reversibleTransformation) { - for (j = 0; j < jj; j++, pos += alpha01) { - y0 = y0items[j] + offset; - y1 = y1items[j]; - y2 = y2items[j]; - out[pos++] = y0 + 1.402 * y2 >> shift; - out[pos++] = y0 - 0.34413 * y1 - 0.71414 * y2 >> shift; - out[pos++] = y0 + 1.772 * y1 >> shift; - } - } else { - for (j = 0; j < jj; j++, pos += alpha01) { - y0 = y0items[j] + offset; - y1 = y1items[j]; - y2 = y2items[j]; - var g = y0 - (y2 + y1 >> 2); - out[pos++] = g + y2 >> shift; - out[pos++] = g >> shift; - out[pos++] = g + y1 >> shift; - } - } - if (fourComponents) { - for (j = 0, pos = 3; j < jj; j++, pos += 4) { - out[pos] = y3items[j] + offset >> shift; - } - } - } else { - for (c = 0; c < componentsCount; c++) { - var items = transformedTiles[c].items; - shift = components[c].precision - 8; - offset = (128 << shift) + 0.5; - for (pos = c, j = 0, jj = items.length; j < jj; j++) { - out[pos] = items[j] + offset >> shift; - pos += componentsCount; - } - } - } - resultImages.push(result); - } - return resultImages; - } - function initializeTile(context, tileIndex) { - var siz = context.SIZ; - var componentsCount = siz.Csiz; - var tile = context.tiles[tileIndex]; - for (var c = 0; c < componentsCount; c++) { - var component = tile.components[c]; - var qcdOrQcc = context.currentTile.QCC[c] !== undefined ? context.currentTile.QCC[c] : context.currentTile.QCD; - component.quantizationParameters = qcdOrQcc; - var codOrCoc = context.currentTile.COC[c] !== undefined ? context.currentTile.COC[c] : context.currentTile.COD; - component.codingStyleParameters = codOrCoc; - } - tile.codingStyleDefaultParameters = context.currentTile.COD; - } - var TagTree = function TagTreeClosure() { - function TagTree(width, height) { - var levelsLength = (0, _util.log2)(Math.max(width, height)) + 1; - this.levels = []; - for (var i = 0; i < levelsLength; i++) { - var level = { - width: width, - height: height, - items: [] - }; - this.levels.push(level); - width = Math.ceil(width / 2); - height = Math.ceil(height / 2); - } - } - TagTree.prototype = { - reset: function TagTree_reset(i, j) { - var currentLevel = 0, - value = 0, - level; - while (currentLevel < this.levels.length) { - level = this.levels[currentLevel]; - var index = i + j * level.width; - if (level.items[index] !== undefined) { - value = level.items[index]; - break; - } - level.index = index; - i >>= 1; - j >>= 1; - currentLevel++; - } - currentLevel--; - level = this.levels[currentLevel]; - level.items[level.index] = value; - this.currentLevel = currentLevel; - delete this.value; - }, - incrementValue: function TagTree_incrementValue() { - var level = this.levels[this.currentLevel]; - level.items[level.index]++; - }, - nextLevel: function TagTree_nextLevel() { - var currentLevel = this.currentLevel; - var level = this.levels[currentLevel]; - var value = level.items[level.index]; - currentLevel--; - if (currentLevel < 0) { - this.value = value; - return false; - } - this.currentLevel = currentLevel; - level = this.levels[currentLevel]; - level.items[level.index] = value; - return true; - } - }; - return TagTree; - }(); - var InclusionTree = function InclusionTreeClosure() { - function InclusionTree(width, height, defaultValue) { - var levelsLength = (0, _util.log2)(Math.max(width, height)) + 1; - this.levels = []; - for (var i = 0; i < levelsLength; i++) { - var items = new Uint8Array(width * height); - for (var j = 0, jj = items.length; j < jj; j++) { - items[j] = defaultValue; - } - var level = { - width: width, - height: height, - items: items - }; - this.levels.push(level); - width = Math.ceil(width / 2); - height = Math.ceil(height / 2); - } - } - InclusionTree.prototype = { - reset: function InclusionTree_reset(i, j, stopValue) { - var currentLevel = 0; - while (currentLevel < this.levels.length) { - var level = this.levels[currentLevel]; - var index = i + j * level.width; - level.index = index; - var value = level.items[index]; - if (value === 0xFF) { - break; - } - if (value > stopValue) { - this.currentLevel = currentLevel; - this.propagateValues(); - return false; - } - i >>= 1; - j >>= 1; - currentLevel++; - } - this.currentLevel = currentLevel - 1; - return true; - }, - incrementValue: function InclusionTree_incrementValue(stopValue) { - var level = this.levels[this.currentLevel]; - level.items[level.index] = stopValue + 1; - this.propagateValues(); - }, - propagateValues: function InclusionTree_propagateValues() { - var levelIndex = this.currentLevel; - var level = this.levels[levelIndex]; - var currentValue = level.items[level.index]; - while (--levelIndex >= 0) { - level = this.levels[levelIndex]; - level.items[level.index] = currentValue; - } - }, - nextLevel: function InclusionTree_nextLevel() { - var currentLevel = this.currentLevel; - var level = this.levels[currentLevel]; - var value = level.items[level.index]; - level.items[level.index] = 0xFF; - currentLevel--; - if (currentLevel < 0) { - return false; - } - this.currentLevel = currentLevel; - level = this.levels[currentLevel]; - level.items[level.index] = value; - return true; - } - }; - return InclusionTree; - }(); - var BitModel = function BitModelClosure() { - var UNIFORM_CONTEXT = 17; - var RUNLENGTH_CONTEXT = 18; - var LLAndLHContextsLabel = new Uint8Array([0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8]); - var HLContextLabel = new Uint8Array([0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8]); - var HHContextLabel = new Uint8Array([0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5, 5, 0, 5, 5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8, 0, 0, 0, 0, 0, 8, 8, 8, 0, 8, 8, 8, 0, 8, 8, 8]); - function BitModel(width, height, subband, zeroBitPlanes, mb) { - this.width = width; - this.height = height; - this.contextLabelTable = subband === 'HH' ? HHContextLabel : subband === 'HL' ? HLContextLabel : LLAndLHContextsLabel; - var coefficientCount = width * height; - this.neighborsSignificance = new Uint8Array(coefficientCount); - this.coefficentsSign = new Uint8Array(coefficientCount); - this.coefficentsMagnitude = mb > 14 ? new Uint32Array(coefficientCount) : mb > 6 ? new Uint16Array(coefficientCount) : new Uint8Array(coefficientCount); - this.processingFlags = new Uint8Array(coefficientCount); - var bitsDecoded = new Uint8Array(coefficientCount); - if (zeroBitPlanes !== 0) { - for (var i = 0; i < coefficientCount; i++) { - bitsDecoded[i] = zeroBitPlanes; - } - } - this.bitsDecoded = bitsDecoded; - this.reset(); - } - BitModel.prototype = { - setDecoder: function BitModel_setDecoder(decoder) { - this.decoder = decoder; - }, - reset: function BitModel_reset() { - this.contexts = new Int8Array(19); - this.contexts[0] = 4 << 1 | 0; - this.contexts[UNIFORM_CONTEXT] = 46 << 1 | 0; - this.contexts[RUNLENGTH_CONTEXT] = 3 << 1 | 0; - }, - setNeighborsSignificance: function BitModel_setNeighborsSignificance(row, column, index) { - var neighborsSignificance = this.neighborsSignificance; - var width = this.width, - height = this.height; - var left = column > 0; - var right = column + 1 < width; - var i; - if (row > 0) { - i = index - width; - if (left) { - neighborsSignificance[i - 1] += 0x10; - } - if (right) { - neighborsSignificance[i + 1] += 0x10; - } - neighborsSignificance[i] += 0x04; - } - if (row + 1 < height) { - i = index + width; - if (left) { - neighborsSignificance[i - 1] += 0x10; - } - if (right) { - neighborsSignificance[i + 1] += 0x10; - } - neighborsSignificance[i] += 0x04; - } - if (left) { - neighborsSignificance[index - 1] += 0x01; - } - if (right) { - neighborsSignificance[index + 1] += 0x01; - } - neighborsSignificance[index] |= 0x80; - }, - runSignificancePropagationPass: function BitModel_runSignificancePropagationPass() { - var decoder = this.decoder; - var width = this.width, - height = this.height; - var coefficentsMagnitude = this.coefficentsMagnitude; - var coefficentsSign = this.coefficentsSign; - var neighborsSignificance = this.neighborsSignificance; - var processingFlags = this.processingFlags; - var contexts = this.contexts; - var labels = this.contextLabelTable; - var bitsDecoded = this.bitsDecoded; - var processedInverseMask = ~1; - var processedMask = 1; - var firstMagnitudeBitMask = 2; - for (var i0 = 0; i0 < height; i0 += 4) { - for (var j = 0; j < width; j++) { - var index = i0 * width + j; - for (var i1 = 0; i1 < 4; i1++, index += width) { - var i = i0 + i1; - if (i >= height) { - break; - } - processingFlags[index] &= processedInverseMask; - if (coefficentsMagnitude[index] || !neighborsSignificance[index]) { - continue; - } - var contextLabel = labels[neighborsSignificance[index]]; - var decision = decoder.readBit(contexts, contextLabel); - if (decision) { - var sign = this.decodeSignBit(i, j, index); - coefficentsSign[index] = sign; - coefficentsMagnitude[index] = 1; - this.setNeighborsSignificance(i, j, index); - processingFlags[index] |= firstMagnitudeBitMask; - } - bitsDecoded[index]++; - processingFlags[index] |= processedMask; - } - } - } - }, - decodeSignBit: function BitModel_decodeSignBit(row, column, index) { - var width = this.width, - height = this.height; - var coefficentsMagnitude = this.coefficentsMagnitude; - var coefficentsSign = this.coefficentsSign; - var contribution, sign0, sign1, significance1; - var contextLabel, decoded; - significance1 = column > 0 && coefficentsMagnitude[index - 1] !== 0; - if (column + 1 < width && coefficentsMagnitude[index + 1] !== 0) { - sign1 = coefficentsSign[index + 1]; - if (significance1) { - sign0 = coefficentsSign[index - 1]; - contribution = 1 - sign1 - sign0; - } else { - contribution = 1 - sign1 - sign1; - } - } else if (significance1) { - sign0 = coefficentsSign[index - 1]; - contribution = 1 - sign0 - sign0; - } else { - contribution = 0; - } - var horizontalContribution = 3 * contribution; - significance1 = row > 0 && coefficentsMagnitude[index - width] !== 0; - if (row + 1 < height && coefficentsMagnitude[index + width] !== 0) { - sign1 = coefficentsSign[index + width]; - if (significance1) { - sign0 = coefficentsSign[index - width]; - contribution = 1 - sign1 - sign0 + horizontalContribution; - } else { - contribution = 1 - sign1 - sign1 + horizontalContribution; - } - } else if (significance1) { - sign0 = coefficentsSign[index - width]; - contribution = 1 - sign0 - sign0 + horizontalContribution; - } else { - contribution = horizontalContribution; - } - if (contribution >= 0) { - contextLabel = 9 + contribution; - decoded = this.decoder.readBit(this.contexts, contextLabel); - } else { - contextLabel = 9 - contribution; - decoded = this.decoder.readBit(this.contexts, contextLabel) ^ 1; - } - return decoded; - }, - runMagnitudeRefinementPass: function BitModel_runMagnitudeRefinementPass() { - var decoder = this.decoder; - var width = this.width, - height = this.height; - var coefficentsMagnitude = this.coefficentsMagnitude; - var neighborsSignificance = this.neighborsSignificance; - var contexts = this.contexts; - var bitsDecoded = this.bitsDecoded; - var processingFlags = this.processingFlags; - var processedMask = 1; - var firstMagnitudeBitMask = 2; - var length = width * height; - var width4 = width * 4; - for (var index0 = 0, indexNext; index0 < length; index0 = indexNext) { - indexNext = Math.min(length, index0 + width4); - for (var j = 0; j < width; j++) { - for (var index = index0 + j; index < indexNext; index += width) { - if (!coefficentsMagnitude[index] || (processingFlags[index] & processedMask) !== 0) { - continue; - } - var contextLabel = 16; - if ((processingFlags[index] & firstMagnitudeBitMask) !== 0) { - processingFlags[index] ^= firstMagnitudeBitMask; - var significance = neighborsSignificance[index] & 127; - contextLabel = significance === 0 ? 15 : 14; - } - var bit = decoder.readBit(contexts, contextLabel); - coefficentsMagnitude[index] = coefficentsMagnitude[index] << 1 | bit; - bitsDecoded[index]++; - processingFlags[index] |= processedMask; - } - } - } - }, - runCleanupPass: function BitModel_runCleanupPass() { - var decoder = this.decoder; - var width = this.width, - height = this.height; - var neighborsSignificance = this.neighborsSignificance; - var coefficentsMagnitude = this.coefficentsMagnitude; - var coefficentsSign = this.coefficentsSign; - var contexts = this.contexts; - var labels = this.contextLabelTable; - var bitsDecoded = this.bitsDecoded; - var processingFlags = this.processingFlags; - var processedMask = 1; - var firstMagnitudeBitMask = 2; - var oneRowDown = width; - var twoRowsDown = width * 2; - var threeRowsDown = width * 3; - var iNext; - for (var i0 = 0; i0 < height; i0 = iNext) { - iNext = Math.min(i0 + 4, height); - var indexBase = i0 * width; - var checkAllEmpty = i0 + 3 < height; - for (var j = 0; j < width; j++) { - var index0 = indexBase + j; - var allEmpty = checkAllEmpty && processingFlags[index0] === 0 && processingFlags[index0 + oneRowDown] === 0 && processingFlags[index0 + twoRowsDown] === 0 && processingFlags[index0 + threeRowsDown] === 0 && neighborsSignificance[index0] === 0 && neighborsSignificance[index0 + oneRowDown] === 0 && neighborsSignificance[index0 + twoRowsDown] === 0 && neighborsSignificance[index0 + threeRowsDown] === 0; - var i1 = 0, - index = index0; - var i = i0, - sign; - if (allEmpty) { - var hasSignificantCoefficent = decoder.readBit(contexts, RUNLENGTH_CONTEXT); - if (!hasSignificantCoefficent) { - bitsDecoded[index0]++; - bitsDecoded[index0 + oneRowDown]++; - bitsDecoded[index0 + twoRowsDown]++; - bitsDecoded[index0 + threeRowsDown]++; - continue; - } - i1 = decoder.readBit(contexts, UNIFORM_CONTEXT) << 1 | decoder.readBit(contexts, UNIFORM_CONTEXT); - if (i1 !== 0) { - i = i0 + i1; - index += i1 * width; - } - sign = this.decodeSignBit(i, j, index); - coefficentsSign[index] = sign; - coefficentsMagnitude[index] = 1; - this.setNeighborsSignificance(i, j, index); - processingFlags[index] |= firstMagnitudeBitMask; - index = index0; - for (var i2 = i0; i2 <= i; i2++, index += width) { - bitsDecoded[index]++; - } - i1++; - } - for (i = i0 + i1; i < iNext; i++, index += width) { - if (coefficentsMagnitude[index] || (processingFlags[index] & processedMask) !== 0) { - continue; - } - var contextLabel = labels[neighborsSignificance[index]]; - var decision = decoder.readBit(contexts, contextLabel); - if (decision === 1) { - sign = this.decodeSignBit(i, j, index); - coefficentsSign[index] = sign; - coefficentsMagnitude[index] = 1; - this.setNeighborsSignificance(i, j, index); - processingFlags[index] |= firstMagnitudeBitMask; - } - bitsDecoded[index]++; - } - } - } - }, - checkSegmentationSymbol: function BitModel_checkSegmentationSymbol() { - var decoder = this.decoder; - var contexts = this.contexts; - var symbol = decoder.readBit(contexts, UNIFORM_CONTEXT) << 3 | decoder.readBit(contexts, UNIFORM_CONTEXT) << 2 | decoder.readBit(contexts, UNIFORM_CONTEXT) << 1 | decoder.readBit(contexts, UNIFORM_CONTEXT); - if (symbol !== 0xA) { - throw new JpxError('Invalid segmentation symbol'); - } - } - }; - return BitModel; - }(); - var Transform = function TransformClosure() { - function Transform() {} - Transform.prototype.calculate = function transformCalculate(subbands, u0, v0) { - var ll = subbands[0]; - for (var i = 1, ii = subbands.length; i < ii; i++) { - ll = this.iterate(ll, subbands[i], u0, v0); - } - return ll; - }; - Transform.prototype.extend = function extend(buffer, offset, size) { - var i1 = offset - 1, - j1 = offset + 1; - var i2 = offset + size - 2, - j2 = offset + size; - buffer[i1--] = buffer[j1++]; - buffer[j2++] = buffer[i2--]; - buffer[i1--] = buffer[j1++]; - buffer[j2++] = buffer[i2--]; - buffer[i1--] = buffer[j1++]; - buffer[j2++] = buffer[i2--]; - buffer[i1] = buffer[j1]; - buffer[j2] = buffer[i2]; - }; - Transform.prototype.iterate = function Transform_iterate(ll, hl_lh_hh, u0, v0) { - var llWidth = ll.width, - llHeight = ll.height, - llItems = ll.items; - var width = hl_lh_hh.width; - var height = hl_lh_hh.height; - var items = hl_lh_hh.items; - var i, j, k, l, u, v; - for (k = 0, i = 0; i < llHeight; i++) { - l = i * 2 * width; - for (j = 0; j < llWidth; j++, k++, l += 2) { - items[l] = llItems[k]; - } - } - llItems = ll.items = null; - var bufferPadding = 4; - var rowBuffer = new Float32Array(width + 2 * bufferPadding); - if (width === 1) { - if ((u0 & 1) !== 0) { - for (v = 0, k = 0; v < height; v++, k += width) { - items[k] *= 0.5; - } - } - } else { - for (v = 0, k = 0; v < height; v++, k += width) { - rowBuffer.set(items.subarray(k, k + width), bufferPadding); - this.extend(rowBuffer, bufferPadding, width); - this.filter(rowBuffer, bufferPadding, width); - items.set(rowBuffer.subarray(bufferPadding, bufferPadding + width), k); - } - } - var numBuffers = 16; - var colBuffers = []; - for (i = 0; i < numBuffers; i++) { - colBuffers.push(new Float32Array(height + 2 * bufferPadding)); - } - var b, - currentBuffer = 0; - ll = bufferPadding + height; - if (height === 1) { - if ((v0 & 1) !== 0) { - for (u = 0; u < width; u++) { - items[u] *= 0.5; - } - } - } else { - for (u = 0; u < width; u++) { - if (currentBuffer === 0) { - numBuffers = Math.min(width - u, numBuffers); - for (k = u, l = bufferPadding; l < ll; k += width, l++) { - for (b = 0; b < numBuffers; b++) { - colBuffers[b][l] = items[k + b]; - } - } - currentBuffer = numBuffers; - } - currentBuffer--; - var buffer = colBuffers[currentBuffer]; - this.extend(buffer, bufferPadding, height); - this.filter(buffer, bufferPadding, height); - if (currentBuffer === 0) { - k = u - numBuffers + 1; - for (l = bufferPadding; l < ll; k += width, l++) { - for (b = 0; b < numBuffers; b++) { - items[k + b] = colBuffers[b][l]; - } - } - } - } - } - return { - width: width, - height: height, - items: items - }; - }; - return Transform; - }(); - var IrreversibleTransform = function IrreversibleTransformClosure() { - function IrreversibleTransform() { - Transform.call(this); - } - IrreversibleTransform.prototype = Object.create(Transform.prototype); - IrreversibleTransform.prototype.filter = function irreversibleTransformFilter(x, offset, length) { - var len = length >> 1; - offset = offset | 0; - var j, n, current, next; - var alpha = -1.586134342059924; - var beta = -0.052980118572961; - var gamma = 0.882911075530934; - var delta = 0.443506852043971; - var K = 1.230174104914001; - var K_ = 1 / K; - j = offset - 3; - for (n = len + 4; n--; j += 2) { - x[j] *= K_; - } - j = offset - 2; - current = delta * x[j - 1]; - for (n = len + 3; n--; j += 2) { - next = delta * x[j + 1]; - x[j] = K * x[j] - current - next; - if (n--) { - j += 2; - current = delta * x[j + 1]; - x[j] = K * x[j] - current - next; - } else { - break; - } - } - j = offset - 1; - current = gamma * x[j - 1]; - for (n = len + 2; n--; j += 2) { - next = gamma * x[j + 1]; - x[j] -= current + next; - if (n--) { - j += 2; - current = gamma * x[j + 1]; - x[j] -= current + next; - } else { - break; - } - } - j = offset; - current = beta * x[j - 1]; - for (n = len + 1; n--; j += 2) { - next = beta * x[j + 1]; - x[j] -= current + next; - if (n--) { - j += 2; - current = beta * x[j + 1]; - x[j] -= current + next; - } else { - break; - } - } - if (len !== 0) { - j = offset + 1; - current = alpha * x[j - 1]; - for (n = len; n--; j += 2) { - next = alpha * x[j + 1]; - x[j] -= current + next; - if (n--) { - j += 2; - current = alpha * x[j + 1]; - x[j] -= current + next; - } else { - break; - } - } - } - }; - return IrreversibleTransform; - }(); - var ReversibleTransform = function ReversibleTransformClosure() { - function ReversibleTransform() { - Transform.call(this); - } - ReversibleTransform.prototype = Object.create(Transform.prototype); - ReversibleTransform.prototype.filter = function reversibleTransformFilter(x, offset, length) { - var len = length >> 1; - offset = offset | 0; - var j, n; - for (j = offset, n = len + 1; n--; j += 2) { - x[j] -= x[j - 1] + x[j + 1] + 2 >> 2; - } - for (j = offset + 1, n = len; n--; j += 2) { - x[j] += x[j - 1] + x[j + 1] >> 1; - } - }; - return ReversibleTransform; - }(); - return JpxImage; -}(); -exports.JpxImage = JpxImage; - -/***/ }), -/* 150 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.calculateSHA512 = exports.calculateSHA384 = exports.calculateSHA256 = exports.calculateMD5 = exports.PDF20 = exports.PDF17 = exports.CipherTransformFactory = exports.ARCFourCipher = exports.AES256Cipher = exports.AES128Cipher = undefined; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -var _stream = __w_pdfjs_require__(140); - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var ARCFourCipher = function ARCFourCipherClosure() { - function ARCFourCipher(key) { - this.a = 0; - this.b = 0; - var s = new Uint8Array(256); - var i, - j = 0, - tmp, - keyLength = key.length; - for (i = 0; i < 256; ++i) { - s[i] = i; - } - for (i = 0; i < 256; ++i) { - tmp = s[i]; - j = j + tmp + key[i % keyLength] & 0xFF; - s[i] = s[j]; - s[j] = tmp; - } - this.s = s; - } - ARCFourCipher.prototype = { - encryptBlock: function ARCFourCipher_encryptBlock(data) { - var i, - n = data.length, - tmp, - tmp2; - var a = this.a, - b = this.b, - s = this.s; - var output = new Uint8Array(n); - for (i = 0; i < n; ++i) { - a = a + 1 & 0xFF; - tmp = s[a]; - b = b + tmp & 0xFF; - tmp2 = s[b]; - s[a] = tmp2; - s[b] = tmp; - output[i] = data[i] ^ s[tmp + tmp2 & 0xFF]; - } - this.a = a; - this.b = b; - return output; - } - }; - ARCFourCipher.prototype.decryptBlock = ARCFourCipher.prototype.encryptBlock; - return ARCFourCipher; -}(); -var calculateMD5 = function calculateMD5Closure() { - var r = new Uint8Array([7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]); - var k = new Int32Array([-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426, -1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162, 1804603682, -40341101, -1502002290, 1236535329, -165796510, -1069501632, 643717713, -373897302, -701558691, 38016083, -660478335, -405537848, 568446438, -1019803690, -187363961, 1163531501, -1444681467, -51403784, 1735328473, -1926607734, -378558, -2022574463, 1839030562, -35309556, -1530992060, 1272893353, -155497632, -1094730640, 681279174, -358537222, -722521979, 76029189, -640364487, -421815835, 530742520, -995338651, -198630844, 1126891415, -1416354905, -57434055, 1700485571, -1894986606, -1051523, -2054922799, 1873313359, -30611744, -1560198380, 1309151649, -145523070, -1120210379, 718787259, -343485551]); - function hash(data, offset, length) { - var h0 = 1732584193, - h1 = -271733879, - h2 = -1732584194, - h3 = 271733878; - var paddedLength = length + 72 & ~63; - var padded = new Uint8Array(paddedLength); - var i, j, n; - for (i = 0; i < length; ++i) { - padded[i] = data[offset++]; - } - padded[i++] = 0x80; - n = paddedLength - 8; - while (i < n) { - padded[i++] = 0; - } - padded[i++] = length << 3 & 0xFF; - padded[i++] = length >> 5 & 0xFF; - padded[i++] = length >> 13 & 0xFF; - padded[i++] = length >> 21 & 0xFF; - padded[i++] = length >>> 29 & 0xFF; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - var w = new Int32Array(16); - for (i = 0; i < paddedLength;) { - for (j = 0; j < 16; ++j, i += 4) { - w[j] = padded[i] | padded[i + 1] << 8 | padded[i + 2] << 16 | padded[i + 3] << 24; - } - var a = h0, - b = h1, - c = h2, - d = h3, - f, - g; - for (j = 0; j < 64; ++j) { - if (j < 16) { - f = b & c | ~b & d; - g = j; - } else if (j < 32) { - f = d & b | ~d & c; - g = 5 * j + 1 & 15; - } else if (j < 48) { - f = b ^ c ^ d; - g = 3 * j + 5 & 15; - } else { - f = c ^ (b | ~d); - g = 7 * j & 15; - } - var tmp = d, - rotateArg = a + f + k[j] + w[g] | 0, - rotate = r[j]; - d = c; - c = b; - b = b + (rotateArg << rotate | rotateArg >>> 32 - rotate) | 0; - a = tmp; - } - h0 = h0 + a | 0; - h1 = h1 + b | 0; - h2 = h2 + c | 0; - h3 = h3 + d | 0; - } - return new Uint8Array([h0 & 0xFF, h0 >> 8 & 0xFF, h0 >> 16 & 0xFF, h0 >>> 24 & 0xFF, h1 & 0xFF, h1 >> 8 & 0xFF, h1 >> 16 & 0xFF, h1 >>> 24 & 0xFF, h2 & 0xFF, h2 >> 8 & 0xFF, h2 >> 16 & 0xFF, h2 >>> 24 & 0xFF, h3 & 0xFF, h3 >> 8 & 0xFF, h3 >> 16 & 0xFF, h3 >>> 24 & 0xFF]); - } - return hash; -}(); -var Word64 = function Word64Closure() { - function Word64(highInteger, lowInteger) { - this.high = highInteger | 0; - this.low = lowInteger | 0; - } - Word64.prototype = { - and: function Word64_and(word) { - this.high &= word.high; - this.low &= word.low; - }, - xor: function Word64_xor(word) { - this.high ^= word.high; - this.low ^= word.low; - }, - or: function Word64_or(word) { - this.high |= word.high; - this.low |= word.low; - }, - shiftRight: function Word64_shiftRight(places) { - if (places >= 32) { - this.low = this.high >>> places - 32 | 0; - this.high = 0; - } else { - this.low = this.low >>> places | this.high << 32 - places; - this.high = this.high >>> places | 0; - } - }, - shiftLeft: function Word64_shiftLeft(places) { - if (places >= 32) { - this.high = this.low << places - 32; - this.low = 0; - } else { - this.high = this.high << places | this.low >>> 32 - places; - this.low = this.low << places; - } - }, - rotateRight: function Word64_rotateRight(places) { - var low, high; - if (places & 32) { - high = this.low; - low = this.high; - } else { - low = this.low; - high = this.high; - } - places &= 31; - this.low = low >>> places | high << 32 - places; - this.high = high >>> places | low << 32 - places; - }, - not: function Word64_not() { - this.high = ~this.high; - this.low = ~this.low; - }, - add: function Word64_add(word) { - var lowAdd = (this.low >>> 0) + (word.low >>> 0); - var highAdd = (this.high >>> 0) + (word.high >>> 0); - if (lowAdd > 0xFFFFFFFF) { - highAdd += 1; - } - this.low = lowAdd | 0; - this.high = highAdd | 0; - }, - copyTo: function Word64_copyTo(bytes, offset) { - bytes[offset] = this.high >>> 24 & 0xFF; - bytes[offset + 1] = this.high >> 16 & 0xFF; - bytes[offset + 2] = this.high >> 8 & 0xFF; - bytes[offset + 3] = this.high & 0xFF; - bytes[offset + 4] = this.low >>> 24 & 0xFF; - bytes[offset + 5] = this.low >> 16 & 0xFF; - bytes[offset + 6] = this.low >> 8 & 0xFF; - bytes[offset + 7] = this.low & 0xFF; - }, - assign: function Word64_assign(word) { - this.high = word.high; - this.low = word.low; - } - }; - return Word64; -}(); -var calculateSHA256 = function calculateSHA256Closure() { - function rotr(x, n) { - return x >>> n | x << 32 - n; - } - function ch(x, y, z) { - return x & y ^ ~x & z; - } - function maj(x, y, z) { - return x & y ^ x & z ^ y & z; - } - function sigma(x) { - return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); - } - function sigmaPrime(x) { - return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); - } - function littleSigma(x) { - return rotr(x, 7) ^ rotr(x, 18) ^ x >>> 3; - } - function littleSigmaPrime(x) { - return rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10; - } - var k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2]; - function hash(data, offset, length) { - var h0 = 0x6a09e667, - h1 = 0xbb67ae85, - h2 = 0x3c6ef372, - h3 = 0xa54ff53a, - h4 = 0x510e527f, - h5 = 0x9b05688c, - h6 = 0x1f83d9ab, - h7 = 0x5be0cd19; - var paddedLength = Math.ceil((length + 9) / 64) * 64; - var padded = new Uint8Array(paddedLength); - var i, j, n; - for (i = 0; i < length; ++i) { - padded[i] = data[offset++]; - } - padded[i++] = 0x80; - n = paddedLength - 8; - while (i < n) { - padded[i++] = 0; - } - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = length >>> 29 & 0xFF; - padded[i++] = length >> 21 & 0xFF; - padded[i++] = length >> 13 & 0xFF; - padded[i++] = length >> 5 & 0xFF; - padded[i++] = length << 3 & 0xFF; - var w = new Uint32Array(64); - for (i = 0; i < paddedLength;) { - for (j = 0; j < 16; ++j) { - w[j] = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; - i += 4; - } - for (j = 16; j < 64; ++j) { - w[j] = littleSigmaPrime(w[j - 2]) + w[j - 7] + littleSigma(w[j - 15]) + w[j - 16] | 0; - } - var a = h0, - b = h1, - c = h2, - d = h3, - e = h4, - f = h5, - g = h6, - h = h7, - t1, - t2; - for (j = 0; j < 64; ++j) { - t1 = h + sigmaPrime(e) + ch(e, f, g) + k[j] + w[j]; - t2 = sigma(a) + maj(a, b, c); - h = g; - g = f; - f = e; - e = d + t1 | 0; - d = c; - c = b; - b = a; - a = t1 + t2 | 0; - } - h0 = h0 + a | 0; - h1 = h1 + b | 0; - h2 = h2 + c | 0; - h3 = h3 + d | 0; - h4 = h4 + e | 0; - h5 = h5 + f | 0; - h6 = h6 + g | 0; - h7 = h7 + h | 0; - } - return new Uint8Array([h0 >> 24 & 0xFF, h0 >> 16 & 0xFF, h0 >> 8 & 0xFF, h0 & 0xFF, h1 >> 24 & 0xFF, h1 >> 16 & 0xFF, h1 >> 8 & 0xFF, h1 & 0xFF, h2 >> 24 & 0xFF, h2 >> 16 & 0xFF, h2 >> 8 & 0xFF, h2 & 0xFF, h3 >> 24 & 0xFF, h3 >> 16 & 0xFF, h3 >> 8 & 0xFF, h3 & 0xFF, h4 >> 24 & 0xFF, h4 >> 16 & 0xFF, h4 >> 8 & 0xFF, h4 & 0xFF, h5 >> 24 & 0xFF, h5 >> 16 & 0xFF, h5 >> 8 & 0xFF, h5 & 0xFF, h6 >> 24 & 0xFF, h6 >> 16 & 0xFF, h6 >> 8 & 0xFF, h6 & 0xFF, h7 >> 24 & 0xFF, h7 >> 16 & 0xFF, h7 >> 8 & 0xFF, h7 & 0xFF]); - } - return hash; -}(); -var calculateSHA512 = function calculateSHA512Closure() { - function ch(result, x, y, z, tmp) { - result.assign(x); - result.and(y); - tmp.assign(x); - tmp.not(); - tmp.and(z); - result.xor(tmp); - } - function maj(result, x, y, z, tmp) { - result.assign(x); - result.and(y); - tmp.assign(x); - tmp.and(z); - result.xor(tmp); - tmp.assign(y); - tmp.and(z); - result.xor(tmp); - } - function sigma(result, x, tmp) { - result.assign(x); - result.rotateRight(28); - tmp.assign(x); - tmp.rotateRight(34); - result.xor(tmp); - tmp.assign(x); - tmp.rotateRight(39); - result.xor(tmp); - } - function sigmaPrime(result, x, tmp) { - result.assign(x); - result.rotateRight(14); - tmp.assign(x); - tmp.rotateRight(18); - result.xor(tmp); - tmp.assign(x); - tmp.rotateRight(41); - result.xor(tmp); - } - function littleSigma(result, x, tmp) { - result.assign(x); - result.rotateRight(1); - tmp.assign(x); - tmp.rotateRight(8); - result.xor(tmp); - tmp.assign(x); - tmp.shiftRight(7); - result.xor(tmp); - } - function littleSigmaPrime(result, x, tmp) { - result.assign(x); - result.rotateRight(19); - tmp.assign(x); - tmp.rotateRight(61); - result.xor(tmp); - tmp.assign(x); - tmp.shiftRight(6); - result.xor(tmp); - } - var k = [new Word64(0x428a2f98, 0xd728ae22), new Word64(0x71374491, 0x23ef65cd), new Word64(0xb5c0fbcf, 0xec4d3b2f), new Word64(0xe9b5dba5, 0x8189dbbc), new Word64(0x3956c25b, 0xf348b538), new Word64(0x59f111f1, 0xb605d019), new Word64(0x923f82a4, 0xaf194f9b), new Word64(0xab1c5ed5, 0xda6d8118), new Word64(0xd807aa98, 0xa3030242), new Word64(0x12835b01, 0x45706fbe), new Word64(0x243185be, 0x4ee4b28c), new Word64(0x550c7dc3, 0xd5ffb4e2), new Word64(0x72be5d74, 0xf27b896f), new Word64(0x80deb1fe, 0x3b1696b1), new Word64(0x9bdc06a7, 0x25c71235), new Word64(0xc19bf174, 0xcf692694), new Word64(0xe49b69c1, 0x9ef14ad2), new Word64(0xefbe4786, 0x384f25e3), new Word64(0x0fc19dc6, 0x8b8cd5b5), new Word64(0x240ca1cc, 0x77ac9c65), new Word64(0x2de92c6f, 0x592b0275), new Word64(0x4a7484aa, 0x6ea6e483), new Word64(0x5cb0a9dc, 0xbd41fbd4), new Word64(0x76f988da, 0x831153b5), new Word64(0x983e5152, 0xee66dfab), new Word64(0xa831c66d, 0x2db43210), new Word64(0xb00327c8, 0x98fb213f), new Word64(0xbf597fc7, 0xbeef0ee4), new Word64(0xc6e00bf3, 0x3da88fc2), new Word64(0xd5a79147, 0x930aa725), new Word64(0x06ca6351, 0xe003826f), new Word64(0x14292967, 0x0a0e6e70), new Word64(0x27b70a85, 0x46d22ffc), new Word64(0x2e1b2138, 0x5c26c926), new Word64(0x4d2c6dfc, 0x5ac42aed), new Word64(0x53380d13, 0x9d95b3df), new Word64(0x650a7354, 0x8baf63de), new Word64(0x766a0abb, 0x3c77b2a8), new Word64(0x81c2c92e, 0x47edaee6), new Word64(0x92722c85, 0x1482353b), new Word64(0xa2bfe8a1, 0x4cf10364), new Word64(0xa81a664b, 0xbc423001), new Word64(0xc24b8b70, 0xd0f89791), new Word64(0xc76c51a3, 0x0654be30), new Word64(0xd192e819, 0xd6ef5218), new Word64(0xd6990624, 0x5565a910), new Word64(0xf40e3585, 0x5771202a), new Word64(0x106aa070, 0x32bbd1b8), new Word64(0x19a4c116, 0xb8d2d0c8), new Word64(0x1e376c08, 0x5141ab53), new Word64(0x2748774c, 0xdf8eeb99), new Word64(0x34b0bcb5, 0xe19b48a8), new Word64(0x391c0cb3, 0xc5c95a63), new Word64(0x4ed8aa4a, 0xe3418acb), new Word64(0x5b9cca4f, 0x7763e373), new Word64(0x682e6ff3, 0xd6b2b8a3), new Word64(0x748f82ee, 0x5defb2fc), new Word64(0x78a5636f, 0x43172f60), new Word64(0x84c87814, 0xa1f0ab72), new Word64(0x8cc70208, 0x1a6439ec), new Word64(0x90befffa, 0x23631e28), new Word64(0xa4506ceb, 0xde82bde9), new Word64(0xbef9a3f7, 0xb2c67915), new Word64(0xc67178f2, 0xe372532b), new Word64(0xca273ece, 0xea26619c), new Word64(0xd186b8c7, 0x21c0c207), new Word64(0xeada7dd6, 0xcde0eb1e), new Word64(0xf57d4f7f, 0xee6ed178), new Word64(0x06f067aa, 0x72176fba), new Word64(0x0a637dc5, 0xa2c898a6), new Word64(0x113f9804, 0xbef90dae), new Word64(0x1b710b35, 0x131c471b), new Word64(0x28db77f5, 0x23047d84), new Word64(0x32caab7b, 0x40c72493), new Word64(0x3c9ebe0a, 0x15c9bebc), new Word64(0x431d67c4, 0x9c100d4c), new Word64(0x4cc5d4be, 0xcb3e42b6), new Word64(0x597f299c, 0xfc657e2a), new Word64(0x5fcb6fab, 0x3ad6faec), new Word64(0x6c44198c, 0x4a475817)]; - function hash(data, offset, length, mode384) { - mode384 = !!mode384; - var h0, h1, h2, h3, h4, h5, h6, h7; - if (!mode384) { - h0 = new Word64(0x6a09e667, 0xf3bcc908); - h1 = new Word64(0xbb67ae85, 0x84caa73b); - h2 = new Word64(0x3c6ef372, 0xfe94f82b); - h3 = new Word64(0xa54ff53a, 0x5f1d36f1); - h4 = new Word64(0x510e527f, 0xade682d1); - h5 = new Word64(0x9b05688c, 0x2b3e6c1f); - h6 = new Word64(0x1f83d9ab, 0xfb41bd6b); - h7 = new Word64(0x5be0cd19, 0x137e2179); - } else { - h0 = new Word64(0xcbbb9d5d, 0xc1059ed8); - h1 = new Word64(0x629a292a, 0x367cd507); - h2 = new Word64(0x9159015a, 0x3070dd17); - h3 = new Word64(0x152fecd8, 0xf70e5939); - h4 = new Word64(0x67332667, 0xffc00b31); - h5 = new Word64(0x8eb44a87, 0x68581511); - h6 = new Word64(0xdb0c2e0d, 0x64f98fa7); - h7 = new Word64(0x47b5481d, 0xbefa4fa4); - } - var paddedLength = Math.ceil((length + 17) / 128) * 128; - var padded = new Uint8Array(paddedLength); - var i, j, n; - for (i = 0; i < length; ++i) { - padded[i] = data[offset++]; - } - padded[i++] = 0x80; - n = paddedLength - 16; - while (i < n) { - padded[i++] = 0; - } - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = 0; - padded[i++] = length >>> 29 & 0xFF; - padded[i++] = length >> 21 & 0xFF; - padded[i++] = length >> 13 & 0xFF; - padded[i++] = length >> 5 & 0xFF; - padded[i++] = length << 3 & 0xFF; - var w = new Array(80); - for (i = 0; i < 80; i++) { - w[i] = new Word64(0, 0); - } - var a = new Word64(0, 0), - b = new Word64(0, 0), - c = new Word64(0, 0); - var d = new Word64(0, 0), - e = new Word64(0, 0), - f = new Word64(0, 0); - var g = new Word64(0, 0), - h = new Word64(0, 0); - var t1 = new Word64(0, 0), - t2 = new Word64(0, 0); - var tmp1 = new Word64(0, 0), - tmp2 = new Word64(0, 0), - tmp3; - for (i = 0; i < paddedLength;) { - for (j = 0; j < 16; ++j) { - w[j].high = padded[i] << 24 | padded[i + 1] << 16 | padded[i + 2] << 8 | padded[i + 3]; - w[j].low = padded[i + 4] << 24 | padded[i + 5] << 16 | padded[i + 6] << 8 | padded[i + 7]; - i += 8; - } - for (j = 16; j < 80; ++j) { - tmp3 = w[j]; - littleSigmaPrime(tmp3, w[j - 2], tmp2); - tmp3.add(w[j - 7]); - littleSigma(tmp1, w[j - 15], tmp2); - tmp3.add(tmp1); - tmp3.add(w[j - 16]); - } - a.assign(h0); - b.assign(h1); - c.assign(h2); - d.assign(h3); - e.assign(h4); - f.assign(h5); - g.assign(h6); - h.assign(h7); - for (j = 0; j < 80; ++j) { - t1.assign(h); - sigmaPrime(tmp1, e, tmp2); - t1.add(tmp1); - ch(tmp1, e, f, g, tmp2); - t1.add(tmp1); - t1.add(k[j]); - t1.add(w[j]); - sigma(t2, a, tmp2); - maj(tmp1, a, b, c, tmp2); - t2.add(tmp1); - tmp3 = h; - h = g; - g = f; - f = e; - d.add(t1); - e = d; - d = c; - c = b; - b = a; - tmp3.assign(t1); - tmp3.add(t2); - a = tmp3; - } - h0.add(a); - h1.add(b); - h2.add(c); - h3.add(d); - h4.add(e); - h5.add(f); - h6.add(g); - h7.add(h); - } - var result; - if (!mode384) { - result = new Uint8Array(64); - h0.copyTo(result, 0); - h1.copyTo(result, 8); - h2.copyTo(result, 16); - h3.copyTo(result, 24); - h4.copyTo(result, 32); - h5.copyTo(result, 40); - h6.copyTo(result, 48); - h7.copyTo(result, 56); - } else { - result = new Uint8Array(48); - h0.copyTo(result, 0); - h1.copyTo(result, 8); - h2.copyTo(result, 16); - h3.copyTo(result, 24); - h4.copyTo(result, 32); - h5.copyTo(result, 40); - } - return result; - } - return hash; -}(); -var calculateSHA384 = function calculateSHA384Closure() { - function hash(data, offset, length) { - return calculateSHA512(data, offset, length, true); - } - return hash; -}(); -var NullCipher = function NullCipherClosure() { - function NullCipher() {} - NullCipher.prototype = { - decryptBlock: function NullCipher_decryptBlock(data) { - return data; - } - }; - return NullCipher; -}(); - -var AESBaseCipher = function () { - function AESBaseCipher() { - _classCallCheck(this, AESBaseCipher); - - if (this.constructor === AESBaseCipher) { - (0, _util.unreachable)('Cannot initialize AESBaseCipher.'); - } - this._s = new Uint8Array([0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b, 0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0, 0xad, 0xd4, 0xa2, 0xaf, 0x9c, 0xa4, 0x72, 0xc0, 0xb7, 0xfd, 0x93, 0x26, 0x36, 0x3f, 0xf7, 0xcc, 0x34, 0xa5, 0xe5, 0xf1, 0x71, 0xd8, 0x31, 0x15, 0x04, 0xc7, 0x23, 0xc3, 0x18, 0x96, 0x05, 0x9a, 0x07, 0x12, 0x80, 0xe2, 0xeb, 0x27, 0xb2, 0x75, 0x09, 0x83, 0x2c, 0x1a, 0x1b, 0x6e, 0x5a, 0xa0, 0x52, 0x3b, 0xd6, 0xb3, 0x29, 0xe3, 0x2f, 0x84, 0x53, 0xd1, 0x00, 0xed, 0x20, 0xfc, 0xb1, 0x5b, 0x6a, 0xcb, 0xbe, 0x39, 0x4a, 0x4c, 0x58, 0xcf, 0xd0, 0xef, 0xaa, 0xfb, 0x43, 0x4d, 0x33, 0x85, 0x45, 0xf9, 0x02, 0x7f, 0x50, 0x3c, 0x9f, 0xa8, 0x51, 0xa3, 0x40, 0x8f, 0x92, 0x9d, 0x38, 0xf5, 0xbc, 0xb6, 0xda, 0x21, 0x10, 0xff, 0xf3, 0xd2, 0xcd, 0x0c, 0x13, 0xec, 0x5f, 0x97, 0x44, 0x17, 0xc4, 0xa7, 0x7e, 0x3d, 0x64, 0x5d, 0x19, 0x73, 0x60, 0x81, 0x4f, 0xdc, 0x22, 0x2a, 0x90, 0x88, 0x46, 0xee, 0xb8, 0x14, 0xde, 0x5e, 0x0b, 0xdb, 0xe0, 0x32, 0x3a, 0x0a, 0x49, 0x06, 0x24, 0x5c, 0xc2, 0xd3, 0xac, 0x62, 0x91, 0x95, 0xe4, 0x79, 0xe7, 0xc8, 0x37, 0x6d, 0x8d, 0xd5, 0x4e, 0xa9, 0x6c, 0x56, 0xf4, 0xea, 0x65, 0x7a, 0xae, 0x08, 0xba, 0x78, 0x25, 0x2e, 0x1c, 0xa6, 0xb4, 0xc6, 0xe8, 0xdd, 0x74, 0x1f, 0x4b, 0xbd, 0x8b, 0x8a, 0x70, 0x3e, 0xb5, 0x66, 0x48, 0x03, 0xf6, 0x0e, 0x61, 0x35, 0x57, 0xb9, 0x86, 0xc1, 0x1d, 0x9e, 0xe1, 0xf8, 0x98, 0x11, 0x69, 0xd9, 0x8e, 0x94, 0x9b, 0x1e, 0x87, 0xe9, 0xce, 0x55, 0x28, 0xdf, 0x8c, 0xa1, 0x89, 0x0d, 0xbf, 0xe6, 0x42, 0x68, 0x41, 0x99, 0x2d, 0x0f, 0xb0, 0x54, 0xbb, 0x16]); - this._inv_s = new Uint8Array([0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e, 0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87, 0x34, 0x8e, 0x43, 0x44, 0xc4, 0xde, 0xe9, 0xcb, 0x54, 0x7b, 0x94, 0x32, 0xa6, 0xc2, 0x23, 0x3d, 0xee, 0x4c, 0x95, 0x0b, 0x42, 0xfa, 0xc3, 0x4e, 0x08, 0x2e, 0xa1, 0x66, 0x28, 0xd9, 0x24, 0xb2, 0x76, 0x5b, 0xa2, 0x49, 0x6d, 0x8b, 0xd1, 0x25, 0x72, 0xf8, 0xf6, 0x64, 0x86, 0x68, 0x98, 0x16, 0xd4, 0xa4, 0x5c, 0xcc, 0x5d, 0x65, 0xb6, 0x92, 0x6c, 0x70, 0x48, 0x50, 0xfd, 0xed, 0xb9, 0xda, 0x5e, 0x15, 0x46, 0x57, 0xa7, 0x8d, 0x9d, 0x84, 0x90, 0xd8, 0xab, 0x00, 0x8c, 0xbc, 0xd3, 0x0a, 0xf7, 0xe4, 0x58, 0x05, 0xb8, 0xb3, 0x45, 0x06, 0xd0, 0x2c, 0x1e, 0x8f, 0xca, 0x3f, 0x0f, 0x02, 0xc1, 0xaf, 0xbd, 0x03, 0x01, 0x13, 0x8a, 0x6b, 0x3a, 0x91, 0x11, 0x41, 0x4f, 0x67, 0xdc, 0xea, 0x97, 0xf2, 0xcf, 0xce, 0xf0, 0xb4, 0xe6, 0x73, 0x96, 0xac, 0x74, 0x22, 0xe7, 0xad, 0x35, 0x85, 0xe2, 0xf9, 0x37, 0xe8, 0x1c, 0x75, 0xdf, 0x6e, 0x47, 0xf1, 0x1a, 0x71, 0x1d, 0x29, 0xc5, 0x89, 0x6f, 0xb7, 0x62, 0x0e, 0xaa, 0x18, 0xbe, 0x1b, 0xfc, 0x56, 0x3e, 0x4b, 0xc6, 0xd2, 0x79, 0x20, 0x9a, 0xdb, 0xc0, 0xfe, 0x78, 0xcd, 0x5a, 0xf4, 0x1f, 0xdd, 0xa8, 0x33, 0x88, 0x07, 0xc7, 0x31, 0xb1, 0x12, 0x10, 0x59, 0x27, 0x80, 0xec, 0x5f, 0x60, 0x51, 0x7f, 0xa9, 0x19, 0xb5, 0x4a, 0x0d, 0x2d, 0xe5, 0x7a, 0x9f, 0x93, 0xc9, 0x9c, 0xef, 0xa0, 0xe0, 0x3b, 0x4d, 0xae, 0x2a, 0xf5, 0xb0, 0xc8, 0xeb, 0xbb, 0x3c, 0x83, 0x53, 0x99, 0x61, 0x17, 0x2b, 0x04, 0x7e, 0xba, 0x77, 0xd6, 0x26, 0xe1, 0x69, 0x14, 0x63, 0x55, 0x21, 0x0c, 0x7d]); - this._mix = new Uint32Array([0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927, 0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45, 0x486c5c74, 0x4665517f, 0x547e4662, 0x5a774b69, 0xe090d0b0, 0xee99ddbb, 0xfc82caa6, 0xf28bc7ad, 0xd8b4e49c, 0xd6bde997, 0xc4a6fe8a, 0xcaaff381, 0x90d8b8e8, 0x9ed1b5e3, 0x8ccaa2fe, 0x82c3aff5, 0xa8fc8cc4, 0xa6f581cf, 0xb4ee96d2, 0xbae79bd9, 0xdb3bbb7b, 0xd532b670, 0xc729a16d, 0xc920ac66, 0xe31f8f57, 0xed16825c, 0xff0d9541, 0xf104984a, 0xab73d323, 0xa57ade28, 0xb761c935, 0xb968c43e, 0x9357e70f, 0x9d5eea04, 0x8f45fd19, 0x814cf012, 0x3bab6bcb, 0x35a266c0, 0x27b971dd, 0x29b07cd6, 0x038f5fe7, 0x0d8652ec, 0x1f9d45f1, 0x119448fa, 0x4be30393, 0x45ea0e98, 0x57f11985, 0x59f8148e, 0x73c737bf, 0x7dce3ab4, 0x6fd52da9, 0x61dc20a2, 0xad766df6, 0xa37f60fd, 0xb16477e0, 0xbf6d7aeb, 0x955259da, 0x9b5b54d1, 0x894043cc, 0x87494ec7, 0xdd3e05ae, 0xd33708a5, 0xc12c1fb8, 0xcf2512b3, 0xe51a3182, 0xeb133c89, 0xf9082b94, 0xf701269f, 0x4de6bd46, 0x43efb04d, 0x51f4a750, 0x5ffdaa5b, 0x75c2896a, 0x7bcb8461, 0x69d0937c, 0x67d99e77, 0x3daed51e, 0x33a7d815, 0x21bccf08, 0x2fb5c203, 0x058ae132, 0x0b83ec39, 0x1998fb24, 0x1791f62f, 0x764dd68d, 0x7844db86, 0x6a5fcc9b, 0x6456c190, 0x4e69e2a1, 0x4060efaa, 0x527bf8b7, 0x5c72f5bc, 0x0605bed5, 0x080cb3de, 0x1a17a4c3, 0x141ea9c8, 0x3e218af9, 0x302887f2, 0x223390ef, 0x2c3a9de4, 0x96dd063d, 0x98d40b36, 0x8acf1c2b, 0x84c61120, 0xaef93211, 0xa0f03f1a, 0xb2eb2807, 0xbce2250c, 0xe6956e65, 0xe89c636e, 0xfa877473, 0xf48e7978, 0xdeb15a49, 0xd0b85742, 0xc2a3405f, 0xccaa4d54, 0x41ecdaf7, 0x4fe5d7fc, 0x5dfec0e1, 0x53f7cdea, 0x79c8eedb, 0x77c1e3d0, 0x65daf4cd, 0x6bd3f9c6, 0x31a4b2af, 0x3fadbfa4, 0x2db6a8b9, 0x23bfa5b2, 0x09808683, 0x07898b88, 0x15929c95, 0x1b9b919e, 0xa17c0a47, 0xaf75074c, 0xbd6e1051, 0xb3671d5a, 0x99583e6b, 0x97513360, 0x854a247d, 0x8b432976, 0xd134621f, 0xdf3d6f14, 0xcd267809, 0xc32f7502, 0xe9105633, 0xe7195b38, 0xf5024c25, 0xfb0b412e, 0x9ad7618c, 0x94de6c87, 0x86c57b9a, 0x88cc7691, 0xa2f355a0, 0xacfa58ab, 0xbee14fb6, 0xb0e842bd, 0xea9f09d4, 0xe49604df, 0xf68d13c2, 0xf8841ec9, 0xd2bb3df8, 0xdcb230f3, 0xcea927ee, 0xc0a02ae5, 0x7a47b13c, 0x744ebc37, 0x6655ab2a, 0x685ca621, 0x42638510, 0x4c6a881b, 0x5e719f06, 0x5078920d, 0x0a0fd964, 0x0406d46f, 0x161dc372, 0x1814ce79, 0x322bed48, 0x3c22e043, 0x2e39f75e, 0x2030fa55, 0xec9ab701, 0xe293ba0a, 0xf088ad17, 0xfe81a01c, 0xd4be832d, 0xdab78e26, 0xc8ac993b, 0xc6a59430, 0x9cd2df59, 0x92dbd252, 0x80c0c54f, 0x8ec9c844, 0xa4f6eb75, 0xaaffe67e, 0xb8e4f163, 0xb6edfc68, 0x0c0a67b1, 0x02036aba, 0x10187da7, 0x1e1170ac, 0x342e539d, 0x3a275e96, 0x283c498b, 0x26354480, 0x7c420fe9, 0x724b02e2, 0x605015ff, 0x6e5918f4, 0x44663bc5, 0x4a6f36ce, 0x587421d3, 0x567d2cd8, 0x37a10c7a, 0x39a80171, 0x2bb3166c, 0x25ba1b67, 0x0f853856, 0x018c355d, 0x13972240, 0x1d9e2f4b, 0x47e96422, 0x49e06929, 0x5bfb7e34, 0x55f2733f, 0x7fcd500e, 0x71c45d05, 0x63df4a18, 0x6dd64713, 0xd731dcca, 0xd938d1c1, 0xcb23c6dc, 0xc52acbd7, 0xef15e8e6, 0xe11ce5ed, 0xf307f2f0, 0xfd0efffb, 0xa779b492, 0xa970b999, 0xbb6bae84, 0xb562a38f, 0x9f5d80be, 0x91548db5, 0x834f9aa8, 0x8d4697a3]); - this._mixCol = new Uint8Array(256); - for (var i = 0; i < 256; i++) { - if (i < 128) { - this._mixCol[i] = i << 1; - } else { - this._mixCol[i] = i << 1 ^ 0x1b; - } - } - this.buffer = new Uint8Array(16); - this.bufferPosition = 0; - } - - _createClass(AESBaseCipher, [{ - key: '_expandKey', - value: function _expandKey(cipherKey) { - (0, _util.unreachable)('Cannot call `_expandKey` on the base class'); - } - }, { - key: '_decrypt', - value: function _decrypt(input, key) { - var t = void 0, - u = void 0, - v = void 0; - var state = new Uint8Array(16); - state.set(input); - for (var j = 0, k = this._keySize; j < 16; ++j, ++k) { - state[j] ^= key[k]; - } - for (var i = this._cyclesOfRepetition - 1; i >= 1; --i) { - t = state[13]; - state[13] = state[9]; - state[9] = state[5]; - state[5] = state[1]; - state[1] = t; - t = state[14]; - u = state[10]; - state[14] = state[6]; - state[10] = state[2]; - state[6] = t; - state[2] = u; - t = state[15]; - u = state[11]; - v = state[7]; - state[15] = state[3]; - state[11] = t; - state[7] = u; - state[3] = v; - for (var _j = 0; _j < 16; ++_j) { - state[_j] = this._inv_s[state[_j]]; - } - for (var _j2 = 0, _k = i * 16; _j2 < 16; ++_j2, ++_k) { - state[_j2] ^= key[_k]; - } - for (var _j3 = 0; _j3 < 16; _j3 += 4) { - var s0 = this._mix[state[_j3]]; - var s1 = this._mix[state[_j3 + 1]]; - var s2 = this._mix[state[_j3 + 2]]; - var s3 = this._mix[state[_j3 + 3]]; - t = s0 ^ s1 >>> 8 ^ s1 << 24 ^ s2 >>> 16 ^ s2 << 16 ^ s3 >>> 24 ^ s3 << 8; - state[_j3] = t >>> 24 & 0xFF; - state[_j3 + 1] = t >> 16 & 0xFF; - state[_j3 + 2] = t >> 8 & 0xFF; - state[_j3 + 3] = t & 0xFF; - } - } - t = state[13]; - state[13] = state[9]; - state[9] = state[5]; - state[5] = state[1]; - state[1] = t; - t = state[14]; - u = state[10]; - state[14] = state[6]; - state[10] = state[2]; - state[6] = t; - state[2] = u; - t = state[15]; - u = state[11]; - v = state[7]; - state[15] = state[3]; - state[11] = t; - state[7] = u; - state[3] = v; - for (var _j4 = 0; _j4 < 16; ++_j4) { - state[_j4] = this._inv_s[state[_j4]]; - state[_j4] ^= key[_j4]; - } - return state; - } - }, { - key: '_encrypt', - value: function _encrypt(input, key) { - var s = this._s; - var t = void 0, - u = void 0, - v = void 0; - var state = new Uint8Array(16); - state.set(input); - for (var j = 0; j < 16; ++j) { - state[j] ^= key[j]; - } - for (var i = 1; i < this._cyclesOfRepetition; i++) { - for (var _j5 = 0; _j5 < 16; ++_j5) { - state[_j5] = s[state[_j5]]; - } - v = state[1]; - state[1] = state[5]; - state[5] = state[9]; - state[9] = state[13]; - state[13] = v; - v = state[2]; - u = state[6]; - state[2] = state[10]; - state[6] = state[14]; - state[10] = v; - state[14] = u; - v = state[3]; - u = state[7]; - t = state[11]; - state[3] = state[15]; - state[7] = v; - state[11] = u; - state[15] = t; - for (var _j6 = 0; _j6 < 16; _j6 += 4) { - var s0 = state[_j6 + 0]; - var s1 = state[_j6 + 1]; - var s2 = state[_j6 + 2]; - var s3 = state[_j6 + 3]; - t = s0 ^ s1 ^ s2 ^ s3; - state[_j6 + 0] ^= t ^ this._mixCol[s0 ^ s1]; - state[_j6 + 1] ^= t ^ this._mixCol[s1 ^ s2]; - state[_j6 + 2] ^= t ^ this._mixCol[s2 ^ s3]; - state[_j6 + 3] ^= t ^ this._mixCol[s3 ^ s0]; - } - for (var _j7 = 0, k = i * 16; _j7 < 16; ++_j7, ++k) { - state[_j7] ^= key[k]; - } - } - for (var _j8 = 0; _j8 < 16; ++_j8) { - state[_j8] = s[state[_j8]]; - } - v = state[1]; - state[1] = state[5]; - state[5] = state[9]; - state[9] = state[13]; - state[13] = v; - v = state[2]; - u = state[6]; - state[2] = state[10]; - state[6] = state[14]; - state[10] = v; - state[14] = u; - v = state[3]; - u = state[7]; - t = state[11]; - state[3] = state[15]; - state[7] = v; - state[11] = u; - state[15] = t; - for (var _j9 = 0, _k2 = this._keySize; _j9 < 16; ++_j9, ++_k2) { - state[_j9] ^= key[_k2]; - } - return state; - } - }, { - key: '_decryptBlock2', - value: function _decryptBlock2(data, finalize) { - var sourceLength = data.length; - var buffer = this.buffer, - bufferLength = this.bufferPosition; - var result = [], - iv = this.iv; - for (var i = 0; i < sourceLength; ++i) { - buffer[bufferLength] = data[i]; - ++bufferLength; - if (bufferLength < 16) { - continue; - } - var plain = this._decrypt(buffer, this._key); - for (var j = 0; j < 16; ++j) { - plain[j] ^= iv[j]; - } - iv = buffer; - result.push(plain); - buffer = new Uint8Array(16); - bufferLength = 0; - } - this.buffer = buffer; - this.bufferLength = bufferLength; - this.iv = iv; - if (result.length === 0) { - return new Uint8Array(0); - } - var outputLength = 16 * result.length; - if (finalize) { - var lastBlock = result[result.length - 1]; - var psLen = lastBlock[15]; - if (psLen <= 16) { - for (var _i = 15, ii = 16 - psLen; _i >= ii; --_i) { - if (lastBlock[_i] !== psLen) { - psLen = 0; - break; - } - } - outputLength -= psLen; - result[result.length - 1] = lastBlock.subarray(0, 16 - psLen); - } - } - var output = new Uint8Array(outputLength); - for (var _i2 = 0, _j10 = 0, _ii = result.length; _i2 < _ii; ++_i2, _j10 += 16) { - output.set(result[_i2], _j10); - } - return output; - } - }, { - key: 'decryptBlock', - value: function decryptBlock(data, finalize) { - var iv = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - - var sourceLength = data.length; - var buffer = this.buffer, - bufferLength = this.bufferPosition; - if (iv) { - this.iv = iv; - } else { - for (var i = 0; bufferLength < 16 && i < sourceLength; ++i, ++bufferLength) { - buffer[bufferLength] = data[i]; - } - if (bufferLength < 16) { - this.bufferLength = bufferLength; - return new Uint8Array(0); - } - this.iv = buffer; - data = data.subarray(16); - } - this.buffer = new Uint8Array(16); - this.bufferLength = 0; - this.decryptBlock = this._decryptBlock2; - return this.decryptBlock(data, finalize); - } - }, { - key: 'encrypt', - value: function encrypt(data, iv) { - var sourceLength = data.length; - var buffer = this.buffer, - bufferLength = this.bufferPosition; - var result = []; - if (!iv) { - iv = new Uint8Array(16); - } - for (var i = 0; i < sourceLength; ++i) { - buffer[bufferLength] = data[i]; - ++bufferLength; - if (bufferLength < 16) { - continue; - } - for (var j = 0; j < 16; ++j) { - buffer[j] ^= iv[j]; - } - var cipher = this._encrypt(buffer, this._key); - iv = cipher; - result.push(cipher); - buffer = new Uint8Array(16); - bufferLength = 0; - } - this.buffer = buffer; - this.bufferLength = bufferLength; - this.iv = iv; - if (result.length === 0) { - return new Uint8Array(0); - } - var outputLength = 16 * result.length; - var output = new Uint8Array(outputLength); - for (var _i3 = 0, _j11 = 0, ii = result.length; _i3 < ii; ++_i3, _j11 += 16) { - output.set(result[_i3], _j11); - } - return output; - } - }]); - - return AESBaseCipher; -}(); - -var AES128Cipher = function (_AESBaseCipher) { - _inherits(AES128Cipher, _AESBaseCipher); - - function AES128Cipher(key) { - _classCallCheck(this, AES128Cipher); - - var _this = _possibleConstructorReturn(this, (AES128Cipher.__proto__ || Object.getPrototypeOf(AES128Cipher)).call(this)); - - _this._cyclesOfRepetition = 10; - _this._keySize = 160; - _this._rcon = new Uint8Array([0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c, 0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a, 0xd4, 0xb3, 0x7d, 0xfa, 0xef, 0xc5, 0x91, 0x39, 0x72, 0xe4, 0xd3, 0xbd, 0x61, 0xc2, 0x9f, 0x25, 0x4a, 0x94, 0x33, 0x66, 0xcc, 0x83, 0x1d, 0x3a, 0x74, 0xe8, 0xcb, 0x8d]); - _this._key = _this._expandKey(key); - return _this; - } - - _createClass(AES128Cipher, [{ - key: '_expandKey', - value: function _expandKey(cipherKey) { - var b = 176; - var s = this._s; - var rcon = this._rcon; - var result = new Uint8Array(b); - result.set(cipherKey); - for (var j = 16, i = 1; j < b; ++i) { - var t1 = result[j - 3]; - var t2 = result[j - 2]; - var t3 = result[j - 1]; - var t4 = result[j - 4]; - t1 = s[t1]; - t2 = s[t2]; - t3 = s[t3]; - t4 = s[t4]; - t1 = t1 ^ rcon[i]; - for (var n = 0; n < 4; ++n) { - result[j] = t1 ^= result[j - 16]; - j++; - result[j] = t2 ^= result[j - 16]; - j++; - result[j] = t3 ^= result[j - 16]; - j++; - result[j] = t4 ^= result[j - 16]; - j++; - } - } - return result; - } - }]); - - return AES128Cipher; -}(AESBaseCipher); - -var AES256Cipher = function (_AESBaseCipher2) { - _inherits(AES256Cipher, _AESBaseCipher2); - - function AES256Cipher(key) { - _classCallCheck(this, AES256Cipher); - - var _this2 = _possibleConstructorReturn(this, (AES256Cipher.__proto__ || Object.getPrototypeOf(AES256Cipher)).call(this)); - - _this2._cyclesOfRepetition = 14; - _this2._keySize = 224; - _this2._key = _this2._expandKey(key); - return _this2; - } - - _createClass(AES256Cipher, [{ - key: '_expandKey', - value: function _expandKey(cipherKey) { - var b = 240; - var s = this._s; - var result = new Uint8Array(b); - result.set(cipherKey); - var r = 1; - var t1 = void 0, - t2 = void 0, - t3 = void 0, - t4 = void 0; - for (var j = 32, i = 1; j < b; ++i) { - if (j % 32 === 16) { - t1 = s[t1]; - t2 = s[t2]; - t3 = s[t3]; - t4 = s[t4]; - } else if (j % 32 === 0) { - t1 = result[j - 3]; - t2 = result[j - 2]; - t3 = result[j - 1]; - t4 = result[j - 4]; - t1 = s[t1]; - t2 = s[t2]; - t3 = s[t3]; - t4 = s[t4]; - t1 = t1 ^ r; - if ((r <<= 1) >= 256) { - r = (r ^ 0x1b) & 0xFF; - } - } - for (var n = 0; n < 4; ++n) { - result[j] = t1 ^= result[j - 32]; - j++; - result[j] = t2 ^= result[j - 32]; - j++; - result[j] = t3 ^= result[j - 32]; - j++; - result[j] = t4 ^= result[j - 32]; - j++; - } - } - return result; - } - }]); - - return AES256Cipher; -}(AESBaseCipher); - -var PDF17 = function PDF17Closure() { - function compareByteArrays(array1, array2) { - if (array1.length !== array2.length) { - return false; - } - for (var i = 0; i < array1.length; i++) { - if (array1[i] !== array2[i]) { - return false; - } - } - return true; - } - function PDF17() {} - PDF17.prototype = { - checkOwnerPassword: function PDF17_checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { - var hashData = new Uint8Array(password.length + 56); - hashData.set(password, 0); - hashData.set(ownerValidationSalt, password.length); - hashData.set(userBytes, password.length + ownerValidationSalt.length); - var result = calculateSHA256(hashData, 0, hashData.length); - return compareByteArrays(result, ownerPassword); - }, - checkUserPassword: function PDF17_checkUserPassword(password, userValidationSalt, userPassword) { - var hashData = new Uint8Array(password.length + 8); - hashData.set(password, 0); - hashData.set(userValidationSalt, password.length); - var result = calculateSHA256(hashData, 0, hashData.length); - return compareByteArrays(result, userPassword); - }, - getOwnerKey: function PDF17_getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { - var hashData = new Uint8Array(password.length + 56); - hashData.set(password, 0); - hashData.set(ownerKeySalt, password.length); - hashData.set(userBytes, password.length + ownerKeySalt.length); - var key = calculateSHA256(hashData, 0, hashData.length); - var cipher = new AES256Cipher(key); - return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); - }, - getUserKey: function PDF17_getUserKey(password, userKeySalt, userEncryption) { - var hashData = new Uint8Array(password.length + 8); - hashData.set(password, 0); - hashData.set(userKeySalt, password.length); - var key = calculateSHA256(hashData, 0, hashData.length); - var cipher = new AES256Cipher(key); - return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); - } - }; - return PDF17; -}(); -var PDF20 = function PDF20Closure() { - function concatArrays(array1, array2) { - var t = new Uint8Array(array1.length + array2.length); - t.set(array1, 0); - t.set(array2, array1.length); - return t; - } - function calculatePDF20Hash(password, input, userBytes) { - var k = calculateSHA256(input, 0, input.length).subarray(0, 32); - var e = [0]; - var i = 0; - while (i < 64 || e[e.length - 1] > i - 32) { - var arrayLength = password.length + k.length + userBytes.length; - var k1 = new Uint8Array(arrayLength * 64); - var array = concatArrays(password, k); - array = concatArrays(array, userBytes); - for (var j = 0, pos = 0; j < 64; j++, pos += arrayLength) { - k1.set(array, pos); - } - var cipher = new AES128Cipher(k.subarray(0, 16)); - e = cipher.encrypt(k1, k.subarray(16, 32)); - var remainder = 0; - for (var z = 0; z < 16; z++) { - remainder *= 256 % 3; - remainder %= 3; - remainder += (e[z] >>> 0) % 3; - remainder %= 3; - } - if (remainder === 0) { - k = calculateSHA256(e, 0, e.length); - } else if (remainder === 1) { - k = calculateSHA384(e, 0, e.length); - } else if (remainder === 2) { - k = calculateSHA512(e, 0, e.length); - } - i++; - } - return k.subarray(0, 32); - } - function PDF20() {} - function compareByteArrays(array1, array2) { - if (array1.length !== array2.length) { - return false; - } - for (var i = 0; i < array1.length; i++) { - if (array1[i] !== array2[i]) { - return false; - } - } - return true; - } - PDF20.prototype = { - hash: function PDF20_hash(password, concatBytes, userBytes) { - return calculatePDF20Hash(password, concatBytes, userBytes); - }, - checkOwnerPassword: function PDF20_checkOwnerPassword(password, ownerValidationSalt, userBytes, ownerPassword) { - var hashData = new Uint8Array(password.length + 56); - hashData.set(password, 0); - hashData.set(ownerValidationSalt, password.length); - hashData.set(userBytes, password.length + ownerValidationSalt.length); - var result = calculatePDF20Hash(password, hashData, userBytes); - return compareByteArrays(result, ownerPassword); - }, - checkUserPassword: function PDF20_checkUserPassword(password, userValidationSalt, userPassword) { - var hashData = new Uint8Array(password.length + 8); - hashData.set(password, 0); - hashData.set(userValidationSalt, password.length); - var result = calculatePDF20Hash(password, hashData, []); - return compareByteArrays(result, userPassword); - }, - getOwnerKey: function PDF20_getOwnerKey(password, ownerKeySalt, userBytes, ownerEncryption) { - var hashData = new Uint8Array(password.length + 56); - hashData.set(password, 0); - hashData.set(ownerKeySalt, password.length); - hashData.set(userBytes, password.length + ownerKeySalt.length); - var key = calculatePDF20Hash(password, hashData, userBytes); - var cipher = new AES256Cipher(key); - return cipher.decryptBlock(ownerEncryption, false, new Uint8Array(16)); - }, - getUserKey: function PDF20_getUserKey(password, userKeySalt, userEncryption) { - var hashData = new Uint8Array(password.length + 8); - hashData.set(password, 0); - hashData.set(userKeySalt, password.length); - var key = calculatePDF20Hash(password, hashData, []); - var cipher = new AES256Cipher(key); - return cipher.decryptBlock(userEncryption, false, new Uint8Array(16)); - } - }; - return PDF20; -}(); -var CipherTransform = function CipherTransformClosure() { - function CipherTransform(stringCipherConstructor, streamCipherConstructor) { - this.StringCipherConstructor = stringCipherConstructor; - this.StreamCipherConstructor = streamCipherConstructor; - } - CipherTransform.prototype = { - createStream: function CipherTransform_createStream(stream, length) { - var cipher = new this.StreamCipherConstructor(); - return new _stream.DecryptStream(stream, length, function cipherTransformDecryptStream(data, finalize) { - return cipher.decryptBlock(data, finalize); - }); - }, - decryptString: function CipherTransform_decryptString(s) { - var cipher = new this.StringCipherConstructor(); - var data = (0, _util.stringToBytes)(s); - data = cipher.decryptBlock(data, true); - return (0, _util.bytesToString)(data); - } - }; - return CipherTransform; -}(); -var CipherTransformFactory = function CipherTransformFactoryClosure() { - var defaultPasswordBytes = new Uint8Array([0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41, 0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08, 0x2E, 0x2E, 0x00, 0xB6, 0xD0, 0x68, 0x3E, 0x80, 0x2F, 0x0C, 0xA9, 0xFE, 0x64, 0x53, 0x69, 0x7A]); - function createEncryptionKey20(revision, password, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms) { - if (password) { - var passwordLength = Math.min(127, password.length); - password = password.subarray(0, passwordLength); - } else { - password = []; - } - var pdfAlgorithm; - if (revision === 6) { - pdfAlgorithm = new PDF20(); - } else { - pdfAlgorithm = new PDF17(); - } - if (pdfAlgorithm.checkUserPassword(password, userValidationSalt, userPassword)) { - return pdfAlgorithm.getUserKey(password, userKeySalt, userEncryption); - } else if (password.length && pdfAlgorithm.checkOwnerPassword(password, ownerValidationSalt, uBytes, ownerPassword)) { - return pdfAlgorithm.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption); - } - return null; - } - function prepareKeyData(fileId, password, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata) { - var hashDataSize = 40 + ownerPassword.length + fileId.length; - var hashData = new Uint8Array(hashDataSize), - i = 0, - j, - n; - if (password) { - n = Math.min(32, password.length); - for (; i < n; ++i) { - hashData[i] = password[i]; - } - } - j = 0; - while (i < 32) { - hashData[i++] = defaultPasswordBytes[j++]; - } - for (j = 0, n = ownerPassword.length; j < n; ++j) { - hashData[i++] = ownerPassword[j]; - } - hashData[i++] = flags & 0xFF; - hashData[i++] = flags >> 8 & 0xFF; - hashData[i++] = flags >> 16 & 0xFF; - hashData[i++] = flags >>> 24 & 0xFF; - for (j = 0, n = fileId.length; j < n; ++j) { - hashData[i++] = fileId[j]; - } - if (revision >= 4 && !encryptMetadata) { - hashData[i++] = 0xFF; - hashData[i++] = 0xFF; - hashData[i++] = 0xFF; - hashData[i++] = 0xFF; - } - var hash = calculateMD5(hashData, 0, i); - var keyLengthInBytes = keyLength >> 3; - if (revision >= 3) { - for (j = 0; j < 50; ++j) { - hash = calculateMD5(hash, 0, keyLengthInBytes); - } - } - var encryptionKey = hash.subarray(0, keyLengthInBytes); - var cipher, checkData; - if (revision >= 3) { - for (i = 0; i < 32; ++i) { - hashData[i] = defaultPasswordBytes[i]; - } - for (j = 0, n = fileId.length; j < n; ++j) { - hashData[i++] = fileId[j]; - } - cipher = new ARCFourCipher(encryptionKey); - checkData = cipher.encryptBlock(calculateMD5(hashData, 0, i)); - n = encryptionKey.length; - var derivedKey = new Uint8Array(n), - k; - for (j = 1; j <= 19; ++j) { - for (k = 0; k < n; ++k) { - derivedKey[k] = encryptionKey[k] ^ j; - } - cipher = new ARCFourCipher(derivedKey); - checkData = cipher.encryptBlock(checkData); - } - for (j = 0, n = checkData.length; j < n; ++j) { - if (userPassword[j] !== checkData[j]) { - return null; - } - } - } else { - cipher = new ARCFourCipher(encryptionKey); - checkData = cipher.encryptBlock(defaultPasswordBytes); - for (j = 0, n = checkData.length; j < n; ++j) { - if (userPassword[j] !== checkData[j]) { - return null; - } - } - } - return encryptionKey; - } - function decodeUserPassword(password, ownerPassword, revision, keyLength) { - var hashData = new Uint8Array(32), - i = 0, - j, - n; - n = Math.min(32, password.length); - for (; i < n; ++i) { - hashData[i] = password[i]; - } - j = 0; - while (i < 32) { - hashData[i++] = defaultPasswordBytes[j++]; - } - var hash = calculateMD5(hashData, 0, i); - var keyLengthInBytes = keyLength >> 3; - if (revision >= 3) { - for (j = 0; j < 50; ++j) { - hash = calculateMD5(hash, 0, hash.length); - } - } - var cipher, userPassword; - if (revision >= 3) { - userPassword = ownerPassword; - var derivedKey = new Uint8Array(keyLengthInBytes), - k; - for (j = 19; j >= 0; j--) { - for (k = 0; k < keyLengthInBytes; ++k) { - derivedKey[k] = hash[k] ^ j; - } - cipher = new ARCFourCipher(derivedKey); - userPassword = cipher.encryptBlock(userPassword); - } - } else { - cipher = new ARCFourCipher(hash.subarray(0, keyLengthInBytes)); - userPassword = cipher.encryptBlock(ownerPassword); - } - return userPassword; - } - var identityName = _primitives.Name.get('Identity'); - function CipherTransformFactory(dict, fileId, password) { - var filter = dict.get('Filter'); - if (!(0, _primitives.isName)(filter, 'Standard')) { - throw new _util.FormatError('unknown encryption method'); - } - this.dict = dict; - var algorithm = dict.get('V'); - if (!Number.isInteger(algorithm) || algorithm !== 1 && algorithm !== 2 && algorithm !== 4 && algorithm !== 5) { - throw new _util.FormatError('unsupported encryption algorithm'); - } - this.algorithm = algorithm; - var keyLength = dict.get('Length'); - if (!keyLength) { - if (algorithm <= 3) { - keyLength = 40; - } else { - var cfDict = dict.get('CF'); - var streamCryptoName = dict.get('StmF'); - if ((0, _primitives.isDict)(cfDict) && (0, _primitives.isName)(streamCryptoName)) { - cfDict.suppressEncryption = true; - var handlerDict = cfDict.get(streamCryptoName.name); - keyLength = handlerDict && handlerDict.get('Length') || 128; - if (keyLength < 40) { - keyLength <<= 3; - } - } - } - } - if (!Number.isInteger(keyLength) || keyLength < 40 || keyLength % 8 !== 0) { - throw new _util.FormatError('invalid key length'); - } - var ownerPassword = (0, _util.stringToBytes)(dict.get('O')).subarray(0, 32); - var userPassword = (0, _util.stringToBytes)(dict.get('U')).subarray(0, 32); - var flags = dict.get('P'); - var revision = dict.get('R'); - var encryptMetadata = (algorithm === 4 || algorithm === 5) && dict.get('EncryptMetadata') !== false; - this.encryptMetadata = encryptMetadata; - var fileIdBytes = (0, _util.stringToBytes)(fileId); - var passwordBytes; - if (password) { - if (revision === 6) { - try { - password = (0, _util.utf8StringToString)(password); - } catch (ex) { - (0, _util.warn)('CipherTransformFactory: ' + 'Unable to convert UTF8 encoded password.'); - } - } - passwordBytes = (0, _util.stringToBytes)(password); - } - var encryptionKey; - if (algorithm !== 5) { - encryptionKey = prepareKeyData(fileIdBytes, passwordBytes, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); - } else { - var ownerValidationSalt = (0, _util.stringToBytes)(dict.get('O')).subarray(32, 40); - var ownerKeySalt = (0, _util.stringToBytes)(dict.get('O')).subarray(40, 48); - var uBytes = (0, _util.stringToBytes)(dict.get('U')).subarray(0, 48); - var userValidationSalt = (0, _util.stringToBytes)(dict.get('U')).subarray(32, 40); - var userKeySalt = (0, _util.stringToBytes)(dict.get('U')).subarray(40, 48); - var ownerEncryption = (0, _util.stringToBytes)(dict.get('OE')); - var userEncryption = (0, _util.stringToBytes)(dict.get('UE')); - var perms = (0, _util.stringToBytes)(dict.get('Perms')); - encryptionKey = createEncryptionKey20(revision, passwordBytes, ownerPassword, ownerValidationSalt, ownerKeySalt, uBytes, userPassword, userValidationSalt, userKeySalt, ownerEncryption, userEncryption, perms); - } - if (!encryptionKey && !password) { - throw new _util.PasswordException('No password given', _util.PasswordResponses.NEED_PASSWORD); - } else if (!encryptionKey && password) { - var decodedPassword = decodeUserPassword(passwordBytes, ownerPassword, revision, keyLength); - encryptionKey = prepareKeyData(fileIdBytes, decodedPassword, ownerPassword, userPassword, flags, revision, keyLength, encryptMetadata); - } - if (!encryptionKey) { - throw new _util.PasswordException('Incorrect Password', _util.PasswordResponses.INCORRECT_PASSWORD); - } - this.encryptionKey = encryptionKey; - if (algorithm >= 4) { - var cf = dict.get('CF'); - if ((0, _primitives.isDict)(cf)) { - cf.suppressEncryption = true; - } - this.cf = cf; - this.stmf = dict.get('StmF') || identityName; - this.strf = dict.get('StrF') || identityName; - this.eff = dict.get('EFF') || this.stmf; - } - } - function buildObjectKey(num, gen, encryptionKey, isAes) { - var key = new Uint8Array(encryptionKey.length + 9), - i, - n; - for (i = 0, n = encryptionKey.length; i < n; ++i) { - key[i] = encryptionKey[i]; - } - key[i++] = num & 0xFF; - key[i++] = num >> 8 & 0xFF; - key[i++] = num >> 16 & 0xFF; - key[i++] = gen & 0xFF; - key[i++] = gen >> 8 & 0xFF; - if (isAes) { - key[i++] = 0x73; - key[i++] = 0x41; - key[i++] = 0x6C; - key[i++] = 0x54; - } - var hash = calculateMD5(key, 0, i); - return hash.subarray(0, Math.min(encryptionKey.length + 5, 16)); - } - function buildCipherConstructor(cf, name, num, gen, key) { - if (!(0, _primitives.isName)(name)) { - throw new _util.FormatError('Invalid crypt filter name.'); - } - var cryptFilter = cf.get(name.name); - var cfm; - if (cryptFilter !== null && cryptFilter !== undefined) { - cfm = cryptFilter.get('CFM'); - } - if (!cfm || cfm.name === 'None') { - return function cipherTransformFactoryBuildCipherConstructorNone() { - return new NullCipher(); - }; - } - if (cfm.name === 'V2') { - return function cipherTransformFactoryBuildCipherConstructorV2() { - return new ARCFourCipher(buildObjectKey(num, gen, key, false)); - }; - } - if (cfm.name === 'AESV2') { - return function cipherTransformFactoryBuildCipherConstructorAESV2() { - return new AES128Cipher(buildObjectKey(num, gen, key, true)); - }; - } - if (cfm.name === 'AESV3') { - return function cipherTransformFactoryBuildCipherConstructorAESV3() { - return new AES256Cipher(key); - }; - } - throw new _util.FormatError('Unknown crypto method'); - } - CipherTransformFactory.prototype = { - createCipherTransform: function CipherTransformFactory_createCipherTransform(num, gen) { - if (this.algorithm === 4 || this.algorithm === 5) { - return new CipherTransform(buildCipherConstructor(this.cf, this.stmf, num, gen, this.encryptionKey), buildCipherConstructor(this.cf, this.strf, num, gen, this.encryptionKey)); - } - var key = buildObjectKey(num, gen, this.encryptionKey, false); - var cipherConstructor = function buildCipherCipherConstructor() { - return new ARCFourCipher(key); - }; - return new CipherTransform(cipherConstructor, cipherConstructor); - } - }; - return CipherTransformFactory; -}(); -exports.AES128Cipher = AES128Cipher; -exports.AES256Cipher = AES256Cipher; -exports.ARCFourCipher = ARCFourCipher; -exports.CipherTransformFactory = CipherTransformFactory; -exports.PDF17 = PDF17; -exports.PDF20 = PDF20; -exports.calculateMD5 = calculateMD5; -exports.calculateSHA256 = calculateSHA256; -exports.calculateSHA384 = calculateSHA384; -exports.calculateSHA512 = calculateSHA512; - -/***/ }), -/* 151 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.ColorSpace = undefined; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -function resizeRgbImage(src, dest, w1, h1, w2, h2, alpha01) { - var COMPONENTS = 3; - alpha01 = alpha01 !== 1 ? 0 : alpha01; - var xRatio = w1 / w2; - var yRatio = h1 / h2; - var newIndex = 0, - oldIndex = void 0; - var xScaled = new Uint16Array(w2); - var w1Scanline = w1 * COMPONENTS; - for (var i = 0; i < w2; i++) { - xScaled[i] = Math.floor(i * xRatio) * COMPONENTS; - } - for (var _i = 0; _i < h2; _i++) { - var py = Math.floor(_i * yRatio) * w1Scanline; - for (var j = 0; j < w2; j++) { - oldIndex = py + xScaled[j]; - dest[newIndex++] = src[oldIndex++]; - dest[newIndex++] = src[oldIndex++]; - dest[newIndex++] = src[oldIndex++]; - newIndex += alpha01; - } - } -} - -var ColorSpace = function () { - function ColorSpace(name, numComps) { - _classCallCheck(this, ColorSpace); - - if (this.constructor === ColorSpace) { - (0, _util.unreachable)('Cannot initialize ColorSpace.'); - } - this.name = name; - this.numComps = numComps; - } - - _createClass(ColorSpace, [{ - key: 'getRgb', - value: function getRgb(src, srcOffset) { - var rgb = new Uint8ClampedArray(3); - this.getRgbItem(src, srcOffset, rgb, 0); - return rgb; - } - }, { - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - (0, _util.unreachable)('Should not call ColorSpace.getRgbItem'); - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - (0, _util.unreachable)('Should not call ColorSpace.getRgbBuffer'); - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - (0, _util.unreachable)('Should not call ColorSpace.getOutputLength'); - } - }, { - key: 'isPassthrough', - value: function isPassthrough(bits) { - return false; - } - }, { - key: 'fillRgb', - value: function fillRgb(dest, originalWidth, originalHeight, width, height, actualHeight, bpc, comps, alpha01) { - var count = originalWidth * originalHeight; - var rgbBuf = null; - var numComponentColors = 1 << bpc; - var needsResizing = originalHeight !== height || originalWidth !== width; - if (this.isPassthrough(bpc)) { - rgbBuf = comps; - } else if (this.numComps === 1 && count > numComponentColors && this.name !== 'DeviceGray' && this.name !== 'DeviceRGB') { - var allColors = bpc <= 8 ? new Uint8Array(numComponentColors) : new Uint16Array(numComponentColors); - for (var i = 0; i < numComponentColors; i++) { - allColors[i] = i; - } - var colorMap = new Uint8ClampedArray(numComponentColors * 3); - this.getRgbBuffer(allColors, 0, numComponentColors, colorMap, 0, bpc, 0); - if (!needsResizing) { - var destPos = 0; - for (var _i2 = 0; _i2 < count; ++_i2) { - var key = comps[_i2] * 3; - dest[destPos++] = colorMap[key]; - dest[destPos++] = colorMap[key + 1]; - dest[destPos++] = colorMap[key + 2]; - destPos += alpha01; - } - } else { - rgbBuf = new Uint8Array(count * 3); - var rgbPos = 0; - for (var _i3 = 0; _i3 < count; ++_i3) { - var _key = comps[_i3] * 3; - rgbBuf[rgbPos++] = colorMap[_key]; - rgbBuf[rgbPos++] = colorMap[_key + 1]; - rgbBuf[rgbPos++] = colorMap[_key + 2]; - } - } - } else { - if (!needsResizing) { - this.getRgbBuffer(comps, 0, width * actualHeight, dest, 0, bpc, alpha01); - } else { - rgbBuf = new Uint8ClampedArray(count * 3); - this.getRgbBuffer(comps, 0, count, rgbBuf, 0, bpc, 0); - } - } - if (rgbBuf) { - if (needsResizing) { - resizeRgbImage(rgbBuf, dest, originalWidth, originalHeight, width, height, alpha01); - } else { - var _destPos = 0, - _rgbPos = 0; - for (var _i4 = 0, ii = width * actualHeight; _i4 < ii; _i4++) { - dest[_destPos++] = rgbBuf[_rgbPos++]; - dest[_destPos++] = rgbBuf[_rgbPos++]; - dest[_destPos++] = rgbBuf[_rgbPos++]; - _destPos += alpha01; - } - } - } - } - }, { - key: 'usesZeroToOneRange', - get: function get() { - return (0, _util.shadow)(this, 'usesZeroToOneRange', true); - } - }], [{ - key: 'parse', - value: function parse(cs, xref, res, pdfFunctionFactory) { - var IR = this.parseToIR(cs, xref, res, pdfFunctionFactory); - return this.fromIR(IR); - } - }, { - key: 'fromIR', - value: function fromIR(IR) { - var name = Array.isArray(IR) ? IR[0] : IR; - var whitePoint = void 0, - blackPoint = void 0, - gamma = void 0; - switch (name) { - case 'DeviceGrayCS': - return this.singletons.gray; - case 'DeviceRgbCS': - return this.singletons.rgb; - case 'DeviceCmykCS': - return this.singletons.cmyk; - case 'CalGrayCS': - whitePoint = IR[1]; - blackPoint = IR[2]; - gamma = IR[3]; - return new CalGrayCS(whitePoint, blackPoint, gamma); - case 'CalRGBCS': - whitePoint = IR[1]; - blackPoint = IR[2]; - gamma = IR[3]; - var matrix = IR[4]; - return new CalRGBCS(whitePoint, blackPoint, gamma, matrix); - case 'PatternCS': - var basePatternCS = IR[1]; - if (basePatternCS) { - basePatternCS = this.fromIR(basePatternCS); - } - return new PatternCS(basePatternCS); - case 'IndexedCS': - var baseIndexedCS = IR[1]; - var hiVal = IR[2]; - var lookup = IR[3]; - return new IndexedCS(this.fromIR(baseIndexedCS), hiVal, lookup); - case 'AlternateCS': - var numComps = IR[1]; - var alt = IR[2]; - var tintFn = IR[3]; - return new AlternateCS(numComps, this.fromIR(alt), tintFn); - case 'LabCS': - whitePoint = IR[1]; - blackPoint = IR[2]; - var range = IR[3]; - return new LabCS(whitePoint, blackPoint, range); - default: - throw new _util.FormatError('Unknown colorspace name: ' + name); - } - } - }, { - key: 'parseToIR', - value: function parseToIR(cs, xref) { - var res = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - var pdfFunctionFactory = arguments[3]; - - cs = xref.fetchIfRef(cs); - if ((0, _primitives.isName)(cs)) { - switch (cs.name) { - case 'DeviceGray': - case 'G': - return 'DeviceGrayCS'; - case 'DeviceRGB': - case 'RGB': - return 'DeviceRgbCS'; - case 'DeviceCMYK': - case 'CMYK': - return 'DeviceCmykCS'; - case 'Pattern': - return ['PatternCS', null]; - default: - if ((0, _primitives.isDict)(res)) { - var colorSpaces = res.get('ColorSpace'); - if ((0, _primitives.isDict)(colorSpaces)) { - var resCS = colorSpaces.get(cs.name); - if (resCS) { - if ((0, _primitives.isName)(resCS)) { - return this.parseToIR(resCS, xref, res, pdfFunctionFactory); - } - cs = resCS; - break; - } - } - } - throw new _util.FormatError('unrecognized colorspace ' + cs.name); - } - } - if (Array.isArray(cs)) { - var mode = xref.fetchIfRef(cs[0]).name; - var numComps = void 0, - params = void 0, - alt = void 0, - whitePoint = void 0, - blackPoint = void 0, - gamma = void 0; - switch (mode) { - case 'DeviceGray': - case 'G': - return 'DeviceGrayCS'; - case 'DeviceRGB': - case 'RGB': - return 'DeviceRgbCS'; - case 'DeviceCMYK': - case 'CMYK': - return 'DeviceCmykCS'; - case 'CalGray': - params = xref.fetchIfRef(cs[1]); - whitePoint = params.getArray('WhitePoint'); - blackPoint = params.getArray('BlackPoint'); - gamma = params.get('Gamma'); - return ['CalGrayCS', whitePoint, blackPoint, gamma]; - case 'CalRGB': - params = xref.fetchIfRef(cs[1]); - whitePoint = params.getArray('WhitePoint'); - blackPoint = params.getArray('BlackPoint'); - gamma = params.getArray('Gamma'); - var matrix = params.getArray('Matrix'); - return ['CalRGBCS', whitePoint, blackPoint, gamma, matrix]; - case 'ICCBased': - var stream = xref.fetchIfRef(cs[1]); - var dict = stream.dict; - numComps = dict.get('N'); - alt = dict.get('Alternate'); - if (alt) { - var altIR = this.parseToIR(alt, xref, res, pdfFunctionFactory); - var altCS = this.fromIR(altIR, pdfFunctionFactory); - if (altCS.numComps === numComps) { - return altIR; - } - (0, _util.warn)('ICCBased color space: Ignoring incorrect /Alternate entry.'); - } - if (numComps === 1) { - return 'DeviceGrayCS'; - } else if (numComps === 3) { - return 'DeviceRgbCS'; - } else if (numComps === 4) { - return 'DeviceCmykCS'; - } - break; - case 'Pattern': - var basePatternCS = cs[1] || null; - if (basePatternCS) { - basePatternCS = this.parseToIR(basePatternCS, xref, res, pdfFunctionFactory); - } - return ['PatternCS', basePatternCS]; - case 'Indexed': - case 'I': - var baseIndexedCS = this.parseToIR(cs[1], xref, res, pdfFunctionFactory); - var hiVal = xref.fetchIfRef(cs[2]) + 1; - var lookup = xref.fetchIfRef(cs[3]); - if ((0, _primitives.isStream)(lookup)) { - lookup = lookup.getBytes(); - } - return ['IndexedCS', baseIndexedCS, hiVal, lookup]; - case 'Separation': - case 'DeviceN': - var name = xref.fetchIfRef(cs[1]); - numComps = Array.isArray(name) ? name.length : 1; - alt = this.parseToIR(cs[2], xref, res, pdfFunctionFactory); - var tintFn = pdfFunctionFactory.create(xref.fetchIfRef(cs[3])); - return ['AlternateCS', numComps, alt, tintFn]; - case 'Lab': - params = xref.fetchIfRef(cs[1]); - whitePoint = params.getArray('WhitePoint'); - blackPoint = params.getArray('BlackPoint'); - var range = params.getArray('Range'); - return ['LabCS', whitePoint, blackPoint, range]; - default: - throw new _util.FormatError('unimplemented color space object "' + mode + '"'); - } - } - throw new _util.FormatError('unrecognized color space object: "' + cs + '"'); - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decode, n) { - if (!Array.isArray(decode)) { - return true; - } - if (n * 2 !== decode.length) { - (0, _util.warn)('The decode map is not the correct length'); - return true; - } - for (var i = 0, ii = decode.length; i < ii; i += 2) { - if (decode[i] !== 0 || decode[i + 1] !== 1) { - return false; - } - } - return true; - } - }, { - key: 'singletons', - get: function get() { - return (0, _util.shadow)(this, 'singletons', { - get gray() { - return (0, _util.shadow)(this, 'gray', new DeviceGrayCS()); - }, - get rgb() { - return (0, _util.shadow)(this, 'rgb', new DeviceRgbCS()); - }, - get cmyk() { - return (0, _util.shadow)(this, 'cmyk', new DeviceCmykCS()); - } - }); - } - }]); - - return ColorSpace; -}(); - -var AlternateCS = function (_ColorSpace) { - _inherits(AlternateCS, _ColorSpace); - - function AlternateCS(numComps, base, tintFn) { - _classCallCheck(this, AlternateCS); - - var _this = _possibleConstructorReturn(this, (AlternateCS.__proto__ || Object.getPrototypeOf(AlternateCS)).call(this, 'Alternate', numComps)); - - _this.base = base; - _this.tintFn = tintFn; - _this.tmpBuf = new Float32Array(base.numComps); - return _this; - } - - _createClass(AlternateCS, [{ - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - var tmpBuf = this.tmpBuf; - this.tintFn(src, srcOffset, tmpBuf, 0); - this.base.getRgbItem(tmpBuf, 0, dest, destOffset); - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var tintFn = this.tintFn; - var base = this.base; - var scale = 1 / ((1 << bits) - 1); - var baseNumComps = base.numComps; - var usesZeroToOneRange = base.usesZeroToOneRange; - var isPassthrough = (base.isPassthrough(8) || !usesZeroToOneRange) && alpha01 === 0; - var pos = isPassthrough ? destOffset : 0; - var baseBuf = isPassthrough ? dest : new Uint8ClampedArray(baseNumComps * count); - var numComps = this.numComps; - var scaled = new Float32Array(numComps); - var tinted = new Float32Array(baseNumComps); - var i = void 0, - j = void 0; - for (i = 0; i < count; i++) { - for (j = 0; j < numComps; j++) { - scaled[j] = src[srcOffset++] * scale; - } - tintFn(scaled, 0, tinted, 0); - if (usesZeroToOneRange) { - for (j = 0; j < baseNumComps; j++) { - baseBuf[pos++] = tinted[j] * 255; - } - } else { - base.getRgbItem(tinted, 0, baseBuf, pos); - pos += baseNumComps; - } - } - if (!isPassthrough) { - base.getRgbBuffer(baseBuf, 0, count, dest, destOffset, 8, alpha01); - } - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - return this.base.getOutputLength(inputLength * this.base.numComps / this.numComps, alpha01); - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - } - }]); - - return AlternateCS; -}(ColorSpace); - -var PatternCS = function (_ColorSpace2) { - _inherits(PatternCS, _ColorSpace2); - - function PatternCS(baseCS) { - _classCallCheck(this, PatternCS); - - var _this2 = _possibleConstructorReturn(this, (PatternCS.__proto__ || Object.getPrototypeOf(PatternCS)).call(this, 'Pattern', null)); - - _this2.base = baseCS; - return _this2; - } - - return PatternCS; -}(ColorSpace); - -var IndexedCS = function (_ColorSpace3) { - _inherits(IndexedCS, _ColorSpace3); - - function IndexedCS(base, highVal, lookup) { - _classCallCheck(this, IndexedCS); - - var _this3 = _possibleConstructorReturn(this, (IndexedCS.__proto__ || Object.getPrototypeOf(IndexedCS)).call(this, 'Indexed', 1)); - - _this3.base = base; - _this3.highVal = highVal; - var baseNumComps = base.numComps; - var length = baseNumComps * highVal; - if ((0, _primitives.isStream)(lookup)) { - _this3.lookup = new Uint8Array(length); - var bytes = lookup.getBytes(length); - _this3.lookup.set(bytes); - } else if ((0, _util.isString)(lookup)) { - _this3.lookup = new Uint8Array(length); - for (var i = 0; i < length; ++i) { - _this3.lookup[i] = lookup.charCodeAt(i); - } - } else if (lookup instanceof Uint8Array) { - _this3.lookup = lookup; - } else { - throw new _util.FormatError('Unrecognized lookup table: ' + lookup); - } - return _this3; - } - - _createClass(IndexedCS, [{ - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - var numComps = this.base.numComps; - var start = src[srcOffset] * numComps; - this.base.getRgbBuffer(this.lookup, start, 1, dest, destOffset, 8, 0); - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var base = this.base; - var numComps = base.numComps; - var outputDelta = base.getOutputLength(numComps, alpha01); - var lookup = this.lookup; - for (var i = 0; i < count; ++i) { - var lookupPos = src[srcOffset++] * numComps; - base.getRgbBuffer(lookup, lookupPos, 1, dest, destOffset, 8, alpha01); - destOffset += outputDelta; - } - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - return this.base.getOutputLength(inputLength * this.base.numComps, alpha01); - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decodeMap) { - return true; - } - }]); - - return IndexedCS; -}(ColorSpace); - -var DeviceGrayCS = function (_ColorSpace4) { - _inherits(DeviceGrayCS, _ColorSpace4); - - function DeviceGrayCS() { - _classCallCheck(this, DeviceGrayCS); - - return _possibleConstructorReturn(this, (DeviceGrayCS.__proto__ || Object.getPrototypeOf(DeviceGrayCS)).call(this, 'DeviceGray', 1)); - } - - _createClass(DeviceGrayCS, [{ - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - var c = src[srcOffset] * 255; - dest[destOffset] = dest[destOffset + 1] = dest[destOffset + 2] = c; - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var scale = 255 / ((1 << bits) - 1); - var j = srcOffset, - q = destOffset; - for (var i = 0; i < count; ++i) { - var c = scale * src[j++]; - dest[q++] = c; - dest[q++] = c; - dest[q++] = c; - q += alpha01; - } - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01); - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - } - }]); - - return DeviceGrayCS; -}(ColorSpace); - -var DeviceRgbCS = function (_ColorSpace5) { - _inherits(DeviceRgbCS, _ColorSpace5); - - function DeviceRgbCS() { - _classCallCheck(this, DeviceRgbCS); - - return _possibleConstructorReturn(this, (DeviceRgbCS.__proto__ || Object.getPrototypeOf(DeviceRgbCS)).call(this, 'DeviceRGB', 3)); - } - - _createClass(DeviceRgbCS, [{ - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - dest[destOffset] = src[srcOffset] * 255; - dest[destOffset + 1] = src[srcOffset + 1] * 255; - dest[destOffset + 2] = src[srcOffset + 2] * 255; - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - if (bits === 8 && alpha01 === 0) { - dest.set(src.subarray(srcOffset, srcOffset + count * 3), destOffset); - return; - } - var scale = 255 / ((1 << bits) - 1); - var j = srcOffset, - q = destOffset; - for (var i = 0; i < count; ++i) { - dest[q++] = scale * src[j++]; - dest[q++] = scale * src[j++]; - dest[q++] = scale * src[j++]; - q += alpha01; - } - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01) / 3 | 0; - } - }, { - key: 'isPassthrough', - value: function isPassthrough(bits) { - return bits === 8; - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - } - }]); - - return DeviceRgbCS; -}(ColorSpace); - -var DeviceCmykCS = function DeviceCmykCSClosure() { - function convertToRgb(src, srcOffset, srcScale, dest, destOffset) { - var c = src[srcOffset] * srcScale; - var m = src[srcOffset + 1] * srcScale; - var y = src[srcOffset + 2] * srcScale; - var k = src[srcOffset + 3] * srcScale; - dest[destOffset] = 255 + c * (-4.387332384609988 * c + 54.48615194189176 * m + 18.82290502165302 * y + 212.25662451639585 * k + -285.2331026137004) + m * (1.7149763477362134 * m - 5.6096736904047315 * y + -17.873870861415444 * k - 5.497006427196366) + y * (-2.5217340131683033 * y - 21.248923337353073 * k + 17.5119270841813) + k * (-21.86122147463605 * k - 189.48180835922747); - dest[destOffset + 1] = 255 + c * (8.841041422036149 * c + 60.118027045597366 * m + 6.871425592049007 * y + 31.159100130055922 * k + -79.2970844816548) + m * (-15.310361306967817 * m + 17.575251261109482 * y + 131.35250912493976 * k - 190.9453302588951) + y * (4.444339102852739 * y + 9.8632861493405 * k - 24.86741582555878) + k * (-20.737325471181034 * k - 187.80453709719578); - dest[destOffset + 2] = 255 + c * (0.8842522430003296 * c + 8.078677503112928 * m + 30.89978309703729 * y - 0.23883238689178934 * k + -14.183576799673286) + m * (10.49593273432072 * m + 63.02378494754052 * y + 50.606957656360734 * k - 112.23884253719248) + y * (0.03296041114873217 * y + 115.60384449646641 * k + -193.58209356861505) + k * (-22.33816807309886 * k - 180.12613974708367); - } - - var DeviceCmykCS = function (_ColorSpace6) { - _inherits(DeviceCmykCS, _ColorSpace6); - - function DeviceCmykCS() { - _classCallCheck(this, DeviceCmykCS); - - return _possibleConstructorReturn(this, (DeviceCmykCS.__proto__ || Object.getPrototypeOf(DeviceCmykCS)).call(this, 'DeviceCMYK', 4)); - } - - _createClass(DeviceCmykCS, [{ - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - convertToRgb(src, srcOffset, 1, dest, destOffset); - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var scale = 1 / ((1 << bits) - 1); - for (var i = 0; i < count; i++) { - convertToRgb(src, srcOffset, scale, dest, destOffset); - srcOffset += 4; - destOffset += 3 + alpha01; - } - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - return inputLength / 4 * (3 + alpha01) | 0; - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - } - }]); - - return DeviceCmykCS; - }(ColorSpace); - - return DeviceCmykCS; -}(); -var CalGrayCS = function CalGrayCSClosure() { - function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) { - var A = src[srcOffset] * scale; - var AG = Math.pow(A, cs.G); - var L = cs.YW * AG; - var val = Math.max(295.8 * Math.pow(L, 0.333333333333333333) - 40.8, 0); - dest[destOffset] = val; - dest[destOffset + 1] = val; - dest[destOffset + 2] = val; - } - - var CalGrayCS = function (_ColorSpace7) { - _inherits(CalGrayCS, _ColorSpace7); - - function CalGrayCS(whitePoint, blackPoint, gamma) { - _classCallCheck(this, CalGrayCS); - - var _this7 = _possibleConstructorReturn(this, (CalGrayCS.__proto__ || Object.getPrototypeOf(CalGrayCS)).call(this, 'CalGray', 1)); - - if (!whitePoint) { - throw new _util.FormatError('WhitePoint missing - required for color space CalGray'); - } - blackPoint = blackPoint || [0, 0, 0]; - gamma = gamma || 1; - _this7.XW = whitePoint[0]; - _this7.YW = whitePoint[1]; - _this7.ZW = whitePoint[2]; - _this7.XB = blackPoint[0]; - _this7.YB = blackPoint[1]; - _this7.ZB = blackPoint[2]; - _this7.G = gamma; - if (_this7.XW < 0 || _this7.ZW < 0 || _this7.YW !== 1) { - throw new _util.FormatError('Invalid WhitePoint components for ' + _this7.name + ', no fallback available'); - } - if (_this7.XB < 0 || _this7.YB < 0 || _this7.ZB < 0) { - (0, _util.info)('Invalid BlackPoint for ' + _this7.name + ', falling back to default.'); - _this7.XB = _this7.YB = _this7.ZB = 0; - } - if (_this7.XB !== 0 || _this7.YB !== 0 || _this7.ZB !== 0) { - (0, _util.warn)(_this7.name + ', BlackPoint: XB: ' + _this7.XB + ', YB: ' + _this7.YB + ', ' + ('ZB: ' + _this7.ZB + ', only default values are supported.')); - } - if (_this7.G < 1) { - (0, _util.info)('Invalid Gamma: ' + _this7.G + ' for ' + _this7.name + ', ' + 'falling back to default.'); - _this7.G = 1; - } - return _this7; - } - - _createClass(CalGrayCS, [{ - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - convertToRgb(this, src, srcOffset, dest, destOffset, 1); - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var scale = 1 / ((1 << bits) - 1); - for (var i = 0; i < count; ++i) { - convertToRgb(this, src, srcOffset, dest, destOffset, scale); - srcOffset += 1; - destOffset += 3 + alpha01; - } - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01); - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - } - }]); - - return CalGrayCS; - }(ColorSpace); - - return CalGrayCS; -}(); -var CalRGBCS = function CalRGBCSClosure() { - var BRADFORD_SCALE_MATRIX = new Float32Array([0.8951, 0.2664, -0.1614, -0.7502, 1.7135, 0.0367, 0.0389, -0.0685, 1.0296]); - var BRADFORD_SCALE_INVERSE_MATRIX = new Float32Array([0.9869929, -0.1470543, 0.1599627, 0.4323053, 0.5183603, 0.0492912, -0.0085287, 0.0400428, 0.9684867]); - var SRGB_D65_XYZ_TO_RGB_MATRIX = new Float32Array([3.2404542, -1.5371385, -0.4985314, -0.9692660, 1.8760108, 0.0415560, 0.0556434, -0.2040259, 1.0572252]); - var FLAT_WHITEPOINT_MATRIX = new Float32Array([1, 1, 1]); - var tempNormalizeMatrix = new Float32Array(3); - var tempConvertMatrix1 = new Float32Array(3); - var tempConvertMatrix2 = new Float32Array(3); - var DECODE_L_CONSTANT = Math.pow((8 + 16) / 116, 3) / 8.0; - function matrixProduct(a, b, result) { - result[0] = a[0] * b[0] + a[1] * b[1] + a[2] * b[2]; - result[1] = a[3] * b[0] + a[4] * b[1] + a[5] * b[2]; - result[2] = a[6] * b[0] + a[7] * b[1] + a[8] * b[2]; - } - function convertToFlat(sourceWhitePoint, LMS, result) { - result[0] = LMS[0] * 1 / sourceWhitePoint[0]; - result[1] = LMS[1] * 1 / sourceWhitePoint[1]; - result[2] = LMS[2] * 1 / sourceWhitePoint[2]; - } - function convertToD65(sourceWhitePoint, LMS, result) { - var D65X = 0.95047; - var D65Y = 1; - var D65Z = 1.08883; - result[0] = LMS[0] * D65X / sourceWhitePoint[0]; - result[1] = LMS[1] * D65Y / sourceWhitePoint[1]; - result[2] = LMS[2] * D65Z / sourceWhitePoint[2]; - } - function sRGBTransferFunction(color) { - if (color <= 0.0031308) { - return adjustToRange(0, 1, 12.92 * color); - } - return adjustToRange(0, 1, (1 + 0.055) * Math.pow(color, 1 / 2.4) - 0.055); - } - function adjustToRange(min, max, value) { - return Math.max(min, Math.min(max, value)); - } - function decodeL(L) { - if (L < 0) { - return -decodeL(-L); - } - if (L > 8.0) { - return Math.pow((L + 16) / 116, 3); - } - return L * DECODE_L_CONSTANT; - } - function compensateBlackPoint(sourceBlackPoint, XYZ_Flat, result) { - if (sourceBlackPoint[0] === 0 && sourceBlackPoint[1] === 0 && sourceBlackPoint[2] === 0) { - result[0] = XYZ_Flat[0]; - result[1] = XYZ_Flat[1]; - result[2] = XYZ_Flat[2]; - return; - } - var zeroDecodeL = decodeL(0); - var X_DST = zeroDecodeL; - var X_SRC = decodeL(sourceBlackPoint[0]); - var Y_DST = zeroDecodeL; - var Y_SRC = decodeL(sourceBlackPoint[1]); - var Z_DST = zeroDecodeL; - var Z_SRC = decodeL(sourceBlackPoint[2]); - var X_Scale = (1 - X_DST) / (1 - X_SRC); - var X_Offset = 1 - X_Scale; - var Y_Scale = (1 - Y_DST) / (1 - Y_SRC); - var Y_Offset = 1 - Y_Scale; - var Z_Scale = (1 - Z_DST) / (1 - Z_SRC); - var Z_Offset = 1 - Z_Scale; - result[0] = XYZ_Flat[0] * X_Scale + X_Offset; - result[1] = XYZ_Flat[1] * Y_Scale + Y_Offset; - result[2] = XYZ_Flat[2] * Z_Scale + Z_Offset; - } - function normalizeWhitePointToFlat(sourceWhitePoint, XYZ_In, result) { - if (sourceWhitePoint[0] === 1 && sourceWhitePoint[2] === 1) { - result[0] = XYZ_In[0]; - result[1] = XYZ_In[1]; - result[2] = XYZ_In[2]; - return; - } - var LMS = result; - matrixProduct(BRADFORD_SCALE_MATRIX, XYZ_In, LMS); - var LMS_Flat = tempNormalizeMatrix; - convertToFlat(sourceWhitePoint, LMS, LMS_Flat); - matrixProduct(BRADFORD_SCALE_INVERSE_MATRIX, LMS_Flat, result); - } - function normalizeWhitePointToD65(sourceWhitePoint, XYZ_In, result) { - var LMS = result; - matrixProduct(BRADFORD_SCALE_MATRIX, XYZ_In, LMS); - var LMS_D65 = tempNormalizeMatrix; - convertToD65(sourceWhitePoint, LMS, LMS_D65); - matrixProduct(BRADFORD_SCALE_INVERSE_MATRIX, LMS_D65, result); - } - function convertToRgb(cs, src, srcOffset, dest, destOffset, scale) { - var A = adjustToRange(0, 1, src[srcOffset] * scale); - var B = adjustToRange(0, 1, src[srcOffset + 1] * scale); - var C = adjustToRange(0, 1, src[srcOffset + 2] * scale); - var AGR = Math.pow(A, cs.GR); - var BGG = Math.pow(B, cs.GG); - var CGB = Math.pow(C, cs.GB); - var X = cs.MXA * AGR + cs.MXB * BGG + cs.MXC * CGB; - var Y = cs.MYA * AGR + cs.MYB * BGG + cs.MYC * CGB; - var Z = cs.MZA * AGR + cs.MZB * BGG + cs.MZC * CGB; - var XYZ = tempConvertMatrix1; - XYZ[0] = X; - XYZ[1] = Y; - XYZ[2] = Z; - var XYZ_Flat = tempConvertMatrix2; - normalizeWhitePointToFlat(cs.whitePoint, XYZ, XYZ_Flat); - var XYZ_Black = tempConvertMatrix1; - compensateBlackPoint(cs.blackPoint, XYZ_Flat, XYZ_Black); - var XYZ_D65 = tempConvertMatrix2; - normalizeWhitePointToD65(FLAT_WHITEPOINT_MATRIX, XYZ_Black, XYZ_D65); - var SRGB = tempConvertMatrix1; - matrixProduct(SRGB_D65_XYZ_TO_RGB_MATRIX, XYZ_D65, SRGB); - dest[destOffset] = sRGBTransferFunction(SRGB[0]) * 255; - dest[destOffset + 1] = sRGBTransferFunction(SRGB[1]) * 255; - dest[destOffset + 2] = sRGBTransferFunction(SRGB[2]) * 255; - } - - var CalRGBCS = function (_ColorSpace8) { - _inherits(CalRGBCS, _ColorSpace8); - - function CalRGBCS(whitePoint, blackPoint, gamma, matrix) { - _classCallCheck(this, CalRGBCS); - - var _this8 = _possibleConstructorReturn(this, (CalRGBCS.__proto__ || Object.getPrototypeOf(CalRGBCS)).call(this, 'CalRGB', 3)); - - if (!whitePoint) { - throw new _util.FormatError('WhitePoint missing - required for color space CalRGB'); - } - blackPoint = blackPoint || new Float32Array(3); - gamma = gamma || new Float32Array([1, 1, 1]); - matrix = matrix || new Float32Array([1, 0, 0, 0, 1, 0, 0, 0, 1]); - var XW = whitePoint[0]; - var YW = whitePoint[1]; - var ZW = whitePoint[2]; - _this8.whitePoint = whitePoint; - var XB = blackPoint[0]; - var YB = blackPoint[1]; - var ZB = blackPoint[2]; - _this8.blackPoint = blackPoint; - _this8.GR = gamma[0]; - _this8.GG = gamma[1]; - _this8.GB = gamma[2]; - _this8.MXA = matrix[0]; - _this8.MYA = matrix[1]; - _this8.MZA = matrix[2]; - _this8.MXB = matrix[3]; - _this8.MYB = matrix[4]; - _this8.MZB = matrix[5]; - _this8.MXC = matrix[6]; - _this8.MYC = matrix[7]; - _this8.MZC = matrix[8]; - if (XW < 0 || ZW < 0 || YW !== 1) { - throw new _util.FormatError('Invalid WhitePoint components for ' + _this8.name + ', no fallback available'); - } - if (XB < 0 || YB < 0 || ZB < 0) { - (0, _util.info)('Invalid BlackPoint for ' + _this8.name + ' [' + XB + ', ' + YB + ', ' + ZB + '], ' + 'falling back to default.'); - _this8.blackPoint = new Float32Array(3); - } - if (_this8.GR < 0 || _this8.GG < 0 || _this8.GB < 0) { - (0, _util.info)('Invalid Gamma [' + _this8.GR + ', ' + _this8.GG + ', ' + _this8.GB + '] for ' + (_this8.name + ', falling back to default.')); - _this8.GR = _this8.GG = _this8.GB = 1; - } - return _this8; - } - - _createClass(CalRGBCS, [{ - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - convertToRgb(this, src, srcOffset, dest, destOffset, 1); - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var scale = 1 / ((1 << bits) - 1); - for (var i = 0; i < count; ++i) { - convertToRgb(this, src, srcOffset, dest, destOffset, scale); - srcOffset += 3; - destOffset += 3 + alpha01; - } - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01) / 3 | 0; - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decodeMap) { - return ColorSpace.isDefaultDecode(decodeMap, this.numComps); - } - }]); - - return CalRGBCS; - }(ColorSpace); - - return CalRGBCS; -}(); -var LabCS = function LabCSClosure() { - function fn_g(x) { - var result = void 0; - if (x >= 6 / 29) { - result = x * x * x; - } else { - result = 108 / 841 * (x - 4 / 29); - } - return result; - } - function decode(value, high1, low2, high2) { - return low2 + value * (high2 - low2) / high1; - } - function convertToRgb(cs, src, srcOffset, maxVal, dest, destOffset) { - var Ls = src[srcOffset]; - var as = src[srcOffset + 1]; - var bs = src[srcOffset + 2]; - if (maxVal !== false) { - Ls = decode(Ls, maxVal, 0, 100); - as = decode(as, maxVal, cs.amin, cs.amax); - bs = decode(bs, maxVal, cs.bmin, cs.bmax); - } - as = as > cs.amax ? cs.amax : as < cs.amin ? cs.amin : as; - bs = bs > cs.bmax ? cs.bmax : bs < cs.bmin ? cs.bmin : bs; - var M = (Ls + 16) / 116; - var L = M + as / 500; - var N = M - bs / 200; - var X = cs.XW * fn_g(L); - var Y = cs.YW * fn_g(M); - var Z = cs.ZW * fn_g(N); - var r = void 0, - g = void 0, - b = void 0; - if (cs.ZW < 1) { - r = X * 3.1339 + Y * -1.6170 + Z * -0.4906; - g = X * -0.9785 + Y * 1.9160 + Z * 0.0333; - b = X * 0.0720 + Y * -0.2290 + Z * 1.4057; - } else { - r = X * 3.2406 + Y * -1.5372 + Z * -0.4986; - g = X * -0.9689 + Y * 1.8758 + Z * 0.0415; - b = X * 0.0557 + Y * -0.2040 + Z * 1.0570; - } - dest[destOffset] = Math.sqrt(r) * 255; - dest[destOffset + 1] = Math.sqrt(g) * 255; - dest[destOffset + 2] = Math.sqrt(b) * 255; - } - - var LabCS = function (_ColorSpace9) { - _inherits(LabCS, _ColorSpace9); - - function LabCS(whitePoint, blackPoint, range) { - _classCallCheck(this, LabCS); - - var _this9 = _possibleConstructorReturn(this, (LabCS.__proto__ || Object.getPrototypeOf(LabCS)).call(this, 'Lab', 3)); - - if (!whitePoint) { - throw new _util.FormatError('WhitePoint missing - required for color space Lab'); - } - blackPoint = blackPoint || [0, 0, 0]; - range = range || [-100, 100, -100, 100]; - _this9.XW = whitePoint[0]; - _this9.YW = whitePoint[1]; - _this9.ZW = whitePoint[2]; - _this9.amin = range[0]; - _this9.amax = range[1]; - _this9.bmin = range[2]; - _this9.bmax = range[3]; - _this9.XB = blackPoint[0]; - _this9.YB = blackPoint[1]; - _this9.ZB = blackPoint[2]; - if (_this9.XW < 0 || _this9.ZW < 0 || _this9.YW !== 1) { - throw new _util.FormatError('Invalid WhitePoint components, no fallback available'); - } - if (_this9.XB < 0 || _this9.YB < 0 || _this9.ZB < 0) { - (0, _util.info)('Invalid BlackPoint, falling back to default'); - _this9.XB = _this9.YB = _this9.ZB = 0; - } - if (_this9.amin > _this9.amax || _this9.bmin > _this9.bmax) { - (0, _util.info)('Invalid Range, falling back to defaults'); - _this9.amin = -100; - _this9.amax = 100; - _this9.bmin = -100; - _this9.bmax = 100; - } - return _this9; - } - - _createClass(LabCS, [{ - key: 'getRgbItem', - value: function getRgbItem(src, srcOffset, dest, destOffset) { - convertToRgb(this, src, srcOffset, false, dest, destOffset); - } - }, { - key: 'getRgbBuffer', - value: function getRgbBuffer(src, srcOffset, count, dest, destOffset, bits, alpha01) { - var maxVal = (1 << bits) - 1; - for (var i = 0; i < count; i++) { - convertToRgb(this, src, srcOffset, maxVal, dest, destOffset); - srcOffset += 3; - destOffset += 3 + alpha01; - } - } - }, { - key: 'getOutputLength', - value: function getOutputLength(inputLength, alpha01) { - return inputLength * (3 + alpha01) / 3 | 0; - } - }, { - key: 'isDefaultDecode', - value: function isDefaultDecode(decodeMap) { - return true; - } - }, { - key: 'usesZeroToOneRange', - get: function get() { - return (0, _util.shadow)(this, 'usesZeroToOneRange', false); - } - }]); - - return LabCS; - }(ColorSpace); - - return LabCS; -}(); -exports.ColorSpace = ColorSpace; - -/***/ }), -/* 152 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.AnnotationFactory = exports.AnnotationBorderStyle = exports.Annotation = undefined; - -var _get = function get(object, property, receiver) { if (object === null) object = Function.prototype; var desc = Object.getOwnPropertyDescriptor(object, property); if (desc === undefined) { var parent = Object.getPrototypeOf(object); if (parent === null) { return undefined; } else { return get(parent, property, receiver); } } else if ("value" in desc) { return desc.value; } else { var getter = desc.get; if (getter === undefined) { return undefined; } return getter.call(receiver); } }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _util = __w_pdfjs_require__(2); - -var _obj = __w_pdfjs_require__(137); - -var _primitives = __w_pdfjs_require__(138); - -var _colorspace = __w_pdfjs_require__(151); - -var _operator_list = __w_pdfjs_require__(153); - -var _stream = __w_pdfjs_require__(140); - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var AnnotationFactory = function () { - function AnnotationFactory() { - _classCallCheck(this, AnnotationFactory); - } - - _createClass(AnnotationFactory, null, [{ - key: 'create', - value: function create(xref, ref, pdfManager, idFactory) { - return pdfManager.ensure(this, '_create', [xref, ref, pdfManager, idFactory]); - } - }, { - key: '_create', - value: function _create(xref, ref, pdfManager, idFactory) { - var dict = xref.fetchIfRef(ref); - if (!(0, _primitives.isDict)(dict)) { - return; - } - var id = (0, _primitives.isRef)(ref) ? ref.toString() : 'annot_' + idFactory.createObjId(); - var subtype = dict.get('Subtype'); - subtype = (0, _primitives.isName)(subtype) ? subtype.name : null; - var parameters = { - xref: xref, - dict: dict, - ref: (0, _primitives.isRef)(ref) ? ref : null, - subtype: subtype, - id: id, - pdfManager: pdfManager - }; - switch (subtype) { - case 'Link': - return new LinkAnnotation(parameters); - case 'Text': - return new TextAnnotation(parameters); - case 'Widget': - var fieldType = (0, _util.getInheritableProperty)({ - dict: dict, - key: 'FT' - }); - fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; - switch (fieldType) { - case 'Tx': - return new TextWidgetAnnotation(parameters); - case 'Btn': - return new ButtonWidgetAnnotation(parameters); - case 'Ch': - return new ChoiceWidgetAnnotation(parameters); - } - (0, _util.warn)('Unimplemented widget field type "' + fieldType + '", ' + 'falling back to base field type.'); - return new WidgetAnnotation(parameters); - case 'Popup': - return new PopupAnnotation(parameters); - case 'Line': - return new LineAnnotation(parameters); - case 'Square': - return new SquareAnnotation(parameters); - case 'Circle': - return new CircleAnnotation(parameters); - case 'PolyLine': - return new PolylineAnnotation(parameters); - case 'Polygon': - return new PolygonAnnotation(parameters); - case 'Ink': - return new InkAnnotation(parameters); - case 'Highlight': - return new HighlightAnnotation(parameters); - case 'Underline': - return new UnderlineAnnotation(parameters); - case 'Squiggly': - return new SquigglyAnnotation(parameters); - case 'StrikeOut': - return new StrikeOutAnnotation(parameters); - case 'Stamp': - return new StampAnnotation(parameters); - case 'FileAttachment': - return new FileAttachmentAnnotation(parameters); - default: - if (!subtype) { - (0, _util.warn)('Annotation is missing the required /Subtype.'); - } else { - (0, _util.warn)('Unimplemented annotation type "' + subtype + '", ' + 'falling back to base annotation.'); - } - return new Annotation(parameters); - } - } - }]); - - return AnnotationFactory; -}(); - -function getTransformMatrix(rect, bbox, matrix) { - var bounds = _util.Util.getAxialAlignedBoundingBox(bbox, matrix); - var minX = bounds[0]; - var minY = bounds[1]; - var maxX = bounds[2]; - var maxY = bounds[3]; - if (minX === maxX || minY === maxY) { - return [1, 0, 0, 1, rect[0], rect[1]]; - } - var xRatio = (rect[2] - rect[0]) / (maxX - minX); - var yRatio = (rect[3] - rect[1]) / (maxY - minY); - return [xRatio, 0, 0, yRatio, rect[0] - minX * xRatio, rect[1] - minY * yRatio]; -} - -var Annotation = function () { - function Annotation(params) { - _classCallCheck(this, Annotation); - - var dict = params.dict; - this.setFlags(dict.get('F')); - this.setRectangle(dict.getArray('Rect')); - this.setColor(dict.getArray('C')); - this.setBorderStyle(dict); - this.setAppearance(dict); - this.data = { - annotationFlags: this.flags, - borderStyle: this.borderStyle, - color: this.color, - hasAppearance: !!this.appearance, - id: params.id, - rect: this.rectangle, - subtype: params.subtype - }; - } - - _createClass(Annotation, [{ - key: '_hasFlag', - value: function _hasFlag(flags, flag) { - return !!(flags & flag); - } - }, { - key: '_isViewable', - value: function _isViewable(flags) { - return !this._hasFlag(flags, _util.AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, _util.AnnotationFlag.HIDDEN) && !this._hasFlag(flags, _util.AnnotationFlag.NOVIEW); - } - }, { - key: '_isPrintable', - value: function _isPrintable(flags) { - return this._hasFlag(flags, _util.AnnotationFlag.PRINT) && !this._hasFlag(flags, _util.AnnotationFlag.INVISIBLE) && !this._hasFlag(flags, _util.AnnotationFlag.HIDDEN); - } - }, { - key: 'setFlags', - value: function setFlags(flags) { - this.flags = Number.isInteger(flags) && flags > 0 ? flags : 0; - } - }, { - key: 'hasFlag', - value: function hasFlag(flag) { - return this._hasFlag(this.flags, flag); - } - }, { - key: 'setRectangle', - value: function setRectangle(rectangle) { - if (Array.isArray(rectangle) && rectangle.length === 4) { - this.rectangle = _util.Util.normalizeRect(rectangle); - } else { - this.rectangle = [0, 0, 0, 0]; - } - } - }, { - key: 'setColor', - value: function setColor(color) { - var rgbColor = new Uint8ClampedArray(3); - if (!Array.isArray(color)) { - this.color = rgbColor; - return; - } - switch (color.length) { - case 0: - this.color = null; - break; - case 1: - _colorspace.ColorSpace.singletons.gray.getRgbItem(color, 0, rgbColor, 0); - this.color = rgbColor; - break; - case 3: - _colorspace.ColorSpace.singletons.rgb.getRgbItem(color, 0, rgbColor, 0); - this.color = rgbColor; - break; - case 4: - _colorspace.ColorSpace.singletons.cmyk.getRgbItem(color, 0, rgbColor, 0); - this.color = rgbColor; - break; - default: - this.color = rgbColor; - break; - } - } - }, { - key: 'setBorderStyle', - value: function setBorderStyle(borderStyle) { - this.borderStyle = new AnnotationBorderStyle(); - if (!(0, _primitives.isDict)(borderStyle)) { - return; - } - if (borderStyle.has('BS')) { - var dict = borderStyle.get('BS'); - var dictType = dict.get('Type'); - if (!dictType || (0, _primitives.isName)(dictType, 'Border')) { - this.borderStyle.setWidth(dict.get('W')); - this.borderStyle.setStyle(dict.get('S')); - this.borderStyle.setDashArray(dict.getArray('D')); - } - } else if (borderStyle.has('Border')) { - var array = borderStyle.getArray('Border'); - if (Array.isArray(array) && array.length >= 3) { - this.borderStyle.setHorizontalCornerRadius(array[0]); - this.borderStyle.setVerticalCornerRadius(array[1]); - this.borderStyle.setWidth(array[2]); - if (array.length === 4) { - this.borderStyle.setDashArray(array[3]); - } - } - } else { - this.borderStyle.setWidth(0); - } - } - }, { - key: 'setAppearance', - value: function setAppearance(dict) { - this.appearance = null; - var appearanceStates = dict.get('AP'); - if (!(0, _primitives.isDict)(appearanceStates)) { - return; - } - var normalAppearanceState = appearanceStates.get('N'); - if ((0, _primitives.isStream)(normalAppearanceState)) { - this.appearance = normalAppearanceState; - return; - } - if (!(0, _primitives.isDict)(normalAppearanceState)) { - return; - } - var as = dict.get('AS'); - if (!(0, _primitives.isName)(as) || !normalAppearanceState.has(as.name)) { - return; - } - this.appearance = normalAppearanceState.get(as.name); - } - }, { - key: '_preparePopup', - value: function _preparePopup(dict) { - if (!dict.has('C')) { - this.data.color = null; - } - this.data.hasPopup = dict.has('Popup'); - this.data.title = (0, _util.stringToPDFString)(dict.get('T') || ''); - this.data.contents = (0, _util.stringToPDFString)(dict.get('Contents') || ''); - } - }, { - key: 'loadResources', - value: function loadResources(keys) { - return this.appearance.dict.getAsync('Resources').then(function (resources) { - if (!resources) { - return; - } - var objectLoader = new _obj.ObjectLoader(resources, keys, resources.xref); - return objectLoader.load().then(function () { - return resources; - }); - }); - } - }, { - key: 'getOperatorList', - value: function getOperatorList(evaluator, task, renderForms) { - var _this = this; - - if (!this.appearance) { - return Promise.resolve(new _operator_list.OperatorList()); - } - var data = this.data; - var appearanceDict = this.appearance.dict; - var resourcesPromise = this.loadResources(['ExtGState', 'ColorSpace', 'Pattern', 'Shading', 'XObject', 'Font']); - var bbox = appearanceDict.getArray('BBox') || [0, 0, 1, 1]; - var matrix = appearanceDict.getArray('Matrix') || [1, 0, 0, 1, 0, 0]; - var transform = getTransformMatrix(data.rect, bbox, matrix); - return resourcesPromise.then(function (resources) { - var opList = new _operator_list.OperatorList(); - opList.addOp(_util.OPS.beginAnnotation, [data.rect, transform, matrix]); - return evaluator.getOperatorList({ - stream: _this.appearance, - task: task, - resources: resources, - operatorList: opList - }).then(function () { - opList.addOp(_util.OPS.endAnnotation, []); - _this.appearance.reset(); - return opList; - }); - }); - } - }, { - key: 'viewable', - get: function get() { - if (this.flags === 0) { - return true; - } - return this._isViewable(this.flags); - } - }, { - key: 'printable', - get: function get() { - if (this.flags === 0) { - return false; - } - return this._isPrintable(this.flags); - } - }]); - - return Annotation; -}(); - -var AnnotationBorderStyle = function () { - function AnnotationBorderStyle() { - _classCallCheck(this, AnnotationBorderStyle); - - this.width = 1; - this.style = _util.AnnotationBorderStyleType.SOLID; - this.dashArray = [3]; - this.horizontalCornerRadius = 0; - this.verticalCornerRadius = 0; - } - - _createClass(AnnotationBorderStyle, [{ - key: 'setWidth', - value: function setWidth(width) { - if (Number.isInteger(width)) { - this.width = width; - } - } - }, { - key: 'setStyle', - value: function setStyle(style) { - if (!style) { - return; - } - switch (style.name) { - case 'S': - this.style = _util.AnnotationBorderStyleType.SOLID; - break; - case 'D': - this.style = _util.AnnotationBorderStyleType.DASHED; - break; - case 'B': - this.style = _util.AnnotationBorderStyleType.BEVELED; - break; - case 'I': - this.style = _util.AnnotationBorderStyleType.INSET; - break; - case 'U': - this.style = _util.AnnotationBorderStyleType.UNDERLINE; - break; - default: - break; - } - } - }, { - key: 'setDashArray', - value: function setDashArray(dashArray) { - if (Array.isArray(dashArray) && dashArray.length > 0) { - var isValid = true; - var allZeros = true; - for (var i = 0, len = dashArray.length; i < len; i++) { - var element = dashArray[i]; - var validNumber = +element >= 0; - if (!validNumber) { - isValid = false; - break; - } else if (element > 0) { - allZeros = false; - } - } - if (isValid && !allZeros) { - this.dashArray = dashArray; - } else { - this.width = 0; - } - } else if (dashArray) { - this.width = 0; - } - } - }, { - key: 'setHorizontalCornerRadius', - value: function setHorizontalCornerRadius(radius) { - if (Number.isInteger(radius)) { - this.horizontalCornerRadius = radius; - } - } - }, { - key: 'setVerticalCornerRadius', - value: function setVerticalCornerRadius(radius) { - if (Number.isInteger(radius)) { - this.verticalCornerRadius = radius; - } - } - }]); - - return AnnotationBorderStyle; -}(); - -var WidgetAnnotation = function (_Annotation) { - _inherits(WidgetAnnotation, _Annotation); - - function WidgetAnnotation(params) { - _classCallCheck(this, WidgetAnnotation); - - var _this2 = _possibleConstructorReturn(this, (WidgetAnnotation.__proto__ || Object.getPrototypeOf(WidgetAnnotation)).call(this, params)); - - var dict = params.dict; - var data = _this2.data; - data.annotationType = _util.AnnotationType.WIDGET; - data.fieldName = _this2._constructFieldName(dict); - data.fieldValue = (0, _util.getInheritableProperty)({ - dict: dict, - key: 'V', - getArray: true - }); - data.alternativeText = (0, _util.stringToPDFString)(dict.get('TU') || ''); - data.defaultAppearance = (0, _util.getInheritableProperty)({ - dict: dict, - key: 'DA' - }) || ''; - var fieldType = (0, _util.getInheritableProperty)({ - dict: dict, - key: 'FT' - }); - data.fieldType = (0, _primitives.isName)(fieldType) ? fieldType.name : null; - _this2.fieldResources = (0, _util.getInheritableProperty)({ - dict: dict, - key: 'DR' - }) || _primitives.Dict.empty; - data.fieldFlags = (0, _util.getInheritableProperty)({ - dict: dict, - key: 'Ff' - }); - if (!Number.isInteger(data.fieldFlags) || data.fieldFlags < 0) { - data.fieldFlags = 0; - } - data.readOnly = _this2.hasFieldFlag(_util.AnnotationFieldFlag.READONLY); - if (data.fieldType === 'Sig') { - _this2.setFlags(_util.AnnotationFlag.HIDDEN); - } - return _this2; - } - - _createClass(WidgetAnnotation, [{ - key: '_constructFieldName', - value: function _constructFieldName(dict) { - if (!dict.has('T') && !dict.has('Parent')) { - (0, _util.warn)('Unknown field name, falling back to empty field name.'); - return ''; - } - if (!dict.has('Parent')) { - return (0, _util.stringToPDFString)(dict.get('T')); - } - var fieldName = []; - if (dict.has('T')) { - fieldName.unshift((0, _util.stringToPDFString)(dict.get('T'))); - } - var loopDict = dict; - while (loopDict.has('Parent')) { - loopDict = loopDict.get('Parent'); - if (!(0, _primitives.isDict)(loopDict)) { - break; - } - if (loopDict.has('T')) { - fieldName.unshift((0, _util.stringToPDFString)(loopDict.get('T'))); - } - } - return fieldName.join('.'); - } - }, { - key: 'hasFieldFlag', - value: function hasFieldFlag(flag) { - return !!(this.data.fieldFlags & flag); - } - }, { - key: 'getOperatorList', - value: function getOperatorList(evaluator, task, renderForms) { - if (renderForms) { - return Promise.resolve(new _operator_list.OperatorList()); - } - return _get(WidgetAnnotation.prototype.__proto__ || Object.getPrototypeOf(WidgetAnnotation.prototype), 'getOperatorList', this).call(this, evaluator, task, renderForms); - } - }]); - - return WidgetAnnotation; -}(Annotation); - -var TextWidgetAnnotation = function (_WidgetAnnotation) { - _inherits(TextWidgetAnnotation, _WidgetAnnotation); - - function TextWidgetAnnotation(params) { - _classCallCheck(this, TextWidgetAnnotation); - - var _this3 = _possibleConstructorReturn(this, (TextWidgetAnnotation.__proto__ || Object.getPrototypeOf(TextWidgetAnnotation)).call(this, params)); - - var dict = params.dict; - _this3.data.fieldValue = (0, _util.stringToPDFString)(_this3.data.fieldValue || ''); - var alignment = (0, _util.getInheritableProperty)({ - dict: dict, - key: 'Q' - }); - if (!Number.isInteger(alignment) || alignment < 0 || alignment > 2) { - alignment = null; - } - _this3.data.textAlignment = alignment; - var maximumLength = (0, _util.getInheritableProperty)({ - dict: dict, - key: 'MaxLen' - }); - if (!Number.isInteger(maximumLength) || maximumLength < 0) { - maximumLength = null; - } - _this3.data.maxLen = maximumLength; - _this3.data.multiLine = _this3.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE); - _this3.data.comb = _this3.hasFieldFlag(_util.AnnotationFieldFlag.COMB) && !_this3.hasFieldFlag(_util.AnnotationFieldFlag.MULTILINE) && !_this3.hasFieldFlag(_util.AnnotationFieldFlag.PASSWORD) && !_this3.hasFieldFlag(_util.AnnotationFieldFlag.FILESELECT) && _this3.data.maxLen !== null; - return _this3; - } - - _createClass(TextWidgetAnnotation, [{ - key: 'getOperatorList', - value: function getOperatorList(evaluator, task, renderForms) { - if (renderForms || this.appearance) { - return _get(TextWidgetAnnotation.prototype.__proto__ || Object.getPrototypeOf(TextWidgetAnnotation.prototype), 'getOperatorList', this).call(this, evaluator, task, renderForms); - } - var operatorList = new _operator_list.OperatorList(); - if (!this.data.defaultAppearance) { - return Promise.resolve(operatorList); - } - var stream = new _stream.Stream((0, _util.stringToBytes)(this.data.defaultAppearance)); - return evaluator.getOperatorList({ - stream: stream, - task: task, - resources: this.fieldResources, - operatorList: operatorList - }).then(function () { - return operatorList; - }); - } - }]); - - return TextWidgetAnnotation; -}(WidgetAnnotation); - -var ButtonWidgetAnnotation = function (_WidgetAnnotation2) { - _inherits(ButtonWidgetAnnotation, _WidgetAnnotation2); - - function ButtonWidgetAnnotation(params) { - _classCallCheck(this, ButtonWidgetAnnotation); - - var _this4 = _possibleConstructorReturn(this, (ButtonWidgetAnnotation.__proto__ || Object.getPrototypeOf(ButtonWidgetAnnotation)).call(this, params)); - - _this4.data.checkBox = !_this4.hasFieldFlag(_util.AnnotationFieldFlag.RADIO) && !_this4.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); - _this4.data.radioButton = _this4.hasFieldFlag(_util.AnnotationFieldFlag.RADIO) && !_this4.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); - _this4.data.pushButton = _this4.hasFieldFlag(_util.AnnotationFieldFlag.PUSHBUTTON); - if (_this4.data.checkBox) { - _this4._processCheckBox(params); - } else if (_this4.data.radioButton) { - _this4._processRadioButton(params); - } else if (_this4.data.pushButton) { - _this4._processPushButton(params); - } else { - (0, _util.warn)('Invalid field flags for button widget annotation'); - } - return _this4; - } - - _createClass(ButtonWidgetAnnotation, [{ - key: '_processCheckBox', - value: function _processCheckBox(params) { - if ((0, _primitives.isName)(this.data.fieldValue)) { - this.data.fieldValue = this.data.fieldValue.name; - } - var customAppearance = params.dict.get('AP'); - if (!(0, _primitives.isDict)(customAppearance)) { - return; - } - var exportValueOptionsDict = customAppearance.get('D'); - if (!(0, _primitives.isDict)(exportValueOptionsDict)) { - return; - } - var exportValues = exportValueOptionsDict.getKeys(); - var hasCorrectOptionCount = exportValues.length === 2; - if (!hasCorrectOptionCount) { - return; - } - this.data.exportValue = exportValues[0] === 'Off' ? exportValues[1] : exportValues[0]; - } - }, { - key: '_processRadioButton', - value: function _processRadioButton(params) { - this.data.fieldValue = this.data.buttonValue = null; - var fieldParent = params.dict.get('Parent'); - if ((0, _primitives.isDict)(fieldParent) && fieldParent.has('V')) { - var fieldParentValue = fieldParent.get('V'); - if ((0, _primitives.isName)(fieldParentValue)) { - this.data.fieldValue = fieldParentValue.name; - } - } - var appearanceStates = params.dict.get('AP'); - if (!(0, _primitives.isDict)(appearanceStates)) { - return; - } - var normalAppearanceState = appearanceStates.get('N'); - if (!(0, _primitives.isDict)(normalAppearanceState)) { - return; - } - var keys = normalAppearanceState.getKeys(); - for (var i = 0, ii = keys.length; i < ii; i++) { - if (keys[i] !== 'Off') { - this.data.buttonValue = keys[i]; - break; - } - } - } - }, { - key: '_processPushButton', - value: function _processPushButton(params) { - if (!params.dict.has('A')) { - (0, _util.warn)('Push buttons without action dictionaries are not supported'); - return; - } - _obj.Catalog.parseDestDictionary({ - destDict: params.dict, - resultObj: this.data, - docBaseUrl: params.pdfManager.docBaseUrl - }); - } - }]); - - return ButtonWidgetAnnotation; -}(WidgetAnnotation); - -var ChoiceWidgetAnnotation = function (_WidgetAnnotation3) { - _inherits(ChoiceWidgetAnnotation, _WidgetAnnotation3); - - function ChoiceWidgetAnnotation(params) { - _classCallCheck(this, ChoiceWidgetAnnotation); - - var _this5 = _possibleConstructorReturn(this, (ChoiceWidgetAnnotation.__proto__ || Object.getPrototypeOf(ChoiceWidgetAnnotation)).call(this, params)); - - _this5.data.options = []; - var options = (0, _util.getInheritableProperty)({ - dict: params.dict, - key: 'Opt' - }); - if (Array.isArray(options)) { - var xref = params.xref; - for (var i = 0, ii = options.length; i < ii; i++) { - var option = xref.fetchIfRef(options[i]); - var isOptionArray = Array.isArray(option); - _this5.data.options[i] = { - exportValue: isOptionArray ? xref.fetchIfRef(option[0]) : option, - displayValue: (0, _util.stringToPDFString)(isOptionArray ? xref.fetchIfRef(option[1]) : option) - }; - } - } - if (!Array.isArray(_this5.data.fieldValue)) { - _this5.data.fieldValue = [_this5.data.fieldValue]; - } - _this5.data.combo = _this5.hasFieldFlag(_util.AnnotationFieldFlag.COMBO); - _this5.data.multiSelect = _this5.hasFieldFlag(_util.AnnotationFieldFlag.MULTISELECT); - return _this5; - } - - return ChoiceWidgetAnnotation; -}(WidgetAnnotation); - -var TextAnnotation = function (_Annotation2) { - _inherits(TextAnnotation, _Annotation2); - - function TextAnnotation(parameters) { - _classCallCheck(this, TextAnnotation); - - var DEFAULT_ICON_SIZE = 22; - - var _this6 = _possibleConstructorReturn(this, (TextAnnotation.__proto__ || Object.getPrototypeOf(TextAnnotation)).call(this, parameters)); - - _this6.data.annotationType = _util.AnnotationType.TEXT; - if (_this6.data.hasAppearance) { - _this6.data.name = 'NoIcon'; - } else { - _this6.data.rect[1] = _this6.data.rect[3] - DEFAULT_ICON_SIZE; - _this6.data.rect[2] = _this6.data.rect[0] + DEFAULT_ICON_SIZE; - _this6.data.name = parameters.dict.has('Name') ? parameters.dict.get('Name').name : 'Note'; - } - _this6._preparePopup(parameters.dict); - return _this6; - } - - return TextAnnotation; -}(Annotation); - -var LinkAnnotation = function (_Annotation3) { - _inherits(LinkAnnotation, _Annotation3); - - function LinkAnnotation(params) { - _classCallCheck(this, LinkAnnotation); - - var _this7 = _possibleConstructorReturn(this, (LinkAnnotation.__proto__ || Object.getPrototypeOf(LinkAnnotation)).call(this, params)); - - _this7.data.annotationType = _util.AnnotationType.LINK; - _obj.Catalog.parseDestDictionary({ - destDict: params.dict, - resultObj: _this7.data, - docBaseUrl: params.pdfManager.docBaseUrl - }); - return _this7; - } - - return LinkAnnotation; -}(Annotation); - -var PopupAnnotation = function (_Annotation4) { - _inherits(PopupAnnotation, _Annotation4); - - function PopupAnnotation(parameters) { - _classCallCheck(this, PopupAnnotation); - - var _this8 = _possibleConstructorReturn(this, (PopupAnnotation.__proto__ || Object.getPrototypeOf(PopupAnnotation)).call(this, parameters)); - - _this8.data.annotationType = _util.AnnotationType.POPUP; - var dict = parameters.dict; - var parentItem = dict.get('Parent'); - if (!parentItem) { - (0, _util.warn)('Popup annotation has a missing or invalid parent annotation.'); - return _possibleConstructorReturn(_this8); - } - var parentSubtype = parentItem.get('Subtype'); - _this8.data.parentType = (0, _primitives.isName)(parentSubtype) ? parentSubtype.name : null; - _this8.data.parentId = dict.getRaw('Parent').toString(); - _this8.data.title = (0, _util.stringToPDFString)(parentItem.get('T') || ''); - _this8.data.contents = (0, _util.stringToPDFString)(parentItem.get('Contents') || ''); - if (!parentItem.has('C')) { - _this8.data.color = null; - } else { - _this8.setColor(parentItem.getArray('C')); - _this8.data.color = _this8.color; - } - if (!_this8.viewable) { - var parentFlags = parentItem.get('F'); - if (_this8._isViewable(parentFlags)) { - _this8.setFlags(parentFlags); - } - } - return _this8; - } - - return PopupAnnotation; -}(Annotation); - -var LineAnnotation = function (_Annotation5) { - _inherits(LineAnnotation, _Annotation5); - - function LineAnnotation(parameters) { - _classCallCheck(this, LineAnnotation); - - var _this9 = _possibleConstructorReturn(this, (LineAnnotation.__proto__ || Object.getPrototypeOf(LineAnnotation)).call(this, parameters)); - - _this9.data.annotationType = _util.AnnotationType.LINE; - var dict = parameters.dict; - _this9.data.lineCoordinates = _util.Util.normalizeRect(dict.getArray('L')); - _this9._preparePopup(dict); - return _this9; - } - - return LineAnnotation; -}(Annotation); - -var SquareAnnotation = function (_Annotation6) { - _inherits(SquareAnnotation, _Annotation6); - - function SquareAnnotation(parameters) { - _classCallCheck(this, SquareAnnotation); - - var _this10 = _possibleConstructorReturn(this, (SquareAnnotation.__proto__ || Object.getPrototypeOf(SquareAnnotation)).call(this, parameters)); - - _this10.data.annotationType = _util.AnnotationType.SQUARE; - _this10._preparePopup(parameters.dict); - return _this10; - } - - return SquareAnnotation; -}(Annotation); - -var CircleAnnotation = function (_Annotation7) { - _inherits(CircleAnnotation, _Annotation7); - - function CircleAnnotation(parameters) { - _classCallCheck(this, CircleAnnotation); - - var _this11 = _possibleConstructorReturn(this, (CircleAnnotation.__proto__ || Object.getPrototypeOf(CircleAnnotation)).call(this, parameters)); - - _this11.data.annotationType = _util.AnnotationType.CIRCLE; - _this11._preparePopup(parameters.dict); - return _this11; - } - - return CircleAnnotation; -}(Annotation); - -var PolylineAnnotation = function (_Annotation8) { - _inherits(PolylineAnnotation, _Annotation8); - - function PolylineAnnotation(parameters) { - _classCallCheck(this, PolylineAnnotation); - - var _this12 = _possibleConstructorReturn(this, (PolylineAnnotation.__proto__ || Object.getPrototypeOf(PolylineAnnotation)).call(this, parameters)); - - _this12.data.annotationType = _util.AnnotationType.POLYLINE; - var dict = parameters.dict; - var rawVertices = dict.getArray('Vertices'); - _this12.data.vertices = []; - for (var i = 0, ii = rawVertices.length; i < ii; i += 2) { - _this12.data.vertices.push({ - x: rawVertices[i], - y: rawVertices[i + 1] - }); - } - _this12._preparePopup(dict); - return _this12; - } - - return PolylineAnnotation; -}(Annotation); - -var PolygonAnnotation = function (_PolylineAnnotation) { - _inherits(PolygonAnnotation, _PolylineAnnotation); - - function PolygonAnnotation(parameters) { - _classCallCheck(this, PolygonAnnotation); - - var _this13 = _possibleConstructorReturn(this, (PolygonAnnotation.__proto__ || Object.getPrototypeOf(PolygonAnnotation)).call(this, parameters)); - - _this13.data.annotationType = _util.AnnotationType.POLYGON; - return _this13; - } - - return PolygonAnnotation; -}(PolylineAnnotation); - -var InkAnnotation = function (_Annotation9) { - _inherits(InkAnnotation, _Annotation9); - - function InkAnnotation(parameters) { - _classCallCheck(this, InkAnnotation); - - var _this14 = _possibleConstructorReturn(this, (InkAnnotation.__proto__ || Object.getPrototypeOf(InkAnnotation)).call(this, parameters)); - - _this14.data.annotationType = _util.AnnotationType.INK; - var dict = parameters.dict; - var xref = parameters.xref; - var originalInkLists = dict.getArray('InkList'); - _this14.data.inkLists = []; - for (var i = 0, ii = originalInkLists.length; i < ii; ++i) { - _this14.data.inkLists.push([]); - for (var j = 0, jj = originalInkLists[i].length; j < jj; j += 2) { - _this14.data.inkLists[i].push({ - x: xref.fetchIfRef(originalInkLists[i][j]), - y: xref.fetchIfRef(originalInkLists[i][j + 1]) - }); - } - } - _this14._preparePopup(dict); - return _this14; - } - - return InkAnnotation; -}(Annotation); - -var HighlightAnnotation = function (_Annotation10) { - _inherits(HighlightAnnotation, _Annotation10); - - function HighlightAnnotation(parameters) { - _classCallCheck(this, HighlightAnnotation); - - var _this15 = _possibleConstructorReturn(this, (HighlightAnnotation.__proto__ || Object.getPrototypeOf(HighlightAnnotation)).call(this, parameters)); - - _this15.data.annotationType = _util.AnnotationType.HIGHLIGHT; - _this15._preparePopup(parameters.dict); - return _this15; - } - - return HighlightAnnotation; -}(Annotation); - -var UnderlineAnnotation = function (_Annotation11) { - _inherits(UnderlineAnnotation, _Annotation11); - - function UnderlineAnnotation(parameters) { - _classCallCheck(this, UnderlineAnnotation); - - var _this16 = _possibleConstructorReturn(this, (UnderlineAnnotation.__proto__ || Object.getPrototypeOf(UnderlineAnnotation)).call(this, parameters)); - - _this16.data.annotationType = _util.AnnotationType.UNDERLINE; - _this16._preparePopup(parameters.dict); - return _this16; - } - - return UnderlineAnnotation; -}(Annotation); - -var SquigglyAnnotation = function (_Annotation12) { - _inherits(SquigglyAnnotation, _Annotation12); - - function SquigglyAnnotation(parameters) { - _classCallCheck(this, SquigglyAnnotation); - - var _this17 = _possibleConstructorReturn(this, (SquigglyAnnotation.__proto__ || Object.getPrototypeOf(SquigglyAnnotation)).call(this, parameters)); - - _this17.data.annotationType = _util.AnnotationType.SQUIGGLY; - _this17._preparePopup(parameters.dict); - return _this17; - } - - return SquigglyAnnotation; -}(Annotation); - -var StrikeOutAnnotation = function (_Annotation13) { - _inherits(StrikeOutAnnotation, _Annotation13); - - function StrikeOutAnnotation(parameters) { - _classCallCheck(this, StrikeOutAnnotation); - - var _this18 = _possibleConstructorReturn(this, (StrikeOutAnnotation.__proto__ || Object.getPrototypeOf(StrikeOutAnnotation)).call(this, parameters)); - - _this18.data.annotationType = _util.AnnotationType.STRIKEOUT; - _this18._preparePopup(parameters.dict); - return _this18; - } - - return StrikeOutAnnotation; -}(Annotation); - -var StampAnnotation = function (_Annotation14) { - _inherits(StampAnnotation, _Annotation14); - - function StampAnnotation(parameters) { - _classCallCheck(this, StampAnnotation); - - var _this19 = _possibleConstructorReturn(this, (StampAnnotation.__proto__ || Object.getPrototypeOf(StampAnnotation)).call(this, parameters)); - - _this19.data.annotationType = _util.AnnotationType.STAMP; - _this19._preparePopup(parameters.dict); - return _this19; - } - - return StampAnnotation; -}(Annotation); - -var FileAttachmentAnnotation = function (_Annotation15) { - _inherits(FileAttachmentAnnotation, _Annotation15); - - function FileAttachmentAnnotation(parameters) { - _classCallCheck(this, FileAttachmentAnnotation); - - var _this20 = _possibleConstructorReturn(this, (FileAttachmentAnnotation.__proto__ || Object.getPrototypeOf(FileAttachmentAnnotation)).call(this, parameters)); - - var file = new _obj.FileSpec(parameters.dict.get('FS'), parameters.xref); - _this20.data.annotationType = _util.AnnotationType.FILEATTACHMENT; - _this20.data.file = file.serializable; - _this20._preparePopup(parameters.dict); - return _this20; - } - - return FileAttachmentAnnotation; -}(Annotation); - -exports.Annotation = Annotation; -exports.AnnotationBorderStyle = AnnotationBorderStyle; -exports.AnnotationFactory = AnnotationFactory; - -/***/ }), -/* 153 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.OperatorList = undefined; - -var _util = __w_pdfjs_require__(2); - -var QueueOptimizer = function QueueOptimizerClosure() { - function addState(parentState, pattern, checkFn, iterateFn, processFn) { - var state = parentState; - for (var i = 0, ii = pattern.length - 1; i < ii; i++) { - var item = pattern[i]; - state = state[item] || (state[item] = []); - } - state[pattern[pattern.length - 1]] = { - checkFn: checkFn, - iterateFn: iterateFn, - processFn: processFn - }; - } - function handlePaintSolidColorImageMask(iFirstSave, count, fnArray, argsArray) { - var iFirstPIMXO = iFirstSave + 2; - for (var i = 0; i < count; i++) { - var arg = argsArray[iFirstPIMXO + 4 * i]; - var imageMask = arg.length === 1 && arg[0]; - if (imageMask && imageMask.width === 1 && imageMask.height === 1 && (!imageMask.data.length || imageMask.data.length === 1 && imageMask.data[0] === 0)) { - fnArray[iFirstPIMXO + 4 * i] = _util.OPS.paintSolidColorImageMask; - continue; - } - break; - } - return count - i; - } - var InitialState = []; - addState(InitialState, [_util.OPS.save, _util.OPS.transform, _util.OPS.paintInlineImageXObject, _util.OPS.restore], null, function iterateInlineImageGroup(context, i) { - var fnArray = context.fnArray; - var iFirstSave = context.iCurr - 3; - var pos = (i - iFirstSave) % 4; - switch (pos) { - case 0: - return fnArray[i] === _util.OPS.save; - case 1: - return fnArray[i] === _util.OPS.transform; - case 2: - return fnArray[i] === _util.OPS.paintInlineImageXObject; - case 3: - return fnArray[i] === _util.OPS.restore; - } - }, function foundInlineImageGroup(context, i) { - var MIN_IMAGES_IN_INLINE_IMAGES_BLOCK = 10; - var MAX_IMAGES_IN_INLINE_IMAGES_BLOCK = 200; - var MAX_WIDTH = 1000; - var IMAGE_PADDING = 1; - var fnArray = context.fnArray, - argsArray = context.argsArray; - var curr = context.iCurr; - var iFirstSave = curr - 3; - var iFirstTransform = curr - 2; - var iFirstPIIXO = curr - 1; - var count = Math.min(Math.floor((i - iFirstSave) / 4), MAX_IMAGES_IN_INLINE_IMAGES_BLOCK); - if (count < MIN_IMAGES_IN_INLINE_IMAGES_BLOCK) { - return i - (i - iFirstSave) % 4; - } - var maxX = 0; - var map = [], - maxLineHeight = 0; - var currentX = IMAGE_PADDING, - currentY = IMAGE_PADDING; - var q; - for (q = 0; q < count; q++) { - var transform = argsArray[iFirstTransform + (q << 2)]; - var img = argsArray[iFirstPIIXO + (q << 2)][0]; - if (currentX + img.width > MAX_WIDTH) { - maxX = Math.max(maxX, currentX); - currentY += maxLineHeight + 2 * IMAGE_PADDING; - currentX = 0; - maxLineHeight = 0; - } - map.push({ - transform: transform, - x: currentX, - y: currentY, - w: img.width, - h: img.height - }); - currentX += img.width + 2 * IMAGE_PADDING; - maxLineHeight = Math.max(maxLineHeight, img.height); - } - var imgWidth = Math.max(maxX, currentX) + IMAGE_PADDING; - var imgHeight = currentY + maxLineHeight + IMAGE_PADDING; - var imgData = new Uint8ClampedArray(imgWidth * imgHeight * 4); - var imgRowSize = imgWidth << 2; - for (q = 0; q < count; q++) { - var data = argsArray[iFirstPIIXO + (q << 2)][0].data; - var rowSize = map[q].w << 2; - var dataOffset = 0; - var offset = map[q].x + map[q].y * imgWidth << 2; - imgData.set(data.subarray(0, rowSize), offset - imgRowSize); - for (var k = 0, kk = map[q].h; k < kk; k++) { - imgData.set(data.subarray(dataOffset, dataOffset + rowSize), offset); - dataOffset += rowSize; - offset += imgRowSize; - } - imgData.set(data.subarray(dataOffset - rowSize, dataOffset), offset); - while (offset >= 0) { - data[offset - 4] = data[offset]; - data[offset - 3] = data[offset + 1]; - data[offset - 2] = data[offset + 2]; - data[offset - 1] = data[offset + 3]; - data[offset + rowSize] = data[offset + rowSize - 4]; - data[offset + rowSize + 1] = data[offset + rowSize - 3]; - data[offset + rowSize + 2] = data[offset + rowSize - 2]; - data[offset + rowSize + 3] = data[offset + rowSize - 1]; - offset -= imgRowSize; - } - } - fnArray.splice(iFirstSave, count * 4, _util.OPS.paintInlineImageXObjectGroup); - argsArray.splice(iFirstSave, count * 4, [{ - width: imgWidth, - height: imgHeight, - kind: _util.ImageKind.RGBA_32BPP, - data: imgData - }, map]); - return iFirstSave + 1; - }); - addState(InitialState, [_util.OPS.save, _util.OPS.transform, _util.OPS.paintImageMaskXObject, _util.OPS.restore], null, function iterateImageMaskGroup(context, i) { - var fnArray = context.fnArray; - var iFirstSave = context.iCurr - 3; - var pos = (i - iFirstSave) % 4; - switch (pos) { - case 0: - return fnArray[i] === _util.OPS.save; - case 1: - return fnArray[i] === _util.OPS.transform; - case 2: - return fnArray[i] === _util.OPS.paintImageMaskXObject; - case 3: - return fnArray[i] === _util.OPS.restore; - } - }, function foundImageMaskGroup(context, i) { - var MIN_IMAGES_IN_MASKS_BLOCK = 10; - var MAX_IMAGES_IN_MASKS_BLOCK = 100; - var MAX_SAME_IMAGES_IN_MASKS_BLOCK = 1000; - var fnArray = context.fnArray, - argsArray = context.argsArray; - var curr = context.iCurr; - var iFirstSave = curr - 3; - var iFirstTransform = curr - 2; - var iFirstPIMXO = curr - 1; - var count = Math.floor((i - iFirstSave) / 4); - count = handlePaintSolidColorImageMask(iFirstSave, count, fnArray, argsArray); - if (count < MIN_IMAGES_IN_MASKS_BLOCK) { - return i - (i - iFirstSave) % 4; - } - var q; - var isSameImage = false; - var iTransform, transformArgs; - var firstPIMXOArg0 = argsArray[iFirstPIMXO][0]; - if (argsArray[iFirstTransform][1] === 0 && argsArray[iFirstTransform][2] === 0) { - isSameImage = true; - var firstTransformArg0 = argsArray[iFirstTransform][0]; - var firstTransformArg3 = argsArray[iFirstTransform][3]; - iTransform = iFirstTransform + 4; - var iPIMXO = iFirstPIMXO + 4; - for (q = 1; q < count; q++, iTransform += 4, iPIMXO += 4) { - transformArgs = argsArray[iTransform]; - if (argsArray[iPIMXO][0] !== firstPIMXOArg0 || transformArgs[0] !== firstTransformArg0 || transformArgs[1] !== 0 || transformArgs[2] !== 0 || transformArgs[3] !== firstTransformArg3) { - if (q < MIN_IMAGES_IN_MASKS_BLOCK) { - isSameImage = false; - } else { - count = q; - } - break; - } - } - } - if (isSameImage) { - count = Math.min(count, MAX_SAME_IMAGES_IN_MASKS_BLOCK); - var positions = new Float32Array(count * 2); - iTransform = iFirstTransform; - for (q = 0; q < count; q++, iTransform += 4) { - transformArgs = argsArray[iTransform]; - positions[q << 1] = transformArgs[4]; - positions[(q << 1) + 1] = transformArgs[5]; - } - fnArray.splice(iFirstSave, count * 4, _util.OPS.paintImageMaskXObjectRepeat); - argsArray.splice(iFirstSave, count * 4, [firstPIMXOArg0, firstTransformArg0, firstTransformArg3, positions]); - } else { - count = Math.min(count, MAX_IMAGES_IN_MASKS_BLOCK); - var images = []; - for (q = 0; q < count; q++) { - transformArgs = argsArray[iFirstTransform + (q << 2)]; - var maskParams = argsArray[iFirstPIMXO + (q << 2)][0]; - images.push({ - data: maskParams.data, - width: maskParams.width, - height: maskParams.height, - transform: transformArgs - }); - } - fnArray.splice(iFirstSave, count * 4, _util.OPS.paintImageMaskXObjectGroup); - argsArray.splice(iFirstSave, count * 4, [images]); - } - return iFirstSave + 1; - }); - addState(InitialState, [_util.OPS.save, _util.OPS.transform, _util.OPS.paintImageXObject, _util.OPS.restore], function (context) { - var argsArray = context.argsArray; - var iFirstTransform = context.iCurr - 2; - return argsArray[iFirstTransform][1] === 0 && argsArray[iFirstTransform][2] === 0; - }, function (context, i) { - var fnArray = context.fnArray, - argsArray = context.argsArray; - var iFirstSave = context.iCurr - 3; - var pos = (i - iFirstSave) % 4; - switch (pos) { - case 0: - return fnArray[i] === _util.OPS.save; - case 1: - if (fnArray[i] !== _util.OPS.transform) { - return false; - } - var iFirstTransform = context.iCurr - 2; - var firstTransformArg0 = argsArray[iFirstTransform][0]; - var firstTransformArg3 = argsArray[iFirstTransform][3]; - if (argsArray[i][0] !== firstTransformArg0 || argsArray[i][1] !== 0 || argsArray[i][2] !== 0 || argsArray[i][3] !== firstTransformArg3) { - return false; - } - return true; - case 2: - if (fnArray[i] !== _util.OPS.paintImageXObject) { - return false; - } - var iFirstPIXO = context.iCurr - 1; - var firstPIXOArg0 = argsArray[iFirstPIXO][0]; - if (argsArray[i][0] !== firstPIXOArg0) { - return false; - } - return true; - case 3: - return fnArray[i] === _util.OPS.restore; - } - }, function (context, i) { - var MIN_IMAGES_IN_BLOCK = 3; - var MAX_IMAGES_IN_BLOCK = 1000; - var fnArray = context.fnArray, - argsArray = context.argsArray; - var curr = context.iCurr; - var iFirstSave = curr - 3; - var iFirstTransform = curr - 2; - var iFirstPIXO = curr - 1; - var firstPIXOArg0 = argsArray[iFirstPIXO][0]; - var firstTransformArg0 = argsArray[iFirstTransform][0]; - var firstTransformArg3 = argsArray[iFirstTransform][3]; - var count = Math.min(Math.floor((i - iFirstSave) / 4), MAX_IMAGES_IN_BLOCK); - if (count < MIN_IMAGES_IN_BLOCK) { - return i - (i - iFirstSave) % 4; - } - var positions = new Float32Array(count * 2); - var iTransform = iFirstTransform; - for (var q = 0; q < count; q++, iTransform += 4) { - var transformArgs = argsArray[iTransform]; - positions[q << 1] = transformArgs[4]; - positions[(q << 1) + 1] = transformArgs[5]; - } - var args = [firstPIXOArg0, firstTransformArg0, firstTransformArg3, positions]; - fnArray.splice(iFirstSave, count * 4, _util.OPS.paintImageXObjectRepeat); - argsArray.splice(iFirstSave, count * 4, args); - return iFirstSave + 1; - }); - addState(InitialState, [_util.OPS.beginText, _util.OPS.setFont, _util.OPS.setTextMatrix, _util.OPS.showText, _util.OPS.endText], null, function (context, i) { - var fnArray = context.fnArray, - argsArray = context.argsArray; - var iFirstSave = context.iCurr - 4; - var pos = (i - iFirstSave) % 5; - switch (pos) { - case 0: - return fnArray[i] === _util.OPS.beginText; - case 1: - return fnArray[i] === _util.OPS.setFont; - case 2: - return fnArray[i] === _util.OPS.setTextMatrix; - case 3: - if (fnArray[i] !== _util.OPS.showText) { - return false; - } - var iFirstSetFont = context.iCurr - 3; - var firstSetFontArg0 = argsArray[iFirstSetFont][0]; - var firstSetFontArg1 = argsArray[iFirstSetFont][1]; - if (argsArray[i][0] !== firstSetFontArg0 || argsArray[i][1] !== firstSetFontArg1) { - return false; - } - return true; - case 4: - return fnArray[i] === _util.OPS.endText; - } - }, function (context, i) { - var MIN_CHARS_IN_BLOCK = 3; - var MAX_CHARS_IN_BLOCK = 1000; - var fnArray = context.fnArray, - argsArray = context.argsArray; - var curr = context.iCurr; - var iFirstBeginText = curr - 4; - var iFirstSetFont = curr - 3; - var iFirstSetTextMatrix = curr - 2; - var iFirstShowText = curr - 1; - var iFirstEndText = curr; - var firstSetFontArg0 = argsArray[iFirstSetFont][0]; - var firstSetFontArg1 = argsArray[iFirstSetFont][1]; - var count = Math.min(Math.floor((i - iFirstBeginText) / 5), MAX_CHARS_IN_BLOCK); - if (count < MIN_CHARS_IN_BLOCK) { - return i - (i - iFirstBeginText) % 5; - } - var iFirst = iFirstBeginText; - if (iFirstBeginText >= 4 && fnArray[iFirstBeginText - 4] === fnArray[iFirstSetFont] && fnArray[iFirstBeginText - 3] === fnArray[iFirstSetTextMatrix] && fnArray[iFirstBeginText - 2] === fnArray[iFirstShowText] && fnArray[iFirstBeginText - 1] === fnArray[iFirstEndText] && argsArray[iFirstBeginText - 4][0] === firstSetFontArg0 && argsArray[iFirstBeginText - 4][1] === firstSetFontArg1) { - count++; - iFirst -= 5; - } - var iEndText = iFirst + 4; - for (var q = 1; q < count; q++) { - fnArray.splice(iEndText, 3); - argsArray.splice(iEndText, 3); - iEndText += 2; - } - return iEndText + 1; - }); - function QueueOptimizer(queue) { - this.queue = queue; - this.state = null; - this.context = { - iCurr: 0, - fnArray: queue.fnArray, - argsArray: queue.argsArray - }; - this.match = null; - this.lastProcessed = 0; - } - QueueOptimizer.prototype = { - _optimize: function _optimize() { - var fnArray = this.queue.fnArray; - var i = this.lastProcessed, - ii = fnArray.length; - var state = this.state; - var match = this.match; - if (!state && !match && i + 1 === ii && !InitialState[fnArray[i]]) { - this.lastProcessed = ii; - return; - } - var context = this.context; - while (i < ii) { - if (match) { - var iterate = (0, match.iterateFn)(context, i); - if (iterate) { - i++; - continue; - } - i = (0, match.processFn)(context, i + 1); - ii = fnArray.length; - match = null; - state = null; - if (i >= ii) { - break; - } - } - state = (state || InitialState)[fnArray[i]]; - if (!state || Array.isArray(state)) { - i++; - continue; - } - context.iCurr = i; - i++; - if (state.checkFn && !(0, state.checkFn)(context)) { - state = null; - continue; - } - match = state; - state = null; - } - this.state = state; - this.match = match; - this.lastProcessed = i; - }, - push: function push(fn, args) { - this.queue.fnArray.push(fn); - this.queue.argsArray.push(args); - this._optimize(); - }, - flush: function flush() { - while (this.match) { - var length = this.queue.fnArray.length; - this.lastProcessed = (0, this.match.processFn)(this.context, length); - this.match = null; - this.state = null; - this._optimize(); - } - }, - reset: function reset() { - this.state = null; - this.match = null; - this.lastProcessed = 0; - } - }; - return QueueOptimizer; -}(); -var NullOptimizer = function NullOptimizerClosure() { - function NullOptimizer(queue) { - this.queue = queue; - } - NullOptimizer.prototype = { - push: function push(fn, args) { - this.queue.fnArray.push(fn); - this.queue.argsArray.push(args); - }, - flush: function flush() {} - }; - return NullOptimizer; -}(); -var OperatorList = function OperatorListClosure() { - var CHUNK_SIZE = 1000; - var CHUNK_SIZE_ABOUT = CHUNK_SIZE - 5; - function getTransfers(queue) { - var transfers = []; - var fnArray = queue.fnArray, - argsArray = queue.argsArray; - for (var i = 0, ii = queue.length; i < ii; i++) { - switch (fnArray[i]) { - case _util.OPS.paintInlineImageXObject: - case _util.OPS.paintInlineImageXObjectGroup: - case _util.OPS.paintImageMaskXObject: - var arg = argsArray[i][0]; - ; - if (!arg.cached) { - transfers.push(arg.data.buffer); - } - break; - } - } - return transfers; - } - function OperatorList(intent, messageHandler, pageIndex) { - this.messageHandler = messageHandler; - this.fnArray = []; - this.argsArray = []; - if (messageHandler && this.intent !== 'oplist') { - this.optimizer = new QueueOptimizer(this); - } else { - this.optimizer = new NullOptimizer(this); - } - this.dependencies = Object.create(null); - this._totalLength = 0; - this.pageIndex = pageIndex; - this.intent = intent; - this.weight = 0; - } - OperatorList.prototype = { - get length() { - return this.argsArray.length; - }, - get totalLength() { - return this._totalLength + this.length; - }, - addOp: function addOp(fn, args) { - this.optimizer.push(fn, args); - this.weight++; - if (this.messageHandler) { - if (this.weight >= CHUNK_SIZE) { - this.flush(); - } else if (this.weight >= CHUNK_SIZE_ABOUT && (fn === _util.OPS.restore || fn === _util.OPS.endText)) { - this.flush(); - } - } - }, - addDependency: function addDependency(dependency) { - if (dependency in this.dependencies) { - return; - } - this.dependencies[dependency] = true; - this.addOp(_util.OPS.dependency, [dependency]); - }, - addDependencies: function addDependencies(dependencies) { - for (var key in dependencies) { - this.addDependency(key); - } - }, - addOpList: function addOpList(opList) { - Object.assign(this.dependencies, opList.dependencies); - for (var i = 0, ii = opList.length; i < ii; i++) { - this.addOp(opList.fnArray[i], opList.argsArray[i]); - } - }, - getIR: function getIR() { - return { - fnArray: this.fnArray, - argsArray: this.argsArray, - length: this.length - }; - }, - flush: function flush(lastChunk) { - this.optimizer.flush(); - var transfers = getTransfers(this); - var length = this.length; - this._totalLength += length; - this.messageHandler.send('RenderPageChunk', { - operatorList: { - fnArray: this.fnArray, - argsArray: this.argsArray, - lastChunk: lastChunk, - length: length - }, - pageIndex: this.pageIndex, - intent: this.intent - }, transfers); - this.dependencies = Object.create(null); - this.fnArray.length = 0; - this.argsArray.length = 0; - this.weight = 0; - this.optimizer.reset(); - } - }; - return OperatorList; -}(); -exports.OperatorList = OperatorList; - -/***/ }), -/* 154 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PartialEvaluator = undefined; - -var _regenerator = __w_pdfjs_require__(131); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -var _util = __w_pdfjs_require__(2); - -var _cmap = __w_pdfjs_require__(155); - -var _stream = __w_pdfjs_require__(140); - -var _primitives = __w_pdfjs_require__(138); - -var _fonts = __w_pdfjs_require__(156); - -var _encodings = __w_pdfjs_require__(159); - -var _unicode = __w_pdfjs_require__(162); - -var _standard_fonts = __w_pdfjs_require__(161); - -var _pattern = __w_pdfjs_require__(165); - -var _parser = __w_pdfjs_require__(139); - -var _bidi = __w_pdfjs_require__(166); - -var _colorspace = __w_pdfjs_require__(151); - -var _glyphlist = __w_pdfjs_require__(160); - -var _metrics = __w_pdfjs_require__(167); - -var _function = __w_pdfjs_require__(168); - -var _jpeg_stream = __w_pdfjs_require__(146); - -var _murmurhash = __w_pdfjs_require__(170); - -var _operator_list = __w_pdfjs_require__(153); - -var _image = __w_pdfjs_require__(171); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } - -var PartialEvaluator = function PartialEvaluatorClosure() { - var DefaultPartialEvaluatorOptions = { - forceDataSchema: false, - maxImageSize: -1, - disableFontFace: false, - nativeImageDecoderSupport: _util.NativeImageDecoding.DECODE, - ignoreErrors: false, - isEvalSupported: true - }; - function NativeImageDecoder(_ref) { - var xref = _ref.xref, - resources = _ref.resources, - handler = _ref.handler, - _ref$forceDataSchema = _ref.forceDataSchema, - forceDataSchema = _ref$forceDataSchema === undefined ? false : _ref$forceDataSchema, - pdfFunctionFactory = _ref.pdfFunctionFactory; - - this.xref = xref; - this.resources = resources; - this.handler = handler; - this.forceDataSchema = forceDataSchema; - this.pdfFunctionFactory = pdfFunctionFactory; - } - NativeImageDecoder.prototype = { - canDecode: function canDecode(image) { - return image instanceof _jpeg_stream.JpegStream && NativeImageDecoder.isDecodable(image, this.xref, this.resources, this.pdfFunctionFactory); - }, - decode: function decode(image) { - var dict = image.dict; - var colorSpace = dict.get('ColorSpace', 'CS'); - colorSpace = _colorspace.ColorSpace.parse(colorSpace, this.xref, this.resources, this.pdfFunctionFactory); - return this.handler.sendWithPromise('JpegDecode', [image.getIR(this.forceDataSchema), colorSpace.numComps]).then(function (_ref2) { - var data = _ref2.data, - width = _ref2.width, - height = _ref2.height; - - return new _stream.Stream(data, 0, data.length, image.dict); - }); - } - }; - NativeImageDecoder.isSupported = function (image, xref, res, pdfFunctionFactory) { - var dict = image.dict; - if (dict.has('DecodeParms') || dict.has('DP')) { - return false; - } - var cs = _colorspace.ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res, pdfFunctionFactory); - return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') && cs.isDefaultDecode(dict.getArray('Decode', 'D')); - }; - NativeImageDecoder.isDecodable = function (image, xref, res, pdfFunctionFactory) { - var dict = image.dict; - if (dict.has('DecodeParms') || dict.has('DP')) { - return false; - } - var cs = _colorspace.ColorSpace.parse(dict.get('ColorSpace', 'CS'), xref, res, pdfFunctionFactory); - return (cs.numComps === 1 || cs.numComps === 3) && cs.isDefaultDecode(dict.getArray('Decode', 'D')); - }; - function PartialEvaluator(_ref3) { - var _this = this; - - var pdfManager = _ref3.pdfManager, - xref = _ref3.xref, - handler = _ref3.handler, - pageIndex = _ref3.pageIndex, - idFactory = _ref3.idFactory, - fontCache = _ref3.fontCache, - builtInCMapCache = _ref3.builtInCMapCache, - _ref3$options = _ref3.options, - options = _ref3$options === undefined ? null : _ref3$options, - pdfFunctionFactory = _ref3.pdfFunctionFactory; - - this.pdfManager = pdfManager; - this.xref = xref; - this.handler = handler; - this.pageIndex = pageIndex; - this.idFactory = idFactory; - this.fontCache = fontCache; - this.builtInCMapCache = builtInCMapCache; - this.options = options || DefaultPartialEvaluatorOptions; - this.pdfFunctionFactory = pdfFunctionFactory; - this.fetchBuiltInCMap = function () { - var _ref4 = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee(name) { - var data; - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (!_this.builtInCMapCache.has(name)) { - _context.next = 2; - break; - } - - return _context.abrupt('return', _this.builtInCMapCache.get(name)); - - case 2: - _context.next = 4; - return _this.handler.sendWithPromise('FetchBuiltInCMap', { name: name }); - - case 4: - data = _context.sent; - - if (data.compressionType !== _util.CMapCompressionType.NONE) { - _this.builtInCMapCache.set(name, data); - } - return _context.abrupt('return', data); - - case 7: - case 'end': - return _context.stop(); - } - } - }, _callee, _this); - })); - - return function (_x) { - return _ref4.apply(this, arguments); - }; - }(); - } - var TIME_SLOT_DURATION_MS = 20; - var CHECK_TIME_EVERY = 100; - function TimeSlotManager() { - this.reset(); - } - TimeSlotManager.prototype = { - check: function TimeSlotManager_check() { - if (++this.checked < CHECK_TIME_EVERY) { - return false; - } - this.checked = 0; - return this.endTime <= Date.now(); - }, - reset: function TimeSlotManager_reset() { - this.endTime = Date.now() + TIME_SLOT_DURATION_MS; - this.checked = 0; - } - }; - function normalizeBlendMode(value) { - if (!(0, _primitives.isName)(value)) { - return 'source-over'; - } - switch (value.name) { - case 'Normal': - case 'Compatible': - return 'source-over'; - case 'Multiply': - return 'multiply'; - case 'Screen': - return 'screen'; - case 'Overlay': - return 'overlay'; - case 'Darken': - return 'darken'; - case 'Lighten': - return 'lighten'; - case 'ColorDodge': - return 'color-dodge'; - case 'ColorBurn': - return 'color-burn'; - case 'HardLight': - return 'hard-light'; - case 'SoftLight': - return 'soft-light'; - case 'Difference': - return 'difference'; - case 'Exclusion': - return 'exclusion'; - case 'Hue': - return 'hue'; - case 'Saturation': - return 'saturation'; - case 'Color': - return 'color'; - case 'Luminosity': - return 'luminosity'; - } - (0, _util.warn)('Unsupported blend mode: ' + value.name); - return 'source-over'; - } - var deferred = Promise.resolve(); - var TILING_PATTERN = 1, - SHADING_PATTERN = 2; - PartialEvaluator.prototype = { - clone: function clone() { - var newOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : DefaultPartialEvaluatorOptions; - - var newEvaluator = Object.create(this); - newEvaluator.options = newOptions; - return newEvaluator; - }, - - hasBlendModes: function PartialEvaluator_hasBlendModes(resources) { - if (!(0, _primitives.isDict)(resources)) { - return false; - } - var processed = Object.create(null); - if (resources.objId) { - processed[resources.objId] = true; - } - var nodes = [resources], - xref = this.xref; - while (nodes.length) { - var key, i, ii; - var node = nodes.shift(); - var graphicStates = node.get('ExtGState'); - if ((0, _primitives.isDict)(graphicStates)) { - var graphicStatesKeys = graphicStates.getKeys(); - for (i = 0, ii = graphicStatesKeys.length; i < ii; i++) { - key = graphicStatesKeys[i]; - var graphicState = graphicStates.get(key); - var bm = graphicState.get('BM'); - if ((0, _primitives.isName)(bm) && bm.name !== 'Normal') { - return true; - } - } - } - var xObjects = node.get('XObject'); - if (!(0, _primitives.isDict)(xObjects)) { - continue; - } - var xObjectsKeys = xObjects.getKeys(); - for (i = 0, ii = xObjectsKeys.length; i < ii; i++) { - key = xObjectsKeys[i]; - var xObject = xObjects.getRaw(key); - if ((0, _primitives.isRef)(xObject)) { - if (processed[xObject.toString()]) { - continue; - } - xObject = xref.fetch(xObject); - } - if (!(0, _primitives.isStream)(xObject)) { - continue; - } - if (xObject.dict.objId) { - if (processed[xObject.dict.objId]) { - continue; - } - processed[xObject.dict.objId] = true; - } - var xResources = xObject.dict.get('Resources'); - if ((0, _primitives.isDict)(xResources) && (!xResources.objId || !processed[xResources.objId])) { - nodes.push(xResources); - if (xResources.objId) { - processed[xResources.objId] = true; - } - } - } - } - return false; - }, - buildFormXObject: function PartialEvaluator_buildFormXObject(resources, xobj, smask, operatorList, task, initialState) { - var dict = xobj.dict; - var matrix = dict.getArray('Matrix'); - var bbox = dict.getArray('BBox'); - var group = dict.get('Group'); - if (group) { - var groupOptions = { - matrix: matrix, - bbox: bbox, - smask: smask, - isolated: false, - knockout: false - }; - var groupSubtype = group.get('S'); - var colorSpace = null; - if ((0, _primitives.isName)(groupSubtype, 'Transparency')) { - groupOptions.isolated = group.get('I') || false; - groupOptions.knockout = group.get('K') || false; - if (group.has('CS')) { - colorSpace = _colorspace.ColorSpace.parse(group.get('CS'), this.xref, resources, this.pdfFunctionFactory); - } - } - if (smask && smask.backdrop) { - colorSpace = colorSpace || _colorspace.ColorSpace.singletons.rgb; - smask.backdrop = colorSpace.getRgb(smask.backdrop, 0); - } - operatorList.addOp(_util.OPS.beginGroup, [groupOptions]); - } - operatorList.addOp(_util.OPS.paintFormXObjectBegin, [matrix, bbox]); - return this.getOperatorList({ - stream: xobj, - task: task, - resources: dict.get('Resources') || resources, - operatorList: operatorList, - initialState: initialState - }).then(function () { - operatorList.addOp(_util.OPS.paintFormXObjectEnd, []); - if (group) { - operatorList.addOp(_util.OPS.endGroup, [groupOptions]); - } - }); - }, - buildPaintImageXObject: function buildPaintImageXObject(_ref5) { - var _this2 = this; - - var resources = _ref5.resources, - image = _ref5.image, - _ref5$isInline = _ref5.isInline, - isInline = _ref5$isInline === undefined ? false : _ref5$isInline, - operatorList = _ref5.operatorList, - cacheKey = _ref5.cacheKey, - imageCache = _ref5.imageCache, - _ref5$forceDisableNat = _ref5.forceDisableNativeImageDecoder, - forceDisableNativeImageDecoder = _ref5$forceDisableNat === undefined ? false : _ref5$forceDisableNat; - - var dict = image.dict; - var w = dict.get('Width', 'W'); - var h = dict.get('Height', 'H'); - if (!(w && (0, _util.isNum)(w)) || !(h && (0, _util.isNum)(h))) { - (0, _util.warn)('Image dimensions are missing, or not numbers.'); - return Promise.resolve(); - } - var maxImageSize = this.options.maxImageSize; - if (maxImageSize !== -1 && w * h > maxImageSize) { - (0, _util.warn)('Image exceeded maximum allowed size and was removed.'); - return Promise.resolve(); - } - var imageMask = dict.get('ImageMask', 'IM') || false; - var imgData, args; - if (imageMask) { - var width = dict.get('Width', 'W'); - var height = dict.get('Height', 'H'); - var bitStrideLength = width + 7 >> 3; - var imgArray = image.getBytes(bitStrideLength * height, true); - var decode = dict.getArray('Decode', 'D'); - imgData = _image.PDFImage.createMask({ - imgArray: imgArray, - width: width, - height: height, - imageIsFromDecodeStream: image instanceof _stream.DecodeStream, - inverseDecode: !!decode && decode[0] > 0 - }); - imgData.cached = true; - args = [imgData]; - operatorList.addOp(_util.OPS.paintImageMaskXObject, args); - if (cacheKey) { - imageCache[cacheKey] = { - fn: _util.OPS.paintImageMaskXObject, - args: args - }; - } - return Promise.resolve(); - } - var softMask = dict.get('SMask', 'SM') || false; - var mask = dict.get('Mask') || false; - var SMALL_IMAGE_DIMENSIONS = 200; - if (isInline && !softMask && !mask && !(image instanceof _jpeg_stream.JpegStream) && w + h < SMALL_IMAGE_DIMENSIONS) { - var imageObj = new _image.PDFImage({ - xref: this.xref, - res: resources, - image: image, - isInline: isInline, - pdfFunctionFactory: this.pdfFunctionFactory - }); - imgData = imageObj.createImageData(true); - operatorList.addOp(_util.OPS.paintInlineImageXObject, [imgData]); - return Promise.resolve(); - } - var nativeImageDecoderSupport = forceDisableNativeImageDecoder ? _util.NativeImageDecoding.NONE : this.options.nativeImageDecoderSupport; - var objId = 'img_' + this.idFactory.createObjId(); - if (nativeImageDecoderSupport !== _util.NativeImageDecoding.NONE && !softMask && !mask && image instanceof _jpeg_stream.JpegStream && NativeImageDecoder.isSupported(image, this.xref, resources, this.pdfFunctionFactory)) { - return this.handler.sendWithPromise('obj', [objId, this.pageIndex, 'JpegStream', image.getIR(this.options.forceDataSchema)]).then(function () { - operatorList.addDependency(objId); - args = [objId, w, h]; - operatorList.addOp(_util.OPS.paintJpegXObject, args); - if (cacheKey) { - imageCache[cacheKey] = { - fn: _util.OPS.paintJpegXObject, - args: args - }; - } - }, function (reason) { - (0, _util.warn)('Native JPEG decoding failed -- trying to recover: ' + (reason && reason.message)); - return _this2.buildPaintImageXObject({ - resources: resources, - image: image, - isInline: isInline, - operatorList: operatorList, - cacheKey: cacheKey, - imageCache: imageCache, - forceDisableNativeImageDecoder: true - }); - }); - } - var nativeImageDecoder = null; - if (nativeImageDecoderSupport === _util.NativeImageDecoding.DECODE && (image instanceof _jpeg_stream.JpegStream || mask instanceof _jpeg_stream.JpegStream || softMask instanceof _jpeg_stream.JpegStream)) { - nativeImageDecoder = new NativeImageDecoder({ - xref: this.xref, - resources: resources, - handler: this.handler, - forceDataSchema: this.options.forceDataSchema, - pdfFunctionFactory: this.pdfFunctionFactory - }); - } - operatorList.addDependency(objId); - args = [objId, w, h]; - _image.PDFImage.buildImage({ - handler: this.handler, - xref: this.xref, - res: resources, - image: image, - isInline: isInline, - nativeDecoder: nativeImageDecoder, - pdfFunctionFactory: this.pdfFunctionFactory - }).then(function (imageObj) { - var imgData = imageObj.createImageData(false); - _this2.handler.send('obj', [objId, _this2.pageIndex, 'Image', imgData], [imgData.data.buffer]); - }).catch(function (reason) { - (0, _util.warn)('Unable to decode image: ' + reason); - _this2.handler.send('obj', [objId, _this2.pageIndex, 'Image', null]); - }); - operatorList.addOp(_util.OPS.paintImageXObject, args); - if (cacheKey) { - imageCache[cacheKey] = { - fn: _util.OPS.paintImageXObject, - args: args - }; - } - return Promise.resolve(); - }, - - handleSMask: function PartialEvaluator_handleSmask(smask, resources, operatorList, task, stateManager) { - var smaskContent = smask.get('G'); - var smaskOptions = { - subtype: smask.get('S').name, - backdrop: smask.get('BC') - }; - var transferObj = smask.get('TR'); - if ((0, _function.isPDFFunction)(transferObj)) { - var transferFn = this.pdfFunctionFactory.create(transferObj); - var transferMap = new Uint8Array(256); - var tmp = new Float32Array(1); - for (var i = 0; i < 256; i++) { - tmp[0] = i / 255; - transferFn(tmp, 0, tmp, 0); - transferMap[i] = tmp[0] * 255 | 0; - } - smaskOptions.transferMap = transferMap; - } - return this.buildFormXObject(resources, smaskContent, smaskOptions, operatorList, task, stateManager.state.clone()); - }, - handleTilingType: function handleTilingType(fn, args, resources, pattern, patternDict, operatorList, task) { - var _this3 = this; - - var tilingOpList = new _operator_list.OperatorList(); - var resourcesArray = [patternDict.get('Resources'), resources]; - var patternResources = _primitives.Dict.merge(this.xref, resourcesArray); - return this.getOperatorList({ - stream: pattern, - task: task, - resources: patternResources, - operatorList: tilingOpList - }).then(function () { - return (0, _pattern.getTilingPatternIR)({ - fnArray: tilingOpList.fnArray, - argsArray: tilingOpList.argsArray - }, patternDict, args); - }).then(function (tilingPatternIR) { - operatorList.addDependencies(tilingOpList.dependencies); - operatorList.addOp(fn, tilingPatternIR); - }, function (reason) { - if (_this3.options.ignoreErrors) { - _this3.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.unknown }); - (0, _util.warn)('handleTilingType - ignoring pattern: "' + reason + '".'); - return; - } - throw reason; - }); - }, - - handleSetFont: function PartialEvaluator_handleSetFont(resources, fontArgs, fontRef, operatorList, task, state) { - var _this4 = this; - - var fontName; - if (fontArgs) { - fontArgs = fontArgs.slice(); - fontName = fontArgs[0].name; - } - return this.loadFont(fontName, fontRef, resources).then(function (translated) { - if (!translated.font.isType3Font) { - return translated; - } - return translated.loadType3Data(_this4, resources, operatorList, task).then(function () { - return translated; - }).catch(function (reason) { - _this4.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.font }); - return new TranslatedFont('g_font_error', new _fonts.ErrorFont('Type3 font load error: ' + reason), translated.font); - }); - }).then(function (translated) { - state.font = translated.font; - translated.send(_this4.handler); - return translated.loadedName; - }); - }, - handleText: function PartialEvaluator_handleText(chars, state) { - var _this5 = this; - - var font = state.font; - var glyphs = font.charsToGlyphs(chars); - var isAddToPathSet = !!(state.textRenderingMode & _util.TextRenderingMode.ADD_TO_PATH_FLAG); - if (font.data && (isAddToPathSet || this.options.disableFontFace || state.fillColorSpace.name === 'Pattern')) { - var buildPath = function buildPath(fontChar) { - if (!font.renderer.hasBuiltPath(fontChar)) { - var path = font.renderer.getPathJs(fontChar); - _this5.handler.send('commonobj', [font.loadedName + '_path_' + fontChar, 'FontPath', path]); - } - }; - for (var i = 0, ii = glyphs.length; i < ii; i++) { - var glyph = glyphs[i]; - buildPath(glyph.fontChar); - var accent = glyph.accent; - if (accent && accent.fontChar) { - buildPath(accent.fontChar); - } - } - } - return glyphs; - }, - setGState: function PartialEvaluator_setGState(resources, gState, operatorList, task, stateManager) { - var _this6 = this; - - var gStateObj = []; - var gStateKeys = gState.getKeys(); - var promise = Promise.resolve(); - - var _loop = function _loop() { - var key = gStateKeys[i]; - var value = gState.get(key); - switch (key) { - case 'Type': - break; - case 'LW': - case 'LC': - case 'LJ': - case 'ML': - case 'D': - case 'RI': - case 'FL': - case 'CA': - case 'ca': - gStateObj.push([key, value]); - break; - case 'Font': - promise = promise.then(function () { - return _this6.handleSetFont(resources, null, value[0], operatorList, task, stateManager.state).then(function (loadedName) { - operatorList.addDependency(loadedName); - gStateObj.push([key, [loadedName, value[1]]]); - }); - }); - break; - case 'BM': - gStateObj.push([key, normalizeBlendMode(value)]); - break; - case 'SMask': - if ((0, _primitives.isName)(value, 'None')) { - gStateObj.push([key, false]); - break; - } - if ((0, _primitives.isDict)(value)) { - promise = promise.then(function () { - return _this6.handleSMask(value, resources, operatorList, task, stateManager); - }); - gStateObj.push([key, true]); - } else { - (0, _util.warn)('Unsupported SMask type'); - } - break; - case 'OP': - case 'op': - case 'OPM': - case 'BG': - case 'BG2': - case 'UCR': - case 'UCR2': - case 'TR': - case 'TR2': - case 'HT': - case 'SM': - case 'SA': - case 'AIS': - case 'TK': - (0, _util.info)('graphic state operator ' + key); - break; - default: - (0, _util.info)('Unknown graphic state operator ' + key); - break; - } - }; - - for (var i = 0, ii = gStateKeys.length; i < ii; i++) { - _loop(); - } - return promise.then(function () { - if (gStateObj.length > 0) { - operatorList.addOp(_util.OPS.setGState, [gStateObj]); - } - }); - }, - loadFont: function PartialEvaluator_loadFont(fontName, font, resources) { - var _this7 = this; - - function errorFont() { - return Promise.resolve(new TranslatedFont('g_font_error', new _fonts.ErrorFont('Font ' + fontName + ' is not available'), font)); - } - var fontRef, - xref = this.xref; - if (font) { - if (!(0, _primitives.isRef)(font)) { - throw new Error('The "font" object should be a reference.'); - } - fontRef = font; - } else { - var fontRes = resources.get('Font'); - if (fontRes) { - fontRef = fontRes.getRaw(fontName); - } else { - (0, _util.warn)('fontRes not available'); - return errorFont(); - } - } - if (!fontRef) { - (0, _util.warn)('fontRef not available'); - return errorFont(); - } - if (this.fontCache.has(fontRef)) { - return this.fontCache.get(fontRef); - } - font = xref.fetchIfRef(fontRef); - if (!(0, _primitives.isDict)(font)) { - return errorFont(); - } - if (font.translated) { - return font.translated; - } - var fontCapability = (0, _util.createPromiseCapability)(); - var preEvaluatedFont = this.preEvaluateFont(font); - var descriptor = preEvaluatedFont.descriptor; - var fontRefIsRef = (0, _primitives.isRef)(fontRef), - fontID; - if (fontRefIsRef) { - fontID = fontRef.toString(); - } - if ((0, _primitives.isDict)(descriptor)) { - if (!descriptor.fontAliases) { - descriptor.fontAliases = Object.create(null); - } - var fontAliases = descriptor.fontAliases; - var hash = preEvaluatedFont.hash; - if (fontAliases[hash]) { - var aliasFontRef = fontAliases[hash].aliasRef; - if (fontRefIsRef && aliasFontRef && this.fontCache.has(aliasFontRef)) { - this.fontCache.putAlias(fontRef, aliasFontRef); - return this.fontCache.get(fontRef); - } - } else { - fontAliases[hash] = { fontID: _fonts.Font.getFontID() }; - } - if (fontRefIsRef) { - fontAliases[hash].aliasRef = fontRef; - } - fontID = fontAliases[hash].fontID; - } - if (fontRefIsRef) { - this.fontCache.put(fontRef, fontCapability.promise); - } else { - if (!fontID) { - fontID = this.idFactory.createObjId(); - } - this.fontCache.put('id_' + fontID, fontCapability.promise); - } - (0, _util.assert)(fontID, 'The "fontID" must be defined.'); - font.loadedName = 'g_' + this.pdfManager.docId + '_f' + fontID; - font.translated = fontCapability.promise; - var translatedPromise; - try { - translatedPromise = this.translateFont(preEvaluatedFont); - } catch (e) { - translatedPromise = Promise.reject(e); - } - translatedPromise.then(function (translatedFont) { - if (translatedFont.fontType !== undefined) { - var xrefFontStats = xref.stats.fontTypes; - xrefFontStats[translatedFont.fontType] = true; - } - fontCapability.resolve(new TranslatedFont(font.loadedName, translatedFont, font)); - }).catch(function (reason) { - _this7.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.font }); - try { - var descriptor = preEvaluatedFont.descriptor; - var fontFile3 = descriptor && descriptor.get('FontFile3'); - var subtype = fontFile3 && fontFile3.get('Subtype'); - var fontType = (0, _fonts.getFontType)(preEvaluatedFont.type, subtype && subtype.name); - var xrefFontStats = xref.stats.fontTypes; - xrefFontStats[fontType] = true; - } catch (ex) {} - fontCapability.resolve(new TranslatedFont(font.loadedName, new _fonts.ErrorFont(reason instanceof Error ? reason.message : reason), font)); - }); - return fontCapability.promise; - }, - buildPath: function PartialEvaluator_buildPath(operatorList, fn, args) { - var lastIndex = operatorList.length - 1; - if (!args) { - args = []; - } - if (lastIndex < 0 || operatorList.fnArray[lastIndex] !== _util.OPS.constructPath) { - operatorList.addOp(_util.OPS.constructPath, [[fn], args]); - } else { - var opArgs = operatorList.argsArray[lastIndex]; - opArgs[0].push(fn); - Array.prototype.push.apply(opArgs[1], args); - } - }, - handleColorN: function PartialEvaluator_handleColorN(operatorList, fn, args, cs, patterns, resources, task) { - var patternName = args[args.length - 1]; - var pattern; - if ((0, _primitives.isName)(patternName) && (pattern = patterns.get(patternName.name))) { - var dict = (0, _primitives.isStream)(pattern) ? pattern.dict : pattern; - var typeNum = dict.get('PatternType'); - if (typeNum === TILING_PATTERN) { - var color = cs.base ? cs.base.getRgb(args, 0) : null; - return this.handleTilingType(fn, color, resources, pattern, dict, operatorList, task); - } else if (typeNum === SHADING_PATTERN) { - var shading = dict.get('Shading'); - var matrix = dict.getArray('Matrix'); - pattern = _pattern.Pattern.parseShading(shading, matrix, this.xref, resources, this.handler, this.pdfFunctionFactory); - operatorList.addOp(fn, pattern.getIR()); - return Promise.resolve(); - } - return Promise.reject(new Error('Unknown PatternType: ' + typeNum)); - } - operatorList.addOp(fn, args); - return Promise.resolve(); - }, - getOperatorList: function getOperatorList(_ref6) { - var _this8 = this; - - var stream = _ref6.stream, - task = _ref6.task, - resources = _ref6.resources, - operatorList = _ref6.operatorList, - _ref6$initialState = _ref6.initialState, - initialState = _ref6$initialState === undefined ? null : _ref6$initialState; - - resources = resources || _primitives.Dict.empty; - initialState = initialState || new EvalState(); - if (!operatorList) { - throw new Error('getOperatorList: missing "operatorList" parameter'); - } - var self = this; - var xref = this.xref; - var imageCache = Object.create(null); - var xobjs = resources.get('XObject') || _primitives.Dict.empty; - var patterns = resources.get('Pattern') || _primitives.Dict.empty; - var stateManager = new StateManager(initialState); - var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); - var timeSlotManager = new TimeSlotManager(); - function closePendingRestoreOPS(argument) { - for (var i = 0, ii = preprocessor.savedStatesDepth; i < ii; i++) { - operatorList.addOp(_util.OPS.restore, []); - } - } - return new Promise(function promiseBody(resolve, reject) { - var next = function next(promise) { - promise.then(function () { - try { - promiseBody(resolve, reject); - } catch (ex) { - reject(ex); - } - }, reject); - }; - task.ensureNotTerminated(); - timeSlotManager.reset(); - var stop, - operation = {}, - i, - ii, - cs; - while (!(stop = timeSlotManager.check())) { - operation.args = null; - if (!preprocessor.read(operation)) { - break; - } - var args = operation.args; - var fn = operation.fn; - switch (fn | 0) { - case _util.OPS.paintXObject: - var name = args[0].name; - if (name && imageCache[name] !== undefined) { - operatorList.addOp(imageCache[name].fn, imageCache[name].args); - args = null; - continue; - } - next(new Promise(function (resolveXObject, rejectXObject) { - if (!name) { - throw new _util.FormatError('XObject must be referred to by name.'); - } - var xobj = xobjs.get(name); - if (!xobj) { - operatorList.addOp(fn, args); - resolveXObject(); - return; - } - if (!(0, _primitives.isStream)(xobj)) { - throw new _util.FormatError('XObject should be a stream'); - } - var type = xobj.dict.get('Subtype'); - if (!(0, _primitives.isName)(type)) { - throw new _util.FormatError('XObject should have a Name subtype'); - } - if (type.name === 'Form') { - stateManager.save(); - self.buildFormXObject(resources, xobj, null, operatorList, task, stateManager.state.clone()).then(function () { - stateManager.restore(); - resolveXObject(); - }, rejectXObject); - return; - } else if (type.name === 'Image') { - self.buildPaintImageXObject({ - resources: resources, - image: xobj, - operatorList: operatorList, - cacheKey: name, - imageCache: imageCache - }).then(resolveXObject, rejectXObject); - return; - } else if (type.name === 'PS') { - (0, _util.info)('Ignored XObject subtype PS'); - } else { - throw new _util.FormatError('Unhandled XObject subtype ' + type.name); - } - resolveXObject(); - }).catch(function (reason) { - if (self.options.ignoreErrors) { - self.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.unknown }); - (0, _util.warn)('getOperatorList - ignoring XObject: "' + reason + '".'); - return; - } - throw reason; - })); - return; - case _util.OPS.setFont: - var fontSize = args[1]; - next(self.handleSetFont(resources, args, null, operatorList, task, stateManager.state).then(function (loadedName) { - operatorList.addDependency(loadedName); - operatorList.addOp(_util.OPS.setFont, [loadedName, fontSize]); - })); - return; - case _util.OPS.endInlineImage: - var cacheKey = args[0].cacheKey; - if (cacheKey) { - var cacheEntry = imageCache[cacheKey]; - if (cacheEntry !== undefined) { - operatorList.addOp(cacheEntry.fn, cacheEntry.args); - args = null; - continue; - } - } - next(self.buildPaintImageXObject({ - resources: resources, - image: args[0], - isInline: true, - operatorList: operatorList, - cacheKey: cacheKey, - imageCache: imageCache - })); - return; - case _util.OPS.showText: - args[0] = self.handleText(args[0], stateManager.state); - break; - case _util.OPS.showSpacedText: - var arr = args[0]; - var combinedGlyphs = []; - var arrLength = arr.length; - var state = stateManager.state; - for (i = 0; i < arrLength; ++i) { - var arrItem = arr[i]; - if ((0, _util.isString)(arrItem)) { - Array.prototype.push.apply(combinedGlyphs, self.handleText(arrItem, state)); - } else if ((0, _util.isNum)(arrItem)) { - combinedGlyphs.push(arrItem); - } - } - args[0] = combinedGlyphs; - fn = _util.OPS.showText; - break; - case _util.OPS.nextLineShowText: - operatorList.addOp(_util.OPS.nextLine); - args[0] = self.handleText(args[0], stateManager.state); - fn = _util.OPS.showText; - break; - case _util.OPS.nextLineSetSpacingShowText: - operatorList.addOp(_util.OPS.nextLine); - operatorList.addOp(_util.OPS.setWordSpacing, [args.shift()]); - operatorList.addOp(_util.OPS.setCharSpacing, [args.shift()]); - args[0] = self.handleText(args[0], stateManager.state); - fn = _util.OPS.showText; - break; - case _util.OPS.setTextRenderingMode: - stateManager.state.textRenderingMode = args[0]; - break; - case _util.OPS.setFillColorSpace: - stateManager.state.fillColorSpace = _colorspace.ColorSpace.parse(args[0], xref, resources, self.pdfFunctionFactory); - continue; - case _util.OPS.setStrokeColorSpace: - stateManager.state.strokeColorSpace = _colorspace.ColorSpace.parse(args[0], xref, resources, self.pdfFunctionFactory); - continue; - case _util.OPS.setFillColor: - cs = stateManager.state.fillColorSpace; - args = cs.getRgb(args, 0); - fn = _util.OPS.setFillRGBColor; - break; - case _util.OPS.setStrokeColor: - cs = stateManager.state.strokeColorSpace; - args = cs.getRgb(args, 0); - fn = _util.OPS.setStrokeRGBColor; - break; - case _util.OPS.setFillGray: - stateManager.state.fillColorSpace = _colorspace.ColorSpace.singletons.gray; - args = _colorspace.ColorSpace.singletons.gray.getRgb(args, 0); - fn = _util.OPS.setFillRGBColor; - break; - case _util.OPS.setStrokeGray: - stateManager.state.strokeColorSpace = _colorspace.ColorSpace.singletons.gray; - args = _colorspace.ColorSpace.singletons.gray.getRgb(args, 0); - fn = _util.OPS.setStrokeRGBColor; - break; - case _util.OPS.setFillCMYKColor: - stateManager.state.fillColorSpace = _colorspace.ColorSpace.singletons.cmyk; - args = _colorspace.ColorSpace.singletons.cmyk.getRgb(args, 0); - fn = _util.OPS.setFillRGBColor; - break; - case _util.OPS.setStrokeCMYKColor: - stateManager.state.strokeColorSpace = _colorspace.ColorSpace.singletons.cmyk; - args = _colorspace.ColorSpace.singletons.cmyk.getRgb(args, 0); - fn = _util.OPS.setStrokeRGBColor; - break; - case _util.OPS.setFillRGBColor: - stateManager.state.fillColorSpace = _colorspace.ColorSpace.singletons.rgb; - args = _colorspace.ColorSpace.singletons.rgb.getRgb(args, 0); - break; - case _util.OPS.setStrokeRGBColor: - stateManager.state.strokeColorSpace = _colorspace.ColorSpace.singletons.rgb; - args = _colorspace.ColorSpace.singletons.rgb.getRgb(args, 0); - break; - case _util.OPS.setFillColorN: - cs = stateManager.state.fillColorSpace; - if (cs.name === 'Pattern') { - next(self.handleColorN(operatorList, _util.OPS.setFillColorN, args, cs, patterns, resources, task)); - return; - } - args = cs.getRgb(args, 0); - fn = _util.OPS.setFillRGBColor; - break; - case _util.OPS.setStrokeColorN: - cs = stateManager.state.strokeColorSpace; - if (cs.name === 'Pattern') { - next(self.handleColorN(operatorList, _util.OPS.setStrokeColorN, args, cs, patterns, resources, task)); - return; - } - args = cs.getRgb(args, 0); - fn = _util.OPS.setStrokeRGBColor; - break; - case _util.OPS.shadingFill: - var shadingRes = resources.get('Shading'); - if (!shadingRes) { - throw new _util.FormatError('No shading resource found'); - } - var shading = shadingRes.get(args[0].name); - if (!shading) { - throw new _util.FormatError('No shading object found'); - } - var shadingFill = _pattern.Pattern.parseShading(shading, null, xref, resources, self.handler, self.pdfFunctionFactory); - var patternIR = shadingFill.getIR(); - args = [patternIR]; - fn = _util.OPS.shadingFill; - break; - case _util.OPS.setGState: - var dictName = args[0]; - var extGState = resources.get('ExtGState'); - if (!(0, _primitives.isDict)(extGState) || !extGState.has(dictName.name)) { - break; - } - var gState = extGState.get(dictName.name); - next(self.setGState(resources, gState, operatorList, task, stateManager)); - return; - case _util.OPS.moveTo: - case _util.OPS.lineTo: - case _util.OPS.curveTo: - case _util.OPS.curveTo2: - case _util.OPS.curveTo3: - case _util.OPS.closePath: - self.buildPath(operatorList, fn, args); - continue; - case _util.OPS.rectangle: - self.buildPath(operatorList, fn, args); - continue; - case _util.OPS.markPoint: - case _util.OPS.markPointProps: - case _util.OPS.beginMarkedContent: - case _util.OPS.beginMarkedContentProps: - case _util.OPS.endMarkedContent: - case _util.OPS.beginCompat: - case _util.OPS.endCompat: - continue; - default: - if (args !== null) { - for (i = 0, ii = args.length; i < ii; i++) { - if (args[i] instanceof _primitives.Dict) { - break; - } - } - if (i < ii) { - (0, _util.warn)('getOperatorList - ignoring operator: ' + fn); - continue; - } - } - } - operatorList.addOp(fn, args); - } - if (stop) { - next(deferred); - return; - } - closePendingRestoreOPS(); - resolve(); - }).catch(function (reason) { - if (_this8.options.ignoreErrors) { - _this8.handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.unknown }); - (0, _util.warn)('getOperatorList - ignoring errors during "' + task.name + '" ' + ('task: "' + reason + '".')); - closePendingRestoreOPS(); - return; - } - throw reason; - }); - }, - getTextContent: function getTextContent(_ref7) { - var _this9 = this; - - var stream = _ref7.stream, - task = _ref7.task, - resources = _ref7.resources, - _ref7$stateManager = _ref7.stateManager, - stateManager = _ref7$stateManager === undefined ? null : _ref7$stateManager, - _ref7$normalizeWhites = _ref7.normalizeWhitespace, - normalizeWhitespace = _ref7$normalizeWhites === undefined ? false : _ref7$normalizeWhites, - _ref7$combineTextItem = _ref7.combineTextItems, - combineTextItems = _ref7$combineTextItem === undefined ? false : _ref7$combineTextItem, - sink = _ref7.sink, - _ref7$seenStyles = _ref7.seenStyles, - seenStyles = _ref7$seenStyles === undefined ? Object.create(null) : _ref7$seenStyles; - - resources = resources || _primitives.Dict.empty; - stateManager = stateManager || new StateManager(new TextState()); - var WhitespaceRegexp = /\s/g; - var textContent = { - items: [], - styles: Object.create(null) - }; - var textContentItem = { - initialized: false, - str: [], - width: 0, - height: 0, - vertical: false, - lastAdvanceWidth: 0, - lastAdvanceHeight: 0, - textAdvanceScale: 0, - spaceWidth: 0, - fakeSpaceMin: Infinity, - fakeMultiSpaceMin: Infinity, - fakeMultiSpaceMax: -0, - textRunBreakAllowed: false, - transform: null, - fontName: null - }; - var SPACE_FACTOR = 0.3; - var MULTI_SPACE_FACTOR = 1.5; - var MULTI_SPACE_FACTOR_MAX = 4; - var self = this; - var xref = this.xref; - var xobjs = null; - var skipEmptyXObjs = Object.create(null); - var preprocessor = new EvaluatorPreprocessor(stream, xref, stateManager); - var textState; - function ensureTextContentItem() { - if (textContentItem.initialized) { - return textContentItem; - } - var font = textState.font; - if (!(font.loadedName in seenStyles)) { - seenStyles[font.loadedName] = true; - textContent.styles[font.loadedName] = { - fontFamily: font.fallbackName, - ascent: font.ascent, - descent: font.descent, - vertical: font.vertical - }; - } - textContentItem.fontName = font.loadedName; - var tsm = [textState.fontSize * textState.textHScale, 0, 0, textState.fontSize, 0, textState.textRise]; - if (font.isType3Font && textState.fontMatrix !== _util.FONT_IDENTITY_MATRIX && textState.fontSize === 1) { - var glyphHeight = font.bbox[3] - font.bbox[1]; - if (glyphHeight > 0) { - glyphHeight = glyphHeight * textState.fontMatrix[3]; - tsm[3] *= glyphHeight; - } - } - var trm = _util.Util.transform(textState.ctm, _util.Util.transform(textState.textMatrix, tsm)); - textContentItem.transform = trm; - if (!font.vertical) { - textContentItem.width = 0; - textContentItem.height = Math.sqrt(trm[2] * trm[2] + trm[3] * trm[3]); - textContentItem.vertical = false; - } else { - textContentItem.width = Math.sqrt(trm[0] * trm[0] + trm[1] * trm[1]); - textContentItem.height = 0; - textContentItem.vertical = true; - } - var a = textState.textLineMatrix[0]; - var b = textState.textLineMatrix[1]; - var scaleLineX = Math.sqrt(a * a + b * b); - a = textState.ctm[0]; - b = textState.ctm[1]; - var scaleCtmX = Math.sqrt(a * a + b * b); - textContentItem.textAdvanceScale = scaleCtmX * scaleLineX; - textContentItem.lastAdvanceWidth = 0; - textContentItem.lastAdvanceHeight = 0; - var spaceWidth = font.spaceWidth / 1000 * textState.fontSize; - if (spaceWidth) { - textContentItem.spaceWidth = spaceWidth; - textContentItem.fakeSpaceMin = spaceWidth * SPACE_FACTOR; - textContentItem.fakeMultiSpaceMin = spaceWidth * MULTI_SPACE_FACTOR; - textContentItem.fakeMultiSpaceMax = spaceWidth * MULTI_SPACE_FACTOR_MAX; - textContentItem.textRunBreakAllowed = !font.isMonospace; - } else { - textContentItem.spaceWidth = 0; - textContentItem.fakeSpaceMin = Infinity; - textContentItem.fakeMultiSpaceMin = Infinity; - textContentItem.fakeMultiSpaceMax = 0; - textContentItem.textRunBreakAllowed = false; - } - textContentItem.initialized = true; - return textContentItem; - } - function replaceWhitespace(str) { - var i = 0, - ii = str.length, - code; - while (i < ii && (code = str.charCodeAt(i)) >= 0x20 && code <= 0x7F) { - i++; - } - return i < ii ? str.replace(WhitespaceRegexp, ' ') : str; - } - function runBidiTransform(textChunk) { - var str = textChunk.str.join(''); - var bidiResult = (0, _bidi.bidi)(str, -1, textChunk.vertical); - return { - str: normalizeWhitespace ? replaceWhitespace(bidiResult.str) : bidiResult.str, - dir: bidiResult.dir, - width: textChunk.width, - height: textChunk.height, - transform: textChunk.transform, - fontName: textChunk.fontName - }; - } - function handleSetFont(fontName, fontRef) { - return self.loadFont(fontName, fontRef, resources).then(function (translated) { - textState.font = translated.font; - textState.fontMatrix = translated.font.fontMatrix || _util.FONT_IDENTITY_MATRIX; - }); - } - function buildTextContentItem(chars) { - var font = textState.font; - var textChunk = ensureTextContentItem(); - var width = 0; - var height = 0; - var glyphs = font.charsToGlyphs(chars); - for (var i = 0; i < glyphs.length; i++) { - var glyph = glyphs[i]; - var glyphWidth = null; - if (font.vertical && glyph.vmetric) { - glyphWidth = glyph.vmetric[0]; - } else { - glyphWidth = glyph.width; - } - var glyphUnicode = glyph.unicode; - var NormalizedUnicodes = (0, _unicode.getNormalizedUnicodes)(); - if (NormalizedUnicodes[glyphUnicode] !== undefined) { - glyphUnicode = NormalizedUnicodes[glyphUnicode]; - } - glyphUnicode = (0, _unicode.reverseIfRtl)(glyphUnicode); - var charSpacing = textState.charSpacing; - if (glyph.isSpace) { - var wordSpacing = textState.wordSpacing; - charSpacing += wordSpacing; - if (wordSpacing > 0) { - addFakeSpaces(wordSpacing, textChunk.str); - } - } - var tx = 0; - var ty = 0; - if (!font.vertical) { - var w0 = glyphWidth * textState.fontMatrix[0]; - tx = (w0 * textState.fontSize + charSpacing) * textState.textHScale; - width += tx; - } else { - var w1 = glyphWidth * textState.fontMatrix[0]; - ty = w1 * textState.fontSize + charSpacing; - height += ty; - } - textState.translateTextMatrix(tx, ty); - textChunk.str.push(glyphUnicode); - } - if (!font.vertical) { - textChunk.lastAdvanceWidth = width; - textChunk.width += width; - } else { - textChunk.lastAdvanceHeight = height; - textChunk.height += Math.abs(height); - } - return textChunk; - } - function addFakeSpaces(width, strBuf) { - if (width < textContentItem.fakeSpaceMin) { - return; - } - if (width < textContentItem.fakeMultiSpaceMin) { - strBuf.push(' '); - return; - } - var fakeSpaces = Math.round(width / textContentItem.spaceWidth); - while (fakeSpaces-- > 0) { - strBuf.push(' '); - } - } - function flushTextContentItem() { - if (!textContentItem.initialized) { - return; - } - textContentItem.width *= textContentItem.textAdvanceScale; - textContentItem.height *= textContentItem.textAdvanceScale; - textContent.items.push(runBidiTransform(textContentItem)); - textContentItem.initialized = false; - textContentItem.str.length = 0; - } - function enqueueChunk() { - var length = textContent.items.length; - if (length > 0) { - sink.enqueue(textContent, length); - textContent.items = []; - textContent.styles = Object.create(null); - } - } - var timeSlotManager = new TimeSlotManager(); - return new Promise(function promiseBody(resolve, reject) { - var next = function next(promise) { - enqueueChunk(); - Promise.all([promise, sink.ready]).then(function () { - try { - promiseBody(resolve, reject); - } catch (ex) { - reject(ex); - } - }, reject); - }; - task.ensureNotTerminated(); - timeSlotManager.reset(); - var stop, - operation = {}, - args = []; - while (!(stop = timeSlotManager.check())) { - args.length = 0; - operation.args = args; - if (!preprocessor.read(operation)) { - break; - } - textState = stateManager.state; - var fn = operation.fn; - args = operation.args; - var advance, diff; - switch (fn | 0) { - case _util.OPS.setFont: - var fontNameArg = args[0].name, - fontSizeArg = args[1]; - if (textState.font && fontNameArg === textState.fontName && fontSizeArg === textState.fontSize) { - break; - } - flushTextContentItem(); - textState.fontName = fontNameArg; - textState.fontSize = fontSizeArg; - next(handleSetFont(fontNameArg, null)); - return; - case _util.OPS.setTextRise: - flushTextContentItem(); - textState.textRise = args[0]; - break; - case _util.OPS.setHScale: - flushTextContentItem(); - textState.textHScale = args[0] / 100; - break; - case _util.OPS.setLeading: - flushTextContentItem(); - textState.leading = args[0]; - break; - case _util.OPS.moveText: - var isSameTextLine = !textState.font ? false : (textState.font.vertical ? args[0] : args[1]) === 0; - advance = args[0] - args[1]; - if (combineTextItems && isSameTextLine && textContentItem.initialized && advance > 0 && advance <= textContentItem.fakeMultiSpaceMax) { - textState.translateTextLineMatrix(args[0], args[1]); - textContentItem.width += args[0] - textContentItem.lastAdvanceWidth; - textContentItem.height += args[1] - textContentItem.lastAdvanceHeight; - diff = args[0] - textContentItem.lastAdvanceWidth - (args[1] - textContentItem.lastAdvanceHeight); - addFakeSpaces(diff, textContentItem.str); - break; - } - flushTextContentItem(); - textState.translateTextLineMatrix(args[0], args[1]); - textState.textMatrix = textState.textLineMatrix.slice(); - break; - case _util.OPS.setLeadingMoveText: - flushTextContentItem(); - textState.leading = -args[1]; - textState.translateTextLineMatrix(args[0], args[1]); - textState.textMatrix = textState.textLineMatrix.slice(); - break; - case _util.OPS.nextLine: - flushTextContentItem(); - textState.carriageReturn(); - break; - case _util.OPS.setTextMatrix: - advance = textState.calcTextLineMatrixAdvance(args[0], args[1], args[2], args[3], args[4], args[5]); - if (combineTextItems && advance !== null && textContentItem.initialized && advance.value > 0 && advance.value <= textContentItem.fakeMultiSpaceMax) { - textState.translateTextLineMatrix(advance.width, advance.height); - textContentItem.width += advance.width - textContentItem.lastAdvanceWidth; - textContentItem.height += advance.height - textContentItem.lastAdvanceHeight; - diff = advance.width - textContentItem.lastAdvanceWidth - (advance.height - textContentItem.lastAdvanceHeight); - addFakeSpaces(diff, textContentItem.str); - break; - } - flushTextContentItem(); - textState.setTextMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); - textState.setTextLineMatrix(args[0], args[1], args[2], args[3], args[4], args[5]); - break; - case _util.OPS.setCharSpacing: - textState.charSpacing = args[0]; - break; - case _util.OPS.setWordSpacing: - textState.wordSpacing = args[0]; - break; - case _util.OPS.beginText: - flushTextContentItem(); - textState.textMatrix = _util.IDENTITY_MATRIX.slice(); - textState.textLineMatrix = _util.IDENTITY_MATRIX.slice(); - break; - case _util.OPS.showSpacedText: - var items = args[0]; - var offset; - for (var j = 0, jj = items.length; j < jj; j++) { - if (typeof items[j] === 'string') { - buildTextContentItem(items[j]); - } else if ((0, _util.isNum)(items[j])) { - ensureTextContentItem(); - advance = items[j] * textState.fontSize / 1000; - var breakTextRun = false; - if (textState.font.vertical) { - offset = advance; - textState.translateTextMatrix(0, offset); - breakTextRun = textContentItem.textRunBreakAllowed && advance > textContentItem.fakeMultiSpaceMax; - if (!breakTextRun) { - textContentItem.height += offset; - } - } else { - advance = -advance; - offset = advance * textState.textHScale; - textState.translateTextMatrix(offset, 0); - breakTextRun = textContentItem.textRunBreakAllowed && advance > textContentItem.fakeMultiSpaceMax; - if (!breakTextRun) { - textContentItem.width += offset; - } - } - if (breakTextRun) { - flushTextContentItem(); - } else if (advance > 0) { - addFakeSpaces(advance, textContentItem.str); - } - } - } - break; - case _util.OPS.showText: - buildTextContentItem(args[0]); - break; - case _util.OPS.nextLineShowText: - flushTextContentItem(); - textState.carriageReturn(); - buildTextContentItem(args[0]); - break; - case _util.OPS.nextLineSetSpacingShowText: - flushTextContentItem(); - textState.wordSpacing = args[0]; - textState.charSpacing = args[1]; - textState.carriageReturn(); - buildTextContentItem(args[2]); - break; - case _util.OPS.paintXObject: - flushTextContentItem(); - if (!xobjs) { - xobjs = resources.get('XObject') || _primitives.Dict.empty; - } - var name = args[0].name; - if (name && skipEmptyXObjs[name] !== undefined) { - break; - } - next(new Promise(function (resolveXObject, rejectXObject) { - if (!name) { - throw new _util.FormatError('XObject must be referred to by name.'); - } - var xobj = xobjs.get(name); - if (!xobj) { - resolveXObject(); - return; - } - if (!(0, _primitives.isStream)(xobj)) { - throw new _util.FormatError('XObject should be a stream'); - } - var type = xobj.dict.get('Subtype'); - if (!(0, _primitives.isName)(type)) { - throw new _util.FormatError('XObject should have a Name subtype'); - } - if (type.name !== 'Form') { - skipEmptyXObjs[name] = true; - resolveXObject(); - return; - } - var currentState = stateManager.state.clone(); - var xObjStateManager = new StateManager(currentState); - var matrix = xobj.dict.getArray('Matrix'); - if (Array.isArray(matrix) && matrix.length === 6) { - xObjStateManager.transform(matrix); - } - enqueueChunk(); - var sinkWrapper = { - enqueueInvoked: false, - enqueue: function enqueue(chunk, size) { - this.enqueueInvoked = true; - sink.enqueue(chunk, size); - }, - - get desiredSize() { - return sink.desiredSize; - }, - get ready() { - return sink.ready; - } - }; - self.getTextContent({ - stream: xobj, - task: task, - resources: xobj.dict.get('Resources') || resources, - stateManager: xObjStateManager, - normalizeWhitespace: normalizeWhitespace, - combineTextItems: combineTextItems, - sink: sinkWrapper, - seenStyles: seenStyles - }).then(function () { - if (!sinkWrapper.enqueueInvoked) { - skipEmptyXObjs[name] = true; - } - resolveXObject(); - }, rejectXObject); - }).catch(function (reason) { - if (reason instanceof _util.AbortException) { - return; - } - if (self.options.ignoreErrors) { - (0, _util.warn)('getTextContent - ignoring XObject: "' + reason + '".'); - return; - } - throw reason; - })); - return; - case _util.OPS.setGState: - flushTextContentItem(); - var dictName = args[0]; - var extGState = resources.get('ExtGState'); - if (!(0, _primitives.isDict)(extGState) || !(0, _primitives.isName)(dictName)) { - break; - } - var gState = extGState.get(dictName.name); - if (!(0, _primitives.isDict)(gState)) { - break; - } - var gStateFont = gState.get('Font'); - if (gStateFont) { - textState.fontName = null; - textState.fontSize = gStateFont[1]; - next(handleSetFont(null, gStateFont[0])); - return; - } - break; - } - if (textContent.items.length >= sink.desiredSize) { - stop = true; - break; - } - } - if (stop) { - next(deferred); - return; - } - flushTextContentItem(); - enqueueChunk(); - resolve(); - }).catch(function (reason) { - if (reason instanceof _util.AbortException) { - return; - } - if (_this9.options.ignoreErrors) { - (0, _util.warn)('getTextContent - ignoring errors during "' + task.name + '" ' + ('task: "' + reason + '".')); - flushTextContentItem(); - enqueueChunk(); - return; - } - throw reason; - }); - }, - - extractDataStructures: function PartialEvaluator_extractDataStructures(dict, baseDict, properties) { - var _this10 = this; - - var xref = this.xref; - var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode'); - var toUnicodePromise = toUnicode ? this.readToUnicode(toUnicode) : Promise.resolve(undefined); - if (properties.composite) { - var cidSystemInfo = dict.get('CIDSystemInfo'); - if ((0, _primitives.isDict)(cidSystemInfo)) { - properties.cidSystemInfo = { - registry: (0, _util.stringToPDFString)(cidSystemInfo.get('Registry')), - ordering: (0, _util.stringToPDFString)(cidSystemInfo.get('Ordering')), - supplement: cidSystemInfo.get('Supplement') - }; - } - var cidToGidMap = dict.get('CIDToGIDMap'); - if ((0, _primitives.isStream)(cidToGidMap)) { - properties.cidToGidMap = this.readCidToGidMap(cidToGidMap); - } - } - var differences = []; - var baseEncodingName = null; - var encoding; - if (dict.has('Encoding')) { - encoding = dict.get('Encoding'); - if ((0, _primitives.isDict)(encoding)) { - baseEncodingName = encoding.get('BaseEncoding'); - baseEncodingName = (0, _primitives.isName)(baseEncodingName) ? baseEncodingName.name : null; - if (encoding.has('Differences')) { - var diffEncoding = encoding.get('Differences'); - var index = 0; - for (var j = 0, jj = diffEncoding.length; j < jj; j++) { - var data = xref.fetchIfRef(diffEncoding[j]); - if ((0, _util.isNum)(data)) { - index = data; - } else if ((0, _primitives.isName)(data)) { - differences[index++] = data.name; - } else { - throw new _util.FormatError('Invalid entry in \'Differences\' array: ' + data); - } - } - } - } else if ((0, _primitives.isName)(encoding)) { - baseEncodingName = encoding.name; - } else { - throw new _util.FormatError('Encoding is not a Name nor a Dict'); - } - if (baseEncodingName !== 'MacRomanEncoding' && baseEncodingName !== 'MacExpertEncoding' && baseEncodingName !== 'WinAnsiEncoding') { - baseEncodingName = null; - } - } - if (baseEncodingName) { - properties.defaultEncoding = (0, _encodings.getEncoding)(baseEncodingName).slice(); - } else { - var isSymbolicFont = !!(properties.flags & _fonts.FontFlags.Symbolic); - var isNonsymbolicFont = !!(properties.flags & _fonts.FontFlags.Nonsymbolic); - encoding = _encodings.StandardEncoding; - if (properties.type === 'TrueType' && !isNonsymbolicFont) { - encoding = _encodings.WinAnsiEncoding; - } - if (isSymbolicFont) { - encoding = _encodings.MacRomanEncoding; - if (!properties.file) { - if (/Symbol/i.test(properties.name)) { - encoding = _encodings.SymbolSetEncoding; - } else if (/Dingbats/i.test(properties.name)) { - encoding = _encodings.ZapfDingbatsEncoding; - } - } - } - properties.defaultEncoding = encoding; - } - properties.differences = differences; - properties.baseEncodingName = baseEncodingName; - properties.hasEncoding = !!baseEncodingName || differences.length > 0; - properties.dict = dict; - return toUnicodePromise.then(function (toUnicode) { - properties.toUnicode = toUnicode; - return _this10.buildToUnicode(properties); - }).then(function (toUnicode) { - properties.toUnicode = toUnicode; - return properties; - }); - }, - _buildSimpleFontToUnicode: function _buildSimpleFontToUnicode(properties) { - (0, _util.assert)(!properties.composite, 'Must be a simple font.'); - var toUnicode = [], - charcode = void 0, - glyphName = void 0; - var encoding = properties.defaultEncoding.slice(); - var baseEncodingName = properties.baseEncodingName; - var differences = properties.differences; - for (charcode in differences) { - glyphName = differences[charcode]; - if (glyphName === '.notdef') { - continue; - } - encoding[charcode] = glyphName; - } - var glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); - for (charcode in encoding) { - glyphName = encoding[charcode]; - if (glyphName === '') { - continue; - } else if (glyphsUnicodeMap[glyphName] === undefined) { - var code = 0; - switch (glyphName[0]) { - case 'G': - if (glyphName.length === 3) { - code = parseInt(glyphName.substring(1), 16); - } - break; - case 'g': - if (glyphName.length === 5) { - code = parseInt(glyphName.substring(1), 16); - } - break; - case 'C': - case 'c': - if (glyphName.length >= 3) { - code = +glyphName.substring(1); - } - break; - default: - var unicode = (0, _unicode.getUnicodeForGlyph)(glyphName, glyphsUnicodeMap); - if (unicode !== -1) { - code = unicode; - } - } - if (code) { - if (baseEncodingName && code === +charcode) { - var baseEncoding = (0, _encodings.getEncoding)(baseEncodingName); - if (baseEncoding && (glyphName = baseEncoding[charcode])) { - toUnicode[charcode] = String.fromCharCode(glyphsUnicodeMap[glyphName]); - continue; - } - } - toUnicode[charcode] = String.fromCharCode(code); - } - continue; - } - toUnicode[charcode] = String.fromCharCode(glyphsUnicodeMap[glyphName]); - } - return new _fonts.ToUnicodeMap(toUnicode); - }, - buildToUnicode: function buildToUnicode(properties) { - properties.hasIncludedToUnicodeMap = !!properties.toUnicode && properties.toUnicode.length > 0; - if (properties.hasIncludedToUnicodeMap) { - if (!properties.composite && properties.hasEncoding) { - properties.fallbackToUnicode = this._buildSimpleFontToUnicode(properties); - } - return Promise.resolve(properties.toUnicode); - } - if (!properties.composite) { - return Promise.resolve(this._buildSimpleFontToUnicode(properties)); - } - if (properties.composite && (properties.cMap.builtInCMap && !(properties.cMap instanceof _cmap.IdentityCMap) || properties.cidSystemInfo.registry === 'Adobe' && (properties.cidSystemInfo.ordering === 'GB1' || properties.cidSystemInfo.ordering === 'CNS1' || properties.cidSystemInfo.ordering === 'Japan1' || properties.cidSystemInfo.ordering === 'Korea1'))) { - var registry = properties.cidSystemInfo.registry; - var ordering = properties.cidSystemInfo.ordering; - var ucs2CMapName = _primitives.Name.get(registry + '-' + ordering + '-UCS2'); - return _cmap.CMapFactory.create({ - encoding: ucs2CMapName, - fetchBuiltInCMap: this.fetchBuiltInCMap, - useCMap: null - }).then(function (ucs2CMap) { - var cMap = properties.cMap; - var toUnicode = []; - cMap.forEach(function (charcode, cid) { - if (cid > 0xffff) { - throw new _util.FormatError('Max size of CID is 65,535'); - } - var ucs2 = ucs2CMap.lookup(cid); - if (ucs2) { - toUnicode[charcode] = String.fromCharCode((ucs2.charCodeAt(0) << 8) + ucs2.charCodeAt(1)); - } - }); - return new _fonts.ToUnicodeMap(toUnicode); - }); - } - return Promise.resolve(new _fonts.IdentityToUnicodeMap(properties.firstChar, properties.lastChar)); - }, - - readToUnicode: function PartialEvaluator_readToUnicode(toUnicode) { - var cmapObj = toUnicode; - if ((0, _primitives.isName)(cmapObj)) { - return _cmap.CMapFactory.create({ - encoding: cmapObj, - fetchBuiltInCMap: this.fetchBuiltInCMap, - useCMap: null - }).then(function (cmap) { - if (cmap instanceof _cmap.IdentityCMap) { - return new _fonts.IdentityToUnicodeMap(0, 0xFFFF); - } - return new _fonts.ToUnicodeMap(cmap.getMap()); - }); - } else if ((0, _primitives.isStream)(cmapObj)) { - return _cmap.CMapFactory.create({ - encoding: cmapObj, - fetchBuiltInCMap: this.fetchBuiltInCMap, - useCMap: null - }).then(function (cmap) { - if (cmap instanceof _cmap.IdentityCMap) { - return new _fonts.IdentityToUnicodeMap(0, 0xFFFF); - } - var map = new Array(cmap.length); - cmap.forEach(function (charCode, token) { - var str = []; - for (var k = 0; k < token.length; k += 2) { - var w1 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); - if ((w1 & 0xF800) !== 0xD800) { - str.push(w1); - continue; - } - k += 2; - var w2 = token.charCodeAt(k) << 8 | token.charCodeAt(k + 1); - str.push(((w1 & 0x3ff) << 10) + (w2 & 0x3ff) + 0x10000); - } - map[charCode] = String.fromCharCode.apply(String, str); - }); - return new _fonts.ToUnicodeMap(map); - }); - } - return Promise.resolve(null); - }, - readCidToGidMap: function PartialEvaluator_readCidToGidMap(cidToGidStream) { - var glyphsData = cidToGidStream.getBytes(); - var result = []; - for (var j = 0, jj = glyphsData.length; j < jj; j++) { - var glyphID = glyphsData[j++] << 8 | glyphsData[j]; - if (glyphID === 0) { - continue; - } - var code = j >> 1; - result[code] = glyphID; - } - return result; - }, - extractWidths: function PartialEvaluator_extractWidths(dict, descriptor, properties) { - var xref = this.xref; - var glyphsWidths = []; - var defaultWidth = 0; - var glyphsVMetrics = []; - var defaultVMetrics; - var i, ii, j, jj, start, code, widths; - if (properties.composite) { - defaultWidth = dict.has('DW') ? dict.get('DW') : 1000; - widths = dict.get('W'); - if (widths) { - for (i = 0, ii = widths.length; i < ii; i++) { - start = xref.fetchIfRef(widths[i++]); - code = xref.fetchIfRef(widths[i]); - if (Array.isArray(code)) { - for (j = 0, jj = code.length; j < jj; j++) { - glyphsWidths[start++] = xref.fetchIfRef(code[j]); - } - } else { - var width = xref.fetchIfRef(widths[++i]); - for (j = start; j <= code; j++) { - glyphsWidths[j] = width; - } - } - } - } - if (properties.vertical) { - var vmetrics = dict.getArray('DW2') || [880, -1000]; - defaultVMetrics = [vmetrics[1], defaultWidth * 0.5, vmetrics[0]]; - vmetrics = dict.get('W2'); - if (vmetrics) { - for (i = 0, ii = vmetrics.length; i < ii; i++) { - start = xref.fetchIfRef(vmetrics[i++]); - code = xref.fetchIfRef(vmetrics[i]); - if (Array.isArray(code)) { - for (j = 0, jj = code.length; j < jj; j++) { - glyphsVMetrics[start++] = [xref.fetchIfRef(code[j++]), xref.fetchIfRef(code[j++]), xref.fetchIfRef(code[j])]; - } - } else { - var vmetric = [xref.fetchIfRef(vmetrics[++i]), xref.fetchIfRef(vmetrics[++i]), xref.fetchIfRef(vmetrics[++i])]; - for (j = start; j <= code; j++) { - glyphsVMetrics[j] = vmetric; - } - } - } - } - } - } else { - var firstChar = properties.firstChar; - widths = dict.get('Widths'); - if (widths) { - j = firstChar; - for (i = 0, ii = widths.length; i < ii; i++) { - glyphsWidths[j++] = xref.fetchIfRef(widths[i]); - } - defaultWidth = parseFloat(descriptor.get('MissingWidth')) || 0; - } else { - var baseFontName = dict.get('BaseFont'); - if ((0, _primitives.isName)(baseFontName)) { - var metrics = this.getBaseFontMetrics(baseFontName.name); - glyphsWidths = this.buildCharCodeToWidth(metrics.widths, properties); - defaultWidth = metrics.defaultWidth; - } - } - } - var isMonospace = true; - var firstWidth = defaultWidth; - for (var glyph in glyphsWidths) { - var glyphWidth = glyphsWidths[glyph]; - if (!glyphWidth) { - continue; - } - if (!firstWidth) { - firstWidth = glyphWidth; - continue; - } - if (firstWidth !== glyphWidth) { - isMonospace = false; - break; - } - } - if (isMonospace) { - properties.flags |= _fonts.FontFlags.FixedPitch; - } - properties.defaultWidth = defaultWidth; - properties.widths = glyphsWidths; - properties.defaultVMetrics = defaultVMetrics; - properties.vmetrics = glyphsVMetrics; - }, - isSerifFont: function PartialEvaluator_isSerifFont(baseFontName) { - var fontNameWoStyle = baseFontName.split('-')[0]; - return fontNameWoStyle in (0, _standard_fonts.getSerifFonts)() || fontNameWoStyle.search(/serif/gi) !== -1; - }, - getBaseFontMetrics: function PartialEvaluator_getBaseFontMetrics(name) { - var defaultWidth = 0; - var widths = []; - var monospace = false; - var stdFontMap = (0, _standard_fonts.getStdFontMap)(); - var lookupName = stdFontMap[name] || name; - var Metrics = (0, _metrics.getMetrics)(); - if (!(lookupName in Metrics)) { - if (this.isSerifFont(name)) { - lookupName = 'Times-Roman'; - } else { - lookupName = 'Helvetica'; - } - } - var glyphWidths = Metrics[lookupName]; - if ((0, _util.isNum)(glyphWidths)) { - defaultWidth = glyphWidths; - monospace = true; - } else { - widths = glyphWidths(); - } - return { - defaultWidth: defaultWidth, - monospace: monospace, - widths: widths - }; - }, - buildCharCodeToWidth: function PartialEvaluator_bulildCharCodeToWidth(widthsByGlyphName, properties) { - var widths = Object.create(null); - var differences = properties.differences; - var encoding = properties.defaultEncoding; - for (var charCode = 0; charCode < 256; charCode++) { - if (charCode in differences && widthsByGlyphName[differences[charCode]]) { - widths[charCode] = widthsByGlyphName[differences[charCode]]; - continue; - } - if (charCode in encoding && widthsByGlyphName[encoding[charCode]]) { - widths[charCode] = widthsByGlyphName[encoding[charCode]]; - continue; - } - } - return widths; - }, - preEvaluateFont: function PartialEvaluator_preEvaluateFont(dict) { - var baseDict = dict; - var type = dict.get('Subtype'); - if (!(0, _primitives.isName)(type)) { - throw new _util.FormatError('invalid font Subtype'); - } - var composite = false; - var uint8array; - if (type.name === 'Type0') { - var df = dict.get('DescendantFonts'); - if (!df) { - throw new _util.FormatError('Descendant fonts are not specified'); - } - dict = Array.isArray(df) ? this.xref.fetchIfRef(df[0]) : df; - type = dict.get('Subtype'); - if (!(0, _primitives.isName)(type)) { - throw new _util.FormatError('invalid font Subtype'); - } - composite = true; - } - var descriptor = dict.get('FontDescriptor'); - if (descriptor) { - var hash = new _murmurhash.MurmurHash3_64(); - var encoding = baseDict.getRaw('Encoding'); - if ((0, _primitives.isName)(encoding)) { - hash.update(encoding.name); - } else if ((0, _primitives.isRef)(encoding)) { - hash.update(encoding.toString()); - } else if ((0, _primitives.isDict)(encoding)) { - var keys = encoding.getKeys(); - for (var i = 0, ii = keys.length; i < ii; i++) { - var entry = encoding.getRaw(keys[i]); - if ((0, _primitives.isName)(entry)) { - hash.update(entry.name); - } else if ((0, _primitives.isRef)(entry)) { - hash.update(entry.toString()); - } else if (Array.isArray(entry)) { - var diffLength = entry.length, - diffBuf = new Array(diffLength); - for (var j = 0; j < diffLength; j++) { - var diffEntry = entry[j]; - if ((0, _primitives.isName)(diffEntry)) { - diffBuf[j] = diffEntry.name; - } else if ((0, _util.isNum)(diffEntry) || (0, _primitives.isRef)(diffEntry)) { - diffBuf[j] = diffEntry.toString(); - } - } - hash.update(diffBuf.join()); - } - } - } - var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode'); - if ((0, _primitives.isStream)(toUnicode)) { - var stream = toUnicode.str || toUnicode; - uint8array = stream.buffer ? new Uint8Array(stream.buffer.buffer, 0, stream.bufferLength) : new Uint8Array(stream.bytes.buffer, stream.start, stream.end - stream.start); - hash.update(uint8array); - } else if ((0, _primitives.isName)(toUnicode)) { - hash.update(toUnicode.name); - } - var widths = dict.get('Widths') || baseDict.get('Widths'); - if (widths) { - uint8array = new Uint8Array(new Uint32Array(widths).buffer); - hash.update(uint8array); - } - } - return { - descriptor: descriptor, - dict: dict, - baseDict: baseDict, - composite: composite, - type: type.name, - hash: hash ? hash.hexdigest() : '' - }; - }, - translateFont: function PartialEvaluator_translateFont(preEvaluatedFont) { - var _this11 = this; - - var baseDict = preEvaluatedFont.baseDict; - var dict = preEvaluatedFont.dict; - var composite = preEvaluatedFont.composite; - var descriptor = preEvaluatedFont.descriptor; - var type = preEvaluatedFont.type; - var maxCharIndex = composite ? 0xFFFF : 0xFF; - var properties; - if (!descriptor) { - if (type === 'Type3') { - descriptor = new _primitives.Dict(null); - descriptor.set('FontName', _primitives.Name.get(type)); - descriptor.set('FontBBox', dict.getArray('FontBBox')); - } else { - var baseFontName = dict.get('BaseFont'); - if (!(0, _primitives.isName)(baseFontName)) { - throw new _util.FormatError('Base font is not specified'); - } - baseFontName = baseFontName.name.replace(/[,_]/g, '-'); - var metrics = this.getBaseFontMetrics(baseFontName); - var fontNameWoStyle = baseFontName.split('-')[0]; - var flags = (this.isSerifFont(fontNameWoStyle) ? _fonts.FontFlags.Serif : 0) | (metrics.monospace ? _fonts.FontFlags.FixedPitch : 0) | ((0, _standard_fonts.getSymbolsFonts)()[fontNameWoStyle] ? _fonts.FontFlags.Symbolic : _fonts.FontFlags.Nonsymbolic); - properties = { - type: type, - name: baseFontName, - widths: metrics.widths, - defaultWidth: metrics.defaultWidth, - flags: flags, - firstChar: 0, - lastChar: maxCharIndex - }; - return this.extractDataStructures(dict, dict, properties).then(function (properties) { - properties.widths = _this11.buildCharCodeToWidth(metrics.widths, properties); - return new _fonts.Font(baseFontName, null, properties); - }); - } - } - var firstChar = dict.get('FirstChar') || 0; - var lastChar = dict.get('LastChar') || maxCharIndex; - var fontName = descriptor.get('FontName'); - var baseFont = dict.get('BaseFont'); - if ((0, _util.isString)(fontName)) { - fontName = _primitives.Name.get(fontName); - } - if ((0, _util.isString)(baseFont)) { - baseFont = _primitives.Name.get(baseFont); - } - if (type !== 'Type3') { - var fontNameStr = fontName && fontName.name; - var baseFontStr = baseFont && baseFont.name; - if (fontNameStr !== baseFontStr) { - (0, _util.info)('The FontDescriptor\'s FontName is "' + fontNameStr + '" but should be the same as the Font\'s BaseFont "' + baseFontStr + '"'); - if (fontNameStr && baseFontStr && baseFontStr.indexOf(fontNameStr) === 0) { - fontName = baseFont; - } - } - } - fontName = fontName || baseFont; - if (!(0, _primitives.isName)(fontName)) { - throw new _util.FormatError('invalid font name'); - } - var fontFile = descriptor.get('FontFile', 'FontFile2', 'FontFile3'); - if (fontFile) { - if (fontFile.dict) { - var subtype = fontFile.dict.get('Subtype'); - if (subtype) { - subtype = subtype.name; - } - var length1 = fontFile.dict.get('Length1'); - var length2 = fontFile.dict.get('Length2'); - var length3 = fontFile.dict.get('Length3'); - } - } - properties = { - type: type, - name: fontName.name, - subtype: subtype, - file: fontFile, - length1: length1, - length2: length2, - length3: length3, - loadedName: baseDict.loadedName, - composite: composite, - wideChars: composite, - fixedPitch: false, - fontMatrix: dict.getArray('FontMatrix') || _util.FONT_IDENTITY_MATRIX, - firstChar: firstChar || 0, - lastChar: lastChar || maxCharIndex, - bbox: descriptor.getArray('FontBBox'), - ascent: descriptor.get('Ascent'), - descent: descriptor.get('Descent'), - xHeight: descriptor.get('XHeight'), - capHeight: descriptor.get('CapHeight'), - flags: descriptor.get('Flags'), - italicAngle: descriptor.get('ItalicAngle'), - isType3Font: false - }; - var cMapPromise; - if (composite) { - var cidEncoding = baseDict.get('Encoding'); - if ((0, _primitives.isName)(cidEncoding)) { - properties.cidEncoding = cidEncoding.name; - } - cMapPromise = _cmap.CMapFactory.create({ - encoding: cidEncoding, - fetchBuiltInCMap: this.fetchBuiltInCMap, - useCMap: null - }).then(function (cMap) { - properties.cMap = cMap; - properties.vertical = properties.cMap.vertical; - }); - } else { - cMapPromise = Promise.resolve(undefined); - } - return cMapPromise.then(function () { - return _this11.extractDataStructures(dict, baseDict, properties); - }).then(function (properties) { - _this11.extractWidths(dict, descriptor, properties); - if (type === 'Type3') { - properties.isType3Font = true; - } - return new _fonts.Font(fontName.name, fontFile, properties); - }); - } - }; - return PartialEvaluator; -}(); -var TranslatedFont = function TranslatedFontClosure() { - function TranslatedFont(loadedName, font, dict) { - this.loadedName = loadedName; - this.font = font; - this.dict = dict; - this.type3Loaded = null; - this.sent = false; - } - TranslatedFont.prototype = { - send: function send(handler) { - if (this.sent) { - return; - } - var fontData = this.font.exportData(); - handler.send('commonobj', [this.loadedName, 'Font', fontData]); - this.sent = true; - }, - loadType3Data: function loadType3Data(evaluator, resources, parentOperatorList, task) { - if (!this.font.isType3Font) { - throw new Error('Must be a Type3 font.'); - } - if (this.type3Loaded) { - return this.type3Loaded; - } - var type3Options = Object.create(evaluator.options); - type3Options.ignoreErrors = false; - var type3Evaluator = evaluator.clone(type3Options); - var translatedFont = this.font; - var loadCharProcsPromise = Promise.resolve(); - var charProcs = this.dict.get('CharProcs'); - var fontResources = this.dict.get('Resources') || resources; - var charProcKeys = charProcs.getKeys(); - var charProcOperatorList = Object.create(null); - - var _loop2 = function _loop2() { - var key = charProcKeys[i]; - loadCharProcsPromise = loadCharProcsPromise.then(function () { - var glyphStream = charProcs.get(key); - var operatorList = new _operator_list.OperatorList(); - return type3Evaluator.getOperatorList({ - stream: glyphStream, - task: task, - resources: fontResources, - operatorList: operatorList - }).then(function () { - charProcOperatorList[key] = operatorList.getIR(); - parentOperatorList.addDependencies(operatorList.dependencies); - }).catch(function (reason) { - (0, _util.warn)('Type3 font resource "' + key + '" is not available.'); - var operatorList = new _operator_list.OperatorList(); - charProcOperatorList[key] = operatorList.getIR(); - }); - }); - }; - - for (var i = 0, n = charProcKeys.length; i < n; ++i) { - _loop2(); - } - this.type3Loaded = loadCharProcsPromise.then(function () { - translatedFont.charProcOperatorList = charProcOperatorList; - }); - return this.type3Loaded; - } - }; - return TranslatedFont; -}(); -var StateManager = function StateManagerClosure() { - function StateManager(initialState) { - this.state = initialState; - this.stateStack = []; - } - StateManager.prototype = { - save: function save() { - var old = this.state; - this.stateStack.push(this.state); - this.state = old.clone(); - }, - restore: function restore() { - var prev = this.stateStack.pop(); - if (prev) { - this.state = prev; - } - }, - transform: function transform(args) { - this.state.ctm = _util.Util.transform(this.state.ctm, args); - } - }; - return StateManager; -}(); -var TextState = function TextStateClosure() { - function TextState() { - this.ctm = new Float32Array(_util.IDENTITY_MATRIX); - this.fontName = null; - this.fontSize = 0; - this.font = null; - this.fontMatrix = _util.FONT_IDENTITY_MATRIX; - this.textMatrix = _util.IDENTITY_MATRIX.slice(); - this.textLineMatrix = _util.IDENTITY_MATRIX.slice(); - this.charSpacing = 0; - this.wordSpacing = 0; - this.leading = 0; - this.textHScale = 1; - this.textRise = 0; - } - TextState.prototype = { - setTextMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) { - var m = this.textMatrix; - m[0] = a; - m[1] = b; - m[2] = c; - m[3] = d; - m[4] = e; - m[5] = f; - }, - setTextLineMatrix: function TextState_setTextMatrix(a, b, c, d, e, f) { - var m = this.textLineMatrix; - m[0] = a; - m[1] = b; - m[2] = c; - m[3] = d; - m[4] = e; - m[5] = f; - }, - translateTextMatrix: function TextState_translateTextMatrix(x, y) { - var m = this.textMatrix; - m[4] = m[0] * x + m[2] * y + m[4]; - m[5] = m[1] * x + m[3] * y + m[5]; - }, - translateTextLineMatrix: function TextState_translateTextMatrix(x, y) { - var m = this.textLineMatrix; - m[4] = m[0] * x + m[2] * y + m[4]; - m[5] = m[1] * x + m[3] * y + m[5]; - }, - calcTextLineMatrixAdvance: function TextState_calcTextLineMatrixAdvance(a, b, c, d, e, f) { - var font = this.font; - if (!font) { - return null; - } - var m = this.textLineMatrix; - if (!(a === m[0] && b === m[1] && c === m[2] && d === m[3])) { - return null; - } - var txDiff = e - m[4], - tyDiff = f - m[5]; - if (font.vertical && txDiff !== 0 || !font.vertical && tyDiff !== 0) { - return null; - } - var tx, - ty, - denominator = a * d - b * c; - if (font.vertical) { - tx = -tyDiff * c / denominator; - ty = tyDiff * a / denominator; - } else { - tx = txDiff * d / denominator; - ty = -txDiff * b / denominator; - } - return { - width: tx, - height: ty, - value: font.vertical ? ty : tx - }; - }, - calcRenderMatrix: function TextState_calcRendeMatrix(ctm) { - var tsm = [this.fontSize * this.textHScale, 0, 0, this.fontSize, 0, this.textRise]; - return _util.Util.transform(ctm, _util.Util.transform(this.textMatrix, tsm)); - }, - carriageReturn: function TextState_carriageReturn() { - this.translateTextLineMatrix(0, -this.leading); - this.textMatrix = this.textLineMatrix.slice(); - }, - clone: function TextState_clone() { - var clone = Object.create(this); - clone.textMatrix = this.textMatrix.slice(); - clone.textLineMatrix = this.textLineMatrix.slice(); - clone.fontMatrix = this.fontMatrix.slice(); - return clone; - } - }; - return TextState; -}(); -var EvalState = function EvalStateClosure() { - function EvalState() { - this.ctm = new Float32Array(_util.IDENTITY_MATRIX); - this.font = null; - this.textRenderingMode = _util.TextRenderingMode.FILL; - this.fillColorSpace = _colorspace.ColorSpace.singletons.gray; - this.strokeColorSpace = _colorspace.ColorSpace.singletons.gray; - } - EvalState.prototype = { - clone: function CanvasExtraState_clone() { - return Object.create(this); - } - }; - return EvalState; -}(); -var EvaluatorPreprocessor = function EvaluatorPreprocessorClosure() { - var getOPMap = (0, _util.getLookupTableFactory)(function (t) { - t['w'] = { - id: _util.OPS.setLineWidth, - numArgs: 1, - variableArgs: false - }; - t['J'] = { - id: _util.OPS.setLineCap, - numArgs: 1, - variableArgs: false - }; - t['j'] = { - id: _util.OPS.setLineJoin, - numArgs: 1, - variableArgs: false - }; - t['M'] = { - id: _util.OPS.setMiterLimit, - numArgs: 1, - variableArgs: false - }; - t['d'] = { - id: _util.OPS.setDash, - numArgs: 2, - variableArgs: false - }; - t['ri'] = { - id: _util.OPS.setRenderingIntent, - numArgs: 1, - variableArgs: false - }; - t['i'] = { - id: _util.OPS.setFlatness, - numArgs: 1, - variableArgs: false - }; - t['gs'] = { - id: _util.OPS.setGState, - numArgs: 1, - variableArgs: false - }; - t['q'] = { - id: _util.OPS.save, - numArgs: 0, - variableArgs: false - }; - t['Q'] = { - id: _util.OPS.restore, - numArgs: 0, - variableArgs: false - }; - t['cm'] = { - id: _util.OPS.transform, - numArgs: 6, - variableArgs: false - }; - t['m'] = { - id: _util.OPS.moveTo, - numArgs: 2, - variableArgs: false - }; - t['l'] = { - id: _util.OPS.lineTo, - numArgs: 2, - variableArgs: false - }; - t['c'] = { - id: _util.OPS.curveTo, - numArgs: 6, - variableArgs: false - }; - t['v'] = { - id: _util.OPS.curveTo2, - numArgs: 4, - variableArgs: false - }; - t['y'] = { - id: _util.OPS.curveTo3, - numArgs: 4, - variableArgs: false - }; - t['h'] = { - id: _util.OPS.closePath, - numArgs: 0, - variableArgs: false - }; - t['re'] = { - id: _util.OPS.rectangle, - numArgs: 4, - variableArgs: false - }; - t['S'] = { - id: _util.OPS.stroke, - numArgs: 0, - variableArgs: false - }; - t['s'] = { - id: _util.OPS.closeStroke, - numArgs: 0, - variableArgs: false - }; - t['f'] = { - id: _util.OPS.fill, - numArgs: 0, - variableArgs: false - }; - t['F'] = { - id: _util.OPS.fill, - numArgs: 0, - variableArgs: false - }; - t['f*'] = { - id: _util.OPS.eoFill, - numArgs: 0, - variableArgs: false - }; - t['B'] = { - id: _util.OPS.fillStroke, - numArgs: 0, - variableArgs: false - }; - t['B*'] = { - id: _util.OPS.eoFillStroke, - numArgs: 0, - variableArgs: false - }; - t['b'] = { - id: _util.OPS.closeFillStroke, - numArgs: 0, - variableArgs: false - }; - t['b*'] = { - id: _util.OPS.closeEOFillStroke, - numArgs: 0, - variableArgs: false - }; - t['n'] = { - id: _util.OPS.endPath, - numArgs: 0, - variableArgs: false - }; - t['W'] = { - id: _util.OPS.clip, - numArgs: 0, - variableArgs: false - }; - t['W*'] = { - id: _util.OPS.eoClip, - numArgs: 0, - variableArgs: false - }; - t['BT'] = { - id: _util.OPS.beginText, - numArgs: 0, - variableArgs: false - }; - t['ET'] = { - id: _util.OPS.endText, - numArgs: 0, - variableArgs: false - }; - t['Tc'] = { - id: _util.OPS.setCharSpacing, - numArgs: 1, - variableArgs: false - }; - t['Tw'] = { - id: _util.OPS.setWordSpacing, - numArgs: 1, - variableArgs: false - }; - t['Tz'] = { - id: _util.OPS.setHScale, - numArgs: 1, - variableArgs: false - }; - t['TL'] = { - id: _util.OPS.setLeading, - numArgs: 1, - variableArgs: false - }; - t['Tf'] = { - id: _util.OPS.setFont, - numArgs: 2, - variableArgs: false - }; - t['Tr'] = { - id: _util.OPS.setTextRenderingMode, - numArgs: 1, - variableArgs: false - }; - t['Ts'] = { - id: _util.OPS.setTextRise, - numArgs: 1, - variableArgs: false - }; - t['Td'] = { - id: _util.OPS.moveText, - numArgs: 2, - variableArgs: false - }; - t['TD'] = { - id: _util.OPS.setLeadingMoveText, - numArgs: 2, - variableArgs: false - }; - t['Tm'] = { - id: _util.OPS.setTextMatrix, - numArgs: 6, - variableArgs: false - }; - t['T*'] = { - id: _util.OPS.nextLine, - numArgs: 0, - variableArgs: false - }; - t['Tj'] = { - id: _util.OPS.showText, - numArgs: 1, - variableArgs: false - }; - t['TJ'] = { - id: _util.OPS.showSpacedText, - numArgs: 1, - variableArgs: false - }; - t['\''] = { - id: _util.OPS.nextLineShowText, - numArgs: 1, - variableArgs: false - }; - t['"'] = { - id: _util.OPS.nextLineSetSpacingShowText, - numArgs: 3, - variableArgs: false - }; - t['d0'] = { - id: _util.OPS.setCharWidth, - numArgs: 2, - variableArgs: false - }; - t['d1'] = { - id: _util.OPS.setCharWidthAndBounds, - numArgs: 6, - variableArgs: false - }; - t['CS'] = { - id: _util.OPS.setStrokeColorSpace, - numArgs: 1, - variableArgs: false - }; - t['cs'] = { - id: _util.OPS.setFillColorSpace, - numArgs: 1, - variableArgs: false - }; - t['SC'] = { - id: _util.OPS.setStrokeColor, - numArgs: 4, - variableArgs: true - }; - t['SCN'] = { - id: _util.OPS.setStrokeColorN, - numArgs: 33, - variableArgs: true - }; - t['sc'] = { - id: _util.OPS.setFillColor, - numArgs: 4, - variableArgs: true - }; - t['scn'] = { - id: _util.OPS.setFillColorN, - numArgs: 33, - variableArgs: true - }; - t['G'] = { - id: _util.OPS.setStrokeGray, - numArgs: 1, - variableArgs: false - }; - t['g'] = { - id: _util.OPS.setFillGray, - numArgs: 1, - variableArgs: false - }; - t['RG'] = { - id: _util.OPS.setStrokeRGBColor, - numArgs: 3, - variableArgs: false - }; - t['rg'] = { - id: _util.OPS.setFillRGBColor, - numArgs: 3, - variableArgs: false - }; - t['K'] = { - id: _util.OPS.setStrokeCMYKColor, - numArgs: 4, - variableArgs: false - }; - t['k'] = { - id: _util.OPS.setFillCMYKColor, - numArgs: 4, - variableArgs: false - }; - t['sh'] = { - id: _util.OPS.shadingFill, - numArgs: 1, - variableArgs: false - }; - t['BI'] = { - id: _util.OPS.beginInlineImage, - numArgs: 0, - variableArgs: false - }; - t['ID'] = { - id: _util.OPS.beginImageData, - numArgs: 0, - variableArgs: false - }; - t['EI'] = { - id: _util.OPS.endInlineImage, - numArgs: 1, - variableArgs: false - }; - t['Do'] = { - id: _util.OPS.paintXObject, - numArgs: 1, - variableArgs: false - }; - t['MP'] = { - id: _util.OPS.markPoint, - numArgs: 1, - variableArgs: false - }; - t['DP'] = { - id: _util.OPS.markPointProps, - numArgs: 2, - variableArgs: false - }; - t['BMC'] = { - id: _util.OPS.beginMarkedContent, - numArgs: 1, - variableArgs: false - }; - t['BDC'] = { - id: _util.OPS.beginMarkedContentProps, - numArgs: 2, - variableArgs: false - }; - t['EMC'] = { - id: _util.OPS.endMarkedContent, - numArgs: 0, - variableArgs: false - }; - t['BX'] = { - id: _util.OPS.beginCompat, - numArgs: 0, - variableArgs: false - }; - t['EX'] = { - id: _util.OPS.endCompat, - numArgs: 0, - variableArgs: false - }; - t['BM'] = null; - t['BD'] = null; - t['true'] = null; - t['fa'] = null; - t['fal'] = null; - t['fals'] = null; - t['false'] = null; - t['nu'] = null; - t['nul'] = null; - t['null'] = null; - }); - var MAX_INVALID_PATH_OPS = 20; - function EvaluatorPreprocessor(stream, xref, stateManager) { - this.opMap = getOPMap(); - this.parser = new _parser.Parser(new _parser.Lexer(stream, this.opMap), false, xref); - this.stateManager = stateManager; - this.nonProcessedArgs = []; - this._numInvalidPathOPS = 0; - } - EvaluatorPreprocessor.prototype = { - get savedStatesDepth() { - return this.stateManager.stateStack.length; - }, - read: function EvaluatorPreprocessor_read(operation) { - var args = operation.args; - while (true) { - var obj = this.parser.getObj(); - if ((0, _primitives.isCmd)(obj)) { - var cmd = obj.cmd; - var opSpec = this.opMap[cmd]; - if (!opSpec) { - (0, _util.warn)('Unknown command "' + cmd + '".'); - continue; - } - var fn = opSpec.id; - var numArgs = opSpec.numArgs; - var argsLength = args !== null ? args.length : 0; - if (!opSpec.variableArgs) { - if (argsLength !== numArgs) { - var nonProcessedArgs = this.nonProcessedArgs; - while (argsLength > numArgs) { - nonProcessedArgs.push(args.shift()); - argsLength--; - } - while (argsLength < numArgs && nonProcessedArgs.length !== 0) { - if (args === null) { - args = []; - } - args.unshift(nonProcessedArgs.pop()); - argsLength++; - } - } - if (argsLength < numArgs) { - var partialMsg = 'command ' + cmd + ': expected ' + numArgs + ' args, ' + ('but received ' + argsLength + ' args.'); - if (fn >= _util.OPS.moveTo && fn <= _util.OPS.endPath && ++this._numInvalidPathOPS > MAX_INVALID_PATH_OPS) { - throw new _util.FormatError('Invalid ' + partialMsg); - } - (0, _util.warn)('Skipping ' + partialMsg); - if (args !== null) { - args.length = 0; - } - continue; - } - } else if (argsLength > numArgs) { - (0, _util.info)('Command ' + cmd + ': expected [0, ' + numArgs + '] args, ' + ('but received ' + argsLength + ' args.')); - } - this.preprocessCommand(fn, args); - operation.fn = fn; - operation.args = args; - return true; - } - if ((0, _primitives.isEOF)(obj)) { - return false; - } - if (obj !== null) { - if (args === null) { - args = []; - } - args.push(obj); - if (args.length > 33) { - throw new _util.FormatError('Too many arguments'); - } - } - } - }, - preprocessCommand: function EvaluatorPreprocessor_preprocessCommand(fn, args) { - switch (fn | 0) { - case _util.OPS.save: - this.stateManager.save(); - break; - case _util.OPS.restore: - this.stateManager.restore(); - break; - case _util.OPS.transform: - this.stateManager.transform(args); - break; - } - } - }; - return EvaluatorPreprocessor; -}(); -exports.PartialEvaluator = PartialEvaluator; - -/***/ }), -/* 155 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.CMapFactory = exports.IdentityCMap = exports.CMap = undefined; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -var _parser = __w_pdfjs_require__(139); - -var _stream = __w_pdfjs_require__(140); - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var BUILT_IN_CMAPS = ['Adobe-GB1-UCS2', 'Adobe-CNS1-UCS2', 'Adobe-Japan1-UCS2', 'Adobe-Korea1-UCS2', '78-EUC-H', '78-EUC-V', '78-H', '78-RKSJ-H', '78-RKSJ-V', '78-V', '78ms-RKSJ-H', '78ms-RKSJ-V', '83pv-RKSJ-H', '90ms-RKSJ-H', '90ms-RKSJ-V', '90msp-RKSJ-H', '90msp-RKSJ-V', '90pv-RKSJ-H', '90pv-RKSJ-V', 'Add-H', 'Add-RKSJ-H', 'Add-RKSJ-V', 'Add-V', 'Adobe-CNS1-0', 'Adobe-CNS1-1', 'Adobe-CNS1-2', 'Adobe-CNS1-3', 'Adobe-CNS1-4', 'Adobe-CNS1-5', 'Adobe-CNS1-6', 'Adobe-GB1-0', 'Adobe-GB1-1', 'Adobe-GB1-2', 'Adobe-GB1-3', 'Adobe-GB1-4', 'Adobe-GB1-5', 'Adobe-Japan1-0', 'Adobe-Japan1-1', 'Adobe-Japan1-2', 'Adobe-Japan1-3', 'Adobe-Japan1-4', 'Adobe-Japan1-5', 'Adobe-Japan1-6', 'Adobe-Korea1-0', 'Adobe-Korea1-1', 'Adobe-Korea1-2', 'B5-H', 'B5-V', 'B5pc-H', 'B5pc-V', 'CNS-EUC-H', 'CNS-EUC-V', 'CNS1-H', 'CNS1-V', 'CNS2-H', 'CNS2-V', 'ETHK-B5-H', 'ETHK-B5-V', 'ETen-B5-H', 'ETen-B5-V', 'ETenms-B5-H', 'ETenms-B5-V', 'EUC-H', 'EUC-V', 'Ext-H', 'Ext-RKSJ-H', 'Ext-RKSJ-V', 'Ext-V', 'GB-EUC-H', 'GB-EUC-V', 'GB-H', 'GB-V', 'GBK-EUC-H', 'GBK-EUC-V', 'GBK2K-H', 'GBK2K-V', 'GBKp-EUC-H', 'GBKp-EUC-V', 'GBT-EUC-H', 'GBT-EUC-V', 'GBT-H', 'GBT-V', 'GBTpc-EUC-H', 'GBTpc-EUC-V', 'GBpc-EUC-H', 'GBpc-EUC-V', 'H', 'HKdla-B5-H', 'HKdla-B5-V', 'HKdlb-B5-H', 'HKdlb-B5-V', 'HKgccs-B5-H', 'HKgccs-B5-V', 'HKm314-B5-H', 'HKm314-B5-V', 'HKm471-B5-H', 'HKm471-B5-V', 'HKscs-B5-H', 'HKscs-B5-V', 'Hankaku', 'Hiragana', 'KSC-EUC-H', 'KSC-EUC-V', 'KSC-H', 'KSC-Johab-H', 'KSC-Johab-V', 'KSC-V', 'KSCms-UHC-H', 'KSCms-UHC-HW-H', 'KSCms-UHC-HW-V', 'KSCms-UHC-V', 'KSCpc-EUC-H', 'KSCpc-EUC-V', 'Katakana', 'NWP-H', 'NWP-V', 'RKSJ-H', 'RKSJ-V', 'Roman', 'UniCNS-UCS2-H', 'UniCNS-UCS2-V', 'UniCNS-UTF16-H', 'UniCNS-UTF16-V', 'UniCNS-UTF32-H', 'UniCNS-UTF32-V', 'UniCNS-UTF8-H', 'UniCNS-UTF8-V', 'UniGB-UCS2-H', 'UniGB-UCS2-V', 'UniGB-UTF16-H', 'UniGB-UTF16-V', 'UniGB-UTF32-H', 'UniGB-UTF32-V', 'UniGB-UTF8-H', 'UniGB-UTF8-V', 'UniJIS-UCS2-H', 'UniJIS-UCS2-HW-H', 'UniJIS-UCS2-HW-V', 'UniJIS-UCS2-V', 'UniJIS-UTF16-H', 'UniJIS-UTF16-V', 'UniJIS-UTF32-H', 'UniJIS-UTF32-V', 'UniJIS-UTF8-H', 'UniJIS-UTF8-V', 'UniJIS2004-UTF16-H', 'UniJIS2004-UTF16-V', 'UniJIS2004-UTF32-H', 'UniJIS2004-UTF32-V', 'UniJIS2004-UTF8-H', 'UniJIS2004-UTF8-V', 'UniJISPro-UCS2-HW-V', 'UniJISPro-UCS2-V', 'UniJISPro-UTF8-V', 'UniJISX0213-UTF32-H', 'UniJISX0213-UTF32-V', 'UniJISX02132004-UTF32-H', 'UniJISX02132004-UTF32-V', 'UniKS-UCS2-H', 'UniKS-UCS2-V', 'UniKS-UTF16-H', 'UniKS-UTF16-V', 'UniKS-UTF32-H', 'UniKS-UTF32-V', 'UniKS-UTF8-H', 'UniKS-UTF8-V', 'V', 'WP-Symbol']; - -var CMap = function () { - function CMap() { - var builtInCMap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - _classCallCheck(this, CMap); - - this.codespaceRanges = [[], [], [], []]; - this.numCodespaceRanges = 0; - this._map = []; - this.name = ''; - this.vertical = false; - this.useCMap = null; - this.builtInCMap = builtInCMap; - } - - _createClass(CMap, [{ - key: 'addCodespaceRange', - value: function addCodespaceRange(n, low, high) { - this.codespaceRanges[n - 1].push(low, high); - this.numCodespaceRanges++; - } - }, { - key: 'mapCidRange', - value: function mapCidRange(low, high, dstLow) { - while (low <= high) { - this._map[low++] = dstLow++; - } - } - }, { - key: 'mapBfRange', - value: function mapBfRange(low, high, dstLow) { - var lastByte = dstLow.length - 1; - while (low <= high) { - this._map[low++] = dstLow; - dstLow = dstLow.substring(0, lastByte) + String.fromCharCode(dstLow.charCodeAt(lastByte) + 1); - } - } - }, { - key: 'mapBfRangeToArray', - value: function mapBfRangeToArray(low, high, array) { - var i = 0, - ii = array.length; - while (low <= high && i < ii) { - this._map[low] = array[i++]; - ++low; - } - } - }, { - key: 'mapOne', - value: function mapOne(src, dst) { - this._map[src] = dst; - } - }, { - key: 'lookup', - value: function lookup(code) { - return this._map[code]; - } - }, { - key: 'contains', - value: function contains(code) { - return this._map[code] !== undefined; - } - }, { - key: 'forEach', - value: function forEach(callback) { - var map = this._map; - var length = map.length; - if (length <= 0x10000) { - for (var i = 0; i < length; i++) { - if (map[i] !== undefined) { - callback(i, map[i]); - } - } - } else { - for (var _i in map) { - callback(_i, map[_i]); - } - } - } - }, { - key: 'charCodeOf', - value: function charCodeOf(value) { - var map = this._map; - if (map.length <= 0x10000) { - return map.indexOf(value); - } - for (var charCode in map) { - if (map[charCode] === value) { - return charCode | 0; - } - } - return -1; - } - }, { - key: 'getMap', - value: function getMap() { - return this._map; - } - }, { - key: 'readCharCode', - value: function readCharCode(str, offset, out) { - var c = 0; - var codespaceRanges = this.codespaceRanges; - for (var n = 0, nn = codespaceRanges.length; n < nn; n++) { - c = (c << 8 | str.charCodeAt(offset + n)) >>> 0; - var codespaceRange = codespaceRanges[n]; - for (var k = 0, kk = codespaceRange.length; k < kk;) { - var low = codespaceRange[k++]; - var high = codespaceRange[k++]; - if (c >= low && c <= high) { - out.charcode = c; - out.length = n + 1; - return; - } - } - } - out.charcode = 0; - out.length = 1; - } - }, { - key: 'length', - get: function get() { - return this._map.length; - } - }, { - key: 'isIdentityCMap', - get: function get() { - if (!(this.name === 'Identity-H' || this.name === 'Identity-V')) { - return false; - } - if (this._map.length !== 0x10000) { - return false; - } - for (var i = 0; i < 0x10000; i++) { - if (this._map[i] !== i) { - return false; - } - } - return true; - } - }]); - - return CMap; -}(); - -var IdentityCMap = function (_CMap) { - _inherits(IdentityCMap, _CMap); - - function IdentityCMap(vertical, n) { - _classCallCheck(this, IdentityCMap); - - var _this = _possibleConstructorReturn(this, (IdentityCMap.__proto__ || Object.getPrototypeOf(IdentityCMap)).call(this)); - - _this.vertical = vertical; - _this.addCodespaceRange(n, 0, 0xffff); - return _this; - } - - _createClass(IdentityCMap, [{ - key: 'mapCidRange', - value: function mapCidRange(low, high, dstLow) { - (0, _util.unreachable)('should not call mapCidRange'); - } - }, { - key: 'mapBfRange', - value: function mapBfRange(low, high, dstLow) { - (0, _util.unreachable)('should not call mapBfRange'); - } - }, { - key: 'mapBfRangeToArray', - value: function mapBfRangeToArray(low, high, array) { - (0, _util.unreachable)('should not call mapBfRangeToArray'); - } - }, { - key: 'mapOne', - value: function mapOne(src, dst) { - (0, _util.unreachable)('should not call mapCidOne'); - } - }, { - key: 'lookup', - value: function lookup(code) { - return Number.isInteger(code) && code <= 0xffff ? code : undefined; - } - }, { - key: 'contains', - value: function contains(code) { - return Number.isInteger(code) && code <= 0xffff; - } - }, { - key: 'forEach', - value: function forEach(callback) { - for (var i = 0; i <= 0xffff; i++) { - callback(i, i); - } - } - }, { - key: 'charCodeOf', - value: function charCodeOf(value) { - return Number.isInteger(value) && value <= 0xffff ? value : -1; - } - }, { - key: 'getMap', - value: function getMap() { - var map = new Array(0x10000); - for (var i = 0; i <= 0xffff; i++) { - map[i] = i; - } - return map; - } - }, { - key: 'length', - get: function get() { - return 0x10000; - } - }, { - key: 'isIdentityCMap', - get: function get() { - (0, _util.unreachable)('should not access .isIdentityCMap'); - } - }]); - - return IdentityCMap; -}(CMap); - -var BinaryCMapReader = function BinaryCMapReaderClosure() { - function hexToInt(a, size) { - var n = 0; - for (var i = 0; i <= size; i++) { - n = n << 8 | a[i]; - } - return n >>> 0; - } - function hexToStr(a, size) { - if (size === 1) { - return String.fromCharCode(a[0], a[1]); - } - if (size === 3) { - return String.fromCharCode(a[0], a[1], a[2], a[3]); - } - return String.fromCharCode.apply(null, a.subarray(0, size + 1)); - } - function addHex(a, b, size) { - var c = 0; - for (var i = size; i >= 0; i--) { - c += a[i] + b[i]; - a[i] = c & 255; - c >>= 8; - } - } - function incHex(a, size) { - var c = 1; - for (var i = size; i >= 0 && c > 0; i--) { - c += a[i]; - a[i] = c & 255; - c >>= 8; - } - } - var MAX_NUM_SIZE = 16; - var MAX_ENCODED_NUM_SIZE = 19; - function BinaryCMapStream(data) { - this.buffer = data; - this.pos = 0; - this.end = data.length; - this.tmpBuf = new Uint8Array(MAX_ENCODED_NUM_SIZE); - } - BinaryCMapStream.prototype = { - readByte: function readByte() { - if (this.pos >= this.end) { - return -1; - } - return this.buffer[this.pos++]; - }, - readNumber: function readNumber() { - var n = 0; - var last; - do { - var b = this.readByte(); - if (b < 0) { - throw new _util.FormatError('unexpected EOF in bcmap'); - } - last = !(b & 0x80); - n = n << 7 | b & 0x7F; - } while (!last); - return n; - }, - readSigned: function readSigned() { - var n = this.readNumber(); - return n & 1 ? ~(n >>> 1) : n >>> 1; - }, - readHex: function readHex(num, size) { - num.set(this.buffer.subarray(this.pos, this.pos + size + 1)); - this.pos += size + 1; - }, - readHexNumber: function readHexNumber(num, size) { - var last; - var stack = this.tmpBuf, - sp = 0; - do { - var b = this.readByte(); - if (b < 0) { - throw new _util.FormatError('unexpected EOF in bcmap'); - } - last = !(b & 0x80); - stack[sp++] = b & 0x7F; - } while (!last); - var i = size, - buffer = 0, - bufferSize = 0; - while (i >= 0) { - while (bufferSize < 8 && stack.length > 0) { - buffer = stack[--sp] << bufferSize | buffer; - bufferSize += 7; - } - num[i] = buffer & 255; - i--; - buffer >>= 8; - bufferSize -= 8; - } - }, - readHexSigned: function readHexSigned(num, size) { - this.readHexNumber(num, size); - var sign = num[size] & 1 ? 255 : 0; - var c = 0; - for (var i = 0; i <= size; i++) { - c = (c & 1) << 8 | num[i]; - num[i] = c >> 1 ^ sign; - } - }, - readString: function readString() { - var len = this.readNumber(); - var s = ''; - for (var i = 0; i < len; i++) { - s += String.fromCharCode(this.readNumber()); - } - return s; - } - }; - function processBinaryCMap(data, cMap, extend) { - return new Promise(function (resolve, reject) { - var stream = new BinaryCMapStream(data); - var header = stream.readByte(); - cMap.vertical = !!(header & 1); - var useCMap = null; - var start = new Uint8Array(MAX_NUM_SIZE); - var end = new Uint8Array(MAX_NUM_SIZE); - var char = new Uint8Array(MAX_NUM_SIZE); - var charCode = new Uint8Array(MAX_NUM_SIZE); - var tmp = new Uint8Array(MAX_NUM_SIZE); - var code; - var b; - while ((b = stream.readByte()) >= 0) { - var type = b >> 5; - if (type === 7) { - switch (b & 0x1F) { - case 0: - stream.readString(); - break; - case 1: - useCMap = stream.readString(); - break; - } - continue; - } - var sequence = !!(b & 0x10); - var dataSize = b & 15; - if (dataSize + 1 > MAX_NUM_SIZE) { - throw new Error('processBinaryCMap: Invalid dataSize.'); - } - var ucs2DataSize = 1; - var subitemsCount = stream.readNumber(); - var i; - switch (type) { - case 0: - stream.readHex(start, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); - for (i = 1; i < subitemsCount; i++) { - incHex(end, dataSize); - stream.readHexNumber(start, dataSize); - addHex(start, end, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - cMap.addCodespaceRange(dataSize + 1, hexToInt(start, dataSize), hexToInt(end, dataSize)); - } - break; - case 1: - stream.readHex(start, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - stream.readNumber(); - for (i = 1; i < subitemsCount; i++) { - incHex(end, dataSize); - stream.readHexNumber(start, dataSize); - addHex(start, end, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - stream.readNumber(); - } - break; - case 2: - stream.readHex(char, dataSize); - code = stream.readNumber(); - cMap.mapOne(hexToInt(char, dataSize), code); - for (i = 1; i < subitemsCount; i++) { - incHex(char, dataSize); - if (!sequence) { - stream.readHexNumber(tmp, dataSize); - addHex(char, tmp, dataSize); - } - code = stream.readSigned() + (code + 1); - cMap.mapOne(hexToInt(char, dataSize), code); - } - break; - case 3: - stream.readHex(start, dataSize); - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - code = stream.readNumber(); - cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); - for (i = 1; i < subitemsCount; i++) { - incHex(end, dataSize); - if (!sequence) { - stream.readHexNumber(start, dataSize); - addHex(start, end, dataSize); - } else { - start.set(end); - } - stream.readHexNumber(end, dataSize); - addHex(end, start, dataSize); - code = stream.readNumber(); - cMap.mapCidRange(hexToInt(start, dataSize), hexToInt(end, dataSize), code); - } - break; - case 4: - stream.readHex(char, ucs2DataSize); - stream.readHex(charCode, dataSize); - cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); - for (i = 1; i < subitemsCount; i++) { - incHex(char, ucs2DataSize); - if (!sequence) { - stream.readHexNumber(tmp, ucs2DataSize); - addHex(char, tmp, ucs2DataSize); - } - incHex(charCode, dataSize); - stream.readHexSigned(tmp, dataSize); - addHex(charCode, tmp, dataSize); - cMap.mapOne(hexToInt(char, ucs2DataSize), hexToStr(charCode, dataSize)); - } - break; - case 5: - stream.readHex(start, ucs2DataSize); - stream.readHexNumber(end, ucs2DataSize); - addHex(end, start, ucs2DataSize); - stream.readHex(charCode, dataSize); - cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); - for (i = 1; i < subitemsCount; i++) { - incHex(end, ucs2DataSize); - if (!sequence) { - stream.readHexNumber(start, ucs2DataSize); - addHex(start, end, ucs2DataSize); - } else { - start.set(end); - } - stream.readHexNumber(end, ucs2DataSize); - addHex(end, start, ucs2DataSize); - stream.readHex(charCode, dataSize); - cMap.mapBfRange(hexToInt(start, ucs2DataSize), hexToInt(end, ucs2DataSize), hexToStr(charCode, dataSize)); - } - break; - default: - reject(new Error('processBinaryCMap: Unknown type: ' + type)); - return; - } - } - if (useCMap) { - resolve(extend(useCMap)); - return; - } - resolve(cMap); - }); - } - function BinaryCMapReader() {} - BinaryCMapReader.prototype = { process: processBinaryCMap }; - return BinaryCMapReader; -}(); -var CMapFactory = function CMapFactoryClosure() { - function strToInt(str) { - var a = 0; - for (var i = 0; i < str.length; i++) { - a = a << 8 | str.charCodeAt(i); - } - return a >>> 0; - } - function expectString(obj) { - if (!(0, _util.isString)(obj)) { - throw new _util.FormatError('Malformed CMap: expected string.'); - } - } - function expectInt(obj) { - if (!Number.isInteger(obj)) { - throw new _util.FormatError('Malformed CMap: expected int.'); - } - } - function parseBfChar(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if ((0, _primitives.isEOF)(obj)) { - break; - } - if ((0, _primitives.isCmd)(obj, 'endbfchar')) { - return; - } - expectString(obj); - var src = strToInt(obj); - obj = lexer.getObj(); - expectString(obj); - var dst = obj; - cMap.mapOne(src, dst); - } - } - function parseBfRange(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if ((0, _primitives.isEOF)(obj)) { - break; - } - if ((0, _primitives.isCmd)(obj, 'endbfrange')) { - return; - } - expectString(obj); - var low = strToInt(obj); - obj = lexer.getObj(); - expectString(obj); - var high = strToInt(obj); - obj = lexer.getObj(); - if (Number.isInteger(obj) || (0, _util.isString)(obj)) { - var dstLow = Number.isInteger(obj) ? String.fromCharCode(obj) : obj; - cMap.mapBfRange(low, high, dstLow); - } else if ((0, _primitives.isCmd)(obj, '[')) { - obj = lexer.getObj(); - var array = []; - while (!(0, _primitives.isCmd)(obj, ']') && !(0, _primitives.isEOF)(obj)) { - array.push(obj); - obj = lexer.getObj(); - } - cMap.mapBfRangeToArray(low, high, array); - } else { - break; - } - } - throw new _util.FormatError('Invalid bf range.'); - } - function parseCidChar(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if ((0, _primitives.isEOF)(obj)) { - break; - } - if ((0, _primitives.isCmd)(obj, 'endcidchar')) { - return; - } - expectString(obj); - var src = strToInt(obj); - obj = lexer.getObj(); - expectInt(obj); - var dst = obj; - cMap.mapOne(src, dst); - } - } - function parseCidRange(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if ((0, _primitives.isEOF)(obj)) { - break; - } - if ((0, _primitives.isCmd)(obj, 'endcidrange')) { - return; - } - expectString(obj); - var low = strToInt(obj); - obj = lexer.getObj(); - expectString(obj); - var high = strToInt(obj); - obj = lexer.getObj(); - expectInt(obj); - var dstLow = obj; - cMap.mapCidRange(low, high, dstLow); - } - } - function parseCodespaceRange(cMap, lexer) { - while (true) { - var obj = lexer.getObj(); - if ((0, _primitives.isEOF)(obj)) { - break; - } - if ((0, _primitives.isCmd)(obj, 'endcodespacerange')) { - return; - } - if (!(0, _util.isString)(obj)) { - break; - } - var low = strToInt(obj); - obj = lexer.getObj(); - if (!(0, _util.isString)(obj)) { - break; - } - var high = strToInt(obj); - cMap.addCodespaceRange(obj.length, low, high); - } - throw new _util.FormatError('Invalid codespace range.'); - } - function parseWMode(cMap, lexer) { - var obj = lexer.getObj(); - if (Number.isInteger(obj)) { - cMap.vertical = !!obj; - } - } - function parseCMapName(cMap, lexer) { - var obj = lexer.getObj(); - if ((0, _primitives.isName)(obj) && (0, _util.isString)(obj.name)) { - cMap.name = obj.name; - } - } - function parseCMap(cMap, lexer, fetchBuiltInCMap, useCMap) { - var previous; - var embeddedUseCMap; - objLoop: while (true) { - try { - var obj = lexer.getObj(); - if ((0, _primitives.isEOF)(obj)) { - break; - } else if ((0, _primitives.isName)(obj)) { - if (obj.name === 'WMode') { - parseWMode(cMap, lexer); - } else if (obj.name === 'CMapName') { - parseCMapName(cMap, lexer); - } - previous = obj; - } else if ((0, _primitives.isCmd)(obj)) { - switch (obj.cmd) { - case 'endcmap': - break objLoop; - case 'usecmap': - if ((0, _primitives.isName)(previous)) { - embeddedUseCMap = previous.name; - } - break; - case 'begincodespacerange': - parseCodespaceRange(cMap, lexer); - break; - case 'beginbfchar': - parseBfChar(cMap, lexer); - break; - case 'begincidchar': - parseCidChar(cMap, lexer); - break; - case 'beginbfrange': - parseBfRange(cMap, lexer); - break; - case 'begincidrange': - parseCidRange(cMap, lexer); - break; - } - } - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - (0, _util.warn)('Invalid cMap data: ' + ex); - continue; - } - } - if (!useCMap && embeddedUseCMap) { - useCMap = embeddedUseCMap; - } - if (useCMap) { - return extendCMap(cMap, fetchBuiltInCMap, useCMap); - } - return Promise.resolve(cMap); - } - function extendCMap(cMap, fetchBuiltInCMap, useCMap) { - return createBuiltInCMap(useCMap, fetchBuiltInCMap).then(function (newCMap) { - cMap.useCMap = newCMap; - if (cMap.numCodespaceRanges === 0) { - var useCodespaceRanges = cMap.useCMap.codespaceRanges; - for (var i = 0; i < useCodespaceRanges.length; i++) { - cMap.codespaceRanges[i] = useCodespaceRanges[i].slice(); - } - cMap.numCodespaceRanges = cMap.useCMap.numCodespaceRanges; - } - cMap.useCMap.forEach(function (key, value) { - if (!cMap.contains(key)) { - cMap.mapOne(key, cMap.useCMap.lookup(key)); - } - }); - return cMap; - }); - } - function createBuiltInCMap(name, fetchBuiltInCMap) { - if (name === 'Identity-H') { - return Promise.resolve(new IdentityCMap(false, 2)); - } else if (name === 'Identity-V') { - return Promise.resolve(new IdentityCMap(true, 2)); - } - if (!BUILT_IN_CMAPS.includes(name)) { - return Promise.reject(new Error('Unknown CMap name: ' + name)); - } - if (!fetchBuiltInCMap) { - return Promise.reject(new Error('Built-in CMap parameters are not provided.')); - } - return fetchBuiltInCMap(name).then(function (data) { - var cMapData = data.cMapData, - compressionType = data.compressionType; - var cMap = new CMap(true); - if (compressionType === _util.CMapCompressionType.BINARY) { - return new BinaryCMapReader().process(cMapData, cMap, function (useCMap) { - return extendCMap(cMap, fetchBuiltInCMap, useCMap); - }); - } - if (compressionType === _util.CMapCompressionType.NONE) { - var lexer = new _parser.Lexer(new _stream.Stream(cMapData)); - return parseCMap(cMap, lexer, fetchBuiltInCMap, null); - } - return Promise.reject(new Error('TODO: Only BINARY/NONE CMap compression is currently supported.')); - }); - } - return { - create: function create(params) { - var encoding = params.encoding; - var fetchBuiltInCMap = params.fetchBuiltInCMap; - var useCMap = params.useCMap; - if ((0, _primitives.isName)(encoding)) { - return createBuiltInCMap(encoding.name, fetchBuiltInCMap); - } else if ((0, _primitives.isStream)(encoding)) { - var cMap = new CMap(); - var lexer = new _parser.Lexer(encoding); - return parseCMap(cMap, lexer, fetchBuiltInCMap, useCMap).then(function (parsedCMap) { - if (parsedCMap.isIdentityCMap) { - return createBuiltInCMap(parsedCMap.name, fetchBuiltInCMap); - } - return parsedCMap; - }); - } - return Promise.reject(new Error('Encoding required.')); - } - }; -}(); -exports.CMap = CMap; -exports.IdentityCMap = IdentityCMap; -exports.CMapFactory = CMapFactory; - -/***/ }), -/* 156 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getFontType = exports.IdentityToUnicodeMap = exports.ToUnicodeMap = exports.FontFlags = exports.Font = exports.ErrorFont = exports.SEAC_ANALYSIS_ENABLED = undefined; - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _util = __w_pdfjs_require__(2); - -var _cff_parser = __w_pdfjs_require__(157); - -var _glyphlist = __w_pdfjs_require__(160); - -var _encodings = __w_pdfjs_require__(159); - -var _standard_fonts = __w_pdfjs_require__(161); - -var _unicode = __w_pdfjs_require__(162); - -var _font_renderer = __w_pdfjs_require__(163); - -var _cmap = __w_pdfjs_require__(155); - -var _stream = __w_pdfjs_require__(140); - -var _type1_parser = __w_pdfjs_require__(164); - -var PRIVATE_USE_AREAS = [[0xE000, 0xF8FF], [0x100000, 0x10FFFD]]; -var PDF_GLYPH_SPACE_UNITS = 1000; -var SEAC_ANALYSIS_ENABLED = true; -var FontFlags = { - FixedPitch: 1, - Serif: 2, - Symbolic: 4, - Script: 8, - Nonsymbolic: 32, - Italic: 64, - AllCap: 65536, - SmallCap: 131072, - ForceBold: 262144 -}; -var MacStandardGlyphOrdering = ['.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth', 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior', 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla', 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat']; -function adjustWidths(properties) { - if (!properties.fontMatrix) { - return; - } - if (properties.fontMatrix[0] === _util.FONT_IDENTITY_MATRIX[0]) { - return; - } - var scale = 0.001 / properties.fontMatrix[0]; - var glyphsWidths = properties.widths; - for (var glyph in glyphsWidths) { - glyphsWidths[glyph] *= scale; - } - properties.defaultWidth *= scale; -} -function adjustToUnicode(properties, builtInEncoding) { - if (properties.hasIncludedToUnicodeMap) { - return; - } - if (properties.hasEncoding) { - return; - } - if (builtInEncoding === properties.defaultEncoding) { - return; - } - if (properties.toUnicode instanceof IdentityToUnicodeMap) { - return; - } - var toUnicode = [], - glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); - for (var charCode in builtInEncoding) { - var glyphName = builtInEncoding[charCode]; - var unicode = (0, _unicode.getUnicodeForGlyph)(glyphName, glyphsUnicodeMap); - if (unicode !== -1) { - toUnicode[charCode] = String.fromCharCode(unicode); - } - } - properties.toUnicode.amend(toUnicode); -} -function getFontType(type, subtype) { - switch (type) { - case 'Type1': - return subtype === 'Type1C' ? _util.FontType.TYPE1C : _util.FontType.TYPE1; - case 'CIDFontType0': - return subtype === 'CIDFontType0C' ? _util.FontType.CIDFONTTYPE0C : _util.FontType.CIDFONTTYPE0; - case 'OpenType': - return _util.FontType.OPENTYPE; - case 'TrueType': - return _util.FontType.TRUETYPE; - case 'CIDFontType2': - return _util.FontType.CIDFONTTYPE2; - case 'MMType1': - return _util.FontType.MMTYPE1; - case 'Type0': - return _util.FontType.TYPE0; - default: - return _util.FontType.UNKNOWN; - } -} -function recoverGlyphName(name, glyphsUnicodeMap) { - if (glyphsUnicodeMap[name] !== undefined) { - return name; - } - var unicode = (0, _unicode.getUnicodeForGlyph)(name, glyphsUnicodeMap); - if (unicode !== -1) { - for (var key in glyphsUnicodeMap) { - if (glyphsUnicodeMap[key] === unicode) { - return key; - } - } - } - (0, _util.info)('Unable to recover a standard glyph name for: ' + name); - return name; -} -var Glyph = function GlyphClosure() { - function Glyph(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) { - this.fontChar = fontChar; - this.unicode = unicode; - this.accent = accent; - this.width = width; - this.vmetric = vmetric; - this.operatorListId = operatorListId; - this.isSpace = isSpace; - this.isInFont = isInFont; - } - Glyph.prototype.matchesForCache = function (fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont) { - return this.fontChar === fontChar && this.unicode === unicode && this.accent === accent && this.width === width && this.vmetric === vmetric && this.operatorListId === operatorListId && this.isSpace === isSpace && this.isInFont === isInFont; - }; - return Glyph; -}(); -var ToUnicodeMap = function ToUnicodeMapClosure() { - function ToUnicodeMap() { - var cmap = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - - this._map = cmap; - } - ToUnicodeMap.prototype = { - get length() { - return this._map.length; - }, - forEach: function forEach(callback) { - for (var charCode in this._map) { - callback(charCode, this._map[charCode].charCodeAt(0)); - } - }, - has: function has(i) { - return this._map[i] !== undefined; - }, - get: function get(i) { - return this._map[i]; - }, - charCodeOf: function charCodeOf(value) { - var map = this._map; - if (map.length <= 0x10000) { - return map.indexOf(value); - } - for (var charCode in map) { - if (map[charCode] === value) { - return charCode | 0; - } - } - return -1; - }, - amend: function amend(map) { - for (var charCode in map) { - this._map[charCode] = map[charCode]; - } - } - }; - return ToUnicodeMap; -}(); -var IdentityToUnicodeMap = function IdentityToUnicodeMapClosure() { - function IdentityToUnicodeMap(firstChar, lastChar) { - this.firstChar = firstChar; - this.lastChar = lastChar; - } - IdentityToUnicodeMap.prototype = { - get length() { - return this.lastChar + 1 - this.firstChar; - }, - forEach: function forEach(callback) { - for (var i = this.firstChar, ii = this.lastChar; i <= ii; i++) { - callback(i, i); - } - }, - has: function has(i) { - return this.firstChar <= i && i <= this.lastChar; - }, - get: function get(i) { - if (this.firstChar <= i && i <= this.lastChar) { - return String.fromCharCode(i); - } - return undefined; - }, - charCodeOf: function charCodeOf(v) { - return Number.isInteger(v) && v >= this.firstChar && v <= this.lastChar ? v : -1; - }, - amend: function amend(map) { - (0, _util.unreachable)('Should not call amend()'); - } - }; - return IdentityToUnicodeMap; -}(); -var OpenTypeFileBuilder = function OpenTypeFileBuilderClosure() { - function writeInt16(dest, offset, num) { - dest[offset] = num >> 8 & 0xFF; - dest[offset + 1] = num & 0xFF; - } - function writeInt32(dest, offset, num) { - dest[offset] = num >> 24 & 0xFF; - dest[offset + 1] = num >> 16 & 0xFF; - dest[offset + 2] = num >> 8 & 0xFF; - dest[offset + 3] = num & 0xFF; - } - function writeData(dest, offset, data) { - var i, ii; - if (data instanceof Uint8Array) { - dest.set(data, offset); - } else if (typeof data === 'string') { - for (i = 0, ii = data.length; i < ii; i++) { - dest[offset++] = data.charCodeAt(i) & 0xFF; - } - } else { - for (i = 0, ii = data.length; i < ii; i++) { - dest[offset++] = data[i] & 0xFF; - } - } - } - function OpenTypeFileBuilder(sfnt) { - this.sfnt = sfnt; - this.tables = Object.create(null); - } - OpenTypeFileBuilder.getSearchParams = function OpenTypeFileBuilder_getSearchParams(entriesCount, entrySize) { - var maxPower2 = 1, - log2 = 0; - while ((maxPower2 ^ entriesCount) > maxPower2) { - maxPower2 <<= 1; - log2++; - } - var searchRange = maxPower2 * entrySize; - return { - range: searchRange, - entry: log2, - rangeShift: entrySize * entriesCount - searchRange - }; - }; - var OTF_HEADER_SIZE = 12; - var OTF_TABLE_ENTRY_SIZE = 16; - OpenTypeFileBuilder.prototype = { - toArray: function OpenTypeFileBuilder_toArray() { - var sfnt = this.sfnt; - var tables = this.tables; - var tablesNames = Object.keys(tables); - tablesNames.sort(); - var numTables = tablesNames.length; - var i, j, jj, table, tableName; - var offset = OTF_HEADER_SIZE + numTables * OTF_TABLE_ENTRY_SIZE; - var tableOffsets = [offset]; - for (i = 0; i < numTables; i++) { - table = tables[tablesNames[i]]; - var paddedLength = (table.length + 3 & ~3) >>> 0; - offset += paddedLength; - tableOffsets.push(offset); - } - var file = new Uint8Array(offset); - for (i = 0; i < numTables; i++) { - table = tables[tablesNames[i]]; - writeData(file, tableOffsets[i], table); - } - if (sfnt === 'true') { - sfnt = (0, _util.string32)(0x00010000); - } - file[0] = sfnt.charCodeAt(0) & 0xFF; - file[1] = sfnt.charCodeAt(1) & 0xFF; - file[2] = sfnt.charCodeAt(2) & 0xFF; - file[3] = sfnt.charCodeAt(3) & 0xFF; - writeInt16(file, 4, numTables); - var searchParams = OpenTypeFileBuilder.getSearchParams(numTables, 16); - writeInt16(file, 6, searchParams.range); - writeInt16(file, 8, searchParams.entry); - writeInt16(file, 10, searchParams.rangeShift); - offset = OTF_HEADER_SIZE; - for (i = 0; i < numTables; i++) { - tableName = tablesNames[i]; - file[offset] = tableName.charCodeAt(0) & 0xFF; - file[offset + 1] = tableName.charCodeAt(1) & 0xFF; - file[offset + 2] = tableName.charCodeAt(2) & 0xFF; - file[offset + 3] = tableName.charCodeAt(3) & 0xFF; - var checksum = 0; - for (j = tableOffsets[i], jj = tableOffsets[i + 1]; j < jj; j += 4) { - var quad = (0, _util.readUint32)(file, j); - checksum = checksum + quad >>> 0; - } - writeInt32(file, offset + 4, checksum); - writeInt32(file, offset + 8, tableOffsets[i]); - writeInt32(file, offset + 12, tables[tableName].length); - offset += OTF_TABLE_ENTRY_SIZE; - } - return file; - }, - addTable: function OpenTypeFileBuilder_addTable(tag, data) { - if (tag in this.tables) { - throw new Error('Table ' + tag + ' already exists'); - } - this.tables[tag] = data; - } - }; - return OpenTypeFileBuilder; -}(); -var Font = function FontClosure() { - function Font(name, file, properties) { - var charCode; - this.name = name; - this.loadedName = properties.loadedName; - this.isType3Font = properties.isType3Font; - this.sizes = []; - this.missingFile = false; - this.glyphCache = Object.create(null); - this.isSerifFont = !!(properties.flags & FontFlags.Serif); - this.isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); - this.isMonospace = !!(properties.flags & FontFlags.FixedPitch); - var type = properties.type; - var subtype = properties.subtype; - this.type = type; - this.subtype = subtype; - this.fallbackName = this.isMonospace ? 'monospace' : this.isSerifFont ? 'serif' : 'sans-serif'; - this.differences = properties.differences; - this.widths = properties.widths; - this.defaultWidth = properties.defaultWidth; - this.composite = properties.composite; - this.wideChars = properties.wideChars; - this.cMap = properties.cMap; - this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS; - this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS; - this.fontMatrix = properties.fontMatrix; - this.bbox = properties.bbox; - this.defaultEncoding = properties.defaultEncoding; - this.toUnicode = properties.toUnicode; - this.fallbackToUnicode = properties.fallbackToUnicode || new ToUnicodeMap(); - this.toFontChar = []; - if (properties.type === 'Type3') { - for (charCode = 0; charCode < 256; charCode++) { - this.toFontChar[charCode] = this.differences[charCode] || properties.defaultEncoding[charCode]; - } - this.fontType = _util.FontType.TYPE3; - return; - } - this.cidEncoding = properties.cidEncoding; - this.vertical = properties.vertical; - if (this.vertical) { - this.vmetrics = properties.vmetrics; - this.defaultVMetrics = properties.defaultVMetrics; - } - if (!file || file.isEmpty) { - if (file) { - (0, _util.warn)('Font file is empty in "' + name + '" (' + this.loadedName + ')'); - } - this.fallbackToSystemFont(); - return; - } - - var _getFontFileType = getFontFileType(file, properties); - - var _getFontFileType2 = _slicedToArray(_getFontFileType, 2); - - type = _getFontFileType2[0]; - subtype = _getFontFileType2[1]; - - if (type !== this.type || subtype !== this.subtype) { - (0, _util.info)('Inconsistent font file Type/SubType, expected: ' + (this.type + '/' + this.subtype + ' but found: ' + type + '/' + subtype + '.')); - } - try { - var data; - switch (type) { - case 'MMType1': - (0, _util.info)('MMType1 font (' + name + '), falling back to Type1.'); - case 'Type1': - case 'CIDFontType0': - this.mimetype = 'font/opentype'; - var cff = subtype === 'Type1C' || subtype === 'CIDFontType0C' ? new CFFFont(file, properties) : new Type1Font(name, file, properties); - adjustWidths(properties); - data = this.convert(name, cff, properties); - break; - case 'OpenType': - case 'TrueType': - case 'CIDFontType2': - this.mimetype = 'font/opentype'; - data = this.checkAndRepair(name, file, properties); - if (this.isOpenType) { - adjustWidths(properties); - type = 'OpenType'; - } - break; - default: - throw new _util.FormatError('Font ' + type + ' is not supported'); - } - } catch (e) { - (0, _util.warn)(e); - this.fallbackToSystemFont(); - return; - } - this.data = data; - this.fontType = getFontType(type, subtype); - this.fontMatrix = properties.fontMatrix; - this.widths = properties.widths; - this.defaultWidth = properties.defaultWidth; - this.toUnicode = properties.toUnicode; - this.encoding = properties.baseEncoding; - this.seacMap = properties.seacMap; - } - Font.getFontID = function () { - var ID = 1; - return function Font_getFontID() { - return String(ID++); - }; - }(); - function int16(b0, b1) { - return (b0 << 8) + b1; - } - function writeSignedInt16(bytes, index, value) { - bytes[index + 1] = value; - bytes[index] = value >>> 8; - } - function signedInt16(b0, b1) { - var value = (b0 << 8) + b1; - return value & 1 << 15 ? value - 0x10000 : value; - } - function int32(b0, b1, b2, b3) { - return (b0 << 24) + (b1 << 16) + (b2 << 8) + b3; - } - function string16(value) { - return String.fromCharCode(value >> 8 & 0xff, value & 0xff); - } - function safeString16(value) { - value = value > 0x7FFF ? 0x7FFF : value < -0x8000 ? -0x8000 : value; - return String.fromCharCode(value >> 8 & 0xff, value & 0xff); - } - function isTrueTypeFile(file) { - var header = file.peekBytes(4); - return (0, _util.readUint32)(header, 0) === 0x00010000 || (0, _util.bytesToString)(header) === 'true'; - } - function isTrueTypeCollectionFile(file) { - var header = file.peekBytes(4); - return (0, _util.bytesToString)(header) === 'ttcf'; - } - function isOpenTypeFile(file) { - var header = file.peekBytes(4); - return (0, _util.bytesToString)(header) === 'OTTO'; - } - function isType1File(file) { - var header = file.peekBytes(2); - if (header[0] === 0x25 && header[1] === 0x21) { - return true; - } - if (header[0] === 0x80 && header[1] === 0x01) { - return true; - } - return false; - } - function isCFFFile(file) { - var header = file.peekBytes(4); - if (header[0] >= 1 && header[3] >= 1 && header[3] <= 4) { - return true; - } - return false; - } - function getFontFileType(file, _ref) { - var type = _ref.type, - subtype = _ref.subtype, - composite = _ref.composite; - - var fileType = void 0, - fileSubtype = void 0; - if (isTrueTypeFile(file) || isTrueTypeCollectionFile(file)) { - if (composite) { - fileType = 'CIDFontType2'; - } else { - fileType = 'TrueType'; - } - } else if (isOpenTypeFile(file)) { - if (composite) { - fileType = 'CIDFontType2'; - } else { - fileType = 'OpenType'; - } - } else if (isType1File(file)) { - if (composite) { - fileType = 'CIDFontType0'; - } else { - fileType = type === 'MMType1' ? 'MMType1' : 'Type1'; - } - } else if (isCFFFile(file)) { - if (composite) { - fileType = 'CIDFontType0'; - fileSubtype = 'CIDFontType0C'; - } else { - fileType = type === 'MMType1' ? 'MMType1' : 'Type1'; - fileSubtype = 'Type1C'; - } - } else { - (0, _util.warn)('getFontFileType: Unable to detect correct font file Type/Subtype.'); - fileType = type; - fileSubtype = subtype; - } - return [fileType, fileSubtype]; - } - function buildToFontChar(encoding, glyphsUnicodeMap, differences) { - var toFontChar = [], - unicode; - for (var i = 0, ii = encoding.length; i < ii; i++) { - unicode = (0, _unicode.getUnicodeForGlyph)(encoding[i], glyphsUnicodeMap); - if (unicode !== -1) { - toFontChar[i] = unicode; - } - } - for (var charCode in differences) { - unicode = (0, _unicode.getUnicodeForGlyph)(differences[charCode], glyphsUnicodeMap); - if (unicode !== -1) { - toFontChar[+charCode] = unicode; - } - } - return toFontChar; - } - function adjustMapping(charCodeToGlyphId, hasGlyph, newGlyphZeroId) { - var newMap = Object.create(null); - var toFontChar = []; - var privateUseAreaIndex = 0; - var nextAvailableFontCharCode = PRIVATE_USE_AREAS[privateUseAreaIndex][0]; - var privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1]; - for (var originalCharCode in charCodeToGlyphId) { - originalCharCode |= 0; - var glyphId = charCodeToGlyphId[originalCharCode]; - if (!hasGlyph(glyphId)) { - continue; - } - if (nextAvailableFontCharCode > privateUseOffetEnd) { - privateUseAreaIndex++; - if (privateUseAreaIndex >= PRIVATE_USE_AREAS.length) { - (0, _util.warn)('Ran out of space in font private use area.'); - break; - } - nextAvailableFontCharCode = PRIVATE_USE_AREAS[privateUseAreaIndex][0]; - privateUseOffetEnd = PRIVATE_USE_AREAS[privateUseAreaIndex][1]; - } - var fontCharCode = nextAvailableFontCharCode++; - if (glyphId === 0) { - glyphId = newGlyphZeroId; - } - newMap[fontCharCode] = glyphId; - toFontChar[originalCharCode] = fontCharCode; - } - return { - toFontChar: toFontChar, - charCodeToGlyphId: newMap, - nextAvailableFontCharCode: nextAvailableFontCharCode - }; - } - function getRanges(glyphs, numGlyphs) { - var codes = []; - for (var charCode in glyphs) { - if (glyphs[charCode] >= numGlyphs) { - continue; - } - codes.push({ - fontCharCode: charCode | 0, - glyphId: glyphs[charCode] - }); - } - if (codes.length === 0) { - codes.push({ - fontCharCode: 0, - glyphId: 0 - }); - } - codes.sort(function fontGetRangesSort(a, b) { - return a.fontCharCode - b.fontCharCode; - }); - var ranges = []; - var length = codes.length; - for (var n = 0; n < length;) { - var start = codes[n].fontCharCode; - var codeIndices = [codes[n].glyphId]; - ++n; - var end = start; - while (n < length && end + 1 === codes[n].fontCharCode) { - codeIndices.push(codes[n].glyphId); - ++end; - ++n; - if (end === 0xFFFF) { - break; - } - } - ranges.push([start, end, codeIndices]); - } - return ranges; - } - function createCmapTable(glyphs, numGlyphs) { - var ranges = getRanges(glyphs, numGlyphs); - var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1; - var cmap = '\x00\x00' + string16(numTables) + '\x00\x03' + '\x00\x01' + (0, _util.string32)(4 + numTables * 8); - var i, ii, j, jj; - for (i = ranges.length - 1; i >= 0; --i) { - if (ranges[i][0] <= 0xFFFF) { - break; - } - } - var bmpLength = i + 1; - if (ranges[i][0] < 0xFFFF && ranges[i][1] === 0xFFFF) { - ranges[i][1] = 0xFFFE; - } - var trailingRangesCount = ranges[i][1] < 0xFFFF ? 1 : 0; - var segCount = bmpLength + trailingRangesCount; - var searchParams = OpenTypeFileBuilder.getSearchParams(segCount, 2); - var startCount = ''; - var endCount = ''; - var idDeltas = ''; - var idRangeOffsets = ''; - var glyphsIds = ''; - var bias = 0; - var range, start, end, codes; - for (i = 0, ii = bmpLength; i < ii; i++) { - range = ranges[i]; - start = range[0]; - end = range[1]; - startCount += string16(start); - endCount += string16(end); - codes = range[2]; - var contiguous = true; - for (j = 1, jj = codes.length; j < jj; ++j) { - if (codes[j] !== codes[j - 1] + 1) { - contiguous = false; - break; - } - } - if (!contiguous) { - var offset = (segCount - i) * 2 + bias * 2; - bias += end - start + 1; - idDeltas += string16(0); - idRangeOffsets += string16(offset); - for (j = 0, jj = codes.length; j < jj; ++j) { - glyphsIds += string16(codes[j]); - } - } else { - var startCode = codes[0]; - idDeltas += string16(startCode - start & 0xFFFF); - idRangeOffsets += string16(0); - } - } - if (trailingRangesCount > 0) { - endCount += '\xFF\xFF'; - startCount += '\xFF\xFF'; - idDeltas += '\x00\x01'; - idRangeOffsets += '\x00\x00'; - } - var format314 = '\x00\x00' + string16(2 * segCount) + string16(searchParams.range) + string16(searchParams.entry) + string16(searchParams.rangeShift) + endCount + '\x00\x00' + startCount + idDeltas + idRangeOffsets + glyphsIds; - var format31012 = ''; - var header31012 = ''; - if (numTables > 1) { - cmap += '\x00\x03' + '\x00\x0A' + (0, _util.string32)(4 + numTables * 8 + 4 + format314.length); - format31012 = ''; - for (i = 0, ii = ranges.length; i < ii; i++) { - range = ranges[i]; - start = range[0]; - codes = range[2]; - var code = codes[0]; - for (j = 1, jj = codes.length; j < jj; ++j) { - if (codes[j] !== codes[j - 1] + 1) { - end = range[0] + j - 1; - format31012 += (0, _util.string32)(start) + (0, _util.string32)(end) + (0, _util.string32)(code); - start = end + 1; - code = codes[j]; - } - } - format31012 += (0, _util.string32)(start) + (0, _util.string32)(range[1]) + (0, _util.string32)(code); - } - header31012 = '\x00\x0C' + '\x00\x00' + (0, _util.string32)(format31012.length + 16) + '\x00\x00\x00\x00' + (0, _util.string32)(format31012.length / 12); - } - return cmap + '\x00\x04' + string16(format314.length + 4) + format314 + header31012 + format31012; - } - function validateOS2Table(os2) { - var stream = new _stream.Stream(os2.data); - var version = stream.getUint16(); - stream.getBytes(60); - var selection = stream.getUint16(); - if (version < 4 && selection & 0x0300) { - return false; - } - var firstChar = stream.getUint16(); - var lastChar = stream.getUint16(); - if (firstChar > lastChar) { - return false; - } - stream.getBytes(6); - var usWinAscent = stream.getUint16(); - if (usWinAscent === 0) { - return false; - } - os2.data[8] = os2.data[9] = 0; - return true; - } - function createOS2Table(properties, charstrings, override) { - override = override || { - unitsPerEm: 0, - yMax: 0, - yMin: 0, - ascent: 0, - descent: 0 - }; - var ulUnicodeRange1 = 0; - var ulUnicodeRange2 = 0; - var ulUnicodeRange3 = 0; - var ulUnicodeRange4 = 0; - var firstCharIndex = null; - var lastCharIndex = 0; - if (charstrings) { - for (var code in charstrings) { - code |= 0; - if (firstCharIndex > code || !firstCharIndex) { - firstCharIndex = code; - } - if (lastCharIndex < code) { - lastCharIndex = code; - } - var position = (0, _unicode.getUnicodeRangeFor)(code); - if (position < 32) { - ulUnicodeRange1 |= 1 << position; - } else if (position < 64) { - ulUnicodeRange2 |= 1 << position - 32; - } else if (position < 96) { - ulUnicodeRange3 |= 1 << position - 64; - } else if (position < 123) { - ulUnicodeRange4 |= 1 << position - 96; - } else { - throw new _util.FormatError('Unicode ranges Bits > 123 are reserved for internal usage'); - } - } - if (lastCharIndex > 0xFFFF) { - lastCharIndex = 0xFFFF; - } - } else { - firstCharIndex = 0; - lastCharIndex = 255; - } - var bbox = properties.bbox || [0, 0, 0, 0]; - var unitsPerEm = override.unitsPerEm || 1 / (properties.fontMatrix || _util.FONT_IDENTITY_MATRIX)[0]; - var scale = properties.ascentScaled ? 1.0 : unitsPerEm / PDF_GLYPH_SPACE_UNITS; - var typoAscent = override.ascent || Math.round(scale * (properties.ascent || bbox[3])); - var typoDescent = override.descent || Math.round(scale * (properties.descent || bbox[1])); - if (typoDescent > 0 && properties.descent > 0 && bbox[1] < 0) { - typoDescent = -typoDescent; - } - var winAscent = override.yMax || typoAscent; - var winDescent = -override.yMin || -typoDescent; - return '\x00\x03' + '\x02\x24' + '\x01\xF4' + '\x00\x05' + '\x00\x00' + '\x02\x8A' + '\x02\xBB' + '\x00\x00' + '\x00\x8C' + '\x02\x8A' + '\x02\xBB' + '\x00\x00' + '\x01\xDF' + '\x00\x31' + '\x01\x02' + '\x00\x00' + '\x00\x00\x06' + String.fromCharCode(properties.fixedPitch ? 0x09 : 0x00) + '\x00\x00\x00\x00\x00\x00' + (0, _util.string32)(ulUnicodeRange1) + (0, _util.string32)(ulUnicodeRange2) + (0, _util.string32)(ulUnicodeRange3) + (0, _util.string32)(ulUnicodeRange4) + '\x2A\x32\x31\x2A' + string16(properties.italicAngle ? 1 : 0) + string16(firstCharIndex || properties.firstChar) + string16(lastCharIndex || properties.lastChar) + string16(typoAscent) + string16(typoDescent) + '\x00\x64' + string16(winAscent) + string16(winDescent) + '\x00\x00\x00\x00' + '\x00\x00\x00\x00' + string16(properties.xHeight) + string16(properties.capHeight) + string16(0) + string16(firstCharIndex || properties.firstChar) + '\x00\x03'; - } - function createPostTable(properties) { - var angle = Math.floor(properties.italicAngle * Math.pow(2, 16)); - return '\x00\x03\x00\x00' + (0, _util.string32)(angle) + '\x00\x00' + '\x00\x00' + (0, _util.string32)(properties.fixedPitch) + '\x00\x00\x00\x00' + '\x00\x00\x00\x00' + '\x00\x00\x00\x00' + '\x00\x00\x00\x00'; - } - function createNameTable(name, proto) { - if (!proto) { - proto = [[], []]; - } - var strings = [proto[0][0] || 'Original licence', proto[0][1] || name, proto[0][2] || 'Unknown', proto[0][3] || 'uniqueID', proto[0][4] || name, proto[0][5] || 'Version 0.11', proto[0][6] || '', proto[0][7] || 'Unknown', proto[0][8] || 'Unknown', proto[0][9] || 'Unknown']; - var stringsUnicode = []; - var i, ii, j, jj, str; - for (i = 0, ii = strings.length; i < ii; i++) { - str = proto[1][i] || strings[i]; - var strBufUnicode = []; - for (j = 0, jj = str.length; j < jj; j++) { - strBufUnicode.push(string16(str.charCodeAt(j))); - } - stringsUnicode.push(strBufUnicode.join('')); - } - var names = [strings, stringsUnicode]; - var platforms = ['\x00\x01', '\x00\x03']; - var encodings = ['\x00\x00', '\x00\x01']; - var languages = ['\x00\x00', '\x04\x09']; - var namesRecordCount = strings.length * platforms.length; - var nameTable = '\x00\x00' + string16(namesRecordCount) + string16(namesRecordCount * 12 + 6); - var strOffset = 0; - for (i = 0, ii = platforms.length; i < ii; i++) { - var strs = names[i]; - for (j = 0, jj = strs.length; j < jj; j++) { - str = strs[j]; - var nameRecord = platforms[i] + encodings[i] + languages[i] + string16(j) + string16(str.length) + string16(strOffset); - nameTable += nameRecord; - strOffset += str.length; - } - } - nameTable += strings.join('') + stringsUnicode.join(''); - return nameTable; - } - Font.prototype = { - name: null, - font: null, - mimetype: null, - encoding: null, - get renderer() { - var renderer = _font_renderer.FontRendererFactory.create(this, SEAC_ANALYSIS_ENABLED); - return (0, _util.shadow)(this, 'renderer', renderer); - }, - exportData: function Font_exportData() { - var data = {}; - for (var i in this) { - if (this.hasOwnProperty(i)) { - data[i] = this[i]; - } - } - return data; - }, - fallbackToSystemFont: function Font_fallbackToSystemFont() { - var _this = this; - - this.missingFile = true; - var charCode, unicode; - var name = this.name; - var type = this.type; - var subtype = this.subtype; - var fontName = name.replace(/[,_]/g, '-'); - var stdFontMap = (0, _standard_fonts.getStdFontMap)(), - nonStdFontMap = (0, _standard_fonts.getNonStdFontMap)(); - var isStandardFont = !!stdFontMap[fontName] || !!(nonStdFontMap[fontName] && stdFontMap[nonStdFontMap[fontName]]); - fontName = stdFontMap[fontName] || nonStdFontMap[fontName] || fontName; - this.bold = fontName.search(/bold/gi) !== -1; - this.italic = fontName.search(/oblique/gi) !== -1 || fontName.search(/italic/gi) !== -1; - this.black = name.search(/Black/g) !== -1; - this.remeasure = Object.keys(this.widths).length > 0; - if (isStandardFont && type === 'CIDFontType2' && this.cidEncoding.indexOf('Identity-') === 0) { - var GlyphMapForStandardFonts = (0, _standard_fonts.getGlyphMapForStandardFonts)(); - var map = []; - for (charCode in GlyphMapForStandardFonts) { - map[+charCode] = GlyphMapForStandardFonts[charCode]; - } - if (/Arial-?Black/i.test(name)) { - var SupplementalGlyphMapForArialBlack = (0, _standard_fonts.getSupplementalGlyphMapForArialBlack)(); - for (charCode in SupplementalGlyphMapForArialBlack) { - map[+charCode] = SupplementalGlyphMapForArialBlack[charCode]; - } - } else if (/Calibri/i.test(name)) { - var SupplementalGlyphMapForCalibri = (0, _standard_fonts.getSupplementalGlyphMapForCalibri)(); - for (charCode in SupplementalGlyphMapForCalibri) { - map[+charCode] = SupplementalGlyphMapForCalibri[charCode]; - } - } - var isIdentityUnicode = this.toUnicode instanceof IdentityToUnicodeMap; - if (!isIdentityUnicode) { - this.toUnicode.forEach(function (charCode, unicodeCharCode) { - map[+charCode] = unicodeCharCode; - }); - } - this.toFontChar = map; - this.toUnicode = new ToUnicodeMap(map); - } else if (/Symbol/i.test(fontName)) { - this.toFontChar = buildToFontChar(_encodings.SymbolSetEncoding, (0, _glyphlist.getGlyphsUnicode)(), this.differences); - } else if (/Dingbats/i.test(fontName)) { - if (/Wingdings/i.test(name)) { - (0, _util.warn)('Non-embedded Wingdings font, falling back to ZapfDingbats.'); - } - this.toFontChar = buildToFontChar(_encodings.ZapfDingbatsEncoding, (0, _glyphlist.getDingbatsGlyphsUnicode)(), this.differences); - } else if (isStandardFont) { - this.toFontChar = buildToFontChar(this.defaultEncoding, (0, _glyphlist.getGlyphsUnicode)(), this.differences); - } else { - var glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); - this.toUnicode.forEach(function (charCode, unicodeCharCode) { - if (!_this.composite) { - var glyphName = _this.differences[charCode] || _this.defaultEncoding[charCode]; - unicode = (0, _unicode.getUnicodeForGlyph)(glyphName, glyphsUnicodeMap); - if (unicode !== -1) { - unicodeCharCode = unicode; - } - } - _this.toFontChar[charCode] = unicodeCharCode; - }); - } - this.loadedName = fontName.split('-')[0]; - this.fontType = getFontType(type, subtype); - }, - checkAndRepair: function Font_checkAndRepair(name, font, properties) { - var VALID_TABLES = ['OS/2', 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'post', 'loca', 'glyf', 'fpgm', 'prep', 'cvt ', 'CFF ']; - function readTables(file, numTables) { - var tables = Object.create(null); - tables['OS/2'] = null; - tables['cmap'] = null; - tables['head'] = null; - tables['hhea'] = null; - tables['hmtx'] = null; - tables['maxp'] = null; - tables['name'] = null; - tables['post'] = null; - for (var i = 0; i < numTables; i++) { - var table = readTableEntry(font); - if (!VALID_TABLES.includes(table.tag)) { - continue; - } - if (table.length === 0) { - continue; - } - tables[table.tag] = table; - } - return tables; - } - function readTableEntry(file) { - var tag = (0, _util.bytesToString)(file.getBytes(4)); - var checksum = file.getInt32() >>> 0; - var offset = file.getInt32() >>> 0; - var length = file.getInt32() >>> 0; - var previousPosition = file.pos; - file.pos = file.start ? file.start : 0; - file.skip(offset); - var data = file.getBytes(length); - file.pos = previousPosition; - if (tag === 'head') { - data[8] = data[9] = data[10] = data[11] = 0; - data[17] |= 0x20; - } - return { - tag: tag, - checksum: checksum, - length: length, - offset: offset, - data: data - }; - } - function readOpenTypeHeader(ttf) { - return { - version: (0, _util.bytesToString)(ttf.getBytes(4)), - numTables: ttf.getUint16(), - searchRange: ttf.getUint16(), - entrySelector: ttf.getUint16(), - rangeShift: ttf.getUint16() - }; - } - function readTrueTypeCollectionHeader(ttc) { - var ttcTag = (0, _util.bytesToString)(ttc.getBytes(4)); - (0, _util.assert)(ttcTag === 'ttcf', 'Must be a TrueType Collection font.'); - var majorVersion = ttc.getUint16(); - var minorVersion = ttc.getUint16(); - var numFonts = ttc.getInt32() >>> 0; - var offsetTable = []; - for (var i = 0; i < numFonts; i++) { - offsetTable.push(ttc.getInt32() >>> 0); - } - var header = { - ttcTag: ttcTag, - majorVersion: majorVersion, - minorVersion: minorVersion, - numFonts: numFonts, - offsetTable: offsetTable - }; - switch (majorVersion) { - case 1: - return header; - case 2: - header.dsigTag = ttc.getInt32() >>> 0; - header.dsigLength = ttc.getInt32() >>> 0; - header.dsigOffset = ttc.getInt32() >>> 0; - return header; - } - throw new _util.FormatError('Invalid TrueType Collection majorVersion: ' + majorVersion + '.'); - } - function readTrueTypeCollectionData(ttc, fontName) { - var _readTrueTypeCollecti = readTrueTypeCollectionHeader(ttc), - numFonts = _readTrueTypeCollecti.numFonts, - offsetTable = _readTrueTypeCollecti.offsetTable; - - for (var i = 0; i < numFonts; i++) { - ttc.pos = (ttc.start || 0) + offsetTable[i]; - var potentialHeader = readOpenTypeHeader(ttc); - var potentialTables = readTables(ttc, potentialHeader.numTables); - if (!potentialTables['name']) { - throw new _util.FormatError('TrueType Collection font must contain a "name" table.'); - } - var nameTable = readNameTable(potentialTables['name']); - for (var j = 0, jj = nameTable.length; j < jj; j++) { - for (var k = 0, kk = nameTable[j].length; k < kk; k++) { - var nameEntry = nameTable[j][k]; - if (nameEntry && nameEntry.replace(/\s/g, '') === fontName) { - return { - header: potentialHeader, - tables: potentialTables - }; - } - } - } - } - throw new _util.FormatError('TrueType Collection does not contain "' + fontName + '" font.'); - } - function readCmapTable(cmap, font, isSymbolicFont, hasEncoding) { - if (!cmap) { - (0, _util.warn)('No cmap table available.'); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: false - }; - } - var segment; - var start = (font.start ? font.start : 0) + cmap.offset; - font.pos = start; - font.getUint16(); - var numTables = font.getUint16(); - var potentialTable; - var canBreak = false; - for (var i = 0; i < numTables; i++) { - var platformId = font.getUint16(); - var encodingId = font.getUint16(); - var offset = font.getInt32() >>> 0; - var useTable = false; - if (potentialTable && potentialTable.platformId === platformId && potentialTable.encodingId === encodingId) { - continue; - } - if (platformId === 0 && encodingId === 0) { - useTable = true; - } else if (platformId === 1 && encodingId === 0) { - useTable = true; - } else if (platformId === 3 && encodingId === 1 && (hasEncoding || !potentialTable)) { - useTable = true; - if (!isSymbolicFont) { - canBreak = true; - } - } else if (isSymbolicFont && platformId === 3 && encodingId === 0) { - useTable = true; - canBreak = true; - } - if (useTable) { - potentialTable = { - platformId: platformId, - encodingId: encodingId, - offset: offset - }; - } - if (canBreak) { - break; - } - } - if (potentialTable) { - font.pos = start + potentialTable.offset; - } - if (!potentialTable || font.peekByte() === -1) { - (0, _util.warn)('Could not find a preferred cmap table.'); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: false - }; - } - var format = font.getUint16(); - font.getUint16(); - font.getUint16(); - var hasShortCmap = false; - var mappings = []; - var j, glyphId; - if (format === 0) { - for (j = 0; j < 256; j++) { - var index = font.getByte(); - if (!index) { - continue; - } - mappings.push({ - charCode: j, - glyphId: index - }); - } - hasShortCmap = true; - } else if (format === 4) { - var segCount = font.getUint16() >> 1; - font.getBytes(6); - var segIndex, - segments = []; - for (segIndex = 0; segIndex < segCount; segIndex++) { - segments.push({ end: font.getUint16() }); - } - font.getUint16(); - for (segIndex = 0; segIndex < segCount; segIndex++) { - segments[segIndex].start = font.getUint16(); - } - for (segIndex = 0; segIndex < segCount; segIndex++) { - segments[segIndex].delta = font.getUint16(); - } - var offsetsCount = 0; - for (segIndex = 0; segIndex < segCount; segIndex++) { - segment = segments[segIndex]; - var rangeOffset = font.getUint16(); - if (!rangeOffset) { - segment.offsetIndex = -1; - continue; - } - var offsetIndex = (rangeOffset >> 1) - (segCount - segIndex); - segment.offsetIndex = offsetIndex; - offsetsCount = Math.max(offsetsCount, offsetIndex + segment.end - segment.start + 1); - } - var offsets = []; - for (j = 0; j < offsetsCount; j++) { - offsets.push(font.getUint16()); - } - for (segIndex = 0; segIndex < segCount; segIndex++) { - segment = segments[segIndex]; - start = segment.start; - var end = segment.end; - var delta = segment.delta; - offsetIndex = segment.offsetIndex; - for (j = start; j <= end; j++) { - if (j === 0xFFFF) { - continue; - } - glyphId = offsetIndex < 0 ? j : offsets[offsetIndex + j - start]; - glyphId = glyphId + delta & 0xFFFF; - mappings.push({ - charCode: j, - glyphId: glyphId - }); - } - } - } else if (format === 6) { - var firstCode = font.getUint16(); - var entryCount = font.getUint16(); - for (j = 0; j < entryCount; j++) { - glyphId = font.getUint16(); - var charCode = firstCode + j; - mappings.push({ - charCode: charCode, - glyphId: glyphId - }); - } - } else { - (0, _util.warn)('cmap table has unsupported format: ' + format); - return { - platformId: -1, - encodingId: -1, - mappings: [], - hasShortCmap: false - }; - } - mappings.sort(function (a, b) { - return a.charCode - b.charCode; - }); - for (i = 1; i < mappings.length; i++) { - if (mappings[i - 1].charCode === mappings[i].charCode) { - mappings.splice(i, 1); - i--; - } - } - return { - platformId: potentialTable.platformId, - encodingId: potentialTable.encodingId, - mappings: mappings, - hasShortCmap: hasShortCmap - }; - } - function sanitizeMetrics(font, header, metrics, numGlyphs) { - if (!header) { - if (metrics) { - metrics.data = null; - } - return; - } - font.pos = (font.start ? font.start : 0) + header.offset; - font.pos += header.length - 2; - var numOfMetrics = font.getUint16(); - if (numOfMetrics > numGlyphs) { - (0, _util.info)('The numOfMetrics (' + numOfMetrics + ') should not be ' + 'greater than the numGlyphs (' + numGlyphs + ')'); - numOfMetrics = numGlyphs; - header.data[34] = (numOfMetrics & 0xff00) >> 8; - header.data[35] = numOfMetrics & 0x00ff; - } - var numOfSidebearings = numGlyphs - numOfMetrics; - var numMissing = numOfSidebearings - (metrics.length - numOfMetrics * 4 >> 1); - if (numMissing > 0) { - var entries = new Uint8Array(metrics.length + numMissing * 2); - entries.set(metrics.data); - metrics.data = entries; - } - } - function sanitizeGlyph(source, sourceStart, sourceEnd, dest, destStart, hintsValid) { - var glyphProfile = { - length: 0, - sizeOfInstructions: 0 - }; - if (sourceEnd - sourceStart <= 12) { - return glyphProfile; - } - var glyf = source.subarray(sourceStart, sourceEnd); - var contoursCount = signedInt16(glyf[0], glyf[1]); - if (contoursCount < 0) { - contoursCount = -1; - writeSignedInt16(glyf, 0, contoursCount); - dest.set(glyf, destStart); - glyphProfile.length = glyf.length; - return glyphProfile; - } - var i, - j = 10, - flagsCount = 0; - for (i = 0; i < contoursCount; i++) { - var endPoint = glyf[j] << 8 | glyf[j + 1]; - flagsCount = endPoint + 1; - j += 2; - } - var instructionsStart = j; - var instructionsLength = glyf[j] << 8 | glyf[j + 1]; - glyphProfile.sizeOfInstructions = instructionsLength; - j += 2 + instructionsLength; - var instructionsEnd = j; - var coordinatesLength = 0; - for (i = 0; i < flagsCount; i++) { - var flag = glyf[j++]; - if (flag & 0xC0) { - glyf[j - 1] = flag & 0x3F; - } - var xyLength = (flag & 2 ? 1 : flag & 16 ? 0 : 2) + (flag & 4 ? 1 : flag & 32 ? 0 : 2); - coordinatesLength += xyLength; - if (flag & 8) { - var repeat = glyf[j++]; - i += repeat; - coordinatesLength += repeat * xyLength; - } - } - if (coordinatesLength === 0) { - return glyphProfile; - } - var glyphDataLength = j + coordinatesLength; - if (glyphDataLength > glyf.length) { - return glyphProfile; - } - if (!hintsValid && instructionsLength > 0) { - dest.set(glyf.subarray(0, instructionsStart), destStart); - dest.set([0, 0], destStart + instructionsStart); - dest.set(glyf.subarray(instructionsEnd, glyphDataLength), destStart + instructionsStart + 2); - glyphDataLength -= instructionsLength; - if (glyf.length - glyphDataLength > 3) { - glyphDataLength = glyphDataLength + 3 & ~3; - } - glyphProfile.length = glyphDataLength; - return glyphProfile; - } - if (glyf.length - glyphDataLength > 3) { - glyphDataLength = glyphDataLength + 3 & ~3; - dest.set(glyf.subarray(0, glyphDataLength), destStart); - glyphProfile.length = glyphDataLength; - return glyphProfile; - } - dest.set(glyf, destStart); - glyphProfile.length = glyf.length; - return glyphProfile; - } - function sanitizeHead(head, numGlyphs, locaLength) { - var data = head.data; - var version = int32(data[0], data[1], data[2], data[3]); - if (version >> 16 !== 1) { - (0, _util.info)('Attempting to fix invalid version in head table: ' + version); - data[0] = 0; - data[1] = 1; - data[2] = 0; - data[3] = 0; - } - var indexToLocFormat = int16(data[50], data[51]); - if (indexToLocFormat < 0 || indexToLocFormat > 1) { - (0, _util.info)('Attempting to fix invalid indexToLocFormat in head table: ' + indexToLocFormat); - var numGlyphsPlusOne = numGlyphs + 1; - if (locaLength === numGlyphsPlusOne << 1) { - data[50] = 0; - data[51] = 0; - } else if (locaLength === numGlyphsPlusOne << 2) { - data[50] = 0; - data[51] = 1; - } else { - throw new _util.FormatError('Could not fix indexToLocFormat: ' + indexToLocFormat); - } - } - } - function sanitizeGlyphLocations(loca, glyf, numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions) { - var itemSize, itemDecode, itemEncode; - if (isGlyphLocationsLong) { - itemSize = 4; - itemDecode = function fontItemDecodeLong(data, offset) { - return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; - }; - itemEncode = function fontItemEncodeLong(data, offset, value) { - data[offset] = value >>> 24 & 0xFF; - data[offset + 1] = value >> 16 & 0xFF; - data[offset + 2] = value >> 8 & 0xFF; - data[offset + 3] = value & 0xFF; - }; - } else { - itemSize = 2; - itemDecode = function fontItemDecode(data, offset) { - return data[offset] << 9 | data[offset + 1] << 1; - }; - itemEncode = function fontItemEncode(data, offset, value) { - data[offset] = value >> 9 & 0xFF; - data[offset + 1] = value >> 1 & 0xFF; - }; - } - var numGlyphsOut = dupFirstEntry ? numGlyphs + 1 : numGlyphs; - var locaData = loca.data; - var locaDataSize = itemSize * (1 + numGlyphsOut); - locaData = new Uint8Array(locaDataSize); - locaData.set(loca.data.subarray(0, locaDataSize)); - loca.data = locaData; - var oldGlyfData = glyf.data; - var oldGlyfDataLength = oldGlyfData.length; - var newGlyfData = new Uint8Array(oldGlyfDataLength); - var startOffset = itemDecode(locaData, 0); - var writeOffset = 0; - var missingGlyphs = Object.create(null); - itemEncode(locaData, 0, writeOffset); - var i, j; - for (i = 0, j = itemSize; i < numGlyphs; i++, j += itemSize) { - var endOffset = itemDecode(locaData, j); - if (endOffset === 0) { - endOffset = startOffset; - } - if (endOffset > oldGlyfDataLength && (oldGlyfDataLength + 3 & ~3) === endOffset) { - endOffset = oldGlyfDataLength; - } - if (endOffset > oldGlyfDataLength) { - startOffset = endOffset; - } - var glyphProfile = sanitizeGlyph(oldGlyfData, startOffset, endOffset, newGlyfData, writeOffset, hintsValid); - var newLength = glyphProfile.length; - if (newLength === 0) { - missingGlyphs[i] = true; - } - if (glyphProfile.sizeOfInstructions > maxSizeOfInstructions) { - maxSizeOfInstructions = glyphProfile.sizeOfInstructions; - } - writeOffset += newLength; - itemEncode(locaData, j, writeOffset); - startOffset = endOffset; - } - if (writeOffset === 0) { - var simpleGlyph = new Uint8Array([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0]); - for (i = 0, j = itemSize; i < numGlyphsOut; i++, j += itemSize) { - itemEncode(locaData, j, simpleGlyph.length); - } - glyf.data = simpleGlyph; - } else if (dupFirstEntry) { - var firstEntryLength = itemDecode(locaData, itemSize); - if (newGlyfData.length > firstEntryLength + writeOffset) { - glyf.data = newGlyfData.subarray(0, firstEntryLength + writeOffset); - } else { - glyf.data = new Uint8Array(firstEntryLength + writeOffset); - glyf.data.set(newGlyfData.subarray(0, writeOffset)); - } - glyf.data.set(newGlyfData.subarray(0, firstEntryLength), writeOffset); - itemEncode(loca.data, locaData.length - itemSize, writeOffset + firstEntryLength); - } else { - glyf.data = newGlyfData.subarray(0, writeOffset); - } - return { - missingGlyphs: missingGlyphs, - maxSizeOfInstructions: maxSizeOfInstructions - }; - } - function readPostScriptTable(post, properties, maxpNumGlyphs) { - var start = (font.start ? font.start : 0) + post.offset; - font.pos = start; - var length = post.length, - end = start + length; - var version = font.getInt32(); - font.getBytes(28); - var glyphNames; - var valid = true; - var i; - switch (version) { - case 0x00010000: - glyphNames = MacStandardGlyphOrdering; - break; - case 0x00020000: - var numGlyphs = font.getUint16(); - if (numGlyphs !== maxpNumGlyphs) { - valid = false; - break; - } - var glyphNameIndexes = []; - for (i = 0; i < numGlyphs; ++i) { - var index = font.getUint16(); - if (index >= 32768) { - valid = false; - break; - } - glyphNameIndexes.push(index); - } - if (!valid) { - break; - } - var customNames = []; - var strBuf = []; - while (font.pos < end) { - var stringLength = font.getByte(); - strBuf.length = stringLength; - for (i = 0; i < stringLength; ++i) { - strBuf[i] = String.fromCharCode(font.getByte()); - } - customNames.push(strBuf.join('')); - } - glyphNames = []; - for (i = 0; i < numGlyphs; ++i) { - var j = glyphNameIndexes[i]; - if (j < 258) { - glyphNames.push(MacStandardGlyphOrdering[j]); - continue; - } - glyphNames.push(customNames[j - 258]); - } - break; - case 0x00030000: - break; - default: - (0, _util.warn)('Unknown/unsupported post table version ' + version); - valid = false; - if (properties.defaultEncoding) { - glyphNames = properties.defaultEncoding; - } - break; - } - properties.glyphNames = glyphNames; - return valid; - } - function readNameTable(nameTable) { - var start = (font.start ? font.start : 0) + nameTable.offset; - font.pos = start; - var names = [[], []]; - var length = nameTable.length, - end = start + length; - var format = font.getUint16(); - var FORMAT_0_HEADER_LENGTH = 6; - if (format !== 0 || length < FORMAT_0_HEADER_LENGTH) { - return names; - } - var numRecords = font.getUint16(); - var stringsStart = font.getUint16(); - var records = []; - var NAME_RECORD_LENGTH = 12; - var i, ii; - for (i = 0; i < numRecords && font.pos + NAME_RECORD_LENGTH <= end; i++) { - var r = { - platform: font.getUint16(), - encoding: font.getUint16(), - language: font.getUint16(), - name: font.getUint16(), - length: font.getUint16(), - offset: font.getUint16() - }; - if (r.platform === 1 && r.encoding === 0 && r.language === 0 || r.platform === 3 && r.encoding === 1 && r.language === 0x409) { - records.push(r); - } - } - for (i = 0, ii = records.length; i < ii; i++) { - var record = records[i]; - if (record.length <= 0) { - continue; - } - var pos = start + stringsStart + record.offset; - if (pos + record.length > end) { - continue; - } - font.pos = pos; - var nameIndex = record.name; - if (record.encoding) { - var str = ''; - for (var j = 0, jj = record.length; j < jj; j += 2) { - str += String.fromCharCode(font.getUint16()); - } - names[1][nameIndex] = str; - } else { - names[0][nameIndex] = (0, _util.bytesToString)(font.getBytes(record.length)); - } - } - return names; - } - var TTOpsStackDeltas = [0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1, 1, -1, -999, 0, 1, 0, -1, -2, 0, -1, -2, -1, -1, 0, -1, -1, 0, 0, -999, -999, -1, -1, -1, -1, -2, -999, -2, -2, -999, 0, -2, -2, 0, 0, -2, 0, -2, 0, 0, 0, -2, -1, -1, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, 0, -999, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -999, -999, -999, -999, -999, -1, -1, -2, -2, 0, 0, 0, 0, -1, -1, -999, -2, -2, 0, 0, -1, -2, -2, 0, 0, 0, -1, -1, -1, -2]; - function sanitizeTTProgram(table, ttContext) { - var data = table.data; - var i = 0, - j, - n, - b, - funcId, - pc, - lastEndf = 0, - lastDeff = 0; - var stack = []; - var callstack = []; - var functionsCalled = []; - var tooComplexToFollowFunctions = ttContext.tooComplexToFollowFunctions; - var inFDEF = false, - ifLevel = 0, - inELSE = 0; - for (var ii = data.length; i < ii;) { - var op = data[i++]; - if (op === 0x40) { - n = data[i++]; - if (inFDEF || inELSE) { - i += n; - } else { - for (j = 0; j < n; j++) { - stack.push(data[i++]); - } - } - } else if (op === 0x41) { - n = data[i++]; - if (inFDEF || inELSE) { - i += n * 2; - } else { - for (j = 0; j < n; j++) { - b = data[i++]; - stack.push(b << 8 | data[i++]); - } - } - } else if ((op & 0xF8) === 0xB0) { - n = op - 0xB0 + 1; - if (inFDEF || inELSE) { - i += n; - } else { - for (j = 0; j < n; j++) { - stack.push(data[i++]); - } - } - } else if ((op & 0xF8) === 0xB8) { - n = op - 0xB8 + 1; - if (inFDEF || inELSE) { - i += n * 2; - } else { - for (j = 0; j < n; j++) { - b = data[i++]; - stack.push(b << 8 | data[i++]); - } - } - } else if (op === 0x2B && !tooComplexToFollowFunctions) { - if (!inFDEF && !inELSE) { - funcId = stack[stack.length - 1]; - if (isNaN(funcId)) { - (0, _util.info)('TT: CALL empty stack (or invalid entry).'); - } else { - ttContext.functionsUsed[funcId] = true; - if (funcId in ttContext.functionsStackDeltas) { - var newStackLength = stack.length + ttContext.functionsStackDeltas[funcId]; - if (newStackLength < 0) { - (0, _util.warn)('TT: CALL invalid functions stack delta.'); - ttContext.hintsValid = false; - return; - } - stack.length = newStackLength; - } else if (funcId in ttContext.functionsDefined && !functionsCalled.includes(funcId)) { - callstack.push({ - data: data, - i: i, - stackTop: stack.length - 1 - }); - functionsCalled.push(funcId); - pc = ttContext.functionsDefined[funcId]; - if (!pc) { - (0, _util.warn)('TT: CALL non-existent function'); - ttContext.hintsValid = false; - return; - } - data = pc.data; - i = pc.i; - } - } - } - } else if (op === 0x2C && !tooComplexToFollowFunctions) { - if (inFDEF || inELSE) { - (0, _util.warn)('TT: nested FDEFs not allowed'); - tooComplexToFollowFunctions = true; - } - inFDEF = true; - lastDeff = i; - funcId = stack.pop(); - ttContext.functionsDefined[funcId] = { - data: data, - i: i - }; - } else if (op === 0x2D) { - if (inFDEF) { - inFDEF = false; - lastEndf = i; - } else { - pc = callstack.pop(); - if (!pc) { - (0, _util.warn)('TT: ENDF bad stack'); - ttContext.hintsValid = false; - return; - } - funcId = functionsCalled.pop(); - data = pc.data; - i = pc.i; - ttContext.functionsStackDeltas[funcId] = stack.length - pc.stackTop; - } - } else if (op === 0x89) { - if (inFDEF || inELSE) { - (0, _util.warn)('TT: nested IDEFs not allowed'); - tooComplexToFollowFunctions = true; - } - inFDEF = true; - lastDeff = i; - } else if (op === 0x58) { - ++ifLevel; - } else if (op === 0x1B) { - inELSE = ifLevel; - } else if (op === 0x59) { - if (inELSE === ifLevel) { - inELSE = 0; - } - --ifLevel; - } else if (op === 0x1C) { - if (!inFDEF && !inELSE) { - var offset = stack[stack.length - 1]; - if (offset > 0) { - i += offset - 1; - } - } - } - if (!inFDEF && !inELSE) { - var stackDelta = op <= 0x8E ? TTOpsStackDeltas[op] : op >= 0xC0 && op <= 0xDF ? -1 : op >= 0xE0 ? -2 : 0; - if (op >= 0x71 && op <= 0x75) { - n = stack.pop(); - if (!isNaN(n)) { - stackDelta = -n * 2; - } - } - while (stackDelta < 0 && stack.length > 0) { - stack.pop(); - stackDelta++; - } - while (stackDelta > 0) { - stack.push(NaN); - stackDelta--; - } - } - } - ttContext.tooComplexToFollowFunctions = tooComplexToFollowFunctions; - var content = [data]; - if (i > data.length) { - content.push(new Uint8Array(i - data.length)); - } - if (lastDeff > lastEndf) { - (0, _util.warn)('TT: complementing a missing function tail'); - content.push(new Uint8Array([0x22, 0x2D])); - } - foldTTTable(table, content); - } - function checkInvalidFunctions(ttContext, maxFunctionDefs) { - if (ttContext.tooComplexToFollowFunctions) { - return; - } - if (ttContext.functionsDefined.length > maxFunctionDefs) { - (0, _util.warn)('TT: more functions defined than expected'); - ttContext.hintsValid = false; - return; - } - for (var j = 0, jj = ttContext.functionsUsed.length; j < jj; j++) { - if (j > maxFunctionDefs) { - (0, _util.warn)('TT: invalid function id: ' + j); - ttContext.hintsValid = false; - return; - } - if (ttContext.functionsUsed[j] && !ttContext.functionsDefined[j]) { - (0, _util.warn)('TT: undefined function: ' + j); - ttContext.hintsValid = false; - return; - } - } - } - function foldTTTable(table, content) { - if (content.length > 1) { - var newLength = 0; - var j, jj; - for (j = 0, jj = content.length; j < jj; j++) { - newLength += content[j].length; - } - newLength = newLength + 3 & ~3; - var result = new Uint8Array(newLength); - var pos = 0; - for (j = 0, jj = content.length; j < jj; j++) { - result.set(content[j], pos); - pos += content[j].length; - } - table.data = result; - table.length = newLength; - } - } - function sanitizeTTPrograms(fpgm, prep, cvt, maxFunctionDefs) { - var ttContext = { - functionsDefined: [], - functionsUsed: [], - functionsStackDeltas: [], - tooComplexToFollowFunctions: false, - hintsValid: true - }; - if (fpgm) { - sanitizeTTProgram(fpgm, ttContext); - } - if (prep) { - sanitizeTTProgram(prep, ttContext); - } - if (fpgm) { - checkInvalidFunctions(ttContext, maxFunctionDefs); - } - if (cvt && cvt.length & 1) { - var cvtData = new Uint8Array(cvt.length + 1); - cvtData.set(cvt.data); - cvt.data = cvtData; - } - return ttContext.hintsValid; - } - font = new _stream.Stream(new Uint8Array(font.getBytes())); - var header = void 0, - tables = void 0; - if (isTrueTypeCollectionFile(font)) { - var ttcData = readTrueTypeCollectionData(font, this.name); - header = ttcData.header; - tables = ttcData.tables; - } else { - header = readOpenTypeHeader(font); - tables = readTables(font, header.numTables); - } - var cff = void 0, - cffFile = void 0; - var isTrueType = !tables['CFF ']; - if (!isTrueType) { - var isComposite = properties.composite && ((properties.cidToGidMap || []).length > 0 || !(properties.cMap instanceof _cmap.IdentityCMap)); - if (header.version === 'OTTO' && !isComposite || !tables['head'] || !tables['hhea'] || !tables['maxp'] || !tables['post']) { - cffFile = new _stream.Stream(tables['CFF '].data); - cff = new CFFFont(cffFile, properties); - adjustWidths(properties); - return this.convert(name, cff, properties); - } - delete tables['glyf']; - delete tables['loca']; - delete tables['fpgm']; - delete tables['prep']; - delete tables['cvt ']; - this.isOpenType = true; - } else { - if (!tables['loca']) { - throw new _util.FormatError('Required "loca" table is not found'); - } - if (!tables['glyf']) { - (0, _util.warn)('Required "glyf" table is not found -- trying to recover.'); - tables['glyf'] = { - tag: 'glyf', - data: new Uint8Array(0) - }; - } - this.isOpenType = false; - } - if (!tables['maxp']) { - throw new _util.FormatError('Required "maxp" table is not found'); - } - font.pos = (font.start || 0) + tables['maxp'].offset; - var version = font.getInt32(); - var numGlyphs = font.getUint16(); - var numGlyphsOut = numGlyphs + 1; - var dupFirstEntry = true; - if (numGlyphsOut > 0xFFFF) { - dupFirstEntry = false; - numGlyphsOut = numGlyphs; - (0, _util.warn)('Not enough space in glyfs to duplicate first glyph.'); - } - var maxFunctionDefs = 0; - var maxSizeOfInstructions = 0; - if (version >= 0x00010000 && tables['maxp'].length >= 22) { - font.pos += 8; - var maxZones = font.getUint16(); - if (maxZones > 2) { - tables['maxp'].data[14] = 0; - tables['maxp'].data[15] = 2; - } - font.pos += 4; - maxFunctionDefs = font.getUint16(); - font.pos += 4; - maxSizeOfInstructions = font.getUint16(); - } - tables['maxp'].data[4] = numGlyphsOut >> 8; - tables['maxp'].data[5] = numGlyphsOut & 255; - var hintsValid = sanitizeTTPrograms(tables['fpgm'], tables['prep'], tables['cvt '], maxFunctionDefs); - if (!hintsValid) { - delete tables['fpgm']; - delete tables['prep']; - delete tables['cvt ']; - } - sanitizeMetrics(font, tables['hhea'], tables['hmtx'], numGlyphsOut); - if (!tables['head']) { - throw new _util.FormatError('Required "head" table is not found'); - } - sanitizeHead(tables['head'], numGlyphs, isTrueType ? tables['loca'].length : 0); - var missingGlyphs = Object.create(null); - if (isTrueType) { - var isGlyphLocationsLong = int16(tables['head'].data[50], tables['head'].data[51]); - var glyphsInfo = sanitizeGlyphLocations(tables['loca'], tables['glyf'], numGlyphs, isGlyphLocationsLong, hintsValid, dupFirstEntry, maxSizeOfInstructions); - missingGlyphs = glyphsInfo.missingGlyphs; - if (version >= 0x00010000 && tables['maxp'].length >= 22) { - tables['maxp'].data[26] = glyphsInfo.maxSizeOfInstructions >> 8; - tables['maxp'].data[27] = glyphsInfo.maxSizeOfInstructions & 255; - } - } - if (!tables['hhea']) { - throw new _util.FormatError('Required "hhea" table is not found'); - } - if (tables['hhea'].data[10] === 0 && tables['hhea'].data[11] === 0) { - tables['hhea'].data[10] = 0xFF; - tables['hhea'].data[11] = 0xFF; - } - var metricsOverride = { - unitsPerEm: int16(tables['head'].data[18], tables['head'].data[19]), - yMax: int16(tables['head'].data[42], tables['head'].data[43]), - yMin: signedInt16(tables['head'].data[38], tables['head'].data[39]), - ascent: int16(tables['hhea'].data[4], tables['hhea'].data[5]), - descent: signedInt16(tables['hhea'].data[6], tables['hhea'].data[7]) - }; - this.ascent = metricsOverride.ascent / metricsOverride.unitsPerEm; - this.descent = metricsOverride.descent / metricsOverride.unitsPerEm; - if (tables['post']) { - readPostScriptTable(tables['post'], properties, numGlyphs); - } - tables['post'] = { - tag: 'post', - data: createPostTable(properties) - }; - var charCodeToGlyphId = [], - charCode; - function hasGlyph(glyphId) { - return !missingGlyphs[glyphId]; - } - if (properties.composite) { - var cidToGidMap = properties.cidToGidMap || []; - var isCidToGidMapEmpty = cidToGidMap.length === 0; - properties.cMap.forEach(function (charCode, cid) { - if (cid > 0xffff) { - throw new _util.FormatError('Max size of CID is 65,535'); - } - var glyphId = -1; - if (isCidToGidMapEmpty) { - glyphId = cid; - } else if (cidToGidMap[cid] !== undefined) { - glyphId = cidToGidMap[cid]; - } - if (glyphId >= 0 && glyphId < numGlyphs && hasGlyph(glyphId)) { - charCodeToGlyphId[charCode] = glyphId; - } - }); - } else { - var cmapTable = readCmapTable(tables['cmap'], font, this.isSymbolicFont, properties.hasEncoding); - var cmapPlatformId = cmapTable.platformId; - var cmapEncodingId = cmapTable.encodingId; - var cmapMappings = cmapTable.mappings; - var cmapMappingsLength = cmapMappings.length; - if (properties.hasEncoding && (cmapPlatformId === 3 && cmapEncodingId === 1 || cmapPlatformId === 1 && cmapEncodingId === 0) || cmapPlatformId === -1 && cmapEncodingId === -1 && !!(0, _encodings.getEncoding)(properties.baseEncodingName)) { - var baseEncoding = []; - if (properties.baseEncodingName === 'MacRomanEncoding' || properties.baseEncodingName === 'WinAnsiEncoding') { - baseEncoding = (0, _encodings.getEncoding)(properties.baseEncodingName); - } - var glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); - for (charCode = 0; charCode < 256; charCode++) { - var glyphName, standardGlyphName; - if (this.differences && charCode in this.differences) { - glyphName = this.differences[charCode]; - } else if (charCode in baseEncoding && baseEncoding[charCode] !== '') { - glyphName = baseEncoding[charCode]; - } else { - glyphName = _encodings.StandardEncoding[charCode]; - } - if (!glyphName) { - continue; - } - standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); - var unicodeOrCharCode; - if (cmapPlatformId === 3 && cmapEncodingId === 1) { - unicodeOrCharCode = glyphsUnicodeMap[standardGlyphName]; - } else if (cmapPlatformId === 1 && cmapEncodingId === 0) { - unicodeOrCharCode = _encodings.MacRomanEncoding.indexOf(standardGlyphName); - } - var found = false; - for (var i = 0; i < cmapMappingsLength; ++i) { - if (cmapMappings[i].charCode !== unicodeOrCharCode) { - continue; - } - charCodeToGlyphId[charCode] = cmapMappings[i].glyphId; - found = true; - break; - } - if (!found && properties.glyphNames) { - var glyphId = properties.glyphNames.indexOf(glyphName); - if (glyphId === -1 && standardGlyphName !== glyphName) { - glyphId = properties.glyphNames.indexOf(standardGlyphName); - } - if (glyphId > 0 && hasGlyph(glyphId)) { - charCodeToGlyphId[charCode] = glyphId; - } - } - } - } else if (cmapPlatformId === 0 && cmapEncodingId === 0) { - for (var _i = 0; _i < cmapMappingsLength; ++_i) { - charCodeToGlyphId[cmapMappings[_i].charCode] = cmapMappings[_i].glyphId; - } - } else { - for (var _i2 = 0; _i2 < cmapMappingsLength; ++_i2) { - charCode = cmapMappings[_i2].charCode; - if (cmapPlatformId === 3 && charCode >= 0xF000 && charCode <= 0xF0FF) { - charCode &= 0xFF; - } - charCodeToGlyphId[charCode] = cmapMappings[_i2].glyphId; - } - } - } - if (charCodeToGlyphId.length === 0) { - charCodeToGlyphId[0] = 0; - } - var glyphZeroId = numGlyphsOut - 1; - if (!dupFirstEntry) { - glyphZeroId = 0; - } - var newMapping = adjustMapping(charCodeToGlyphId, hasGlyph, glyphZeroId); - this.toFontChar = newMapping.toFontChar; - tables['cmap'] = { - tag: 'cmap', - data: createCmapTable(newMapping.charCodeToGlyphId, numGlyphsOut) - }; - if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) { - tables['OS/2'] = { - tag: 'OS/2', - data: createOS2Table(properties, newMapping.charCodeToGlyphId, metricsOverride) - }; - } - if (!isTrueType) { - try { - cffFile = new _stream.Stream(tables['CFF '].data); - var parser = new _cff_parser.CFFParser(cffFile, properties, SEAC_ANALYSIS_ENABLED); - cff = parser.parse(); - cff.duplicateFirstGlyph(); - var compiler = new _cff_parser.CFFCompiler(cff); - tables['CFF '].data = compiler.compile(); - } catch (e) { - (0, _util.warn)('Failed to compile font ' + properties.loadedName); - } - } - if (!tables['name']) { - tables['name'] = { - tag: 'name', - data: createNameTable(this.name) - }; - } else { - var namePrototype = readNameTable(tables['name']); - tables['name'].data = createNameTable(name, namePrototype); - } - var builder = new OpenTypeFileBuilder(header.version); - for (var tableTag in tables) { - builder.addTable(tableTag, tables[tableTag].data); - } - return builder.toArray(); - }, - convert: function Font_convert(fontName, font, properties) { - properties.fixedPitch = false; - if (properties.builtInEncoding) { - adjustToUnicode(properties, properties.builtInEncoding); - } - var glyphZeroId = 1; - if (font instanceof CFFFont) { - glyphZeroId = font.numGlyphs - 1; - } - var mapping = font.getGlyphMapping(properties); - var newMapping = adjustMapping(mapping, font.hasGlyphId.bind(font), glyphZeroId); - this.toFontChar = newMapping.toFontChar; - var numGlyphs = font.numGlyphs; - function getCharCodes(charCodeToGlyphId, glyphId) { - var charCodes = null; - for (var charCode in charCodeToGlyphId) { - if (glyphId === charCodeToGlyphId[charCode]) { - if (!charCodes) { - charCodes = []; - } - charCodes.push(charCode | 0); - } - } - return charCodes; - } - function createCharCode(charCodeToGlyphId, glyphId) { - for (var charCode in charCodeToGlyphId) { - if (glyphId === charCodeToGlyphId[charCode]) { - return charCode | 0; - } - } - newMapping.charCodeToGlyphId[newMapping.nextAvailableFontCharCode] = glyphId; - return newMapping.nextAvailableFontCharCode++; - } - var seacs = font.seacs; - if (SEAC_ANALYSIS_ENABLED && seacs && seacs.length) { - var matrix = properties.fontMatrix || _util.FONT_IDENTITY_MATRIX; - var charset = font.getCharset(); - var seacMap = Object.create(null); - for (var glyphId in seacs) { - glyphId |= 0; - var seac = seacs[glyphId]; - var baseGlyphName = _encodings.StandardEncoding[seac[2]]; - var accentGlyphName = _encodings.StandardEncoding[seac[3]]; - var baseGlyphId = charset.indexOf(baseGlyphName); - var accentGlyphId = charset.indexOf(accentGlyphName); - if (baseGlyphId < 0 || accentGlyphId < 0) { - continue; - } - var accentOffset = { - x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4], - y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5] - }; - var charCodes = getCharCodes(mapping, glyphId); - if (!charCodes) { - continue; - } - for (var i = 0, ii = charCodes.length; i < ii; i++) { - var charCode = charCodes[i]; - var charCodeToGlyphId = newMapping.charCodeToGlyphId; - var baseFontCharCode = createCharCode(charCodeToGlyphId, baseGlyphId); - var accentFontCharCode = createCharCode(charCodeToGlyphId, accentGlyphId); - seacMap[charCode] = { - baseFontCharCode: baseFontCharCode, - accentFontCharCode: accentFontCharCode, - accentOffset: accentOffset - }; - } - } - properties.seacMap = seacMap; - } - var unitsPerEm = 1 / (properties.fontMatrix || _util.FONT_IDENTITY_MATRIX)[0]; - var builder = new OpenTypeFileBuilder('\x4F\x54\x54\x4F'); - builder.addTable('CFF ', font.data); - builder.addTable('OS/2', createOS2Table(properties, newMapping.charCodeToGlyphId)); - builder.addTable('cmap', createCmapTable(newMapping.charCodeToGlyphId, numGlyphs)); - builder.addTable('head', '\x00\x01\x00\x00' + '\x00\x00\x10\x00' + '\x00\x00\x00\x00' + '\x5F\x0F\x3C\xF5' + '\x00\x00' + safeString16(unitsPerEm) + '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + '\x00\x00\x00\x00\x9e\x0b\x7e\x27' + '\x00\x00' + safeString16(properties.descent) + '\x0F\xFF' + safeString16(properties.ascent) + string16(properties.italicAngle ? 2 : 0) + '\x00\x11' + '\x00\x00' + '\x00\x00' + '\x00\x00'); - builder.addTable('hhea', '\x00\x01\x00\x00' + safeString16(properties.ascent) + safeString16(properties.descent) + '\x00\x00' + '\xFF\xFF' + '\x00\x00' + '\x00\x00' + '\x00\x00' + safeString16(properties.capHeight) + safeString16(Math.tan(properties.italicAngle) * properties.xHeight) + '\x00\x00' + '\x00\x00' + '\x00\x00' + '\x00\x00' + '\x00\x00' + '\x00\x00' + string16(numGlyphs)); - builder.addTable('hmtx', function fontFieldsHmtx() { - var charstrings = font.charstrings; - var cffWidths = font.cff ? font.cff.widths : null; - var hmtx = '\x00\x00\x00\x00'; - for (var i = 1, ii = numGlyphs; i < ii; i++) { - var width = 0; - if (charstrings) { - var charstring = charstrings[i - 1]; - width = 'width' in charstring ? charstring.width : 0; - } else if (cffWidths) { - width = Math.ceil(cffWidths[i] || 0); - } - hmtx += string16(width) + string16(0); - } - return hmtx; - }()); - builder.addTable('maxp', '\x00\x00\x50\x00' + string16(numGlyphs)); - builder.addTable('name', createNameTable(fontName)); - builder.addTable('post', createPostTable(properties)); - return builder.toArray(); - }, - get spaceWidth() { - if ('_shadowWidth' in this) { - return this._shadowWidth; - } - var possibleSpaceReplacements = ['space', 'minus', 'one', 'i', 'I']; - var width; - for (var i = 0, ii = possibleSpaceReplacements.length; i < ii; i++) { - var glyphName = possibleSpaceReplacements[i]; - if (glyphName in this.widths) { - width = this.widths[glyphName]; - break; - } - var glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); - var glyphUnicode = glyphsUnicodeMap[glyphName]; - var charcode = 0; - if (this.composite) { - if (this.cMap.contains(glyphUnicode)) { - charcode = this.cMap.lookup(glyphUnicode); - } - } - if (!charcode && this.toUnicode) { - charcode = this.toUnicode.charCodeOf(glyphUnicode); - } - if (charcode <= 0) { - charcode = glyphUnicode; - } - width = this.widths[charcode]; - if (width) { - break; - } - } - width = width || this.defaultWidth; - this._shadowWidth = width; - return width; - }, - charToGlyph: function Font_charToGlyph(charcode, isSpace) { - var fontCharCode, width, operatorListId; - var widthCode = charcode; - if (this.cMap && this.cMap.contains(charcode)) { - widthCode = this.cMap.lookup(charcode); - } - width = this.widths[widthCode]; - width = (0, _util.isNum)(width) ? width : this.defaultWidth; - var vmetric = this.vmetrics && this.vmetrics[widthCode]; - var unicode = this.toUnicode.get(charcode) || this.fallbackToUnicode.get(charcode) || charcode; - if (typeof unicode === 'number') { - unicode = String.fromCharCode(unicode); - } - var isInFont = charcode in this.toFontChar; - fontCharCode = this.toFontChar[charcode] || charcode; - if (this.missingFile) { - fontCharCode = (0, _unicode.mapSpecialUnicodeValues)(fontCharCode); - } - if (this.isType3Font) { - operatorListId = fontCharCode; - } - var accent = null; - if (this.seacMap && this.seacMap[charcode]) { - isInFont = true; - var seac = this.seacMap[charcode]; - fontCharCode = seac.baseFontCharCode; - accent = { - fontChar: String.fromCodePoint(seac.accentFontCharCode), - offset: seac.accentOffset - }; - } - var fontChar = typeof fontCharCode === 'number' ? String.fromCodePoint(fontCharCode) : ''; - var glyph = this.glyphCache[charcode]; - if (!glyph || !glyph.matchesForCache(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont)) { - glyph = new Glyph(fontChar, unicode, accent, width, vmetric, operatorListId, isSpace, isInFont); - this.glyphCache[charcode] = glyph; - } - return glyph; - }, - charsToGlyphs: function Font_charsToGlyphs(chars) { - var charsCache = this.charsCache; - var glyphs, glyph, charcode; - if (charsCache) { - glyphs = charsCache[chars]; - if (glyphs) { - return glyphs; - } - } - if (!charsCache) { - charsCache = this.charsCache = Object.create(null); - } - glyphs = []; - var charsCacheKey = chars; - var i = 0, - ii; - if (this.cMap) { - var c = Object.create(null); - while (i < chars.length) { - this.cMap.readCharCode(chars, i, c); - charcode = c.charcode; - var length = c.length; - i += length; - var isSpace = length === 1 && chars.charCodeAt(i - 1) === 0x20; - glyph = this.charToGlyph(charcode, isSpace); - glyphs.push(glyph); - } - } else { - for (i = 0, ii = chars.length; i < ii; ++i) { - charcode = chars.charCodeAt(i); - glyph = this.charToGlyph(charcode, charcode === 0x20); - glyphs.push(glyph); - } - } - return charsCache[charsCacheKey] = glyphs; - } - }; - return Font; -}(); -var ErrorFont = function ErrorFontClosure() { - function ErrorFont(error) { - this.error = error; - this.loadedName = 'g_font_error'; - this.missingFile = true; - } - ErrorFont.prototype = { - charsToGlyphs: function ErrorFont_charsToGlyphs() { - return []; - }, - exportData: function ErrorFont_exportData() { - return { error: this.error }; - } - }; - return ErrorFont; -}(); -function type1FontGlyphMapping(properties, builtInEncoding, glyphNames) { - var charCodeToGlyphId = Object.create(null); - var glyphId, charCode, baseEncoding; - var isSymbolicFont = !!(properties.flags & FontFlags.Symbolic); - if (properties.baseEncodingName) { - baseEncoding = (0, _encodings.getEncoding)(properties.baseEncodingName); - for (charCode = 0; charCode < baseEncoding.length; charCode++) { - glyphId = glyphNames.indexOf(baseEncoding[charCode]); - if (glyphId >= 0) { - charCodeToGlyphId[charCode] = glyphId; - } else { - charCodeToGlyphId[charCode] = 0; - } - } - } else if (isSymbolicFont) { - for (charCode in builtInEncoding) { - charCodeToGlyphId[charCode] = builtInEncoding[charCode]; - } - } else { - baseEncoding = _encodings.StandardEncoding; - for (charCode = 0; charCode < baseEncoding.length; charCode++) { - glyphId = glyphNames.indexOf(baseEncoding[charCode]); - if (glyphId >= 0) { - charCodeToGlyphId[charCode] = glyphId; - } else { - charCodeToGlyphId[charCode] = 0; - } - } - } - var differences = properties.differences, - glyphsUnicodeMap; - if (differences) { - for (charCode in differences) { - var glyphName = differences[charCode]; - glyphId = glyphNames.indexOf(glyphName); - if (glyphId === -1) { - if (!glyphsUnicodeMap) { - glyphsUnicodeMap = (0, _glyphlist.getGlyphsUnicode)(); - } - var standardGlyphName = recoverGlyphName(glyphName, glyphsUnicodeMap); - if (standardGlyphName !== glyphName) { - glyphId = glyphNames.indexOf(standardGlyphName); - } - } - if (glyphId >= 0) { - charCodeToGlyphId[charCode] = glyphId; - } else { - charCodeToGlyphId[charCode] = 0; - } - } - } - return charCodeToGlyphId; -} -var Type1Font = function Type1FontClosure() { - function findBlock(streamBytes, signature, startIndex) { - var streamBytesLength = streamBytes.length; - var signatureLength = signature.length; - var scanLength = streamBytesLength - signatureLength; - var i = startIndex, - j, - found = false; - while (i < scanLength) { - j = 0; - while (j < signatureLength && streamBytes[i + j] === signature[j]) { - j++; - } - if (j >= signatureLength) { - i += j; - while (i < streamBytesLength && (0, _util.isSpace)(streamBytes[i])) { - i++; - } - found = true; - break; - } - i++; - } - return { - found: found, - length: i - }; - } - function getHeaderBlock(stream, suggestedLength) { - var EEXEC_SIGNATURE = [0x65, 0x65, 0x78, 0x65, 0x63]; - var streamStartPos = stream.pos; - var headerBytes, headerBytesLength, block; - try { - headerBytes = stream.getBytes(suggestedLength); - headerBytesLength = headerBytes.length; - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - } - if (headerBytesLength === suggestedLength) { - block = findBlock(headerBytes, EEXEC_SIGNATURE, suggestedLength - 2 * EEXEC_SIGNATURE.length); - if (block.found && block.length === suggestedLength) { - return { - stream: new _stream.Stream(headerBytes), - length: suggestedLength - }; - } - } - (0, _util.warn)('Invalid "Length1" property in Type1 font -- trying to recover.'); - stream.pos = streamStartPos; - var SCAN_BLOCK_LENGTH = 2048; - var actualLength; - while (true) { - var scanBytes = stream.peekBytes(SCAN_BLOCK_LENGTH); - block = findBlock(scanBytes, EEXEC_SIGNATURE, 0); - if (block.length === 0) { - break; - } - stream.pos += block.length; - if (block.found) { - actualLength = stream.pos - streamStartPos; - break; - } - } - stream.pos = streamStartPos; - if (actualLength) { - return { - stream: new _stream.Stream(stream.getBytes(actualLength)), - length: actualLength - }; - } - (0, _util.warn)('Unable to recover "Length1" property in Type1 font -- using as is.'); - return { - stream: new _stream.Stream(stream.getBytes(suggestedLength)), - length: suggestedLength - }; - } - function getEexecBlock(stream, suggestedLength) { - var eexecBytes = stream.getBytes(); - return { - stream: new _stream.Stream(eexecBytes), - length: eexecBytes.length - }; - } - function Type1Font(name, file, properties) { - var PFB_HEADER_SIZE = 6; - var headerBlockLength = properties.length1; - var eexecBlockLength = properties.length2; - var pfbHeader = file.peekBytes(PFB_HEADER_SIZE); - var pfbHeaderPresent = pfbHeader[0] === 0x80 && pfbHeader[1] === 0x01; - if (pfbHeaderPresent) { - file.skip(PFB_HEADER_SIZE); - headerBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; - } - var headerBlock = getHeaderBlock(file, headerBlockLength); - var headerBlockParser = new _type1_parser.Type1Parser(headerBlock.stream, false, SEAC_ANALYSIS_ENABLED); - headerBlockParser.extractFontHeader(properties); - if (pfbHeaderPresent) { - pfbHeader = file.getBytes(PFB_HEADER_SIZE); - eexecBlockLength = pfbHeader[5] << 24 | pfbHeader[4] << 16 | pfbHeader[3] << 8 | pfbHeader[2]; - } - var eexecBlock = getEexecBlock(file, eexecBlockLength); - var eexecBlockParser = new _type1_parser.Type1Parser(eexecBlock.stream, true, SEAC_ANALYSIS_ENABLED); - var data = eexecBlockParser.extractFontProgram(); - for (var info in data.properties) { - properties[info] = data.properties[info]; - } - var charstrings = data.charstrings; - var type2Charstrings = this.getType2Charstrings(charstrings); - var subrs = this.getType2Subrs(data.subrs); - this.charstrings = charstrings; - this.data = this.wrap(name, type2Charstrings, this.charstrings, subrs, properties); - this.seacs = this.getSeacs(data.charstrings); - } - Type1Font.prototype = { - get numGlyphs() { - return this.charstrings.length + 1; - }, - getCharset: function Type1Font_getCharset() { - var charset = ['.notdef']; - var charstrings = this.charstrings; - for (var glyphId = 0; glyphId < charstrings.length; glyphId++) { - charset.push(charstrings[glyphId].glyphName); - } - return charset; - }, - getGlyphMapping: function Type1Font_getGlyphMapping(properties) { - var charstrings = this.charstrings; - var glyphNames = ['.notdef'], - glyphId; - for (glyphId = 0; glyphId < charstrings.length; glyphId++) { - glyphNames.push(charstrings[glyphId].glyphName); - } - var encoding = properties.builtInEncoding; - if (encoding) { - var builtInEncoding = Object.create(null); - for (var charCode in encoding) { - glyphId = glyphNames.indexOf(encoding[charCode]); - if (glyphId >= 0) { - builtInEncoding[charCode] = glyphId; - } - } - } - return type1FontGlyphMapping(properties, builtInEncoding, glyphNames); - }, - hasGlyphId: function Type1Font_hasGlyphID(id) { - if (id < 0 || id >= this.numGlyphs) { - return false; - } - if (id === 0) { - return true; - } - var glyph = this.charstrings[id - 1]; - return glyph.charstring.length > 0; - }, - getSeacs: function Type1Font_getSeacs(charstrings) { - var i, ii; - var seacMap = []; - for (i = 0, ii = charstrings.length; i < ii; i++) { - var charstring = charstrings[i]; - if (charstring.seac) { - seacMap[i + 1] = charstring.seac; - } - } - return seacMap; - }, - getType2Charstrings: function Type1Font_getType2Charstrings(type1Charstrings) { - var type2Charstrings = []; - for (var i = 0, ii = type1Charstrings.length; i < ii; i++) { - type2Charstrings.push(type1Charstrings[i].charstring); - } - return type2Charstrings; - }, - getType2Subrs: function Type1Font_getType2Subrs(type1Subrs) { - var bias = 0; - var count = type1Subrs.length; - if (count < 1133) { - bias = 107; - } else if (count < 33769) { - bias = 1131; - } else { - bias = 32768; - } - var type2Subrs = []; - var i; - for (i = 0; i < bias; i++) { - type2Subrs.push([0x0B]); - } - for (i = 0; i < count; i++) { - type2Subrs.push(type1Subrs[i]); - } - return type2Subrs; - }, - wrap: function Type1Font_wrap(name, glyphs, charstrings, subrs, properties) { - var cff = new _cff_parser.CFF(); - cff.header = new _cff_parser.CFFHeader(1, 0, 4, 4); - cff.names = [name]; - var topDict = new _cff_parser.CFFTopDict(); - topDict.setByName('version', 391); - topDict.setByName('Notice', 392); - topDict.setByName('FullName', 393); - topDict.setByName('FamilyName', 394); - topDict.setByName('Weight', 395); - topDict.setByName('Encoding', null); - topDict.setByName('FontMatrix', properties.fontMatrix); - topDict.setByName('FontBBox', properties.bbox); - topDict.setByName('charset', null); - topDict.setByName('CharStrings', null); - topDict.setByName('Private', null); - cff.topDict = topDict; - var strings = new _cff_parser.CFFStrings(); - strings.add('Version 0.11'); - strings.add('See original notice'); - strings.add(name); - strings.add(name); - strings.add('Medium'); - cff.strings = strings; - cff.globalSubrIndex = new _cff_parser.CFFIndex(); - var count = glyphs.length; - var charsetArray = [0]; - var i, ii; - for (i = 0; i < count; i++) { - var index = _cff_parser.CFFStandardStrings.indexOf(charstrings[i].glyphName); - if (index === -1) { - index = 0; - } - charsetArray.push(index >> 8 & 0xff, index & 0xff); - } - cff.charset = new _cff_parser.CFFCharset(false, 0, [], charsetArray); - var charStringsIndex = new _cff_parser.CFFIndex(); - charStringsIndex.add([0x8B, 0x0E]); - for (i = 0; i < count; i++) { - charStringsIndex.add(glyphs[i]); - } - cff.charStrings = charStringsIndex; - var privateDict = new _cff_parser.CFFPrivateDict(); - privateDict.setByName('Subrs', null); - var fields = ['BlueValues', 'OtherBlues', 'FamilyBlues', 'FamilyOtherBlues', 'StemSnapH', 'StemSnapV', 'BlueShift', 'BlueFuzz', 'BlueScale', 'LanguageGroup', 'ExpansionFactor', 'ForceBold', 'StdHW', 'StdVW']; - for (i = 0, ii = fields.length; i < ii; i++) { - var field = fields[i]; - if (!(field in properties.privateData)) { - continue; - } - var value = properties.privateData[field]; - if (Array.isArray(value)) { - for (var j = value.length - 1; j > 0; j--) { - value[j] -= value[j - 1]; - } - } - privateDict.setByName(field, value); - } - cff.topDict.privateDict = privateDict; - var subrIndex = new _cff_parser.CFFIndex(); - for (i = 0, ii = subrs.length; i < ii; i++) { - subrIndex.add(subrs[i]); - } - privateDict.subrsIndex = subrIndex; - var compiler = new _cff_parser.CFFCompiler(cff); - return compiler.compile(); - } - }; - return Type1Font; -}(); -var CFFFont = function CFFFontClosure() { - function CFFFont(file, properties) { - this.properties = properties; - var parser = new _cff_parser.CFFParser(file, properties, SEAC_ANALYSIS_ENABLED); - this.cff = parser.parse(); - this.cff.duplicateFirstGlyph(); - var compiler = new _cff_parser.CFFCompiler(this.cff); - this.seacs = this.cff.seacs; - try { - this.data = compiler.compile(); - } catch (e) { - (0, _util.warn)('Failed to compile font ' + properties.loadedName); - this.data = file; - } - } - CFFFont.prototype = { - get numGlyphs() { - return this.cff.charStrings.count; - }, - getCharset: function CFFFont_getCharset() { - return this.cff.charset.charset; - }, - getGlyphMapping: function CFFFont_getGlyphMapping() { - var cff = this.cff; - var properties = this.properties; - var charsets = cff.charset.charset; - var charCodeToGlyphId; - var glyphId; - if (properties.composite) { - charCodeToGlyphId = Object.create(null); - if (cff.isCIDFont) { - for (glyphId = 0; glyphId < charsets.length; glyphId++) { - var cid = charsets[glyphId]; - var charCode = properties.cMap.charCodeOf(cid); - charCodeToGlyphId[charCode] = glyphId; - } - } else { - for (glyphId = 0; glyphId < cff.charStrings.count; glyphId++) { - charCodeToGlyphId[glyphId] = glyphId; - } - } - return charCodeToGlyphId; - } - var encoding = cff.encoding ? cff.encoding.encoding : null; - charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets); - return charCodeToGlyphId; - }, - hasGlyphId: function CFFFont_hasGlyphID(id) { - return this.cff.hasGlyphId(id); - } - }; - return CFFFont; -}(); -exports.SEAC_ANALYSIS_ENABLED = SEAC_ANALYSIS_ENABLED; -exports.ErrorFont = ErrorFont; -exports.Font = Font; -exports.FontFlags = FontFlags; -exports.ToUnicodeMap = ToUnicodeMap; -exports.IdentityToUnicodeMap = IdentityToUnicodeMap; -exports.getFontType = getFontType; - -/***/ }), -/* 157 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.CFFFDSelect = exports.CFFCompiler = exports.CFFPrivateDict = exports.CFFTopDict = exports.CFFCharset = exports.CFFIndex = exports.CFFStrings = exports.CFFHeader = exports.CFF = exports.CFFParser = exports.CFFStandardStrings = undefined; - -var _util = __w_pdfjs_require__(2); - -var _charsets = __w_pdfjs_require__(158); - -var _encodings = __w_pdfjs_require__(159); - -var MAX_SUBR_NESTING = 10; -var CFFStandardStrings = ['.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall', '001.000', '001.001', '001.002', '001.003', 'Black', 'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold']; -var CFFParser = function CFFParserClosure() { - var CharstringValidationData = [null, { - id: 'hstem', - min: 2, - stackClearing: true, - stem: true - }, null, { - id: 'vstem', - min: 2, - stackClearing: true, - stem: true - }, { - id: 'vmoveto', - min: 1, - stackClearing: true - }, { - id: 'rlineto', - min: 2, - resetStack: true - }, { - id: 'hlineto', - min: 1, - resetStack: true - }, { - id: 'vlineto', - min: 1, - resetStack: true - }, { - id: 'rrcurveto', - min: 6, - resetStack: true - }, null, { - id: 'callsubr', - min: 1, - undefStack: true - }, { - id: 'return', - min: 0, - undefStack: true - }, null, null, { - id: 'endchar', - min: 0, - stackClearing: true - }, null, null, null, { - id: 'hstemhm', - min: 2, - stackClearing: true, - stem: true - }, { - id: 'hintmask', - min: 0, - stackClearing: true - }, { - id: 'cntrmask', - min: 0, - stackClearing: true - }, { - id: 'rmoveto', - min: 2, - stackClearing: true - }, { - id: 'hmoveto', - min: 1, - stackClearing: true - }, { - id: 'vstemhm', - min: 2, - stackClearing: true, - stem: true - }, { - id: 'rcurveline', - min: 8, - resetStack: true - }, { - id: 'rlinecurve', - min: 8, - resetStack: true - }, { - id: 'vvcurveto', - min: 4, - resetStack: true - }, { - id: 'hhcurveto', - min: 4, - resetStack: true - }, null, { - id: 'callgsubr', - min: 1, - undefStack: true - }, { - id: 'vhcurveto', - min: 4, - resetStack: true - }, { - id: 'hvcurveto', - min: 4, - resetStack: true - }]; - var CharstringValidationData12 = [null, null, null, { - id: 'and', - min: 2, - stackDelta: -1 - }, { - id: 'or', - min: 2, - stackDelta: -1 - }, { - id: 'not', - min: 1, - stackDelta: 0 - }, null, null, null, { - id: 'abs', - min: 1, - stackDelta: 0 - }, { - id: 'add', - min: 2, - stackDelta: -1, - stackFn: function stack_div(stack, index) { - stack[index - 2] = stack[index - 2] + stack[index - 1]; - } - }, { - id: 'sub', - min: 2, - stackDelta: -1, - stackFn: function stack_div(stack, index) { - stack[index - 2] = stack[index - 2] - stack[index - 1]; - } - }, { - id: 'div', - min: 2, - stackDelta: -1, - stackFn: function stack_div(stack, index) { - stack[index - 2] = stack[index - 2] / stack[index - 1]; - } - }, null, { - id: 'neg', - min: 1, - stackDelta: 0, - stackFn: function stack_div(stack, index) { - stack[index - 1] = -stack[index - 1]; - } - }, { - id: 'eq', - min: 2, - stackDelta: -1 - }, null, null, { - id: 'drop', - min: 1, - stackDelta: -1 - }, null, { - id: 'put', - min: 2, - stackDelta: -2 - }, { - id: 'get', - min: 1, - stackDelta: 0 - }, { - id: 'ifelse', - min: 4, - stackDelta: -3 - }, { - id: 'random', - min: 0, - stackDelta: 1 - }, { - id: 'mul', - min: 2, - stackDelta: -1, - stackFn: function stack_div(stack, index) { - stack[index - 2] = stack[index - 2] * stack[index - 1]; - } - }, null, { - id: 'sqrt', - min: 1, - stackDelta: 0 - }, { - id: 'dup', - min: 1, - stackDelta: 1 - }, { - id: 'exch', - min: 2, - stackDelta: 0 - }, { - id: 'index', - min: 2, - stackDelta: 0 - }, { - id: 'roll', - min: 3, - stackDelta: -2 - }, null, null, null, { - id: 'hflex', - min: 7, - resetStack: true - }, { - id: 'flex', - min: 13, - resetStack: true - }, { - id: 'hflex1', - min: 9, - resetStack: true - }, { - id: 'flex1', - min: 11, - resetStack: true - }]; - function CFFParser(file, properties, seacAnalysisEnabled) { - this.bytes = file.getBytes(); - this.properties = properties; - this.seacAnalysisEnabled = !!seacAnalysisEnabled; - } - CFFParser.prototype = { - parse: function CFFParser_parse() { - var properties = this.properties; - var cff = new CFF(); - this.cff = cff; - var header = this.parseHeader(); - var nameIndex = this.parseIndex(header.endPos); - var topDictIndex = this.parseIndex(nameIndex.endPos); - var stringIndex = this.parseIndex(topDictIndex.endPos); - var globalSubrIndex = this.parseIndex(stringIndex.endPos); - var topDictParsed = this.parseDict(topDictIndex.obj.get(0)); - var topDict = this.createDict(CFFTopDict, topDictParsed, cff.strings); - cff.header = header.obj; - cff.names = this.parseNameIndex(nameIndex.obj); - cff.strings = this.parseStringIndex(stringIndex.obj); - cff.topDict = topDict; - cff.globalSubrIndex = globalSubrIndex.obj; - this.parsePrivateDict(cff.topDict); - cff.isCIDFont = topDict.hasName('ROS'); - var charStringOffset = topDict.getByName('CharStrings'); - var charStringIndex = this.parseIndex(charStringOffset).obj; - var fontMatrix = topDict.getByName('FontMatrix'); - if (fontMatrix) { - properties.fontMatrix = fontMatrix; - } - var fontBBox = topDict.getByName('FontBBox'); - if (fontBBox) { - properties.ascent = Math.max(fontBBox[3], fontBBox[1]); - properties.descent = Math.min(fontBBox[1], fontBBox[3]); - properties.ascentScaled = true; - } - var charset, encoding; - if (cff.isCIDFont) { - var fdArrayIndex = this.parseIndex(topDict.getByName('FDArray')).obj; - for (var i = 0, ii = fdArrayIndex.count; i < ii; ++i) { - var dictRaw = fdArrayIndex.get(i); - var fontDict = this.createDict(CFFTopDict, this.parseDict(dictRaw), cff.strings); - this.parsePrivateDict(fontDict); - cff.fdArray.push(fontDict); - } - encoding = null; - charset = this.parseCharsets(topDict.getByName('charset'), charStringIndex.count, cff.strings, true); - cff.fdSelect = this.parseFDSelect(topDict.getByName('FDSelect'), charStringIndex.count); - } else { - charset = this.parseCharsets(topDict.getByName('charset'), charStringIndex.count, cff.strings, false); - encoding = this.parseEncoding(topDict.getByName('Encoding'), properties, cff.strings, charset.charset); - } - cff.charset = charset; - cff.encoding = encoding; - var charStringsAndSeacs = this.parseCharStrings({ - charStrings: charStringIndex, - localSubrIndex: topDict.privateDict.subrsIndex, - globalSubrIndex: globalSubrIndex.obj, - fdSelect: cff.fdSelect, - fdArray: cff.fdArray, - privateDict: topDict.privateDict - }); - cff.charStrings = charStringsAndSeacs.charStrings; - cff.seacs = charStringsAndSeacs.seacs; - cff.widths = charStringsAndSeacs.widths; - return cff; - }, - parseHeader: function CFFParser_parseHeader() { - var bytes = this.bytes; - var bytesLength = bytes.length; - var offset = 0; - while (offset < bytesLength && bytes[offset] !== 1) { - ++offset; - } - if (offset >= bytesLength) { - throw new _util.FormatError('Invalid CFF header'); - } - if (offset !== 0) { - (0, _util.info)('cff data is shifted'); - bytes = bytes.subarray(offset); - this.bytes = bytes; - } - var major = bytes[0]; - var minor = bytes[1]; - var hdrSize = bytes[2]; - var offSize = bytes[3]; - var header = new CFFHeader(major, minor, hdrSize, offSize); - return { - obj: header, - endPos: hdrSize - }; - }, - parseDict: function CFFParser_parseDict(dict) { - var pos = 0; - function parseOperand() { - var value = dict[pos++]; - if (value === 30) { - return parseFloatOperand(); - } else if (value === 28) { - value = dict[pos++]; - value = (value << 24 | dict[pos++] << 16) >> 16; - return value; - } else if (value === 29) { - value = dict[pos++]; - value = value << 8 | dict[pos++]; - value = value << 8 | dict[pos++]; - value = value << 8 | dict[pos++]; - return value; - } else if (value >= 32 && value <= 246) { - return value - 139; - } else if (value >= 247 && value <= 250) { - return (value - 247) * 256 + dict[pos++] + 108; - } else if (value >= 251 && value <= 254) { - return -((value - 251) * 256) - dict[pos++] - 108; - } - (0, _util.warn)('CFFParser_parseDict: "' + value + '" is a reserved command.'); - return NaN; - } - function parseFloatOperand() { - var str = ''; - var eof = 15; - var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', null, '-']; - var length = dict.length; - while (pos < length) { - var b = dict[pos++]; - var b1 = b >> 4; - var b2 = b & 15; - if (b1 === eof) { - break; - } - str += lookup[b1]; - if (b2 === eof) { - break; - } - str += lookup[b2]; - } - return parseFloat(str); - } - var operands = []; - var entries = []; - pos = 0; - var end = dict.length; - while (pos < end) { - var b = dict[pos]; - if (b <= 21) { - if (b === 12) { - b = b << 8 | dict[++pos]; - } - entries.push([b, operands]); - operands = []; - ++pos; - } else { - operands.push(parseOperand()); - } - } - return entries; - }, - parseIndex: function CFFParser_parseIndex(pos) { - var cffIndex = new CFFIndex(); - var bytes = this.bytes; - var count = bytes[pos++] << 8 | bytes[pos++]; - var offsets = []; - var end = pos; - var i, ii; - if (count !== 0) { - var offsetSize = bytes[pos++]; - var startPos = pos + (count + 1) * offsetSize - 1; - for (i = 0, ii = count + 1; i < ii; ++i) { - var offset = 0; - for (var j = 0; j < offsetSize; ++j) { - offset <<= 8; - offset += bytes[pos++]; - } - offsets.push(startPos + offset); - } - end = offsets[count]; - } - for (i = 0, ii = offsets.length - 1; i < ii; ++i) { - var offsetStart = offsets[i]; - var offsetEnd = offsets[i + 1]; - cffIndex.add(bytes.subarray(offsetStart, offsetEnd)); - } - return { - obj: cffIndex, - endPos: end - }; - }, - parseNameIndex: function CFFParser_parseNameIndex(index) { - var names = []; - for (var i = 0, ii = index.count; i < ii; ++i) { - var name = index.get(i); - names.push((0, _util.bytesToString)(name)); - } - return names; - }, - parseStringIndex: function CFFParser_parseStringIndex(index) { - var strings = new CFFStrings(); - for (var i = 0, ii = index.count; i < ii; ++i) { - var data = index.get(i); - strings.add((0, _util.bytesToString)(data)); - } - return strings; - }, - createDict: function CFFParser_createDict(Type, dict, strings) { - var cffDict = new Type(strings); - for (var i = 0, ii = dict.length; i < ii; ++i) { - var pair = dict[i]; - var key = pair[0]; - var value = pair[1]; - cffDict.setByKey(key, value); - } - return cffDict; - }, - parseCharString: function CFFParser_parseCharString(state, data, localSubrIndex, globalSubrIndex) { - if (!data || state.callDepth > MAX_SUBR_NESTING) { - return false; - } - var stackSize = state.stackSize; - var stack = state.stack; - var length = data.length; - for (var j = 0; j < length;) { - var value = data[j++]; - var validationCommand = null; - if (value === 12) { - var q = data[j++]; - if (q === 0) { - data[j - 2] = 139; - data[j - 1] = 22; - stackSize = 0; - } else { - validationCommand = CharstringValidationData12[q]; - } - } else if (value === 28) { - stack[stackSize] = (data[j] << 24 | data[j + 1] << 16) >> 16; - j += 2; - stackSize++; - } else if (value === 14) { - if (stackSize >= 4) { - stackSize -= 4; - if (this.seacAnalysisEnabled) { - state.seac = stack.slice(stackSize, stackSize + 4); - return false; - } - } - validationCommand = CharstringValidationData[value]; - } else if (value >= 32 && value <= 246) { - stack[stackSize] = value - 139; - stackSize++; - } else if (value >= 247 && value <= 254) { - stack[stackSize] = value < 251 ? (value - 247 << 8) + data[j] + 108 : -(value - 251 << 8) - data[j] - 108; - j++; - stackSize++; - } else if (value === 255) { - stack[stackSize] = (data[j] << 24 | data[j + 1] << 16 | data[j + 2] << 8 | data[j + 3]) / 65536; - j += 4; - stackSize++; - } else if (value === 19 || value === 20) { - state.hints += stackSize >> 1; - j += state.hints + 7 >> 3; - stackSize %= 2; - validationCommand = CharstringValidationData[value]; - } else if (value === 10 || value === 29) { - var subrsIndex; - if (value === 10) { - subrsIndex = localSubrIndex; - } else { - subrsIndex = globalSubrIndex; - } - if (!subrsIndex) { - validationCommand = CharstringValidationData[value]; - (0, _util.warn)('Missing subrsIndex for ' + validationCommand.id); - return false; - } - var bias = 32768; - if (subrsIndex.count < 1240) { - bias = 107; - } else if (subrsIndex.count < 33900) { - bias = 1131; - } - var subrNumber = stack[--stackSize] + bias; - if (subrNumber < 0 || subrNumber >= subrsIndex.count || isNaN(subrNumber)) { - validationCommand = CharstringValidationData[value]; - (0, _util.warn)('Out of bounds subrIndex for ' + validationCommand.id); - return false; - } - state.stackSize = stackSize; - state.callDepth++; - var valid = this.parseCharString(state, subrsIndex.get(subrNumber), localSubrIndex, globalSubrIndex); - if (!valid) { - return false; - } - state.callDepth--; - stackSize = state.stackSize; - continue; - } else if (value === 11) { - state.stackSize = stackSize; - return true; - } else { - validationCommand = CharstringValidationData[value]; - } - if (validationCommand) { - if (validationCommand.stem) { - state.hints += stackSize >> 1; - } - if ('min' in validationCommand) { - if (!state.undefStack && stackSize < validationCommand.min) { - (0, _util.warn)('Not enough parameters for ' + validationCommand.id + '; actual: ' + stackSize + ', expected: ' + validationCommand.min); - return false; - } - } - if (state.firstStackClearing && validationCommand.stackClearing) { - state.firstStackClearing = false; - stackSize -= validationCommand.min; - if (stackSize >= 2 && validationCommand.stem) { - stackSize %= 2; - } else if (stackSize > 1) { - (0, _util.warn)('Found too many parameters for stack-clearing command'); - } - if (stackSize > 0 && stack[stackSize - 1] >= 0) { - state.width = stack[stackSize - 1]; - } - } - if ('stackDelta' in validationCommand) { - if ('stackFn' in validationCommand) { - validationCommand.stackFn(stack, stackSize); - } - stackSize += validationCommand.stackDelta; - } else if (validationCommand.stackClearing) { - stackSize = 0; - } else if (validationCommand.resetStack) { - stackSize = 0; - state.undefStack = false; - } else if (validationCommand.undefStack) { - stackSize = 0; - state.undefStack = true; - state.firstStackClearing = false; - } - } - } - state.stackSize = stackSize; - return true; - }, - parseCharStrings: function parseCharStrings(_ref) { - var charStrings = _ref.charStrings, - localSubrIndex = _ref.localSubrIndex, - globalSubrIndex = _ref.globalSubrIndex, - fdSelect = _ref.fdSelect, - fdArray = _ref.fdArray, - privateDict = _ref.privateDict; - - var seacs = []; - var widths = []; - var count = charStrings.count; - for (var i = 0; i < count; i++) { - var charstring = charStrings.get(i); - var state = { - callDepth: 0, - stackSize: 0, - stack: [], - undefStack: true, - hints: 0, - firstStackClearing: true, - seac: null, - width: null - }; - var valid = true; - var localSubrToUse = null; - var privateDictToUse = privateDict; - if (fdSelect && fdArray.length) { - var fdIndex = fdSelect.getFDIndex(i); - if (fdIndex === -1) { - (0, _util.warn)('Glyph index is not in fd select.'); - valid = false; - } - if (fdIndex >= fdArray.length) { - (0, _util.warn)('Invalid fd index for glyph index.'); - valid = false; - } - if (valid) { - privateDictToUse = fdArray[fdIndex].privateDict; - localSubrToUse = privateDictToUse.subrsIndex; - } - } else if (localSubrIndex) { - localSubrToUse = localSubrIndex; - } - if (valid) { - valid = this.parseCharString(state, charstring, localSubrToUse, globalSubrIndex); - } - if (state.width !== null) { - var nominalWidth = privateDictToUse.getByName('nominalWidthX'); - widths[i] = nominalWidth + state.width; - } else { - var defaultWidth = privateDictToUse.getByName('defaultWidthX'); - widths[i] = defaultWidth; - } - if (state.seac !== null) { - seacs[i] = state.seac; - } - if (!valid) { - charStrings.set(i, new Uint8Array([14])); - } - } - return { - charStrings: charStrings, - seacs: seacs, - widths: widths - }; - }, - - emptyPrivateDictionary: function CFFParser_emptyPrivateDictionary(parentDict) { - var privateDict = this.createDict(CFFPrivateDict, [], parentDict.strings); - parentDict.setByKey(18, [0, 0]); - parentDict.privateDict = privateDict; - }, - parsePrivateDict: function CFFParser_parsePrivateDict(parentDict) { - if (!parentDict.hasName('Private')) { - this.emptyPrivateDictionary(parentDict); - return; - } - var privateOffset = parentDict.getByName('Private'); - if (!Array.isArray(privateOffset) || privateOffset.length !== 2) { - parentDict.removeByName('Private'); - return; - } - var size = privateOffset[0]; - var offset = privateOffset[1]; - if (size === 0 || offset >= this.bytes.length) { - this.emptyPrivateDictionary(parentDict); - return; - } - var privateDictEnd = offset + size; - var dictData = this.bytes.subarray(offset, privateDictEnd); - var dict = this.parseDict(dictData); - var privateDict = this.createDict(CFFPrivateDict, dict, parentDict.strings); - parentDict.privateDict = privateDict; - if (!privateDict.getByName('Subrs')) { - return; - } - var subrsOffset = privateDict.getByName('Subrs'); - var relativeOffset = offset + subrsOffset; - if (subrsOffset === 0 || relativeOffset >= this.bytes.length) { - this.emptyPrivateDictionary(parentDict); - return; - } - var subrsIndex = this.parseIndex(relativeOffset); - privateDict.subrsIndex = subrsIndex.obj; - }, - parseCharsets: function CFFParser_parseCharsets(pos, length, strings, cid) { - if (pos === 0) { - return new CFFCharset(true, CFFCharsetPredefinedTypes.ISO_ADOBE, _charsets.ISOAdobeCharset); - } else if (pos === 1) { - return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT, _charsets.ExpertCharset); - } else if (pos === 2) { - return new CFFCharset(true, CFFCharsetPredefinedTypes.EXPERT_SUBSET, _charsets.ExpertSubsetCharset); - } - var bytes = this.bytes; - var start = pos; - var format = bytes[pos++]; - var charset = ['.notdef']; - var id, count, i; - length -= 1; - switch (format) { - case 0: - for (i = 0; i < length; i++) { - id = bytes[pos++] << 8 | bytes[pos++]; - charset.push(cid ? id : strings.get(id)); - } - break; - case 1: - while (charset.length <= length) { - id = bytes[pos++] << 8 | bytes[pos++]; - count = bytes[pos++]; - for (i = 0; i <= count; i++) { - charset.push(cid ? id++ : strings.get(id++)); - } - } - break; - case 2: - while (charset.length <= length) { - id = bytes[pos++] << 8 | bytes[pos++]; - count = bytes[pos++] << 8 | bytes[pos++]; - for (i = 0; i <= count; i++) { - charset.push(cid ? id++ : strings.get(id++)); - } - } - break; - default: - throw new _util.FormatError('Unknown charset format'); - } - var end = pos; - var raw = bytes.subarray(start, end); - return new CFFCharset(false, format, charset, raw); - }, - parseEncoding: function CFFParser_parseEncoding(pos, properties, strings, charset) { - var encoding = Object.create(null); - var bytes = this.bytes; - var predefined = false; - var format, i, ii; - var raw = null; - function readSupplement() { - var supplementsCount = bytes[pos++]; - for (i = 0; i < supplementsCount; i++) { - var code = bytes[pos++]; - var sid = (bytes[pos++] << 8) + (bytes[pos++] & 0xff); - encoding[code] = charset.indexOf(strings.get(sid)); - } - } - if (pos === 0 || pos === 1) { - predefined = true; - format = pos; - var baseEncoding = pos ? _encodings.ExpertEncoding : _encodings.StandardEncoding; - for (i = 0, ii = charset.length; i < ii; i++) { - var index = baseEncoding.indexOf(charset[i]); - if (index !== -1) { - encoding[index] = i; - } - } - } else { - var dataStart = pos; - format = bytes[pos++]; - switch (format & 0x7f) { - case 0: - var glyphsCount = bytes[pos++]; - for (i = 1; i <= glyphsCount; i++) { - encoding[bytes[pos++]] = i; - } - break; - case 1: - var rangesCount = bytes[pos++]; - var gid = 1; - for (i = 0; i < rangesCount; i++) { - var start = bytes[pos++]; - var left = bytes[pos++]; - for (var j = start; j <= start + left; j++) { - encoding[j] = gid++; - } - } - break; - default: - throw new _util.FormatError('Unknown encoding format: ' + format + ' in CFF'); - } - var dataEnd = pos; - if (format & 0x80) { - bytes[dataStart] &= 0x7f; - readSupplement(); - } - raw = bytes.subarray(dataStart, dataEnd); - } - format = format & 0x7f; - return new CFFEncoding(predefined, format, encoding, raw); - }, - parseFDSelect: function CFFParser_parseFDSelect(pos, length) { - var bytes = this.bytes; - var format = bytes[pos++]; - var fdSelect = []; - var i; - switch (format) { - case 0: - for (i = 0; i < length; ++i) { - var id = bytes[pos++]; - fdSelect.push(id); - } - break; - case 3: - var rangesCount = bytes[pos++] << 8 | bytes[pos++]; - for (i = 0; i < rangesCount; ++i) { - var first = bytes[pos++] << 8 | bytes[pos++]; - if (i === 0 && first !== 0) { - (0, _util.warn)('parseFDSelect: The first range must have a first GID of 0' + ' -- trying to recover.'); - first = 0; - } - var fdIndex = bytes[pos++]; - var next = bytes[pos] << 8 | bytes[pos + 1]; - for (var j = first; j < next; ++j) { - fdSelect.push(fdIndex); - } - } - pos += 2; - break; - default: - throw new _util.FormatError('parseFDSelect: Unknown format "' + format + '".'); - } - if (fdSelect.length !== length) { - throw new _util.FormatError('parseFDSelect: Invalid font data.'); - } - return new CFFFDSelect(format, fdSelect); - } - }; - return CFFParser; -}(); -var CFF = function CFFClosure() { - function CFF() { - this.header = null; - this.names = []; - this.topDict = null; - this.strings = new CFFStrings(); - this.globalSubrIndex = null; - this.encoding = null; - this.charset = null; - this.charStrings = null; - this.fdArray = []; - this.fdSelect = null; - this.isCIDFont = false; - } - CFF.prototype = { - duplicateFirstGlyph: function CFF_duplicateFirstGlyph() { - if (this.charStrings.count >= 65535) { - (0, _util.warn)('Not enough space in charstrings to duplicate first glyph.'); - return; - } - var glyphZero = this.charStrings.get(0); - this.charStrings.add(glyphZero); - if (this.isCIDFont) { - this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0]); - } - }, - hasGlyphId: function CFF_hasGlyphID(id) { - if (id < 0 || id >= this.charStrings.count) { - return false; - } - var glyph = this.charStrings.get(id); - return glyph.length > 0; - } - }; - return CFF; -}(); -var CFFHeader = function CFFHeaderClosure() { - function CFFHeader(major, minor, hdrSize, offSize) { - this.major = major; - this.minor = minor; - this.hdrSize = hdrSize; - this.offSize = offSize; - } - return CFFHeader; -}(); -var CFFStrings = function CFFStringsClosure() { - function CFFStrings() { - this.strings = []; - } - CFFStrings.prototype = { - get: function CFFStrings_get(index) { - if (index >= 0 && index <= 390) { - return CFFStandardStrings[index]; - } - if (index - 391 <= this.strings.length) { - return this.strings[index - 391]; - } - return CFFStandardStrings[0]; - }, - add: function CFFStrings_add(value) { - this.strings.push(value); - }, - get count() { - return this.strings.length; - } - }; - return CFFStrings; -}(); -var CFFIndex = function CFFIndexClosure() { - function CFFIndex() { - this.objects = []; - this.length = 0; - } - CFFIndex.prototype = { - add: function CFFIndex_add(data) { - this.length += data.length; - this.objects.push(data); - }, - set: function CFFIndex_set(index, data) { - this.length += data.length - this.objects[index].length; - this.objects[index] = data; - }, - get: function CFFIndex_get(index) { - return this.objects[index]; - }, - get count() { - return this.objects.length; - } - }; - return CFFIndex; -}(); -var CFFDict = function CFFDictClosure() { - function CFFDict(tables, strings) { - this.keyToNameMap = tables.keyToNameMap; - this.nameToKeyMap = tables.nameToKeyMap; - this.defaults = tables.defaults; - this.types = tables.types; - this.opcodes = tables.opcodes; - this.order = tables.order; - this.strings = strings; - this.values = Object.create(null); - } - CFFDict.prototype = { - setByKey: function CFFDict_setByKey(key, value) { - if (!(key in this.keyToNameMap)) { - return false; - } - var valueLength = value.length; - if (valueLength === 0) { - return true; - } - for (var i = 0; i < valueLength; i++) { - if (isNaN(value[i])) { - (0, _util.warn)('Invalid CFFDict value: "' + value + '" for key "' + key + '".'); - return true; - } - } - var type = this.types[key]; - if (type === 'num' || type === 'sid' || type === 'offset') { - value = value[0]; - } - this.values[key] = value; - return true; - }, - setByName: function CFFDict_setByName(name, value) { - if (!(name in this.nameToKeyMap)) { - throw new _util.FormatError('Invalid dictionary name "' + name + '"'); - } - this.values[this.nameToKeyMap[name]] = value; - }, - hasName: function CFFDict_hasName(name) { - return this.nameToKeyMap[name] in this.values; - }, - getByName: function CFFDict_getByName(name) { - if (!(name in this.nameToKeyMap)) { - throw new _util.FormatError('Invalid dictionary name ' + name + '"'); - } - var key = this.nameToKeyMap[name]; - if (!(key in this.values)) { - return this.defaults[key]; - } - return this.values[key]; - }, - removeByName: function CFFDict_removeByName(name) { - delete this.values[this.nameToKeyMap[name]]; - } - }; - CFFDict.createTables = function CFFDict_createTables(layout) { - var tables = { - keyToNameMap: {}, - nameToKeyMap: {}, - defaults: {}, - types: {}, - opcodes: {}, - order: [] - }; - for (var i = 0, ii = layout.length; i < ii; ++i) { - var entry = layout[i]; - var key = Array.isArray(entry[0]) ? (entry[0][0] << 8) + entry[0][1] : entry[0]; - tables.keyToNameMap[key] = entry[1]; - tables.nameToKeyMap[entry[1]] = key; - tables.types[key] = entry[2]; - tables.defaults[key] = entry[3]; - tables.opcodes[key] = Array.isArray(entry[0]) ? entry[0] : [entry[0]]; - tables.order.push(key); - } - return tables; - }; - return CFFDict; -}(); -var CFFTopDict = function CFFTopDictClosure() { - var layout = [[[12, 30], 'ROS', ['sid', 'sid', 'num'], null], [[12, 20], 'SyntheticBase', 'num', null], [0, 'version', 'sid', null], [1, 'Notice', 'sid', null], [[12, 0], 'Copyright', 'sid', null], [2, 'FullName', 'sid', null], [3, 'FamilyName', 'sid', null], [4, 'Weight', 'sid', null], [[12, 1], 'isFixedPitch', 'num', 0], [[12, 2], 'ItalicAngle', 'num', 0], [[12, 3], 'UnderlinePosition', 'num', -100], [[12, 4], 'UnderlineThickness', 'num', 50], [[12, 5], 'PaintType', 'num', 0], [[12, 6], 'CharstringType', 'num', 2], [[12, 7], 'FontMatrix', ['num', 'num', 'num', 'num', 'num', 'num'], [0.001, 0, 0, 0.001, 0, 0]], [13, 'UniqueID', 'num', null], [5, 'FontBBox', ['num', 'num', 'num', 'num'], [0, 0, 0, 0]], [[12, 8], 'StrokeWidth', 'num', 0], [14, 'XUID', 'array', null], [15, 'charset', 'offset', 0], [16, 'Encoding', 'offset', 0], [17, 'CharStrings', 'offset', 0], [18, 'Private', ['offset', 'offset'], null], [[12, 21], 'PostScript', 'sid', null], [[12, 22], 'BaseFontName', 'sid', null], [[12, 23], 'BaseFontBlend', 'delta', null], [[12, 31], 'CIDFontVersion', 'num', 0], [[12, 32], 'CIDFontRevision', 'num', 0], [[12, 33], 'CIDFontType', 'num', 0], [[12, 34], 'CIDCount', 'num', 8720], [[12, 35], 'UIDBase', 'num', null], [[12, 37], 'FDSelect', 'offset', null], [[12, 36], 'FDArray', 'offset', null], [[12, 38], 'FontName', 'sid', null]]; - var tables = null; - function CFFTopDict(strings) { - if (tables === null) { - tables = CFFDict.createTables(layout); - } - CFFDict.call(this, tables, strings); - this.privateDict = null; - } - CFFTopDict.prototype = Object.create(CFFDict.prototype); - return CFFTopDict; -}(); -var CFFPrivateDict = function CFFPrivateDictClosure() { - var layout = [[6, 'BlueValues', 'delta', null], [7, 'OtherBlues', 'delta', null], [8, 'FamilyBlues', 'delta', null], [9, 'FamilyOtherBlues', 'delta', null], [[12, 9], 'BlueScale', 'num', 0.039625], [[12, 10], 'BlueShift', 'num', 7], [[12, 11], 'BlueFuzz', 'num', 1], [10, 'StdHW', 'num', null], [11, 'StdVW', 'num', null], [[12, 12], 'StemSnapH', 'delta', null], [[12, 13], 'StemSnapV', 'delta', null], [[12, 14], 'ForceBold', 'num', 0], [[12, 17], 'LanguageGroup', 'num', 0], [[12, 18], 'ExpansionFactor', 'num', 0.06], [[12, 19], 'initialRandomSeed', 'num', 0], [20, 'defaultWidthX', 'num', 0], [21, 'nominalWidthX', 'num', 0], [19, 'Subrs', 'offset', null]]; - var tables = null; - function CFFPrivateDict(strings) { - if (tables === null) { - tables = CFFDict.createTables(layout); - } - CFFDict.call(this, tables, strings); - this.subrsIndex = null; - } - CFFPrivateDict.prototype = Object.create(CFFDict.prototype); - return CFFPrivateDict; -}(); -var CFFCharsetPredefinedTypes = { - ISO_ADOBE: 0, - EXPERT: 1, - EXPERT_SUBSET: 2 -}; -var CFFCharset = function CFFCharsetClosure() { - function CFFCharset(predefined, format, charset, raw) { - this.predefined = predefined; - this.format = format; - this.charset = charset; - this.raw = raw; - } - return CFFCharset; -}(); -var CFFEncoding = function CFFEncodingClosure() { - function CFFEncoding(predefined, format, encoding, raw) { - this.predefined = predefined; - this.format = format; - this.encoding = encoding; - this.raw = raw; - } - return CFFEncoding; -}(); -var CFFFDSelect = function CFFFDSelectClosure() { - function CFFFDSelect(format, fdSelect) { - this.format = format; - this.fdSelect = fdSelect; - } - CFFFDSelect.prototype = { - getFDIndex: function CFFFDSelect_get(glyphIndex) { - if (glyphIndex < 0 || glyphIndex >= this.fdSelect.length) { - return -1; - } - return this.fdSelect[glyphIndex]; - } - }; - return CFFFDSelect; -}(); -var CFFOffsetTracker = function CFFOffsetTrackerClosure() { - function CFFOffsetTracker() { - this.offsets = Object.create(null); - } - CFFOffsetTracker.prototype = { - isTracking: function CFFOffsetTracker_isTracking(key) { - return key in this.offsets; - }, - track: function CFFOffsetTracker_track(key, location) { - if (key in this.offsets) { - throw new _util.FormatError('Already tracking location of ' + key); - } - this.offsets[key] = location; - }, - offset: function CFFOffsetTracker_offset(value) { - for (var key in this.offsets) { - this.offsets[key] += value; - } - }, - setEntryLocation: function CFFOffsetTracker_setEntryLocation(key, values, output) { - if (!(key in this.offsets)) { - throw new _util.FormatError('Not tracking location of ' + key); - } - var data = output.data; - var dataOffset = this.offsets[key]; - var size = 5; - for (var i = 0, ii = values.length; i < ii; ++i) { - var offset0 = i * size + dataOffset; - var offset1 = offset0 + 1; - var offset2 = offset0 + 2; - var offset3 = offset0 + 3; - var offset4 = offset0 + 4; - if (data[offset0] !== 0x1d || data[offset1] !== 0 || data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) { - throw new _util.FormatError('writing to an offset that is not empty'); - } - var value = values[i]; - data[offset0] = 0x1d; - data[offset1] = value >> 24 & 0xFF; - data[offset2] = value >> 16 & 0xFF; - data[offset3] = value >> 8 & 0xFF; - data[offset4] = value & 0xFF; - } - } - }; - return CFFOffsetTracker; -}(); -var CFFCompiler = function CFFCompilerClosure() { - function CFFCompiler(cff) { - this.cff = cff; - } - CFFCompiler.prototype = { - compile: function CFFCompiler_compile() { - var cff = this.cff; - var output = { - data: [], - length: 0, - add: function CFFCompiler_add(data) { - this.data = this.data.concat(data); - this.length = this.data.length; - } - }; - var header = this.compileHeader(cff.header); - output.add(header); - var nameIndex = this.compileNameIndex(cff.names); - output.add(nameIndex); - if (cff.isCIDFont) { - if (cff.topDict.hasName('FontMatrix')) { - var base = cff.topDict.getByName('FontMatrix'); - cff.topDict.removeByName('FontMatrix'); - for (var i = 0, ii = cff.fdArray.length; i < ii; i++) { - var subDict = cff.fdArray[i]; - var matrix = base.slice(0); - if (subDict.hasName('FontMatrix')) { - matrix = _util.Util.transform(matrix, subDict.getByName('FontMatrix')); - } - subDict.setByName('FontMatrix', matrix); - } - } - } - cff.topDict.setByName('charset', 0); - var compiled = this.compileTopDicts([cff.topDict], output.length, cff.isCIDFont); - output.add(compiled.output); - var topDictTracker = compiled.trackers[0]; - var stringIndex = this.compileStringIndex(cff.strings.strings); - output.add(stringIndex); - var globalSubrIndex = this.compileIndex(cff.globalSubrIndex); - output.add(globalSubrIndex); - if (cff.encoding && cff.topDict.hasName('Encoding')) { - if (cff.encoding.predefined) { - topDictTracker.setEntryLocation('Encoding', [cff.encoding.format], output); - } else { - var encoding = this.compileEncoding(cff.encoding); - topDictTracker.setEntryLocation('Encoding', [output.length], output); - output.add(encoding); - } - } - var charset = this.compileCharset(cff.charset); - topDictTracker.setEntryLocation('charset', [output.length], output); - output.add(charset); - var charStrings = this.compileCharStrings(cff.charStrings); - topDictTracker.setEntryLocation('CharStrings', [output.length], output); - output.add(charStrings); - if (cff.isCIDFont) { - topDictTracker.setEntryLocation('FDSelect', [output.length], output); - var fdSelect = this.compileFDSelect(cff.fdSelect); - output.add(fdSelect); - compiled = this.compileTopDicts(cff.fdArray, output.length, true); - topDictTracker.setEntryLocation('FDArray', [output.length], output); - output.add(compiled.output); - var fontDictTrackers = compiled.trackers; - this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output); - } - this.compilePrivateDicts([cff.topDict], [topDictTracker], output); - output.add([0]); - return output.data; - }, - encodeNumber: function CFFCompiler_encodeNumber(value) { - if (parseFloat(value) === parseInt(value, 10) && !isNaN(value)) { - return this.encodeInteger(value); - } - return this.encodeFloat(value); - }, - encodeFloat: function CFFCompiler_encodeFloat(num) { - var value = num.toString(); - var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value); - if (m) { - var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length)); - value = (Math.round(num * epsilon) / epsilon).toString(); - } - var nibbles = ''; - var i, ii; - for (i = 0, ii = value.length; i < ii; ++i) { - var a = value[i]; - if (a === 'e') { - nibbles += value[++i] === '-' ? 'c' : 'b'; - } else if (a === '.') { - nibbles += 'a'; - } else if (a === '-') { - nibbles += 'e'; - } else { - nibbles += a; - } - } - nibbles += nibbles.length & 1 ? 'f' : 'ff'; - var out = [30]; - for (i = 0, ii = nibbles.length; i < ii; i += 2) { - out.push(parseInt(nibbles.substring(i, i + 2), 16)); - } - return out; - }, - encodeInteger: function CFFCompiler_encodeInteger(value) { - var code; - if (value >= -107 && value <= 107) { - code = [value + 139]; - } else if (value >= 108 && value <= 1131) { - value = value - 108; - code = [(value >> 8) + 247, value & 0xFF]; - } else if (value >= -1131 && value <= -108) { - value = -value - 108; - code = [(value >> 8) + 251, value & 0xFF]; - } else if (value >= -32768 && value <= 32767) { - code = [0x1c, value >> 8 & 0xFF, value & 0xFF]; - } else { - code = [0x1d, value >> 24 & 0xFF, value >> 16 & 0xFF, value >> 8 & 0xFF, value & 0xFF]; - } - return code; - }, - compileHeader: function CFFCompiler_compileHeader(header) { - return [header.major, header.minor, header.hdrSize, header.offSize]; - }, - compileNameIndex: function CFFCompiler_compileNameIndex(names) { - var nameIndex = new CFFIndex(); - for (var i = 0, ii = names.length; i < ii; ++i) { - var name = names[i]; - var length = Math.min(name.length, 127); - var sanitizedName = new Array(length); - for (var j = 0; j < length; j++) { - var char = name[j]; - if (char < '!' || char > '~' || char === '[' || char === ']' || char === '(' || char === ')' || char === '{' || char === '}' || char === '<' || char === '>' || char === '/' || char === '%') { - char = '_'; - } - sanitizedName[j] = char; - } - sanitizedName = sanitizedName.join(''); - if (sanitizedName === '') { - sanitizedName = 'Bad_Font_Name'; - } - nameIndex.add((0, _util.stringToBytes)(sanitizedName)); - } - return this.compileIndex(nameIndex); - }, - compileTopDicts: function CFFCompiler_compileTopDicts(dicts, length, removeCidKeys) { - var fontDictTrackers = []; - var fdArrayIndex = new CFFIndex(); - for (var i = 0, ii = dicts.length; i < ii; ++i) { - var fontDict = dicts[i]; - if (removeCidKeys) { - fontDict.removeByName('CIDFontVersion'); - fontDict.removeByName('CIDFontRevision'); - fontDict.removeByName('CIDFontType'); - fontDict.removeByName('CIDCount'); - fontDict.removeByName('UIDBase'); - } - var fontDictTracker = new CFFOffsetTracker(); - var fontDictData = this.compileDict(fontDict, fontDictTracker); - fontDictTrackers.push(fontDictTracker); - fdArrayIndex.add(fontDictData); - fontDictTracker.offset(length); - } - fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers); - return { - trackers: fontDictTrackers, - output: fdArrayIndex - }; - }, - compilePrivateDicts: function CFFCompiler_compilePrivateDicts(dicts, trackers, output) { - for (var i = 0, ii = dicts.length; i < ii; ++i) { - var fontDict = dicts[i]; - var privateDict = fontDict.privateDict; - if (!privateDict || !fontDict.hasName('Private')) { - throw new _util.FormatError('There must be a private dictionary.'); - } - var privateDictTracker = new CFFOffsetTracker(); - var privateDictData = this.compileDict(privateDict, privateDictTracker); - var outputLength = output.length; - privateDictTracker.offset(outputLength); - if (!privateDictData.length) { - outputLength = 0; - } - trackers[i].setEntryLocation('Private', [privateDictData.length, outputLength], output); - output.add(privateDictData); - if (privateDict.subrsIndex && privateDict.hasName('Subrs')) { - var subrs = this.compileIndex(privateDict.subrsIndex); - privateDictTracker.setEntryLocation('Subrs', [privateDictData.length], output); - output.add(subrs); - } - } - }, - compileDict: function CFFCompiler_compileDict(dict, offsetTracker) { - var out = []; - var order = dict.order; - for (var i = 0; i < order.length; ++i) { - var key = order[i]; - if (!(key in dict.values)) { - continue; - } - var values = dict.values[key]; - var types = dict.types[key]; - if (!Array.isArray(types)) { - types = [types]; - } - if (!Array.isArray(values)) { - values = [values]; - } - if (values.length === 0) { - continue; - } - for (var j = 0, jj = types.length; j < jj; ++j) { - var type = types[j]; - var value = values[j]; - switch (type) { - case 'num': - case 'sid': - out = out.concat(this.encodeNumber(value)); - break; - case 'offset': - var name = dict.keyToNameMap[key]; - if (!offsetTracker.isTracking(name)) { - offsetTracker.track(name, out.length); - } - out = out.concat([0x1d, 0, 0, 0, 0]); - break; - case 'array': - case 'delta': - out = out.concat(this.encodeNumber(value)); - for (var k = 1, kk = values.length; k < kk; ++k) { - out = out.concat(this.encodeNumber(values[k])); - } - break; - default: - throw new _util.FormatError('Unknown data type of ' + type); - } - } - out = out.concat(dict.opcodes[key]); - } - return out; - }, - compileStringIndex: function CFFCompiler_compileStringIndex(strings) { - var stringIndex = new CFFIndex(); - for (var i = 0, ii = strings.length; i < ii; ++i) { - stringIndex.add((0, _util.stringToBytes)(strings[i])); - } - return this.compileIndex(stringIndex); - }, - compileGlobalSubrIndex: function CFFCompiler_compileGlobalSubrIndex() { - var globalSubrIndex = this.cff.globalSubrIndex; - this.out.writeByteArray(this.compileIndex(globalSubrIndex)); - }, - compileCharStrings: function CFFCompiler_compileCharStrings(charStrings) { - var charStringsIndex = new CFFIndex(); - for (var i = 0; i < charStrings.count; i++) { - var glyph = charStrings.get(i); - if (glyph.length === 0) { - charStringsIndex.add(new Uint8Array([0x8B, 0x0E])); - continue; - } - charStringsIndex.add(glyph); - } - return this.compileIndex(charStringsIndex); - }, - compileCharset: function CFFCompiler_compileCharset(charset) { - var length = 1 + (this.cff.charStrings.count - 1) * 2; - var out = new Uint8Array(length); - return this.compileTypedArray(out); - }, - compileEncoding: function CFFCompiler_compileEncoding(encoding) { - return this.compileTypedArray(encoding.raw); - }, - compileFDSelect: function CFFCompiler_compileFDSelect(fdSelect) { - var format = fdSelect.format; - var out = void 0, - i = void 0; - switch (format) { - case 0: - out = new Uint8Array(1 + fdSelect.fdSelect.length); - out[0] = format; - for (i = 0; i < fdSelect.fdSelect.length; i++) { - out[i + 1] = fdSelect.fdSelect[i]; - } - break; - case 3: - var start = 0; - var lastFD = fdSelect.fdSelect[0]; - var ranges = [format, 0, 0, start >> 8 & 0xFF, start & 0xFF, lastFD]; - for (i = 1; i < fdSelect.fdSelect.length; i++) { - var currentFD = fdSelect.fdSelect[i]; - if (currentFD !== lastFD) { - ranges.push(i >> 8 & 0xFF, i & 0xFF, currentFD); - lastFD = currentFD; - } - } - var numRanges = (ranges.length - 3) / 3; - ranges[1] = numRanges >> 8 & 0xFF; - ranges[2] = numRanges & 0xFF; - ranges.push(i >> 8 & 0xFF, i & 0xFF); - out = new Uint8Array(ranges); - break; - } - return this.compileTypedArray(out); - }, - compileTypedArray: function CFFCompiler_compileTypedArray(data) { - var out = []; - for (var i = 0, ii = data.length; i < ii; ++i) { - out[i] = data[i]; - } - return out; - }, - compileIndex: function CFFCompiler_compileIndex(index, trackers) { - trackers = trackers || []; - var objects = index.objects; - var count = objects.length; - if (count === 0) { - return [0, 0, 0]; - } - var data = [count >> 8 & 0xFF, count & 0xff]; - var lastOffset = 1, - i; - for (i = 0; i < count; ++i) { - lastOffset += objects[i].length; - } - var offsetSize; - if (lastOffset < 0x100) { - offsetSize = 1; - } else if (lastOffset < 0x10000) { - offsetSize = 2; - } else if (lastOffset < 0x1000000) { - offsetSize = 3; - } else { - offsetSize = 4; - } - data.push(offsetSize); - var relativeOffset = 1; - for (i = 0; i < count + 1; i++) { - if (offsetSize === 1) { - data.push(relativeOffset & 0xFF); - } else if (offsetSize === 2) { - data.push(relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF); - } else if (offsetSize === 3) { - data.push(relativeOffset >> 16 & 0xFF, relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF); - } else { - data.push(relativeOffset >>> 24 & 0xFF, relativeOffset >> 16 & 0xFF, relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF); - } - if (objects[i]) { - relativeOffset += objects[i].length; - } - } - for (i = 0; i < count; i++) { - if (trackers[i]) { - trackers[i].offset(data.length); - } - for (var j = 0, jj = objects[i].length; j < jj; j++) { - data.push(objects[i][j]); - } - } - return data; - } - }; - return CFFCompiler; -}(); -exports.CFFStandardStrings = CFFStandardStrings; -exports.CFFParser = CFFParser; -exports.CFF = CFF; -exports.CFFHeader = CFFHeader; -exports.CFFStrings = CFFStrings; -exports.CFFIndex = CFFIndex; -exports.CFFCharset = CFFCharset; -exports.CFFTopDict = CFFTopDict; -exports.CFFPrivateDict = CFFPrivateDict; -exports.CFFCompiler = CFFCompiler; -exports.CFFFDSelect = CFFFDSelect; - -/***/ }), -/* 158 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var ISOAdobeCharset = ['.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron']; -var ExpertCharset = ['.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall']; -var ExpertSubsetCharset = ['.notdef', 'space', 'dollaroldstyle', 'dollarsuperior', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted', 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter', 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior']; -exports.ISOAdobeCharset = ISOAdobeCharset; -exports.ExpertCharset = ExpertCharset; -exports.ExpertSubsetCharset = ExpertSubsetCharset; - -/***/ }), -/* 159 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var ExpertEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior', '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall']; -var MacExpertEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', 'centoldstyle', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', '', 'threequartersemdash', '', 'questionsmall', '', '', '', '', 'Ethsmall', '', '', 'onequarter', 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', '', '', '', '', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hypheninferior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', 'asuperior', 'centsuperior', '', '', '', '', 'Aacutesmall', 'Agravesmall', 'Acircumflexsmall', 'Adieresissmall', 'Atildesmall', 'Aringsmall', 'Ccedillasmall', 'Eacutesmall', 'Egravesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Iacutesmall', 'Igravesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ntildesmall', 'Oacutesmall', 'Ogravesmall', 'Ocircumflexsmall', 'Odieresissmall', 'Otildesmall', 'Uacutesmall', 'Ugravesmall', 'Ucircumflexsmall', 'Udieresissmall', '', 'eightsuperior', 'fourinferior', 'threeinferior', 'sixinferior', 'eightinferior', 'seveninferior', 'Scaronsmall', '', 'centinferior', 'twoinferior', '', 'Dieresissmall', '', 'Caronsmall', 'osuperior', 'fiveinferior', '', 'commainferior', 'periodinferior', 'Yacutesmall', '', 'dollarinferior', '', '', 'Thornsmall', '', 'nineinferior', 'zeroinferior', 'Zcaronsmall', 'AEsmall', 'Oslashsmall', 'questiondownsmall', 'oneinferior', 'Lslashsmall', '', '', '', '', '', '', 'Cedillasmall', '', '', '', '', '', 'OEsmall', 'figuredash', 'hyphensuperior', '', '', '', '', 'exclamdownsmall', '', 'Ydieresissmall', '', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'ninesuperior', 'zerosuperior', '', 'esuperior', 'rsuperior', 'tsuperior', '', '', 'isuperior', 'ssuperior', 'dsuperior', '', '', '', '', '', 'lsuperior', 'Ogoneksmall', 'Brevesmall', 'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior', 'periodsuperior', 'Dotaccentsmall', 'Ringsmall', '', '', '', '']; -var MacRomanEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis', 'space', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron']; -var StandardEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron', 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls', '', '', '', '']; -var WinAnsiEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'bullet', 'Euro', 'bullet', 'quotesinglbase', 'florin', 'quotedblbase', 'ellipsis', 'dagger', 'daggerdbl', 'circumflex', 'perthousand', 'Scaron', 'guilsinglleft', 'OE', 'bullet', 'Zcaron', 'bullet', 'bullet', 'quoteleft', 'quoteright', 'quotedblleft', 'quotedblright', 'bullet', 'endash', 'emdash', 'tilde', 'trademark', 'scaron', 'guilsinglright', 'oe', 'bullet', 'zcaron', 'Ydieresis', 'space', 'exclamdown', 'cent', 'sterling', 'currency', 'yen', 'brokenbar', 'section', 'dieresis', 'copyright', 'ordfeminine', 'guillemotleft', 'logicalnot', 'hyphen', 'registered', 'macron', 'degree', 'plusminus', 'twosuperior', 'threesuperior', 'acute', 'mu', 'paragraph', 'periodcentered', 'cedilla', 'onesuperior', 'ordmasculine', 'guillemotright', 'onequarter', 'onehalf', 'threequarters', 'questiondown', 'Agrave', 'Aacute', 'Acircumflex', 'Atilde', 'Adieresis', 'Aring', 'AE', 'Ccedilla', 'Egrave', 'Eacute', 'Ecircumflex', 'Edieresis', 'Igrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Eth', 'Ntilde', 'Ograve', 'Oacute', 'Ocircumflex', 'Otilde', 'Odieresis', 'multiply', 'Oslash', 'Ugrave', 'Uacute', 'Ucircumflex', 'Udieresis', 'Yacute', 'Thorn', 'germandbls', 'agrave', 'aacute', 'acircumflex', 'atilde', 'adieresis', 'aring', 'ae', 'ccedilla', 'egrave', 'eacute', 'ecircumflex', 'edieresis', 'igrave', 'iacute', 'icircumflex', 'idieresis', 'eth', 'ntilde', 'ograve', 'oacute', 'ocircumflex', 'otilde', 'odieresis', 'divide', 'oslash', 'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', 'thorn', 'ydieresis']; -var SymbolSetEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'universal', 'numbersign', 'existential', 'percent', 'ampersand', 'suchthat', 'parenleft', 'parenright', 'asteriskmath', 'plus', 'comma', 'minus', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'congruent', 'Alpha', 'Beta', 'Chi', 'Delta', 'Epsilon', 'Phi', 'Gamma', 'Eta', 'Iota', 'theta1', 'Kappa', 'Lambda', 'Mu', 'Nu', 'Omicron', 'Pi', 'Theta', 'Rho', 'Sigma', 'Tau', 'Upsilon', 'sigma1', 'Omega', 'Xi', 'Psi', 'Zeta', 'bracketleft', 'therefore', 'bracketright', 'perpendicular', 'underscore', 'radicalex', 'alpha', 'beta', 'chi', 'delta', 'epsilon', 'phi', 'gamma', 'eta', 'iota', 'phi1', 'kappa', 'lambda', 'mu', 'nu', 'omicron', 'pi', 'theta', 'rho', 'sigma', 'tau', 'upsilon', 'omega1', 'omega', 'xi', 'psi', 'zeta', 'braceleft', 'bar', 'braceright', 'similar', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'Euro', 'Upsilon1', 'minute', 'lessequal', 'fraction', 'infinity', 'florin', 'club', 'diamond', 'heart', 'spade', 'arrowboth', 'arrowleft', 'arrowup', 'arrowright', 'arrowdown', 'degree', 'plusminus', 'second', 'greaterequal', 'multiply', 'proportional', 'partialdiff', 'bullet', 'divide', 'notequal', 'equivalence', 'approxequal', 'ellipsis', 'arrowvertex', 'arrowhorizex', 'carriagereturn', 'aleph', 'Ifraktur', 'Rfraktur', 'weierstrass', 'circlemultiply', 'circleplus', 'emptyset', 'intersection', 'union', 'propersuperset', 'reflexsuperset', 'notsubset', 'propersubset', 'reflexsubset', 'element', 'notelement', 'angle', 'gradient', 'registerserif', 'copyrightserif', 'trademarkserif', 'product', 'radical', 'dotmath', 'logicalnot', 'logicaland', 'logicalor', 'arrowdblboth', 'arrowdblleft', 'arrowdblup', 'arrowdblright', 'arrowdbldown', 'lozenge', 'angleleft', 'registersans', 'copyrightsans', 'trademarksans', 'summation', 'parenlefttp', 'parenleftex', 'parenleftbt', 'bracketlefttp', 'bracketleftex', 'bracketleftbt', 'bracelefttp', 'braceleftmid', 'braceleftbt', 'braceex', '', 'angleright', 'integral', 'integraltp', 'integralex', 'integralbt', 'parenrighttp', 'parenrightex', 'parenrightbt', 'bracketrighttp', 'bracketrightex', 'bracketrightbt', 'bracerighttp', 'bracerightmid', 'bracerightbt', '']; -var ZapfDingbatsEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'a1', 'a2', 'a202', 'a3', 'a4', 'a5', 'a119', 'a118', 'a117', 'a11', 'a12', 'a13', 'a14', 'a15', 'a16', 'a105', 'a17', 'a18', 'a19', 'a20', 'a21', 'a22', 'a23', 'a24', 'a25', 'a26', 'a27', 'a28', 'a6', 'a7', 'a8', 'a9', 'a10', 'a29', 'a30', 'a31', 'a32', 'a33', 'a34', 'a35', 'a36', 'a37', 'a38', 'a39', 'a40', 'a41', 'a42', 'a43', 'a44', 'a45', 'a46', 'a47', 'a48', 'a49', 'a50', 'a51', 'a52', 'a53', 'a54', 'a55', 'a56', 'a57', 'a58', 'a59', 'a60', 'a61', 'a62', 'a63', 'a64', 'a65', 'a66', 'a67', 'a68', 'a69', 'a70', 'a71', 'a72', 'a73', 'a74', 'a203', 'a75', 'a204', 'a76', 'a77', 'a78', 'a79', 'a81', 'a82', 'a83', 'a84', 'a97', 'a98', 'a99', 'a100', '', 'a89', 'a90', 'a93', 'a94', 'a91', 'a92', 'a205', 'a85', 'a206', 'a86', 'a87', 'a88', 'a95', 'a96', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'a101', 'a102', 'a103', 'a104', 'a106', 'a107', 'a108', 'a112', 'a111', 'a110', 'a109', 'a120', 'a121', 'a122', 'a123', 'a124', 'a125', 'a126', 'a127', 'a128', 'a129', 'a130', 'a131', 'a132', 'a133', 'a134', 'a135', 'a136', 'a137', 'a138', 'a139', 'a140', 'a141', 'a142', 'a143', 'a144', 'a145', 'a146', 'a147', 'a148', 'a149', 'a150', 'a151', 'a152', 'a153', 'a154', 'a155', 'a156', 'a157', 'a158', 'a159', 'a160', 'a161', 'a163', 'a164', 'a196', 'a165', 'a192', 'a166', 'a167', 'a168', 'a169', 'a170', 'a171', 'a172', 'a173', 'a162', 'a174', 'a175', 'a176', 'a177', 'a178', 'a179', 'a193', 'a180', 'a199', 'a181', 'a200', 'a182', '', 'a201', 'a183', 'a184', 'a197', 'a185', 'a194', 'a198', 'a186', 'a195', 'a187', 'a188', 'a189', 'a190', 'a191', '']; -function getEncoding(encodingName) { - switch (encodingName) { - case 'WinAnsiEncoding': - return WinAnsiEncoding; - case 'StandardEncoding': - return StandardEncoding; - case 'MacRomanEncoding': - return MacRomanEncoding; - case 'SymbolSetEncoding': - return SymbolSetEncoding; - case 'ZapfDingbatsEncoding': - return ZapfDingbatsEncoding; - case 'ExpertEncoding': - return ExpertEncoding; - case 'MacExpertEncoding': - return MacExpertEncoding; - default: - return null; - } -} -exports.WinAnsiEncoding = WinAnsiEncoding; -exports.StandardEncoding = StandardEncoding; -exports.MacRomanEncoding = MacRomanEncoding; -exports.SymbolSetEncoding = SymbolSetEncoding; -exports.ZapfDingbatsEncoding = ZapfDingbatsEncoding; -exports.ExpertEncoding = ExpertEncoding; -exports.getEncoding = getEncoding; - -/***/ }), -/* 160 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -var getLookupTableFactory = __w_pdfjs_require__(2).getLookupTableFactory; -var getGlyphsUnicode = getLookupTableFactory(function (t) { - t['A'] = 0x0041; - t['AE'] = 0x00C6; - t['AEacute'] = 0x01FC; - t['AEmacron'] = 0x01E2; - t['AEsmall'] = 0xF7E6; - t['Aacute'] = 0x00C1; - t['Aacutesmall'] = 0xF7E1; - t['Abreve'] = 0x0102; - t['Abreveacute'] = 0x1EAE; - t['Abrevecyrillic'] = 0x04D0; - t['Abrevedotbelow'] = 0x1EB6; - t['Abrevegrave'] = 0x1EB0; - t['Abrevehookabove'] = 0x1EB2; - t['Abrevetilde'] = 0x1EB4; - t['Acaron'] = 0x01CD; - t['Acircle'] = 0x24B6; - t['Acircumflex'] = 0x00C2; - t['Acircumflexacute'] = 0x1EA4; - t['Acircumflexdotbelow'] = 0x1EAC; - t['Acircumflexgrave'] = 0x1EA6; - t['Acircumflexhookabove'] = 0x1EA8; - t['Acircumflexsmall'] = 0xF7E2; - t['Acircumflextilde'] = 0x1EAA; - t['Acute'] = 0xF6C9; - t['Acutesmall'] = 0xF7B4; - t['Acyrillic'] = 0x0410; - t['Adblgrave'] = 0x0200; - t['Adieresis'] = 0x00C4; - t['Adieresiscyrillic'] = 0x04D2; - t['Adieresismacron'] = 0x01DE; - t['Adieresissmall'] = 0xF7E4; - t['Adotbelow'] = 0x1EA0; - t['Adotmacron'] = 0x01E0; - t['Agrave'] = 0x00C0; - t['Agravesmall'] = 0xF7E0; - t['Ahookabove'] = 0x1EA2; - t['Aiecyrillic'] = 0x04D4; - t['Ainvertedbreve'] = 0x0202; - t['Alpha'] = 0x0391; - t['Alphatonos'] = 0x0386; - t['Amacron'] = 0x0100; - t['Amonospace'] = 0xFF21; - t['Aogonek'] = 0x0104; - t['Aring'] = 0x00C5; - t['Aringacute'] = 0x01FA; - t['Aringbelow'] = 0x1E00; - t['Aringsmall'] = 0xF7E5; - t['Asmall'] = 0xF761; - t['Atilde'] = 0x00C3; - t['Atildesmall'] = 0xF7E3; - t['Aybarmenian'] = 0x0531; - t['B'] = 0x0042; - t['Bcircle'] = 0x24B7; - t['Bdotaccent'] = 0x1E02; - t['Bdotbelow'] = 0x1E04; - t['Becyrillic'] = 0x0411; - t['Benarmenian'] = 0x0532; - t['Beta'] = 0x0392; - t['Bhook'] = 0x0181; - t['Blinebelow'] = 0x1E06; - t['Bmonospace'] = 0xFF22; - t['Brevesmall'] = 0xF6F4; - t['Bsmall'] = 0xF762; - t['Btopbar'] = 0x0182; - t['C'] = 0x0043; - t['Caarmenian'] = 0x053E; - t['Cacute'] = 0x0106; - t['Caron'] = 0xF6CA; - t['Caronsmall'] = 0xF6F5; - t['Ccaron'] = 0x010C; - t['Ccedilla'] = 0x00C7; - t['Ccedillaacute'] = 0x1E08; - t['Ccedillasmall'] = 0xF7E7; - t['Ccircle'] = 0x24B8; - t['Ccircumflex'] = 0x0108; - t['Cdot'] = 0x010A; - t['Cdotaccent'] = 0x010A; - t['Cedillasmall'] = 0xF7B8; - t['Chaarmenian'] = 0x0549; - t['Cheabkhasiancyrillic'] = 0x04BC; - t['Checyrillic'] = 0x0427; - t['Chedescenderabkhasiancyrillic'] = 0x04BE; - t['Chedescendercyrillic'] = 0x04B6; - t['Chedieresiscyrillic'] = 0x04F4; - t['Cheharmenian'] = 0x0543; - t['Chekhakassiancyrillic'] = 0x04CB; - t['Cheverticalstrokecyrillic'] = 0x04B8; - t['Chi'] = 0x03A7; - t['Chook'] = 0x0187; - t['Circumflexsmall'] = 0xF6F6; - t['Cmonospace'] = 0xFF23; - t['Coarmenian'] = 0x0551; - t['Csmall'] = 0xF763; - t['D'] = 0x0044; - t['DZ'] = 0x01F1; - t['DZcaron'] = 0x01C4; - t['Daarmenian'] = 0x0534; - t['Dafrican'] = 0x0189; - t['Dcaron'] = 0x010E; - t['Dcedilla'] = 0x1E10; - t['Dcircle'] = 0x24B9; - t['Dcircumflexbelow'] = 0x1E12; - t['Dcroat'] = 0x0110; - t['Ddotaccent'] = 0x1E0A; - t['Ddotbelow'] = 0x1E0C; - t['Decyrillic'] = 0x0414; - t['Deicoptic'] = 0x03EE; - t['Delta'] = 0x2206; - t['Deltagreek'] = 0x0394; - t['Dhook'] = 0x018A; - t['Dieresis'] = 0xF6CB; - t['DieresisAcute'] = 0xF6CC; - t['DieresisGrave'] = 0xF6CD; - t['Dieresissmall'] = 0xF7A8; - t['Digammagreek'] = 0x03DC; - t['Djecyrillic'] = 0x0402; - t['Dlinebelow'] = 0x1E0E; - t['Dmonospace'] = 0xFF24; - t['Dotaccentsmall'] = 0xF6F7; - t['Dslash'] = 0x0110; - t['Dsmall'] = 0xF764; - t['Dtopbar'] = 0x018B; - t['Dz'] = 0x01F2; - t['Dzcaron'] = 0x01C5; - t['Dzeabkhasiancyrillic'] = 0x04E0; - t['Dzecyrillic'] = 0x0405; - t['Dzhecyrillic'] = 0x040F; - t['E'] = 0x0045; - t['Eacute'] = 0x00C9; - t['Eacutesmall'] = 0xF7E9; - t['Ebreve'] = 0x0114; - t['Ecaron'] = 0x011A; - t['Ecedillabreve'] = 0x1E1C; - t['Echarmenian'] = 0x0535; - t['Ecircle'] = 0x24BA; - t['Ecircumflex'] = 0x00CA; - t['Ecircumflexacute'] = 0x1EBE; - t['Ecircumflexbelow'] = 0x1E18; - t['Ecircumflexdotbelow'] = 0x1EC6; - t['Ecircumflexgrave'] = 0x1EC0; - t['Ecircumflexhookabove'] = 0x1EC2; - t['Ecircumflexsmall'] = 0xF7EA; - t['Ecircumflextilde'] = 0x1EC4; - t['Ecyrillic'] = 0x0404; - t['Edblgrave'] = 0x0204; - t['Edieresis'] = 0x00CB; - t['Edieresissmall'] = 0xF7EB; - t['Edot'] = 0x0116; - t['Edotaccent'] = 0x0116; - t['Edotbelow'] = 0x1EB8; - t['Efcyrillic'] = 0x0424; - t['Egrave'] = 0x00C8; - t['Egravesmall'] = 0xF7E8; - t['Eharmenian'] = 0x0537; - t['Ehookabove'] = 0x1EBA; - t['Eightroman'] = 0x2167; - t['Einvertedbreve'] = 0x0206; - t['Eiotifiedcyrillic'] = 0x0464; - t['Elcyrillic'] = 0x041B; - t['Elevenroman'] = 0x216A; - t['Emacron'] = 0x0112; - t['Emacronacute'] = 0x1E16; - t['Emacrongrave'] = 0x1E14; - t['Emcyrillic'] = 0x041C; - t['Emonospace'] = 0xFF25; - t['Encyrillic'] = 0x041D; - t['Endescendercyrillic'] = 0x04A2; - t['Eng'] = 0x014A; - t['Enghecyrillic'] = 0x04A4; - t['Enhookcyrillic'] = 0x04C7; - t['Eogonek'] = 0x0118; - t['Eopen'] = 0x0190; - t['Epsilon'] = 0x0395; - t['Epsilontonos'] = 0x0388; - t['Ercyrillic'] = 0x0420; - t['Ereversed'] = 0x018E; - t['Ereversedcyrillic'] = 0x042D; - t['Escyrillic'] = 0x0421; - t['Esdescendercyrillic'] = 0x04AA; - t['Esh'] = 0x01A9; - t['Esmall'] = 0xF765; - t['Eta'] = 0x0397; - t['Etarmenian'] = 0x0538; - t['Etatonos'] = 0x0389; - t['Eth'] = 0x00D0; - t['Ethsmall'] = 0xF7F0; - t['Etilde'] = 0x1EBC; - t['Etildebelow'] = 0x1E1A; - t['Euro'] = 0x20AC; - t['Ezh'] = 0x01B7; - t['Ezhcaron'] = 0x01EE; - t['Ezhreversed'] = 0x01B8; - t['F'] = 0x0046; - t['Fcircle'] = 0x24BB; - t['Fdotaccent'] = 0x1E1E; - t['Feharmenian'] = 0x0556; - t['Feicoptic'] = 0x03E4; - t['Fhook'] = 0x0191; - t['Fitacyrillic'] = 0x0472; - t['Fiveroman'] = 0x2164; - t['Fmonospace'] = 0xFF26; - t['Fourroman'] = 0x2163; - t['Fsmall'] = 0xF766; - t['G'] = 0x0047; - t['GBsquare'] = 0x3387; - t['Gacute'] = 0x01F4; - t['Gamma'] = 0x0393; - t['Gammaafrican'] = 0x0194; - t['Gangiacoptic'] = 0x03EA; - t['Gbreve'] = 0x011E; - t['Gcaron'] = 0x01E6; - t['Gcedilla'] = 0x0122; - t['Gcircle'] = 0x24BC; - t['Gcircumflex'] = 0x011C; - t['Gcommaaccent'] = 0x0122; - t['Gdot'] = 0x0120; - t['Gdotaccent'] = 0x0120; - t['Gecyrillic'] = 0x0413; - t['Ghadarmenian'] = 0x0542; - t['Ghemiddlehookcyrillic'] = 0x0494; - t['Ghestrokecyrillic'] = 0x0492; - t['Gheupturncyrillic'] = 0x0490; - t['Ghook'] = 0x0193; - t['Gimarmenian'] = 0x0533; - t['Gjecyrillic'] = 0x0403; - t['Gmacron'] = 0x1E20; - t['Gmonospace'] = 0xFF27; - t['Grave'] = 0xF6CE; - t['Gravesmall'] = 0xF760; - t['Gsmall'] = 0xF767; - t['Gsmallhook'] = 0x029B; - t['Gstroke'] = 0x01E4; - t['H'] = 0x0048; - t['H18533'] = 0x25CF; - t['H18543'] = 0x25AA; - t['H18551'] = 0x25AB; - t['H22073'] = 0x25A1; - t['HPsquare'] = 0x33CB; - t['Haabkhasiancyrillic'] = 0x04A8; - t['Hadescendercyrillic'] = 0x04B2; - t['Hardsigncyrillic'] = 0x042A; - t['Hbar'] = 0x0126; - t['Hbrevebelow'] = 0x1E2A; - t['Hcedilla'] = 0x1E28; - t['Hcircle'] = 0x24BD; - t['Hcircumflex'] = 0x0124; - t['Hdieresis'] = 0x1E26; - t['Hdotaccent'] = 0x1E22; - t['Hdotbelow'] = 0x1E24; - t['Hmonospace'] = 0xFF28; - t['Hoarmenian'] = 0x0540; - t['Horicoptic'] = 0x03E8; - t['Hsmall'] = 0xF768; - t['Hungarumlaut'] = 0xF6CF; - t['Hungarumlautsmall'] = 0xF6F8; - t['Hzsquare'] = 0x3390; - t['I'] = 0x0049; - t['IAcyrillic'] = 0x042F; - t['IJ'] = 0x0132; - t['IUcyrillic'] = 0x042E; - t['Iacute'] = 0x00CD; - t['Iacutesmall'] = 0xF7ED; - t['Ibreve'] = 0x012C; - t['Icaron'] = 0x01CF; - t['Icircle'] = 0x24BE; - t['Icircumflex'] = 0x00CE; - t['Icircumflexsmall'] = 0xF7EE; - t['Icyrillic'] = 0x0406; - t['Idblgrave'] = 0x0208; - t['Idieresis'] = 0x00CF; - t['Idieresisacute'] = 0x1E2E; - t['Idieresiscyrillic'] = 0x04E4; - t['Idieresissmall'] = 0xF7EF; - t['Idot'] = 0x0130; - t['Idotaccent'] = 0x0130; - t['Idotbelow'] = 0x1ECA; - t['Iebrevecyrillic'] = 0x04D6; - t['Iecyrillic'] = 0x0415; - t['Ifraktur'] = 0x2111; - t['Igrave'] = 0x00CC; - t['Igravesmall'] = 0xF7EC; - t['Ihookabove'] = 0x1EC8; - t['Iicyrillic'] = 0x0418; - t['Iinvertedbreve'] = 0x020A; - t['Iishortcyrillic'] = 0x0419; - t['Imacron'] = 0x012A; - t['Imacroncyrillic'] = 0x04E2; - t['Imonospace'] = 0xFF29; - t['Iniarmenian'] = 0x053B; - t['Iocyrillic'] = 0x0401; - t['Iogonek'] = 0x012E; - t['Iota'] = 0x0399; - t['Iotaafrican'] = 0x0196; - t['Iotadieresis'] = 0x03AA; - t['Iotatonos'] = 0x038A; - t['Ismall'] = 0xF769; - t['Istroke'] = 0x0197; - t['Itilde'] = 0x0128; - t['Itildebelow'] = 0x1E2C; - t['Izhitsacyrillic'] = 0x0474; - t['Izhitsadblgravecyrillic'] = 0x0476; - t['J'] = 0x004A; - t['Jaarmenian'] = 0x0541; - t['Jcircle'] = 0x24BF; - t['Jcircumflex'] = 0x0134; - t['Jecyrillic'] = 0x0408; - t['Jheharmenian'] = 0x054B; - t['Jmonospace'] = 0xFF2A; - t['Jsmall'] = 0xF76A; - t['K'] = 0x004B; - t['KBsquare'] = 0x3385; - t['KKsquare'] = 0x33CD; - t['Kabashkircyrillic'] = 0x04A0; - t['Kacute'] = 0x1E30; - t['Kacyrillic'] = 0x041A; - t['Kadescendercyrillic'] = 0x049A; - t['Kahookcyrillic'] = 0x04C3; - t['Kappa'] = 0x039A; - t['Kastrokecyrillic'] = 0x049E; - t['Kaverticalstrokecyrillic'] = 0x049C; - t['Kcaron'] = 0x01E8; - t['Kcedilla'] = 0x0136; - t['Kcircle'] = 0x24C0; - t['Kcommaaccent'] = 0x0136; - t['Kdotbelow'] = 0x1E32; - t['Keharmenian'] = 0x0554; - t['Kenarmenian'] = 0x053F; - t['Khacyrillic'] = 0x0425; - t['Kheicoptic'] = 0x03E6; - t['Khook'] = 0x0198; - t['Kjecyrillic'] = 0x040C; - t['Klinebelow'] = 0x1E34; - t['Kmonospace'] = 0xFF2B; - t['Koppacyrillic'] = 0x0480; - t['Koppagreek'] = 0x03DE; - t['Ksicyrillic'] = 0x046E; - t['Ksmall'] = 0xF76B; - t['L'] = 0x004C; - t['LJ'] = 0x01C7; - t['LL'] = 0xF6BF; - t['Lacute'] = 0x0139; - t['Lambda'] = 0x039B; - t['Lcaron'] = 0x013D; - t['Lcedilla'] = 0x013B; - t['Lcircle'] = 0x24C1; - t['Lcircumflexbelow'] = 0x1E3C; - t['Lcommaaccent'] = 0x013B; - t['Ldot'] = 0x013F; - t['Ldotaccent'] = 0x013F; - t['Ldotbelow'] = 0x1E36; - t['Ldotbelowmacron'] = 0x1E38; - t['Liwnarmenian'] = 0x053C; - t['Lj'] = 0x01C8; - t['Ljecyrillic'] = 0x0409; - t['Llinebelow'] = 0x1E3A; - t['Lmonospace'] = 0xFF2C; - t['Lslash'] = 0x0141; - t['Lslashsmall'] = 0xF6F9; - t['Lsmall'] = 0xF76C; - t['M'] = 0x004D; - t['MBsquare'] = 0x3386; - t['Macron'] = 0xF6D0; - t['Macronsmall'] = 0xF7AF; - t['Macute'] = 0x1E3E; - t['Mcircle'] = 0x24C2; - t['Mdotaccent'] = 0x1E40; - t['Mdotbelow'] = 0x1E42; - t['Menarmenian'] = 0x0544; - t['Mmonospace'] = 0xFF2D; - t['Msmall'] = 0xF76D; - t['Mturned'] = 0x019C; - t['Mu'] = 0x039C; - t['N'] = 0x004E; - t['NJ'] = 0x01CA; - t['Nacute'] = 0x0143; - t['Ncaron'] = 0x0147; - t['Ncedilla'] = 0x0145; - t['Ncircle'] = 0x24C3; - t['Ncircumflexbelow'] = 0x1E4A; - t['Ncommaaccent'] = 0x0145; - t['Ndotaccent'] = 0x1E44; - t['Ndotbelow'] = 0x1E46; - t['Nhookleft'] = 0x019D; - t['Nineroman'] = 0x2168; - t['Nj'] = 0x01CB; - t['Njecyrillic'] = 0x040A; - t['Nlinebelow'] = 0x1E48; - t['Nmonospace'] = 0xFF2E; - t['Nowarmenian'] = 0x0546; - t['Nsmall'] = 0xF76E; - t['Ntilde'] = 0x00D1; - t['Ntildesmall'] = 0xF7F1; - t['Nu'] = 0x039D; - t['O'] = 0x004F; - t['OE'] = 0x0152; - t['OEsmall'] = 0xF6FA; - t['Oacute'] = 0x00D3; - t['Oacutesmall'] = 0xF7F3; - t['Obarredcyrillic'] = 0x04E8; - t['Obarreddieresiscyrillic'] = 0x04EA; - t['Obreve'] = 0x014E; - t['Ocaron'] = 0x01D1; - t['Ocenteredtilde'] = 0x019F; - t['Ocircle'] = 0x24C4; - t['Ocircumflex'] = 0x00D4; - t['Ocircumflexacute'] = 0x1ED0; - t['Ocircumflexdotbelow'] = 0x1ED8; - t['Ocircumflexgrave'] = 0x1ED2; - t['Ocircumflexhookabove'] = 0x1ED4; - t['Ocircumflexsmall'] = 0xF7F4; - t['Ocircumflextilde'] = 0x1ED6; - t['Ocyrillic'] = 0x041E; - t['Odblacute'] = 0x0150; - t['Odblgrave'] = 0x020C; - t['Odieresis'] = 0x00D6; - t['Odieresiscyrillic'] = 0x04E6; - t['Odieresissmall'] = 0xF7F6; - t['Odotbelow'] = 0x1ECC; - t['Ogoneksmall'] = 0xF6FB; - t['Ograve'] = 0x00D2; - t['Ogravesmall'] = 0xF7F2; - t['Oharmenian'] = 0x0555; - t['Ohm'] = 0x2126; - t['Ohookabove'] = 0x1ECE; - t['Ohorn'] = 0x01A0; - t['Ohornacute'] = 0x1EDA; - t['Ohorndotbelow'] = 0x1EE2; - t['Ohorngrave'] = 0x1EDC; - t['Ohornhookabove'] = 0x1EDE; - t['Ohorntilde'] = 0x1EE0; - t['Ohungarumlaut'] = 0x0150; - t['Oi'] = 0x01A2; - t['Oinvertedbreve'] = 0x020E; - t['Omacron'] = 0x014C; - t['Omacronacute'] = 0x1E52; - t['Omacrongrave'] = 0x1E50; - t['Omega'] = 0x2126; - t['Omegacyrillic'] = 0x0460; - t['Omegagreek'] = 0x03A9; - t['Omegaroundcyrillic'] = 0x047A; - t['Omegatitlocyrillic'] = 0x047C; - t['Omegatonos'] = 0x038F; - t['Omicron'] = 0x039F; - t['Omicrontonos'] = 0x038C; - t['Omonospace'] = 0xFF2F; - t['Oneroman'] = 0x2160; - t['Oogonek'] = 0x01EA; - t['Oogonekmacron'] = 0x01EC; - t['Oopen'] = 0x0186; - t['Oslash'] = 0x00D8; - t['Oslashacute'] = 0x01FE; - t['Oslashsmall'] = 0xF7F8; - t['Osmall'] = 0xF76F; - t['Ostrokeacute'] = 0x01FE; - t['Otcyrillic'] = 0x047E; - t['Otilde'] = 0x00D5; - t['Otildeacute'] = 0x1E4C; - t['Otildedieresis'] = 0x1E4E; - t['Otildesmall'] = 0xF7F5; - t['P'] = 0x0050; - t['Pacute'] = 0x1E54; - t['Pcircle'] = 0x24C5; - t['Pdotaccent'] = 0x1E56; - t['Pecyrillic'] = 0x041F; - t['Peharmenian'] = 0x054A; - t['Pemiddlehookcyrillic'] = 0x04A6; - t['Phi'] = 0x03A6; - t['Phook'] = 0x01A4; - t['Pi'] = 0x03A0; - t['Piwrarmenian'] = 0x0553; - t['Pmonospace'] = 0xFF30; - t['Psi'] = 0x03A8; - t['Psicyrillic'] = 0x0470; - t['Psmall'] = 0xF770; - t['Q'] = 0x0051; - t['Qcircle'] = 0x24C6; - t['Qmonospace'] = 0xFF31; - t['Qsmall'] = 0xF771; - t['R'] = 0x0052; - t['Raarmenian'] = 0x054C; - t['Racute'] = 0x0154; - t['Rcaron'] = 0x0158; - t['Rcedilla'] = 0x0156; - t['Rcircle'] = 0x24C7; - t['Rcommaaccent'] = 0x0156; - t['Rdblgrave'] = 0x0210; - t['Rdotaccent'] = 0x1E58; - t['Rdotbelow'] = 0x1E5A; - t['Rdotbelowmacron'] = 0x1E5C; - t['Reharmenian'] = 0x0550; - t['Rfraktur'] = 0x211C; - t['Rho'] = 0x03A1; - t['Ringsmall'] = 0xF6FC; - t['Rinvertedbreve'] = 0x0212; - t['Rlinebelow'] = 0x1E5E; - t['Rmonospace'] = 0xFF32; - t['Rsmall'] = 0xF772; - t['Rsmallinverted'] = 0x0281; - t['Rsmallinvertedsuperior'] = 0x02B6; - t['S'] = 0x0053; - t['SF010000'] = 0x250C; - t['SF020000'] = 0x2514; - t['SF030000'] = 0x2510; - t['SF040000'] = 0x2518; - t['SF050000'] = 0x253C; - t['SF060000'] = 0x252C; - t['SF070000'] = 0x2534; - t['SF080000'] = 0x251C; - t['SF090000'] = 0x2524; - t['SF100000'] = 0x2500; - t['SF110000'] = 0x2502; - t['SF190000'] = 0x2561; - t['SF200000'] = 0x2562; - t['SF210000'] = 0x2556; - t['SF220000'] = 0x2555; - t['SF230000'] = 0x2563; - t['SF240000'] = 0x2551; - t['SF250000'] = 0x2557; - t['SF260000'] = 0x255D; - t['SF270000'] = 0x255C; - t['SF280000'] = 0x255B; - t['SF360000'] = 0x255E; - t['SF370000'] = 0x255F; - t['SF380000'] = 0x255A; - t['SF390000'] = 0x2554; - t['SF400000'] = 0x2569; - t['SF410000'] = 0x2566; - t['SF420000'] = 0x2560; - t['SF430000'] = 0x2550; - t['SF440000'] = 0x256C; - t['SF450000'] = 0x2567; - t['SF460000'] = 0x2568; - t['SF470000'] = 0x2564; - t['SF480000'] = 0x2565; - t['SF490000'] = 0x2559; - t['SF500000'] = 0x2558; - t['SF510000'] = 0x2552; - t['SF520000'] = 0x2553; - t['SF530000'] = 0x256B; - t['SF540000'] = 0x256A; - t['Sacute'] = 0x015A; - t['Sacutedotaccent'] = 0x1E64; - t['Sampigreek'] = 0x03E0; - t['Scaron'] = 0x0160; - t['Scarondotaccent'] = 0x1E66; - t['Scaronsmall'] = 0xF6FD; - t['Scedilla'] = 0x015E; - t['Schwa'] = 0x018F; - t['Schwacyrillic'] = 0x04D8; - t['Schwadieresiscyrillic'] = 0x04DA; - t['Scircle'] = 0x24C8; - t['Scircumflex'] = 0x015C; - t['Scommaaccent'] = 0x0218; - t['Sdotaccent'] = 0x1E60; - t['Sdotbelow'] = 0x1E62; - t['Sdotbelowdotaccent'] = 0x1E68; - t['Seharmenian'] = 0x054D; - t['Sevenroman'] = 0x2166; - t['Shaarmenian'] = 0x0547; - t['Shacyrillic'] = 0x0428; - t['Shchacyrillic'] = 0x0429; - t['Sheicoptic'] = 0x03E2; - t['Shhacyrillic'] = 0x04BA; - t['Shimacoptic'] = 0x03EC; - t['Sigma'] = 0x03A3; - t['Sixroman'] = 0x2165; - t['Smonospace'] = 0xFF33; - t['Softsigncyrillic'] = 0x042C; - t['Ssmall'] = 0xF773; - t['Stigmagreek'] = 0x03DA; - t['T'] = 0x0054; - t['Tau'] = 0x03A4; - t['Tbar'] = 0x0166; - t['Tcaron'] = 0x0164; - t['Tcedilla'] = 0x0162; - t['Tcircle'] = 0x24C9; - t['Tcircumflexbelow'] = 0x1E70; - t['Tcommaaccent'] = 0x0162; - t['Tdotaccent'] = 0x1E6A; - t['Tdotbelow'] = 0x1E6C; - t['Tecyrillic'] = 0x0422; - t['Tedescendercyrillic'] = 0x04AC; - t['Tenroman'] = 0x2169; - t['Tetsecyrillic'] = 0x04B4; - t['Theta'] = 0x0398; - t['Thook'] = 0x01AC; - t['Thorn'] = 0x00DE; - t['Thornsmall'] = 0xF7FE; - t['Threeroman'] = 0x2162; - t['Tildesmall'] = 0xF6FE; - t['Tiwnarmenian'] = 0x054F; - t['Tlinebelow'] = 0x1E6E; - t['Tmonospace'] = 0xFF34; - t['Toarmenian'] = 0x0539; - t['Tonefive'] = 0x01BC; - t['Tonesix'] = 0x0184; - t['Tonetwo'] = 0x01A7; - t['Tretroflexhook'] = 0x01AE; - t['Tsecyrillic'] = 0x0426; - t['Tshecyrillic'] = 0x040B; - t['Tsmall'] = 0xF774; - t['Twelveroman'] = 0x216B; - t['Tworoman'] = 0x2161; - t['U'] = 0x0055; - t['Uacute'] = 0x00DA; - t['Uacutesmall'] = 0xF7FA; - t['Ubreve'] = 0x016C; - t['Ucaron'] = 0x01D3; - t['Ucircle'] = 0x24CA; - t['Ucircumflex'] = 0x00DB; - t['Ucircumflexbelow'] = 0x1E76; - t['Ucircumflexsmall'] = 0xF7FB; - t['Ucyrillic'] = 0x0423; - t['Udblacute'] = 0x0170; - t['Udblgrave'] = 0x0214; - t['Udieresis'] = 0x00DC; - t['Udieresisacute'] = 0x01D7; - t['Udieresisbelow'] = 0x1E72; - t['Udieresiscaron'] = 0x01D9; - t['Udieresiscyrillic'] = 0x04F0; - t['Udieresisgrave'] = 0x01DB; - t['Udieresismacron'] = 0x01D5; - t['Udieresissmall'] = 0xF7FC; - t['Udotbelow'] = 0x1EE4; - t['Ugrave'] = 0x00D9; - t['Ugravesmall'] = 0xF7F9; - t['Uhookabove'] = 0x1EE6; - t['Uhorn'] = 0x01AF; - t['Uhornacute'] = 0x1EE8; - t['Uhorndotbelow'] = 0x1EF0; - t['Uhorngrave'] = 0x1EEA; - t['Uhornhookabove'] = 0x1EEC; - t['Uhorntilde'] = 0x1EEE; - t['Uhungarumlaut'] = 0x0170; - t['Uhungarumlautcyrillic'] = 0x04F2; - t['Uinvertedbreve'] = 0x0216; - t['Ukcyrillic'] = 0x0478; - t['Umacron'] = 0x016A; - t['Umacroncyrillic'] = 0x04EE; - t['Umacrondieresis'] = 0x1E7A; - t['Umonospace'] = 0xFF35; - t['Uogonek'] = 0x0172; - t['Upsilon'] = 0x03A5; - t['Upsilon1'] = 0x03D2; - t['Upsilonacutehooksymbolgreek'] = 0x03D3; - t['Upsilonafrican'] = 0x01B1; - t['Upsilondieresis'] = 0x03AB; - t['Upsilondieresishooksymbolgreek'] = 0x03D4; - t['Upsilonhooksymbol'] = 0x03D2; - t['Upsilontonos'] = 0x038E; - t['Uring'] = 0x016E; - t['Ushortcyrillic'] = 0x040E; - t['Usmall'] = 0xF775; - t['Ustraightcyrillic'] = 0x04AE; - t['Ustraightstrokecyrillic'] = 0x04B0; - t['Utilde'] = 0x0168; - t['Utildeacute'] = 0x1E78; - t['Utildebelow'] = 0x1E74; - t['V'] = 0x0056; - t['Vcircle'] = 0x24CB; - t['Vdotbelow'] = 0x1E7E; - t['Vecyrillic'] = 0x0412; - t['Vewarmenian'] = 0x054E; - t['Vhook'] = 0x01B2; - t['Vmonospace'] = 0xFF36; - t['Voarmenian'] = 0x0548; - t['Vsmall'] = 0xF776; - t['Vtilde'] = 0x1E7C; - t['W'] = 0x0057; - t['Wacute'] = 0x1E82; - t['Wcircle'] = 0x24CC; - t['Wcircumflex'] = 0x0174; - t['Wdieresis'] = 0x1E84; - t['Wdotaccent'] = 0x1E86; - t['Wdotbelow'] = 0x1E88; - t['Wgrave'] = 0x1E80; - t['Wmonospace'] = 0xFF37; - t['Wsmall'] = 0xF777; - t['X'] = 0x0058; - t['Xcircle'] = 0x24CD; - t['Xdieresis'] = 0x1E8C; - t['Xdotaccent'] = 0x1E8A; - t['Xeharmenian'] = 0x053D; - t['Xi'] = 0x039E; - t['Xmonospace'] = 0xFF38; - t['Xsmall'] = 0xF778; - t['Y'] = 0x0059; - t['Yacute'] = 0x00DD; - t['Yacutesmall'] = 0xF7FD; - t['Yatcyrillic'] = 0x0462; - t['Ycircle'] = 0x24CE; - t['Ycircumflex'] = 0x0176; - t['Ydieresis'] = 0x0178; - t['Ydieresissmall'] = 0xF7FF; - t['Ydotaccent'] = 0x1E8E; - t['Ydotbelow'] = 0x1EF4; - t['Yericyrillic'] = 0x042B; - t['Yerudieresiscyrillic'] = 0x04F8; - t['Ygrave'] = 0x1EF2; - t['Yhook'] = 0x01B3; - t['Yhookabove'] = 0x1EF6; - t['Yiarmenian'] = 0x0545; - t['Yicyrillic'] = 0x0407; - t['Yiwnarmenian'] = 0x0552; - t['Ymonospace'] = 0xFF39; - t['Ysmall'] = 0xF779; - t['Ytilde'] = 0x1EF8; - t['Yusbigcyrillic'] = 0x046A; - t['Yusbigiotifiedcyrillic'] = 0x046C; - t['Yuslittlecyrillic'] = 0x0466; - t['Yuslittleiotifiedcyrillic'] = 0x0468; - t['Z'] = 0x005A; - t['Zaarmenian'] = 0x0536; - t['Zacute'] = 0x0179; - t['Zcaron'] = 0x017D; - t['Zcaronsmall'] = 0xF6FF; - t['Zcircle'] = 0x24CF; - t['Zcircumflex'] = 0x1E90; - t['Zdot'] = 0x017B; - t['Zdotaccent'] = 0x017B; - t['Zdotbelow'] = 0x1E92; - t['Zecyrillic'] = 0x0417; - t['Zedescendercyrillic'] = 0x0498; - t['Zedieresiscyrillic'] = 0x04DE; - t['Zeta'] = 0x0396; - t['Zhearmenian'] = 0x053A; - t['Zhebrevecyrillic'] = 0x04C1; - t['Zhecyrillic'] = 0x0416; - t['Zhedescendercyrillic'] = 0x0496; - t['Zhedieresiscyrillic'] = 0x04DC; - t['Zlinebelow'] = 0x1E94; - t['Zmonospace'] = 0xFF3A; - t['Zsmall'] = 0xF77A; - t['Zstroke'] = 0x01B5; - t['a'] = 0x0061; - t['aabengali'] = 0x0986; - t['aacute'] = 0x00E1; - t['aadeva'] = 0x0906; - t['aagujarati'] = 0x0A86; - t['aagurmukhi'] = 0x0A06; - t['aamatragurmukhi'] = 0x0A3E; - t['aarusquare'] = 0x3303; - t['aavowelsignbengali'] = 0x09BE; - t['aavowelsigndeva'] = 0x093E; - t['aavowelsigngujarati'] = 0x0ABE; - t['abbreviationmarkarmenian'] = 0x055F; - t['abbreviationsigndeva'] = 0x0970; - t['abengali'] = 0x0985; - t['abopomofo'] = 0x311A; - t['abreve'] = 0x0103; - t['abreveacute'] = 0x1EAF; - t['abrevecyrillic'] = 0x04D1; - t['abrevedotbelow'] = 0x1EB7; - t['abrevegrave'] = 0x1EB1; - t['abrevehookabove'] = 0x1EB3; - t['abrevetilde'] = 0x1EB5; - t['acaron'] = 0x01CE; - t['acircle'] = 0x24D0; - t['acircumflex'] = 0x00E2; - t['acircumflexacute'] = 0x1EA5; - t['acircumflexdotbelow'] = 0x1EAD; - t['acircumflexgrave'] = 0x1EA7; - t['acircumflexhookabove'] = 0x1EA9; - t['acircumflextilde'] = 0x1EAB; - t['acute'] = 0x00B4; - t['acutebelowcmb'] = 0x0317; - t['acutecmb'] = 0x0301; - t['acutecomb'] = 0x0301; - t['acutedeva'] = 0x0954; - t['acutelowmod'] = 0x02CF; - t['acutetonecmb'] = 0x0341; - t['acyrillic'] = 0x0430; - t['adblgrave'] = 0x0201; - t['addakgurmukhi'] = 0x0A71; - t['adeva'] = 0x0905; - t['adieresis'] = 0x00E4; - t['adieresiscyrillic'] = 0x04D3; - t['adieresismacron'] = 0x01DF; - t['adotbelow'] = 0x1EA1; - t['adotmacron'] = 0x01E1; - t['ae'] = 0x00E6; - t['aeacute'] = 0x01FD; - t['aekorean'] = 0x3150; - t['aemacron'] = 0x01E3; - t['afii00208'] = 0x2015; - t['afii08941'] = 0x20A4; - t['afii10017'] = 0x0410; - t['afii10018'] = 0x0411; - t['afii10019'] = 0x0412; - t['afii10020'] = 0x0413; - t['afii10021'] = 0x0414; - t['afii10022'] = 0x0415; - t['afii10023'] = 0x0401; - t['afii10024'] = 0x0416; - t['afii10025'] = 0x0417; - t['afii10026'] = 0x0418; - t['afii10027'] = 0x0419; - t['afii10028'] = 0x041A; - t['afii10029'] = 0x041B; - t['afii10030'] = 0x041C; - t['afii10031'] = 0x041D; - t['afii10032'] = 0x041E; - t['afii10033'] = 0x041F; - t['afii10034'] = 0x0420; - t['afii10035'] = 0x0421; - t['afii10036'] = 0x0422; - t['afii10037'] = 0x0423; - t['afii10038'] = 0x0424; - t['afii10039'] = 0x0425; - t['afii10040'] = 0x0426; - t['afii10041'] = 0x0427; - t['afii10042'] = 0x0428; - t['afii10043'] = 0x0429; - t['afii10044'] = 0x042A; - t['afii10045'] = 0x042B; - t['afii10046'] = 0x042C; - t['afii10047'] = 0x042D; - t['afii10048'] = 0x042E; - t['afii10049'] = 0x042F; - t['afii10050'] = 0x0490; - t['afii10051'] = 0x0402; - t['afii10052'] = 0x0403; - t['afii10053'] = 0x0404; - t['afii10054'] = 0x0405; - t['afii10055'] = 0x0406; - t['afii10056'] = 0x0407; - t['afii10057'] = 0x0408; - t['afii10058'] = 0x0409; - t['afii10059'] = 0x040A; - t['afii10060'] = 0x040B; - t['afii10061'] = 0x040C; - t['afii10062'] = 0x040E; - t['afii10063'] = 0xF6C4; - t['afii10064'] = 0xF6C5; - t['afii10065'] = 0x0430; - t['afii10066'] = 0x0431; - t['afii10067'] = 0x0432; - t['afii10068'] = 0x0433; - t['afii10069'] = 0x0434; - t['afii10070'] = 0x0435; - t['afii10071'] = 0x0451; - t['afii10072'] = 0x0436; - t['afii10073'] = 0x0437; - t['afii10074'] = 0x0438; - t['afii10075'] = 0x0439; - t['afii10076'] = 0x043A; - t['afii10077'] = 0x043B; - t['afii10078'] = 0x043C; - t['afii10079'] = 0x043D; - t['afii10080'] = 0x043E; - t['afii10081'] = 0x043F; - t['afii10082'] = 0x0440; - t['afii10083'] = 0x0441; - t['afii10084'] = 0x0442; - t['afii10085'] = 0x0443; - t['afii10086'] = 0x0444; - t['afii10087'] = 0x0445; - t['afii10088'] = 0x0446; - t['afii10089'] = 0x0447; - t['afii10090'] = 0x0448; - t['afii10091'] = 0x0449; - t['afii10092'] = 0x044A; - t['afii10093'] = 0x044B; - t['afii10094'] = 0x044C; - t['afii10095'] = 0x044D; - t['afii10096'] = 0x044E; - t['afii10097'] = 0x044F; - t['afii10098'] = 0x0491; - t['afii10099'] = 0x0452; - t['afii10100'] = 0x0453; - t['afii10101'] = 0x0454; - t['afii10102'] = 0x0455; - t['afii10103'] = 0x0456; - t['afii10104'] = 0x0457; - t['afii10105'] = 0x0458; - t['afii10106'] = 0x0459; - t['afii10107'] = 0x045A; - t['afii10108'] = 0x045B; - t['afii10109'] = 0x045C; - t['afii10110'] = 0x045E; - t['afii10145'] = 0x040F; - t['afii10146'] = 0x0462; - t['afii10147'] = 0x0472; - t['afii10148'] = 0x0474; - t['afii10192'] = 0xF6C6; - t['afii10193'] = 0x045F; - t['afii10194'] = 0x0463; - t['afii10195'] = 0x0473; - t['afii10196'] = 0x0475; - t['afii10831'] = 0xF6C7; - t['afii10832'] = 0xF6C8; - t['afii10846'] = 0x04D9; - t['afii299'] = 0x200E; - t['afii300'] = 0x200F; - t['afii301'] = 0x200D; - t['afii57381'] = 0x066A; - t['afii57388'] = 0x060C; - t['afii57392'] = 0x0660; - t['afii57393'] = 0x0661; - t['afii57394'] = 0x0662; - t['afii57395'] = 0x0663; - t['afii57396'] = 0x0664; - t['afii57397'] = 0x0665; - t['afii57398'] = 0x0666; - t['afii57399'] = 0x0667; - t['afii57400'] = 0x0668; - t['afii57401'] = 0x0669; - t['afii57403'] = 0x061B; - t['afii57407'] = 0x061F; - t['afii57409'] = 0x0621; - t['afii57410'] = 0x0622; - t['afii57411'] = 0x0623; - t['afii57412'] = 0x0624; - t['afii57413'] = 0x0625; - t['afii57414'] = 0x0626; - t['afii57415'] = 0x0627; - t['afii57416'] = 0x0628; - t['afii57417'] = 0x0629; - t['afii57418'] = 0x062A; - t['afii57419'] = 0x062B; - t['afii57420'] = 0x062C; - t['afii57421'] = 0x062D; - t['afii57422'] = 0x062E; - t['afii57423'] = 0x062F; - t['afii57424'] = 0x0630; - t['afii57425'] = 0x0631; - t['afii57426'] = 0x0632; - t['afii57427'] = 0x0633; - t['afii57428'] = 0x0634; - t['afii57429'] = 0x0635; - t['afii57430'] = 0x0636; - t['afii57431'] = 0x0637; - t['afii57432'] = 0x0638; - t['afii57433'] = 0x0639; - t['afii57434'] = 0x063A; - t['afii57440'] = 0x0640; - t['afii57441'] = 0x0641; - t['afii57442'] = 0x0642; - t['afii57443'] = 0x0643; - t['afii57444'] = 0x0644; - t['afii57445'] = 0x0645; - t['afii57446'] = 0x0646; - t['afii57448'] = 0x0648; - t['afii57449'] = 0x0649; - t['afii57450'] = 0x064A; - t['afii57451'] = 0x064B; - t['afii57452'] = 0x064C; - t['afii57453'] = 0x064D; - t['afii57454'] = 0x064E; - t['afii57455'] = 0x064F; - t['afii57456'] = 0x0650; - t['afii57457'] = 0x0651; - t['afii57458'] = 0x0652; - t['afii57470'] = 0x0647; - t['afii57505'] = 0x06A4; - t['afii57506'] = 0x067E; - t['afii57507'] = 0x0686; - t['afii57508'] = 0x0698; - t['afii57509'] = 0x06AF; - t['afii57511'] = 0x0679; - t['afii57512'] = 0x0688; - t['afii57513'] = 0x0691; - t['afii57514'] = 0x06BA; - t['afii57519'] = 0x06D2; - t['afii57534'] = 0x06D5; - t['afii57636'] = 0x20AA; - t['afii57645'] = 0x05BE; - t['afii57658'] = 0x05C3; - t['afii57664'] = 0x05D0; - t['afii57665'] = 0x05D1; - t['afii57666'] = 0x05D2; - t['afii57667'] = 0x05D3; - t['afii57668'] = 0x05D4; - t['afii57669'] = 0x05D5; - t['afii57670'] = 0x05D6; - t['afii57671'] = 0x05D7; - t['afii57672'] = 0x05D8; - t['afii57673'] = 0x05D9; - t['afii57674'] = 0x05DA; - t['afii57675'] = 0x05DB; - t['afii57676'] = 0x05DC; - t['afii57677'] = 0x05DD; - t['afii57678'] = 0x05DE; - t['afii57679'] = 0x05DF; - t['afii57680'] = 0x05E0; - t['afii57681'] = 0x05E1; - t['afii57682'] = 0x05E2; - t['afii57683'] = 0x05E3; - t['afii57684'] = 0x05E4; - t['afii57685'] = 0x05E5; - t['afii57686'] = 0x05E6; - t['afii57687'] = 0x05E7; - t['afii57688'] = 0x05E8; - t['afii57689'] = 0x05E9; - t['afii57690'] = 0x05EA; - t['afii57694'] = 0xFB2A; - t['afii57695'] = 0xFB2B; - t['afii57700'] = 0xFB4B; - t['afii57705'] = 0xFB1F; - t['afii57716'] = 0x05F0; - t['afii57717'] = 0x05F1; - t['afii57718'] = 0x05F2; - t['afii57723'] = 0xFB35; - t['afii57793'] = 0x05B4; - t['afii57794'] = 0x05B5; - t['afii57795'] = 0x05B6; - t['afii57796'] = 0x05BB; - t['afii57797'] = 0x05B8; - t['afii57798'] = 0x05B7; - t['afii57799'] = 0x05B0; - t['afii57800'] = 0x05B2; - t['afii57801'] = 0x05B1; - t['afii57802'] = 0x05B3; - t['afii57803'] = 0x05C2; - t['afii57804'] = 0x05C1; - t['afii57806'] = 0x05B9; - t['afii57807'] = 0x05BC; - t['afii57839'] = 0x05BD; - t['afii57841'] = 0x05BF; - t['afii57842'] = 0x05C0; - t['afii57929'] = 0x02BC; - t['afii61248'] = 0x2105; - t['afii61289'] = 0x2113; - t['afii61352'] = 0x2116; - t['afii61573'] = 0x202C; - t['afii61574'] = 0x202D; - t['afii61575'] = 0x202E; - t['afii61664'] = 0x200C; - t['afii63167'] = 0x066D; - t['afii64937'] = 0x02BD; - t['agrave'] = 0x00E0; - t['agujarati'] = 0x0A85; - t['agurmukhi'] = 0x0A05; - t['ahiragana'] = 0x3042; - t['ahookabove'] = 0x1EA3; - t['aibengali'] = 0x0990; - t['aibopomofo'] = 0x311E; - t['aideva'] = 0x0910; - t['aiecyrillic'] = 0x04D5; - t['aigujarati'] = 0x0A90; - t['aigurmukhi'] = 0x0A10; - t['aimatragurmukhi'] = 0x0A48; - t['ainarabic'] = 0x0639; - t['ainfinalarabic'] = 0xFECA; - t['aininitialarabic'] = 0xFECB; - t['ainmedialarabic'] = 0xFECC; - t['ainvertedbreve'] = 0x0203; - t['aivowelsignbengali'] = 0x09C8; - t['aivowelsigndeva'] = 0x0948; - t['aivowelsigngujarati'] = 0x0AC8; - t['akatakana'] = 0x30A2; - t['akatakanahalfwidth'] = 0xFF71; - t['akorean'] = 0x314F; - t['alef'] = 0x05D0; - t['alefarabic'] = 0x0627; - t['alefdageshhebrew'] = 0xFB30; - t['aleffinalarabic'] = 0xFE8E; - t['alefhamzaabovearabic'] = 0x0623; - t['alefhamzaabovefinalarabic'] = 0xFE84; - t['alefhamzabelowarabic'] = 0x0625; - t['alefhamzabelowfinalarabic'] = 0xFE88; - t['alefhebrew'] = 0x05D0; - t['aleflamedhebrew'] = 0xFB4F; - t['alefmaddaabovearabic'] = 0x0622; - t['alefmaddaabovefinalarabic'] = 0xFE82; - t['alefmaksuraarabic'] = 0x0649; - t['alefmaksurafinalarabic'] = 0xFEF0; - t['alefmaksurainitialarabic'] = 0xFEF3; - t['alefmaksuramedialarabic'] = 0xFEF4; - t['alefpatahhebrew'] = 0xFB2E; - t['alefqamatshebrew'] = 0xFB2F; - t['aleph'] = 0x2135; - t['allequal'] = 0x224C; - t['alpha'] = 0x03B1; - t['alphatonos'] = 0x03AC; - t['amacron'] = 0x0101; - t['amonospace'] = 0xFF41; - t['ampersand'] = 0x0026; - t['ampersandmonospace'] = 0xFF06; - t['ampersandsmall'] = 0xF726; - t['amsquare'] = 0x33C2; - t['anbopomofo'] = 0x3122; - t['angbopomofo'] = 0x3124; - t['angbracketleft'] = 0x3008; - t['angbracketright'] = 0x3009; - t['angkhankhuthai'] = 0x0E5A; - t['angle'] = 0x2220; - t['anglebracketleft'] = 0x3008; - t['anglebracketleftvertical'] = 0xFE3F; - t['anglebracketright'] = 0x3009; - t['anglebracketrightvertical'] = 0xFE40; - t['angleleft'] = 0x2329; - t['angleright'] = 0x232A; - t['angstrom'] = 0x212B; - t['anoteleia'] = 0x0387; - t['anudattadeva'] = 0x0952; - t['anusvarabengali'] = 0x0982; - t['anusvaradeva'] = 0x0902; - t['anusvaragujarati'] = 0x0A82; - t['aogonek'] = 0x0105; - t['apaatosquare'] = 0x3300; - t['aparen'] = 0x249C; - t['apostrophearmenian'] = 0x055A; - t['apostrophemod'] = 0x02BC; - t['apple'] = 0xF8FF; - t['approaches'] = 0x2250; - t['approxequal'] = 0x2248; - t['approxequalorimage'] = 0x2252; - t['approximatelyequal'] = 0x2245; - t['araeaekorean'] = 0x318E; - t['araeakorean'] = 0x318D; - t['arc'] = 0x2312; - t['arighthalfring'] = 0x1E9A; - t['aring'] = 0x00E5; - t['aringacute'] = 0x01FB; - t['aringbelow'] = 0x1E01; - t['arrowboth'] = 0x2194; - t['arrowdashdown'] = 0x21E3; - t['arrowdashleft'] = 0x21E0; - t['arrowdashright'] = 0x21E2; - t['arrowdashup'] = 0x21E1; - t['arrowdblboth'] = 0x21D4; - t['arrowdbldown'] = 0x21D3; - t['arrowdblleft'] = 0x21D0; - t['arrowdblright'] = 0x21D2; - t['arrowdblup'] = 0x21D1; - t['arrowdown'] = 0x2193; - t['arrowdownleft'] = 0x2199; - t['arrowdownright'] = 0x2198; - t['arrowdownwhite'] = 0x21E9; - t['arrowheaddownmod'] = 0x02C5; - t['arrowheadleftmod'] = 0x02C2; - t['arrowheadrightmod'] = 0x02C3; - t['arrowheadupmod'] = 0x02C4; - t['arrowhorizex'] = 0xF8E7; - t['arrowleft'] = 0x2190; - t['arrowleftdbl'] = 0x21D0; - t['arrowleftdblstroke'] = 0x21CD; - t['arrowleftoverright'] = 0x21C6; - t['arrowleftwhite'] = 0x21E6; - t['arrowright'] = 0x2192; - t['arrowrightdblstroke'] = 0x21CF; - t['arrowrightheavy'] = 0x279E; - t['arrowrightoverleft'] = 0x21C4; - t['arrowrightwhite'] = 0x21E8; - t['arrowtableft'] = 0x21E4; - t['arrowtabright'] = 0x21E5; - t['arrowup'] = 0x2191; - t['arrowupdn'] = 0x2195; - t['arrowupdnbse'] = 0x21A8; - t['arrowupdownbase'] = 0x21A8; - t['arrowupleft'] = 0x2196; - t['arrowupleftofdown'] = 0x21C5; - t['arrowupright'] = 0x2197; - t['arrowupwhite'] = 0x21E7; - t['arrowvertex'] = 0xF8E6; - t['asciicircum'] = 0x005E; - t['asciicircummonospace'] = 0xFF3E; - t['asciitilde'] = 0x007E; - t['asciitildemonospace'] = 0xFF5E; - t['ascript'] = 0x0251; - t['ascriptturned'] = 0x0252; - t['asmallhiragana'] = 0x3041; - t['asmallkatakana'] = 0x30A1; - t['asmallkatakanahalfwidth'] = 0xFF67; - t['asterisk'] = 0x002A; - t['asteriskaltonearabic'] = 0x066D; - t['asteriskarabic'] = 0x066D; - t['asteriskmath'] = 0x2217; - t['asteriskmonospace'] = 0xFF0A; - t['asterisksmall'] = 0xFE61; - t['asterism'] = 0x2042; - t['asuperior'] = 0xF6E9; - t['asymptoticallyequal'] = 0x2243; - t['at'] = 0x0040; - t['atilde'] = 0x00E3; - t['atmonospace'] = 0xFF20; - t['atsmall'] = 0xFE6B; - t['aturned'] = 0x0250; - t['aubengali'] = 0x0994; - t['aubopomofo'] = 0x3120; - t['audeva'] = 0x0914; - t['augujarati'] = 0x0A94; - t['augurmukhi'] = 0x0A14; - t['aulengthmarkbengali'] = 0x09D7; - t['aumatragurmukhi'] = 0x0A4C; - t['auvowelsignbengali'] = 0x09CC; - t['auvowelsigndeva'] = 0x094C; - t['auvowelsigngujarati'] = 0x0ACC; - t['avagrahadeva'] = 0x093D; - t['aybarmenian'] = 0x0561; - t['ayin'] = 0x05E2; - t['ayinaltonehebrew'] = 0xFB20; - t['ayinhebrew'] = 0x05E2; - t['b'] = 0x0062; - t['babengali'] = 0x09AC; - t['backslash'] = 0x005C; - t['backslashmonospace'] = 0xFF3C; - t['badeva'] = 0x092C; - t['bagujarati'] = 0x0AAC; - t['bagurmukhi'] = 0x0A2C; - t['bahiragana'] = 0x3070; - t['bahtthai'] = 0x0E3F; - t['bakatakana'] = 0x30D0; - t['bar'] = 0x007C; - t['barmonospace'] = 0xFF5C; - t['bbopomofo'] = 0x3105; - t['bcircle'] = 0x24D1; - t['bdotaccent'] = 0x1E03; - t['bdotbelow'] = 0x1E05; - t['beamedsixteenthnotes'] = 0x266C; - t['because'] = 0x2235; - t['becyrillic'] = 0x0431; - t['beharabic'] = 0x0628; - t['behfinalarabic'] = 0xFE90; - t['behinitialarabic'] = 0xFE91; - t['behiragana'] = 0x3079; - t['behmedialarabic'] = 0xFE92; - t['behmeeminitialarabic'] = 0xFC9F; - t['behmeemisolatedarabic'] = 0xFC08; - t['behnoonfinalarabic'] = 0xFC6D; - t['bekatakana'] = 0x30D9; - t['benarmenian'] = 0x0562; - t['bet'] = 0x05D1; - t['beta'] = 0x03B2; - t['betasymbolgreek'] = 0x03D0; - t['betdagesh'] = 0xFB31; - t['betdageshhebrew'] = 0xFB31; - t['bethebrew'] = 0x05D1; - t['betrafehebrew'] = 0xFB4C; - t['bhabengali'] = 0x09AD; - t['bhadeva'] = 0x092D; - t['bhagujarati'] = 0x0AAD; - t['bhagurmukhi'] = 0x0A2D; - t['bhook'] = 0x0253; - t['bihiragana'] = 0x3073; - t['bikatakana'] = 0x30D3; - t['bilabialclick'] = 0x0298; - t['bindigurmukhi'] = 0x0A02; - t['birusquare'] = 0x3331; - t['blackcircle'] = 0x25CF; - t['blackdiamond'] = 0x25C6; - t['blackdownpointingtriangle'] = 0x25BC; - t['blackleftpointingpointer'] = 0x25C4; - t['blackleftpointingtriangle'] = 0x25C0; - t['blacklenticularbracketleft'] = 0x3010; - t['blacklenticularbracketleftvertical'] = 0xFE3B; - t['blacklenticularbracketright'] = 0x3011; - t['blacklenticularbracketrightvertical'] = 0xFE3C; - t['blacklowerlefttriangle'] = 0x25E3; - t['blacklowerrighttriangle'] = 0x25E2; - t['blackrectangle'] = 0x25AC; - t['blackrightpointingpointer'] = 0x25BA; - t['blackrightpointingtriangle'] = 0x25B6; - t['blacksmallsquare'] = 0x25AA; - t['blacksmilingface'] = 0x263B; - t['blacksquare'] = 0x25A0; - t['blackstar'] = 0x2605; - t['blackupperlefttriangle'] = 0x25E4; - t['blackupperrighttriangle'] = 0x25E5; - t['blackuppointingsmalltriangle'] = 0x25B4; - t['blackuppointingtriangle'] = 0x25B2; - t['blank'] = 0x2423; - t['blinebelow'] = 0x1E07; - t['block'] = 0x2588; - t['bmonospace'] = 0xFF42; - t['bobaimaithai'] = 0x0E1A; - t['bohiragana'] = 0x307C; - t['bokatakana'] = 0x30DC; - t['bparen'] = 0x249D; - t['bqsquare'] = 0x33C3; - t['braceex'] = 0xF8F4; - t['braceleft'] = 0x007B; - t['braceleftbt'] = 0xF8F3; - t['braceleftmid'] = 0xF8F2; - t['braceleftmonospace'] = 0xFF5B; - t['braceleftsmall'] = 0xFE5B; - t['bracelefttp'] = 0xF8F1; - t['braceleftvertical'] = 0xFE37; - t['braceright'] = 0x007D; - t['bracerightbt'] = 0xF8FE; - t['bracerightmid'] = 0xF8FD; - t['bracerightmonospace'] = 0xFF5D; - t['bracerightsmall'] = 0xFE5C; - t['bracerighttp'] = 0xF8FC; - t['bracerightvertical'] = 0xFE38; - t['bracketleft'] = 0x005B; - t['bracketleftbt'] = 0xF8F0; - t['bracketleftex'] = 0xF8EF; - t['bracketleftmonospace'] = 0xFF3B; - t['bracketlefttp'] = 0xF8EE; - t['bracketright'] = 0x005D; - t['bracketrightbt'] = 0xF8FB; - t['bracketrightex'] = 0xF8FA; - t['bracketrightmonospace'] = 0xFF3D; - t['bracketrighttp'] = 0xF8F9; - t['breve'] = 0x02D8; - t['brevebelowcmb'] = 0x032E; - t['brevecmb'] = 0x0306; - t['breveinvertedbelowcmb'] = 0x032F; - t['breveinvertedcmb'] = 0x0311; - t['breveinverteddoublecmb'] = 0x0361; - t['bridgebelowcmb'] = 0x032A; - t['bridgeinvertedbelowcmb'] = 0x033A; - t['brokenbar'] = 0x00A6; - t['bstroke'] = 0x0180; - t['bsuperior'] = 0xF6EA; - t['btopbar'] = 0x0183; - t['buhiragana'] = 0x3076; - t['bukatakana'] = 0x30D6; - t['bullet'] = 0x2022; - t['bulletinverse'] = 0x25D8; - t['bulletoperator'] = 0x2219; - t['bullseye'] = 0x25CE; - t['c'] = 0x0063; - t['caarmenian'] = 0x056E; - t['cabengali'] = 0x099A; - t['cacute'] = 0x0107; - t['cadeva'] = 0x091A; - t['cagujarati'] = 0x0A9A; - t['cagurmukhi'] = 0x0A1A; - t['calsquare'] = 0x3388; - t['candrabindubengali'] = 0x0981; - t['candrabinducmb'] = 0x0310; - t['candrabindudeva'] = 0x0901; - t['candrabindugujarati'] = 0x0A81; - t['capslock'] = 0x21EA; - t['careof'] = 0x2105; - t['caron'] = 0x02C7; - t['caronbelowcmb'] = 0x032C; - t['caroncmb'] = 0x030C; - t['carriagereturn'] = 0x21B5; - t['cbopomofo'] = 0x3118; - t['ccaron'] = 0x010D; - t['ccedilla'] = 0x00E7; - t['ccedillaacute'] = 0x1E09; - t['ccircle'] = 0x24D2; - t['ccircumflex'] = 0x0109; - t['ccurl'] = 0x0255; - t['cdot'] = 0x010B; - t['cdotaccent'] = 0x010B; - t['cdsquare'] = 0x33C5; - t['cedilla'] = 0x00B8; - t['cedillacmb'] = 0x0327; - t['cent'] = 0x00A2; - t['centigrade'] = 0x2103; - t['centinferior'] = 0xF6DF; - t['centmonospace'] = 0xFFE0; - t['centoldstyle'] = 0xF7A2; - t['centsuperior'] = 0xF6E0; - t['chaarmenian'] = 0x0579; - t['chabengali'] = 0x099B; - t['chadeva'] = 0x091B; - t['chagujarati'] = 0x0A9B; - t['chagurmukhi'] = 0x0A1B; - t['chbopomofo'] = 0x3114; - t['cheabkhasiancyrillic'] = 0x04BD; - t['checkmark'] = 0x2713; - t['checyrillic'] = 0x0447; - t['chedescenderabkhasiancyrillic'] = 0x04BF; - t['chedescendercyrillic'] = 0x04B7; - t['chedieresiscyrillic'] = 0x04F5; - t['cheharmenian'] = 0x0573; - t['chekhakassiancyrillic'] = 0x04CC; - t['cheverticalstrokecyrillic'] = 0x04B9; - t['chi'] = 0x03C7; - t['chieuchacirclekorean'] = 0x3277; - t['chieuchaparenkorean'] = 0x3217; - t['chieuchcirclekorean'] = 0x3269; - t['chieuchkorean'] = 0x314A; - t['chieuchparenkorean'] = 0x3209; - t['chochangthai'] = 0x0E0A; - t['chochanthai'] = 0x0E08; - t['chochingthai'] = 0x0E09; - t['chochoethai'] = 0x0E0C; - t['chook'] = 0x0188; - t['cieucacirclekorean'] = 0x3276; - t['cieucaparenkorean'] = 0x3216; - t['cieuccirclekorean'] = 0x3268; - t['cieuckorean'] = 0x3148; - t['cieucparenkorean'] = 0x3208; - t['cieucuparenkorean'] = 0x321C; - t['circle'] = 0x25CB; - t['circlecopyrt'] = 0x00A9; - t['circlemultiply'] = 0x2297; - t['circleot'] = 0x2299; - t['circleplus'] = 0x2295; - t['circlepostalmark'] = 0x3036; - t['circlewithlefthalfblack'] = 0x25D0; - t['circlewithrighthalfblack'] = 0x25D1; - t['circumflex'] = 0x02C6; - t['circumflexbelowcmb'] = 0x032D; - t['circumflexcmb'] = 0x0302; - t['clear'] = 0x2327; - t['clickalveolar'] = 0x01C2; - t['clickdental'] = 0x01C0; - t['clicklateral'] = 0x01C1; - t['clickretroflex'] = 0x01C3; - t['club'] = 0x2663; - t['clubsuitblack'] = 0x2663; - t['clubsuitwhite'] = 0x2667; - t['cmcubedsquare'] = 0x33A4; - t['cmonospace'] = 0xFF43; - t['cmsquaredsquare'] = 0x33A0; - t['coarmenian'] = 0x0581; - t['colon'] = 0x003A; - t['colonmonetary'] = 0x20A1; - t['colonmonospace'] = 0xFF1A; - t['colonsign'] = 0x20A1; - t['colonsmall'] = 0xFE55; - t['colontriangularhalfmod'] = 0x02D1; - t['colontriangularmod'] = 0x02D0; - t['comma'] = 0x002C; - t['commaabovecmb'] = 0x0313; - t['commaaboverightcmb'] = 0x0315; - t['commaaccent'] = 0xF6C3; - t['commaarabic'] = 0x060C; - t['commaarmenian'] = 0x055D; - t['commainferior'] = 0xF6E1; - t['commamonospace'] = 0xFF0C; - t['commareversedabovecmb'] = 0x0314; - t['commareversedmod'] = 0x02BD; - t['commasmall'] = 0xFE50; - t['commasuperior'] = 0xF6E2; - t['commaturnedabovecmb'] = 0x0312; - t['commaturnedmod'] = 0x02BB; - t['compass'] = 0x263C; - t['congruent'] = 0x2245; - t['contourintegral'] = 0x222E; - t['control'] = 0x2303; - t['controlACK'] = 0x0006; - t['controlBEL'] = 0x0007; - t['controlBS'] = 0x0008; - t['controlCAN'] = 0x0018; - t['controlCR'] = 0x000D; - t['controlDC1'] = 0x0011; - t['controlDC2'] = 0x0012; - t['controlDC3'] = 0x0013; - t['controlDC4'] = 0x0014; - t['controlDEL'] = 0x007F; - t['controlDLE'] = 0x0010; - t['controlEM'] = 0x0019; - t['controlENQ'] = 0x0005; - t['controlEOT'] = 0x0004; - t['controlESC'] = 0x001B; - t['controlETB'] = 0x0017; - t['controlETX'] = 0x0003; - t['controlFF'] = 0x000C; - t['controlFS'] = 0x001C; - t['controlGS'] = 0x001D; - t['controlHT'] = 0x0009; - t['controlLF'] = 0x000A; - t['controlNAK'] = 0x0015; - t['controlNULL'] = 0x0000; - t['controlRS'] = 0x001E; - t['controlSI'] = 0x000F; - t['controlSO'] = 0x000E; - t['controlSOT'] = 0x0002; - t['controlSTX'] = 0x0001; - t['controlSUB'] = 0x001A; - t['controlSYN'] = 0x0016; - t['controlUS'] = 0x001F; - t['controlVT'] = 0x000B; - t['copyright'] = 0x00A9; - t['copyrightsans'] = 0xF8E9; - t['copyrightserif'] = 0xF6D9; - t['cornerbracketleft'] = 0x300C; - t['cornerbracketlefthalfwidth'] = 0xFF62; - t['cornerbracketleftvertical'] = 0xFE41; - t['cornerbracketright'] = 0x300D; - t['cornerbracketrighthalfwidth'] = 0xFF63; - t['cornerbracketrightvertical'] = 0xFE42; - t['corporationsquare'] = 0x337F; - t['cosquare'] = 0x33C7; - t['coverkgsquare'] = 0x33C6; - t['cparen'] = 0x249E; - t['cruzeiro'] = 0x20A2; - t['cstretched'] = 0x0297; - t['curlyand'] = 0x22CF; - t['curlyor'] = 0x22CE; - t['currency'] = 0x00A4; - t['cyrBreve'] = 0xF6D1; - t['cyrFlex'] = 0xF6D2; - t['cyrbreve'] = 0xF6D4; - t['cyrflex'] = 0xF6D5; - t['d'] = 0x0064; - t['daarmenian'] = 0x0564; - t['dabengali'] = 0x09A6; - t['dadarabic'] = 0x0636; - t['dadeva'] = 0x0926; - t['dadfinalarabic'] = 0xFEBE; - t['dadinitialarabic'] = 0xFEBF; - t['dadmedialarabic'] = 0xFEC0; - t['dagesh'] = 0x05BC; - t['dageshhebrew'] = 0x05BC; - t['dagger'] = 0x2020; - t['daggerdbl'] = 0x2021; - t['dagujarati'] = 0x0AA6; - t['dagurmukhi'] = 0x0A26; - t['dahiragana'] = 0x3060; - t['dakatakana'] = 0x30C0; - t['dalarabic'] = 0x062F; - t['dalet'] = 0x05D3; - t['daletdagesh'] = 0xFB33; - t['daletdageshhebrew'] = 0xFB33; - t['dalethebrew'] = 0x05D3; - t['dalfinalarabic'] = 0xFEAA; - t['dammaarabic'] = 0x064F; - t['dammalowarabic'] = 0x064F; - t['dammatanaltonearabic'] = 0x064C; - t['dammatanarabic'] = 0x064C; - t['danda'] = 0x0964; - t['dargahebrew'] = 0x05A7; - t['dargalefthebrew'] = 0x05A7; - t['dasiapneumatacyrilliccmb'] = 0x0485; - t['dblGrave'] = 0xF6D3; - t['dblanglebracketleft'] = 0x300A; - t['dblanglebracketleftvertical'] = 0xFE3D; - t['dblanglebracketright'] = 0x300B; - t['dblanglebracketrightvertical'] = 0xFE3E; - t['dblarchinvertedbelowcmb'] = 0x032B; - t['dblarrowleft'] = 0x21D4; - t['dblarrowright'] = 0x21D2; - t['dbldanda'] = 0x0965; - t['dblgrave'] = 0xF6D6; - t['dblgravecmb'] = 0x030F; - t['dblintegral'] = 0x222C; - t['dbllowline'] = 0x2017; - t['dbllowlinecmb'] = 0x0333; - t['dbloverlinecmb'] = 0x033F; - t['dblprimemod'] = 0x02BA; - t['dblverticalbar'] = 0x2016; - t['dblverticallineabovecmb'] = 0x030E; - t['dbopomofo'] = 0x3109; - t['dbsquare'] = 0x33C8; - t['dcaron'] = 0x010F; - t['dcedilla'] = 0x1E11; - t['dcircle'] = 0x24D3; - t['dcircumflexbelow'] = 0x1E13; - t['dcroat'] = 0x0111; - t['ddabengali'] = 0x09A1; - t['ddadeva'] = 0x0921; - t['ddagujarati'] = 0x0AA1; - t['ddagurmukhi'] = 0x0A21; - t['ddalarabic'] = 0x0688; - t['ddalfinalarabic'] = 0xFB89; - t['dddhadeva'] = 0x095C; - t['ddhabengali'] = 0x09A2; - t['ddhadeva'] = 0x0922; - t['ddhagujarati'] = 0x0AA2; - t['ddhagurmukhi'] = 0x0A22; - t['ddotaccent'] = 0x1E0B; - t['ddotbelow'] = 0x1E0D; - t['decimalseparatorarabic'] = 0x066B; - t['decimalseparatorpersian'] = 0x066B; - t['decyrillic'] = 0x0434; - t['degree'] = 0x00B0; - t['dehihebrew'] = 0x05AD; - t['dehiragana'] = 0x3067; - t['deicoptic'] = 0x03EF; - t['dekatakana'] = 0x30C7; - t['deleteleft'] = 0x232B; - t['deleteright'] = 0x2326; - t['delta'] = 0x03B4; - t['deltaturned'] = 0x018D; - t['denominatorminusonenumeratorbengali'] = 0x09F8; - t['dezh'] = 0x02A4; - t['dhabengali'] = 0x09A7; - t['dhadeva'] = 0x0927; - t['dhagujarati'] = 0x0AA7; - t['dhagurmukhi'] = 0x0A27; - t['dhook'] = 0x0257; - t['dialytikatonos'] = 0x0385; - t['dialytikatonoscmb'] = 0x0344; - t['diamond'] = 0x2666; - t['diamondsuitwhite'] = 0x2662; - t['dieresis'] = 0x00A8; - t['dieresisacute'] = 0xF6D7; - t['dieresisbelowcmb'] = 0x0324; - t['dieresiscmb'] = 0x0308; - t['dieresisgrave'] = 0xF6D8; - t['dieresistonos'] = 0x0385; - t['dihiragana'] = 0x3062; - t['dikatakana'] = 0x30C2; - t['dittomark'] = 0x3003; - t['divide'] = 0x00F7; - t['divides'] = 0x2223; - t['divisionslash'] = 0x2215; - t['djecyrillic'] = 0x0452; - t['dkshade'] = 0x2593; - t['dlinebelow'] = 0x1E0F; - t['dlsquare'] = 0x3397; - t['dmacron'] = 0x0111; - t['dmonospace'] = 0xFF44; - t['dnblock'] = 0x2584; - t['dochadathai'] = 0x0E0E; - t['dodekthai'] = 0x0E14; - t['dohiragana'] = 0x3069; - t['dokatakana'] = 0x30C9; - t['dollar'] = 0x0024; - t['dollarinferior'] = 0xF6E3; - t['dollarmonospace'] = 0xFF04; - t['dollaroldstyle'] = 0xF724; - t['dollarsmall'] = 0xFE69; - t['dollarsuperior'] = 0xF6E4; - t['dong'] = 0x20AB; - t['dorusquare'] = 0x3326; - t['dotaccent'] = 0x02D9; - t['dotaccentcmb'] = 0x0307; - t['dotbelowcmb'] = 0x0323; - t['dotbelowcomb'] = 0x0323; - t['dotkatakana'] = 0x30FB; - t['dotlessi'] = 0x0131; - t['dotlessj'] = 0xF6BE; - t['dotlessjstrokehook'] = 0x0284; - t['dotmath'] = 0x22C5; - t['dottedcircle'] = 0x25CC; - t['doubleyodpatah'] = 0xFB1F; - t['doubleyodpatahhebrew'] = 0xFB1F; - t['downtackbelowcmb'] = 0x031E; - t['downtackmod'] = 0x02D5; - t['dparen'] = 0x249F; - t['dsuperior'] = 0xF6EB; - t['dtail'] = 0x0256; - t['dtopbar'] = 0x018C; - t['duhiragana'] = 0x3065; - t['dukatakana'] = 0x30C5; - t['dz'] = 0x01F3; - t['dzaltone'] = 0x02A3; - t['dzcaron'] = 0x01C6; - t['dzcurl'] = 0x02A5; - t['dzeabkhasiancyrillic'] = 0x04E1; - t['dzecyrillic'] = 0x0455; - t['dzhecyrillic'] = 0x045F; - t['e'] = 0x0065; - t['eacute'] = 0x00E9; - t['earth'] = 0x2641; - t['ebengali'] = 0x098F; - t['ebopomofo'] = 0x311C; - t['ebreve'] = 0x0115; - t['ecandradeva'] = 0x090D; - t['ecandragujarati'] = 0x0A8D; - t['ecandravowelsigndeva'] = 0x0945; - t['ecandravowelsigngujarati'] = 0x0AC5; - t['ecaron'] = 0x011B; - t['ecedillabreve'] = 0x1E1D; - t['echarmenian'] = 0x0565; - t['echyiwnarmenian'] = 0x0587; - t['ecircle'] = 0x24D4; - t['ecircumflex'] = 0x00EA; - t['ecircumflexacute'] = 0x1EBF; - t['ecircumflexbelow'] = 0x1E19; - t['ecircumflexdotbelow'] = 0x1EC7; - t['ecircumflexgrave'] = 0x1EC1; - t['ecircumflexhookabove'] = 0x1EC3; - t['ecircumflextilde'] = 0x1EC5; - t['ecyrillic'] = 0x0454; - t['edblgrave'] = 0x0205; - t['edeva'] = 0x090F; - t['edieresis'] = 0x00EB; - t['edot'] = 0x0117; - t['edotaccent'] = 0x0117; - t['edotbelow'] = 0x1EB9; - t['eegurmukhi'] = 0x0A0F; - t['eematragurmukhi'] = 0x0A47; - t['efcyrillic'] = 0x0444; - t['egrave'] = 0x00E8; - t['egujarati'] = 0x0A8F; - t['eharmenian'] = 0x0567; - t['ehbopomofo'] = 0x311D; - t['ehiragana'] = 0x3048; - t['ehookabove'] = 0x1EBB; - t['eibopomofo'] = 0x311F; - t['eight'] = 0x0038; - t['eightarabic'] = 0x0668; - t['eightbengali'] = 0x09EE; - t['eightcircle'] = 0x2467; - t['eightcircleinversesansserif'] = 0x2791; - t['eightdeva'] = 0x096E; - t['eighteencircle'] = 0x2471; - t['eighteenparen'] = 0x2485; - t['eighteenperiod'] = 0x2499; - t['eightgujarati'] = 0x0AEE; - t['eightgurmukhi'] = 0x0A6E; - t['eighthackarabic'] = 0x0668; - t['eighthangzhou'] = 0x3028; - t['eighthnotebeamed'] = 0x266B; - t['eightideographicparen'] = 0x3227; - t['eightinferior'] = 0x2088; - t['eightmonospace'] = 0xFF18; - t['eightoldstyle'] = 0xF738; - t['eightparen'] = 0x247B; - t['eightperiod'] = 0x248F; - t['eightpersian'] = 0x06F8; - t['eightroman'] = 0x2177; - t['eightsuperior'] = 0x2078; - t['eightthai'] = 0x0E58; - t['einvertedbreve'] = 0x0207; - t['eiotifiedcyrillic'] = 0x0465; - t['ekatakana'] = 0x30A8; - t['ekatakanahalfwidth'] = 0xFF74; - t['ekonkargurmukhi'] = 0x0A74; - t['ekorean'] = 0x3154; - t['elcyrillic'] = 0x043B; - t['element'] = 0x2208; - t['elevencircle'] = 0x246A; - t['elevenparen'] = 0x247E; - t['elevenperiod'] = 0x2492; - t['elevenroman'] = 0x217A; - t['ellipsis'] = 0x2026; - t['ellipsisvertical'] = 0x22EE; - t['emacron'] = 0x0113; - t['emacronacute'] = 0x1E17; - t['emacrongrave'] = 0x1E15; - t['emcyrillic'] = 0x043C; - t['emdash'] = 0x2014; - t['emdashvertical'] = 0xFE31; - t['emonospace'] = 0xFF45; - t['emphasismarkarmenian'] = 0x055B; - t['emptyset'] = 0x2205; - t['enbopomofo'] = 0x3123; - t['encyrillic'] = 0x043D; - t['endash'] = 0x2013; - t['endashvertical'] = 0xFE32; - t['endescendercyrillic'] = 0x04A3; - t['eng'] = 0x014B; - t['engbopomofo'] = 0x3125; - t['enghecyrillic'] = 0x04A5; - t['enhookcyrillic'] = 0x04C8; - t['enspace'] = 0x2002; - t['eogonek'] = 0x0119; - t['eokorean'] = 0x3153; - t['eopen'] = 0x025B; - t['eopenclosed'] = 0x029A; - t['eopenreversed'] = 0x025C; - t['eopenreversedclosed'] = 0x025E; - t['eopenreversedhook'] = 0x025D; - t['eparen'] = 0x24A0; - t['epsilon'] = 0x03B5; - t['epsilontonos'] = 0x03AD; - t['equal'] = 0x003D; - t['equalmonospace'] = 0xFF1D; - t['equalsmall'] = 0xFE66; - t['equalsuperior'] = 0x207C; - t['equivalence'] = 0x2261; - t['erbopomofo'] = 0x3126; - t['ercyrillic'] = 0x0440; - t['ereversed'] = 0x0258; - t['ereversedcyrillic'] = 0x044D; - t['escyrillic'] = 0x0441; - t['esdescendercyrillic'] = 0x04AB; - t['esh'] = 0x0283; - t['eshcurl'] = 0x0286; - t['eshortdeva'] = 0x090E; - t['eshortvowelsigndeva'] = 0x0946; - t['eshreversedloop'] = 0x01AA; - t['eshsquatreversed'] = 0x0285; - t['esmallhiragana'] = 0x3047; - t['esmallkatakana'] = 0x30A7; - t['esmallkatakanahalfwidth'] = 0xFF6A; - t['estimated'] = 0x212E; - t['esuperior'] = 0xF6EC; - t['eta'] = 0x03B7; - t['etarmenian'] = 0x0568; - t['etatonos'] = 0x03AE; - t['eth'] = 0x00F0; - t['etilde'] = 0x1EBD; - t['etildebelow'] = 0x1E1B; - t['etnahtafoukhhebrew'] = 0x0591; - t['etnahtafoukhlefthebrew'] = 0x0591; - t['etnahtahebrew'] = 0x0591; - t['etnahtalefthebrew'] = 0x0591; - t['eturned'] = 0x01DD; - t['eukorean'] = 0x3161; - t['euro'] = 0x20AC; - t['evowelsignbengali'] = 0x09C7; - t['evowelsigndeva'] = 0x0947; - t['evowelsigngujarati'] = 0x0AC7; - t['exclam'] = 0x0021; - t['exclamarmenian'] = 0x055C; - t['exclamdbl'] = 0x203C; - t['exclamdown'] = 0x00A1; - t['exclamdownsmall'] = 0xF7A1; - t['exclammonospace'] = 0xFF01; - t['exclamsmall'] = 0xF721; - t['existential'] = 0x2203; - t['ezh'] = 0x0292; - t['ezhcaron'] = 0x01EF; - t['ezhcurl'] = 0x0293; - t['ezhreversed'] = 0x01B9; - t['ezhtail'] = 0x01BA; - t['f'] = 0x0066; - t['fadeva'] = 0x095E; - t['fagurmukhi'] = 0x0A5E; - t['fahrenheit'] = 0x2109; - t['fathaarabic'] = 0x064E; - t['fathalowarabic'] = 0x064E; - t['fathatanarabic'] = 0x064B; - t['fbopomofo'] = 0x3108; - t['fcircle'] = 0x24D5; - t['fdotaccent'] = 0x1E1F; - t['feharabic'] = 0x0641; - t['feharmenian'] = 0x0586; - t['fehfinalarabic'] = 0xFED2; - t['fehinitialarabic'] = 0xFED3; - t['fehmedialarabic'] = 0xFED4; - t['feicoptic'] = 0x03E5; - t['female'] = 0x2640; - t['ff'] = 0xFB00; - t['ffi'] = 0xFB03; - t['ffl'] = 0xFB04; - t['fi'] = 0xFB01; - t['fifteencircle'] = 0x246E; - t['fifteenparen'] = 0x2482; - t['fifteenperiod'] = 0x2496; - t['figuredash'] = 0x2012; - t['filledbox'] = 0x25A0; - t['filledrect'] = 0x25AC; - t['finalkaf'] = 0x05DA; - t['finalkafdagesh'] = 0xFB3A; - t['finalkafdageshhebrew'] = 0xFB3A; - t['finalkafhebrew'] = 0x05DA; - t['finalmem'] = 0x05DD; - t['finalmemhebrew'] = 0x05DD; - t['finalnun'] = 0x05DF; - t['finalnunhebrew'] = 0x05DF; - t['finalpe'] = 0x05E3; - t['finalpehebrew'] = 0x05E3; - t['finaltsadi'] = 0x05E5; - t['finaltsadihebrew'] = 0x05E5; - t['firsttonechinese'] = 0x02C9; - t['fisheye'] = 0x25C9; - t['fitacyrillic'] = 0x0473; - t['five'] = 0x0035; - t['fivearabic'] = 0x0665; - t['fivebengali'] = 0x09EB; - t['fivecircle'] = 0x2464; - t['fivecircleinversesansserif'] = 0x278E; - t['fivedeva'] = 0x096B; - t['fiveeighths'] = 0x215D; - t['fivegujarati'] = 0x0AEB; - t['fivegurmukhi'] = 0x0A6B; - t['fivehackarabic'] = 0x0665; - t['fivehangzhou'] = 0x3025; - t['fiveideographicparen'] = 0x3224; - t['fiveinferior'] = 0x2085; - t['fivemonospace'] = 0xFF15; - t['fiveoldstyle'] = 0xF735; - t['fiveparen'] = 0x2478; - t['fiveperiod'] = 0x248C; - t['fivepersian'] = 0x06F5; - t['fiveroman'] = 0x2174; - t['fivesuperior'] = 0x2075; - t['fivethai'] = 0x0E55; - t['fl'] = 0xFB02; - t['florin'] = 0x0192; - t['fmonospace'] = 0xFF46; - t['fmsquare'] = 0x3399; - t['fofanthai'] = 0x0E1F; - t['fofathai'] = 0x0E1D; - t['fongmanthai'] = 0x0E4F; - t['forall'] = 0x2200; - t['four'] = 0x0034; - t['fourarabic'] = 0x0664; - t['fourbengali'] = 0x09EA; - t['fourcircle'] = 0x2463; - t['fourcircleinversesansserif'] = 0x278D; - t['fourdeva'] = 0x096A; - t['fourgujarati'] = 0x0AEA; - t['fourgurmukhi'] = 0x0A6A; - t['fourhackarabic'] = 0x0664; - t['fourhangzhou'] = 0x3024; - t['fourideographicparen'] = 0x3223; - t['fourinferior'] = 0x2084; - t['fourmonospace'] = 0xFF14; - t['fournumeratorbengali'] = 0x09F7; - t['fouroldstyle'] = 0xF734; - t['fourparen'] = 0x2477; - t['fourperiod'] = 0x248B; - t['fourpersian'] = 0x06F4; - t['fourroman'] = 0x2173; - t['foursuperior'] = 0x2074; - t['fourteencircle'] = 0x246D; - t['fourteenparen'] = 0x2481; - t['fourteenperiod'] = 0x2495; - t['fourthai'] = 0x0E54; - t['fourthtonechinese'] = 0x02CB; - t['fparen'] = 0x24A1; - t['fraction'] = 0x2044; - t['franc'] = 0x20A3; - t['g'] = 0x0067; - t['gabengali'] = 0x0997; - t['gacute'] = 0x01F5; - t['gadeva'] = 0x0917; - t['gafarabic'] = 0x06AF; - t['gaffinalarabic'] = 0xFB93; - t['gafinitialarabic'] = 0xFB94; - t['gafmedialarabic'] = 0xFB95; - t['gagujarati'] = 0x0A97; - t['gagurmukhi'] = 0x0A17; - t['gahiragana'] = 0x304C; - t['gakatakana'] = 0x30AC; - t['gamma'] = 0x03B3; - t['gammalatinsmall'] = 0x0263; - t['gammasuperior'] = 0x02E0; - t['gangiacoptic'] = 0x03EB; - t['gbopomofo'] = 0x310D; - t['gbreve'] = 0x011F; - t['gcaron'] = 0x01E7; - t['gcedilla'] = 0x0123; - t['gcircle'] = 0x24D6; - t['gcircumflex'] = 0x011D; - t['gcommaaccent'] = 0x0123; - t['gdot'] = 0x0121; - t['gdotaccent'] = 0x0121; - t['gecyrillic'] = 0x0433; - t['gehiragana'] = 0x3052; - t['gekatakana'] = 0x30B2; - t['geometricallyequal'] = 0x2251; - t['gereshaccenthebrew'] = 0x059C; - t['gereshhebrew'] = 0x05F3; - t['gereshmuqdamhebrew'] = 0x059D; - t['germandbls'] = 0x00DF; - t['gershayimaccenthebrew'] = 0x059E; - t['gershayimhebrew'] = 0x05F4; - t['getamark'] = 0x3013; - t['ghabengali'] = 0x0998; - t['ghadarmenian'] = 0x0572; - t['ghadeva'] = 0x0918; - t['ghagujarati'] = 0x0A98; - t['ghagurmukhi'] = 0x0A18; - t['ghainarabic'] = 0x063A; - t['ghainfinalarabic'] = 0xFECE; - t['ghaininitialarabic'] = 0xFECF; - t['ghainmedialarabic'] = 0xFED0; - t['ghemiddlehookcyrillic'] = 0x0495; - t['ghestrokecyrillic'] = 0x0493; - t['gheupturncyrillic'] = 0x0491; - t['ghhadeva'] = 0x095A; - t['ghhagurmukhi'] = 0x0A5A; - t['ghook'] = 0x0260; - t['ghzsquare'] = 0x3393; - t['gihiragana'] = 0x304E; - t['gikatakana'] = 0x30AE; - t['gimarmenian'] = 0x0563; - t['gimel'] = 0x05D2; - t['gimeldagesh'] = 0xFB32; - t['gimeldageshhebrew'] = 0xFB32; - t['gimelhebrew'] = 0x05D2; - t['gjecyrillic'] = 0x0453; - t['glottalinvertedstroke'] = 0x01BE; - t['glottalstop'] = 0x0294; - t['glottalstopinverted'] = 0x0296; - t['glottalstopmod'] = 0x02C0; - t['glottalstopreversed'] = 0x0295; - t['glottalstopreversedmod'] = 0x02C1; - t['glottalstopreversedsuperior'] = 0x02E4; - t['glottalstopstroke'] = 0x02A1; - t['glottalstopstrokereversed'] = 0x02A2; - t['gmacron'] = 0x1E21; - t['gmonospace'] = 0xFF47; - t['gohiragana'] = 0x3054; - t['gokatakana'] = 0x30B4; - t['gparen'] = 0x24A2; - t['gpasquare'] = 0x33AC; - t['gradient'] = 0x2207; - t['grave'] = 0x0060; - t['gravebelowcmb'] = 0x0316; - t['gravecmb'] = 0x0300; - t['gravecomb'] = 0x0300; - t['gravedeva'] = 0x0953; - t['gravelowmod'] = 0x02CE; - t['gravemonospace'] = 0xFF40; - t['gravetonecmb'] = 0x0340; - t['greater'] = 0x003E; - t['greaterequal'] = 0x2265; - t['greaterequalorless'] = 0x22DB; - t['greatermonospace'] = 0xFF1E; - t['greaterorequivalent'] = 0x2273; - t['greaterorless'] = 0x2277; - t['greateroverequal'] = 0x2267; - t['greatersmall'] = 0xFE65; - t['gscript'] = 0x0261; - t['gstroke'] = 0x01E5; - t['guhiragana'] = 0x3050; - t['guillemotleft'] = 0x00AB; - t['guillemotright'] = 0x00BB; - t['guilsinglleft'] = 0x2039; - t['guilsinglright'] = 0x203A; - t['gukatakana'] = 0x30B0; - t['guramusquare'] = 0x3318; - t['gysquare'] = 0x33C9; - t['h'] = 0x0068; - t['haabkhasiancyrillic'] = 0x04A9; - t['haaltonearabic'] = 0x06C1; - t['habengali'] = 0x09B9; - t['hadescendercyrillic'] = 0x04B3; - t['hadeva'] = 0x0939; - t['hagujarati'] = 0x0AB9; - t['hagurmukhi'] = 0x0A39; - t['haharabic'] = 0x062D; - t['hahfinalarabic'] = 0xFEA2; - t['hahinitialarabic'] = 0xFEA3; - t['hahiragana'] = 0x306F; - t['hahmedialarabic'] = 0xFEA4; - t['haitusquare'] = 0x332A; - t['hakatakana'] = 0x30CF; - t['hakatakanahalfwidth'] = 0xFF8A; - t['halantgurmukhi'] = 0x0A4D; - t['hamzaarabic'] = 0x0621; - t['hamzalowarabic'] = 0x0621; - t['hangulfiller'] = 0x3164; - t['hardsigncyrillic'] = 0x044A; - t['harpoonleftbarbup'] = 0x21BC; - t['harpoonrightbarbup'] = 0x21C0; - t['hasquare'] = 0x33CA; - t['hatafpatah'] = 0x05B2; - t['hatafpatah16'] = 0x05B2; - t['hatafpatah23'] = 0x05B2; - t['hatafpatah2f'] = 0x05B2; - t['hatafpatahhebrew'] = 0x05B2; - t['hatafpatahnarrowhebrew'] = 0x05B2; - t['hatafpatahquarterhebrew'] = 0x05B2; - t['hatafpatahwidehebrew'] = 0x05B2; - t['hatafqamats'] = 0x05B3; - t['hatafqamats1b'] = 0x05B3; - t['hatafqamats28'] = 0x05B3; - t['hatafqamats34'] = 0x05B3; - t['hatafqamatshebrew'] = 0x05B3; - t['hatafqamatsnarrowhebrew'] = 0x05B3; - t['hatafqamatsquarterhebrew'] = 0x05B3; - t['hatafqamatswidehebrew'] = 0x05B3; - t['hatafsegol'] = 0x05B1; - t['hatafsegol17'] = 0x05B1; - t['hatafsegol24'] = 0x05B1; - t['hatafsegol30'] = 0x05B1; - t['hatafsegolhebrew'] = 0x05B1; - t['hatafsegolnarrowhebrew'] = 0x05B1; - t['hatafsegolquarterhebrew'] = 0x05B1; - t['hatafsegolwidehebrew'] = 0x05B1; - t['hbar'] = 0x0127; - t['hbopomofo'] = 0x310F; - t['hbrevebelow'] = 0x1E2B; - t['hcedilla'] = 0x1E29; - t['hcircle'] = 0x24D7; - t['hcircumflex'] = 0x0125; - t['hdieresis'] = 0x1E27; - t['hdotaccent'] = 0x1E23; - t['hdotbelow'] = 0x1E25; - t['he'] = 0x05D4; - t['heart'] = 0x2665; - t['heartsuitblack'] = 0x2665; - t['heartsuitwhite'] = 0x2661; - t['hedagesh'] = 0xFB34; - t['hedageshhebrew'] = 0xFB34; - t['hehaltonearabic'] = 0x06C1; - t['heharabic'] = 0x0647; - t['hehebrew'] = 0x05D4; - t['hehfinalaltonearabic'] = 0xFBA7; - t['hehfinalalttwoarabic'] = 0xFEEA; - t['hehfinalarabic'] = 0xFEEA; - t['hehhamzaabovefinalarabic'] = 0xFBA5; - t['hehhamzaaboveisolatedarabic'] = 0xFBA4; - t['hehinitialaltonearabic'] = 0xFBA8; - t['hehinitialarabic'] = 0xFEEB; - t['hehiragana'] = 0x3078; - t['hehmedialaltonearabic'] = 0xFBA9; - t['hehmedialarabic'] = 0xFEEC; - t['heiseierasquare'] = 0x337B; - t['hekatakana'] = 0x30D8; - t['hekatakanahalfwidth'] = 0xFF8D; - t['hekutaarusquare'] = 0x3336; - t['henghook'] = 0x0267; - t['herutusquare'] = 0x3339; - t['het'] = 0x05D7; - t['hethebrew'] = 0x05D7; - t['hhook'] = 0x0266; - t['hhooksuperior'] = 0x02B1; - t['hieuhacirclekorean'] = 0x327B; - t['hieuhaparenkorean'] = 0x321B; - t['hieuhcirclekorean'] = 0x326D; - t['hieuhkorean'] = 0x314E; - t['hieuhparenkorean'] = 0x320D; - t['hihiragana'] = 0x3072; - t['hikatakana'] = 0x30D2; - t['hikatakanahalfwidth'] = 0xFF8B; - t['hiriq'] = 0x05B4; - t['hiriq14'] = 0x05B4; - t['hiriq21'] = 0x05B4; - t['hiriq2d'] = 0x05B4; - t['hiriqhebrew'] = 0x05B4; - t['hiriqnarrowhebrew'] = 0x05B4; - t['hiriqquarterhebrew'] = 0x05B4; - t['hiriqwidehebrew'] = 0x05B4; - t['hlinebelow'] = 0x1E96; - t['hmonospace'] = 0xFF48; - t['hoarmenian'] = 0x0570; - t['hohipthai'] = 0x0E2B; - t['hohiragana'] = 0x307B; - t['hokatakana'] = 0x30DB; - t['hokatakanahalfwidth'] = 0xFF8E; - t['holam'] = 0x05B9; - t['holam19'] = 0x05B9; - t['holam26'] = 0x05B9; - t['holam32'] = 0x05B9; - t['holamhebrew'] = 0x05B9; - t['holamnarrowhebrew'] = 0x05B9; - t['holamquarterhebrew'] = 0x05B9; - t['holamwidehebrew'] = 0x05B9; - t['honokhukthai'] = 0x0E2E; - t['hookabovecomb'] = 0x0309; - t['hookcmb'] = 0x0309; - t['hookpalatalizedbelowcmb'] = 0x0321; - t['hookretroflexbelowcmb'] = 0x0322; - t['hoonsquare'] = 0x3342; - t['horicoptic'] = 0x03E9; - t['horizontalbar'] = 0x2015; - t['horncmb'] = 0x031B; - t['hotsprings'] = 0x2668; - t['house'] = 0x2302; - t['hparen'] = 0x24A3; - t['hsuperior'] = 0x02B0; - t['hturned'] = 0x0265; - t['huhiragana'] = 0x3075; - t['huiitosquare'] = 0x3333; - t['hukatakana'] = 0x30D5; - t['hukatakanahalfwidth'] = 0xFF8C; - t['hungarumlaut'] = 0x02DD; - t['hungarumlautcmb'] = 0x030B; - t['hv'] = 0x0195; - t['hyphen'] = 0x002D; - t['hypheninferior'] = 0xF6E5; - t['hyphenmonospace'] = 0xFF0D; - t['hyphensmall'] = 0xFE63; - t['hyphensuperior'] = 0xF6E6; - t['hyphentwo'] = 0x2010; - t['i'] = 0x0069; - t['iacute'] = 0x00ED; - t['iacyrillic'] = 0x044F; - t['ibengali'] = 0x0987; - t['ibopomofo'] = 0x3127; - t['ibreve'] = 0x012D; - t['icaron'] = 0x01D0; - t['icircle'] = 0x24D8; - t['icircumflex'] = 0x00EE; - t['icyrillic'] = 0x0456; - t['idblgrave'] = 0x0209; - t['ideographearthcircle'] = 0x328F; - t['ideographfirecircle'] = 0x328B; - t['ideographicallianceparen'] = 0x323F; - t['ideographiccallparen'] = 0x323A; - t['ideographiccentrecircle'] = 0x32A5; - t['ideographicclose'] = 0x3006; - t['ideographiccomma'] = 0x3001; - t['ideographiccommaleft'] = 0xFF64; - t['ideographiccongratulationparen'] = 0x3237; - t['ideographiccorrectcircle'] = 0x32A3; - t['ideographicearthparen'] = 0x322F; - t['ideographicenterpriseparen'] = 0x323D; - t['ideographicexcellentcircle'] = 0x329D; - t['ideographicfestivalparen'] = 0x3240; - t['ideographicfinancialcircle'] = 0x3296; - t['ideographicfinancialparen'] = 0x3236; - t['ideographicfireparen'] = 0x322B; - t['ideographichaveparen'] = 0x3232; - t['ideographichighcircle'] = 0x32A4; - t['ideographiciterationmark'] = 0x3005; - t['ideographiclaborcircle'] = 0x3298; - t['ideographiclaborparen'] = 0x3238; - t['ideographicleftcircle'] = 0x32A7; - t['ideographiclowcircle'] = 0x32A6; - t['ideographicmedicinecircle'] = 0x32A9; - t['ideographicmetalparen'] = 0x322E; - t['ideographicmoonparen'] = 0x322A; - t['ideographicnameparen'] = 0x3234; - t['ideographicperiod'] = 0x3002; - t['ideographicprintcircle'] = 0x329E; - t['ideographicreachparen'] = 0x3243; - t['ideographicrepresentparen'] = 0x3239; - t['ideographicresourceparen'] = 0x323E; - t['ideographicrightcircle'] = 0x32A8; - t['ideographicsecretcircle'] = 0x3299; - t['ideographicselfparen'] = 0x3242; - t['ideographicsocietyparen'] = 0x3233; - t['ideographicspace'] = 0x3000; - t['ideographicspecialparen'] = 0x3235; - t['ideographicstockparen'] = 0x3231; - t['ideographicstudyparen'] = 0x323B; - t['ideographicsunparen'] = 0x3230; - t['ideographicsuperviseparen'] = 0x323C; - t['ideographicwaterparen'] = 0x322C; - t['ideographicwoodparen'] = 0x322D; - t['ideographiczero'] = 0x3007; - t['ideographmetalcircle'] = 0x328E; - t['ideographmooncircle'] = 0x328A; - t['ideographnamecircle'] = 0x3294; - t['ideographsuncircle'] = 0x3290; - t['ideographwatercircle'] = 0x328C; - t['ideographwoodcircle'] = 0x328D; - t['ideva'] = 0x0907; - t['idieresis'] = 0x00EF; - t['idieresisacute'] = 0x1E2F; - t['idieresiscyrillic'] = 0x04E5; - t['idotbelow'] = 0x1ECB; - t['iebrevecyrillic'] = 0x04D7; - t['iecyrillic'] = 0x0435; - t['ieungacirclekorean'] = 0x3275; - t['ieungaparenkorean'] = 0x3215; - t['ieungcirclekorean'] = 0x3267; - t['ieungkorean'] = 0x3147; - t['ieungparenkorean'] = 0x3207; - t['igrave'] = 0x00EC; - t['igujarati'] = 0x0A87; - t['igurmukhi'] = 0x0A07; - t['ihiragana'] = 0x3044; - t['ihookabove'] = 0x1EC9; - t['iibengali'] = 0x0988; - t['iicyrillic'] = 0x0438; - t['iideva'] = 0x0908; - t['iigujarati'] = 0x0A88; - t['iigurmukhi'] = 0x0A08; - t['iimatragurmukhi'] = 0x0A40; - t['iinvertedbreve'] = 0x020B; - t['iishortcyrillic'] = 0x0439; - t['iivowelsignbengali'] = 0x09C0; - t['iivowelsigndeva'] = 0x0940; - t['iivowelsigngujarati'] = 0x0AC0; - t['ij'] = 0x0133; - t['ikatakana'] = 0x30A4; - t['ikatakanahalfwidth'] = 0xFF72; - t['ikorean'] = 0x3163; - t['ilde'] = 0x02DC; - t['iluyhebrew'] = 0x05AC; - t['imacron'] = 0x012B; - t['imacroncyrillic'] = 0x04E3; - t['imageorapproximatelyequal'] = 0x2253; - t['imatragurmukhi'] = 0x0A3F; - t['imonospace'] = 0xFF49; - t['increment'] = 0x2206; - t['infinity'] = 0x221E; - t['iniarmenian'] = 0x056B; - t['integral'] = 0x222B; - t['integralbottom'] = 0x2321; - t['integralbt'] = 0x2321; - t['integralex'] = 0xF8F5; - t['integraltop'] = 0x2320; - t['integraltp'] = 0x2320; - t['intersection'] = 0x2229; - t['intisquare'] = 0x3305; - t['invbullet'] = 0x25D8; - t['invcircle'] = 0x25D9; - t['invsmileface'] = 0x263B; - t['iocyrillic'] = 0x0451; - t['iogonek'] = 0x012F; - t['iota'] = 0x03B9; - t['iotadieresis'] = 0x03CA; - t['iotadieresistonos'] = 0x0390; - t['iotalatin'] = 0x0269; - t['iotatonos'] = 0x03AF; - t['iparen'] = 0x24A4; - t['irigurmukhi'] = 0x0A72; - t['ismallhiragana'] = 0x3043; - t['ismallkatakana'] = 0x30A3; - t['ismallkatakanahalfwidth'] = 0xFF68; - t['issharbengali'] = 0x09FA; - t['istroke'] = 0x0268; - t['isuperior'] = 0xF6ED; - t['iterationhiragana'] = 0x309D; - t['iterationkatakana'] = 0x30FD; - t['itilde'] = 0x0129; - t['itildebelow'] = 0x1E2D; - t['iubopomofo'] = 0x3129; - t['iucyrillic'] = 0x044E; - t['ivowelsignbengali'] = 0x09BF; - t['ivowelsigndeva'] = 0x093F; - t['ivowelsigngujarati'] = 0x0ABF; - t['izhitsacyrillic'] = 0x0475; - t['izhitsadblgravecyrillic'] = 0x0477; - t['j'] = 0x006A; - t['jaarmenian'] = 0x0571; - t['jabengali'] = 0x099C; - t['jadeva'] = 0x091C; - t['jagujarati'] = 0x0A9C; - t['jagurmukhi'] = 0x0A1C; - t['jbopomofo'] = 0x3110; - t['jcaron'] = 0x01F0; - t['jcircle'] = 0x24D9; - t['jcircumflex'] = 0x0135; - t['jcrossedtail'] = 0x029D; - t['jdotlessstroke'] = 0x025F; - t['jecyrillic'] = 0x0458; - t['jeemarabic'] = 0x062C; - t['jeemfinalarabic'] = 0xFE9E; - t['jeeminitialarabic'] = 0xFE9F; - t['jeemmedialarabic'] = 0xFEA0; - t['jeharabic'] = 0x0698; - t['jehfinalarabic'] = 0xFB8B; - t['jhabengali'] = 0x099D; - t['jhadeva'] = 0x091D; - t['jhagujarati'] = 0x0A9D; - t['jhagurmukhi'] = 0x0A1D; - t['jheharmenian'] = 0x057B; - t['jis'] = 0x3004; - t['jmonospace'] = 0xFF4A; - t['jparen'] = 0x24A5; - t['jsuperior'] = 0x02B2; - t['k'] = 0x006B; - t['kabashkircyrillic'] = 0x04A1; - t['kabengali'] = 0x0995; - t['kacute'] = 0x1E31; - t['kacyrillic'] = 0x043A; - t['kadescendercyrillic'] = 0x049B; - t['kadeva'] = 0x0915; - t['kaf'] = 0x05DB; - t['kafarabic'] = 0x0643; - t['kafdagesh'] = 0xFB3B; - t['kafdageshhebrew'] = 0xFB3B; - t['kaffinalarabic'] = 0xFEDA; - t['kafhebrew'] = 0x05DB; - t['kafinitialarabic'] = 0xFEDB; - t['kafmedialarabic'] = 0xFEDC; - t['kafrafehebrew'] = 0xFB4D; - t['kagujarati'] = 0x0A95; - t['kagurmukhi'] = 0x0A15; - t['kahiragana'] = 0x304B; - t['kahookcyrillic'] = 0x04C4; - t['kakatakana'] = 0x30AB; - t['kakatakanahalfwidth'] = 0xFF76; - t['kappa'] = 0x03BA; - t['kappasymbolgreek'] = 0x03F0; - t['kapyeounmieumkorean'] = 0x3171; - t['kapyeounphieuphkorean'] = 0x3184; - t['kapyeounpieupkorean'] = 0x3178; - t['kapyeounssangpieupkorean'] = 0x3179; - t['karoriisquare'] = 0x330D; - t['kashidaautoarabic'] = 0x0640; - t['kashidaautonosidebearingarabic'] = 0x0640; - t['kasmallkatakana'] = 0x30F5; - t['kasquare'] = 0x3384; - t['kasraarabic'] = 0x0650; - t['kasratanarabic'] = 0x064D; - t['kastrokecyrillic'] = 0x049F; - t['katahiraprolongmarkhalfwidth'] = 0xFF70; - t['kaverticalstrokecyrillic'] = 0x049D; - t['kbopomofo'] = 0x310E; - t['kcalsquare'] = 0x3389; - t['kcaron'] = 0x01E9; - t['kcedilla'] = 0x0137; - t['kcircle'] = 0x24DA; - t['kcommaaccent'] = 0x0137; - t['kdotbelow'] = 0x1E33; - t['keharmenian'] = 0x0584; - t['kehiragana'] = 0x3051; - t['kekatakana'] = 0x30B1; - t['kekatakanahalfwidth'] = 0xFF79; - t['kenarmenian'] = 0x056F; - t['kesmallkatakana'] = 0x30F6; - t['kgreenlandic'] = 0x0138; - t['khabengali'] = 0x0996; - t['khacyrillic'] = 0x0445; - t['khadeva'] = 0x0916; - t['khagujarati'] = 0x0A96; - t['khagurmukhi'] = 0x0A16; - t['khaharabic'] = 0x062E; - t['khahfinalarabic'] = 0xFEA6; - t['khahinitialarabic'] = 0xFEA7; - t['khahmedialarabic'] = 0xFEA8; - t['kheicoptic'] = 0x03E7; - t['khhadeva'] = 0x0959; - t['khhagurmukhi'] = 0x0A59; - t['khieukhacirclekorean'] = 0x3278; - t['khieukhaparenkorean'] = 0x3218; - t['khieukhcirclekorean'] = 0x326A; - t['khieukhkorean'] = 0x314B; - t['khieukhparenkorean'] = 0x320A; - t['khokhaithai'] = 0x0E02; - t['khokhonthai'] = 0x0E05; - t['khokhuatthai'] = 0x0E03; - t['khokhwaithai'] = 0x0E04; - t['khomutthai'] = 0x0E5B; - t['khook'] = 0x0199; - t['khorakhangthai'] = 0x0E06; - t['khzsquare'] = 0x3391; - t['kihiragana'] = 0x304D; - t['kikatakana'] = 0x30AD; - t['kikatakanahalfwidth'] = 0xFF77; - t['kiroguramusquare'] = 0x3315; - t['kiromeetorusquare'] = 0x3316; - t['kirosquare'] = 0x3314; - t['kiyeokacirclekorean'] = 0x326E; - t['kiyeokaparenkorean'] = 0x320E; - t['kiyeokcirclekorean'] = 0x3260; - t['kiyeokkorean'] = 0x3131; - t['kiyeokparenkorean'] = 0x3200; - t['kiyeoksioskorean'] = 0x3133; - t['kjecyrillic'] = 0x045C; - t['klinebelow'] = 0x1E35; - t['klsquare'] = 0x3398; - t['kmcubedsquare'] = 0x33A6; - t['kmonospace'] = 0xFF4B; - t['kmsquaredsquare'] = 0x33A2; - t['kohiragana'] = 0x3053; - t['kohmsquare'] = 0x33C0; - t['kokaithai'] = 0x0E01; - t['kokatakana'] = 0x30B3; - t['kokatakanahalfwidth'] = 0xFF7A; - t['kooposquare'] = 0x331E; - t['koppacyrillic'] = 0x0481; - t['koreanstandardsymbol'] = 0x327F; - t['koroniscmb'] = 0x0343; - t['kparen'] = 0x24A6; - t['kpasquare'] = 0x33AA; - t['ksicyrillic'] = 0x046F; - t['ktsquare'] = 0x33CF; - t['kturned'] = 0x029E; - t['kuhiragana'] = 0x304F; - t['kukatakana'] = 0x30AF; - t['kukatakanahalfwidth'] = 0xFF78; - t['kvsquare'] = 0x33B8; - t['kwsquare'] = 0x33BE; - t['l'] = 0x006C; - t['labengali'] = 0x09B2; - t['lacute'] = 0x013A; - t['ladeva'] = 0x0932; - t['lagujarati'] = 0x0AB2; - t['lagurmukhi'] = 0x0A32; - t['lakkhangyaothai'] = 0x0E45; - t['lamaleffinalarabic'] = 0xFEFC; - t['lamalefhamzaabovefinalarabic'] = 0xFEF8; - t['lamalefhamzaaboveisolatedarabic'] = 0xFEF7; - t['lamalefhamzabelowfinalarabic'] = 0xFEFA; - t['lamalefhamzabelowisolatedarabic'] = 0xFEF9; - t['lamalefisolatedarabic'] = 0xFEFB; - t['lamalefmaddaabovefinalarabic'] = 0xFEF6; - t['lamalefmaddaaboveisolatedarabic'] = 0xFEF5; - t['lamarabic'] = 0x0644; - t['lambda'] = 0x03BB; - t['lambdastroke'] = 0x019B; - t['lamed'] = 0x05DC; - t['lameddagesh'] = 0xFB3C; - t['lameddageshhebrew'] = 0xFB3C; - t['lamedhebrew'] = 0x05DC; - t['lamfinalarabic'] = 0xFEDE; - t['lamhahinitialarabic'] = 0xFCCA; - t['laminitialarabic'] = 0xFEDF; - t['lamjeeminitialarabic'] = 0xFCC9; - t['lamkhahinitialarabic'] = 0xFCCB; - t['lamlamhehisolatedarabic'] = 0xFDF2; - t['lammedialarabic'] = 0xFEE0; - t['lammeemhahinitialarabic'] = 0xFD88; - t['lammeeminitialarabic'] = 0xFCCC; - t['largecircle'] = 0x25EF; - t['lbar'] = 0x019A; - t['lbelt'] = 0x026C; - t['lbopomofo'] = 0x310C; - t['lcaron'] = 0x013E; - t['lcedilla'] = 0x013C; - t['lcircle'] = 0x24DB; - t['lcircumflexbelow'] = 0x1E3D; - t['lcommaaccent'] = 0x013C; - t['ldot'] = 0x0140; - t['ldotaccent'] = 0x0140; - t['ldotbelow'] = 0x1E37; - t['ldotbelowmacron'] = 0x1E39; - t['leftangleabovecmb'] = 0x031A; - t['lefttackbelowcmb'] = 0x0318; - t['less'] = 0x003C; - t['lessequal'] = 0x2264; - t['lessequalorgreater'] = 0x22DA; - t['lessmonospace'] = 0xFF1C; - t['lessorequivalent'] = 0x2272; - t['lessorgreater'] = 0x2276; - t['lessoverequal'] = 0x2266; - t['lesssmall'] = 0xFE64; - t['lezh'] = 0x026E; - t['lfblock'] = 0x258C; - t['lhookretroflex'] = 0x026D; - t['lira'] = 0x20A4; - t['liwnarmenian'] = 0x056C; - t['lj'] = 0x01C9; - t['ljecyrillic'] = 0x0459; - t['ll'] = 0xF6C0; - t['lladeva'] = 0x0933; - t['llagujarati'] = 0x0AB3; - t['llinebelow'] = 0x1E3B; - t['llladeva'] = 0x0934; - t['llvocalicbengali'] = 0x09E1; - t['llvocalicdeva'] = 0x0961; - t['llvocalicvowelsignbengali'] = 0x09E3; - t['llvocalicvowelsigndeva'] = 0x0963; - t['lmiddletilde'] = 0x026B; - t['lmonospace'] = 0xFF4C; - t['lmsquare'] = 0x33D0; - t['lochulathai'] = 0x0E2C; - t['logicaland'] = 0x2227; - t['logicalnot'] = 0x00AC; - t['logicalnotreversed'] = 0x2310; - t['logicalor'] = 0x2228; - t['lolingthai'] = 0x0E25; - t['longs'] = 0x017F; - t['lowlinecenterline'] = 0xFE4E; - t['lowlinecmb'] = 0x0332; - t['lowlinedashed'] = 0xFE4D; - t['lozenge'] = 0x25CA; - t['lparen'] = 0x24A7; - t['lslash'] = 0x0142; - t['lsquare'] = 0x2113; - t['lsuperior'] = 0xF6EE; - t['ltshade'] = 0x2591; - t['luthai'] = 0x0E26; - t['lvocalicbengali'] = 0x098C; - t['lvocalicdeva'] = 0x090C; - t['lvocalicvowelsignbengali'] = 0x09E2; - t['lvocalicvowelsigndeva'] = 0x0962; - t['lxsquare'] = 0x33D3; - t['m'] = 0x006D; - t['mabengali'] = 0x09AE; - t['macron'] = 0x00AF; - t['macronbelowcmb'] = 0x0331; - t['macroncmb'] = 0x0304; - t['macronlowmod'] = 0x02CD; - t['macronmonospace'] = 0xFFE3; - t['macute'] = 0x1E3F; - t['madeva'] = 0x092E; - t['magujarati'] = 0x0AAE; - t['magurmukhi'] = 0x0A2E; - t['mahapakhhebrew'] = 0x05A4; - t['mahapakhlefthebrew'] = 0x05A4; - t['mahiragana'] = 0x307E; - t['maichattawalowleftthai'] = 0xF895; - t['maichattawalowrightthai'] = 0xF894; - t['maichattawathai'] = 0x0E4B; - t['maichattawaupperleftthai'] = 0xF893; - t['maieklowleftthai'] = 0xF88C; - t['maieklowrightthai'] = 0xF88B; - t['maiekthai'] = 0x0E48; - t['maiekupperleftthai'] = 0xF88A; - t['maihanakatleftthai'] = 0xF884; - t['maihanakatthai'] = 0x0E31; - t['maitaikhuleftthai'] = 0xF889; - t['maitaikhuthai'] = 0x0E47; - t['maitholowleftthai'] = 0xF88F; - t['maitholowrightthai'] = 0xF88E; - t['maithothai'] = 0x0E49; - t['maithoupperleftthai'] = 0xF88D; - t['maitrilowleftthai'] = 0xF892; - t['maitrilowrightthai'] = 0xF891; - t['maitrithai'] = 0x0E4A; - t['maitriupperleftthai'] = 0xF890; - t['maiyamokthai'] = 0x0E46; - t['makatakana'] = 0x30DE; - t['makatakanahalfwidth'] = 0xFF8F; - t['male'] = 0x2642; - t['mansyonsquare'] = 0x3347; - t['maqafhebrew'] = 0x05BE; - t['mars'] = 0x2642; - t['masoracirclehebrew'] = 0x05AF; - t['masquare'] = 0x3383; - t['mbopomofo'] = 0x3107; - t['mbsquare'] = 0x33D4; - t['mcircle'] = 0x24DC; - t['mcubedsquare'] = 0x33A5; - t['mdotaccent'] = 0x1E41; - t['mdotbelow'] = 0x1E43; - t['meemarabic'] = 0x0645; - t['meemfinalarabic'] = 0xFEE2; - t['meeminitialarabic'] = 0xFEE3; - t['meemmedialarabic'] = 0xFEE4; - t['meemmeeminitialarabic'] = 0xFCD1; - t['meemmeemisolatedarabic'] = 0xFC48; - t['meetorusquare'] = 0x334D; - t['mehiragana'] = 0x3081; - t['meizierasquare'] = 0x337E; - t['mekatakana'] = 0x30E1; - t['mekatakanahalfwidth'] = 0xFF92; - t['mem'] = 0x05DE; - t['memdagesh'] = 0xFB3E; - t['memdageshhebrew'] = 0xFB3E; - t['memhebrew'] = 0x05DE; - t['menarmenian'] = 0x0574; - t['merkhahebrew'] = 0x05A5; - t['merkhakefulahebrew'] = 0x05A6; - t['merkhakefulalefthebrew'] = 0x05A6; - t['merkhalefthebrew'] = 0x05A5; - t['mhook'] = 0x0271; - t['mhzsquare'] = 0x3392; - t['middledotkatakanahalfwidth'] = 0xFF65; - t['middot'] = 0x00B7; - t['mieumacirclekorean'] = 0x3272; - t['mieumaparenkorean'] = 0x3212; - t['mieumcirclekorean'] = 0x3264; - t['mieumkorean'] = 0x3141; - t['mieumpansioskorean'] = 0x3170; - t['mieumparenkorean'] = 0x3204; - t['mieumpieupkorean'] = 0x316E; - t['mieumsioskorean'] = 0x316F; - t['mihiragana'] = 0x307F; - t['mikatakana'] = 0x30DF; - t['mikatakanahalfwidth'] = 0xFF90; - t['minus'] = 0x2212; - t['minusbelowcmb'] = 0x0320; - t['minuscircle'] = 0x2296; - t['minusmod'] = 0x02D7; - t['minusplus'] = 0x2213; - t['minute'] = 0x2032; - t['miribaarusquare'] = 0x334A; - t['mirisquare'] = 0x3349; - t['mlonglegturned'] = 0x0270; - t['mlsquare'] = 0x3396; - t['mmcubedsquare'] = 0x33A3; - t['mmonospace'] = 0xFF4D; - t['mmsquaredsquare'] = 0x339F; - t['mohiragana'] = 0x3082; - t['mohmsquare'] = 0x33C1; - t['mokatakana'] = 0x30E2; - t['mokatakanahalfwidth'] = 0xFF93; - t['molsquare'] = 0x33D6; - t['momathai'] = 0x0E21; - t['moverssquare'] = 0x33A7; - t['moverssquaredsquare'] = 0x33A8; - t['mparen'] = 0x24A8; - t['mpasquare'] = 0x33AB; - t['mssquare'] = 0x33B3; - t['msuperior'] = 0xF6EF; - t['mturned'] = 0x026F; - t['mu'] = 0x00B5; - t['mu1'] = 0x00B5; - t['muasquare'] = 0x3382; - t['muchgreater'] = 0x226B; - t['muchless'] = 0x226A; - t['mufsquare'] = 0x338C; - t['mugreek'] = 0x03BC; - t['mugsquare'] = 0x338D; - t['muhiragana'] = 0x3080; - t['mukatakana'] = 0x30E0; - t['mukatakanahalfwidth'] = 0xFF91; - t['mulsquare'] = 0x3395; - t['multiply'] = 0x00D7; - t['mumsquare'] = 0x339B; - t['munahhebrew'] = 0x05A3; - t['munahlefthebrew'] = 0x05A3; - t['musicalnote'] = 0x266A; - t['musicalnotedbl'] = 0x266B; - t['musicflatsign'] = 0x266D; - t['musicsharpsign'] = 0x266F; - t['mussquare'] = 0x33B2; - t['muvsquare'] = 0x33B6; - t['muwsquare'] = 0x33BC; - t['mvmegasquare'] = 0x33B9; - t['mvsquare'] = 0x33B7; - t['mwmegasquare'] = 0x33BF; - t['mwsquare'] = 0x33BD; - t['n'] = 0x006E; - t['nabengali'] = 0x09A8; - t['nabla'] = 0x2207; - t['nacute'] = 0x0144; - t['nadeva'] = 0x0928; - t['nagujarati'] = 0x0AA8; - t['nagurmukhi'] = 0x0A28; - t['nahiragana'] = 0x306A; - t['nakatakana'] = 0x30CA; - t['nakatakanahalfwidth'] = 0xFF85; - t['napostrophe'] = 0x0149; - t['nasquare'] = 0x3381; - t['nbopomofo'] = 0x310B; - t['nbspace'] = 0x00A0; - t['ncaron'] = 0x0148; - t['ncedilla'] = 0x0146; - t['ncircle'] = 0x24DD; - t['ncircumflexbelow'] = 0x1E4B; - t['ncommaaccent'] = 0x0146; - t['ndotaccent'] = 0x1E45; - t['ndotbelow'] = 0x1E47; - t['nehiragana'] = 0x306D; - t['nekatakana'] = 0x30CD; - t['nekatakanahalfwidth'] = 0xFF88; - t['newsheqelsign'] = 0x20AA; - t['nfsquare'] = 0x338B; - t['ngabengali'] = 0x0999; - t['ngadeva'] = 0x0919; - t['ngagujarati'] = 0x0A99; - t['ngagurmukhi'] = 0x0A19; - t['ngonguthai'] = 0x0E07; - t['nhiragana'] = 0x3093; - t['nhookleft'] = 0x0272; - t['nhookretroflex'] = 0x0273; - t['nieunacirclekorean'] = 0x326F; - t['nieunaparenkorean'] = 0x320F; - t['nieuncieuckorean'] = 0x3135; - t['nieuncirclekorean'] = 0x3261; - t['nieunhieuhkorean'] = 0x3136; - t['nieunkorean'] = 0x3134; - t['nieunpansioskorean'] = 0x3168; - t['nieunparenkorean'] = 0x3201; - t['nieunsioskorean'] = 0x3167; - t['nieuntikeutkorean'] = 0x3166; - t['nihiragana'] = 0x306B; - t['nikatakana'] = 0x30CB; - t['nikatakanahalfwidth'] = 0xFF86; - t['nikhahitleftthai'] = 0xF899; - t['nikhahitthai'] = 0x0E4D; - t['nine'] = 0x0039; - t['ninearabic'] = 0x0669; - t['ninebengali'] = 0x09EF; - t['ninecircle'] = 0x2468; - t['ninecircleinversesansserif'] = 0x2792; - t['ninedeva'] = 0x096F; - t['ninegujarati'] = 0x0AEF; - t['ninegurmukhi'] = 0x0A6F; - t['ninehackarabic'] = 0x0669; - t['ninehangzhou'] = 0x3029; - t['nineideographicparen'] = 0x3228; - t['nineinferior'] = 0x2089; - t['ninemonospace'] = 0xFF19; - t['nineoldstyle'] = 0xF739; - t['nineparen'] = 0x247C; - t['nineperiod'] = 0x2490; - t['ninepersian'] = 0x06F9; - t['nineroman'] = 0x2178; - t['ninesuperior'] = 0x2079; - t['nineteencircle'] = 0x2472; - t['nineteenparen'] = 0x2486; - t['nineteenperiod'] = 0x249A; - t['ninethai'] = 0x0E59; - t['nj'] = 0x01CC; - t['njecyrillic'] = 0x045A; - t['nkatakana'] = 0x30F3; - t['nkatakanahalfwidth'] = 0xFF9D; - t['nlegrightlong'] = 0x019E; - t['nlinebelow'] = 0x1E49; - t['nmonospace'] = 0xFF4E; - t['nmsquare'] = 0x339A; - t['nnabengali'] = 0x09A3; - t['nnadeva'] = 0x0923; - t['nnagujarati'] = 0x0AA3; - t['nnagurmukhi'] = 0x0A23; - t['nnnadeva'] = 0x0929; - t['nohiragana'] = 0x306E; - t['nokatakana'] = 0x30CE; - t['nokatakanahalfwidth'] = 0xFF89; - t['nonbreakingspace'] = 0x00A0; - t['nonenthai'] = 0x0E13; - t['nonuthai'] = 0x0E19; - t['noonarabic'] = 0x0646; - t['noonfinalarabic'] = 0xFEE6; - t['noonghunnaarabic'] = 0x06BA; - t['noonghunnafinalarabic'] = 0xFB9F; - t['nooninitialarabic'] = 0xFEE7; - t['noonjeeminitialarabic'] = 0xFCD2; - t['noonjeemisolatedarabic'] = 0xFC4B; - t['noonmedialarabic'] = 0xFEE8; - t['noonmeeminitialarabic'] = 0xFCD5; - t['noonmeemisolatedarabic'] = 0xFC4E; - t['noonnoonfinalarabic'] = 0xFC8D; - t['notcontains'] = 0x220C; - t['notelement'] = 0x2209; - t['notelementof'] = 0x2209; - t['notequal'] = 0x2260; - t['notgreater'] = 0x226F; - t['notgreaternorequal'] = 0x2271; - t['notgreaternorless'] = 0x2279; - t['notidentical'] = 0x2262; - t['notless'] = 0x226E; - t['notlessnorequal'] = 0x2270; - t['notparallel'] = 0x2226; - t['notprecedes'] = 0x2280; - t['notsubset'] = 0x2284; - t['notsucceeds'] = 0x2281; - t['notsuperset'] = 0x2285; - t['nowarmenian'] = 0x0576; - t['nparen'] = 0x24A9; - t['nssquare'] = 0x33B1; - t['nsuperior'] = 0x207F; - t['ntilde'] = 0x00F1; - t['nu'] = 0x03BD; - t['nuhiragana'] = 0x306C; - t['nukatakana'] = 0x30CC; - t['nukatakanahalfwidth'] = 0xFF87; - t['nuktabengali'] = 0x09BC; - t['nuktadeva'] = 0x093C; - t['nuktagujarati'] = 0x0ABC; - t['nuktagurmukhi'] = 0x0A3C; - t['numbersign'] = 0x0023; - t['numbersignmonospace'] = 0xFF03; - t['numbersignsmall'] = 0xFE5F; - t['numeralsigngreek'] = 0x0374; - t['numeralsignlowergreek'] = 0x0375; - t['numero'] = 0x2116; - t['nun'] = 0x05E0; - t['nundagesh'] = 0xFB40; - t['nundageshhebrew'] = 0xFB40; - t['nunhebrew'] = 0x05E0; - t['nvsquare'] = 0x33B5; - t['nwsquare'] = 0x33BB; - t['nyabengali'] = 0x099E; - t['nyadeva'] = 0x091E; - t['nyagujarati'] = 0x0A9E; - t['nyagurmukhi'] = 0x0A1E; - t['o'] = 0x006F; - t['oacute'] = 0x00F3; - t['oangthai'] = 0x0E2D; - t['obarred'] = 0x0275; - t['obarredcyrillic'] = 0x04E9; - t['obarreddieresiscyrillic'] = 0x04EB; - t['obengali'] = 0x0993; - t['obopomofo'] = 0x311B; - t['obreve'] = 0x014F; - t['ocandradeva'] = 0x0911; - t['ocandragujarati'] = 0x0A91; - t['ocandravowelsigndeva'] = 0x0949; - t['ocandravowelsigngujarati'] = 0x0AC9; - t['ocaron'] = 0x01D2; - t['ocircle'] = 0x24DE; - t['ocircumflex'] = 0x00F4; - t['ocircumflexacute'] = 0x1ED1; - t['ocircumflexdotbelow'] = 0x1ED9; - t['ocircumflexgrave'] = 0x1ED3; - t['ocircumflexhookabove'] = 0x1ED5; - t['ocircumflextilde'] = 0x1ED7; - t['ocyrillic'] = 0x043E; - t['odblacute'] = 0x0151; - t['odblgrave'] = 0x020D; - t['odeva'] = 0x0913; - t['odieresis'] = 0x00F6; - t['odieresiscyrillic'] = 0x04E7; - t['odotbelow'] = 0x1ECD; - t['oe'] = 0x0153; - t['oekorean'] = 0x315A; - t['ogonek'] = 0x02DB; - t['ogonekcmb'] = 0x0328; - t['ograve'] = 0x00F2; - t['ogujarati'] = 0x0A93; - t['oharmenian'] = 0x0585; - t['ohiragana'] = 0x304A; - t['ohookabove'] = 0x1ECF; - t['ohorn'] = 0x01A1; - t['ohornacute'] = 0x1EDB; - t['ohorndotbelow'] = 0x1EE3; - t['ohorngrave'] = 0x1EDD; - t['ohornhookabove'] = 0x1EDF; - t['ohorntilde'] = 0x1EE1; - t['ohungarumlaut'] = 0x0151; - t['oi'] = 0x01A3; - t['oinvertedbreve'] = 0x020F; - t['okatakana'] = 0x30AA; - t['okatakanahalfwidth'] = 0xFF75; - t['okorean'] = 0x3157; - t['olehebrew'] = 0x05AB; - t['omacron'] = 0x014D; - t['omacronacute'] = 0x1E53; - t['omacrongrave'] = 0x1E51; - t['omdeva'] = 0x0950; - t['omega'] = 0x03C9; - t['omega1'] = 0x03D6; - t['omegacyrillic'] = 0x0461; - t['omegalatinclosed'] = 0x0277; - t['omegaroundcyrillic'] = 0x047B; - t['omegatitlocyrillic'] = 0x047D; - t['omegatonos'] = 0x03CE; - t['omgujarati'] = 0x0AD0; - t['omicron'] = 0x03BF; - t['omicrontonos'] = 0x03CC; - t['omonospace'] = 0xFF4F; - t['one'] = 0x0031; - t['onearabic'] = 0x0661; - t['onebengali'] = 0x09E7; - t['onecircle'] = 0x2460; - t['onecircleinversesansserif'] = 0x278A; - t['onedeva'] = 0x0967; - t['onedotenleader'] = 0x2024; - t['oneeighth'] = 0x215B; - t['onefitted'] = 0xF6DC; - t['onegujarati'] = 0x0AE7; - t['onegurmukhi'] = 0x0A67; - t['onehackarabic'] = 0x0661; - t['onehalf'] = 0x00BD; - t['onehangzhou'] = 0x3021; - t['oneideographicparen'] = 0x3220; - t['oneinferior'] = 0x2081; - t['onemonospace'] = 0xFF11; - t['onenumeratorbengali'] = 0x09F4; - t['oneoldstyle'] = 0xF731; - t['oneparen'] = 0x2474; - t['oneperiod'] = 0x2488; - t['onepersian'] = 0x06F1; - t['onequarter'] = 0x00BC; - t['oneroman'] = 0x2170; - t['onesuperior'] = 0x00B9; - t['onethai'] = 0x0E51; - t['onethird'] = 0x2153; - t['oogonek'] = 0x01EB; - t['oogonekmacron'] = 0x01ED; - t['oogurmukhi'] = 0x0A13; - t['oomatragurmukhi'] = 0x0A4B; - t['oopen'] = 0x0254; - t['oparen'] = 0x24AA; - t['openbullet'] = 0x25E6; - t['option'] = 0x2325; - t['ordfeminine'] = 0x00AA; - t['ordmasculine'] = 0x00BA; - t['orthogonal'] = 0x221F; - t['oshortdeva'] = 0x0912; - t['oshortvowelsigndeva'] = 0x094A; - t['oslash'] = 0x00F8; - t['oslashacute'] = 0x01FF; - t['osmallhiragana'] = 0x3049; - t['osmallkatakana'] = 0x30A9; - t['osmallkatakanahalfwidth'] = 0xFF6B; - t['ostrokeacute'] = 0x01FF; - t['osuperior'] = 0xF6F0; - t['otcyrillic'] = 0x047F; - t['otilde'] = 0x00F5; - t['otildeacute'] = 0x1E4D; - t['otildedieresis'] = 0x1E4F; - t['oubopomofo'] = 0x3121; - t['overline'] = 0x203E; - t['overlinecenterline'] = 0xFE4A; - t['overlinecmb'] = 0x0305; - t['overlinedashed'] = 0xFE49; - t['overlinedblwavy'] = 0xFE4C; - t['overlinewavy'] = 0xFE4B; - t['overscore'] = 0x00AF; - t['ovowelsignbengali'] = 0x09CB; - t['ovowelsigndeva'] = 0x094B; - t['ovowelsigngujarati'] = 0x0ACB; - t['p'] = 0x0070; - t['paampssquare'] = 0x3380; - t['paasentosquare'] = 0x332B; - t['pabengali'] = 0x09AA; - t['pacute'] = 0x1E55; - t['padeva'] = 0x092A; - t['pagedown'] = 0x21DF; - t['pageup'] = 0x21DE; - t['pagujarati'] = 0x0AAA; - t['pagurmukhi'] = 0x0A2A; - t['pahiragana'] = 0x3071; - t['paiyannoithai'] = 0x0E2F; - t['pakatakana'] = 0x30D1; - t['palatalizationcyrilliccmb'] = 0x0484; - t['palochkacyrillic'] = 0x04C0; - t['pansioskorean'] = 0x317F; - t['paragraph'] = 0x00B6; - t['parallel'] = 0x2225; - t['parenleft'] = 0x0028; - t['parenleftaltonearabic'] = 0xFD3E; - t['parenleftbt'] = 0xF8ED; - t['parenleftex'] = 0xF8EC; - t['parenleftinferior'] = 0x208D; - t['parenleftmonospace'] = 0xFF08; - t['parenleftsmall'] = 0xFE59; - t['parenleftsuperior'] = 0x207D; - t['parenlefttp'] = 0xF8EB; - t['parenleftvertical'] = 0xFE35; - t['parenright'] = 0x0029; - t['parenrightaltonearabic'] = 0xFD3F; - t['parenrightbt'] = 0xF8F8; - t['parenrightex'] = 0xF8F7; - t['parenrightinferior'] = 0x208E; - t['parenrightmonospace'] = 0xFF09; - t['parenrightsmall'] = 0xFE5A; - t['parenrightsuperior'] = 0x207E; - t['parenrighttp'] = 0xF8F6; - t['parenrightvertical'] = 0xFE36; - t['partialdiff'] = 0x2202; - t['paseqhebrew'] = 0x05C0; - t['pashtahebrew'] = 0x0599; - t['pasquare'] = 0x33A9; - t['patah'] = 0x05B7; - t['patah11'] = 0x05B7; - t['patah1d'] = 0x05B7; - t['patah2a'] = 0x05B7; - t['patahhebrew'] = 0x05B7; - t['patahnarrowhebrew'] = 0x05B7; - t['patahquarterhebrew'] = 0x05B7; - t['patahwidehebrew'] = 0x05B7; - t['pazerhebrew'] = 0x05A1; - t['pbopomofo'] = 0x3106; - t['pcircle'] = 0x24DF; - t['pdotaccent'] = 0x1E57; - t['pe'] = 0x05E4; - t['pecyrillic'] = 0x043F; - t['pedagesh'] = 0xFB44; - t['pedageshhebrew'] = 0xFB44; - t['peezisquare'] = 0x333B; - t['pefinaldageshhebrew'] = 0xFB43; - t['peharabic'] = 0x067E; - t['peharmenian'] = 0x057A; - t['pehebrew'] = 0x05E4; - t['pehfinalarabic'] = 0xFB57; - t['pehinitialarabic'] = 0xFB58; - t['pehiragana'] = 0x307A; - t['pehmedialarabic'] = 0xFB59; - t['pekatakana'] = 0x30DA; - t['pemiddlehookcyrillic'] = 0x04A7; - t['perafehebrew'] = 0xFB4E; - t['percent'] = 0x0025; - t['percentarabic'] = 0x066A; - t['percentmonospace'] = 0xFF05; - t['percentsmall'] = 0xFE6A; - t['period'] = 0x002E; - t['periodarmenian'] = 0x0589; - t['periodcentered'] = 0x00B7; - t['periodhalfwidth'] = 0xFF61; - t['periodinferior'] = 0xF6E7; - t['periodmonospace'] = 0xFF0E; - t['periodsmall'] = 0xFE52; - t['periodsuperior'] = 0xF6E8; - t['perispomenigreekcmb'] = 0x0342; - t['perpendicular'] = 0x22A5; - t['perthousand'] = 0x2030; - t['peseta'] = 0x20A7; - t['pfsquare'] = 0x338A; - t['phabengali'] = 0x09AB; - t['phadeva'] = 0x092B; - t['phagujarati'] = 0x0AAB; - t['phagurmukhi'] = 0x0A2B; - t['phi'] = 0x03C6; - t['phi1'] = 0x03D5; - t['phieuphacirclekorean'] = 0x327A; - t['phieuphaparenkorean'] = 0x321A; - t['phieuphcirclekorean'] = 0x326C; - t['phieuphkorean'] = 0x314D; - t['phieuphparenkorean'] = 0x320C; - t['philatin'] = 0x0278; - t['phinthuthai'] = 0x0E3A; - t['phisymbolgreek'] = 0x03D5; - t['phook'] = 0x01A5; - t['phophanthai'] = 0x0E1E; - t['phophungthai'] = 0x0E1C; - t['phosamphaothai'] = 0x0E20; - t['pi'] = 0x03C0; - t['pieupacirclekorean'] = 0x3273; - t['pieupaparenkorean'] = 0x3213; - t['pieupcieuckorean'] = 0x3176; - t['pieupcirclekorean'] = 0x3265; - t['pieupkiyeokkorean'] = 0x3172; - t['pieupkorean'] = 0x3142; - t['pieupparenkorean'] = 0x3205; - t['pieupsioskiyeokkorean'] = 0x3174; - t['pieupsioskorean'] = 0x3144; - t['pieupsiostikeutkorean'] = 0x3175; - t['pieupthieuthkorean'] = 0x3177; - t['pieuptikeutkorean'] = 0x3173; - t['pihiragana'] = 0x3074; - t['pikatakana'] = 0x30D4; - t['pisymbolgreek'] = 0x03D6; - t['piwrarmenian'] = 0x0583; - t['plus'] = 0x002B; - t['plusbelowcmb'] = 0x031F; - t['pluscircle'] = 0x2295; - t['plusminus'] = 0x00B1; - t['plusmod'] = 0x02D6; - t['plusmonospace'] = 0xFF0B; - t['plussmall'] = 0xFE62; - t['plussuperior'] = 0x207A; - t['pmonospace'] = 0xFF50; - t['pmsquare'] = 0x33D8; - t['pohiragana'] = 0x307D; - t['pointingindexdownwhite'] = 0x261F; - t['pointingindexleftwhite'] = 0x261C; - t['pointingindexrightwhite'] = 0x261E; - t['pointingindexupwhite'] = 0x261D; - t['pokatakana'] = 0x30DD; - t['poplathai'] = 0x0E1B; - t['postalmark'] = 0x3012; - t['postalmarkface'] = 0x3020; - t['pparen'] = 0x24AB; - t['precedes'] = 0x227A; - t['prescription'] = 0x211E; - t['primemod'] = 0x02B9; - t['primereversed'] = 0x2035; - t['product'] = 0x220F; - t['projective'] = 0x2305; - t['prolongedkana'] = 0x30FC; - t['propellor'] = 0x2318; - t['propersubset'] = 0x2282; - t['propersuperset'] = 0x2283; - t['proportion'] = 0x2237; - t['proportional'] = 0x221D; - t['psi'] = 0x03C8; - t['psicyrillic'] = 0x0471; - t['psilipneumatacyrilliccmb'] = 0x0486; - t['pssquare'] = 0x33B0; - t['puhiragana'] = 0x3077; - t['pukatakana'] = 0x30D7; - t['pvsquare'] = 0x33B4; - t['pwsquare'] = 0x33BA; - t['q'] = 0x0071; - t['qadeva'] = 0x0958; - t['qadmahebrew'] = 0x05A8; - t['qafarabic'] = 0x0642; - t['qaffinalarabic'] = 0xFED6; - t['qafinitialarabic'] = 0xFED7; - t['qafmedialarabic'] = 0xFED8; - t['qamats'] = 0x05B8; - t['qamats10'] = 0x05B8; - t['qamats1a'] = 0x05B8; - t['qamats1c'] = 0x05B8; - t['qamats27'] = 0x05B8; - t['qamats29'] = 0x05B8; - t['qamats33'] = 0x05B8; - t['qamatsde'] = 0x05B8; - t['qamatshebrew'] = 0x05B8; - t['qamatsnarrowhebrew'] = 0x05B8; - t['qamatsqatanhebrew'] = 0x05B8; - t['qamatsqatannarrowhebrew'] = 0x05B8; - t['qamatsqatanquarterhebrew'] = 0x05B8; - t['qamatsqatanwidehebrew'] = 0x05B8; - t['qamatsquarterhebrew'] = 0x05B8; - t['qamatswidehebrew'] = 0x05B8; - t['qarneyparahebrew'] = 0x059F; - t['qbopomofo'] = 0x3111; - t['qcircle'] = 0x24E0; - t['qhook'] = 0x02A0; - t['qmonospace'] = 0xFF51; - t['qof'] = 0x05E7; - t['qofdagesh'] = 0xFB47; - t['qofdageshhebrew'] = 0xFB47; - t['qofhebrew'] = 0x05E7; - t['qparen'] = 0x24AC; - t['quarternote'] = 0x2669; - t['qubuts'] = 0x05BB; - t['qubuts18'] = 0x05BB; - t['qubuts25'] = 0x05BB; - t['qubuts31'] = 0x05BB; - t['qubutshebrew'] = 0x05BB; - t['qubutsnarrowhebrew'] = 0x05BB; - t['qubutsquarterhebrew'] = 0x05BB; - t['qubutswidehebrew'] = 0x05BB; - t['question'] = 0x003F; - t['questionarabic'] = 0x061F; - t['questionarmenian'] = 0x055E; - t['questiondown'] = 0x00BF; - t['questiondownsmall'] = 0xF7BF; - t['questiongreek'] = 0x037E; - t['questionmonospace'] = 0xFF1F; - t['questionsmall'] = 0xF73F; - t['quotedbl'] = 0x0022; - t['quotedblbase'] = 0x201E; - t['quotedblleft'] = 0x201C; - t['quotedblmonospace'] = 0xFF02; - t['quotedblprime'] = 0x301E; - t['quotedblprimereversed'] = 0x301D; - t['quotedblright'] = 0x201D; - t['quoteleft'] = 0x2018; - t['quoteleftreversed'] = 0x201B; - t['quotereversed'] = 0x201B; - t['quoteright'] = 0x2019; - t['quoterightn'] = 0x0149; - t['quotesinglbase'] = 0x201A; - t['quotesingle'] = 0x0027; - t['quotesinglemonospace'] = 0xFF07; - t['r'] = 0x0072; - t['raarmenian'] = 0x057C; - t['rabengali'] = 0x09B0; - t['racute'] = 0x0155; - t['radeva'] = 0x0930; - t['radical'] = 0x221A; - t['radicalex'] = 0xF8E5; - t['radoverssquare'] = 0x33AE; - t['radoverssquaredsquare'] = 0x33AF; - t['radsquare'] = 0x33AD; - t['rafe'] = 0x05BF; - t['rafehebrew'] = 0x05BF; - t['ragujarati'] = 0x0AB0; - t['ragurmukhi'] = 0x0A30; - t['rahiragana'] = 0x3089; - t['rakatakana'] = 0x30E9; - t['rakatakanahalfwidth'] = 0xFF97; - t['ralowerdiagonalbengali'] = 0x09F1; - t['ramiddlediagonalbengali'] = 0x09F0; - t['ramshorn'] = 0x0264; - t['ratio'] = 0x2236; - t['rbopomofo'] = 0x3116; - t['rcaron'] = 0x0159; - t['rcedilla'] = 0x0157; - t['rcircle'] = 0x24E1; - t['rcommaaccent'] = 0x0157; - t['rdblgrave'] = 0x0211; - t['rdotaccent'] = 0x1E59; - t['rdotbelow'] = 0x1E5B; - t['rdotbelowmacron'] = 0x1E5D; - t['referencemark'] = 0x203B; - t['reflexsubset'] = 0x2286; - t['reflexsuperset'] = 0x2287; - t['registered'] = 0x00AE; - t['registersans'] = 0xF8E8; - t['registerserif'] = 0xF6DA; - t['reharabic'] = 0x0631; - t['reharmenian'] = 0x0580; - t['rehfinalarabic'] = 0xFEAE; - t['rehiragana'] = 0x308C; - t['rekatakana'] = 0x30EC; - t['rekatakanahalfwidth'] = 0xFF9A; - t['resh'] = 0x05E8; - t['reshdageshhebrew'] = 0xFB48; - t['reshhebrew'] = 0x05E8; - t['reversedtilde'] = 0x223D; - t['reviahebrew'] = 0x0597; - t['reviamugrashhebrew'] = 0x0597; - t['revlogicalnot'] = 0x2310; - t['rfishhook'] = 0x027E; - t['rfishhookreversed'] = 0x027F; - t['rhabengali'] = 0x09DD; - t['rhadeva'] = 0x095D; - t['rho'] = 0x03C1; - t['rhook'] = 0x027D; - t['rhookturned'] = 0x027B; - t['rhookturnedsuperior'] = 0x02B5; - t['rhosymbolgreek'] = 0x03F1; - t['rhotichookmod'] = 0x02DE; - t['rieulacirclekorean'] = 0x3271; - t['rieulaparenkorean'] = 0x3211; - t['rieulcirclekorean'] = 0x3263; - t['rieulhieuhkorean'] = 0x3140; - t['rieulkiyeokkorean'] = 0x313A; - t['rieulkiyeoksioskorean'] = 0x3169; - t['rieulkorean'] = 0x3139; - t['rieulmieumkorean'] = 0x313B; - t['rieulpansioskorean'] = 0x316C; - t['rieulparenkorean'] = 0x3203; - t['rieulphieuphkorean'] = 0x313F; - t['rieulpieupkorean'] = 0x313C; - t['rieulpieupsioskorean'] = 0x316B; - t['rieulsioskorean'] = 0x313D; - t['rieulthieuthkorean'] = 0x313E; - t['rieultikeutkorean'] = 0x316A; - t['rieulyeorinhieuhkorean'] = 0x316D; - t['rightangle'] = 0x221F; - t['righttackbelowcmb'] = 0x0319; - t['righttriangle'] = 0x22BF; - t['rihiragana'] = 0x308A; - t['rikatakana'] = 0x30EA; - t['rikatakanahalfwidth'] = 0xFF98; - t['ring'] = 0x02DA; - t['ringbelowcmb'] = 0x0325; - t['ringcmb'] = 0x030A; - t['ringhalfleft'] = 0x02BF; - t['ringhalfleftarmenian'] = 0x0559; - t['ringhalfleftbelowcmb'] = 0x031C; - t['ringhalfleftcentered'] = 0x02D3; - t['ringhalfright'] = 0x02BE; - t['ringhalfrightbelowcmb'] = 0x0339; - t['ringhalfrightcentered'] = 0x02D2; - t['rinvertedbreve'] = 0x0213; - t['rittorusquare'] = 0x3351; - t['rlinebelow'] = 0x1E5F; - t['rlongleg'] = 0x027C; - t['rlonglegturned'] = 0x027A; - t['rmonospace'] = 0xFF52; - t['rohiragana'] = 0x308D; - t['rokatakana'] = 0x30ED; - t['rokatakanahalfwidth'] = 0xFF9B; - t['roruathai'] = 0x0E23; - t['rparen'] = 0x24AD; - t['rrabengali'] = 0x09DC; - t['rradeva'] = 0x0931; - t['rragurmukhi'] = 0x0A5C; - t['rreharabic'] = 0x0691; - t['rrehfinalarabic'] = 0xFB8D; - t['rrvocalicbengali'] = 0x09E0; - t['rrvocalicdeva'] = 0x0960; - t['rrvocalicgujarati'] = 0x0AE0; - t['rrvocalicvowelsignbengali'] = 0x09C4; - t['rrvocalicvowelsigndeva'] = 0x0944; - t['rrvocalicvowelsigngujarati'] = 0x0AC4; - t['rsuperior'] = 0xF6F1; - t['rtblock'] = 0x2590; - t['rturned'] = 0x0279; - t['rturnedsuperior'] = 0x02B4; - t['ruhiragana'] = 0x308B; - t['rukatakana'] = 0x30EB; - t['rukatakanahalfwidth'] = 0xFF99; - t['rupeemarkbengali'] = 0x09F2; - t['rupeesignbengali'] = 0x09F3; - t['rupiah'] = 0xF6DD; - t['ruthai'] = 0x0E24; - t['rvocalicbengali'] = 0x098B; - t['rvocalicdeva'] = 0x090B; - t['rvocalicgujarati'] = 0x0A8B; - t['rvocalicvowelsignbengali'] = 0x09C3; - t['rvocalicvowelsigndeva'] = 0x0943; - t['rvocalicvowelsigngujarati'] = 0x0AC3; - t['s'] = 0x0073; - t['sabengali'] = 0x09B8; - t['sacute'] = 0x015B; - t['sacutedotaccent'] = 0x1E65; - t['sadarabic'] = 0x0635; - t['sadeva'] = 0x0938; - t['sadfinalarabic'] = 0xFEBA; - t['sadinitialarabic'] = 0xFEBB; - t['sadmedialarabic'] = 0xFEBC; - t['sagujarati'] = 0x0AB8; - t['sagurmukhi'] = 0x0A38; - t['sahiragana'] = 0x3055; - t['sakatakana'] = 0x30B5; - t['sakatakanahalfwidth'] = 0xFF7B; - t['sallallahoualayhewasallamarabic'] = 0xFDFA; - t['samekh'] = 0x05E1; - t['samekhdagesh'] = 0xFB41; - t['samekhdageshhebrew'] = 0xFB41; - t['samekhhebrew'] = 0x05E1; - t['saraaathai'] = 0x0E32; - t['saraaethai'] = 0x0E41; - t['saraaimaimalaithai'] = 0x0E44; - t['saraaimaimuanthai'] = 0x0E43; - t['saraamthai'] = 0x0E33; - t['saraathai'] = 0x0E30; - t['saraethai'] = 0x0E40; - t['saraiileftthai'] = 0xF886; - t['saraiithai'] = 0x0E35; - t['saraileftthai'] = 0xF885; - t['saraithai'] = 0x0E34; - t['saraothai'] = 0x0E42; - t['saraueeleftthai'] = 0xF888; - t['saraueethai'] = 0x0E37; - t['saraueleftthai'] = 0xF887; - t['sarauethai'] = 0x0E36; - t['sarauthai'] = 0x0E38; - t['sarauuthai'] = 0x0E39; - t['sbopomofo'] = 0x3119; - t['scaron'] = 0x0161; - t['scarondotaccent'] = 0x1E67; - t['scedilla'] = 0x015F; - t['schwa'] = 0x0259; - t['schwacyrillic'] = 0x04D9; - t['schwadieresiscyrillic'] = 0x04DB; - t['schwahook'] = 0x025A; - t['scircle'] = 0x24E2; - t['scircumflex'] = 0x015D; - t['scommaaccent'] = 0x0219; - t['sdotaccent'] = 0x1E61; - t['sdotbelow'] = 0x1E63; - t['sdotbelowdotaccent'] = 0x1E69; - t['seagullbelowcmb'] = 0x033C; - t['second'] = 0x2033; - t['secondtonechinese'] = 0x02CA; - t['section'] = 0x00A7; - t['seenarabic'] = 0x0633; - t['seenfinalarabic'] = 0xFEB2; - t['seeninitialarabic'] = 0xFEB3; - t['seenmedialarabic'] = 0xFEB4; - t['segol'] = 0x05B6; - t['segol13'] = 0x05B6; - t['segol1f'] = 0x05B6; - t['segol2c'] = 0x05B6; - t['segolhebrew'] = 0x05B6; - t['segolnarrowhebrew'] = 0x05B6; - t['segolquarterhebrew'] = 0x05B6; - t['segoltahebrew'] = 0x0592; - t['segolwidehebrew'] = 0x05B6; - t['seharmenian'] = 0x057D; - t['sehiragana'] = 0x305B; - t['sekatakana'] = 0x30BB; - t['sekatakanahalfwidth'] = 0xFF7E; - t['semicolon'] = 0x003B; - t['semicolonarabic'] = 0x061B; - t['semicolonmonospace'] = 0xFF1B; - t['semicolonsmall'] = 0xFE54; - t['semivoicedmarkkana'] = 0x309C; - t['semivoicedmarkkanahalfwidth'] = 0xFF9F; - t['sentisquare'] = 0x3322; - t['sentosquare'] = 0x3323; - t['seven'] = 0x0037; - t['sevenarabic'] = 0x0667; - t['sevenbengali'] = 0x09ED; - t['sevencircle'] = 0x2466; - t['sevencircleinversesansserif'] = 0x2790; - t['sevendeva'] = 0x096D; - t['seveneighths'] = 0x215E; - t['sevengujarati'] = 0x0AED; - t['sevengurmukhi'] = 0x0A6D; - t['sevenhackarabic'] = 0x0667; - t['sevenhangzhou'] = 0x3027; - t['sevenideographicparen'] = 0x3226; - t['seveninferior'] = 0x2087; - t['sevenmonospace'] = 0xFF17; - t['sevenoldstyle'] = 0xF737; - t['sevenparen'] = 0x247A; - t['sevenperiod'] = 0x248E; - t['sevenpersian'] = 0x06F7; - t['sevenroman'] = 0x2176; - t['sevensuperior'] = 0x2077; - t['seventeencircle'] = 0x2470; - t['seventeenparen'] = 0x2484; - t['seventeenperiod'] = 0x2498; - t['seventhai'] = 0x0E57; - t['sfthyphen'] = 0x00AD; - t['shaarmenian'] = 0x0577; - t['shabengali'] = 0x09B6; - t['shacyrillic'] = 0x0448; - t['shaddaarabic'] = 0x0651; - t['shaddadammaarabic'] = 0xFC61; - t['shaddadammatanarabic'] = 0xFC5E; - t['shaddafathaarabic'] = 0xFC60; - t['shaddakasraarabic'] = 0xFC62; - t['shaddakasratanarabic'] = 0xFC5F; - t['shade'] = 0x2592; - t['shadedark'] = 0x2593; - t['shadelight'] = 0x2591; - t['shademedium'] = 0x2592; - t['shadeva'] = 0x0936; - t['shagujarati'] = 0x0AB6; - t['shagurmukhi'] = 0x0A36; - t['shalshelethebrew'] = 0x0593; - t['shbopomofo'] = 0x3115; - t['shchacyrillic'] = 0x0449; - t['sheenarabic'] = 0x0634; - t['sheenfinalarabic'] = 0xFEB6; - t['sheeninitialarabic'] = 0xFEB7; - t['sheenmedialarabic'] = 0xFEB8; - t['sheicoptic'] = 0x03E3; - t['sheqel'] = 0x20AA; - t['sheqelhebrew'] = 0x20AA; - t['sheva'] = 0x05B0; - t['sheva115'] = 0x05B0; - t['sheva15'] = 0x05B0; - t['sheva22'] = 0x05B0; - t['sheva2e'] = 0x05B0; - t['shevahebrew'] = 0x05B0; - t['shevanarrowhebrew'] = 0x05B0; - t['shevaquarterhebrew'] = 0x05B0; - t['shevawidehebrew'] = 0x05B0; - t['shhacyrillic'] = 0x04BB; - t['shimacoptic'] = 0x03ED; - t['shin'] = 0x05E9; - t['shindagesh'] = 0xFB49; - t['shindageshhebrew'] = 0xFB49; - t['shindageshshindot'] = 0xFB2C; - t['shindageshshindothebrew'] = 0xFB2C; - t['shindageshsindot'] = 0xFB2D; - t['shindageshsindothebrew'] = 0xFB2D; - t['shindothebrew'] = 0x05C1; - t['shinhebrew'] = 0x05E9; - t['shinshindot'] = 0xFB2A; - t['shinshindothebrew'] = 0xFB2A; - t['shinsindot'] = 0xFB2B; - t['shinsindothebrew'] = 0xFB2B; - t['shook'] = 0x0282; - t['sigma'] = 0x03C3; - t['sigma1'] = 0x03C2; - t['sigmafinal'] = 0x03C2; - t['sigmalunatesymbolgreek'] = 0x03F2; - t['sihiragana'] = 0x3057; - t['sikatakana'] = 0x30B7; - t['sikatakanahalfwidth'] = 0xFF7C; - t['siluqhebrew'] = 0x05BD; - t['siluqlefthebrew'] = 0x05BD; - t['similar'] = 0x223C; - t['sindothebrew'] = 0x05C2; - t['siosacirclekorean'] = 0x3274; - t['siosaparenkorean'] = 0x3214; - t['sioscieuckorean'] = 0x317E; - t['sioscirclekorean'] = 0x3266; - t['sioskiyeokkorean'] = 0x317A; - t['sioskorean'] = 0x3145; - t['siosnieunkorean'] = 0x317B; - t['siosparenkorean'] = 0x3206; - t['siospieupkorean'] = 0x317D; - t['siostikeutkorean'] = 0x317C; - t['six'] = 0x0036; - t['sixarabic'] = 0x0666; - t['sixbengali'] = 0x09EC; - t['sixcircle'] = 0x2465; - t['sixcircleinversesansserif'] = 0x278F; - t['sixdeva'] = 0x096C; - t['sixgujarati'] = 0x0AEC; - t['sixgurmukhi'] = 0x0A6C; - t['sixhackarabic'] = 0x0666; - t['sixhangzhou'] = 0x3026; - t['sixideographicparen'] = 0x3225; - t['sixinferior'] = 0x2086; - t['sixmonospace'] = 0xFF16; - t['sixoldstyle'] = 0xF736; - t['sixparen'] = 0x2479; - t['sixperiod'] = 0x248D; - t['sixpersian'] = 0x06F6; - t['sixroman'] = 0x2175; - t['sixsuperior'] = 0x2076; - t['sixteencircle'] = 0x246F; - t['sixteencurrencydenominatorbengali'] = 0x09F9; - t['sixteenparen'] = 0x2483; - t['sixteenperiod'] = 0x2497; - t['sixthai'] = 0x0E56; - t['slash'] = 0x002F; - t['slashmonospace'] = 0xFF0F; - t['slong'] = 0x017F; - t['slongdotaccent'] = 0x1E9B; - t['smileface'] = 0x263A; - t['smonospace'] = 0xFF53; - t['sofpasuqhebrew'] = 0x05C3; - t['softhyphen'] = 0x00AD; - t['softsigncyrillic'] = 0x044C; - t['sohiragana'] = 0x305D; - t['sokatakana'] = 0x30BD; - t['sokatakanahalfwidth'] = 0xFF7F; - t['soliduslongoverlaycmb'] = 0x0338; - t['solidusshortoverlaycmb'] = 0x0337; - t['sorusithai'] = 0x0E29; - t['sosalathai'] = 0x0E28; - t['sosothai'] = 0x0E0B; - t['sosuathai'] = 0x0E2A; - t['space'] = 0x0020; - t['spacehackarabic'] = 0x0020; - t['spade'] = 0x2660; - t['spadesuitblack'] = 0x2660; - t['spadesuitwhite'] = 0x2664; - t['sparen'] = 0x24AE; - t['squarebelowcmb'] = 0x033B; - t['squarecc'] = 0x33C4; - t['squarecm'] = 0x339D; - t['squarediagonalcrosshatchfill'] = 0x25A9; - t['squarehorizontalfill'] = 0x25A4; - t['squarekg'] = 0x338F; - t['squarekm'] = 0x339E; - t['squarekmcapital'] = 0x33CE; - t['squareln'] = 0x33D1; - t['squarelog'] = 0x33D2; - t['squaremg'] = 0x338E; - t['squaremil'] = 0x33D5; - t['squaremm'] = 0x339C; - t['squaremsquared'] = 0x33A1; - t['squareorthogonalcrosshatchfill'] = 0x25A6; - t['squareupperlefttolowerrightfill'] = 0x25A7; - t['squareupperrighttolowerleftfill'] = 0x25A8; - t['squareverticalfill'] = 0x25A5; - t['squarewhitewithsmallblack'] = 0x25A3; - t['srsquare'] = 0x33DB; - t['ssabengali'] = 0x09B7; - t['ssadeva'] = 0x0937; - t['ssagujarati'] = 0x0AB7; - t['ssangcieuckorean'] = 0x3149; - t['ssanghieuhkorean'] = 0x3185; - t['ssangieungkorean'] = 0x3180; - t['ssangkiyeokkorean'] = 0x3132; - t['ssangnieunkorean'] = 0x3165; - t['ssangpieupkorean'] = 0x3143; - t['ssangsioskorean'] = 0x3146; - t['ssangtikeutkorean'] = 0x3138; - t['ssuperior'] = 0xF6F2; - t['sterling'] = 0x00A3; - t['sterlingmonospace'] = 0xFFE1; - t['strokelongoverlaycmb'] = 0x0336; - t['strokeshortoverlaycmb'] = 0x0335; - t['subset'] = 0x2282; - t['subsetnotequal'] = 0x228A; - t['subsetorequal'] = 0x2286; - t['succeeds'] = 0x227B; - t['suchthat'] = 0x220B; - t['suhiragana'] = 0x3059; - t['sukatakana'] = 0x30B9; - t['sukatakanahalfwidth'] = 0xFF7D; - t['sukunarabic'] = 0x0652; - t['summation'] = 0x2211; - t['sun'] = 0x263C; - t['superset'] = 0x2283; - t['supersetnotequal'] = 0x228B; - t['supersetorequal'] = 0x2287; - t['svsquare'] = 0x33DC; - t['syouwaerasquare'] = 0x337C; - t['t'] = 0x0074; - t['tabengali'] = 0x09A4; - t['tackdown'] = 0x22A4; - t['tackleft'] = 0x22A3; - t['tadeva'] = 0x0924; - t['tagujarati'] = 0x0AA4; - t['tagurmukhi'] = 0x0A24; - t['taharabic'] = 0x0637; - t['tahfinalarabic'] = 0xFEC2; - t['tahinitialarabic'] = 0xFEC3; - t['tahiragana'] = 0x305F; - t['tahmedialarabic'] = 0xFEC4; - t['taisyouerasquare'] = 0x337D; - t['takatakana'] = 0x30BF; - t['takatakanahalfwidth'] = 0xFF80; - t['tatweelarabic'] = 0x0640; - t['tau'] = 0x03C4; - t['tav'] = 0x05EA; - t['tavdages'] = 0xFB4A; - t['tavdagesh'] = 0xFB4A; - t['tavdageshhebrew'] = 0xFB4A; - t['tavhebrew'] = 0x05EA; - t['tbar'] = 0x0167; - t['tbopomofo'] = 0x310A; - t['tcaron'] = 0x0165; - t['tccurl'] = 0x02A8; - t['tcedilla'] = 0x0163; - t['tcheharabic'] = 0x0686; - t['tchehfinalarabic'] = 0xFB7B; - t['tchehinitialarabic'] = 0xFB7C; - t['tchehmedialarabic'] = 0xFB7D; - t['tcircle'] = 0x24E3; - t['tcircumflexbelow'] = 0x1E71; - t['tcommaaccent'] = 0x0163; - t['tdieresis'] = 0x1E97; - t['tdotaccent'] = 0x1E6B; - t['tdotbelow'] = 0x1E6D; - t['tecyrillic'] = 0x0442; - t['tedescendercyrillic'] = 0x04AD; - t['teharabic'] = 0x062A; - t['tehfinalarabic'] = 0xFE96; - t['tehhahinitialarabic'] = 0xFCA2; - t['tehhahisolatedarabic'] = 0xFC0C; - t['tehinitialarabic'] = 0xFE97; - t['tehiragana'] = 0x3066; - t['tehjeeminitialarabic'] = 0xFCA1; - t['tehjeemisolatedarabic'] = 0xFC0B; - t['tehmarbutaarabic'] = 0x0629; - t['tehmarbutafinalarabic'] = 0xFE94; - t['tehmedialarabic'] = 0xFE98; - t['tehmeeminitialarabic'] = 0xFCA4; - t['tehmeemisolatedarabic'] = 0xFC0E; - t['tehnoonfinalarabic'] = 0xFC73; - t['tekatakana'] = 0x30C6; - t['tekatakanahalfwidth'] = 0xFF83; - t['telephone'] = 0x2121; - t['telephoneblack'] = 0x260E; - t['telishagedolahebrew'] = 0x05A0; - t['telishaqetanahebrew'] = 0x05A9; - t['tencircle'] = 0x2469; - t['tenideographicparen'] = 0x3229; - t['tenparen'] = 0x247D; - t['tenperiod'] = 0x2491; - t['tenroman'] = 0x2179; - t['tesh'] = 0x02A7; - t['tet'] = 0x05D8; - t['tetdagesh'] = 0xFB38; - t['tetdageshhebrew'] = 0xFB38; - t['tethebrew'] = 0x05D8; - t['tetsecyrillic'] = 0x04B5; - t['tevirhebrew'] = 0x059B; - t['tevirlefthebrew'] = 0x059B; - t['thabengali'] = 0x09A5; - t['thadeva'] = 0x0925; - t['thagujarati'] = 0x0AA5; - t['thagurmukhi'] = 0x0A25; - t['thalarabic'] = 0x0630; - t['thalfinalarabic'] = 0xFEAC; - t['thanthakhatlowleftthai'] = 0xF898; - t['thanthakhatlowrightthai'] = 0xF897; - t['thanthakhatthai'] = 0x0E4C; - t['thanthakhatupperleftthai'] = 0xF896; - t['theharabic'] = 0x062B; - t['thehfinalarabic'] = 0xFE9A; - t['thehinitialarabic'] = 0xFE9B; - t['thehmedialarabic'] = 0xFE9C; - t['thereexists'] = 0x2203; - t['therefore'] = 0x2234; - t['theta'] = 0x03B8; - t['theta1'] = 0x03D1; - t['thetasymbolgreek'] = 0x03D1; - t['thieuthacirclekorean'] = 0x3279; - t['thieuthaparenkorean'] = 0x3219; - t['thieuthcirclekorean'] = 0x326B; - t['thieuthkorean'] = 0x314C; - t['thieuthparenkorean'] = 0x320B; - t['thirteencircle'] = 0x246C; - t['thirteenparen'] = 0x2480; - t['thirteenperiod'] = 0x2494; - t['thonangmonthothai'] = 0x0E11; - t['thook'] = 0x01AD; - t['thophuthaothai'] = 0x0E12; - t['thorn'] = 0x00FE; - t['thothahanthai'] = 0x0E17; - t['thothanthai'] = 0x0E10; - t['thothongthai'] = 0x0E18; - t['thothungthai'] = 0x0E16; - t['thousandcyrillic'] = 0x0482; - t['thousandsseparatorarabic'] = 0x066C; - t['thousandsseparatorpersian'] = 0x066C; - t['three'] = 0x0033; - t['threearabic'] = 0x0663; - t['threebengali'] = 0x09E9; - t['threecircle'] = 0x2462; - t['threecircleinversesansserif'] = 0x278C; - t['threedeva'] = 0x0969; - t['threeeighths'] = 0x215C; - t['threegujarati'] = 0x0AE9; - t['threegurmukhi'] = 0x0A69; - t['threehackarabic'] = 0x0663; - t['threehangzhou'] = 0x3023; - t['threeideographicparen'] = 0x3222; - t['threeinferior'] = 0x2083; - t['threemonospace'] = 0xFF13; - t['threenumeratorbengali'] = 0x09F6; - t['threeoldstyle'] = 0xF733; - t['threeparen'] = 0x2476; - t['threeperiod'] = 0x248A; - t['threepersian'] = 0x06F3; - t['threequarters'] = 0x00BE; - t['threequartersemdash'] = 0xF6DE; - t['threeroman'] = 0x2172; - t['threesuperior'] = 0x00B3; - t['threethai'] = 0x0E53; - t['thzsquare'] = 0x3394; - t['tihiragana'] = 0x3061; - t['tikatakana'] = 0x30C1; - t['tikatakanahalfwidth'] = 0xFF81; - t['tikeutacirclekorean'] = 0x3270; - t['tikeutaparenkorean'] = 0x3210; - t['tikeutcirclekorean'] = 0x3262; - t['tikeutkorean'] = 0x3137; - t['tikeutparenkorean'] = 0x3202; - t['tilde'] = 0x02DC; - t['tildebelowcmb'] = 0x0330; - t['tildecmb'] = 0x0303; - t['tildecomb'] = 0x0303; - t['tildedoublecmb'] = 0x0360; - t['tildeoperator'] = 0x223C; - t['tildeoverlaycmb'] = 0x0334; - t['tildeverticalcmb'] = 0x033E; - t['timescircle'] = 0x2297; - t['tipehahebrew'] = 0x0596; - t['tipehalefthebrew'] = 0x0596; - t['tippigurmukhi'] = 0x0A70; - t['titlocyrilliccmb'] = 0x0483; - t['tiwnarmenian'] = 0x057F; - t['tlinebelow'] = 0x1E6F; - t['tmonospace'] = 0xFF54; - t['toarmenian'] = 0x0569; - t['tohiragana'] = 0x3068; - t['tokatakana'] = 0x30C8; - t['tokatakanahalfwidth'] = 0xFF84; - t['tonebarextrahighmod'] = 0x02E5; - t['tonebarextralowmod'] = 0x02E9; - t['tonebarhighmod'] = 0x02E6; - t['tonebarlowmod'] = 0x02E8; - t['tonebarmidmod'] = 0x02E7; - t['tonefive'] = 0x01BD; - t['tonesix'] = 0x0185; - t['tonetwo'] = 0x01A8; - t['tonos'] = 0x0384; - t['tonsquare'] = 0x3327; - t['topatakthai'] = 0x0E0F; - t['tortoiseshellbracketleft'] = 0x3014; - t['tortoiseshellbracketleftsmall'] = 0xFE5D; - t['tortoiseshellbracketleftvertical'] = 0xFE39; - t['tortoiseshellbracketright'] = 0x3015; - t['tortoiseshellbracketrightsmall'] = 0xFE5E; - t['tortoiseshellbracketrightvertical'] = 0xFE3A; - t['totaothai'] = 0x0E15; - t['tpalatalhook'] = 0x01AB; - t['tparen'] = 0x24AF; - t['trademark'] = 0x2122; - t['trademarksans'] = 0xF8EA; - t['trademarkserif'] = 0xF6DB; - t['tretroflexhook'] = 0x0288; - t['triagdn'] = 0x25BC; - t['triaglf'] = 0x25C4; - t['triagrt'] = 0x25BA; - t['triagup'] = 0x25B2; - t['ts'] = 0x02A6; - t['tsadi'] = 0x05E6; - t['tsadidagesh'] = 0xFB46; - t['tsadidageshhebrew'] = 0xFB46; - t['tsadihebrew'] = 0x05E6; - t['tsecyrillic'] = 0x0446; - t['tsere'] = 0x05B5; - t['tsere12'] = 0x05B5; - t['tsere1e'] = 0x05B5; - t['tsere2b'] = 0x05B5; - t['tserehebrew'] = 0x05B5; - t['tserenarrowhebrew'] = 0x05B5; - t['tserequarterhebrew'] = 0x05B5; - t['tserewidehebrew'] = 0x05B5; - t['tshecyrillic'] = 0x045B; - t['tsuperior'] = 0xF6F3; - t['ttabengali'] = 0x099F; - t['ttadeva'] = 0x091F; - t['ttagujarati'] = 0x0A9F; - t['ttagurmukhi'] = 0x0A1F; - t['tteharabic'] = 0x0679; - t['ttehfinalarabic'] = 0xFB67; - t['ttehinitialarabic'] = 0xFB68; - t['ttehmedialarabic'] = 0xFB69; - t['tthabengali'] = 0x09A0; - t['tthadeva'] = 0x0920; - t['tthagujarati'] = 0x0AA0; - t['tthagurmukhi'] = 0x0A20; - t['tturned'] = 0x0287; - t['tuhiragana'] = 0x3064; - t['tukatakana'] = 0x30C4; - t['tukatakanahalfwidth'] = 0xFF82; - t['tusmallhiragana'] = 0x3063; - t['tusmallkatakana'] = 0x30C3; - t['tusmallkatakanahalfwidth'] = 0xFF6F; - t['twelvecircle'] = 0x246B; - t['twelveparen'] = 0x247F; - t['twelveperiod'] = 0x2493; - t['twelveroman'] = 0x217B; - t['twentycircle'] = 0x2473; - t['twentyhangzhou'] = 0x5344; - t['twentyparen'] = 0x2487; - t['twentyperiod'] = 0x249B; - t['two'] = 0x0032; - t['twoarabic'] = 0x0662; - t['twobengali'] = 0x09E8; - t['twocircle'] = 0x2461; - t['twocircleinversesansserif'] = 0x278B; - t['twodeva'] = 0x0968; - t['twodotenleader'] = 0x2025; - t['twodotleader'] = 0x2025; - t['twodotleadervertical'] = 0xFE30; - t['twogujarati'] = 0x0AE8; - t['twogurmukhi'] = 0x0A68; - t['twohackarabic'] = 0x0662; - t['twohangzhou'] = 0x3022; - t['twoideographicparen'] = 0x3221; - t['twoinferior'] = 0x2082; - t['twomonospace'] = 0xFF12; - t['twonumeratorbengali'] = 0x09F5; - t['twooldstyle'] = 0xF732; - t['twoparen'] = 0x2475; - t['twoperiod'] = 0x2489; - t['twopersian'] = 0x06F2; - t['tworoman'] = 0x2171; - t['twostroke'] = 0x01BB; - t['twosuperior'] = 0x00B2; - t['twothai'] = 0x0E52; - t['twothirds'] = 0x2154; - t['u'] = 0x0075; - t['uacute'] = 0x00FA; - t['ubar'] = 0x0289; - t['ubengali'] = 0x0989; - t['ubopomofo'] = 0x3128; - t['ubreve'] = 0x016D; - t['ucaron'] = 0x01D4; - t['ucircle'] = 0x24E4; - t['ucircumflex'] = 0x00FB; - t['ucircumflexbelow'] = 0x1E77; - t['ucyrillic'] = 0x0443; - t['udattadeva'] = 0x0951; - t['udblacute'] = 0x0171; - t['udblgrave'] = 0x0215; - t['udeva'] = 0x0909; - t['udieresis'] = 0x00FC; - t['udieresisacute'] = 0x01D8; - t['udieresisbelow'] = 0x1E73; - t['udieresiscaron'] = 0x01DA; - t['udieresiscyrillic'] = 0x04F1; - t['udieresisgrave'] = 0x01DC; - t['udieresismacron'] = 0x01D6; - t['udotbelow'] = 0x1EE5; - t['ugrave'] = 0x00F9; - t['ugujarati'] = 0x0A89; - t['ugurmukhi'] = 0x0A09; - t['uhiragana'] = 0x3046; - t['uhookabove'] = 0x1EE7; - t['uhorn'] = 0x01B0; - t['uhornacute'] = 0x1EE9; - t['uhorndotbelow'] = 0x1EF1; - t['uhorngrave'] = 0x1EEB; - t['uhornhookabove'] = 0x1EED; - t['uhorntilde'] = 0x1EEF; - t['uhungarumlaut'] = 0x0171; - t['uhungarumlautcyrillic'] = 0x04F3; - t['uinvertedbreve'] = 0x0217; - t['ukatakana'] = 0x30A6; - t['ukatakanahalfwidth'] = 0xFF73; - t['ukcyrillic'] = 0x0479; - t['ukorean'] = 0x315C; - t['umacron'] = 0x016B; - t['umacroncyrillic'] = 0x04EF; - t['umacrondieresis'] = 0x1E7B; - t['umatragurmukhi'] = 0x0A41; - t['umonospace'] = 0xFF55; - t['underscore'] = 0x005F; - t['underscoredbl'] = 0x2017; - t['underscoremonospace'] = 0xFF3F; - t['underscorevertical'] = 0xFE33; - t['underscorewavy'] = 0xFE4F; - t['union'] = 0x222A; - t['universal'] = 0x2200; - t['uogonek'] = 0x0173; - t['uparen'] = 0x24B0; - t['upblock'] = 0x2580; - t['upperdothebrew'] = 0x05C4; - t['upsilon'] = 0x03C5; - t['upsilondieresis'] = 0x03CB; - t['upsilondieresistonos'] = 0x03B0; - t['upsilonlatin'] = 0x028A; - t['upsilontonos'] = 0x03CD; - t['uptackbelowcmb'] = 0x031D; - t['uptackmod'] = 0x02D4; - t['uragurmukhi'] = 0x0A73; - t['uring'] = 0x016F; - t['ushortcyrillic'] = 0x045E; - t['usmallhiragana'] = 0x3045; - t['usmallkatakana'] = 0x30A5; - t['usmallkatakanahalfwidth'] = 0xFF69; - t['ustraightcyrillic'] = 0x04AF; - t['ustraightstrokecyrillic'] = 0x04B1; - t['utilde'] = 0x0169; - t['utildeacute'] = 0x1E79; - t['utildebelow'] = 0x1E75; - t['uubengali'] = 0x098A; - t['uudeva'] = 0x090A; - t['uugujarati'] = 0x0A8A; - t['uugurmukhi'] = 0x0A0A; - t['uumatragurmukhi'] = 0x0A42; - t['uuvowelsignbengali'] = 0x09C2; - t['uuvowelsigndeva'] = 0x0942; - t['uuvowelsigngujarati'] = 0x0AC2; - t['uvowelsignbengali'] = 0x09C1; - t['uvowelsigndeva'] = 0x0941; - t['uvowelsigngujarati'] = 0x0AC1; - t['v'] = 0x0076; - t['vadeva'] = 0x0935; - t['vagujarati'] = 0x0AB5; - t['vagurmukhi'] = 0x0A35; - t['vakatakana'] = 0x30F7; - t['vav'] = 0x05D5; - t['vavdagesh'] = 0xFB35; - t['vavdagesh65'] = 0xFB35; - t['vavdageshhebrew'] = 0xFB35; - t['vavhebrew'] = 0x05D5; - t['vavholam'] = 0xFB4B; - t['vavholamhebrew'] = 0xFB4B; - t['vavvavhebrew'] = 0x05F0; - t['vavyodhebrew'] = 0x05F1; - t['vcircle'] = 0x24E5; - t['vdotbelow'] = 0x1E7F; - t['vecyrillic'] = 0x0432; - t['veharabic'] = 0x06A4; - t['vehfinalarabic'] = 0xFB6B; - t['vehinitialarabic'] = 0xFB6C; - t['vehmedialarabic'] = 0xFB6D; - t['vekatakana'] = 0x30F9; - t['venus'] = 0x2640; - t['verticalbar'] = 0x007C; - t['verticallineabovecmb'] = 0x030D; - t['verticallinebelowcmb'] = 0x0329; - t['verticallinelowmod'] = 0x02CC; - t['verticallinemod'] = 0x02C8; - t['vewarmenian'] = 0x057E; - t['vhook'] = 0x028B; - t['vikatakana'] = 0x30F8; - t['viramabengali'] = 0x09CD; - t['viramadeva'] = 0x094D; - t['viramagujarati'] = 0x0ACD; - t['visargabengali'] = 0x0983; - t['visargadeva'] = 0x0903; - t['visargagujarati'] = 0x0A83; - t['vmonospace'] = 0xFF56; - t['voarmenian'] = 0x0578; - t['voicediterationhiragana'] = 0x309E; - t['voicediterationkatakana'] = 0x30FE; - t['voicedmarkkana'] = 0x309B; - t['voicedmarkkanahalfwidth'] = 0xFF9E; - t['vokatakana'] = 0x30FA; - t['vparen'] = 0x24B1; - t['vtilde'] = 0x1E7D; - t['vturned'] = 0x028C; - t['vuhiragana'] = 0x3094; - t['vukatakana'] = 0x30F4; - t['w'] = 0x0077; - t['wacute'] = 0x1E83; - t['waekorean'] = 0x3159; - t['wahiragana'] = 0x308F; - t['wakatakana'] = 0x30EF; - t['wakatakanahalfwidth'] = 0xFF9C; - t['wakorean'] = 0x3158; - t['wasmallhiragana'] = 0x308E; - t['wasmallkatakana'] = 0x30EE; - t['wattosquare'] = 0x3357; - t['wavedash'] = 0x301C; - t['wavyunderscorevertical'] = 0xFE34; - t['wawarabic'] = 0x0648; - t['wawfinalarabic'] = 0xFEEE; - t['wawhamzaabovearabic'] = 0x0624; - t['wawhamzaabovefinalarabic'] = 0xFE86; - t['wbsquare'] = 0x33DD; - t['wcircle'] = 0x24E6; - t['wcircumflex'] = 0x0175; - t['wdieresis'] = 0x1E85; - t['wdotaccent'] = 0x1E87; - t['wdotbelow'] = 0x1E89; - t['wehiragana'] = 0x3091; - t['weierstrass'] = 0x2118; - t['wekatakana'] = 0x30F1; - t['wekorean'] = 0x315E; - t['weokorean'] = 0x315D; - t['wgrave'] = 0x1E81; - t['whitebullet'] = 0x25E6; - t['whitecircle'] = 0x25CB; - t['whitecircleinverse'] = 0x25D9; - t['whitecornerbracketleft'] = 0x300E; - t['whitecornerbracketleftvertical'] = 0xFE43; - t['whitecornerbracketright'] = 0x300F; - t['whitecornerbracketrightvertical'] = 0xFE44; - t['whitediamond'] = 0x25C7; - t['whitediamondcontainingblacksmalldiamond'] = 0x25C8; - t['whitedownpointingsmalltriangle'] = 0x25BF; - t['whitedownpointingtriangle'] = 0x25BD; - t['whiteleftpointingsmalltriangle'] = 0x25C3; - t['whiteleftpointingtriangle'] = 0x25C1; - t['whitelenticularbracketleft'] = 0x3016; - t['whitelenticularbracketright'] = 0x3017; - t['whiterightpointingsmalltriangle'] = 0x25B9; - t['whiterightpointingtriangle'] = 0x25B7; - t['whitesmallsquare'] = 0x25AB; - t['whitesmilingface'] = 0x263A; - t['whitesquare'] = 0x25A1; - t['whitestar'] = 0x2606; - t['whitetelephone'] = 0x260F; - t['whitetortoiseshellbracketleft'] = 0x3018; - t['whitetortoiseshellbracketright'] = 0x3019; - t['whiteuppointingsmalltriangle'] = 0x25B5; - t['whiteuppointingtriangle'] = 0x25B3; - t['wihiragana'] = 0x3090; - t['wikatakana'] = 0x30F0; - t['wikorean'] = 0x315F; - t['wmonospace'] = 0xFF57; - t['wohiragana'] = 0x3092; - t['wokatakana'] = 0x30F2; - t['wokatakanahalfwidth'] = 0xFF66; - t['won'] = 0x20A9; - t['wonmonospace'] = 0xFFE6; - t['wowaenthai'] = 0x0E27; - t['wparen'] = 0x24B2; - t['wring'] = 0x1E98; - t['wsuperior'] = 0x02B7; - t['wturned'] = 0x028D; - t['wynn'] = 0x01BF; - t['x'] = 0x0078; - t['xabovecmb'] = 0x033D; - t['xbopomofo'] = 0x3112; - t['xcircle'] = 0x24E7; - t['xdieresis'] = 0x1E8D; - t['xdotaccent'] = 0x1E8B; - t['xeharmenian'] = 0x056D; - t['xi'] = 0x03BE; - t['xmonospace'] = 0xFF58; - t['xparen'] = 0x24B3; - t['xsuperior'] = 0x02E3; - t['y'] = 0x0079; - t['yaadosquare'] = 0x334E; - t['yabengali'] = 0x09AF; - t['yacute'] = 0x00FD; - t['yadeva'] = 0x092F; - t['yaekorean'] = 0x3152; - t['yagujarati'] = 0x0AAF; - t['yagurmukhi'] = 0x0A2F; - t['yahiragana'] = 0x3084; - t['yakatakana'] = 0x30E4; - t['yakatakanahalfwidth'] = 0xFF94; - t['yakorean'] = 0x3151; - t['yamakkanthai'] = 0x0E4E; - t['yasmallhiragana'] = 0x3083; - t['yasmallkatakana'] = 0x30E3; - t['yasmallkatakanahalfwidth'] = 0xFF6C; - t['yatcyrillic'] = 0x0463; - t['ycircle'] = 0x24E8; - t['ycircumflex'] = 0x0177; - t['ydieresis'] = 0x00FF; - t['ydotaccent'] = 0x1E8F; - t['ydotbelow'] = 0x1EF5; - t['yeharabic'] = 0x064A; - t['yehbarreearabic'] = 0x06D2; - t['yehbarreefinalarabic'] = 0xFBAF; - t['yehfinalarabic'] = 0xFEF2; - t['yehhamzaabovearabic'] = 0x0626; - t['yehhamzaabovefinalarabic'] = 0xFE8A; - t['yehhamzaaboveinitialarabic'] = 0xFE8B; - t['yehhamzaabovemedialarabic'] = 0xFE8C; - t['yehinitialarabic'] = 0xFEF3; - t['yehmedialarabic'] = 0xFEF4; - t['yehmeeminitialarabic'] = 0xFCDD; - t['yehmeemisolatedarabic'] = 0xFC58; - t['yehnoonfinalarabic'] = 0xFC94; - t['yehthreedotsbelowarabic'] = 0x06D1; - t['yekorean'] = 0x3156; - t['yen'] = 0x00A5; - t['yenmonospace'] = 0xFFE5; - t['yeokorean'] = 0x3155; - t['yeorinhieuhkorean'] = 0x3186; - t['yerahbenyomohebrew'] = 0x05AA; - t['yerahbenyomolefthebrew'] = 0x05AA; - t['yericyrillic'] = 0x044B; - t['yerudieresiscyrillic'] = 0x04F9; - t['yesieungkorean'] = 0x3181; - t['yesieungpansioskorean'] = 0x3183; - t['yesieungsioskorean'] = 0x3182; - t['yetivhebrew'] = 0x059A; - t['ygrave'] = 0x1EF3; - t['yhook'] = 0x01B4; - t['yhookabove'] = 0x1EF7; - t['yiarmenian'] = 0x0575; - t['yicyrillic'] = 0x0457; - t['yikorean'] = 0x3162; - t['yinyang'] = 0x262F; - t['yiwnarmenian'] = 0x0582; - t['ymonospace'] = 0xFF59; - t['yod'] = 0x05D9; - t['yoddagesh'] = 0xFB39; - t['yoddageshhebrew'] = 0xFB39; - t['yodhebrew'] = 0x05D9; - t['yodyodhebrew'] = 0x05F2; - t['yodyodpatahhebrew'] = 0xFB1F; - t['yohiragana'] = 0x3088; - t['yoikorean'] = 0x3189; - t['yokatakana'] = 0x30E8; - t['yokatakanahalfwidth'] = 0xFF96; - t['yokorean'] = 0x315B; - t['yosmallhiragana'] = 0x3087; - t['yosmallkatakana'] = 0x30E7; - t['yosmallkatakanahalfwidth'] = 0xFF6E; - t['yotgreek'] = 0x03F3; - t['yoyaekorean'] = 0x3188; - t['yoyakorean'] = 0x3187; - t['yoyakthai'] = 0x0E22; - t['yoyingthai'] = 0x0E0D; - t['yparen'] = 0x24B4; - t['ypogegrammeni'] = 0x037A; - t['ypogegrammenigreekcmb'] = 0x0345; - t['yr'] = 0x01A6; - t['yring'] = 0x1E99; - t['ysuperior'] = 0x02B8; - t['ytilde'] = 0x1EF9; - t['yturned'] = 0x028E; - t['yuhiragana'] = 0x3086; - t['yuikorean'] = 0x318C; - t['yukatakana'] = 0x30E6; - t['yukatakanahalfwidth'] = 0xFF95; - t['yukorean'] = 0x3160; - t['yusbigcyrillic'] = 0x046B; - t['yusbigiotifiedcyrillic'] = 0x046D; - t['yuslittlecyrillic'] = 0x0467; - t['yuslittleiotifiedcyrillic'] = 0x0469; - t['yusmallhiragana'] = 0x3085; - t['yusmallkatakana'] = 0x30E5; - t['yusmallkatakanahalfwidth'] = 0xFF6D; - t['yuyekorean'] = 0x318B; - t['yuyeokorean'] = 0x318A; - t['yyabengali'] = 0x09DF; - t['yyadeva'] = 0x095F; - t['z'] = 0x007A; - t['zaarmenian'] = 0x0566; - t['zacute'] = 0x017A; - t['zadeva'] = 0x095B; - t['zagurmukhi'] = 0x0A5B; - t['zaharabic'] = 0x0638; - t['zahfinalarabic'] = 0xFEC6; - t['zahinitialarabic'] = 0xFEC7; - t['zahiragana'] = 0x3056; - t['zahmedialarabic'] = 0xFEC8; - t['zainarabic'] = 0x0632; - t['zainfinalarabic'] = 0xFEB0; - t['zakatakana'] = 0x30B6; - t['zaqefgadolhebrew'] = 0x0595; - t['zaqefqatanhebrew'] = 0x0594; - t['zarqahebrew'] = 0x0598; - t['zayin'] = 0x05D6; - t['zayindagesh'] = 0xFB36; - t['zayindageshhebrew'] = 0xFB36; - t['zayinhebrew'] = 0x05D6; - t['zbopomofo'] = 0x3117; - t['zcaron'] = 0x017E; - t['zcircle'] = 0x24E9; - t['zcircumflex'] = 0x1E91; - t['zcurl'] = 0x0291; - t['zdot'] = 0x017C; - t['zdotaccent'] = 0x017C; - t['zdotbelow'] = 0x1E93; - t['zecyrillic'] = 0x0437; - t['zedescendercyrillic'] = 0x0499; - t['zedieresiscyrillic'] = 0x04DF; - t['zehiragana'] = 0x305C; - t['zekatakana'] = 0x30BC; - t['zero'] = 0x0030; - t['zeroarabic'] = 0x0660; - t['zerobengali'] = 0x09E6; - t['zerodeva'] = 0x0966; - t['zerogujarati'] = 0x0AE6; - t['zerogurmukhi'] = 0x0A66; - t['zerohackarabic'] = 0x0660; - t['zeroinferior'] = 0x2080; - t['zeromonospace'] = 0xFF10; - t['zerooldstyle'] = 0xF730; - t['zeropersian'] = 0x06F0; - t['zerosuperior'] = 0x2070; - t['zerothai'] = 0x0E50; - t['zerowidthjoiner'] = 0xFEFF; - t['zerowidthnonjoiner'] = 0x200C; - t['zerowidthspace'] = 0x200B; - t['zeta'] = 0x03B6; - t['zhbopomofo'] = 0x3113; - t['zhearmenian'] = 0x056A; - t['zhebrevecyrillic'] = 0x04C2; - t['zhecyrillic'] = 0x0436; - t['zhedescendercyrillic'] = 0x0497; - t['zhedieresiscyrillic'] = 0x04DD; - t['zihiragana'] = 0x3058; - t['zikatakana'] = 0x30B8; - t['zinorhebrew'] = 0x05AE; - t['zlinebelow'] = 0x1E95; - t['zmonospace'] = 0xFF5A; - t['zohiragana'] = 0x305E; - t['zokatakana'] = 0x30BE; - t['zparen'] = 0x24B5; - t['zretroflexhook'] = 0x0290; - t['zstroke'] = 0x01B6; - t['zuhiragana'] = 0x305A; - t['zukatakana'] = 0x30BA; - t['.notdef'] = 0x0000; - t['angbracketleftbig'] = 0x2329; - t['angbracketleftBig'] = 0x2329; - t['angbracketleftbigg'] = 0x2329; - t['angbracketleftBigg'] = 0x2329; - t['angbracketrightBig'] = 0x232A; - t['angbracketrightbig'] = 0x232A; - t['angbracketrightBigg'] = 0x232A; - t['angbracketrightbigg'] = 0x232A; - t['arrowhookleft'] = 0x21AA; - t['arrowhookright'] = 0x21A9; - t['arrowlefttophalf'] = 0x21BC; - t['arrowleftbothalf'] = 0x21BD; - t['arrownortheast'] = 0x2197; - t['arrownorthwest'] = 0x2196; - t['arrowrighttophalf'] = 0x21C0; - t['arrowrightbothalf'] = 0x21C1; - t['arrowsoutheast'] = 0x2198; - t['arrowsouthwest'] = 0x2199; - t['backslashbig'] = 0x2216; - t['backslashBig'] = 0x2216; - t['backslashBigg'] = 0x2216; - t['backslashbigg'] = 0x2216; - t['bardbl'] = 0x2016; - t['bracehtipdownleft'] = 0xFE37; - t['bracehtipdownright'] = 0xFE37; - t['bracehtipupleft'] = 0xFE38; - t['bracehtipupright'] = 0xFE38; - t['braceleftBig'] = 0x007B; - t['braceleftbig'] = 0x007B; - t['braceleftbigg'] = 0x007B; - t['braceleftBigg'] = 0x007B; - t['bracerightBig'] = 0x007D; - t['bracerightbig'] = 0x007D; - t['bracerightbigg'] = 0x007D; - t['bracerightBigg'] = 0x007D; - t['bracketleftbig'] = 0x005B; - t['bracketleftBig'] = 0x005B; - t['bracketleftbigg'] = 0x005B; - t['bracketleftBigg'] = 0x005B; - t['bracketrightBig'] = 0x005D; - t['bracketrightbig'] = 0x005D; - t['bracketrightbigg'] = 0x005D; - t['bracketrightBigg'] = 0x005D; - t['ceilingleftbig'] = 0x2308; - t['ceilingleftBig'] = 0x2308; - t['ceilingleftBigg'] = 0x2308; - t['ceilingleftbigg'] = 0x2308; - t['ceilingrightbig'] = 0x2309; - t['ceilingrightBig'] = 0x2309; - t['ceilingrightbigg'] = 0x2309; - t['ceilingrightBigg'] = 0x2309; - t['circledotdisplay'] = 0x2299; - t['circledottext'] = 0x2299; - t['circlemultiplydisplay'] = 0x2297; - t['circlemultiplytext'] = 0x2297; - t['circleplusdisplay'] = 0x2295; - t['circleplustext'] = 0x2295; - t['contintegraldisplay'] = 0x222E; - t['contintegraltext'] = 0x222E; - t['coproductdisplay'] = 0x2210; - t['coproducttext'] = 0x2210; - t['floorleftBig'] = 0x230A; - t['floorleftbig'] = 0x230A; - t['floorleftbigg'] = 0x230A; - t['floorleftBigg'] = 0x230A; - t['floorrightbig'] = 0x230B; - t['floorrightBig'] = 0x230B; - t['floorrightBigg'] = 0x230B; - t['floorrightbigg'] = 0x230B; - t['hatwide'] = 0x0302; - t['hatwider'] = 0x0302; - t['hatwidest'] = 0x0302; - t['intercal'] = 0x1D40; - t['integraldisplay'] = 0x222B; - t['integraltext'] = 0x222B; - t['intersectiondisplay'] = 0x22C2; - t['intersectiontext'] = 0x22C2; - t['logicalanddisplay'] = 0x2227; - t['logicalandtext'] = 0x2227; - t['logicalordisplay'] = 0x2228; - t['logicalortext'] = 0x2228; - t['parenleftBig'] = 0x0028; - t['parenleftbig'] = 0x0028; - t['parenleftBigg'] = 0x0028; - t['parenleftbigg'] = 0x0028; - t['parenrightBig'] = 0x0029; - t['parenrightbig'] = 0x0029; - t['parenrightBigg'] = 0x0029; - t['parenrightbigg'] = 0x0029; - t['prime'] = 0x2032; - t['productdisplay'] = 0x220F; - t['producttext'] = 0x220F; - t['radicalbig'] = 0x221A; - t['radicalBig'] = 0x221A; - t['radicalBigg'] = 0x221A; - t['radicalbigg'] = 0x221A; - t['radicalbt'] = 0x221A; - t['radicaltp'] = 0x221A; - t['radicalvertex'] = 0x221A; - t['slashbig'] = 0x002F; - t['slashBig'] = 0x002F; - t['slashBigg'] = 0x002F; - t['slashbigg'] = 0x002F; - t['summationdisplay'] = 0x2211; - t['summationtext'] = 0x2211; - t['tildewide'] = 0x02DC; - t['tildewider'] = 0x02DC; - t['tildewidest'] = 0x02DC; - t['uniondisplay'] = 0x22C3; - t['unionmultidisplay'] = 0x228E; - t['unionmultitext'] = 0x228E; - t['unionsqdisplay'] = 0x2294; - t['unionsqtext'] = 0x2294; - t['uniontext'] = 0x22C3; - t['vextenddouble'] = 0x2225; - t['vextendsingle'] = 0x2223; -}); -var getDingbatsGlyphsUnicode = getLookupTableFactory(function (t) { - t['space'] = 0x0020; - t['a1'] = 0x2701; - t['a2'] = 0x2702; - t['a202'] = 0x2703; - t['a3'] = 0x2704; - t['a4'] = 0x260E; - t['a5'] = 0x2706; - t['a119'] = 0x2707; - t['a118'] = 0x2708; - t['a117'] = 0x2709; - t['a11'] = 0x261B; - t['a12'] = 0x261E; - t['a13'] = 0x270C; - t['a14'] = 0x270D; - t['a15'] = 0x270E; - t['a16'] = 0x270F; - t['a105'] = 0x2710; - t['a17'] = 0x2711; - t['a18'] = 0x2712; - t['a19'] = 0x2713; - t['a20'] = 0x2714; - t['a21'] = 0x2715; - t['a22'] = 0x2716; - t['a23'] = 0x2717; - t['a24'] = 0x2718; - t['a25'] = 0x2719; - t['a26'] = 0x271A; - t['a27'] = 0x271B; - t['a28'] = 0x271C; - t['a6'] = 0x271D; - t['a7'] = 0x271E; - t['a8'] = 0x271F; - t['a9'] = 0x2720; - t['a10'] = 0x2721; - t['a29'] = 0x2722; - t['a30'] = 0x2723; - t['a31'] = 0x2724; - t['a32'] = 0x2725; - t['a33'] = 0x2726; - t['a34'] = 0x2727; - t['a35'] = 0x2605; - t['a36'] = 0x2729; - t['a37'] = 0x272A; - t['a38'] = 0x272B; - t['a39'] = 0x272C; - t['a40'] = 0x272D; - t['a41'] = 0x272E; - t['a42'] = 0x272F; - t['a43'] = 0x2730; - t['a44'] = 0x2731; - t['a45'] = 0x2732; - t['a46'] = 0x2733; - t['a47'] = 0x2734; - t['a48'] = 0x2735; - t['a49'] = 0x2736; - t['a50'] = 0x2737; - t['a51'] = 0x2738; - t['a52'] = 0x2739; - t['a53'] = 0x273A; - t['a54'] = 0x273B; - t['a55'] = 0x273C; - t['a56'] = 0x273D; - t['a57'] = 0x273E; - t['a58'] = 0x273F; - t['a59'] = 0x2740; - t['a60'] = 0x2741; - t['a61'] = 0x2742; - t['a62'] = 0x2743; - t['a63'] = 0x2744; - t['a64'] = 0x2745; - t['a65'] = 0x2746; - t['a66'] = 0x2747; - t['a67'] = 0x2748; - t['a68'] = 0x2749; - t['a69'] = 0x274A; - t['a70'] = 0x274B; - t['a71'] = 0x25CF; - t['a72'] = 0x274D; - t['a73'] = 0x25A0; - t['a74'] = 0x274F; - t['a203'] = 0x2750; - t['a75'] = 0x2751; - t['a204'] = 0x2752; - t['a76'] = 0x25B2; - t['a77'] = 0x25BC; - t['a78'] = 0x25C6; - t['a79'] = 0x2756; - t['a81'] = 0x25D7; - t['a82'] = 0x2758; - t['a83'] = 0x2759; - t['a84'] = 0x275A; - t['a97'] = 0x275B; - t['a98'] = 0x275C; - t['a99'] = 0x275D; - t['a100'] = 0x275E; - t['a101'] = 0x2761; - t['a102'] = 0x2762; - t['a103'] = 0x2763; - t['a104'] = 0x2764; - t['a106'] = 0x2765; - t['a107'] = 0x2766; - t['a108'] = 0x2767; - t['a112'] = 0x2663; - t['a111'] = 0x2666; - t['a110'] = 0x2665; - t['a109'] = 0x2660; - t['a120'] = 0x2460; - t['a121'] = 0x2461; - t['a122'] = 0x2462; - t['a123'] = 0x2463; - t['a124'] = 0x2464; - t['a125'] = 0x2465; - t['a126'] = 0x2466; - t['a127'] = 0x2467; - t['a128'] = 0x2468; - t['a129'] = 0x2469; - t['a130'] = 0x2776; - t['a131'] = 0x2777; - t['a132'] = 0x2778; - t['a133'] = 0x2779; - t['a134'] = 0x277A; - t['a135'] = 0x277B; - t['a136'] = 0x277C; - t['a137'] = 0x277D; - t['a138'] = 0x277E; - t['a139'] = 0x277F; - t['a140'] = 0x2780; - t['a141'] = 0x2781; - t['a142'] = 0x2782; - t['a143'] = 0x2783; - t['a144'] = 0x2784; - t['a145'] = 0x2785; - t['a146'] = 0x2786; - t['a147'] = 0x2787; - t['a148'] = 0x2788; - t['a149'] = 0x2789; - t['a150'] = 0x278A; - t['a151'] = 0x278B; - t['a152'] = 0x278C; - t['a153'] = 0x278D; - t['a154'] = 0x278E; - t['a155'] = 0x278F; - t['a156'] = 0x2790; - t['a157'] = 0x2791; - t['a158'] = 0x2792; - t['a159'] = 0x2793; - t['a160'] = 0x2794; - t['a161'] = 0x2192; - t['a163'] = 0x2194; - t['a164'] = 0x2195; - t['a196'] = 0x2798; - t['a165'] = 0x2799; - t['a192'] = 0x279A; - t['a166'] = 0x279B; - t['a167'] = 0x279C; - t['a168'] = 0x279D; - t['a169'] = 0x279E; - t['a170'] = 0x279F; - t['a171'] = 0x27A0; - t['a172'] = 0x27A1; - t['a173'] = 0x27A2; - t['a162'] = 0x27A3; - t['a174'] = 0x27A4; - t['a175'] = 0x27A5; - t['a176'] = 0x27A6; - t['a177'] = 0x27A7; - t['a178'] = 0x27A8; - t['a179'] = 0x27A9; - t['a193'] = 0x27AA; - t['a180'] = 0x27AB; - t['a199'] = 0x27AC; - t['a181'] = 0x27AD; - t['a200'] = 0x27AE; - t['a182'] = 0x27AF; - t['a201'] = 0x27B1; - t['a183'] = 0x27B2; - t['a184'] = 0x27B3; - t['a197'] = 0x27B4; - t['a185'] = 0x27B5; - t['a194'] = 0x27B6; - t['a198'] = 0x27B7; - t['a186'] = 0x27B8; - t['a195'] = 0x27B9; - t['a187'] = 0x27BA; - t['a188'] = 0x27BB; - t['a189'] = 0x27BC; - t['a190'] = 0x27BD; - t['a191'] = 0x27BE; - t['a89'] = 0x2768; - t['a90'] = 0x2769; - t['a93'] = 0x276A; - t['a94'] = 0x276B; - t['a91'] = 0x276C; - t['a92'] = 0x276D; - t['a205'] = 0x276E; - t['a85'] = 0x276F; - t['a206'] = 0x2770; - t['a86'] = 0x2771; - t['a87'] = 0x2772; - t['a88'] = 0x2773; - t['a95'] = 0x2774; - t['a96'] = 0x2775; - t['.notdef'] = 0x0000; -}); -exports.getGlyphsUnicode = getGlyphsUnicode; -exports.getDingbatsGlyphsUnicode = getDingbatsGlyphsUnicode; - -/***/ }), -/* 161 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getSupplementalGlyphMapForCalibri = exports.getSupplementalGlyphMapForArialBlack = exports.getGlyphMapForStandardFonts = exports.getSymbolsFonts = exports.getSerifFonts = exports.getNonStdFontMap = exports.getStdFontMap = undefined; - -var _util = __w_pdfjs_require__(2); - -var getStdFontMap = (0, _util.getLookupTableFactory)(function (t) { - t['ArialNarrow'] = 'Helvetica'; - t['ArialNarrow-Bold'] = 'Helvetica-Bold'; - t['ArialNarrow-BoldItalic'] = 'Helvetica-BoldOblique'; - t['ArialNarrow-Italic'] = 'Helvetica-Oblique'; - t['ArialBlack'] = 'Helvetica'; - t['ArialBlack-Bold'] = 'Helvetica-Bold'; - t['ArialBlack-BoldItalic'] = 'Helvetica-BoldOblique'; - t['ArialBlack-Italic'] = 'Helvetica-Oblique'; - t['Arial-Black'] = 'Helvetica'; - t['Arial-Black-Bold'] = 'Helvetica-Bold'; - t['Arial-Black-BoldItalic'] = 'Helvetica-BoldOblique'; - t['Arial-Black-Italic'] = 'Helvetica-Oblique'; - t['Arial'] = 'Helvetica'; - t['Arial-Bold'] = 'Helvetica-Bold'; - t['Arial-BoldItalic'] = 'Helvetica-BoldOblique'; - t['Arial-Italic'] = 'Helvetica-Oblique'; - t['Arial-BoldItalicMT'] = 'Helvetica-BoldOblique'; - t['Arial-BoldMT'] = 'Helvetica-Bold'; - t['Arial-ItalicMT'] = 'Helvetica-Oblique'; - t['ArialMT'] = 'Helvetica'; - t['Courier-Bold'] = 'Courier-Bold'; - t['Courier-BoldItalic'] = 'Courier-BoldOblique'; - t['Courier-Italic'] = 'Courier-Oblique'; - t['CourierNew'] = 'Courier'; - t['CourierNew-Bold'] = 'Courier-Bold'; - t['CourierNew-BoldItalic'] = 'Courier-BoldOblique'; - t['CourierNew-Italic'] = 'Courier-Oblique'; - t['CourierNewPS-BoldItalicMT'] = 'Courier-BoldOblique'; - t['CourierNewPS-BoldMT'] = 'Courier-Bold'; - t['CourierNewPS-ItalicMT'] = 'Courier-Oblique'; - t['CourierNewPSMT'] = 'Courier'; - t['Helvetica'] = 'Helvetica'; - t['Helvetica-Bold'] = 'Helvetica-Bold'; - t['Helvetica-BoldItalic'] = 'Helvetica-BoldOblique'; - t['Helvetica-BoldOblique'] = 'Helvetica-BoldOblique'; - t['Helvetica-Italic'] = 'Helvetica-Oblique'; - t['Helvetica-Oblique'] = 'Helvetica-Oblique'; - t['SegoeUISymbol'] = 'Helvetica'; - t['Symbol-Bold'] = 'Symbol'; - t['Symbol-BoldItalic'] = 'Symbol'; - t['Symbol-Italic'] = 'Symbol'; - t['TimesNewRoman'] = 'Times-Roman'; - t['TimesNewRoman-Bold'] = 'Times-Bold'; - t['TimesNewRoman-BoldItalic'] = 'Times-BoldItalic'; - t['TimesNewRoman-Italic'] = 'Times-Italic'; - t['TimesNewRomanPS'] = 'Times-Roman'; - t['TimesNewRomanPS-Bold'] = 'Times-Bold'; - t['TimesNewRomanPS-BoldItalic'] = 'Times-BoldItalic'; - t['TimesNewRomanPS-BoldItalicMT'] = 'Times-BoldItalic'; - t['TimesNewRomanPS-BoldMT'] = 'Times-Bold'; - t['TimesNewRomanPS-Italic'] = 'Times-Italic'; - t['TimesNewRomanPS-ItalicMT'] = 'Times-Italic'; - t['TimesNewRomanPSMT'] = 'Times-Roman'; - t['TimesNewRomanPSMT-Bold'] = 'Times-Bold'; - t['TimesNewRomanPSMT-BoldItalic'] = 'Times-BoldItalic'; - t['TimesNewRomanPSMT-Italic'] = 'Times-Italic'; -}); -var getNonStdFontMap = (0, _util.getLookupTableFactory)(function (t) { - t['Calibri'] = 'Helvetica'; - t['Calibri-Bold'] = 'Helvetica-Bold'; - t['Calibri-BoldItalic'] = 'Helvetica-BoldOblique'; - t['Calibri-Italic'] = 'Helvetica-Oblique'; - t['CenturyGothic'] = 'Helvetica'; - t['CenturyGothic-Bold'] = 'Helvetica-Bold'; - t['CenturyGothic-BoldItalic'] = 'Helvetica-BoldOblique'; - t['CenturyGothic-Italic'] = 'Helvetica-Oblique'; - t['ComicSansMS'] = 'Comic Sans MS'; - t['ComicSansMS-Bold'] = 'Comic Sans MS-Bold'; - t['ComicSansMS-BoldItalic'] = 'Comic Sans MS-BoldItalic'; - t['ComicSansMS-Italic'] = 'Comic Sans MS-Italic'; - t['LucidaConsole'] = 'Courier'; - t['LucidaConsole-Bold'] = 'Courier-Bold'; - t['LucidaConsole-BoldItalic'] = 'Courier-BoldOblique'; - t['LucidaConsole-Italic'] = 'Courier-Oblique'; - t['LucidaSans-Demi'] = 'Helvetica-Bold'; - t['MS-Gothic'] = 'MS Gothic'; - t['MS-Gothic-Bold'] = 'MS Gothic-Bold'; - t['MS-Gothic-BoldItalic'] = 'MS Gothic-BoldItalic'; - t['MS-Gothic-Italic'] = 'MS Gothic-Italic'; - t['MS-Mincho'] = 'MS Mincho'; - t['MS-Mincho-Bold'] = 'MS Mincho-Bold'; - t['MS-Mincho-BoldItalic'] = 'MS Mincho-BoldItalic'; - t['MS-Mincho-Italic'] = 'MS Mincho-Italic'; - t['MS-PGothic'] = 'MS PGothic'; - t['MS-PGothic-Bold'] = 'MS PGothic-Bold'; - t['MS-PGothic-BoldItalic'] = 'MS PGothic-BoldItalic'; - t['MS-PGothic-Italic'] = 'MS PGothic-Italic'; - t['MS-PMincho'] = 'MS PMincho'; - t['MS-PMincho-Bold'] = 'MS PMincho-Bold'; - t['MS-PMincho-BoldItalic'] = 'MS PMincho-BoldItalic'; - t['MS-PMincho-Italic'] = 'MS PMincho-Italic'; - t['NuptialScript'] = 'Times-Italic'; - t['Wingdings'] = 'ZapfDingbats'; -}); -var getSerifFonts = (0, _util.getLookupTableFactory)(function (t) { - t['Adobe Jenson'] = true; - t['Adobe Text'] = true; - t['Albertus'] = true; - t['Aldus'] = true; - t['Alexandria'] = true; - t['Algerian'] = true; - t['American Typewriter'] = true; - t['Antiqua'] = true; - t['Apex'] = true; - t['Arno'] = true; - t['Aster'] = true; - t['Aurora'] = true; - t['Baskerville'] = true; - t['Bell'] = true; - t['Bembo'] = true; - t['Bembo Schoolbook'] = true; - t['Benguiat'] = true; - t['Berkeley Old Style'] = true; - t['Bernhard Modern'] = true; - t['Berthold City'] = true; - t['Bodoni'] = true; - t['Bauer Bodoni'] = true; - t['Book Antiqua'] = true; - t['Bookman'] = true; - t['Bordeaux Roman'] = true; - t['Californian FB'] = true; - t['Calisto'] = true; - t['Calvert'] = true; - t['Capitals'] = true; - t['Cambria'] = true; - t['Cartier'] = true; - t['Caslon'] = true; - t['Catull'] = true; - t['Centaur'] = true; - t['Century Old Style'] = true; - t['Century Schoolbook'] = true; - t['Chaparral'] = true; - t['Charis SIL'] = true; - t['Cheltenham'] = true; - t['Cholla Slab'] = true; - t['Clarendon'] = true; - t['Clearface'] = true; - t['Cochin'] = true; - t['Colonna'] = true; - t['Computer Modern'] = true; - t['Concrete Roman'] = true; - t['Constantia'] = true; - t['Cooper Black'] = true; - t['Corona'] = true; - t['Ecotype'] = true; - t['Egyptienne'] = true; - t['Elephant'] = true; - t['Excelsior'] = true; - t['Fairfield'] = true; - t['FF Scala'] = true; - t['Folkard'] = true; - t['Footlight'] = true; - t['FreeSerif'] = true; - t['Friz Quadrata'] = true; - t['Garamond'] = true; - t['Gentium'] = true; - t['Georgia'] = true; - t['Gloucester'] = true; - t['Goudy Old Style'] = true; - t['Goudy Schoolbook'] = true; - t['Goudy Pro Font'] = true; - t['Granjon'] = true; - t['Guardian Egyptian'] = true; - t['Heather'] = true; - t['Hercules'] = true; - t['High Tower Text'] = true; - t['Hiroshige'] = true; - t['Hoefler Text'] = true; - t['Humana Serif'] = true; - t['Imprint'] = true; - t['Ionic No. 5'] = true; - t['Janson'] = true; - t['Joanna'] = true; - t['Korinna'] = true; - t['Lexicon'] = true; - t['Liberation Serif'] = true; - t['Linux Libertine'] = true; - t['Literaturnaya'] = true; - t['Lucida'] = true; - t['Lucida Bright'] = true; - t['Melior'] = true; - t['Memphis'] = true; - t['Miller'] = true; - t['Minion'] = true; - t['Modern'] = true; - t['Mona Lisa'] = true; - t['Mrs Eaves'] = true; - t['MS Serif'] = true; - t['Museo Slab'] = true; - t['New York'] = true; - t['Nimbus Roman'] = true; - t['NPS Rawlinson Roadway'] = true; - t['NuptialScript'] = true; - t['Palatino'] = true; - t['Perpetua'] = true; - t['Plantin'] = true; - t['Plantin Schoolbook'] = true; - t['Playbill'] = true; - t['Poor Richard'] = true; - t['Rawlinson Roadway'] = true; - t['Renault'] = true; - t['Requiem'] = true; - t['Rockwell'] = true; - t['Roman'] = true; - t['Rotis Serif'] = true; - t['Sabon'] = true; - t['Scala'] = true; - t['Seagull'] = true; - t['Sistina'] = true; - t['Souvenir'] = true; - t['STIX'] = true; - t['Stone Informal'] = true; - t['Stone Serif'] = true; - t['Sylfaen'] = true; - t['Times'] = true; - t['Trajan'] = true; - t['Trinité'] = true; - t['Trump Mediaeval'] = true; - t['Utopia'] = true; - t['Vale Type'] = true; - t['Bitstream Vera'] = true; - t['Vera Serif'] = true; - t['Versailles'] = true; - t['Wanted'] = true; - t['Weiss'] = true; - t['Wide Latin'] = true; - t['Windsor'] = true; - t['XITS'] = true; -}); -var getSymbolsFonts = (0, _util.getLookupTableFactory)(function (t) { - t['Dingbats'] = true; - t['Symbol'] = true; - t['ZapfDingbats'] = true; -}); -var getGlyphMapForStandardFonts = (0, _util.getLookupTableFactory)(function (t) { - t[2] = 10; - t[3] = 32; - t[4] = 33; - t[5] = 34; - t[6] = 35; - t[7] = 36; - t[8] = 37; - t[9] = 38; - t[10] = 39; - t[11] = 40; - t[12] = 41; - t[13] = 42; - t[14] = 43; - t[15] = 44; - t[16] = 45; - t[17] = 46; - t[18] = 47; - t[19] = 48; - t[20] = 49; - t[21] = 50; - t[22] = 51; - t[23] = 52; - t[24] = 53; - t[25] = 54; - t[26] = 55; - t[27] = 56; - t[28] = 57; - t[29] = 58; - t[30] = 894; - t[31] = 60; - t[32] = 61; - t[33] = 62; - t[34] = 63; - t[35] = 64; - t[36] = 65; - t[37] = 66; - t[38] = 67; - t[39] = 68; - t[40] = 69; - t[41] = 70; - t[42] = 71; - t[43] = 72; - t[44] = 73; - t[45] = 74; - t[46] = 75; - t[47] = 76; - t[48] = 77; - t[49] = 78; - t[50] = 79; - t[51] = 80; - t[52] = 81; - t[53] = 82; - t[54] = 83; - t[55] = 84; - t[56] = 85; - t[57] = 86; - t[58] = 87; - t[59] = 88; - t[60] = 89; - t[61] = 90; - t[62] = 91; - t[63] = 92; - t[64] = 93; - t[65] = 94; - t[66] = 95; - t[67] = 96; - t[68] = 97; - t[69] = 98; - t[70] = 99; - t[71] = 100; - t[72] = 101; - t[73] = 102; - t[74] = 103; - t[75] = 104; - t[76] = 105; - t[77] = 106; - t[78] = 107; - t[79] = 108; - t[80] = 109; - t[81] = 110; - t[82] = 111; - t[83] = 112; - t[84] = 113; - t[85] = 114; - t[86] = 115; - t[87] = 116; - t[88] = 117; - t[89] = 118; - t[90] = 119; - t[91] = 120; - t[92] = 121; - t[93] = 122; - t[94] = 123; - t[95] = 124; - t[96] = 125; - t[97] = 126; - t[98] = 196; - t[99] = 197; - t[100] = 199; - t[101] = 201; - t[102] = 209; - t[103] = 214; - t[104] = 220; - t[105] = 225; - t[106] = 224; - t[107] = 226; - t[108] = 228; - t[109] = 227; - t[110] = 229; - t[111] = 231; - t[112] = 233; - t[113] = 232; - t[114] = 234; - t[115] = 235; - t[116] = 237; - t[117] = 236; - t[118] = 238; - t[119] = 239; - t[120] = 241; - t[121] = 243; - t[122] = 242; - t[123] = 244; - t[124] = 246; - t[125] = 245; - t[126] = 250; - t[127] = 249; - t[128] = 251; - t[129] = 252; - t[130] = 8224; - t[131] = 176; - t[132] = 162; - t[133] = 163; - t[134] = 167; - t[135] = 8226; - t[136] = 182; - t[137] = 223; - t[138] = 174; - t[139] = 169; - t[140] = 8482; - t[141] = 180; - t[142] = 168; - t[143] = 8800; - t[144] = 198; - t[145] = 216; - t[146] = 8734; - t[147] = 177; - t[148] = 8804; - t[149] = 8805; - t[150] = 165; - t[151] = 181; - t[152] = 8706; - t[153] = 8721; - t[154] = 8719; - t[156] = 8747; - t[157] = 170; - t[158] = 186; - t[159] = 8486; - t[160] = 230; - t[161] = 248; - t[162] = 191; - t[163] = 161; - t[164] = 172; - t[165] = 8730; - t[166] = 402; - t[167] = 8776; - t[168] = 8710; - t[169] = 171; - t[170] = 187; - t[171] = 8230; - t[210] = 218; - t[223] = 711; - t[224] = 321; - t[225] = 322; - t[227] = 353; - t[229] = 382; - t[234] = 253; - t[252] = 263; - t[253] = 268; - t[254] = 269; - t[258] = 258; - t[260] = 260; - t[261] = 261; - t[265] = 280; - t[266] = 281; - t[268] = 283; - t[269] = 313; - t[275] = 323; - t[276] = 324; - t[278] = 328; - t[284] = 345; - t[285] = 346; - t[286] = 347; - t[292] = 367; - t[295] = 377; - t[296] = 378; - t[298] = 380; - t[305] = 963; - t[306] = 964; - t[307] = 966; - t[308] = 8215; - t[309] = 8252; - t[310] = 8319; - t[311] = 8359; - t[312] = 8592; - t[313] = 8593; - t[337] = 9552; - t[493] = 1039; - t[494] = 1040; - t[705] = 1524; - t[706] = 8362; - t[710] = 64288; - t[711] = 64298; - t[759] = 1617; - t[761] = 1776; - t[763] = 1778; - t[775] = 1652; - t[777] = 1764; - t[778] = 1780; - t[779] = 1781; - t[780] = 1782; - t[782] = 771; - t[783] = 64726; - t[786] = 8363; - t[788] = 8532; - t[790] = 768; - t[791] = 769; - t[792] = 768; - t[795] = 803; - t[797] = 64336; - t[798] = 64337; - t[799] = 64342; - t[800] = 64343; - t[801] = 64344; - t[802] = 64345; - t[803] = 64362; - t[804] = 64363; - t[805] = 64364; - t[2424] = 7821; - t[2425] = 7822; - t[2426] = 7823; - t[2427] = 7824; - t[2428] = 7825; - t[2429] = 7826; - t[2430] = 7827; - t[2433] = 7682; - t[2678] = 8045; - t[2679] = 8046; - t[2830] = 1552; - t[2838] = 686; - t[2840] = 751; - t[2842] = 753; - t[2843] = 754; - t[2844] = 755; - t[2846] = 757; - t[2856] = 767; - t[2857] = 848; - t[2858] = 849; - t[2862] = 853; - t[2863] = 854; - t[2864] = 855; - t[2865] = 861; - t[2866] = 862; - t[2906] = 7460; - t[2908] = 7462; - t[2909] = 7463; - t[2910] = 7464; - t[2912] = 7466; - t[2913] = 7467; - t[2914] = 7468; - t[2916] = 7470; - t[2917] = 7471; - t[2918] = 7472; - t[2920] = 7474; - t[2921] = 7475; - t[2922] = 7476; - t[2924] = 7478; - t[2925] = 7479; - t[2926] = 7480; - t[2928] = 7482; - t[2929] = 7483; - t[2930] = 7484; - t[2932] = 7486; - t[2933] = 7487; - t[2934] = 7488; - t[2936] = 7490; - t[2937] = 7491; - t[2938] = 7492; - t[2940] = 7494; - t[2941] = 7495; - t[2942] = 7496; - t[2944] = 7498; - t[2946] = 7500; - t[2948] = 7502; - t[2950] = 7504; - t[2951] = 7505; - t[2952] = 7506; - t[2954] = 7508; - t[2955] = 7509; - t[2956] = 7510; - t[2958] = 7512; - t[2959] = 7513; - t[2960] = 7514; - t[2962] = 7516; - t[2963] = 7517; - t[2964] = 7518; - t[2966] = 7520; - t[2967] = 7521; - t[2968] = 7522; - t[2970] = 7524; - t[2971] = 7525; - t[2972] = 7526; - t[2974] = 7528; - t[2975] = 7529; - t[2976] = 7530; - t[2978] = 1537; - t[2979] = 1538; - t[2980] = 1539; - t[2982] = 1549; - t[2983] = 1551; - t[2984] = 1552; - t[2986] = 1554; - t[2987] = 1555; - t[2988] = 1556; - t[2990] = 1623; - t[2991] = 1624; - t[2995] = 1775; - t[2999] = 1791; - t[3002] = 64290; - t[3003] = 64291; - t[3004] = 64292; - t[3006] = 64294; - t[3007] = 64295; - t[3008] = 64296; - t[3011] = 1900; - t[3014] = 8223; - t[3015] = 8244; - t[3017] = 7532; - t[3018] = 7533; - t[3019] = 7534; - t[3075] = 7590; - t[3076] = 7591; - t[3079] = 7594; - t[3080] = 7595; - t[3083] = 7598; - t[3084] = 7599; - t[3087] = 7602; - t[3088] = 7603; - t[3091] = 7606; - t[3092] = 7607; - t[3095] = 7610; - t[3096] = 7611; - t[3099] = 7614; - t[3100] = 7615; - t[3103] = 7618; - t[3104] = 7619; - t[3107] = 8337; - t[3108] = 8338; - t[3116] = 1884; - t[3119] = 1885; - t[3120] = 1885; - t[3123] = 1886; - t[3124] = 1886; - t[3127] = 1887; - t[3128] = 1887; - t[3131] = 1888; - t[3132] = 1888; - t[3135] = 1889; - t[3136] = 1889; - t[3139] = 1890; - t[3140] = 1890; - t[3143] = 1891; - t[3144] = 1891; - t[3147] = 1892; - t[3148] = 1892; - t[3153] = 580; - t[3154] = 581; - t[3157] = 584; - t[3158] = 585; - t[3161] = 588; - t[3162] = 589; - t[3165] = 891; - t[3166] = 892; - t[3169] = 1274; - t[3170] = 1275; - t[3173] = 1278; - t[3174] = 1279; - t[3181] = 7622; - t[3182] = 7623; - t[3282] = 11799; - t[3316] = 578; - t[3379] = 42785; - t[3393] = 1159; - t[3416] = 8377; -}); -var getSupplementalGlyphMapForArialBlack = (0, _util.getLookupTableFactory)(function (t) { - t[227] = 322; - t[264] = 261; - t[291] = 346; -}); -var getSupplementalGlyphMapForCalibri = (0, _util.getLookupTableFactory)(function (t) { - t[1] = 32; - t[4] = 65; - t[17] = 66; - t[18] = 67; - t[24] = 68; - t[28] = 69; - t[38] = 70; - t[39] = 71; - t[44] = 72; - t[47] = 73; - t[58] = 74; - t[60] = 75; - t[62] = 76; - t[68] = 77; - t[69] = 78; - t[75] = 79; - t[87] = 80; - t[89] = 81; - t[90] = 82; - t[94] = 83; - t[100] = 84; - t[104] = 85; - t[115] = 86; - t[116] = 87; - t[121] = 88; - t[122] = 89; - t[127] = 90; - t[258] = 97; - t[268] = 261; - t[271] = 98; - t[272] = 99; - t[273] = 263; - t[282] = 100; - t[286] = 101; - t[295] = 281; - t[296] = 102; - t[336] = 103; - t[346] = 104; - t[349] = 105; - t[361] = 106; - t[364] = 107; - t[367] = 108; - t[371] = 322; - t[373] = 109; - t[374] = 110; - t[381] = 111; - t[383] = 243; - t[393] = 112; - t[395] = 113; - t[396] = 114; - t[400] = 115; - t[401] = 347; - t[410] = 116; - t[437] = 117; - t[448] = 118; - t[449] = 119; - t[454] = 120; - t[455] = 121; - t[460] = 122; - t[463] = 380; - t[853] = 44; - t[855] = 58; - t[856] = 46; - t[876] = 47; - t[878] = 45; - t[882] = 45; - t[894] = 40; - t[895] = 41; - t[896] = 91; - t[897] = 93; - t[923] = 64; - t[1004] = 48; - t[1005] = 49; - t[1006] = 50; - t[1007] = 51; - t[1008] = 52; - t[1009] = 53; - t[1010] = 54; - t[1011] = 55; - t[1012] = 56; - t[1013] = 57; - t[1081] = 37; - t[1085] = 43; - t[1086] = 45; -}); -exports.getStdFontMap = getStdFontMap; -exports.getNonStdFontMap = getNonStdFontMap; -exports.getSerifFonts = getSerifFonts; -exports.getSymbolsFonts = getSymbolsFonts; -exports.getGlyphMapForStandardFonts = getGlyphMapForStandardFonts; -exports.getSupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack; -exports.getSupplementalGlyphMapForCalibri = getSupplementalGlyphMapForCalibri; - -/***/ }), -/* 162 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -var getLookupTableFactory = __w_pdfjs_require__(2).getLookupTableFactory; -var getSpecialPUASymbols = getLookupTableFactory(function (t) { - t[63721] = 0x00A9; - t[63193] = 0x00A9; - t[63720] = 0x00AE; - t[63194] = 0x00AE; - t[63722] = 0x2122; - t[63195] = 0x2122; - t[63729] = 0x23A7; - t[63730] = 0x23A8; - t[63731] = 0x23A9; - t[63740] = 0x23AB; - t[63741] = 0x23AC; - t[63742] = 0x23AD; - t[63726] = 0x23A1; - t[63727] = 0x23A2; - t[63728] = 0x23A3; - t[63737] = 0x23A4; - t[63738] = 0x23A5; - t[63739] = 0x23A6; - t[63723] = 0x239B; - t[63724] = 0x239C; - t[63725] = 0x239D; - t[63734] = 0x239E; - t[63735] = 0x239F; - t[63736] = 0x23A0; -}); -function mapSpecialUnicodeValues(code) { - if (code >= 0xFFF0 && code <= 0xFFFF) { - return 0; - } else if (code >= 0xF600 && code <= 0xF8FF) { - return getSpecialPUASymbols()[code] || code; - } else if (code === 0x00AD) { - return 0x002D; - } - return code; -} -function getUnicodeForGlyph(name, glyphsUnicodeMap) { - var unicode = glyphsUnicodeMap[name]; - if (unicode !== undefined) { - return unicode; - } - if (!name) { - return -1; - } - if (name[0] === 'u') { - var nameLen = name.length, hexStr; - if (nameLen === 7 && name[1] === 'n' && name[2] === 'i') { - hexStr = name.substring(3); - } else if (nameLen >= 5 && nameLen <= 7) { - hexStr = name.substring(1); - } else { - return -1; - } - if (hexStr === hexStr.toUpperCase()) { - unicode = parseInt(hexStr, 16); - if (unicode >= 0) { - return unicode; - } - } - } - return -1; -} -var UnicodeRanges = [ - { - 'begin': 0x0000, - 'end': 0x007F - }, - { - 'begin': 0x0080, - 'end': 0x00FF - }, - { - 'begin': 0x0100, - 'end': 0x017F - }, - { - 'begin': 0x0180, - 'end': 0x024F - }, - { - 'begin': 0x0250, - 'end': 0x02AF - }, - { - 'begin': 0x02B0, - 'end': 0x02FF - }, - { - 'begin': 0x0300, - 'end': 0x036F - }, - { - 'begin': 0x0370, - 'end': 0x03FF - }, - { - 'begin': 0x2C80, - 'end': 0x2CFF - }, - { - 'begin': 0x0400, - 'end': 0x04FF - }, - { - 'begin': 0x0530, - 'end': 0x058F - }, - { - 'begin': 0x0590, - 'end': 0x05FF - }, - { - 'begin': 0xA500, - 'end': 0xA63F - }, - { - 'begin': 0x0600, - 'end': 0x06FF - }, - { - 'begin': 0x07C0, - 'end': 0x07FF - }, - { - 'begin': 0x0900, - 'end': 0x097F - }, - { - 'begin': 0x0980, - 'end': 0x09FF - }, - { - 'begin': 0x0A00, - 'end': 0x0A7F - }, - { - 'begin': 0x0A80, - 'end': 0x0AFF - }, - { - 'begin': 0x0B00, - 'end': 0x0B7F - }, - { - 'begin': 0x0B80, - 'end': 0x0BFF - }, - { - 'begin': 0x0C00, - 'end': 0x0C7F - }, - { - 'begin': 0x0C80, - 'end': 0x0CFF - }, - { - 'begin': 0x0D00, - 'end': 0x0D7F - }, - { - 'begin': 0x0E00, - 'end': 0x0E7F - }, - { - 'begin': 0x0E80, - 'end': 0x0EFF - }, - { - 'begin': 0x10A0, - 'end': 0x10FF - }, - { - 'begin': 0x1B00, - 'end': 0x1B7F - }, - { - 'begin': 0x1100, - 'end': 0x11FF - }, - { - 'begin': 0x1E00, - 'end': 0x1EFF - }, - { - 'begin': 0x1F00, - 'end': 0x1FFF - }, - { - 'begin': 0x2000, - 'end': 0x206F - }, - { - 'begin': 0x2070, - 'end': 0x209F - }, - { - 'begin': 0x20A0, - 'end': 0x20CF - }, - { - 'begin': 0x20D0, - 'end': 0x20FF - }, - { - 'begin': 0x2100, - 'end': 0x214F - }, - { - 'begin': 0x2150, - 'end': 0x218F - }, - { - 'begin': 0x2190, - 'end': 0x21FF - }, - { - 'begin': 0x2200, - 'end': 0x22FF - }, - { - 'begin': 0x2300, - 'end': 0x23FF - }, - { - 'begin': 0x2400, - 'end': 0x243F - }, - { - 'begin': 0x2440, - 'end': 0x245F - }, - { - 'begin': 0x2460, - 'end': 0x24FF - }, - { - 'begin': 0x2500, - 'end': 0x257F - }, - { - 'begin': 0x2580, - 'end': 0x259F - }, - { - 'begin': 0x25A0, - 'end': 0x25FF - }, - { - 'begin': 0x2600, - 'end': 0x26FF - }, - { - 'begin': 0x2700, - 'end': 0x27BF - }, - { - 'begin': 0x3000, - 'end': 0x303F - }, - { - 'begin': 0x3040, - 'end': 0x309F - }, - { - 'begin': 0x30A0, - 'end': 0x30FF - }, - { - 'begin': 0x3100, - 'end': 0x312F - }, - { - 'begin': 0x3130, - 'end': 0x318F - }, - { - 'begin': 0xA840, - 'end': 0xA87F - }, - { - 'begin': 0x3200, - 'end': 0x32FF - }, - { - 'begin': 0x3300, - 'end': 0x33FF - }, - { - 'begin': 0xAC00, - 'end': 0xD7AF - }, - { - 'begin': 0xD800, - 'end': 0xDFFF - }, - { - 'begin': 0x10900, - 'end': 0x1091F - }, - { - 'begin': 0x4E00, - 'end': 0x9FFF - }, - { - 'begin': 0xE000, - 'end': 0xF8FF - }, - { - 'begin': 0x31C0, - 'end': 0x31EF - }, - { - 'begin': 0xFB00, - 'end': 0xFB4F - }, - { - 'begin': 0xFB50, - 'end': 0xFDFF - }, - { - 'begin': 0xFE20, - 'end': 0xFE2F - }, - { - 'begin': 0xFE10, - 'end': 0xFE1F - }, - { - 'begin': 0xFE50, - 'end': 0xFE6F - }, - { - 'begin': 0xFE70, - 'end': 0xFEFF - }, - { - 'begin': 0xFF00, - 'end': 0xFFEF - }, - { - 'begin': 0xFFF0, - 'end': 0xFFFF - }, - { - 'begin': 0x0F00, - 'end': 0x0FFF - }, - { - 'begin': 0x0700, - 'end': 0x074F - }, - { - 'begin': 0x0780, - 'end': 0x07BF - }, - { - 'begin': 0x0D80, - 'end': 0x0DFF - }, - { - 'begin': 0x1000, - 'end': 0x109F - }, - { - 'begin': 0x1200, - 'end': 0x137F - }, - { - 'begin': 0x13A0, - 'end': 0x13FF - }, - { - 'begin': 0x1400, - 'end': 0x167F - }, - { - 'begin': 0x1680, - 'end': 0x169F - }, - { - 'begin': 0x16A0, - 'end': 0x16FF - }, - { - 'begin': 0x1780, - 'end': 0x17FF - }, - { - 'begin': 0x1800, - 'end': 0x18AF - }, - { - 'begin': 0x2800, - 'end': 0x28FF - }, - { - 'begin': 0xA000, - 'end': 0xA48F - }, - { - 'begin': 0x1700, - 'end': 0x171F - }, - { - 'begin': 0x10300, - 'end': 0x1032F - }, - { - 'begin': 0x10330, - 'end': 0x1034F - }, - { - 'begin': 0x10400, - 'end': 0x1044F - }, - { - 'begin': 0x1D000, - 'end': 0x1D0FF - }, - { - 'begin': 0x1D400, - 'end': 0x1D7FF - }, - { - 'begin': 0xFF000, - 'end': 0xFFFFD - }, - { - 'begin': 0xFE00, - 'end': 0xFE0F - }, - { - 'begin': 0xE0000, - 'end': 0xE007F - }, - { - 'begin': 0x1900, - 'end': 0x194F - }, - { - 'begin': 0x1950, - 'end': 0x197F - }, - { - 'begin': 0x1980, - 'end': 0x19DF - }, - { - 'begin': 0x1A00, - 'end': 0x1A1F - }, - { - 'begin': 0x2C00, - 'end': 0x2C5F - }, - { - 'begin': 0x2D30, - 'end': 0x2D7F - }, - { - 'begin': 0x4DC0, - 'end': 0x4DFF - }, - { - 'begin': 0xA800, - 'end': 0xA82F - }, - { - 'begin': 0x10000, - 'end': 0x1007F - }, - { - 'begin': 0x10140, - 'end': 0x1018F - }, - { - 'begin': 0x10380, - 'end': 0x1039F - }, - { - 'begin': 0x103A0, - 'end': 0x103DF - }, - { - 'begin': 0x10450, - 'end': 0x1047F - }, - { - 'begin': 0x10480, - 'end': 0x104AF - }, - { - 'begin': 0x10800, - 'end': 0x1083F - }, - { - 'begin': 0x10A00, - 'end': 0x10A5F - }, - { - 'begin': 0x1D300, - 'end': 0x1D35F - }, - { - 'begin': 0x12000, - 'end': 0x123FF - }, - { - 'begin': 0x1D360, - 'end': 0x1D37F - }, - { - 'begin': 0x1B80, - 'end': 0x1BBF - }, - { - 'begin': 0x1C00, - 'end': 0x1C4F - }, - { - 'begin': 0x1C50, - 'end': 0x1C7F - }, - { - 'begin': 0xA880, - 'end': 0xA8DF - }, - { - 'begin': 0xA900, - 'end': 0xA92F - }, - { - 'begin': 0xA930, - 'end': 0xA95F - }, - { - 'begin': 0xAA00, - 'end': 0xAA5F - }, - { - 'begin': 0x10190, - 'end': 0x101CF - }, - { - 'begin': 0x101D0, - 'end': 0x101FF - }, - { - 'begin': 0x102A0, - 'end': 0x102DF - }, - { - 'begin': 0x1F030, - 'end': 0x1F09F - } -]; -function getUnicodeRangeFor(value) { - for (var i = 0, ii = UnicodeRanges.length; i < ii; i++) { - var range = UnicodeRanges[i]; - if (value >= range.begin && value < range.end) { - return i; - } - } - return -1; -} -function isRTLRangeFor(value) { - var range = UnicodeRanges[13]; - if (value >= range.begin && value < range.end) { - return true; - } - range = UnicodeRanges[11]; - if (value >= range.begin && value < range.end) { - return true; - } - return false; -} -var getNormalizedUnicodes = getLookupTableFactory(function (t) { - t['\u00A8'] = '\u0020\u0308'; - t['\u00AF'] = '\u0020\u0304'; - t['\u00B4'] = '\u0020\u0301'; - t['\u00B5'] = '\u03BC'; - t['\u00B8'] = '\u0020\u0327'; - t['\u0132'] = '\u0049\u004A'; - t['\u0133'] = '\u0069\u006A'; - t['\u013F'] = '\u004C\u00B7'; - t['\u0140'] = '\u006C\u00B7'; - t['\u0149'] = '\u02BC\u006E'; - t['\u017F'] = '\u0073'; - t['\u01C4'] = '\u0044\u017D'; - t['\u01C5'] = '\u0044\u017E'; - t['\u01C6'] = '\u0064\u017E'; - t['\u01C7'] = '\u004C\u004A'; - t['\u01C8'] = '\u004C\u006A'; - t['\u01C9'] = '\u006C\u006A'; - t['\u01CA'] = '\u004E\u004A'; - t['\u01CB'] = '\u004E\u006A'; - t['\u01CC'] = '\u006E\u006A'; - t['\u01F1'] = '\u0044\u005A'; - t['\u01F2'] = '\u0044\u007A'; - t['\u01F3'] = '\u0064\u007A'; - t['\u02D8'] = '\u0020\u0306'; - t['\u02D9'] = '\u0020\u0307'; - t['\u02DA'] = '\u0020\u030A'; - t['\u02DB'] = '\u0020\u0328'; - t['\u02DC'] = '\u0020\u0303'; - t['\u02DD'] = '\u0020\u030B'; - t['\u037A'] = '\u0020\u0345'; - t['\u0384'] = '\u0020\u0301'; - t['\u03D0'] = '\u03B2'; - t['\u03D1'] = '\u03B8'; - t['\u03D2'] = '\u03A5'; - t['\u03D5'] = '\u03C6'; - t['\u03D6'] = '\u03C0'; - t['\u03F0'] = '\u03BA'; - t['\u03F1'] = '\u03C1'; - t['\u03F2'] = '\u03C2'; - t['\u03F4'] = '\u0398'; - t['\u03F5'] = '\u03B5'; - t['\u03F9'] = '\u03A3'; - t['\u0587'] = '\u0565\u0582'; - t['\u0675'] = '\u0627\u0674'; - t['\u0676'] = '\u0648\u0674'; - t['\u0677'] = '\u06C7\u0674'; - t['\u0678'] = '\u064A\u0674'; - t['\u0E33'] = '\u0E4D\u0E32'; - t['\u0EB3'] = '\u0ECD\u0EB2'; - t['\u0EDC'] = '\u0EAB\u0E99'; - t['\u0EDD'] = '\u0EAB\u0EA1'; - t['\u0F77'] = '\u0FB2\u0F81'; - t['\u0F79'] = '\u0FB3\u0F81'; - t['\u1E9A'] = '\u0061\u02BE'; - t['\u1FBD'] = '\u0020\u0313'; - t['\u1FBF'] = '\u0020\u0313'; - t['\u1FC0'] = '\u0020\u0342'; - t['\u1FFE'] = '\u0020\u0314'; - t['\u2002'] = '\u0020'; - t['\u2003'] = '\u0020'; - t['\u2004'] = '\u0020'; - t['\u2005'] = '\u0020'; - t['\u2006'] = '\u0020'; - t['\u2008'] = '\u0020'; - t['\u2009'] = '\u0020'; - t['\u200A'] = '\u0020'; - t['\u2017'] = '\u0020\u0333'; - t['\u2024'] = '\u002E'; - t['\u2025'] = '\u002E\u002E'; - t['\u2026'] = '\u002E\u002E\u002E'; - t['\u2033'] = '\u2032\u2032'; - t['\u2034'] = '\u2032\u2032\u2032'; - t['\u2036'] = '\u2035\u2035'; - t['\u2037'] = '\u2035\u2035\u2035'; - t['\u203C'] = '\u0021\u0021'; - t['\u203E'] = '\u0020\u0305'; - t['\u2047'] = '\u003F\u003F'; - t['\u2048'] = '\u003F\u0021'; - t['\u2049'] = '\u0021\u003F'; - t['\u2057'] = '\u2032\u2032\u2032\u2032'; - t['\u205F'] = '\u0020'; - t['\u20A8'] = '\u0052\u0073'; - t['\u2100'] = '\u0061\u002F\u0063'; - t['\u2101'] = '\u0061\u002F\u0073'; - t['\u2103'] = '\u00B0\u0043'; - t['\u2105'] = '\u0063\u002F\u006F'; - t['\u2106'] = '\u0063\u002F\u0075'; - t['\u2107'] = '\u0190'; - t['\u2109'] = '\u00B0\u0046'; - t['\u2116'] = '\u004E\u006F'; - t['\u2121'] = '\u0054\u0045\u004C'; - t['\u2135'] = '\u05D0'; - t['\u2136'] = '\u05D1'; - t['\u2137'] = '\u05D2'; - t['\u2138'] = '\u05D3'; - t['\u213B'] = '\u0046\u0041\u0058'; - t['\u2160'] = '\u0049'; - t['\u2161'] = '\u0049\u0049'; - t['\u2162'] = '\u0049\u0049\u0049'; - t['\u2163'] = '\u0049\u0056'; - t['\u2164'] = '\u0056'; - t['\u2165'] = '\u0056\u0049'; - t['\u2166'] = '\u0056\u0049\u0049'; - t['\u2167'] = '\u0056\u0049\u0049\u0049'; - t['\u2168'] = '\u0049\u0058'; - t['\u2169'] = '\u0058'; - t['\u216A'] = '\u0058\u0049'; - t['\u216B'] = '\u0058\u0049\u0049'; - t['\u216C'] = '\u004C'; - t['\u216D'] = '\u0043'; - t['\u216E'] = '\u0044'; - t['\u216F'] = '\u004D'; - t['\u2170'] = '\u0069'; - t['\u2171'] = '\u0069\u0069'; - t['\u2172'] = '\u0069\u0069\u0069'; - t['\u2173'] = '\u0069\u0076'; - t['\u2174'] = '\u0076'; - t['\u2175'] = '\u0076\u0069'; - t['\u2176'] = '\u0076\u0069\u0069'; - t['\u2177'] = '\u0076\u0069\u0069\u0069'; - t['\u2178'] = '\u0069\u0078'; - t['\u2179'] = '\u0078'; - t['\u217A'] = '\u0078\u0069'; - t['\u217B'] = '\u0078\u0069\u0069'; - t['\u217C'] = '\u006C'; - t['\u217D'] = '\u0063'; - t['\u217E'] = '\u0064'; - t['\u217F'] = '\u006D'; - t['\u222C'] = '\u222B\u222B'; - t['\u222D'] = '\u222B\u222B\u222B'; - t['\u222F'] = '\u222E\u222E'; - t['\u2230'] = '\u222E\u222E\u222E'; - t['\u2474'] = '\u0028\u0031\u0029'; - t['\u2475'] = '\u0028\u0032\u0029'; - t['\u2476'] = '\u0028\u0033\u0029'; - t['\u2477'] = '\u0028\u0034\u0029'; - t['\u2478'] = '\u0028\u0035\u0029'; - t['\u2479'] = '\u0028\u0036\u0029'; - t['\u247A'] = '\u0028\u0037\u0029'; - t['\u247B'] = '\u0028\u0038\u0029'; - t['\u247C'] = '\u0028\u0039\u0029'; - t['\u247D'] = '\u0028\u0031\u0030\u0029'; - t['\u247E'] = '\u0028\u0031\u0031\u0029'; - t['\u247F'] = '\u0028\u0031\u0032\u0029'; - t['\u2480'] = '\u0028\u0031\u0033\u0029'; - t['\u2481'] = '\u0028\u0031\u0034\u0029'; - t['\u2482'] = '\u0028\u0031\u0035\u0029'; - t['\u2483'] = '\u0028\u0031\u0036\u0029'; - t['\u2484'] = '\u0028\u0031\u0037\u0029'; - t['\u2485'] = '\u0028\u0031\u0038\u0029'; - t['\u2486'] = '\u0028\u0031\u0039\u0029'; - t['\u2487'] = '\u0028\u0032\u0030\u0029'; - t['\u2488'] = '\u0031\u002E'; - t['\u2489'] = '\u0032\u002E'; - t['\u248A'] = '\u0033\u002E'; - t['\u248B'] = '\u0034\u002E'; - t['\u248C'] = '\u0035\u002E'; - t['\u248D'] = '\u0036\u002E'; - t['\u248E'] = '\u0037\u002E'; - t['\u248F'] = '\u0038\u002E'; - t['\u2490'] = '\u0039\u002E'; - t['\u2491'] = '\u0031\u0030\u002E'; - t['\u2492'] = '\u0031\u0031\u002E'; - t['\u2493'] = '\u0031\u0032\u002E'; - t['\u2494'] = '\u0031\u0033\u002E'; - t['\u2495'] = '\u0031\u0034\u002E'; - t['\u2496'] = '\u0031\u0035\u002E'; - t['\u2497'] = '\u0031\u0036\u002E'; - t['\u2498'] = '\u0031\u0037\u002E'; - t['\u2499'] = '\u0031\u0038\u002E'; - t['\u249A'] = '\u0031\u0039\u002E'; - t['\u249B'] = '\u0032\u0030\u002E'; - t['\u249C'] = '\u0028\u0061\u0029'; - t['\u249D'] = '\u0028\u0062\u0029'; - t['\u249E'] = '\u0028\u0063\u0029'; - t['\u249F'] = '\u0028\u0064\u0029'; - t['\u24A0'] = '\u0028\u0065\u0029'; - t['\u24A1'] = '\u0028\u0066\u0029'; - t['\u24A2'] = '\u0028\u0067\u0029'; - t['\u24A3'] = '\u0028\u0068\u0029'; - t['\u24A4'] = '\u0028\u0069\u0029'; - t['\u24A5'] = '\u0028\u006A\u0029'; - t['\u24A6'] = '\u0028\u006B\u0029'; - t['\u24A7'] = '\u0028\u006C\u0029'; - t['\u24A8'] = '\u0028\u006D\u0029'; - t['\u24A9'] = '\u0028\u006E\u0029'; - t['\u24AA'] = '\u0028\u006F\u0029'; - t['\u24AB'] = '\u0028\u0070\u0029'; - t['\u24AC'] = '\u0028\u0071\u0029'; - t['\u24AD'] = '\u0028\u0072\u0029'; - t['\u24AE'] = '\u0028\u0073\u0029'; - t['\u24AF'] = '\u0028\u0074\u0029'; - t['\u24B0'] = '\u0028\u0075\u0029'; - t['\u24B1'] = '\u0028\u0076\u0029'; - t['\u24B2'] = '\u0028\u0077\u0029'; - t['\u24B3'] = '\u0028\u0078\u0029'; - t['\u24B4'] = '\u0028\u0079\u0029'; - t['\u24B5'] = '\u0028\u007A\u0029'; - t['\u2A0C'] = '\u222B\u222B\u222B\u222B'; - t['\u2A74'] = '\u003A\u003A\u003D'; - t['\u2A75'] = '\u003D\u003D'; - t['\u2A76'] = '\u003D\u003D\u003D'; - t['\u2E9F'] = '\u6BCD'; - t['\u2EF3'] = '\u9F9F'; - t['\u2F00'] = '\u4E00'; - t['\u2F01'] = '\u4E28'; - t['\u2F02'] = '\u4E36'; - t['\u2F03'] = '\u4E3F'; - t['\u2F04'] = '\u4E59'; - t['\u2F05'] = '\u4E85'; - t['\u2F06'] = '\u4E8C'; - t['\u2F07'] = '\u4EA0'; - t['\u2F08'] = '\u4EBA'; - t['\u2F09'] = '\u513F'; - t['\u2F0A'] = '\u5165'; - t['\u2F0B'] = '\u516B'; - t['\u2F0C'] = '\u5182'; - t['\u2F0D'] = '\u5196'; - t['\u2F0E'] = '\u51AB'; - t['\u2F0F'] = '\u51E0'; - t['\u2F10'] = '\u51F5'; - t['\u2F11'] = '\u5200'; - t['\u2F12'] = '\u529B'; - t['\u2F13'] = '\u52F9'; - t['\u2F14'] = '\u5315'; - t['\u2F15'] = '\u531A'; - t['\u2F16'] = '\u5338'; - t['\u2F17'] = '\u5341'; - t['\u2F18'] = '\u535C'; - t['\u2F19'] = '\u5369'; - t['\u2F1A'] = '\u5382'; - t['\u2F1B'] = '\u53B6'; - t['\u2F1C'] = '\u53C8'; - t['\u2F1D'] = '\u53E3'; - t['\u2F1E'] = '\u56D7'; - t['\u2F1F'] = '\u571F'; - t['\u2F20'] = '\u58EB'; - t['\u2F21'] = '\u5902'; - t['\u2F22'] = '\u590A'; - t['\u2F23'] = '\u5915'; - t['\u2F24'] = '\u5927'; - t['\u2F25'] = '\u5973'; - t['\u2F26'] = '\u5B50'; - t['\u2F27'] = '\u5B80'; - t['\u2F28'] = '\u5BF8'; - t['\u2F29'] = '\u5C0F'; - t['\u2F2A'] = '\u5C22'; - t['\u2F2B'] = '\u5C38'; - t['\u2F2C'] = '\u5C6E'; - t['\u2F2D'] = '\u5C71'; - t['\u2F2E'] = '\u5DDB'; - t['\u2F2F'] = '\u5DE5'; - t['\u2F30'] = '\u5DF1'; - t['\u2F31'] = '\u5DFE'; - t['\u2F32'] = '\u5E72'; - t['\u2F33'] = '\u5E7A'; - t['\u2F34'] = '\u5E7F'; - t['\u2F35'] = '\u5EF4'; - t['\u2F36'] = '\u5EFE'; - t['\u2F37'] = '\u5F0B'; - t['\u2F38'] = '\u5F13'; - t['\u2F39'] = '\u5F50'; - t['\u2F3A'] = '\u5F61'; - t['\u2F3B'] = '\u5F73'; - t['\u2F3C'] = '\u5FC3'; - t['\u2F3D'] = '\u6208'; - t['\u2F3E'] = '\u6236'; - t['\u2F3F'] = '\u624B'; - t['\u2F40'] = '\u652F'; - t['\u2F41'] = '\u6534'; - t['\u2F42'] = '\u6587'; - t['\u2F43'] = '\u6597'; - t['\u2F44'] = '\u65A4'; - t['\u2F45'] = '\u65B9'; - t['\u2F46'] = '\u65E0'; - t['\u2F47'] = '\u65E5'; - t['\u2F48'] = '\u66F0'; - t['\u2F49'] = '\u6708'; - t['\u2F4A'] = '\u6728'; - t['\u2F4B'] = '\u6B20'; - t['\u2F4C'] = '\u6B62'; - t['\u2F4D'] = '\u6B79'; - t['\u2F4E'] = '\u6BB3'; - t['\u2F4F'] = '\u6BCB'; - t['\u2F50'] = '\u6BD4'; - t['\u2F51'] = '\u6BDB'; - t['\u2F52'] = '\u6C0F'; - t['\u2F53'] = '\u6C14'; - t['\u2F54'] = '\u6C34'; - t['\u2F55'] = '\u706B'; - t['\u2F56'] = '\u722A'; - t['\u2F57'] = '\u7236'; - t['\u2F58'] = '\u723B'; - t['\u2F59'] = '\u723F'; - t['\u2F5A'] = '\u7247'; - t['\u2F5B'] = '\u7259'; - t['\u2F5C'] = '\u725B'; - t['\u2F5D'] = '\u72AC'; - t['\u2F5E'] = '\u7384'; - t['\u2F5F'] = '\u7389'; - t['\u2F60'] = '\u74DC'; - t['\u2F61'] = '\u74E6'; - t['\u2F62'] = '\u7518'; - t['\u2F63'] = '\u751F'; - t['\u2F64'] = '\u7528'; - t['\u2F65'] = '\u7530'; - t['\u2F66'] = '\u758B'; - t['\u2F67'] = '\u7592'; - t['\u2F68'] = '\u7676'; - t['\u2F69'] = '\u767D'; - t['\u2F6A'] = '\u76AE'; - t['\u2F6B'] = '\u76BF'; - t['\u2F6C'] = '\u76EE'; - t['\u2F6D'] = '\u77DB'; - t['\u2F6E'] = '\u77E2'; - t['\u2F6F'] = '\u77F3'; - t['\u2F70'] = '\u793A'; - t['\u2F71'] = '\u79B8'; - t['\u2F72'] = '\u79BE'; - t['\u2F73'] = '\u7A74'; - t['\u2F74'] = '\u7ACB'; - t['\u2F75'] = '\u7AF9'; - t['\u2F76'] = '\u7C73'; - t['\u2F77'] = '\u7CF8'; - t['\u2F78'] = '\u7F36'; - t['\u2F79'] = '\u7F51'; - t['\u2F7A'] = '\u7F8A'; - t['\u2F7B'] = '\u7FBD'; - t['\u2F7C'] = '\u8001'; - t['\u2F7D'] = '\u800C'; - t['\u2F7E'] = '\u8012'; - t['\u2F7F'] = '\u8033'; - t['\u2F80'] = '\u807F'; - t['\u2F81'] = '\u8089'; - t['\u2F82'] = '\u81E3'; - t['\u2F83'] = '\u81EA'; - t['\u2F84'] = '\u81F3'; - t['\u2F85'] = '\u81FC'; - t['\u2F86'] = '\u820C'; - t['\u2F87'] = '\u821B'; - t['\u2F88'] = '\u821F'; - t['\u2F89'] = '\u826E'; - t['\u2F8A'] = '\u8272'; - t['\u2F8B'] = '\u8278'; - t['\u2F8C'] = '\u864D'; - t['\u2F8D'] = '\u866B'; - t['\u2F8E'] = '\u8840'; - t['\u2F8F'] = '\u884C'; - t['\u2F90'] = '\u8863'; - t['\u2F91'] = '\u897E'; - t['\u2F92'] = '\u898B'; - t['\u2F93'] = '\u89D2'; - t['\u2F94'] = '\u8A00'; - t['\u2F95'] = '\u8C37'; - t['\u2F96'] = '\u8C46'; - t['\u2F97'] = '\u8C55'; - t['\u2F98'] = '\u8C78'; - t['\u2F99'] = '\u8C9D'; - t['\u2F9A'] = '\u8D64'; - t['\u2F9B'] = '\u8D70'; - t['\u2F9C'] = '\u8DB3'; - t['\u2F9D'] = '\u8EAB'; - t['\u2F9E'] = '\u8ECA'; - t['\u2F9F'] = '\u8F9B'; - t['\u2FA0'] = '\u8FB0'; - t['\u2FA1'] = '\u8FB5'; - t['\u2FA2'] = '\u9091'; - t['\u2FA3'] = '\u9149'; - t['\u2FA4'] = '\u91C6'; - t['\u2FA5'] = '\u91CC'; - t['\u2FA6'] = '\u91D1'; - t['\u2FA7'] = '\u9577'; - t['\u2FA8'] = '\u9580'; - t['\u2FA9'] = '\u961C'; - t['\u2FAA'] = '\u96B6'; - t['\u2FAB'] = '\u96B9'; - t['\u2FAC'] = '\u96E8'; - t['\u2FAD'] = '\u9751'; - t['\u2FAE'] = '\u975E'; - t['\u2FAF'] = '\u9762'; - t['\u2FB0'] = '\u9769'; - t['\u2FB1'] = '\u97CB'; - t['\u2FB2'] = '\u97ED'; - t['\u2FB3'] = '\u97F3'; - t['\u2FB4'] = '\u9801'; - t['\u2FB5'] = '\u98A8'; - t['\u2FB6'] = '\u98DB'; - t['\u2FB7'] = '\u98DF'; - t['\u2FB8'] = '\u9996'; - t['\u2FB9'] = '\u9999'; - t['\u2FBA'] = '\u99AC'; - t['\u2FBB'] = '\u9AA8'; - t['\u2FBC'] = '\u9AD8'; - t['\u2FBD'] = '\u9ADF'; - t['\u2FBE'] = '\u9B25'; - t['\u2FBF'] = '\u9B2F'; - t['\u2FC0'] = '\u9B32'; - t['\u2FC1'] = '\u9B3C'; - t['\u2FC2'] = '\u9B5A'; - t['\u2FC3'] = '\u9CE5'; - t['\u2FC4'] = '\u9E75'; - t['\u2FC5'] = '\u9E7F'; - t['\u2FC6'] = '\u9EA5'; - t['\u2FC7'] = '\u9EBB'; - t['\u2FC8'] = '\u9EC3'; - t['\u2FC9'] = '\u9ECD'; - t['\u2FCA'] = '\u9ED1'; - t['\u2FCB'] = '\u9EF9'; - t['\u2FCC'] = '\u9EFD'; - t['\u2FCD'] = '\u9F0E'; - t['\u2FCE'] = '\u9F13'; - t['\u2FCF'] = '\u9F20'; - t['\u2FD0'] = '\u9F3B'; - t['\u2FD1'] = '\u9F4A'; - t['\u2FD2'] = '\u9F52'; - t['\u2FD3'] = '\u9F8D'; - t['\u2FD4'] = '\u9F9C'; - t['\u2FD5'] = '\u9FA0'; - t['\u3036'] = '\u3012'; - t['\u3038'] = '\u5341'; - t['\u3039'] = '\u5344'; - t['\u303A'] = '\u5345'; - t['\u309B'] = '\u0020\u3099'; - t['\u309C'] = '\u0020\u309A'; - t['\u3131'] = '\u1100'; - t['\u3132'] = '\u1101'; - t['\u3133'] = '\u11AA'; - t['\u3134'] = '\u1102'; - t['\u3135'] = '\u11AC'; - t['\u3136'] = '\u11AD'; - t['\u3137'] = '\u1103'; - t['\u3138'] = '\u1104'; - t['\u3139'] = '\u1105'; - t['\u313A'] = '\u11B0'; - t['\u313B'] = '\u11B1'; - t['\u313C'] = '\u11B2'; - t['\u313D'] = '\u11B3'; - t['\u313E'] = '\u11B4'; - t['\u313F'] = '\u11B5'; - t['\u3140'] = '\u111A'; - t['\u3141'] = '\u1106'; - t['\u3142'] = '\u1107'; - t['\u3143'] = '\u1108'; - t['\u3144'] = '\u1121'; - t['\u3145'] = '\u1109'; - t['\u3146'] = '\u110A'; - t['\u3147'] = '\u110B'; - t['\u3148'] = '\u110C'; - t['\u3149'] = '\u110D'; - t['\u314A'] = '\u110E'; - t['\u314B'] = '\u110F'; - t['\u314C'] = '\u1110'; - t['\u314D'] = '\u1111'; - t['\u314E'] = '\u1112'; - t['\u314F'] = '\u1161'; - t['\u3150'] = '\u1162'; - t['\u3151'] = '\u1163'; - t['\u3152'] = '\u1164'; - t['\u3153'] = '\u1165'; - t['\u3154'] = '\u1166'; - t['\u3155'] = '\u1167'; - t['\u3156'] = '\u1168'; - t['\u3157'] = '\u1169'; - t['\u3158'] = '\u116A'; - t['\u3159'] = '\u116B'; - t['\u315A'] = '\u116C'; - t['\u315B'] = '\u116D'; - t['\u315C'] = '\u116E'; - t['\u315D'] = '\u116F'; - t['\u315E'] = '\u1170'; - t['\u315F'] = '\u1171'; - t['\u3160'] = '\u1172'; - t['\u3161'] = '\u1173'; - t['\u3162'] = '\u1174'; - t['\u3163'] = '\u1175'; - t['\u3164'] = '\u1160'; - t['\u3165'] = '\u1114'; - t['\u3166'] = '\u1115'; - t['\u3167'] = '\u11C7'; - t['\u3168'] = '\u11C8'; - t['\u3169'] = '\u11CC'; - t['\u316A'] = '\u11CE'; - t['\u316B'] = '\u11D3'; - t['\u316C'] = '\u11D7'; - t['\u316D'] = '\u11D9'; - t['\u316E'] = '\u111C'; - t['\u316F'] = '\u11DD'; - t['\u3170'] = '\u11DF'; - t['\u3171'] = '\u111D'; - t['\u3172'] = '\u111E'; - t['\u3173'] = '\u1120'; - t['\u3174'] = '\u1122'; - t['\u3175'] = '\u1123'; - t['\u3176'] = '\u1127'; - t['\u3177'] = '\u1129'; - t['\u3178'] = '\u112B'; - t['\u3179'] = '\u112C'; - t['\u317A'] = '\u112D'; - t['\u317B'] = '\u112E'; - t['\u317C'] = '\u112F'; - t['\u317D'] = '\u1132'; - t['\u317E'] = '\u1136'; - t['\u317F'] = '\u1140'; - t['\u3180'] = '\u1147'; - t['\u3181'] = '\u114C'; - t['\u3182'] = '\u11F1'; - t['\u3183'] = '\u11F2'; - t['\u3184'] = '\u1157'; - t['\u3185'] = '\u1158'; - t['\u3186'] = '\u1159'; - t['\u3187'] = '\u1184'; - t['\u3188'] = '\u1185'; - t['\u3189'] = '\u1188'; - t['\u318A'] = '\u1191'; - t['\u318B'] = '\u1192'; - t['\u318C'] = '\u1194'; - t['\u318D'] = '\u119E'; - t['\u318E'] = '\u11A1'; - t['\u3200'] = '\u0028\u1100\u0029'; - t['\u3201'] = '\u0028\u1102\u0029'; - t['\u3202'] = '\u0028\u1103\u0029'; - t['\u3203'] = '\u0028\u1105\u0029'; - t['\u3204'] = '\u0028\u1106\u0029'; - t['\u3205'] = '\u0028\u1107\u0029'; - t['\u3206'] = '\u0028\u1109\u0029'; - t['\u3207'] = '\u0028\u110B\u0029'; - t['\u3208'] = '\u0028\u110C\u0029'; - t['\u3209'] = '\u0028\u110E\u0029'; - t['\u320A'] = '\u0028\u110F\u0029'; - t['\u320B'] = '\u0028\u1110\u0029'; - t['\u320C'] = '\u0028\u1111\u0029'; - t['\u320D'] = '\u0028\u1112\u0029'; - t['\u320E'] = '\u0028\u1100\u1161\u0029'; - t['\u320F'] = '\u0028\u1102\u1161\u0029'; - t['\u3210'] = '\u0028\u1103\u1161\u0029'; - t['\u3211'] = '\u0028\u1105\u1161\u0029'; - t['\u3212'] = '\u0028\u1106\u1161\u0029'; - t['\u3213'] = '\u0028\u1107\u1161\u0029'; - t['\u3214'] = '\u0028\u1109\u1161\u0029'; - t['\u3215'] = '\u0028\u110B\u1161\u0029'; - t['\u3216'] = '\u0028\u110C\u1161\u0029'; - t['\u3217'] = '\u0028\u110E\u1161\u0029'; - t['\u3218'] = '\u0028\u110F\u1161\u0029'; - t['\u3219'] = '\u0028\u1110\u1161\u0029'; - t['\u321A'] = '\u0028\u1111\u1161\u0029'; - t['\u321B'] = '\u0028\u1112\u1161\u0029'; - t['\u321C'] = '\u0028\u110C\u116E\u0029'; - t['\u321D'] = '\u0028\u110B\u1169\u110C\u1165\u11AB\u0029'; - t['\u321E'] = '\u0028\u110B\u1169\u1112\u116E\u0029'; - t['\u3220'] = '\u0028\u4E00\u0029'; - t['\u3221'] = '\u0028\u4E8C\u0029'; - t['\u3222'] = '\u0028\u4E09\u0029'; - t['\u3223'] = '\u0028\u56DB\u0029'; - t['\u3224'] = '\u0028\u4E94\u0029'; - t['\u3225'] = '\u0028\u516D\u0029'; - t['\u3226'] = '\u0028\u4E03\u0029'; - t['\u3227'] = '\u0028\u516B\u0029'; - t['\u3228'] = '\u0028\u4E5D\u0029'; - t['\u3229'] = '\u0028\u5341\u0029'; - t['\u322A'] = '\u0028\u6708\u0029'; - t['\u322B'] = '\u0028\u706B\u0029'; - t['\u322C'] = '\u0028\u6C34\u0029'; - t['\u322D'] = '\u0028\u6728\u0029'; - t['\u322E'] = '\u0028\u91D1\u0029'; - t['\u322F'] = '\u0028\u571F\u0029'; - t['\u3230'] = '\u0028\u65E5\u0029'; - t['\u3231'] = '\u0028\u682A\u0029'; - t['\u3232'] = '\u0028\u6709\u0029'; - t['\u3233'] = '\u0028\u793E\u0029'; - t['\u3234'] = '\u0028\u540D\u0029'; - t['\u3235'] = '\u0028\u7279\u0029'; - t['\u3236'] = '\u0028\u8CA1\u0029'; - t['\u3237'] = '\u0028\u795D\u0029'; - t['\u3238'] = '\u0028\u52B4\u0029'; - t['\u3239'] = '\u0028\u4EE3\u0029'; - t['\u323A'] = '\u0028\u547C\u0029'; - t['\u323B'] = '\u0028\u5B66\u0029'; - t['\u323C'] = '\u0028\u76E3\u0029'; - t['\u323D'] = '\u0028\u4F01\u0029'; - t['\u323E'] = '\u0028\u8CC7\u0029'; - t['\u323F'] = '\u0028\u5354\u0029'; - t['\u3240'] = '\u0028\u796D\u0029'; - t['\u3241'] = '\u0028\u4F11\u0029'; - t['\u3242'] = '\u0028\u81EA\u0029'; - t['\u3243'] = '\u0028\u81F3\u0029'; - t['\u32C0'] = '\u0031\u6708'; - t['\u32C1'] = '\u0032\u6708'; - t['\u32C2'] = '\u0033\u6708'; - t['\u32C3'] = '\u0034\u6708'; - t['\u32C4'] = '\u0035\u6708'; - t['\u32C5'] = '\u0036\u6708'; - t['\u32C6'] = '\u0037\u6708'; - t['\u32C7'] = '\u0038\u6708'; - t['\u32C8'] = '\u0039\u6708'; - t['\u32C9'] = '\u0031\u0030\u6708'; - t['\u32CA'] = '\u0031\u0031\u6708'; - t['\u32CB'] = '\u0031\u0032\u6708'; - t['\u3358'] = '\u0030\u70B9'; - t['\u3359'] = '\u0031\u70B9'; - t['\u335A'] = '\u0032\u70B9'; - t['\u335B'] = '\u0033\u70B9'; - t['\u335C'] = '\u0034\u70B9'; - t['\u335D'] = '\u0035\u70B9'; - t['\u335E'] = '\u0036\u70B9'; - t['\u335F'] = '\u0037\u70B9'; - t['\u3360'] = '\u0038\u70B9'; - t['\u3361'] = '\u0039\u70B9'; - t['\u3362'] = '\u0031\u0030\u70B9'; - t['\u3363'] = '\u0031\u0031\u70B9'; - t['\u3364'] = '\u0031\u0032\u70B9'; - t['\u3365'] = '\u0031\u0033\u70B9'; - t['\u3366'] = '\u0031\u0034\u70B9'; - t['\u3367'] = '\u0031\u0035\u70B9'; - t['\u3368'] = '\u0031\u0036\u70B9'; - t['\u3369'] = '\u0031\u0037\u70B9'; - t['\u336A'] = '\u0031\u0038\u70B9'; - t['\u336B'] = '\u0031\u0039\u70B9'; - t['\u336C'] = '\u0032\u0030\u70B9'; - t['\u336D'] = '\u0032\u0031\u70B9'; - t['\u336E'] = '\u0032\u0032\u70B9'; - t['\u336F'] = '\u0032\u0033\u70B9'; - t['\u3370'] = '\u0032\u0034\u70B9'; - t['\u33E0'] = '\u0031\u65E5'; - t['\u33E1'] = '\u0032\u65E5'; - t['\u33E2'] = '\u0033\u65E5'; - t['\u33E3'] = '\u0034\u65E5'; - t['\u33E4'] = '\u0035\u65E5'; - t['\u33E5'] = '\u0036\u65E5'; - t['\u33E6'] = '\u0037\u65E5'; - t['\u33E7'] = '\u0038\u65E5'; - t['\u33E8'] = '\u0039\u65E5'; - t['\u33E9'] = '\u0031\u0030\u65E5'; - t['\u33EA'] = '\u0031\u0031\u65E5'; - t['\u33EB'] = '\u0031\u0032\u65E5'; - t['\u33EC'] = '\u0031\u0033\u65E5'; - t['\u33ED'] = '\u0031\u0034\u65E5'; - t['\u33EE'] = '\u0031\u0035\u65E5'; - t['\u33EF'] = '\u0031\u0036\u65E5'; - t['\u33F0'] = '\u0031\u0037\u65E5'; - t['\u33F1'] = '\u0031\u0038\u65E5'; - t['\u33F2'] = '\u0031\u0039\u65E5'; - t['\u33F3'] = '\u0032\u0030\u65E5'; - t['\u33F4'] = '\u0032\u0031\u65E5'; - t['\u33F5'] = '\u0032\u0032\u65E5'; - t['\u33F6'] = '\u0032\u0033\u65E5'; - t['\u33F7'] = '\u0032\u0034\u65E5'; - t['\u33F8'] = '\u0032\u0035\u65E5'; - t['\u33F9'] = '\u0032\u0036\u65E5'; - t['\u33FA'] = '\u0032\u0037\u65E5'; - t['\u33FB'] = '\u0032\u0038\u65E5'; - t['\u33FC'] = '\u0032\u0039\u65E5'; - t['\u33FD'] = '\u0033\u0030\u65E5'; - t['\u33FE'] = '\u0033\u0031\u65E5'; - t['\uFB00'] = '\u0066\u0066'; - t['\uFB01'] = '\u0066\u0069'; - t['\uFB02'] = '\u0066\u006C'; - t['\uFB03'] = '\u0066\u0066\u0069'; - t['\uFB04'] = '\u0066\u0066\u006C'; - t['\uFB05'] = '\u017F\u0074'; - t['\uFB06'] = '\u0073\u0074'; - t['\uFB13'] = '\u0574\u0576'; - t['\uFB14'] = '\u0574\u0565'; - t['\uFB15'] = '\u0574\u056B'; - t['\uFB16'] = '\u057E\u0576'; - t['\uFB17'] = '\u0574\u056D'; - t['\uFB4F'] = '\u05D0\u05DC'; - t['\uFB50'] = '\u0671'; - t['\uFB51'] = '\u0671'; - t['\uFB52'] = '\u067B'; - t['\uFB53'] = '\u067B'; - t['\uFB54'] = '\u067B'; - t['\uFB55'] = '\u067B'; - t['\uFB56'] = '\u067E'; - t['\uFB57'] = '\u067E'; - t['\uFB58'] = '\u067E'; - t['\uFB59'] = '\u067E'; - t['\uFB5A'] = '\u0680'; - t['\uFB5B'] = '\u0680'; - t['\uFB5C'] = '\u0680'; - t['\uFB5D'] = '\u0680'; - t['\uFB5E'] = '\u067A'; - t['\uFB5F'] = '\u067A'; - t['\uFB60'] = '\u067A'; - t['\uFB61'] = '\u067A'; - t['\uFB62'] = '\u067F'; - t['\uFB63'] = '\u067F'; - t['\uFB64'] = '\u067F'; - t['\uFB65'] = '\u067F'; - t['\uFB66'] = '\u0679'; - t['\uFB67'] = '\u0679'; - t['\uFB68'] = '\u0679'; - t['\uFB69'] = '\u0679'; - t['\uFB6A'] = '\u06A4'; - t['\uFB6B'] = '\u06A4'; - t['\uFB6C'] = '\u06A4'; - t['\uFB6D'] = '\u06A4'; - t['\uFB6E'] = '\u06A6'; - t['\uFB6F'] = '\u06A6'; - t['\uFB70'] = '\u06A6'; - t['\uFB71'] = '\u06A6'; - t['\uFB72'] = '\u0684'; - t['\uFB73'] = '\u0684'; - t['\uFB74'] = '\u0684'; - t['\uFB75'] = '\u0684'; - t['\uFB76'] = '\u0683'; - t['\uFB77'] = '\u0683'; - t['\uFB78'] = '\u0683'; - t['\uFB79'] = '\u0683'; - t['\uFB7A'] = '\u0686'; - t['\uFB7B'] = '\u0686'; - t['\uFB7C'] = '\u0686'; - t['\uFB7D'] = '\u0686'; - t['\uFB7E'] = '\u0687'; - t['\uFB7F'] = '\u0687'; - t['\uFB80'] = '\u0687'; - t['\uFB81'] = '\u0687'; - t['\uFB82'] = '\u068D'; - t['\uFB83'] = '\u068D'; - t['\uFB84'] = '\u068C'; - t['\uFB85'] = '\u068C'; - t['\uFB86'] = '\u068E'; - t['\uFB87'] = '\u068E'; - t['\uFB88'] = '\u0688'; - t['\uFB89'] = '\u0688'; - t['\uFB8A'] = '\u0698'; - t['\uFB8B'] = '\u0698'; - t['\uFB8C'] = '\u0691'; - t['\uFB8D'] = '\u0691'; - t['\uFB8E'] = '\u06A9'; - t['\uFB8F'] = '\u06A9'; - t['\uFB90'] = '\u06A9'; - t['\uFB91'] = '\u06A9'; - t['\uFB92'] = '\u06AF'; - t['\uFB93'] = '\u06AF'; - t['\uFB94'] = '\u06AF'; - t['\uFB95'] = '\u06AF'; - t['\uFB96'] = '\u06B3'; - t['\uFB97'] = '\u06B3'; - t['\uFB98'] = '\u06B3'; - t['\uFB99'] = '\u06B3'; - t['\uFB9A'] = '\u06B1'; - t['\uFB9B'] = '\u06B1'; - t['\uFB9C'] = '\u06B1'; - t['\uFB9D'] = '\u06B1'; - t['\uFB9E'] = '\u06BA'; - t['\uFB9F'] = '\u06BA'; - t['\uFBA0'] = '\u06BB'; - t['\uFBA1'] = '\u06BB'; - t['\uFBA2'] = '\u06BB'; - t['\uFBA3'] = '\u06BB'; - t['\uFBA4'] = '\u06C0'; - t['\uFBA5'] = '\u06C0'; - t['\uFBA6'] = '\u06C1'; - t['\uFBA7'] = '\u06C1'; - t['\uFBA8'] = '\u06C1'; - t['\uFBA9'] = '\u06C1'; - t['\uFBAA'] = '\u06BE'; - t['\uFBAB'] = '\u06BE'; - t['\uFBAC'] = '\u06BE'; - t['\uFBAD'] = '\u06BE'; - t['\uFBAE'] = '\u06D2'; - t['\uFBAF'] = '\u06D2'; - t['\uFBB0'] = '\u06D3'; - t['\uFBB1'] = '\u06D3'; - t['\uFBD3'] = '\u06AD'; - t['\uFBD4'] = '\u06AD'; - t['\uFBD5'] = '\u06AD'; - t['\uFBD6'] = '\u06AD'; - t['\uFBD7'] = '\u06C7'; - t['\uFBD8'] = '\u06C7'; - t['\uFBD9'] = '\u06C6'; - t['\uFBDA'] = '\u06C6'; - t['\uFBDB'] = '\u06C8'; - t['\uFBDC'] = '\u06C8'; - t['\uFBDD'] = '\u0677'; - t['\uFBDE'] = '\u06CB'; - t['\uFBDF'] = '\u06CB'; - t['\uFBE0'] = '\u06C5'; - t['\uFBE1'] = '\u06C5'; - t['\uFBE2'] = '\u06C9'; - t['\uFBE3'] = '\u06C9'; - t['\uFBE4'] = '\u06D0'; - t['\uFBE5'] = '\u06D0'; - t['\uFBE6'] = '\u06D0'; - t['\uFBE7'] = '\u06D0'; - t['\uFBE8'] = '\u0649'; - t['\uFBE9'] = '\u0649'; - t['\uFBEA'] = '\u0626\u0627'; - t['\uFBEB'] = '\u0626\u0627'; - t['\uFBEC'] = '\u0626\u06D5'; - t['\uFBED'] = '\u0626\u06D5'; - t['\uFBEE'] = '\u0626\u0648'; - t['\uFBEF'] = '\u0626\u0648'; - t['\uFBF0'] = '\u0626\u06C7'; - t['\uFBF1'] = '\u0626\u06C7'; - t['\uFBF2'] = '\u0626\u06C6'; - t['\uFBF3'] = '\u0626\u06C6'; - t['\uFBF4'] = '\u0626\u06C8'; - t['\uFBF5'] = '\u0626\u06C8'; - t['\uFBF6'] = '\u0626\u06D0'; - t['\uFBF7'] = '\u0626\u06D0'; - t['\uFBF8'] = '\u0626\u06D0'; - t['\uFBF9'] = '\u0626\u0649'; - t['\uFBFA'] = '\u0626\u0649'; - t['\uFBFB'] = '\u0626\u0649'; - t['\uFBFC'] = '\u06CC'; - t['\uFBFD'] = '\u06CC'; - t['\uFBFE'] = '\u06CC'; - t['\uFBFF'] = '\u06CC'; - t['\uFC00'] = '\u0626\u062C'; - t['\uFC01'] = '\u0626\u062D'; - t['\uFC02'] = '\u0626\u0645'; - t['\uFC03'] = '\u0626\u0649'; - t['\uFC04'] = '\u0626\u064A'; - t['\uFC05'] = '\u0628\u062C'; - t['\uFC06'] = '\u0628\u062D'; - t['\uFC07'] = '\u0628\u062E'; - t['\uFC08'] = '\u0628\u0645'; - t['\uFC09'] = '\u0628\u0649'; - t['\uFC0A'] = '\u0628\u064A'; - t['\uFC0B'] = '\u062A\u062C'; - t['\uFC0C'] = '\u062A\u062D'; - t['\uFC0D'] = '\u062A\u062E'; - t['\uFC0E'] = '\u062A\u0645'; - t['\uFC0F'] = '\u062A\u0649'; - t['\uFC10'] = '\u062A\u064A'; - t['\uFC11'] = '\u062B\u062C'; - t['\uFC12'] = '\u062B\u0645'; - t['\uFC13'] = '\u062B\u0649'; - t['\uFC14'] = '\u062B\u064A'; - t['\uFC15'] = '\u062C\u062D'; - t['\uFC16'] = '\u062C\u0645'; - t['\uFC17'] = '\u062D\u062C'; - t['\uFC18'] = '\u062D\u0645'; - t['\uFC19'] = '\u062E\u062C'; - t['\uFC1A'] = '\u062E\u062D'; - t['\uFC1B'] = '\u062E\u0645'; - t['\uFC1C'] = '\u0633\u062C'; - t['\uFC1D'] = '\u0633\u062D'; - t['\uFC1E'] = '\u0633\u062E'; - t['\uFC1F'] = '\u0633\u0645'; - t['\uFC20'] = '\u0635\u062D'; - t['\uFC21'] = '\u0635\u0645'; - t['\uFC22'] = '\u0636\u062C'; - t['\uFC23'] = '\u0636\u062D'; - t['\uFC24'] = '\u0636\u062E'; - t['\uFC25'] = '\u0636\u0645'; - t['\uFC26'] = '\u0637\u062D'; - t['\uFC27'] = '\u0637\u0645'; - t['\uFC28'] = '\u0638\u0645'; - t['\uFC29'] = '\u0639\u062C'; - t['\uFC2A'] = '\u0639\u0645'; - t['\uFC2B'] = '\u063A\u062C'; - t['\uFC2C'] = '\u063A\u0645'; - t['\uFC2D'] = '\u0641\u062C'; - t['\uFC2E'] = '\u0641\u062D'; - t['\uFC2F'] = '\u0641\u062E'; - t['\uFC30'] = '\u0641\u0645'; - t['\uFC31'] = '\u0641\u0649'; - t['\uFC32'] = '\u0641\u064A'; - t['\uFC33'] = '\u0642\u062D'; - t['\uFC34'] = '\u0642\u0645'; - t['\uFC35'] = '\u0642\u0649'; - t['\uFC36'] = '\u0642\u064A'; - t['\uFC37'] = '\u0643\u0627'; - t['\uFC38'] = '\u0643\u062C'; - t['\uFC39'] = '\u0643\u062D'; - t['\uFC3A'] = '\u0643\u062E'; - t['\uFC3B'] = '\u0643\u0644'; - t['\uFC3C'] = '\u0643\u0645'; - t['\uFC3D'] = '\u0643\u0649'; - t['\uFC3E'] = '\u0643\u064A'; - t['\uFC3F'] = '\u0644\u062C'; - t['\uFC40'] = '\u0644\u062D'; - t['\uFC41'] = '\u0644\u062E'; - t['\uFC42'] = '\u0644\u0645'; - t['\uFC43'] = '\u0644\u0649'; - t['\uFC44'] = '\u0644\u064A'; - t['\uFC45'] = '\u0645\u062C'; - t['\uFC46'] = '\u0645\u062D'; - t['\uFC47'] = '\u0645\u062E'; - t['\uFC48'] = '\u0645\u0645'; - t['\uFC49'] = '\u0645\u0649'; - t['\uFC4A'] = '\u0645\u064A'; - t['\uFC4B'] = '\u0646\u062C'; - t['\uFC4C'] = '\u0646\u062D'; - t['\uFC4D'] = '\u0646\u062E'; - t['\uFC4E'] = '\u0646\u0645'; - t['\uFC4F'] = '\u0646\u0649'; - t['\uFC50'] = '\u0646\u064A'; - t['\uFC51'] = '\u0647\u062C'; - t['\uFC52'] = '\u0647\u0645'; - t['\uFC53'] = '\u0647\u0649'; - t['\uFC54'] = '\u0647\u064A'; - t['\uFC55'] = '\u064A\u062C'; - t['\uFC56'] = '\u064A\u062D'; - t['\uFC57'] = '\u064A\u062E'; - t['\uFC58'] = '\u064A\u0645'; - t['\uFC59'] = '\u064A\u0649'; - t['\uFC5A'] = '\u064A\u064A'; - t['\uFC5B'] = '\u0630\u0670'; - t['\uFC5C'] = '\u0631\u0670'; - t['\uFC5D'] = '\u0649\u0670'; - t['\uFC5E'] = '\u0020\u064C\u0651'; - t['\uFC5F'] = '\u0020\u064D\u0651'; - t['\uFC60'] = '\u0020\u064E\u0651'; - t['\uFC61'] = '\u0020\u064F\u0651'; - t['\uFC62'] = '\u0020\u0650\u0651'; - t['\uFC63'] = '\u0020\u0651\u0670'; - t['\uFC64'] = '\u0626\u0631'; - t['\uFC65'] = '\u0626\u0632'; - t['\uFC66'] = '\u0626\u0645'; - t['\uFC67'] = '\u0626\u0646'; - t['\uFC68'] = '\u0626\u0649'; - t['\uFC69'] = '\u0626\u064A'; - t['\uFC6A'] = '\u0628\u0631'; - t['\uFC6B'] = '\u0628\u0632'; - t['\uFC6C'] = '\u0628\u0645'; - t['\uFC6D'] = '\u0628\u0646'; - t['\uFC6E'] = '\u0628\u0649'; - t['\uFC6F'] = '\u0628\u064A'; - t['\uFC70'] = '\u062A\u0631'; - t['\uFC71'] = '\u062A\u0632'; - t['\uFC72'] = '\u062A\u0645'; - t['\uFC73'] = '\u062A\u0646'; - t['\uFC74'] = '\u062A\u0649'; - t['\uFC75'] = '\u062A\u064A'; - t['\uFC76'] = '\u062B\u0631'; - t['\uFC77'] = '\u062B\u0632'; - t['\uFC78'] = '\u062B\u0645'; - t['\uFC79'] = '\u062B\u0646'; - t['\uFC7A'] = '\u062B\u0649'; - t['\uFC7B'] = '\u062B\u064A'; - t['\uFC7C'] = '\u0641\u0649'; - t['\uFC7D'] = '\u0641\u064A'; - t['\uFC7E'] = '\u0642\u0649'; - t['\uFC7F'] = '\u0642\u064A'; - t['\uFC80'] = '\u0643\u0627'; - t['\uFC81'] = '\u0643\u0644'; - t['\uFC82'] = '\u0643\u0645'; - t['\uFC83'] = '\u0643\u0649'; - t['\uFC84'] = '\u0643\u064A'; - t['\uFC85'] = '\u0644\u0645'; - t['\uFC86'] = '\u0644\u0649'; - t['\uFC87'] = '\u0644\u064A'; - t['\uFC88'] = '\u0645\u0627'; - t['\uFC89'] = '\u0645\u0645'; - t['\uFC8A'] = '\u0646\u0631'; - t['\uFC8B'] = '\u0646\u0632'; - t['\uFC8C'] = '\u0646\u0645'; - t['\uFC8D'] = '\u0646\u0646'; - t['\uFC8E'] = '\u0646\u0649'; - t['\uFC8F'] = '\u0646\u064A'; - t['\uFC90'] = '\u0649\u0670'; - t['\uFC91'] = '\u064A\u0631'; - t['\uFC92'] = '\u064A\u0632'; - t['\uFC93'] = '\u064A\u0645'; - t['\uFC94'] = '\u064A\u0646'; - t['\uFC95'] = '\u064A\u0649'; - t['\uFC96'] = '\u064A\u064A'; - t['\uFC97'] = '\u0626\u062C'; - t['\uFC98'] = '\u0626\u062D'; - t['\uFC99'] = '\u0626\u062E'; - t['\uFC9A'] = '\u0626\u0645'; - t['\uFC9B'] = '\u0626\u0647'; - t['\uFC9C'] = '\u0628\u062C'; - t['\uFC9D'] = '\u0628\u062D'; - t['\uFC9E'] = '\u0628\u062E'; - t['\uFC9F'] = '\u0628\u0645'; - t['\uFCA0'] = '\u0628\u0647'; - t['\uFCA1'] = '\u062A\u062C'; - t['\uFCA2'] = '\u062A\u062D'; - t['\uFCA3'] = '\u062A\u062E'; - t['\uFCA4'] = '\u062A\u0645'; - t['\uFCA5'] = '\u062A\u0647'; - t['\uFCA6'] = '\u062B\u0645'; - t['\uFCA7'] = '\u062C\u062D'; - t['\uFCA8'] = '\u062C\u0645'; - t['\uFCA9'] = '\u062D\u062C'; - t['\uFCAA'] = '\u062D\u0645'; - t['\uFCAB'] = '\u062E\u062C'; - t['\uFCAC'] = '\u062E\u0645'; - t['\uFCAD'] = '\u0633\u062C'; - t['\uFCAE'] = '\u0633\u062D'; - t['\uFCAF'] = '\u0633\u062E'; - t['\uFCB0'] = '\u0633\u0645'; - t['\uFCB1'] = '\u0635\u062D'; - t['\uFCB2'] = '\u0635\u062E'; - t['\uFCB3'] = '\u0635\u0645'; - t['\uFCB4'] = '\u0636\u062C'; - t['\uFCB5'] = '\u0636\u062D'; - t['\uFCB6'] = '\u0636\u062E'; - t['\uFCB7'] = '\u0636\u0645'; - t['\uFCB8'] = '\u0637\u062D'; - t['\uFCB9'] = '\u0638\u0645'; - t['\uFCBA'] = '\u0639\u062C'; - t['\uFCBB'] = '\u0639\u0645'; - t['\uFCBC'] = '\u063A\u062C'; - t['\uFCBD'] = '\u063A\u0645'; - t['\uFCBE'] = '\u0641\u062C'; - t['\uFCBF'] = '\u0641\u062D'; - t['\uFCC0'] = '\u0641\u062E'; - t['\uFCC1'] = '\u0641\u0645'; - t['\uFCC2'] = '\u0642\u062D'; - t['\uFCC3'] = '\u0642\u0645'; - t['\uFCC4'] = '\u0643\u062C'; - t['\uFCC5'] = '\u0643\u062D'; - t['\uFCC6'] = '\u0643\u062E'; - t['\uFCC7'] = '\u0643\u0644'; - t['\uFCC8'] = '\u0643\u0645'; - t['\uFCC9'] = '\u0644\u062C'; - t['\uFCCA'] = '\u0644\u062D'; - t['\uFCCB'] = '\u0644\u062E'; - t['\uFCCC'] = '\u0644\u0645'; - t['\uFCCD'] = '\u0644\u0647'; - t['\uFCCE'] = '\u0645\u062C'; - t['\uFCCF'] = '\u0645\u062D'; - t['\uFCD0'] = '\u0645\u062E'; - t['\uFCD1'] = '\u0645\u0645'; - t['\uFCD2'] = '\u0646\u062C'; - t['\uFCD3'] = '\u0646\u062D'; - t['\uFCD4'] = '\u0646\u062E'; - t['\uFCD5'] = '\u0646\u0645'; - t['\uFCD6'] = '\u0646\u0647'; - t['\uFCD7'] = '\u0647\u062C'; - t['\uFCD8'] = '\u0647\u0645'; - t['\uFCD9'] = '\u0647\u0670'; - t['\uFCDA'] = '\u064A\u062C'; - t['\uFCDB'] = '\u064A\u062D'; - t['\uFCDC'] = '\u064A\u062E'; - t['\uFCDD'] = '\u064A\u0645'; - t['\uFCDE'] = '\u064A\u0647'; - t['\uFCDF'] = '\u0626\u0645'; - t['\uFCE0'] = '\u0626\u0647'; - t['\uFCE1'] = '\u0628\u0645'; - t['\uFCE2'] = '\u0628\u0647'; - t['\uFCE3'] = '\u062A\u0645'; - t['\uFCE4'] = '\u062A\u0647'; - t['\uFCE5'] = '\u062B\u0645'; - t['\uFCE6'] = '\u062B\u0647'; - t['\uFCE7'] = '\u0633\u0645'; - t['\uFCE8'] = '\u0633\u0647'; - t['\uFCE9'] = '\u0634\u0645'; - t['\uFCEA'] = '\u0634\u0647'; - t['\uFCEB'] = '\u0643\u0644'; - t['\uFCEC'] = '\u0643\u0645'; - t['\uFCED'] = '\u0644\u0645'; - t['\uFCEE'] = '\u0646\u0645'; - t['\uFCEF'] = '\u0646\u0647'; - t['\uFCF0'] = '\u064A\u0645'; - t['\uFCF1'] = '\u064A\u0647'; - t['\uFCF2'] = '\u0640\u064E\u0651'; - t['\uFCF3'] = '\u0640\u064F\u0651'; - t['\uFCF4'] = '\u0640\u0650\u0651'; - t['\uFCF5'] = '\u0637\u0649'; - t['\uFCF6'] = '\u0637\u064A'; - t['\uFCF7'] = '\u0639\u0649'; - t['\uFCF8'] = '\u0639\u064A'; - t['\uFCF9'] = '\u063A\u0649'; - t['\uFCFA'] = '\u063A\u064A'; - t['\uFCFB'] = '\u0633\u0649'; - t['\uFCFC'] = '\u0633\u064A'; - t['\uFCFD'] = '\u0634\u0649'; - t['\uFCFE'] = '\u0634\u064A'; - t['\uFCFF'] = '\u062D\u0649'; - t['\uFD00'] = '\u062D\u064A'; - t['\uFD01'] = '\u062C\u0649'; - t['\uFD02'] = '\u062C\u064A'; - t['\uFD03'] = '\u062E\u0649'; - t['\uFD04'] = '\u062E\u064A'; - t['\uFD05'] = '\u0635\u0649'; - t['\uFD06'] = '\u0635\u064A'; - t['\uFD07'] = '\u0636\u0649'; - t['\uFD08'] = '\u0636\u064A'; - t['\uFD09'] = '\u0634\u062C'; - t['\uFD0A'] = '\u0634\u062D'; - t['\uFD0B'] = '\u0634\u062E'; - t['\uFD0C'] = '\u0634\u0645'; - t['\uFD0D'] = '\u0634\u0631'; - t['\uFD0E'] = '\u0633\u0631'; - t['\uFD0F'] = '\u0635\u0631'; - t['\uFD10'] = '\u0636\u0631'; - t['\uFD11'] = '\u0637\u0649'; - t['\uFD12'] = '\u0637\u064A'; - t['\uFD13'] = '\u0639\u0649'; - t['\uFD14'] = '\u0639\u064A'; - t['\uFD15'] = '\u063A\u0649'; - t['\uFD16'] = '\u063A\u064A'; - t['\uFD17'] = '\u0633\u0649'; - t['\uFD18'] = '\u0633\u064A'; - t['\uFD19'] = '\u0634\u0649'; - t['\uFD1A'] = '\u0634\u064A'; - t['\uFD1B'] = '\u062D\u0649'; - t['\uFD1C'] = '\u062D\u064A'; - t['\uFD1D'] = '\u062C\u0649'; - t['\uFD1E'] = '\u062C\u064A'; - t['\uFD1F'] = '\u062E\u0649'; - t['\uFD20'] = '\u062E\u064A'; - t['\uFD21'] = '\u0635\u0649'; - t['\uFD22'] = '\u0635\u064A'; - t['\uFD23'] = '\u0636\u0649'; - t['\uFD24'] = '\u0636\u064A'; - t['\uFD25'] = '\u0634\u062C'; - t['\uFD26'] = '\u0634\u062D'; - t['\uFD27'] = '\u0634\u062E'; - t['\uFD28'] = '\u0634\u0645'; - t['\uFD29'] = '\u0634\u0631'; - t['\uFD2A'] = '\u0633\u0631'; - t['\uFD2B'] = '\u0635\u0631'; - t['\uFD2C'] = '\u0636\u0631'; - t['\uFD2D'] = '\u0634\u062C'; - t['\uFD2E'] = '\u0634\u062D'; - t['\uFD2F'] = '\u0634\u062E'; - t['\uFD30'] = '\u0634\u0645'; - t['\uFD31'] = '\u0633\u0647'; - t['\uFD32'] = '\u0634\u0647'; - t['\uFD33'] = '\u0637\u0645'; - t['\uFD34'] = '\u0633\u062C'; - t['\uFD35'] = '\u0633\u062D'; - t['\uFD36'] = '\u0633\u062E'; - t['\uFD37'] = '\u0634\u062C'; - t['\uFD38'] = '\u0634\u062D'; - t['\uFD39'] = '\u0634\u062E'; - t['\uFD3A'] = '\u0637\u0645'; - t['\uFD3B'] = '\u0638\u0645'; - t['\uFD3C'] = '\u0627\u064B'; - t['\uFD3D'] = '\u0627\u064B'; - t['\uFD50'] = '\u062A\u062C\u0645'; - t['\uFD51'] = '\u062A\u062D\u062C'; - t['\uFD52'] = '\u062A\u062D\u062C'; - t['\uFD53'] = '\u062A\u062D\u0645'; - t['\uFD54'] = '\u062A\u062E\u0645'; - t['\uFD55'] = '\u062A\u0645\u062C'; - t['\uFD56'] = '\u062A\u0645\u062D'; - t['\uFD57'] = '\u062A\u0645\u062E'; - t['\uFD58'] = '\u062C\u0645\u062D'; - t['\uFD59'] = '\u062C\u0645\u062D'; - t['\uFD5A'] = '\u062D\u0645\u064A'; - t['\uFD5B'] = '\u062D\u0645\u0649'; - t['\uFD5C'] = '\u0633\u062D\u062C'; - t['\uFD5D'] = '\u0633\u062C\u062D'; - t['\uFD5E'] = '\u0633\u062C\u0649'; - t['\uFD5F'] = '\u0633\u0645\u062D'; - t['\uFD60'] = '\u0633\u0645\u062D'; - t['\uFD61'] = '\u0633\u0645\u062C'; - t['\uFD62'] = '\u0633\u0645\u0645'; - t['\uFD63'] = '\u0633\u0645\u0645'; - t['\uFD64'] = '\u0635\u062D\u062D'; - t['\uFD65'] = '\u0635\u062D\u062D'; - t['\uFD66'] = '\u0635\u0645\u0645'; - t['\uFD67'] = '\u0634\u062D\u0645'; - t['\uFD68'] = '\u0634\u062D\u0645'; - t['\uFD69'] = '\u0634\u062C\u064A'; - t['\uFD6A'] = '\u0634\u0645\u062E'; - t['\uFD6B'] = '\u0634\u0645\u062E'; - t['\uFD6C'] = '\u0634\u0645\u0645'; - t['\uFD6D'] = '\u0634\u0645\u0645'; - t['\uFD6E'] = '\u0636\u062D\u0649'; - t['\uFD6F'] = '\u0636\u062E\u0645'; - t['\uFD70'] = '\u0636\u062E\u0645'; - t['\uFD71'] = '\u0637\u0645\u062D'; - t['\uFD72'] = '\u0637\u0645\u062D'; - t['\uFD73'] = '\u0637\u0645\u0645'; - t['\uFD74'] = '\u0637\u0645\u064A'; - t['\uFD75'] = '\u0639\u062C\u0645'; - t['\uFD76'] = '\u0639\u0645\u0645'; - t['\uFD77'] = '\u0639\u0645\u0645'; - t['\uFD78'] = '\u0639\u0645\u0649'; - t['\uFD79'] = '\u063A\u0645\u0645'; - t['\uFD7A'] = '\u063A\u0645\u064A'; - t['\uFD7B'] = '\u063A\u0645\u0649'; - t['\uFD7C'] = '\u0641\u062E\u0645'; - t['\uFD7D'] = '\u0641\u062E\u0645'; - t['\uFD7E'] = '\u0642\u0645\u062D'; - t['\uFD7F'] = '\u0642\u0645\u0645'; - t['\uFD80'] = '\u0644\u062D\u0645'; - t['\uFD81'] = '\u0644\u062D\u064A'; - t['\uFD82'] = '\u0644\u062D\u0649'; - t['\uFD83'] = '\u0644\u062C\u062C'; - t['\uFD84'] = '\u0644\u062C\u062C'; - t['\uFD85'] = '\u0644\u062E\u0645'; - t['\uFD86'] = '\u0644\u062E\u0645'; - t['\uFD87'] = '\u0644\u0645\u062D'; - t['\uFD88'] = '\u0644\u0645\u062D'; - t['\uFD89'] = '\u0645\u062D\u062C'; - t['\uFD8A'] = '\u0645\u062D\u0645'; - t['\uFD8B'] = '\u0645\u062D\u064A'; - t['\uFD8C'] = '\u0645\u062C\u062D'; - t['\uFD8D'] = '\u0645\u062C\u0645'; - t['\uFD8E'] = '\u0645\u062E\u062C'; - t['\uFD8F'] = '\u0645\u062E\u0645'; - t['\uFD92'] = '\u0645\u062C\u062E'; - t['\uFD93'] = '\u0647\u0645\u062C'; - t['\uFD94'] = '\u0647\u0645\u0645'; - t['\uFD95'] = '\u0646\u062D\u0645'; - t['\uFD96'] = '\u0646\u062D\u0649'; - t['\uFD97'] = '\u0646\u062C\u0645'; - t['\uFD98'] = '\u0646\u062C\u0645'; - t['\uFD99'] = '\u0646\u062C\u0649'; - t['\uFD9A'] = '\u0646\u0645\u064A'; - t['\uFD9B'] = '\u0646\u0645\u0649'; - t['\uFD9C'] = '\u064A\u0645\u0645'; - t['\uFD9D'] = '\u064A\u0645\u0645'; - t['\uFD9E'] = '\u0628\u062E\u064A'; - t['\uFD9F'] = '\u062A\u062C\u064A'; - t['\uFDA0'] = '\u062A\u062C\u0649'; - t['\uFDA1'] = '\u062A\u062E\u064A'; - t['\uFDA2'] = '\u062A\u062E\u0649'; - t['\uFDA3'] = '\u062A\u0645\u064A'; - t['\uFDA4'] = '\u062A\u0645\u0649'; - t['\uFDA5'] = '\u062C\u0645\u064A'; - t['\uFDA6'] = '\u062C\u062D\u0649'; - t['\uFDA7'] = '\u062C\u0645\u0649'; - t['\uFDA8'] = '\u0633\u062E\u0649'; - t['\uFDA9'] = '\u0635\u062D\u064A'; - t['\uFDAA'] = '\u0634\u062D\u064A'; - t['\uFDAB'] = '\u0636\u062D\u064A'; - t['\uFDAC'] = '\u0644\u062C\u064A'; - t['\uFDAD'] = '\u0644\u0645\u064A'; - t['\uFDAE'] = '\u064A\u062D\u064A'; - t['\uFDAF'] = '\u064A\u062C\u064A'; - t['\uFDB0'] = '\u064A\u0645\u064A'; - t['\uFDB1'] = '\u0645\u0645\u064A'; - t['\uFDB2'] = '\u0642\u0645\u064A'; - t['\uFDB3'] = '\u0646\u062D\u064A'; - t['\uFDB4'] = '\u0642\u0645\u062D'; - t['\uFDB5'] = '\u0644\u062D\u0645'; - t['\uFDB6'] = '\u0639\u0645\u064A'; - t['\uFDB7'] = '\u0643\u0645\u064A'; - t['\uFDB8'] = '\u0646\u062C\u062D'; - t['\uFDB9'] = '\u0645\u062E\u064A'; - t['\uFDBA'] = '\u0644\u062C\u0645'; - t['\uFDBB'] = '\u0643\u0645\u0645'; - t['\uFDBC'] = '\u0644\u062C\u0645'; - t['\uFDBD'] = '\u0646\u062C\u062D'; - t['\uFDBE'] = '\u062C\u062D\u064A'; - t['\uFDBF'] = '\u062D\u062C\u064A'; - t['\uFDC0'] = '\u0645\u062C\u064A'; - t['\uFDC1'] = '\u0641\u0645\u064A'; - t['\uFDC2'] = '\u0628\u062D\u064A'; - t['\uFDC3'] = '\u0643\u0645\u0645'; - t['\uFDC4'] = '\u0639\u062C\u0645'; - t['\uFDC5'] = '\u0635\u0645\u0645'; - t['\uFDC6'] = '\u0633\u062E\u064A'; - t['\uFDC7'] = '\u0646\u062C\u064A'; - t['\uFE49'] = '\u203E'; - t['\uFE4A'] = '\u203E'; - t['\uFE4B'] = '\u203E'; - t['\uFE4C'] = '\u203E'; - t['\uFE4D'] = '\u005F'; - t['\uFE4E'] = '\u005F'; - t['\uFE4F'] = '\u005F'; - t['\uFE80'] = '\u0621'; - t['\uFE81'] = '\u0622'; - t['\uFE82'] = '\u0622'; - t['\uFE83'] = '\u0623'; - t['\uFE84'] = '\u0623'; - t['\uFE85'] = '\u0624'; - t['\uFE86'] = '\u0624'; - t['\uFE87'] = '\u0625'; - t['\uFE88'] = '\u0625'; - t['\uFE89'] = '\u0626'; - t['\uFE8A'] = '\u0626'; - t['\uFE8B'] = '\u0626'; - t['\uFE8C'] = '\u0626'; - t['\uFE8D'] = '\u0627'; - t['\uFE8E'] = '\u0627'; - t['\uFE8F'] = '\u0628'; - t['\uFE90'] = '\u0628'; - t['\uFE91'] = '\u0628'; - t['\uFE92'] = '\u0628'; - t['\uFE93'] = '\u0629'; - t['\uFE94'] = '\u0629'; - t['\uFE95'] = '\u062A'; - t['\uFE96'] = '\u062A'; - t['\uFE97'] = '\u062A'; - t['\uFE98'] = '\u062A'; - t['\uFE99'] = '\u062B'; - t['\uFE9A'] = '\u062B'; - t['\uFE9B'] = '\u062B'; - t['\uFE9C'] = '\u062B'; - t['\uFE9D'] = '\u062C'; - t['\uFE9E'] = '\u062C'; - t['\uFE9F'] = '\u062C'; - t['\uFEA0'] = '\u062C'; - t['\uFEA1'] = '\u062D'; - t['\uFEA2'] = '\u062D'; - t['\uFEA3'] = '\u062D'; - t['\uFEA4'] = '\u062D'; - t['\uFEA5'] = '\u062E'; - t['\uFEA6'] = '\u062E'; - t['\uFEA7'] = '\u062E'; - t['\uFEA8'] = '\u062E'; - t['\uFEA9'] = '\u062F'; - t['\uFEAA'] = '\u062F'; - t['\uFEAB'] = '\u0630'; - t['\uFEAC'] = '\u0630'; - t['\uFEAD'] = '\u0631'; - t['\uFEAE'] = '\u0631'; - t['\uFEAF'] = '\u0632'; - t['\uFEB0'] = '\u0632'; - t['\uFEB1'] = '\u0633'; - t['\uFEB2'] = '\u0633'; - t['\uFEB3'] = '\u0633'; - t['\uFEB4'] = '\u0633'; - t['\uFEB5'] = '\u0634'; - t['\uFEB6'] = '\u0634'; - t['\uFEB7'] = '\u0634'; - t['\uFEB8'] = '\u0634'; - t['\uFEB9'] = '\u0635'; - t['\uFEBA'] = '\u0635'; - t['\uFEBB'] = '\u0635'; - t['\uFEBC'] = '\u0635'; - t['\uFEBD'] = '\u0636'; - t['\uFEBE'] = '\u0636'; - t['\uFEBF'] = '\u0636'; - t['\uFEC0'] = '\u0636'; - t['\uFEC1'] = '\u0637'; - t['\uFEC2'] = '\u0637'; - t['\uFEC3'] = '\u0637'; - t['\uFEC4'] = '\u0637'; - t['\uFEC5'] = '\u0638'; - t['\uFEC6'] = '\u0638'; - t['\uFEC7'] = '\u0638'; - t['\uFEC8'] = '\u0638'; - t['\uFEC9'] = '\u0639'; - t['\uFECA'] = '\u0639'; - t['\uFECB'] = '\u0639'; - t['\uFECC'] = '\u0639'; - t['\uFECD'] = '\u063A'; - t['\uFECE'] = '\u063A'; - t['\uFECF'] = '\u063A'; - t['\uFED0'] = '\u063A'; - t['\uFED1'] = '\u0641'; - t['\uFED2'] = '\u0641'; - t['\uFED3'] = '\u0641'; - t['\uFED4'] = '\u0641'; - t['\uFED5'] = '\u0642'; - t['\uFED6'] = '\u0642'; - t['\uFED7'] = '\u0642'; - t['\uFED8'] = '\u0642'; - t['\uFED9'] = '\u0643'; - t['\uFEDA'] = '\u0643'; - t['\uFEDB'] = '\u0643'; - t['\uFEDC'] = '\u0643'; - t['\uFEDD'] = '\u0644'; - t['\uFEDE'] = '\u0644'; - t['\uFEDF'] = '\u0644'; - t['\uFEE0'] = '\u0644'; - t['\uFEE1'] = '\u0645'; - t['\uFEE2'] = '\u0645'; - t['\uFEE3'] = '\u0645'; - t['\uFEE4'] = '\u0645'; - t['\uFEE5'] = '\u0646'; - t['\uFEE6'] = '\u0646'; - t['\uFEE7'] = '\u0646'; - t['\uFEE8'] = '\u0646'; - t['\uFEE9'] = '\u0647'; - t['\uFEEA'] = '\u0647'; - t['\uFEEB'] = '\u0647'; - t['\uFEEC'] = '\u0647'; - t['\uFEED'] = '\u0648'; - t['\uFEEE'] = '\u0648'; - t['\uFEEF'] = '\u0649'; - t['\uFEF0'] = '\u0649'; - t['\uFEF1'] = '\u064A'; - t['\uFEF2'] = '\u064A'; - t['\uFEF3'] = '\u064A'; - t['\uFEF4'] = '\u064A'; - t['\uFEF5'] = '\u0644\u0622'; - t['\uFEF6'] = '\u0644\u0622'; - t['\uFEF7'] = '\u0644\u0623'; - t['\uFEF8'] = '\u0644\u0623'; - t['\uFEF9'] = '\u0644\u0625'; - t['\uFEFA'] = '\u0644\u0625'; - t['\uFEFB'] = '\u0644\u0627'; - t['\uFEFC'] = '\u0644\u0627'; -}); -function reverseIfRtl(chars) { - var charsLength = chars.length; - if (charsLength <= 1 || !isRTLRangeFor(chars.charCodeAt(0))) { - return chars; - } - var s = ''; - for (var ii = charsLength - 1; ii >= 0; ii--) { - s += chars[ii]; - } - return s; -} -exports.mapSpecialUnicodeValues = mapSpecialUnicodeValues; -exports.reverseIfRtl = reverseIfRtl; -exports.getUnicodeRangeFor = getUnicodeRangeFor; -exports.getNormalizedUnicodes = getNormalizedUnicodes; -exports.getUnicodeForGlyph = getUnicodeForGlyph; - -/***/ }), -/* 163 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.FontRendererFactory = undefined; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _util = __w_pdfjs_require__(2); - -var _cff_parser = __w_pdfjs_require__(157); - -var _glyphlist = __w_pdfjs_require__(160); - -var _encodings = __w_pdfjs_require__(159); - -var _stream = __w_pdfjs_require__(140); - -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var FontRendererFactory = function FontRendererFactoryClosure() { - function getLong(data, offset) { - return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; - } - function getUshort(data, offset) { - return data[offset] << 8 | data[offset + 1]; - } - function parseCmap(data, start, end) { - var offset = getUshort(data, start + 2) === 1 ? getLong(data, start + 8) : getLong(data, start + 16); - var format = getUshort(data, start + offset); - var ranges, p, i; - if (format === 4) { - getUshort(data, start + offset + 2); - var segCount = getUshort(data, start + offset + 6) >> 1; - p = start + offset + 14; - ranges = []; - for (i = 0; i < segCount; i++, p += 2) { - ranges[i] = { end: getUshort(data, p) }; - } - p += 2; - for (i = 0; i < segCount; i++, p += 2) { - ranges[i].start = getUshort(data, p); - } - for (i = 0; i < segCount; i++, p += 2) { - ranges[i].idDelta = getUshort(data, p); - } - for (i = 0; i < segCount; i++, p += 2) { - var idOffset = getUshort(data, p); - if (idOffset === 0) { - continue; - } - ranges[i].ids = []; - for (var j = 0, jj = ranges[i].end - ranges[i].start + 1; j < jj; j++) { - ranges[i].ids[j] = getUshort(data, p + idOffset); - idOffset += 2; - } - } - return ranges; - } else if (format === 12) { - getLong(data, start + offset + 4); - var groups = getLong(data, start + offset + 12); - p = start + offset + 16; - ranges = []; - for (i = 0; i < groups; i++) { - ranges.push({ - start: getLong(data, p), - end: getLong(data, p + 4), - idDelta: getLong(data, p + 8) - getLong(data, p) - }); - p += 12; - } - return ranges; - } - throw new _util.FormatError('unsupported cmap: ' + format); - } - function parseCff(data, start, end, seacAnalysisEnabled) { - var properties = {}; - var parser = new _cff_parser.CFFParser(new _stream.Stream(data, start, end - start), properties, seacAnalysisEnabled); - var cff = parser.parse(); - return { - glyphs: cff.charStrings.objects, - subrs: cff.topDict.privateDict && cff.topDict.privateDict.subrsIndex && cff.topDict.privateDict.subrsIndex.objects, - gsubrs: cff.globalSubrIndex && cff.globalSubrIndex.objects, - isCFFCIDFont: cff.isCIDFont, - fdSelect: cff.fdSelect, - fdArray: cff.fdArray - }; - } - function parseGlyfTable(glyf, loca, isGlyphLocationsLong) { - var itemSize, itemDecode; - if (isGlyphLocationsLong) { - itemSize = 4; - itemDecode = function fontItemDecodeLong(data, offset) { - return data[offset] << 24 | data[offset + 1] << 16 | data[offset + 2] << 8 | data[offset + 3]; - }; - } else { - itemSize = 2; - itemDecode = function fontItemDecode(data, offset) { - return data[offset] << 9 | data[offset + 1] << 1; - }; - } - var glyphs = []; - var startOffset = itemDecode(loca, 0); - for (var j = itemSize; j < loca.length; j += itemSize) { - var endOffset = itemDecode(loca, j); - glyphs.push(glyf.subarray(startOffset, endOffset)); - startOffset = endOffset; - } - return glyphs; - } - function lookupCmap(ranges, unicode) { - var code = unicode.codePointAt(0), - gid = 0; - var l = 0, - r = ranges.length - 1; - while (l < r) { - var c = l + r + 1 >> 1; - if (code < ranges[c].start) { - r = c - 1; - } else { - l = c; - } - } - if (ranges[l].start <= code && code <= ranges[l].end) { - gid = ranges[l].idDelta + (ranges[l].ids ? ranges[l].ids[code - ranges[l].start] : code) & 0xFFFF; - } - return { - charCode: code, - glyphId: gid - }; - } - function compileGlyf(code, cmds, font) { - function moveTo(x, y) { - cmds.push({ - cmd: 'moveTo', - args: [x, y] - }); - } - function lineTo(x, y) { - cmds.push({ - cmd: 'lineTo', - args: [x, y] - }); - } - function quadraticCurveTo(xa, ya, x, y) { - cmds.push({ - cmd: 'quadraticCurveTo', - args: [xa, ya, x, y] - }); - } - var i = 0; - var numberOfContours = (code[i] << 24 | code[i + 1] << 16) >> 16; - var flags; - var x = 0, - y = 0; - i += 10; - if (numberOfContours < 0) { - do { - flags = code[i] << 8 | code[i + 1]; - var glyphIndex = code[i + 2] << 8 | code[i + 3]; - i += 4; - var arg1, arg2; - if (flags & 0x01) { - arg1 = (code[i] << 24 | code[i + 1] << 16) >> 16; - arg2 = (code[i + 2] << 24 | code[i + 3] << 16) >> 16; - i += 4; - } else { - arg1 = code[i++]; - arg2 = code[i++]; - } - if (flags & 0x02) { - x = arg1; - y = arg2; - } else { - x = 0; - y = 0; - } - var scaleX = 1, - scaleY = 1, - scale01 = 0, - scale10 = 0; - if (flags & 0x08) { - scaleX = scaleY = (code[i] << 24 | code[i + 1] << 16) / 1073741824; - i += 2; - } else if (flags & 0x40) { - scaleX = (code[i] << 24 | code[i + 1] << 16) / 1073741824; - scaleY = (code[i + 2] << 24 | code[i + 3] << 16) / 1073741824; - i += 4; - } else if (flags & 0x80) { - scaleX = (code[i] << 24 | code[i + 1] << 16) / 1073741824; - scale01 = (code[i + 2] << 24 | code[i + 3] << 16) / 1073741824; - scale10 = (code[i + 4] << 24 | code[i + 5] << 16) / 1073741824; - scaleY = (code[i + 6] << 24 | code[i + 7] << 16) / 1073741824; - i += 8; - } - var subglyph = font.glyphs[glyphIndex]; - if (subglyph) { - cmds.push({ cmd: 'save' }); - cmds.push({ - cmd: 'transform', - args: [scaleX, scale01, scale10, scaleY, x, y] - }); - compileGlyf(subglyph, cmds, font); - cmds.push({ cmd: 'restore' }); - } - } while (flags & 0x20); - } else { - var endPtsOfContours = []; - var j, jj; - for (j = 0; j < numberOfContours; j++) { - endPtsOfContours.push(code[i] << 8 | code[i + 1]); - i += 2; - } - var instructionLength = code[i] << 8 | code[i + 1]; - i += 2 + instructionLength; - var numberOfPoints = endPtsOfContours[endPtsOfContours.length - 1] + 1; - var points = []; - while (points.length < numberOfPoints) { - flags = code[i++]; - var repeat = 1; - if (flags & 0x08) { - repeat += code[i++]; - } - while (repeat-- > 0) { - points.push({ flags: flags }); - } - } - for (j = 0; j < numberOfPoints; j++) { - switch (points[j].flags & 0x12) { - case 0x00: - x += (code[i] << 24 | code[i + 1] << 16) >> 16; - i += 2; - break; - case 0x02: - x -= code[i++]; - break; - case 0x12: - x += code[i++]; - break; - } - points[j].x = x; - } - for (j = 0; j < numberOfPoints; j++) { - switch (points[j].flags & 0x24) { - case 0x00: - y += (code[i] << 24 | code[i + 1] << 16) >> 16; - i += 2; - break; - case 0x04: - y -= code[i++]; - break; - case 0x24: - y += code[i++]; - break; - } - points[j].y = y; - } - var startPoint = 0; - for (i = 0; i < numberOfContours; i++) { - var endPoint = endPtsOfContours[i]; - var contour = points.slice(startPoint, endPoint + 1); - if (contour[0].flags & 1) { - contour.push(contour[0]); - } else if (contour[contour.length - 1].flags & 1) { - contour.unshift(contour[contour.length - 1]); - } else { - var p = { - flags: 1, - x: (contour[0].x + contour[contour.length - 1].x) / 2, - y: (contour[0].y + contour[contour.length - 1].y) / 2 - }; - contour.unshift(p); - contour.push(p); - } - moveTo(contour[0].x, contour[0].y); - for (j = 1, jj = contour.length; j < jj; j++) { - if (contour[j].flags & 1) { - lineTo(contour[j].x, contour[j].y); - } else if (contour[j + 1].flags & 1) { - quadraticCurveTo(contour[j].x, contour[j].y, contour[j + 1].x, contour[j + 1].y); - j++; - } else { - quadraticCurveTo(contour[j].x, contour[j].y, (contour[j].x + contour[j + 1].x) / 2, (contour[j].y + contour[j + 1].y) / 2); - } - } - startPoint = endPoint + 1; - } - } - } - function compileCharString(code, cmds, font, glyphId) { - var stack = []; - var x = 0, - y = 0; - var stems = 0; - function moveTo(x, y) { - cmds.push({ - cmd: 'moveTo', - args: [x, y] - }); - } - function lineTo(x, y) { - cmds.push({ - cmd: 'lineTo', - args: [x, y] - }); - } - function bezierCurveTo(x1, y1, x2, y2, x, y) { - cmds.push({ - cmd: 'bezierCurveTo', - args: [x1, y1, x2, y2, x, y] - }); - } - function parse(code) { - var i = 0; - while (i < code.length) { - var stackClean = false; - var v = code[i++]; - var xa, xb, ya, yb, y1, y2, y3, n, subrCode; - switch (v) { - case 1: - stems += stack.length >> 1; - stackClean = true; - break; - case 3: - stems += stack.length >> 1; - stackClean = true; - break; - case 4: - y += stack.pop(); - moveTo(x, y); - stackClean = true; - break; - case 5: - while (stack.length > 0) { - x += stack.shift(); - y += stack.shift(); - lineTo(x, y); - } - break; - case 6: - while (stack.length > 0) { - x += stack.shift(); - lineTo(x, y); - if (stack.length === 0) { - break; - } - y += stack.shift(); - lineTo(x, y); - } - break; - case 7: - while (stack.length > 0) { - y += stack.shift(); - lineTo(x, y); - if (stack.length === 0) { - break; - } - x += stack.shift(); - lineTo(x, y); - } - break; - case 8: - while (stack.length > 0) { - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - case 10: - n = stack.pop(); - subrCode = null; - if (font.isCFFCIDFont) { - var fdIndex = font.fdSelect.getFDIndex(glyphId); - if (fdIndex >= 0 && fdIndex < font.fdArray.length) { - var fontDict = font.fdArray[fdIndex], - subrs = void 0; - if (fontDict.privateDict && fontDict.privateDict.subrsIndex) { - subrs = fontDict.privateDict.subrsIndex.objects; - } - if (subrs) { - var numSubrs = subrs.length; - n += numSubrs < 1240 ? 107 : numSubrs < 33900 ? 1131 : 32768; - subrCode = subrs[n]; - } - } else { - (0, _util.warn)('Invalid fd index for glyph index.'); - } - } else { - subrCode = font.subrs[n + font.subrsBias]; - } - if (subrCode) { - parse(subrCode); - } - break; - case 11: - return; - case 12: - v = code[i++]; - switch (v) { - case 34: - xa = x + stack.shift(); - xb = xa + stack.shift(); - y1 = y + stack.shift(); - x = xb + stack.shift(); - bezierCurveTo(xa, y, xb, y1, x, y1); - xa = x + stack.shift(); - xb = xa + stack.shift(); - x = xb + stack.shift(); - bezierCurveTo(xa, y1, xb, y, x, y); - break; - case 35: - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - stack.pop(); - break; - case 36: - xa = x + stack.shift(); - y1 = y + stack.shift(); - xb = xa + stack.shift(); - y2 = y1 + stack.shift(); - x = xb + stack.shift(); - bezierCurveTo(xa, y1, xb, y2, x, y2); - xa = x + stack.shift(); - xb = xa + stack.shift(); - y3 = y2 + stack.shift(); - x = xb + stack.shift(); - bezierCurveTo(xa, y2, xb, y3, x, y); - break; - case 37: - var x0 = x, - y0 = y; - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb; - y = yb; - if (Math.abs(x - x0) > Math.abs(y - y0)) { - x += stack.shift(); - } else { - y += stack.shift(); - } - bezierCurveTo(xa, ya, xb, yb, x, y); - break; - default: - throw new _util.FormatError('unknown operator: 12 ' + v); - } - break; - case 14: - if (stack.length >= 4) { - var achar = stack.pop(); - var bchar = stack.pop(); - y = stack.pop(); - x = stack.pop(); - cmds.push({ cmd: 'save' }); - cmds.push({ - cmd: 'translate', - args: [x, y] - }); - var cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[_encodings.StandardEncoding[achar]])); - compileCharString(font.glyphs[cmap.glyphId], cmds, font, cmap.glyphId); - cmds.push({ cmd: 'restore' }); - cmap = lookupCmap(font.cmap, String.fromCharCode(font.glyphNameMap[_encodings.StandardEncoding[bchar]])); - compileCharString(font.glyphs[cmap.glyphId], cmds, font, cmap.glyphId); - } - return; - case 18: - stems += stack.length >> 1; - stackClean = true; - break; - case 19: - stems += stack.length >> 1; - i += stems + 7 >> 3; - stackClean = true; - break; - case 20: - stems += stack.length >> 1; - i += stems + 7 >> 3; - stackClean = true; - break; - case 21: - y += stack.pop(); - x += stack.pop(); - moveTo(x, y); - stackClean = true; - break; - case 22: - x += stack.pop(); - moveTo(x, y); - stackClean = true; - break; - case 23: - stems += stack.length >> 1; - stackClean = true; - break; - case 24: - while (stack.length > 2) { - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - x += stack.shift(); - y += stack.shift(); - lineTo(x, y); - break; - case 25: - while (stack.length > 6) { - x += stack.shift(); - y += stack.shift(); - lineTo(x, y); - } - xa = x + stack.shift(); - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - break; - case 26: - if (stack.length % 2) { - x += stack.shift(); - } - while (stack.length > 0) { - xa = x; - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb; - y = yb + stack.shift(); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - case 27: - if (stack.length % 2) { - y += stack.shift(); - } - while (stack.length > 0) { - xa = x + stack.shift(); - ya = y; - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb; - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - case 28: - stack.push((code[i] << 24 | code[i + 1] << 16) >> 16); - i += 2; - break; - case 29: - n = stack.pop() + font.gsubrsBias; - subrCode = font.gsubrs[n]; - if (subrCode) { - parse(subrCode); - } - break; - case 30: - while (stack.length > 0) { - xa = x; - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + (stack.length === 1 ? stack.shift() : 0); - bezierCurveTo(xa, ya, xb, yb, x, y); - if (stack.length === 0) { - break; - } - xa = x + stack.shift(); - ya = y; - xb = xa + stack.shift(); - yb = ya + stack.shift(); - y = yb + stack.shift(); - x = xb + (stack.length === 1 ? stack.shift() : 0); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - case 31: - while (stack.length > 0) { - xa = x + stack.shift(); - ya = y; - xb = xa + stack.shift(); - yb = ya + stack.shift(); - y = yb + stack.shift(); - x = xb + (stack.length === 1 ? stack.shift() : 0); - bezierCurveTo(xa, ya, xb, yb, x, y); - if (stack.length === 0) { - break; - } - xa = x; - ya = y + stack.shift(); - xb = xa + stack.shift(); - yb = ya + stack.shift(); - x = xb + stack.shift(); - y = yb + (stack.length === 1 ? stack.shift() : 0); - bezierCurveTo(xa, ya, xb, yb, x, y); - } - break; - default: - if (v < 32) { - throw new _util.FormatError('unknown operator: ' + v); - } - if (v < 247) { - stack.push(v - 139); - } else if (v < 251) { - stack.push((v - 247) * 256 + code[i++] + 108); - } else if (v < 255) { - stack.push(-(v - 251) * 256 - code[i++] - 108); - } else { - stack.push((code[i] << 24 | code[i + 1] << 16 | code[i + 2] << 8 | code[i + 3]) / 65536); - i += 4; - } - break; - } - if (stackClean) { - stack.length = 0; - } - } - } - parse(code); - } - var NOOP = []; - - var CompiledFont = function () { - function CompiledFont(fontMatrix) { - _classCallCheck(this, CompiledFont); - - if (this.constructor === CompiledFont) { - (0, _util.unreachable)('Cannot initialize CompiledFont.'); - } - this.fontMatrix = fontMatrix; - this.compiledGlyphs = Object.create(null); - this.compiledCharCodeToGlyphId = Object.create(null); - } - - _createClass(CompiledFont, [{ - key: 'getPathJs', - value: function getPathJs(unicode) { - var cmap = lookupCmap(this.cmap, unicode); - var fn = this.compiledGlyphs[cmap.glyphId]; - if (!fn) { - fn = this.compileGlyph(this.glyphs[cmap.glyphId], cmap.glyphId); - this.compiledGlyphs[cmap.glyphId] = fn; - } - if (this.compiledCharCodeToGlyphId[cmap.charCode] === undefined) { - this.compiledCharCodeToGlyphId[cmap.charCode] = cmap.glyphId; - } - return fn; - } - }, { - key: 'compileGlyph', - value: function compileGlyph(code, glyphId) { - if (!code || code.length === 0 || code[0] === 14) { - return NOOP; - } - var fontMatrix = this.fontMatrix; - if (this.isCFFCIDFont) { - var fdIndex = this.fdSelect.getFDIndex(glyphId); - if (fdIndex >= 0 && fdIndex < this.fdArray.length) { - var fontDict = this.fdArray[fdIndex]; - fontMatrix = fontDict.getByName('FontMatrix') || _util.FONT_IDENTITY_MATRIX; - } else { - (0, _util.warn)('Invalid fd index for glyph index.'); - } - } - var cmds = []; - cmds.push({ cmd: 'save' }); - cmds.push({ - cmd: 'transform', - args: fontMatrix.slice() - }); - cmds.push({ - cmd: 'scale', - args: ['size', '-size'] - }); - this.compileGlyphImpl(code, cmds, glyphId); - cmds.push({ cmd: 'restore' }); - return cmds; - } - }, { - key: 'compileGlyphImpl', - value: function compileGlyphImpl() { - (0, _util.unreachable)('Children classes should implement this.'); - } - }, { - key: 'hasBuiltPath', - value: function hasBuiltPath(unicode) { - var cmap = lookupCmap(this.cmap, unicode); - return this.compiledGlyphs[cmap.glyphId] !== undefined && this.compiledCharCodeToGlyphId[cmap.charCode] !== undefined; - } - }]); - - return CompiledFont; - }(); - - var TrueTypeCompiled = function (_CompiledFont) { - _inherits(TrueTypeCompiled, _CompiledFont); - - function TrueTypeCompiled(glyphs, cmap, fontMatrix) { - _classCallCheck(this, TrueTypeCompiled); - - var _this = _possibleConstructorReturn(this, (TrueTypeCompiled.__proto__ || Object.getPrototypeOf(TrueTypeCompiled)).call(this, fontMatrix || [0.000488, 0, 0, 0.000488, 0, 0])); - - _this.glyphs = glyphs; - _this.cmap = cmap; - return _this; - } - - _createClass(TrueTypeCompiled, [{ - key: 'compileGlyphImpl', - value: function compileGlyphImpl(code, cmds) { - compileGlyf(code, cmds, this); - } - }]); - - return TrueTypeCompiled; - }(CompiledFont); - - var Type2Compiled = function (_CompiledFont2) { - _inherits(Type2Compiled, _CompiledFont2); - - function Type2Compiled(cffInfo, cmap, fontMatrix, glyphNameMap) { - _classCallCheck(this, Type2Compiled); - - var _this2 = _possibleConstructorReturn(this, (Type2Compiled.__proto__ || Object.getPrototypeOf(Type2Compiled)).call(this, fontMatrix || [0.001, 0, 0, 0.001, 0, 0])); - - _this2.glyphs = cffInfo.glyphs; - _this2.gsubrs = cffInfo.gsubrs || []; - _this2.subrs = cffInfo.subrs || []; - _this2.cmap = cmap; - _this2.glyphNameMap = glyphNameMap || (0, _glyphlist.getGlyphsUnicode)(); - _this2.gsubrsBias = _this2.gsubrs.length < 1240 ? 107 : _this2.gsubrs.length < 33900 ? 1131 : 32768; - _this2.subrsBias = _this2.subrs.length < 1240 ? 107 : _this2.subrs.length < 33900 ? 1131 : 32768; - _this2.isCFFCIDFont = cffInfo.isCFFCIDFont; - _this2.fdSelect = cffInfo.fdSelect; - _this2.fdArray = cffInfo.fdArray; - return _this2; - } - - _createClass(Type2Compiled, [{ - key: 'compileGlyphImpl', - value: function compileGlyphImpl(code, cmds, glyphId) { - compileCharString(code, cmds, this, glyphId); - } - }]); - - return Type2Compiled; - }(CompiledFont); - - return { - create: function FontRendererFactory_create(font, seacAnalysisEnabled) { - var data = new Uint8Array(font.data); - var cmap, glyf, loca, cff, indexToLocFormat, unitsPerEm; - var numTables = getUshort(data, 4); - for (var i = 0, p = 12; i < numTables; i++, p += 16) { - var tag = (0, _util.bytesToString)(data.subarray(p, p + 4)); - var offset = getLong(data, p + 8); - var length = getLong(data, p + 12); - switch (tag) { - case 'cmap': - cmap = parseCmap(data, offset, offset + length); - break; - case 'glyf': - glyf = data.subarray(offset, offset + length); - break; - case 'loca': - loca = data.subarray(offset, offset + length); - break; - case 'head': - unitsPerEm = getUshort(data, offset + 18); - indexToLocFormat = getUshort(data, offset + 50); - break; - case 'CFF ': - cff = parseCff(data, offset, offset + length, seacAnalysisEnabled); - break; - } - } - if (glyf) { - var fontMatrix = !unitsPerEm ? font.fontMatrix : [1 / unitsPerEm, 0, 0, 1 / unitsPerEm, 0, 0]; - return new TrueTypeCompiled(parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix); - } - return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap); - } - }; -}(); -exports.FontRendererFactory = FontRendererFactory; - -/***/ }), -/* 164 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.Type1Parser = undefined; - -var _util = __w_pdfjs_require__(2); - -var _encodings = __w_pdfjs_require__(159); - -var _stream = __w_pdfjs_require__(140); - -var HINTING_ENABLED = false; -var Type1CharString = function Type1CharStringClosure() { - var COMMAND_MAP = { - 'hstem': [1], - 'vstem': [3], - 'vmoveto': [4], - 'rlineto': [5], - 'hlineto': [6], - 'vlineto': [7], - 'rrcurveto': [8], - 'callsubr': [10], - 'flex': [12, 35], - 'drop': [12, 18], - 'endchar': [14], - 'rmoveto': [21], - 'hmoveto': [22], - 'vhcurveto': [30], - 'hvcurveto': [31] - }; - function Type1CharString() { - this.width = 0; - this.lsb = 0; - this.flexing = false; - this.output = []; - this.stack = []; - } - Type1CharString.prototype = { - convert: function Type1CharString_convert(encoded, subrs, seacAnalysisEnabled) { - var count = encoded.length; - var error = false; - var wx, sbx, subrNumber; - for (var i = 0; i < count; i++) { - var value = encoded[i]; - if (value < 32) { - if (value === 12) { - value = (value << 8) + encoded[++i]; - } - switch (value) { - case 1: - if (!HINTING_ENABLED) { - this.stack = []; - break; - } - error = this.executeCommand(2, COMMAND_MAP.hstem); - break; - case 3: - if (!HINTING_ENABLED) { - this.stack = []; - break; - } - error = this.executeCommand(2, COMMAND_MAP.vstem); - break; - case 4: - if (this.flexing) { - if (this.stack.length < 1) { - error = true; - break; - } - var dy = this.stack.pop(); - this.stack.push(0, dy); - break; - } - error = this.executeCommand(1, COMMAND_MAP.vmoveto); - break; - case 5: - error = this.executeCommand(2, COMMAND_MAP.rlineto); - break; - case 6: - error = this.executeCommand(1, COMMAND_MAP.hlineto); - break; - case 7: - error = this.executeCommand(1, COMMAND_MAP.vlineto); - break; - case 8: - error = this.executeCommand(6, COMMAND_MAP.rrcurveto); - break; - case 9: - this.stack = []; - break; - case 10: - if (this.stack.length < 1) { - error = true; - break; - } - subrNumber = this.stack.pop(); - if (!subrs[subrNumber]) { - error = true; - break; - } - error = this.convert(subrs[subrNumber], subrs, seacAnalysisEnabled); - break; - case 11: - return error; - case 13: - if (this.stack.length < 2) { - error = true; - break; - } - wx = this.stack.pop(); - sbx = this.stack.pop(); - this.lsb = sbx; - this.width = wx; - this.stack.push(wx, sbx); - error = this.executeCommand(2, COMMAND_MAP.hmoveto); - break; - case 14: - this.output.push(COMMAND_MAP.endchar[0]); - break; - case 21: - if (this.flexing) { - break; - } - error = this.executeCommand(2, COMMAND_MAP.rmoveto); - break; - case 22: - if (this.flexing) { - this.stack.push(0); - break; - } - error = this.executeCommand(1, COMMAND_MAP.hmoveto); - break; - case 30: - error = this.executeCommand(4, COMMAND_MAP.vhcurveto); - break; - case 31: - error = this.executeCommand(4, COMMAND_MAP.hvcurveto); - break; - case (12 << 8) + 0: - this.stack = []; - break; - case (12 << 8) + 1: - if (!HINTING_ENABLED) { - this.stack = []; - break; - } - error = this.executeCommand(2, COMMAND_MAP.vstem); - break; - case (12 << 8) + 2: - if (!HINTING_ENABLED) { - this.stack = []; - break; - } - error = this.executeCommand(2, COMMAND_MAP.hstem); - break; - case (12 << 8) + 6: - if (seacAnalysisEnabled) { - this.seac = this.stack.splice(-4, 4); - error = this.executeCommand(0, COMMAND_MAP.endchar); - } else { - error = this.executeCommand(4, COMMAND_MAP.endchar); - } - break; - case (12 << 8) + 7: - if (this.stack.length < 4) { - error = true; - break; - } - this.stack.pop(); - wx = this.stack.pop(); - var sby = this.stack.pop(); - sbx = this.stack.pop(); - this.lsb = sbx; - this.width = wx; - this.stack.push(wx, sbx, sby); - error = this.executeCommand(3, COMMAND_MAP.rmoveto); - break; - case (12 << 8) + 12: - if (this.stack.length < 2) { - error = true; - break; - } - var num2 = this.stack.pop(); - var num1 = this.stack.pop(); - this.stack.push(num1 / num2); - break; - case (12 << 8) + 16: - if (this.stack.length < 2) { - error = true; - break; - } - subrNumber = this.stack.pop(); - var numArgs = this.stack.pop(); - if (subrNumber === 0 && numArgs === 3) { - var flexArgs = this.stack.splice(this.stack.length - 17, 17); - this.stack.push(flexArgs[2] + flexArgs[0], flexArgs[3] + flexArgs[1], flexArgs[4], flexArgs[5], flexArgs[6], flexArgs[7], flexArgs[8], flexArgs[9], flexArgs[10], flexArgs[11], flexArgs[12], flexArgs[13], flexArgs[14]); - error = this.executeCommand(13, COMMAND_MAP.flex, true); - this.flexing = false; - this.stack.push(flexArgs[15], flexArgs[16]); - } else if (subrNumber === 1 && numArgs === 0) { - this.flexing = true; - } - break; - case (12 << 8) + 17: - break; - case (12 << 8) + 33: - this.stack = []; - break; - default: - (0, _util.warn)('Unknown type 1 charstring command of "' + value + '"'); - break; - } - if (error) { - break; - } - continue; - } else if (value <= 246) { - value = value - 139; - } else if (value <= 250) { - value = (value - 247) * 256 + encoded[++i] + 108; - } else if (value <= 254) { - value = -((value - 251) * 256) - encoded[++i] - 108; - } else { - value = (encoded[++i] & 0xff) << 24 | (encoded[++i] & 0xff) << 16 | (encoded[++i] & 0xff) << 8 | (encoded[++i] & 0xff) << 0; - } - this.stack.push(value); - } - return error; - }, - executeCommand: function executeCommand(howManyArgs, command, keepStack) { - var stackLength = this.stack.length; - if (howManyArgs > stackLength) { - return true; - } - var start = stackLength - howManyArgs; - for (var i = start; i < stackLength; i++) { - var value = this.stack[i]; - if (Number.isInteger(value)) { - this.output.push(28, value >> 8 & 0xff, value & 0xff); - } else { - value = 65536 * value | 0; - this.output.push(255, value >> 24 & 0xFF, value >> 16 & 0xFF, value >> 8 & 0xFF, value & 0xFF); - } - } - this.output.push.apply(this.output, command); - if (keepStack) { - this.stack.splice(start, howManyArgs); - } else { - this.stack.length = 0; - } - return false; - } - }; - return Type1CharString; -}(); -var Type1Parser = function Type1ParserClosure() { - var EEXEC_ENCRYPT_KEY = 55665; - var CHAR_STRS_ENCRYPT_KEY = 4330; - function isHexDigit(code) { - return code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102; - } - function decrypt(data, key, discardNumber) { - if (discardNumber >= data.length) { - return new Uint8Array(0); - } - var r = key | 0, - c1 = 52845, - c2 = 22719, - i, - j; - for (i = 0; i < discardNumber; i++) { - r = (data[i] + r) * c1 + c2 & (1 << 16) - 1; - } - var count = data.length - discardNumber; - var decrypted = new Uint8Array(count); - for (i = discardNumber, j = 0; j < count; i++, j++) { - var value = data[i]; - decrypted[j] = value ^ r >> 8; - r = (value + r) * c1 + c2 & (1 << 16) - 1; - } - return decrypted; - } - function decryptAscii(data, key, discardNumber) { - var r = key | 0, - c1 = 52845, - c2 = 22719; - var count = data.length, - maybeLength = count >>> 1; - var decrypted = new Uint8Array(maybeLength); - var i, j; - for (i = 0, j = 0; i < count; i++) { - var digit1 = data[i]; - if (!isHexDigit(digit1)) { - continue; - } - i++; - var digit2; - while (i < count && !isHexDigit(digit2 = data[i])) { - i++; - } - if (i < count) { - var value = parseInt(String.fromCharCode(digit1, digit2), 16); - decrypted[j++] = value ^ r >> 8; - r = (value + r) * c1 + c2 & (1 << 16) - 1; - } - } - return Array.prototype.slice.call(decrypted, discardNumber, j); - } - function isSpecial(c) { - return c === 0x2F || c === 0x5B || c === 0x5D || c === 0x7B || c === 0x7D || c === 0x28 || c === 0x29; - } - function Type1Parser(stream, encrypted, seacAnalysisEnabled) { - if (encrypted) { - var data = stream.getBytes(); - var isBinary = !(isHexDigit(data[0]) && isHexDigit(data[1]) && isHexDigit(data[2]) && isHexDigit(data[3])); - stream = new _stream.Stream(isBinary ? decrypt(data, EEXEC_ENCRYPT_KEY, 4) : decryptAscii(data, EEXEC_ENCRYPT_KEY, 4)); - } - this.seacAnalysisEnabled = !!seacAnalysisEnabled; - this.stream = stream; - this.nextChar(); - } - Type1Parser.prototype = { - readNumberArray: function Type1Parser_readNumberArray() { - this.getToken(); - var array = []; - while (true) { - var token = this.getToken(); - if (token === null || token === ']' || token === '}') { - break; - } - array.push(parseFloat(token || 0)); - } - return array; - }, - readNumber: function Type1Parser_readNumber() { - var token = this.getToken(); - return parseFloat(token || 0); - }, - readInt: function Type1Parser_readInt() { - var token = this.getToken(); - return parseInt(token || 0, 10) | 0; - }, - readBoolean: function Type1Parser_readBoolean() { - var token = this.getToken(); - return token === 'true' ? 1 : 0; - }, - nextChar: function Type1_nextChar() { - return this.currentChar = this.stream.getByte(); - }, - getToken: function Type1Parser_getToken() { - var comment = false; - var ch = this.currentChar; - while (true) { - if (ch === -1) { - return null; - } - if (comment) { - if (ch === 0x0A || ch === 0x0D) { - comment = false; - } - } else if (ch === 0x25) { - comment = true; - } else if (!(0, _util.isSpace)(ch)) { - break; - } - ch = this.nextChar(); - } - if (isSpecial(ch)) { - this.nextChar(); - return String.fromCharCode(ch); - } - var token = ''; - do { - token += String.fromCharCode(ch); - ch = this.nextChar(); - } while (ch >= 0 && !(0, _util.isSpace)(ch) && !isSpecial(ch)); - return token; - }, - readCharStrings: function Type1Parser_readCharStrings(bytes, lenIV) { - if (lenIV === -1) { - return bytes; - } - return decrypt(bytes, CHAR_STRS_ENCRYPT_KEY, lenIV); - }, - extractFontProgram: function Type1Parser_extractFontProgram() { - var stream = this.stream; - var subrs = [], - charstrings = []; - var privateData = Object.create(null); - privateData['lenIV'] = 4; - var program = { - subrs: [], - charstrings: [], - properties: { 'privateData': privateData } - }; - var token, length, data, lenIV, encoded; - while ((token = this.getToken()) !== null) { - if (token !== '/') { - continue; - } - token = this.getToken(); - switch (token) { - case 'CharStrings': - this.getToken(); - this.getToken(); - this.getToken(); - this.getToken(); - while (true) { - token = this.getToken(); - if (token === null || token === 'end') { - break; - } - if (token !== '/') { - continue; - } - var glyph = this.getToken(); - length = this.readInt(); - this.getToken(); - data = length > 0 ? stream.getBytes(length) : new Uint8Array(0); - lenIV = program.properties.privateData['lenIV']; - encoded = this.readCharStrings(data, lenIV); - this.nextChar(); - token = this.getToken(); - if (token === 'noaccess') { - this.getToken(); - } - charstrings.push({ - glyph: glyph, - encoded: encoded - }); - } - break; - case 'Subrs': - this.readInt(); - this.getToken(); - while (this.getToken() === 'dup') { - var index = this.readInt(); - length = this.readInt(); - this.getToken(); - data = length > 0 ? stream.getBytes(length) : new Uint8Array(0); - lenIV = program.properties.privateData['lenIV']; - encoded = this.readCharStrings(data, lenIV); - this.nextChar(); - token = this.getToken(); - if (token === 'noaccess') { - this.getToken(); - } - subrs[index] = encoded; - } - break; - case 'BlueValues': - case 'OtherBlues': - case 'FamilyBlues': - case 'FamilyOtherBlues': - var blueArray = this.readNumberArray(); - if (blueArray.length > 0 && blueArray.length % 2 === 0 && HINTING_ENABLED) { - program.properties.privateData[token] = blueArray; - } - break; - case 'StemSnapH': - case 'StemSnapV': - program.properties.privateData[token] = this.readNumberArray(); - break; - case 'StdHW': - case 'StdVW': - program.properties.privateData[token] = this.readNumberArray()[0]; - break; - case 'BlueShift': - case 'lenIV': - case 'BlueFuzz': - case 'BlueScale': - case 'LanguageGroup': - case 'ExpansionFactor': - program.properties.privateData[token] = this.readNumber(); - break; - case 'ForceBold': - program.properties.privateData[token] = this.readBoolean(); - break; - } - } - for (var i = 0; i < charstrings.length; i++) { - glyph = charstrings[i].glyph; - encoded = charstrings[i].encoded; - var charString = new Type1CharString(); - var error = charString.convert(encoded, subrs, this.seacAnalysisEnabled); - var output = charString.output; - if (error) { - output = [14]; - } - program.charstrings.push({ - glyphName: glyph, - charstring: output, - width: charString.width, - lsb: charString.lsb, - seac: charString.seac - }); - } - return program; - }, - extractFontHeader: function Type1Parser_extractFontHeader(properties) { - var token; - while ((token = this.getToken()) !== null) { - if (token !== '/') { - continue; - } - token = this.getToken(); - switch (token) { - case 'FontMatrix': - var matrix = this.readNumberArray(); - properties.fontMatrix = matrix; - break; - case 'Encoding': - var encodingArg = this.getToken(); - var encoding; - if (!/^\d+$/.test(encodingArg)) { - encoding = (0, _encodings.getEncoding)(encodingArg); - } else { - encoding = []; - var size = parseInt(encodingArg, 10) | 0; - this.getToken(); - for (var j = 0; j < size; j++) { - token = this.getToken(); - while (token !== 'dup' && token !== 'def') { - token = this.getToken(); - if (token === null) { - return; - } - } - if (token === 'def') { - break; - } - var index = this.readInt(); - this.getToken(); - var glyph = this.getToken(); - encoding[index] = glyph; - this.getToken(); - } - } - properties.builtInEncoding = encoding; - break; - case 'FontBBox': - var fontBBox = this.readNumberArray(); - properties.ascent = Math.max(fontBBox[3], fontBBox[1]); - properties.descent = Math.min(fontBBox[1], fontBBox[3]); - properties.ascentScaled = true; - break; - } - } - } - }; - return Type1Parser; -}(); -exports.Type1Parser = Type1Parser; - -/***/ }), -/* 165 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getTilingPatternIR = exports.Pattern = undefined; - -var _util = __w_pdfjs_require__(2); - -var _colorspace = __w_pdfjs_require__(151); - -var _primitives = __w_pdfjs_require__(138); - -var ShadingType = { - FUNCTION_BASED: 1, - AXIAL: 2, - RADIAL: 3, - FREE_FORM_MESH: 4, - LATTICE_FORM_MESH: 5, - COONS_PATCH_MESH: 6, - TENSOR_PATCH_MESH: 7 -}; -var Pattern = function PatternClosure() { - function Pattern() { - (0, _util.unreachable)('should not call Pattern constructor'); - } - Pattern.prototype = { - getPattern: function Pattern_getPattern(ctx) { - (0, _util.unreachable)('Should not call Pattern.getStyle: ' + ctx); - } - }; - Pattern.parseShading = function (shading, matrix, xref, res, handler, pdfFunctionFactory) { - var dict = (0, _primitives.isStream)(shading) ? shading.dict : shading; - var type = dict.get('ShadingType'); - try { - switch (type) { - case ShadingType.AXIAL: - case ShadingType.RADIAL: - return new Shadings.RadialAxial(dict, matrix, xref, res, pdfFunctionFactory); - case ShadingType.FREE_FORM_MESH: - case ShadingType.LATTICE_FORM_MESH: - case ShadingType.COONS_PATCH_MESH: - case ShadingType.TENSOR_PATCH_MESH: - return new Shadings.Mesh(shading, matrix, xref, res, pdfFunctionFactory); - default: - throw new _util.FormatError('Unsupported ShadingType: ' + type); - } - } catch (ex) { - if (ex instanceof _util.MissingDataException) { - throw ex; - } - handler.send('UnsupportedFeature', { featureId: _util.UNSUPPORTED_FEATURES.shadingPattern }); - (0, _util.warn)(ex); - return new Shadings.Dummy(); - } - }; - return Pattern; -}(); -var Shadings = {}; -Shadings.SMALL_NUMBER = 1e-6; -Shadings.RadialAxial = function RadialAxialClosure() { - function RadialAxial(dict, matrix, xref, res, pdfFunctionFactory) { - this.matrix = matrix; - this.coordsArr = dict.getArray('Coords'); - this.shadingType = dict.get('ShadingType'); - this.type = 'Pattern'; - var cs = dict.get('ColorSpace', 'CS'); - cs = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory); - this.cs = cs; - var t0 = 0.0, - t1 = 1.0; - if (dict.has('Domain')) { - var domainArr = dict.getArray('Domain'); - t0 = domainArr[0]; - t1 = domainArr[1]; - } - var extendStart = false, - extendEnd = false; - if (dict.has('Extend')) { - var extendArr = dict.getArray('Extend'); - extendStart = extendArr[0]; - extendEnd = extendArr[1]; - } - if (this.shadingType === ShadingType.RADIAL && (!extendStart || !extendEnd)) { - var x1 = this.coordsArr[0]; - var y1 = this.coordsArr[1]; - var r1 = this.coordsArr[2]; - var x2 = this.coordsArr[3]; - var y2 = this.coordsArr[4]; - var r2 = this.coordsArr[5]; - var distance = Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); - if (r1 <= r2 + distance && r2 <= r1 + distance) { - (0, _util.warn)('Unsupported radial gradient.'); - } - } - this.extendStart = extendStart; - this.extendEnd = extendEnd; - var fnObj = dict.get('Function'); - var fn = pdfFunctionFactory.createFromArray(fnObj); - var diff = t1 - t0; - var step = diff / 10; - var colorStops = this.colorStops = []; - if (t0 >= t1 || step <= 0) { - (0, _util.info)('Bad shading domain.'); - return; - } - var color = new Float32Array(cs.numComps), - ratio = new Float32Array(1); - var rgbColor; - for (var i = t0; i <= t1; i += step) { - ratio[0] = i; - fn(ratio, 0, color, 0); - rgbColor = cs.getRgb(color, 0); - var cssColor = _util.Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); - colorStops.push([(i - t0) / diff, cssColor]); - } - var background = 'transparent'; - if (dict.has('Background')) { - rgbColor = cs.getRgb(dict.get('Background'), 0); - background = _util.Util.makeCssRgb(rgbColor[0], rgbColor[1], rgbColor[2]); - } - if (!extendStart) { - colorStops.unshift([0, background]); - colorStops[1][0] += Shadings.SMALL_NUMBER; - } - if (!extendEnd) { - colorStops[colorStops.length - 1][0] -= Shadings.SMALL_NUMBER; - colorStops.push([1, background]); - } - this.colorStops = colorStops; - } - RadialAxial.prototype = { - getIR: function RadialAxial_getIR() { - var coordsArr = this.coordsArr; - var shadingType = this.shadingType; - var type, p0, p1, r0, r1; - if (shadingType === ShadingType.AXIAL) { - p0 = [coordsArr[0], coordsArr[1]]; - p1 = [coordsArr[2], coordsArr[3]]; - r0 = null; - r1 = null; - type = 'axial'; - } else if (shadingType === ShadingType.RADIAL) { - p0 = [coordsArr[0], coordsArr[1]]; - p1 = [coordsArr[3], coordsArr[4]]; - r0 = coordsArr[2]; - r1 = coordsArr[5]; - type = 'radial'; - } else { - (0, _util.unreachable)('getPattern type unknown: ' + shadingType); - } - var matrix = this.matrix; - if (matrix) { - p0 = _util.Util.applyTransform(p0, matrix); - p1 = _util.Util.applyTransform(p1, matrix); - if (shadingType === ShadingType.RADIAL) { - var scale = _util.Util.singularValueDecompose2dScale(matrix); - r0 *= scale[0]; - r1 *= scale[1]; - } - } - return ['RadialAxial', type, this.colorStops, p0, p1, r0, r1]; - } - }; - return RadialAxial; -}(); -Shadings.Mesh = function MeshClosure() { - function MeshStreamReader(stream, context) { - this.stream = stream; - this.context = context; - this.buffer = 0; - this.bufferLength = 0; - var numComps = context.numComps; - this.tmpCompsBuf = new Float32Array(numComps); - var csNumComps = context.colorSpace.numComps; - this.tmpCsCompsBuf = context.colorFn ? new Float32Array(csNumComps) : this.tmpCompsBuf; - } - MeshStreamReader.prototype = { - get hasData() { - if (this.stream.end) { - return this.stream.pos < this.stream.end; - } - if (this.bufferLength > 0) { - return true; - } - var nextByte = this.stream.getByte(); - if (nextByte < 0) { - return false; - } - this.buffer = nextByte; - this.bufferLength = 8; - return true; - }, - readBits: function MeshStreamReader_readBits(n) { - var buffer = this.buffer; - var bufferLength = this.bufferLength; - if (n === 32) { - if (bufferLength === 0) { - return (this.stream.getByte() << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte()) >>> 0; - } - buffer = buffer << 24 | this.stream.getByte() << 16 | this.stream.getByte() << 8 | this.stream.getByte(); - var nextByte = this.stream.getByte(); - this.buffer = nextByte & (1 << bufferLength) - 1; - return (buffer << 8 - bufferLength | (nextByte & 0xFF) >> bufferLength) >>> 0; - } - if (n === 8 && bufferLength === 0) { - return this.stream.getByte(); - } - while (bufferLength < n) { - buffer = buffer << 8 | this.stream.getByte(); - bufferLength += 8; - } - bufferLength -= n; - this.bufferLength = bufferLength; - this.buffer = buffer & (1 << bufferLength) - 1; - return buffer >> bufferLength; - }, - align: function MeshStreamReader_align() { - this.buffer = 0; - this.bufferLength = 0; - }, - readFlag: function MeshStreamReader_readFlag() { - return this.readBits(this.context.bitsPerFlag); - }, - readCoordinate: function MeshStreamReader_readCoordinate() { - var bitsPerCoordinate = this.context.bitsPerCoordinate; - var xi = this.readBits(bitsPerCoordinate); - var yi = this.readBits(bitsPerCoordinate); - var decode = this.context.decode; - var scale = bitsPerCoordinate < 32 ? 1 / ((1 << bitsPerCoordinate) - 1) : 2.3283064365386963e-10; - return [xi * scale * (decode[1] - decode[0]) + decode[0], yi * scale * (decode[3] - decode[2]) + decode[2]]; - }, - readComponents: function MeshStreamReader_readComponents() { - var numComps = this.context.numComps; - var bitsPerComponent = this.context.bitsPerComponent; - var scale = bitsPerComponent < 32 ? 1 / ((1 << bitsPerComponent) - 1) : 2.3283064365386963e-10; - var decode = this.context.decode; - var components = this.tmpCompsBuf; - for (var i = 0, j = 4; i < numComps; i++, j += 2) { - var ci = this.readBits(bitsPerComponent); - components[i] = ci * scale * (decode[j + 1] - decode[j]) + decode[j]; - } - var color = this.tmpCsCompsBuf; - if (this.context.colorFn) { - this.context.colorFn(components, 0, color, 0); - } - return this.context.colorSpace.getRgb(color, 0); - } - }; - function decodeType4Shading(mesh, reader) { - var coords = mesh.coords; - var colors = mesh.colors; - var operators = []; - var ps = []; - var verticesLeft = 0; - while (reader.hasData) { - var f = reader.readFlag(); - var coord = reader.readCoordinate(); - var color = reader.readComponents(); - if (verticesLeft === 0) { - if (!(0 <= f && f <= 2)) { - throw new _util.FormatError('Unknown type4 flag'); - } - switch (f) { - case 0: - verticesLeft = 3; - break; - case 1: - ps.push(ps[ps.length - 2], ps[ps.length - 1]); - verticesLeft = 1; - break; - case 2: - ps.push(ps[ps.length - 3], ps[ps.length - 1]); - verticesLeft = 1; - break; - } - operators.push(f); - } - ps.push(coords.length); - coords.push(coord); - colors.push(color); - verticesLeft--; - reader.align(); - } - mesh.figures.push({ - type: 'triangles', - coords: new Int32Array(ps), - colors: new Int32Array(ps) - }); - } - function decodeType5Shading(mesh, reader, verticesPerRow) { - var coords = mesh.coords; - var colors = mesh.colors; - var ps = []; - while (reader.hasData) { - var coord = reader.readCoordinate(); - var color = reader.readComponents(); - ps.push(coords.length); - coords.push(coord); - colors.push(color); - } - mesh.figures.push({ - type: 'lattice', - coords: new Int32Array(ps), - colors: new Int32Array(ps), - verticesPerRow: verticesPerRow - }); - } - var MIN_SPLIT_PATCH_CHUNKS_AMOUNT = 3; - var MAX_SPLIT_PATCH_CHUNKS_AMOUNT = 20; - var TRIANGLE_DENSITY = 20; - var getB = function getBClosure() { - function buildB(count) { - var lut = []; - for (var i = 0; i <= count; i++) { - var t = i / count, - t_ = 1 - t; - lut.push(new Float32Array([t_ * t_ * t_, 3 * t * t_ * t_, 3 * t * t * t_, t * t * t])); - } - return lut; - } - var cache = []; - return function getB(count) { - if (!cache[count]) { - cache[count] = buildB(count); - } - return cache[count]; - }; - }(); - function buildFigureFromPatch(mesh, index) { - var figure = mesh.figures[index]; - (0, _util.assert)(figure.type === 'patch', 'Unexpected patch mesh figure'); - var coords = mesh.coords, - colors = mesh.colors; - var pi = figure.coords; - var ci = figure.colors; - var figureMinX = Math.min(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); - var figureMinY = Math.min(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); - var figureMaxX = Math.max(coords[pi[0]][0], coords[pi[3]][0], coords[pi[12]][0], coords[pi[15]][0]); - var figureMaxY = Math.max(coords[pi[0]][1], coords[pi[3]][1], coords[pi[12]][1], coords[pi[15]][1]); - var splitXBy = Math.ceil((figureMaxX - figureMinX) * TRIANGLE_DENSITY / (mesh.bounds[2] - mesh.bounds[0])); - splitXBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitXBy)); - var splitYBy = Math.ceil((figureMaxY - figureMinY) * TRIANGLE_DENSITY / (mesh.bounds[3] - mesh.bounds[1])); - splitYBy = Math.max(MIN_SPLIT_PATCH_CHUNKS_AMOUNT, Math.min(MAX_SPLIT_PATCH_CHUNKS_AMOUNT, splitYBy)); - var verticesPerRow = splitXBy + 1; - var figureCoords = new Int32Array((splitYBy + 1) * verticesPerRow); - var figureColors = new Int32Array((splitYBy + 1) * verticesPerRow); - var k = 0; - var cl = new Uint8Array(3), - cr = new Uint8Array(3); - var c0 = colors[ci[0]], - c1 = colors[ci[1]], - c2 = colors[ci[2]], - c3 = colors[ci[3]]; - var bRow = getB(splitYBy), - bCol = getB(splitXBy); - for (var row = 0; row <= splitYBy; row++) { - cl[0] = (c0[0] * (splitYBy - row) + c2[0] * row) / splitYBy | 0; - cl[1] = (c0[1] * (splitYBy - row) + c2[1] * row) / splitYBy | 0; - cl[2] = (c0[2] * (splitYBy - row) + c2[2] * row) / splitYBy | 0; - cr[0] = (c1[0] * (splitYBy - row) + c3[0] * row) / splitYBy | 0; - cr[1] = (c1[1] * (splitYBy - row) + c3[1] * row) / splitYBy | 0; - cr[2] = (c1[2] * (splitYBy - row) + c3[2] * row) / splitYBy | 0; - for (var col = 0; col <= splitXBy; col++, k++) { - if ((row === 0 || row === splitYBy) && (col === 0 || col === splitXBy)) { - continue; - } - var x = 0, - y = 0; - var q = 0; - for (var i = 0; i <= 3; i++) { - for (var j = 0; j <= 3; j++, q++) { - var m = bRow[row][i] * bCol[col][j]; - x += coords[pi[q]][0] * m; - y += coords[pi[q]][1] * m; - } - } - figureCoords[k] = coords.length; - coords.push([x, y]); - figureColors[k] = colors.length; - var newColor = new Uint8Array(3); - newColor[0] = (cl[0] * (splitXBy - col) + cr[0] * col) / splitXBy | 0; - newColor[1] = (cl[1] * (splitXBy - col) + cr[1] * col) / splitXBy | 0; - newColor[2] = (cl[2] * (splitXBy - col) + cr[2] * col) / splitXBy | 0; - colors.push(newColor); - } - } - figureCoords[0] = pi[0]; - figureColors[0] = ci[0]; - figureCoords[splitXBy] = pi[3]; - figureColors[splitXBy] = ci[1]; - figureCoords[verticesPerRow * splitYBy] = pi[12]; - figureColors[verticesPerRow * splitYBy] = ci[2]; - figureCoords[verticesPerRow * splitYBy + splitXBy] = pi[15]; - figureColors[verticesPerRow * splitYBy + splitXBy] = ci[3]; - mesh.figures[index] = { - type: 'lattice', - coords: figureCoords, - colors: figureColors, - verticesPerRow: verticesPerRow - }; - } - function decodeType6Shading(mesh, reader) { - var coords = mesh.coords; - var colors = mesh.colors; - var ps = new Int32Array(16); - var cs = new Int32Array(4); - while (reader.hasData) { - var f = reader.readFlag(); - if (!(0 <= f && f <= 3)) { - throw new _util.FormatError('Unknown type6 flag'); - } - var i, ii; - var pi = coords.length; - for (i = 0, ii = f !== 0 ? 8 : 12; i < ii; i++) { - coords.push(reader.readCoordinate()); - } - var ci = colors.length; - for (i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { - colors.push(reader.readComponents()); - } - var tmp1, tmp2, tmp3, tmp4; - switch (f) { - case 0: - ps[12] = pi + 3; - ps[13] = pi + 4; - ps[14] = pi + 5; - ps[15] = pi + 6; - ps[8] = pi + 2; - ps[11] = pi + 7; - ps[4] = pi + 1; - ps[7] = pi + 8; - ps[0] = pi; - ps[1] = pi + 11; - ps[2] = pi + 10; - ps[3] = pi + 9; - cs[2] = ci + 1; - cs[3] = ci + 2; - cs[0] = ci; - cs[1] = ci + 3; - break; - case 1: - tmp1 = ps[12]; - tmp2 = ps[13]; - tmp3 = ps[14]; - tmp4 = ps[15]; - ps[12] = tmp4; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = tmp3; - ps[11] = pi + 3; - ps[4] = tmp2; - ps[7] = pi + 4; - ps[0] = tmp1; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - tmp1 = cs[2]; - tmp2 = cs[3]; - cs[2] = tmp2; - cs[3] = ci; - cs[0] = tmp1; - cs[1] = ci + 1; - break; - case 2: - tmp1 = ps[15]; - tmp2 = ps[11]; - ps[12] = ps[3]; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = ps[7]; - ps[11] = pi + 3; - ps[4] = tmp2; - ps[7] = pi + 4; - ps[0] = tmp1; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - tmp1 = cs[3]; - cs[2] = cs[1]; - cs[3] = ci; - cs[0] = tmp1; - cs[1] = ci + 1; - break; - case 3: - ps[12] = ps[0]; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = ps[1]; - ps[11] = pi + 3; - ps[4] = ps[2]; - ps[7] = pi + 4; - ps[0] = ps[3]; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - cs[2] = cs[0]; - cs[3] = ci; - cs[0] = cs[1]; - cs[1] = ci + 1; - break; - } - ps[5] = coords.length; - coords.push([(-4 * coords[ps[0]][0] - coords[ps[15]][0] + 6 * (coords[ps[4]][0] + coords[ps[1]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[13]][0] + coords[ps[7]][0])) / 9, (-4 * coords[ps[0]][1] - coords[ps[15]][1] + 6 * (coords[ps[4]][1] + coords[ps[1]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[13]][1] + coords[ps[7]][1])) / 9]); - ps[6] = coords.length; - coords.push([(-4 * coords[ps[3]][0] - coords[ps[12]][0] + 6 * (coords[ps[2]][0] + coords[ps[7]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[4]][0] + coords[ps[14]][0])) / 9, (-4 * coords[ps[3]][1] - coords[ps[12]][1] + 6 * (coords[ps[2]][1] + coords[ps[7]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[4]][1] + coords[ps[14]][1])) / 9]); - ps[9] = coords.length; - coords.push([(-4 * coords[ps[12]][0] - coords[ps[3]][0] + 6 * (coords[ps[8]][0] + coords[ps[13]][0]) - 2 * (coords[ps[0]][0] + coords[ps[15]][0]) + 3 * (coords[ps[11]][0] + coords[ps[1]][0])) / 9, (-4 * coords[ps[12]][1] - coords[ps[3]][1] + 6 * (coords[ps[8]][1] + coords[ps[13]][1]) - 2 * (coords[ps[0]][1] + coords[ps[15]][1]) + 3 * (coords[ps[11]][1] + coords[ps[1]][1])) / 9]); - ps[10] = coords.length; - coords.push([(-4 * coords[ps[15]][0] - coords[ps[0]][0] + 6 * (coords[ps[11]][0] + coords[ps[14]][0]) - 2 * (coords[ps[12]][0] + coords[ps[3]][0]) + 3 * (coords[ps[2]][0] + coords[ps[8]][0])) / 9, (-4 * coords[ps[15]][1] - coords[ps[0]][1] + 6 * (coords[ps[11]][1] + coords[ps[14]][1]) - 2 * (coords[ps[12]][1] + coords[ps[3]][1]) + 3 * (coords[ps[2]][1] + coords[ps[8]][1])) / 9]); - mesh.figures.push({ - type: 'patch', - coords: new Int32Array(ps), - colors: new Int32Array(cs) - }); - } - } - function decodeType7Shading(mesh, reader) { - var coords = mesh.coords; - var colors = mesh.colors; - var ps = new Int32Array(16); - var cs = new Int32Array(4); - while (reader.hasData) { - var f = reader.readFlag(); - if (!(0 <= f && f <= 3)) { - throw new _util.FormatError('Unknown type7 flag'); - } - var i, ii; - var pi = coords.length; - for (i = 0, ii = f !== 0 ? 12 : 16; i < ii; i++) { - coords.push(reader.readCoordinate()); - } - var ci = colors.length; - for (i = 0, ii = f !== 0 ? 2 : 4; i < ii; i++) { - colors.push(reader.readComponents()); - } - var tmp1, tmp2, tmp3, tmp4; - switch (f) { - case 0: - ps[12] = pi + 3; - ps[13] = pi + 4; - ps[14] = pi + 5; - ps[15] = pi + 6; - ps[8] = pi + 2; - ps[9] = pi + 13; - ps[10] = pi + 14; - ps[11] = pi + 7; - ps[4] = pi + 1; - ps[5] = pi + 12; - ps[6] = pi + 15; - ps[7] = pi + 8; - ps[0] = pi; - ps[1] = pi + 11; - ps[2] = pi + 10; - ps[3] = pi + 9; - cs[2] = ci + 1; - cs[3] = ci + 2; - cs[0] = ci; - cs[1] = ci + 3; - break; - case 1: - tmp1 = ps[12]; - tmp2 = ps[13]; - tmp3 = ps[14]; - tmp4 = ps[15]; - ps[12] = tmp4; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = tmp3; - ps[9] = pi + 9; - ps[10] = pi + 10; - ps[11] = pi + 3; - ps[4] = tmp2; - ps[5] = pi + 8; - ps[6] = pi + 11; - ps[7] = pi + 4; - ps[0] = tmp1; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - tmp1 = cs[2]; - tmp2 = cs[3]; - cs[2] = tmp2; - cs[3] = ci; - cs[0] = tmp1; - cs[1] = ci + 1; - break; - case 2: - tmp1 = ps[15]; - tmp2 = ps[11]; - ps[12] = ps[3]; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = ps[7]; - ps[9] = pi + 9; - ps[10] = pi + 10; - ps[11] = pi + 3; - ps[4] = tmp2; - ps[5] = pi + 8; - ps[6] = pi + 11; - ps[7] = pi + 4; - ps[0] = tmp1; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - tmp1 = cs[3]; - cs[2] = cs[1]; - cs[3] = ci; - cs[0] = tmp1; - cs[1] = ci + 1; - break; - case 3: - ps[12] = ps[0]; - ps[13] = pi + 0; - ps[14] = pi + 1; - ps[15] = pi + 2; - ps[8] = ps[1]; - ps[9] = pi + 9; - ps[10] = pi + 10; - ps[11] = pi + 3; - ps[4] = ps[2]; - ps[5] = pi + 8; - ps[6] = pi + 11; - ps[7] = pi + 4; - ps[0] = ps[3]; - ps[1] = pi + 7; - ps[2] = pi + 6; - ps[3] = pi + 5; - cs[2] = cs[0]; - cs[3] = ci; - cs[0] = cs[1]; - cs[1] = ci + 1; - break; - } - mesh.figures.push({ - type: 'patch', - coords: new Int32Array(ps), - colors: new Int32Array(cs) - }); - } - } - function updateBounds(mesh) { - var minX = mesh.coords[0][0], - minY = mesh.coords[0][1], - maxX = minX, - maxY = minY; - for (var i = 1, ii = mesh.coords.length; i < ii; i++) { - var x = mesh.coords[i][0], - y = mesh.coords[i][1]; - minX = minX > x ? x : minX; - minY = minY > y ? y : minY; - maxX = maxX < x ? x : maxX; - maxY = maxY < y ? y : maxY; - } - mesh.bounds = [minX, minY, maxX, maxY]; - } - function packData(mesh) { - var i, ii, j, jj; - var coords = mesh.coords; - var coordsPacked = new Float32Array(coords.length * 2); - for (i = 0, j = 0, ii = coords.length; i < ii; i++) { - var xy = coords[i]; - coordsPacked[j++] = xy[0]; - coordsPacked[j++] = xy[1]; - } - mesh.coords = coordsPacked; - var colors = mesh.colors; - var colorsPacked = new Uint8Array(colors.length * 3); - for (i = 0, j = 0, ii = colors.length; i < ii; i++) { - var c = colors[i]; - colorsPacked[j++] = c[0]; - colorsPacked[j++] = c[1]; - colorsPacked[j++] = c[2]; - } - mesh.colors = colorsPacked; - var figures = mesh.figures; - for (i = 0, ii = figures.length; i < ii; i++) { - var figure = figures[i], - ps = figure.coords, - cs = figure.colors; - for (j = 0, jj = ps.length; j < jj; j++) { - ps[j] *= 2; - cs[j] *= 3; - } - } - } - function Mesh(stream, matrix, xref, res, pdfFunctionFactory) { - if (!(0, _primitives.isStream)(stream)) { - throw new _util.FormatError('Mesh data is not a stream'); - } - var dict = stream.dict; - this.matrix = matrix; - this.shadingType = dict.get('ShadingType'); - this.type = 'Pattern'; - this.bbox = dict.getArray('BBox'); - var cs = dict.get('ColorSpace', 'CS'); - cs = _colorspace.ColorSpace.parse(cs, xref, res, pdfFunctionFactory); - this.cs = cs; - this.background = dict.has('Background') ? cs.getRgb(dict.get('Background'), 0) : null; - var fnObj = dict.get('Function'); - var fn = fnObj ? pdfFunctionFactory.createFromArray(fnObj) : null; - this.coords = []; - this.colors = []; - this.figures = []; - var decodeContext = { - bitsPerCoordinate: dict.get('BitsPerCoordinate'), - bitsPerComponent: dict.get('BitsPerComponent'), - bitsPerFlag: dict.get('BitsPerFlag'), - decode: dict.getArray('Decode'), - colorFn: fn, - colorSpace: cs, - numComps: fn ? 1 : cs.numComps - }; - var reader = new MeshStreamReader(stream, decodeContext); - var patchMesh = false; - switch (this.shadingType) { - case ShadingType.FREE_FORM_MESH: - decodeType4Shading(this, reader); - break; - case ShadingType.LATTICE_FORM_MESH: - var verticesPerRow = dict.get('VerticesPerRow') | 0; - if (verticesPerRow < 2) { - throw new _util.FormatError('Invalid VerticesPerRow'); - } - decodeType5Shading(this, reader, verticesPerRow); - break; - case ShadingType.COONS_PATCH_MESH: - decodeType6Shading(this, reader); - patchMesh = true; - break; - case ShadingType.TENSOR_PATCH_MESH: - decodeType7Shading(this, reader); - patchMesh = true; - break; - default: - (0, _util.unreachable)('Unsupported mesh type.'); - break; - } - if (patchMesh) { - updateBounds(this); - for (var i = 0, ii = this.figures.length; i < ii; i++) { - buildFigureFromPatch(this, i); - } - } - updateBounds(this); - packData(this); - } - Mesh.prototype = { - getIR: function Mesh_getIR() { - return ['Mesh', this.shadingType, this.coords, this.colors, this.figures, this.bounds, this.matrix, this.bbox, this.background]; - } - }; - return Mesh; -}(); -Shadings.Dummy = function DummyClosure() { - function Dummy() { - this.type = 'Pattern'; - } - Dummy.prototype = { - getIR: function Dummy_getIR() { - return ['Dummy']; - } - }; - return Dummy; -}(); -function getTilingPatternIR(operatorList, dict, args) { - var matrix = dict.getArray('Matrix'); - var bbox = _util.Util.normalizeRect(dict.getArray('BBox')); - var xstep = dict.get('XStep'); - var ystep = dict.get('YStep'); - var paintType = dict.get('PaintType'); - var tilingType = dict.get('TilingType'); - if (bbox[2] - bbox[0] === 0 || bbox[3] - bbox[1] === 0) { - throw new _util.FormatError('Invalid getTilingPatternIR /BBox array: [' + bbox + '].'); - } - return ['TilingPattern', args, operatorList, matrix, bbox, xstep, ystep, paintType, tilingType]; -} -exports.Pattern = Pattern; -exports.getTilingPatternIR = getTilingPatternIR; - -/***/ }), -/* 166 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.bidi = undefined; - -var _util = __w_pdfjs_require__(2); - -var baseTypes = ['BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S', 'WS', 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'B', 'B', 'S', 'WS', 'ON', 'ON', 'ET', 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'ON', 'ES', 'CS', 'ES', 'CS', 'CS', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'CS', 'ON', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'ON', 'ON', 'ON', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'CS', 'ON', 'ET', 'ET', 'ET', 'ET', 'ON', 'ON', 'ON', 'ON', 'L', 'ON', 'ON', 'BN', 'ON', 'ON', 'ET', 'ET', 'EN', 'EN', 'ON', 'L', 'ON', 'ON', 'ON', 'EN', 'L', 'ON', 'ON', 'ON', 'ON', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'ON', 'L', 'L', 'L', 'L', 'L', 'L', 'L', 'L']; -var arabicTypes = ['AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ON', 'ON', 'AL', 'ET', 'ET', 'AL', 'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', '', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ET', 'AN', 'AN', 'AL', 'AL', 'AL', 'NSM', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AN', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'NSM', 'NSM', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'AL', 'AL', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'EN', 'AL', 'AL', 'AL', 'AL', 'AL', 'AL']; -function isOdd(i) { - return (i & 1) !== 0; -} -function isEven(i) { - return (i & 1) === 0; -} -function findUnequal(arr, start, value) { - for (var j = start, jj = arr.length; j < jj; ++j) { - if (arr[j] !== value) { - return j; - } - } - return j; -} -function setValues(arr, start, end, value) { - for (var j = start; j < end; ++j) { - arr[j] = value; - } -} -function reverseValues(arr, start, end) { - for (var i = start, j = end - 1; i < j; ++i, --j) { - var temp = arr[i]; - arr[i] = arr[j]; - arr[j] = temp; - } -} -function createBidiText(str, isLTR, vertical) { - return { - str: str, - dir: vertical ? 'ttb' : isLTR ? 'ltr' : 'rtl' - }; -} -var chars = []; -var types = []; -function bidi(str, startLevel, vertical) { - var isLTR = true; - var strLength = str.length; - if (strLength === 0 || vertical) { - return createBidiText(str, isLTR, vertical); - } - chars.length = strLength; - types.length = strLength; - var numBidi = 0; - var i, ii; - for (i = 0; i < strLength; ++i) { - chars[i] = str.charAt(i); - var charCode = str.charCodeAt(i); - var charType = 'L'; - if (charCode <= 0x00ff) { - charType = baseTypes[charCode]; - } else if (0x0590 <= charCode && charCode <= 0x05f4) { - charType = 'R'; - } else if (0x0600 <= charCode && charCode <= 0x06ff) { - charType = arabicTypes[charCode & 0xff]; - if (!charType) { - (0, _util.warn)('Bidi: invalid Unicode character ' + charCode.toString(16)); - } - } else if (0x0700 <= charCode && charCode <= 0x08AC) { - charType = 'AL'; - } - if (charType === 'R' || charType === 'AL' || charType === 'AN') { - numBidi++; - } - types[i] = charType; - } - if (numBidi === 0) { - isLTR = true; - return createBidiText(str, isLTR); - } - if (startLevel === -1) { - if (numBidi / strLength < 0.3) { - isLTR = true; - startLevel = 0; - } else { - isLTR = false; - startLevel = 1; - } - } - var levels = []; - for (i = 0; i < strLength; ++i) { - levels[i] = startLevel; - } - var e = isOdd(startLevel) ? 'R' : 'L'; - var sor = e; - var eor = sor; - var lastType = sor; - for (i = 0; i < strLength; ++i) { - if (types[i] === 'NSM') { - types[i] = lastType; - } else { - lastType = types[i]; - } - } - lastType = sor; - var t; - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (t === 'EN') { - types[i] = lastType === 'AL' ? 'AN' : 'EN'; - } else if (t === 'R' || t === 'L' || t === 'AL') { - lastType = t; - } - } - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (t === 'AL') { - types[i] = 'R'; - } - } - for (i = 1; i < strLength - 1; ++i) { - if (types[i] === 'ES' && types[i - 1] === 'EN' && types[i + 1] === 'EN') { - types[i] = 'EN'; - } - if (types[i] === 'CS' && (types[i - 1] === 'EN' || types[i - 1] === 'AN') && types[i + 1] === types[i - 1]) { - types[i] = types[i - 1]; - } - } - for (i = 0; i < strLength; ++i) { - if (types[i] === 'EN') { - var j; - for (j = i - 1; j >= 0; --j) { - if (types[j] !== 'ET') { - break; - } - types[j] = 'EN'; - } - for (j = i + 1; j < strLength; ++j) { - if (types[j] !== 'ET') { - break; - } - types[j] = 'EN'; - } - } - } - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (t === 'WS' || t === 'ES' || t === 'ET' || t === 'CS') { - types[i] = 'ON'; - } - } - lastType = sor; - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (t === 'EN') { - types[i] = lastType === 'L' ? 'L' : 'EN'; - } else if (t === 'R' || t === 'L') { - lastType = t; - } - } - for (i = 0; i < strLength; ++i) { - if (types[i] === 'ON') { - var end = findUnequal(types, i + 1, 'ON'); - var before = sor; - if (i > 0) { - before = types[i - 1]; - } - var after = eor; - if (end + 1 < strLength) { - after = types[end + 1]; - } - if (before !== 'L') { - before = 'R'; - } - if (after !== 'L') { - after = 'R'; - } - if (before === after) { - setValues(types, i, end, before); - } - i = end - 1; - } - } - for (i = 0; i < strLength; ++i) { - if (types[i] === 'ON') { - types[i] = e; - } - } - for (i = 0; i < strLength; ++i) { - t = types[i]; - if (isEven(levels[i])) { - if (t === 'R') { - levels[i] += 1; - } else if (t === 'AN' || t === 'EN') { - levels[i] += 2; - } - } else { - if (t === 'L' || t === 'AN' || t === 'EN') { - levels[i] += 1; - } - } - } - var highestLevel = -1; - var lowestOddLevel = 99; - var level; - for (i = 0, ii = levels.length; i < ii; ++i) { - level = levels[i]; - if (highestLevel < level) { - highestLevel = level; - } - if (lowestOddLevel > level && isOdd(level)) { - lowestOddLevel = level; - } - } - for (level = highestLevel; level >= lowestOddLevel; --level) { - var start = -1; - for (i = 0, ii = levels.length; i < ii; ++i) { - if (levels[i] < level) { - if (start >= 0) { - reverseValues(chars, start, i); - start = -1; - } - } else if (start < 0) { - start = i; - } - } - if (start >= 0) { - reverseValues(chars, start, levels.length); - } - } - for (i = 0, ii = chars.length; i < ii; ++i) { - var ch = chars[i]; - if (ch === '<' || ch === '>') { - chars[i] = ''; - } - } - return createBidiText(chars.join(''), isLTR); -} -exports.bidi = bidi; - -/***/ }), -/* 167 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getMetrics = undefined; - -var _util = __w_pdfjs_require__(2); - -var getMetrics = (0, _util.getLookupTableFactory)(function (t) { - t['Courier'] = 600; - t['Courier-Bold'] = 600; - t['Courier-BoldOblique'] = 600; - t['Courier-Oblique'] = 600; - t['Helvetica'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 278; - t['exclam'] = 278; - t['quotedbl'] = 355; - t['numbersign'] = 556; - t['dollar'] = 556; - t['percent'] = 889; - t['ampersand'] = 667; - t['quoteright'] = 222; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 389; - t['plus'] = 584; - t['comma'] = 278; - t['hyphen'] = 333; - t['period'] = 278; - t['slash'] = 278; - t['zero'] = 556; - t['one'] = 556; - t['two'] = 556; - t['three'] = 556; - t['four'] = 556; - t['five'] = 556; - t['six'] = 556; - t['seven'] = 556; - t['eight'] = 556; - t['nine'] = 556; - t['colon'] = 278; - t['semicolon'] = 278; - t['less'] = 584; - t['equal'] = 584; - t['greater'] = 584; - t['question'] = 556; - t['at'] = 1015; - t['A'] = 667; - t['B'] = 667; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 722; - t['I'] = 278; - t['J'] = 500; - t['K'] = 667; - t['L'] = 556; - t['M'] = 833; - t['N'] = 722; - t['O'] = 778; - t['P'] = 667; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 667; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 944; - t['X'] = 667; - t['Y'] = 667; - t['Z'] = 611; - t['bracketleft'] = 278; - t['backslash'] = 278; - t['bracketright'] = 278; - t['asciicircum'] = 469; - t['underscore'] = 556; - t['quoteleft'] = 222; - t['a'] = 556; - t['b'] = 556; - t['c'] = 500; - t['d'] = 556; - t['e'] = 556; - t['f'] = 278; - t['g'] = 556; - t['h'] = 556; - t['i'] = 222; - t['j'] = 222; - t['k'] = 500; - t['l'] = 222; - t['m'] = 833; - t['n'] = 556; - t['o'] = 556; - t['p'] = 556; - t['q'] = 556; - t['r'] = 333; - t['s'] = 500; - t['t'] = 278; - t['u'] = 556; - t['v'] = 500; - t['w'] = 722; - t['x'] = 500; - t['y'] = 500; - t['z'] = 500; - t['braceleft'] = 334; - t['bar'] = 260; - t['braceright'] = 334; - t['asciitilde'] = 584; - t['exclamdown'] = 333; - t['cent'] = 556; - t['sterling'] = 556; - t['fraction'] = 167; - t['yen'] = 556; - t['florin'] = 556; - t['section'] = 556; - t['currency'] = 556; - t['quotesingle'] = 191; - t['quotedblleft'] = 333; - t['guillemotleft'] = 556; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 500; - t['fl'] = 500; - t['endash'] = 556; - t['dagger'] = 556; - t['daggerdbl'] = 556; - t['periodcentered'] = 278; - t['paragraph'] = 537; - t['bullet'] = 350; - t['quotesinglbase'] = 222; - t['quotedblbase'] = 333; - t['quotedblright'] = 333; - t['guillemotright'] = 556; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 611; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 370; - t['Lslash'] = 556; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 365; - t['ae'] = 889; - t['dotlessi'] = 278; - t['lslash'] = 222; - t['oslash'] = 611; - t['oe'] = 944; - t['germandbls'] = 611; - t['Idieresis'] = 278; - t['eacute'] = 556; - t['abreve'] = 556; - t['uhungarumlaut'] = 556; - t['ecaron'] = 556; - t['Ydieresis'] = 667; - t['divide'] = 584; - t['Yacute'] = 667; - t['Acircumflex'] = 667; - t['aacute'] = 556; - t['Ucircumflex'] = 722; - t['yacute'] = 500; - t['scommaaccent'] = 500; - t['ecircumflex'] = 556; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 556; - t['Uacute'] = 722; - t['uogonek'] = 556; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 737; - t['Emacron'] = 667; - t['ccaron'] = 500; - t['aring'] = 556; - t['Ncommaaccent'] = 722; - t['lacute'] = 222; - t['agrave'] = 556; - t['Tcommaaccent'] = 611; - t['Cacute'] = 722; - t['atilde'] = 556; - t['Edotaccent'] = 667; - t['scaron'] = 500; - t['scedilla'] = 500; - t['iacute'] = 278; - t['lozenge'] = 471; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 556; - t['acircumflex'] = 556; - t['Amacron'] = 667; - t['rcaron'] = 333; - t['ccedilla'] = 500; - t['Zdotaccent'] = 611; - t['Thorn'] = 667; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 667; - t['dcaron'] = 643; - t['Umacron'] = 722; - t['uring'] = 556; - t['threesuperior'] = 333; - t['Ograve'] = 778; - t['Agrave'] = 667; - t['Abreve'] = 667; - t['multiply'] = 584; - t['uacute'] = 556; - t['Tcaron'] = 611; - t['partialdiff'] = 476; - t['ydieresis'] = 500; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 556; - t['edieresis'] = 556; - t['cacute'] = 500; - t['nacute'] = 556; - t['umacron'] = 556; - t['Ncaron'] = 722; - t['Iacute'] = 278; - t['plusminus'] = 584; - t['brokenbar'] = 260; - t['registered'] = 737; - t['Gbreve'] = 778; - t['Idotaccent'] = 278; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 333; - t['omacron'] = 556; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 222; - t['tcaron'] = 317; - t['eogonek'] = 556; - t['Uogonek'] = 722; - t['Aacute'] = 667; - t['Adieresis'] = 667; - t['egrave'] = 556; - t['zacute'] = 500; - t['iogonek'] = 222; - t['Oacute'] = 778; - t['oacute'] = 556; - t['amacron'] = 556; - t['sacute'] = 500; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 556; - t['twosuperior'] = 333; - t['Odieresis'] = 778; - t['mu'] = 556; - t['igrave'] = 278; - t['ohungarumlaut'] = 556; - t['Eogonek'] = 667; - t['dcroat'] = 556; - t['threequarters'] = 834; - t['Scedilla'] = 667; - t['lcaron'] = 299; - t['Kcommaaccent'] = 667; - t['Lacute'] = 556; - t['trademark'] = 1000; - t['edotaccent'] = 556; - t['Igrave'] = 278; - t['Imacron'] = 278; - t['Lcaron'] = 556; - t['onehalf'] = 834; - t['lessequal'] = 549; - t['ocircumflex'] = 556; - t['ntilde'] = 556; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 556; - t['gbreve'] = 556; - t['onequarter'] = 834; - t['Scaron'] = 667; - t['Scommaaccent'] = 667; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 556; - t['Ccaron'] = 722; - t['ugrave'] = 556; - t['radical'] = 453; - t['Dcaron'] = 722; - t['rcommaaccent'] = 333; - t['Ntilde'] = 722; - t['otilde'] = 556; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 556; - t['Atilde'] = 667; - t['Aogonek'] = 667; - t['Aring'] = 667; - t['Otilde'] = 778; - t['zdotaccent'] = 500; - t['Ecaron'] = 667; - t['Iogonek'] = 278; - t['kcommaaccent'] = 500; - t['minus'] = 584; - t['Icircumflex'] = 278; - t['ncaron'] = 556; - t['tcommaaccent'] = 278; - t['logicalnot'] = 584; - t['odieresis'] = 556; - t['udieresis'] = 556; - t['notequal'] = 549; - t['gcommaaccent'] = 556; - t['eth'] = 556; - t['zcaron'] = 500; - t['ncommaaccent'] = 556; - t['onesuperior'] = 333; - t['imacron'] = 278; - t['Euro'] = 556; - }); - t['Helvetica-Bold'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 278; - t['exclam'] = 333; - t['quotedbl'] = 474; - t['numbersign'] = 556; - t['dollar'] = 556; - t['percent'] = 889; - t['ampersand'] = 722; - t['quoteright'] = 278; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 389; - t['plus'] = 584; - t['comma'] = 278; - t['hyphen'] = 333; - t['period'] = 278; - t['slash'] = 278; - t['zero'] = 556; - t['one'] = 556; - t['two'] = 556; - t['three'] = 556; - t['four'] = 556; - t['five'] = 556; - t['six'] = 556; - t['seven'] = 556; - t['eight'] = 556; - t['nine'] = 556; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 584; - t['equal'] = 584; - t['greater'] = 584; - t['question'] = 611; - t['at'] = 975; - t['A'] = 722; - t['B'] = 722; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 722; - t['I'] = 278; - t['J'] = 556; - t['K'] = 722; - t['L'] = 611; - t['M'] = 833; - t['N'] = 722; - t['O'] = 778; - t['P'] = 667; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 667; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 944; - t['X'] = 667; - t['Y'] = 667; - t['Z'] = 611; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 584; - t['underscore'] = 556; - t['quoteleft'] = 278; - t['a'] = 556; - t['b'] = 611; - t['c'] = 556; - t['d'] = 611; - t['e'] = 556; - t['f'] = 333; - t['g'] = 611; - t['h'] = 611; - t['i'] = 278; - t['j'] = 278; - t['k'] = 556; - t['l'] = 278; - t['m'] = 889; - t['n'] = 611; - t['o'] = 611; - t['p'] = 611; - t['q'] = 611; - t['r'] = 389; - t['s'] = 556; - t['t'] = 333; - t['u'] = 611; - t['v'] = 556; - t['w'] = 778; - t['x'] = 556; - t['y'] = 556; - t['z'] = 500; - t['braceleft'] = 389; - t['bar'] = 280; - t['braceright'] = 389; - t['asciitilde'] = 584; - t['exclamdown'] = 333; - t['cent'] = 556; - t['sterling'] = 556; - t['fraction'] = 167; - t['yen'] = 556; - t['florin'] = 556; - t['section'] = 556; - t['currency'] = 556; - t['quotesingle'] = 238; - t['quotedblleft'] = 500; - t['guillemotleft'] = 556; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 611; - t['fl'] = 611; - t['endash'] = 556; - t['dagger'] = 556; - t['daggerdbl'] = 556; - t['periodcentered'] = 278; - t['paragraph'] = 556; - t['bullet'] = 350; - t['quotesinglbase'] = 278; - t['quotedblbase'] = 500; - t['quotedblright'] = 500; - t['guillemotright'] = 556; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 611; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 370; - t['Lslash'] = 611; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 365; - t['ae'] = 889; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 611; - t['oe'] = 944; - t['germandbls'] = 611; - t['Idieresis'] = 278; - t['eacute'] = 556; - t['abreve'] = 556; - t['uhungarumlaut'] = 611; - t['ecaron'] = 556; - t['Ydieresis'] = 667; - t['divide'] = 584; - t['Yacute'] = 667; - t['Acircumflex'] = 722; - t['aacute'] = 556; - t['Ucircumflex'] = 722; - t['yacute'] = 556; - t['scommaaccent'] = 556; - t['ecircumflex'] = 556; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 556; - t['Uacute'] = 722; - t['uogonek'] = 611; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 737; - t['Emacron'] = 667; - t['ccaron'] = 556; - t['aring'] = 556; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 556; - t['Tcommaaccent'] = 611; - t['Cacute'] = 722; - t['atilde'] = 556; - t['Edotaccent'] = 667; - t['scaron'] = 556; - t['scedilla'] = 556; - t['iacute'] = 278; - t['lozenge'] = 494; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 611; - t['acircumflex'] = 556; - t['Amacron'] = 722; - t['rcaron'] = 389; - t['ccedilla'] = 556; - t['Zdotaccent'] = 611; - t['Thorn'] = 667; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 667; - t['dcaron'] = 743; - t['Umacron'] = 722; - t['uring'] = 611; - t['threesuperior'] = 333; - t['Ograve'] = 778; - t['Agrave'] = 722; - t['Abreve'] = 722; - t['multiply'] = 584; - t['uacute'] = 611; - t['Tcaron'] = 611; - t['partialdiff'] = 494; - t['ydieresis'] = 556; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 556; - t['edieresis'] = 556; - t['cacute'] = 556; - t['nacute'] = 611; - t['umacron'] = 611; - t['Ncaron'] = 722; - t['Iacute'] = 278; - t['plusminus'] = 584; - t['brokenbar'] = 280; - t['registered'] = 737; - t['Gbreve'] = 778; - t['Idotaccent'] = 278; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 389; - t['omacron'] = 611; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 278; - t['tcaron'] = 389; - t['eogonek'] = 556; - t['Uogonek'] = 722; - t['Aacute'] = 722; - t['Adieresis'] = 722; - t['egrave'] = 556; - t['zacute'] = 500; - t['iogonek'] = 278; - t['Oacute'] = 778; - t['oacute'] = 611; - t['amacron'] = 556; - t['sacute'] = 556; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 611; - t['twosuperior'] = 333; - t['Odieresis'] = 778; - t['mu'] = 611; - t['igrave'] = 278; - t['ohungarumlaut'] = 611; - t['Eogonek'] = 667; - t['dcroat'] = 611; - t['threequarters'] = 834; - t['Scedilla'] = 667; - t['lcaron'] = 400; - t['Kcommaaccent'] = 722; - t['Lacute'] = 611; - t['trademark'] = 1000; - t['edotaccent'] = 556; - t['Igrave'] = 278; - t['Imacron'] = 278; - t['Lcaron'] = 611; - t['onehalf'] = 834; - t['lessequal'] = 549; - t['ocircumflex'] = 611; - t['ntilde'] = 611; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 556; - t['gbreve'] = 611; - t['onequarter'] = 834; - t['Scaron'] = 667; - t['Scommaaccent'] = 667; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 611; - t['Ccaron'] = 722; - t['ugrave'] = 611; - t['radical'] = 549; - t['Dcaron'] = 722; - t['rcommaaccent'] = 389; - t['Ntilde'] = 722; - t['otilde'] = 611; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 611; - t['Atilde'] = 722; - t['Aogonek'] = 722; - t['Aring'] = 722; - t['Otilde'] = 778; - t['zdotaccent'] = 500; - t['Ecaron'] = 667; - t['Iogonek'] = 278; - t['kcommaaccent'] = 556; - t['minus'] = 584; - t['Icircumflex'] = 278; - t['ncaron'] = 611; - t['tcommaaccent'] = 333; - t['logicalnot'] = 584; - t['odieresis'] = 611; - t['udieresis'] = 611; - t['notequal'] = 549; - t['gcommaaccent'] = 611; - t['eth'] = 611; - t['zcaron'] = 500; - t['ncommaaccent'] = 611; - t['onesuperior'] = 333; - t['imacron'] = 278; - t['Euro'] = 556; - }); - t['Helvetica-BoldOblique'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 278; - t['exclam'] = 333; - t['quotedbl'] = 474; - t['numbersign'] = 556; - t['dollar'] = 556; - t['percent'] = 889; - t['ampersand'] = 722; - t['quoteright'] = 278; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 389; - t['plus'] = 584; - t['comma'] = 278; - t['hyphen'] = 333; - t['period'] = 278; - t['slash'] = 278; - t['zero'] = 556; - t['one'] = 556; - t['two'] = 556; - t['three'] = 556; - t['four'] = 556; - t['five'] = 556; - t['six'] = 556; - t['seven'] = 556; - t['eight'] = 556; - t['nine'] = 556; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 584; - t['equal'] = 584; - t['greater'] = 584; - t['question'] = 611; - t['at'] = 975; - t['A'] = 722; - t['B'] = 722; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 722; - t['I'] = 278; - t['J'] = 556; - t['K'] = 722; - t['L'] = 611; - t['M'] = 833; - t['N'] = 722; - t['O'] = 778; - t['P'] = 667; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 667; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 944; - t['X'] = 667; - t['Y'] = 667; - t['Z'] = 611; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 584; - t['underscore'] = 556; - t['quoteleft'] = 278; - t['a'] = 556; - t['b'] = 611; - t['c'] = 556; - t['d'] = 611; - t['e'] = 556; - t['f'] = 333; - t['g'] = 611; - t['h'] = 611; - t['i'] = 278; - t['j'] = 278; - t['k'] = 556; - t['l'] = 278; - t['m'] = 889; - t['n'] = 611; - t['o'] = 611; - t['p'] = 611; - t['q'] = 611; - t['r'] = 389; - t['s'] = 556; - t['t'] = 333; - t['u'] = 611; - t['v'] = 556; - t['w'] = 778; - t['x'] = 556; - t['y'] = 556; - t['z'] = 500; - t['braceleft'] = 389; - t['bar'] = 280; - t['braceright'] = 389; - t['asciitilde'] = 584; - t['exclamdown'] = 333; - t['cent'] = 556; - t['sterling'] = 556; - t['fraction'] = 167; - t['yen'] = 556; - t['florin'] = 556; - t['section'] = 556; - t['currency'] = 556; - t['quotesingle'] = 238; - t['quotedblleft'] = 500; - t['guillemotleft'] = 556; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 611; - t['fl'] = 611; - t['endash'] = 556; - t['dagger'] = 556; - t['daggerdbl'] = 556; - t['periodcentered'] = 278; - t['paragraph'] = 556; - t['bullet'] = 350; - t['quotesinglbase'] = 278; - t['quotedblbase'] = 500; - t['quotedblright'] = 500; - t['guillemotright'] = 556; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 611; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 370; - t['Lslash'] = 611; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 365; - t['ae'] = 889; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 611; - t['oe'] = 944; - t['germandbls'] = 611; - t['Idieresis'] = 278; - t['eacute'] = 556; - t['abreve'] = 556; - t['uhungarumlaut'] = 611; - t['ecaron'] = 556; - t['Ydieresis'] = 667; - t['divide'] = 584; - t['Yacute'] = 667; - t['Acircumflex'] = 722; - t['aacute'] = 556; - t['Ucircumflex'] = 722; - t['yacute'] = 556; - t['scommaaccent'] = 556; - t['ecircumflex'] = 556; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 556; - t['Uacute'] = 722; - t['uogonek'] = 611; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 737; - t['Emacron'] = 667; - t['ccaron'] = 556; - t['aring'] = 556; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 556; - t['Tcommaaccent'] = 611; - t['Cacute'] = 722; - t['atilde'] = 556; - t['Edotaccent'] = 667; - t['scaron'] = 556; - t['scedilla'] = 556; - t['iacute'] = 278; - t['lozenge'] = 494; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 611; - t['acircumflex'] = 556; - t['Amacron'] = 722; - t['rcaron'] = 389; - t['ccedilla'] = 556; - t['Zdotaccent'] = 611; - t['Thorn'] = 667; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 667; - t['dcaron'] = 743; - t['Umacron'] = 722; - t['uring'] = 611; - t['threesuperior'] = 333; - t['Ograve'] = 778; - t['Agrave'] = 722; - t['Abreve'] = 722; - t['multiply'] = 584; - t['uacute'] = 611; - t['Tcaron'] = 611; - t['partialdiff'] = 494; - t['ydieresis'] = 556; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 556; - t['edieresis'] = 556; - t['cacute'] = 556; - t['nacute'] = 611; - t['umacron'] = 611; - t['Ncaron'] = 722; - t['Iacute'] = 278; - t['plusminus'] = 584; - t['brokenbar'] = 280; - t['registered'] = 737; - t['Gbreve'] = 778; - t['Idotaccent'] = 278; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 389; - t['omacron'] = 611; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 278; - t['tcaron'] = 389; - t['eogonek'] = 556; - t['Uogonek'] = 722; - t['Aacute'] = 722; - t['Adieresis'] = 722; - t['egrave'] = 556; - t['zacute'] = 500; - t['iogonek'] = 278; - t['Oacute'] = 778; - t['oacute'] = 611; - t['amacron'] = 556; - t['sacute'] = 556; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 611; - t['twosuperior'] = 333; - t['Odieresis'] = 778; - t['mu'] = 611; - t['igrave'] = 278; - t['ohungarumlaut'] = 611; - t['Eogonek'] = 667; - t['dcroat'] = 611; - t['threequarters'] = 834; - t['Scedilla'] = 667; - t['lcaron'] = 400; - t['Kcommaaccent'] = 722; - t['Lacute'] = 611; - t['trademark'] = 1000; - t['edotaccent'] = 556; - t['Igrave'] = 278; - t['Imacron'] = 278; - t['Lcaron'] = 611; - t['onehalf'] = 834; - t['lessequal'] = 549; - t['ocircumflex'] = 611; - t['ntilde'] = 611; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 556; - t['gbreve'] = 611; - t['onequarter'] = 834; - t['Scaron'] = 667; - t['Scommaaccent'] = 667; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 611; - t['Ccaron'] = 722; - t['ugrave'] = 611; - t['radical'] = 549; - t['Dcaron'] = 722; - t['rcommaaccent'] = 389; - t['Ntilde'] = 722; - t['otilde'] = 611; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 611; - t['Atilde'] = 722; - t['Aogonek'] = 722; - t['Aring'] = 722; - t['Otilde'] = 778; - t['zdotaccent'] = 500; - t['Ecaron'] = 667; - t['Iogonek'] = 278; - t['kcommaaccent'] = 556; - t['minus'] = 584; - t['Icircumflex'] = 278; - t['ncaron'] = 611; - t['tcommaaccent'] = 333; - t['logicalnot'] = 584; - t['odieresis'] = 611; - t['udieresis'] = 611; - t['notequal'] = 549; - t['gcommaaccent'] = 611; - t['eth'] = 611; - t['zcaron'] = 500; - t['ncommaaccent'] = 611; - t['onesuperior'] = 333; - t['imacron'] = 278; - t['Euro'] = 556; - }); - t['Helvetica-Oblique'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 278; - t['exclam'] = 278; - t['quotedbl'] = 355; - t['numbersign'] = 556; - t['dollar'] = 556; - t['percent'] = 889; - t['ampersand'] = 667; - t['quoteright'] = 222; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 389; - t['plus'] = 584; - t['comma'] = 278; - t['hyphen'] = 333; - t['period'] = 278; - t['slash'] = 278; - t['zero'] = 556; - t['one'] = 556; - t['two'] = 556; - t['three'] = 556; - t['four'] = 556; - t['five'] = 556; - t['six'] = 556; - t['seven'] = 556; - t['eight'] = 556; - t['nine'] = 556; - t['colon'] = 278; - t['semicolon'] = 278; - t['less'] = 584; - t['equal'] = 584; - t['greater'] = 584; - t['question'] = 556; - t['at'] = 1015; - t['A'] = 667; - t['B'] = 667; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 722; - t['I'] = 278; - t['J'] = 500; - t['K'] = 667; - t['L'] = 556; - t['M'] = 833; - t['N'] = 722; - t['O'] = 778; - t['P'] = 667; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 667; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 944; - t['X'] = 667; - t['Y'] = 667; - t['Z'] = 611; - t['bracketleft'] = 278; - t['backslash'] = 278; - t['bracketright'] = 278; - t['asciicircum'] = 469; - t['underscore'] = 556; - t['quoteleft'] = 222; - t['a'] = 556; - t['b'] = 556; - t['c'] = 500; - t['d'] = 556; - t['e'] = 556; - t['f'] = 278; - t['g'] = 556; - t['h'] = 556; - t['i'] = 222; - t['j'] = 222; - t['k'] = 500; - t['l'] = 222; - t['m'] = 833; - t['n'] = 556; - t['o'] = 556; - t['p'] = 556; - t['q'] = 556; - t['r'] = 333; - t['s'] = 500; - t['t'] = 278; - t['u'] = 556; - t['v'] = 500; - t['w'] = 722; - t['x'] = 500; - t['y'] = 500; - t['z'] = 500; - t['braceleft'] = 334; - t['bar'] = 260; - t['braceright'] = 334; - t['asciitilde'] = 584; - t['exclamdown'] = 333; - t['cent'] = 556; - t['sterling'] = 556; - t['fraction'] = 167; - t['yen'] = 556; - t['florin'] = 556; - t['section'] = 556; - t['currency'] = 556; - t['quotesingle'] = 191; - t['quotedblleft'] = 333; - t['guillemotleft'] = 556; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 500; - t['fl'] = 500; - t['endash'] = 556; - t['dagger'] = 556; - t['daggerdbl'] = 556; - t['periodcentered'] = 278; - t['paragraph'] = 537; - t['bullet'] = 350; - t['quotesinglbase'] = 222; - t['quotedblbase'] = 333; - t['quotedblright'] = 333; - t['guillemotright'] = 556; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 611; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 370; - t['Lslash'] = 556; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 365; - t['ae'] = 889; - t['dotlessi'] = 278; - t['lslash'] = 222; - t['oslash'] = 611; - t['oe'] = 944; - t['germandbls'] = 611; - t['Idieresis'] = 278; - t['eacute'] = 556; - t['abreve'] = 556; - t['uhungarumlaut'] = 556; - t['ecaron'] = 556; - t['Ydieresis'] = 667; - t['divide'] = 584; - t['Yacute'] = 667; - t['Acircumflex'] = 667; - t['aacute'] = 556; - t['Ucircumflex'] = 722; - t['yacute'] = 500; - t['scommaaccent'] = 500; - t['ecircumflex'] = 556; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 556; - t['Uacute'] = 722; - t['uogonek'] = 556; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 737; - t['Emacron'] = 667; - t['ccaron'] = 500; - t['aring'] = 556; - t['Ncommaaccent'] = 722; - t['lacute'] = 222; - t['agrave'] = 556; - t['Tcommaaccent'] = 611; - t['Cacute'] = 722; - t['atilde'] = 556; - t['Edotaccent'] = 667; - t['scaron'] = 500; - t['scedilla'] = 500; - t['iacute'] = 278; - t['lozenge'] = 471; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 556; - t['acircumflex'] = 556; - t['Amacron'] = 667; - t['rcaron'] = 333; - t['ccedilla'] = 500; - t['Zdotaccent'] = 611; - t['Thorn'] = 667; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 667; - t['dcaron'] = 643; - t['Umacron'] = 722; - t['uring'] = 556; - t['threesuperior'] = 333; - t['Ograve'] = 778; - t['Agrave'] = 667; - t['Abreve'] = 667; - t['multiply'] = 584; - t['uacute'] = 556; - t['Tcaron'] = 611; - t['partialdiff'] = 476; - t['ydieresis'] = 500; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 556; - t['edieresis'] = 556; - t['cacute'] = 500; - t['nacute'] = 556; - t['umacron'] = 556; - t['Ncaron'] = 722; - t['Iacute'] = 278; - t['plusminus'] = 584; - t['brokenbar'] = 260; - t['registered'] = 737; - t['Gbreve'] = 778; - t['Idotaccent'] = 278; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 333; - t['omacron'] = 556; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 222; - t['tcaron'] = 317; - t['eogonek'] = 556; - t['Uogonek'] = 722; - t['Aacute'] = 667; - t['Adieresis'] = 667; - t['egrave'] = 556; - t['zacute'] = 500; - t['iogonek'] = 222; - t['Oacute'] = 778; - t['oacute'] = 556; - t['amacron'] = 556; - t['sacute'] = 500; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 556; - t['twosuperior'] = 333; - t['Odieresis'] = 778; - t['mu'] = 556; - t['igrave'] = 278; - t['ohungarumlaut'] = 556; - t['Eogonek'] = 667; - t['dcroat'] = 556; - t['threequarters'] = 834; - t['Scedilla'] = 667; - t['lcaron'] = 299; - t['Kcommaaccent'] = 667; - t['Lacute'] = 556; - t['trademark'] = 1000; - t['edotaccent'] = 556; - t['Igrave'] = 278; - t['Imacron'] = 278; - t['Lcaron'] = 556; - t['onehalf'] = 834; - t['lessequal'] = 549; - t['ocircumflex'] = 556; - t['ntilde'] = 556; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 556; - t['gbreve'] = 556; - t['onequarter'] = 834; - t['Scaron'] = 667; - t['Scommaaccent'] = 667; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 556; - t['Ccaron'] = 722; - t['ugrave'] = 556; - t['radical'] = 453; - t['Dcaron'] = 722; - t['rcommaaccent'] = 333; - t['Ntilde'] = 722; - t['otilde'] = 556; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 556; - t['Atilde'] = 667; - t['Aogonek'] = 667; - t['Aring'] = 667; - t['Otilde'] = 778; - t['zdotaccent'] = 500; - t['Ecaron'] = 667; - t['Iogonek'] = 278; - t['kcommaaccent'] = 500; - t['minus'] = 584; - t['Icircumflex'] = 278; - t['ncaron'] = 556; - t['tcommaaccent'] = 278; - t['logicalnot'] = 584; - t['odieresis'] = 556; - t['udieresis'] = 556; - t['notequal'] = 549; - t['gcommaaccent'] = 556; - t['eth'] = 556; - t['zcaron'] = 500; - t['ncommaaccent'] = 556; - t['onesuperior'] = 333; - t['imacron'] = 278; - t['Euro'] = 556; - }); - t['Symbol'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 250; - t['exclam'] = 333; - t['universal'] = 713; - t['numbersign'] = 500; - t['existential'] = 549; - t['percent'] = 833; - t['ampersand'] = 778; - t['suchthat'] = 439; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asteriskmath'] = 500; - t['plus'] = 549; - t['comma'] = 250; - t['minus'] = 549; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 278; - t['semicolon'] = 278; - t['less'] = 549; - t['equal'] = 549; - t['greater'] = 549; - t['question'] = 444; - t['congruent'] = 549; - t['Alpha'] = 722; - t['Beta'] = 667; - t['Chi'] = 722; - t['Delta'] = 612; - t['Epsilon'] = 611; - t['Phi'] = 763; - t['Gamma'] = 603; - t['Eta'] = 722; - t['Iota'] = 333; - t['theta1'] = 631; - t['Kappa'] = 722; - t['Lambda'] = 686; - t['Mu'] = 889; - t['Nu'] = 722; - t['Omicron'] = 722; - t['Pi'] = 768; - t['Theta'] = 741; - t['Rho'] = 556; - t['Sigma'] = 592; - t['Tau'] = 611; - t['Upsilon'] = 690; - t['sigma1'] = 439; - t['Omega'] = 768; - t['Xi'] = 645; - t['Psi'] = 795; - t['Zeta'] = 611; - t['bracketleft'] = 333; - t['therefore'] = 863; - t['bracketright'] = 333; - t['perpendicular'] = 658; - t['underscore'] = 500; - t['radicalex'] = 500; - t['alpha'] = 631; - t['beta'] = 549; - t['chi'] = 549; - t['delta'] = 494; - t['epsilon'] = 439; - t['phi'] = 521; - t['gamma'] = 411; - t['eta'] = 603; - t['iota'] = 329; - t['phi1'] = 603; - t['kappa'] = 549; - t['lambda'] = 549; - t['mu'] = 576; - t['nu'] = 521; - t['omicron'] = 549; - t['pi'] = 549; - t['theta'] = 521; - t['rho'] = 549; - t['sigma'] = 603; - t['tau'] = 439; - t['upsilon'] = 576; - t['omega1'] = 713; - t['omega'] = 686; - t['xi'] = 493; - t['psi'] = 686; - t['zeta'] = 494; - t['braceleft'] = 480; - t['bar'] = 200; - t['braceright'] = 480; - t['similar'] = 549; - t['Euro'] = 750; - t['Upsilon1'] = 620; - t['minute'] = 247; - t['lessequal'] = 549; - t['fraction'] = 167; - t['infinity'] = 713; - t['florin'] = 500; - t['club'] = 753; - t['diamond'] = 753; - t['heart'] = 753; - t['spade'] = 753; - t['arrowboth'] = 1042; - t['arrowleft'] = 987; - t['arrowup'] = 603; - t['arrowright'] = 987; - t['arrowdown'] = 603; - t['degree'] = 400; - t['plusminus'] = 549; - t['second'] = 411; - t['greaterequal'] = 549; - t['multiply'] = 549; - t['proportional'] = 713; - t['partialdiff'] = 494; - t['bullet'] = 460; - t['divide'] = 549; - t['notequal'] = 549; - t['equivalence'] = 549; - t['approxequal'] = 549; - t['ellipsis'] = 1000; - t['arrowvertex'] = 603; - t['arrowhorizex'] = 1000; - t['carriagereturn'] = 658; - t['aleph'] = 823; - t['Ifraktur'] = 686; - t['Rfraktur'] = 795; - t['weierstrass'] = 987; - t['circlemultiply'] = 768; - t['circleplus'] = 768; - t['emptyset'] = 823; - t['intersection'] = 768; - t['union'] = 768; - t['propersuperset'] = 713; - t['reflexsuperset'] = 713; - t['notsubset'] = 713; - t['propersubset'] = 713; - t['reflexsubset'] = 713; - t['element'] = 713; - t['notelement'] = 713; - t['angle'] = 768; - t['gradient'] = 713; - t['registerserif'] = 790; - t['copyrightserif'] = 790; - t['trademarkserif'] = 890; - t['product'] = 823; - t['radical'] = 549; - t['dotmath'] = 250; - t['logicalnot'] = 713; - t['logicaland'] = 603; - t['logicalor'] = 603; - t['arrowdblboth'] = 1042; - t['arrowdblleft'] = 987; - t['arrowdblup'] = 603; - t['arrowdblright'] = 987; - t['arrowdbldown'] = 603; - t['lozenge'] = 494; - t['angleleft'] = 329; - t['registersans'] = 790; - t['copyrightsans'] = 790; - t['trademarksans'] = 786; - t['summation'] = 713; - t['parenlefttp'] = 384; - t['parenleftex'] = 384; - t['parenleftbt'] = 384; - t['bracketlefttp'] = 384; - t['bracketleftex'] = 384; - t['bracketleftbt'] = 384; - t['bracelefttp'] = 494; - t['braceleftmid'] = 494; - t['braceleftbt'] = 494; - t['braceex'] = 494; - t['angleright'] = 329; - t['integral'] = 274; - t['integraltp'] = 686; - t['integralex'] = 686; - t['integralbt'] = 686; - t['parenrighttp'] = 384; - t['parenrightex'] = 384; - t['parenrightbt'] = 384; - t['bracketrighttp'] = 384; - t['bracketrightex'] = 384; - t['bracketrightbt'] = 384; - t['bracerighttp'] = 494; - t['bracerightmid'] = 494; - t['bracerightbt'] = 494; - t['apple'] = 790; - }); - t['Times-Roman'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 250; - t['exclam'] = 333; - t['quotedbl'] = 408; - t['numbersign'] = 500; - t['dollar'] = 500; - t['percent'] = 833; - t['ampersand'] = 778; - t['quoteright'] = 333; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 500; - t['plus'] = 564; - t['comma'] = 250; - t['hyphen'] = 333; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 278; - t['semicolon'] = 278; - t['less'] = 564; - t['equal'] = 564; - t['greater'] = 564; - t['question'] = 444; - t['at'] = 921; - t['A'] = 722; - t['B'] = 667; - t['C'] = 667; - t['D'] = 722; - t['E'] = 611; - t['F'] = 556; - t['G'] = 722; - t['H'] = 722; - t['I'] = 333; - t['J'] = 389; - t['K'] = 722; - t['L'] = 611; - t['M'] = 889; - t['N'] = 722; - t['O'] = 722; - t['P'] = 556; - t['Q'] = 722; - t['R'] = 667; - t['S'] = 556; - t['T'] = 611; - t['U'] = 722; - t['V'] = 722; - t['W'] = 944; - t['X'] = 722; - t['Y'] = 722; - t['Z'] = 611; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 469; - t['underscore'] = 500; - t['quoteleft'] = 333; - t['a'] = 444; - t['b'] = 500; - t['c'] = 444; - t['d'] = 500; - t['e'] = 444; - t['f'] = 333; - t['g'] = 500; - t['h'] = 500; - t['i'] = 278; - t['j'] = 278; - t['k'] = 500; - t['l'] = 278; - t['m'] = 778; - t['n'] = 500; - t['o'] = 500; - t['p'] = 500; - t['q'] = 500; - t['r'] = 333; - t['s'] = 389; - t['t'] = 278; - t['u'] = 500; - t['v'] = 500; - t['w'] = 722; - t['x'] = 500; - t['y'] = 500; - t['z'] = 444; - t['braceleft'] = 480; - t['bar'] = 200; - t['braceright'] = 480; - t['asciitilde'] = 541; - t['exclamdown'] = 333; - t['cent'] = 500; - t['sterling'] = 500; - t['fraction'] = 167; - t['yen'] = 500; - t['florin'] = 500; - t['section'] = 500; - t['currency'] = 500; - t['quotesingle'] = 180; - t['quotedblleft'] = 444; - t['guillemotleft'] = 500; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 556; - t['fl'] = 556; - t['endash'] = 500; - t['dagger'] = 500; - t['daggerdbl'] = 500; - t['periodcentered'] = 250; - t['paragraph'] = 453; - t['bullet'] = 350; - t['quotesinglbase'] = 333; - t['quotedblbase'] = 444; - t['quotedblright'] = 444; - t['guillemotright'] = 500; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 444; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 889; - t['ordfeminine'] = 276; - t['Lslash'] = 611; - t['Oslash'] = 722; - t['OE'] = 889; - t['ordmasculine'] = 310; - t['ae'] = 667; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 500; - t['oe'] = 722; - t['germandbls'] = 500; - t['Idieresis'] = 333; - t['eacute'] = 444; - t['abreve'] = 444; - t['uhungarumlaut'] = 500; - t['ecaron'] = 444; - t['Ydieresis'] = 722; - t['divide'] = 564; - t['Yacute'] = 722; - t['Acircumflex'] = 722; - t['aacute'] = 444; - t['Ucircumflex'] = 722; - t['yacute'] = 500; - t['scommaaccent'] = 389; - t['ecircumflex'] = 444; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 444; - t['Uacute'] = 722; - t['uogonek'] = 500; - t['Edieresis'] = 611; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 760; - t['Emacron'] = 611; - t['ccaron'] = 444; - t['aring'] = 444; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 444; - t['Tcommaaccent'] = 611; - t['Cacute'] = 667; - t['atilde'] = 444; - t['Edotaccent'] = 611; - t['scaron'] = 389; - t['scedilla'] = 389; - t['iacute'] = 278; - t['lozenge'] = 471; - t['Rcaron'] = 667; - t['Gcommaaccent'] = 722; - t['ucircumflex'] = 500; - t['acircumflex'] = 444; - t['Amacron'] = 722; - t['rcaron'] = 333; - t['ccedilla'] = 444; - t['Zdotaccent'] = 611; - t['Thorn'] = 556; - t['Omacron'] = 722; - t['Racute'] = 667; - t['Sacute'] = 556; - t['dcaron'] = 588; - t['Umacron'] = 722; - t['uring'] = 500; - t['threesuperior'] = 300; - t['Ograve'] = 722; - t['Agrave'] = 722; - t['Abreve'] = 722; - t['multiply'] = 564; - t['uacute'] = 500; - t['Tcaron'] = 611; - t['partialdiff'] = 476; - t['ydieresis'] = 500; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 611; - t['adieresis'] = 444; - t['edieresis'] = 444; - t['cacute'] = 444; - t['nacute'] = 500; - t['umacron'] = 500; - t['Ncaron'] = 722; - t['Iacute'] = 333; - t['plusminus'] = 564; - t['brokenbar'] = 200; - t['registered'] = 760; - t['Gbreve'] = 722; - t['Idotaccent'] = 333; - t['summation'] = 600; - t['Egrave'] = 611; - t['racute'] = 333; - t['omacron'] = 500; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 667; - t['lcommaaccent'] = 278; - t['tcaron'] = 326; - t['eogonek'] = 444; - t['Uogonek'] = 722; - t['Aacute'] = 722; - t['Adieresis'] = 722; - t['egrave'] = 444; - t['zacute'] = 444; - t['iogonek'] = 278; - t['Oacute'] = 722; - t['oacute'] = 500; - t['amacron'] = 444; - t['sacute'] = 389; - t['idieresis'] = 278; - t['Ocircumflex'] = 722; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 500; - t['twosuperior'] = 300; - t['Odieresis'] = 722; - t['mu'] = 500; - t['igrave'] = 278; - t['ohungarumlaut'] = 500; - t['Eogonek'] = 611; - t['dcroat'] = 500; - t['threequarters'] = 750; - t['Scedilla'] = 556; - t['lcaron'] = 344; - t['Kcommaaccent'] = 722; - t['Lacute'] = 611; - t['trademark'] = 980; - t['edotaccent'] = 444; - t['Igrave'] = 333; - t['Imacron'] = 333; - t['Lcaron'] = 611; - t['onehalf'] = 750; - t['lessequal'] = 549; - t['ocircumflex'] = 500; - t['ntilde'] = 500; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 611; - t['emacron'] = 444; - t['gbreve'] = 500; - t['onequarter'] = 750; - t['Scaron'] = 556; - t['Scommaaccent'] = 556; - t['Ohungarumlaut'] = 722; - t['degree'] = 400; - t['ograve'] = 500; - t['Ccaron'] = 667; - t['ugrave'] = 500; - t['radical'] = 453; - t['Dcaron'] = 722; - t['rcommaaccent'] = 333; - t['Ntilde'] = 722; - t['otilde'] = 500; - t['Rcommaaccent'] = 667; - t['Lcommaaccent'] = 611; - t['Atilde'] = 722; - t['Aogonek'] = 722; - t['Aring'] = 722; - t['Otilde'] = 722; - t['zdotaccent'] = 444; - t['Ecaron'] = 611; - t['Iogonek'] = 333; - t['kcommaaccent'] = 500; - t['minus'] = 564; - t['Icircumflex'] = 333; - t['ncaron'] = 500; - t['tcommaaccent'] = 278; - t['logicalnot'] = 564; - t['odieresis'] = 500; - t['udieresis'] = 500; - t['notequal'] = 549; - t['gcommaaccent'] = 500; - t['eth'] = 500; - t['zcaron'] = 444; - t['ncommaaccent'] = 500; - t['onesuperior'] = 300; - t['imacron'] = 278; - t['Euro'] = 500; - }); - t['Times-Bold'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 250; - t['exclam'] = 333; - t['quotedbl'] = 555; - t['numbersign'] = 500; - t['dollar'] = 500; - t['percent'] = 1000; - t['ampersand'] = 833; - t['quoteright'] = 333; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 500; - t['plus'] = 570; - t['comma'] = 250; - t['hyphen'] = 333; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 570; - t['equal'] = 570; - t['greater'] = 570; - t['question'] = 500; - t['at'] = 930; - t['A'] = 722; - t['B'] = 667; - t['C'] = 722; - t['D'] = 722; - t['E'] = 667; - t['F'] = 611; - t['G'] = 778; - t['H'] = 778; - t['I'] = 389; - t['J'] = 500; - t['K'] = 778; - t['L'] = 667; - t['M'] = 944; - t['N'] = 722; - t['O'] = 778; - t['P'] = 611; - t['Q'] = 778; - t['R'] = 722; - t['S'] = 556; - t['T'] = 667; - t['U'] = 722; - t['V'] = 722; - t['W'] = 1000; - t['X'] = 722; - t['Y'] = 722; - t['Z'] = 667; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 581; - t['underscore'] = 500; - t['quoteleft'] = 333; - t['a'] = 500; - t['b'] = 556; - t['c'] = 444; - t['d'] = 556; - t['e'] = 444; - t['f'] = 333; - t['g'] = 500; - t['h'] = 556; - t['i'] = 278; - t['j'] = 333; - t['k'] = 556; - t['l'] = 278; - t['m'] = 833; - t['n'] = 556; - t['o'] = 500; - t['p'] = 556; - t['q'] = 556; - t['r'] = 444; - t['s'] = 389; - t['t'] = 333; - t['u'] = 556; - t['v'] = 500; - t['w'] = 722; - t['x'] = 500; - t['y'] = 500; - t['z'] = 444; - t['braceleft'] = 394; - t['bar'] = 220; - t['braceright'] = 394; - t['asciitilde'] = 520; - t['exclamdown'] = 333; - t['cent'] = 500; - t['sterling'] = 500; - t['fraction'] = 167; - t['yen'] = 500; - t['florin'] = 500; - t['section'] = 500; - t['currency'] = 500; - t['quotesingle'] = 278; - t['quotedblleft'] = 500; - t['guillemotleft'] = 500; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 556; - t['fl'] = 556; - t['endash'] = 500; - t['dagger'] = 500; - t['daggerdbl'] = 500; - t['periodcentered'] = 250; - t['paragraph'] = 540; - t['bullet'] = 350; - t['quotesinglbase'] = 333; - t['quotedblbase'] = 500; - t['quotedblright'] = 500; - t['guillemotright'] = 500; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 500; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 1000; - t['ordfeminine'] = 300; - t['Lslash'] = 667; - t['Oslash'] = 778; - t['OE'] = 1000; - t['ordmasculine'] = 330; - t['ae'] = 722; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 500; - t['oe'] = 722; - t['germandbls'] = 556; - t['Idieresis'] = 389; - t['eacute'] = 444; - t['abreve'] = 500; - t['uhungarumlaut'] = 556; - t['ecaron'] = 444; - t['Ydieresis'] = 722; - t['divide'] = 570; - t['Yacute'] = 722; - t['Acircumflex'] = 722; - t['aacute'] = 500; - t['Ucircumflex'] = 722; - t['yacute'] = 500; - t['scommaaccent'] = 389; - t['ecircumflex'] = 444; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 500; - t['Uacute'] = 722; - t['uogonek'] = 556; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 747; - t['Emacron'] = 667; - t['ccaron'] = 444; - t['aring'] = 500; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 500; - t['Tcommaaccent'] = 667; - t['Cacute'] = 722; - t['atilde'] = 500; - t['Edotaccent'] = 667; - t['scaron'] = 389; - t['scedilla'] = 389; - t['iacute'] = 278; - t['lozenge'] = 494; - t['Rcaron'] = 722; - t['Gcommaaccent'] = 778; - t['ucircumflex'] = 556; - t['acircumflex'] = 500; - t['Amacron'] = 722; - t['rcaron'] = 444; - t['ccedilla'] = 444; - t['Zdotaccent'] = 667; - t['Thorn'] = 611; - t['Omacron'] = 778; - t['Racute'] = 722; - t['Sacute'] = 556; - t['dcaron'] = 672; - t['Umacron'] = 722; - t['uring'] = 556; - t['threesuperior'] = 300; - t['Ograve'] = 778; - t['Agrave'] = 722; - t['Abreve'] = 722; - t['multiply'] = 570; - t['uacute'] = 556; - t['Tcaron'] = 667; - t['partialdiff'] = 494; - t['ydieresis'] = 500; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 500; - t['edieresis'] = 444; - t['cacute'] = 444; - t['nacute'] = 556; - t['umacron'] = 556; - t['Ncaron'] = 722; - t['Iacute'] = 389; - t['plusminus'] = 570; - t['brokenbar'] = 220; - t['registered'] = 747; - t['Gbreve'] = 778; - t['Idotaccent'] = 389; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 444; - t['omacron'] = 500; - t['Zacute'] = 667; - t['Zcaron'] = 667; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 722; - t['lcommaaccent'] = 278; - t['tcaron'] = 416; - t['eogonek'] = 444; - t['Uogonek'] = 722; - t['Aacute'] = 722; - t['Adieresis'] = 722; - t['egrave'] = 444; - t['zacute'] = 444; - t['iogonek'] = 278; - t['Oacute'] = 778; - t['oacute'] = 500; - t['amacron'] = 500; - t['sacute'] = 389; - t['idieresis'] = 278; - t['Ocircumflex'] = 778; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 556; - t['twosuperior'] = 300; - t['Odieresis'] = 778; - t['mu'] = 556; - t['igrave'] = 278; - t['ohungarumlaut'] = 500; - t['Eogonek'] = 667; - t['dcroat'] = 556; - t['threequarters'] = 750; - t['Scedilla'] = 556; - t['lcaron'] = 394; - t['Kcommaaccent'] = 778; - t['Lacute'] = 667; - t['trademark'] = 1000; - t['edotaccent'] = 444; - t['Igrave'] = 389; - t['Imacron'] = 389; - t['Lcaron'] = 667; - t['onehalf'] = 750; - t['lessequal'] = 549; - t['ocircumflex'] = 500; - t['ntilde'] = 556; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 444; - t['gbreve'] = 500; - t['onequarter'] = 750; - t['Scaron'] = 556; - t['Scommaaccent'] = 556; - t['Ohungarumlaut'] = 778; - t['degree'] = 400; - t['ograve'] = 500; - t['Ccaron'] = 722; - t['ugrave'] = 556; - t['radical'] = 549; - t['Dcaron'] = 722; - t['rcommaaccent'] = 444; - t['Ntilde'] = 722; - t['otilde'] = 500; - t['Rcommaaccent'] = 722; - t['Lcommaaccent'] = 667; - t['Atilde'] = 722; - t['Aogonek'] = 722; - t['Aring'] = 722; - t['Otilde'] = 778; - t['zdotaccent'] = 444; - t['Ecaron'] = 667; - t['Iogonek'] = 389; - t['kcommaaccent'] = 556; - t['minus'] = 570; - t['Icircumflex'] = 389; - t['ncaron'] = 556; - t['tcommaaccent'] = 333; - t['logicalnot'] = 570; - t['odieresis'] = 500; - t['udieresis'] = 556; - t['notequal'] = 549; - t['gcommaaccent'] = 500; - t['eth'] = 500; - t['zcaron'] = 444; - t['ncommaaccent'] = 556; - t['onesuperior'] = 300; - t['imacron'] = 278; - t['Euro'] = 500; - }); - t['Times-BoldItalic'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 250; - t['exclam'] = 389; - t['quotedbl'] = 555; - t['numbersign'] = 500; - t['dollar'] = 500; - t['percent'] = 833; - t['ampersand'] = 778; - t['quoteright'] = 333; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 500; - t['plus'] = 570; - t['comma'] = 250; - t['hyphen'] = 333; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 570; - t['equal'] = 570; - t['greater'] = 570; - t['question'] = 500; - t['at'] = 832; - t['A'] = 667; - t['B'] = 667; - t['C'] = 667; - t['D'] = 722; - t['E'] = 667; - t['F'] = 667; - t['G'] = 722; - t['H'] = 778; - t['I'] = 389; - t['J'] = 500; - t['K'] = 667; - t['L'] = 611; - t['M'] = 889; - t['N'] = 722; - t['O'] = 722; - t['P'] = 611; - t['Q'] = 722; - t['R'] = 667; - t['S'] = 556; - t['T'] = 611; - t['U'] = 722; - t['V'] = 667; - t['W'] = 889; - t['X'] = 667; - t['Y'] = 611; - t['Z'] = 611; - t['bracketleft'] = 333; - t['backslash'] = 278; - t['bracketright'] = 333; - t['asciicircum'] = 570; - t['underscore'] = 500; - t['quoteleft'] = 333; - t['a'] = 500; - t['b'] = 500; - t['c'] = 444; - t['d'] = 500; - t['e'] = 444; - t['f'] = 333; - t['g'] = 500; - t['h'] = 556; - t['i'] = 278; - t['j'] = 278; - t['k'] = 500; - t['l'] = 278; - t['m'] = 778; - t['n'] = 556; - t['o'] = 500; - t['p'] = 500; - t['q'] = 500; - t['r'] = 389; - t['s'] = 389; - t['t'] = 278; - t['u'] = 556; - t['v'] = 444; - t['w'] = 667; - t['x'] = 500; - t['y'] = 444; - t['z'] = 389; - t['braceleft'] = 348; - t['bar'] = 220; - t['braceright'] = 348; - t['asciitilde'] = 570; - t['exclamdown'] = 389; - t['cent'] = 500; - t['sterling'] = 500; - t['fraction'] = 167; - t['yen'] = 500; - t['florin'] = 500; - t['section'] = 500; - t['currency'] = 500; - t['quotesingle'] = 278; - t['quotedblleft'] = 500; - t['guillemotleft'] = 500; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 556; - t['fl'] = 556; - t['endash'] = 500; - t['dagger'] = 500; - t['daggerdbl'] = 500; - t['periodcentered'] = 250; - t['paragraph'] = 500; - t['bullet'] = 350; - t['quotesinglbase'] = 333; - t['quotedblbase'] = 500; - t['quotedblright'] = 500; - t['guillemotright'] = 500; - t['ellipsis'] = 1000; - t['perthousand'] = 1000; - t['questiondown'] = 500; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 1000; - t['AE'] = 944; - t['ordfeminine'] = 266; - t['Lslash'] = 611; - t['Oslash'] = 722; - t['OE'] = 944; - t['ordmasculine'] = 300; - t['ae'] = 722; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 500; - t['oe'] = 722; - t['germandbls'] = 500; - t['Idieresis'] = 389; - t['eacute'] = 444; - t['abreve'] = 500; - t['uhungarumlaut'] = 556; - t['ecaron'] = 444; - t['Ydieresis'] = 611; - t['divide'] = 570; - t['Yacute'] = 611; - t['Acircumflex'] = 667; - t['aacute'] = 500; - t['Ucircumflex'] = 722; - t['yacute'] = 444; - t['scommaaccent'] = 389; - t['ecircumflex'] = 444; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 500; - t['Uacute'] = 722; - t['uogonek'] = 556; - t['Edieresis'] = 667; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 747; - t['Emacron'] = 667; - t['ccaron'] = 444; - t['aring'] = 500; - t['Ncommaaccent'] = 722; - t['lacute'] = 278; - t['agrave'] = 500; - t['Tcommaaccent'] = 611; - t['Cacute'] = 667; - t['atilde'] = 500; - t['Edotaccent'] = 667; - t['scaron'] = 389; - t['scedilla'] = 389; - t['iacute'] = 278; - t['lozenge'] = 494; - t['Rcaron'] = 667; - t['Gcommaaccent'] = 722; - t['ucircumflex'] = 556; - t['acircumflex'] = 500; - t['Amacron'] = 667; - t['rcaron'] = 389; - t['ccedilla'] = 444; - t['Zdotaccent'] = 611; - t['Thorn'] = 611; - t['Omacron'] = 722; - t['Racute'] = 667; - t['Sacute'] = 556; - t['dcaron'] = 608; - t['Umacron'] = 722; - t['uring'] = 556; - t['threesuperior'] = 300; - t['Ograve'] = 722; - t['Agrave'] = 667; - t['Abreve'] = 667; - t['multiply'] = 570; - t['uacute'] = 556; - t['Tcaron'] = 611; - t['partialdiff'] = 494; - t['ydieresis'] = 444; - t['Nacute'] = 722; - t['icircumflex'] = 278; - t['Ecircumflex'] = 667; - t['adieresis'] = 500; - t['edieresis'] = 444; - t['cacute'] = 444; - t['nacute'] = 556; - t['umacron'] = 556; - t['Ncaron'] = 722; - t['Iacute'] = 389; - t['plusminus'] = 570; - t['brokenbar'] = 220; - t['registered'] = 747; - t['Gbreve'] = 722; - t['Idotaccent'] = 389; - t['summation'] = 600; - t['Egrave'] = 667; - t['racute'] = 389; - t['omacron'] = 500; - t['Zacute'] = 611; - t['Zcaron'] = 611; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 667; - t['lcommaaccent'] = 278; - t['tcaron'] = 366; - t['eogonek'] = 444; - t['Uogonek'] = 722; - t['Aacute'] = 667; - t['Adieresis'] = 667; - t['egrave'] = 444; - t['zacute'] = 389; - t['iogonek'] = 278; - t['Oacute'] = 722; - t['oacute'] = 500; - t['amacron'] = 500; - t['sacute'] = 389; - t['idieresis'] = 278; - t['Ocircumflex'] = 722; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 500; - t['twosuperior'] = 300; - t['Odieresis'] = 722; - t['mu'] = 576; - t['igrave'] = 278; - t['ohungarumlaut'] = 500; - t['Eogonek'] = 667; - t['dcroat'] = 500; - t['threequarters'] = 750; - t['Scedilla'] = 556; - t['lcaron'] = 382; - t['Kcommaaccent'] = 667; - t['Lacute'] = 611; - t['trademark'] = 1000; - t['edotaccent'] = 444; - t['Igrave'] = 389; - t['Imacron'] = 389; - t['Lcaron'] = 611; - t['onehalf'] = 750; - t['lessequal'] = 549; - t['ocircumflex'] = 500; - t['ntilde'] = 556; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 667; - t['emacron'] = 444; - t['gbreve'] = 500; - t['onequarter'] = 750; - t['Scaron'] = 556; - t['Scommaaccent'] = 556; - t['Ohungarumlaut'] = 722; - t['degree'] = 400; - t['ograve'] = 500; - t['Ccaron'] = 667; - t['ugrave'] = 556; - t['radical'] = 549; - t['Dcaron'] = 722; - t['rcommaaccent'] = 389; - t['Ntilde'] = 722; - t['otilde'] = 500; - t['Rcommaaccent'] = 667; - t['Lcommaaccent'] = 611; - t['Atilde'] = 667; - t['Aogonek'] = 667; - t['Aring'] = 667; - t['Otilde'] = 722; - t['zdotaccent'] = 389; - t['Ecaron'] = 667; - t['Iogonek'] = 389; - t['kcommaaccent'] = 500; - t['minus'] = 606; - t['Icircumflex'] = 389; - t['ncaron'] = 556; - t['tcommaaccent'] = 278; - t['logicalnot'] = 606; - t['odieresis'] = 500; - t['udieresis'] = 556; - t['notequal'] = 549; - t['gcommaaccent'] = 500; - t['eth'] = 500; - t['zcaron'] = 389; - t['ncommaaccent'] = 556; - t['onesuperior'] = 300; - t['imacron'] = 278; - t['Euro'] = 500; - }); - t['Times-Italic'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 250; - t['exclam'] = 333; - t['quotedbl'] = 420; - t['numbersign'] = 500; - t['dollar'] = 500; - t['percent'] = 833; - t['ampersand'] = 778; - t['quoteright'] = 333; - t['parenleft'] = 333; - t['parenright'] = 333; - t['asterisk'] = 500; - t['plus'] = 675; - t['comma'] = 250; - t['hyphen'] = 333; - t['period'] = 250; - t['slash'] = 278; - t['zero'] = 500; - t['one'] = 500; - t['two'] = 500; - t['three'] = 500; - t['four'] = 500; - t['five'] = 500; - t['six'] = 500; - t['seven'] = 500; - t['eight'] = 500; - t['nine'] = 500; - t['colon'] = 333; - t['semicolon'] = 333; - t['less'] = 675; - t['equal'] = 675; - t['greater'] = 675; - t['question'] = 500; - t['at'] = 920; - t['A'] = 611; - t['B'] = 611; - t['C'] = 667; - t['D'] = 722; - t['E'] = 611; - t['F'] = 611; - t['G'] = 722; - t['H'] = 722; - t['I'] = 333; - t['J'] = 444; - t['K'] = 667; - t['L'] = 556; - t['M'] = 833; - t['N'] = 667; - t['O'] = 722; - t['P'] = 611; - t['Q'] = 722; - t['R'] = 611; - t['S'] = 500; - t['T'] = 556; - t['U'] = 722; - t['V'] = 611; - t['W'] = 833; - t['X'] = 611; - t['Y'] = 556; - t['Z'] = 556; - t['bracketleft'] = 389; - t['backslash'] = 278; - t['bracketright'] = 389; - t['asciicircum'] = 422; - t['underscore'] = 500; - t['quoteleft'] = 333; - t['a'] = 500; - t['b'] = 500; - t['c'] = 444; - t['d'] = 500; - t['e'] = 444; - t['f'] = 278; - t['g'] = 500; - t['h'] = 500; - t['i'] = 278; - t['j'] = 278; - t['k'] = 444; - t['l'] = 278; - t['m'] = 722; - t['n'] = 500; - t['o'] = 500; - t['p'] = 500; - t['q'] = 500; - t['r'] = 389; - t['s'] = 389; - t['t'] = 278; - t['u'] = 500; - t['v'] = 444; - t['w'] = 667; - t['x'] = 444; - t['y'] = 444; - t['z'] = 389; - t['braceleft'] = 400; - t['bar'] = 275; - t['braceright'] = 400; - t['asciitilde'] = 541; - t['exclamdown'] = 389; - t['cent'] = 500; - t['sterling'] = 500; - t['fraction'] = 167; - t['yen'] = 500; - t['florin'] = 500; - t['section'] = 500; - t['currency'] = 500; - t['quotesingle'] = 214; - t['quotedblleft'] = 556; - t['guillemotleft'] = 500; - t['guilsinglleft'] = 333; - t['guilsinglright'] = 333; - t['fi'] = 500; - t['fl'] = 500; - t['endash'] = 500; - t['dagger'] = 500; - t['daggerdbl'] = 500; - t['periodcentered'] = 250; - t['paragraph'] = 523; - t['bullet'] = 350; - t['quotesinglbase'] = 333; - t['quotedblbase'] = 556; - t['quotedblright'] = 556; - t['guillemotright'] = 500; - t['ellipsis'] = 889; - t['perthousand'] = 1000; - t['questiondown'] = 500; - t['grave'] = 333; - t['acute'] = 333; - t['circumflex'] = 333; - t['tilde'] = 333; - t['macron'] = 333; - t['breve'] = 333; - t['dotaccent'] = 333; - t['dieresis'] = 333; - t['ring'] = 333; - t['cedilla'] = 333; - t['hungarumlaut'] = 333; - t['ogonek'] = 333; - t['caron'] = 333; - t['emdash'] = 889; - t['AE'] = 889; - t['ordfeminine'] = 276; - t['Lslash'] = 556; - t['Oslash'] = 722; - t['OE'] = 944; - t['ordmasculine'] = 310; - t['ae'] = 667; - t['dotlessi'] = 278; - t['lslash'] = 278; - t['oslash'] = 500; - t['oe'] = 667; - t['germandbls'] = 500; - t['Idieresis'] = 333; - t['eacute'] = 444; - t['abreve'] = 500; - t['uhungarumlaut'] = 500; - t['ecaron'] = 444; - t['Ydieresis'] = 556; - t['divide'] = 675; - t['Yacute'] = 556; - t['Acircumflex'] = 611; - t['aacute'] = 500; - t['Ucircumflex'] = 722; - t['yacute'] = 444; - t['scommaaccent'] = 389; - t['ecircumflex'] = 444; - t['Uring'] = 722; - t['Udieresis'] = 722; - t['aogonek'] = 500; - t['Uacute'] = 722; - t['uogonek'] = 500; - t['Edieresis'] = 611; - t['Dcroat'] = 722; - t['commaaccent'] = 250; - t['copyright'] = 760; - t['Emacron'] = 611; - t['ccaron'] = 444; - t['aring'] = 500; - t['Ncommaaccent'] = 667; - t['lacute'] = 278; - t['agrave'] = 500; - t['Tcommaaccent'] = 556; - t['Cacute'] = 667; - t['atilde'] = 500; - t['Edotaccent'] = 611; - t['scaron'] = 389; - t['scedilla'] = 389; - t['iacute'] = 278; - t['lozenge'] = 471; - t['Rcaron'] = 611; - t['Gcommaaccent'] = 722; - t['ucircumflex'] = 500; - t['acircumflex'] = 500; - t['Amacron'] = 611; - t['rcaron'] = 389; - t['ccedilla'] = 444; - t['Zdotaccent'] = 556; - t['Thorn'] = 611; - t['Omacron'] = 722; - t['Racute'] = 611; - t['Sacute'] = 500; - t['dcaron'] = 544; - t['Umacron'] = 722; - t['uring'] = 500; - t['threesuperior'] = 300; - t['Ograve'] = 722; - t['Agrave'] = 611; - t['Abreve'] = 611; - t['multiply'] = 675; - t['uacute'] = 500; - t['Tcaron'] = 556; - t['partialdiff'] = 476; - t['ydieresis'] = 444; - t['Nacute'] = 667; - t['icircumflex'] = 278; - t['Ecircumflex'] = 611; - t['adieresis'] = 500; - t['edieresis'] = 444; - t['cacute'] = 444; - t['nacute'] = 500; - t['umacron'] = 500; - t['Ncaron'] = 667; - t['Iacute'] = 333; - t['plusminus'] = 675; - t['brokenbar'] = 275; - t['registered'] = 760; - t['Gbreve'] = 722; - t['Idotaccent'] = 333; - t['summation'] = 600; - t['Egrave'] = 611; - t['racute'] = 389; - t['omacron'] = 500; - t['Zacute'] = 556; - t['Zcaron'] = 556; - t['greaterequal'] = 549; - t['Eth'] = 722; - t['Ccedilla'] = 667; - t['lcommaaccent'] = 278; - t['tcaron'] = 300; - t['eogonek'] = 444; - t['Uogonek'] = 722; - t['Aacute'] = 611; - t['Adieresis'] = 611; - t['egrave'] = 444; - t['zacute'] = 389; - t['iogonek'] = 278; - t['Oacute'] = 722; - t['oacute'] = 500; - t['amacron'] = 500; - t['sacute'] = 389; - t['idieresis'] = 278; - t['Ocircumflex'] = 722; - t['Ugrave'] = 722; - t['Delta'] = 612; - t['thorn'] = 500; - t['twosuperior'] = 300; - t['Odieresis'] = 722; - t['mu'] = 500; - t['igrave'] = 278; - t['ohungarumlaut'] = 500; - t['Eogonek'] = 611; - t['dcroat'] = 500; - t['threequarters'] = 750; - t['Scedilla'] = 500; - t['lcaron'] = 300; - t['Kcommaaccent'] = 667; - t['Lacute'] = 556; - t['trademark'] = 980; - t['edotaccent'] = 444; - t['Igrave'] = 333; - t['Imacron'] = 333; - t['Lcaron'] = 611; - t['onehalf'] = 750; - t['lessequal'] = 549; - t['ocircumflex'] = 500; - t['ntilde'] = 500; - t['Uhungarumlaut'] = 722; - t['Eacute'] = 611; - t['emacron'] = 444; - t['gbreve'] = 500; - t['onequarter'] = 750; - t['Scaron'] = 500; - t['Scommaaccent'] = 500; - t['Ohungarumlaut'] = 722; - t['degree'] = 400; - t['ograve'] = 500; - t['Ccaron'] = 667; - t['ugrave'] = 500; - t['radical'] = 453; - t['Dcaron'] = 722; - t['rcommaaccent'] = 389; - t['Ntilde'] = 667; - t['otilde'] = 500; - t['Rcommaaccent'] = 611; - t['Lcommaaccent'] = 556; - t['Atilde'] = 611; - t['Aogonek'] = 611; - t['Aring'] = 611; - t['Otilde'] = 722; - t['zdotaccent'] = 389; - t['Ecaron'] = 611; - t['Iogonek'] = 333; - t['kcommaaccent'] = 444; - t['minus'] = 675; - t['Icircumflex'] = 333; - t['ncaron'] = 500; - t['tcommaaccent'] = 278; - t['logicalnot'] = 675; - t['odieresis'] = 500; - t['udieresis'] = 500; - t['notequal'] = 549; - t['gcommaaccent'] = 500; - t['eth'] = 500; - t['zcaron'] = 389; - t['ncommaaccent'] = 500; - t['onesuperior'] = 300; - t['imacron'] = 278; - t['Euro'] = 500; - }); - t['ZapfDingbats'] = (0, _util.getLookupTableFactory)(function (t) { - t['space'] = 278; - t['a1'] = 974; - t['a2'] = 961; - t['a202'] = 974; - t['a3'] = 980; - t['a4'] = 719; - t['a5'] = 789; - t['a119'] = 790; - t['a118'] = 791; - t['a117'] = 690; - t['a11'] = 960; - t['a12'] = 939; - t['a13'] = 549; - t['a14'] = 855; - t['a15'] = 911; - t['a16'] = 933; - t['a105'] = 911; - t['a17'] = 945; - t['a18'] = 974; - t['a19'] = 755; - t['a20'] = 846; - t['a21'] = 762; - t['a22'] = 761; - t['a23'] = 571; - t['a24'] = 677; - t['a25'] = 763; - t['a26'] = 760; - t['a27'] = 759; - t['a28'] = 754; - t['a6'] = 494; - t['a7'] = 552; - t['a8'] = 537; - t['a9'] = 577; - t['a10'] = 692; - t['a29'] = 786; - t['a30'] = 788; - t['a31'] = 788; - t['a32'] = 790; - t['a33'] = 793; - t['a34'] = 794; - t['a35'] = 816; - t['a36'] = 823; - t['a37'] = 789; - t['a38'] = 841; - t['a39'] = 823; - t['a40'] = 833; - t['a41'] = 816; - t['a42'] = 831; - t['a43'] = 923; - t['a44'] = 744; - t['a45'] = 723; - t['a46'] = 749; - t['a47'] = 790; - t['a48'] = 792; - t['a49'] = 695; - t['a50'] = 776; - t['a51'] = 768; - t['a52'] = 792; - t['a53'] = 759; - t['a54'] = 707; - t['a55'] = 708; - t['a56'] = 682; - t['a57'] = 701; - t['a58'] = 826; - t['a59'] = 815; - t['a60'] = 789; - t['a61'] = 789; - t['a62'] = 707; - t['a63'] = 687; - t['a64'] = 696; - t['a65'] = 689; - t['a66'] = 786; - t['a67'] = 787; - t['a68'] = 713; - t['a69'] = 791; - t['a70'] = 785; - t['a71'] = 791; - t['a72'] = 873; - t['a73'] = 761; - t['a74'] = 762; - t['a203'] = 762; - t['a75'] = 759; - t['a204'] = 759; - t['a76'] = 892; - t['a77'] = 892; - t['a78'] = 788; - t['a79'] = 784; - t['a81'] = 438; - t['a82'] = 138; - t['a83'] = 277; - t['a84'] = 415; - t['a97'] = 392; - t['a98'] = 392; - t['a99'] = 668; - t['a100'] = 668; - t['a89'] = 390; - t['a90'] = 390; - t['a93'] = 317; - t['a94'] = 317; - t['a91'] = 276; - t['a92'] = 276; - t['a205'] = 509; - t['a85'] = 509; - t['a206'] = 410; - t['a86'] = 410; - t['a87'] = 234; - t['a88'] = 234; - t['a95'] = 334; - t['a96'] = 334; - t['a101'] = 732; - t['a102'] = 544; - t['a103'] = 544; - t['a104'] = 910; - t['a106'] = 667; - t['a107'] = 760; - t['a108'] = 760; - t['a112'] = 776; - t['a111'] = 595; - t['a110'] = 694; - t['a109'] = 626; - t['a120'] = 788; - t['a121'] = 788; - t['a122'] = 788; - t['a123'] = 788; - t['a124'] = 788; - t['a125'] = 788; - t['a126'] = 788; - t['a127'] = 788; - t['a128'] = 788; - t['a129'] = 788; - t['a130'] = 788; - t['a131'] = 788; - t['a132'] = 788; - t['a133'] = 788; - t['a134'] = 788; - t['a135'] = 788; - t['a136'] = 788; - t['a137'] = 788; - t['a138'] = 788; - t['a139'] = 788; - t['a140'] = 788; - t['a141'] = 788; - t['a142'] = 788; - t['a143'] = 788; - t['a144'] = 788; - t['a145'] = 788; - t['a146'] = 788; - t['a147'] = 788; - t['a148'] = 788; - t['a149'] = 788; - t['a150'] = 788; - t['a151'] = 788; - t['a152'] = 788; - t['a153'] = 788; - t['a154'] = 788; - t['a155'] = 788; - t['a156'] = 788; - t['a157'] = 788; - t['a158'] = 788; - t['a159'] = 788; - t['a160'] = 894; - t['a161'] = 838; - t['a163'] = 1016; - t['a164'] = 458; - t['a196'] = 748; - t['a165'] = 924; - t['a192'] = 748; - t['a166'] = 918; - t['a167'] = 927; - t['a168'] = 928; - t['a169'] = 928; - t['a170'] = 834; - t['a171'] = 873; - t['a172'] = 828; - t['a173'] = 924; - t['a162'] = 924; - t['a174'] = 917; - t['a175'] = 930; - t['a176'] = 931; - t['a177'] = 463; - t['a178'] = 883; - t['a179'] = 836; - t['a193'] = 836; - t['a180'] = 867; - t['a199'] = 867; - t['a181'] = 696; - t['a200'] = 696; - t['a182'] = 874; - t['a201'] = 874; - t['a183'] = 760; - t['a184'] = 946; - t['a197'] = 771; - t['a185'] = 865; - t['a194'] = 771; - t['a198'] = 888; - t['a186'] = 967; - t['a195'] = 888; - t['a187'] = 831; - t['a188'] = 873; - t['a189'] = 927; - t['a190'] = 970; - t['a191'] = 918; - }); -}); -exports.getMetrics = getMetrics; - -/***/ }), -/* 168 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PostScriptCompiler = exports.PostScriptEvaluator = exports.PDFFunctionFactory = exports.isPDFFunction = undefined; - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -var _ps_parser = __w_pdfjs_require__(169); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - -var IsEvalSupportedCached = { - get value() { - return (0, _util.shadow)(this, 'value', (0, _util.isEvalSupported)()); - } -}; - -var PDFFunctionFactory = function () { - function PDFFunctionFactory(_ref) { - var xref = _ref.xref, - _ref$isEvalSupported = _ref.isEvalSupported, - isEvalSupported = _ref$isEvalSupported === undefined ? true : _ref$isEvalSupported; - - _classCallCheck(this, PDFFunctionFactory); - - this.xref = xref; - this.isEvalSupported = isEvalSupported !== false; - } - - _createClass(PDFFunctionFactory, [{ - key: 'create', - value: function create(fn) { - return PDFFunction.parse({ - xref: this.xref, - isEvalSupported: this.isEvalSupported, - fn: fn - }); - } - }, { - key: 'createFromArray', - value: function createFromArray(fnObj) { - return PDFFunction.parseArray({ - xref: this.xref, - isEvalSupported: this.isEvalSupported, - fnObj: fnObj - }); - } - }]); - - return PDFFunctionFactory; -}(); - -function toNumberArray(arr) { - if (!Array.isArray(arr)) { - return null; - } - var length = arr.length; - for (var i = 0; i < length; i++) { - if (typeof arr[i] !== 'number') { - var result = new Array(length); - for (var _i = 0; _i < length; _i++) { - result[_i] = +arr[_i]; - } - return result; - } - } - return arr; -} -var PDFFunction = function PDFFunctionClosure() { - var CONSTRUCT_SAMPLED = 0; - var CONSTRUCT_INTERPOLATED = 2; - var CONSTRUCT_STICHED = 3; - var CONSTRUCT_POSTSCRIPT = 4; - return { - getSampleArray: function getSampleArray(size, outputSize, bps, stream) { - var i, ii; - var length = 1; - for (i = 0, ii = size.length; i < ii; i++) { - length *= size[i]; - } - length *= outputSize; - var array = new Array(length); - var codeSize = 0; - var codeBuf = 0; - var sampleMul = 1.0 / (Math.pow(2.0, bps) - 1); - var strBytes = stream.getBytes((length * bps + 7) / 8); - var strIdx = 0; - for (i = 0; i < length; i++) { - while (codeSize < bps) { - codeBuf <<= 8; - codeBuf |= strBytes[strIdx++]; - codeSize += 8; - } - codeSize -= bps; - array[i] = (codeBuf >> codeSize) * sampleMul; - codeBuf &= (1 << codeSize) - 1; - } - return array; - }, - getIR: function getIR(_ref2) { - var xref = _ref2.xref, - isEvalSupported = _ref2.isEvalSupported, - fn = _ref2.fn; - - var dict = fn.dict; - if (!dict) { - dict = fn; - } - var types = [this.constructSampled, null, this.constructInterpolated, this.constructStiched, this.constructPostScript]; - var typeNum = dict.get('FunctionType'); - var typeFn = types[typeNum]; - if (!typeFn) { - throw new _util.FormatError('Unknown type of function'); - } - return typeFn.call(this, { - xref: xref, - isEvalSupported: isEvalSupported, - fn: fn, - dict: dict - }); - }, - fromIR: function fromIR(_ref3) { - var xref = _ref3.xref, - isEvalSupported = _ref3.isEvalSupported, - IR = _ref3.IR; - - var type = IR[0]; - switch (type) { - case CONSTRUCT_SAMPLED: - return this.constructSampledFromIR({ - xref: xref, - isEvalSupported: isEvalSupported, - IR: IR - }); - case CONSTRUCT_INTERPOLATED: - return this.constructInterpolatedFromIR({ - xref: xref, - isEvalSupported: isEvalSupported, - IR: IR - }); - case CONSTRUCT_STICHED: - return this.constructStichedFromIR({ - xref: xref, - isEvalSupported: isEvalSupported, - IR: IR - }); - default: - return this.constructPostScriptFromIR({ - xref: xref, - isEvalSupported: isEvalSupported, - IR: IR - }); - } - }, - parse: function parse(_ref4) { - var xref = _ref4.xref, - isEvalSupported = _ref4.isEvalSupported, - fn = _ref4.fn; - - var IR = this.getIR({ - xref: xref, - isEvalSupported: isEvalSupported, - fn: fn - }); - return this.fromIR({ - xref: xref, - isEvalSupported: isEvalSupported, - IR: IR - }); - }, - parseArray: function parseArray(_ref5) { - var xref = _ref5.xref, - isEvalSupported = _ref5.isEvalSupported, - fnObj = _ref5.fnObj; - - if (!Array.isArray(fnObj)) { - return this.parse({ - xref: xref, - isEvalSupported: isEvalSupported, - fn: fnObj - }); - } - var fnArray = []; - for (var j = 0, jj = fnObj.length; j < jj; j++) { - fnArray.push(this.parse({ - xref: xref, - isEvalSupported: isEvalSupported, - fn: xref.fetchIfRef(fnObj[j]) - })); - } - return function (src, srcOffset, dest, destOffset) { - for (var i = 0, ii = fnArray.length; i < ii; i++) { - fnArray[i](src, srcOffset, dest, destOffset + i); - } - }; - }, - constructSampled: function constructSampled(_ref6) { - var xref = _ref6.xref, - isEvalSupported = _ref6.isEvalSupported, - fn = _ref6.fn, - dict = _ref6.dict; - - function toMultiArray(arr) { - var inputLength = arr.length; - var out = []; - var index = 0; - for (var i = 0; i < inputLength; i += 2) { - out[index] = [arr[i], arr[i + 1]]; - ++index; - } - return out; - } - var domain = toNumberArray(dict.getArray('Domain')); - var range = toNumberArray(dict.getArray('Range')); - if (!domain || !range) { - throw new _util.FormatError('No domain or range'); - } - var inputSize = domain.length / 2; - var outputSize = range.length / 2; - domain = toMultiArray(domain); - range = toMultiArray(range); - var size = toNumberArray(dict.getArray('Size')); - var bps = dict.get('BitsPerSample'); - var order = dict.get('Order') || 1; - if (order !== 1) { - (0, _util.info)('No support for cubic spline interpolation: ' + order); - } - var encode = toNumberArray(dict.getArray('Encode')); - if (!encode) { - encode = []; - for (var i = 0; i < inputSize; ++i) { - encode.push([0, size[i] - 1]); - } - } else { - encode = toMultiArray(encode); - } - var decode = toNumberArray(dict.getArray('Decode')); - if (!decode) { - decode = range; - } else { - decode = toMultiArray(decode); - } - var samples = this.getSampleArray(size, outputSize, bps, fn); - return [CONSTRUCT_SAMPLED, inputSize, domain, encode, decode, samples, size, outputSize, Math.pow(2, bps) - 1, range]; - }, - constructSampledFromIR: function constructSampledFromIR(_ref7) { - var xref = _ref7.xref, - isEvalSupported = _ref7.isEvalSupported, - IR = _ref7.IR; - - function interpolate(x, xmin, xmax, ymin, ymax) { - return ymin + (x - xmin) * ((ymax - ymin) / (xmax - xmin)); - } - return function constructSampledFromIRResult(src, srcOffset, dest, destOffset) { - var m = IR[1]; - var domain = IR[2]; - var encode = IR[3]; - var decode = IR[4]; - var samples = IR[5]; - var size = IR[6]; - var n = IR[7]; - var range = IR[9]; - var cubeVertices = 1 << m; - var cubeN = new Float64Array(cubeVertices); - var cubeVertex = new Uint32Array(cubeVertices); - var i, j; - for (j = 0; j < cubeVertices; j++) { - cubeN[j] = 1; - } - var k = n, - pos = 1; - for (i = 0; i < m; ++i) { - var domain_2i = domain[i][0]; - var domain_2i_1 = domain[i][1]; - var xi = Math.min(Math.max(src[srcOffset + i], domain_2i), domain_2i_1); - var e = interpolate(xi, domain_2i, domain_2i_1, encode[i][0], encode[i][1]); - var size_i = size[i]; - e = Math.min(Math.max(e, 0), size_i - 1); - var e0 = e < size_i - 1 ? Math.floor(e) : e - 1; - var n0 = e0 + 1 - e; - var n1 = e - e0; - var offset0 = e0 * k; - var offset1 = offset0 + k; - for (j = 0; j < cubeVertices; j++) { - if (j & pos) { - cubeN[j] *= n1; - cubeVertex[j] += offset1; - } else { - cubeN[j] *= n0; - cubeVertex[j] += offset0; - } - } - k *= size_i; - pos <<= 1; - } - for (j = 0; j < n; ++j) { - var rj = 0; - for (i = 0; i < cubeVertices; i++) { - rj += samples[cubeVertex[i] + j] * cubeN[i]; - } - rj = interpolate(rj, 0, 1, decode[j][0], decode[j][1]); - dest[destOffset + j] = Math.min(Math.max(rj, range[j][0]), range[j][1]); - } - }; - }, - constructInterpolated: function constructInterpolated(_ref8) { - var xref = _ref8.xref, - isEvalSupported = _ref8.isEvalSupported, - fn = _ref8.fn, - dict = _ref8.dict; - - var c0 = toNumberArray(dict.getArray('C0')) || [0]; - var c1 = toNumberArray(dict.getArray('C1')) || [1]; - var n = dict.get('N'); - var length = c0.length; - var diff = []; - for (var i = 0; i < length; ++i) { - diff.push(c1[i] - c0[i]); - } - return [CONSTRUCT_INTERPOLATED, c0, diff, n]; - }, - constructInterpolatedFromIR: function constructInterpolatedFromIR(_ref9) { - var xref = _ref9.xref, - isEvalSupported = _ref9.isEvalSupported, - IR = _ref9.IR; - - var c0 = IR[1]; - var diff = IR[2]; - var n = IR[3]; - var length = diff.length; - return function constructInterpolatedFromIRResult(src, srcOffset, dest, destOffset) { - var x = n === 1 ? src[srcOffset] : Math.pow(src[srcOffset], n); - for (var j = 0; j < length; ++j) { - dest[destOffset + j] = c0[j] + x * diff[j]; - } - }; - }, - constructStiched: function constructStiched(_ref10) { - var xref = _ref10.xref, - isEvalSupported = _ref10.isEvalSupported, - fn = _ref10.fn, - dict = _ref10.dict; - - var domain = toNumberArray(dict.getArray('Domain')); - if (!domain) { - throw new _util.FormatError('No domain'); - } - var inputSize = domain.length / 2; - if (inputSize !== 1) { - throw new _util.FormatError('Bad domain for stiched function'); - } - var fnRefs = dict.get('Functions'); - var fns = []; - for (var i = 0, ii = fnRefs.length; i < ii; ++i) { - fns.push(this.parse({ - xref: xref, - isEvalSupported: isEvalSupported, - fn: xref.fetchIfRef(fnRefs[i]) - })); - } - var bounds = toNumberArray(dict.getArray('Bounds')); - var encode = toNumberArray(dict.getArray('Encode')); - return [CONSTRUCT_STICHED, domain, bounds, encode, fns]; - }, - constructStichedFromIR: function constructStichedFromIR(_ref11) { - var xref = _ref11.xref, - isEvalSupported = _ref11.isEvalSupported, - IR = _ref11.IR; - - var domain = IR[1]; - var bounds = IR[2]; - var encode = IR[3]; - var fns = IR[4]; - var tmpBuf = new Float32Array(1); - return function constructStichedFromIRResult(src, srcOffset, dest, destOffset) { - var clip = function constructStichedFromIRClip(v, min, max) { - if (v > max) { - v = max; - } else if (v < min) { - v = min; - } - return v; - }; - var v = clip(src[srcOffset], domain[0], domain[1]); - for (var i = 0, ii = bounds.length; i < ii; ++i) { - if (v < bounds[i]) { - break; - } - } - var dmin = domain[0]; - if (i > 0) { - dmin = bounds[i - 1]; - } - var dmax = domain[1]; - if (i < bounds.length) { - dmax = bounds[i]; - } - var rmin = encode[2 * i]; - var rmax = encode[2 * i + 1]; - tmpBuf[0] = dmin === dmax ? rmin : rmin + (v - dmin) * (rmax - rmin) / (dmax - dmin); - fns[i](tmpBuf, 0, dest, destOffset); - }; - }, - constructPostScript: function constructPostScript(_ref12) { - var xref = _ref12.xref, - isEvalSupported = _ref12.isEvalSupported, - fn = _ref12.fn, - dict = _ref12.dict; - - var domain = toNumberArray(dict.getArray('Domain')); - var range = toNumberArray(dict.getArray('Range')); - if (!domain) { - throw new _util.FormatError('No domain.'); - } - if (!range) { - throw new _util.FormatError('No range.'); - } - var lexer = new _ps_parser.PostScriptLexer(fn); - var parser = new _ps_parser.PostScriptParser(lexer); - var code = parser.parse(); - return [CONSTRUCT_POSTSCRIPT, domain, range, code]; - }, - constructPostScriptFromIR: function constructPostScriptFromIR(_ref13) { - var xref = _ref13.xref, - isEvalSupported = _ref13.isEvalSupported, - IR = _ref13.IR; - - var domain = IR[1]; - var range = IR[2]; - var code = IR[3]; - if (isEvalSupported && IsEvalSupportedCached.value) { - var compiled = new PostScriptCompiler().compile(code, domain, range); - if (compiled) { - return new Function('src', 'srcOffset', 'dest', 'destOffset', compiled); - } - } - (0, _util.info)('Unable to compile PS function'); - var numOutputs = range.length >> 1; - var numInputs = domain.length >> 1; - var evaluator = new PostScriptEvaluator(code); - var cache = Object.create(null); - var MAX_CACHE_SIZE = 2048 * 4; - var cache_available = MAX_CACHE_SIZE; - var tmpBuf = new Float32Array(numInputs); - return function constructPostScriptFromIRResult(src, srcOffset, dest, destOffset) { - var i, value; - var key = ''; - var input = tmpBuf; - for (i = 0; i < numInputs; i++) { - value = src[srcOffset + i]; - input[i] = value; - key += value + '_'; - } - var cachedValue = cache[key]; - if (cachedValue !== undefined) { - dest.set(cachedValue, destOffset); - return; - } - var output = new Float32Array(numOutputs); - var stack = evaluator.execute(input); - var stackIndex = stack.length - numOutputs; - for (i = 0; i < numOutputs; i++) { - value = stack[stackIndex + i]; - var bound = range[i * 2]; - if (value < bound) { - value = bound; - } else { - bound = range[i * 2 + 1]; - if (value > bound) { - value = bound; - } - } - output[i] = value; - } - if (cache_available > 0) { - cache_available--; - cache[key] = output; - } - dest.set(output, destOffset); - }; - } - }; -}(); -function isPDFFunction(v) { - var fnDict; - if ((typeof v === 'undefined' ? 'undefined' : _typeof(v)) !== 'object') { - return false; - } else if ((0, _primitives.isDict)(v)) { - fnDict = v; - } else if ((0, _primitives.isStream)(v)) { - fnDict = v.dict; - } else { - return false; - } - return fnDict.has('FunctionType'); -} -var PostScriptStack = function PostScriptStackClosure() { - var MAX_STACK_SIZE = 100; - function PostScriptStack(initialStack) { - this.stack = !initialStack ? [] : Array.prototype.slice.call(initialStack, 0); - } - PostScriptStack.prototype = { - push: function PostScriptStack_push(value) { - if (this.stack.length >= MAX_STACK_SIZE) { - throw new Error('PostScript function stack overflow.'); - } - this.stack.push(value); - }, - pop: function PostScriptStack_pop() { - if (this.stack.length <= 0) { - throw new Error('PostScript function stack underflow.'); - } - return this.stack.pop(); - }, - copy: function PostScriptStack_copy(n) { - if (this.stack.length + n >= MAX_STACK_SIZE) { - throw new Error('PostScript function stack overflow.'); - } - var stack = this.stack; - for (var i = stack.length - n, j = n - 1; j >= 0; j--, i++) { - stack.push(stack[i]); - } - }, - index: function PostScriptStack_index(n) { - this.push(this.stack[this.stack.length - n - 1]); - }, - roll: function PostScriptStack_roll(n, p) { - var stack = this.stack; - var l = stack.length - n; - var r = stack.length - 1, - c = l + (p - Math.floor(p / n) * n), - i, - j, - t; - for (i = l, j = r; i < j; i++, j--) { - t = stack[i]; - stack[i] = stack[j]; - stack[j] = t; - } - for (i = l, j = c - 1; i < j; i++, j--) { - t = stack[i]; - stack[i] = stack[j]; - stack[j] = t; - } - for (i = c, j = r; i < j; i++, j--) { - t = stack[i]; - stack[i] = stack[j]; - stack[j] = t; - } - } - }; - return PostScriptStack; -}(); -var PostScriptEvaluator = function PostScriptEvaluatorClosure() { - function PostScriptEvaluator(operators) { - this.operators = operators; - } - PostScriptEvaluator.prototype = { - execute: function PostScriptEvaluator_execute(initialStack) { - var stack = new PostScriptStack(initialStack); - var counter = 0; - var operators = this.operators; - var length = operators.length; - var operator, a, b; - while (counter < length) { - operator = operators[counter++]; - if (typeof operator === 'number') { - stack.push(operator); - continue; - } - switch (operator) { - case 'jz': - b = stack.pop(); - a = stack.pop(); - if (!a) { - counter = b; - } - break; - case 'j': - a = stack.pop(); - counter = a; - break; - case 'abs': - a = stack.pop(); - stack.push(Math.abs(a)); - break; - case 'add': - b = stack.pop(); - a = stack.pop(); - stack.push(a + b); - break; - case 'and': - b = stack.pop(); - a = stack.pop(); - if ((0, _util.isBool)(a) && (0, _util.isBool)(b)) { - stack.push(a && b); - } else { - stack.push(a & b); - } - break; - case 'atan': - a = stack.pop(); - stack.push(Math.atan(a)); - break; - case 'bitshift': - b = stack.pop(); - a = stack.pop(); - if (a > 0) { - stack.push(a << b); - } else { - stack.push(a >> b); - } - break; - case 'ceiling': - a = stack.pop(); - stack.push(Math.ceil(a)); - break; - case 'copy': - a = stack.pop(); - stack.copy(a); - break; - case 'cos': - a = stack.pop(); - stack.push(Math.cos(a)); - break; - case 'cvi': - a = stack.pop() | 0; - stack.push(a); - break; - case 'cvr': - break; - case 'div': - b = stack.pop(); - a = stack.pop(); - stack.push(a / b); - break; - case 'dup': - stack.copy(1); - break; - case 'eq': - b = stack.pop(); - a = stack.pop(); - stack.push(a === b); - break; - case 'exch': - stack.roll(2, 1); - break; - case 'exp': - b = stack.pop(); - a = stack.pop(); - stack.push(Math.pow(a, b)); - break; - case 'false': - stack.push(false); - break; - case 'floor': - a = stack.pop(); - stack.push(Math.floor(a)); - break; - case 'ge': - b = stack.pop(); - a = stack.pop(); - stack.push(a >= b); - break; - case 'gt': - b = stack.pop(); - a = stack.pop(); - stack.push(a > b); - break; - case 'idiv': - b = stack.pop(); - a = stack.pop(); - stack.push(a / b | 0); - break; - case 'index': - a = stack.pop(); - stack.index(a); - break; - case 'le': - b = stack.pop(); - a = stack.pop(); - stack.push(a <= b); - break; - case 'ln': - a = stack.pop(); - stack.push(Math.log(a)); - break; - case 'log': - a = stack.pop(); - stack.push(Math.log(a) / Math.LN10); - break; - case 'lt': - b = stack.pop(); - a = stack.pop(); - stack.push(a < b); - break; - case 'mod': - b = stack.pop(); - a = stack.pop(); - stack.push(a % b); - break; - case 'mul': - b = stack.pop(); - a = stack.pop(); - stack.push(a * b); - break; - case 'ne': - b = stack.pop(); - a = stack.pop(); - stack.push(a !== b); - break; - case 'neg': - a = stack.pop(); - stack.push(-a); - break; - case 'not': - a = stack.pop(); - if ((0, _util.isBool)(a)) { - stack.push(!a); - } else { - stack.push(~a); - } - break; - case 'or': - b = stack.pop(); - a = stack.pop(); - if ((0, _util.isBool)(a) && (0, _util.isBool)(b)) { - stack.push(a || b); - } else { - stack.push(a | b); - } - break; - case 'pop': - stack.pop(); - break; - case 'roll': - b = stack.pop(); - a = stack.pop(); - stack.roll(a, b); - break; - case 'round': - a = stack.pop(); - stack.push(Math.round(a)); - break; - case 'sin': - a = stack.pop(); - stack.push(Math.sin(a)); - break; - case 'sqrt': - a = stack.pop(); - stack.push(Math.sqrt(a)); - break; - case 'sub': - b = stack.pop(); - a = stack.pop(); - stack.push(a - b); - break; - case 'true': - stack.push(true); - break; - case 'truncate': - a = stack.pop(); - a = a < 0 ? Math.ceil(a) : Math.floor(a); - stack.push(a); - break; - case 'xor': - b = stack.pop(); - a = stack.pop(); - if ((0, _util.isBool)(a) && (0, _util.isBool)(b)) { - stack.push(a !== b); - } else { - stack.push(a ^ b); - } - break; - default: - throw new _util.FormatError('Unknown operator ' + operator); - } - } - return stack.stack; - } - }; - return PostScriptEvaluator; -}(); -var PostScriptCompiler = function PostScriptCompilerClosure() { - function AstNode(type) { - this.type = type; - } - AstNode.prototype.visit = function (visitor) { - (0, _util.unreachable)('abstract method'); - }; - function AstArgument(index, min, max) { - AstNode.call(this, 'args'); - this.index = index; - this.min = min; - this.max = max; - } - AstArgument.prototype = Object.create(AstNode.prototype); - AstArgument.prototype.visit = function (visitor) { - visitor.visitArgument(this); - }; - function AstLiteral(number) { - AstNode.call(this, 'literal'); - this.number = number; - this.min = number; - this.max = number; - } - AstLiteral.prototype = Object.create(AstNode.prototype); - AstLiteral.prototype.visit = function (visitor) { - visitor.visitLiteral(this); - }; - function AstBinaryOperation(op, arg1, arg2, min, max) { - AstNode.call(this, 'binary'); - this.op = op; - this.arg1 = arg1; - this.arg2 = arg2; - this.min = min; - this.max = max; - } - AstBinaryOperation.prototype = Object.create(AstNode.prototype); - AstBinaryOperation.prototype.visit = function (visitor) { - visitor.visitBinaryOperation(this); - }; - function AstMin(arg, max) { - AstNode.call(this, 'max'); - this.arg = arg; - this.min = arg.min; - this.max = max; - } - AstMin.prototype = Object.create(AstNode.prototype); - AstMin.prototype.visit = function (visitor) { - visitor.visitMin(this); - }; - function AstVariable(index, min, max) { - AstNode.call(this, 'var'); - this.index = index; - this.min = min; - this.max = max; - } - AstVariable.prototype = Object.create(AstNode.prototype); - AstVariable.prototype.visit = function (visitor) { - visitor.visitVariable(this); - }; - function AstVariableDefinition(variable, arg) { - AstNode.call(this, 'definition'); - this.variable = variable; - this.arg = arg; - } - AstVariableDefinition.prototype = Object.create(AstNode.prototype); - AstVariableDefinition.prototype.visit = function (visitor) { - visitor.visitVariableDefinition(this); - }; - function ExpressionBuilderVisitor() { - this.parts = []; - } - ExpressionBuilderVisitor.prototype = { - visitArgument: function visitArgument(arg) { - this.parts.push('Math.max(', arg.min, ', Math.min(', arg.max, ', src[srcOffset + ', arg.index, ']))'); - }, - visitVariable: function visitVariable(variable) { - this.parts.push('v', variable.index); - }, - visitLiteral: function visitLiteral(literal) { - this.parts.push(literal.number); - }, - visitBinaryOperation: function visitBinaryOperation(operation) { - this.parts.push('('); - operation.arg1.visit(this); - this.parts.push(' ', operation.op, ' '); - operation.arg2.visit(this); - this.parts.push(')'); - }, - visitVariableDefinition: function visitVariableDefinition(definition) { - this.parts.push('var '); - definition.variable.visit(this); - this.parts.push(' = '); - definition.arg.visit(this); - this.parts.push(';'); - }, - visitMin: function visitMin(max) { - this.parts.push('Math.min('); - max.arg.visit(this); - this.parts.push(', ', max.max, ')'); - }, - toString: function toString() { - return this.parts.join(''); - } - }; - function buildAddOperation(num1, num2) { - if (num2.type === 'literal' && num2.number === 0) { - return num1; - } - if (num1.type === 'literal' && num1.number === 0) { - return num2; - } - if (num2.type === 'literal' && num1.type === 'literal') { - return new AstLiteral(num1.number + num2.number); - } - return new AstBinaryOperation('+', num1, num2, num1.min + num2.min, num1.max + num2.max); - } - function buildMulOperation(num1, num2) { - if (num2.type === 'literal') { - if (num2.number === 0) { - return new AstLiteral(0); - } else if (num2.number === 1) { - return num1; - } else if (num1.type === 'literal') { - return new AstLiteral(num1.number * num2.number); - } - } - if (num1.type === 'literal') { - if (num1.number === 0) { - return new AstLiteral(0); - } else if (num1.number === 1) { - return num2; - } - } - var min = Math.min(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); - var max = Math.max(num1.min * num2.min, num1.min * num2.max, num1.max * num2.min, num1.max * num2.max); - return new AstBinaryOperation('*', num1, num2, min, max); - } - function buildSubOperation(num1, num2) { - if (num2.type === 'literal') { - if (num2.number === 0) { - return num1; - } else if (num1.type === 'literal') { - return new AstLiteral(num1.number - num2.number); - } - } - if (num2.type === 'binary' && num2.op === '-' && num1.type === 'literal' && num1.number === 1 && num2.arg1.type === 'literal' && num2.arg1.number === 1) { - return num2.arg2; - } - return new AstBinaryOperation('-', num1, num2, num1.min - num2.max, num1.max - num2.min); - } - function buildMinOperation(num1, max) { - if (num1.min >= max) { - return new AstLiteral(max); - } else if (num1.max <= max) { - return num1; - } - return new AstMin(num1, max); - } - function PostScriptCompiler() {} - PostScriptCompiler.prototype = { - compile: function PostScriptCompiler_compile(code, domain, range) { - var stack = []; - var i, ii; - var instructions = []; - var inputSize = domain.length >> 1, - outputSize = range.length >> 1; - var lastRegister = 0; - var n, j; - var num1, num2, ast1, ast2, tmpVar, item; - for (i = 0; i < inputSize; i++) { - stack.push(new AstArgument(i, domain[i * 2], domain[i * 2 + 1])); - } - for (i = 0, ii = code.length; i < ii; i++) { - item = code[i]; - if (typeof item === 'number') { - stack.push(new AstLiteral(item)); - continue; - } - switch (item) { - case 'add': - if (stack.length < 2) { - return null; - } - num2 = stack.pop(); - num1 = stack.pop(); - stack.push(buildAddOperation(num1, num2)); - break; - case 'cvr': - if (stack.length < 1) { - return null; - } - break; - case 'mul': - if (stack.length < 2) { - return null; - } - num2 = stack.pop(); - num1 = stack.pop(); - stack.push(buildMulOperation(num1, num2)); - break; - case 'sub': - if (stack.length < 2) { - return null; - } - num2 = stack.pop(); - num1 = stack.pop(); - stack.push(buildSubOperation(num1, num2)); - break; - case 'exch': - if (stack.length < 2) { - return null; - } - ast1 = stack.pop(); - ast2 = stack.pop(); - stack.push(ast1, ast2); - break; - case 'pop': - if (stack.length < 1) { - return null; - } - stack.pop(); - break; - case 'index': - if (stack.length < 1) { - return null; - } - num1 = stack.pop(); - if (num1.type !== 'literal') { - return null; - } - n = num1.number; - if (n < 0 || !Number.isInteger(n) || stack.length < n) { - return null; - } - ast1 = stack[stack.length - n - 1]; - if (ast1.type === 'literal' || ast1.type === 'var') { - stack.push(ast1); - break; - } - tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); - stack[stack.length - n - 1] = tmpVar; - stack.push(tmpVar); - instructions.push(new AstVariableDefinition(tmpVar, ast1)); - break; - case 'dup': - if (stack.length < 1) { - return null; - } - if (typeof code[i + 1] === 'number' && code[i + 2] === 'gt' && code[i + 3] === i + 7 && code[i + 4] === 'jz' && code[i + 5] === 'pop' && code[i + 6] === code[i + 1]) { - num1 = stack.pop(); - stack.push(buildMinOperation(num1, code[i + 1])); - i += 6; - break; - } - ast1 = stack[stack.length - 1]; - if (ast1.type === 'literal' || ast1.type === 'var') { - stack.push(ast1); - break; - } - tmpVar = new AstVariable(lastRegister++, ast1.min, ast1.max); - stack[stack.length - 1] = tmpVar; - stack.push(tmpVar); - instructions.push(new AstVariableDefinition(tmpVar, ast1)); - break; - case 'roll': - if (stack.length < 2) { - return null; - } - num2 = stack.pop(); - num1 = stack.pop(); - if (num2.type !== 'literal' || num1.type !== 'literal') { - return null; - } - j = num2.number; - n = num1.number; - if (n <= 0 || !Number.isInteger(n) || !Number.isInteger(j) || stack.length < n) { - return null; - } - j = (j % n + n) % n; - if (j === 0) { - break; - } - Array.prototype.push.apply(stack, stack.splice(stack.length - n, n - j)); - break; - default: - return null; - } - } - if (stack.length !== outputSize) { - return null; - } - var result = []; - instructions.forEach(function (instruction) { - var statementBuilder = new ExpressionBuilderVisitor(); - instruction.visit(statementBuilder); - result.push(statementBuilder.toString()); - }); - stack.forEach(function (expr, i) { - var statementBuilder = new ExpressionBuilderVisitor(); - expr.visit(statementBuilder); - var min = range[i * 2], - max = range[i * 2 + 1]; - var out = [statementBuilder.toString()]; - if (min > expr.min) { - out.unshift('Math.max(', min, ', '); - out.push(')'); - } - if (max < expr.max) { - out.unshift('Math.min(', max, ', '); - out.push(')'); - } - out.unshift('dest[destOffset + ', i, '] = '); - out.push(';'); - result.push(out.join('')); - }); - return result.join('\n'); - } - }; - return PostScriptCompiler; -}(); -exports.isPDFFunction = isPDFFunction; -exports.PDFFunctionFactory = PDFFunctionFactory; -exports.PostScriptEvaluator = PostScriptEvaluator; -exports.PostScriptCompiler = PostScriptCompiler; - -/***/ }), -/* 169 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PostScriptParser = exports.PostScriptLexer = undefined; - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -var PostScriptParser = function PostScriptParserClosure() { - function PostScriptParser(lexer) { - this.lexer = lexer; - this.operators = []; - this.token = null; - this.prev = null; - } - PostScriptParser.prototype = { - nextToken: function PostScriptParser_nextToken() { - this.prev = this.token; - this.token = this.lexer.getToken(); - }, - accept: function PostScriptParser_accept(type) { - if (this.token.type === type) { - this.nextToken(); - return true; - } - return false; - }, - expect: function PostScriptParser_expect(type) { - if (this.accept(type)) { - return true; - } - throw new _util.FormatError('Unexpected symbol: found ' + this.token.type + ' expected ' + type + '.'); - }, - parse: function PostScriptParser_parse() { - this.nextToken(); - this.expect(PostScriptTokenTypes.LBRACE); - this.parseBlock(); - this.expect(PostScriptTokenTypes.RBRACE); - return this.operators; - }, - parseBlock: function PostScriptParser_parseBlock() { - while (true) { - if (this.accept(PostScriptTokenTypes.NUMBER)) { - this.operators.push(this.prev.value); - } else if (this.accept(PostScriptTokenTypes.OPERATOR)) { - this.operators.push(this.prev.value); - } else if (this.accept(PostScriptTokenTypes.LBRACE)) { - this.parseCondition(); - } else { - return; - } - } - }, - parseCondition: function PostScriptParser_parseCondition() { - var conditionLocation = this.operators.length; - this.operators.push(null, null); - this.parseBlock(); - this.expect(PostScriptTokenTypes.RBRACE); - if (this.accept(PostScriptTokenTypes.IF)) { - this.operators[conditionLocation] = this.operators.length; - this.operators[conditionLocation + 1] = 'jz'; - } else if (this.accept(PostScriptTokenTypes.LBRACE)) { - var jumpLocation = this.operators.length; - this.operators.push(null, null); - var endOfTrue = this.operators.length; - this.parseBlock(); - this.expect(PostScriptTokenTypes.RBRACE); - this.expect(PostScriptTokenTypes.IFELSE); - this.operators[jumpLocation] = this.operators.length; - this.operators[jumpLocation + 1] = 'j'; - this.operators[conditionLocation] = endOfTrue; - this.operators[conditionLocation + 1] = 'jz'; - } else { - throw new _util.FormatError('PS Function: error parsing conditional.'); - } - } - }; - return PostScriptParser; -}(); -var PostScriptTokenTypes = { - LBRACE: 0, - RBRACE: 1, - NUMBER: 2, - OPERATOR: 3, - IF: 4, - IFELSE: 5 -}; -var PostScriptToken = function PostScriptTokenClosure() { - function PostScriptToken(type, value) { - this.type = type; - this.value = value; - } - var opCache = Object.create(null); - PostScriptToken.getOperator = function PostScriptToken_getOperator(op) { - var opValue = opCache[op]; - if (opValue) { - return opValue; - } - return opCache[op] = new PostScriptToken(PostScriptTokenTypes.OPERATOR, op); - }; - PostScriptToken.LBRACE = new PostScriptToken(PostScriptTokenTypes.LBRACE, '{'); - PostScriptToken.RBRACE = new PostScriptToken(PostScriptTokenTypes.RBRACE, '}'); - PostScriptToken.IF = new PostScriptToken(PostScriptTokenTypes.IF, 'IF'); - PostScriptToken.IFELSE = new PostScriptToken(PostScriptTokenTypes.IFELSE, 'IFELSE'); - return PostScriptToken; -}(); -var PostScriptLexer = function PostScriptLexerClosure() { - function PostScriptLexer(stream) { - this.stream = stream; - this.nextChar(); - this.strBuf = []; - } - PostScriptLexer.prototype = { - nextChar: function PostScriptLexer_nextChar() { - return this.currentChar = this.stream.getByte(); - }, - getToken: function PostScriptLexer_getToken() { - var comment = false; - var ch = this.currentChar; - while (true) { - if (ch < 0) { - return _primitives.EOF; - } - if (comment) { - if (ch === 0x0A || ch === 0x0D) { - comment = false; - } - } else if (ch === 0x25) { - comment = true; - } else if (!(0, _util.isSpace)(ch)) { - break; - } - ch = this.nextChar(); - } - switch (ch | 0) { - case 0x30: - case 0x31: - case 0x32: - case 0x33: - case 0x34: - case 0x35: - case 0x36: - case 0x37: - case 0x38: - case 0x39: - case 0x2B: - case 0x2D: - case 0x2E: - return new PostScriptToken(PostScriptTokenTypes.NUMBER, this.getNumber()); - case 0x7B: - this.nextChar(); - return PostScriptToken.LBRACE; - case 0x7D: - this.nextChar(); - return PostScriptToken.RBRACE; - } - var strBuf = this.strBuf; - strBuf.length = 0; - strBuf[0] = String.fromCharCode(ch); - while ((ch = this.nextChar()) >= 0 && (ch >= 0x41 && ch <= 0x5A || ch >= 0x61 && ch <= 0x7A)) { - strBuf.push(String.fromCharCode(ch)); - } - var str = strBuf.join(''); - switch (str.toLowerCase()) { - case 'if': - return PostScriptToken.IF; - case 'ifelse': - return PostScriptToken.IFELSE; - default: - return PostScriptToken.getOperator(str); - } - }, - getNumber: function PostScriptLexer_getNumber() { - var ch = this.currentChar; - var strBuf = this.strBuf; - strBuf.length = 0; - strBuf[0] = String.fromCharCode(ch); - while ((ch = this.nextChar()) >= 0) { - if (ch >= 0x30 && ch <= 0x39 || ch === 0x2D || ch === 0x2E) { - strBuf.push(String.fromCharCode(ch)); - } else { - break; - } - } - var value = parseFloat(strBuf.join('')); - if (isNaN(value)) { - throw new _util.FormatError('Invalid floating point number: ' + value); - } - return value; - } - }; - return PostScriptLexer; -}(); -exports.PostScriptLexer = PostScriptLexer; -exports.PostScriptParser = PostScriptParser; - -/***/ }), -/* 170 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.MurmurHash3_64 = undefined; - -var _util = __w_pdfjs_require__(2); - -var MurmurHash3_64 = function MurmurHash3_64Closure(seed) { - var MASK_HIGH = 0xffff0000; - var MASK_LOW = 0xffff; - function MurmurHash3_64(seed) { - var SEED = 0xc3d2e1f0; - this.h1 = seed ? seed & 0xffffffff : SEED; - this.h2 = seed ? seed & 0xffffffff : SEED; - } - MurmurHash3_64.prototype = { - update: function MurmurHash3_64_update(input) { - var data = void 0, - length = void 0; - if ((0, _util.isString)(input)) { - data = new Uint8Array(input.length * 2); - length = 0; - for (var i = 0, ii = input.length; i < ii; i++) { - var code = input.charCodeAt(i); - if (code <= 0xff) { - data[length++] = code; - } else { - data[length++] = code >>> 8; - data[length++] = code & 0xff; - } - } - } else if ((0, _util.isArrayBuffer)(input)) { - data = input; - length = data.byteLength; - } else { - throw new Error('Wrong data format in MurmurHash3_64_update. ' + 'Input must be a string or array.'); - } - var blockCounts = length >> 2; - var tailLength = length - blockCounts * 4; - var dataUint32 = new Uint32Array(data.buffer, 0, blockCounts); - var k1 = 0; - var k2 = 0; - var h1 = this.h1; - var h2 = this.h2; - var C1 = 0xcc9e2d51; - var C2 = 0x1b873593; - var C1_LOW = C1 & MASK_LOW; - var C2_LOW = C2 & MASK_LOW; - for (var _i = 0; _i < blockCounts; _i++) { - if (_i & 1) { - k1 = dataUint32[_i]; - k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; - k1 = k1 << 15 | k1 >>> 17; - k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; - h1 ^= k1; - h1 = h1 << 13 | h1 >>> 19; - h1 = h1 * 5 + 0xe6546b64; - } else { - k2 = dataUint32[_i]; - k2 = k2 * C1 & MASK_HIGH | k2 * C1_LOW & MASK_LOW; - k2 = k2 << 15 | k2 >>> 17; - k2 = k2 * C2 & MASK_HIGH | k2 * C2_LOW & MASK_LOW; - h2 ^= k2; - h2 = h2 << 13 | h2 >>> 19; - h2 = h2 * 5 + 0xe6546b64; - } - } - k1 = 0; - switch (tailLength) { - case 3: - k1 ^= data[blockCounts * 4 + 2] << 16; - case 2: - k1 ^= data[blockCounts * 4 + 1] << 8; - case 1: - k1 ^= data[blockCounts * 4]; - k1 = k1 * C1 & MASK_HIGH | k1 * C1_LOW & MASK_LOW; - k1 = k1 << 15 | k1 >>> 17; - k1 = k1 * C2 & MASK_HIGH | k1 * C2_LOW & MASK_LOW; - if (blockCounts & 1) { - h1 ^= k1; - } else { - h2 ^= k1; - } - } - this.h1 = h1; - this.h2 = h2; - return this; - }, - hexdigest: function MurmurHash3_64_hexdigest() { - var h1 = this.h1; - var h2 = this.h2; - h1 ^= h2 >>> 1; - h1 = h1 * 0xed558ccd & MASK_HIGH | h1 * 0x8ccd & MASK_LOW; - h2 = h2 * 0xff51afd7 & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xafd7ed55 & MASK_HIGH) >>> 16; - h1 ^= h2 >>> 1; - h1 = h1 * 0x1a85ec53 & MASK_HIGH | h1 * 0xec53 & MASK_LOW; - h2 = h2 * 0xc4ceb9fe & MASK_HIGH | ((h2 << 16 | h1 >>> 16) * 0xb9fe1a85 & MASK_HIGH) >>> 16; - h1 ^= h2 >>> 1; - for (var i = 0, arr = [h1, h2], str = ''; i < arr.length; i++) { - var hex = (arr[i] >>> 0).toString(16); - while (hex.length < 8) { - hex = '0' + hex; - } - str += hex; - } - return str; - } - }; - return MurmurHash3_64; -}(); -exports.MurmurHash3_64 = MurmurHash3_64; - -/***/ }), -/* 171 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.PDFImage = undefined; - -var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); - -var _util = __w_pdfjs_require__(2); - -var _primitives = __w_pdfjs_require__(138); - -var _colorspace = __w_pdfjs_require__(151); - -var _stream = __w_pdfjs_require__(140); - -var _jpeg_stream = __w_pdfjs_require__(146); - -var _jpx = __w_pdfjs_require__(149); - -var PDFImage = function PDFImageClosure() { - function handleImageData(image, nativeDecoder) { - if (nativeDecoder && nativeDecoder.canDecode(image)) { - return nativeDecoder.decode(image).catch(function (reason) { - (0, _util.warn)('Native image decoding failed -- trying to recover: ' + (reason && reason.message)); - return image; - }); - } - return Promise.resolve(image); - } - function decodeAndClamp(value, addend, coefficient, max) { - value = addend + value * coefficient; - return value < 0 ? 0 : value > max ? max : value; - } - function resizeImageMask(src, bpc, w1, h1, w2, h2) { - var length = w2 * h2; - var dest = bpc <= 8 ? new Uint8Array(length) : bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length); - var xRatio = w1 / w2; - var yRatio = h1 / h2; - var i, - j, - py, - newIndex = 0, - oldIndex; - var xScaled = new Uint16Array(w2); - var w1Scanline = w1; - for (i = 0; i < w2; i++) { - xScaled[i] = Math.floor(i * xRatio); - } - for (i = 0; i < h2; i++) { - py = Math.floor(i * yRatio) * w1Scanline; - for (j = 0; j < w2; j++) { - oldIndex = py + xScaled[j]; - dest[newIndex++] = src[oldIndex]; - } - } - return dest; - } - function PDFImage(_ref) { - var xref = _ref.xref, - res = _ref.res, - image = _ref.image, - _ref$isInline = _ref.isInline, - isInline = _ref$isInline === undefined ? false : _ref$isInline, - _ref$smask = _ref.smask, - smask = _ref$smask === undefined ? null : _ref$smask, - _ref$mask = _ref.mask, - mask = _ref$mask === undefined ? null : _ref$mask, - _ref$isMask = _ref.isMask, - isMask = _ref$isMask === undefined ? false : _ref$isMask, - pdfFunctionFactory = _ref.pdfFunctionFactory; - - this.image = image; - var dict = image.dict; - var filter = dict.get('Filter'); - if ((0, _primitives.isName)(filter)) { - switch (filter.name) { - case 'JPXDecode': - var jpxImage = new _jpx.JpxImage(); - jpxImage.parseImageProperties(image.stream); - image.stream.reset(); - image.width = jpxImage.width; - image.height = jpxImage.height; - image.bitsPerComponent = jpxImage.bitsPerComponent; - image.numComps = jpxImage.componentsCount; - break; - case 'JBIG2Decode': - image.bitsPerComponent = 1; - image.numComps = 1; - break; - } - } - var width = dict.get('Width', 'W'); - var height = dict.get('Height', 'H'); - if (Number.isInteger(image.width) && image.width > 0 && Number.isInteger(image.height) && image.height > 0 && (image.width !== width || image.height !== height)) { - (0, _util.warn)('PDFImage - using the Width/Height of the image data, ' + 'rather than the image dictionary.'); - width = image.width; - height = image.height; - } - if (width < 1 || height < 1) { - throw new _util.FormatError('Invalid image width: ' + width + ' or ' + ('height: ' + height)); - } - this.width = width; - this.height = height; - this.interpolate = dict.get('Interpolate', 'I') || false; - this.imageMask = dict.get('ImageMask', 'IM') || false; - this.matte = dict.get('Matte') || false; - var bitsPerComponent = image.bitsPerComponent; - if (!bitsPerComponent) { - bitsPerComponent = dict.get('BitsPerComponent', 'BPC'); - if (!bitsPerComponent) { - if (this.imageMask) { - bitsPerComponent = 1; - } else { - throw new _util.FormatError('Bits per component missing in image: ' + this.imageMask); - } - } - } - this.bpc = bitsPerComponent; - if (!this.imageMask) { - var colorSpace = dict.get('ColorSpace', 'CS'); - if (!colorSpace) { - (0, _util.info)('JPX images (which do not require color spaces)'); - switch (image.numComps) { - case 1: - colorSpace = _primitives.Name.get('DeviceGray'); - break; - case 3: - colorSpace = _primitives.Name.get('DeviceRGB'); - break; - case 4: - colorSpace = _primitives.Name.get('DeviceCMYK'); - break; - default: - throw new Error('JPX images with ' + image.numComps + ' ' + 'color components not supported.'); - } - } - var resources = isInline ? res : null; - this.colorSpace = _colorspace.ColorSpace.parse(colorSpace, xref, resources, pdfFunctionFactory); - this.numComps = this.colorSpace.numComps; - } - this.decode = dict.getArray('Decode', 'D'); - this.needsDecode = false; - if (this.decode && (this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode) || isMask && !_colorspace.ColorSpace.isDefaultDecode(this.decode, 1))) { - this.needsDecode = true; - var max = (1 << bitsPerComponent) - 1; - this.decodeCoefficients = []; - this.decodeAddends = []; - for (var i = 0, j = 0; i < this.decode.length; i += 2, ++j) { - var dmin = this.decode[i]; - var dmax = this.decode[i + 1]; - this.decodeCoefficients[j] = dmax - dmin; - this.decodeAddends[j] = max * dmin; - } - } - if (smask) { - this.smask = new PDFImage({ - xref: xref, - res: res, - image: smask, - isInline: isInline, - pdfFunctionFactory: pdfFunctionFactory - }); - } else if (mask) { - if ((0, _primitives.isStream)(mask)) { - var maskDict = mask.dict, - imageMask = maskDict.get('ImageMask', 'IM'); - if (!imageMask) { - (0, _util.warn)('Ignoring /Mask in image without /ImageMask.'); - } else { - this.mask = new PDFImage({ - xref: xref, - res: res, - image: mask, - isInline: isInline, - isMask: true, - pdfFunctionFactory: pdfFunctionFactory - }); - } - } else { - this.mask = mask; - } - } - } - PDFImage.buildImage = function (_ref2) { - var handler = _ref2.handler, - xref = _ref2.xref, - res = _ref2.res, - image = _ref2.image, - _ref2$isInline = _ref2.isInline, - isInline = _ref2$isInline === undefined ? false : _ref2$isInline, - _ref2$nativeDecoder = _ref2.nativeDecoder, - nativeDecoder = _ref2$nativeDecoder === undefined ? null : _ref2$nativeDecoder, - pdfFunctionFactory = _ref2.pdfFunctionFactory; - - var imagePromise = handleImageData(image, nativeDecoder); - var smaskPromise; - var maskPromise; - var smask = image.dict.get('SMask'); - var mask = image.dict.get('Mask'); - if (smask) { - smaskPromise = handleImageData(smask, nativeDecoder); - maskPromise = Promise.resolve(null); - } else { - smaskPromise = Promise.resolve(null); - if (mask) { - if ((0, _primitives.isStream)(mask)) { - maskPromise = handleImageData(mask, nativeDecoder); - } else if (Array.isArray(mask)) { - maskPromise = Promise.resolve(mask); - } else { - (0, _util.warn)('Unsupported mask format.'); - maskPromise = Promise.resolve(null); - } - } else { - maskPromise = Promise.resolve(null); - } - } - return Promise.all([imagePromise, smaskPromise, maskPromise]).then(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 3), - imageData = _ref4[0], - smaskData = _ref4[1], - maskData = _ref4[2]; - - return new PDFImage({ - xref: xref, - res: res, - image: imageData, - isInline: isInline, - smask: smaskData, - mask: maskData, - pdfFunctionFactory: pdfFunctionFactory - }); - }); - }; - PDFImage.createMask = function (_ref5) { - var imgArray = _ref5.imgArray, - width = _ref5.width, - height = _ref5.height, - imageIsFromDecodeStream = _ref5.imageIsFromDecodeStream, - inverseDecode = _ref5.inverseDecode; - - var computedLength = (width + 7 >> 3) * height; - var actualLength = imgArray.byteLength; - var haveFullData = computedLength === actualLength; - var data, i; - if (imageIsFromDecodeStream && (!inverseDecode || haveFullData)) { - data = imgArray; - } else if (!inverseDecode) { - data = new Uint8ClampedArray(actualLength); - data.set(imgArray); - } else { - data = new Uint8ClampedArray(computedLength); - data.set(imgArray); - for (i = actualLength; i < computedLength; i++) { - data[i] = 0xff; - } - } - if (inverseDecode) { - for (i = 0; i < actualLength; i++) { - data[i] ^= 0xFF; - } - } - return { - data: data, - width: width, - height: height - }; - }; - PDFImage.prototype = { - get drawWidth() { - return Math.max(this.width, this.smask && this.smask.width || 0, this.mask && this.mask.width || 0); - }, - get drawHeight() { - return Math.max(this.height, this.smask && this.smask.height || 0, this.mask && this.mask.height || 0); - }, - decodeBuffer: function decodeBuffer(buffer) { - var bpc = this.bpc; - var numComps = this.numComps; - var decodeAddends = this.decodeAddends; - var decodeCoefficients = this.decodeCoefficients; - var max = (1 << bpc) - 1; - var i, ii; - if (bpc === 1) { - for (i = 0, ii = buffer.length; i < ii; i++) { - buffer[i] = +!buffer[i]; - } - return; - } - var index = 0; - for (i = 0, ii = this.width * this.height; i < ii; i++) { - for (var j = 0; j < numComps; j++) { - buffer[index] = decodeAndClamp(buffer[index], decodeAddends[j], decodeCoefficients[j], max); - index++; - } - } - }, - getComponents: function getComponents(buffer) { - var bpc = this.bpc; - if (bpc === 8) { - return buffer; - } - var width = this.width; - var height = this.height; - var numComps = this.numComps; - var length = width * height * numComps; - var bufferPos = 0; - var output = bpc <= 8 ? new Uint8Array(length) : bpc <= 16 ? new Uint16Array(length) : new Uint32Array(length); - var rowComps = width * numComps; - var max = (1 << bpc) - 1; - var i = 0, - ii, - buf; - if (bpc === 1) { - var mask, loop1End, loop2End; - for (var j = 0; j < height; j++) { - loop1End = i + (rowComps & ~7); - loop2End = i + rowComps; - while (i < loop1End) { - buf = buffer[bufferPos++]; - output[i] = buf >> 7 & 1; - output[i + 1] = buf >> 6 & 1; - output[i + 2] = buf >> 5 & 1; - output[i + 3] = buf >> 4 & 1; - output[i + 4] = buf >> 3 & 1; - output[i + 5] = buf >> 2 & 1; - output[i + 6] = buf >> 1 & 1; - output[i + 7] = buf & 1; - i += 8; - } - if (i < loop2End) { - buf = buffer[bufferPos++]; - mask = 128; - while (i < loop2End) { - output[i++] = +!!(buf & mask); - mask >>= 1; - } - } - } - } else { - var bits = 0; - buf = 0; - for (i = 0, ii = length; i < ii; ++i) { - if (i % rowComps === 0) { - buf = 0; - bits = 0; - } - while (bits < bpc) { - buf = buf << 8 | buffer[bufferPos++]; - bits += 8; - } - var remainingBits = bits - bpc; - var value = buf >> remainingBits; - output[i] = value < 0 ? 0 : value > max ? max : value; - buf = buf & (1 << remainingBits) - 1; - bits = remainingBits; - } - } - return output; - }, - fillOpacity: function fillOpacity(rgbaBuf, width, height, actualHeight, image) { - var smask = this.smask; - var mask = this.mask; - var alphaBuf, sw, sh, i, ii, j; - if (smask) { - sw = smask.width; - sh = smask.height; - alphaBuf = new Uint8ClampedArray(sw * sh); - smask.fillGrayBuffer(alphaBuf); - if (sw !== width || sh !== height) { - alphaBuf = resizeImageMask(alphaBuf, smask.bpc, sw, sh, width, height); - } - } else if (mask) { - if (mask instanceof PDFImage) { - sw = mask.width; - sh = mask.height; - alphaBuf = new Uint8ClampedArray(sw * sh); - mask.numComps = 1; - mask.fillGrayBuffer(alphaBuf); - for (i = 0, ii = sw * sh; i < ii; ++i) { - alphaBuf[i] = 255 - alphaBuf[i]; - } - if (sw !== width || sh !== height) { - alphaBuf = resizeImageMask(alphaBuf, mask.bpc, sw, sh, width, height); - } - } else if (Array.isArray(mask)) { - alphaBuf = new Uint8ClampedArray(width * height); - var numComps = this.numComps; - for (i = 0, ii = width * height; i < ii; ++i) { - var opacity = 0; - var imageOffset = i * numComps; - for (j = 0; j < numComps; ++j) { - var color = image[imageOffset + j]; - var maskOffset = j * 2; - if (color < mask[maskOffset] || color > mask[maskOffset + 1]) { - opacity = 255; - break; - } - } - alphaBuf[i] = opacity; - } - } else { - throw new _util.FormatError('Unknown mask format.'); - } - } - if (alphaBuf) { - for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { - rgbaBuf[j] = alphaBuf[i]; - } - } else { - for (i = 0, j = 3, ii = width * actualHeight; i < ii; ++i, j += 4) { - rgbaBuf[j] = 255; - } - } - }, - undoPreblend: function undoPreblend(buffer, width, height) { - var matte = this.smask && this.smask.matte; - if (!matte) { - return; - } - var matteRgb = this.colorSpace.getRgb(matte, 0); - var matteR = matteRgb[0]; - var matteG = matteRgb[1]; - var matteB = matteRgb[2]; - var length = width * height * 4; - for (var i = 0; i < length; i += 4) { - var alpha = buffer[i + 3]; - if (alpha === 0) { - buffer[i] = 255; - buffer[i + 1] = 255; - buffer[i + 2] = 255; - continue; - } - var k = 255 / alpha; - buffer[i] = (buffer[i] - matteR) * k + matteR; - buffer[i + 1] = (buffer[i + 1] - matteG) * k + matteG; - buffer[i + 2] = (buffer[i + 2] - matteB) * k + matteB; - } - }, - createImageData: function createImageData() { - var forceRGBA = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false; - - var drawWidth = this.drawWidth; - var drawHeight = this.drawHeight; - var imgData = { - width: drawWidth, - height: drawHeight, - kind: 0, - data: null - }; - var numComps = this.numComps; - var originalWidth = this.width; - var originalHeight = this.height; - var bpc = this.bpc; - var rowBytes = originalWidth * numComps * bpc + 7 >> 3; - var imgArray; - if (!forceRGBA) { - var kind; - if (this.colorSpace.name === 'DeviceGray' && bpc === 1) { - kind = _util.ImageKind.GRAYSCALE_1BPP; - } else if (this.colorSpace.name === 'DeviceRGB' && bpc === 8 && !this.needsDecode) { - kind = _util.ImageKind.RGB_24BPP; - } - if (kind && !this.smask && !this.mask && drawWidth === originalWidth && drawHeight === originalHeight) { - imgData.kind = kind; - imgArray = this.getImageBytes(originalHeight * rowBytes); - if (this.image instanceof _stream.DecodeStream) { - imgData.data = imgArray; - } else { - var newArray = new Uint8ClampedArray(imgArray.length); - newArray.set(imgArray); - imgData.data = newArray; - } - if (this.needsDecode) { - (0, _util.assert)(kind === _util.ImageKind.GRAYSCALE_1BPP, 'PDFImage.createImageData: The image must be grayscale.'); - var buffer = imgData.data; - for (var i = 0, ii = buffer.length; i < ii; i++) { - buffer[i] ^= 0xff; - } - } - return imgData; - } - if (this.image instanceof _jpeg_stream.JpegStream && !this.smask && !this.mask) { - var imageLength = originalHeight * rowBytes; - switch (this.colorSpace.name) { - case 'DeviceGray': - imageLength *= 3; - case 'DeviceRGB': - case 'DeviceCMYK': - imgData.kind = _util.ImageKind.RGB_24BPP; - imgData.data = this.getImageBytes(imageLength, drawWidth, drawHeight, true); - return imgData; - } - } - } - imgArray = this.getImageBytes(originalHeight * rowBytes); - var actualHeight = 0 | imgArray.length / rowBytes * drawHeight / originalHeight; - var comps = this.getComponents(imgArray); - var alpha01, maybeUndoPreblend; - if (!forceRGBA && !this.smask && !this.mask) { - imgData.kind = _util.ImageKind.RGB_24BPP; - imgData.data = new Uint8ClampedArray(drawWidth * drawHeight * 3); - alpha01 = 0; - maybeUndoPreblend = false; - } else { - imgData.kind = _util.ImageKind.RGBA_32BPP; - imgData.data = new Uint8ClampedArray(drawWidth * drawHeight * 4); - alpha01 = 1; - maybeUndoPreblend = true; - this.fillOpacity(imgData.data, drawWidth, drawHeight, actualHeight, comps); - } - if (this.needsDecode) { - this.decodeBuffer(comps); - } - this.colorSpace.fillRgb(imgData.data, originalWidth, originalHeight, drawWidth, drawHeight, actualHeight, bpc, comps, alpha01); - if (maybeUndoPreblend) { - this.undoPreblend(imgData.data, drawWidth, actualHeight); - } - return imgData; - }, - fillGrayBuffer: function fillGrayBuffer(buffer) { - var numComps = this.numComps; - if (numComps !== 1) { - throw new _util.FormatError('Reading gray scale from a color image: ' + numComps); - } - var width = this.width; - var height = this.height; - var bpc = this.bpc; - var rowBytes = width * numComps * bpc + 7 >> 3; - var imgArray = this.getImageBytes(height * rowBytes); - var comps = this.getComponents(imgArray); - var i, length; - if (bpc === 1) { - length = width * height; - if (this.needsDecode) { - for (i = 0; i < length; ++i) { - buffer[i] = comps[i] - 1 & 255; - } - } else { - for (i = 0; i < length; ++i) { - buffer[i] = -comps[i] & 255; - } - } - return; - } - if (this.needsDecode) { - this.decodeBuffer(comps); - } - length = width * height; - var scale = 255 / ((1 << bpc) - 1); - for (i = 0; i < length; ++i) { - buffer[i] = scale * comps[i]; - } - }, - getImageBytes: function getImageBytes(length, drawWidth, drawHeight) { - var forceRGB = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; - - this.image.reset(); - this.image.drawWidth = drawWidth || this.width; - this.image.drawHeight = drawHeight || this.height; - this.image.forceRGB = !!forceRGB; - return this.image.getBytes(length, true); - } - }; - return PDFImage; -}(); -exports.PDFImage = PDFImage; - -/***/ }), -/* 172 */ -/***/ (function(module, exports, __w_pdfjs_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.MessageHandler = undefined; - -var _regenerator = __w_pdfjs_require__(131); - -var _regenerator2 = _interopRequireDefault(_regenerator); - -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; - -var resolveCall = function () { - var _ref = _asyncToGenerator( /*#__PURE__*/_regenerator2.default.mark(function _callee(fn, args) { - var thisArg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; - return _regenerator2.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - if (fn) { - _context.next = 2; - break; - } - - return _context.abrupt('return'); - - case 2: - return _context.abrupt('return', fn.apply(thisArg, args)); - - case 3: - case 'end': - return _context.stop(); - } - } - }, _callee, this); - })); - - return function resolveCall(_x2, _x3) { - return _ref.apply(this, arguments); - }; -}(); - -var _util = __w_pdfjs_require__(2); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } - -function wrapReason(reason) { - if ((typeof reason === 'undefined' ? 'undefined' : _typeof(reason)) !== 'object') { - return reason; - } - switch (reason.name) { - case 'AbortException': - return new _util.AbortException(reason.message); - case 'MissingPDFException': - return new _util.MissingPDFException(reason.message); - case 'UnexpectedResponseException': - return new _util.UnexpectedResponseException(reason.message, reason.status); - default: - return new _util.UnknownErrorException(reason.message, reason.details); - } -} -function makeReasonSerializable(reason) { - if (!(reason instanceof Error) || reason instanceof _util.AbortException || reason instanceof _util.MissingPDFException || reason instanceof _util.UnexpectedResponseException || reason instanceof _util.UnknownErrorException) { - return reason; - } - return new _util.UnknownErrorException(reason.message, reason.toString()); -} -function resolveOrReject(capability, success, reason) { - if (success) { - capability.resolve(); - } else { - capability.reject(reason); - } -} -function finalize(promise) { - return Promise.resolve(promise).catch(function () {}); -} -function MessageHandler(sourceName, targetName, comObj) { - var _this = this; - - this.sourceName = sourceName; - this.targetName = targetName; - this.comObj = comObj; - this.callbackId = 1; - this.streamId = 1; - this.postMessageTransfers = true; - this.streamSinks = Object.create(null); - this.streamControllers = Object.create(null); - var callbacksCapabilities = this.callbacksCapabilities = Object.create(null); - var ah = this.actionHandler = Object.create(null); - this._onComObjOnMessage = function (event) { - var data = event.data; - if (data.targetName !== _this.sourceName) { - return; - } - if (data.stream) { - _this._processStreamMessage(data); - } else if (data.isReply) { - var callbackId = data.callbackId; - if (data.callbackId in callbacksCapabilities) { - var callback = callbacksCapabilities[callbackId]; - delete callbacksCapabilities[callbackId]; - if ('error' in data) { - callback.reject(wrapReason(data.error)); - } else { - callback.resolve(data.data); - } - } else { - throw new Error('Cannot resolve callback ' + callbackId); - } - } else if (data.action in ah) { - var action = ah[data.action]; - if (data.callbackId) { - var _sourceName = _this.sourceName; - var _targetName = data.sourceName; - Promise.resolve().then(function () { - return action[0].call(action[1], data.data); - }).then(function (result) { - comObj.postMessage({ - sourceName: _sourceName, - targetName: _targetName, - isReply: true, - callbackId: data.callbackId, - data: result - }); - }, function (reason) { - comObj.postMessage({ - sourceName: _sourceName, - targetName: _targetName, - isReply: true, - callbackId: data.callbackId, - error: makeReasonSerializable(reason) - }); - }); - } else if (data.streamId) { - _this._createStreamSink(data); - } else { - action[0].call(action[1], data.data); - } - } else { - throw new Error('Unknown action from worker: ' + data.action); - } - }; - comObj.addEventListener('message', this._onComObjOnMessage); -} -MessageHandler.prototype = { - on: function on(actionName, handler, scope) { - var ah = this.actionHandler; - if (ah[actionName]) { - throw new Error('There is already an actionName called "' + actionName + '"'); - } - ah[actionName] = [handler, scope]; - }, - send: function send(actionName, data, transfers) { - var message = { - sourceName: this.sourceName, - targetName: this.targetName, - action: actionName, - data: data - }; - this.postMessage(message, transfers); - }, - sendWithPromise: function sendWithPromise(actionName, data, transfers) { - var callbackId = this.callbackId++; - var message = { - sourceName: this.sourceName, - targetName: this.targetName, - action: actionName, - data: data, - callbackId: callbackId - }; - var capability = (0, _util.createPromiseCapability)(); - this.callbacksCapabilities[callbackId] = capability; - try { - this.postMessage(message, transfers); - } catch (e) { - capability.reject(e); - } - return capability.promise; - }, - sendWithStream: function sendWithStream(actionName, data, queueingStrategy, transfers) { - var _this2 = this; - - var streamId = this.streamId++; - var sourceName = this.sourceName; - var targetName = this.targetName; - return new _util.ReadableStream({ - start: function start(controller) { - var startCapability = (0, _util.createPromiseCapability)(); - _this2.streamControllers[streamId] = { - controller: controller, - startCall: startCapability, - isClosed: false - }; - _this2.postMessage({ - sourceName: sourceName, - targetName: targetName, - action: actionName, - streamId: streamId, - data: data, - desiredSize: controller.desiredSize - }); - return startCapability.promise; - }, - pull: function pull(controller) { - var pullCapability = (0, _util.createPromiseCapability)(); - _this2.streamControllers[streamId].pullCall = pullCapability; - _this2.postMessage({ - sourceName: sourceName, - targetName: targetName, - stream: 'pull', - streamId: streamId, - desiredSize: controller.desiredSize - }); - return pullCapability.promise; - }, - cancel: function cancel(reason) { - var cancelCapability = (0, _util.createPromiseCapability)(); - _this2.streamControllers[streamId].cancelCall = cancelCapability; - _this2.streamControllers[streamId].isClosed = true; - _this2.postMessage({ - sourceName: sourceName, - targetName: targetName, - stream: 'cancel', - reason: reason, - streamId: streamId - }); - return cancelCapability.promise; - } - }, queueingStrategy); - }, - _createStreamSink: function _createStreamSink(data) { - var _this3 = this; - - var self = this; - var action = this.actionHandler[data.action]; - var streamId = data.streamId; - var desiredSize = data.desiredSize; - var sourceName = this.sourceName; - var targetName = data.sourceName; - var capability = (0, _util.createPromiseCapability)(); - var sendStreamRequest = function sendStreamRequest(_ref2) { - var stream = _ref2.stream, - chunk = _ref2.chunk, - transfers = _ref2.transfers, - success = _ref2.success, - reason = _ref2.reason; - - _this3.postMessage({ - sourceName: sourceName, - targetName: targetName, - stream: stream, - streamId: streamId, - chunk: chunk, - success: success, - reason: reason - }, transfers); - }; - var streamSink = { - enqueue: function enqueue(chunk) { - var size = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1; - var transfers = arguments[2]; - - if (this.isCancelled) { - return; - } - var lastDesiredSize = this.desiredSize; - this.desiredSize -= size; - if (lastDesiredSize > 0 && this.desiredSize <= 0) { - this.sinkCapability = (0, _util.createPromiseCapability)(); - this.ready = this.sinkCapability.promise; - } - sendStreamRequest({ - stream: 'enqueue', - chunk: chunk, - transfers: transfers - }); - }, - close: function close() { - if (this.isCancelled) { - return; - } - this.isCancelled = true; - sendStreamRequest({ stream: 'close' }); - delete self.streamSinks[streamId]; - }, - error: function error(reason) { - if (this.isCancelled) { - return; - } - this.isCancelled = true; - sendStreamRequest({ - stream: 'error', - reason: reason - }); - }, - - sinkCapability: capability, - onPull: null, - onCancel: null, - isCancelled: false, - desiredSize: desiredSize, - ready: null - }; - streamSink.sinkCapability.resolve(); - streamSink.ready = streamSink.sinkCapability.promise; - this.streamSinks[streamId] = streamSink; - resolveCall(action[0], [data.data, streamSink], action[1]).then(function () { - sendStreamRequest({ - stream: 'start_complete', - success: true - }); - }, function (reason) { - sendStreamRequest({ - stream: 'start_complete', - success: false, - reason: reason - }); - }); - }, - _processStreamMessage: function _processStreamMessage(data) { - var _this4 = this; - - var sourceName = this.sourceName; - var targetName = data.sourceName; - var streamId = data.streamId; - var sendStreamResponse = function sendStreamResponse(_ref3) { - var stream = _ref3.stream, - success = _ref3.success, - reason = _ref3.reason; - - _this4.comObj.postMessage({ - sourceName: sourceName, - targetName: targetName, - stream: stream, - success: success, - streamId: streamId, - reason: reason - }); - }; - var deleteStreamController = function deleteStreamController() { - Promise.all([_this4.streamControllers[data.streamId].startCall, _this4.streamControllers[data.streamId].pullCall, _this4.streamControllers[data.streamId].cancelCall].map(function (capability) { - return capability && finalize(capability.promise); - })).then(function () { - delete _this4.streamControllers[data.streamId]; - }); - }; - switch (data.stream) { - case 'start_complete': - resolveOrReject(this.streamControllers[data.streamId].startCall, data.success, wrapReason(data.reason)); - break; - case 'pull_complete': - resolveOrReject(this.streamControllers[data.streamId].pullCall, data.success, wrapReason(data.reason)); - break; - case 'pull': - if (!this.streamSinks[data.streamId]) { - sendStreamResponse({ - stream: 'pull_complete', - success: true - }); - break; - } - if (this.streamSinks[data.streamId].desiredSize <= 0 && data.desiredSize > 0) { - this.streamSinks[data.streamId].sinkCapability.resolve(); - } - this.streamSinks[data.streamId].desiredSize = data.desiredSize; - resolveCall(this.streamSinks[data.streamId].onPull).then(function () { - sendStreamResponse({ - stream: 'pull_complete', - success: true - }); - }, function (reason) { - sendStreamResponse({ - stream: 'pull_complete', - success: false, - reason: reason - }); - }); - break; - case 'enqueue': - (0, _util.assert)(this.streamControllers[data.streamId], 'enqueue should have stream controller'); - if (!this.streamControllers[data.streamId].isClosed) { - this.streamControllers[data.streamId].controller.enqueue(data.chunk); - } - break; - case 'close': - (0, _util.assert)(this.streamControllers[data.streamId], 'close should have stream controller'); - if (this.streamControllers[data.streamId].isClosed) { - break; - } - this.streamControllers[data.streamId].isClosed = true; - this.streamControllers[data.streamId].controller.close(); - deleteStreamController(); - break; - case 'error': - (0, _util.assert)(this.streamControllers[data.streamId], 'error should have stream controller'); - this.streamControllers[data.streamId].controller.error(wrapReason(data.reason)); - deleteStreamController(); - break; - case 'cancel_complete': - resolveOrReject(this.streamControllers[data.streamId].cancelCall, data.success, wrapReason(data.reason)); - deleteStreamController(); - break; - case 'cancel': - if (!this.streamSinks[data.streamId]) { - break; - } - resolveCall(this.streamSinks[data.streamId].onCancel, [wrapReason(data.reason)]).then(function () { - sendStreamResponse({ - stream: 'cancel_complete', - success: true - }); - }, function (reason) { - sendStreamResponse({ - stream: 'cancel_complete', - success: false, - reason: reason - }); - }); - this.streamSinks[data.streamId].sinkCapability.reject(wrapReason(data.reason)); - this.streamSinks[data.streamId].isCancelled = true; - delete this.streamSinks[data.streamId]; - break; - default: - throw new Error('Unexpected stream case'); - } - }, - postMessage: function postMessage(message, transfers) { - if (transfers && this.postMessageTransfers) { - this.comObj.postMessage(message, transfers); - } else { - this.comObj.postMessage(message); - } - }, - destroy: function destroy() { - this.comObj.removeEventListener('message', this._onComObjOnMessage); - } -}; -exports.MessageHandler = MessageHandler; - -/***/ }) -/******/ ]); -}); -//# sourceMappingURL=pdf.worker.js.map - -/***/ }) - -};; \ No newline at end of file diff --git a/index.js b/index.js index 6d96361..23d7ae0 100644 --- a/index.js +++ b/index.js @@ -95,44 +95,45 @@ const { addData, hydrateAndFilter, cozyClient -} = __webpack_require__(1) +} = __webpack_require__(1); -const fetch = __webpack_require__(1310) -const moment = __webpack_require__(1319) -__webpack_require__(1456) +// const fetch = require('node-fetch') +const rp = __webpack_require__(1307); +const moment = __webpack_require__(1339); +__webpack_require__(1476); -moment.locale('fr') // set the language -moment.tz.setDefault('Europe/Paris') // set the timezone +moment.locale("fr"); // set the language +moment.tz.setDefault("Europe/Paris"); // set the timezone const manualExecution = - process.env.COZY_JOB_MANUAL_EXECUTION === 'true' ? true : false + process.env.COZY_JOB_MANUAL_EXECUTION === "true" ? true : false; const startDate = manualExecution ? moment() - .subtract(1, 'year') - .format('MM/DD/YYYY') + .subtract(1, "year") + .format("MM/DD/YYYY") : moment() - .subtract(3, 'year') - .format('MM/DD/YYYY') + .subtract(3, "year") + .format("MM/DD/YYYY"); -const endDate = moment().format('MM/DD/YYYY') +const endDate = moment().format("MM/DD/YYYY"); // const timeRange = ['day', 'month', 'year'] const rangeDate = { day: { - doctype: 'com.grandlyon.egl.day', - keys: ['year', 'month', 'day'] + doctype: "com.grandlyon.egl.day", + keys: ["year", "month", "day"] }, month: { - doctype: 'com.grandlyon.egl.month', - keys: ['year', 'month'] + doctype: "com.grandlyon.egl.month", + keys: ["year", "month"] }, year: { - doctype: 'com.grandlyon.egl.year', - keys: ['year'] + doctype: "com.grandlyon.egl.year", + keys: ["year"] } -} +}; -module.exports = new BaseKonnector(start) +module.exports = new BaseKonnector(start); // The start function is run by the BaseKonnector instance only when it got all the account // information (fields). When you run this connector yourself in "standalone" mode or "dev" mode, @@ -140,34 +141,34 @@ module.exports = new BaseKonnector(start) async function start(fields, cozyParameters) { try { // Local debug data - const baseUrl = fields.eglBaseURL - const apiAuthKey = fields.eglAPIAuthKey - // const baseUrl = cozyParameters.secret.eglBaseURL - // const apiAuthKey = cozyParameters.secret.eglAPIAuthKey - log('info', 'Authenticating ...') + // const baseUrl = fields.eglBaseURL + // const apiAuthKey = fields.eglAPIAuthKey + const baseUrl = cozyParameters.secret.eglBaseURL; + const apiAuthKey = cozyParameters.secret.eglAPIAuthKey; + log("info", "Authenticating ..."); const response = await authenticate( fields.login, fields.password, baseUrl, apiAuthKey - ) - log('info', 'Successfully logged in') + ); + log("info", "Successfully logged in"); - const eglData = await getData(response, baseUrl, apiAuthKey) + const eglData = await getData(response, baseUrl, apiAuthKey); if (eglData) { - log('debug', 'Process egl daily data') + log("debug", "Process egl daily data"); const processedLoadData = await processData( eglData, rangeDate.day.doctype, rangeDate.day.keys - ) - log('debug', 'Agregate egl load data for month and year') - await agregateMonthAndYearData(processedLoadData) + ); + log("debug", "Agregate egl load data for month and year"); + await agregateMonthAndYearData(processedLoadData); } else { - log('debug', 'No data found') + log("debug", "No data found"); } } catch (error) { - throw new Error(error.message) + throw new Error(error.message); } } @@ -179,15 +180,15 @@ async function start(fields, cozyParameters) { */ async function processData(data, doctype, filterKeys) { // const formatedData = await formateData(data) - log('debug', 'processData - data formated') + log("debug", "processData - data formated"); // Remove data for existing days into the DB const filteredData = await hydrateAndFilter(data, doctype, { keys: filterKeys - }) - log('debug', 'processData - data filtered') + }); + log("debug", "processData - data filtered"); // Store new day data - await storeData(filteredData, doctype, filterKeys) - return filteredData + await storeData(filteredData, doctype, filterKeys); + return filteredData; } /** @@ -196,32 +197,32 @@ async function processData(data, doctype, filterKeys) { async function agregateMonthAndYearData(data) { // Sum year and month values into object with year or year-month as keys if (data && data.length !== 0) { - let monthData = {} - let yearData = {} + let monthData = {}; + let yearData = {}; data.forEach(element => { - element.year + '-' + element.month in monthData - ? (monthData[element.year + '-' + element.month] += element.load) - : (monthData[element.year + '-' + element.month] = element.load) + element.year + "-" + element.month in monthData + ? (monthData[element.year + "-" + element.month] += element.load) + : (monthData[element.year + "-" + element.month] = element.load); element.year in yearData ? (yearData[element.year] += element.load) - : (yearData[element.year] = element.load) - }) + : (yearData[element.year] = element.load); + }); // Agregation for Month data const agregatedMonthData = await buildAgregatedData( monthData, - 'com.grandlyon.egl.month' - ) - await storeData(agregatedMonthData, 'com.grandlyon.egl.month', [ - 'year', - 'month' - ]) + "com.grandlyon.egl.month" + ); + await storeData(agregatedMonthData, "com.grandlyon.egl.month", [ + "year", + "month" + ]); // Agregation for Year data const agregatedYearData = await buildAgregatedData( yearData, - 'com.grandlyon.egl.year' - ) - await storeData(agregatedYearData, 'com.grandlyon.egl.year', ['year']) + "com.grandlyon.egl.year" + ); + await storeData(agregatedYearData, "com.grandlyon.egl.year", ["year"]); } } @@ -230,130 +231,131 @@ async function agregateMonthAndYearData(data) { * Return an Array of agregated data */ async function buildAgregatedData(data, doctype) { - log('info', 'entering buildAgregatedData') - let agregatedData = [] + log("info", "entering buildAgregatedData"); + let agregatedData = []; for (let [key, value] of Object.entries(data)) { - const data = await buildDataFromKey(doctype, key, value) - const oldValue = await resetInProgressAggregatedData(data, doctype) - log('info', 'Dataload + oldvalue is ' + data.load + ' + ' + oldValue) - data.load += oldValue - agregatedData.push(data) + const data = await buildDataFromKey(doctype, key, value); + const oldValue = await resetInProgressAggregatedData(data, doctype); + log("info", "Dataload + oldvalue is " + data.load + " + " + oldValue); + data.load += oldValue; + agregatedData.push(data); } - return agregatedData + return agregatedData; } async function authenticate(login, password, baseUrl, apiAuthKey) { const authRequest = { method: "POST", + uri: baseUrl + "/connect.aspx", headers: { AuthKey: apiAuthKey, "Content-Type": "application/x-www-form-urlencoded" }, - body: new URLSearchParams({ + formData: { login: login, pass: password - }) - } - const data = await fetch(baseUrl + "/connect.aspx", authRequest) - const response = await data.json() - + }, + json: true + }; + const response = await rp(authRequest); if (response.codeRetour === 100) { - return response + return response; } else { - throw new Error(errors.LOGIN_FAILED) + throw new Error(errors.LOGIN_FAILED); } } async function getData(response, baseUrl, apiAuthKey) { - log('debug', 'Start date : ' + startDate) - log('debug', 'End date : ' + endDate) + log("debug", "Start date : " + startDate); + log("debug", "End date : " + endDate); const dataRequest = { method: "POST", + uri: baseUrl + "/getAllAgregatsByAbonnement.aspx", headers: { AuthKey: apiAuthKey, - 'Content-Type': 'application/x-www-form-urlencoded' + "Content-Type": "application/x-www-form-urlencoded" }, - body: new URLSearchParams({ + form: { token: response.resultatRetour.token, num_abt: response.resultatRetour.num_abt, date_debut: startDate, date_fin: endDate - }) - } + }, + json: true + }; try { // Sort data by date - const data = await fetch( - baseUrl + "/getAllAgregatsByAbonnement.aspx", - dataRequest - ) - const responseEgl = await data.json() - responseEgl.resultatRetour.sort(function(a, b) { - return new Date(a.DateReleve) - new Date(b.DateReleve); - }) + + const responseEgl = await rp(dataRequest).then(eglRawData => { + eglRawData.resultatRetour.sort(function(a, b) { + return new Date(a.DateReleve) - new Date(b.DateReleve); + }); + return eglRawData; + }); switch (responseEgl.codeRetour) { case 100: - return format(responseEgl) + return format(responseEgl); case -2: - throw errors.LOGIN_FAILED + throw errors.LOGIN_FAILED; case -1: - throw errors.VENDOR_DOWN + throw errors.VENDOR_DOWN; default: - throw errors.UNKNOWN_ERROR + throw errors.UNKNOWN_ERROR; } } catch (error) { - log('debug', 'Error from getAllAgregatsByAbonnement') - throw new Error(errors.VENDOR_DOWN) + log("debug", "Error from getAllAgregatsByAbonnement"); + throw new Error(errors.VENDOR_DOWN); } } function format(response) { - log('info', 'origin response size is : ' + response.resultatRetour.length) + log("info", "origin response size is : " + response.resultatRetour.length); // Store first value as reference for index processing - let refValue = response.resultatRetour[0] + let refValue = response.resultatRetour[0]; // Create copy of data without first value const data = response.resultatRetour .slice(1) - .filter(value => value.ValeurIndex) - log('info', 'filtered size is : ' + data.length) + .filter(value => value.ValeurIndex); + log("info", "filtered size is : " + data.length); return data.map(value => { - const time = moment(value.DateReleve, moment.ISO_8601) - const procesedLoad = value.ValeurIndex - refValue.ValeurIndex + const time = moment(value.DateReleve, moment.ISO_8601); + const procesedLoad = value.ValeurIndex - refValue.ValeurIndex; if (procesedLoad < 0) { log( - 'error', - `processing load for day ${parseInt(time.format('D'))}/${parseInt( - time.format('M') - )}/${parseInt(time.format('YYYY'))}, value is : ${procesedLoad}` - ) - throw errors.VENDOR_DOWN + "error", + `processing load for day ${parseInt(time.format("D"))}/${parseInt( + time.format("M") + )}/${parseInt(time.format("YYYY"))}, value is : ${procesedLoad}` + ); + throw errors.VENDOR_DOWN; } // Change index ref value - refValue = value + refValue = value; return { load: procesedLoad, - year: parseInt(time.format('YYYY')), - month: parseInt(time.format('M')), - day: parseInt(time.format('D')), + year: parseInt(time.format("YYYY")), + month: parseInt(time.format("M")), + day: parseInt(time.format("D")), hour: 0, minute: 0, type: value.TypeAgregat - } - }) + }; + }); } /** * Save data in the right doctype db and prevent duplicated keys */ async function storeData(data, doctype, filterKeys) { - log('debug', 'Store into ' + doctype) - log('debug', 'Store into keys : ' + filterKeys) + log("debug", "Store into " + doctype); + log("debug", "Store into keys : " + filterKeys); // data.map(v => { // log("info", "Saving data " + v.load + " for " + v.day + "/" + v.month + "/" + v.year); // }); const filteredDocuments = await hydrateAndFilter(data, doctype, { keys: filterKeys - }) - return await addData(filteredDocuments, doctype) + }); + return await addData(filteredDocuments, doctype); } /** @@ -363,24 +365,24 @@ async function storeData(data, doctype, filterKeys) { * For month doctype: key = "YYYY-MM" */ async function buildDataFromKey(doctype, key, value) { - let year, month, day, hour - if (doctype === 'com.grandlyon.egl.year') { - year = key - month = 1 - day = 0 - hour = 0 - } else if (doctype === 'com.grandlyon.egl.month') { - const split = key.split('-') - year = split[0] - month = split[1] - day = 0 - hour = 0 + let year, month, day, hour; + if (doctype === "com.grandlyon.egl.year") { + year = key; + month = 1; + day = 0; + hour = 0; + } else if (doctype === "com.grandlyon.egl.month") { + const split = key.split("-"); + year = split[0]; + month = split[1]; + day = 0; + hour = 0; } else { - const split = key.split('-') - year = split[0] - month = split[1] - day = split[2] - hour = split[3] + const split = key.split("-"); + year = split[0]; + month = split[1]; + day = split[2]; + hour = split[3]; } return { load: Math.round(value * 10000) / 10000, @@ -389,7 +391,7 @@ async function buildDataFromKey(doctype, key, value) { day: parseInt(day), hour: parseInt(hour), minute: 0 - } + }; } /** @@ -401,21 +403,21 @@ async function buildDataFromKey(doctype, key, value) { */ async function resetInProgressAggregatedData(data, doctype) { // /!\ Warning: cannot use mongo queries because not supported for dev by cozy-konnectors-libs - log('debug', 'Remove aggregated data for ' + doctype) - const result = await cozyClient.data.findAll(doctype) + log("debug", "Remove aggregated data for " + doctype); + const result = await cozyClient.data.findAll(doctype); if (result && result.length > 0) { // Filter data to remove - var filtered = [] - if (doctype === 'com.grandlyon.egl.year') { + var filtered = []; + if (doctype === "com.grandlyon.egl.year") { // Yearly case filtered = result.filter(function(el) { - return el.year == data.year - }) - } else if (doctype === 'com.grandlyon.egl.month') { + return el.year == data.year; + }); + } else if (doctype === "com.grandlyon.egl.month") { // Monthly case filtered = result.filter(function(el) { - return el.year == data.year && el.month == data.month - }) + return el.year == data.year && el.month == data.month; + }); } else { // Hourly case filtered = result.filter(function(el) { @@ -424,19 +426,19 @@ async function resetInProgressAggregatedData(data, doctype) { el.month == data.month && el.day == data.day && el.hour == data.hour - ) - }) + ); + }); } // Remove data - let sum = 0.0 + let sum = 0.0; for (const doc of filtered) { - sum += doc.load - log('debug', 'Removing this entry for ' + doc.load) - await cozyClient.data.delete(doctype, doc) + sum += doc.load; + log("debug", "Removing this entry for " + doc.load); + await cozyClient.data.delete(doctype, doc); } - return sum + return sum; } - return 0.0 + return 0.0; } @@ -450,39 +452,39 @@ const requestFactory = __webpack_require__(22); const hydrateAndFilter = __webpack_require__(369); -const categorization = __webpack_require__(1165); +const categorization = __webpack_require__(1162); module.exports = { - BaseKonnector: __webpack_require__(1225), - CookieKonnector: __webpack_require__(1303), + BaseKonnector: __webpack_require__(1222), + CookieKonnector: __webpack_require__(1300), cozyClient: __webpack_require__(485), - errors: __webpack_require__(1231), + errors: __webpack_require__(1228), log, - saveFiles: __webpack_require__(1227), - saveBills: __webpack_require__(1226), - saveIdentity: __webpack_require__(1269), - linkBankOperations: __webpack_require__(1248), - addData: __webpack_require__(1247), + saveFiles: __webpack_require__(1224), + saveBills: __webpack_require__(1223), + saveIdentity: __webpack_require__(1266), + linkBankOperations: __webpack_require__(1245), + addData: __webpack_require__(1244), hydrateAndFilter, - htmlToPDF: __webpack_require__(1304).htmlToPDF, - createCozyPDFDocument: __webpack_require__(1304).createCozyPDFDocument, + htmlToPDF: __webpack_require__(1301).htmlToPDF, + createCozyPDFDocument: __webpack_require__(1301).createCozyPDFDocument, filterData: deprecate(hydrateAndFilter, 'Use hydrateAndFilter now. filterData will be removed in cozy-konnector-libs@4'), - updateOrCreate: __webpack_require__(1268), + updateOrCreate: __webpack_require__(1265), request: deprecate(requestFactory, 'Use requestFactory instead of request. It will be removed in cozy-konnector-libs@4'), requestFactory, - retry: __webpack_require__(1228), - wrapIfSentrySetUp: __webpack_require__(1270).wrapIfSentrySetUp, - Document: __webpack_require__(1305), - signin: __webpack_require__(1265), - submitForm: __webpack_require__(1265), - scrape: __webpack_require__(1307), - mkdirp: __webpack_require__(1230), - normalizeFilename: __webpack_require__(1308), + retry: __webpack_require__(1225), + wrapIfSentrySetUp: __webpack_require__(1267).wrapIfSentrySetUp, + Document: __webpack_require__(1302), + signin: __webpack_require__(1262), + submitForm: __webpack_require__(1262), + scrape: __webpack_require__(1304), + mkdirp: __webpack_require__(1227), + normalizeFilename: __webpack_require__(1305), utils: __webpack_require__(484), - solveCaptcha: __webpack_require__(1309), + solveCaptcha: __webpack_require__(1306), createCategorizer: categorization.createCategorizer, categorize: categorization.categorize, - manifest: __webpack_require__(836) + manifest: __webpack_require__(833) }; function deprecate(wrapped, message) { @@ -65890,17 +65892,17 @@ module.exports = noop; */ const cozyClient = __webpack_require__(485); -const groupBy = __webpack_require__(730); +const groupBy = __webpack_require__(729); -const keyBy = __webpack_require__(705); +const keyBy = __webpack_require__(704); -const sortBy = __webpack_require__(828); +const sortBy = __webpack_require__(826); -const range = __webpack_require__(889); +const range = __webpack_require__(886); const { format -} = __webpack_require__(892); +} = __webpack_require__(889); /** * This function allows to fetch all documents for a given doctype. It is the fastest to get all * documents but without filtering possibilities @@ -66211,22 +66213,22 @@ const { MemoryStorage } = __webpack_require__(486); -const NewCozyClient = __webpack_require__(528).default; +const NewCozyClient = __webpack_require__(527).default; const { models -} = __webpack_require__(528); +} = __webpack_require__(527); -const globalFetch = __webpack_require__(835).default; +const globalFetch = __webpack_require__(493).default; global.fetch = globalFetch; global.Headers = globalFetch.Headers; // fixes an import problem of isomorphic fetch in cozy-client and cozy-client-js -const manifest = __webpack_require__(836); +const manifest = __webpack_require__(833); const getCozyClient = function (environment = 'production') { if (environment === 'standalone' || environment === 'test') { - return __webpack_require__(837); + return __webpack_require__(834); } const cozyFields = JSON.parse(process.env.COZY_FIELDS || '{}'); @@ -84393,9 +84395,9 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(507); /* harmony import */ var pouchdb_errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(512); /* harmony import */ var pouchdb_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(516); -/* harmony import */ var pouchdb_selector_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(520); -/* harmony import */ var pouchdb_abstract_mapreduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(522); -/* harmony import */ var pouchdb_collate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(521); +/* harmony import */ var pouchdb_selector_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(519); +/* harmony import */ var pouchdb_abstract_mapreduce__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(521); +/* harmony import */ var pouchdb_collate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(520); /* harmony import */ var pouchdb_md5__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(515); @@ -86988,8 +86990,8 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fetch", function() { return fetch; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Headers", function() { return Headers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "AbortController", function() { return AbortController; }); -/* harmony import */ var node_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(517); -/* harmony import */ var fetch_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(518); +/* harmony import */ var node_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(493); +/* harmony import */ var fetch_cookie__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(517); /* harmony import */ var fetch_cookie__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(fetch_cookie__WEBPACK_IMPORTED_MODULE_1__); @@ -87009,4976 +87011,3321 @@ var Headers = node_fetch__WEBPACK_IMPORTED_MODULE_0__["default"].Headers; /***/ }), /* 517 */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Headers", function() { return Headers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Request", function() { return Request; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Response", function() { return Response; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FetchError", function() { return FetchError; }); -/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100); -/* harmony import */ var http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98); -/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83); -/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99); -/* harmony import */ var zlib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(101); +var denodeify = __webpack_require__(518)(Promise) +var tough = __webpack_require__(81) +module.exports = function fetchCookieDecorator (fetch, jar) { + fetch = fetch || window.fetch + jar = jar || new tough.CookieJar() + var getCookieString = denodeify(jar.getCookieString.bind(jar)) + var setCookie = denodeify(jar.setCookie.bind(jar)) + return function fetchCookie (url, opts) { + opts = opts || {} + return getCookieString(url) + .then(function (cookie) { + return fetch(url, Object.assign(opts, { + headers: Object.assign(opts.headers || {}, (cookie ? { cookie: cookie } : {})) + })) + }) + .then(function (res) { + var cookies + if (res.headers.getAll) { + // node-fetch v1 + cookies = res.headers.getAll('set-cookie') + } else { + // node-fetch v2 + var cookie = res.headers.get('set-cookie') + cookies = cookie && cookie.split(',') || [] + } -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + if (!cookies.length) { + return res + } -// fix for "Readable" isn't a named export issue -const Readable = stream__WEBPACK_IMPORTED_MODULE_0__.Readable; + return Promise.all(cookies.map(function (cookie) { + return setCookie(cookie, res.url) + })).then(function () { + return res + }) + }) + } +} -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); -class Blob { - constructor() { - this[TYPE] = ''; +/***/ }), +/* 518 */ +/***/ (function(module, exports, __webpack_require__) { - const blobParts = arguments[0]; - const options = arguments[1]; +"use strict"; - const buffers = []; - let size = 0; - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } +Object.defineProperty(exports, "__esModule", { + value: true +}); - this[BUFFER] = Buffer.concat(buffers); +exports["default"] = function () { + var PromiseArg = arguments[0] === undefined ? Promise : arguments[0]; + return function (f) { + return function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; + return new PromiseArg(function (resolve, reject) { + return f.apply(undefined, args.concat([function (err, val) { + return err ? reject(err) : resolve(val); + }])); + }); + }; + }; +}; - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); +module.exports = exports["default"]; - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); +/***/ }), +/* 519 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "massageSelector", function() { return massageSelector; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesSelector", function() { return matchesSelector; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterInMemoryFields", function() { return filterInMemoryFields; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFieldSorter", function() { return createFieldSorter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowFilter", function() { return rowFilter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCombinationalField", function() { return isCombinationalField; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getKey", function() { return getKey; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getValue", function() { return getValue; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFieldFromDoc", function() { return getFieldFromDoc; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFieldInDoc", function() { return setFieldInDoc; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compare", function() { return compare; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseField", function() { return parseField; }); +/* harmony import */ var pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(507); +/* harmony import */ var pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(520); -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); - this.message = message; - this.type = type; - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; +// this would just be "return doc[field]", but fields +// can be "deep" due to dot notation +function getFieldFromDoc(doc, parsedField) { + var value = doc; + for (var i = 0, len = parsedField.length; i < len; i++) { + var key = parsedField[i]; + value = value[key]; + if (!value) { + break; + } } + return value; +} - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); +function setFieldInDoc(doc, parsedField, value) { + for (var i = 0, len = parsedField.length; i < len-1; i++) { + var elem = parsedField[i]; + doc = doc[elem] = {}; + } + doc[parsedField[len-1]] = value; } -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; +function compare(left, right) { + return left < right ? -1 : left > right ? 1 : 0; +} -let convert; -try { - convert = require('encoding').convert; -} catch (e) {} +// Converts a string in dot notation to an array of its components, with backslash escaping +function parseField(fieldName) { + // fields may be deep (e.g. "foo.bar.baz"), so parse + var fields = []; + var current = ''; + for (var i = 0, len = fieldName.length; i < len; i++) { + var ch = fieldName[i]; + if (ch === '.') { + if (i > 0 && fieldName[i - 1] === '\\') { // escaped delimiter + current = current.substring(0, current.length - 1) + '.'; + } else { // not escaped, so delimiter + fields.push(current); + current = ''; + } + } else { // normal character + current += ch; + } + } + fields.push(current); + return fields; +} -const INTERNALS = Symbol('Body internals'); +var combinationFields = ['$or', '$nor', '$not']; +function isCombinationalField(field) { + return combinationFields.indexOf(field) > -1; +} -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = stream__WEBPACK_IMPORTED_MODULE_0__.PassThrough; +function getKey(obj) { + return Object.keys(obj)[0]; +} -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; +function getValue(obj) { + return obj[getKey(obj)]; +} - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; +// flatten an array of selectors joined by an $and operator +function mergeAndedSelectors(selectors) { - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; + // sort to ensure that e.g. if the user specified + // $and: [{$gt: 'a'}, {$gt: 'b'}], then it's collapsed into + // just {$gt: 'b'} + var res = {}; - if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} + selectors.forEach(function (selector) { + Object.keys(selector).forEach(function (field) { + var matcher = selector[field]; + if (typeof matcher !== 'object') { + matcher = {$eq: matcher}; + } -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, + if (isCombinationalField(field)) { + if (matcher instanceof Array) { + res[field] = matcher.map(function (m) { + return mergeAndedSelectors([m]); + }); + } else { + res[field] = mergeAndedSelectors([matcher]); + } + } else { + var fieldMatchers = res[field] = res[field] || {}; + Object.keys(matcher).forEach(function (operator) { + var value = matcher[operator]; - get bodyUsed() { - return this[INTERNALS].disturbed; - }, + if (operator === '$gt' || operator === '$gte') { + return mergeGtGte(operator, value, fieldMatchers); + } else if (operator === '$lt' || operator === '$lte') { + return mergeLtLte(operator, value, fieldMatchers); + } else if (operator === '$ne') { + return mergeNe(value, fieldMatchers); + } else if (operator === '$eq') { + return mergeEq(value, fieldMatchers); + } + fieldMatchers[operator] = value; + }); + } + }); + }); - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, + return res; +} - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, +// collapse logically equivalent gt/gte values +function mergeGtGte(operator, value, fieldMatchers) { + if (typeof fieldMatchers.$eq !== 'undefined') { + return; // do nothing + } + if (typeof fieldMatchers.$gte !== 'undefined') { + if (operator === '$gte') { + if (value > fieldMatchers.$gte) { // more specificity + fieldMatchers.$gte = value; + } + } else { // operator === '$gt' + if (value >= fieldMatchers.$gte) { // more specificity + delete fieldMatchers.$gte; + fieldMatchers.$gt = value; + } + } + } else if (typeof fieldMatchers.$gt !== 'undefined') { + if (operator === '$gte') { + if (value > fieldMatchers.$gt) { // more specificity + delete fieldMatchers.$gt; + fieldMatchers.$gte = value; + } + } else { // operator === '$gt' + if (value > fieldMatchers.$gt) { // more specificity + fieldMatchers.$gt = value; + } + } + } else { + fieldMatchers[operator] = value; + } +} - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, +// collapse logically equivalent lt/lte values +function mergeLtLte(operator, value, fieldMatchers) { + if (typeof fieldMatchers.$eq !== 'undefined') { + return; // do nothing + } + if (typeof fieldMatchers.$lte !== 'undefined') { + if (operator === '$lte') { + if (value < fieldMatchers.$lte) { // more specificity + fieldMatchers.$lte = value; + } + } else { // operator === '$gt' + if (value <= fieldMatchers.$lte) { // more specificity + delete fieldMatchers.$lte; + fieldMatchers.$lt = value; + } + } + } else if (typeof fieldMatchers.$lt !== 'undefined') { + if (operator === '$lte') { + if (value < fieldMatchers.$lt) { // more specificity + delete fieldMatchers.$lt; + fieldMatchers.$lte = value; + } + } else { // operator === '$gt' + if (value < fieldMatchers.$lt) { // more specificity + fieldMatchers.$lt = value; + } + } + } else { + fieldMatchers[operator] = value; + } +} - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, +// combine $ne values into one array +function mergeNe(value, fieldMatchers) { + if ('$ne' in fieldMatchers) { + // there are many things this could "not" be + fieldMatchers.$ne.push(value); + } else { // doesn't exist yet + fieldMatchers.$ne = [value]; + } +} - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; +// add $eq into the mix +function mergeEq(value, fieldMatchers) { + // these all have less specificity than the $eq + // TODO: check for user errors here + delete fieldMatchers.$gt; + delete fieldMatchers.$gte; + delete fieldMatchers.$lt; + delete fieldMatchers.$lte; + delete fieldMatchers.$ne; + fieldMatchers.$eq = value; +} - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); +// +// normalize the selector +// +function massageSelector(input) { + var result = Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["clone"])(input); + var wasAnded = false; + if ('$and' in result) { + result = mergeAndedSelectors(result['$and']); + wasAnded = true; + } -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; + ['$or', '$nor'].forEach(function (orOrNor) { + if (orOrNor in result) { + // message each individual selector + // e.g. {foo: 'bar'} becomes {foo: {$eq: 'bar'}} + result[orOrNor].forEach(function (subSelector) { + var fields = Object.keys(subSelector); + for (var i = 0; i < fields.length; i++) { + var field = fields[i]; + var matcher = subSelector[field]; + if (typeof matcher !== 'object' || matcher === null) { + subSelector[field] = {$eq: matcher}; + } + } + }); + } + }); -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; + if ('$not' in result) { + //This feels a little like forcing, but it will work for now, + //I would like to come back to this and make the merging of selectors a little more generic + result['$not'] = mergeAndedSelectors([result['$not']]); + } - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } + var fields = Object.keys(result); - this[INTERNALS].disturbed = true; + for (var i = 0; i < fields.length; i++) { + var field = fields[i]; + var matcher = result[field]; - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } + if (typeof matcher !== 'object' || matcher === null) { + matcher = {$eq: matcher}; + } else if ('$ne' in matcher && !wasAnded) { + // I put these in an array, since there may be more than one + // but in the "mergeAnded" operation, I already take care of that + matcher.$ne = [matcher.$ne]; + } + result[field] = matcher; + } - let body = this.body; + return result; +} - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } +// create a comparator based on the sort object +function createFieldSorter(sort) { - // body is blob - if (isBlob(body)) { - body = body.stream(); - } + function getFieldValuesAsArray(doc) { + return sort.map(function (sorting) { + var fieldName = getKey(sorting); + var parsedField = parseField(fieldName); + var docFieldValue = getFieldFromDoc(doc, parsedField); + return docFieldValue; + }); + } - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } + return function (aRow, bRow) { + var aFieldValues = getFieldValuesAsArray(aRow.doc); + var bFieldValues = getFieldValuesAsArray(bRow.doc); + var collation = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(aFieldValues, bFieldValues); + if (collation !== 0) { + return collation; + } + // this is what mango seems to do + return compare(aRow.doc._id, bRow.doc._id); + }; +} - // istanbul ignore if: should never happen - if (!(body instanceof stream__WEBPACK_IMPORTED_MODULE_0__)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } +function filterInMemoryFields(rows, requestDef, inMemoryFields) { + rows = rows.filter(function (row) { + return rowFilter(row.doc, requestDef.selector, inMemoryFields); + }); - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; + if (requestDef.sort) { + // in-memory sort + var fieldSorter = createFieldSorter(requestDef.sort); + rows = rows.sort(fieldSorter); + if (typeof requestDef.sort[0] !== 'string' && + getValue(requestDef.sort[0]) === 'desc') { + rows = rows.reverse(); + } + } - return new Body.Promise(function (resolve, reject) { - let resTimeout; + if ('limit' in requestDef || 'skip' in requestDef) { + // have to do the limit in-memory + var skip = requestDef.skip || 0; + var limit = ('limit' in requestDef ? requestDef.limit : rows.length) + skip; + rows = rows.slice(skip, limit); + } + return rows; +} - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } +function rowFilter(doc, selector, inMemoryFields) { + return inMemoryFields.every(function (field) { + var matcher = selector[field]; + var parsedField = parseField(field); + var docFieldValue = getFieldFromDoc(doc, parsedField); + if (isCombinationalField(field)) { + return matchCominationalSelector(field, matcher, doc); + } - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); + return matchSelector(matcher, doc, parsedField, docFieldValue); + }); +} - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } +function matchSelector(matcher, doc, parsedField, docFieldValue) { + if (!matcher) { + // no filtering necessary; this field is just needed for sorting + return true; + } - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } + return Object.keys(matcher).every(function (userOperator) { + var userValue = matcher[userOperator]; + return match(userOperator, doc, userValue, parsedField, docFieldValue); + }); +} - accumBytes += chunk.length; - accum.push(chunk); - }); +function matchCominationalSelector(field, matcher, doc) { - body.on('end', function () { - if (abort) { - return; - } + if (field === '$or') { + return matcher.some(function (orMatchers) { + return rowFilter(doc, orMatchers, Object.keys(orMatchers)); + }); + } - clearTimeout(resTimeout); + if (field === '$not') { + return !rowFilter(doc, matcher, Object.keys(matcher)); + } - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} + //`$nor` + return !matcher.find(function (orMatchers) { + return rowFilter(doc, orMatchers, Object.keys(orMatchers)); + }); -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } +} - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; +function match(userOperator, doc, userValue, parsedField, docFieldValue) { + if (!matchers[userOperator]) { + throw new Error('unknown operator "' + userOperator + + '" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, ' + + '$nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all'); + } + return matchers[userOperator](doc, userValue, parsedField, docFieldValue); +} - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } +function fieldExists(docFieldValue) { + return typeof docFieldValue !== 'undefined' && docFieldValue !== null; +} - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); +function fieldIsNotUndefined(docFieldValue) { + return typeof docFieldValue !== 'undefined'; +} - // html5 - if (!res && str) { - res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str); - } +function modField(docFieldValue, userValue) { + var divisor = userValue[0]; + var mod = userValue[1]; + if (divisor === 0) { + throw new Error('Bad divisor, cannot divide by zero'); + } - // html4 - if (!res && str) { - res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str); - if (!res) { - res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str); - if (res) { - res.pop(); // drop last quote - } - } + if (parseInt(divisor, 10) !== divisor ) { + throw new Error('Divisor is not an integer'); + } - if (res) { - res = /charset=(.*)/i.exec(res.pop()); - } - } + if (parseInt(mod, 10) !== mod ) { + throw new Error('Modulus is not an integer'); + } - // xml - if (!res && str) { - res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str); - } + if (parseInt(docFieldValue, 10) !== docFieldValue) { + return false; + } - // found charset - if (res) { - charset = res.pop(); + return docFieldValue % divisor === mod; +} - // prevent decode issues when sites use incorrect encoding - // ref: https://hsivonen.fi/encoding-menu/ - if (charset === 'gb2312' || charset === 'gbk') { - charset = 'gb18030'; - } - } +function arrayContainsValue(docFieldValue, userValue) { + return userValue.some(function (val) { + if (docFieldValue instanceof Array) { + return docFieldValue.indexOf(val) > -1; + } - // turn raw buffers into a single utf-8 buffer - return convert(buffer, 'UTF-8', charset).toString(); + return docFieldValue === val; + }); } -/** - * Detect a URLSearchParams object - * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143 - * - * @param Object obj Object to detect by type or brand - * @return String - */ -function isURLSearchParams(obj) { - // Duck-typing as a necessary condition. - if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') { - return false; - } +function arrayContainsAllValues(docFieldValue, userValue) { + return userValue.every(function (val) { + return docFieldValue.indexOf(val) > -1; + }); +} - // Brand-checking and more duck-typing as optional condition. - return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function'; +function arraySize(docFieldValue, userValue) { + return docFieldValue.length === userValue; } -/** - * Check if `obj` is a W3C `Blob` object (which `File` inherits from) - * @param {*} obj - * @return {boolean} - */ -function isBlob(obj) { - return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); +function regexMatch(docFieldValue, userValue) { + var re = new RegExp(userValue); + + return re.test(docFieldValue); } -/** - * Clone body given Res/Req instance - * - * @param Mixed instance Response or Request instance - * @return Mixed - */ -function clone(instance) { - let p1, p2; - let body = instance.body; +function typeMatch(docFieldValue, userValue) { - // don't allow cloning a used body - if (instance.bodyUsed) { - throw new Error('cannot clone body after it is used'); - } + switch (userValue) { + case 'null': + return docFieldValue === null; + case 'boolean': + return typeof (docFieldValue) === 'boolean'; + case 'number': + return typeof (docFieldValue) === 'number'; + case 'string': + return typeof (docFieldValue) === 'string'; + case 'array': + return docFieldValue instanceof Array; + case 'object': + return ({}).toString.call(docFieldValue) === '[object Object]'; + } - // check that body is a stream and not form-data object - // note: we can't clone the form-data object without having it as a dependency - if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__ && typeof body.getBoundary !== 'function') { - // tee instance body - p1 = new PassThrough(); - p2 = new PassThrough(); - body.pipe(p1); - body.pipe(p2); - // set instance body to teed body and return the other teed body - instance[INTERNALS].body = p1; - body = p2; - } + throw new Error(userValue + ' not supported as a type.' + + 'Please use one of object, string, array, number, boolean or null.'); - return body; } -/** - * Performs the operation "extract a `Content-Type` value from |object|" as - * specified in the specification: - * https://fetch.spec.whatwg.org/#concept-bodyinit-extract - * - * This function assumes that instance.body is present. - * - * @param Mixed instance Any options.body input - */ -function extractContentType(body) { - if (body === null) { - // body is null - return null; - } else if (typeof body === 'string') { - // body is string - return 'text/plain;charset=UTF-8'; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - return 'application/x-www-form-urlencoded;charset=UTF-8'; - } else if (isBlob(body)) { - // body is blob - return body.type || null; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return null; - } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - return null; - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - return null; - } else if (typeof body.getBoundary === 'function') { - // detect form data input from form-data module - return `multipart/form-data;boundary=${body.getBoundary()}`; - } else if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) { - // body is stream - // can't really do much about this - return null; - } else { - // Body constructor defaults other things to string - return 'text/plain;charset=UTF-8'; - } -} +var matchers = { -/** - * The Fetch Standard treats this as if "total bytes" is a property on the body. - * For us, we have to explicitly get it with a function. - * - * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes - * - * @param Body instance Instance of Body - * @return Number? Number of bytes, or null if not possible - */ -function getTotalBytes(instance) { - const body = instance.body; - - - if (body === null) { - // body is null - return 0; - } else if (isBlob(body)) { - return body.size; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return body.length; - } else if (body && typeof body.getLengthSync === 'function') { - // detect form data input from form-data module - if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x - body.hasKnownLength && body.hasKnownLength()) { - // 2.x - return body.getLengthSync(); - } - return null; - } else { - // body is stream - return null; - } -} - -/** - * Write a Body to a Node.js WritableStream (e.g. http.Request) object. - * - * @param Body instance Instance of Body - * @return Void - */ -function writeToStream(dest, instance) { - const body = instance.body; + '$elemMatch': function (doc, userValue, parsedField, docFieldValue) { + if (!Array.isArray(docFieldValue)) { + return false; + } + if (docFieldValue.length === 0) { + return false; + } - if (body === null) { - // body is null - dest.end(); - } else if (isBlob(body)) { - body.stream().pipe(dest); - } else if (Buffer.isBuffer(body)) { - // body is buffer - dest.write(body); - dest.end(); - } else { - // body is stream - body.pipe(dest); - } -} + if (typeof docFieldValue[0] === 'object') { + return docFieldValue.some(function (val) { + return rowFilter(val, userValue, Object.keys(userValue)); + }); + } -// expose Promise -Body.Promise = global.Promise; + return docFieldValue.some(function (val) { + return matchSelector(userValue, doc, parsedField, val); + }); + }, -/** - * headers.js - * - * Headers class offers convenient helpers - */ + '$allMatch': function (doc, userValue, parsedField, docFieldValue) { + if (!Array.isArray(docFieldValue)) { + return false; + } -const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; -const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + /* istanbul ignore next */ + if (docFieldValue.length === 0) { + return false; + } -function validateName(name) { - name = `${name}`; - if (invalidTokenRegex.test(name) || name === '') { - throw new TypeError(`${name} is not a legal HTTP header name`); - } -} + if (typeof docFieldValue[0] === 'object') { + return docFieldValue.every(function (val) { + return rowFilter(val, userValue, Object.keys(userValue)); + }); + } -function validateValue(value) { - value = `${value}`; - if (invalidHeaderCharRegex.test(value)) { - throw new TypeError(`${value} is not a legal HTTP header value`); - } -} + return docFieldValue.every(function (val) { + return matchSelector(userValue, doc, parsedField, val); + }); + }, -/** - * Find the key in the map object given a header name. - * - * Returns undefined if not found. - * - * @param String name Header name - * @return String|Undefined - */ -function find(map, name) { - name = name.toLowerCase(); - for (const key in map) { - if (key.toLowerCase() === name) { - return key; - } - } - return undefined; -} + '$eq': function (doc, userValue, parsedField, docFieldValue) { + return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) === 0; + }, -const MAP = Symbol('map'); -class Headers { - /** - * Headers class - * - * @param Object headers Response headers - * @return Void - */ - constructor() { - let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; + '$gte': function (doc, userValue, parsedField, docFieldValue) { + return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) >= 0; + }, - this[MAP] = Object.create(null); + '$gt': function (doc, userValue, parsedField, docFieldValue) { + return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) > 0; + }, - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); + '$lte': function (doc, userValue, parsedField, docFieldValue) { + return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) <= 0; + }, - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } + '$lt': function (doc, userValue, parsedField, docFieldValue) { + return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) < 0; + }, - return; - } + '$exists': function (doc, userValue, parsedField, docFieldValue) { + //a field that is null is still considered to exist + if (userValue) { + return fieldIsNotUndefined(docFieldValue); + } - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } + return !fieldIsNotUndefined(docFieldValue); + }, - // sequence<sequence<ByteString>> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } + '$mod': function (doc, userValue, parsedField, docFieldValue) { + return fieldExists(docFieldValue) && modField(docFieldValue, userValue); + }, - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record<ByteString, ByteString> - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } + '$ne': function (doc, userValue, parsedField, docFieldValue) { + return userValue.every(function (neValue) { + return Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, neValue) !== 0; + }); + }, + '$in': function (doc, userValue, parsedField, docFieldValue) { + return fieldExists(docFieldValue) && arrayContainsValue(docFieldValue, userValue); + }, - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } + '$nin': function (doc, userValue, parsedField, docFieldValue) { + return fieldExists(docFieldValue) && !arrayContainsValue(docFieldValue, userValue); + }, - return this[MAP][key].join(', '); - } + '$size': function (doc, userValue, parsedField, docFieldValue) { + return fieldExists(docFieldValue) && arraySize(docFieldValue, userValue); + }, - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + '$all': function (doc, userValue, parsedField, docFieldValue) { + return Array.isArray(docFieldValue) && arrayContainsAllValues(docFieldValue, userValue); + }, - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; + '$regex': function (doc, userValue, parsedField, docFieldValue) { + return fieldExists(docFieldValue) && regexMatch(docFieldValue, userValue); + }, - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } + '$type': function (doc, userValue, parsedField, docFieldValue) { + return typeMatch(docFieldValue, userValue); + } +}; - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } +// return true if the given doc matches the supplied selector +function matchesSelector(doc, selector) { + /* istanbul ignore if */ + if (typeof selector !== 'object') { + // match the CouchDB error message + throw new Error('Selector error: expected a JSON object'); + } - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } + selector = massageSelector(selector); + var row = { + 'doc': doc + }; - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } + var rowsMatched = filterInMemoryFields([row], { 'selector': selector }, Object.keys(selector)); + return rowsMatched && rowsMatched.length === 1; +} - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } +/***/ }), +/* 520 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "collate", function() { return collate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeKey", function() { return normalizeKey; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toIndexableString", function() { return toIndexableString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseIndexableString", function() { return parseIndexableString; }); +function pad(str, padWith, upToLength) { + var padding = ''; + var targetLength = upToLength - str.length; + /* istanbul ignore next */ + while (padding.length < targetLength) { + padding += padWith; + } + return padding; } -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); +function padLeft(str, padWith, upToLength) { + var padding = pad(str, padWith, upToLength); + return padding + str; +} -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); +var MIN_MAGNITUDE = -324; // verified by -Number.MIN_VALUE +var MAGNITUDE_DIGITS = 3; // ditto +var SEP = ''; // set to '_' for easier debugging -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; +function collate(a, b) { - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} + if (a === b) { + return 0; + } -const INTERNAL = Symbol('internal'); + a = normalizeKey(a); + b = normalizeKey(b); -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; + var ai = collationIndex(a); + var bi = collationIndex(b); + if ((ai - bi) !== 0) { + return ai - bi; + } + switch (typeof a) { + case 'number': + return a - b; + case 'boolean': + return a < b ? -1 : 1; + case 'string': + return stringCollate(a, b); + } + return Array.isArray(a) ? arrayCollate(a, b) : objectCollate(a, b); } -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } - - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; +// couch considers null/NaN/Infinity/-Infinity === undefined, +// for the purposes of mapreduce indexes. also, dates get stringified. +function normalizeKey(key) { + switch (typeof key) { + case 'undefined': + return null; + case 'number': + if (key === Infinity || key === -Infinity || isNaN(key)) { + return null; + } + return key; + case 'object': + var origKey = key; + if (Array.isArray(key)) { + var len = key.length; + key = new Array(len); + for (var i = 0; i < len; i++) { + key[i] = normalizeKey(origKey[i]); + } + /* istanbul ignore next */ + } else if (key instanceof Date) { + return key.toJSON(); + } else if (key !== null) { // generic object + key = {}; + for (var k in origKey) { + if (origKey.hasOwnProperty(k)) { + var val = origKey[k]; + if (typeof val !== 'undefined') { + key[k] = normalizeKey(val); + } + } + } + } + } + return key; +} - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } +function indexify(key) { + if (key !== null) { + switch (typeof key) { + case 'boolean': + return key ? 1 : 0; + case 'number': + return numToIndexableString(key); + case 'string': + // We've to be sure that key does not contain \u0000 + // Do order-preserving replacements: + // 0 -> 1, 1 + // 1 -> 1, 2 + // 2 -> 2, 2 + /* eslint-disable no-control-regex */ + return key + .replace(/\u0002/g, '\u0002\u0002') + .replace(/\u0001/g, '\u0001\u0002') + .replace(/\u0000/g, '\u0001\u0001'); + /* eslint-enable no-control-regex */ + case 'object': + var isArray = Array.isArray(key); + var arr = isArray ? key : Object.keys(key); + var i = -1; + var len = arr.length; + var result = ''; + if (isArray) { + while (++i < len) { + result += toIndexableString(arr[i]); + } + } else { + while (++i < len) { + var objKey = arr[i]; + result += toIndexableString(objKey) + + toIndexableString(key[objKey]); + } + } + return result; + } + } + return ''; +} - this[INTERNAL].index = index + 1; +// convert the given key to a string that would be appropriate +// for lexical sorting, e.g. within a database, where the +// sorting is the same given by the collate() function. +function toIndexableString(key) { + var zero = '\u0000'; + key = normalizeKey(key); + return collationIndex(key) + SEP + indexify(key) + zero; +} - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); +function parseNumber(str, i) { + var originalIdx = i; + var num; + var zero = str[i] === '1'; + if (zero) { + num = 0; + i++; + } else { + var neg = str[i] === '0'; + i++; + var numAsString = ''; + var magAsString = str.substring(i, i + MAGNITUDE_DIGITS); + var magnitude = parseInt(magAsString, 10) + MIN_MAGNITUDE; + /* istanbul ignore next */ + if (neg) { + magnitude = -magnitude; + } + i += MAGNITUDE_DIGITS; + while (true) { + var ch = str[i]; + if (ch === '\u0000') { + break; + } else { + numAsString += ch; + } + i++; + } + numAsString = numAsString.split('.'); + if (numAsString.length === 1) { + num = parseInt(numAsString, 10); + } else { + /* istanbul ignore next */ + num = parseFloat(numAsString[0] + '.' + numAsString[1]); + } + /* istanbul ignore next */ + if (neg) { + num = num - 10; + } + /* istanbul ignore next */ + if (magnitude !== 0) { + // parseFloat is more reliable than pow due to rounding errors + // e.g. Number.MAX_VALUE would return Infinity if we did + // num * Math.pow(10, magnitude); + num = parseFloat(num + 'e' + magnitude); + } + } + return {num: num, length : i - originalIdx}; +} -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); +// move up the stack while parsing +// this function moved outside of parseIndexableString for performance +function pop(stack, metaStack) { + var obj = stack.pop(); -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); + if (metaStack.length) { + var lastMetaElement = metaStack[metaStack.length - 1]; + if (obj === lastMetaElement.element) { + // popping a meta-element, e.g. an object whose value is another object + metaStack.pop(); + lastMetaElement = metaStack[metaStack.length - 1]; + } + var element = lastMetaElement.element; + var lastElementIndex = lastMetaElement.index; + if (Array.isArray(element)) { + element.push(obj); + } else if (lastElementIndex === stack.length - 2) { // obj with key+value + var key = stack.pop(); + element[key] = obj; + } else { + stack.push(obj); // obj with key only + } + } +} - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } +function parseIndexableString(str) { + var stack = []; + var metaStack = []; // stack for arrays and objects + var i = 0; - return obj; + /*eslint no-constant-condition: ["error", { "checkLoops": false }]*/ + while (true) { + var collationIndex = str[i++]; + if (collationIndex === '\u0000') { + if (stack.length === 1) { + return stack.pop(); + } else { + pop(stack, metaStack); + continue; + } + } + switch (collationIndex) { + case '1': + stack.push(null); + break; + case '2': + stack.push(str[i] === '1'); + i++; + break; + case '3': + var parsedNum = parseNumber(str, i); + stack.push(parsedNum.num); + i += parsedNum.length; + break; + case '4': + var parsedStr = ''; + /*eslint no-constant-condition: ["error", { "checkLoops": false }]*/ + while (true) { + var ch = str[i]; + if (ch === '\u0000') { + break; + } + parsedStr += ch; + i++; + } + // perform the reverse of the order-preserving replacement + // algorithm (see above) + /* eslint-disable no-control-regex */ + parsedStr = parsedStr.replace(/\u0001\u0001/g, '\u0000') + .replace(/\u0001\u0002/g, '\u0001') + .replace(/\u0002\u0002/g, '\u0002'); + /* eslint-enable no-control-regex */ + stack.push(parsedStr); + break; + case '5': + var arrayElement = { element: [], index: stack.length }; + stack.push(arrayElement.element); + metaStack.push(arrayElement); + break; + case '6': + var objElement = { element: {}, index: stack.length }; + stack.push(objElement.element); + metaStack.push(objElement); + break; + /* istanbul ignore next */ + default: + throw new Error( + 'bad collationIndex or unexpectedly reached end of input: ' + + collationIndex); + } + } } -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; +function arrayCollate(a, b) { + var len = Math.min(a.length, b.length); + for (var i = 0; i < len; i++) { + var sort = collate(a[i], b[i]); + if (sort !== 0) { + return sort; + } + } + return (a.length === b.length) ? 0 : + (a.length > b.length) ? 1 : -1; } +function stringCollate(a, b) { + // See: https://github.com/daleharvey/pouchdb/issues/40 + // This is incompatible with the CouchDB implementation, but its the + // best we can do for now + return (a === b) ? 0 : ((a > b) ? 1 : -1); +} +function objectCollate(a, b) { + var ak = Object.keys(a), bk = Object.keys(b); + var len = Math.min(ak.length, bk.length); + for (var i = 0; i < len; i++) { + // First sort the keys + var sort = collate(ak[i], bk[i]); + if (sort !== 0) { + return sort; + } + // if the keys are equal sort the values + sort = collate(a[ak[i]], b[bk[i]]); + if (sort !== 0) { + return sort; + } -const INTERNALS$1 = Symbol('Response internals'); - -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http__WEBPACK_IMPORTED_MODULE_1__.STATUS_CODES; + } + return (ak.length === bk.length) ? 0 : + (ak.length > bk.length) ? 1 : -1; +} +// The collation is defined by erlangs ordered terms +// the atoms null, true, false come first, then numbers, strings, +// arrays, then objects +// null/undefined/NaN/Infinity/-Infinity are all considered null +function collationIndex(x) { + var id = ['boolean', 'number', 'string', 'object']; + var idx = id.indexOf(typeof x); + //false if -1 otherwise true, but fast!!!!1 + if (~idx) { + if (x === null) { + return 1; + } + if (Array.isArray(x)) { + return 5; + } + return idx < 3 ? (idx + 2) : (idx + 3); + } + /* istanbul ignore next */ + if (Array.isArray(x)) { + return 5; + } +} -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +// conversion: +// x yyy zz...zz +// x = 0 for negative, 1 for 0, 2 for positive +// y = exponent (for negative numbers negated) moved so that it's >= 0 +// z = mantisse +function numToIndexableString(num) { - Body.call(this, body, opts); + if (num === 0) { + return '1'; + } - const status = opts.status || 200; - const headers = new Headers(opts.headers); + // convert number to exponential format for easier and + // more succinct string sorting + var expFormat = num.toExponential().split(/e\+?/); + var magnitude = parseInt(expFormat[1], 10); - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } + var neg = num < 0; - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } + var result = neg ? '0' : '2'; - get url() { - return this[INTERNALS$1].url || ''; - } + // first sort by magnitude + // it's easier if all magnitudes are positive + var magForComparison = ((neg ? -magnitude : magnitude) - MIN_MAGNITUDE); + var magString = padLeft((magForComparison).toString(), '0', MAGNITUDE_DIGITS); - get status() { - return this[INTERNALS$1].status; - } + result += SEP + magString; - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } + // then sort by the factor + var factor = Math.abs(parseFloat(expFormat[0])); // [1..10) + /* istanbul ignore next */ + if (neg) { // for negative reverse ordering + factor = 10 - factor; + } - get redirected() { - return this[INTERNALS$1].counter > 0; - } + var factorStr = factor.toFixed(20); - get statusText() { - return this[INTERNALS$1].statusText; - } + // strip zeros from the end + factorStr = factorStr.replace(/\.?0+$/, ''); - get headers() { - return this[INTERNALS$1].headers; - } + result += SEP + factorStr; - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } + return result; } -Body.mixIn(Response.prototype); -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); -const INTERNALS$2 = Symbol('Request internals'); +/***/ }), +/* 521 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = url__WEBPACK_IMPORTED_MODULE_2__.parse; -const format_url = url__WEBPACK_IMPORTED_MODULE_2__.format; +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(507); +/* harmony import */ var pouchdb_md5__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(515); +/* harmony import */ var pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(509); +/* harmony import */ var pouchdb_binary_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(522); +/* harmony import */ var pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(520); +/* harmony import */ var pouchdb_errors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(512); +/* harmony import */ var pouchdb_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(516); +/* harmony import */ var pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(524); -const streamDestructionSupported = 'destroy' in stream__WEBPACK_IMPORTED_MODULE_0__.Readable.prototype; -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - let parsedURL; - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parse_url(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); - } - input = {}; - } else { - parsedURL = parse_url(input.url); - } - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; +/* + * Simple task queue to sequentialize actions. Assumes + * callbacks will eventually fire (once). + */ - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); - const headers = new Headers(init.headers || input.headers || {}); +function TaskQueue() { + this.promise = new Promise(function (fulfill) {fulfill(); }); +} +TaskQueue.prototype.add = function (promiseFactory) { + this.promise = this.promise.catch(function () { + // just recover + }).then(function () { + return promiseFactory(); + }); + return this.promise; +}; +TaskQueue.prototype.finish = function () { + return this.promise; +}; - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } +function stringify(input) { + if (!input) { + return 'undefined'; // backwards compat for empty reduce + } + // for backwards compat with mapreduce, functions/strings are stringified + // as-is. everything else is JSON-stringified. + switch (typeof input) { + case 'function': + // e.g. a mapreduce map + return input.toString(); + case 'string': + // e.g. a mapreduce built-in _reduce function + return input.toString(); + default: + // e.g. a JSON object in the case of mango queries + return JSON.stringify(input); + } +} - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; +/* create a string signature for a view so we can cache it and uniq it */ +function createViewSignature(mapFun, reduceFun) { + // the "undefined" part is for backwards compatibility + return stringify(mapFun) + stringify(reduceFun) + 'undefined'; +} - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } - - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } - - get method() { - return this[INTERNALS$2].method; - } +function createView(sourceDB, viewName, mapFun, reduceFun, temporary, localDocName) { + var viewSignature = createViewSignature(mapFun, reduceFun); - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } + var cachedViews; + if (!temporary) { + // cache this to ensure we don't try to update the same view twice + cachedViews = sourceDB._cachedViews = sourceDB._cachedViews || {}; + if (cachedViews[viewSignature]) { + return cachedViews[viewSignature]; + } + } - get headers() { - return this[INTERNALS$2].headers; - } + var promiseForView = sourceDB.info().then(function (info) { - get redirect() { - return this[INTERNALS$2].redirect; - } + var depDbName = info.db_name + '-mrview-' + + (temporary ? 'temp' : Object(pouchdb_md5__WEBPACK_IMPORTED_MODULE_1__["stringMd5"])(viewSignature)); - get signal() { - return this[INTERNALS$2].signal; - } + // save the view name in the source db so it can be cleaned up if necessary + // (e.g. when the _design doc is deleted, remove all associated view data) + function diffFunction(doc) { + doc.views = doc.views || {}; + var fullViewName = viewName; + if (fullViewName.indexOf('/') === -1) { + fullViewName = viewName + '/' + viewName; + } + var depDbs = doc.views[fullViewName] = doc.views[fullViewName] || {}; + /* istanbul ignore if */ + if (depDbs[depDbName]) { + return; // no update necessary + } + depDbs[depDbName] = true; + return doc; + } + return Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["upsert"])(sourceDB, '_local/' + localDocName, diffFunction).then(function () { + return sourceDB.registerDependentDatabase(depDbName).then(function (res) { + var db = res.db; + db.auto_compaction = true; + var view = { + name: depDbName, + db: db, + sourceDB: sourceDB, + adapter: sourceDB.adapter, + mapFun: mapFun, + reduceFun: reduceFun + }; + return view.db.get('_local/lastSeq').catch(function (err) { + /* istanbul ignore if */ + if (err.status !== 404) { + throw err; + } + }).then(function (lastSeqDoc) { + view.seq = lastSeqDoc ? lastSeqDoc.seq : 0; + if (cachedViews) { + view.db.once('destroyed', function () { + delete cachedViews[viewSignature]; + }); + } + return view; + }); + }); + }); + }); - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } + if (cachedViews) { + cachedViews[viewSignature] = promiseForView; + } + return promiseForView; } -Body.mixIn(Request.prototype); - -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); - -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); - -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } - - if (request.signal && request.body instanceof stream__WEBPACK_IMPORTED_MODULE_0__.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } - - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } - - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } - - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } +var persistentQueues = {}; +var tempViewQueue = new TaskQueue(); +var CHANGES_BATCH_SIZE = 50; - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } +function parseViewName(name) { + // can be either 'ddocname/viewname' or just 'viewname' + // (where the ddoc name is the same) + return name.indexOf('/') === -1 ? [name, name] : name.split('/'); +} - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js +function isGenOne(changes) { + // only return true if the current change is 1- + // and there are no other leafs + return changes.length === 1 && /^1-/.test(changes[0].rev); +} - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); +function emitError(db, e) { + try { + db.emit('error', e); + } catch (err) { + Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["guardedConsole"])('error', + 'The user\'s map/reduce function threw an uncaught error.\n' + + 'You can debug this error by doing:\n' + + 'myDatabase.on(\'error\', function (err) { debugger; });\n' + + 'Please double-check your map/reduce function.'); + Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["guardedConsole"])('error', e); + } } /** - * abort-error.js + * Returns an "abstract" mapreduce object of the form: * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance + * { + * query: queryFun, + * viewCleanup: viewCleanupFun + * } * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} - -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = stream__WEBPACK_IMPORTED_MODULE_0__.PassThrough; -const resolve_url = url__WEBPACK_IMPORTED_MODULE_2__.resolve; - -/** - * Fetch function + * Arguments are: * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise + * localDoc: string + * This is for the local doc that gets saved in order to track the + * "dependent" DBs and clean them up for viewCleanup. It should be + * unique, so that indexer plugins don't collide with each other. + * mapper: function (mapFunDef, emit) + * Returns a map function based on the mapFunDef, which in the case of + * normal map/reduce is just the de-stringified function, but may be + * something else, such as an object in the case of pouchdb-find. + * reducer: function (reduceFunDef) + * Ditto, but for reducing. Modules don't have to support reducing + * (e.g. pouchdb-find). + * ddocValidator: function (ddoc, viewName) + * Throws an error if the ddoc or viewName is not valid. + * This could be a way to communicate to the user that the configuration for the + * indexer is invalid. */ -function fetch(url, opts) { +function createAbstractMapReduce(localDocName, mapper, reducer, ddocValidator) { - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } + function tryMap(db, fun, doc) { + // emit an event if there was an error thrown by a map function. + // putting try/catches in a single function also avoids deoptimizations. + try { + fun(doc); + } catch (e) { + emitError(db, e); + } + } - Body.Promise = fetch.Promise; + function tryReduce(db, fun, keys, values, rereduce) { + // same as above, but returning the result or an error. there are two separate + // functions to avoid extra memory allocations since the tryCode() case is used + // for custom map functions (common) vs this function, which is only used for + // custom reduce functions (rare) + try { + return {output : fun(keys, values, rereduce)}; + } catch (e) { + emitError(db, e); + return {error: e}; + } + } - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); + function sortByKeyThenValue(x, y) { + var keyCompare = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(x.key, y.key); + return keyCompare !== 0 ? keyCompare : Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(x.value, y.value); + } - const send = (options.protocol === 'https:' ? https__WEBPACK_IMPORTED_MODULE_3__ : http__WEBPACK_IMPORTED_MODULE_1__).request; - const signal = request.signal; + function sliceResults(results, limit, skip) { + skip = skip || 0; + if (typeof limit === 'number') { + return results.slice(skip, limit + skip); + } else if (skip > 0) { + return results.slice(skip); + } + return results; + } - let response = null; + function rowToDocId(row) { + var val = row.value; + // Users can explicitly specify a joined doc _id, or it + // defaults to the doc _id that emitted the key/value. + var docId = (val && typeof val === 'object' && val._id) || row.id; + return docId; + } - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof stream__WEBPACK_IMPORTED_MODULE_0__.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; + function readAttachmentsAsBlobOrBuffer(res) { + res.rows.forEach(function (row) { + var atts = row.doc && row.doc._attachments; + if (!atts) { + return; + } + Object.keys(atts).forEach(function (filename) { + var att = atts[filename]; + atts[filename].data = Object(pouchdb_binary_utils__WEBPACK_IMPORTED_MODULE_3__["base64StringToBlobOrBuffer"])(att.data, att.content_type); + }); + }); + } - if (signal && signal.aborted) { - abort(); - return; - } + function postprocessAttachments(opts) { + return function (res) { + if (opts.include_docs && opts.attachments && opts.binary) { + readAttachmentsAsBlobOrBuffer(res); + } + return res; + }; + } - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; + function addHttpParam(paramName, opts, params, asJson) { + // add an http param from opts to params, optionally json-encoded + var val = opts[paramName]; + if (typeof val !== 'undefined') { + if (asJson) { + val = encodeURIComponent(JSON.stringify(val)); + } + params.push(paramName + '=' + val); + } + } - // send request - const req = send(options); - let reqTimeout; + function coerceInteger(integerCandidate) { + if (typeof integerCandidate !== 'undefined') { + var asNumber = Number(integerCandidate); + // prevents e.g. '1foo' or '1.1' being coerced to 1 + if (!isNaN(asNumber) && asNumber === parseInt(integerCandidate, 10)) { + return asNumber; + } else { + return integerCandidate; + } + } + } - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } + function coerceOptions(opts) { + opts.group_level = coerceInteger(opts.group_level); + opts.limit = coerceInteger(opts.limit); + opts.skip = coerceInteger(opts.skip); + return opts; + } - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } + function checkPositiveInteger(number) { + if (number) { + if (typeof number !== 'number') { + return new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('Invalid value for integer: "' + + number + '"'); + } + if (number < 0) { + return new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('Invalid value for positive integer: ' + + '"' + number + '"'); + } + } + } - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } + function checkQueryParseError(options, fun) { + var startkeyName = options.descending ? 'endkey' : 'startkey'; + var endkeyName = options.descending ? 'startkey' : 'endkey'; - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); + if (typeof options[startkeyName] !== 'undefined' && + typeof options[endkeyName] !== 'undefined' && + Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(options[startkeyName], options[endkeyName]) > 0) { + throw new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('No rows can match your key range, ' + + 'reverse your start_key and end_key or set {descending : true}'); + } else if (fun.reduce && options.reduce !== false) { + if (options.include_docs) { + throw new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('{include_docs:true} is invalid for reduce'); + } else if (options.keys && options.keys.length > 1 && + !options.group && !options.group_level) { + throw new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('Multi-key fetches for reduce views must use ' + + '{group: true}'); + } + } + ['group_level', 'limit', 'skip'].forEach(function (optionName) { + var error = checkPositiveInteger(options[optionName]); + if (error) { + throw error; + } + }); + } - req.on('response', function (res) { - clearTimeout(reqTimeout); + function httpQuery(db, fun, opts) { + // List of parameters to add to the PUT request + var params = []; + var body; + var method = 'GET'; + var ok, status; - const headers = createHeadersLenient(res.headers); + // If opts.reduce exists and is defined, then add it to the list + // of parameters. + // If reduce=false then the results are that of only the map function + // not the final result of map and reduce. + addHttpParam('reduce', opts, params); + addHttpParam('include_docs', opts, params); + addHttpParam('attachments', opts, params); + addHttpParam('limit', opts, params); + addHttpParam('descending', opts, params); + addHttpParam('group', opts, params); + addHttpParam('group_level', opts, params); + addHttpParam('skip', opts, params); + addHttpParam('stale', opts, params); + addHttpParam('conflicts', opts, params); + addHttpParam('startkey', opts, params, true); + addHttpParam('start_key', opts, params, true); + addHttpParam('endkey', opts, params, true); + addHttpParam('end_key', opts, params, true); + addHttpParam('inclusive_end', opts, params); + addHttpParam('key', opts, params, true); + addHttpParam('update_seq', opts, params); - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); + // Format the list of parameters into a valid URI query string + params = params.join('&'); + params = params === '' ? '' : '?' + params; - // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); + // If keys are supplied, issue a POST to circumvent GET query string limits + // see http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options + if (typeof opts.keys !== 'undefined') { + var MAX_URL_LENGTH = 2000; + // according to http://stackoverflow.com/a/417184/680742, + // the de facto URL length limit is 2000 characters - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } + var keysAsString = + 'keys=' + encodeURIComponent(JSON.stringify(opts.keys)); + if (keysAsString.length + params.length + 1 <= MAX_URL_LENGTH) { + // If the keys are short enough, do a GET. we do this to work around + // Safari not understanding 304s on POSTs (see pouchdb/pouchdb#1239) + params += (params[0] === '?' ? '&' : '?') + keysAsString; + } else { + method = 'POST'; + if (typeof fun === 'string') { + body = {keys: opts.keys}; + } else { // fun is {map : mapfun}, so append to this + fun.keys = opts.keys; + } + } + } - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } + // We are referencing a query defined in the design doc + if (typeof fun === 'string') { + var parts = parseViewName(fun); + return db.fetch('_design/' + parts[0] + '/_view/' + parts[1] + params, { + headers: new pouchdb_fetch__WEBPACK_IMPORTED_MODULE_6__["Headers"]({'Content-Type': 'application/json'}), + method: method, + body: JSON.stringify(body) + }).then(function (response) { + ok = response.ok; + status = response.status; + return response.json(); + }).then(function (result) { + if (!ok) { + result.status = status; + throw Object(pouchdb_errors__WEBPACK_IMPORTED_MODULE_5__["generateErrorFromResponse"])(result); + } + // fail the entire request if the result contains an error + result.rows.forEach(function (row) { + /* istanbul ignore if */ + if (row.value && row.value.error && row.value.error === "builtin_reduce_error") { + throw new Error(row.reason); + } + }); + return result; + }).then(postprocessAttachments(opts)); + } - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; + // We are using a temporary view, terrible for performance, good for testing + body = body || {}; + Object.keys(fun).forEach(function (key) { + if (Array.isArray(fun[key])) { + body[key] = fun[key]; + } else { + body[key] = fun[key].toString(); + } + }); - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } + return db.fetch('_temp_view' + params, { + headers: new pouchdb_fetch__WEBPACK_IMPORTED_MODULE_6__["Headers"]({'Content-Type': 'application/json'}), + method: 'POST', + body: JSON.stringify(body) + }).then(function (response) { + ok = response.ok; + status = response.status; + return response.json(); + }).then(function (result) { + if (!ok) { + result.status = status; + throw Object(pouchdb_errors__WEBPACK_IMPORTED_MODULE_5__["generateErrorFromResponse"])(result); + } + return result; + }).then(postprocessAttachments(opts)); + } - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } + // custom adapters can define their own api._query + // and override the default behavior + /* istanbul ignore next */ + function customQuery(db, fun, opts) { + return new Promise(function (resolve, reject) { + db._query(fun, opts, function (err, res) { + if (err) { + return reject(err); + } + resolve(res); + }); + }); + } - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } + // custom adapters can define their own api._viewCleanup + // and override the default behavior + /* istanbul ignore next */ + function customViewCleanup(db) { + return new Promise(function (resolve, reject) { + db._viewCleanup(function (err, res) { + if (err) { + return reject(err); + } + resolve(res); + }); + }); + } - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); + function defaultsTo(value) { + return function (reason) { + /* istanbul ignore else */ + if (reason.status === 404) { + return value; + } else { + throw reason; + } + }; + } - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; + // returns a promise for a list of docs to update, based on the input docId. + // the order doesn't matter, because post-3.2.0, bulkDocs + // is an atomic operation in all three adapters. + function getDocsToPersist(docId, view, docIdsToChangesAndEmits) { + var metaDocId = '_local/doc_' + docId; + var defaultMetaDoc = {_id: metaDocId, keys: []}; + var docData = docIdsToChangesAndEmits.get(docId); + var indexableKeysToKeyValues = docData[0]; + var changes = docData[1]; - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); + function getMetaDoc() { + if (isGenOne(changes)) { + // generation 1, so we can safely assume initial state + // for performance reasons (avoids unnecessary GETs) + return Promise.resolve(defaultMetaDoc); + } + return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc)); + } - // HTTP-network fetch step 12.1.1.4: handle content codings + function getKeyValueDocs(metaDoc) { + if (!metaDoc.keys.length) { + // no keys, no need for a lookup + return Promise.resolve({rows: []}); + } + return view.db.allDocs({ + keys: metaDoc.keys, + include_docs: true + }); + } - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } + function processKeyValueDocs(metaDoc, kvDocsRes) { + var kvDocs = []; + var oldKeys = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Set"](); - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib__WEBPACK_IMPORTED_MODULE_4__.Z_SYNC_FLUSH, - finishFlush: zlib__WEBPACK_IMPORTED_MODULE_4__.Z_SYNC_FLUSH - }; + for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) { + var row = kvDocsRes.rows[i]; + var doc = row.doc; + if (!doc) { // deleted + continue; + } + kvDocs.push(doc); + oldKeys.add(doc._id); + doc._deleted = !indexableKeysToKeyValues.has(doc._id); + if (!doc._deleted) { + var keyValue = indexableKeysToKeyValues.get(doc._id); + if ('value' in keyValue) { + doc.value = keyValue.value; + } + } + } + var newKeys = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["mapToKeysArray"])(indexableKeysToKeyValues); + newKeys.forEach(function (key) { + if (!oldKeys.has(key)) { + // new doc + var kvDoc = { + _id: key + }; + var keyValue = indexableKeysToKeyValues.get(key); + if ('value' in keyValue) { + kvDoc.value = keyValue.value; + } + kvDocs.push(kvDoc); + } + }); + metaDoc.keys = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["uniq"])(newKeys.concat(metaDoc.keys)); + kvDocs.push(metaDoc); - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } + return kvDocs; + } - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createInflate()); - } else { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } + return getMetaDoc().then(function (metaDoc) { + return getKeyValueDocs(metaDoc).then(function (kvDocsRes) { + return processKeyValueDocs(metaDoc, kvDocsRes); + }); + }); + } - // for br - if (codings == 'br' && typeof zlib__WEBPACK_IMPORTED_MODULE_4__.createBrotliDecompress === 'function') { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } + // updates all emitted key/value docs and metaDocs in the mrview database + // for the given batch of documents from the source database + function saveKeyValues(view, docIdsToChangesAndEmits, seq) { + var seqDocId = '_local/lastSeq'; + return view.db.get(seqDocId) + .catch(defaultsTo({_id: seqDocId, seq: 0})) + .then(function (lastSeqDoc) { + var docIds = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["mapToKeysArray"])(docIdsToChangesAndEmits); + return Promise.all(docIds.map(function (docId) { + return getDocsToPersist(docId, view, docIdsToChangesAndEmits); + })).then(function (listOfDocsToPersist) { + var docsToPersist = Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(listOfDocsToPersist); + lastSeqDoc.seq = seq; + docsToPersist.push(lastSeqDoc); + // write all docs in a single operation, update the seq once + return view.db.bulkDocs({docs : docsToPersist}); + }); + }); + } - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); + function getQueue(view) { + var viewName = typeof view === 'string' ? view : view.name; + var queue = persistentQueues[viewName]; + if (!queue) { + queue = persistentQueues[viewName] = new TaskQueue(); + } + return queue; + } - writeToStream(req, request); - }); -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; + function updateView(view) { + return Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["sequentialize"])(getQueue(view), function () { + return updateViewInQueue(view); + })(); + } -// expose Promise -fetch.Promise = global.Promise; + function updateViewInQueue(view) { + // bind the emit function once + var mapResults; + var doc; -/* harmony default export */ __webpack_exports__["default"] = (fetch); + function emit(key, value) { + var output = {id: doc._id, key: Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["normalizeKey"])(key)}; + // Don't explicitly store the value unless it's defined and non-null. + // This saves on storage space, because often people don't use it. + if (typeof value !== 'undefined' && value !== null) { + output.value = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["normalizeKey"])(value); + } + mapResults.push(output); + } + var mapFun = mapper(view.mapFun, emit); + var currentSeq = view.seq || 0; -/***/ }), -/* 518 */ -/***/ (function(module, exports, __webpack_require__) { + function processChange(docIdsToChangesAndEmits, seq) { + return function () { + return saveKeyValues(view, docIdsToChangesAndEmits, seq); + }; + } -var denodeify = __webpack_require__(519)(Promise) -var tough = __webpack_require__(81) + var queue = new TaskQueue(); -module.exports = function fetchCookieDecorator (fetch, jar) { - fetch = fetch || window.fetch - jar = jar || new tough.CookieJar() + function processNextBatch() { + return view.sourceDB.changes({ + return_docs: true, + conflicts: true, + include_docs: true, + style: 'all_docs', + since: currentSeq, + limit: CHANGES_BATCH_SIZE + }).then(processBatch); + } - var getCookieString = denodeify(jar.getCookieString.bind(jar)) - var setCookie = denodeify(jar.setCookie.bind(jar)) + function processBatch(response) { + var results = response.results; + if (!results.length) { + return; + } + var docIdsToChangesAndEmits = createDocIdsToChangesAndEmits(results); + queue.add(processChange(docIdsToChangesAndEmits, currentSeq)); + if (results.length < CHANGES_BATCH_SIZE) { + return; + } + return processNextBatch(); + } - return function fetchCookie (url, opts) { - opts = opts || {} + function createDocIdsToChangesAndEmits(results) { + var docIdsToChangesAndEmits = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Map"](); + for (var i = 0, len = results.length; i < len; i++) { + var change = results[i]; + if (change.doc._id[0] !== '_') { + mapResults = []; + doc = change.doc; - return getCookieString(url) - .then(function (cookie) { - return fetch(url, Object.assign(opts, { - headers: Object.assign(opts.headers || {}, (cookie ? { cookie: cookie } : {})) - })) - }) - .then(function (res) { - var cookies + if (!doc._deleted) { + tryMap(view.sourceDB, mapFun, doc); + } + mapResults.sort(sortByKeyThenValue); - if (res.headers.getAll) { - // node-fetch v1 - cookies = res.headers.getAll('set-cookie') - } else { - // node-fetch v2 - var cookie = res.headers.get('set-cookie') - cookies = cookie && cookie.split(',') || [] + var indexableKeysToKeyValues = createIndexableKeysToKeyValues(mapResults); + docIdsToChangesAndEmits.set(change.doc._id, [ + indexableKeysToKeyValues, + change.changes + ]); } + currentSeq = change.seq; + } + return docIdsToChangesAndEmits; + } - if (!cookies.length) { - return res + function createIndexableKeysToKeyValues(mapResults) { + var indexableKeysToKeyValues = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Map"](); + var lastKey; + for (var i = 0, len = mapResults.length; i < len; i++) { + var emittedKeyValue = mapResults[i]; + var complexKey = [emittedKeyValue.key, emittedKeyValue.id]; + if (i > 0 && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(emittedKeyValue.key, lastKey) === 0) { + complexKey.push(i); // dup key+id, so make it unique } + indexableKeysToKeyValues.set(Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])(complexKey), emittedKeyValue); + lastKey = emittedKeyValue.key; + } + return indexableKeysToKeyValues; + } - return Promise.all(cookies.map(function (cookie) { - return setCookie(cookie, res.url) - })).then(function () { - return res - }) - }) + return processNextBatch().then(function () { + return queue.finish(); + }).then(function () { + view.seq = currentSeq; + }); } -} - -/***/ }), -/* 519 */ -/***/ (function(module, exports, __webpack_require__) { + function reduceView(view, results, options) { + if (options.group_level === 0) { + delete options.group_level; + } -"use strict"; + var shouldGroup = options.group || options.group_level; + var reduceFun = reducer(view.reduceFun); -Object.defineProperty(exports, "__esModule", { - value: true -}); + var groups = []; + var lvl = isNaN(options.group_level) ? Number.POSITIVE_INFINITY : + options.group_level; + results.forEach(function (e) { + var last = groups[groups.length - 1]; + var groupKey = shouldGroup ? e.key : null; -exports["default"] = function () { - var PromiseArg = arguments[0] === undefined ? Promise : arguments[0]; - return function (f) { - return function () { - for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; + // only set group_level for array keys + if (shouldGroup && Array.isArray(groupKey)) { + groupKey = groupKey.slice(0, lvl); } - return new PromiseArg(function (resolve, reject) { - return f.apply(undefined, args.concat([function (err, val) { - return err ? reject(err) : resolve(val); - }])); + if (last && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(last.groupKey, groupKey) === 0) { + last.keys.push([e.key, e.id]); + last.values.push(e.value); + return; + } + groups.push({ + keys: [[e.key, e.id]], + values: [e.value], + groupKey: groupKey }); - }; - }; -}; - -module.exports = exports["default"]; - - + }); + results = []; + for (var i = 0, len = groups.length; i < len; i++) { + var e = groups[i]; + var reduceTry = tryReduce(view.sourceDB, reduceFun, e.keys, e.values, false); + if (reduceTry.error && reduceTry.error instanceof pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["BuiltInError"]) { + // CouchDB returns an error if a built-in errors out + throw reduceTry.error; + } + results.push({ + // CouchDB just sets the value to null if a non-built-in errors out + value: reduceTry.error ? null : reduceTry.output, + key: e.groupKey + }); + } + // no total_rows/offset when reducing + return {rows: sliceResults(results, options.limit, options.skip)}; + } -/***/ }), -/* 520 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "massageSelector", function() { return massageSelector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "matchesSelector", function() { return matchesSelector; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "filterInMemoryFields", function() { return filterInMemoryFields; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createFieldSorter", function() { return createFieldSorter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rowFilter", function() { return rowFilter; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "isCombinationalField", function() { return isCombinationalField; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getKey", function() { return getKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getValue", function() { return getValue; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getFieldFromDoc", function() { return getFieldFromDoc; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "setFieldInDoc", function() { return setFieldInDoc; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compare", function() { return compare; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseField", function() { return parseField; }); -/* harmony import */ var pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(507); -/* harmony import */ var pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(521); - - - -// this would just be "return doc[field]", but fields -// can be "deep" due to dot notation -function getFieldFromDoc(doc, parsedField) { - var value = doc; - for (var i = 0, len = parsedField.length; i < len; i++) { - var key = parsedField[i]; - value = value[key]; - if (!value) { - break; - } - } - return value; -} - -function setFieldInDoc(doc, parsedField, value) { - for (var i = 0, len = parsedField.length; i < len-1; i++) { - var elem = parsedField[i]; - doc = doc[elem] = {}; + function queryView(view, opts) { + return Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["sequentialize"])(getQueue(view), function () { + return queryViewInQueue(view, opts); + })(); } - doc[parsedField[len-1]] = value; -} - -function compare(left, right) { - return left < right ? -1 : left > right ? 1 : 0; -} -// Converts a string in dot notation to an array of its components, with backslash escaping -function parseField(fieldName) { - // fields may be deep (e.g. "foo.bar.baz"), so parse - var fields = []; - var current = ''; - for (var i = 0, len = fieldName.length; i < len; i++) { - var ch = fieldName[i]; - if (ch === '.') { - if (i > 0 && fieldName[i - 1] === '\\') { // escaped delimiter - current = current.substring(0, current.length - 1) + '.'; - } else { // not escaped, so delimiter - fields.push(current); - current = ''; - } - } else { // normal character - current += ch; + function queryViewInQueue(view, opts) { + var totalRows; + var shouldReduce = view.reduceFun && opts.reduce !== false; + var skip = opts.skip || 0; + if (typeof opts.keys !== 'undefined' && !opts.keys.length) { + // equivalent query + opts.limit = 0; + delete opts.keys; } - } - fields.push(current); - return fields; -} - -var combinationFields = ['$or', '$nor', '$not']; -function isCombinationalField(field) { - return combinationFields.indexOf(field) > -1; -} - -function getKey(obj) { - return Object.keys(obj)[0]; -} - -function getValue(obj) { - return obj[getKey(obj)]; -} + function fetchFromView(viewOpts) { + viewOpts.include_docs = true; + return view.db.allDocs(viewOpts).then(function (res) { + totalRows = res.total_rows; + return res.rows.map(function (result) { -// flatten an array of selectors joined by an $and operator -function mergeAndedSelectors(selectors) { + // implicit migration - in older versions of PouchDB, + // we explicitly stored the doc as {id: ..., key: ..., value: ...} + // this is tested in a migration test + /* istanbul ignore next */ + if ('value' in result.doc && typeof result.doc.value === 'object' && + result.doc.value !== null) { + var keys = Object.keys(result.doc.value).sort(); + // this detection method is not perfect, but it's unlikely the user + // emitted a value which was an object with these 3 exact keys + var expectedKeys = ['id', 'key', 'value']; + if (!(keys < expectedKeys || keys > expectedKeys)) { + return result.doc.value; + } + } - // sort to ensure that e.g. if the user specified - // $and: [{$gt: 'a'}, {$gt: 'b'}], then it's collapsed into - // just {$gt: 'b'} - var res = {}; + var parsedKeyAndDocId = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["parseIndexableString"])(result.doc._id); + return { + key: parsedKeyAndDocId[0], + id: parsedKeyAndDocId[1], + value: ('value' in result.doc ? result.doc.value : null) + }; + }); + }); + } - selectors.forEach(function (selector) { - Object.keys(selector).forEach(function (field) { - var matcher = selector[field]; - if (typeof matcher !== 'object') { - matcher = {$eq: matcher}; + function onMapResultsReady(rows) { + var finalResults; + if (shouldReduce) { + finalResults = reduceView(view, rows, opts); + } else { + finalResults = { + total_rows: totalRows, + offset: skip, + rows: rows + }; + } + /* istanbul ignore if */ + if (opts.update_seq) { + finalResults.update_seq = view.seq; } + if (opts.include_docs) { + var docIds = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["uniq"])(rows.map(rowToDocId)); - if (isCombinationalField(field)) { - if (matcher instanceof Array) { - res[field] = matcher.map(function (m) { - return mergeAndedSelectors([m]); + return view.sourceDB.allDocs({ + keys: docIds, + include_docs: true, + conflicts: opts.conflicts, + attachments: opts.attachments, + binary: opts.binary + }).then(function (allDocsRes) { + var docIdsToDocs = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Map"](); + allDocsRes.rows.forEach(function (row) { + docIdsToDocs.set(row.id, row.doc); }); - } else { - res[field] = mergeAndedSelectors([matcher]); - } - } else { - var fieldMatchers = res[field] = res[field] || {}; - Object.keys(matcher).forEach(function (operator) { - var value = matcher[operator]; - - if (operator === '$gt' || operator === '$gte') { - return mergeGtGte(operator, value, fieldMatchers); - } else if (operator === '$lt' || operator === '$lte') { - return mergeLtLte(operator, value, fieldMatchers); - } else if (operator === '$ne') { - return mergeNe(value, fieldMatchers); - } else if (operator === '$eq') { - return mergeEq(value, fieldMatchers); - } - fieldMatchers[operator] = value; + rows.forEach(function (row) { + var docId = rowToDocId(row); + var doc = docIdsToDocs.get(docId); + if (doc) { + row.doc = doc; + } + }); + return finalResults; }); + } else { + return finalResults; } - }); - }); - - return res; -} - - + } -// collapse logically equivalent gt/gte values -function mergeGtGte(operator, value, fieldMatchers) { - if (typeof fieldMatchers.$eq !== 'undefined') { - return; // do nothing - } - if (typeof fieldMatchers.$gte !== 'undefined') { - if (operator === '$gte') { - if (value > fieldMatchers.$gte) { // more specificity - fieldMatchers.$gte = value; + if (typeof opts.keys !== 'undefined') { + var keys = opts.keys; + var fetchPromises = keys.map(function (key) { + var viewOpts = { + startkey : Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([key]), + endkey : Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([key, {}]) + }; + /* istanbul ignore if */ + if (opts.update_seq) { + viewOpts.update_seq = true; + } + return fetchFromView(viewOpts); + }); + return Promise.all(fetchPromises).then(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"]).then(onMapResultsReady); + } else { // normal query, no 'keys' + var viewOpts = { + descending : opts.descending + }; + /* istanbul ignore if */ + if (opts.update_seq) { + viewOpts.update_seq = true; } - } else { // operator === '$gt' - if (value >= fieldMatchers.$gte) { // more specificity - delete fieldMatchers.$gte; - fieldMatchers.$gt = value; + var startkey; + var endkey; + if ('start_key' in opts) { + startkey = opts.start_key; } - } - } else if (typeof fieldMatchers.$gt !== 'undefined') { - if (operator === '$gte') { - if (value > fieldMatchers.$gt) { // more specificity - delete fieldMatchers.$gt; - fieldMatchers.$gte = value; + if ('startkey' in opts) { + startkey = opts.startkey; } - } else { // operator === '$gt' - if (value > fieldMatchers.$gt) { // more specificity - fieldMatchers.$gt = value; + if ('end_key' in opts) { + endkey = opts.end_key; } - } - } else { - fieldMatchers[operator] = value; - } -} - -// collapse logically equivalent lt/lte values -function mergeLtLte(operator, value, fieldMatchers) { - if (typeof fieldMatchers.$eq !== 'undefined') { - return; // do nothing - } - if (typeof fieldMatchers.$lte !== 'undefined') { - if (operator === '$lte') { - if (value < fieldMatchers.$lte) { // more specificity - fieldMatchers.$lte = value; + if ('endkey' in opts) { + endkey = opts.endkey; } - } else { // operator === '$gt' - if (value <= fieldMatchers.$lte) { // more specificity - delete fieldMatchers.$lte; - fieldMatchers.$lt = value; + if (typeof startkey !== 'undefined') { + viewOpts.startkey = opts.descending ? + Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([startkey, {}]) : + Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([startkey]); } - } - } else if (typeof fieldMatchers.$lt !== 'undefined') { - if (operator === '$lte') { - if (value < fieldMatchers.$lt) { // more specificity - delete fieldMatchers.$lt; - fieldMatchers.$lte = value; + if (typeof endkey !== 'undefined') { + var inclusiveEnd = opts.inclusive_end !== false; + if (opts.descending) { + inclusiveEnd = !inclusiveEnd; + } + + viewOpts.endkey = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])( + inclusiveEnd ? [endkey, {}] : [endkey]); } - } else { // operator === '$gt' - if (value < fieldMatchers.$lt) { // more specificity - fieldMatchers.$lt = value; + if (typeof opts.key !== 'undefined') { + var keyStart = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([opts.key]); + var keyEnd = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([opts.key, {}]); + if (viewOpts.descending) { + viewOpts.endkey = keyStart; + viewOpts.startkey = keyEnd; + } else { + viewOpts.startkey = keyStart; + viewOpts.endkey = keyEnd; + } + } + if (!shouldReduce) { + if (typeof opts.limit === 'number') { + viewOpts.limit = opts.limit; + } + viewOpts.skip = skip; } + return fetchFromView(viewOpts).then(onMapResultsReady); } - } else { - fieldMatchers[operator] = value; - } -} - -// combine $ne values into one array -function mergeNe(value, fieldMatchers) { - if ('$ne' in fieldMatchers) { - // there are many things this could "not" be - fieldMatchers.$ne.push(value); - } else { // doesn't exist yet - fieldMatchers.$ne = [value]; } -} - -// add $eq into the mix -function mergeEq(value, fieldMatchers) { - // these all have less specificity than the $eq - // TODO: check for user errors here - delete fieldMatchers.$gt; - delete fieldMatchers.$gte; - delete fieldMatchers.$lt; - delete fieldMatchers.$lte; - delete fieldMatchers.$ne; - fieldMatchers.$eq = value; -} - -// -// normalize the selector -// -function massageSelector(input) { - var result = Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["clone"])(input); - var wasAnded = false; - if ('$and' in result) { - result = mergeAndedSelectors(result['$and']); - wasAnded = true; + function httpViewCleanup(db) { + return db.fetch('_view_cleanup', { + headers: new pouchdb_fetch__WEBPACK_IMPORTED_MODULE_6__["Headers"]({'Content-Type': 'application/json'}), + method: 'POST' + }).then(function (response) { + return response.json(); + }); } - ['$or', '$nor'].forEach(function (orOrNor) { - if (orOrNor in result) { - // message each individual selector - // e.g. {foo: 'bar'} becomes {foo: {$eq: 'bar'}} - result[orOrNor].forEach(function (subSelector) { - var fields = Object.keys(subSelector); - for (var i = 0; i < fields.length; i++) { - var field = fields[i]; - var matcher = subSelector[field]; - if (typeof matcher !== 'object' || matcher === null) { - subSelector[field] = {$eq: matcher}; - } + function localViewCleanup(db) { + return db.get('_local/' + localDocName).then(function (metaDoc) { + var docsToViews = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Map"](); + Object.keys(metaDoc.views).forEach(function (fullViewName) { + var parts = parseViewName(fullViewName); + var designDocName = '_design/' + parts[0]; + var viewName = parts[1]; + var views = docsToViews.get(designDocName); + if (!views) { + views = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Set"](); + docsToViews.set(designDocName, views); } + views.add(viewName); }); - } - }); - - if ('$not' in result) { - //This feels a little like forcing, but it will work for now, - //I would like to come back to this and make the merging of selectors a little more generic - result['$not'] = mergeAndedSelectors([result['$not']]); + var opts = { + keys : Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["mapToKeysArray"])(docsToViews), + include_docs : true + }; + return db.allDocs(opts).then(function (res) { + var viewsToStatus = {}; + res.rows.forEach(function (row) { + var ddocName = row.key.substring(8); // cuts off '_design/' + docsToViews.get(row.key).forEach(function (viewName) { + var fullViewName = ddocName + '/' + viewName; + /* istanbul ignore if */ + if (!metaDoc.views[fullViewName]) { + // new format, without slashes, to support PouchDB 2.2.0 + // migration test in pouchdb's browser.migration.js verifies this + fullViewName = viewName; + } + var viewDBNames = Object.keys(metaDoc.views[fullViewName]); + // design doc deleted, or view function nonexistent + var statusIsGood = row.doc && row.doc.views && + row.doc.views[viewName]; + viewDBNames.forEach(function (viewDBName) { + viewsToStatus[viewDBName] = + viewsToStatus[viewDBName] || statusIsGood; + }); + }); + }); + var dbsToDelete = Object.keys(viewsToStatus).filter( + function (viewDBName) { return !viewsToStatus[viewDBName]; }); + var destroyPromises = dbsToDelete.map(function (viewDBName) { + return Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["sequentialize"])(getQueue(viewDBName), function () { + return new db.constructor(viewDBName, db.__opts).destroy(); + })(); + }); + return Promise.all(destroyPromises).then(function () { + return {ok: true}; + }); + }); + }, defaultsTo({ok: true})); } - var fields = Object.keys(result); + function queryPromised(db, fun, opts) { + /* istanbul ignore next */ + if (typeof db._query === 'function') { + return customQuery(db, fun, opts); + } + if (Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["isRemote"])(db)) { + return httpQuery(db, fun, opts); + } - for (var i = 0; i < fields.length; i++) { - var field = fields[i]; - var matcher = result[field]; + if (typeof fun !== 'string') { + // temp_view + checkQueryParseError(opts, fun); - if (typeof matcher !== 'object' || matcher === null) { - matcher = {$eq: matcher}; - } else if ('$ne' in matcher && !wasAnded) { - // I put these in an array, since there may be more than one - // but in the "mergeAnded" operation, I already take care of that - matcher.$ne = [matcher.$ne]; - } - result[field] = matcher; - } + tempViewQueue.add(function () { + var createViewPromise = createView( + /* sourceDB */ db, + /* viewName */ 'temp_view/temp_view', + /* mapFun */ fun.map, + /* reduceFun */ fun.reduce, + /* temporary */ true, + /* localDocName */ localDocName); + return createViewPromise.then(function (view) { + return Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["fin"])(updateView(view).then(function () { + return queryView(view, opts); + }), function () { + return view.db.destroy(); + }); + }); + }); + return tempViewQueue.finish(); + } else { + // persistent view + var fullViewName = fun; + var parts = parseViewName(fullViewName); + var designDocName = parts[0]; + var viewName = parts[1]; + return db.get('_design/' + designDocName).then(function (doc) { + var fun = doc.views && doc.views[viewName]; - return result; -} + if (!fun) { + // basic validator; it's assumed that every subclass would want this + throw new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["NotFoundError"]('ddoc ' + doc._id + ' has no view named ' + + viewName); + } -// create a comparator based on the sort object -function createFieldSorter(sort) { + ddocValidator(doc, viewName); + checkQueryParseError(opts, fun); - function getFieldValuesAsArray(doc) { - return sort.map(function (sorting) { - var fieldName = getKey(sorting); - var parsedField = parseField(fieldName); - var docFieldValue = getFieldFromDoc(doc, parsedField); - return docFieldValue; - }); + var createViewPromise = createView( + /* sourceDB */ db, + /* viewName */ fullViewName, + /* mapFun */ fun.map, + /* reduceFun */ fun.reduce, + /* temporary */ false, + /* localDocName */ localDocName); + return createViewPromise.then(function (view) { + if (opts.stale === 'ok' || opts.stale === 'update_after') { + if (opts.stale === 'update_after') { + Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["nextTick"])(function () { + updateView(view); + }); + } + return queryView(view, opts); + } else { // stale not ok + return updateView(view).then(function () { + return queryView(view, opts); + }); + } + }); + }); + } } - return function (aRow, bRow) { - var aFieldValues = getFieldValuesAsArray(aRow.doc); - var bFieldValues = getFieldValuesAsArray(bRow.doc); - var collation = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(aFieldValues, bFieldValues); - if (collation !== 0) { - return collation; + function abstractQuery(fun, opts, callback) { + var db = this; + if (typeof opts === 'function') { + callback = opts; + opts = {}; } - // this is what mango seems to do - return compare(aRow.doc._id, bRow.doc._id); - }; -} - -function filterInMemoryFields(rows, requestDef, inMemoryFields) { - rows = rows.filter(function (row) { - return rowFilter(row.doc, requestDef.selector, inMemoryFields); - }); + opts = opts ? coerceOptions(opts) : {}; - if (requestDef.sort) { - // in-memory sort - var fieldSorter = createFieldSorter(requestDef.sort); - rows = rows.sort(fieldSorter); - if (typeof requestDef.sort[0] !== 'string' && - getValue(requestDef.sort[0]) === 'desc') { - rows = rows.reverse(); + if (typeof fun === 'function') { + fun = {map : fun}; } - } - if ('limit' in requestDef || 'skip' in requestDef) { - // have to do the limit in-memory - var skip = requestDef.skip || 0; - var limit = ('limit' in requestDef ? requestDef.limit : rows.length) + skip; - rows = rows.slice(skip, limit); + var promise = Promise.resolve().then(function () { + return queryPromised(db, fun, opts); + }); + Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["promisedCallback"])(promise, callback); + return promise; } - return rows; -} -function rowFilter(doc, selector, inMemoryFields) { - return inMemoryFields.every(function (field) { - var matcher = selector[field]; - var parsedField = parseField(field); - var docFieldValue = getFieldFromDoc(doc, parsedField); - if (isCombinationalField(field)) { - return matchCominationalSelector(field, matcher, doc); + var abstractViewCleanup = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["callbackify"])(function () { + var db = this; + /* istanbul ignore next */ + if (typeof db._viewCleanup === 'function') { + return customViewCleanup(db); } - - return matchSelector(matcher, doc, parsedField, docFieldValue); + if (Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["isRemote"])(db)) { + return httpViewCleanup(db); + } + return localViewCleanup(db); }); -} - -function matchSelector(matcher, doc, parsedField, docFieldValue) { - if (!matcher) { - // no filtering necessary; this field is just needed for sorting - return true; - } - return Object.keys(matcher).every(function (userOperator) { - var userValue = matcher[userOperator]; - return match(userOperator, doc, userValue, parsedField, docFieldValue); - }); + return { + query: abstractQuery, + viewCleanup: abstractViewCleanup + }; } -function matchCominationalSelector(field, matcher, doc) { +/* harmony default export */ __webpack_exports__["default"] = (createAbstractMapReduce); - if (field === '$or') { - return matcher.some(function (orMatchers) { - return rowFilter(doc, orMatchers, Object.keys(orMatchers)); - }); - } - if (field === '$not') { - return !rowFilter(doc, matcher, Object.keys(matcher)); - } +/***/ }), +/* 522 */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { - //`$nor` - return !matcher.find(function (orMatchers) { - return rowFilter(doc, orMatchers, Object.keys(orMatchers)); - }); +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atob", function() { return thisAtob; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "btoa", function() { return thisBtoa; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "base64StringToBlobOrBuffer", function() { return b64ToBluffer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "binaryStringToArrayBuffer", function() { return binaryStringToArrayBuffer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "binaryStringToBlobOrBuffer", function() { return binStringToBluffer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return createBlob; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blobOrBufferToBase64", function() { return blobToBase64; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blobOrBufferToBinaryString", function() { return blobToBase64$1; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readAsArrayBuffer", function() { return readAsArrayBuffer; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readAsBinaryString", function() { return readAsBinaryString; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "typedBuffer", function() { return typedBuffer; }); +/* harmony import */ var buffer_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(523); +/* harmony import */ var buffer_from__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(buffer_from__WEBPACK_IMPORTED_MODULE_0__); -} -function match(userOperator, doc, userValue, parsedField, docFieldValue) { - if (!matchers[userOperator]) { - throw new Error('unknown operator "' + userOperator + - '" - should be one of $eq, $lte, $lt, $gt, $gte, $exists, $ne, $in, ' + - '$nin, $size, $mod, $regex, $elemMatch, $type, $allMatch or $all'); +function thisAtob(str) { + var base64 = new Buffer(str, 'base64'); + // Node.js will just skip the characters it can't decode instead of + // throwing an exception + if (base64.toString('base64') !== str) { + throw new Error("attachment is not a valid base64 string"); } - return matchers[userOperator](doc, userValue, parsedField, docFieldValue); + return base64.toString('binary'); } -function fieldExists(docFieldValue) { - return typeof docFieldValue !== 'undefined' && docFieldValue !== null; +function thisBtoa(str) { + return buffer_from__WEBPACK_IMPORTED_MODULE_0___default()(str, 'binary').toString('base64'); } -function fieldIsNotUndefined(docFieldValue) { - return typeof docFieldValue !== 'undefined'; +function typedBuffer(binString, buffType, type) { + // buffType is either 'binary' or 'base64' + var buff = buffer_from__WEBPACK_IMPORTED_MODULE_0___default()(binString, buffType); + buff.type = type; // non-standard, but used for consistency with the browser + return buff; } -function modField(docFieldValue, userValue) { - var divisor = userValue[0]; - var mod = userValue[1]; - if (divisor === 0) { - throw new Error('Bad divisor, cannot divide by zero'); - } - - if (parseInt(divisor, 10) !== divisor ) { - throw new Error('Divisor is not an integer'); - } - - if (parseInt(mod, 10) !== mod ) { - throw new Error('Modulus is not an integer'); - } +function b64ToBluffer(b64, type) { + return typedBuffer(b64, 'base64', type); +} - if (parseInt(docFieldValue, 10) !== docFieldValue) { - return false; +// From http://stackoverflow.com/questions/14967647/ (continues on next line) +// encode-decode-image-with-base64-breaks-image (2013-04-21) +function binaryStringToArrayBuffer(bin) { + var length = bin.length; + var buf = new ArrayBuffer(length); + var arr = new Uint8Array(buf); + for (var i = 0; i < length; i++) { + arr[i] = bin.charCodeAt(i); } - - return docFieldValue % divisor === mod; + return buf; } -function arrayContainsValue(docFieldValue, userValue) { - return userValue.some(function (val) { - if (docFieldValue instanceof Array) { - return docFieldValue.indexOf(val) > -1; - } - - return docFieldValue === val; - }); +function binStringToBluffer(binString, type) { + return typedBuffer(binString, 'binary', type); } -function arrayContainsAllValues(docFieldValue, userValue) { - return userValue.every(function (val) { - return docFieldValue.indexOf(val) > -1; - }); +// This function is unused in Node +/* istanbul ignore next */ +function createBlob() { } -function arraySize(docFieldValue, userValue) { - return docFieldValue.length === userValue; +function blobToBase64(blobOrBuffer, callback) { + callback(blobOrBuffer.toString('base64')); } -function regexMatch(docFieldValue, userValue) { - var re = new RegExp(userValue); - - return re.test(docFieldValue); +// not used in Node, but here for completeness +function blobToBase64$1(blobOrBuffer, callback) { + callback(blobOrBuffer.toString('binary')); } -function typeMatch(docFieldValue, userValue) { +// simplified API. universal browser support is assumed +function readAsArrayBuffer(blob, callback) { + var reader = new FileReader(); + reader.onloadend = function (e) { + var result = e.target.result || new ArrayBuffer(0); + callback(result); + }; + reader.readAsArrayBuffer(blob); +} - switch (userValue) { - case 'null': - return docFieldValue === null; - case 'boolean': - return typeof (docFieldValue) === 'boolean'; - case 'number': - return typeof (docFieldValue) === 'number'; - case 'string': - return typeof (docFieldValue) === 'string'; - case 'array': - return docFieldValue instanceof Array; - case 'object': - return ({}).toString.call(docFieldValue) === '[object Object]'; +//Can't find original post, but this is close +//http://stackoverflow.com/questions/6965107/ (continues on next line) +//converting-between-strings-and-arraybuffers +function arrayBufferToBinaryString(buffer) { + var binary = ''; + var bytes = new Uint8Array(buffer); + var length = bytes.byteLength; + for (var i = 0; i < length; i++) { + binary += String.fromCharCode(bytes[i]); } - - throw new Error(userValue + ' not supported as a type.' + - 'Please use one of object, string, array, number, boolean or null.'); - + return binary; } -var matchers = { - - '$elemMatch': function (doc, userValue, parsedField, docFieldValue) { - if (!Array.isArray(docFieldValue)) { - return false; - } - - if (docFieldValue.length === 0) { - return false; +// shim for browsers that don't support it +function readAsBinaryString(blob, callback) { + var reader = new FileReader(); + var hasBinaryString = typeof reader.readAsBinaryString === 'function'; + reader.onloadend = function (e) { + var result = e.target.result || ''; + if (hasBinaryString) { + return callback(result); } + callback(arrayBufferToBinaryString(result)); + }; + if (hasBinaryString) { + reader.readAsBinaryString(blob); + } else { + reader.readAsArrayBuffer(blob); + } +} - if (typeof docFieldValue[0] === 'object') { - return docFieldValue.some(function (val) { - return rowFilter(val, userValue, Object.keys(userValue)); - }); - } - return docFieldValue.some(function (val) { - return matchSelector(userValue, doc, parsedField, val); - }); - }, - '$allMatch': function (doc, userValue, parsedField, docFieldValue) { - if (!Array.isArray(docFieldValue)) { - return false; - } - /* istanbul ignore next */ - if (docFieldValue.length === 0) { - return false; - } +/***/ }), +/* 523 */ +/***/ (function(module, exports) { - if (typeof docFieldValue[0] === 'object') { - return docFieldValue.every(function (val) { - return rowFilter(val, userValue, Object.keys(userValue)); - }); - } +var toString = Object.prototype.toString - return docFieldValue.every(function (val) { - return matchSelector(userValue, doc, parsedField, val); - }); - }, +var isModern = ( + typeof Buffer.alloc === 'function' && + typeof Buffer.allocUnsafe === 'function' && + typeof Buffer.from === 'function' +) - '$eq': function (doc, userValue, parsedField, docFieldValue) { - return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) === 0; - }, +function isArrayBuffer (input) { + return toString.call(input).slice(8, -1) === 'ArrayBuffer' +} - '$gte': function (doc, userValue, parsedField, docFieldValue) { - return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) >= 0; - }, +function fromArrayBuffer (obj, byteOffset, length) { + byteOffset >>>= 0 - '$gt': function (doc, userValue, parsedField, docFieldValue) { - return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) > 0; - }, + var maxLength = obj.byteLength - byteOffset - '$lte': function (doc, userValue, parsedField, docFieldValue) { - return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) <= 0; - }, + if (maxLength < 0) { + throw new RangeError("'offset' is out of bounds") + } - '$lt': function (doc, userValue, parsedField, docFieldValue) { - return fieldIsNotUndefined(docFieldValue) && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, userValue) < 0; - }, + if (length === undefined) { + length = maxLength + } else { + length >>>= 0 - '$exists': function (doc, userValue, parsedField, docFieldValue) { - //a field that is null is still considered to exist - if (userValue) { - return fieldIsNotUndefined(docFieldValue); + if (length > maxLength) { + throw new RangeError("'length' is out of bounds") } + } - return !fieldIsNotUndefined(docFieldValue); - }, - - '$mod': function (doc, userValue, parsedField, docFieldValue) { - return fieldExists(docFieldValue) && modField(docFieldValue, userValue); - }, - - '$ne': function (doc, userValue, parsedField, docFieldValue) { - return userValue.every(function (neValue) { - return Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_1__["collate"])(docFieldValue, neValue) !== 0; - }); - }, - '$in': function (doc, userValue, parsedField, docFieldValue) { - return fieldExists(docFieldValue) && arrayContainsValue(docFieldValue, userValue); - }, - - '$nin': function (doc, userValue, parsedField, docFieldValue) { - return fieldExists(docFieldValue) && !arrayContainsValue(docFieldValue, userValue); - }, + return isModern + ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) + : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) +} - '$size': function (doc, userValue, parsedField, docFieldValue) { - return fieldExists(docFieldValue) && arraySize(docFieldValue, userValue); - }, +function fromString (string, encoding) { + if (typeof encoding !== 'string' || encoding === '') { + encoding = 'utf8' + } - '$all': function (doc, userValue, parsedField, docFieldValue) { - return Array.isArray(docFieldValue) && arrayContainsAllValues(docFieldValue, userValue); - }, + if (!Buffer.isEncoding(encoding)) { + throw new TypeError('"encoding" must be a valid string encoding') + } - '$regex': function (doc, userValue, parsedField, docFieldValue) { - return fieldExists(docFieldValue) && regexMatch(docFieldValue, userValue); - }, + return isModern + ? Buffer.from(string, encoding) + : new Buffer(string, encoding) +} - '$type': function (doc, userValue, parsedField, docFieldValue) { - return typeMatch(docFieldValue, userValue); +function bufferFrom (value, encodingOrOffset, length) { + if (typeof value === 'number') { + throw new TypeError('"value" argument must not be a number') } -}; -// return true if the given doc matches the supplied selector -function matchesSelector(doc, selector) { - /* istanbul ignore if */ - if (typeof selector !== 'object') { - // match the CouchDB error message - throw new Error('Selector error: expected a JSON object'); + if (isArrayBuffer(value)) { + return fromArrayBuffer(value, encodingOrOffset, length) } - selector = massageSelector(selector); - var row = { - 'doc': doc - }; + if (typeof value === 'string') { + return fromString(value, encodingOrOffset) + } - var rowsMatched = filterInMemoryFields([row], { 'selector': selector }, Object.keys(selector)); - return rowsMatched && rowsMatched.length === 1; + return isModern + ? Buffer.from(value) + : new Buffer(value) } - +module.exports = bufferFrom /***/ }), -/* 521 */ +/* 524 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "collate", function() { return collate; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "normalizeKey", function() { return normalizeKey; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "toIndexableString", function() { return toIndexableString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "parseIndexableString", function() { return parseIndexableString; }); -function pad(str, padWith, upToLength) { - var padding = ''; - var targetLength = upToLength - str.length; - /* istanbul ignore next */ - while (padding.length < targetLength) { - padding += padWith; - } - return padding; +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return uniq; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialize", function() { return sequentialize; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fin", function() { return fin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "callbackify", function() { return callbackify; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "promisedCallback", function() { return promisedCallback; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapToKeysArray", function() { return mapToKeysArray; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryParseError", function() { return QueryParseError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotFoundError", function() { return NotFoundError; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BuiltInError", function() { return BuiltInError; }); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(525); +/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var pouchdb_collections__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(509); +/* harmony import */ var argsarray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(495); +/* harmony import */ var argsarray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(argsarray__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var pouchdb_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(507); + + + + + +function QueryParseError(message) { + this.status = 400; + this.name = 'query_parse_error'; + this.message = message; + this.error = true; + try { + Error.captureStackTrace(this, QueryParseError); + } catch (e) {} } -function padLeft(str, padWith, upToLength) { - var padding = pad(str, padWith, upToLength); - return padding + str; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(QueryParseError, Error); + +function NotFoundError(message) { + this.status = 404; + this.name = 'not_found'; + this.message = message; + this.error = true; + try { + Error.captureStackTrace(this, NotFoundError); + } catch (e) {} } -var MIN_MAGNITUDE = -324; // verified by -Number.MIN_VALUE -var MAGNITUDE_DIGITS = 3; // ditto -var SEP = ''; // set to '_' for easier debugging +inherits__WEBPACK_IMPORTED_MODULE_0___default()(NotFoundError, Error); -function collate(a, b) { +function BuiltInError(message) { + this.status = 500; + this.name = 'invalid_value'; + this.message = message; + this.error = true; + try { + Error.captureStackTrace(this, BuiltInError); + } catch (e) {} +} - if (a === b) { - return 0; +inherits__WEBPACK_IMPORTED_MODULE_0___default()(BuiltInError, Error); + +function promisedCallback(promise, callback) { + if (callback) { + promise.then(function (res) { + Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_3__["nextTick"])(function () { + callback(null, res); + }); + }, function (reason) { + Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_3__["nextTick"])(function () { + callback(reason); + }); + }); } + return promise; +} - a = normalizeKey(a); - b = normalizeKey(b); +function callbackify(fun) { + return argsarray__WEBPACK_IMPORTED_MODULE_2___default()(function (args) { + var cb = args.pop(); + var promise = fun.apply(this, args); + if (typeof cb === 'function') { + promisedCallback(promise, cb); + } + return promise; + }); +} - var ai = collationIndex(a); - var bi = collationIndex(b); - if ((ai - bi) !== 0) { - return ai - bi; - } - switch (typeof a) { - case 'number': - return a - b; - case 'boolean': - return a < b ? -1 : 1; - case 'string': - return stringCollate(a, b); - } - return Array.isArray(a) ? arrayCollate(a, b) : objectCollate(a, b); +// Promise finally util similar to Q.finally +function fin(promise, finalPromiseFactory) { + return promise.then(function (res) { + return finalPromiseFactory().then(function () { + return res; + }); + }, function (reason) { + return finalPromiseFactory().then(function () { + throw reason; + }); + }); } -// couch considers null/NaN/Infinity/-Infinity === undefined, -// for the purposes of mapreduce indexes. also, dates get stringified. -function normalizeKey(key) { - switch (typeof key) { - case 'undefined': - return null; - case 'number': - if (key === Infinity || key === -Infinity || isNaN(key)) { - return null; - } - return key; - case 'object': - var origKey = key; - if (Array.isArray(key)) { - var len = key.length; - key = new Array(len); - for (var i = 0; i < len; i++) { - key[i] = normalizeKey(origKey[i]); - } - /* istanbul ignore next */ - } else if (key instanceof Date) { - return key.toJSON(); - } else if (key !== null) { // generic object - key = {}; - for (var k in origKey) { - if (origKey.hasOwnProperty(k)) { - var val = origKey[k]; - if (typeof val !== 'undefined') { - key[k] = normalizeKey(val); - } - } - } - } - } - return key; +function sequentialize(queue, promiseFactory) { + return function () { + var args = arguments; + var that = this; + return queue.add(function () { + return promiseFactory.apply(that, args); + }); + }; } -function indexify(key) { - if (key !== null) { - switch (typeof key) { - case 'boolean': - return key ? 1 : 0; - case 'number': - return numToIndexableString(key); - case 'string': - // We've to be sure that key does not contain \u0000 - // Do order-preserving replacements: - // 0 -> 1, 1 - // 1 -> 1, 2 - // 2 -> 2, 2 - /* eslint-disable no-control-regex */ - return key - .replace(/\u0002/g, '\u0002\u0002') - .replace(/\u0001/g, '\u0001\u0002') - .replace(/\u0000/g, '\u0001\u0001'); - /* eslint-enable no-control-regex */ - case 'object': - var isArray = Array.isArray(key); - var arr = isArray ? key : Object.keys(key); - var i = -1; - var len = arr.length; - var result = ''; - if (isArray) { - while (++i < len) { - result += toIndexableString(arr[i]); - } - } else { - while (++i < len) { - var objKey = arr[i]; - result += toIndexableString(objKey) + - toIndexableString(key[objKey]); - } - } - return result; - } - } - return ''; +// uniq an array of strings, order not guaranteed +// similar to underscore/lodash _.uniq +function uniq(arr) { + var theSet = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_1__["Set"](arr); + var result = new Array(theSet.size); + var index = -1; + theSet.forEach(function (value) { + result[++index] = value; + }); + return result; } -// convert the given key to a string that would be appropriate -// for lexical sorting, e.g. within a database, where the -// sorting is the same given by the collate() function. -function toIndexableString(key) { - var zero = '\u0000'; - key = normalizeKey(key); - return collationIndex(key) + SEP + indexify(key) + zero; +function mapToKeysArray(map) { + var result = new Array(map.size); + var index = -1; + map.forEach(function (value, key) { + result[++index] = key; + }); + return result; } -function parseNumber(str, i) { - var originalIdx = i; - var num; - var zero = str[i] === '1'; - if (zero) { - num = 0; - i++; - } else { - var neg = str[i] === '0'; - i++; - var numAsString = ''; - var magAsString = str.substring(i, i + MAGNITUDE_DIGITS); - var magnitude = parseInt(magAsString, 10) + MIN_MAGNITUDE; - /* istanbul ignore next */ - if (neg) { - magnitude = -magnitude; - } - i += MAGNITUDE_DIGITS; - while (true) { - var ch = str[i]; - if (ch === '\u0000') { - break; - } else { - numAsString += ch; - } - i++; - } - numAsString = numAsString.split('.'); - if (numAsString.length === 1) { - num = parseInt(numAsString, 10); - } else { - /* istanbul ignore next */ - num = parseFloat(numAsString[0] + '.' + numAsString[1]); - } - /* istanbul ignore next */ - if (neg) { - num = num - 10; - } - /* istanbul ignore next */ - if (magnitude !== 0) { - // parseFloat is more reliable than pow due to rounding errors - // e.g. Number.MAX_VALUE would return Infinity if we did - // num * Math.pow(10, magnitude); - num = parseFloat(num + 'e' + magnitude); - } - } - return {num: num, length : i - originalIdx}; -} -// move up the stack while parsing -// this function moved outside of parseIndexableString for performance -function pop(stack, metaStack) { - var obj = stack.pop(); - if (metaStack.length) { - var lastMetaElement = metaStack[metaStack.length - 1]; - if (obj === lastMetaElement.element) { - // popping a meta-element, e.g. an object whose value is another object - metaStack.pop(); - lastMetaElement = metaStack[metaStack.length - 1]; - } - var element = lastMetaElement.element; - var lastElementIndex = lastMetaElement.index; - if (Array.isArray(element)) { - element.push(obj); - } else if (lastElementIndex === stack.length - 2) { // obj with key+value - var key = stack.pop(); - element[key] = obj; - } else { - stack.push(obj); // obj with key only - } - } + +/***/ }), +/* 525 */ +/***/ (function(module, exports, __webpack_require__) { + +try { + var util = __webpack_require__(9); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = __webpack_require__(526); } -function parseIndexableString(str) { - var stack = []; - var metaStack = []; // stack for arrays and objects - var i = 0; - /*eslint no-constant-condition: ["error", { "checkLoops": false }]*/ - while (true) { - var collationIndex = str[i++]; - if (collationIndex === '\u0000') { - if (stack.length === 1) { - return stack.pop(); - } else { - pop(stack, metaStack); - continue; +/***/ }), +/* 526 */ +/***/ (function(module, exports) { + +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true } - } - switch (collationIndex) { - case '1': - stack.push(null); - break; - case '2': - stack.push(str[i] === '1'); - i++; - break; - case '3': - var parsedNum = parseNumber(str, i); - stack.push(parsedNum.num); - i += parsedNum.length; - break; - case '4': - var parsedStr = ''; - /*eslint no-constant-condition: ["error", { "checkLoops": false }]*/ - while (true) { - var ch = str[i]; - if (ch === '\u0000') { - break; - } - parsedStr += ch; - i++; - } - // perform the reverse of the order-preserving replacement - // algorithm (see above) - /* eslint-disable no-control-regex */ - parsedStr = parsedStr.replace(/\u0001\u0001/g, '\u0000') - .replace(/\u0001\u0002/g, '\u0001') - .replace(/\u0002\u0002/g, '\u0002'); - /* eslint-enable no-control-regex */ - stack.push(parsedStr); - break; - case '5': - var arrayElement = { element: [], index: stack.length }; - stack.push(arrayElement.element); - metaStack.push(arrayElement); - break; - case '6': - var objElement = { element: {}, index: stack.length }; - stack.push(objElement.element); - metaStack.push(objElement); - break; - /* istanbul ignore next */ - default: - throw new Error( - 'bad collationIndex or unexpectedly reached end of input: ' + - collationIndex); - } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor } } -function arrayCollate(a, b) { - var len = Math.min(a.length, b.length); - for (var i = 0; i < len; i++) { - var sort = collate(a[i], b[i]); - if (sort !== 0) { - return sort; - } - } - return (a.length === b.length) ? 0 : - (a.length > b.length) ? 1 : -1; -} -function stringCollate(a, b) { - // See: https://github.com/daleharvey/pouchdb/issues/40 - // This is incompatible with the CouchDB implementation, but its the - // best we can do for now - return (a === b) ? 0 : ((a > b) ? 1 : -1); -} -function objectCollate(a, b) { - var ak = Object.keys(a), bk = Object.keys(b); - var len = Math.min(ak.length, bk.length); - for (var i = 0; i < len; i++) { - // First sort the keys - var sort = collate(ak[i], bk[i]); - if (sort !== 0) { - return sort; - } - // if the keys are equal sort the values - sort = collate(a[ak[i]], b[bk[i]]); - if (sort !== 0) { - return sort; - } - } - return (ak.length === bk.length) ? 0 : - (ak.length > bk.length) ? 1 : -1; -} -// The collation is defined by erlangs ordered terms -// the atoms null, true, false come first, then numbers, strings, -// arrays, then objects -// null/undefined/NaN/Infinity/-Infinity are all considered null -function collationIndex(x) { - var id = ['boolean', 'number', 'string', 'object']; - var idx = id.indexOf(typeof x); - //false if -1 otherwise true, but fast!!!!1 - if (~idx) { - if (x === null) { - return 1; - } - if (Array.isArray(x)) { - return 5; - } - return idx < 3 ? (idx + 2) : (idx + 3); - } - /* istanbul ignore next */ - if (Array.isArray(x)) { - return 5; - } -} +/***/ }), +/* 527 */ +/***/ (function(module, exports, __webpack_require__) { -// conversion: -// x yyy zz...zz -// x = 0 for negative, 1 for 0, 2 for positive -// y = exponent (for negative numbers negated) moved so that it's >= 0 -// z = mantisse -function numToIndexableString(num) { +"use strict"; - if (num === 0) { - return '1'; - } - // convert number to exponential format for easier and - // more succinct string sorting - var expFormat = num.toExponential().split(/e\+?/); - var magnitude = parseInt(expFormat[1], 10); +var _interopRequireWildcard = __webpack_require__(528); - var neg = num < 0; +var _interopRequireDefault = __webpack_require__(530); - var result = neg ? '0' : '2'; +Object.defineProperty(exports, "__esModule", { + value: true +}); +var _exportNames = { + CozyLink: true, + StackLink: true, + compose: true, + QueryDefinition: true, + Mutations: true, + MutationTypes: true, + getDoctypeFromOperation: true, + Q: true, + Association: true, + HasMany: true, + HasOne: true, + HasOneInPlace: true, + HasManyInPlace: true, + HasManyTriggers: true, + dehydrate: true, + generateWebLink: true, + cancelable: true, + getQueryFromState: true, + Registry: true, + manifest: true, + BulkEditError: true, + models: true +}; +Object.defineProperty(exports, "default", { + enumerable: true, + get: function get() { + return _CozyClient.default; + } +}); +Object.defineProperty(exports, "CozyLink", { + enumerable: true, + get: function get() { + return _CozyLink.default; + } +}); +Object.defineProperty(exports, "StackLink", { + enumerable: true, + get: function get() { + return _StackLink.default; + } +}); +Object.defineProperty(exports, "compose", { + enumerable: true, + get: function get() { + return _flow.default; + } +}); +Object.defineProperty(exports, "QueryDefinition", { + enumerable: true, + get: function get() { + return _dsl.QueryDefinition; + } +}); +Object.defineProperty(exports, "Mutations", { + enumerable: true, + get: function get() { + return _dsl.Mutations; + } +}); +Object.defineProperty(exports, "MutationTypes", { + enumerable: true, + get: function get() { + return _dsl.MutationTypes; + } +}); +Object.defineProperty(exports, "getDoctypeFromOperation", { + enumerable: true, + get: function get() { + return _dsl.getDoctypeFromOperation; + } +}); +Object.defineProperty(exports, "Q", { + enumerable: true, + get: function get() { + return _dsl.Q; + } +}); +Object.defineProperty(exports, "Association", { + enumerable: true, + get: function get() { + return _associations.Association; + } +}); +Object.defineProperty(exports, "HasMany", { + enumerable: true, + get: function get() { + return _associations.HasMany; + } +}); +Object.defineProperty(exports, "HasOne", { + enumerable: true, + get: function get() { + return _associations.HasOne; + } +}); +Object.defineProperty(exports, "HasOneInPlace", { + enumerable: true, + get: function get() { + return _associations.HasOneInPlace; + } +}); +Object.defineProperty(exports, "HasManyInPlace", { + enumerable: true, + get: function get() { + return _associations.HasManyInPlace; + } +}); +Object.defineProperty(exports, "HasManyTriggers", { + enumerable: true, + get: function get() { + return _associations.HasManyTriggers; + } +}); +Object.defineProperty(exports, "dehydrate", { + enumerable: true, + get: function get() { + return _helpers.dehydrate; + } +}); +Object.defineProperty(exports, "generateWebLink", { + enumerable: true, + get: function get() { + return _helpers.generateWebLink; + } +}); +Object.defineProperty(exports, "cancelable", { + enumerable: true, + get: function get() { + return _utils.cancelable; + } +}); +Object.defineProperty(exports, "getQueryFromState", { + enumerable: true, + get: function get() { + return _store.getQueryFromState; + } +}); +Object.defineProperty(exports, "Registry", { + enumerable: true, + get: function get() { + return _registry.default; + } +}); +Object.defineProperty(exports, "BulkEditError", { + enumerable: true, + get: function get() { + return _errors.BulkEditError; + } +}); +exports.models = exports.manifest = void 0; - // first sort by magnitude - // it's easier if all magnitudes are positive - var magForComparison = ((neg ? -magnitude : magnitude) - MIN_MAGNITUDE); - var magString = padLeft((magForComparison).toString(), '0', MAGNITUDE_DIGITS); +var _CozyClient = _interopRequireDefault(__webpack_require__(531)); - result += SEP + magString; +var _CozyLink = _interopRequireDefault(__webpack_require__(692)); - // then sort by the factor - var factor = Math.abs(parseFloat(expFormat[0])); // [1..10) - /* istanbul ignore next */ - if (neg) { // for negative reverse ordering - factor = 10 - factor; - } +var _StackLink = _interopRequireDefault(__webpack_require__(691)); - var factorStr = factor.toFixed(20); +var _flow = _interopRequireDefault(__webpack_require__(795)); - // strip zeros from the end - factorStr = factorStr.replace(/\.?0+$/, ''); +var _dsl = __webpack_require__(625); - result += SEP + factorStr; +var _associations = __webpack_require__(696); - return result; -} +var _helpers = __webpack_require__(761); +var _utils = __webpack_require__(807); +var _store = __webpack_require__(698); +var _registry = _interopRequireDefault(__webpack_require__(614)); -/***/ }), -/* 522 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var manifest = _interopRequireWildcard(__webpack_require__(808)); -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony import */ var pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(507); -/* harmony import */ var pouchdb_md5__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(515); -/* harmony import */ var pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(509); -/* harmony import */ var pouchdb_binary_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(523); -/* harmony import */ var pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(521); -/* harmony import */ var pouchdb_errors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(512); -/* harmony import */ var pouchdb_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(516); -/* harmony import */ var pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(525); +exports.manifest = manifest; + +var _mock = __webpack_require__(809); +Object.keys(_mock).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _mock[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _mock[key]; + } + }); +}); +var _errors = __webpack_require__(693); +var _cli = __webpack_require__(810); +Object.keys(_cli).forEach(function (key) { + if (key === "default" || key === "__esModule") return; + if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; + if (key in exports && exports[key] === _cli[key]) return; + Object.defineProperty(exports, key, { + enumerable: true, + get: function get() { + return _cli[key]; + } + }); +}); +var models = _interopRequireWildcard(__webpack_require__(816)); +exports.models = models; +/***/ }), +/* 528 */ +/***/ (function(module, exports, __webpack_require__) { +var _typeof = __webpack_require__(529)["default"]; -/* - * Simple task queue to sequentialize actions. Assumes - * callbacks will eventually fire (once). - */ +function _getRequireWildcardCache() { + if (typeof WeakMap !== "function") return null; + var cache = new WeakMap(); + _getRequireWildcardCache = function _getRequireWildcardCache() { + return cache; + }; -function TaskQueue() { - this.promise = new Promise(function (fulfill) {fulfill(); }); + return cache; } -TaskQueue.prototype.add = function (promiseFactory) { - this.promise = this.promise.catch(function () { - // just recover - }).then(function () { - return promiseFactory(); - }); - return this.promise; -}; -TaskQueue.prototype.finish = function () { - return this.promise; -}; -function stringify(input) { - if (!input) { - return 'undefined'; // backwards compat for empty reduce - } - // for backwards compat with mapreduce, functions/strings are stringified - // as-is. everything else is JSON-stringified. - switch (typeof input) { - case 'function': - // e.g. a mapreduce map - return input.toString(); - case 'string': - // e.g. a mapreduce built-in _reduce function - return input.toString(); - default: - // e.g. a JSON object in the case of mango queries - return JSON.stringify(input); +function _interopRequireWildcard(obj) { + if (obj && obj.__esModule) { + return obj; } -} -/* create a string signature for a view so we can cache it and uniq it */ -function createViewSignature(mapFun, reduceFun) { - // the "undefined" part is for backwards compatibility - return stringify(mapFun) + stringify(reduceFun) + 'undefined'; -} + if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { + return { + "default": obj + }; + } -function createView(sourceDB, viewName, mapFun, reduceFun, temporary, localDocName) { - var viewSignature = createViewSignature(mapFun, reduceFun); + var cache = _getRequireWildcardCache(); - var cachedViews; - if (!temporary) { - // cache this to ensure we don't try to update the same view twice - cachedViews = sourceDB._cachedViews = sourceDB._cachedViews || {}; - if (cachedViews[viewSignature]) { - return cachedViews[viewSignature]; - } + if (cache && cache.has(obj)) { + return cache.get(obj); } - var promiseForView = sourceDB.info().then(function (info) { + var newObj = {}; + var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - var depDbName = info.db_name + '-mrview-' + - (temporary ? 'temp' : Object(pouchdb_md5__WEBPACK_IMPORTED_MODULE_1__["stringMd5"])(viewSignature)); + for (var key in obj) { + if (Object.prototype.hasOwnProperty.call(obj, key)) { + var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - // save the view name in the source db so it can be cleaned up if necessary - // (e.g. when the _design doc is deleted, remove all associated view data) - function diffFunction(doc) { - doc.views = doc.views || {}; - var fullViewName = viewName; - if (fullViewName.indexOf('/') === -1) { - fullViewName = viewName + '/' + viewName; - } - var depDbs = doc.views[fullViewName] = doc.views[fullViewName] || {}; - /* istanbul ignore if */ - if (depDbs[depDbName]) { - return; // no update necessary + if (desc && (desc.get || desc.set)) { + Object.defineProperty(newObj, key, desc); + } else { + newObj[key] = obj[key]; } - depDbs[depDbName] = true; - return doc; } - return Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["upsert"])(sourceDB, '_local/' + localDocName, diffFunction).then(function () { - return sourceDB.registerDependentDatabase(depDbName).then(function (res) { - var db = res.db; - db.auto_compaction = true; - var view = { - name: depDbName, - db: db, - sourceDB: sourceDB, - adapter: sourceDB.adapter, - mapFun: mapFun, - reduceFun: reduceFun - }; - return view.db.get('_local/lastSeq').catch(function (err) { - /* istanbul ignore if */ - if (err.status !== 404) { - throw err; - } - }).then(function (lastSeqDoc) { - view.seq = lastSeqDoc ? lastSeqDoc.seq : 0; - if (cachedViews) { - view.db.once('destroyed', function () { - delete cachedViews[viewSignature]; - }); - } - return view; - }); - }); - }); - }); + } - if (cachedViews) { - cachedViews[viewSignature] = promiseForView; + newObj["default"] = obj; + + if (cache) { + cache.set(obj, newObj); } - return promiseForView; + + return newObj; } -var persistentQueues = {}; -var tempViewQueue = new TaskQueue(); -var CHANGES_BATCH_SIZE = 50; +module.exports = _interopRequireWildcard; +module.exports["default"] = module.exports, module.exports.__esModule = true; -function parseViewName(name) { - // can be either 'ddocname/viewname' or just 'viewname' - // (where the ddoc name is the same) - return name.indexOf('/') === -1 ? [name, name] : name.split('/'); -} +/***/ }), +/* 529 */ +/***/ (function(module, exports) { -function isGenOne(changes) { - // only return true if the current change is 1- - // and there are no other leafs - return changes.length === 1 && /^1-/.test(changes[0].rev); -} +function _typeof(obj) { + "@babel/helpers - typeof"; -function emitError(db, e) { - try { - db.emit('error', e); - } catch (err) { - Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["guardedConsole"])('error', - 'The user\'s map/reduce function threw an uncaught error.\n' + - 'You can debug this error by doing:\n' + - 'myDatabase.on(\'error\', function (err) { debugger; });\n' + - 'Please double-check your map/reduce function.'); - Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["guardedConsole"])('error', e); + if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { + module.exports = _typeof = function _typeof(obj) { + return typeof obj; + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; + } else { + module.exports = _typeof = function _typeof(obj) { + return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; + }; + + module.exports["default"] = module.exports, module.exports.__esModule = true; } + + return _typeof(obj); } -/** - * Returns an "abstract" mapreduce object of the form: - * - * { - * query: queryFun, - * viewCleanup: viewCleanupFun - * } - * - * Arguments are: - * - * localDoc: string - * This is for the local doc that gets saved in order to track the - * "dependent" DBs and clean them up for viewCleanup. It should be - * unique, so that indexer plugins don't collide with each other. - * mapper: function (mapFunDef, emit) - * Returns a map function based on the mapFunDef, which in the case of - * normal map/reduce is just the de-stringified function, but may be - * something else, such as an object in the case of pouchdb-find. - * reducer: function (reduceFunDef) - * Ditto, but for reducing. Modules don't have to support reducing - * (e.g. pouchdb-find). - * ddocValidator: function (ddoc, viewName) - * Throws an error if the ddoc or viewName is not valid. - * This could be a way to communicate to the user that the configuration for the - * indexer is invalid. - */ -function createAbstractMapReduce(localDocName, mapper, reducer, ddocValidator) { +module.exports = _typeof; +module.exports["default"] = module.exports, module.exports.__esModule = true; - function tryMap(db, fun, doc) { - // emit an event if there was an error thrown by a map function. - // putting try/catches in a single function also avoids deoptimizations. - try { - fun(doc); - } catch (e) { - emitError(db, e); - } - } +/***/ }), +/* 530 */ +/***/ (function(module, exports) { - function tryReduce(db, fun, keys, values, rereduce) { - // same as above, but returning the result or an error. there are two separate - // functions to avoid extra memory allocations since the tryCode() case is used - // for custom map functions (common) vs this function, which is only used for - // custom reduce functions (rare) - try { - return {output : fun(keys, values, rereduce)}; - } catch (e) { - emitError(db, e); - return {error: e}; - } - } +function _interopRequireDefault(obj) { + return obj && obj.__esModule ? obj : { + "default": obj + }; +} - function sortByKeyThenValue(x, y) { - var keyCompare = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(x.key, y.key); - return keyCompare !== 0 ? keyCompare : Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(x.value, y.value); - } +module.exports = _interopRequireDefault; +module.exports["default"] = module.exports, module.exports.__esModule = true; - function sliceResults(results, limit, skip) { - skip = skip || 0; - if (typeof limit === 'number') { - return results.slice(skip, limit + skip); - } else if (skip > 0) { - return results.slice(skip); - } - return results; - } +/***/ }), +/* 531 */ +/***/ (function(module, exports, __webpack_require__) { - function rowToDocId(row) { - var val = row.value; - // Users can explicitly specify a joined doc _id, or it - // defaults to the doc _id that emitted the key/value. - var docId = (val && typeof val === 'object' && val._id) || row.id; - return docId; - } +"use strict"; - function readAttachmentsAsBlobOrBuffer(res) { - res.rows.forEach(function (row) { - var atts = row.doc && row.doc._attachments; - if (!atts) { - return; - } - Object.keys(atts).forEach(function (filename) { - var att = atts[filename]; - atts[filename].data = Object(pouchdb_binary_utils__WEBPACK_IMPORTED_MODULE_3__["base64StringToBlobOrBuffer"])(att.data, att.content_type); - }); - }); - } - function postprocessAttachments(opts) { - return function (res) { - if (opts.include_docs && opts.attachments && opts.binary) { - readAttachmentsAsBlobOrBuffer(res); - } - return res; - }; - } +var _interopRequireWildcard = __webpack_require__(528); - function addHttpParam(paramName, opts, params, asJson) { - // add an http param from opts to params, optionally json-encoded - var val = opts[paramName]; - if (typeof val !== 'undefined') { - if (asJson) { - val = encodeURIComponent(JSON.stringify(val)); - } - params.push(paramName + '=' + val); - } - } +var _interopRequireDefault = __webpack_require__(530); - function coerceInteger(integerCandidate) { - if (typeof integerCandidate !== 'undefined') { - var asNumber = Number(integerCandidate); - // prevents e.g. '1foo' or '1.1' being coerced to 1 - if (!isNaN(asNumber) && asNumber === parseInt(integerCandidate, 10)) { - return asNumber; - } else { - return integerCandidate; - } - } - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; - function coerceOptions(opts) { - opts.group_level = coerceInteger(opts.group_level); - opts.limit = coerceInteger(opts.limit); - opts.skip = coerceInteger(opts.skip); - return opts; - } +var _toArray2 = _interopRequireDefault(__webpack_require__(532)); - function checkPositiveInteger(number) { - if (number) { - if (typeof number !== 'number') { - return new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('Invalid value for integer: "' + - number + '"'); - } - if (number < 0) { - return new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('Invalid value for positive integer: ' + - '"' + number + '"'); - } - } - } +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(538)); - function checkQueryParseError(options, fun) { - var startkeyName = options.descending ? 'endkey' : 'startkey'; - var endkeyName = options.descending ? 'startkey' : 'endkey'; +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); - if (typeof options[startkeyName] !== 'undefined' && - typeof options[endkeyName] !== 'undefined' && - Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(options[startkeyName], options[endkeyName]) > 0) { - throw new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('No rows can match your key range, ' + - 'reverse your start_key and end_key or set {descending : true}'); - } else if (fun.reduce && options.reduce !== false) { - if (options.include_docs) { - throw new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('{include_docs:true} is invalid for reduce'); - } else if (options.keys && options.keys.length > 1 && - !options.group && !options.group_level) { - throw new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["QueryParseError"]('Multi-key fetches for reduce views must use ' + - '{group: true}'); - } - } - ['group_level', 'limit', 'skip'].forEach(function (optionName) { - var error = checkPositiveInteger(options[optionName]); - if (error) { - throw error; - } - }); - } +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); - function httpQuery(db, fun, opts) { - // List of parameters to add to the PUT request - var params = []; - var body; - var method = 'GET'; - var ok, status; +var _regenerator = _interopRequireDefault(__webpack_require__(545)); - // If opts.reduce exists and is defined, then add it to the list - // of parameters. - // If reduce=false then the results are that of only the map function - // not the final result of map and reduce. - addHttpParam('reduce', opts, params); - addHttpParam('include_docs', opts, params); - addHttpParam('attachments', opts, params); - addHttpParam('limit', opts, params); - addHttpParam('descending', opts, params); - addHttpParam('group', opts, params); - addHttpParam('group_level', opts, params); - addHttpParam('skip', opts, params); - addHttpParam('stale', opts, params); - addHttpParam('conflicts', opts, params); - addHttpParam('startkey', opts, params, true); - addHttpParam('start_key', opts, params, true); - addHttpParam('endkey', opts, params, true); - addHttpParam('end_key', opts, params, true); - addHttpParam('inclusive_end', opts, params); - addHttpParam('key', opts, params, true); - addHttpParam('update_seq', opts, params); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); - // Format the list of parameters into a valid URI query string - params = params.join('&'); - params = params === '' ? '' : '?' + params; +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); - // If keys are supplied, issue a POST to circumvent GET query string limits - // see http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options - if (typeof opts.keys !== 'undefined') { - var MAX_URL_LENGTH = 2000; - // according to http://stackoverflow.com/a/417184/680742, - // the de facto URL length limit is 2000 characters +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); - var keysAsString = - 'keys=' + encodeURIComponent(JSON.stringify(opts.keys)); - if (keysAsString.length + params.length + 1 <= MAX_URL_LENGTH) { - // If the keys are short enough, do a GET. we do this to work around - // Safari not understanding 304s on POSTs (see pouchdb/pouchdb#1239) - params += (params[0] === '?' ? '&' : '?') + keysAsString; - } else { - method = 'POST'; - if (typeof fun === 'string') { - body = {keys: opts.keys}; - } else { // fun is {map : mapfun}, so append to this - fun.keys = opts.keys; - } - } - } +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); - // We are referencing a query defined in the design doc - if (typeof fun === 'string') { - var parts = parseViewName(fun); - return db.fetch('_design/' + parts[0] + '/_view/' + parts[1] + params, { - headers: new pouchdb_fetch__WEBPACK_IMPORTED_MODULE_6__["Headers"]({'Content-Type': 'application/json'}), - method: method, - body: JSON.stringify(body) - }).then(function (response) { - ok = response.ok; - status = response.status; - return response.json(); - }).then(function (result) { - if (!ok) { - result.status = status; - throw Object(pouchdb_errors__WEBPACK_IMPORTED_MODULE_5__["generateErrorFromResponse"])(result); - } - // fail the entire request if the result contains an error - result.rows.forEach(function (row) { - /* istanbul ignore if */ - if (row.value && row.value.error && row.value.error === "builtin_reduce_error") { - throw new Error(row.reason); - } - }); - return result; - }).then(postprocessAttachments(opts)); - } +var _mapValues = _interopRequireDefault(__webpack_require__(551)); - // We are using a temporary view, terrible for performance, good for testing - body = body || {}; - Object.keys(fun).forEach(function (key) { - if (Array.isArray(fun[key])) { - body[key] = fun[key]; - } else { - body[key] = fun[key].toString(); - } - }); +var _fromPairs = _interopRequireDefault(__webpack_require__(557)); - return db.fetch('_temp_view' + params, { - headers: new pouchdb_fetch__WEBPACK_IMPORTED_MODULE_6__["Headers"]({'Content-Type': 'application/json'}), - method: 'POST', - body: JSON.stringify(body) - }).then(function (response) { - ok = response.ok; - status = response.status; - return response.json(); - }).then(function (result) { - if (!ok) { - result.status = status; - throw Object(pouchdb_errors__WEBPACK_IMPORTED_MODULE_5__["generateErrorFromResponse"])(result); - } - return result; - }).then(postprocessAttachments(opts)); - } +var _flatten = _interopRequireDefault(__webpack_require__(558)); - // custom adapters can define their own api._query - // and override the default behavior - /* istanbul ignore next */ - function customQuery(db, fun, opts) { - return new Promise(function (resolve, reject) { - db._query(fun, opts, function (err, res) { - if (err) { - return reject(err); - } - resolve(res); - }); - }); - } +var _uniqBy = _interopRequireDefault(__webpack_require__(412)); - // custom adapters can define their own api._viewCleanup - // and override the default behavior - /* istanbul ignore next */ - function customViewCleanup(db) { - return new Promise(function (resolve, reject) { - db._viewCleanup(function (err, res) { - if (err) { - return reject(err); - } - resolve(res); - }); - }); - } +var _zip = _interopRequireDefault(__webpack_require__(561)); - function defaultsTo(value) { - return function (reason) { - /* istanbul ignore else */ - if (reason.status === 404) { - return value; - } else { - throw reason; - } - }; - } +var _forEach = _interopRequireDefault(__webpack_require__(571)); - // returns a promise for a list of docs to update, based on the input docId. - // the order doesn't matter, because post-3.2.0, bulkDocs - // is an atomic operation in all three adapters. - function getDocsToPersist(docId, view, docIdsToChangesAndEmits) { - var metaDocId = '_local/doc_' + docId; - var defaultMetaDoc = {_id: metaDocId, keys: []}; - var docData = docIdsToChangesAndEmits.get(docId); - var indexableKeysToKeyValues = docData[0]; - var changes = docData[1]; +var _get = _interopRequireDefault(__webpack_require__(370)); - function getMetaDoc() { - if (isGenOne(changes)) { - // generation 1, so we can safely assume initial state - // for performance reasons (avoids unnecessary GETs) - return Promise.resolve(defaultMetaDoc); - } - return view.db.get(metaDocId).catch(defaultsTo(defaultMetaDoc)); - } +var _microee = _interopRequireDefault(__webpack_require__(576)); - function getKeyValueDocs(metaDoc) { - if (!metaDoc.keys.length) { - // no keys, no need for a lookup - return Promise.resolve({rows: []}); - } - return view.db.allDocs({ - keys: metaDoc.keys, - include_docs: true - }); - } +var _cozyStackClient = _interopRequireWildcard(__webpack_require__(577)); - function processKeyValueDocs(metaDoc, kvDocsRes) { - var kvDocs = []; - var oldKeys = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Set"](); +var _const = __webpack_require__(690); - for (var i = 0, len = kvDocsRes.rows.length; i < len; i++) { - var row = kvDocsRes.rows[i]; - var doc = row.doc; - if (!doc) { // deleted - continue; - } - kvDocs.push(doc); - oldKeys.add(doc._id); - doc._deleted = !indexableKeysToKeyValues.has(doc._id); - if (!doc._deleted) { - var keyValue = indexableKeysToKeyValues.get(doc._id); - if ('value' in keyValue) { - doc.value = keyValue.value; - } - } - } - var newKeys = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["mapToKeysArray"])(indexableKeysToKeyValues); - newKeys.forEach(function (key) { - if (!oldKeys.has(key)) { - // new doc - var kvDoc = { - _id: key - }; - var keyValue = indexableKeysToKeyValues.get(key); - if ('value' in keyValue) { - kvDoc.value = keyValue.value; - } - kvDocs.push(kvDoc); - } - }); - metaDoc.keys = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["uniq"])(newKeys.concat(metaDoc.keys)); - kvDocs.push(metaDoc); +var _StackLink = _interopRequireDefault(__webpack_require__(691)); - return kvDocs; - } +var _associations = __webpack_require__(696); - return getMetaDoc().then(function (metaDoc) { - return getKeyValueDocs(metaDoc).then(function (kvDocsRes) { - return processKeyValueDocs(metaDoc, kvDocsRes); - }); - }); - } +var _helpers = __webpack_require__(760); - // updates all emitted key/value docs and metaDocs in the mrview database - // for the given batch of documents from the source database - function saveKeyValues(view, docIdsToChangesAndEmits, seq) { - var seqDocId = '_local/lastSeq'; - return view.db.get(seqDocId) - .catch(defaultsTo({_id: seqDocId, seq: 0})) - .then(function (lastSeqDoc) { - var docIds = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["mapToKeysArray"])(docIdsToChangesAndEmits); - return Promise.all(docIds.map(function (docId) { - return getDocsToPersist(docId, view, docIdsToChangesAndEmits); - })).then(function (listOfDocsToPersist) { - var docsToPersist = Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"])(listOfDocsToPersist); - lastSeqDoc.seq = seq; - docsToPersist.push(lastSeqDoc); - // write all docs in a single operation, update the seq once - return view.db.bulkDocs({docs : docsToPersist}); - }); - }); - } +var _helpers2 = __webpack_require__(761); - function getQueue(view) { - var viewName = typeof view === 'string' ? view : view.name; - var queue = persistentQueues[viewName]; - if (!queue) { - queue = persistentQueues[viewName] = new TaskQueue(); - } - return queue; - } +var _dsl = __webpack_require__(625); - function updateView(view) { - return Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["sequentialize"])(getQueue(view), function () { - return updateViewInQueue(view); - })(); - } +var _mobile = __webpack_require__(762); - function updateViewInQueue(view) { - // bind the emit function once - var mapResults; - var doc; +var _optimize = _interopRequireDefault(__webpack_require__(779)); - function emit(key, value) { - var output = {id: doc._id, key: Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["normalizeKey"])(key)}; - // Don't explicitly store the value unless it's defined and non-null. - // This saves on storage space, because often people don't use it. - if (typeof value !== 'undefined' && value !== null) { - output.value = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["normalizeKey"])(value); - } - mapResults.push(output); - } +var _store = _interopRequireWildcard(__webpack_require__(698)); - var mapFun = mapper(view.mapFun, emit); +var _policies = _interopRequireDefault(__webpack_require__(781)); - var currentSeq = view.seq || 0; +var _Schema = _interopRequireDefault(__webpack_require__(782)); - function processChange(docIdsToChangesAndEmits, seq) { - return function () { - return saveKeyValues(view, docIdsToChangesAndEmits, seq); - }; - } +var _CozyLink = __webpack_require__(692); - var queue = new TaskQueue(); +var _ObservableQuery = _interopRequireDefault(__webpack_require__(788)); - function processNextBatch() { - return view.sourceDB.changes({ - return_docs: true, - conflicts: true, - include_docs: true, - style: 'all_docs', - since: currentSeq, - limit: CHANGES_BATCH_SIZE - }).then(processBatch); - } +var _snapshots = __webpack_require__(789); - function processBatch(response) { - var results = response.results; - if (!results.length) { - return; - } - var docIdsToChangesAndEmits = createDocIdsToChangesAndEmits(results); - queue.add(processChange(docIdsToChangesAndEmits, currentSeq)); - if (results.length < CHANGES_BATCH_SIZE) { - return; - } - return processNextBatch(); - } +var _logger = _interopRequireDefault(__webpack_require__(708)); - function createDocIdsToChangesAndEmits(results) { - var docIdsToChangesAndEmits = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Map"](); - for (var i = 0, len = results.length; i < len; i++) { - var change = results[i]; - if (change.doc._id[0] !== '_') { - mapResults = []; - doc = change.doc; +var _types = __webpack_require__(628); - if (!doc._deleted) { - tryMap(view.sourceDB, mapFun, doc); - } - mapResults.sort(sortByKeyThenValue); +var _queries = __webpack_require__(728); - var indexableKeysToKeyValues = createIndexableKeysToKeyValues(mapResults); - docIdsToChangesAndEmits.set(change.doc._id, [ - indexableKeysToKeyValues, - change.changes - ]); - } - currentSeq = change.seq; - } - return docIdsToChangesAndEmits; - } +var _jsonStableStringify = _interopRequireDefault(__webpack_require__(790)); - function createIndexableKeysToKeyValues(mapResults) { - var indexableKeysToKeyValues = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Map"](); - var lastKey; - for (var i = 0, len = mapResults.length; i < len; i++) { - var emittedKeyValue = mapResults[i]; - var complexKey = [emittedKeyValue.key, emittedKeyValue.id]; - if (i > 0 && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(emittedKeyValue.key, lastKey) === 0) { - complexKey.push(i); // dup key+id, so make it unique - } - indexableKeysToKeyValues.set(Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])(complexKey), emittedKeyValue); - lastKey = emittedKeyValue.key; - } - return indexableKeysToKeyValues; - } +var _promiseCache = _interopRequireDefault(__webpack_require__(794)); - return processNextBatch().then(function () { - return queue.finish(); - }).then(function () { - view.seq = currentSeq; - }); - } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - function reduceView(view, results, options) { - if (options.group_level === 0) { - delete options.group_level; - } +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - var shouldGroup = options.group || options.group_level; +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } - var reduceFun = reducer(view.reduceFun); +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - var groups = []; - var lvl = isNaN(options.group_level) ? Number.POSITIVE_INFINITY : - options.group_level; - results.forEach(function (e) { - var last = groups[groups.length - 1]; - var groupKey = shouldGroup ? e.key : null; +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - // only set group_level for array keys - if (shouldGroup && Array.isArray(groupKey)) { - groupKey = groupKey.slice(0, lvl); - } +var ensureArray = function ensureArray(arr) { + return Array.isArray(arr) ? arr : [arr]; +}; - if (last && Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["collate"])(last.groupKey, groupKey) === 0) { - last.keys.push([e.key, e.id]); - last.values.push(e.value); - return; - } - groups.push({ - keys: [[e.key, e.id]], - values: [e.value], - groupKey: groupKey - }); - }); - results = []; - for (var i = 0, len = groups.length; i < len; i++) { - var e = groups[i]; - var reduceTry = tryReduce(view.sourceDB, reduceFun, e.keys, e.values, false); - if (reduceTry.error && reduceTry.error instanceof pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["BuiltInError"]) { - // CouchDB returns an error if a built-in errors out - throw reduceTry.error; - } - results.push({ - // CouchDB just sets the value to null if a non-built-in errors out - value: reduceTry.error ? null : reduceTry.output, - key: e.groupKey - }); +var deprecatedHandler = function deprecatedHandler(msg) { + return { + get: function get(target, prop) { + console.warn(msg); + return target[prop]; } - // no total_rows/offset when reducing - return {rows: sliceResults(results, options.limit, options.skip)}; - } - - function queryView(view, opts) { - return Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["sequentialize"])(getQueue(view), function () { - return queryViewInQueue(view, opts); - })(); - } + }; +}; - function queryViewInQueue(view, opts) { - var totalRows; - var shouldReduce = view.reduceFun && opts.reduce !== false; - var skip = opts.skip || 0; - if (typeof opts.keys !== 'undefined' && !opts.keys.length) { - // equivalent query - opts.limit = 0; - delete opts.keys; - } +var supportsReferences = function supportsReferences(relationshipClass) { + return relationshipClass.prototype.addReferences && relationshipClass.prototype.removeReferences; +}; - function fetchFromView(viewOpts) { - viewOpts.include_docs = true; - return view.db.allDocs(viewOpts).then(function (res) { - totalRows = res.total_rows; - return res.rows.map(function (result) { +var referencesUnsupportedError = function referencesUnsupportedError(relationshipClassName) { + return new Error("The \"".concat(relationshipClassName, "\" relationship does not support references. If you need to add references to a document, its relationship class must have the methods {add,remove}References")); +}; - // implicit migration - in older versions of PouchDB, - // we explicitly stored the doc as {id: ..., key: ..., value: ...} - // this is tested in a migration test - /* istanbul ignore next */ - if ('value' in result.doc && typeof result.doc.value === 'object' && - result.doc.value !== null) { - var keys = Object.keys(result.doc.value).sort(); - // this detection method is not perfect, but it's unlikely the user - // emitted a value which was an object with these 3 exact keys - var expectedKeys = ['id', 'key', 'value']; - if (!(keys < expectedKeys || keys > expectedKeys)) { - return result.doc.value; - } - } +var DOC_CREATION = 'creation'; +var DOC_UPDATE = 'update'; +/** + * @typedef {object} ClientOptions + * @property {object} [client] + * @property {object} [link] + * @property {object} [links] + * @property {Token} [token] + * @property {string} [uri] + * @property {object} [stackClient] + * @property {boolean} [warningForCustomHandlers] + * @property {boolean} [autoHydrate] + * @property {object} [oauth] + * @property {Function} [onTokenRefresh] + * @property {Function} [onTokenRefresh] + * @property {Link} [link] - Backward compatibility + * @property {Array<Link>} [links] - List of links + * @property {object} [schema] - Schema description for each doctypes + * @property {AppMetadata} [appMetadata] - Metadata about the application that will be used in ensureCozyMetadata + * @property {ClientCapabilities} [capabilities] - Capabilities sent by the stack + * @property {boolean} [store] - If set to false, the client will not instantiate a Redux store automatically. Use this if you want to merge cozy-client's store with your own redux store. See [here](https://docs.cozy.io/en/cozy-client/react-integration/#1b-use-your-own-redux-store) for more information. + */ - var parsedKeyAndDocId = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["parseIndexableString"])(result.doc._id); - return { - key: parsedKeyAndDocId[0], - id: parsedKeyAndDocId[1], - value: ('value' in result.doc ? result.doc.value : null) - }; - }); - }); - } +/** + * Responsible for + * + * - Creating observable queries + * - Hydration + * - Creating plan for saving documents + * - Associations + */ - function onMapResultsReady(rows) { - var finalResults; - if (shouldReduce) { - finalResults = reduceView(view, rows, opts); - } else { - finalResults = { - total_rows: totalRows, - offset: skip, - rows: rows - }; - } - /* istanbul ignore if */ - if (opts.update_seq) { - finalResults.update_seq = view.seq; - } - if (opts.include_docs) { - var docIds = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["uniq"])(rows.map(rowToDocId)); +var CozyClient = /*#__PURE__*/function () { + /** + * @param {ClientOptions} rawOptions - Options + * + * @example + * ```js + * const client = new CozyClient({ + * schema: { + * todos: { + * doctype: 'io.cozy.todos', + * relationships: { + * authors: { + * type: 'has-many', + * doctype: 'io.cozy.persons' + * } + * } + * } + * } + * }) + * ``` + * + * Cozy-Client will automatically call `this.login()` if provided with a token and an uri + */ + function CozyClient() { + var _this = this; - return view.sourceDB.allDocs({ - keys: docIds, - include_docs: true, - conflicts: opts.conflicts, - attachments: opts.attachments, - binary: opts.binary - }).then(function (allDocsRes) { - var docIdsToDocs = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Map"](); - allDocsRes.rows.forEach(function (row) { - docIdsToDocs.set(row.id, row.doc); - }); - rows.forEach(function (row) { - var docId = rowToDocId(row); - var doc = docIdsToDocs.get(docId); - if (doc) { - row.doc = doc; - } - }); - return finalResults; - }); - } else { - return finalResults; - } - } + var rawOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + (0, _classCallCheck2.default)(this, CozyClient); + (0, _defineProperty2.default)(this, "fetchQueryAndGetFromState", /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(query) { + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.prev = 0; + _context.next = 3; + return _this.query(query.definition, query.options); - if (typeof opts.keys !== 'undefined') { - var keys = opts.keys; - var fetchPromises = keys.map(function (key) { - var viewOpts = { - startkey : Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([key]), - endkey : Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([key, {}]) - }; - /* istanbul ignore if */ - if (opts.update_seq) { - viewOpts.update_seq = true; - } - return fetchFromView(viewOpts); - }); - return Promise.all(fetchPromises).then(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["flatten"]).then(onMapResultsReady); - } else { // normal query, no 'keys' - var viewOpts = { - descending : opts.descending - }; - /* istanbul ignore if */ - if (opts.update_seq) { - viewOpts.update_seq = true; - } - var startkey; - var endkey; - if ('start_key' in opts) { - startkey = opts.start_key; - } - if ('startkey' in opts) { - startkey = opts.startkey; - } - if ('end_key' in opts) { - endkey = opts.end_key; - } - if ('endkey' in opts) { - endkey = opts.endkey; - } - if (typeof startkey !== 'undefined') { - viewOpts.startkey = opts.descending ? - Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([startkey, {}]) : - Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([startkey]); - } - if (typeof endkey !== 'undefined') { - var inclusiveEnd = opts.inclusive_end !== false; - if (opts.descending) { - inclusiveEnd = !inclusiveEnd; - } + case 3: + return _context.abrupt("return", _this.getQueryFromState(query.options.as)); - viewOpts.endkey = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])( - inclusiveEnd ? [endkey, {}] : [endkey]); - } - if (typeof opts.key !== 'undefined') { - var keyStart = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([opts.key]); - var keyEnd = Object(pouchdb_collate__WEBPACK_IMPORTED_MODULE_4__["toIndexableString"])([opts.key, {}]); - if (viewOpts.descending) { - viewOpts.endkey = keyStart; - viewOpts.startkey = keyEnd; - } else { - viewOpts.startkey = keyStart; - viewOpts.endkey = keyEnd; - } - } - if (!shouldReduce) { - if (typeof opts.limit === 'number') { - viewOpts.limit = opts.limit; - } - viewOpts.skip = skip; - } - return fetchFromView(viewOpts).then(onMapResultsReady); - } - } + case 6: + _context.prev = 6; + _context.t0 = _context["catch"](0); + throw _context.t0; - function httpViewCleanup(db) { - return db.fetch('_view_cleanup', { - headers: new pouchdb_fetch__WEBPACK_IMPORTED_MODULE_6__["Headers"]({'Content-Type': 'application/json'}), - method: 'POST' - }).then(function (response) { - return response.json(); - }); - } + case 9: + case "end": + return _context.stop(); + } + } + }, _callee, null, [[0, 6]]); + })); - function localViewCleanup(db) { - return db.get('_local/' + localDocName).then(function (metaDoc) { - var docsToViews = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Map"](); - Object.keys(metaDoc.views).forEach(function (fullViewName) { - var parts = parseViewName(fullViewName); - var designDocName = '_design/' + parts[0]; - var viewName = parts[1]; - var views = docsToViews.get(designDocName); - if (!views) { - views = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_2__["Set"](); - docsToViews.set(designDocName, views); - } - views.add(viewName); - }); - var opts = { - keys : Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["mapToKeysArray"])(docsToViews), - include_docs : true + return function (_x) { + return _ref.apply(this, arguments); }; - return db.allDocs(opts).then(function (res) { - var viewsToStatus = {}; - res.rows.forEach(function (row) { - var ddocName = row.key.substring(8); // cuts off '_design/' - docsToViews.get(row.key).forEach(function (viewName) { - var fullViewName = ddocName + '/' + viewName; - /* istanbul ignore if */ - if (!metaDoc.views[fullViewName]) { - // new format, without slashes, to support PouchDB 2.2.0 - // migration test in pouchdb's browser.migration.js verifies this - fullViewName = viewName; - } - var viewDBNames = Object.keys(metaDoc.views[fullViewName]); - // design doc deleted, or view function nonexistent - var statusIsGood = row.doc && row.doc.views && - row.doc.views[viewName]; - viewDBNames.forEach(function (viewDBName) { - viewsToStatus[viewDBName] = - viewsToStatus[viewDBName] || statusIsGood; - }); - }); - }); - var dbsToDelete = Object.keys(viewsToStatus).filter( - function (viewDBName) { return !viewsToStatus[viewDBName]; }); - var destroyPromises = dbsToDelete.map(function (viewDBName) { - return Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["sequentialize"])(getQueue(viewDBName), function () { - return new db.constructor(viewDBName, db.__opts).destroy(); - })(); - }); - return Promise.all(destroyPromises).then(function () { - return {ok: true}; - }); - }); - }, defaultsTo({ok: true})); - } + }()); + var link = rawOptions.link, + links = rawOptions.links, + _rawOptions$schema = rawOptions.schema, + schema = _rawOptions$schema === void 0 ? {} : _rawOptions$schema, + _rawOptions$appMetada = rawOptions.appMetadata, + appMetadata = _rawOptions$appMetada === void 0 ? {} : _rawOptions$appMetada, + capabilities = rawOptions.capabilities, + options = (0, _objectWithoutProperties2.default)(rawOptions, ["link", "links", "schema", "appMetadata", "capabilities"]); - function queryPromised(db, fun, opts) { - /* istanbul ignore next */ - if (typeof db._query === 'function') { - return customQuery(db, fun, opts); - } - if (Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["isRemote"])(db)) { - return httpQuery(db, fun, opts); + if (link) { + console.warn('`link` is deprecated, use `links`'); } - if (typeof fun !== 'string') { - // temp_view - checkQueryParseError(opts, fun); + this.appMetadata = appMetadata; + this.options = options; + this.queryIdGenerator = new _queries.QueryIDGenerator(); + this.isLogged = false; + this.instanceOptions = {}; // Bind handlers - tempViewQueue.add(function () { - var createViewPromise = createView( - /* sourceDB */ db, - /* viewName */ 'temp_view/temp_view', - /* mapFun */ fun.map, - /* reduceFun */ fun.reduce, - /* temporary */ true, - /* localDocName */ localDocName); - return createViewPromise.then(function (view) { - return Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["fin"])(updateView(view).then(function () { - return queryView(view, opts); - }), function () { - return view.db.destroy(); - }); - }); - }); - return tempViewQueue.finish(); - } else { - // persistent view - var fullViewName = fun; - var parts = parseViewName(fullViewName); - var designDocName = parts[0]; - var viewName = parts[1]; - return db.get('_design/' + designDocName).then(function (doc) { - var fun = doc.views && doc.views[viewName]; + this.handleRevocationChange = this.handleRevocationChange.bind(this); + this.handleTokenRefresh = this.handleTokenRefresh.bind(this); + this.createClient(); + var stackClient = this.getStackClient(); + stackClient.on('error', function () { + for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } - if (!fun) { - // basic validator; it's assumed that every subclass would want this - throw new pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["NotFoundError"]('ddoc ' + doc._id + ' has no view named ' + - viewName); - } + return _this.emit.apply(_this, ['error'].concat(args)); + }); + this.links = ensureArray(link || links || new _StackLink.default()); + this.registerClientOnLinks(); + this.chain = (0, _CozyLink.chain)(this.links); + this.schema = new _Schema.default(schema, stackClient); + /** + * @type {ClientCapabilities} + */ - ddocValidator(doc, viewName); - checkQueryParseError(opts, fun); + this.capabilities = capabilities || null; // Instances of plugins registered with registerPlugin - var createViewPromise = createView( - /* sourceDB */ db, - /* viewName */ fullViewName, - /* mapFun */ fun.map, - /* reduceFun */ fun.reduce, - /* temporary */ false, - /* localDocName */ localDocName); - return createViewPromise.then(function (view) { - if (opts.stale === 'ok' || opts.stale === 'update_after') { - if (opts.stale === 'update_after') { - Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["nextTick"])(function () { - updateView(view); - }); - } - return queryView(view, opts); - } else { // stale not ok - return updateView(view).then(function () { - return queryView(view, opts); - }); - } - }); - }); - } - } + this.plugins = {}; - function abstractQuery(fun, opts, callback) { - var db = this; - if (typeof opts === 'function') { - callback = opts; - opts = {}; + try { + this.loadInstanceOptionsFromDOM(); + } catch (err) {// not a critical error, we may be in node or the instance options are not on the default HTML element } - opts = opts ? coerceOptions(opts) : {}; - if (typeof fun === 'function') { - fun = {map : fun}; + if (options.uri && options.token) { + this.login(); } + /** + * @type {object} + */ - var promise = Promise.resolve().then(function () { - return queryPromised(db, fun, opts); - }); - Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["promisedCallback"])(promise, callback); - return promise; - } - var abstractViewCleanup = Object(pouchdb_mapreduce_utils__WEBPACK_IMPORTED_MODULE_7__["callbackify"])(function () { - var db = this; - /* istanbul ignore next */ - if (typeof db._viewCleanup === 'function') { - return customViewCleanup(db); - } - if (Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_0__["isRemote"])(db)) { - return httpViewCleanup(db); + this.storeAccesors = null; + + if (options.store !== false) { + this.ensureStore(); } - return localViewCleanup(db); - }); + /** + * Holds in-flight promises for deduplication purpose + * + * @private + * @type {PromiseCache} + */ - return { - query: abstractQuery, - viewCleanup: abstractViewCleanup - }; -} -/* harmony default export */ __webpack_exports__["default"] = (createAbstractMapReduce); + this._promiseCache = new _promiseCache.default(); + } + /** + * Gets overrided by MicroEE.mixin + * This is here just so typescript does not scream + * + * TODO Find a better way to make TS understand that emit is + * a method from cozy-client + */ -/***/ }), -/* 523 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + (0, _createClass2.default)(CozyClient, [{ + key: "emit", + value: function emit() {} + }, { + key: "on", + value: function on() {} + }, { + key: "removeListener", + value: function removeListener() {} + /** + * A plugin is a class whose constructor receives the client as first argument. + * The main mean of interaction with the client should be with events + * like "login"/"logout". + * + * The plugin system is meant to encourage separation of concerns, modularity + * and testability : instead of registering events at module level, please + * create a plugin that subscribes to events. + * + * Plugin instances are stored internally in the `plugins` attribute of the client + * and can be accessed via this mean. A plugin class must have the attribute + * `pluginName` that will be use as the key in the `plugins` object. + * + * Two plugins with the same `pluginName` cannot co-exist. + * + * @example + * ```js + * class AlertPlugin { + * constructor(client, options) { + * this.client = client + * this.options = options + * this.handleLogin = this.handleLogin.bind(this) + * this.handleLogout = this.handleLogout.bind(this) + * this.client.on("login", this.handleLogin) + * this.client.on("logout", this.handleLogout) + * } + * + * handleLogin() { + * alert(this.options.onLoginAlert) + * } + * + * handleLogout() { + * alert(this.options.onLogoutAlert) + * } + * } + * + * AlertPlugin.pluginName = 'alerts' + * + * client.registerPlugin(AlertPlugin, { + * onLoginAlert: 'client has logged in !', + * onLogoutAlert: 'client has logged out !' + * }) + * + * // the instance of the plugin is accessible via + * client.plugins.alerts + * ``` + */ -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atob", function() { return thisAtob; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "btoa", function() { return thisBtoa; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "base64StringToBlobOrBuffer", function() { return b64ToBluffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "binaryStringToArrayBuffer", function() { return binaryStringToArrayBuffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "binaryStringToBlobOrBuffer", function() { return binStringToBluffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blob", function() { return createBlob; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blobOrBufferToBase64", function() { return blobToBase64; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "blobOrBufferToBinaryString", function() { return blobToBase64$1; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readAsArrayBuffer", function() { return readAsArrayBuffer; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "readAsBinaryString", function() { return readAsBinaryString; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "typedBuffer", function() { return typedBuffer; }); -/* harmony import */ var buffer_from__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(524); -/* harmony import */ var buffer_from__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(buffer_from__WEBPACK_IMPORTED_MODULE_0__); + }, { + key: "registerPlugin", + value: function registerPlugin(Plugin, options) { + if (!Plugin.pluginName) { + throw new Error('Cannot register a plugin whose class does not have `pluginName` attribute.'); + } + if (this.plugins[Plugin.pluginName]) { + throw new Error("Cannot register plugin ".concat(Plugin.pluginName, ". A plugin with the same name has already been registered.")); + } -function thisAtob(str) { - var base64 = new Buffer(str, 'base64'); - // Node.js will just skip the characters it can't decode instead of - // throwing an exception - if (base64.toString('base64') !== str) { - throw new Error("attachment is not a valid base64 string"); - } - return base64.toString('binary'); -} + var instance = new Plugin(this, options); + this.plugins[Plugin.pluginName] = instance; + return instance; + } + /** + * To help with the transition from cozy-client-js to cozy-client, it is possible to instantiate + * a client with a cookie-based instance of cozy-client-js. + * + * @param {OldCozyClient} oldClient - An instance of the deprecated cozy-client + * @returns {CozyClient} + */ -function thisBtoa(str) { - return buffer_from__WEBPACK_IMPORTED_MODULE_0___default()(str, 'binary').toString('base64'); -} + }, { + key: "addSchema", + value: function addSchema(schemaDefinition) { + this.schema.add(schemaDefinition); + } + }, { + key: "registerClientOnLinks", + value: function registerClientOnLinks() { + var _iterator = _createForOfIteratorHelper(this.links), + _step; -function typedBuffer(binString, buffType, type) { - // buffType is either 'binary' or 'base64' - var buff = buffer_from__WEBPACK_IMPORTED_MODULE_0___default()(binString, buffType); - buff.type = type; // non-standard, but used for consistency with the browser - return buff; -} + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var link = _step.value; -function b64ToBluffer(b64, type) { - return typedBuffer(b64, 'base64', type); -} + if (link.registerClient) { + try { + link.registerClient(this); + } catch (e) { + console.warn(e); + } + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + /** + * Notify the links that they can start and set isLogged to true. + * + * On mobile, where url/token are set after instantiation, use this method + * to set the token and uri via options. + * + * Emits + * + * - "beforeLogin" at the beginning, before links have been set up + * - "login" when the client is fully logged in and links have been set up + * + * @param {object} [options] - Options + * @param {string} options.token - If passed, the token is set on the client + * @param {string} options.uri - If passed, the uri is set on the client + * @returns {Promise} - Resolves when all links have been setup and client is fully logged in + * + */ -// From http://stackoverflow.com/questions/14967647/ (continues on next line) -// encode-decode-image-with-base64-breaks-image (2013-04-21) -function binaryStringToArrayBuffer(bin) { - var length = bin.length; - var buf = new ArrayBuffer(length); - var arr = new Uint8Array(buf); - for (var i = 0; i < length; i++) { - arr[i] = bin.charCodeAt(i); - } - return buf; -} + }, { + key: "login", + value: function login(options) { + // Keep the promise to be able to return it in future calls. + // This allows us to autoLogin in constructor without breaking any compatibility + // with codes that uses an explicit login. + if (this.isLogged && !this.isRevoked) { + console.warn("CozyClient is already logged."); + return this.loginPromise; + } -function binStringToBluffer(binString, type) { - return typedBuffer(binString, 'binary', type); -} + return this.loginPromise = this._login(options); + } + }, { + key: "_login", + value: function () { + var _login2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) { + var _iterator2, _step2, link; -// This function is unused in Node -/* istanbul ignore next */ -function createBlob() { -} + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + this.emit('beforeLogin'); + this.registerClientOnLinks(); -function blobToBase64(blobOrBuffer, callback) { - callback(blobOrBuffer.toString('base64')); -} + if (options) { + if (options.uri) { + this.stackClient.setUri(options.uri); + } -// not used in Node, but here for completeness -function blobToBase64$1(blobOrBuffer, callback) { - callback(blobOrBuffer.toString('binary')); -} + if (options.token) { + this.stackClient.setToken(options.token); + } + } -// simplified API. universal browser support is assumed -function readAsArrayBuffer(blob, callback) { - var reader = new FileReader(); - reader.onloadend = function (e) { - var result = e.target.result || new ArrayBuffer(0); - callback(result); - }; - reader.readAsArrayBuffer(blob); -} + _iterator2 = _createForOfIteratorHelper(this.links); + _context2.prev = 4; -//Can't find original post, but this is close -//http://stackoverflow.com/questions/6965107/ (continues on next line) -//converting-between-strings-and-arraybuffers -function arrayBufferToBinaryString(buffer) { - var binary = ''; - var bytes = new Uint8Array(buffer); - var length = bytes.byteLength; - for (var i = 0; i < length; i++) { - binary += String.fromCharCode(bytes[i]); - } - return binary; -} + _iterator2.s(); -// shim for browsers that don't support it -function readAsBinaryString(blob, callback) { - var reader = new FileReader(); - var hasBinaryString = typeof reader.readAsBinaryString === 'function'; - reader.onloadend = function (e) { - var result = e.target.result || ''; - if (hasBinaryString) { - return callback(result); - } - callback(arrayBufferToBinaryString(result)); - }; - if (hasBinaryString) { - reader.readAsBinaryString(blob); - } else { - reader.readAsArrayBuffer(blob); - } -} + case 6: + if ((_step2 = _iterator2.n()).done) { + _context2.next = 13; + break; + } + link = _step2.value; + if (!link.onLogin) { + _context2.next = 11; + break; + } + _context2.next = 11; + return link.onLogin(); -/***/ }), -/* 524 */ -/***/ (function(module, exports) { + case 11: + _context2.next = 6; + break; -var toString = Object.prototype.toString + case 13: + _context2.next = 18; + break; -var isModern = ( - typeof Buffer.alloc === 'function' && - typeof Buffer.allocUnsafe === 'function' && - typeof Buffer.from === 'function' -) + case 15: + _context2.prev = 15; + _context2.t0 = _context2["catch"](4); -function isArrayBuffer (input) { - return toString.call(input).slice(8, -1) === 'ArrayBuffer' -} + _iterator2.e(_context2.t0); -function fromArrayBuffer (obj, byteOffset, length) { - byteOffset >>>= 0 + case 18: + _context2.prev = 18; - var maxLength = obj.byteLength - byteOffset + _iterator2.f(); - if (maxLength < 0) { - throw new RangeError("'offset' is out of bounds") - } - - if (length === undefined) { - length = maxLength - } else { - length >>>= 0 - - if (length > maxLength) { - throw new RangeError("'length' is out of bounds") - } - } - - return isModern - ? Buffer.from(obj.slice(byteOffset, byteOffset + length)) - : new Buffer(new Uint8Array(obj.slice(byteOffset, byteOffset + length))) -} - -function fromString (string, encoding) { - if (typeof encoding !== 'string' || encoding === '') { - encoding = 'utf8' - } - - if (!Buffer.isEncoding(encoding)) { - throw new TypeError('"encoding" must be a valid string encoding') - } - - return isModern - ? Buffer.from(string, encoding) - : new Buffer(string, encoding) -} - -function bufferFrom (value, encodingOrOffset, length) { - if (typeof value === 'number') { - throw new TypeError('"value" argument must not be a number') - } - - if (isArrayBuffer(value)) { - return fromArrayBuffer(value, encodingOrOffset, length) - } - - if (typeof value === 'string') { - return fromString(value, encodingOrOffset) - } - - return isModern - ? Buffer.from(value) - : new Buffer(value) -} - -module.exports = bufferFrom - - -/***/ }), -/* 525 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "uniq", function() { return uniq; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sequentialize", function() { return sequentialize; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "fin", function() { return fin; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "callbackify", function() { return callbackify; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "promisedCallback", function() { return promisedCallback; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapToKeysArray", function() { return mapToKeysArray; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "QueryParseError", function() { return QueryParseError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "NotFoundError", function() { return NotFoundError; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BuiltInError", function() { return BuiltInError; }); -/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(526); -/* harmony import */ var inherits__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(inherits__WEBPACK_IMPORTED_MODULE_0__); -/* harmony import */ var pouchdb_collections__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(509); -/* harmony import */ var argsarray__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(495); -/* harmony import */ var argsarray__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(argsarray__WEBPACK_IMPORTED_MODULE_2__); -/* harmony import */ var pouchdb_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(507); - - - - - -function QueryParseError(message) { - this.status = 400; - this.name = 'query_parse_error'; - this.message = message; - this.error = true; - try { - Error.captureStackTrace(this, QueryParseError); - } catch (e) {} -} - -inherits__WEBPACK_IMPORTED_MODULE_0___default()(QueryParseError, Error); - -function NotFoundError(message) { - this.status = 404; - this.name = 'not_found'; - this.message = message; - this.error = true; - try { - Error.captureStackTrace(this, NotFoundError); - } catch (e) {} -} - -inherits__WEBPACK_IMPORTED_MODULE_0___default()(NotFoundError, Error); - -function BuiltInError(message) { - this.status = 500; - this.name = 'invalid_value'; - this.message = message; - this.error = true; - try { - Error.captureStackTrace(this, BuiltInError); - } catch (e) {} -} - -inherits__WEBPACK_IMPORTED_MODULE_0___default()(BuiltInError, Error); - -function promisedCallback(promise, callback) { - if (callback) { - promise.then(function (res) { - Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_3__["nextTick"])(function () { - callback(null, res); - }); - }, function (reason) { - Object(pouchdb_utils__WEBPACK_IMPORTED_MODULE_3__["nextTick"])(function () { - callback(reason); - }); - }); - } - return promise; -} - -function callbackify(fun) { - return argsarray__WEBPACK_IMPORTED_MODULE_2___default()(function (args) { - var cb = args.pop(); - var promise = fun.apply(this, args); - if (typeof cb === 'function') { - promisedCallback(promise, cb); - } - return promise; - }); -} - -// Promise finally util similar to Q.finally -function fin(promise, finalPromiseFactory) { - return promise.then(function (res) { - return finalPromiseFactory().then(function () { - return res; - }); - }, function (reason) { - return finalPromiseFactory().then(function () { - throw reason; - }); - }); -} - -function sequentialize(queue, promiseFactory) { - return function () { - var args = arguments; - var that = this; - return queue.add(function () { - return promiseFactory.apply(that, args); - }); - }; -} - -// uniq an array of strings, order not guaranteed -// similar to underscore/lodash _.uniq -function uniq(arr) { - var theSet = new pouchdb_collections__WEBPACK_IMPORTED_MODULE_1__["Set"](arr); - var result = new Array(theSet.size); - var index = -1; - theSet.forEach(function (value) { - result[++index] = value; - }); - return result; -} - -function mapToKeysArray(map) { - var result = new Array(map.size); - var index = -1; - map.forEach(function (value, key) { - result[++index] = key; - }); - return result; -} - - - - -/***/ }), -/* 526 */ -/***/ (function(module, exports, __webpack_require__) { - -try { - var util = __webpack_require__(9); - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - module.exports = __webpack_require__(527); -} - - -/***/ }), -/* 527 */ -/***/ (function(module, exports) { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }); - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } -} - - -/***/ }), -/* 528 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireWildcard = __webpack_require__(529); - -var _interopRequireDefault = __webpack_require__(531); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var _exportNames = { - CozyLink: true, - StackLink: true, - compose: true, - QueryDefinition: true, - Mutations: true, - MutationTypes: true, - getDoctypeFromOperation: true, - Q: true, - Association: true, - HasMany: true, - HasOne: true, - HasOneInPlace: true, - HasManyInPlace: true, - HasManyTriggers: true, - dehydrate: true, - generateWebLink: true, - cancelable: true, - getQueryFromState: true, - Registry: true, - manifest: true, - BulkEditError: true, - models: true -}; -Object.defineProperty(exports, "default", { - enumerable: true, - get: function get() { - return _CozyClient.default; - } -}); -Object.defineProperty(exports, "CozyLink", { - enumerable: true, - get: function get() { - return _CozyLink.default; - } -}); -Object.defineProperty(exports, "StackLink", { - enumerable: true, - get: function get() { - return _StackLink.default; - } -}); -Object.defineProperty(exports, "compose", { - enumerable: true, - get: function get() { - return _flow.default; - } -}); -Object.defineProperty(exports, "QueryDefinition", { - enumerable: true, - get: function get() { - return _dsl.QueryDefinition; - } -}); -Object.defineProperty(exports, "Mutations", { - enumerable: true, - get: function get() { - return _dsl.Mutations; - } -}); -Object.defineProperty(exports, "MutationTypes", { - enumerable: true, - get: function get() { - return _dsl.MutationTypes; - } -}); -Object.defineProperty(exports, "getDoctypeFromOperation", { - enumerable: true, - get: function get() { - return _dsl.getDoctypeFromOperation; - } -}); -Object.defineProperty(exports, "Q", { - enumerable: true, - get: function get() { - return _dsl.Q; - } -}); -Object.defineProperty(exports, "Association", { - enumerable: true, - get: function get() { - return _associations.Association; - } -}); -Object.defineProperty(exports, "HasMany", { - enumerable: true, - get: function get() { - return _associations.HasMany; - } -}); -Object.defineProperty(exports, "HasOne", { - enumerable: true, - get: function get() { - return _associations.HasOne; - } -}); -Object.defineProperty(exports, "HasOneInPlace", { - enumerable: true, - get: function get() { - return _associations.HasOneInPlace; - } -}); -Object.defineProperty(exports, "HasManyInPlace", { - enumerable: true, - get: function get() { - return _associations.HasManyInPlace; - } -}); -Object.defineProperty(exports, "HasManyTriggers", { - enumerable: true, - get: function get() { - return _associations.HasManyTriggers; - } -}); -Object.defineProperty(exports, "dehydrate", { - enumerable: true, - get: function get() { - return _helpers.dehydrate; - } -}); -Object.defineProperty(exports, "generateWebLink", { - enumerable: true, - get: function get() { - return _helpers.generateWebLink; - } -}); -Object.defineProperty(exports, "cancelable", { - enumerable: true, - get: function get() { - return _utils.cancelable; - } -}); -Object.defineProperty(exports, "getQueryFromState", { - enumerable: true, - get: function get() { - return _store.getQueryFromState; - } -}); -Object.defineProperty(exports, "Registry", { - enumerable: true, - get: function get() { - return _registry.default; - } -}); -Object.defineProperty(exports, "BulkEditError", { - enumerable: true, - get: function get() { - return _errors.BulkEditError; - } -}); -exports.models = exports.manifest = void 0; - -var _CozyClient = _interopRequireDefault(__webpack_require__(532)); - -var _CozyLink = _interopRequireDefault(__webpack_require__(693)); - -var _StackLink = _interopRequireDefault(__webpack_require__(692)); - -var _flow = _interopRequireDefault(__webpack_require__(796)); - -var _dsl = __webpack_require__(626); - -var _associations = __webpack_require__(697); - -var _helpers = __webpack_require__(762); - -var _utils = __webpack_require__(808); - -var _store = __webpack_require__(699); - -var _registry = _interopRequireDefault(__webpack_require__(615)); - -var manifest = _interopRequireWildcard(__webpack_require__(809)); - -exports.manifest = manifest; - -var _mock = __webpack_require__(810); - -Object.keys(_mock).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - if (key in exports && exports[key] === _mock[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _mock[key]; - } - }); -}); - -var _errors = __webpack_require__(694); - -var _cli = __webpack_require__(811); - -Object.keys(_cli).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - if (key in exports && exports[key] === _cli[key]) return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _cli[key]; - } - }); -}); - -var models = _interopRequireWildcard(__webpack_require__(818)); - -exports.models = models; - -/***/ }), -/* 529 */ -/***/ (function(module, exports, __webpack_require__) { - -var _typeof = __webpack_require__(530)["default"]; - -function _getRequireWildcardCache() { - if (typeof WeakMap !== "function") return null; - var cache = new WeakMap(); - - _getRequireWildcardCache = function _getRequireWildcardCache() { - return cache; - }; - - return cache; -} - -function _interopRequireWildcard(obj) { - if (obj && obj.__esModule) { - return obj; - } - - if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { - return { - "default": obj - }; - } - - var cache = _getRequireWildcardCache(); - - if (cache && cache.has(obj)) { - return cache.get(obj); - } - - var newObj = {}; - var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; - - for (var key in obj) { - if (Object.prototype.hasOwnProperty.call(obj, key)) { - var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; - - if (desc && (desc.get || desc.set)) { - Object.defineProperty(newObj, key, desc); - } else { - newObj[key] = obj[key]; - } - } - } - - newObj["default"] = obj; - - if (cache) { - cache.set(obj, newObj); - } - - return newObj; -} - -module.exports = _interopRequireWildcard; -module.exports["default"] = module.exports, module.exports.__esModule = true; - -/***/ }), -/* 530 */ -/***/ (function(module, exports) { - -function _typeof(obj) { - "@babel/helpers - typeof"; - - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - module.exports = _typeof = function _typeof(obj) { - return typeof obj; - }; - - module.exports["default"] = module.exports, module.exports.__esModule = true; - } else { - module.exports = _typeof = function _typeof(obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - - module.exports["default"] = module.exports, module.exports.__esModule = true; - } - - return _typeof(obj); -} - -module.exports = _typeof; -module.exports["default"] = module.exports, module.exports.__esModule = true; - -/***/ }), -/* 531 */ -/***/ (function(module, exports) { - -function _interopRequireDefault(obj) { - return obj && obj.__esModule ? obj : { - "default": obj - }; -} - -module.exports = _interopRequireDefault; -module.exports["default"] = module.exports, module.exports.__esModule = true; - -/***/ }), -/* 532 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireWildcard = __webpack_require__(529); - -var _interopRequireDefault = __webpack_require__(531); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _toArray2 = _interopRequireDefault(__webpack_require__(533)); - -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(539)); - -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); - -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); - -var _regenerator = _interopRequireDefault(__webpack_require__(546)); - -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); - -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); - -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); - -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); - -var _mapValues = _interopRequireDefault(__webpack_require__(552)); - -var _fromPairs = _interopRequireDefault(__webpack_require__(558)); - -var _flatten = _interopRequireDefault(__webpack_require__(559)); - -var _uniqBy = _interopRequireDefault(__webpack_require__(412)); - -var _zip = _interopRequireDefault(__webpack_require__(562)); - -var _forEach = _interopRequireDefault(__webpack_require__(572)); - -var _get = _interopRequireDefault(__webpack_require__(370)); - -var _microee = _interopRequireDefault(__webpack_require__(577)); - -var _cozyStackClient = _interopRequireWildcard(__webpack_require__(578)); - -var _const = __webpack_require__(691); - -var _StackLink = _interopRequireDefault(__webpack_require__(692)); - -var _associations = __webpack_require__(697); - -var _helpers = __webpack_require__(761); - -var _helpers2 = __webpack_require__(762); - -var _dsl = __webpack_require__(626); - -var _mobile = __webpack_require__(763); - -var _optimize = _interopRequireDefault(__webpack_require__(780)); - -var _store = _interopRequireWildcard(__webpack_require__(699)); - -var _policies = _interopRequireDefault(__webpack_require__(782)); - -var _Schema = _interopRequireDefault(__webpack_require__(783)); - -var _CozyLink = __webpack_require__(693); - -var _ObservableQuery = _interopRequireDefault(__webpack_require__(789)); - -var _snapshots = __webpack_require__(790); - -var _logger = _interopRequireDefault(__webpack_require__(709)); - -var _types = __webpack_require__(629); - -var _queries = __webpack_require__(729); - -var _jsonStableStringify = _interopRequireDefault(__webpack_require__(791)); - -var _promiseCache = _interopRequireDefault(__webpack_require__(795)); - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } - -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } - -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } - -var ensureArray = function ensureArray(arr) { - return Array.isArray(arr) ? arr : [arr]; -}; - -var deprecatedHandler = function deprecatedHandler(msg) { - return { - get: function get(target, prop) { - console.warn(msg); - return target[prop]; - } - }; -}; - -var supportsReferences = function supportsReferences(relationshipClass) { - return relationshipClass.prototype.addReferences && relationshipClass.prototype.removeReferences; -}; - -var referencesUnsupportedError = function referencesUnsupportedError(relationshipClassName) { - return new Error("The \"".concat(relationshipClassName, "\" relationship does not support references. If you need to add references to a document, its relationship class must have the methods {add,remove}References")); -}; - -var DOC_CREATION = 'creation'; -var DOC_UPDATE = 'update'; -/** - * @typedef {object} ClientOptions - * @property {object} [client] - * @property {object} [link] - * @property {object} [links] - * @property {Token} [token] - * @property {string} [uri] - * @property {object} [stackClient] - * @property {boolean} [warningForCustomHandlers] - * @property {boolean} [autoHydrate] - * @property {object} [oauth] - * @property {Function} [onTokenRefresh] - * @property {Function} [onTokenRefresh] - * @property {Link} [link] - Backward compatibility - * @property {Array<Link>} [links] - List of links - * @property {object} [schema] - Schema description for each doctypes - * @property {AppMetadata} [appMetadata] - Metadata about the application that will be used in ensureCozyMetadata - * @property {ClientCapabilities} [capabilities] - Capabilities sent by the stack - * @property {boolean} [store] - If set to false, the client will not instantiate a Redux store automatically. Use this if you want to merge cozy-client's store with your own redux store. See [here](https://docs.cozy.io/en/cozy-client/react-integration/#1b-use-your-own-redux-store) for more information. - */ - -/** - * Responsible for - * - * - Creating observable queries - * - Hydration - * - Creating plan for saving documents - * - Associations - */ - -var CozyClient = /*#__PURE__*/function () { - /** - * @param {ClientOptions} rawOptions - Options - * - * @example - * ```js - * const client = new CozyClient({ - * schema: { - * todos: { - * doctype: 'io.cozy.todos', - * relationships: { - * authors: { - * type: 'has-many', - * doctype: 'io.cozy.persons' - * } - * } - * } - * } - * }) - * ``` - * - * Cozy-Client will automatically call `this.login()` if provided with a token and an uri - */ - function CozyClient() { - var _this = this; - - var rawOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; - (0, _classCallCheck2.default)(this, CozyClient); - (0, _defineProperty2.default)(this, "fetchQueryAndGetFromState", /*#__PURE__*/function () { - var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(query) { - return _regenerator.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.prev = 0; - _context.next = 3; - return _this.query(query.definition, query.options); - - case 3: - return _context.abrupt("return", _this.getQueryFromState(query.options.as)); - - case 6: - _context.prev = 6; - _context.t0 = _context["catch"](0); - throw _context.t0; - - case 9: - case "end": - return _context.stop(); - } - } - }, _callee, null, [[0, 6]]); - })); - - return function (_x) { - return _ref.apply(this, arguments); - }; - }()); - var link = rawOptions.link, - links = rawOptions.links, - _rawOptions$schema = rawOptions.schema, - schema = _rawOptions$schema === void 0 ? {} : _rawOptions$schema, - _rawOptions$appMetada = rawOptions.appMetadata, - appMetadata = _rawOptions$appMetada === void 0 ? {} : _rawOptions$appMetada, - capabilities = rawOptions.capabilities, - options = (0, _objectWithoutProperties2.default)(rawOptions, ["link", "links", "schema", "appMetadata", "capabilities"]); - - if (link) { - console.warn('`link` is deprecated, use `links`'); - } - - this.appMetadata = appMetadata; - this.options = options; - this.queryIdGenerator = new _queries.QueryIDGenerator(); - this.isLogged = false; - this.instanceOptions = {}; // Bind handlers - - this.handleRevocationChange = this.handleRevocationChange.bind(this); - this.handleTokenRefresh = this.handleTokenRefresh.bind(this); - this.createClient(); - var stackClient = this.getStackClient(); - stackClient.on('error', function () { - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return _this.emit.apply(_this, ['error'].concat(args)); - }); - this.links = ensureArray(link || links || new _StackLink.default()); - this.registerClientOnLinks(); - this.chain = (0, _CozyLink.chain)(this.links); - this.schema = new _Schema.default(schema, stackClient); - /** - * @type {ClientCapabilities} - */ - - this.capabilities = capabilities || null; // Instances of plugins registered with registerPlugin - - this.plugins = {}; - - try { - this.loadInstanceOptionsFromDOM(); - } catch (err) {// not a critical error, we may be in node or the instance options are not on the default HTML element - } - - if (options.uri && options.token) { - this.login(); - } - /** - * @type {object} - */ - - - this.storeAccesors = null; - - if (options.store !== false) { - this.ensureStore(); - } - /** - * Holds in-flight promises for deduplication purpose - * - * @private - * @type {PromiseCache} - */ - - - this._promiseCache = new _promiseCache.default(); - } - /** - * Gets overrided by MicroEE.mixin - * This is here just so typescript does not scream - * - * TODO Find a better way to make TS understand that emit is - * a method from cozy-client - */ - - - (0, _createClass2.default)(CozyClient, [{ - key: "emit", - value: function emit() {} - }, { - key: "on", - value: function on() {} - }, { - key: "removeListener", - value: function removeListener() {} - /** - * A plugin is a class whose constructor receives the client as first argument. - * The main mean of interaction with the client should be with events - * like "login"/"logout". - * - * The plugin system is meant to encourage separation of concerns, modularity - * and testability : instead of registering events at module level, please - * create a plugin that subscribes to events. - * - * Plugin instances are stored internally in the `plugins` attribute of the client - * and can be accessed via this mean. A plugin class must have the attribute - * `pluginName` that will be use as the key in the `plugins` object. - * - * Two plugins with the same `pluginName` cannot co-exist. - * - * @example - * ```js - * class AlertPlugin { - * constructor(client, options) { - * this.client = client - * this.options = options - * this.handleLogin = this.handleLogin.bind(this) - * this.handleLogout = this.handleLogout.bind(this) - * this.client.on("login", this.handleLogin) - * this.client.on("logout", this.handleLogout) - * } - * - * handleLogin() { - * alert(this.options.onLoginAlert) - * } - * - * handleLogout() { - * alert(this.options.onLogoutAlert) - * } - * } - * - * AlertPlugin.pluginName = 'alerts' - * - * client.registerPlugin(AlertPlugin, { - * onLoginAlert: 'client has logged in !', - * onLogoutAlert: 'client has logged out !' - * }) - * - * // the instance of the plugin is accessible via - * client.plugins.alerts - * ``` - */ - - }, { - key: "registerPlugin", - value: function registerPlugin(Plugin, options) { - if (!Plugin.pluginName) { - throw new Error('Cannot register a plugin whose class does not have `pluginName` attribute.'); - } - - if (this.plugins[Plugin.pluginName]) { - throw new Error("Cannot register plugin ".concat(Plugin.pluginName, ". A plugin with the same name has already been registered.")); - } - - var instance = new Plugin(this, options); - this.plugins[Plugin.pluginName] = instance; - return instance; - } - /** - * To help with the transition from cozy-client-js to cozy-client, it is possible to instantiate - * a client with a cookie-based instance of cozy-client-js. - * - * @param {OldCozyClient} oldClient - An instance of the deprecated cozy-client - * @returns {CozyClient} - */ - - }, { - key: "addSchema", - value: function addSchema(schemaDefinition) { - this.schema.add(schemaDefinition); - } - }, { - key: "registerClientOnLinks", - value: function registerClientOnLinks() { - var _iterator = _createForOfIteratorHelper(this.links), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var link = _step.value; - - if (link.registerClient) { - try { - link.registerClient(this); - } catch (e) { - console.warn(e); - } - } - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } - /** - * Notify the links that they can start and set isLogged to true. - * - * On mobile, where url/token are set after instantiation, use this method - * to set the token and uri via options. - * - * Emits - * - * - "beforeLogin" at the beginning, before links have been set up - * - "login" when the client is fully logged in and links have been set up - * - * @param {object} [options] - Options - * @param {string} options.token - If passed, the token is set on the client - * @param {string} options.uri - If passed, the uri is set on the client - * @returns {Promise} - Resolves when all links have been setup and client is fully logged in - * - */ - - }, { - key: "login", - value: function login(options) { - // Keep the promise to be able to return it in future calls. - // This allows us to autoLogin in constructor without breaking any compatibility - // with codes that uses an explicit login. - if (this.isLogged && !this.isRevoked) { - console.warn("CozyClient is already logged."); - return this.loginPromise; - } - - return this.loginPromise = this._login(options); - } - }, { - key: "_login", - value: function () { - var _login2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(options) { - var _iterator2, _step2, link; - - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - this.emit('beforeLogin'); - this.registerClientOnLinks(); - - if (options) { - if (options.uri) { - this.stackClient.setUri(options.uri); - } - - if (options.token) { - this.stackClient.setToken(options.token); - } - } - - _iterator2 = _createForOfIteratorHelper(this.links); - _context2.prev = 4; - - _iterator2.s(); - - case 6: - if ((_step2 = _iterator2.n()).done) { - _context2.next = 13; - break; - } - - link = _step2.value; - - if (!link.onLogin) { - _context2.next = 11; - break; - } - - _context2.next = 11; - return link.onLogin(); - - case 11: - _context2.next = 6; - break; - - case 13: - _context2.next = 18; - break; - - case 15: - _context2.prev = 15; - _context2.t0 = _context2["catch"](4); - - _iterator2.e(_context2.t0); - - case 18: - _context2.prev = 18; - - _iterator2.f(); - - return _context2.finish(18); + return _context2.finish(18); case 21: this.isLogged = true; @@ -93856,16 +92203,16 @@ var _default = CozyClient; exports.default = _default; /***/ }), -/* 533 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { -var arrayWithHoles = __webpack_require__(534); +var arrayWithHoles = __webpack_require__(533); -var iterableToArray = __webpack_require__(535); +var iterableToArray = __webpack_require__(534); -var unsupportedIterableToArray = __webpack_require__(536); +var unsupportedIterableToArray = __webpack_require__(535); -var nonIterableRest = __webpack_require__(538); +var nonIterableRest = __webpack_require__(537); function _toArray(arr) { return arrayWithHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableRest(); @@ -93875,7 +92222,7 @@ module.exports = _toArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 534 */ +/* 533 */ /***/ (function(module, exports) { function _arrayWithHoles(arr) { @@ -93886,7 +92233,7 @@ module.exports = _arrayWithHoles; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 535 */ +/* 534 */ /***/ (function(module, exports) { function _iterableToArray(iter) { @@ -93897,10 +92244,10 @@ module.exports = _iterableToArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 536 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { -var arrayLikeToArray = __webpack_require__(537); +var arrayLikeToArray = __webpack_require__(536); function _unsupportedIterableToArray(o, minLen) { if (!o) return; @@ -93915,7 +92262,7 @@ module.exports = _unsupportedIterableToArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 537 */ +/* 536 */ /***/ (function(module, exports) { function _arrayLikeToArray(arr, len) { @@ -93932,7 +92279,7 @@ module.exports = _arrayLikeToArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 538 */ +/* 537 */ /***/ (function(module, exports) { function _nonIterableRest() { @@ -93943,16 +92290,16 @@ module.exports = _nonIterableRest; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 539 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { -var arrayWithHoles = __webpack_require__(534); +var arrayWithHoles = __webpack_require__(533); -var iterableToArrayLimit = __webpack_require__(540); +var iterableToArrayLimit = __webpack_require__(539); -var unsupportedIterableToArray = __webpack_require__(536); +var unsupportedIterableToArray = __webpack_require__(535); -var nonIterableRest = __webpack_require__(538); +var nonIterableRest = __webpack_require__(537); function _slicedToArray(arr, i) { return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest(); @@ -93962,7 +92309,7 @@ module.exports = _slicedToArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 540 */ +/* 539 */ /***/ (function(module, exports) { function _iterableToArrayLimit(arr, i) { @@ -93996,16 +92343,16 @@ module.exports = _iterableToArrayLimit; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 541 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { -var arrayWithoutHoles = __webpack_require__(542); +var arrayWithoutHoles = __webpack_require__(541); -var iterableToArray = __webpack_require__(535); +var iterableToArray = __webpack_require__(534); -var unsupportedIterableToArray = __webpack_require__(536); +var unsupportedIterableToArray = __webpack_require__(535); -var nonIterableSpread = __webpack_require__(543); +var nonIterableSpread = __webpack_require__(542); function _toConsumableArray(arr) { return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread(); @@ -94015,10 +92362,10 @@ module.exports = _toConsumableArray; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 542 */ +/* 541 */ /***/ (function(module, exports, __webpack_require__) { -var arrayLikeToArray = __webpack_require__(537); +var arrayLikeToArray = __webpack_require__(536); function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return arrayLikeToArray(arr); @@ -94028,7 +92375,7 @@ module.exports = _arrayWithoutHoles; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 543 */ +/* 542 */ /***/ (function(module, exports) { function _nonIterableSpread() { @@ -94039,10 +92386,10 @@ module.exports = _nonIterableSpread; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 544 */ +/* 543 */ /***/ (function(module, exports, __webpack_require__) { -var objectWithoutPropertiesLoose = __webpack_require__(545); +var objectWithoutPropertiesLoose = __webpack_require__(544); function _objectWithoutProperties(source, excluded) { if (source == null) return {}; @@ -94067,7 +92414,7 @@ module.exports = _objectWithoutProperties; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 545 */ +/* 544 */ /***/ (function(module, exports) { function _objectWithoutPropertiesLoose(source, excluded) { @@ -94089,14 +92436,14 @@ module.exports = _objectWithoutPropertiesLoose; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 546 */ +/* 545 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(547); +module.exports = __webpack_require__(546); /***/ }), -/* 547 */ +/* 546 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94850,7 +93197,7 @@ try { /***/ }), -/* 548 */ +/* 547 */ /***/ (function(module, exports) { function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { @@ -94893,7 +93240,7 @@ module.exports = _asyncToGenerator; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 549 */ +/* 548 */ /***/ (function(module, exports) { function _classCallCheck(instance, Constructor) { @@ -94906,7 +93253,7 @@ module.exports = _classCallCheck; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 550 */ +/* 549 */ /***/ (function(module, exports) { function _defineProperties(target, props) { @@ -94929,7 +93276,7 @@ module.exports = _createClass; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 551 */ +/* 550 */ /***/ (function(module, exports) { function _defineProperty(obj, key, value) { @@ -94951,11 +93298,11 @@ module.exports = _defineProperty; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 552 */ +/* 551 */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(553), - baseForOwn = __webpack_require__(555), +var baseAssignValue = __webpack_require__(552), + baseForOwn = __webpack_require__(554), baseIteratee = __webpack_require__(413); /** @@ -95000,10 +93347,10 @@ module.exports = mapValues; /***/ }), -/* 553 */ +/* 552 */ /***/ (function(module, exports, __webpack_require__) { -var defineProperty = __webpack_require__(554); +var defineProperty = __webpack_require__(553); /** * The base implementation of `assignValue` and `assignMergeValue` without @@ -95031,7 +93378,7 @@ module.exports = baseAssignValue; /***/ }), -/* 554 */ +/* 553 */ /***/ (function(module, exports, __webpack_require__) { var getNative = __webpack_require__(383); @@ -95048,10 +93395,10 @@ module.exports = defineProperty; /***/ }), -/* 555 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { -var baseFor = __webpack_require__(556), +var baseFor = __webpack_require__(555), keys = __webpack_require__(441); /** @@ -95070,10 +93417,10 @@ module.exports = baseForOwn; /***/ }), -/* 556 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { -var createBaseFor = __webpack_require__(557); +var createBaseFor = __webpack_require__(556); /** * The base implementation of `baseForOwn` which iterates over `object` @@ -95092,7 +93439,7 @@ module.exports = baseFor; /***/ }), -/* 557 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -95123,7 +93470,7 @@ module.exports = createBaseFor; /***/ }), -/* 558 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -95157,10 +93504,10 @@ module.exports = fromPairs; /***/ }), -/* 559 */ +/* 558 */ /***/ (function(module, exports, __webpack_require__) { -var baseFlatten = __webpack_require__(560); +var baseFlatten = __webpack_require__(559); /** * Flattens `array` a single level deep. @@ -95185,11 +93532,11 @@ module.exports = flatten; /***/ }), -/* 560 */ +/* 559 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(437), - isFlattenable = __webpack_require__(561); + isFlattenable = __webpack_require__(560); /** * The base implementation of `_.flatten` with support for restricting flattening. @@ -95229,7 +93576,7 @@ module.exports = baseFlatten; /***/ }), -/* 561 */ +/* 560 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(67), @@ -95255,11 +93602,11 @@ module.exports = isFlattenable; /***/ }), -/* 562 */ +/* 561 */ /***/ (function(module, exports, __webpack_require__) { -var baseRest = __webpack_require__(563), - unzip = __webpack_require__(570); +var baseRest = __webpack_require__(562), + unzip = __webpack_require__(569); /** * Creates an array of grouped elements, the first of which contains the @@ -95283,12 +93630,12 @@ module.exports = zip; /***/ }), -/* 563 */ +/* 562 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(471), - overRest = __webpack_require__(564), - setToString = __webpack_require__(566); + overRest = __webpack_require__(563), + setToString = __webpack_require__(565); /** * The base implementation of `_.rest` which doesn't validate or coerce arguments. @@ -95306,10 +93653,10 @@ module.exports = baseRest; /***/ }), -/* 564 */ +/* 563 */ /***/ (function(module, exports, __webpack_require__) { -var apply = __webpack_require__(565); +var apply = __webpack_require__(564); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; @@ -95348,7 +93695,7 @@ module.exports = overRest; /***/ }), -/* 565 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -95375,11 +93722,11 @@ module.exports = apply; /***/ }), -/* 566 */ +/* 565 */ /***/ (function(module, exports, __webpack_require__) { -var baseSetToString = __webpack_require__(567), - shortOut = __webpack_require__(569); +var baseSetToString = __webpack_require__(566), + shortOut = __webpack_require__(568); /** * Sets the `toString` method of `func` to return `string`. @@ -95395,11 +93742,11 @@ module.exports = setToString; /***/ }), -/* 567 */ +/* 566 */ /***/ (function(module, exports, __webpack_require__) { -var constant = __webpack_require__(568), - defineProperty = __webpack_require__(554), +var constant = __webpack_require__(567), + defineProperty = __webpack_require__(553), identity = __webpack_require__(471); /** @@ -95423,7 +93770,7 @@ module.exports = baseSetToString; /***/ }), -/* 568 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -95455,7 +93802,7 @@ module.exports = constant; /***/ }), -/* 569 */ +/* 568 */ /***/ (function(module, exports) { /** Used to detect hot functions by number of calls within a span of milliseconds. */ @@ -95498,14 +93845,14 @@ module.exports = shortOut; /***/ }), -/* 570 */ +/* 569 */ /***/ (function(module, exports, __webpack_require__) { var arrayFilter = __webpack_require__(439), arrayMap = __webpack_require__(410), baseProperty = __webpack_require__(473), baseTimes = __webpack_require__(443), - isArrayLikeObject = __webpack_require__(571); + isArrayLikeObject = __webpack_require__(570); /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeMax = Math.max; @@ -95549,7 +93896,7 @@ module.exports = unzip; /***/ }), -/* 571 */ +/* 570 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(458), @@ -95588,12 +93935,12 @@ module.exports = isArrayLikeObject; /***/ }), -/* 572 */ +/* 571 */ /***/ (function(module, exports, __webpack_require__) { -var arrayEach = __webpack_require__(573), - baseEach = __webpack_require__(574), - castFunction = __webpack_require__(576), +var arrayEach = __webpack_require__(572), + baseEach = __webpack_require__(573), + castFunction = __webpack_require__(575), isArray = __webpack_require__(75); /** @@ -95635,7 +93982,7 @@ module.exports = forEach; /***/ }), -/* 573 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -95663,11 +94010,11 @@ module.exports = arrayEach; /***/ }), -/* 574 */ +/* 573 */ /***/ (function(module, exports, __webpack_require__) { -var baseForOwn = __webpack_require__(555), - createBaseEach = __webpack_require__(575); +var baseForOwn = __webpack_require__(554), + createBaseEach = __webpack_require__(574); /** * The base implementation of `_.forEach` without support for iteratee shorthands. @@ -95683,7 +94030,7 @@ module.exports = baseEach; /***/ }), -/* 575 */ +/* 574 */ /***/ (function(module, exports, __webpack_require__) { var isArrayLike = __webpack_require__(458); @@ -95721,7 +94068,7 @@ module.exports = createBaseEach; /***/ }), -/* 576 */ +/* 575 */ /***/ (function(module, exports, __webpack_require__) { var identity = __webpack_require__(471); @@ -95741,7 +94088,7 @@ module.exports = castFunction; /***/ }), -/* 577 */ +/* 576 */ /***/ (function(module, exports) { function M() { this._events = {}; } @@ -95797,15 +94144,15 @@ module.exports = M; /***/ }), -/* 578 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true @@ -95841,79 +94188,79 @@ Object.defineProperty(exports, "normalizeDoc", { } }); -var _CozyStackClient = _interopRequireDefault(__webpack_require__(579)); +var _CozyStackClient = _interopRequireDefault(__webpack_require__(578)); -var _OAuthClient = _interopRequireDefault(__webpack_require__(690)); +var _OAuthClient = _interopRequireDefault(__webpack_require__(689)); -var _errors = _interopRequireWildcard(__webpack_require__(659)); +var _errors = _interopRequireWildcard(__webpack_require__(658)); -var _DocumentCollection = __webpack_require__(620); +var _DocumentCollection = __webpack_require__(619); /***/ }), -/* 579 */ +/* 578 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _cloneDeep = _interopRequireDefault(__webpack_require__(580)); +var _cloneDeep = _interopRequireDefault(__webpack_require__(579)); -var _AppCollection = _interopRequireWildcard(__webpack_require__(609)); +var _AppCollection = _interopRequireWildcard(__webpack_require__(608)); -var _AppToken = _interopRequireDefault(__webpack_require__(664)); +var _AppToken = _interopRequireDefault(__webpack_require__(663)); -var _AccessToken = _interopRequireDefault(__webpack_require__(665)); +var _AccessToken = _interopRequireDefault(__webpack_require__(664)); -var _DocumentCollection = _interopRequireDefault(__webpack_require__(620)); +var _DocumentCollection = _interopRequireDefault(__webpack_require__(619)); -var _FileCollection = _interopRequireDefault(__webpack_require__(666)); +var _FileCollection = _interopRequireDefault(__webpack_require__(665)); -var _JobCollection = _interopRequireWildcard(__webpack_require__(674)); +var _JobCollection = _interopRequireWildcard(__webpack_require__(673)); -var _KonnectorCollection = _interopRequireWildcard(__webpack_require__(675)); +var _KonnectorCollection = _interopRequireWildcard(__webpack_require__(674)); -var _SharingCollection = _interopRequireDefault(__webpack_require__(679)); +var _SharingCollection = _interopRequireDefault(__webpack_require__(678)); -var _PermissionCollection = _interopRequireDefault(__webpack_require__(680)); +var _PermissionCollection = _interopRequireDefault(__webpack_require__(679)); -var _TriggerCollection = _interopRequireWildcard(__webpack_require__(676)); +var _TriggerCollection = _interopRequireWildcard(__webpack_require__(675)); -var _SettingsCollection = _interopRequireWildcard(__webpack_require__(681)); +var _SettingsCollection = _interopRequireWildcard(__webpack_require__(680)); -var _NotesCollection = _interopRequireWildcard(__webpack_require__(682)); +var _NotesCollection = _interopRequireWildcard(__webpack_require__(681)); -var _ShortcutsCollection = _interopRequireWildcard(__webpack_require__(684)); +var _ShortcutsCollection = _interopRequireWildcard(__webpack_require__(683)); -var _ContactsCollection = _interopRequireWildcard(__webpack_require__(685)); +var _ContactsCollection = _interopRequireWildcard(__webpack_require__(684)); -var _getIconURL2 = _interopRequireDefault(__webpack_require__(686)); +var _getIconURL2 = _interopRequireDefault(__webpack_require__(685)); -var _logDeprecate = _interopRequireDefault(__webpack_require__(688)); +var _logDeprecate = _interopRequireDefault(__webpack_require__(687)); -var _errors = _interopRequireWildcard(__webpack_require__(659)); +var _errors = _interopRequireWildcard(__webpack_require__(658)); -var _xhrFetch = __webpack_require__(689); +var _xhrFetch = __webpack_require__(688); -var _microee = _interopRequireDefault(__webpack_require__(577)); +var _microee = _interopRequireDefault(__webpack_require__(576)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -96485,10 +94832,10 @@ var _default = CozyStackClient; exports.default = _default; /***/ }), -/* 580 */ +/* 579 */ /***/ (function(module, exports, __webpack_require__) { -var baseClone = __webpack_require__(581); +var baseClone = __webpack_require__(580); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, @@ -96520,31 +94867,31 @@ module.exports = cloneDeep; /***/ }), -/* 581 */ +/* 580 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(416), - arrayEach = __webpack_require__(573), - assignValue = __webpack_require__(582), - baseAssign = __webpack_require__(583), - baseAssignIn = __webpack_require__(585), - cloneBuffer = __webpack_require__(589), - copyArray = __webpack_require__(590), - copySymbols = __webpack_require__(591), - copySymbolsIn = __webpack_require__(592), + arrayEach = __webpack_require__(572), + assignValue = __webpack_require__(581), + baseAssign = __webpack_require__(582), + baseAssignIn = __webpack_require__(584), + cloneBuffer = __webpack_require__(588), + copyArray = __webpack_require__(589), + copySymbols = __webpack_require__(590), + copySymbolsIn = __webpack_require__(591), getAllKeys = __webpack_require__(435), - getAllKeysIn = __webpack_require__(595), + getAllKeysIn = __webpack_require__(594), getTag = __webpack_require__(459), - initCloneArray = __webpack_require__(596), - initCloneByTag = __webpack_require__(597), - initCloneObject = __webpack_require__(603), + initCloneArray = __webpack_require__(595), + initCloneByTag = __webpack_require__(596), + initCloneObject = __webpack_require__(602), isArray = __webpack_require__(75), isBuffer = __webpack_require__(446), - isMap = __webpack_require__(605), + isMap = __webpack_require__(604), isObject = __webpack_require__(72), - isSet = __webpack_require__(607), + isSet = __webpack_require__(606), keys = __webpack_require__(441), - keysIn = __webpack_require__(586); + keysIn = __webpack_require__(585); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, @@ -96692,10 +95039,10 @@ module.exports = baseClone; /***/ }), -/* 582 */ +/* 581 */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(553), +var baseAssignValue = __webpack_require__(552), eq = __webpack_require__(397); /** Used for built-in method references. */ @@ -96726,10 +95073,10 @@ module.exports = assignValue; /***/ }), -/* 583 */ +/* 582 */ /***/ (function(module, exports, __webpack_require__) { -var copyObject = __webpack_require__(584), +var copyObject = __webpack_require__(583), keys = __webpack_require__(441); /** @@ -96749,11 +95096,11 @@ module.exports = baseAssign; /***/ }), -/* 584 */ +/* 583 */ /***/ (function(module, exports, __webpack_require__) { -var assignValue = __webpack_require__(582), - baseAssignValue = __webpack_require__(553); +var assignValue = __webpack_require__(581), + baseAssignValue = __webpack_require__(552); /** * Copies properties of `source` to `object`. @@ -96795,11 +95142,11 @@ module.exports = copyObject; /***/ }), -/* 585 */ +/* 584 */ /***/ (function(module, exports, __webpack_require__) { -var copyObject = __webpack_require__(584), - keysIn = __webpack_require__(586); +var copyObject = __webpack_require__(583), + keysIn = __webpack_require__(585); /** * The base implementation of `_.assignIn` without support for multiple sources @@ -96818,11 +95165,11 @@ module.exports = baseAssignIn; /***/ }), -/* 586 */ +/* 585 */ /***/ (function(module, exports, __webpack_require__) { var arrayLikeKeys = __webpack_require__(442), - baseKeysIn = __webpack_require__(587), + baseKeysIn = __webpack_require__(586), isArrayLike = __webpack_require__(458); /** @@ -96856,12 +95203,12 @@ module.exports = keysIn; /***/ }), -/* 587 */ +/* 586 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(72), isPrototype = __webpack_require__(455), - nativeKeysIn = __webpack_require__(588); + nativeKeysIn = __webpack_require__(587); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -96895,7 +95242,7 @@ module.exports = baseKeysIn; /***/ }), -/* 588 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -96921,7 +95268,7 @@ module.exports = nativeKeysIn; /***/ }), -/* 589 */ +/* 588 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var root = __webpack_require__(68); @@ -96963,7 +95310,7 @@ module.exports = cloneBuffer; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(13)(module))) /***/ }), -/* 590 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -96989,10 +95336,10 @@ module.exports = copyArray; /***/ }), -/* 591 */ +/* 590 */ /***/ (function(module, exports, __webpack_require__) { -var copyObject = __webpack_require__(584), +var copyObject = __webpack_require__(583), getSymbols = __webpack_require__(438); /** @@ -97011,11 +95358,11 @@ module.exports = copySymbols; /***/ }), -/* 592 */ +/* 591 */ /***/ (function(module, exports, __webpack_require__) { -var copyObject = __webpack_require__(584), - getSymbolsIn = __webpack_require__(593); +var copyObject = __webpack_require__(583), + getSymbolsIn = __webpack_require__(592); /** * Copies own and inherited symbols of `source` to `object`. @@ -97033,11 +95380,11 @@ module.exports = copySymbolsIn; /***/ }), -/* 593 */ +/* 592 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(437), - getPrototype = __webpack_require__(594), + getPrototype = __webpack_require__(593), getSymbols = __webpack_require__(438), stubArray = __webpack_require__(440); @@ -97064,7 +95411,7 @@ module.exports = getSymbolsIn; /***/ }), -/* 594 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { var overArg = __webpack_require__(457); @@ -97076,12 +95423,12 @@ module.exports = getPrototype; /***/ }), -/* 595 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { var baseGetAllKeys = __webpack_require__(436), - getSymbolsIn = __webpack_require__(593), - keysIn = __webpack_require__(586); + getSymbolsIn = __webpack_require__(592), + keysIn = __webpack_require__(585); /** * Creates an array of own and inherited enumerable property names and @@ -97099,7 +95446,7 @@ module.exports = getAllKeysIn; /***/ }), -/* 596 */ +/* 595 */ /***/ (function(module, exports) { /** Used for built-in method references. */ @@ -97131,14 +95478,14 @@ module.exports = initCloneArray; /***/ }), -/* 597 */ +/* 596 */ /***/ (function(module, exports, __webpack_require__) { -var cloneArrayBuffer = __webpack_require__(598), - cloneDataView = __webpack_require__(599), - cloneRegExp = __webpack_require__(600), - cloneSymbol = __webpack_require__(601), - cloneTypedArray = __webpack_require__(602); +var cloneArrayBuffer = __webpack_require__(597), + cloneDataView = __webpack_require__(598), + cloneRegExp = __webpack_require__(599), + cloneSymbol = __webpack_require__(600), + cloneTypedArray = __webpack_require__(601); /** `Object#toString` result references. */ var boolTag = '[object Boolean]', @@ -97214,7 +95561,7 @@ module.exports = initCloneByTag; /***/ }), -/* 598 */ +/* 597 */ /***/ (function(module, exports, __webpack_require__) { var Uint8Array = __webpack_require__(431); @@ -97236,10 +95583,10 @@ module.exports = cloneArrayBuffer; /***/ }), -/* 599 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { -var cloneArrayBuffer = __webpack_require__(598); +var cloneArrayBuffer = __webpack_require__(597); /** * Creates a clone of `dataView`. @@ -97258,7 +95605,7 @@ module.exports = cloneDataView; /***/ }), -/* 600 */ +/* 599 */ /***/ (function(module, exports) { /** Used to match `RegExp` flags from their coerced string values. */ @@ -97281,7 +95628,7 @@ module.exports = cloneRegExp; /***/ }), -/* 601 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { var Symbol = __webpack_require__(67); @@ -97305,10 +95652,10 @@ module.exports = cloneSymbol; /***/ }), -/* 602 */ +/* 601 */ /***/ (function(module, exports, __webpack_require__) { -var cloneArrayBuffer = __webpack_require__(598); +var cloneArrayBuffer = __webpack_require__(597); /** * Creates a clone of `typedArray`. @@ -97327,11 +95674,11 @@ module.exports = cloneTypedArray; /***/ }), -/* 603 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { -var baseCreate = __webpack_require__(604), - getPrototype = __webpack_require__(594), +var baseCreate = __webpack_require__(603), + getPrototype = __webpack_require__(593), isPrototype = __webpack_require__(455); /** @@ -97351,7 +95698,7 @@ module.exports = initCloneObject; /***/ }), -/* 604 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { var isObject = __webpack_require__(72); @@ -97387,10 +95734,10 @@ module.exports = baseCreate; /***/ }), -/* 605 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { -var baseIsMap = __webpack_require__(606), +var baseIsMap = __webpack_require__(605), baseUnary = __webpack_require__(452), nodeUtil = __webpack_require__(453); @@ -97420,7 +95767,7 @@ module.exports = isMap; /***/ }), -/* 606 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(459), @@ -97444,10 +95791,10 @@ module.exports = baseIsMap; /***/ }), -/* 607 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { -var baseIsSet = __webpack_require__(608), +var baseIsSet = __webpack_require__(607), baseUnary = __webpack_require__(452), nodeUtil = __webpack_require__(453); @@ -97477,7 +95824,7 @@ module.exports = isSet; /***/ }), -/* 608 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { var getTag = __webpack_require__(459), @@ -97501,46 +95848,46 @@ module.exports = baseIsSet; /***/ }), -/* 609 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.normalizeApp = exports.APPS_DOCTYPE = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); var _get3 = _interopRequireDefault(__webpack_require__(370)); -var _registry = __webpack_require__(615); +var _registry = __webpack_require__(614); -var _Collection = _interopRequireDefault(__webpack_require__(619)); +var _Collection = _interopRequireDefault(__webpack_require__(618)); -var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(619)); -var _errors = __webpack_require__(659); +var _errors = __webpack_require__(658); function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } @@ -97831,10 +96178,10 @@ var _default = AppCollection; exports.default = _default; /***/ }), -/* 610 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { -var setPrototypeOf = __webpack_require__(611); +var setPrototypeOf = __webpack_require__(610); function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { @@ -97855,7 +96202,7 @@ module.exports = _inherits; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 611 */ +/* 610 */ /***/ (function(module, exports) { function _setPrototypeOf(o, p) { @@ -97872,12 +96219,12 @@ module.exports = _setPrototypeOf; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 612 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { -var _typeof = __webpack_require__(530)["default"]; +var _typeof = __webpack_require__(529)["default"]; -var assertThisInitialized = __webpack_require__(613); +var assertThisInitialized = __webpack_require__(612); function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { @@ -97891,7 +96238,7 @@ module.exports = _possibleConstructorReturn; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 613 */ +/* 612 */ /***/ (function(module, exports) { function _assertThisInitialized(self) { @@ -97906,7 +96253,7 @@ module.exports = _assertThisInitialized; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 614 */ +/* 613 */ /***/ (function(module, exports) { function _getPrototypeOf(o) { @@ -97921,36 +96268,36 @@ module.exports = _getPrototypeOf; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 615 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.registryEndpoint = exports.transformRegistryFormatToStackFormat = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); var _get = _interopRequireDefault(__webpack_require__(370)); -__webpack_require__(616); +__webpack_require__(615); -var _terms = _interopRequireDefault(__webpack_require__(617)); +var _terms = _interopRequireDefault(__webpack_require__(616)); -var _constants = __webpack_require__(618); +var _constants = __webpack_require__(617); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -98195,7 +96542,7 @@ var _default = Registry; exports.default = _default; /***/ }), -/* 616 */ +/* 615 */ /***/ (function(module, exports) { /** @@ -98537,26 +96884,26 @@ exports.default = _default; /***/ }), -/* 617 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -98645,7 +96992,7 @@ var _default = { exports.default = _default; /***/ }), -/* 618 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -98662,26 +97009,26 @@ var APP_TYPE = { exports.APP_TYPE = APP_TYPE; /***/ }), -/* 619 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.Collection = exports.isDocumentUpdateConflict = exports.isNoUsableIndexError = exports.isIndexConflictError = exports.isIndexNotFoundError = exports.dontThrowNotFoundError = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); /** * Handler for error response which return a empty value for "not found" error @@ -98841,15 +97188,15 @@ var _default = Collection; exports.default = _default; /***/ }), -/* 620 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true @@ -98857,43 +97204,43 @@ Object.defineProperty(exports, "__esModule", { exports.normalizeDoc = normalizeDoc; exports.normalizeDoctype = exports.default = void 0; -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(621)); +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(620)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _cozyFlags = _interopRequireDefault(__webpack_require__(622)); +var _cozyFlags = _interopRequireDefault(__webpack_require__(621)); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); -var _uniq = _interopRequireDefault(__webpack_require__(631)); +var _uniq = _interopRequireDefault(__webpack_require__(630)); -var _omit = _interopRequireDefault(__webpack_require__(632)); +var _omit = _interopRequireDefault(__webpack_require__(631)); -var _head = _interopRequireDefault(__webpack_require__(640)); +var _head = _interopRequireDefault(__webpack_require__(639)); -var _startsWith = _interopRequireDefault(__webpack_require__(641)); +var _startsWith = _interopRequireDefault(__webpack_require__(640)); -var _qs = _interopRequireDefault(__webpack_require__(648)); +var _qs = _interopRequireDefault(__webpack_require__(647)); -var _Collection = _interopRequireWildcard(__webpack_require__(619)); +var _Collection = _interopRequireWildcard(__webpack_require__(618)); -var _mangoIndex = __webpack_require__(653); +var _mangoIndex = __webpack_require__(652); -var querystring = _interopRequireWildcard(__webpack_require__(655)); +var querystring = _interopRequireWildcard(__webpack_require__(654)); -var _errors = __webpack_require__(659); +var _errors = __webpack_require__(658); function _templateObject10() { var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/_design/", "/copy?rev=", ""]); @@ -100521,7 +98868,7 @@ var normalizeDoctype = DocumentCollection.normalizeDoctype; exports.normalizeDoctype = normalizeDoctype; /***/ }), -/* 621 */ +/* 620 */ /***/ (function(module, exports) { function _taggedTemplateLiteral(strings, raw) { @@ -100540,20 +98887,20 @@ module.exports = _taggedTemplateLiteral; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 622 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _flag = _interopRequireDefault(__webpack_require__(623)); +var _flag = _interopRequireDefault(__webpack_require__(622)); /* global __ENABLED_FLAGS__ */ if (typeof __ENABLED_FLAGS__ !== 'undefined') { @@ -100564,32 +98911,32 @@ var _default = _flag.default; exports.default = _default; /***/ }), -/* 623 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.initialize = exports.initializeFromDOM = exports.getTemplateData = exports.initializeFromRemote = exports.enable = exports.resetFlags = exports.listFlags = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(539)); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(538)); -var _store = _interopRequireDefault(__webpack_require__(624)); +var _store = _interopRequireDefault(__webpack_require__(623)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } @@ -100968,28 +99315,28 @@ var _default = flag; exports.default = _default; /***/ }), -/* 624 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(539)); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(538)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _microee = _interopRequireDefault(__webpack_require__(577)); +var _microee = _interopRequireDefault(__webpack_require__(576)); -var _lsAdapter = _interopRequireDefault(__webpack_require__(625)); +var _lsAdapter = _interopRequireDefault(__webpack_require__(624)); /** * In memory key value storage. @@ -101073,7 +99420,7 @@ var _default = FlagStore; exports.default = _default; /***/ }), -/* 625 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101196,30 +99543,30 @@ var _default = { exports.default = _default; /***/ }), -/* 626 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.QueryDefinition = exports.MutationTypes = exports.Mutations = exports.getDoctypeFromOperation = exports.uploadFile = exports.removeReferencedBy = exports.addReferencedBy = exports.removeReferencesTo = exports.addReferencesTo = exports.deleteDocument = exports.updateDocuments = exports.updateDocument = exports.createDocument = exports.isAGetByIdQuery = exports.Q = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); var _isArray = _interopRequireDefault(__webpack_require__(75)); -var _findKey = _interopRequireDefault(__webpack_require__(627)); +var _findKey = _interopRequireDefault(__webpack_require__(626)); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -101812,11 +100159,11 @@ var MutationTypes = { exports.MutationTypes = MutationTypes; /***/ }), -/* 627 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { -var baseFindKey = __webpack_require__(628), - baseForOwn = __webpack_require__(555), +var baseFindKey = __webpack_require__(627), + baseForOwn = __webpack_require__(554), baseIteratee = __webpack_require__(413); /** @@ -101862,7 +100209,7 @@ module.exports = findKey; /***/ }), -/* 628 */ +/* 627 */ /***/ (function(module, exports) { /** @@ -101891,7 +100238,7 @@ module.exports = baseFindKey; /***/ }), -/* 629 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -101902,7 +100249,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); /** * @typedef {"io.cozy.accounts"} AccountsDoctype @@ -102100,7 +100447,7 @@ var _default = {}; exports.default = _default; /***/ }), -/* 630 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -102214,7 +100561,7 @@ var formatBytes = function formatBytes(bytes) { exports.formatBytes = formatBytes; /***/ }), -/* 631 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { var baseUniq = __webpack_require__(475); @@ -102245,17 +100592,17 @@ module.exports = uniq; /***/ }), -/* 632 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(410), - baseClone = __webpack_require__(581), - baseUnset = __webpack_require__(633), + baseClone = __webpack_require__(580), + baseUnset = __webpack_require__(632), castPath = __webpack_require__(372), - copyObject = __webpack_require__(584), - customOmitClone = __webpack_require__(637), - flatRest = __webpack_require__(639), - getAllKeysIn = __webpack_require__(595); + copyObject = __webpack_require__(583), + customOmitClone = __webpack_require__(636), + flatRest = __webpack_require__(638), + getAllKeysIn = __webpack_require__(594); /** Used to compose bitmasks for cloning. */ var CLONE_DEEP_FLAG = 1, @@ -102308,12 +100655,12 @@ module.exports = omit; /***/ }), -/* 633 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { var castPath = __webpack_require__(372), - last = __webpack_require__(634), - parent = __webpack_require__(635), + last = __webpack_require__(633), + parent = __webpack_require__(634), toKey = __webpack_require__(411); /** @@ -102334,7 +100681,7 @@ module.exports = baseUnset; /***/ }), -/* 634 */ +/* 633 */ /***/ (function(module, exports) { /** @@ -102360,11 +100707,11 @@ module.exports = last; /***/ }), -/* 635 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(371), - baseSlice = __webpack_require__(636); + baseSlice = __webpack_require__(635); /** * Gets the parent value at `path` of `object`. @@ -102382,7 +100729,7 @@ module.exports = parent; /***/ }), -/* 636 */ +/* 635 */ /***/ (function(module, exports) { /** @@ -102419,10 +100766,10 @@ module.exports = baseSlice; /***/ }), -/* 637 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { -var isPlainObject = __webpack_require__(638); +var isPlainObject = __webpack_require__(637); /** * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain @@ -102441,11 +100788,11 @@ module.exports = customOmitClone; /***/ }), -/* 638 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { var baseGetTag = __webpack_require__(66), - getPrototype = __webpack_require__(594), + getPrototype = __webpack_require__(593), isObjectLike = __webpack_require__(73); /** `Object#toString` result references. */ @@ -102509,12 +100856,12 @@ module.exports = isPlainObject; /***/ }), -/* 639 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { -var flatten = __webpack_require__(559), - overRest = __webpack_require__(564), - setToString = __webpack_require__(566); +var flatten = __webpack_require__(558), + overRest = __webpack_require__(563), + setToString = __webpack_require__(565); /** * A specialized version of `baseRest` which flattens the rest array. @@ -102531,7 +100878,7 @@ module.exports = flatRest; /***/ }), -/* 640 */ +/* 639 */ /***/ (function(module, exports) { /** @@ -102560,12 +100907,12 @@ module.exports = head; /***/ }), -/* 641 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { -var baseClamp = __webpack_require__(642), +var baseClamp = __webpack_require__(641), baseToString = __webpack_require__(409), - toInteger = __webpack_require__(643), + toInteger = __webpack_require__(642), toString = __webpack_require__(408); /** @@ -102605,7 +100952,7 @@ module.exports = startsWith; /***/ }), -/* 642 */ +/* 641 */ /***/ (function(module, exports) { /** @@ -102633,10 +100980,10 @@ module.exports = baseClamp; /***/ }), -/* 643 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { -var toFinite = __webpack_require__(644); +var toFinite = __webpack_require__(643); /** * Converts `value` to an integer. @@ -102675,10 +101022,10 @@ module.exports = toInteger; /***/ }), -/* 644 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { -var toNumber = __webpack_require__(645); +var toNumber = __webpack_require__(644); /** Used as references for various `Number` constants. */ var INFINITY = 1 / 0, @@ -102723,10 +101070,10 @@ module.exports = toFinite; /***/ }), -/* 645 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { -var baseTrim = __webpack_require__(646), +var baseTrim = __webpack_require__(645), isObject = __webpack_require__(72), isSymbol = __webpack_require__(374); @@ -102793,10 +101140,10 @@ module.exports = toNumber; /***/ }), -/* 646 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { -var trimmedEndIndex = __webpack_require__(647); +var trimmedEndIndex = __webpack_require__(646); /** Used to match leading whitespace. */ var reTrimStart = /^\s+/; @@ -102818,7 +101165,7 @@ module.exports = baseTrim; /***/ }), -/* 647 */ +/* 646 */ /***/ (function(module, exports) { /** Used to match a single whitespace character. */ @@ -102843,15 +101190,15 @@ module.exports = trimmedEndIndex; /***/ }), -/* 648 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var stringify = __webpack_require__(649); -var parse = __webpack_require__(652); -var formats = __webpack_require__(651); +var stringify = __webpack_require__(648); +var parse = __webpack_require__(651); +var formats = __webpack_require__(650); module.exports = { formats: formats, @@ -102861,14 +101208,14 @@ module.exports = { /***/ }), -/* 649 */ +/* 648 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(650); -var formats = __webpack_require__(651); +var utils = __webpack_require__(649); +var formats = __webpack_require__(650); var has = Object.prototype.hasOwnProperty; var arrayPrefixGenerators = { @@ -103146,13 +101493,13 @@ module.exports = function (object, opts) { /***/ }), -/* 650 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var formats = __webpack_require__(651); +var formats = __webpack_require__(650); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; @@ -103404,7 +101751,7 @@ module.exports = { /***/ }), -/* 651 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -103434,13 +101781,13 @@ module.exports = { /***/ }), -/* 652 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var utils = __webpack_require__(650); +var utils = __webpack_require__(649); var has = Object.prototype.hasOwnProperty; var isArray = Array.isArray; @@ -103698,30 +102045,30 @@ module.exports = function (str, opts) { /***/ }), -/* 653 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.isMatchingIndex = exports.isInconsistentIndex = exports.getIndexFields = exports.transformSort = exports.getIndexNameFromFields = exports.normalizeDesignDoc = void 0; -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); -var _head = _interopRequireDefault(__webpack_require__(640)); +var _head = _interopRequireDefault(__webpack_require__(639)); var _get = _interopRequireDefault(__webpack_require__(370)); -var _isEqual = _interopRequireDefault(__webpack_require__(654)); +var _isEqual = _interopRequireDefault(__webpack_require__(653)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -103837,7 +102184,7 @@ var isMatchingIndex = function isMatchingIndex(index, fields, partialFilter) { exports.isMatchingIndex = isMatchingIndex; /***/ }), -/* 654 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { var baseIsEqual = __webpack_require__(422); @@ -103878,22 +102225,22 @@ module.exports = isEqual; /***/ }), -/* 655 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.buildURL = exports.encode = void 0; -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(539)); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(538)); -var _pickBy = _interopRequireDefault(__webpack_require__(656)); +var _pickBy = _interopRequireDefault(__webpack_require__(655)); var encodeValues = function encodeValues(values) { var fromArray = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false; @@ -103949,13 +102296,13 @@ var buildURL = function buildURL(url, params) { exports.buildURL = buildURL; /***/ }), -/* 656 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(410), baseIteratee = __webpack_require__(413), - basePickBy = __webpack_require__(657), - getAllKeysIn = __webpack_require__(595); + basePickBy = __webpack_require__(656), + getAllKeysIn = __webpack_require__(594); /** * Creates an object composed of the `object` properties `predicate` returns @@ -103992,11 +102339,11 @@ module.exports = pickBy; /***/ }), -/* 657 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { var baseGet = __webpack_require__(371), - baseSet = __webpack_require__(658), + baseSet = __webpack_require__(657), castPath = __webpack_require__(372); /** @@ -104028,10 +102375,10 @@ module.exports = basePickBy; /***/ }), -/* 658 */ +/* 657 */ /***/ (function(module, exports, __webpack_require__) { -var assignValue = __webpack_require__(582), +var assignValue = __webpack_require__(581), castPath = __webpack_require__(372), isIndex = __webpack_require__(448), isObject = __webpack_require__(72), @@ -104085,30 +102432,30 @@ module.exports = baseSet; /***/ }), -/* 659 */ +/* 658 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.FetchError = exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(613)); +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(612)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(660)); +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(659)); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } @@ -104157,16 +102504,16 @@ var FetchError = /*#__PURE__*/function (_Error) { exports.FetchError = FetchError; /***/ }), -/* 660 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { -var getPrototypeOf = __webpack_require__(614); +var getPrototypeOf = __webpack_require__(613); -var setPrototypeOf = __webpack_require__(611); +var setPrototypeOf = __webpack_require__(610); -var isNativeFunction = __webpack_require__(661); +var isNativeFunction = __webpack_require__(660); -var construct = __webpack_require__(662); +var construct = __webpack_require__(661); function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; @@ -104207,7 +102554,7 @@ module.exports = _wrapNativeSuper; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 661 */ +/* 660 */ /***/ (function(module, exports) { function _isNativeFunction(fn) { @@ -104218,12 +102565,12 @@ module.exports = _isNativeFunction; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 662 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { -var setPrototypeOf = __webpack_require__(611); +var setPrototypeOf = __webpack_require__(610); -var isNativeReflectConstruct = __webpack_require__(663); +var isNativeReflectConstruct = __webpack_require__(662); function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { @@ -104249,7 +102596,7 @@ module.exports = _construct; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 663 */ +/* 662 */ /***/ (function(module, exports) { function _isNativeReflectConstruct() { @@ -104269,22 +102616,22 @@ module.exports = _isNativeReflectConstruct; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 664 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); var AppToken = /*#__PURE__*/function () { function AppToken(token) { @@ -104321,22 +102668,22 @@ var AppToken = /*#__PURE__*/function () { exports.default = AppToken; /***/ }), -/* 665 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); var AccessToken = /*#__PURE__*/function () { function AccessToken(dataArg) { @@ -104393,60 +102740,60 @@ var AccessToken = /*#__PURE__*/function () { exports.default = AccessToken; /***/ }), -/* 666 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.isDirectory = exports.isFile = void 0; -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); -var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(621)); +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(620)); -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(613)); +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(612)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _lite = _interopRequireDefault(__webpack_require__(667)); +var _lite = _interopRequireDefault(__webpack_require__(666)); -var _has = _interopRequireDefault(__webpack_require__(670)); +var _has = _interopRequireDefault(__webpack_require__(669)); var _get = _interopRequireDefault(__webpack_require__(370)); -var _pick = _interopRequireDefault(__webpack_require__(672)); +var _pick = _interopRequireDefault(__webpack_require__(671)); -var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(619)); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); -var querystring = _interopRequireWildcard(__webpack_require__(655)); +var querystring = _interopRequireWildcard(__webpack_require__(654)); -var _errors = __webpack_require__(659); +var _errors = __webpack_require__(658); -var _Collection = __webpack_require__(619); +var _Collection = __webpack_require__(618); function _templateObject22() { var data = (0, _taggedTemplateLiteral2.default)(["/data/", "/", "/relationships/not_synchronizing"]); @@ -106681,18 +105028,18 @@ var _default = FileCollection; exports.default = _default; /***/ }), -/* 667 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -let Mime = __webpack_require__(668); -module.exports = new Mime(__webpack_require__(669)); +let Mime = __webpack_require__(667); +module.exports = new Mime(__webpack_require__(668)); /***/ }), -/* 668 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -106796,16 +105143,16 @@ module.exports = Mime; /***/ }), -/* 669 */ +/* 668 */ /***/ (function(module, exports) { module.exports = {"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma","es"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/mrb-consumer+xml":["*xdf"],"application/mrb-publish+xml":["*xdf"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["*xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-error+xml":["xer"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}; /***/ }), -/* 670 */ +/* 669 */ /***/ (function(module, exports, __webpack_require__) { -var baseHas = __webpack_require__(671), +var baseHas = __webpack_require__(670), hasPath = __webpack_require__(470); /** @@ -106843,7 +105190,7 @@ module.exports = has; /***/ }), -/* 671 */ +/* 670 */ /***/ (function(module, exports) { /** Used for built-in method references. */ @@ -106868,11 +105215,11 @@ module.exports = baseHas; /***/ }), -/* 672 */ +/* 671 */ /***/ (function(module, exports, __webpack_require__) { -var basePick = __webpack_require__(673), - flatRest = __webpack_require__(639); +var basePick = __webpack_require__(672), + flatRest = __webpack_require__(638); /** * Creates an object composed of the picked `object` properties. @@ -106899,10 +105246,10 @@ module.exports = pick; /***/ }), -/* 673 */ +/* 672 */ /***/ (function(module, exports, __webpack_require__) { -var basePickBy = __webpack_require__(657), +var basePickBy = __webpack_require__(656), hasIn = __webpack_require__(468); /** @@ -106924,36 +105271,36 @@ module.exports = basePick; /***/ }), -/* 674 */ +/* 673 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.hasJobFinished = exports.normalizeJob = exports.JOBS_DOCTYPE = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(621)); +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(620)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _Collection = _interopRequireDefault(__webpack_require__(619)); +var _Collection = _interopRequireDefault(__webpack_require__(618)); -var _DocumentCollection = __webpack_require__(620); +var _DocumentCollection = __webpack_require__(619); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); function _templateObject() { var data = (0, _taggedTemplateLiteral2.default)(["/jobs/", ""]); @@ -107216,42 +105563,42 @@ var _default = JobCollection; exports.default = _default; /***/ }), -/* 675 */ +/* 674 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.KONNECTORS_DOCTYPE = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _pick = _interopRequireDefault(__webpack_require__(672)); +var _pick = _interopRequireDefault(__webpack_require__(671)); -var _AppCollection2 = _interopRequireDefault(__webpack_require__(609)); +var _AppCollection2 = _interopRequireDefault(__webpack_require__(608)); -var _TriggerCollection = _interopRequireWildcard(__webpack_require__(676)); +var _TriggerCollection = _interopRequireWildcard(__webpack_require__(675)); -var _DocumentCollection = __webpack_require__(620); +var _DocumentCollection = __webpack_require__(619); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } @@ -107514,52 +105861,52 @@ var _default = KonnectorCollection; exports.default = _default; /***/ }), -/* 676 */ +/* 675 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.isForAccount = exports.isForKonnector = exports.normalizeTrigger = exports.TRIGGERS_DOCTYPE = exports.JOBS_DOCTYPE = void 0; -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); -var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(621)); +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(620)); -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _get3 = _interopRequireDefault(__webpack_require__(677)); +var _get3 = _interopRequireDefault(__webpack_require__(676)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _Collection = _interopRequireWildcard(__webpack_require__(619)); +var _Collection = _interopRequireWildcard(__webpack_require__(618)); -var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(619)); -var _JobCollection = __webpack_require__(674); +var _JobCollection = __webpack_require__(673); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); -var _errors = __webpack_require__(659); +var _errors = __webpack_require__(658); function _templateObject4() { var data = (0, _taggedTemplateLiteral2.default)(["/jobs/triggers/", "/launch"]); @@ -108007,10 +106354,10 @@ var _default = TriggerCollection; exports.default = _default; /***/ }), -/* 677 */ +/* 676 */ /***/ (function(module, exports, __webpack_require__) { -var superPropBase = __webpack_require__(678); +var superPropBase = __webpack_require__(677); function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { @@ -108039,10 +106386,10 @@ module.exports = _get; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 678 */ +/* 677 */ /***/ (function(module, exports, __webpack_require__) { -var getPrototypeOf = __webpack_require__(614); +var getPrototypeOf = __webpack_require__(613); function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { @@ -108057,44 +106404,44 @@ module.exports = _superPropBase; module.exports["default"] = module.exports, module.exports.__esModule = true; /***/ }), -/* 679 */ +/* 678 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.getSharingRules = exports.BITWARDEN_CIPHERS_DOCTYPE = exports.BITWARDEN_ORGANIZATIONS_DOCTYPE = exports.SHARING_DOCTYPE = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(621)); +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(620)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(619)); -var _FileCollection = __webpack_require__(666); +var _FileCollection = __webpack_require__(665); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); function _templateObject6() { var data = (0, _taggedTemplateLiteral2.default)(["/sharings/", "/recipients"]); @@ -108743,48 +107090,48 @@ var _default = SharingCollection; exports.default = _default; /***/ }), -/* 680 */ +/* 679 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.getPermissionsFor = void 0; -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(621)); +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(620)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(619)); -var _FileCollection = __webpack_require__(666); +var _FileCollection = __webpack_require__(665); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } @@ -109439,36 +107786,36 @@ var _default = PermissionCollection; exports.default = _default; /***/ }), -/* 681 */ +/* 680 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.SETTINGS_DOCTYPE = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _DocumentCollection2 = _interopRequireDefault(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireDefault(__webpack_require__(619)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -109545,42 +107892,42 @@ var _default = SettingsCollection; exports.default = _default; /***/ }), -/* 682 */ +/* 681 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.NOTES_URL_DOCTYPE = exports.NOTES_DOCTYPE = void 0; -var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(621)); +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(620)); -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _DocumentCollection2 = _interopRequireDefault(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireDefault(__webpack_require__(619)); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); -var _NotesSchema = __webpack_require__(683); +var _NotesSchema = __webpack_require__(682); function _templateObject2() { var data = (0, _taggedTemplateLiteral2.default)(["/notes/", "/open"]); @@ -109837,7 +108184,7 @@ var _default = NotesCollection; exports.default = _default; /***/ }), -/* 683 */ +/* 682 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -110197,38 +108544,38 @@ var getDefaultSchema = function getDefaultSchema() { exports.getDefaultSchema = getDefaultSchema; /***/ }), -/* 684 */ +/* 683 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.SHORTCUTS_DOCTYPE = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(621)); +var _taggedTemplateLiteral2 = _interopRequireDefault(__webpack_require__(620)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _DocumentCollection2 = _interopRequireDefault(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireDefault(__webpack_require__(619)); -var _utils = __webpack_require__(630); +var _utils = __webpack_require__(629); function _templateObject2() { var data = (0, _taggedTemplateLiteral2.default)(["/shortcuts/", ""]); @@ -110368,40 +108715,40 @@ var _default = ShortcutsCollection; exports.default = _default; /***/ }), -/* 685 */ +/* 684 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.CONTACTS_DOCTYPE = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _get2 = _interopRequireDefault(__webpack_require__(677)); +var _get2 = _interopRequireDefault(__webpack_require__(676)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(620)); +var _DocumentCollection2 = _interopRequireWildcard(__webpack_require__(619)); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } @@ -110505,26 +108852,26 @@ var _default = ContactsCollection; exports.default = _default; /***/ }), -/* 686 */ +/* 685 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.getIconURL = exports.default = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _memoize = _interopRequireWildcard(__webpack_require__(687)); +var _memoize = _interopRequireWildcard(__webpack_require__(686)); function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } @@ -110783,28 +109130,28 @@ var _default = (0, _memoize.default)(getIconURL, { exports.default = _default; /***/ }), -/* 687 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.ErrorReturned = exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(660)); +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(659)); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } @@ -110891,7 +109238,7 @@ var _default = memoize; exports.default = _default; /***/ }), -/* 688 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -110914,24 +109261,24 @@ var _default = logDeprecate; exports.default = _default; /***/ }), -/* 689 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.shouldXMLHTTPRequestBeUsed = exports.fetchWithXMLHttpRequest = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(539)); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(538)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); var _memoize = _interopRequireDefault(__webpack_require__(377)); @@ -111073,46 +109420,46 @@ var shouldXMLHTTPRequestBeUsed = function shouldXMLHTTPRequestBeUsed(method, pat exports.shouldXMLHTTPRequestBeUsed = shouldXMLHTTPRequestBeUsed; /***/ }), -/* 690 */ +/* 689 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(660)); +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(659)); -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _get2 = _interopRequireDefault(__webpack_require__(677)); +var _get2 = _interopRequireDefault(__webpack_require__(676)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _CozyStackClient2 = _interopRequireDefault(__webpack_require__(579)); +var _CozyStackClient2 = _interopRequireDefault(__webpack_require__(578)); -var _AccessToken = _interopRequireDefault(__webpack_require__(665)); +var _AccessToken = _interopRequireDefault(__webpack_require__(664)); -var _logDeprecate = _interopRequireDefault(__webpack_require__(688)); +var _logDeprecate = _interopRequireDefault(__webpack_require__(687)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -111786,7 +110133,7 @@ var _default = OAuthClient; exports.default = _default; /***/ }), -/* 691 */ +/* 690 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -111800,46 +110147,46 @@ var REGISTRATION_ABORT = 'REGISTRATION_ABORT'; exports.REGISTRATION_ABORT = REGISTRATION_ABORT; /***/ }), -/* 692 */ +/* 691 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.transformBulkDocsResponse = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _CozyLink2 = _interopRequireDefault(__webpack_require__(693)); +var _CozyLink2 = _interopRequireDefault(__webpack_require__(692)); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); -var _errors = __webpack_require__(694); +var _errors = __webpack_require__(693); -var _zipWith = _interopRequireDefault(__webpack_require__(695)); +var _zipWith = _interopRequireDefault(__webpack_require__(694)); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } @@ -112047,24 +110394,24 @@ var StackLink = /*#__PURE__*/function (_CozyLink) { exports.default = StackLink; /***/ }), -/* 693 */ +/* 692 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.chain = exports.default = void 0; -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); var CozyLink = /*#__PURE__*/function () { function CozyLink(requestHandler) { @@ -112111,36 +110458,36 @@ var concat = function concat(firstLink, nextLink) { }; /***/ }), -/* 694 */ +/* 693 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.BulkEditError = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(660)); +var _wrapNativeSuper2 = _interopRequireDefault(__webpack_require__(659)); -var _zipWith = _interopRequireDefault(__webpack_require__(695)); +var _zipWith = _interopRequireDefault(__webpack_require__(694)); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -112210,11 +110557,11 @@ var BulkEditError = /*#__PURE__*/function (_Error) { exports.BulkEditError = BulkEditError; /***/ }), -/* 695 */ +/* 694 */ /***/ (function(module, exports, __webpack_require__) { -var baseRest = __webpack_require__(563), - unzipWith = __webpack_require__(696); +var baseRest = __webpack_require__(562), + unzipWith = __webpack_require__(695); /** * This method is like `_.zip` except that it accepts `iteratee` to specify @@ -112248,12 +110595,12 @@ module.exports = zipWith; /***/ }), -/* 696 */ +/* 695 */ /***/ (function(module, exports, __webpack_require__) { -var apply = __webpack_require__(565), +var apply = __webpack_require__(564), arrayMap = __webpack_require__(410), - unzip = __webpack_require__(570); + unzip = __webpack_require__(569); /** * This method is like `_.unzip` except that it accepts `iteratee` to specify @@ -112293,13 +110640,13 @@ module.exports = unzipWith; /***/ }), -/* 697 */ +/* 696 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true @@ -112359,67 +110706,67 @@ Object.defineProperty(exports, "create", { } }); -var _HasManyFiles = _interopRequireDefault(__webpack_require__(698)); +var _HasManyFiles = _interopRequireDefault(__webpack_require__(697)); -var _HasMany = _interopRequireDefault(__webpack_require__(747)); +var _HasMany = _interopRequireDefault(__webpack_require__(746)); -var _HasOne = _interopRequireDefault(__webpack_require__(756)); +var _HasOne = _interopRequireDefault(__webpack_require__(755)); -var _HasOneInPlace = _interopRequireDefault(__webpack_require__(758)); +var _HasOneInPlace = _interopRequireDefault(__webpack_require__(757)); -var _HasManyInPlace = _interopRequireDefault(__webpack_require__(759)); +var _HasManyInPlace = _interopRequireDefault(__webpack_require__(758)); -var _HasManyTriggers = _interopRequireDefault(__webpack_require__(760)); +var _HasManyTriggers = _interopRequireDefault(__webpack_require__(759)); -var _Association = _interopRequireDefault(__webpack_require__(746)); +var _Association = _interopRequireDefault(__webpack_require__(745)); -var _helpers = __webpack_require__(761); +var _helpers = __webpack_require__(760); /***/ }), -/* 698 */ +/* 697 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _get2 = _interopRequireDefault(__webpack_require__(677)); +var _get2 = _interopRequireDefault(__webpack_require__(676)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _omit = _interopRequireDefault(__webpack_require__(632)); +var _omit = _interopRequireDefault(__webpack_require__(631)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _store = __webpack_require__(699); +var _store = __webpack_require__(698); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); -var _Association = _interopRequireDefault(__webpack_require__(746)); +var _Association = _interopRequireDefault(__webpack_require__(745)); -var _HasMany2 = _interopRequireDefault(__webpack_require__(747)); +var _HasMany2 = _interopRequireDefault(__webpack_require__(746)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -112646,15 +110993,15 @@ var HasManyFiles = /*#__PURE__*/function (_HasMany) { exports.default = HasManyFiles; /***/ }), -/* 699 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireWildcard = __webpack_require__(529); +var _interopRequireWildcard = __webpack_require__(528); -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true @@ -112703,21 +111050,21 @@ Object.defineProperty(exports, "receiveMutationError", { }); exports.resetState = exports.getRawQueryFromState = exports.getQueryFromState = exports.getQueryFromStore = exports.getDocumentFromState = exports.getCollectionFromState = exports.getStateRoot = exports.createStore = exports.default = exports.StoreProxy = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _redux = __webpack_require__(700); +var _redux = __webpack_require__(699); -var _reduxThunk = _interopRequireDefault(__webpack_require__(703)); +var _reduxThunk = _interopRequireDefault(__webpack_require__(702)); -var _documents = _interopRequireWildcard(__webpack_require__(704)); +var _documents = _interopRequireWildcard(__webpack_require__(703)); -var _queries = _interopRequireWildcard(__webpack_require__(729)); +var _queries = _interopRequireWildcard(__webpack_require__(728)); -var _mutations = __webpack_require__(744); +var _mutations = __webpack_require__(743); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -112850,7 +111197,7 @@ var getRawQueryFromState = function getRawQueryFromState(state, queryId) { exports.getRawQueryFromState = getRawQueryFromState; /***/ }), -/* 700 */ +/* 699 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -112861,7 +111208,7 @@ __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "combineReducers", function() { return combineReducers; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "compose", function() { return compose; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createStore", function() { return createStore; }); -/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(701); +/* harmony import */ var _babel_runtime_helpers_esm_objectSpread2__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(700); /** @@ -113549,13 +111896,13 @@ if ( true && typeof isCrushed.name === 'string' && isCrushed.name !== 'isCrushed /***/ }), -/* 701 */ +/* 700 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return _objectSpread2; }); -/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(702); +/* harmony import */ var _defineProperty_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(701); function ownKeys(object, enumerableOnly) { @@ -113597,7 +111944,7 @@ function _objectSpread2(target) { } /***/ }), -/* 702 */ +/* 701 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -113619,7 +111966,7 @@ function _defineProperty(obj, key, value) { } /***/ }), -/* 703 */ +/* 702 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -113646,40 +111993,40 @@ thunk.withExtraArgument = createThunkMiddleware; /* harmony default export */ __webpack_exports__["default"] = (thunk); /***/ }), -/* 704 */ +/* 703 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.extractAndMergeDocument = exports.getCollectionFromSlice = exports.getDocumentFromSlice = exports.default = exports.mergeDocumentsWithRelationships = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _keyBy = _interopRequireDefault(__webpack_require__(705)); +var _keyBy = _interopRequireDefault(__webpack_require__(704)); var _get = _interopRequireDefault(__webpack_require__(370)); -var _isEqual = _interopRequireDefault(__webpack_require__(654)); +var _isEqual = _interopRequireDefault(__webpack_require__(653)); -var _omit = _interopRequireDefault(__webpack_require__(632)); +var _omit = _interopRequireDefault(__webpack_require__(631)); -var _logger = _interopRequireDefault(__webpack_require__(709)); +var _logger = _interopRequireDefault(__webpack_require__(708)); -var _queries = __webpack_require__(729); +var _queries = __webpack_require__(728); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _mutations = __webpack_require__(744); +var _mutations = __webpack_require__(743); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); -var _helpers = __webpack_require__(745); +var _helpers = __webpack_require__(744); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -113867,11 +112214,11 @@ var extractAndMergeDocument = function extractAndMergeDocument(data, updatedStat exports.extractAndMergeDocument = extractAndMergeDocument; /***/ }), -/* 705 */ +/* 704 */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(553), - createAggregator = __webpack_require__(706); +var baseAssignValue = __webpack_require__(552), + createAggregator = __webpack_require__(705); /** * Creates an object composed of keys generated from the results of running @@ -113909,11 +112256,11 @@ module.exports = keyBy; /***/ }), -/* 706 */ +/* 705 */ /***/ (function(module, exports, __webpack_require__) { -var arrayAggregator = __webpack_require__(707), - baseAggregator = __webpack_require__(708), +var arrayAggregator = __webpack_require__(706), + baseAggregator = __webpack_require__(707), baseIteratee = __webpack_require__(413), isArray = __webpack_require__(75); @@ -113938,7 +112285,7 @@ module.exports = createAggregator; /***/ }), -/* 707 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -113966,10 +112313,10 @@ module.exports = arrayAggregator; /***/ }), -/* 708 */ +/* 707 */ /***/ (function(module, exports, __webpack_require__) { -var baseEach = __webpack_require__(574); +var baseEach = __webpack_require__(573); /** * Aggregates elements of `collection` on `accumulator` with keys transformed @@ -113993,20 +112340,20 @@ module.exports = baseAggregator; /***/ }), -/* 709 */ +/* 708 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _minilog = _interopRequireDefault(__webpack_require__(710)); +var _minilog = _interopRequireDefault(__webpack_require__(709)); var logger = (0, _minilog.default)('cozy-client'); @@ -114016,23 +112363,23 @@ var _default = logger; exports.default = _default; /***/ }), -/* 710 */ +/* 709 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__(711); +module.exports = __webpack_require__(710); -var consoleLogger = __webpack_require__(714); +var consoleLogger = __webpack_require__(713); // if we are running inside Electron then use the web version of console.js var isElectron = (typeof window !== 'undefined' && window.process && window.process.type === 'renderer'); if (isElectron) { - consoleLogger = __webpack_require__(723).minilog; + consoleLogger = __webpack_require__(722).minilog; } // intercept the pipe method and transparently wrap the stringifier, if the // destination is a Node core stream -module.exports.Stringifier = __webpack_require__(727); +module.exports.Stringifier = __webpack_require__(726); var oldPipe = module.exports.pipe; module.exports.pipe = function(dest) { @@ -114047,18 +112394,18 @@ module.exports.defaultBackend = consoleLogger; module.exports.defaultFormatter = consoleLogger.formatMinilog; module.exports.backends = { - redis: __webpack_require__(728), + redis: __webpack_require__(727), nodeConsole: consoleLogger, console: consoleLogger }; /***/ }), -/* 711 */ +/* 710 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712), - Filter = __webpack_require__(713); +var Transform = __webpack_require__(711), + Filter = __webpack_require__(712); var log = new Transform(), slice = Array.prototype.slice; @@ -114107,10 +112454,10 @@ exports.enable = function() { /***/ }), -/* 712 */ +/* 711 */ /***/ (function(module, exports, __webpack_require__) { -var microee = __webpack_require__(577); +var microee = __webpack_require__(576); // Implements a subset of Node's stream.Transform - in a cross-platform manner. function Transform() {} @@ -114185,11 +112532,11 @@ module.exports = Transform; /***/ }), -/* 713 */ +/* 712 */ /***/ (function(module, exports, __webpack_require__) { // default filter -var Transform = __webpack_require__(712); +var Transform = __webpack_require__(711); var levelMap = { debug: 1, info: 2, warn: 3, error: 4 }; @@ -114247,10 +112594,10 @@ module.exports = Filter; /***/ }), -/* 714 */ +/* 713 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712); +var Transform = __webpack_require__(711); function ConsoleBackend() { } @@ -114262,12 +112609,12 @@ ConsoleBackend.prototype.write = function() { var e = new ConsoleBackend(); -var levelMap = __webpack_require__(715).levelMap; +var levelMap = __webpack_require__(714).levelMap; e.filterEnv = function() { console.error('Minilog.backends.console.filterEnv is deprecated in Minilog v2.'); // return the instance of Minilog - return __webpack_require__(711); + return __webpack_require__(710); }; e.formatters = [ @@ -114275,19 +112622,19 @@ e.formatters = [ 'formatLearnboost', 'formatMinilog', 'formatWithStack', 'formatTime' ]; -e.formatClean = new (__webpack_require__(716)); -e.formatColor = new (__webpack_require__(717)); -e.formatNpm = new (__webpack_require__(718)); -e.formatLearnboost = new (__webpack_require__(719)); -e.formatMinilog = new (__webpack_require__(720)); -e.formatWithStack = new (__webpack_require__(721)); -e.formatTime = new (__webpack_require__(722)); +e.formatClean = new (__webpack_require__(715)); +e.formatColor = new (__webpack_require__(716)); +e.formatNpm = new (__webpack_require__(717)); +e.formatLearnboost = new (__webpack_require__(718)); +e.formatMinilog = new (__webpack_require__(719)); +e.formatWithStack = new (__webpack_require__(720)); +e.formatTime = new (__webpack_require__(721)); module.exports = e; /***/ }), -/* 715 */ +/* 714 */ /***/ (function(module, exports) { var styles = { @@ -114317,10 +112664,10 @@ exports.style = function(str, style) { /***/ }), -/* 716 */ +/* 715 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712); +var Transform = __webpack_require__(711); function FormatClean() {} @@ -114335,11 +112682,11 @@ module.exports = FormatClean; /***/ }), -/* 717 */ +/* 716 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712), - style = __webpack_require__(715).style; +var Transform = __webpack_require__(711), + style = __webpack_require__(714).style; function FormatColor() {} @@ -114357,10 +112704,10 @@ module.exports = FormatColor; /***/ }), -/* 718 */ +/* 717 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712); +var Transform = __webpack_require__(711); function FormatNpm() {} @@ -114385,11 +112732,11 @@ module.exports = FormatNpm; /***/ }), -/* 719 */ +/* 718 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712), - style = __webpack_require__(715).style; +var Transform = __webpack_require__(711), + style = __webpack_require__(714).style; function FormatLearnboost() {} @@ -114406,11 +112753,11 @@ module.exports = FormatLearnboost; /***/ }), -/* 720 */ +/* 719 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712), - style = __webpack_require__(715).style, +var Transform = __webpack_require__(711), + style = __webpack_require__(714).style, util = __webpack_require__(9); function FormatMinilog() {} @@ -114430,11 +112777,11 @@ module.exports = FormatMinilog; /***/ }), -/* 721 */ +/* 720 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712), - style = __webpack_require__(715).style; +var Transform = __webpack_require__(711), + style = __webpack_require__(714).style; function FormatNpm() {} @@ -114488,11 +112835,11 @@ module.exports = FormatNpm; /***/ }), -/* 722 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712), - style = __webpack_require__(715).style, +var Transform = __webpack_require__(711), + style = __webpack_require__(714).style, util = __webpack_require__(9); function FormatTime() {} @@ -114524,10 +112871,10 @@ module.exports = FormatTime; /***/ }), -/* 723 */ +/* 722 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712); +var Transform = __webpack_require__(711); var newlines = /\n+$/, logger = new Transform(); @@ -114555,18 +112902,18 @@ logger.write = function(name, level, args) { }; logger.formatters = ['color', 'minilog']; -logger.color = __webpack_require__(724); -logger.minilog = __webpack_require__(726); +logger.color = __webpack_require__(723); +logger.minilog = __webpack_require__(725); module.exports = logger; /***/ }), -/* 724 */ +/* 723 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712), - color = __webpack_require__(725); +var Transform = __webpack_require__(711), + color = __webpack_require__(724); var colors = { debug: ['cyan'], info: ['purple' ], warn: [ 'yellow', true ], error: [ 'red', true ] }, logger = new Transform(); @@ -114586,7 +112933,7 @@ module.exports = logger; /***/ }), -/* 725 */ +/* 724 */ /***/ (function(module, exports) { var hex = { @@ -114612,11 +112959,11 @@ module.exports = color; /***/ }), -/* 726 */ +/* 725 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712), - color = __webpack_require__(725), +var Transform = __webpack_require__(711), + color = __webpack_require__(724), colors = { debug: ['gray'], info: ['purple' ], warn: [ 'yellow', true ], error: [ 'red', true ] }, logger = new Transform(); @@ -114644,10 +112991,10 @@ module.exports = logger; /***/ }), -/* 727 */ +/* 726 */ /***/ (function(module, exports, __webpack_require__) { -var Transform = __webpack_require__(712); +var Transform = __webpack_require__(711); function Stringify() {} @@ -114682,7 +113029,7 @@ module.exports = Stringify; /***/ }), -/* 728 */ +/* 727 */ /***/ (function(module, exports) { function RedisBackend(options) { @@ -114704,44 +113051,44 @@ module.exports = RedisBackend; /***/ }), -/* 729 */ +/* 728 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.QueryIDGenerator = exports.getQueryFromSlice = exports.receiveQueryError = exports.receiveQueryResult = exports.loadQuery = exports.initQuery = exports.default = exports.makeSorterFromDefinition = exports.mergeSelectorAndPartialIndex = exports.convert$gtNullSelectors = exports.isReceivingData = exports.isQueryAction = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(539)); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(538)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); -var _mapValues = _interopRequireDefault(__webpack_require__(552)); +var _mapValues = _interopRequireDefault(__webpack_require__(551)); -var _groupBy = _interopRequireDefault(__webpack_require__(730)); +var _groupBy = _interopRequireDefault(__webpack_require__(729)); -var _difference = _interopRequireDefault(__webpack_require__(731)); +var _difference = _interopRequireDefault(__webpack_require__(730)); -var _intersection = _interopRequireDefault(__webpack_require__(733)); +var _intersection = _interopRequireDefault(__webpack_require__(732)); -var _concat = _interopRequireDefault(__webpack_require__(736)); +var _concat = _interopRequireDefault(__webpack_require__(735)); -var _isPlainObject = _interopRequireDefault(__webpack_require__(638)); +var _isPlainObject = _interopRequireDefault(__webpack_require__(637)); -var _uniq = _interopRequireDefault(__webpack_require__(631)); +var _uniq = _interopRequireDefault(__webpack_require__(630)); -var _orderBy = _interopRequireDefault(__webpack_require__(737)); +var _orderBy = _interopRequireDefault(__webpack_require__(736)); var _isArray = _interopRequireDefault(__webpack_require__(75)); @@ -114749,19 +113096,19 @@ var _isString = _interopRequireDefault(__webpack_require__(74)); var _get = _interopRequireDefault(__webpack_require__(370)); -var _sift = _interopRequireDefault(__webpack_require__(743)); +var _sift = _interopRequireDefault(__webpack_require__(742)); -var _cozyFlags = _interopRequireDefault(__webpack_require__(622)); +var _cozyFlags = _interopRequireDefault(__webpack_require__(621)); -var _documents = __webpack_require__(704); +var _documents = __webpack_require__(703); -var _mutations = __webpack_require__(744); +var _mutations = __webpack_require__(743); -var _helpers = __webpack_require__(745); +var _helpers = __webpack_require__(744); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -115336,11 +113683,11 @@ exports.QueryIDGenerator = QueryIDGenerator; QueryIDGenerator.UNNAMED = 'unnamed'; /***/ }), -/* 730 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(553), - createAggregator = __webpack_require__(706); +var baseAssignValue = __webpack_require__(552), + createAggregator = __webpack_require__(705); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -115383,13 +113730,13 @@ module.exports = groupBy; /***/ }), -/* 731 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { -var baseDifference = __webpack_require__(732), - baseFlatten = __webpack_require__(560), - baseRest = __webpack_require__(563), - isArrayLikeObject = __webpack_require__(571); +var baseDifference = __webpack_require__(731), + baseFlatten = __webpack_require__(559), + baseRest = __webpack_require__(562), + isArrayLikeObject = __webpack_require__(570); /** * Creates an array of `array` values not included in the other given arrays @@ -115422,7 +113769,7 @@ module.exports = difference; /***/ }), -/* 732 */ +/* 731 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(425), @@ -115495,13 +113842,13 @@ module.exports = baseDifference; /***/ }), -/* 733 */ +/* 732 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(410), - baseIntersection = __webpack_require__(734), - baseRest = __webpack_require__(563), - castArrayLikeObject = __webpack_require__(735); + baseIntersection = __webpack_require__(733), + baseRest = __webpack_require__(562), + castArrayLikeObject = __webpack_require__(734); /** * Creates an array of unique values that are included in all given arrays @@ -115531,7 +113878,7 @@ module.exports = intersection; /***/ }), -/* 734 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { var SetCache = __webpack_require__(425), @@ -115611,10 +113958,10 @@ module.exports = baseIntersection; /***/ }), -/* 735 */ +/* 734 */ /***/ (function(module, exports, __webpack_require__) { -var isArrayLikeObject = __webpack_require__(571); +var isArrayLikeObject = __webpack_require__(570); /** * Casts `value` to an empty array if it's not an array like object. @@ -115631,12 +113978,12 @@ module.exports = castArrayLikeObject; /***/ }), -/* 736 */ +/* 735 */ /***/ (function(module, exports, __webpack_require__) { var arrayPush = __webpack_require__(437), - baseFlatten = __webpack_require__(560), - copyArray = __webpack_require__(590), + baseFlatten = __webpack_require__(559), + copyArray = __webpack_require__(589), isArray = __webpack_require__(75); /** @@ -115680,10 +114027,10 @@ module.exports = concat; /***/ }), -/* 737 */ +/* 736 */ /***/ (function(module, exports, __webpack_require__) { -var baseOrderBy = __webpack_require__(738), +var baseOrderBy = __webpack_require__(737), isArray = __webpack_require__(75); /** @@ -115733,16 +114080,16 @@ module.exports = orderBy; /***/ }), -/* 738 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(410), baseGet = __webpack_require__(371), baseIteratee = __webpack_require__(413), - baseMap = __webpack_require__(739), - baseSortBy = __webpack_require__(740), + baseMap = __webpack_require__(738), + baseSortBy = __webpack_require__(739), baseUnary = __webpack_require__(452), - compareMultiple = __webpack_require__(741), + compareMultiple = __webpack_require__(740), identity = __webpack_require__(471), isArray = __webpack_require__(75); @@ -115788,10 +114135,10 @@ module.exports = baseOrderBy; /***/ }), -/* 739 */ +/* 738 */ /***/ (function(module, exports, __webpack_require__) { -var baseEach = __webpack_require__(574), +var baseEach = __webpack_require__(573), isArrayLike = __webpack_require__(458); /** @@ -115816,7 +114163,7 @@ module.exports = baseMap; /***/ }), -/* 740 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -115843,10 +114190,10 @@ module.exports = baseSortBy; /***/ }), -/* 741 */ +/* 740 */ /***/ (function(module, exports, __webpack_require__) { -var compareAscending = __webpack_require__(742); +var compareAscending = __webpack_require__(741); /** * Used by `_.orderBy` to compare multiple properties of a value to another @@ -115893,7 +114240,7 @@ module.exports = compareMultiple; /***/ }), -/* 742 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { var isSymbol = __webpack_require__(374); @@ -115940,7 +114287,7 @@ module.exports = compareAscending; /***/ }), -/* 743 */ +/* 742 */ /***/ (function(module, exports, __webpack_require__) { /* @@ -116534,20 +114881,20 @@ module.exports = compareAscending; /***/ }), -/* 744 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.receiveMutationError = exports.receiveMutationResult = exports.initMutation = exports.isReceivingMutationResult = exports.isMutationAction = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -116607,7 +114954,7 @@ var receiveMutationError = function receiveMutationError(mutationId, error) { exports.receiveMutationError = receiveMutationError; /***/ }), -/* 745 */ +/* 744 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -116625,26 +114972,26 @@ var properId = function properId(doc) { exports.properId = properId; /***/ }), -/* 746 */ +/* 745 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); /** * Associations are used by components to access related store documents that are @@ -116900,46 +115247,46 @@ var _default = Association; exports.default = _default; /***/ }), -/* 747 */ +/* 746 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.updateRelationship = exports.updateHasManyItem = exports.removeHasManyItem = exports.setHasManyItem = exports.getHasManyItems = exports.getHasManyItem = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(613)); +var _assertThisInitialized2 = _interopRequireDefault(__webpack_require__(612)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); var _get = _interopRequireDefault(__webpack_require__(370)); -var _merge = _interopRequireDefault(__webpack_require__(748)); +var _merge = _interopRequireDefault(__webpack_require__(747)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _store = __webpack_require__(699); +var _store = __webpack_require__(698); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); -var _Association2 = _interopRequireDefault(__webpack_require__(746)); +var _Association2 = _interopRequireDefault(__webpack_require__(745)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -117327,11 +115674,11 @@ var _default = HasMany; exports.default = _default; /***/ }), -/* 748 */ +/* 747 */ /***/ (function(module, exports, __webpack_require__) { -var baseMerge = __webpack_require__(749), - createAssigner = __webpack_require__(754); +var baseMerge = __webpack_require__(748), + createAssigner = __webpack_require__(753); /** * This method is like `_.assign` except that it recursively merges own and @@ -117372,16 +115719,16 @@ module.exports = merge; /***/ }), -/* 749 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { var Stack = __webpack_require__(416), - assignMergeValue = __webpack_require__(750), - baseFor = __webpack_require__(556), - baseMergeDeep = __webpack_require__(751), + assignMergeValue = __webpack_require__(749), + baseFor = __webpack_require__(555), + baseMergeDeep = __webpack_require__(750), isObject = __webpack_require__(72), - keysIn = __webpack_require__(586), - safeGet = __webpack_require__(752); + keysIn = __webpack_require__(585), + safeGet = __webpack_require__(751); /** * The base implementation of `_.merge` without support for multiple sources. @@ -117420,10 +115767,10 @@ module.exports = baseMerge; /***/ }), -/* 750 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { -var baseAssignValue = __webpack_require__(553), +var baseAssignValue = __webpack_require__(552), eq = __webpack_require__(397); /** @@ -117446,24 +115793,24 @@ module.exports = assignMergeValue; /***/ }), -/* 751 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { -var assignMergeValue = __webpack_require__(750), - cloneBuffer = __webpack_require__(589), - cloneTypedArray = __webpack_require__(602), - copyArray = __webpack_require__(590), - initCloneObject = __webpack_require__(603), +var assignMergeValue = __webpack_require__(749), + cloneBuffer = __webpack_require__(588), + cloneTypedArray = __webpack_require__(601), + copyArray = __webpack_require__(589), + initCloneObject = __webpack_require__(602), isArguments = __webpack_require__(444), isArray = __webpack_require__(75), - isArrayLikeObject = __webpack_require__(571), + isArrayLikeObject = __webpack_require__(570), isBuffer = __webpack_require__(446), isFunction = __webpack_require__(65), isObject = __webpack_require__(72), - isPlainObject = __webpack_require__(638), + isPlainObject = __webpack_require__(637), isTypedArray = __webpack_require__(449), - safeGet = __webpack_require__(752), - toPlainObject = __webpack_require__(753); + safeGet = __webpack_require__(751), + toPlainObject = __webpack_require__(752); /** * A specialized version of `baseMerge` for arrays and objects which performs @@ -117546,7 +115893,7 @@ module.exports = baseMergeDeep; /***/ }), -/* 752 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -117573,11 +115920,11 @@ module.exports = safeGet; /***/ }), -/* 753 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { -var copyObject = __webpack_require__(584), - keysIn = __webpack_require__(586); +var copyObject = __webpack_require__(583), + keysIn = __webpack_require__(585); /** * Converts `value` to a plain object flattening inherited enumerable string @@ -117611,11 +115958,11 @@ module.exports = toPlainObject; /***/ }), -/* 754 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { -var baseRest = __webpack_require__(563), - isIterateeCall = __webpack_require__(755); +var baseRest = __webpack_require__(562), + isIterateeCall = __webpack_require__(754); /** * Creates a function like `_.assign`. @@ -117654,7 +116001,7 @@ module.exports = createAssigner; /***/ }), -/* 755 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { var eq = __webpack_require__(397), @@ -117690,40 +116037,40 @@ module.exports = isIterateeCall; /***/ }), -/* 756 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); var _get2 = _interopRequireDefault(__webpack_require__(370)); -var _set2 = _interopRequireDefault(__webpack_require__(757)); +var _set2 = _interopRequireDefault(__webpack_require__(756)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); -var _Association2 = _interopRequireDefault(__webpack_require__(746)); +var _Association2 = _interopRequireDefault(__webpack_require__(745)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -117819,10 +116166,10 @@ var HasOne = /*#__PURE__*/function (_Association) { exports.default = HasOne; /***/ }), -/* 757 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { -var baseSet = __webpack_require__(658); +var baseSet = __webpack_require__(657); /** * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, @@ -117860,36 +116207,36 @@ module.exports = set; /***/ }), -/* 758 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.BelongsToInPlace = exports.default = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _Association2 = _interopRequireDefault(__webpack_require__(746)); +var _Association2 = _interopRequireDefault(__webpack_require__(745)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -117951,36 +116298,36 @@ var BelongsToInPlace = HasOneInPlace; exports.BelongsToInPlace = BelongsToInPlace; /***/ }), -/* 759 */ +/* 758 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); -var _Association2 = _interopRequireDefault(__webpack_require__(746)); +var _Association2 = _interopRequireDefault(__webpack_require__(745)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -118124,34 +116471,34 @@ var _default = HasManyInPlace; exports.default = _default; /***/ }), -/* 760 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _get2 = _interopRequireDefault(__webpack_require__(677)); +var _get2 = _interopRequireDefault(__webpack_require__(676)); -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _HasMany2 = _interopRequireDefault(__webpack_require__(747)); +var _HasMany2 = _interopRequireDefault(__webpack_require__(746)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } @@ -118205,36 +116552,36 @@ var _default = HasManyTriggers; exports.default = _default; /***/ }), -/* 761 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.create = exports.resolveClass = exports.attachRelationships = exports.responseToRelationship = exports.pickTypeAndId = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _pick = _interopRequireDefault(__webpack_require__(672)); +var _pick = _interopRequireDefault(__webpack_require__(671)); -var _pickBy = _interopRequireDefault(__webpack_require__(656)); +var _pickBy = _interopRequireDefault(__webpack_require__(655)); -var _Association = _interopRequireDefault(__webpack_require__(746)); +var _Association = _interopRequireDefault(__webpack_require__(745)); -var _HasOne = _interopRequireDefault(__webpack_require__(756)); +var _HasOne = _interopRequireDefault(__webpack_require__(755)); -var _HasOneInPlace = _interopRequireDefault(__webpack_require__(758)); +var _HasOneInPlace = _interopRequireDefault(__webpack_require__(757)); -var _HasMany = _interopRequireDefault(__webpack_require__(747)); +var _HasMany = _interopRequireDefault(__webpack_require__(746)); -var _HasManyInPlace = _interopRequireDefault(__webpack_require__(759)); +var _HasManyInPlace = _interopRequireDefault(__webpack_require__(758)); -var _HasManyFiles = _interopRequireDefault(__webpack_require__(698)); +var _HasManyFiles = _interopRequireDefault(__webpack_require__(697)); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -118339,22 +116686,22 @@ var create = function create(target, _ref, accessors) { exports.create = create; /***/ }), -/* 762 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.generateWebLink = exports.dehydrate = void 0; -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(539)); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(538)); -var _associations = __webpack_require__(697); +var _associations = __webpack_require__(696); function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } @@ -118451,28 +116798,28 @@ var generateWebLink = function generateWebLink(_ref3) { exports.generateWebLink = generateWebLink; /***/ }), -/* 763 */ +/* 762 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.authFunction = exports.authenticateWithCordova = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _const = __webpack_require__(691); +var _const = __webpack_require__(690); -var _cozyDeviceHelper = __webpack_require__(764); +var _cozyDeviceHelper = __webpack_require__(763); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); /* global prompt */ @@ -118634,7 +116981,7 @@ var authFunction = authenticateWithCordova; exports.authFunction = authFunction; /***/ }), -/* 764 */ +/* 763 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -118752,22 +117099,22 @@ Object.defineProperty(exports, "openDeeplinkOrRedirect", { } }); -var _platform = __webpack_require__(765); +var _platform = __webpack_require__(764); -var _device = __webpack_require__(767); +var _device = __webpack_require__(766); -var _apps = __webpack_require__(777); +var _apps = __webpack_require__(776); -var _plugins = __webpack_require__(776); +var _plugins = __webpack_require__(775); -var _cordova = __webpack_require__(766); +var _cordova = __webpack_require__(765); -var _link = __webpack_require__(778); +var _link = __webpack_require__(777); -var _deeplink = __webpack_require__(779); +var _deeplink = __webpack_require__(778); /***/ }), -/* 765 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -118778,7 +117125,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.isMobile = exports.isIOS = exports.isAndroid = exports.isMobileApp = exports.isWebApp = exports.isAndroidApp = exports.isIOSApp = exports.getPlatform = void 0; -var _cordova = __webpack_require__(766); +var _cordova = __webpack_require__(765); var WEB_PLATFORM = 'web'; var IOS_PLATFORM = 'ios'; @@ -118840,7 +117187,7 @@ var isMobile = function isMobile() { exports.isMobile = isMobile; /***/ }), -/* 766 */ +/* 765 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -118859,26 +117206,26 @@ var isCordova = function isCordova() { exports.isCordova = isCordova; /***/ }), -/* 767 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.getDeviceName = void 0; -var _capitalize = _interopRequireDefault(__webpack_require__(768)); +var _capitalize = _interopRequireDefault(__webpack_require__(767)); -var _cordova = __webpack_require__(766); +var _cordova = __webpack_require__(765); -var _plugins = __webpack_require__(776); +var _plugins = __webpack_require__(775); -var _platform = __webpack_require__(765); +var _platform = __webpack_require__(764); var DEFAULT_DEVICE = 'Device'; // device @@ -118915,11 +117262,11 @@ var getDeviceName = function getDeviceName() { exports.getDeviceName = getDeviceName; /***/ }), -/* 768 */ +/* 767 */ /***/ (function(module, exports, __webpack_require__) { var toString = __webpack_require__(408), - upperFirst = __webpack_require__(769); + upperFirst = __webpack_require__(768); /** * Converts the first character of `string` to upper case and the remaining @@ -118944,10 +117291,10 @@ module.exports = capitalize; /***/ }), -/* 769 */ +/* 768 */ /***/ (function(module, exports, __webpack_require__) { -var createCaseFirst = __webpack_require__(770); +var createCaseFirst = __webpack_require__(769); /** * Converts the first character of `string` to upper case. @@ -118972,12 +117319,12 @@ module.exports = upperFirst; /***/ }), -/* 770 */ +/* 769 */ /***/ (function(module, exports, __webpack_require__) { -var castSlice = __webpack_require__(771), - hasUnicode = __webpack_require__(772), - stringToArray = __webpack_require__(773), +var castSlice = __webpack_require__(770), + hasUnicode = __webpack_require__(771), + stringToArray = __webpack_require__(772), toString = __webpack_require__(408); /** @@ -119011,10 +117358,10 @@ module.exports = createCaseFirst; /***/ }), -/* 771 */ +/* 770 */ /***/ (function(module, exports, __webpack_require__) { -var baseSlice = __webpack_require__(636); +var baseSlice = __webpack_require__(635); /** * Casts `array` to a slice if it's needed. @@ -119035,7 +117382,7 @@ module.exports = castSlice; /***/ }), -/* 772 */ +/* 771 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ @@ -119067,12 +117414,12 @@ module.exports = hasUnicode; /***/ }), -/* 773 */ +/* 772 */ /***/ (function(module, exports, __webpack_require__) { -var asciiToArray = __webpack_require__(774), - hasUnicode = __webpack_require__(772), - unicodeToArray = __webpack_require__(775); +var asciiToArray = __webpack_require__(773), + hasUnicode = __webpack_require__(771), + unicodeToArray = __webpack_require__(774); /** * Converts `string` to an array. @@ -119091,7 +117438,7 @@ module.exports = stringToArray; /***/ }), -/* 774 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -119109,7 +117456,7 @@ module.exports = asciiToArray; /***/ }), -/* 775 */ +/* 774 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ @@ -119155,7 +117502,7 @@ module.exports = unicodeToArray; /***/ }), -/* 776 */ +/* 775 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -119166,7 +117513,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.hasNetworkInformationPlugin = exports.hasSafariPlugin = exports.hasInAppBrowserPlugin = exports.hasDevicePlugin = void 0; -var _cordova = __webpack_require__(766); +var _cordova = __webpack_require__(765); var hasDevicePlugin = function hasDevicePlugin() { return (0, _cordova.isCordova)() && window.device !== undefined; @@ -119208,24 +117555,24 @@ var hasNetworkInformationPlugin = function hasNetworkInformationPlugin() { exports.hasNetworkInformationPlugin = hasNetworkInformationPlugin; /***/ }), -/* 777 */ +/* 776 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.startApp = exports.checkApp = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _platform = __webpack_require__(765); +var _platform = __webpack_require__(764); var cordovaPluginIsInstalled = function cordovaPluginIsInstalled() { return window.startApp; @@ -119362,24 +117709,24 @@ var _default = exported; exports.default = _default; /***/ }), -/* 778 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.nativeLinkOpen = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _plugins = __webpack_require__(776); +var _plugins = __webpack_require__(775); var nativeLinkOpen = /*#__PURE__*/function () { var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(_ref) { @@ -119446,7 +117793,7 @@ var nativeLinkOpen = /*#__PURE__*/function () { exports.nativeLinkOpen = nativeLinkOpen; /***/ }), -/* 779 */ +/* 778 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -119567,32 +117914,32 @@ var openDeeplinkOrRedirect = function openDeeplinkOrRedirect(deeplink, failCb) { exports.openDeeplinkOrRedirect = openDeeplinkOrRedirect; /***/ }), -/* 780 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _mapValues = _interopRequireDefault(__webpack_require__(552)); +var _mapValues = _interopRequireDefault(__webpack_require__(551)); -var _groupBy2 = _interopRequireDefault(__webpack_require__(730)); +var _groupBy2 = _interopRequireDefault(__webpack_require__(729)); -var _flatten = _interopRequireDefault(__webpack_require__(559)); +var _flatten = _interopRequireDefault(__webpack_require__(558)); -var _isEqual = _interopRequireDefault(__webpack_require__(654)); +var _isEqual = _interopRequireDefault(__webpack_require__(653)); -var _uniq = _interopRequireDefault(__webpack_require__(631)); +var _uniq = _interopRequireDefault(__webpack_require__(630)); -var _uniqWith = _interopRequireDefault(__webpack_require__(781)); +var _uniqWith = _interopRequireDefault(__webpack_require__(780)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); var isIdQuery = function isIdQuery(query) { return query.id || query.ids; @@ -119647,7 +117994,7 @@ var _default = optimizeQueries; exports.default = _default; /***/ }), -/* 781 */ +/* 780 */ /***/ (function(module, exports, __webpack_require__) { var baseUniq = __webpack_require__(475); @@ -119681,7 +118028,7 @@ module.exports = uniqWith; /***/ }), -/* 782 */ +/* 781 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -119732,40 +118079,40 @@ var _default = fetchPolicies; exports.default = _default; /***/ }), -/* 783 */ +/* 782 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _keyBy = _interopRequireDefault(__webpack_require__(705)); +var _keyBy = _interopRequireDefault(__webpack_require__(704)); -var _mapValues = _interopRequireDefault(__webpack_require__(552)); +var _mapValues = _interopRequireDefault(__webpack_require__(551)); -var _merge = _interopRequireDefault(__webpack_require__(748)); +var _merge = _interopRequireDefault(__webpack_require__(747)); -var _size = _interopRequireDefault(__webpack_require__(784)); +var _size = _interopRequireDefault(__webpack_require__(783)); -var _intersectionBy = _interopRequireDefault(__webpack_require__(788)); +var _intersectionBy = _interopRequireDefault(__webpack_require__(787)); -var _associations = __webpack_require__(697); +var _associations = __webpack_require__(696); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -120050,14 +118397,14 @@ var _default = Schema; exports.default = _default; /***/ }), -/* 784 */ +/* 783 */ /***/ (function(module, exports, __webpack_require__) { var baseKeys = __webpack_require__(454), getTag = __webpack_require__(459), isArrayLike = __webpack_require__(458), isString = __webpack_require__(74), - stringSize = __webpack_require__(785); + stringSize = __webpack_require__(784); /** `Object#toString` result references. */ var mapTag = '[object Map]', @@ -120102,12 +118449,12 @@ module.exports = size; /***/ }), -/* 785 */ +/* 784 */ /***/ (function(module, exports, __webpack_require__) { -var asciiSize = __webpack_require__(786), - hasUnicode = __webpack_require__(772), - unicodeSize = __webpack_require__(787); +var asciiSize = __webpack_require__(785), + hasUnicode = __webpack_require__(771), + unicodeSize = __webpack_require__(786); /** * Gets the number of symbols in `string`. @@ -120126,7 +118473,7 @@ module.exports = stringSize; /***/ }), -/* 786 */ +/* 785 */ /***/ (function(module, exports, __webpack_require__) { var baseProperty = __webpack_require__(473); @@ -120144,7 +118491,7 @@ module.exports = asciiSize; /***/ }), -/* 787 */ +/* 786 */ /***/ (function(module, exports) { /** Used to compose unicode character classes. */ @@ -120194,15 +118541,15 @@ module.exports = unicodeSize; /***/ }), -/* 788 */ +/* 787 */ /***/ (function(module, exports, __webpack_require__) { var arrayMap = __webpack_require__(410), - baseIntersection = __webpack_require__(734), + baseIntersection = __webpack_require__(733), baseIteratee = __webpack_require__(413), - baseRest = __webpack_require__(563), - castArrayLikeObject = __webpack_require__(735), - last = __webpack_require__(634); + baseRest = __webpack_require__(562), + castArrayLikeObject = __webpack_require__(734), + last = __webpack_require__(633); /** * This method is like `_.intersection` except that it accepts `iteratee` @@ -120245,28 +118592,28 @@ module.exports = intersectionBy; /***/ }), -/* 789 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); var _get = _interopRequireDefault(__webpack_require__(370)); -var _store = __webpack_require__(699); +var _store = __webpack_require__(698); /** * ObservableQueries are the glue between the store and observers @@ -120444,26 +118791,26 @@ function shallowEqual(objA, objB) { } /***/ }), -/* 790 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.CozyClient = void 0; -var _inherits2 = _interopRequireDefault(__webpack_require__(610)); +var _inherits2 = _interopRequireDefault(__webpack_require__(609)); -var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(612)); +var _possibleConstructorReturn2 = _interopRequireDefault(__webpack_require__(611)); -var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(614)); +var _getPrototypeOf2 = _interopRequireDefault(__webpack_require__(613)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; } @@ -120490,10 +118837,10 @@ var CozyClient = /*#__PURE__*/function (_SnapshotObject) { exports.CozyClient = CozyClient; /***/ }), -/* 791 */ +/* 790 */ /***/ (function(module, exports, __webpack_require__) { -var json = typeof JSON !== 'undefined' ? JSON : __webpack_require__(792); +var json = typeof JSON !== 'undefined' ? JSON : __webpack_require__(791); module.exports = function (obj, opts) { if (!opts) opts = {}; @@ -120580,15 +118927,15 @@ var objectKeys = Object.keys || function (obj) { /***/ }), -/* 792 */ +/* 791 */ /***/ (function(module, exports, __webpack_require__) { -exports.parse = __webpack_require__(793); -exports.stringify = __webpack_require__(794); +exports.parse = __webpack_require__(792); +exports.stringify = __webpack_require__(793); /***/ }), -/* 793 */ +/* 792 */ /***/ (function(module, exports) { var at, // The index of the current character @@ -120867,7 +119214,7 @@ module.exports = function (source, reviver) { /***/ }), -/* 794 */ +/* 793 */ /***/ (function(module, exports) { var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, @@ -121027,26 +119374,26 @@ module.exports = function (value, replacer, space) { /***/ }), -/* 795 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); /** * Caches promises while they are pending @@ -121143,10 +119490,10 @@ var _default = PromiseCache; exports.default = _default; /***/ }), -/* 796 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { -var createFlow = __webpack_require__(797); +var createFlow = __webpack_require__(796); /** * Creates a function that returns the result of invoking the given functions @@ -121176,15 +119523,15 @@ module.exports = flow; /***/ }), -/* 797 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { -var LodashWrapper = __webpack_require__(798), - flatRest = __webpack_require__(639), - getData = __webpack_require__(800), - getFuncName = __webpack_require__(802), +var LodashWrapper = __webpack_require__(797), + flatRest = __webpack_require__(638), + getData = __webpack_require__(799), + getFuncName = __webpack_require__(801), isArray = __webpack_require__(75), - isLaziable = __webpack_require__(804); + isLaziable = __webpack_require__(803); /** Error message constants. */ var FUNC_ERROR_TEXT = 'Expected a function'; @@ -121260,11 +119607,11 @@ module.exports = createFlow; /***/ }), -/* 798 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { -var baseCreate = __webpack_require__(604), - baseLodash = __webpack_require__(799); +var baseCreate = __webpack_require__(603), + baseLodash = __webpack_require__(798); /** * The base constructor for creating `lodash` wrapper objects. @@ -121288,7 +119635,7 @@ module.exports = LodashWrapper; /***/ }), -/* 799 */ +/* 798 */ /***/ (function(module, exports) { /** @@ -121304,10 +119651,10 @@ module.exports = baseLodash; /***/ }), -/* 800 */ +/* 799 */ /***/ (function(module, exports, __webpack_require__) { -var metaMap = __webpack_require__(801), +var metaMap = __webpack_require__(800), noop = __webpack_require__(483); /** @@ -121325,7 +119672,7 @@ module.exports = getData; /***/ }), -/* 801 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { var WeakMap = __webpack_require__(463); @@ -121337,10 +119684,10 @@ module.exports = metaMap; /***/ }), -/* 802 */ +/* 801 */ /***/ (function(module, exports, __webpack_require__) { -var realNames = __webpack_require__(803); +var realNames = __webpack_require__(802); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -121374,7 +119721,7 @@ module.exports = getFuncName; /***/ }), -/* 803 */ +/* 802 */ /***/ (function(module, exports) { /** Used to lookup unminified function names. */ @@ -121384,13 +119731,13 @@ module.exports = realNames; /***/ }), -/* 804 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { -var LazyWrapper = __webpack_require__(805), - getData = __webpack_require__(800), - getFuncName = __webpack_require__(802), - lodash = __webpack_require__(806); +var LazyWrapper = __webpack_require__(804), + getData = __webpack_require__(799), + getFuncName = __webpack_require__(801), + lodash = __webpack_require__(805); /** * Checks if `func` has a lazy counterpart. @@ -121418,11 +119765,11 @@ module.exports = isLaziable; /***/ }), -/* 805 */ +/* 804 */ /***/ (function(module, exports, __webpack_require__) { -var baseCreate = __webpack_require__(604), - baseLodash = __webpack_require__(799); +var baseCreate = __webpack_require__(603), + baseLodash = __webpack_require__(798); /** Used as references for the maximum length and index of an array. */ var MAX_ARRAY_LENGTH = 4294967295; @@ -121452,15 +119799,15 @@ module.exports = LazyWrapper; /***/ }), -/* 806 */ +/* 805 */ /***/ (function(module, exports, __webpack_require__) { -var LazyWrapper = __webpack_require__(805), - LodashWrapper = __webpack_require__(798), - baseLodash = __webpack_require__(799), +var LazyWrapper = __webpack_require__(804), + LodashWrapper = __webpack_require__(797), + baseLodash = __webpack_require__(798), isArray = __webpack_require__(75), isObjectLike = __webpack_require__(73), - wrapperClone = __webpack_require__(807); + wrapperClone = __webpack_require__(806); /** Used for built-in method references. */ var objectProto = Object.prototype; @@ -121605,12 +119952,12 @@ module.exports = lodash; /***/ }), -/* 807 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { -var LazyWrapper = __webpack_require__(805), - LodashWrapper = __webpack_require__(798), - copyArray = __webpack_require__(590); +var LazyWrapper = __webpack_require__(804), + LodashWrapper = __webpack_require__(797), + copyArray = __webpack_require__(589); /** * Creates a clone of `wrapper`. @@ -121634,7 +119981,7 @@ module.exports = wrapperClone; /***/ }), -/* 808 */ +/* 807 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -121705,13 +120052,13 @@ var hasQueryBeenLoaded = function hasQueryBeenLoaded(col) { exports.hasQueryBeenLoaded = hasQueryBeenLoaded; /***/ }), -/* 809 */ +/* 808 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true @@ -121721,9 +120068,9 @@ exports.areTermsValid = areTermsValid; exports.isPartnershipValid = isPartnershipValid; exports.sanitize = sanitize; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -121794,32 +120141,32 @@ function sanitize(manifest) { } /***/ }), -/* 810 */ +/* 809 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.createMockClient = void 0; -var _slicedToArray2 = _interopRequireDefault(__webpack_require__(539)); +var _slicedToArray2 = _interopRequireDefault(__webpack_require__(538)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(544)); +var _objectWithoutProperties2 = _interopRequireDefault(__webpack_require__(543)); -var _CozyClient = _interopRequireDefault(__webpack_require__(532)); +var _CozyClient = _interopRequireDefault(__webpack_require__(531)); -var _store = __webpack_require__(699); +var _store = __webpack_require__(698); -var _cozyStackClient = __webpack_require__(578); +var _cozyStackClient = __webpack_require__(577); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -121896,36 +120243,36 @@ var createMockClient = function createMockClient(_ref) { exports.createMockClient = createMockClient; /***/ }), -/* 811 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(module) { -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.createClientInteractive = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); var _http = _interopRequireDefault(__webpack_require__(98)); -var _open = _interopRequireDefault(__webpack_require__(812)); +var _open = _interopRequireDefault(__webpack_require__(811)); var _fs = _interopRequireDefault(__webpack_require__(167)); -var _merge = _interopRequireDefault(__webpack_require__(748)); +var _merge = _interopRequireDefault(__webpack_require__(747)); -var _serverDestroy = _interopRequireDefault(__webpack_require__(816)); +var _serverDestroy = _interopRequireDefault(__webpack_require__(815)); -var _CozyClient = _interopRequireDefault(__webpack_require__(532)); +var _CozyClient = _interopRequireDefault(__webpack_require__(531)); var _cozyLogger = _interopRequireDefault(__webpack_require__(2)); @@ -121935,7 +120282,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va var log = _cozyLogger.default.namespace('create-cli-client'); -var nodeFetch = __webpack_require__(817); +var nodeFetch = __webpack_require__(493); var btoa = __webpack_require__(490); /** @@ -122231,17 +120578,17 @@ if (__webpack_require__.c[__webpack_require__.s] === module) { /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(13)(module))) /***/ }), -/* 812 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /* WEBPACK VAR INJECTION */(function(__dirname) { const {promisify} = __webpack_require__(9); const path = __webpack_require__(160); -const childProcess = __webpack_require__(813); +const childProcess = __webpack_require__(812); const fs = __webpack_require__(167); -const isWsl = __webpack_require__(814); -const isDocker = __webpack_require__(815); +const isWsl = __webpack_require__(813); +const isDocker = __webpack_require__(814); const pAccess = promisify(fs.access); const pReadFile = promisify(fs.readFile); @@ -122434,20 +120781,20 @@ module.exports = async (target, options) => { /* WEBPACK VAR INJECTION */}.call(this, "/")) /***/ }), -/* 813 */ +/* 812 */ /***/ (function(module, exports) { module.exports = require("child_process"); /***/ }), -/* 814 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; const os = __webpack_require__(19); const fs = __webpack_require__(167); -const isDocker = __webpack_require__(815); +const isDocker = __webpack_require__(814); const isWsl = () => { if (process.platform !== 'linux') { @@ -122478,7 +120825,7 @@ if (process.env.__IS_WSL_TEST__) { /***/ }), -/* 815 */ +/* 814 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -122514,7 +120861,7 @@ module.exports = () => { /***/ }), -/* 816 */ +/* 815 */ /***/ (function(module, exports) { module.exports = enableDestroy; @@ -122539,6203 +120886,7047 @@ function enableDestroy(server) { /***/ }), -/* 817 */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { +/* 816 */ +/***/ (function(module, exports, __webpack_require__) { "use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Headers", function() { return Headers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Request", function() { return Request; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Response", function() { return Response; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FetchError", function() { return FetchError; }); -/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100); -/* harmony import */ var http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98); -/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83); -/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99); -/* harmony import */ var zlib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(101); +var _interopRequireWildcard = __webpack_require__(528); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.timeseries = exports.document = exports.contact = exports.utils = exports.permission = exports.note = exports.account = exports.folder = exports.file = exports.applications = exports.instance = exports.trigger = exports.accounts = exports.triggers = void 0; +var trigger = _interopRequireWildcard(__webpack_require__(817)); +exports.trigger = trigger; -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js +var instance = _interopRequireWildcard(__webpack_require__(819)); -// fix for "Readable" isn't a named export issue -const Readable = stream__WEBPACK_IMPORTED_MODULE_0__.Readable; +exports.instance = instance; -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); +var applications = _interopRequireWildcard(__webpack_require__(820)); -class Blob { - constructor() { - this[TYPE] = ''; +exports.applications = applications; - const blobParts = arguments[0]; - const options = arguments[1]; +var file = _interopRequireWildcard(__webpack_require__(821)); - const buffers = []; - let size = 0; +exports.file = file; - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } +var folder = _interopRequireWildcard(__webpack_require__(825)); - this[BUFFER] = Buffer.concat(buffers); +exports.folder = folder; - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; +var account = _interopRequireWildcard(__webpack_require__(818)); - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); +exports.account = account; - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } -} +var note = _interopRequireWildcard(__webpack_require__(827)); -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); +exports.note = note; -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); +var permission = _interopRequireWildcard(__webpack_require__(828)); -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ +exports.permission = permission; -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); +var utils = _interopRequireWildcard(__webpack_require__(829)); - this.message = message; - this.type = type; +exports.utils = utils; - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } +var contact = _interopRequireWildcard(__webpack_require__(830)); - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} +exports.contact = contact; -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; +var document = _interopRequireWildcard(__webpack_require__(822)); -let convert; -try { - convert = require('encoding').convert; -} catch (e) {} +exports.document = document; -const INTERNALS = Symbol('Body internals'); +var timeseries = _interopRequireWildcard(__webpack_require__(832)); -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = stream__WEBPACK_IMPORTED_MODULE_0__.PassThrough; +exports.timeseries = timeseries; +// For backward compatibility before 9.0.0 +var triggers = trigger; +exports.triggers = triggers; +var accounts = account; +exports.accounts = accounts; -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; +/***/ }), +/* 817 */ +/***/ (function(module, exports, __webpack_require__) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; +"use strict"; - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; +var _interopRequireDefault = __webpack_require__(530); - if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } -} +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.triggers = exports.triggerStates = void 0; -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, +var _get = _interopRequireDefault(__webpack_require__(370)); - get bodyUsed() { - return this[INTERNALS].disturbed; - }, +var _account = __webpack_require__(818); - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, +var actionableErrors = ['CHALLENGE_ASKED', 'DISK_QUOTA_EXCEEDED', 'TERMS_VERSION_MISMATCH', 'USER_ACTION_NEEDED', 'USER_ACTION_NEEDED.CHANGE_PASSWORD', 'USER_ACTION_NEEDED.ACCOUNT_REMOVED', 'USER_ACTION_NEEDED.WEBAUTH_REQUIRED', 'USER_ACTION_NEEDED.SCA_REQUIRED', 'LOGIN_FAILED']; +/** Trigger states come from /jobs/triggers */ - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, +var triggerStates = { + /** Returns when the trigger was last executed. Need a trigger */ + getLastExecution: function getLastExecution(triggerState) { + return (0, _get.default)(triggerState, 'current_state.last_execution'); + }, + getLastsuccess: function getLastsuccess(triggerState) { + console.warn('Deprecated, please use getLastSuccess instead of getLastsuccess'); + return (0, _get.default)(triggerState, 'current_state.last_success'); + }, - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; + /** Returns when the trigger was last successfully executed. */ + getLastSuccess: function getLastSuccess(triggerState) { + return (0, _get.default)(triggerState, 'current_state.last_success'); + }, - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, + /** Returns whether last job failed */ + isErrored: function isErrored(triggerState) { + return (0, _get.default)(triggerState, 'current_state.status') === 'errored'; + }, - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, + /** Returns the type of the last error to occur */ + getLastErrorType: function getLastErrorType(triggerState) { + return (0, _get.default)(triggerState, 'current_state.last_error'); + } +}; +exports.triggerStates = triggerStates; +var triggers = { + isKonnectorWorker: function isKonnectorWorker(trigger) { + return trigger.worker === 'konnector'; + }, - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, + /** + * Returns the konnector slug that executed a trigger + * + * @param {object} trigger io.cozy.triggers + * + * @returns {string|void} A konnector slug + */ + getKonnector: function getKonnector(trigger) { + if (!triggers.isKonnectorWorker(trigger)) { + return null; + } - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; + if (trigger.message && trigger.message.konnector) { + return trigger.message.konnector; + } else if (trigger.message && trigger.message.Data) { + // Legacy triggers + var message = JSON.parse(atob(trigger.message.Data)); + return message.konnector; + } + }, - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } + /** + * getAccountId - Returns the account id for a trigger + * + * @param {object} trigger io.cozy.triggers + * + * @returns {string} Id for an io.cozy.accounts + */ + getAccountId: function getAccountId(trigger) { + var legacyData = (0, _get.default)(trigger, 'message.Data'); + + if (legacyData) { + var message = JSON.parse(atob(legacyData)); + return message.account; + } else { + return (0, _get.default)(trigger, 'message.account'); + } + }, + + /** + * Checks if the triggers current error has been muted in the corresponding io.cozy.accounts + * + * @param {object} trigger io.cozy.triggers + * @param {object} account io.cozy.accounts used by the trigger + * + * @returns {boolean} Whether the error is muted or not + */ + isLatestErrorMuted: function isLatestErrorMuted(trigger, account) { + var lastErrorType = triggerStates.getLastErrorType(trigger); + var lastSuccess = triggerStates.getLastSuccess(trigger); + var lastSuccessDate = lastSuccess ? new Date(lastSuccess) : new Date(); + var mutedErrors = (0, _account.getMutedErrors)(account); + var isErrorMuted = mutedErrors.some(function (mutedError) { + return mutedError.type === lastErrorType && (!lastSuccess || new Date(mutedError.mutedAt) > lastSuccessDate); + }); + return isErrorMuted; + }, + + /** + * Returns whether the error in trigger can be solved by the user + * + * @param {object} trigger io.cozy.triggers + * + * @returns {boolean} Whether the error is muted or not + */ + hasActionableError: function hasActionableError(trigger) { + return actionableErrors.includes(trigger.current_state.last_error); + } }; +exports.triggers = triggers; -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } +/***/ }), +/* 818 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(530); + +Object.defineProperty(exports, "__esModule", { + value: true }); +exports.setContractSyncStatusInAccount = exports.getContractSyncStatusFromAccount = exports.muteError = exports.getMutedErrors = void 0; -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); + +var _get = _interopRequireDefault(__webpack_require__(370)); + +var _merge = _interopRequireDefault(__webpack_require__(747)); + +var _HasMany = __webpack_require__(746); + +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } /** - * Consume and convert an entire Body to a Buffer. + * @typedef {object} CozyAccount + */ + +/** + * getMutedErrors - Returns the list of errors that have been muted for the given account * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body + * @param {object} account io.cozy.accounts * - * @return Promise + * @returns {Array} An array of errors with a `type` and `mutedAt` field + */ +var getMutedErrors = function getMutedErrors(account) { + return (0, _get.default)(account, 'mutedErrors', []); +}; +/** + * muteError - Adds an error to the list of muted errors for the given account + * + * @param {CozyAccount} account io.cozy.accounts + * @param {string} errorType The type of the error to mute + * + * @returns {CozyAccount} An updated io.cozy.accounts */ -function consumeBody() { - var _this4 = this; - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } - this[INTERNALS].disturbed = true; +exports.getMutedErrors = getMutedErrors; - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } +var muteError = function muteError(account, errorType) { + var mutedErrors = getMutedErrors(account); + mutedErrors.push({ + type: errorType, + mutedAt: new Date().toISOString() + }); + return _objectSpread(_objectSpread({}, account), {}, { + mutedErrors: mutedErrors + }); +}; - let body = this.body; +exports.muteError = muteError; +var DEFAULT_CONTRACT_SYNC_STATUS = true; +/** + * Returns whether a contract is synced from account relationship + * + * @param {CozyAccount} account - Cozy account + */ - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } +var getContractSyncStatusFromAccount = function getContractSyncStatusFromAccount(account, contractId) { + var relItem = (0, _HasMany.getHasManyItem)(account, 'contracts', contractId); - // body is blob - if (isBlob(body)) { - body = body.stream(); - } + if (!relItem) { + throw new Error("Cannot find contrat ".concat(contractId, " in account")); + } - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } + return (0, _get.default)(relItem, 'metadata.imported', DEFAULT_CONTRACT_SYNC_STATUS); +}; +/** + * Sets contract sync status into account relationship + * + * @param {CozyAccount} account - Cozy account + */ - // istanbul ignore if: should never happen - if (!(body instanceof stream__WEBPACK_IMPORTED_MODULE_0__)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; +exports.getContractSyncStatusFromAccount = getContractSyncStatusFromAccount; - return new Body.Promise(function (resolve, reject) { - let resTimeout; +var setContractSyncStatusInAccount = function setContractSyncStatusInAccount(account, contractId, syncStatus) { + return (0, _HasMany.updateHasManyItem)(account, 'contracts', contractId, function (contractRel) { + if (contractRel === undefined) { + throw new Error("Cannot find contrat ".concat(contractId, " in account")); + } - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } + return (0, _merge.default)({}, contractRel, { + metadata: { + imported: syncStatus + } + }); + }); +}; - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); +exports.setContractSyncStatusInAccount = setContractSyncStatusInAccount; - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } +/***/ }), +/* 819 */ +/***/ (function(module, exports, __webpack_require__) { - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } +"use strict"; - accumBytes += chunk.length; - accum.push(chunk); - }); - body.on('end', function () { - if (abort) { - return; - } +var _interopRequireDefault = __webpack_require__(530); - clearTimeout(resTimeout); +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.buildPremiumLink = exports.hasAnOffer = exports.shouldDisplayOffers = exports.getUuid = exports.isFreemiumUser = exports.arePremiumLinksEnabled = exports.isSelfHosted = void 0; - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} +var _get = _interopRequireDefault(__webpack_require__(370)); +var GB = 1000 * 1000 * 1000; +var PREMIUM_QUOTA = 50 * GB; /** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String + * @typedef {object} InstanceInfo + * @typedef {object} ContextInfo + * @typedef {object} DiskUsageInfo */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; +/** + * @typedef SettingsInfo + * @property {ContextInfo} context - Object returned by /settings/context + * @property {InstanceInfo} instance - Object returned by /settings/instance + * @property {DiskUsageInfo} diskUsage - Object returned by /settings/disk-usage + */ +// If manager URL is present, then the instance is not self-hosted - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } +var isSelfHosted = function isSelfHosted(instanceInfo) { + return (0, _get.default)(instanceInfo, 'context.data.attributes.manager_url') ? false : true; +}; - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); +exports.isSelfHosted = isSelfHosted; - // html5 - if (!res && str) { - res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str); - } +var arePremiumLinksEnabled = function arePremiumLinksEnabled(instanceInfo) { + return (0, _get.default)(instanceInfo, 'context.data.attributes.enable_premium_links') ? true : false; +}; - // html4 - if (!res && str) { - res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str); - if (!res) { - res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str); - if (res) { - res.pop(); // drop last quote - } - } +exports.arePremiumLinksEnabled = arePremiumLinksEnabled; - if (res) { - res = /charset=(.*)/i.exec(res.pop()); - } - } +var isFreemiumUser = function isFreemiumUser(instanceInfo) { + var quota = (0, _get.default)(instanceInfo, 'diskUsage.data.attributes.quota', false); + return parseInt(quota) <= PREMIUM_QUOTA; +}; - // xml - if (!res && str) { - res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str); - } +exports.isFreemiumUser = isFreemiumUser; - // found charset - if (res) { - charset = res.pop(); +var getUuid = function getUuid(instanceInfo) { + return (0, _get.default)(instanceInfo, 'instance.data.attributes.uuid'); +}; +/** + * Returns whether an instance is concerned by our offers + * + * @param {SettingsInfo} data Object containing all the results from /settings/* + * @returns {boolean} Should we display offers + */ - // prevent decode issues when sites use incorrect encoding - // ref: https://hsivonen.fi/encoding-menu/ - if (charset === 'gb2312' || charset === 'gbk') { - charset = 'gb18030'; - } - } - // turn raw buffers into a single utf-8 buffer - return convert(buffer, 'UTF-8', charset).toString(); -} +exports.getUuid = getUuid; +var shouldDisplayOffers = function shouldDisplayOffers(data) { + return !isSelfHosted(data) && arePremiumLinksEnabled(data) && getUuid(data) && isFreemiumUser(data); +}; /** - * Detect a URLSearchParams object - * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143 + * Returns if an instance has subscribed to one of our offers * - * @param Object obj Object to detect by type or brand - * @return String + * @param {SettingsInfo} data Object containing all the results from /settings/* + * @returns {boolean} Does the cozy have offers */ -function isURLSearchParams(obj) { - // Duck-typing as a necessary condition. - if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') { - return false; - } - // Brand-checking and more duck-typing as optional condition. - return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function'; -} -/** - * Check if `obj` is a W3C `Blob` object (which `File` inherits from) - * @param {*} obj - * @return {boolean} - */ -function isBlob(obj) { - return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); -} +exports.shouldDisplayOffers = shouldDisplayOffers; +var hasAnOffer = function hasAnOffer(data) { + return !isSelfHosted(data) && arePremiumLinksEnabled(data) && getUuid(data) && !isFreemiumUser(data); +}; /** - * Clone body given Res/Req instance + * Returns the link to the Premium page on the Cozy's Manager * - * @param Mixed instance Response or Request instance - * @return Mixed + * @param {InstanceInfo} instanceInfo - Instance information */ -function clone(instance) { - let p1, p2; - let body = instance.body; - // don't allow cloning a used body - if (instance.bodyUsed) { - throw new Error('cannot clone body after it is used'); - } - // check that body is a stream and not form-data object - // note: we can't clone the form-data object without having it as a dependency - if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__ && typeof body.getBoundary !== 'function') { - // tee instance body - p1 = new PassThrough(); - p2 = new PassThrough(); - body.pipe(p1); - body.pipe(p2); - // set instance body to teed body and return the other teed body - instance[INTERNALS].body = p1; - body = p2; - } +exports.hasAnOffer = hasAnOffer; - return body; -} +var buildPremiumLink = function buildPremiumLink(instanceInfo) { + var managerUrl = (0, _get.default)(instanceInfo, 'context.data.attributes.manager_url', false); + var uuid = getUuid(instanceInfo); + + if (managerUrl && uuid) { + return "".concat(managerUrl, "/cozy/instances/").concat(uuid, "/premium"); + } else { + return null; + } +}; + +exports.buildPremiumLink = buildPremiumLink; + +/***/ }), +/* 820 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var _interopRequireDefault = __webpack_require__(530); + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getAppDisplayName = exports.getUrl = exports.isInstalled = exports.getStoreInstallationURL = exports.getStoreURL = void 0; + +var _get = _interopRequireDefault(__webpack_require__(370)); +var STORE_SLUG = 'store'; /** - * Performs the operation "extract a `Content-Type` value from |object|" as - * specified in the specification: - * https://fetch.spec.whatwg.org/#concept-bodyinit-extract - * - * This function assumes that instance.body is present. + * Returns the store URL of an app/konnector * - * @param Mixed instance Any options.body input + * @param {Array} [appData=[]] Apps data, as returned by endpoint /apps/ or /konnectors + * @param {object} [app={}] AppObject + * @returns {string} URL as string */ -function extractContentType(body) { - if (body === null) { - // body is null - return null; - } else if (typeof body === 'string') { - // body is string - return 'text/plain;charset=UTF-8'; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - return 'application/x-www-form-urlencoded;charset=UTF-8'; - } else if (isBlob(body)) { - // body is blob - return body.type || null; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return null; - } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - return null; - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - return null; - } else if (typeof body.getBoundary === 'function') { - // detect form data input from form-data module - return `multipart/form-data;boundary=${body.getBoundary()}`; - } else if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) { - // body is stream - // can't really do much about this - return null; - } else { - // Body constructor defaults other things to string - return 'text/plain;charset=UTF-8'; - } -} +var getStoreURL = function getStoreURL() { + var appData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var app = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + if (!app.slug) { + throw new Error('Expected app / konnector with the defined slug'); + } + + var storeApp = isInstalled(appData, { + slug: STORE_SLUG + }); + if (!storeApp) return null; + var storeUrl = storeApp.links && storeApp.links.related; + if (!storeUrl) return null; + return "".concat(storeUrl, "#/discover/").concat(app.slug); +}; /** - * The Fetch Standard treats this as if "total bytes" is a property on the body. - * For us, we have to explicitly get it with a function. - * - * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes + * Returns the store URL to install/update an app/konnector * - * @param Body instance Instance of Body - * @return Number? Number of bytes, or null if not possible + * @param {Array} [appData=[]] Apps data, as returned by endpoint /apps/ or + * /konnectors/ + * @param {object} [app={}] AppObject + * @returns {string} URL as string */ -function getTotalBytes(instance) { - const body = instance.body; - if (body === null) { - // body is null - return 0; - } else if (isBlob(body)) { - return body.size; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return body.length; - } else if (body && typeof body.getLengthSync === 'function') { - // detect form data input from form-data module - if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x - body.hasKnownLength && body.hasKnownLength()) { - // 2.x - return body.getLengthSync(); - } - return null; - } else { - // body is stream - return null; - } -} +exports.getStoreURL = getStoreURL; + +var getStoreInstallationURL = function getStoreInstallationURL() { + var appData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var app = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var storeUrl = getStoreURL(appData, app); + if (!storeUrl) { + return null; + } + + return "".concat(storeUrl, "/install"); +}; /** - * Write a Body to a Node.js WritableStream (e.g. http.Request) object. * - * @param Body instance Instance of Body - * @return Void + * @param {Array} apps Array of apps returned by /apps /konnectors + * @param {object} wantedApp io.cozy.app with at least a slug + * @returns {object} The io.cozy.app is installed or undefined if not */ -function writeToStream(dest, instance) { - const body = instance.body; - if (body === null) { - // body is null - dest.end(); - } else if (isBlob(body)) { - body.stream().pipe(dest); - } else if (Buffer.isBuffer(body)) { - // body is buffer - dest.write(body); - dest.end(); - } else { - // body is stream - body.pipe(dest); - } -} - -// expose Promise -Body.Promise = global.Promise; +exports.getStoreInstallationURL = getStoreInstallationURL; +var isInstalled = function isInstalled() { + var apps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var wantedApp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return apps.find(function (app) { + return app.attributes && app.attributes.slug === wantedApp.slug; + }); +}; /** - * headers.js * - * Headers class offers convenient helpers + * @param {object} app io.cozy.apps document + * @returns {string} url to the app */ -const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; -const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; - -function validateName(name) { - name = `${name}`; - if (invalidTokenRegex.test(name) || name === '') { - throw new TypeError(`${name} is not a legal HTTP header name`); - } -} -function validateValue(value) { - value = `${value}`; - if (invalidHeaderCharRegex.test(value)) { - throw new TypeError(`${value} is not a legal HTTP header value`); - } -} +exports.isInstalled = isInstalled; +var getUrl = function getUrl(app) { + return app.links && app.links.related; +}; /** - * Find the key in the map object given a header name. + * getAppDisplayName - Combines the translated prefix and name of the app into a single string. * - * Returns undefined if not found. + * @param {object} app io.cozy.apps or io.cozy.konnectors document + * @param {string} lang Locale to use * - * @param String name Header name - * @return String|Undefined + * @returns {string} Name of the app suitable for display */ -function find(map, name) { - name = name.toLowerCase(); - for (const key in map) { - if (key.toLowerCase() === name) { - return key; - } - } - return undefined; -} -const MAP = Symbol('map'); -class Headers { - /** - * Headers class - * - * @param Object headers Response headers - * @return Void - */ - constructor() { - let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; - this[MAP] = Object.create(null); +exports.getUrl = getUrl; - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); +var getAppDisplayName = function getAppDisplayName(app, lang) { + var basePrefix = (0, _get.default)(app, 'name_prefix'); + var baseName = (0, _get.default)(app, 'name'); + var translatedName = (0, _get.default)(app, ['locales', lang, 'name'], baseName); + var translatedPrefix = (0, _get.default)(app, ['locales', lang, 'name_prefix'], basePrefix); + return translatedPrefix && translatedPrefix.toLowerCase() !== 'cozy' ? "".concat(translatedPrefix, " ").concat(translatedName) : translatedName; +}; - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } +exports.getAppDisplayName = getAppDisplayName; - return; - } +/***/ }), +/* 821 */ +/***/ (function(module, exports, __webpack_require__) { - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } +"use strict"; - // sequence<sequence<ByteString>> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record<ByteString, ByteString> - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } - - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - - return this[MAP][key].join(', '); - } - - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; - - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } +var _interopRequireDefault = __webpack_require__(530); - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.normalize = normalize; +exports.ensureFilePath = ensureFilePath; +exports.getParentFolderId = getParentFolderId; +exports.hasMetadataAttribute = exports.isReferencedByAlbum = exports.fetchFilesByQualificationRules = exports.saveFileQualification = exports.isSharingShorcutNew = exports.isSharingShortcutNew = exports.isSharingShorcut = exports.isSharingShortcut = exports.getSharingShortcutTargetDoctype = exports.getSharingShortcutTargetMime = exports.getSharingShortcutStatus = exports.isShortcut = exports.shouldBeOpenedByOnlyOffice = exports.isOnlyOfficeFile = exports.isNote = exports.isDirectory = exports.isFile = exports.splitFilename = exports.ALBUMS_DOCTYPE = void 0; - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } +var _regenerator = _interopRequireDefault(__webpack_require__(545)); - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } +var _get = _interopRequireDefault(__webpack_require__(370)); - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } +var _isString = _interopRequireDefault(__webpack_require__(74)); - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } +var _has = _interopRequireDefault(__webpack_require__(669)); - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; +var _document = __webpack_require__(822); -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); +var _dsl = __webpack_require__(625); -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); +var _types = __webpack_require__(628); -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; +var _CozyClient = _interopRequireDefault(__webpack_require__(531)); - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} +function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } -const INTERNAL = Symbol('internal'); +function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} +function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } +var FILE_TYPE = 'file'; +var DIR_TYPE = 'directory'; +var ALBUMS_DOCTYPE = 'io.cozy.photos.albums'; +exports.ALBUMS_DOCTYPE = ALBUMS_DOCTYPE; +var FILENAME_WITH_EXTENSION_REGEX = /(.+)(\..*)$/; +/** + * Returns base filename and extension + * + * @param {IOCozyFile} file An io.cozy.files + * @returns {object} {filename, extension} + */ - this[INTERNAL].index = index + 1; +var splitFilename = function splitFilename(file) { + if (!(0, _isString.default)(file.name)) throw new Error('file should have a name property '); - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + if (file.type === 'file') { + var match = file.name.match(FILENAME_WITH_EXTENSION_REGEX); -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); + if (match) { + return { + filename: match[1], + extension: match[2] + }; + } + } + return { + filename: file.name, + extension: '' + }; +}; /** - * Export the Headers object in a form that Node.js can consume. * - * @param Headers headers - * @return Object + * @param {IOCozyFile} file io.cozy.files */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } - return obj; -} +exports.splitFilename = splitFilename; +var isFile = function isFile(file) { + return file && file.type === FILE_TYPE; +}; /** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. * - * @param Object obj Object of headers - * @return Headers + * @param {IOCozyFile} file io.cozy.files */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} -const INTERNALS$1 = Symbol('Response internals'); -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http__WEBPACK_IMPORTED_MODULE_1__.STATUS_CODES; +exports.isFile = isFile; +var isDirectory = function isDirectory(file) { + return file && file.type === DIR_TYPE; +}; /** - * Response class * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void + * @param {IOCozyFile} file io.cozy.files */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - - Body.call(this, body, opts); - const status = opts.status || 200; - const headers = new Headers(opts.headers); - - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } - get url() { - return this[INTERNALS$1].url || ''; - } +exports.isDirectory = isDirectory; - get status() { - return this[INTERNALS$1].status; - } +var isNote = function isNote(file) { + if (file && file.name && file.name.endsWith('.cozy-note') && file.type === FILE_TYPE && file.metadata && file.metadata.content !== undefined && file.metadata.schema !== undefined && file.metadata.title !== undefined && file.metadata.version !== undefined) return true; + return false; +}; +/** + * Whether the file is supported by Only Office + * + * @param {IOCozyFile} file - io.cozy.file document + * @returns {boolean} + */ - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } - get redirected() { - return this[INTERNALS$1].counter > 0; - } +exports.isNote = isNote; - get statusText() { - return this[INTERNALS$1].statusText; - } +var isOnlyOfficeFile = function isOnlyOfficeFile(file) { + return isFile(file) && !isNote(file) && (file.class === 'text' || file.class === 'spreadsheet' || file.class === 'slide'); +}; +/** + * Whether the file should be opened by only office + * We want to be consistent with the stack so we check the class attributes + * But we want to exclude .txt and .md because the CozyUI Viewer can already show them + * + * @param {IOCozyFile} file - io.cozy.file document + * @returns {boolean} + */ - get headers() { - return this[INTERNALS$1].headers; - } - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} +exports.isOnlyOfficeFile = isOnlyOfficeFile; -Body.mixIn(Response.prototype); +var shouldBeOpenedByOnlyOffice = function shouldBeOpenedByOnlyOffice(file) { + return isOnlyOfficeFile(file) && !file.name.endsWith('.txt') && !file.name.endsWith('.md'); +}; +/** + * + * @param {IOCozyFile} file io.cozy.files + * @returns {boolean} true if the file is a shortcut + */ -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); +exports.shouldBeOpenedByOnlyOffice = shouldBeOpenedByOnlyOffice; -const INTERNALS$2 = Symbol('Request internals'); +var isShortcut = function isShortcut(file) { + return file && file.class === 'shortcut'; +}; +/** + * Normalizes an object representing a io.cozy.files object + * + * Ensures existence of `_id` and `_type` + * + * @public + * @param {object} file - object representing the file + * @returns {object} full normalized object + */ -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = url__WEBPACK_IMPORTED_MODULE_2__.parse; -const format_url = url__WEBPACK_IMPORTED_MODULE_2__.format; -const streamDestructionSupported = 'destroy' in stream__WEBPACK_IMPORTED_MODULE_0__.Readable.prototype; +exports.isShortcut = isShortcut; +function normalize(file) { + var id = file._id || file.id; + var doctype = file._type || 'io.cozy.files'; + return _objectSpread({ + _id: id, + id: id, + _type: doctype + }, file); +} /** - * Check if a value is an instance of Request. + * Ensure the file has a `path` attribute, or build it * - * @param Mixed input - * @return Boolean + * @public + * @param {object} file - object representing the file + * @param {object} parent - parent directory for the file + * @returns {object} file object with path attribute */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} +function ensureFilePath(file, parent) { + if (file.path) return file; + if (!parent || !parent.path) throw new Error("Could not define a file path for ".concat(file._id || file.id)); + var path = parent.path + '/' + file.name; + return _objectSpread({ + path: path + }, file); +} /** - * Request class + * Get the id of the parent folder (`null` for the root folder) * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void + * @param {object} file - io.cozy.files document + * @returns {string|null} id of the parent folder, if any */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - let parsedURL; - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parse_url(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); - } - input = {}; - } else { - parsedURL = parse_url(input.url); - } +function getParentFolderId(file) { + var parentId = (0, _get.default)(file, 'attributes.dir_id'); + return parentId === '' ? null : parentId; +} +/** + * Returns the status of a sharing shortcut. + * + * @param {IOCozyFile} file - io.cozy.files document + * + * @returns {string} A description of the status + */ - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } +var getSharingShortcutStatus = function getSharingShortcutStatus(file) { + return (0, _get.default)(file, 'metadata.sharing.status'); +}; +/** + * Returns the mime type of the target of the sharing shortcut, if it is a file. + * + * @param {IOCozyFile} file - io.cozy.files document + * + * @returns {string} The mime-type of the target file, or an empty string is the target is not a file. + */ - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); +exports.getSharingShortcutStatus = getSharingShortcutStatus; - const headers = new Headers(init.headers || input.headers || {}); +var getSharingShortcutTargetMime = function getSharingShortcutTargetMime(file) { + return (0, _get.default)(file, 'metadata.target.mime'); +}; +/** + * Returns the doctype of the target of the sharing shortcut. + * + * @param {IOCozyFile} file - io.cozy.files document + * + * @returns {string} A doctype + */ - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; +exports.getSharingShortcutTargetMime = getSharingShortcutTargetMime; - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } +var getSharingShortcutTargetDoctype = function getSharingShortcutTargetDoctype(file) { + return (0, _get.default)(file, 'metadata.target._type'); +}; +/** + * Returns whether the file is a shortcut to a sharing + * + * @param {IOCozyFile} file - io.cozy.files document + * + * @returns {boolean} + */ - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } +exports.getSharingShortcutTargetDoctype = getSharingShortcutTargetDoctype; - get method() { - return this[INTERNALS$2].method; - } +var isSharingShortcut = function isSharingShortcut(file) { + return Boolean(getSharingShortcutStatus(file)); +}; +/** + * Returns whether the file is a shortcut to a sharing + * + * @deprecated Prefer to use isSharingShortcut. + * @param {IOCozyFile} file - io.cozy.files document + * + * @returns {boolean} + */ - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } - get headers() { - return this[INTERNALS$2].headers; - } +exports.isSharingShortcut = isSharingShortcut; - get redirect() { - return this[INTERNALS$2].redirect; - } +var isSharingShorcut = function isSharingShorcut(file) { + console.warn('Deprecation: `isSharingShorcut` is deprecated, please use `isSharingShortcut` instead'); + return isSharingShortcut(file); +}; +/** + * Returns whether the sharing shortcut is new + * + * @param {IOCozyFile} file - io.cozy.files document + * + * @returns {boolean} + */ - get signal() { - return this[INTERNALS$2].signal; - } - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} +exports.isSharingShorcut = isSharingShorcut; -Body.mixIn(Request.prototype); +var isSharingShortcutNew = function isSharingShortcutNew(file) { + return getSharingShortcutStatus(file) === 'new'; +}; +/** + * Returns whether the sharing shortcut is new + * + * @deprecated Prefer to use isSharingShortcutNew. + * @param {object} file - io.cozy.files document + * + * @returns {boolean} + */ -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); +exports.isSharingShortcutNew = isSharingShortcutNew; +var isSharingShorcutNew = function isSharingShorcutNew(file) { + console.warn('Deprecation: `isSharingShorcutNew` is deprecated, please use `isSharingShortcutNew` instead'); + return isSharingShortcutNew(file); +}; /** - * Convert a Request to Node.js http request options. + * Save the file with the given qualification * - * @param Request A Request instance - * @return Object The options object to be passed to http.request + * @param {CozyClient} client - The CozyClient instance + * @param {IOCozyFile} file - The file to qualify + * @param {object} qualification - The file qualification + * @returns {Promise<IOCozyFile>} - The saved file */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); - - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } +exports.isSharingShorcutNew = isSharingShorcutNew; - if (request.signal && request.body instanceof stream__WEBPACK_IMPORTED_MODULE_0__.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } +var saveFileQualification = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, file, qualification) { + var qualifiedFile; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + qualifiedFile = (0, _document.setQualification)(file, qualification); + return _context.abrupt("return", client.collection('io.cozy.files').updateMetadataAttribute(file._id, qualifiedFile.metadata)); - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } + case 2: + case "end": + return _context.stop(); + } + } + }, _callee); + })); - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } + return function saveFileQualification(_x, _x2, _x3) { + return _ref.apply(this, arguments); + }; +}(); +/** + * Helper to query files based on qualification rules + * + * @param {object} client - The CozyClient instance + * @param {object} docRules - the rules containing the searched qualification and the count + * @returns {Promise<QueryResult>} - The files found by the rules + */ - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } +exports.saveFileQualification = saveFileQualification; - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } +var fetchFilesByQualificationRules = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(client, docRules) { + var rules, count, query, result; + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + rules = docRules.rules, count = docRules.count; + query = (0, _dsl.Q)('io.cozy.files').where(_objectSpread({}, rules)).partialIndex({ + trashed: false + }).indexFields(['cozyMetadata.updatedAt', 'metadata.qualification']).sortBy([{ + 'cozyMetadata.updatedAt': 'desc' + }]).limitBy(count ? count : 1); + _context2.next = 4; + return client.query(query); - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js + case 4: + result = _context2.sent; + return _context2.abrupt("return", result); - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} + case 6: + case "end": + return _context2.stop(); + } + } + }, _callee2); + })); + return function fetchFilesByQualificationRules(_x4, _x5) { + return _ref2.apply(this, arguments); + }; +}(); /** - * abort-error.js + * Whether the file is referenced by an album * - * AbortError interface for cancelled requests + * @param {IOCozyFile} file - An io.cozy.files document + * @returns {boolean} */ -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - this.type = 'aborted'; - this.message = message; +exports.fetchFilesByQualificationRules = fetchFilesByQualificationRules; - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} +var isReferencedByAlbum = function isReferencedByAlbum(file) { + if (file.relationships && file.relationships.referenced_by && file.relationships.referenced_by.data && file.relationships.referenced_by.data.length > 0) { + var references = file.relationships.referenced_by.data; -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; + var _iterator = _createForOfIteratorHelper(references), + _step; -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = stream__WEBPACK_IMPORTED_MODULE_0__.PassThrough; -const resolve_url = url__WEBPACK_IMPORTED_MODULE_2__.resolve; + try { + for (_iterator.s(); !(_step = _iterator.n()).done;) { + var reference = _step.value; + + if (reference.type === ALBUMS_DOCTYPE) { + return true; + } + } + } catch (err) { + _iterator.e(err); + } finally { + _iterator.f(); + } + } + return false; +}; /** - * Fetch function + * Whether the file's metadata attribute exists * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise + * @param {object} params - Param + * @param {IOCozyFile} params.file - An io.cozy.files document + * @param {string} params.attribute - Metadata attribute to check + * @returns {boolean} */ -function fetch(url, opts) { - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } - Body.Promise = fetch.Promise; +exports.isReferencedByAlbum = isReferencedByAlbum; - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); +var hasMetadataAttribute = function hasMetadataAttribute(_ref3) { + var file = _ref3.file, + attribute = _ref3.attribute; + return (0, _has.default)(file, "metadata.".concat(attribute)); +}; - const send = (options.protocol === 'https:' ? https__WEBPACK_IMPORTED_MODULE_3__ : http__WEBPACK_IMPORTED_MODULE_1__).request; - const signal = request.signal; +exports.hasMetadataAttribute = hasMetadataAttribute; - let response = null; +/***/ }), +/* 822 */ +/***/ (function(module, exports, __webpack_require__) { - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof stream__WEBPACK_IMPORTED_MODULE_0__.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; +"use strict"; - if (signal && signal.aborted) { - abort(); - return; - } - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; +var _interopRequireWildcard = __webpack_require__(528); - // send request - const req = send(options); - let reqTimeout; +var _interopRequireDefault = __webpack_require__(530); - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getQualification = exports.setQualification = exports.Qualification = void 0; - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } +var _classCallCheck2 = _interopRequireDefault(__webpack_require__(548)); - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); +var _createClass2 = _interopRequireDefault(__webpack_require__(549)); - req.on('response', function (res) { - clearTimeout(reqTimeout); +var _lodash = __webpack_require__(823); - const headers = createHeadersLenient(res.headers); +var qualificationModel = _interopRequireWildcard(__webpack_require__(824)); - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); +function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); +function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } +/** + * @typedef {object} QualificationAttributes + * @property {string} [label] - The qualification label. + * @property {string} [purpose] - The document purpose. + * @property {string} [sourceCategory] - The activity field of the document source. + * @property {string} [sourceSubCategory] - The sub-activity field of the document source. + * @property {Array<string>} [subjects] - On what is about the document. + */ - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } +/** + * This class is used to create document Qualification, i.e. metadata + * attributes used to describe the document. + * The qualifications model is stored in the assets, associating + * labels to attributes, namely: purpose, sourceCategory, sourceSubCategory + * and subjects. + * A qualification can be customized accordingly to rules detailed in + * the checkValueAttributes method. + */ +var Qualification = /*#__PURE__*/function () { + /** + * @param {string} label - The qualification label + * @param {QualificationAttributes} attributes - Qualification's attributes + */ + function Qualification(label) { + var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + (0, _classCallCheck2.default)(this, Qualification); + var qualification = qualificationModel.qualifications.find(function (qualif) { + return qualif.label === label; + }); - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; + if (qualification) { + /** + * @type {string?} + */ + this.label = qualification.label; + /** + * @type {string?} + */ - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } + this.purpose = attributes.purpose || qualification.purpose; + this.sourceCategory = attributes.sourceCategory || qualification.sourceCategory; + this.sourceSubCategory = attributes.sourceSubCategory || qualification.sourceSubCategory; + this.subjects = attributes.subjects || qualification.subjects; + } else { + throw new Error("No qualification found for the label ".concat(label)); + } + } + /** + * Check the given qualification attributes respects the following rules: + * - For the given label, if a purpose, sourceCategory or sourceSubCategory + * attribute is defined in the model, it must match the given qualification. + * - If not defined in the model for the label, a custom purpose, sourceCategory or + * sourceSubCategory value can be defined, if it exist in their respective + * known values list. + * - For the given label, if subjects are defined in the model, they must be included + * in the given qualification. + * - If extra subjects are set, they should exist in the known values. + * + * @param {object} attributes - The qualification attributes to check + */ - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } - - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } - - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); - - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; - - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); - - // HTTP-network fetch step 12.1.1.4: handle content codings - - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } - - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib__WEBPACK_IMPORTED_MODULE_4__.Z_SYNC_FLUSH, - finishFlush: zlib__WEBPACK_IMPORTED_MODULE_4__.Z_SYNC_FLUSH - }; - - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createInflate()); - } else { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } + (0, _createClass2.default)(Qualification, [{ + key: "checkAttributes", + value: function checkAttributes(attributes) { + if (this.purpose !== attributes.purpose) { + if (!this.purpose) { + var isKnownValue = qualificationModel.purposeKnownValues.includes(attributes.purpose); - // for br - if (codings == 'br' && typeof zlib__WEBPACK_IMPORTED_MODULE_4__.createBrotliDecompress === 'function') { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } + if (!isKnownValue) { + console.info("This purpose is not listed among the known values: ".concat(attributes.purpose, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + } + } else { + throw new Error("The purpose for the label ".concat(this.label, " should be ").concat(this.purpose, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); + } + } - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); + if (this.sourceCategory !== attributes.sourceCategory) { + if (!this.sourceCategory) { + var _isKnownValue = qualificationModel.sourceCategoryKnownValues.includes(attributes.sourceCategory); - writeToStream(req, request); - }); -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; + if (!_isKnownValue) { + console.info("This sourceCategory is not listed among the known values: ".concat(attributes.sourceCategory, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + } + } else { + throw new Error("The sourceCategory for the label ".concat(this.label, " should be ").concat(this.sourceCategory, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); + } + } -// expose Promise -fetch.Promise = global.Promise; + if (this.sourceSubCategory !== attributes.sourceSubCategory) { + if (!this.sourceSubCategory) { + var _isKnownValue2 = qualificationModel.sourceSubCategoryKnownValues.includes(attributes.sourceSubCategory); -/* harmony default export */ __webpack_exports__["default"] = (fetch); + if (!_isKnownValue2) { + console.info("This sourceSubCategory is not listed among the known values: ".concat(attributes.sourceSubCategory, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + } + } else { + throw new Error("The sourceSubCategory for the label ".concat(this.label, " should be ").concat(this.sourceSubCategory, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); + } + } + var missingSubjects = (0, _lodash.difference)(this.subjects, attributes.subjects); + if (missingSubjects.length > 0) { + throw new Error("The subjects for the label ".concat(this.label, " should include ").concat(this.subjects, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); + } -/***/ }), -/* 818 */ -/***/ (function(module, exports, __webpack_require__) { + var extraSubjects = (0, _lodash.difference)(attributes.subjects, this.subjects); -"use strict"; + if (extraSubjects.length > 0) { + var unknownSubjects = (0, _lodash.difference)(extraSubjects, qualificationModel.subjectsKnownValues); + if (unknownSubjects.length > 0) console.info("These subjects are not listed among the known values: ".concat(unknownSubjects, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + } + } + /** + * Set purpose to the qualification. + * + * @param {Array} purpose - The purpose to set. + * @returns {Qualification} The Qualification object. + */ + }, { + key: "setPurpose", + value: function setPurpose(purpose) { + return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { + purpose: purpose + })); + } + /** + * Set sourceCategory to the qualification. + * + * @param {Array} sourceCategory - The sourceCategory to set. + * @returns {Qualification} The Qualification object. + */ -var _interopRequireWildcard = __webpack_require__(529); + }, { + key: "setSourceCategory", + value: function setSourceCategory(sourceCategory) { + return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { + sourceCategory: sourceCategory + })); + } + /** + * Set sourceSubCategory to the qualification. + * + * @param {Array} sourceSubCategory - The sourceSubCategory to set. + * @returns {Qualification} The Qualification object. + */ -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.timeseries = exports.document = exports.contact = exports.utils = exports.permission = exports.note = exports.account = exports.folder = exports.file = exports.applications = exports.instance = exports.trigger = exports.accounts = exports.triggers = void 0; + }, { + key: "setSourceSubCategory", + value: function setSourceSubCategory(sourceSubCategory) { + return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { + sourceSubCategory: sourceSubCategory + })); + } + /** + * Set subjects to the qualification. + * + * @param {Array} subjects - The subjects to set. + * @returns {Qualification} The Qualification object. + */ -var trigger = _interopRequireWildcard(__webpack_require__(819)); + }, { + key: "setSubjects", + value: function setSubjects(subjects) { + return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { + subjects: subjects + })); + } + /** + * Returns the qualification attributes + * + * @returns {object} The qualification attributes + */ -exports.trigger = trigger; + }, { + key: "toQualification", + value: function toQualification() { + return { + label: this.label, + purpose: this.purpose, + sourceCategory: this.sourceCategory, + sourceSubCategory: this.sourceSubCategory, + subjects: this.subjects + }; + } + }]); + return Qualification; +}(); +/** + * Returns the qualification associated to a label. + * + * @param {string} label - The label to qualify + * @returns {Qualification} - The qualification + */ -var instance = _interopRequireWildcard(__webpack_require__(821)); -exports.instance = instance; +exports.Qualification = Qualification; -var applications = _interopRequireWildcard(__webpack_require__(822)); +Qualification.getByLabel = function (label) { + return new Qualification(label); +}; +/** + * Set the qualification to the document metadata + * + * @param {object} document - The document to set the qualification + * @param {Qualification} qualification - The qualification to set + * @returns {object} - The qualified document + */ -exports.applications = applications; -var file = _interopRequireWildcard(__webpack_require__(823)); +var setQualification = function setQualification(document, qualification) { + if (qualification.label) { + new Qualification(qualification.label).checkAttributes(qualification); + } else { + throw new Error('You must set a label to qualify'); + } -exports.file = file; + return (0, _lodash.set)(document, 'metadata.qualification', qualification); +}; +/** + * Helper to get the qualification from a document + * + * @param {object} document - The document + * @returns {Qualification} - The document qualification + * + */ -var folder = _interopRequireWildcard(__webpack_require__(827)); -exports.folder = folder; +exports.setQualification = setQualification; -var account = _interopRequireWildcard(__webpack_require__(820)); +var getQualification = function getQualification(document) { + var docQualification = (0, _lodash.get)(document, 'metadata.qualification'); + var qualification = new Qualification(docQualification.label, docQualification.qualification); + return qualification.toQualification(); +}; -exports.account = account; +exports.getQualification = getQualification; -var note = _interopRequireWildcard(__webpack_require__(829)); +/***/ }), +/* 823 */ +/***/ (function(module, exports, __webpack_require__) { -exports.note = note; +/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** + * @license + * Lodash <https://lodash.com/> + * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> + * Released under MIT license <https://lodash.com/license> + * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */ +;(function() { -var permission = _interopRequireWildcard(__webpack_require__(830)); + /** Used as a safe reference for `undefined` in pre-ES5 environments. */ + var undefined; -exports.permission = permission; + /** Used as the semantic version number. */ + var VERSION = '4.17.21'; -var utils = _interopRequireWildcard(__webpack_require__(831)); + /** Used as the size to enable large array optimizations. */ + var LARGE_ARRAY_SIZE = 200; -exports.utils = utils; + /** Error message constants. */ + var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', + FUNC_ERROR_TEXT = 'Expected a function', + INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; -var contact = _interopRequireWildcard(__webpack_require__(832)); + /** Used to stand-in for `undefined` hash values. */ + var HASH_UNDEFINED = '__lodash_hash_undefined__'; -exports.contact = contact; + /** Used as the maximum memoize cache size. */ + var MAX_MEMOIZE_SIZE = 500; -var document = _interopRequireWildcard(__webpack_require__(824)); + /** Used as the internal argument placeholder. */ + var PLACEHOLDER = '__lodash_placeholder__'; -exports.document = document; + /** Used to compose bitmasks for cloning. */ + var CLONE_DEEP_FLAG = 1, + CLONE_FLAT_FLAG = 2, + CLONE_SYMBOLS_FLAG = 4; -var timeseries = _interopRequireWildcard(__webpack_require__(834)); + /** Used to compose bitmasks for value comparisons. */ + var COMPARE_PARTIAL_FLAG = 1, + COMPARE_UNORDERED_FLAG = 2; -exports.timeseries = timeseries; -// For backward compatibility before 9.0.0 -var triggers = trigger; -exports.triggers = triggers; -var accounts = account; -exports.accounts = accounts; + /** Used to compose bitmasks for function metadata. */ + var WRAP_BIND_FLAG = 1, + WRAP_BIND_KEY_FLAG = 2, + WRAP_CURRY_BOUND_FLAG = 4, + WRAP_CURRY_FLAG = 8, + WRAP_CURRY_RIGHT_FLAG = 16, + WRAP_PARTIAL_FLAG = 32, + WRAP_PARTIAL_RIGHT_FLAG = 64, + WRAP_ARY_FLAG = 128, + WRAP_REARG_FLAG = 256, + WRAP_FLIP_FLAG = 512; -/***/ }), -/* 819 */ -/***/ (function(module, exports, __webpack_require__) { + /** Used as default options for `_.truncate`. */ + var DEFAULT_TRUNC_LENGTH = 30, + DEFAULT_TRUNC_OMISSION = '...'; -"use strict"; + /** Used to detect hot functions by number of calls within a span of milliseconds. */ + var HOT_COUNT = 800, + HOT_SPAN = 16; + /** Used to indicate the type of lazy iteratees. */ + var LAZY_FILTER_FLAG = 1, + LAZY_MAP_FLAG = 2, + LAZY_WHILE_FLAG = 3; -var _interopRequireDefault = __webpack_require__(531); + /** Used as references for various `Number` constants. */ + var INFINITY = 1 / 0, + MAX_SAFE_INTEGER = 9007199254740991, + MAX_INTEGER = 1.7976931348623157e+308, + NAN = 0 / 0; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.triggers = exports.triggerStates = void 0; + /** Used as references for the maximum length and index of an array. */ + var MAX_ARRAY_LENGTH = 4294967295, + MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, + HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; -var _get = _interopRequireDefault(__webpack_require__(370)); + /** Used to associate wrap methods with their bit flags. */ + var wrapFlags = [ + ['ary', WRAP_ARY_FLAG], + ['bind', WRAP_BIND_FLAG], + ['bindKey', WRAP_BIND_KEY_FLAG], + ['curry', WRAP_CURRY_FLAG], + ['curryRight', WRAP_CURRY_RIGHT_FLAG], + ['flip', WRAP_FLIP_FLAG], + ['partial', WRAP_PARTIAL_FLAG], + ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], + ['rearg', WRAP_REARG_FLAG] + ]; -var _account = __webpack_require__(820); + /** `Object#toString` result references. */ + var argsTag = '[object Arguments]', + arrayTag = '[object Array]', + asyncTag = '[object AsyncFunction]', + boolTag = '[object Boolean]', + dateTag = '[object Date]', + domExcTag = '[object DOMException]', + errorTag = '[object Error]', + funcTag = '[object Function]', + genTag = '[object GeneratorFunction]', + mapTag = '[object Map]', + numberTag = '[object Number]', + nullTag = '[object Null]', + objectTag = '[object Object]', + promiseTag = '[object Promise]', + proxyTag = '[object Proxy]', + regexpTag = '[object RegExp]', + setTag = '[object Set]', + stringTag = '[object String]', + symbolTag = '[object Symbol]', + undefinedTag = '[object Undefined]', + weakMapTag = '[object WeakMap]', + weakSetTag = '[object WeakSet]'; -var actionableErrors = ['CHALLENGE_ASKED', 'DISK_QUOTA_EXCEEDED', 'TERMS_VERSION_MISMATCH', 'USER_ACTION_NEEDED', 'USER_ACTION_NEEDED.CHANGE_PASSWORD', 'USER_ACTION_NEEDED.ACCOUNT_REMOVED', 'USER_ACTION_NEEDED.WEBAUTH_REQUIRED', 'USER_ACTION_NEEDED.SCA_REQUIRED', 'LOGIN_FAILED']; -/** Trigger states come from /jobs/triggers */ + var arrayBufferTag = '[object ArrayBuffer]', + dataViewTag = '[object DataView]', + float32Tag = '[object Float32Array]', + float64Tag = '[object Float64Array]', + int8Tag = '[object Int8Array]', + int16Tag = '[object Int16Array]', + int32Tag = '[object Int32Array]', + uint8Tag = '[object Uint8Array]', + uint8ClampedTag = '[object Uint8ClampedArray]', + uint16Tag = '[object Uint16Array]', + uint32Tag = '[object Uint32Array]'; -var triggerStates = { - /** Returns when the trigger was last executed. Need a trigger */ - getLastExecution: function getLastExecution(triggerState) { - return (0, _get.default)(triggerState, 'current_state.last_execution'); - }, - getLastsuccess: function getLastsuccess(triggerState) { - console.warn('Deprecated, please use getLastSuccess instead of getLastsuccess'); - return (0, _get.default)(triggerState, 'current_state.last_success'); - }, + /** Used to match empty string literals in compiled template source. */ + var reEmptyStringLeading = /\b__p \+= '';/g, + reEmptyStringMiddle = /\b(__p \+=) '' \+/g, + reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - /** Returns when the trigger was last successfully executed. */ - getLastSuccess: function getLastSuccess(triggerState) { - return (0, _get.default)(triggerState, 'current_state.last_success'); - }, + /** Used to match HTML entities and HTML characters. */ + var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, + reUnescapedHtml = /[&<>"']/g, + reHasEscapedHtml = RegExp(reEscapedHtml.source), + reHasUnescapedHtml = RegExp(reUnescapedHtml.source); - /** Returns whether last job failed */ - isErrored: function isErrored(triggerState) { - return (0, _get.default)(triggerState, 'current_state.status') === 'errored'; - }, + /** Used to match template delimiters. */ + var reEscape = /<%-([\s\S]+?)%>/g, + reEvaluate = /<%([\s\S]+?)%>/g, + reInterpolate = /<%=([\s\S]+?)%>/g; - /** Returns the type of the last error to occur */ - getLastErrorType: function getLastErrorType(triggerState) { - return (0, _get.default)(triggerState, 'current_state.last_error'); - } -}; -exports.triggerStates = triggerStates; -var triggers = { - isKonnectorWorker: function isKonnectorWorker(trigger) { - return trigger.worker === 'konnector'; - }, + /** Used to match property names within property paths. */ + var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, + reIsPlainProp = /^\w*$/, + rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; /** - * Returns the konnector slug that executed a trigger - * - * @param {object} trigger io.cozy.triggers - * - * @returns {string|void} A konnector slug + * Used to match `RegExp` + * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). */ - getKonnector: function getKonnector(trigger) { - if (!triggers.isKonnectorWorker(trigger)) { - return null; - } + var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, + reHasRegExpChar = RegExp(reRegExpChar.source); - if (trigger.message && trigger.message.konnector) { - return trigger.message.konnector; - } else if (trigger.message && trigger.message.Data) { - // Legacy triggers - var message = JSON.parse(atob(trigger.message.Data)); - return message.konnector; - } - }, + /** Used to match leading whitespace. */ + var reTrimStart = /^\s+/; - /** - * getAccountId - Returns the account id for a trigger - * - * @param {object} trigger io.cozy.triggers - * - * @returns {string} Id for an io.cozy.accounts - */ - getAccountId: function getAccountId(trigger) { - var legacyData = (0, _get.default)(trigger, 'message.Data'); + /** Used to match a single whitespace character. */ + var reWhitespace = /\s/; - if (legacyData) { - var message = JSON.parse(atob(legacyData)); - return message.account; - } else { - return (0, _get.default)(trigger, 'message.account'); - } - }, + /** Used to match wrap detail comments. */ + var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, + reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, + reSplitDetails = /,? & /; - /** - * Checks if the triggers current error has been muted in the corresponding io.cozy.accounts - * - * @param {object} trigger io.cozy.triggers - * @param {object} account io.cozy.accounts used by the trigger - * - * @returns {boolean} Whether the error is muted or not - */ - isLatestErrorMuted: function isLatestErrorMuted(trigger, account) { - var lastErrorType = triggerStates.getLastErrorType(trigger); - var lastSuccess = triggerStates.getLastSuccess(trigger); - var lastSuccessDate = lastSuccess ? new Date(lastSuccess) : new Date(); - var mutedErrors = (0, _account.getMutedErrors)(account); - var isErrorMuted = mutedErrors.some(function (mutedError) { - return mutedError.type === lastErrorType && (!lastSuccess || new Date(mutedError.mutedAt) > lastSuccessDate); - }); - return isErrorMuted; - }, + /** Used to match words composed of alphanumeric characters. */ + var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; /** - * Returns whether the error in trigger can be solved by the user - * - * @param {object} trigger io.cozy.triggers + * Used to validate the `validate` option in `_.template` variable. * - * @returns {boolean} Whether the error is muted or not + * Forbids characters which could potentially change the meaning of the function argument definition: + * - "()," (modification of function parameters) + * - "=" (default value) + * - "[]{}" (destructuring of function parameters) + * - "/" (beginning of a comment) + * - whitespace */ - hasActionableError: function hasActionableError(trigger) { - return actionableErrors.includes(trigger.current_state.last_error); - } -}; -exports.triggers = triggers; + var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; -/***/ }), -/* 820 */ -/***/ (function(module, exports, __webpack_require__) { + /** Used to match backslashes in property paths. */ + var reEscapeChar = /\\(\\)?/g; -"use strict"; + /** + * Used to match + * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). + */ + var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + /** Used to match `RegExp` flags from their coerced string values. */ + var reFlags = /\w*$/; -var _interopRequireDefault = __webpack_require__(531); + /** Used to detect bad signed hexadecimal string values. */ + var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.setContractSyncStatusInAccount = exports.getContractSyncStatusFromAccount = exports.muteError = exports.getMutedErrors = void 0; + /** Used to detect binary string values. */ + var reIsBinary = /^0b[01]+$/i; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); + /** Used to detect host constructors (Safari). */ + var reIsHostCtor = /^\[object .+?Constructor\]$/; -var _get = _interopRequireDefault(__webpack_require__(370)); + /** Used to detect octal string values. */ + var reIsOctal = /^0o[0-7]+$/i; -var _merge = _interopRequireDefault(__webpack_require__(748)); + /** Used to detect unsigned integer values. */ + var reIsUint = /^(?:0|[1-9]\d*)$/; -var _HasMany = __webpack_require__(747); + /** Used to match Latin Unicode letters (excluding mathematical operators). */ + var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + /** Used to ensure capturing order of template delimiters. */ + var reNoMatch = /($^)/; -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + /** Used to match unescaped characters in compiled string literals. */ + var reUnescapedString = /['\n\r\u2028\u2029\\]/g; -/** - * @typedef {object} CozyAccount - */ + /** Used to compose unicode character classes. */ + var rsAstralRange = '\\ud800-\\udfff', + rsComboMarksRange = '\\u0300-\\u036f', + reComboHalfMarksRange = '\\ufe20-\\ufe2f', + rsComboSymbolsRange = '\\u20d0-\\u20ff', + rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, + rsDingbatRange = '\\u2700-\\u27bf', + rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', + rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', + rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', + rsPunctuationRange = '\\u2000-\\u206f', + rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', + rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', + rsVarRange = '\\ufe0e\\ufe0f', + rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; -/** - * getMutedErrors - Returns the list of errors that have been muted for the given account - * - * @param {object} account io.cozy.accounts - * - * @returns {Array} An array of errors with a `type` and `mutedAt` field - */ -var getMutedErrors = function getMutedErrors(account) { - return (0, _get.default)(account, 'mutedErrors', []); -}; -/** - * muteError - Adds an error to the list of muted errors for the given account - * - * @param {CozyAccount} account io.cozy.accounts - * @param {string} errorType The type of the error to mute - * - * @returns {CozyAccount} An updated io.cozy.accounts - */ + /** Used to compose unicode capture groups. */ + var rsApos = "['\u2019]", + rsAstral = '[' + rsAstralRange + ']', + rsBreak = '[' + rsBreakRange + ']', + rsCombo = '[' + rsComboRange + ']', + rsDigits = '\\d+', + rsDingbat = '[' + rsDingbatRange + ']', + rsLower = '[' + rsLowerRange + ']', + rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', + rsFitz = '\\ud83c[\\udffb-\\udfff]', + rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', + rsNonAstral = '[^' + rsAstralRange + ']', + rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', + rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', + rsUpper = '[' + rsUpperRange + ']', + rsZWJ = '\\u200d'; + /** Used to compose unicode regexes. */ + var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', + rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', + rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', + rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', + reOptMod = rsModifier + '?', + rsOptVar = '[' + rsVarRange + ']?', + rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', + rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', + rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', + rsSeq = rsOptVar + reOptMod + rsOptJoin, + rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, + rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; -exports.getMutedErrors = getMutedErrors; + /** Used to match apostrophes. */ + var reApos = RegExp(rsApos, 'g'); -var muteError = function muteError(account, errorType) { - var mutedErrors = getMutedErrors(account); - mutedErrors.push({ - type: errorType, - mutedAt: new Date().toISOString() - }); - return _objectSpread(_objectSpread({}, account), {}, { - mutedErrors: mutedErrors - }); -}; + /** + * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and + * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). + */ + var reComboMark = RegExp(rsCombo, 'g'); -exports.muteError = muteError; -var DEFAULT_CONTRACT_SYNC_STATUS = true; -/** - * Returns whether a contract is synced from account relationship - * - * @param {CozyAccount} account - Cozy account - */ + /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ + var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); -var getContractSyncStatusFromAccount = function getContractSyncStatusFromAccount(account, contractId) { - var relItem = (0, _HasMany.getHasManyItem)(account, 'contracts', contractId); + /** Used to match complex or compound words. */ + var reUnicodeWord = RegExp([ + rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', + rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', + rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, + rsUpper + '+' + rsOptContrUpper, + rsOrdUpper, + rsOrdLower, + rsDigits, + rsEmoji + ].join('|'), 'g'); - if (!relItem) { - throw new Error("Cannot find contrat ".concat(contractId, " in account")); - } + /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ + var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); - return (0, _get.default)(relItem, 'metadata.imported', DEFAULT_CONTRACT_SYNC_STATUS); -}; -/** - * Sets contract sync status into account relationship - * - * @param {CozyAccount} account - Cozy account - */ + /** Used to detect strings that need a more robust regexp to match words. */ + var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + /** Used to assign default `context` object properties. */ + var contextProps = [ + 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', + 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', + 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', + 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', + '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' + ]; -exports.getContractSyncStatusFromAccount = getContractSyncStatusFromAccount; + /** Used to make template sourceURLs easier to identify. */ + var templateCounter = -1; -var setContractSyncStatusInAccount = function setContractSyncStatusInAccount(account, contractId, syncStatus) { - return (0, _HasMany.updateHasManyItem)(account, 'contracts', contractId, function (contractRel) { - if (contractRel === undefined) { - throw new Error("Cannot find contrat ".concat(contractId, " in account")); - } + /** Used to identify `toStringTag` values of typed arrays. */ + var typedArrayTags = {}; + typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = + typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = + typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = + typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = + typedArrayTags[uint32Tag] = true; + typedArrayTags[argsTag] = typedArrayTags[arrayTag] = + typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = + typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = + typedArrayTags[errorTag] = typedArrayTags[funcTag] = + typedArrayTags[mapTag] = typedArrayTags[numberTag] = + typedArrayTags[objectTag] = typedArrayTags[regexpTag] = + typedArrayTags[setTag] = typedArrayTags[stringTag] = + typedArrayTags[weakMapTag] = false; - return (0, _merge.default)({}, contractRel, { - metadata: { - imported: syncStatus - } - }); - }); -}; + /** Used to identify `toStringTag` values supported by `_.clone`. */ + var cloneableTags = {}; + cloneableTags[argsTag] = cloneableTags[arrayTag] = + cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = + cloneableTags[boolTag] = cloneableTags[dateTag] = + cloneableTags[float32Tag] = cloneableTags[float64Tag] = + cloneableTags[int8Tag] = cloneableTags[int16Tag] = + cloneableTags[int32Tag] = cloneableTags[mapTag] = + cloneableTags[numberTag] = cloneableTags[objectTag] = + cloneableTags[regexpTag] = cloneableTags[setTag] = + cloneableTags[stringTag] = cloneableTags[symbolTag] = + cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = + cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; + cloneableTags[errorTag] = cloneableTags[funcTag] = + cloneableTags[weakMapTag] = false; -exports.setContractSyncStatusInAccount = setContractSyncStatusInAccount; + /** Used to map Latin Unicode letters to basic Latin letters. */ + var deburredLetters = { + // Latin-1 Supplement block. + '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', + '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', + '\xc7': 'C', '\xe7': 'c', + '\xd0': 'D', '\xf0': 'd', + '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', + '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', + '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', + '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', + '\xd1': 'N', '\xf1': 'n', + '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', + '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', + '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', + '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', + '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', + '\xc6': 'Ae', '\xe6': 'ae', + '\xde': 'Th', '\xfe': 'th', + '\xdf': 'ss', + // Latin Extended-A block. + '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', + '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', + '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', + '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', + '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', + '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', + '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', + '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', + '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', + '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', + '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', + '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', + '\u0134': 'J', '\u0135': 'j', + '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', + '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', + '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', + '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', + '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', + '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', + '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', + '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', + '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', + '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', + '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', + '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', + '\u0163': 't', '\u0165': 't', '\u0167': 't', + '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', + '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', + '\u0174': 'W', '\u0175': 'w', + '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', + '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', + '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', + '\u0132': 'IJ', '\u0133': 'ij', + '\u0152': 'Oe', '\u0153': 'oe', + '\u0149': "'n", '\u017f': 's' + }; -/***/ }), -/* 821 */ -/***/ (function(module, exports, __webpack_require__) { + /** Used to map characters to HTML entities. */ + var htmlEscapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; -"use strict"; + /** Used to map HTML entities to characters. */ + var htmlUnescapes = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }; + /** Used to escape characters for inclusion in compiled string literals. */ + var stringEscapes = { + '\\': '\\', + "'": "'", + '\n': 'n', + '\r': 'r', + '\u2028': 'u2028', + '\u2029': 'u2029' + }; -var _interopRequireDefault = __webpack_require__(531); + /** Built-in method references without a dependency on `root`. */ + var freeParseFloat = parseFloat, + freeParseInt = parseInt; -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.buildPremiumLink = exports.hasAnOffer = exports.shouldDisplayOffers = exports.getUuid = exports.isFreemiumUser = exports.arePremiumLinksEnabled = exports.isSelfHosted = void 0; + /** Detect free variable `global` from Node.js. */ + var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; -var _get = _interopRequireDefault(__webpack_require__(370)); + /** Detect free variable `self`. */ + var freeSelf = typeof self == 'object' && self && self.Object === Object && self; -var GB = 1000 * 1000 * 1000; -var PREMIUM_QUOTA = 50 * GB; -/** - * @typedef {object} InstanceInfo - * @typedef {object} ContextInfo - * @typedef {object} DiskUsageInfo - */ + /** Used as a reference to the global object. */ + var root = freeGlobal || freeSelf || Function('return this')(); -/** - * @typedef SettingsInfo - * @property {ContextInfo} context - Object returned by /settings/context - * @property {InstanceInfo} instance - Object returned by /settings/instance - * @property {DiskUsageInfo} diskUsage - Object returned by /settings/disk-usage - */ -// If manager URL is present, then the instance is not self-hosted + /** Detect free variable `exports`. */ + var freeExports = true && exports && !exports.nodeType && exports; -var isSelfHosted = function isSelfHosted(instanceInfo) { - return (0, _get.default)(instanceInfo, 'context.data.attributes.manager_url') ? false : true; -}; + /** Detect free variable `module`. */ + var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; -exports.isSelfHosted = isSelfHosted; + /** Detect the popular CommonJS extension `module.exports`. */ + var moduleExports = freeModule && freeModule.exports === freeExports; -var arePremiumLinksEnabled = function arePremiumLinksEnabled(instanceInfo) { - return (0, _get.default)(instanceInfo, 'context.data.attributes.enable_premium_links') ? true : false; -}; + /** Detect free variable `process` from Node.js. */ + var freeProcess = moduleExports && freeGlobal.process; -exports.arePremiumLinksEnabled = arePremiumLinksEnabled; + /** Used to access faster Node.js helpers. */ + var nodeUtil = (function() { + try { + // Use `util.types` for Node.js 10+. + var types = freeModule && freeModule.require && freeModule.require('util').types; -var isFreemiumUser = function isFreemiumUser(instanceInfo) { - var quota = (0, _get.default)(instanceInfo, 'diskUsage.data.attributes.quota', false); - return parseInt(quota) <= PREMIUM_QUOTA; -}; + if (types) { + return types; + } -exports.isFreemiumUser = isFreemiumUser; + // Legacy `process.binding('util')` for Node.js < 10. + return freeProcess && freeProcess.binding && freeProcess.binding('util'); + } catch (e) {} + }()); -var getUuid = function getUuid(instanceInfo) { - return (0, _get.default)(instanceInfo, 'instance.data.attributes.uuid'); -}; -/** - * Returns whether an instance is concerned by our offers - * - * @param {SettingsInfo} data Object containing all the results from /settings/* - * @returns {boolean} Should we display offers - */ + /* Node.js helper references. */ + var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, + nodeIsDate = nodeUtil && nodeUtil.isDate, + nodeIsMap = nodeUtil && nodeUtil.isMap, + nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, + nodeIsSet = nodeUtil && nodeUtil.isSet, + nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /*--------------------------------------------------------------------------*/ -exports.getUuid = getUuid; + /** + * A faster alternative to `Function#apply`, this function invokes `func` + * with the `this` binding of `thisArg` and the arguments of `args`. + * + * @private + * @param {Function} func The function to invoke. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} args The arguments to invoke `func` with. + * @returns {*} Returns the result of `func`. + */ + function apply(func, thisArg, args) { + switch (args.length) { + case 0: return func.call(thisArg); + case 1: return func.call(thisArg, args[0]); + case 2: return func.call(thisArg, args[0], args[1]); + case 3: return func.call(thisArg, args[0], args[1], args[2]); + } + return func.apply(thisArg, args); + } -var shouldDisplayOffers = function shouldDisplayOffers(data) { - return !isSelfHosted(data) && arePremiumLinksEnabled(data) && getUuid(data) && isFreemiumUser(data); -}; -/** - * Returns if an instance has subscribed to one of our offers - * - * @param {SettingsInfo} data Object containing all the results from /settings/* - * @returns {boolean} Does the cozy have offers - */ + /** + * A specialized version of `baseAggregator` for arrays. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function arrayAggregator(array, setter, iteratee, accumulator) { + var index = -1, + length = array == null ? 0 : array.length; + while (++index < length) { + var value = array[index]; + setter(accumulator, value, iteratee(value), array); + } + return accumulator; + } -exports.shouldDisplayOffers = shouldDisplayOffers; + /** + * A specialized version of `_.forEach` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEach(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length; -var hasAnOffer = function hasAnOffer(data) { - return !isSelfHosted(data) && arePremiumLinksEnabled(data) && getUuid(data) && !isFreemiumUser(data); -}; -/** - * Returns the link to the Premium page on the Cozy's Manager - * - * @param {InstanceInfo} instanceInfo - Instance information - */ + while (++index < length) { + if (iteratee(array[index], index, array) === false) { + break; + } + } + return array; + } + /** + * A specialized version of `_.forEachRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns `array`. + */ + function arrayEachRight(array, iteratee) { + var length = array == null ? 0 : array.length; -exports.hasAnOffer = hasAnOffer; + while (length--) { + if (iteratee(array[length], length, array) === false) { + break; + } + } + return array; + } -var buildPremiumLink = function buildPremiumLink(instanceInfo) { - var managerUrl = (0, _get.default)(instanceInfo, 'context.data.attributes.manager_url', false); - var uuid = getUuid(instanceInfo); + /** + * A specialized version of `_.every` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. + */ + function arrayEvery(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; - if (managerUrl && uuid) { - return "".concat(managerUrl, "/cozy/instances/").concat(uuid, "/premium"); - } else { - return null; + while (++index < length) { + if (!predicate(array[index], index, array)) { + return false; + } + } + return true; } -}; - -exports.buildPremiumLink = buildPremiumLink; - -/***/ }), -/* 822 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + /** + * A specialized version of `_.filter` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function arrayFilter(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; -var _interopRequireDefault = __webpack_require__(531); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result[resIndex++] = value; + } + } + return result; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getAppDisplayName = exports.getUrl = exports.isInstalled = exports.getStoreInstallationURL = exports.getStoreURL = void 0; + /** + * A specialized version of `_.includes` for arrays without support for + * specifying an index to search from. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludes(array, value) { + var length = array == null ? 0 : array.length; + return !!length && baseIndexOf(array, value, 0) > -1; + } -var _get = _interopRequireDefault(__webpack_require__(370)); + /** + * This function is like `arrayIncludes` except that it accepts a comparator. + * + * @private + * @param {Array} [array] The array to inspect. + * @param {*} target The value to search for. + * @param {Function} comparator The comparator invoked per element. + * @returns {boolean} Returns `true` if `target` is found, else `false`. + */ + function arrayIncludesWith(array, value, comparator) { + var index = -1, + length = array == null ? 0 : array.length; -var STORE_SLUG = 'store'; -/** - * Returns the store URL of an app/konnector - * - * @param {Array} [appData=[]] Apps data, as returned by endpoint /apps/ or /konnectors - * @param {object} [app={}] AppObject - * @returns {string} URL as string - */ + while (++index < length) { + if (comparator(value, array[index])) { + return true; + } + } + return false; + } -var getStoreURL = function getStoreURL() { - var appData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var app = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + /** + * A specialized version of `_.map` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function arrayMap(array, iteratee) { + var index = -1, + length = array == null ? 0 : array.length, + result = Array(length); - if (!app.slug) { - throw new Error('Expected app / konnector with the defined slug'); + while (++index < length) { + result[index] = iteratee(array[index], index, array); + } + return result; } - var storeApp = isInstalled(appData, { - slug: STORE_SLUG - }); - if (!storeApp) return null; - var storeUrl = storeApp.links && storeApp.links.related; - if (!storeUrl) return null; - return "".concat(storeUrl, "#/discover/").concat(app.slug); -}; -/** - * Returns the store URL to install/update an app/konnector - * - * @param {Array} [appData=[]] Apps data, as returned by endpoint /apps/ or - * /konnectors/ - * @param {object} [app={}] AppObject - * @returns {string} URL as string - */ - + /** + * Appends the elements of `values` to `array`. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to append. + * @returns {Array} Returns `array`. + */ + function arrayPush(array, values) { + var index = -1, + length = values.length, + offset = array.length; -exports.getStoreURL = getStoreURL; + while (++index < length) { + array[offset + index] = values[index]; + } + return array; + } -var getStoreInstallationURL = function getStoreInstallationURL() { - var appData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var app = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var storeUrl = getStoreURL(appData, app); + /** + * A specialized version of `_.reduce` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the first element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduce(array, iteratee, accumulator, initAccum) { + var index = -1, + length = array == null ? 0 : array.length; - if (!storeUrl) { - return null; + if (initAccum && length) { + accumulator = array[++index]; + } + while (++index < length) { + accumulator = iteratee(accumulator, array[index], index, array); + } + return accumulator; } - return "".concat(storeUrl, "/install"); -}; -/** - * - * @param {Array} apps Array of apps returned by /apps /konnectors - * @param {object} wantedApp io.cozy.app with at least a slug - * @returns {object} The io.cozy.app is installed or undefined if not - */ - + /** + * A specialized version of `_.reduceRight` for arrays without support for + * iteratee shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @param {boolean} [initAccum] Specify using the last element of `array` as + * the initial value. + * @returns {*} Returns the accumulated value. + */ + function arrayReduceRight(array, iteratee, accumulator, initAccum) { + var length = array == null ? 0 : array.length; + if (initAccum && length) { + accumulator = array[--length]; + } + while (length--) { + accumulator = iteratee(accumulator, array[length], length, array); + } + return accumulator; + } -exports.getStoreInstallationURL = getStoreInstallationURL; + /** + * A specialized version of `_.some` for arrays without support for iteratee + * shorthands. + * + * @private + * @param {Array} [array] The array to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + */ + function arraySome(array, predicate) { + var index = -1, + length = array == null ? 0 : array.length; -var isInstalled = function isInstalled() { - var apps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; - var wantedApp = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - return apps.find(function (app) { - return app.attributes && app.attributes.slug === wantedApp.slug; - }); -}; -/** - * - * @param {object} app io.cozy.apps document - * @returns {string} url to the app - */ + while (++index < length) { + if (predicate(array[index], index, array)) { + return true; + } + } + return false; + } + /** + * Gets the size of an ASCII `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + var asciiSize = baseProperty('length'); -exports.isInstalled = isInstalled; + /** + * Converts an ASCII `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function asciiToArray(string) { + return string.split(''); + } -var getUrl = function getUrl(app) { - return app.links && app.links.related; -}; -/** - * getAppDisplayName - Combines the translated prefix and name of the app into a single string. - * - * @param {object} app io.cozy.apps or io.cozy.konnectors document - * @param {string} lang Locale to use - * - * @returns {string} Name of the app suitable for display - */ + /** + * Splits an ASCII `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function asciiWords(string) { + return string.match(reAsciiWord) || []; + } + /** + * The base implementation of methods like `_.findKey` and `_.findLastKey`, + * without support for iteratee shorthands, which iterates over `collection` + * using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the found element or its key, else `undefined`. + */ + function baseFindKey(collection, predicate, eachFunc) { + var result; + eachFunc(collection, function(value, key, collection) { + if (predicate(value, key, collection)) { + result = key; + return false; + } + }); + return result; + } -exports.getUrl = getUrl; + /** + * The base implementation of `_.findIndex` and `_.findLastIndex` without + * support for iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Function} predicate The function invoked per iteration. + * @param {number} fromIndex The index to search from. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseFindIndex(array, predicate, fromIndex, fromRight) { + var length = array.length, + index = fromIndex + (fromRight ? 1 : -1); -var getAppDisplayName = function getAppDisplayName(app, lang) { - var basePrefix = (0, _get.default)(app, 'name_prefix'); - var baseName = (0, _get.default)(app, 'name'); - var translatedName = (0, _get.default)(app, ['locales', lang, 'name'], baseName); - var translatedPrefix = (0, _get.default)(app, ['locales', lang, 'name_prefix'], basePrefix); - return translatedPrefix && translatedPrefix.toLowerCase() !== 'cozy' ? "".concat(translatedPrefix, " ").concat(translatedName) : translatedName; -}; + while ((fromRight ? index-- : ++index < length)) { + if (predicate(array[index], index, array)) { + return index; + } + } + return -1; + } -exports.getAppDisplayName = getAppDisplayName; + /** + * The base implementation of `_.indexOf` without `fromIndex` bounds checks. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOf(array, value, fromIndex) { + return value === value + ? strictIndexOf(array, value, fromIndex) + : baseFindIndex(array, baseIsNaN, fromIndex); + } -/***/ }), -/* 823 */ -/***/ (function(module, exports, __webpack_require__) { + /** + * This function is like `baseIndexOf` except that it accepts a comparator. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @param {Function} comparator The comparator invoked per element. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function baseIndexOfWith(array, value, fromIndex, comparator) { + var index = fromIndex - 1, + length = array.length; -"use strict"; + while (++index < length) { + if (comparator(array[index], value)) { + return index; + } + } + return -1; + } + /** + * The base implementation of `_.isNaN` without support for number objects. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + */ + function baseIsNaN(value) { + return value !== value; + } -var _interopRequireDefault = __webpack_require__(531); + /** + * The base implementation of `_.mean` and `_.meanBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the mean. + */ + function baseMean(array, iteratee) { + var length = array == null ? 0 : array.length; + return length ? (baseSum(array, iteratee) / length) : NAN; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.normalize = normalize; -exports.ensureFilePath = ensureFilePath; -exports.getParentFolderId = getParentFolderId; -exports.hasMetadataAttribute = exports.isReferencedByAlbum = exports.fetchFilesByQualificationRules = exports.saveFileQualification = exports.isSharingShorcutNew = exports.isSharingShortcutNew = exports.isSharingShorcut = exports.isSharingShortcut = exports.getSharingShortcutTargetDoctype = exports.getSharingShortcutTargetMime = exports.getSharingShortcutStatus = exports.isShortcut = exports.shouldBeOpenedByOnlyOffice = exports.isOnlyOfficeFile = exports.isNote = exports.isDirectory = exports.isFile = exports.splitFilename = exports.ALBUMS_DOCTYPE = void 0; + /** + * The base implementation of `_.property` without support for deep paths. + * + * @private + * @param {string} key The key of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function baseProperty(key) { + return function(object) { + return object == null ? undefined : object[key]; + }; + } -var _regenerator = _interopRequireDefault(__webpack_require__(546)); + /** + * The base implementation of `_.propertyOf` without support for deep paths. + * + * @private + * @param {Object} object The object to query. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyOf(object) { + return function(key) { + return object == null ? undefined : object[key]; + }; + } -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); + /** + * The base implementation of `_.reduce` and `_.reduceRight`, without support + * for iteratee shorthands, which iterates over `collection` using `eachFunc`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {*} accumulator The initial value. + * @param {boolean} initAccum Specify using the first or last element of + * `collection` as the initial value. + * @param {Function} eachFunc The function to iterate over `collection`. + * @returns {*} Returns the accumulated value. + */ + function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { + eachFunc(collection, function(value, index, collection) { + accumulator = initAccum + ? (initAccum = false, value) + : iteratee(accumulator, value, index, collection); + }); + return accumulator; + } -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); + /** + * The base implementation of `_.sortBy` which uses `comparer` to define the + * sort order of `array` and replaces criteria objects with their corresponding + * values. + * + * @private + * @param {Array} array The array to sort. + * @param {Function} comparer The function to define sort order. + * @returns {Array} Returns `array`. + */ + function baseSortBy(array, comparer) { + var length = array.length; -var _get = _interopRequireDefault(__webpack_require__(370)); + array.sort(comparer); + while (length--) { + array[length] = array[length].value; + } + return array; + } -var _isString = _interopRequireDefault(__webpack_require__(74)); + /** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ + function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; -var _has = _interopRequireDefault(__webpack_require__(670)); + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); + } + } + return result; + } -var _document = __webpack_require__(824); + /** + * The base implementation of `_.times` without support for iteratee shorthands + * or max array length checks. + * + * @private + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the array of results. + */ + function baseTimes(n, iteratee) { + var index = -1, + result = Array(n); -var _dsl = __webpack_require__(626); + while (++index < n) { + result[index] = iteratee(index); + } + return result; + } -var _types = __webpack_require__(629); + /** + * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array + * of key-value pairs for `object` corresponding to the property names of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the key-value pairs. + */ + function baseToPairs(object, props) { + return arrayMap(props, function(key) { + return [key, object[key]]; + }); + } -var _CozyClient = _interopRequireDefault(__webpack_require__(532)); + /** + * The base implementation of `_.trim`. + * + * @private + * @param {string} string The string to trim. + * @returns {string} Returns the trimmed string. + */ + function baseTrim(string) { + return string + ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') + : string; + } -function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } + /** + * The base implementation of `_.unary` without support for storing metadata. + * + * @private + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. + */ + function baseUnary(func) { + return function(value) { + return func(value); + }; + } -function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } + /** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ + function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); + } -function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } + /** + * Checks if a `cache` value for `key` exists. + * + * @private + * @param {Object} cache The cache to query. + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function cacheHas(cache, key) { + return cache.has(key); + } -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + /** + * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the first unmatched string symbol. + */ + function charsStartIndex(strSymbols, chrSymbols) { + var index = -1, + length = strSymbols.length; -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } -var FILE_TYPE = 'file'; -var DIR_TYPE = 'directory'; -var ALBUMS_DOCTYPE = 'io.cozy.photos.albums'; -exports.ALBUMS_DOCTYPE = ALBUMS_DOCTYPE; -var FILENAME_WITH_EXTENSION_REGEX = /(.+)(\..*)$/; -/** - * Returns base filename and extension - * - * @param {IOCozyFile} file An io.cozy.files - * @returns {object} {filename, extension} - */ + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ + function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; -var splitFilename = function splitFilename(file) { - if (!(0, _isString.default)(file.name)) throw new Error('file should have a name property '); + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; + } - if (file.type === 'file') { - var match = file.name.match(FILENAME_WITH_EXTENSION_REGEX); + /** + * Gets the number of `placeholder` occurrences in `array`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} placeholder The placeholder to search for. + * @returns {number} Returns the placeholder count. + */ + function countHolders(array, placeholder) { + var length = array.length, + result = 0; - if (match) { - return { - filename: match[1], - extension: match[2] - }; + while (length--) { + if (array[length] === placeholder) { + ++result; + } } + return result; } - return { - filename: file.name, - extension: '' - }; -}; -/** - * - * @param {IOCozyFile} file io.cozy.files - */ - + /** + * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A + * letters to basic Latin letters. + * + * @private + * @param {string} letter The matched letter to deburr. + * @returns {string} Returns the deburred letter. + */ + var deburrLetter = basePropertyOf(deburredLetters); -exports.splitFilename = splitFilename; + /** + * Used by `_.escape` to convert characters to HTML entities. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + var escapeHtmlChar = basePropertyOf(htmlEscapes); -var isFile = function isFile(file) { - return file && file.type === FILE_TYPE; -}; -/** - * - * @param {IOCozyFile} file io.cozy.files - */ + /** + * Used by `_.template` to escape characters for inclusion in compiled string literals. + * + * @private + * @param {string} chr The matched character to escape. + * @returns {string} Returns the escaped character. + */ + function escapeStringChar(chr) { + return '\\' + stringEscapes[chr]; + } + /** + * Gets the value at `key` of `object`. + * + * @private + * @param {Object} [object] The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. + */ + function getValue(object, key) { + return object == null ? undefined : object[key]; + } -exports.isFile = isFile; + /** + * Checks if `string` contains Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a symbol is found, else `false`. + */ + function hasUnicode(string) { + return reHasUnicode.test(string); + } -var isDirectory = function isDirectory(file) { - return file && file.type === DIR_TYPE; -}; -/** - * - * @param {IOCozyFile} file io.cozy.files - */ + /** + * Checks if `string` contains a word composed of Unicode symbols. + * + * @private + * @param {string} string The string to inspect. + * @returns {boolean} Returns `true` if a word is found, else `false`. + */ + function hasUnicodeWord(string) { + return reHasUnicodeWord.test(string); + } + /** + * Converts `iterator` to an array. + * + * @private + * @param {Object} iterator The iterator to convert. + * @returns {Array} Returns the converted array. + */ + function iteratorToArray(iterator) { + var data, + result = []; -exports.isDirectory = isDirectory; + while (!(data = iterator.next()).done) { + result.push(data.value); + } + return result; + } -var isNote = function isNote(file) { - if (file && file.name && file.name.endsWith('.cozy-note') && file.type === FILE_TYPE && file.metadata && file.metadata.content !== undefined && file.metadata.schema !== undefined && file.metadata.title !== undefined && file.metadata.version !== undefined) return true; - return false; -}; -/** - * Whether the file is supported by Only Office - * - * @param {IOCozyFile} file - io.cozy.file document - * @returns {boolean} - */ + /** + * Converts `map` to its key-value pairs. + * + * @private + * @param {Object} map The map to convert. + * @returns {Array} Returns the key-value pairs. + */ + function mapToArray(map) { + var index = -1, + result = Array(map.size); + map.forEach(function(value, key) { + result[++index] = [key, value]; + }); + return result; + } -exports.isNote = isNote; + /** + * Creates a unary function that invokes `func` with its argument transformed. + * + * @private + * @param {Function} func The function to wrap. + * @param {Function} transform The argument transform. + * @returns {Function} Returns the new function. + */ + function overArg(func, transform) { + return function(arg) { + return func(transform(arg)); + }; + } -var isOnlyOfficeFile = function isOnlyOfficeFile(file) { - return isFile(file) && !isNote(file) && (file.class === 'text' || file.class === 'spreadsheet' || file.class === 'slide'); -}; -/** - * Whether the file should be opened by only office - * We want to be consistent with the stack so we check the class attributes - * But we want to exclude .txt and .md because the CozyUI Viewer can already show them - * - * @param {IOCozyFile} file - io.cozy.file document - * @returns {boolean} - */ + /** + * Replaces all `placeholder` elements in `array` with an internal placeholder + * and returns an array of their indexes. + * + * @private + * @param {Array} array The array to modify. + * @param {*} placeholder The placeholder to replace. + * @returns {Array} Returns the new array of placeholder indexes. + */ + function replaceHolders(array, placeholder) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + while (++index < length) { + var value = array[index]; + if (value === placeholder || value === PLACEHOLDER) { + array[index] = PLACEHOLDER; + result[resIndex++] = index; + } + } + return result; + } -exports.isOnlyOfficeFile = isOnlyOfficeFile; + /** + * Converts `set` to an array of its values. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the values. + */ + function setToArray(set) { + var index = -1, + result = Array(set.size); -var shouldBeOpenedByOnlyOffice = function shouldBeOpenedByOnlyOffice(file) { - return isOnlyOfficeFile(file) && !file.name.endsWith('.txt') && !file.name.endsWith('.md'); -}; -/** - * - * @param {IOCozyFile} file io.cozy.files - * @returns {boolean} true if the file is a shortcut - */ + set.forEach(function(value) { + result[++index] = value; + }); + return result; + } + /** + * Converts `set` to its value-value pairs. + * + * @private + * @param {Object} set The set to convert. + * @returns {Array} Returns the value-value pairs. + */ + function setToPairs(set) { + var index = -1, + result = Array(set.size); -exports.shouldBeOpenedByOnlyOffice = shouldBeOpenedByOnlyOffice; + set.forEach(function(value) { + result[++index] = [value, value]; + }); + return result; + } -var isShortcut = function isShortcut(file) { - return file && file.class === 'shortcut'; -}; -/** - * Normalizes an object representing a io.cozy.files object - * - * Ensures existence of `_id` and `_type` - * - * @public - * @param {object} file - object representing the file - * @returns {object} full normalized object - */ + /** + * A specialized version of `_.indexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictIndexOf(array, value, fromIndex) { + var index = fromIndex - 1, + length = array.length; + while (++index < length) { + if (array[index] === value) { + return index; + } + } + return -1; + } -exports.isShortcut = isShortcut; + /** + * A specialized version of `_.lastIndexOf` which performs strict equality + * comparisons of values, i.e. `===`. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} fromIndex The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function strictLastIndexOf(array, value, fromIndex) { + var index = fromIndex + 1; + while (index--) { + if (array[index] === value) { + return index; + } + } + return index; + } -function normalize(file) { - var id = file._id || file.id; - var doctype = file._type || 'io.cozy.files'; - return _objectSpread({ - _id: id, - id: id, - _type: doctype - }, file); -} -/** - * Ensure the file has a `path` attribute, or build it - * - * @public - * @param {object} file - object representing the file - * @param {object} parent - parent directory for the file - * @returns {object} file object with path attribute - */ + /** + * Gets the number of symbols in `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the string size. + */ + function stringSize(string) { + return hasUnicode(string) + ? unicodeSize(string) + : asciiSize(string); + } + /** + * Converts `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function stringToArray(string) { + return hasUnicode(string) + ? unicodeToArray(string) + : asciiToArray(string); + } -function ensureFilePath(file, parent) { - if (file.path) return file; - if (!parent || !parent.path) throw new Error("Could not define a file path for ".concat(file._id || file.id)); - var path = parent.path + '/' + file.name; - return _objectSpread({ - path: path - }, file); -} -/** - * Get the id of the parent folder (`null` for the root folder) - * - * @param {object} file - io.cozy.files document - * @returns {string|null} id of the parent folder, if any - */ + /** + * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace + * character of `string`. + * + * @private + * @param {string} string The string to inspect. + * @returns {number} Returns the index of the last non-whitespace character. + */ + function trimmedEndIndex(string) { + var index = string.length; + while (index-- && reWhitespace.test(string.charAt(index))) {} + return index; + } -function getParentFolderId(file) { - var parentId = (0, _get.default)(file, 'attributes.dir_id'); - return parentId === '' ? null : parentId; -} -/** - * Returns the status of a sharing shortcut. - * - * @param {IOCozyFile} file - io.cozy.files document - * - * @returns {string} A description of the status - */ + /** + * Used by `_.unescape` to convert HTML entities to characters. + * + * @private + * @param {string} chr The matched character to unescape. + * @returns {string} Returns the unescaped character. + */ + var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + /** + * Gets the size of a Unicode `string`. + * + * @private + * @param {string} string The string inspect. + * @returns {number} Returns the string size. + */ + function unicodeSize(string) { + var result = reUnicode.lastIndex = 0; + while (reUnicode.test(string)) { + ++result; + } + return result; + } -var getSharingShortcutStatus = function getSharingShortcutStatus(file) { - return (0, _get.default)(file, 'metadata.sharing.status'); -}; -/** - * Returns the mime type of the target of the sharing shortcut, if it is a file. - * - * @param {IOCozyFile} file - io.cozy.files document - * - * @returns {string} The mime-type of the target file, or an empty string is the target is not a file. - */ + /** + * Converts a Unicode `string` to an array. + * + * @private + * @param {string} string The string to convert. + * @returns {Array} Returns the converted array. + */ + function unicodeToArray(string) { + return string.match(reUnicode) || []; + } + /** + * Splits a Unicode `string` into an array of its words. + * + * @private + * @param {string} The string to inspect. + * @returns {Array} Returns the words of `string`. + */ + function unicodeWords(string) { + return string.match(reUnicodeWord) || []; + } -exports.getSharingShortcutStatus = getSharingShortcutStatus; + /*--------------------------------------------------------------------------*/ -var getSharingShortcutTargetMime = function getSharingShortcutTargetMime(file) { - return (0, _get.default)(file, 'metadata.target.mime'); -}; -/** - * Returns the doctype of the target of the sharing shortcut. - * - * @param {IOCozyFile} file - io.cozy.files document - * - * @returns {string} A doctype - */ - - -exports.getSharingShortcutTargetMime = getSharingShortcutTargetMime; - -var getSharingShortcutTargetDoctype = function getSharingShortcutTargetDoctype(file) { - return (0, _get.default)(file, 'metadata.target._type'); -}; -/** - * Returns whether the file is a shortcut to a sharing - * - * @param {IOCozyFile} file - io.cozy.files document - * - * @returns {boolean} - */ + /** + * Create a new pristine `lodash` function using the `context` object. + * + * @static + * @memberOf _ + * @since 1.1.0 + * @category Util + * @param {Object} [context=root] The context object. + * @returns {Function} Returns a new `lodash` function. + * @example + * + * _.mixin({ 'foo': _.constant('foo') }); + * + * var lodash = _.runInContext(); + * lodash.mixin({ 'bar': lodash.constant('bar') }); + * + * _.isFunction(_.foo); + * // => true + * _.isFunction(_.bar); + * // => false + * + * lodash.isFunction(lodash.foo); + * // => false + * lodash.isFunction(lodash.bar); + * // => true + * + * // Create a suped-up `defer` in Node.js. + * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; + */ + var runInContext = (function runInContext(context) { + context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + /** Built-in constructor references. */ + var Array = context.Array, + Date = context.Date, + Error = context.Error, + Function = context.Function, + Math = context.Math, + Object = context.Object, + RegExp = context.RegExp, + String = context.String, + TypeError = context.TypeError; -exports.getSharingShortcutTargetDoctype = getSharingShortcutTargetDoctype; + /** Used for built-in method references. */ + var arrayProto = Array.prototype, + funcProto = Function.prototype, + objectProto = Object.prototype; -var isSharingShortcut = function isSharingShortcut(file) { - return Boolean(getSharingShortcutStatus(file)); -}; -/** - * Returns whether the file is a shortcut to a sharing - * - * @deprecated Prefer to use isSharingShortcut. - * @param {IOCozyFile} file - io.cozy.files document - * - * @returns {boolean} - */ + /** Used to detect overreaching core-js shims. */ + var coreJsData = context['__core-js_shared__']; + /** Used to resolve the decompiled source of functions. */ + var funcToString = funcProto.toString; -exports.isSharingShortcut = isSharingShortcut; + /** Used to check objects for own properties. */ + var hasOwnProperty = objectProto.hasOwnProperty; -var isSharingShorcut = function isSharingShorcut(file) { - console.warn('Deprecation: `isSharingShorcut` is deprecated, please use `isSharingShortcut` instead'); - return isSharingShortcut(file); -}; -/** - * Returns whether the sharing shortcut is new - * - * @param {IOCozyFile} file - io.cozy.files document - * - * @returns {boolean} - */ + /** Used to generate unique IDs. */ + var idCounter = 0; + /** Used to detect methods masquerading as native. */ + var maskSrcKey = (function() { + var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); + return uid ? ('Symbol(src)_1.' + uid) : ''; + }()); -exports.isSharingShorcut = isSharingShorcut; + /** + * Used to resolve the + * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) + * of values. + */ + var nativeObjectToString = objectProto.toString; -var isSharingShortcutNew = function isSharingShortcutNew(file) { - return getSharingShortcutStatus(file) === 'new'; -}; -/** - * Returns whether the sharing shortcut is new - * - * @deprecated Prefer to use isSharingShortcutNew. - * @param {object} file - io.cozy.files document - * - * @returns {boolean} - */ + /** Used to infer the `Object` constructor. */ + var objectCtorString = funcToString.call(Object); + /** Used to restore the original `_` reference in `_.noConflict`. */ + var oldDash = root._; -exports.isSharingShortcutNew = isSharingShortcutNew; + /** Used to detect if a method is native. */ + var reIsNative = RegExp('^' + + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') + .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' + ); -var isSharingShorcutNew = function isSharingShorcutNew(file) { - console.warn('Deprecation: `isSharingShorcutNew` is deprecated, please use `isSharingShortcutNew` instead'); - return isSharingShortcutNew(file); -}; -/** - * Save the file with the given qualification - * - * @param {CozyClient} client - The CozyClient instance - * @param {IOCozyFile} file - The file to qualify - * @param {object} qualification - The file qualification - * @returns {Promise<IOCozyFile>} - The saved file - */ + /** Built-in value references. */ + var Buffer = moduleExports ? context.Buffer : undefined, + Symbol = context.Symbol, + Uint8Array = context.Uint8Array, + allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, + getPrototype = overArg(Object.getPrototypeOf, Object), + objectCreate = Object.create, + propertyIsEnumerable = objectProto.propertyIsEnumerable, + splice = arrayProto.splice, + spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, + symIterator = Symbol ? Symbol.iterator : undefined, + symToStringTag = Symbol ? Symbol.toStringTag : undefined; + var defineProperty = (function() { + try { + var func = getNative(Object, 'defineProperty'); + func({}, '', {}); + return func; + } catch (e) {} + }()); -exports.isSharingShorcutNew = isSharingShorcutNew; + /** Mocked built-ins. */ + var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, + ctxNow = Date && Date.now !== root.Date.now && Date.now, + ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; -var saveFileQualification = /*#__PURE__*/function () { - var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, file, qualification) { - var qualifiedFile; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - qualifiedFile = (0, _document.setQualification)(file, qualification); - return _context.abrupt("return", client.collection('io.cozy.files').updateMetadataAttribute(file._id, qualifiedFile.metadata)); + /* Built-in method references for those with the same name as other `lodash` methods. */ + var nativeCeil = Math.ceil, + nativeFloor = Math.floor, + nativeGetSymbols = Object.getOwnPropertySymbols, + nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, + nativeIsFinite = context.isFinite, + nativeJoin = arrayProto.join, + nativeKeys = overArg(Object.keys, Object), + nativeMax = Math.max, + nativeMin = Math.min, + nativeNow = Date.now, + nativeParseInt = context.parseInt, + nativeRandom = Math.random, + nativeReverse = arrayProto.reverse; - case 2: - case "end": - return _context.stop(); - } - } - }, _callee); - })); + /* Built-in method references that are verified to be native. */ + var DataView = getNative(context, 'DataView'), + Map = getNative(context, 'Map'), + Promise = getNative(context, 'Promise'), + Set = getNative(context, 'Set'), + WeakMap = getNative(context, 'WeakMap'), + nativeCreate = getNative(Object, 'create'); - return function saveFileQualification(_x, _x2, _x3) { - return _ref.apply(this, arguments); - }; -}(); -/** - * Helper to query files based on qualification rules - * - * @param {object} client - The CozyClient instance - * @param {object} docRules - the rules containing the searched qualification and the count - * @returns {Promise<QueryResult>} - The files found by the rules - */ + /** Used to store function metadata. */ + var metaMap = WeakMap && new WeakMap; + /** Used to lookup unminified function names. */ + var realNames = {}; -exports.saveFileQualification = saveFileQualification; + /** Used to detect maps, sets, and weakmaps. */ + var dataViewCtorString = toSource(DataView), + mapCtorString = toSource(Map), + promiseCtorString = toSource(Promise), + setCtorString = toSource(Set), + weakMapCtorString = toSource(WeakMap); -var fetchFilesByQualificationRules = /*#__PURE__*/function () { - var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(client, docRules) { - var rules, count, query, result; - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - rules = docRules.rules, count = docRules.count; - query = (0, _dsl.Q)('io.cozy.files').where(_objectSpread({}, rules)).partialIndex({ - trashed: false - }).indexFields(['cozyMetadata.updatedAt', 'metadata.qualification']).sortBy([{ - 'cozyMetadata.updatedAt': 'desc' - }]).limitBy(count ? count : 1); - _context2.next = 4; - return client.query(query); + /** Used to convert symbols to primitives and strings. */ + var symbolProto = Symbol ? Symbol.prototype : undefined, + symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, + symbolToString = symbolProto ? symbolProto.toString : undefined; - case 4: - result = _context2.sent; - return _context2.abrupt("return", result); + /*------------------------------------------------------------------------*/ - case 6: - case "end": - return _context2.stop(); + /** + * Creates a `lodash` object which wraps `value` to enable implicit method + * chain sequences. Methods that operate on and return arrays, collections, + * and functions can be chained together. Methods that retrieve a single value + * or may return a primitive value will automatically end the chain sequence + * and return the unwrapped value. Otherwise, the value must be unwrapped + * with `_#value`. + * + * Explicit chain sequences, which must be unwrapped with `_#value`, may be + * enabled using `_.chain`. + * + * The execution of chained methods is lazy, that is, it's deferred until + * `_#value` is implicitly or explicitly called. + * + * Lazy evaluation allows several methods to support shortcut fusion. + * Shortcut fusion is an optimization to merge iteratee calls; this avoids + * the creation of intermediate arrays and can greatly reduce the number of + * iteratee executions. Sections of a chain sequence qualify for shortcut + * fusion if the section is applied to an array and iteratees accept only + * one argument. The heuristic for whether a section qualifies for shortcut + * fusion is subject to change. + * + * Chaining is supported in custom builds as long as the `_#value` method is + * directly or indirectly included in the build. + * + * In addition to lodash methods, wrappers have `Array` and `String` methods. + * + * The wrapper `Array` methods are: + * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` + * + * The wrapper `String` methods are: + * `replace` and `split` + * + * The wrapper methods that support shortcut fusion are: + * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, + * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, + * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` + * + * The chainable wrapper methods are: + * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, + * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, + * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, + * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, + * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, + * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, + * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, + * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, + * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, + * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, + * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, + * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, + * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, + * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, + * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, + * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, + * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, + * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, + * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, + * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, + * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, + * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, + * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, + * `zipObject`, `zipObjectDeep`, and `zipWith` + * + * The wrapper methods that are **not** chainable by default are: + * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, + * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, + * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, + * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, + * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, + * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, + * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, + * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, + * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, + * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, + * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, + * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, + * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, + * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, + * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, + * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, + * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, + * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, + * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, + * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, + * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, + * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, + * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, + * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, + * `upperFirst`, `value`, and `words` + * + * @name _ + * @constructor + * @category Seq + * @param {*} value The value to wrap in a `lodash` instance. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2, 3]); + * + * // Returns an unwrapped value. + * wrapped.reduce(_.add); + * // => 6 + * + * // Returns a wrapped value. + * var squares = wrapped.map(square); + * + * _.isArray(squares); + * // => false + * + * _.isArray(squares.value()); + * // => true + */ + function lodash(value) { + if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { + if (value instanceof LodashWrapper) { + return value; } - } - }, _callee2); - })); - - return function fetchFilesByQualificationRules(_x4, _x5) { - return _ref2.apply(this, arguments); - }; -}(); -/** - * Whether the file is referenced by an album - * - * @param {IOCozyFile} file - An io.cozy.files document - * @returns {boolean} - */ - - -exports.fetchFilesByQualificationRules = fetchFilesByQualificationRules; - -var isReferencedByAlbum = function isReferencedByAlbum(file) { - if (file.relationships && file.relationships.referenced_by && file.relationships.referenced_by.data && file.relationships.referenced_by.data.length > 0) { - var references = file.relationships.referenced_by.data; - - var _iterator = _createForOfIteratorHelper(references), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var reference = _step.value; - - if (reference.type === ALBUMS_DOCTYPE) { - return true; + if (hasOwnProperty.call(value, '__wrapped__')) { + return wrapperClone(value); } } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); + return new LodashWrapper(value); } - } - - return false; -}; -/** - * Whether the file's metadata attribute exists - * - * @param {object} params - Param - * @param {IOCozyFile} params.file - An io.cozy.files document - * @param {string} params.attribute - Metadata attribute to check - * @returns {boolean} - */ - - -exports.isReferencedByAlbum = isReferencedByAlbum; - -var hasMetadataAttribute = function hasMetadataAttribute(_ref3) { - var file = _ref3.file, - attribute = _ref3.attribute; - return (0, _has.default)(file, "metadata.".concat(attribute)); -}; - -exports.hasMetadataAttribute = hasMetadataAttribute; - -/***/ }), -/* 824 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; + /** + * The base implementation of `_.create` without support for assigning + * properties to the created object. + * + * @private + * @param {Object} proto The object to inherit from. + * @returns {Object} Returns the new object. + */ + var baseCreate = (function() { + function object() {} + return function(proto) { + if (!isObject(proto)) { + return {}; + } + if (objectCreate) { + return objectCreate(proto); + } + object.prototype = proto; + var result = new object; + object.prototype = undefined; + return result; + }; + }()); -var _interopRequireWildcard = __webpack_require__(529); + /** + * The function whose prototype chain sequence wrappers inherit from. + * + * @private + */ + function baseLodash() { + // No operation performed. + } -var _interopRequireDefault = __webpack_require__(531); + /** + * The base constructor for creating `lodash` wrapper objects. + * + * @private + * @param {*} value The value to wrap. + * @param {boolean} [chainAll] Enable explicit method chain sequences. + */ + function LodashWrapper(value, chainAll) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__chain__ = !!chainAll; + this.__index__ = 0; + this.__values__ = undefined; + } -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getQualification = exports.setQualification = exports.Qualification = void 0; + /** + * By default, the template delimiters used by lodash are like those in + * embedded Ruby (ERB) as well as ES2015 template strings. Change the + * following template settings to use alternative delimiters. + * + * @static + * @memberOf _ + * @type {Object} + */ + lodash.templateSettings = { -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); + /** + * Used to detect `data` property values to be HTML-escaped. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'escape': reEscape, -var _classCallCheck2 = _interopRequireDefault(__webpack_require__(549)); + /** + * Used to detect code to be evaluated. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'evaluate': reEvaluate, -var _createClass2 = _interopRequireDefault(__webpack_require__(550)); + /** + * Used to detect `data` property values to inject. + * + * @memberOf _.templateSettings + * @type {RegExp} + */ + 'interpolate': reInterpolate, -var _lodash = __webpack_require__(825); + /** + * Used to reference the data object in the template text. + * + * @memberOf _.templateSettings + * @type {string} + */ + 'variable': '', -var qualificationModel = _interopRequireWildcard(__webpack_require__(826)); + /** + * Used to import variables into the compiled template. + * + * @memberOf _.templateSettings + * @type {Object} + */ + 'imports': { -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } + /** + * A reference to the `lodash` function. + * + * @memberOf _.templateSettings.imports + * @type {Function} + */ + '_': lodash + } + }; -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } + // Ensure wrappers are instances of `baseLodash`. + lodash.prototype = baseLodash.prototype; + lodash.prototype.constructor = lodash; -/** - * @typedef {object} QualificationAttributes - * @property {string} [label] - The qualification label. - * @property {string} [purpose] - The document purpose. - * @property {string} [sourceCategory] - The activity field of the document source. - * @property {string} [sourceSubCategory] - The sub-activity field of the document source. - * @property {Array<string>} [subjects] - On what is about the document. - */ + LodashWrapper.prototype = baseCreate(baseLodash.prototype); + LodashWrapper.prototype.constructor = LodashWrapper; -/** - * This class is used to create document Qualification, i.e. metadata - * attributes used to describe the document. - * The qualifications model is stored in the assets, associating - * labels to attributes, namely: purpose, sourceCategory, sourceSubCategory - * and subjects. - * A qualification can be customized accordingly to rules detailed in - * the checkValueAttributes method. - */ -var Qualification = /*#__PURE__*/function () { - /** - * @param {string} label - The qualification label - * @param {QualificationAttributes} attributes - Qualification's attributes - */ - function Qualification(label) { - var attributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - (0, _classCallCheck2.default)(this, Qualification); - var qualification = qualificationModel.qualifications.find(function (qualif) { - return qualif.label === label; - }); + /*------------------------------------------------------------------------*/ - if (qualification) { - /** - * @type {string?} - */ - this.label = qualification.label; - /** - * @type {string?} - */ + /** + * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * + * @private + * @constructor + * @param {*} value The value to wrap. + */ + function LazyWrapper(value) { + this.__wrapped__ = value; + this.__actions__ = []; + this.__dir__ = 1; + this.__filtered__ = false; + this.__iteratees__ = []; + this.__takeCount__ = MAX_ARRAY_LENGTH; + this.__views__ = []; + } - this.purpose = attributes.purpose || qualification.purpose; - this.sourceCategory = attributes.sourceCategory || qualification.sourceCategory; - this.sourceSubCategory = attributes.sourceSubCategory || qualification.sourceSubCategory; - this.subjects = attributes.subjects || qualification.subjects; - } else { - throw new Error("No qualification found for the label ".concat(label)); + /** + * Creates a clone of the lazy wrapper object. + * + * @private + * @name clone + * @memberOf LazyWrapper + * @returns {Object} Returns the cloned `LazyWrapper` object. + */ + function lazyClone() { + var result = new LazyWrapper(this.__wrapped__); + result.__actions__ = copyArray(this.__actions__); + result.__dir__ = this.__dir__; + result.__filtered__ = this.__filtered__; + result.__iteratees__ = copyArray(this.__iteratees__); + result.__takeCount__ = this.__takeCount__; + result.__views__ = copyArray(this.__views__); + return result; } - } - /** - * Check the given qualification attributes respects the following rules: - * - For the given label, if a purpose, sourceCategory or sourceSubCategory - * attribute is defined in the model, it must match the given qualification. - * - If not defined in the model for the label, a custom purpose, sourceCategory or - * sourceSubCategory value can be defined, if it exist in their respective - * known values list. - * - For the given label, if subjects are defined in the model, they must be included - * in the given qualification. - * - If extra subjects are set, they should exist in the known values. - * - * @param {object} attributes - The qualification attributes to check - */ + /** + * Reverses the direction of lazy iteration. + * + * @private + * @name reverse + * @memberOf LazyWrapper + * @returns {Object} Returns the new reversed `LazyWrapper` object. + */ + function lazyReverse() { + if (this.__filtered__) { + var result = new LazyWrapper(this); + result.__dir__ = -1; + result.__filtered__ = true; + } else { + result = this.clone(); + result.__dir__ *= -1; + } + return result; + } - (0, _createClass2.default)(Qualification, [{ - key: "checkAttributes", - value: function checkAttributes(attributes) { - if (this.purpose !== attributes.purpose) { - if (!this.purpose) { - var isKnownValue = qualificationModel.purposeKnownValues.includes(attributes.purpose); + /** + * Extracts the unwrapped value from its lazy wrapper. + * + * @private + * @name value + * @memberOf LazyWrapper + * @returns {*} Returns the unwrapped value. + */ + function lazyValue() { + var array = this.__wrapped__.value(), + dir = this.__dir__, + isArr = isArray(array), + isRight = dir < 0, + arrLength = isArr ? array.length : 0, + view = getView(0, arrLength, this.__views__), + start = view.start, + end = view.end, + length = end - start, + index = isRight ? end : (start - 1), + iteratees = this.__iteratees__, + iterLength = iteratees.length, + resIndex = 0, + takeCount = nativeMin(length, this.__takeCount__); - if (!isKnownValue) { - console.info("This purpose is not listed among the known values: ".concat(attributes.purpose, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); - } - } else { - throw new Error("The purpose for the label ".concat(this.label, " should be ").concat(this.purpose, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); - } + if (!isArr || (!isRight && arrLength == length && takeCount == length)) { + return baseWrapperValue(array, this.__actions__); } + var result = []; - if (this.sourceCategory !== attributes.sourceCategory) { - if (!this.sourceCategory) { - var _isKnownValue = qualificationModel.sourceCategoryKnownValues.includes(attributes.sourceCategory); + outer: + while (length-- && resIndex < takeCount) { + index += dir; - if (!_isKnownValue) { - console.info("This sourceCategory is not listed among the known values: ".concat(attributes.sourceCategory, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); - } - } else { - throw new Error("The sourceCategory for the label ".concat(this.label, " should be ").concat(this.sourceCategory, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); - } - } + var iterIndex = -1, + value = array[index]; - if (this.sourceSubCategory !== attributes.sourceSubCategory) { - if (!this.sourceSubCategory) { - var _isKnownValue2 = qualificationModel.sourceSubCategoryKnownValues.includes(attributes.sourceSubCategory); + while (++iterIndex < iterLength) { + var data = iteratees[iterIndex], + iteratee = data.iteratee, + type = data.type, + computed = iteratee(value); - if (!_isKnownValue2) { - console.info("This sourceSubCategory is not listed among the known values: ".concat(attributes.sourceSubCategory, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + if (type == LAZY_MAP_FLAG) { + value = computed; + } else if (!computed) { + if (type == LAZY_FILTER_FLAG) { + continue outer; + } else { + break outer; + } } - } else { - throw new Error("The sourceSubCategory for the label ".concat(this.label, " should be ").concat(this.sourceSubCategory, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); } + result[resIndex++] = value; } + return result; + } - var missingSubjects = (0, _lodash.difference)(this.subjects, attributes.subjects); + // Ensure `LazyWrapper` is an instance of `baseLodash`. + LazyWrapper.prototype = baseCreate(baseLodash.prototype); + LazyWrapper.prototype.constructor = LazyWrapper; - if (missingSubjects.length > 0) { - throw new Error("The subjects for the label ".concat(this.label, " should include ").concat(this.subjects, ". ") + "Please use this or open an issue on https://github.com/cozy/cozy-client/issues"); - } + /*------------------------------------------------------------------------*/ - var extraSubjects = (0, _lodash.difference)(attributes.subjects, this.subjects); + /** + * Creates a hash object. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Hash(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; - if (extraSubjects.length > 0) { - var unknownSubjects = (0, _lodash.difference)(extraSubjects, qualificationModel.subjectsKnownValues); - if (unknownSubjects.length > 0) console.info("These subjects are not listed among the known values: ".concat(unknownSubjects, ". ") + "Please open an issue on https://github.com/cozy/cozy-client/issues"); + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); } } + /** - * Set purpose to the qualification. + * Removes all key-value entries from the hash. * - * @param {Array} purpose - The purpose to set. - * @returns {Qualification} The Qualification object. + * @private + * @name clear + * @memberOf Hash */ - - }, { - key: "setPurpose", - value: function setPurpose(purpose) { - return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { - purpose: purpose - })); + function hashClear() { + this.__data__ = nativeCreate ? nativeCreate(null) : {}; + this.size = 0; } + /** - * Set sourceCategory to the qualification. + * Removes `key` and its value from the hash. * - * @param {Array} sourceCategory - The sourceCategory to set. - * @returns {Qualification} The Qualification object. + * @private + * @name delete + * @memberOf Hash + * @param {Object} hash The hash to modify. + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. */ - - }, { - key: "setSourceCategory", - value: function setSourceCategory(sourceCategory) { - return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { - sourceCategory: sourceCategory - })); + function hashDelete(key) { + var result = this.has(key) && delete this.__data__[key]; + this.size -= result ? 1 : 0; + return result; } + /** - * Set sourceSubCategory to the qualification. + * Gets the hash value for `key`. * - * @param {Array} sourceSubCategory - The sourceSubCategory to set. - * @returns {Qualification} The Qualification object. + * @private + * @name get + * @memberOf Hash + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. */ - - }, { - key: "setSourceSubCategory", - value: function setSourceSubCategory(sourceSubCategory) { - return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { - sourceSubCategory: sourceSubCategory - })); + function hashGet(key) { + var data = this.__data__; + if (nativeCreate) { + var result = data[key]; + return result === HASH_UNDEFINED ? undefined : result; + } + return hasOwnProperty.call(data, key) ? data[key] : undefined; } + /** - * Set subjects to the qualification. + * Checks if a hash value for `key` exists. * - * @param {Array} subjects - The subjects to set. - * @returns {Qualification} The Qualification object. + * @private + * @name has + * @memberOf Hash + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. */ + function hashHas(key) { + var data = this.__data__; + return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + } - }, { - key: "setSubjects", - value: function setSubjects(subjects) { - return new Qualification(this.label, _objectSpread(_objectSpread({}, this.toQualification()), {}, { - subjects: subjects - })); + /** + * Sets the hash `key` to `value`. + * + * @private + * @name set + * @memberOf Hash + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the hash instance. + */ + function hashSet(key, value) { + var data = this.__data__; + this.size += this.has(key) ? 0 : 1; + data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; + return this; } + + // Add methods to `Hash`. + Hash.prototype.clear = hashClear; + Hash.prototype['delete'] = hashDelete; + Hash.prototype.get = hashGet; + Hash.prototype.has = hashHas; + Hash.prototype.set = hashSet; + + /*------------------------------------------------------------------------*/ + /** - * Returns the qualification attributes + * Creates an list cache object. * - * @returns {object} The qualification attributes + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. */ + function ListCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; - }, { - key: "toQualification", - value: function toQualification() { - return { - label: this.label, - purpose: this.purpose, - sourceCategory: this.sourceCategory, - sourceSubCategory: this.sourceSubCategory, - subjects: this.subjects - }; + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } } - }]); - return Qualification; -}(); -/** - * Returns the qualification associated to a label. - * - * @param {string} label - The label to qualify - * @returns {Qualification} - The qualification - */ + /** + * Removes all key-value entries from the list cache. + * + * @private + * @name clear + * @memberOf ListCache + */ + function listCacheClear() { + this.__data__ = []; + this.size = 0; + } -exports.Qualification = Qualification; + /** + * Removes `key` and its value from the list cache. + * + * @private + * @name delete + * @memberOf ListCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function listCacheDelete(key) { + var data = this.__data__, + index = assocIndexOf(data, key); -Qualification.getByLabel = function (label) { - return new Qualification(label); -}; -/** - * Set the qualification to the document metadata - * - * @param {object} document - The document to set the qualification - * @param {Qualification} qualification - The qualification to set - * @returns {object} - The qualified document - */ + if (index < 0) { + return false; + } + var lastIndex = data.length - 1; + if (index == lastIndex) { + data.pop(); + } else { + splice.call(data, index, 1); + } + --this.size; + return true; + } + /** + * Gets the list cache value for `key`. + * + * @private + * @name get + * @memberOf ListCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function listCacheGet(key) { + var data = this.__data__, + index = assocIndexOf(data, key); -var setQualification = function setQualification(document, qualification) { - if (qualification.label) { - new Qualification(qualification.label).checkAttributes(qualification); - } else { - throw new Error('You must set a label to qualify'); - } + return index < 0 ? undefined : data[index][1]; + } - return (0, _lodash.set)(document, 'metadata.qualification', qualification); -}; -/** - * Helper to get the qualification from a document - * - * @param {object} document - The document - * @returns {Qualification} - The document qualification - * - */ + /** + * Checks if a list cache value for `key` exists. + * + * @private + * @name has + * @memberOf ListCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function listCacheHas(key) { + return assocIndexOf(this.__data__, key) > -1; + } + /** + * Sets the list cache `key` to `value`. + * + * @private + * @name set + * @memberOf ListCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the list cache instance. + */ + function listCacheSet(key, value) { + var data = this.__data__, + index = assocIndexOf(data, key); -exports.setQualification = setQualification; + if (index < 0) { + ++this.size; + data.push([key, value]); + } else { + data[index][1] = value; + } + return this; + } -var getQualification = function getQualification(document) { - var docQualification = (0, _lodash.get)(document, 'metadata.qualification'); - var qualification = new Qualification(docQualification.label, docQualification.qualification); - return qualification.toQualification(); -}; + // Add methods to `ListCache`. + ListCache.prototype.clear = listCacheClear; + ListCache.prototype['delete'] = listCacheDelete; + ListCache.prototype.get = listCacheGet; + ListCache.prototype.has = listCacheHas; + ListCache.prototype.set = listCacheSet; -exports.getQualification = getQualification; + /*------------------------------------------------------------------------*/ -/***/ }), -/* 825 */ -/***/ (function(module, exports, __webpack_require__) { + /** + * Creates a map cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function MapCache(entries) { + var index = -1, + length = entries == null ? 0 : entries.length; -/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** - * @license - * Lodash <https://lodash.com/> - * Copyright OpenJS Foundation and other contributors <https://openjsf.org/> - * Released under MIT license <https://lodash.com/license> - * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE> - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */ -;(function() { + this.clear(); + while (++index < length) { + var entry = entries[index]; + this.set(entry[0], entry[1]); + } + } - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; + /** + * Removes all key-value entries from the map. + * + * @private + * @name clear + * @memberOf MapCache + */ + function mapCacheClear() { + this.size = 0; + this.__data__ = { + 'hash': new Hash, + 'map': new (Map || ListCache), + 'string': new Hash + }; + } - /** Used as the semantic version number. */ - var VERSION = '4.17.21'; + /** + * Removes `key` and its value from the map. + * + * @private + * @name delete + * @memberOf MapCache + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function mapCacheDelete(key) { + var result = getMapData(this, key)['delete'](key); + this.size -= result ? 1 : 0; + return result; + } - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; + /** + * Gets the map value for `key`. + * + * @private + * @name get + * @memberOf MapCache + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function mapCacheGet(key) { + return getMapData(this, key).get(key); + } - /** Error message constants. */ - var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', - FUNC_ERROR_TEXT = 'Expected a function', - INVALID_TEMPL_VAR_ERROR_TEXT = 'Invalid `variable` option passed into `_.template`'; + /** + * Checks if a map value for `key` exists. + * + * @private + * @name has + * @memberOf MapCache + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function mapCacheHas(key) { + return getMapData(this, key).has(key); + } - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; + /** + * Sets the map `key` to `value`. + * + * @private + * @name set + * @memberOf MapCache + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the map cache instance. + */ + function mapCacheSet(key, value) { + var data = getMapData(this, key), + size = data.size; - /** Used as the maximum memoize cache size. */ - var MAX_MEMOIZE_SIZE = 500; + data.set(key, value); + this.size += data.size == size ? 0 : 1; + return this; + } - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; + // Add methods to `MapCache`. + MapCache.prototype.clear = mapCacheClear; + MapCache.prototype['delete'] = mapCacheDelete; + MapCache.prototype.get = mapCacheGet; + MapCache.prototype.has = mapCacheHas; + MapCache.prototype.set = mapCacheSet; - /** Used to compose bitmasks for cloning. */ - var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; + /*------------------------------------------------------------------------*/ - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; + /** + * + * Creates an array cache object to store unique values. + * + * @private + * @constructor + * @param {Array} [values] The values to cache. + */ + function SetCache(values) { + var index = -1, + length = values == null ? 0 : values.length; - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; + this.__data__ = new MapCache; + while (++index < length) { + this.add(values[index]); + } + } - /** Used as default options for `_.truncate`. */ - var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; + /** + * Adds `value` to the array cache. + * + * @private + * @name add + * @memberOf SetCache + * @alias push + * @param {*} value The value to cache. + * @returns {Object} Returns the cache instance. + */ + function setCacheAdd(value) { + this.__data__.set(value, HASH_UNDEFINED); + return this; + } - /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 800, - HOT_SPAN = 16; + /** + * Checks if `value` is in the array cache. + * + * @private + * @name has + * @memberOf SetCache + * @param {*} value The value to search for. + * @returns {number} Returns `true` if `value` is found, else `false`. + */ + function setCacheHas(value) { + return this.__data__.has(value); + } - /** Used to indicate the type of lazy iteratees. */ - var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2, - LAZY_WHILE_FLAG = 3; + // Add methods to `SetCache`. + SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; + SetCache.prototype.has = setCacheHas; - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; + /*------------------------------------------------------------------------*/ - /** Used as references for the maximum length and index of an array. */ - var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; + /** + * Creates a stack cache object to store key-value pairs. + * + * @private + * @constructor + * @param {Array} [entries] The key-value pairs to cache. + */ + function Stack(entries) { + var data = this.__data__ = new ListCache(entries); + this.size = data.size; + } - /** Used to associate wrap methods with their bit flags. */ - var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] - ]; + /** + * Removes all key-value entries from the stack. + * + * @private + * @name clear + * @memberOf Stack + */ + function stackClear() { + this.__data__ = new ListCache; + this.size = 0; + } - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - domExcTag = '[object DOMException]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]', - weakSetTag = '[object WeakSet]'; + /** + * Removes `key` and its value from the stack. + * + * @private + * @name delete + * @memberOf Stack + * @param {string} key The key of the value to remove. + * @returns {boolean} Returns `true` if the entry was removed, else `false`. + */ + function stackDelete(key) { + var data = this.__data__, + result = data['delete'](key); - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; + this.size = data.size; + return result; + } - /** Used to match empty string literals in compiled template source. */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; + /** + * Gets the stack value for `key`. + * + * @private + * @name get + * @memberOf Stack + * @param {string} key The key of the value to get. + * @returns {*} Returns the entry value. + */ + function stackGet(key) { + return this.__data__.get(key); + } - /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, - reUnescapedHtml = /[&<>"']/g, - reHasEscapedHtml = RegExp(reEscapedHtml.source), - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); + /** + * Checks if a stack value for `key` exists. + * + * @private + * @name has + * @memberOf Stack + * @param {string} key The key of the entry to check. + * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + */ + function stackHas(key) { + return this.__data__.has(key); + } - /** Used to match template delimiters. */ - var reEscape = /<%-([\s\S]+?)%>/g, - reEvaluate = /<%([\s\S]+?)%>/g, - reInterpolate = /<%=([\s\S]+?)%>/g; + /** + * Sets the stack `key` to `value`. + * + * @private + * @name set + * @memberOf Stack + * @param {string} key The key of the value to set. + * @param {*} value The value to set. + * @returns {Object} Returns the stack cache instance. + */ + function stackSet(key, value) { + var data = this.__data__; + if (data instanceof ListCache) { + var pairs = data.__data__; + if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { + pairs.push([key, value]); + this.size = ++data.size; + return this; + } + data = this.__data__ = new MapCache(pairs); + } + data.set(key, value); + this.size = data.size; + return this; + } - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; + // Add methods to `Stack`. + Stack.prototype.clear = stackClear; + Stack.prototype['delete'] = stackDelete; + Stack.prototype.get = stackGet; + Stack.prototype.has = stackHas; + Stack.prototype.set = stackSet; - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); + /*------------------------------------------------------------------------*/ - /** Used to match leading whitespace. */ - var reTrimStart = /^\s+/; + /** + * Creates an array of the enumerable property names of the array-like `value`. + * + * @private + * @param {*} value The value to query. + * @param {boolean} inherited Specify returning inherited property names. + * @returns {Array} Returns the array of property names. + */ + function arrayLikeKeys(value, inherited) { + var isArr = isArray(value), + isArg = !isArr && isArguments(value), + isBuff = !isArr && !isArg && isBuffer(value), + isType = !isArr && !isArg && !isBuff && isTypedArray(value), + skipIndexes = isArr || isArg || isBuff || isType, + result = skipIndexes ? baseTimes(value.length, String) : [], + length = result.length; - /** Used to match a single whitespace character. */ - var reWhitespace = /\s/; + for (var key in value) { + if ((inherited || hasOwnProperty.call(value, key)) && + !(skipIndexes && ( + // Safari 9 has enumerable `arguments.length` in strict mode. + key == 'length' || + // Node.js 0.10 has enumerable non-index properties on buffers. + (isBuff && (key == 'offset' || key == 'parent')) || + // PhantomJS 2 has enumerable non-index properties on typed arrays. + (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || + // Skip index properties. + isIndex(key, length) + ))) { + result.push(key); + } + } + return result; + } - /** Used to match wrap detail comments. */ - var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, - reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; + /** + * A specialized version of `_.sample` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @returns {*} Returns the random element. + */ + function arraySample(array) { + var length = array.length; + return length ? array[baseRandom(0, length - 1)] : undefined; + } - /** Used to match words composed of alphanumeric characters. */ - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; + /** + * A specialized version of `_.sampleSize` for arrays. + * + * @private + * @param {Array} array The array to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function arraySampleSize(array, n) { + return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + } - /** - * Used to validate the `validate` option in `_.template` variable. - * - * Forbids characters which could potentially change the meaning of the function argument definition: - * - "()," (modification of function parameters) - * - "=" (default value) - * - "[]{}" (destructuring of function parameters) - * - "/" (beginning of a comment) - * - whitespace - */ - var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/; + /** + * A specialized version of `_.shuffle` for arrays. + * + * @private + * @param {Array} array The array to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function arrayShuffle(array) { + return shuffleSelf(copyArray(array)); + } - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; + /** + * This function is like `assignValue` except that it doesn't assign + * `undefined` values. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignMergeValue(object, key, value) { + if ((value !== undefined && !eq(object[key], value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } - /** - * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). - */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + /** + * Assigns `value` to `key` of `object` if the existing value is not equivalent + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function assignValue(object, key, value) { + var objValue = object[key]; + if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || + (value === undefined && !(key in object))) { + baseAssignValue(object, key, value); + } + } - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; + /** + * Gets the index at which the `key` is found in `array` of key-value pairs. + * + * @private + * @param {Array} array The array to inspect. + * @param {*} key The key to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + */ + function assocIndexOf(array, key) { + var length = array.length; + while (length--) { + if (eq(array[length][0], key)) { + return length; + } + } + return -1; + } - /** Used to detect bad signed hexadecimal string values. */ - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + /** + * Aggregates elements of `collection` on `accumulator` with keys transformed + * by `iteratee` and values set by `setter`. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform keys. + * @param {Object} accumulator The initial aggregated object. + * @returns {Function} Returns `accumulator`. + */ + function baseAggregator(collection, setter, iteratee, accumulator) { + baseEach(collection, function(value, key, collection) { + setter(accumulator, value, iteratee(value), collection); + }); + return accumulator; + } - /** Used to detect binary string values. */ - var reIsBinary = /^0b[01]+$/i; + /** + * The base implementation of `_.assign` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssign(object, source) { + return object && copyObject(source, keys(source), object); + } - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + /** + * The base implementation of `_.assignIn` without support for multiple sources + * or `customizer` functions. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @returns {Object} Returns `object`. + */ + function baseAssignIn(object, source) { + return object && copyObject(source, keysIn(source), object); + } - /** Used to detect octal string values. */ - var reIsOctal = /^0o[0-7]+$/i; + /** + * The base implementation of `assignValue` and `assignMergeValue` without + * value checks. + * + * @private + * @param {Object} object The object to modify. + * @param {string} key The key of the property to assign. + * @param {*} value The value to assign. + */ + function baseAssignValue(object, key, value) { + if (key == '__proto__' && defineProperty) { + defineProperty(object, key, { + 'configurable': true, + 'enumerable': true, + 'value': value, + 'writable': true + }); + } else { + object[key] = value; + } + } - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; + /** + * The base implementation of `_.at` without support for individual paths. + * + * @private + * @param {Object} object The object to iterate over. + * @param {string[]} paths The property paths to pick. + * @returns {Array} Returns the picked elements. + */ + function baseAt(object, paths) { + var index = -1, + length = paths.length, + result = Array(length), + skip = object == null; - /** Used to match Latin Unicode letters (excluding mathematical operators). */ - var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; + while (++index < length) { + result[index] = skip ? undefined : get(object, paths[index]); + } + return result; + } - /** Used to ensure capturing order of template delimiters. */ - var reNoMatch = /($^)/; + /** + * The base implementation of `_.clamp` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. + */ + function baseClamp(number, lower, upper) { + if (number === number) { + if (upper !== undefined) { + number = number <= upper ? number : upper; + } + if (lower !== undefined) { + number = number >= lower ? number : lower; + } + } + return number; + } - /** Used to match unescaped characters in compiled string literals. */ - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + /** + * The base implementation of `_.clone` and `_.cloneDeep` which tracks + * traversed objects. + * + * @private + * @param {*} value The value to clone. + * @param {boolean} bitmask The bitmask flags. + * 1 - Deep clone + * 2 - Flatten inherited properties + * 4 - Clone symbols + * @param {Function} [customizer] The function to customize cloning. + * @param {string} [key] The key of `value`. + * @param {Object} [object] The parent object of `value`. + * @param {Object} [stack] Tracks traversed objects and their clone counterparts. + * @returns {*} Returns the cloned value. + */ + function baseClone(value, bitmask, customizer, key, object, stack) { + var result, + isDeep = bitmask & CLONE_DEEP_FLAG, + isFlat = bitmask & CLONE_FLAT_FLAG, + isFull = bitmask & CLONE_SYMBOLS_FLAG; - /** Used to compose unicode character classes. */ - var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; + if (customizer) { + result = object ? customizer(value, key, object, stack) : customizer(value); + } + if (result !== undefined) { + return result; + } + if (!isObject(value)) { + return value; + } + var isArr = isArray(value); + if (isArr) { + result = initCloneArray(value); + if (!isDeep) { + return copyArray(value, result); + } + } else { + var tag = getTag(value), + isFunc = tag == funcTag || tag == genTag; - /** Used to compose unicode capture groups. */ - var rsApos = "['\u2019]", - rsAstral = '[' + rsAstralRange + ']', - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; + if (isBuffer(value)) { + return cloneBuffer(value, isDeep); + } + if (tag == objectTag || tag == argsTag || (isFunc && !object)) { + result = (isFlat || isFunc) ? {} : initCloneObject(value); + if (!isDeep) { + return isFlat + ? copySymbolsIn(value, baseAssignIn(result, value)) + : copySymbols(value, baseAssign(result, value)); + } + } else { + if (!cloneableTags[tag]) { + return object ? value : {}; + } + result = initCloneByTag(value, tag, isDeep); + } + } + // Check for circular references and return its corresponding clone. + stack || (stack = new Stack); + var stacked = stack.get(value); + if (stacked) { + return stacked; + } + stack.set(value, result); - /** Used to compose unicode regexes. */ - var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])', - rsOrdUpper = '\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; + if (isSet(value)) { + value.forEach(function(subValue) { + result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); + }); + } else if (isMap(value)) { + value.forEach(function(subValue, key) { + result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + } - /** Used to match apostrophes. */ - var reApos = RegExp(rsApos, 'g'); + var keysFunc = isFull + ? (isFlat ? getAllKeysIn : getAllKeys) + : (isFlat ? keysIn : keys); - /** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ - var reComboMark = RegExp(rsCombo, 'g'); + var props = isArr ? undefined : keysFunc(value); + arrayEach(props || value, function(subValue, key) { + if (props) { + key = subValue; + subValue = value[key]; + } + // Recursively populate clone (susceptible to call stack limits). + assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + }); + return result; + } - /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + /** + * The base implementation of `_.conforms` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. + */ + function baseConforms(source) { + var props = keys(source); + return function(object) { + return baseConformsTo(object, source, props); + }; + } - /** Used to match complex or compound words. */ - var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji - ].join('|'), 'g'); + /** + * The base implementation of `_.conformsTo` which accepts `props` to check. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. + */ + function baseConformsTo(object, source, props) { + var length = props.length; + if (object == null) { + return !length; + } + object = Object(object); + while (length--) { + var key = props[length], + predicate = source[key], + value = object[key]; - /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); + if ((value === undefined && !(key in object)) || !predicate(value)) { + return false; + } + } + return true; + } - /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; + /** + * The base implementation of `_.delay` and `_.defer` which accepts `args` + * to provide to `func`. + * + * @private + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {Array} args The arguments to provide to `func`. + * @returns {number|Object} Returns the timer id or timeout object. + */ + function baseDelay(func, wait, args) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return setTimeout(function() { func.apply(undefined, args); }, wait); + } - /** Used to assign default `context` object properties. */ - var contextProps = [ - 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', - 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', - 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', - 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', - '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' - ]; + /** + * The base implementation of methods like `_.difference` without support + * for excluding multiple arrays or iteratee shorthands. + * + * @private + * @param {Array} array The array to inspect. + * @param {Array} values The values to exclude. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + */ + function baseDifference(array, values, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + isCommon = true, + length = array.length, + result = [], + valuesLength = values.length; - /** Used to make template sourceURLs easier to identify. */ - var templateCounter = -1; + if (!length) { + return result; + } + if (iteratee) { + values = arrayMap(values, baseUnary(iteratee)); + } + if (comparator) { + includes = arrayIncludesWith; + isCommon = false; + } + else if (values.length >= LARGE_ARRAY_SIZE) { + includes = cacheHas; + isCommon = false; + values = new SetCache(values); + } + outer: + while (++index < length) { + var value = array[index], + computed = iteratee == null ? value : iteratee(value); - /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = - typedArrayTags[errorTag] = typedArrayTags[funcTag] = - typedArrayTags[mapTag] = typedArrayTags[numberTag] = - typedArrayTags[objectTag] = typedArrayTags[regexpTag] = - typedArrayTags[setTag] = typedArrayTags[stringTag] = - typedArrayTags[weakMapTag] = false; + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var valuesIndex = valuesLength; + while (valuesIndex--) { + if (values[valuesIndex] === computed) { + continue outer; + } + } + result.push(value); + } + else if (!includes(values, computed, comparator)) { + result.push(value); + } + } + return result; + } - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = - cloneableTags[boolTag] = cloneableTags[dateTag] = - cloneableTags[float32Tag] = cloneableTags[float64Tag] = - cloneableTags[int8Tag] = cloneableTags[int16Tag] = - cloneableTags[int32Tag] = cloneableTags[mapTag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[setTag] = - cloneableTags[stringTag] = cloneableTags[symbolTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[weakMapTag] = false; + /** + * The base implementation of `_.forEach` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEach = createBaseEach(baseForOwn); - /** Used to map Latin Unicode letters to basic Latin letters. */ - var deburredLetters = { - // Latin-1 Supplement block. - '\xc0': 'A', '\xc1': 'A', '\xc2': 'A', '\xc3': 'A', '\xc4': 'A', '\xc5': 'A', - '\xe0': 'a', '\xe1': 'a', '\xe2': 'a', '\xe3': 'a', '\xe4': 'a', '\xe5': 'a', - '\xc7': 'C', '\xe7': 'c', - '\xd0': 'D', '\xf0': 'd', - '\xc8': 'E', '\xc9': 'E', '\xca': 'E', '\xcb': 'E', - '\xe8': 'e', '\xe9': 'e', '\xea': 'e', '\xeb': 'e', - '\xcc': 'I', '\xcd': 'I', '\xce': 'I', '\xcf': 'I', - '\xec': 'i', '\xed': 'i', '\xee': 'i', '\xef': 'i', - '\xd1': 'N', '\xf1': 'n', - '\xd2': 'O', '\xd3': 'O', '\xd4': 'O', '\xd5': 'O', '\xd6': 'O', '\xd8': 'O', - '\xf2': 'o', '\xf3': 'o', '\xf4': 'o', '\xf5': 'o', '\xf6': 'o', '\xf8': 'o', - '\xd9': 'U', '\xda': 'U', '\xdb': 'U', '\xdc': 'U', - '\xf9': 'u', '\xfa': 'u', '\xfb': 'u', '\xfc': 'u', - '\xdd': 'Y', '\xfd': 'y', '\xff': 'y', - '\xc6': 'Ae', '\xe6': 'ae', - '\xde': 'Th', '\xfe': 'th', - '\xdf': 'ss', - // Latin Extended-A block. - '\u0100': 'A', '\u0102': 'A', '\u0104': 'A', - '\u0101': 'a', '\u0103': 'a', '\u0105': 'a', - '\u0106': 'C', '\u0108': 'C', '\u010a': 'C', '\u010c': 'C', - '\u0107': 'c', '\u0109': 'c', '\u010b': 'c', '\u010d': 'c', - '\u010e': 'D', '\u0110': 'D', '\u010f': 'd', '\u0111': 'd', - '\u0112': 'E', '\u0114': 'E', '\u0116': 'E', '\u0118': 'E', '\u011a': 'E', - '\u0113': 'e', '\u0115': 'e', '\u0117': 'e', '\u0119': 'e', '\u011b': 'e', - '\u011c': 'G', '\u011e': 'G', '\u0120': 'G', '\u0122': 'G', - '\u011d': 'g', '\u011f': 'g', '\u0121': 'g', '\u0123': 'g', - '\u0124': 'H', '\u0126': 'H', '\u0125': 'h', '\u0127': 'h', - '\u0128': 'I', '\u012a': 'I', '\u012c': 'I', '\u012e': 'I', '\u0130': 'I', - '\u0129': 'i', '\u012b': 'i', '\u012d': 'i', '\u012f': 'i', '\u0131': 'i', - '\u0134': 'J', '\u0135': 'j', - '\u0136': 'K', '\u0137': 'k', '\u0138': 'k', - '\u0139': 'L', '\u013b': 'L', '\u013d': 'L', '\u013f': 'L', '\u0141': 'L', - '\u013a': 'l', '\u013c': 'l', '\u013e': 'l', '\u0140': 'l', '\u0142': 'l', - '\u0143': 'N', '\u0145': 'N', '\u0147': 'N', '\u014a': 'N', - '\u0144': 'n', '\u0146': 'n', '\u0148': 'n', '\u014b': 'n', - '\u014c': 'O', '\u014e': 'O', '\u0150': 'O', - '\u014d': 'o', '\u014f': 'o', '\u0151': 'o', - '\u0154': 'R', '\u0156': 'R', '\u0158': 'R', - '\u0155': 'r', '\u0157': 'r', '\u0159': 'r', - '\u015a': 'S', '\u015c': 'S', '\u015e': 'S', '\u0160': 'S', - '\u015b': 's', '\u015d': 's', '\u015f': 's', '\u0161': 's', - '\u0162': 'T', '\u0164': 'T', '\u0166': 'T', - '\u0163': 't', '\u0165': 't', '\u0167': 't', - '\u0168': 'U', '\u016a': 'U', '\u016c': 'U', '\u016e': 'U', '\u0170': 'U', '\u0172': 'U', - '\u0169': 'u', '\u016b': 'u', '\u016d': 'u', '\u016f': 'u', '\u0171': 'u', '\u0173': 'u', - '\u0174': 'W', '\u0175': 'w', - '\u0176': 'Y', '\u0177': 'y', '\u0178': 'Y', - '\u0179': 'Z', '\u017b': 'Z', '\u017d': 'Z', - '\u017a': 'z', '\u017c': 'z', '\u017e': 'z', - '\u0132': 'IJ', '\u0133': 'ij', - '\u0152': 'Oe', '\u0153': 'oe', - '\u0149': "'n", '\u017f': 's' - }; + /** + * The base implementation of `_.forEachRight` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + */ + var baseEachRight = createBaseEach(baseForOwnRight, true); - /** Used to map characters to HTML entities. */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; + /** + * The base implementation of `_.every` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false` + */ + function baseEvery(collection, predicate) { + var result = true; + baseEach(collection, function(value, index, collection) { + result = !!predicate(value, index, collection); + return result; + }); + return result; + } - /** Used to map HTML entities to characters. */ - var htmlUnescapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - ''': "'" - }; - - /** Used to escape characters for inclusion in compiled string literals. */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - /** Built-in method references without a dependency on `root`. */ - var freeParseFloat = parseFloat, - freeParseInt = parseInt; - - /** Detect free variable `global` from Node.js. */ - var freeGlobal = typeof global == 'object' && global && global.Object === Object && global; + /** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ + function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; - /** Detect free variable `self`. */ - var freeSelf = typeof self == 'object' && self && self.Object === Object && self; + while (++index < length) { + var value = array[index], + current = iteratee(value); - /** Used as a reference to the global object. */ - var root = freeGlobal || freeSelf || Function('return this')(); + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; + } - /** Detect free variable `exports`. */ - var freeExports = true && exports && !exports.nodeType && exports; + /** + * The base implementation of `_.fill` without an iteratee call guard. + * + * @private + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns `array`. + */ + function baseFill(array, value, start, end) { + var length = array.length; - /** Detect free variable `module`. */ - var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module; + start = toInteger(start); + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = (end === undefined || end > length) ? length : toInteger(end); + if (end < 0) { + end += length; + } + end = start > end ? 0 : toLength(end); + while (start < end) { + array[start++] = value; + } + return array; + } - /** Detect the popular CommonJS extension `module.exports`. */ - var moduleExports = freeModule && freeModule.exports === freeExports; + /** + * The base implementation of `_.filter` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + */ + function baseFilter(collection, predicate) { + var result = []; + baseEach(collection, function(value, index, collection) { + if (predicate(value, index, collection)) { + result.push(value); + } + }); + return result; + } - /** Detect free variable `process` from Node.js. */ - var freeProcess = moduleExports && freeGlobal.process; + /** + * The base implementation of `_.flatten` with support for restricting flattening. + * + * @private + * @param {Array} array The array to flatten. + * @param {number} depth The maximum recursion depth. + * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. + * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. + * @param {Array} [result=[]] The initial result value. + * @returns {Array} Returns the new flattened array. + */ + function baseFlatten(array, depth, predicate, isStrict, result) { + var index = -1, + length = array.length; - /** Used to access faster Node.js helpers. */ - var nodeUtil = (function() { - try { - // Use `util.types` for Node.js 10+. - var types = freeModule && freeModule.require && freeModule.require('util').types; + predicate || (predicate = isFlattenable); + result || (result = []); - if (types) { - return types; + while (++index < length) { + var value = array[index]; + if (depth > 0 && predicate(value)) { + if (depth > 1) { + // Recursively flatten arrays (susceptible to call stack limits). + baseFlatten(value, depth - 1, predicate, isStrict, result); + } else { + arrayPush(result, value); + } + } else if (!isStrict) { + result[result.length] = value; + } } + return result; + } - // Legacy `process.binding('util')` for Node.js < 10. - return freeProcess && freeProcess.binding && freeProcess.binding('util'); - } catch (e) {} - }()); - - /* Node.js helper references. */ - var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, - nodeIsDate = nodeUtil && nodeUtil.isDate, - nodeIsMap = nodeUtil && nodeUtil.isMap, - nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, - nodeIsSet = nodeUtil && nodeUtil.isSet, - nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; + /** + * The base implementation of `baseForOwn` which iterates over `object` + * properties returned by `keysFunc` and invokes `iteratee` for each property. + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseFor = createBaseFor(); - /*--------------------------------------------------------------------------*/ + /** + * This function is like `baseFor` except that it iterates over properties + * in the opposite order. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @param {Function} keysFunc The function to get the keys of `object`. + * @returns {Object} Returns `object`. + */ + var baseForRight = createBaseFor(true); - /** - * A faster alternative to `Function#apply`, this function invokes `func` - * with the `this` binding of `thisArg` and the arguments of `args`. - * - * @private - * @param {Function} func The function to invoke. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} args The arguments to invoke `func` with. - * @returns {*} Returns the result of `func`. - */ - function apply(func, thisArg, args) { - switch (args.length) { - case 0: return func.call(thisArg); - case 1: return func.call(thisArg, args[0]); - case 2: return func.call(thisArg, args[0], args[1]); - case 3: return func.call(thisArg, args[0], args[1], args[2]); + /** + * The base implementation of `_.forOwn` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwn(object, iteratee) { + return object && baseFor(object, iteratee, keys); } - return func.apply(thisArg, args); - } - /** - * A specialized version of `baseAggregator` for arrays. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. - */ - function arrayAggregator(array, setter, iteratee, accumulator) { - var index = -1, - length = array == null ? 0 : array.length; + /** + * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Object} Returns `object`. + */ + function baseForOwnRight(object, iteratee) { + return object && baseForRight(object, iteratee, keys); + } - while (++index < length) { - var value = array[index]; - setter(accumulator, value, iteratee(value), array); + /** + * The base implementation of `_.functions` which creates an array of + * `object` function property names filtered from `props`. + * + * @private + * @param {Object} object The object to inspect. + * @param {Array} props The property names to filter. + * @returns {Array} Returns the function names. + */ + function baseFunctions(object, props) { + return arrayFilter(props, function(key) { + return isFunction(object[key]); + }); } - return accumulator; - } - /** - * A specialized version of `_.forEach` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEach(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length; + /** + * The base implementation of `_.get` without support for default values. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @returns {*} Returns the resolved value. + */ + function baseGet(object, path) { + path = castPath(path, object); - while (++index < length) { - if (iteratee(array[index], index, array) === false) { - break; + var index = 0, + length = path.length; + + while (object != null && index < length) { + object = object[toKey(path[index++])]; } + return (index && index == length) ? object : undefined; } - return array; - } - /** - * A specialized version of `_.forEachRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns `array`. - */ - function arrayEachRight(array, iteratee) { - var length = array == null ? 0 : array.length; + /** + * The base implementation of `getAllKeys` and `getAllKeysIn` which uses + * `keysFunc` and `symbolsFunc` to get the enumerable property names and + * symbols of `object`. + * + * @private + * @param {Object} object The object to query. + * @param {Function} keysFunc The function to get the keys of `object`. + * @param {Function} symbolsFunc The function to get the symbols of `object`. + * @returns {Array} Returns the array of property names and symbols. + */ + function baseGetAllKeys(object, keysFunc, symbolsFunc) { + var result = keysFunc(object); + return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); + } - while (length--) { - if (iteratee(array[length], length, array) === false) { - break; + /** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ + function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; } + return (symToStringTag && symToStringTag in Object(value)) + ? getRawTag(value) + : objectToString(value); } - return array; - } - - /** - * A specialized version of `_.every` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. - */ - function arrayEvery(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; - while (++index < length) { - if (!predicate(array[index], index, array)) { - return false; - } + /** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ + function baseGt(value, other) { + return value > other; } - return true; - } - /** - * A specialized version of `_.filter` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - */ - function arrayFilter(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; + /** + * The base implementation of `_.has` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHas(object, key) { + return object != null && hasOwnProperty.call(object, key); + } - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result[resIndex++] = value; - } + /** + * The base implementation of `_.hasIn` without support for deep paths. + * + * @private + * @param {Object} [object] The object to query. + * @param {Array|string} key The key to check. + * @returns {boolean} Returns `true` if `key` exists, else `false`. + */ + function baseHasIn(object, key) { + return object != null && key in Object(object); } - return result; - } - /** - * A specialized version of `_.includes` for arrays without support for - * specifying an index to search from. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludes(array, value) { - var length = array == null ? 0 : array.length; - return !!length && baseIndexOf(array, value, 0) > -1; - } + /** + * The base implementation of `_.inRange` which doesn't coerce arguments. + * + * @private + * @param {number} number The number to check. + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + */ + function baseInRange(number, start, end) { + return number >= nativeMin(start, end) && number < nativeMax(start, end); + } - /** - * This function is like `arrayIncludes` except that it accepts a comparator. - * - * @private - * @param {Array} [array] The array to inspect. - * @param {*} target The value to search for. - * @param {Function} comparator The comparator invoked per element. - * @returns {boolean} Returns `true` if `target` is found, else `false`. - */ - function arrayIncludesWith(array, value, comparator) { - var index = -1, - length = array == null ? 0 : array.length; + /** + * The base implementation of methods like `_.intersection`, without support + * for iteratee shorthands, that accepts an array of arrays to inspect. + * + * @private + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of shared values. + */ + function baseIntersection(arrays, iteratee, comparator) { + var includes = comparator ? arrayIncludesWith : arrayIncludes, + length = arrays[0].length, + othLength = arrays.length, + othIndex = othLength, + caches = Array(othLength), + maxLength = Infinity, + result = []; - while (++index < length) { - if (comparator(value, array[index])) { - return true; + while (othIndex--) { + var array = arrays[othIndex]; + if (othIndex && iteratee) { + array = arrayMap(array, baseUnary(iteratee)); + } + maxLength = nativeMin(array.length, maxLength); + caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) + ? new SetCache(othIndex && array) + : undefined; } - } - return false; - } - - /** - * A specialized version of `_.map` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. - */ - function arrayMap(array, iteratee) { - var index = -1, - length = array == null ? 0 : array.length, - result = Array(length); + array = arrays[0]; - while (++index < length) { - result[index] = iteratee(array[index], index, array); - } - return result; - } + var index = -1, + seen = caches[0]; - /** - * Appends the elements of `values` to `array`. - * - * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to append. - * @returns {Array} Returns `array`. - */ - function arrayPush(array, values) { - var index = -1, - length = values.length, - offset = array.length; + outer: + while (++index < length && result.length < maxLength) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; - while (++index < length) { - array[offset + index] = values[index]; + value = (comparator || value !== 0) ? value : 0; + if (!(seen + ? cacheHas(seen, computed) + : includes(result, computed, comparator) + )) { + othIndex = othLength; + while (--othIndex) { + var cache = caches[othIndex]; + if (!(cache + ? cacheHas(cache, computed) + : includes(arrays[othIndex], computed, comparator)) + ) { + continue outer; + } + } + if (seen) { + seen.push(computed); + } + result.push(value); + } + } + return result; } - return array; - } - - /** - * A specialized version of `_.reduce` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the first element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduce(array, iteratee, accumulator, initAccum) { - var index = -1, - length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[++index]; + /** + * The base implementation of `_.invert` and `_.invertBy` which inverts + * `object` with values transformed by `iteratee` and set by `setter`. + * + * @private + * @param {Object} object The object to iterate over. + * @param {Function} setter The function to set `accumulator` values. + * @param {Function} iteratee The iteratee to transform values. + * @param {Object} accumulator The initial inverted object. + * @returns {Function} Returns `accumulator`. + */ + function baseInverter(object, setter, iteratee, accumulator) { + baseForOwn(object, function(value, key, object) { + setter(accumulator, iteratee(value), key, object); + }); + return accumulator; } - while (++index < length) { - accumulator = iteratee(accumulator, array[index], index, array); + + /** + * The base implementation of `_.invoke` without support for individual + * method arguments. + * + * @private + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {Array} args The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. + */ + function baseInvoke(object, path, args) { + path = castPath(path, object); + object = parent(object, path); + var func = object == null ? object : object[toKey(last(path))]; + return func == null ? undefined : apply(func, object, args); } - return accumulator; - } - /** - * A specialized version of `_.reduceRight` for arrays without support for - * iteratee shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @param {boolean} [initAccum] Specify using the last element of `array` as - * the initial value. - * @returns {*} Returns the accumulated value. - */ - function arrayReduceRight(array, iteratee, accumulator, initAccum) { - var length = array == null ? 0 : array.length; - if (initAccum && length) { - accumulator = array[--length]; + /** + * The base implementation of `_.isArguments`. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + */ + function baseIsArguments(value) { + return isObjectLike(value) && baseGetTag(value) == argsTag; } - while (length--) { - accumulator = iteratee(accumulator, array[length], length, array); + + /** + * The base implementation of `_.isArrayBuffer` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + */ + function baseIsArrayBuffer(value) { + return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; } - return accumulator; - } - /** - * A specialized version of `_.some` for arrays without support for iteratee - * shorthands. - * - * @private - * @param {Array} [array] The array to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ - function arraySome(array, predicate) { - var index = -1, - length = array == null ? 0 : array.length; + /** + * The base implementation of `_.isDate` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + */ + function baseIsDate(value) { + return isObjectLike(value) && baseGetTag(value) == dateTag; + } - while (++index < length) { - if (predicate(array[index], index, array)) { + /** + * The base implementation of `_.isEqual` which supports partial comparisons + * and tracks traversed objects. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {boolean} bitmask The bitmask flags. + * 1 - Unordered comparison + * 2 - Partial comparison + * @param {Function} [customizer] The function to customize comparisons. + * @param {Object} [stack] Tracks traversed `value` and `other` objects. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + */ + function baseIsEqual(value, other, bitmask, customizer, stack) { + if (value === other) { return true; } + if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { + return value !== value && other !== other; + } + return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); } - return false; - } - /** - * Gets the size of an ASCII `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ - var asciiSize = baseProperty('length'); + /** + * A specialized version of `baseIsEqual` for arrays and objects which performs + * deep comparisons and tracks traversed objects enabling objects with circular + * references to be compared. + * + * @private + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + */ + function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { + var objIsArr = isArray(object), + othIsArr = isArray(other), + objTag = objIsArr ? arrayTag : getTag(object), + othTag = othIsArr ? arrayTag : getTag(other); - /** - * Converts an ASCII `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function asciiToArray(string) { - return string.split(''); - } + objTag = objTag == argsTag ? objectTag : objTag; + othTag = othTag == argsTag ? objectTag : othTag; - /** - * Splits an ASCII `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function asciiWords(string) { - return string.match(reAsciiWord) || []; - } + var objIsObj = objTag == objectTag, + othIsObj = othTag == objectTag, + isSameTag = objTag == othTag; - /** - * The base implementation of methods like `_.findKey` and `_.findLastKey`, - * without support for iteratee shorthands, which iterates over `collection` - * using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the found element or its key, else `undefined`. - */ - function baseFindKey(collection, predicate, eachFunc) { - var result; - eachFunc(collection, function(value, key, collection) { - if (predicate(value, key, collection)) { - result = key; - return false; + if (isSameTag && isBuffer(object)) { + if (!isBuffer(other)) { + return false; + } + objIsArr = true; + objIsObj = false; } - }); - return result; - } + if (isSameTag && !objIsObj) { + stack || (stack = new Stack); + return (objIsArr || isTypedArray(object)) + ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) + : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + } + if (!(bitmask & COMPARE_PARTIAL_FLAG)) { + var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), + othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); - /** - * The base implementation of `_.findIndex` and `_.findLastIndex` without - * support for iteratee shorthands. - * - * @private - * @param {Array} array The array to inspect. - * @param {Function} predicate The function invoked per iteration. - * @param {number} fromIndex The index to search from. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseFindIndex(array, predicate, fromIndex, fromRight) { - var length = array.length, - index = fromIndex + (fromRight ? 1 : -1); + if (objIsWrapped || othIsWrapped) { + var objUnwrapped = objIsWrapped ? object.value() : object, + othUnwrapped = othIsWrapped ? other.value() : other; - while ((fromRight ? index-- : ++index < length)) { - if (predicate(array[index], index, array)) { - return index; + stack || (stack = new Stack); + return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + } + } + if (!isSameTag) { + return false; } + stack || (stack = new Stack); + return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } - return -1; - } - - /** - * The base implementation of `_.indexOf` without `fromIndex` bounds checks. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOf(array, value, fromIndex) { - return value === value - ? strictIndexOf(array, value, fromIndex) - : baseFindIndex(array, baseIsNaN, fromIndex); - } - - /** - * This function is like `baseIndexOf` except that it accepts a comparator. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @param {Function} comparator The comparator invoked per element. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function baseIndexOfWith(array, value, fromIndex, comparator) { - var index = fromIndex - 1, - length = array.length; - while (++index < length) { - if (comparator(array[index], value)) { - return index; - } + /** + * The base implementation of `_.isMap` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. + */ + function baseIsMap(value) { + return isObjectLike(value) && getTag(value) == mapTag; } - return -1; - } - /** - * The base implementation of `_.isNaN` without support for number objects. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. - */ - function baseIsNaN(value) { - return value !== value; - } + /** + * The base implementation of `_.isMatch` without support for iteratee shorthands. + * + * @private + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Array} matchData The property names, values, and compare flags to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. + */ + function baseIsMatch(object, source, matchData, customizer) { + var index = matchData.length, + length = index, + noCustomizer = !customizer; - /** - * The base implementation of `_.mean` and `_.meanBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the mean. - */ - function baseMean(array, iteratee) { - var length = array == null ? 0 : array.length; - return length ? (baseSum(array, iteratee) / length) : NAN; - } + if (object == null) { + return !length; + } + object = Object(object); + while (index--) { + var data = matchData[index]; + if ((noCustomizer && data[2]) + ? data[1] !== object[data[0]] + : !(data[0] in object) + ) { + return false; + } + } + while (++index < length) { + data = matchData[index]; + var key = data[0], + objValue = object[key], + srcValue = data[1]; - /** - * The base implementation of `_.property` without support for deep paths. - * - * @private - * @param {string} key The key of the property to get. - * @returns {Function} Returns the new accessor function. - */ - function baseProperty(key) { - return function(object) { - return object == null ? undefined : object[key]; - }; - } + if (noCustomizer && data[2]) { + if (objValue === undefined && !(key in object)) { + return false; + } + } else { + var stack = new Stack; + if (customizer) { + var result = customizer(objValue, srcValue, key, object, source, stack); + } + if (!(result === undefined + ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) + : result + )) { + return false; + } + } + } + return true; + } - /** - * The base implementation of `_.propertyOf` without support for deep paths. - * - * @private - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - */ - function basePropertyOf(object) { - return function(key) { - return object == null ? undefined : object[key]; - }; - } + /** + * The base implementation of `_.isNative` without bad shim checks. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. + */ + function baseIsNative(value) { + if (!isObject(value) || isMasked(value)) { + return false; + } + var pattern = isFunction(value) ? reIsNative : reIsHostCtor; + return pattern.test(toSource(value)); + } - /** - * The base implementation of `_.reduce` and `_.reduceRight`, without support - * for iteratee shorthands, which iterates over `collection` using `eachFunc`. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {*} accumulator The initial value. - * @param {boolean} initAccum Specify using the first or last element of - * `collection` as the initial value. - * @param {Function} eachFunc The function to iterate over `collection`. - * @returns {*} Returns the accumulated value. - */ - function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) { - eachFunc(collection, function(value, index, collection) { - accumulator = initAccum - ? (initAccum = false, value) - : iteratee(accumulator, value, index, collection); - }); - return accumulator; - } + /** + * The base implementation of `_.isRegExp` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + */ + function baseIsRegExp(value) { + return isObjectLike(value) && baseGetTag(value) == regexpTag; + } - /** - * The base implementation of `_.sortBy` which uses `comparer` to define the - * sort order of `array` and replaces criteria objects with their corresponding - * values. - * - * @private - * @param {Array} array The array to sort. - * @param {Function} comparer The function to define sort order. - * @returns {Array} Returns `array`. - */ - function baseSortBy(array, comparer) { - var length = array.length; + /** + * The base implementation of `_.isSet` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. + */ + function baseIsSet(value) { + return isObjectLike(value) && getTag(value) == setTag; + } - array.sort(comparer); - while (length--) { - array[length] = array[length].value; + /** + * The base implementation of `_.isTypedArray` without Node.js optimizations. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + */ + function baseIsTypedArray(value) { + return isObjectLike(value) && + isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; } - return array; - } - /** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ - function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; - - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); + /** + * The base implementation of `_.iteratee`. + * + * @private + * @param {*} [value=_.identity] The value to convert to an iteratee. + * @returns {Function} Returns the iteratee. + */ + function baseIteratee(value) { + // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. + // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. + if (typeof value == 'function') { + return value; + } + if (value == null) { + return identity; } + if (typeof value == 'object') { + return isArray(value) + ? baseMatchesProperty(value[0], value[1]) + : baseMatches(value); + } + return property(value); } - return result; - } - /** - * The base implementation of `_.times` without support for iteratee shorthands - * or max array length checks. - * - * @private - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the array of results. - */ - function baseTimes(n, iteratee) { - var index = -1, - result = Array(n); - - while (++index < n) { - result[index] = iteratee(index); + /** + * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeys(object) { + if (!isPrototype(object)) { + return nativeKeys(object); + } + var result = []; + for (var key in Object(object)) { + if (hasOwnProperty.call(object, key) && key != 'constructor') { + result.push(key); + } + } + return result; } - return result; - } - /** - * The base implementation of `_.toPairs` and `_.toPairsIn` which creates an array - * of key-value pairs for `object` corresponding to the property names of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the key-value pairs. - */ - function baseToPairs(object, props) { - return arrayMap(props, function(key) { - return [key, object[key]]; - }); - } + /** + * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * + * @private + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. + */ + function baseKeysIn(object) { + if (!isObject(object)) { + return nativeKeysIn(object); + } + var isProto = isPrototype(object), + result = []; - /** - * The base implementation of `_.trim`. - * - * @private - * @param {string} string The string to trim. - * @returns {string} Returns the trimmed string. - */ - function baseTrim(string) { - return string - ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '') - : string; - } + for (var key in object) { + if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { + result.push(key); + } + } + return result; + } - /** - * The base implementation of `_.unary` without support for storing metadata. - * - * @private - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. - */ - function baseUnary(func) { - return function(value) { - return func(value); - }; - } + /** + * The base implementation of `_.lt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + */ + function baseLt(value, other) { + return value < other; + } - /** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ - function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); - } + /** + * The base implementation of `_.map` without support for iteratee shorthands. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + */ + function baseMap(collection, iteratee) { + var index = -1, + result = isArrayLike(collection) ? Array(collection.length) : []; - /** - * Checks if a `cache` value for `key` exists. - * - * @private - * @param {Object} cache The cache to query. - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function cacheHas(cache, key) { - return cache.has(key); - } + baseEach(collection, function(value, key, collection) { + result[++index] = iteratee(value, key, collection); + }); + return result; + } - /** - * Used by `_.trim` and `_.trimStart` to get the index of the first string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the first unmatched string symbol. - */ - function charsStartIndex(strSymbols, chrSymbols) { - var index = -1, - length = strSymbols.length; + /** + * The base implementation of `_.matches` which doesn't clone `source`. + * + * @private + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatches(source) { + var matchData = getMatchData(source); + if (matchData.length == 1 && matchData[0][2]) { + return matchesStrictComparable(matchData[0][0], matchData[0][1]); + } + return function(object) { + return object === source || baseIsMatch(object, source, matchData); + }; + } - while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } + /** + * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * + * @private + * @param {string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. + */ + function baseMatchesProperty(path, srcValue) { + if (isKey(path) && isStrictComparable(srcValue)) { + return matchesStrictComparable(toKey(path), srcValue); + } + return function(object) { + var objValue = get(object, path); + return (objValue === undefined && objValue === srcValue) + ? hasIn(object, path) + : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); + }; + } - /** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ - function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; + /** + * The base implementation of `_.merge` without support for multiple sources. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {number} srcIndex The index of `source`. + * @param {Function} [customizer] The function to customize merged values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMerge(object, source, srcIndex, customizer, stack) { + if (object === source) { + return; + } + baseFor(source, function(srcValue, key) { + stack || (stack = new Stack); + if (isObject(srcValue)) { + baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); + } + else { + var newValue = customizer + ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) + : undefined; - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; - } + if (newValue === undefined) { + newValue = srcValue; + } + assignMergeValue(object, key, newValue); + } + }, keysIn); + } - /** - * Gets the number of `placeholder` occurrences in `array`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} placeholder The placeholder to search for. - * @returns {number} Returns the placeholder count. - */ - function countHolders(array, placeholder) { - var length = array.length, - result = 0; + /** + * A specialized version of `baseMerge` for arrays and objects which performs + * deep merges and tracks traversed objects enabling objects with circular + * references to be merged. + * + * @private + * @param {Object} object The destination object. + * @param {Object} source The source object. + * @param {string} key The key of the value to merge. + * @param {number} srcIndex The index of `source`. + * @param {Function} mergeFunc The function to merge values. + * @param {Function} [customizer] The function to customize assigned values. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + */ + function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { + var objValue = safeGet(object, key), + srcValue = safeGet(source, key), + stacked = stack.get(srcValue); - while (length--) { - if (array[length] === placeholder) { - ++result; + if (stacked) { + assignMergeValue(object, key, stacked); + return; } - } - return result; - } + var newValue = customizer + ? customizer(objValue, srcValue, (key + ''), object, source, stack) + : undefined; - /** - * Used by `_.deburr` to convert Latin-1 Supplement and Latin Extended-A - * letters to basic Latin letters. - * - * @private - * @param {string} letter The matched letter to deburr. - * @returns {string} Returns the deburred letter. - */ - var deburrLetter = basePropertyOf(deburredLetters); + var isCommon = newValue === undefined; - /** - * Used by `_.escape` to convert characters to HTML entities. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - var escapeHtmlChar = basePropertyOf(htmlEscapes); + if (isCommon) { + var isArr = isArray(srcValue), + isBuff = !isArr && isBuffer(srcValue), + isTyped = !isArr && !isBuff && isTypedArray(srcValue); - /** - * Used by `_.template` to escape characters for inclusion in compiled string literals. - * - * @private - * @param {string} chr The matched character to escape. - * @returns {string} Returns the escaped character. - */ - function escapeStringChar(chr) { - return '\\' + stringEscapes[chr]; - } + newValue = srcValue; + if (isArr || isBuff || isTyped) { + if (isArray(objValue)) { + newValue = objValue; + } + else if (isArrayLikeObject(objValue)) { + newValue = copyArray(objValue); + } + else if (isBuff) { + isCommon = false; + newValue = cloneBuffer(srcValue, true); + } + else if (isTyped) { + isCommon = false; + newValue = cloneTypedArray(srcValue, true); + } + else { + newValue = []; + } + } + else if (isPlainObject(srcValue) || isArguments(srcValue)) { + newValue = objValue; + if (isArguments(objValue)) { + newValue = toPlainObject(objValue); + } + else if (!isObject(objValue) || isFunction(objValue)) { + newValue = initCloneObject(srcValue); + } + } + else { + isCommon = false; + } + } + if (isCommon) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, newValue); + mergeFunc(newValue, srcValue, srcIndex, customizer, stack); + stack['delete'](srcValue); + } + assignMergeValue(object, key, newValue); + } - /** - * Gets the value at `key` of `object`. - * - * @private - * @param {Object} [object] The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. - */ - function getValue(object, key) { - return object == null ? undefined : object[key]; - } + /** + * The base implementation of `_.nth` which doesn't coerce arguments. + * + * @private + * @param {Array} array The array to query. + * @param {number} n The index of the element to return. + * @returns {*} Returns the nth element of `array`. + */ + function baseNth(array, n) { + var length = array.length; + if (!length) { + return; + } + n += n < 0 ? length : 0; + return isIndex(n, length) ? array[n] : undefined; + } - /** - * Checks if `string` contains Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a symbol is found, else `false`. - */ - function hasUnicode(string) { - return reHasUnicode.test(string); - } + /** + * The base implementation of `_.orderBy` without param guards. + * + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. + * @param {string[]} orders The sort orders of `iteratees`. + * @returns {Array} Returns the new sorted array. + */ + function baseOrderBy(collection, iteratees, orders) { + if (iteratees.length) { + iteratees = arrayMap(iteratees, function(iteratee) { + if (isArray(iteratee)) { + return function(value) { + return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); + } + } + return iteratee; + }); + } else { + iteratees = [identity]; + } - /** - * Checks if `string` contains a word composed of Unicode symbols. - * - * @private - * @param {string} string The string to inspect. - * @returns {boolean} Returns `true` if a word is found, else `false`. - */ - function hasUnicodeWord(string) { - return reHasUnicodeWord.test(string); - } + var index = -1; + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - /** - * Converts `iterator` to an array. - * - * @private - * @param {Object} iterator The iterator to convert. - * @returns {Array} Returns the converted array. - */ - function iteratorToArray(iterator) { - var data, - result = []; + var result = baseMap(collection, function(value, key, collection) { + var criteria = arrayMap(iteratees, function(iteratee) { + return iteratee(value); + }); + return { 'criteria': criteria, 'index': ++index, 'value': value }; + }); - while (!(data = iterator.next()).done) { - result.push(data.value); + return baseSortBy(result, function(object, other) { + return compareMultiple(object, other, orders); + }); } - return result; - } - - /** - * Converts `map` to its key-value pairs. - * - * @private - * @param {Object} map The map to convert. - * @returns {Array} Returns the key-value pairs. - */ - function mapToArray(map) { - var index = -1, - result = Array(map.size); - map.forEach(function(value, key) { - result[++index] = [key, value]; - }); - return result; - } + /** + * The base implementation of `_.pick` without support for individual + * property identifiers. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @returns {Object} Returns the new object. + */ + function basePick(object, paths) { + return basePickBy(object, paths, function(value, path) { + return hasIn(object, path); + }); + } - /** - * Creates a unary function that invokes `func` with its argument transformed. - * - * @private - * @param {Function} func The function to wrap. - * @param {Function} transform The argument transform. - * @returns {Function} Returns the new function. - */ - function overArg(func, transform) { - return function(arg) { - return func(transform(arg)); - }; - } + /** + * The base implementation of `_.pickBy` without support for iteratee shorthands. + * + * @private + * @param {Object} object The source object. + * @param {string[]} paths The property paths to pick. + * @param {Function} predicate The function invoked per property. + * @returns {Object} Returns the new object. + */ + function basePickBy(object, paths, predicate) { + var index = -1, + length = paths.length, + result = {}; - /** - * Replaces all `placeholder` elements in `array` with an internal placeholder - * and returns an array of their indexes. - * - * @private - * @param {Array} array The array to modify. - * @param {*} placeholder The placeholder to replace. - * @returns {Array} Returns the new array of placeholder indexes. - */ - function replaceHolders(array, placeholder) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; + while (++index < length) { + var path = paths[index], + value = baseGet(object, path); - while (++index < length) { - var value = array[index]; - if (value === placeholder || value === PLACEHOLDER) { - array[index] = PLACEHOLDER; - result[resIndex++] = index; + if (predicate(value, path)) { + baseSet(result, castPath(path, object), value); + } } + return result; } - return result; - } - - /** - * Converts `set` to an array of its values. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the values. - */ - function setToArray(set) { - var index = -1, - result = Array(set.size); - - set.forEach(function(value) { - result[++index] = value; - }); - return result; - } - /** - * Converts `set` to its value-value pairs. - * - * @private - * @param {Object} set The set to convert. - * @returns {Array} Returns the value-value pairs. - */ - function setToPairs(set) { - var index = -1, - result = Array(set.size); + /** + * A specialized version of `baseProperty` which supports deep paths. + * + * @private + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. + */ + function basePropertyDeep(path) { + return function(object) { + return baseGet(object, path); + }; + } - set.forEach(function(value) { - result[++index] = [value, value]; - }); - return result; - } + /** + * The base implementation of `_.pullAllBy` without support for iteratee + * shorthands. + * + * @private + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + */ + function basePullAll(array, values, iteratee, comparator) { + var indexOf = comparator ? baseIndexOfWith : baseIndexOf, + index = -1, + length = values.length, + seen = array; - /** - * A specialized version of `_.indexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictIndexOf(array, value, fromIndex) { - var index = fromIndex - 1, - length = array.length; + if (array === values) { + values = copyArray(values); + } + if (iteratee) { + seen = arrayMap(array, baseUnary(iteratee)); + } + while (++index < length) { + var fromIndex = 0, + value = values[index], + computed = iteratee ? iteratee(value) : value; - while (++index < length) { - if (array[index] === value) { - return index; + while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { + if (seen !== array) { + splice.call(seen, fromIndex, 1); + } + splice.call(array, fromIndex, 1); + } } + return array; } - return -1; - } - /** - * A specialized version of `_.lastIndexOf` which performs strict equality - * comparisons of values, i.e. `===`. - * - * @private - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} fromIndex The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. - */ - function strictLastIndexOf(array, value, fromIndex) { - var index = fromIndex + 1; - while (index--) { - if (array[index] === value) { - return index; + /** + * The base implementation of `_.pullAt` without support for individual + * indexes or capturing the removed elements. + * + * @private + * @param {Array} array The array to modify. + * @param {number[]} indexes The indexes of elements to remove. + * @returns {Array} Returns `array`. + */ + function basePullAt(array, indexes) { + var length = array ? indexes.length : 0, + lastIndex = length - 1; + + while (length--) { + var index = indexes[length]; + if (length == lastIndex || index !== previous) { + var previous = index; + if (isIndex(index)) { + splice.call(array, index, 1); + } else { + baseUnset(array, index); + } + } } + return array; } - return index; - } - - /** - * Gets the number of symbols in `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the string size. - */ - function stringSize(string) { - return hasUnicode(string) - ? unicodeSize(string) - : asciiSize(string); - } - /** - * Converts `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function stringToArray(string) { - return hasUnicode(string) - ? unicodeToArray(string) - : asciiToArray(string); - } + /** + * The base implementation of `_.random` without support for returning + * floating-point numbers. + * + * @private + * @param {number} lower The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the random number. + */ + function baseRandom(lower, upper) { + return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + } - /** - * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace - * character of `string`. - * - * @private - * @param {string} string The string to inspect. - * @returns {number} Returns the index of the last non-whitespace character. - */ - function trimmedEndIndex(string) { - var index = string.length; + /** + * The base implementation of `_.range` and `_.rangeRight` which doesn't + * coerce arguments. + * + * @private + * @param {number} start The start of the range. + * @param {number} end The end of the range. + * @param {number} step The value to increment or decrement by. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the range of numbers. + */ + function baseRange(start, end, step, fromRight) { + var index = -1, + length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), + result = Array(length); - while (index-- && reWhitespace.test(string.charAt(index))) {} - return index; - } + while (length--) { + result[fromRight ? length : ++index] = start; + start += step; + } + return result; + } - /** - * Used by `_.unescape` to convert HTML entities to characters. - * - * @private - * @param {string} chr The matched character to unescape. - * @returns {string} Returns the unescaped character. - */ - var unescapeHtmlChar = basePropertyOf(htmlUnescapes); + /** + * The base implementation of `_.repeat` which doesn't coerce arguments. + * + * @private + * @param {string} string The string to repeat. + * @param {number} n The number of times to repeat the string. + * @returns {string} Returns the repeated string. + */ + function baseRepeat(string, n) { + var result = ''; + if (!string || n < 1 || n > MAX_SAFE_INTEGER) { + return result; + } + // Leverage the exponentiation by squaring algorithm for a faster repeat. + // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. + do { + if (n % 2) { + result += string; + } + n = nativeFloor(n / 2); + if (n) { + string += string; + } + } while (n); - /** - * Gets the size of a Unicode `string`. - * - * @private - * @param {string} string The string inspect. - * @returns {number} Returns the string size. - */ - function unicodeSize(string) { - var result = reUnicode.lastIndex = 0; - while (reUnicode.test(string)) { - ++result; + return result; } - return result; - } - /** - * Converts a Unicode `string` to an array. - * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the converted array. - */ - function unicodeToArray(string) { - return string.match(reUnicode) || []; - } + /** + * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. + */ + function baseRest(func, start) { + return setToString(overRest(func, start, identity), func + ''); + } - /** - * Splits a Unicode `string` into an array of its words. - * - * @private - * @param {string} The string to inspect. - * @returns {Array} Returns the words of `string`. - */ - function unicodeWords(string) { - return string.match(reUnicodeWord) || []; - } + /** + * The base implementation of `_.sample`. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. + */ + function baseSample(collection) { + return arraySample(values(collection)); + } - /*--------------------------------------------------------------------------*/ + /** + * The base implementation of `_.sampleSize` without param guards. + * + * @private + * @param {Array|Object} collection The collection to sample. + * @param {number} n The number of elements to sample. + * @returns {Array} Returns the random elements. + */ + function baseSampleSize(collection, n) { + var array = values(collection); + return shuffleSelf(array, baseClamp(n, 0, array.length)); + } - /** - * Create a new pristine `lodash` function using the `context` object. - * - * @static - * @memberOf _ - * @since 1.1.0 - * @category Util - * @param {Object} [context=root] The context object. - * @returns {Function} Returns a new `lodash` function. - * @example - * - * _.mixin({ 'foo': _.constant('foo') }); - * - * var lodash = _.runInContext(); - * lodash.mixin({ 'bar': lodash.constant('bar') }); - * - * _.isFunction(_.foo); - * // => true - * _.isFunction(_.bar); - * // => false - * - * lodash.isFunction(lodash.foo); - * // => false - * lodash.isFunction(lodash.bar); - * // => true - * - * // Create a suped-up `defer` in Node.js. - * var defer = _.runInContext({ 'setTimeout': setImmediate }).defer; - */ - var runInContext = (function runInContext(context) { - context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps)); + /** + * The base implementation of `_.set`. + * + * @private + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. + */ + function baseSet(object, path, value, customizer) { + if (!isObject(object)) { + return object; + } + path = castPath(path, object); - /** Built-in constructor references. */ - var Array = context.Array, - Date = context.Date, - Error = context.Error, - Function = context.Function, - Math = context.Math, - Object = context.Object, - RegExp = context.RegExp, - String = context.String, - TypeError = context.TypeError; + var index = -1, + length = path.length, + lastIndex = length - 1, + nested = object; - /** Used for built-in method references. */ - var arrayProto = Array.prototype, - funcProto = Function.prototype, - objectProto = Object.prototype; + while (nested != null && ++index < length) { + var key = toKey(path[index]), + newValue = value; - /** Used to detect overreaching core-js shims. */ - var coreJsData = context['__core-js_shared__']; + if (key === '__proto__' || key === 'constructor' || key === 'prototype') { + return object; + } - /** Used to resolve the decompiled source of functions. */ - var funcToString = funcProto.toString; + if (index != lastIndex) { + var objValue = nested[key]; + newValue = customizer ? customizer(objValue, key, nested) : undefined; + if (newValue === undefined) { + newValue = isObject(objValue) + ? objValue + : (isIndex(path[index + 1]) ? [] : {}); + } + } + assignValue(nested, key, newValue); + nested = nested[key]; + } + return object; + } - /** Used to check objects for own properties. */ - var hasOwnProperty = objectProto.hasOwnProperty; + /** + * The base implementation of `setData` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. + */ + var baseSetData = !metaMap ? identity : function(func, data) { + metaMap.set(func, data); + return func; + }; - /** Used to generate unique IDs. */ - var idCounter = 0; + /** + * The base implementation of `setToString` without support for hot loop shorting. + * + * @private + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. + */ + var baseSetToString = !defineProperty ? identity : function(func, string) { + return defineProperty(func, 'toString', { + 'configurable': true, + 'enumerable': false, + 'value': constant(string), + 'writable': true + }); + }; - /** Used to detect methods masquerading as native. */ - var maskSrcKey = (function() { - var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ''); - return uid ? ('Symbol(src)_1.' + uid) : ''; - }()); + /** + * The base implementation of `_.shuffle`. + * + * @private + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. + */ + function baseShuffle(collection) { + return shuffleSelf(values(collection)); + } /** - * Used to resolve the - * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring) - * of values. + * The base implementation of `_.slice` without an iteratee call guard. + * + * @private + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. */ - var nativeObjectToString = objectProto.toString; + function baseSlice(array, start, end) { + var index = -1, + length = array.length; - /** Used to infer the `Object` constructor. */ - var objectCtorString = funcToString.call(Object); - - /** Used to restore the original `_` reference in `_.noConflict`. */ - var oldDash = root._; - - /** Used to detect if a method is native. */ - var reIsNative = RegExp('^' + - funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&') - .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$' - ); - - /** Built-in value references. */ - var Buffer = moduleExports ? context.Buffer : undefined, - Symbol = context.Symbol, - Uint8Array = context.Uint8Array, - allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, - getPrototype = overArg(Object.getPrototypeOf, Object), - objectCreate = Object.create, - propertyIsEnumerable = objectProto.propertyIsEnumerable, - splice = arrayProto.splice, - spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, - symIterator = Symbol ? Symbol.iterator : undefined, - symToStringTag = Symbol ? Symbol.toStringTag : undefined; - - var defineProperty = (function() { - try { - var func = getNative(Object, 'defineProperty'); - func({}, '', {}); - return func; - } catch (e) {} - }()); - - /** Mocked built-ins. */ - var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, - ctxNow = Date && Date.now !== root.Date.now && Date.now, - ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout; - - /* Built-in method references for those with the same name as other `lodash` methods. */ - var nativeCeil = Math.ceil, - nativeFloor = Math.floor, - nativeGetSymbols = Object.getOwnPropertySymbols, - nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, - nativeIsFinite = context.isFinite, - nativeJoin = arrayProto.join, - nativeKeys = overArg(Object.keys, Object), - nativeMax = Math.max, - nativeMin = Math.min, - nativeNow = Date.now, - nativeParseInt = context.parseInt, - nativeRandom = Math.random, - nativeReverse = arrayProto.reverse; - - /* Built-in method references that are verified to be native. */ - var DataView = getNative(context, 'DataView'), - Map = getNative(context, 'Map'), - Promise = getNative(context, 'Promise'), - Set = getNative(context, 'Set'), - WeakMap = getNative(context, 'WeakMap'), - nativeCreate = getNative(Object, 'create'); - - /** Used to store function metadata. */ - var metaMap = WeakMap && new WeakMap; - - /** Used to lookup unminified function names. */ - var realNames = {}; - - /** Used to detect maps, sets, and weakmaps. */ - var dataViewCtorString = toSource(DataView), - mapCtorString = toSource(Map), - promiseCtorString = toSource(Promise), - setCtorString = toSource(Set), - weakMapCtorString = toSource(WeakMap); - - /** Used to convert symbols to primitives and strings. */ - var symbolProto = Symbol ? Symbol.prototype : undefined, - symbolValueOf = symbolProto ? symbolProto.valueOf : undefined, - symbolToString = symbolProto ? symbolProto.toString : undefined; - - /*------------------------------------------------------------------------*/ + if (start < 0) { + start = -start > length ? 0 : (length + start); + } + end = end > length ? length : end; + if (end < 0) { + end += length; + } + length = start > end ? 0 : ((end - start) >>> 0); + start >>>= 0; - /** - * Creates a `lodash` object which wraps `value` to enable implicit method - * chain sequences. Methods that operate on and return arrays, collections, - * and functions can be chained together. Methods that retrieve a single value - * or may return a primitive value will automatically end the chain sequence - * and return the unwrapped value. Otherwise, the value must be unwrapped - * with `_#value`. - * - * Explicit chain sequences, which must be unwrapped with `_#value`, may be - * enabled using `_.chain`. - * - * The execution of chained methods is lazy, that is, it's deferred until - * `_#value` is implicitly or explicitly called. - * - * Lazy evaluation allows several methods to support shortcut fusion. - * Shortcut fusion is an optimization to merge iteratee calls; this avoids - * the creation of intermediate arrays and can greatly reduce the number of - * iteratee executions. Sections of a chain sequence qualify for shortcut - * fusion if the section is applied to an array and iteratees accept only - * one argument. The heuristic for whether a section qualifies for shortcut - * fusion is subject to change. - * - * Chaining is supported in custom builds as long as the `_#value` method is - * directly or indirectly included in the build. - * - * In addition to lodash methods, wrappers have `Array` and `String` methods. - * - * The wrapper `Array` methods are: - * `concat`, `join`, `pop`, `push`, `shift`, `sort`, `splice`, and `unshift` - * - * The wrapper `String` methods are: - * `replace` and `split` - * - * The wrapper methods that support shortcut fusion are: - * `at`, `compact`, `drop`, `dropRight`, `dropWhile`, `filter`, `find`, - * `findLast`, `head`, `initial`, `last`, `map`, `reject`, `reverse`, `slice`, - * `tail`, `take`, `takeRight`, `takeRightWhile`, `takeWhile`, and `toArray` - * - * The chainable wrapper methods are: - * `after`, `ary`, `assign`, `assignIn`, `assignInWith`, `assignWith`, `at`, - * `before`, `bind`, `bindAll`, `bindKey`, `castArray`, `chain`, `chunk`, - * `commit`, `compact`, `concat`, `conforms`, `constant`, `countBy`, `create`, - * `curry`, `debounce`, `defaults`, `defaultsDeep`, `defer`, `delay`, - * `difference`, `differenceBy`, `differenceWith`, `drop`, `dropRight`, - * `dropRightWhile`, `dropWhile`, `extend`, `extendWith`, `fill`, `filter`, - * `flatMap`, `flatMapDeep`, `flatMapDepth`, `flatten`, `flattenDeep`, - * `flattenDepth`, `flip`, `flow`, `flowRight`, `fromPairs`, `functions`, - * `functionsIn`, `groupBy`, `initial`, `intersection`, `intersectionBy`, - * `intersectionWith`, `invert`, `invertBy`, `invokeMap`, `iteratee`, `keyBy`, - * `keys`, `keysIn`, `map`, `mapKeys`, `mapValues`, `matches`, `matchesProperty`, - * `memoize`, `merge`, `mergeWith`, `method`, `methodOf`, `mixin`, `negate`, - * `nthArg`, `omit`, `omitBy`, `once`, `orderBy`, `over`, `overArgs`, - * `overEvery`, `overSome`, `partial`, `partialRight`, `partition`, `pick`, - * `pickBy`, `plant`, `property`, `propertyOf`, `pull`, `pullAll`, `pullAllBy`, - * `pullAllWith`, `pullAt`, `push`, `range`, `rangeRight`, `rearg`, `reject`, - * `remove`, `rest`, `reverse`, `sampleSize`, `set`, `setWith`, `shuffle`, - * `slice`, `sort`, `sortBy`, `splice`, `spread`, `tail`, `take`, `takeRight`, - * `takeRightWhile`, `takeWhile`, `tap`, `throttle`, `thru`, `toArray`, - * `toPairs`, `toPairsIn`, `toPath`, `toPlainObject`, `transform`, `unary`, - * `union`, `unionBy`, `unionWith`, `uniq`, `uniqBy`, `uniqWith`, `unset`, - * `unshift`, `unzip`, `unzipWith`, `update`, `updateWith`, `values`, - * `valuesIn`, `without`, `wrap`, `xor`, `xorBy`, `xorWith`, `zip`, - * `zipObject`, `zipObjectDeep`, and `zipWith` - * - * The wrapper methods that are **not** chainable by default are: - * `add`, `attempt`, `camelCase`, `capitalize`, `ceil`, `clamp`, `clone`, - * `cloneDeep`, `cloneDeepWith`, `cloneWith`, `conformsTo`, `deburr`, - * `defaultTo`, `divide`, `each`, `eachRight`, `endsWith`, `eq`, `escape`, - * `escapeRegExp`, `every`, `find`, `findIndex`, `findKey`, `findLast`, - * `findLastIndex`, `findLastKey`, `first`, `floor`, `forEach`, `forEachRight`, - * `forIn`, `forInRight`, `forOwn`, `forOwnRight`, `get`, `gt`, `gte`, `has`, - * `hasIn`, `head`, `identity`, `includes`, `indexOf`, `inRange`, `invoke`, - * `isArguments`, `isArray`, `isArrayBuffer`, `isArrayLike`, `isArrayLikeObject`, - * `isBoolean`, `isBuffer`, `isDate`, `isElement`, `isEmpty`, `isEqual`, - * `isEqualWith`, `isError`, `isFinite`, `isFunction`, `isInteger`, `isLength`, - * `isMap`, `isMatch`, `isMatchWith`, `isNaN`, `isNative`, `isNil`, `isNull`, - * `isNumber`, `isObject`, `isObjectLike`, `isPlainObject`, `isRegExp`, - * `isSafeInteger`, `isSet`, `isString`, `isUndefined`, `isTypedArray`, - * `isWeakMap`, `isWeakSet`, `join`, `kebabCase`, `last`, `lastIndexOf`, - * `lowerCase`, `lowerFirst`, `lt`, `lte`, `max`, `maxBy`, `mean`, `meanBy`, - * `min`, `minBy`, `multiply`, `noConflict`, `noop`, `now`, `nth`, `pad`, - * `padEnd`, `padStart`, `parseInt`, `pop`, `random`, `reduce`, `reduceRight`, - * `repeat`, `result`, `round`, `runInContext`, `sample`, `shift`, `size`, - * `snakeCase`, `some`, `sortedIndex`, `sortedIndexBy`, `sortedLastIndex`, - * `sortedLastIndexBy`, `startCase`, `startsWith`, `stubArray`, `stubFalse`, - * `stubObject`, `stubString`, `stubTrue`, `subtract`, `sum`, `sumBy`, - * `template`, `times`, `toFinite`, `toInteger`, `toJSON`, `toLength`, - * `toLower`, `toNumber`, `toSafeInteger`, `toString`, `toUpper`, `trim`, - * `trimEnd`, `trimStart`, `truncate`, `unescape`, `uniqueId`, `upperCase`, - * `upperFirst`, `value`, and `words` - * - * @name _ - * @constructor - * @category Seq - * @param {*} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns the new `lodash` wrapper instance. - * @example - * - * function square(n) { - * return n * n; - * } - * - * var wrapped = _([1, 2, 3]); - * - * // Returns an unwrapped value. - * wrapped.reduce(_.add); - * // => 6 - * - * // Returns a wrapped value. - * var squares = wrapped.map(square); - * - * _.isArray(squares); - * // => false - * - * _.isArray(squares.value()); - * // => true - */ - function lodash(value) { - if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) { - if (value instanceof LodashWrapper) { - return value; - } - if (hasOwnProperty.call(value, '__wrapped__')) { - return wrapperClone(value); - } + var result = Array(length); + while (++index < length) { + result[index] = array[index + start]; } - return new LodashWrapper(value); + return result; } /** - * The base implementation of `_.create` without support for assigning - * properties to the created object. + * The base implementation of `_.some` without support for iteratee shorthands. * * @private - * @param {Object} proto The object to inherit from. - * @returns {Object} Returns the new object. + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. */ - var baseCreate = (function() { - function object() {} - return function(proto) { - if (!isObject(proto)) { - return {}; - } - if (objectCreate) { - return objectCreate(proto); - } - object.prototype = proto; - var result = new object; - object.prototype = undefined; - return result; - }; - }()); + function baseSome(collection, predicate) { + var result; - /** - * The function whose prototype chain sequence wrappers inherit from. - * - * @private - */ - function baseLodash() { - // No operation performed. + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; } /** - * The base constructor for creating `lodash` wrapper objects. + * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which + * performs a binary search of `array` to determine the index at which `value` + * should be inserted into `array` in order to maintain its sort order. * * @private - * @param {*} value The value to wrap. - * @param {boolean} [chainAll] Enable explicit method chain sequences. + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. */ - function LodashWrapper(value, chainAll) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__chain__ = !!chainAll; - this.__index__ = 0; - this.__values__ = undefined; + function baseSortedIndex(array, value, retHighest) { + var low = 0, + high = array == null ? low : array.length; + + if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { + while (low < high) { + var mid = (low + high) >>> 1, + computed = array[mid]; + + if (computed !== null && !isSymbol(computed) && + (retHighest ? (computed <= value) : (computed < value))) { + low = mid + 1; + } else { + high = mid; + } + } + return high; + } + return baseSortedIndexBy(array, value, identity, retHighest); } /** - * By default, the template delimiters used by lodash are like those in - * embedded Ruby (ERB) as well as ES2015 template strings. Change the - * following template settings to use alternative delimiters. + * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` + * which invokes `iteratee` for `value` and each element of `array` to compute + * their sort ranking. The iteratee is invoked with one argument; (value). * - * @static - * @memberOf _ - * @type {Object} + * @private + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} iteratee The iteratee invoked per element. + * @param {boolean} [retHighest] Specify returning the highest qualified index. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. */ - lodash.templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'escape': reEscape, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'evaluate': reEvaluate, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type {RegExp} - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type {string} - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type {Object} - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type {Function} - */ - '_': lodash + function baseSortedIndexBy(array, value, iteratee, retHighest) { + var low = 0, + high = array == null ? 0 : array.length; + if (high === 0) { + return 0; } - }; - // Ensure wrappers are instances of `baseLodash`. - lodash.prototype = baseLodash.prototype; - lodash.prototype.constructor = lodash; + value = iteratee(value); + var valIsNaN = value !== value, + valIsNull = value === null, + valIsSymbol = isSymbol(value), + valIsUndefined = value === undefined; - LodashWrapper.prototype = baseCreate(baseLodash.prototype); - LodashWrapper.prototype.constructor = LodashWrapper; + while (low < high) { + var mid = nativeFloor((low + high) / 2), + computed = iteratee(array[mid]), + othIsDefined = computed !== undefined, + othIsNull = computed === null, + othIsReflexive = computed === computed, + othIsSymbol = isSymbol(computed); - /*------------------------------------------------------------------------*/ + if (valIsNaN) { + var setLow = retHighest || othIsReflexive; + } else if (valIsUndefined) { + setLow = othIsReflexive && (retHighest || othIsDefined); + } else if (valIsNull) { + setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); + } else if (valIsSymbol) { + setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); + } else if (othIsNull || othIsSymbol) { + setLow = false; + } else { + setLow = retHighest ? (computed <= value) : (computed < value); + } + if (setLow) { + low = mid + 1; + } else { + high = mid; + } + } + return nativeMin(high, MAX_ARRAY_INDEX); + } /** - * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation. + * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without + * support for iteratee shorthands. * * @private - * @constructor - * @param {*} value The value to wrap. + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. */ - function LazyWrapper(value) { - this.__wrapped__ = value; - this.__actions__ = []; - this.__dir__ = 1; - this.__filtered__ = false; - this.__iteratees__ = []; - this.__takeCount__ = MAX_ARRAY_LENGTH; - this.__views__ = []; + function baseSortedUniq(array, iteratee) { + var index = -1, + length = array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; + + if (!index || !eq(computed, seen)) { + var seen = computed; + result[resIndex++] = value === 0 ? 0 : value; + } + } + return result; } /** - * Creates a clone of the lazy wrapper object. + * The base implementation of `_.toNumber` which doesn't ensure correct + * conversions of binary, hexadecimal, or octal string values. * * @private - * @name clone - * @memberOf LazyWrapper - * @returns {Object} Returns the cloned `LazyWrapper` object. + * @param {*} value The value to process. + * @returns {number} Returns the number. */ - function lazyClone() { - var result = new LazyWrapper(this.__wrapped__); - result.__actions__ = copyArray(this.__actions__); - result.__dir__ = this.__dir__; - result.__filtered__ = this.__filtered__; - result.__iteratees__ = copyArray(this.__iteratees__); - result.__takeCount__ = this.__takeCount__; - result.__views__ = copyArray(this.__views__); - return result; + function baseToNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + return +value; } /** - * Reverses the direction of lazy iteration. + * The base implementation of `_.toString` which doesn't convert nullish + * values to empty strings. * * @private - * @name reverse - * @memberOf LazyWrapper - * @returns {Object} Returns the new reversed `LazyWrapper` object. + * @param {*} value The value to process. + * @returns {string} Returns the string. */ - function lazyReverse() { - if (this.__filtered__) { - var result = new LazyWrapper(this); - result.__dir__ = -1; - result.__filtered__ = true; - } else { - result = this.clone(); - result.__dir__ *= -1; + function baseToString(value) { + // Exit early for strings to avoid a performance hit in some environments. + if (typeof value == 'string') { + return value; } - return result; + if (isArray(value)) { + // Recursively convert values (susceptible to call stack limits). + return arrayMap(value, baseToString) + ''; + } + if (isSymbol(value)) { + return symbolToString ? symbolToString.call(value) : ''; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /** - * Extracts the unwrapped value from its lazy wrapper. + * The base implementation of `_.uniqBy` without support for iteratee shorthands. * * @private - * @name value - * @memberOf LazyWrapper - * @returns {*} Returns the unwrapped value. + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. */ - function lazyValue() { - var array = this.__wrapped__.value(), - dir = this.__dir__, - isArr = isArray(array), - isRight = dir < 0, - arrLength = isArr ? array.length : 0, - view = getView(0, arrLength, this.__views__), - start = view.start, - end = view.end, - length = end - start, - index = isRight ? end : (start - 1), - iteratees = this.__iteratees__, - iterLength = iteratees.length, - resIndex = 0, - takeCount = nativeMin(length, this.__takeCount__); + function baseUniq(array, iteratee, comparator) { + var index = -1, + includes = arrayIncludes, + length = array.length, + isCommon = true, + result = [], + seen = result; - if (!isArr || (!isRight && arrLength == length && takeCount == length)) { - return baseWrapperValue(array, this.__actions__); + if (comparator) { + isCommon = false; + includes = arrayIncludesWith; + } + else if (length >= LARGE_ARRAY_SIZE) { + var set = iteratee ? null : createSet(array); + if (set) { + return setToArray(set); + } + isCommon = false; + includes = cacheHas; + seen = new SetCache; + } + else { + seen = iteratee ? [] : result; } - var result = []; - outer: - while (length-- && resIndex < takeCount) { - index += dir; - - var iterIndex = -1, - value = array[index]; - - while (++iterIndex < iterLength) { - var data = iteratees[iterIndex], - iteratee = data.iteratee, - type = data.type, - computed = iteratee(value); + while (++index < length) { + var value = array[index], + computed = iteratee ? iteratee(value) : value; - if (type == LAZY_MAP_FLAG) { - value = computed; - } else if (!computed) { - if (type == LAZY_FILTER_FLAG) { + value = (comparator || value !== 0) ? value : 0; + if (isCommon && computed === computed) { + var seenIndex = seen.length; + while (seenIndex--) { + if (seen[seenIndex] === computed) { continue outer; - } else { - break outer; } } + if (iteratee) { + seen.push(computed); + } + result.push(value); + } + else if (!includes(seen, computed, comparator)) { + if (seen !== result) { + seen.push(computed); + } + result.push(value); } - result[resIndex++] = value; } return result; } - // Ensure `LazyWrapper` is an instance of `baseLodash`. - LazyWrapper.prototype = baseCreate(baseLodash.prototype); - LazyWrapper.prototype.constructor = LazyWrapper; - - /*------------------------------------------------------------------------*/ - /** - * Creates a hash object. + * The base implementation of `_.unset`. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {Object} object The object to modify. + * @param {Array|string} path The property path to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. */ - function Hash(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } + function baseUnset(object, path) { + path = castPath(path, object); + object = parent(object, path); + return object == null || delete object[toKey(last(path))]; } /** - * Removes all key-value entries from the hash. + * The base implementation of `_.update`. * * @private - * @name clear - * @memberOf Hash + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to update. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize path creation. + * @returns {Object} Returns `object`. */ - function hashClear() { - this.__data__ = nativeCreate ? nativeCreate(null) : {}; - this.size = 0; + function baseUpdate(object, path, updater, customizer) { + return baseSet(object, path, updater(baseGet(object, path)), customizer); } /** - * Removes `key` and its value from the hash. + * The base implementation of methods like `_.dropWhile` and `_.takeWhile` + * without support for iteratee shorthands. * * @private - * @name delete - * @memberOf Hash - * @param {Object} hash The hash to modify. - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @param {Array} array The array to query. + * @param {Function} predicate The function invoked per iteration. + * @param {boolean} [isDrop] Specify dropping elements instead of taking them. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Array} Returns the slice of `array`. */ - function hashDelete(key) { - var result = this.has(key) && delete this.__data__[key]; - this.size -= result ? 1 : 0; - return result; - } + function baseWhile(array, predicate, isDrop, fromRight) { + var length = array.length, + index = fromRight ? length : -1; - /** - * Gets the hash value for `key`. - * - * @private - * @name get - * @memberOf Hash - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. - */ - function hashGet(key) { - var data = this.__data__; - if (nativeCreate) { - var result = data[key]; - return result === HASH_UNDEFINED ? undefined : result; - } - return hasOwnProperty.call(data, key) ? data[key] : undefined; + while ((fromRight ? index-- : ++index < length) && + predicate(array[index], index, array)) {} + + return isDrop + ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) + : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); } /** - * Checks if a hash value for `key` exists. + * The base implementation of `wrapperValue` which returns the result of + * performing a sequence of actions on the unwrapped `value`, where each + * successive action is supplied the return value of the previous. * * @private - * @name has - * @memberOf Hash - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @param {*} value The unwrapped value. + * @param {Array} actions Actions to perform to resolve the unwrapped value. + * @returns {*} Returns the resolved value. */ - function hashHas(key) { - var data = this.__data__; - return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key); + function baseWrapperValue(value, actions) { + var result = value; + if (result instanceof LazyWrapper) { + result = result.value(); + } + return arrayReduce(actions, function(result, action) { + return action.func.apply(action.thisArg, arrayPush([result], action.args)); + }, result); } /** - * Sets the hash `key` to `value`. + * The base implementation of methods like `_.xor`, without support for + * iteratee shorthands, that accepts an array of arrays to inspect. * * @private - * @name set - * @memberOf Hash - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the hash instance. + * @param {Array} arrays The arrays to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of values. */ - function hashSet(key, value) { - var data = this.__data__; - this.size += this.has(key) ? 0 : 1; - data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value; - return this; - } + function baseXor(arrays, iteratee, comparator) { + var length = arrays.length; + if (length < 2) { + return length ? baseUniq(arrays[0]) : []; + } + var index = -1, + result = Array(length); - // Add methods to `Hash`. - Hash.prototype.clear = hashClear; - Hash.prototype['delete'] = hashDelete; - Hash.prototype.get = hashGet; - Hash.prototype.has = hashHas; - Hash.prototype.set = hashSet; + while (++index < length) { + var array = arrays[index], + othIndex = -1; - /*------------------------------------------------------------------------*/ + while (++othIndex < length) { + if (othIndex != index) { + result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + } + } + } + return baseUniq(baseFlatten(result, 1), iteratee, comparator); + } /** - * Creates an list cache object. + * This base implementation of `_.zipObject` which assigns values using `assignFunc`. * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {Array} props The property identifiers. + * @param {Array} values The property values. + * @param {Function} assignFunc The function to assign values. + * @returns {Object} Returns the new object. */ - function ListCache(entries) { + function baseZipObject(props, values, assignFunc) { var index = -1, - length = entries == null ? 0 : entries.length; + length = props.length, + valsLength = values.length, + result = {}; - this.clear(); while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); + var value = index < valsLength ? values[index] : undefined; + assignFunc(result, props[index], value); } + return result; } /** - * Removes all key-value entries from the list cache. + * Casts `value` to an empty array if it's not an array like object. * * @private - * @name clear - * @memberOf ListCache + * @param {*} value The value to inspect. + * @returns {Array|Object} Returns the cast array-like object. */ - function listCacheClear() { - this.__data__ = []; - this.size = 0; + function castArrayLikeObject(value) { + return isArrayLikeObject(value) ? value : []; } /** - * Removes `key` and its value from the list cache. + * Casts `value` to `identity` if it's not a function. * * @private - * @name delete - * @memberOf ListCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @param {*} value The value to inspect. + * @returns {Function} Returns cast function. */ - function listCacheDelete(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - return false; - } - var lastIndex = data.length - 1; - if (index == lastIndex) { - data.pop(); - } else { - splice.call(data, index, 1); - } - --this.size; - return true; + function castFunction(value) { + return typeof value == 'function' ? value : identity; } /** - * Gets the list cache value for `key`. + * Casts `value` to a path array if it's not one. * * @private - * @name get - * @memberOf ListCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @param {*} value The value to inspect. + * @param {Object} [object] The object to query keys on. + * @returns {Array} Returns the cast property path array. */ - function listCacheGet(key) { - var data = this.__data__, - index = assocIndexOf(data, key); - - return index < 0 ? undefined : data[index][1]; + function castPath(value, object) { + if (isArray(value)) { + return value; + } + return isKey(value, object) ? [value] : stringToPath(toString(value)); } /** - * Checks if a list cache value for `key` exists. + * A `baseRest` alias which can be replaced with `identity` by module + * replacement plugins. * * @private - * @name has - * @memberOf ListCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @type {Function} + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. */ - function listCacheHas(key) { - return assocIndexOf(this.__data__, key) > -1; - } + var castRest = baseRest; /** - * Sets the list cache `key` to `value`. + * Casts `array` to a slice if it's needed. * * @private - * @name set - * @memberOf ListCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the list cache instance. + * @param {Array} array The array to inspect. + * @param {number} start The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the cast slice. */ - function listCacheSet(key, value) { - var data = this.__data__, - index = assocIndexOf(data, key); - - if (index < 0) { - ++this.size; - data.push([key, value]); - } else { - data[index][1] = value; - } - return this; + function castSlice(array, start, end) { + var length = array.length; + end = end === undefined ? length : end; + return (!start && end >= length) ? array : baseSlice(array, start, end); } - // Add methods to `ListCache`. - ListCache.prototype.clear = listCacheClear; - ListCache.prototype['delete'] = listCacheDelete; - ListCache.prototype.get = listCacheGet; - ListCache.prototype.has = listCacheHas; - ListCache.prototype.set = listCacheSet; - - /*------------------------------------------------------------------------*/ - /** - * Creates a map cache object to store key-value pairs. + * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). * * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. + * @param {number|Object} id The timer id or timeout object of the timer to clear. */ - function MapCache(entries) { - var index = -1, - length = entries == null ? 0 : entries.length; - - this.clear(); - while (++index < length) { - var entry = entries[index]; - this.set(entry[0], entry[1]); - } - } + var clearTimeout = ctxClearTimeout || function(id) { + return root.clearTimeout(id); + }; /** - * Removes all key-value entries from the map. + * Creates a clone of `buffer`. * * @private - * @name clear - * @memberOf MapCache + * @param {Buffer} buffer The buffer to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Buffer} Returns the cloned buffer. */ - function mapCacheClear() { - this.size = 0; - this.__data__ = { - 'hash': new Hash, - 'map': new (Map || ListCache), - 'string': new Hash - }; + function cloneBuffer(buffer, isDeep) { + if (isDeep) { + return buffer.slice(); + } + var length = buffer.length, + result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + + buffer.copy(result); + return result; } /** - * Removes `key` and its value from the map. + * Creates a clone of `arrayBuffer`. * * @private - * @name delete - * @memberOf MapCache - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @param {ArrayBuffer} arrayBuffer The array buffer to clone. + * @returns {ArrayBuffer} Returns the cloned array buffer. */ - function mapCacheDelete(key) { - var result = getMapData(this, key)['delete'](key); - this.size -= result ? 1 : 0; + function cloneArrayBuffer(arrayBuffer) { + var result = new arrayBuffer.constructor(arrayBuffer.byteLength); + new Uint8Array(result).set(new Uint8Array(arrayBuffer)); return result; } /** - * Gets the map value for `key`. + * Creates a clone of `dataView`. * * @private - * @name get - * @memberOf MapCache - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @param {Object} dataView The data view to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned data view. */ - function mapCacheGet(key) { - return getMapData(this, key).get(key); + function cloneDataView(dataView, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; + return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); } /** - * Checks if a map value for `key` exists. + * Creates a clone of `regexp`. * * @private - * @name has - * @memberOf MapCache - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. + * @param {Object} regexp The regexp to clone. + * @returns {Object} Returns the cloned regexp. */ - function mapCacheHas(key) { - return getMapData(this, key).has(key); + function cloneRegExp(regexp) { + var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); + result.lastIndex = regexp.lastIndex; + return result; } /** - * Sets the map `key` to `value`. + * Creates a clone of the `symbol` object. * * @private - * @name set - * @memberOf MapCache - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the map cache instance. + * @param {Object} symbol The symbol object to clone. + * @returns {Object} Returns the cloned symbol object. */ - function mapCacheSet(key, value) { - var data = getMapData(this, key), - size = data.size; - - data.set(key, value); - this.size += data.size == size ? 0 : 1; - return this; + function cloneSymbol(symbol) { + return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; } - // Add methods to `MapCache`. - MapCache.prototype.clear = mapCacheClear; - MapCache.prototype['delete'] = mapCacheDelete; - MapCache.prototype.get = mapCacheGet; - MapCache.prototype.has = mapCacheHas; - MapCache.prototype.set = mapCacheSet; - - /*------------------------------------------------------------------------*/ - /** - * - * Creates an array cache object to store unique values. + * Creates a clone of `typedArray`. * * @private - * @constructor - * @param {Array} [values] The values to cache. + * @param {Object} typedArray The typed array to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the cloned typed array. */ - function SetCache(values) { - var index = -1, - length = values == null ? 0 : values.length; - - this.__data__ = new MapCache; - while (++index < length) { - this.add(values[index]); - } + function cloneTypedArray(typedArray, isDeep) { + var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; + return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); } /** - * Adds `value` to the array cache. + * Compares values to sort them in ascending order. * * @private - * @name add - * @memberOf SetCache - * @alias push - * @param {*} value The value to cache. - * @returns {Object} Returns the cache instance. + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {number} Returns the sort order indicator for `value`. */ - function setCacheAdd(value) { - this.__data__.set(value, HASH_UNDEFINED); - return this; + function compareAscending(value, other) { + if (value !== other) { + var valIsDefined = value !== undefined, + valIsNull = value === null, + valIsReflexive = value === value, + valIsSymbol = isSymbol(value); + + var othIsDefined = other !== undefined, + othIsNull = other === null, + othIsReflexive = other === other, + othIsSymbol = isSymbol(other); + + if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || + (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || + (valIsNull && othIsDefined && othIsReflexive) || + (!valIsDefined && othIsReflexive) || + !valIsReflexive) { + return 1; + } + if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || + (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || + (othIsNull && valIsDefined && valIsReflexive) || + (!othIsDefined && valIsReflexive) || + !othIsReflexive) { + return -1; + } + } + return 0; } /** - * Checks if `value` is in the array cache. + * Used by `_.orderBy` to compare multiple properties of a value to another + * and stable sort them. + * + * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, + * specify an order of "desc" for descending or "asc" for ascending sort order + * of corresponding values. * * @private - * @name has - * @memberOf SetCache - * @param {*} value The value to search for. - * @returns {number} Returns `true` if `value` is found, else `false`. + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {boolean[]|string[]} orders The order to sort by for each property. + * @returns {number} Returns the sort order indicator for `object`. */ - function setCacheHas(value) { - return this.__data__.has(value); - } - - // Add methods to `SetCache`. - SetCache.prototype.add = SetCache.prototype.push = setCacheAdd; - SetCache.prototype.has = setCacheHas; - - /*------------------------------------------------------------------------*/ + function compareMultiple(object, other, orders) { + var index = -1, + objCriteria = object.criteria, + othCriteria = other.criteria, + length = objCriteria.length, + ordersLength = orders.length; - /** - * Creates a stack cache object to store key-value pairs. - * - * @private - * @constructor - * @param {Array} [entries] The key-value pairs to cache. - */ - function Stack(entries) { - var data = this.__data__ = new ListCache(entries); - this.size = data.size; + while (++index < length) { + var result = compareAscending(objCriteria[index], othCriteria[index]); + if (result) { + if (index >= ordersLength) { + return result; + } + var order = orders[index]; + return result * (order == 'desc' ? -1 : 1); + } + } + // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications + // that causes it, under certain circumstances, to provide the same value for + // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 + // for more details. + // + // This also ensures a stable sort in V8 and other engines. + // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. + return object.index - other.index; } /** - * Removes all key-value entries from the stack. + * Creates an array that is the composition of partially applied arguments, + * placeholders, and provided arguments into a single array of arguments. * * @private - * @name clear - * @memberOf Stack + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to prepend to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. */ - function stackClear() { - this.__data__ = new ListCache; - this.size = 0; + function composeArgs(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersLength = holders.length, + leftIndex = -1, + leftLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(leftLength + rangeLength), + isUncurried = !isCurried; + + while (++leftIndex < leftLength) { + result[leftIndex] = partials[leftIndex]; + } + while (++argsIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[holders[argsIndex]] = args[argsIndex]; + } + } + while (rangeLength--) { + result[leftIndex++] = args[argsIndex++]; + } + return result; } /** - * Removes `key` and its value from the stack. + * This function is like `composeArgs` except that the arguments composition + * is tailored for `_.partialRight`. * * @private - * @name delete - * @memberOf Stack - * @param {string} key The key of the value to remove. - * @returns {boolean} Returns `true` if the entry was removed, else `false`. + * @param {Array} args The provided arguments. + * @param {Array} partials The arguments to append to those provided. + * @param {Array} holders The `partials` placeholder indexes. + * @params {boolean} [isCurried] Specify composing for a curried function. + * @returns {Array} Returns the new array of composed arguments. */ - function stackDelete(key) { - var data = this.__data__, - result = data['delete'](key); + function composeArgsRight(args, partials, holders, isCurried) { + var argsIndex = -1, + argsLength = args.length, + holdersIndex = -1, + holdersLength = holders.length, + rightIndex = -1, + rightLength = partials.length, + rangeLength = nativeMax(argsLength - holdersLength, 0), + result = Array(rangeLength + rightLength), + isUncurried = !isCurried; - this.size = data.size; + while (++argsIndex < rangeLength) { + result[argsIndex] = args[argsIndex]; + } + var offset = argsIndex; + while (++rightIndex < rightLength) { + result[offset + rightIndex] = partials[rightIndex]; + } + while (++holdersIndex < holdersLength) { + if (isUncurried || argsIndex < argsLength) { + result[offset + holders[holdersIndex]] = args[argsIndex++]; + } + } return result; } /** - * Gets the stack value for `key`. + * Copies the values of `source` to `array`. * * @private - * @name get - * @memberOf Stack - * @param {string} key The key of the value to get. - * @returns {*} Returns the entry value. + * @param {Array} source The array to copy values from. + * @param {Array} [array=[]] The array to copy values to. + * @returns {Array} Returns `array`. */ - function stackGet(key) { - return this.__data__.get(key); - } + function copyArray(source, array) { + var index = -1, + length = source.length; - /** - * Checks if a stack value for `key` exists. - * - * @private - * @name has - * @memberOf Stack - * @param {string} key The key of the entry to check. - * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`. - */ - function stackHas(key) { - return this.__data__.has(key); + array || (array = Array(length)); + while (++index < length) { + array[index] = source[index]; + } + return array; } /** - * Sets the stack `key` to `value`. + * Copies properties of `source` to `object`. * * @private - * @name set - * @memberOf Stack - * @param {string} key The key of the value to set. - * @param {*} value The value to set. - * @returns {Object} Returns the stack cache instance. + * @param {Object} source The object to copy properties from. + * @param {Array} props The property identifiers to copy. + * @param {Object} [object={}] The object to copy properties to. + * @param {Function} [customizer] The function to customize copied values. + * @returns {Object} Returns `object`. */ - function stackSet(key, value) { - var data = this.__data__; - if (data instanceof ListCache) { - var pairs = data.__data__; - if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) { - pairs.push([key, value]); - this.size = ++data.size; - return this; - } - data = this.__data__ = new MapCache(pairs); - } - data.set(key, value); - this.size = data.size; - return this; - } + function copyObject(source, props, object, customizer) { + var isNew = !object; + object || (object = {}); - // Add methods to `Stack`. - Stack.prototype.clear = stackClear; - Stack.prototype['delete'] = stackDelete; - Stack.prototype.get = stackGet; - Stack.prototype.has = stackHas; - Stack.prototype.set = stackSet; + var index = -1, + length = props.length; - /*------------------------------------------------------------------------*/ + while (++index < length) { + var key = props[index]; - /** - * Creates an array of the enumerable property names of the array-like `value`. - * - * @private - * @param {*} value The value to query. - * @param {boolean} inherited Specify returning inherited property names. - * @returns {Array} Returns the array of property names. - */ - function arrayLikeKeys(value, inherited) { - var isArr = isArray(value), - isArg = !isArr && isArguments(value), - isBuff = !isArr && !isArg && isBuffer(value), - isType = !isArr && !isArg && !isBuff && isTypedArray(value), - skipIndexes = isArr || isArg || isBuff || isType, - result = skipIndexes ? baseTimes(value.length, String) : [], - length = result.length; + var newValue = customizer + ? customizer(object[key], source[key], key, object, source) + : undefined; - for (var key in value) { - if ((inherited || hasOwnProperty.call(value, key)) && - !(skipIndexes && ( - // Safari 9 has enumerable `arguments.length` in strict mode. - key == 'length' || - // Node.js 0.10 has enumerable non-index properties on buffers. - (isBuff && (key == 'offset' || key == 'parent')) || - // PhantomJS 2 has enumerable non-index properties on typed arrays. - (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) || - // Skip index properties. - isIndex(key, length) - ))) { - result.push(key); + if (newValue === undefined) { + newValue = source[key]; + } + if (isNew) { + baseAssignValue(object, key, newValue); + } else { + assignValue(object, key, newValue); } } - return result; + return object; } /** - * A specialized version of `_.sample` for arrays. + * Copies own symbols of `source` to `object`. * * @private - * @param {Array} array The array to sample. - * @returns {*} Returns the random element. + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. */ - function arraySample(array) { - var length = array.length; - return length ? array[baseRandom(0, length - 1)] : undefined; + function copySymbols(source, object) { + return copyObject(source, getSymbols(source), object); } /** - * A specialized version of `_.sampleSize` for arrays. + * Copies own and inherited symbols of `source` to `object`. * * @private - * @param {Array} array The array to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. + * @param {Object} source The object to copy symbols from. + * @param {Object} [object={}] The object to copy symbols to. + * @returns {Object} Returns `object`. */ - function arraySampleSize(array, n) { - return shuffleSelf(copyArray(array), baseClamp(n, 0, array.length)); + function copySymbolsIn(source, object) { + return copyObject(source, getSymbolsIn(source), object); } /** - * A specialized version of `_.shuffle` for arrays. + * Creates a function like `_.groupBy`. * * @private - * @param {Array} array The array to shuffle. - * @returns {Array} Returns the new shuffled array. + * @param {Function} setter The function to set accumulator values. + * @param {Function} [initializer] The accumulator object initializer. + * @returns {Function} Returns the new aggregator function. */ - function arrayShuffle(array) { - return shuffleSelf(copyArray(array)); + function createAggregator(setter, initializer) { + return function(collection, iteratee) { + var func = isArray(collection) ? arrayAggregator : baseAggregator, + accumulator = initializer ? initializer() : {}; + + return func(collection, setter, getIteratee(iteratee, 2), accumulator); + }; } /** - * This function is like `assignValue` except that it doesn't assign - * `undefined` values. + * Creates a function like `_.assign`. * * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @param {Function} assigner The function to assign values. + * @returns {Function} Returns the new assigner function. */ - function assignMergeValue(object, key, value) { - if ((value !== undefined && !eq(object[key], value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } + function createAssigner(assigner) { + return baseRest(function(object, sources) { + var index = -1, + length = sources.length, + customizer = length > 1 ? sources[length - 1] : undefined, + guard = length > 2 ? sources[2] : undefined; + + customizer = (assigner.length > 3 && typeof customizer == 'function') + ? (length--, customizer) + : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + customizer = length < 3 ? undefined : customizer; + length = 1; + } + object = Object(object); + while (++index < length) { + var source = sources[index]; + if (source) { + assigner(object, source, index, customizer); + } + } + return object; + }); } /** - * Assigns `value` to `key` of `object` if the existing value is not equivalent - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. + * Creates a `baseEach` or `baseEachRight` function. * * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @param {Function} eachFunc The function to iterate over a collection. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ - function assignValue(object, key, value) { - var objValue = object[key]; - if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) || - (value === undefined && !(key in object))) { - baseAssignValue(object, key, value); - } + function createBaseEach(eachFunc, fromRight) { + return function(collection, iteratee) { + if (collection == null) { + return collection; + } + if (!isArrayLike(collection)) { + return eachFunc(collection, iteratee); + } + var length = collection.length, + index = fromRight ? length : -1, + iterable = Object(collection); + + while ((fromRight ? index-- : ++index < length)) { + if (iteratee(iterable[index], index, iterable) === false) { + break; + } + } + return collection; + }; } /** - * Gets the index at which the `key` is found in `array` of key-value pairs. + * Creates a base function for methods like `_.forIn` and `_.forOwn`. * * @private - * @param {Array} array The array to inspect. - * @param {*} key The key to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new base function. */ - function assocIndexOf(array, key) { - var length = array.length; - while (length--) { - if (eq(array[length][0], key)) { - return length; + function createBaseFor(fromRight) { + return function(object, iteratee, keysFunc) { + var index = -1, + iterable = Object(object), + props = keysFunc(object), + length = props.length; + + while (length--) { + var key = props[fromRight ? length : ++index]; + if (iteratee(iterable[key], key, iterable) === false) { + break; + } } - } - return -1; + return object; + }; } /** - * Aggregates elements of `collection` on `accumulator` with keys transformed - * by `iteratee` and values set by `setter`. + * Creates a function that wraps `func` to invoke it with the optional `this` + * binding of `thisArg`. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform keys. - * @param {Object} accumulator The initial aggregated object. - * @returns {Function} Returns `accumulator`. + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @returns {Function} Returns the new wrapped function. */ - function baseAggregator(collection, setter, iteratee, accumulator) { - baseEach(collection, function(value, key, collection) { - setter(accumulator, value, iteratee(value), collection); - }); - return accumulator; + function createBind(func, bitmask, thisArg) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); + + function wrapper() { + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return fn.apply(isBind ? thisArg : this, arguments); + } + return wrapper; } /** - * The base implementation of `_.assign` without support for multiple sources - * or `customizer` functions. + * Creates a function like `_.lowerFirst`. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. + * @param {string} methodName The name of the `String` case method to use. + * @returns {Function} Returns the new case function. */ - function baseAssign(object, source) { - return object && copyObject(source, keys(source), object); + function createCaseFirst(methodName) { + return function(string) { + string = toString(string); + + var strSymbols = hasUnicode(string) + ? stringToArray(string) + : undefined; + + var chr = strSymbols + ? strSymbols[0] + : string.charAt(0); + + var trailing = strSymbols + ? castSlice(strSymbols, 1).join('') + : string.slice(1); + + return chr[methodName]() + trailing; + }; } /** - * The base implementation of `_.assignIn` without support for multiple sources - * or `customizer` functions. + * Creates a function like `_.camelCase`. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @returns {Object} Returns `object`. + * @param {Function} callback The function to combine each word. + * @returns {Function} Returns the new compounder function. */ - function baseAssignIn(object, source) { - return object && copyObject(source, keysIn(source), object); + function createCompounder(callback) { + return function(string) { + return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); + }; } /** - * The base implementation of `assignValue` and `assignMergeValue` without - * value checks. + * Creates a function that produces an instance of `Ctor` regardless of + * whether it was invoked as part of a `new` expression or by `call` or `apply`. * * @private - * @param {Object} object The object to modify. - * @param {string} key The key of the property to assign. - * @param {*} value The value to assign. + * @param {Function} Ctor The constructor to wrap. + * @returns {Function} Returns the new wrapped function. */ - function baseAssignValue(object, key, value) { - if (key == '__proto__' && defineProperty) { - defineProperty(object, key, { - 'configurable': true, - 'enumerable': true, - 'value': value, - 'writable': true - }); - } else { - object[key] = value; - } + function createCtor(Ctor) { + return function() { + // Use a `switch` statement to work with class constructors. See + // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist + // for more details. + var args = arguments; + switch (args.length) { + case 0: return new Ctor; + case 1: return new Ctor(args[0]); + case 2: return new Ctor(args[0], args[1]); + case 3: return new Ctor(args[0], args[1], args[2]); + case 4: return new Ctor(args[0], args[1], args[2], args[3]); + case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); + case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); + case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); + } + var thisBinding = baseCreate(Ctor.prototype), + result = Ctor.apply(thisBinding, args); + + // Mimic the constructor's `return` behavior. + // See https://es5.github.io/#x13.2.2 for more details. + return isObject(result) ? result : thisBinding; + }; } /** - * The base implementation of `_.at` without support for individual paths. + * Creates a function that wraps `func` to enable currying. * * @private - * @param {Object} object The object to iterate over. - * @param {string[]} paths The property paths to pick. - * @returns {Array} Returns the picked elements. + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {number} arity The arity of `func`. + * @returns {Function} Returns the new wrapped function. */ - function baseAt(object, paths) { - var index = -1, - length = paths.length, - result = Array(length), - skip = object == null; + function createCurry(func, bitmask, arity) { + var Ctor = createCtor(func); - while (++index < length) { - result[index] = skip ? undefined : get(object, paths[index]); + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length, + placeholder = getHolder(wrapper); + + while (index--) { + args[index] = arguments[index]; + } + var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) + ? [] + : replaceHolders(args, placeholder); + + length -= holders.length; + if (length < arity) { + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, undefined, + args, holders, undefined, undefined, arity - length); + } + var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + return apply(fn, this, args); } - return result; + return wrapper; } /** - * The base implementation of `_.clamp` which doesn't coerce arguments. + * Creates a `_.find` or `_.findLast` function. * * @private - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. + * @param {Function} findIndexFunc The function to find the collection index. + * @returns {Function} Returns the new find function. */ - function baseClamp(number, lower, upper) { - if (number === number) { - if (upper !== undefined) { - number = number <= upper ? number : upper; - } - if (lower !== undefined) { - number = number >= lower ? number : lower; + function createFind(findIndexFunc) { + return function(collection, predicate, fromIndex) { + var iterable = Object(collection); + if (!isArrayLike(collection)) { + var iteratee = getIteratee(predicate, 3); + collection = keys(collection); + predicate = function(key) { return iteratee(iterable[key], key, iterable); }; } - } - return number; + var index = findIndexFunc(collection, predicate, fromIndex); + return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; + }; } /** - * The base implementation of `_.clone` and `_.cloneDeep` which tracks - * traversed objects. + * Creates a `_.flow` or `_.flowRight` function. * * @private - * @param {*} value The value to clone. - * @param {boolean} bitmask The bitmask flags. - * 1 - Deep clone - * 2 - Flatten inherited properties - * 4 - Clone symbols - * @param {Function} [customizer] The function to customize cloning. - * @param {string} [key] The key of `value`. - * @param {Object} [object] The parent object of `value`. - * @param {Object} [stack] Tracks traversed objects and their clone counterparts. - * @returns {*} Returns the cloned value. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new flow function. */ - function baseClone(value, bitmask, customizer, key, object, stack) { - var result, - isDeep = bitmask & CLONE_DEEP_FLAG, - isFlat = bitmask & CLONE_FLAT_FLAG, - isFull = bitmask & CLONE_SYMBOLS_FLAG; - - if (customizer) { - result = object ? customizer(value, key, object, stack) : customizer(value); - } - if (result !== undefined) { - return result; - } - if (!isObject(value)) { - return value; - } - var isArr = isArray(value); - if (isArr) { - result = initCloneArray(value); - if (!isDeep) { - return copyArray(value, result); - } - } else { - var tag = getTag(value), - isFunc = tag == funcTag || tag == genTag; + function createFlow(fromRight) { + return flatRest(function(funcs) { + var length = funcs.length, + index = length, + prereq = LodashWrapper.prototype.thru; - if (isBuffer(value)) { - return cloneBuffer(value, isDeep); + if (fromRight) { + funcs.reverse(); } - if (tag == objectTag || tag == argsTag || (isFunc && !object)) { - result = (isFlat || isFunc) ? {} : initCloneObject(value); - if (!isDeep) { - return isFlat - ? copySymbolsIn(value, baseAssignIn(result, value)) - : copySymbols(value, baseAssign(result, value)); + while (index--) { + var func = funcs[index]; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } - } else { - if (!cloneableTags[tag]) { - return object ? value : {}; + if (prereq && !wrapper && getFuncName(func) == 'wrapper') { + var wrapper = new LodashWrapper([], true); } - result = initCloneByTag(value, tag, isDeep); } - } - // Check for circular references and return its corresponding clone. - stack || (stack = new Stack); - var stacked = stack.get(value); - if (stacked) { - return stacked; - } - stack.set(value, result); - - if (isSet(value)) { - value.forEach(function(subValue) { - result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack)); - }); - } else if (isMap(value)) { - value.forEach(function(subValue, key) { - result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack)); - }); - } + index = wrapper ? index : length; + while (++index < length) { + func = funcs[index]; - var keysFunc = isFull - ? (isFlat ? getAllKeysIn : getAllKeys) - : (isFlat ? keysIn : keys); + var funcName = getFuncName(func), + data = funcName == 'wrapper' ? getData(func) : undefined; - var props = isArr ? undefined : keysFunc(value); - arrayEach(props || value, function(subValue, key) { - if (props) { - key = subValue; - subValue = value[key]; + if (data && isLaziable(data[0]) && + data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && + !data[4].length && data[9] == 1 + ) { + wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); + } else { + wrapper = (func.length == 1 && isLaziable(func)) + ? wrapper[funcName]() + : wrapper.thru(func); + } } - // Recursively populate clone (susceptible to call stack limits). - assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack)); + return function() { + var args = arguments, + value = args[0]; + + if (wrapper && args.length == 1 && isArray(value)) { + return wrapper.plant(value).value(); + } + var index = 0, + result = length ? funcs[index].apply(this, args) : value; + + while (++index < length) { + result = funcs[index].call(this, result); + } + return result; + }; }); - return result; } /** - * The base implementation of `_.conforms` which doesn't clone `source`. + * Creates a function that wraps `func` to invoke it with optional `this` + * binding of `thisArg`, partial application, and currying. * * @private - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [partialsRight] The arguments to append to those provided + * to the new function. + * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. */ - function baseConforms(source) { - var props = keys(source); - return function(object) { - return baseConformsTo(object, source, props); - }; - } + function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { + var isAry = bitmask & WRAP_ARY_FLAG, + isBind = bitmask & WRAP_BIND_FLAG, + isBindKey = bitmask & WRAP_BIND_KEY_FLAG, + isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), + isFlip = bitmask & WRAP_FLIP_FLAG, + Ctor = isBindKey ? undefined : createCtor(func); - /** - * The base implementation of `_.conformsTo` which accepts `props` to check. - * - * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. - */ - function baseConformsTo(object, source, props) { - var length = props.length; - if (object == null) { - return !length; - } - object = Object(object); - while (length--) { - var key = props[length], - predicate = source[key], - value = object[key]; + function wrapper() { + var length = arguments.length, + args = Array(length), + index = length; - if ((value === undefined && !(key in object)) || !predicate(value)) { - return false; + while (index--) { + args[index] = arguments[index]; + } + if (isCurried) { + var placeholder = getHolder(wrapper), + holdersCount = countHolders(args, placeholder); + } + if (partials) { + args = composeArgs(args, partials, holders, isCurried); + } + if (partialsRight) { + args = composeArgsRight(args, partialsRight, holdersRight, isCurried); + } + length -= holdersCount; + if (isCurried && length < arity) { + var newHolders = replaceHolders(args, placeholder); + return createRecurry( + func, bitmask, createHybrid, wrapper.placeholder, thisArg, + args, newHolders, argPos, ary, arity - length + ); + } + var thisBinding = isBind ? thisArg : this, + fn = isBindKey ? thisBinding[func] : func; + + length = args.length; + if (argPos) { + args = reorder(args, argPos); + } else if (isFlip && length > 1) { + args.reverse(); + } + if (isAry && ary < length) { + args.length = ary; + } + if (this && this !== root && this instanceof wrapper) { + fn = Ctor || createCtor(fn); } + return fn.apply(thisBinding, args); } - return true; + return wrapper; } /** - * The base implementation of `_.delay` and `_.defer` which accepts `args` - * to provide to `func`. + * Creates a function like `_.invertBy`. * * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {Array} args The arguments to provide to `func`. - * @returns {number|Object} Returns the timer id or timeout object. + * @param {Function} setter The function to set accumulator values. + * @param {Function} toIteratee The function to resolve iteratees. + * @returns {Function} Returns the new inverter function. */ - function baseDelay(func, wait, args) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return setTimeout(function() { func.apply(undefined, args); }, wait); + function createInverter(setter, toIteratee) { + return function(object, iteratee) { + return baseInverter(object, setter, toIteratee(iteratee), {}); + }; } /** - * The base implementation of methods like `_.difference` without support - * for excluding multiple arrays or iteratee shorthands. + * Creates a function that performs a mathematical operation on two values. * * @private - * @param {Array} array The array to inspect. - * @param {Array} values The values to exclude. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. + * @param {Function} operator The function to perform the operation. + * @param {number} [defaultValue] The value used for `undefined` arguments. + * @returns {Function} Returns the new mathematical operation function. */ - function baseDifference(array, values, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - isCommon = true, - length = array.length, - result = [], - valuesLength = values.length; - - if (!length) { - return result; - } - if (iteratee) { - values = arrayMap(values, baseUnary(iteratee)); - } - if (comparator) { - includes = arrayIncludesWith; - isCommon = false; - } - else if (values.length >= LARGE_ARRAY_SIZE) { - includes = cacheHas; - isCommon = false; - values = new SetCache(values); - } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee == null ? value : iteratee(value); - - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var valuesIndex = valuesLength; - while (valuesIndex--) { - if (values[valuesIndex] === computed) { - continue outer; - } - } - result.push(value); + function createMathOperation(operator, defaultValue) { + return function(value, other) { + var result; + if (value === undefined && other === undefined) { + return defaultValue; } - else if (!includes(values, computed, comparator)) { - result.push(value); + if (value !== undefined) { + result = value; } - } - return result; + if (other !== undefined) { + if (result === undefined) { + return other; + } + if (typeof value == 'string' || typeof other == 'string') { + value = baseToString(value); + other = baseToString(other); + } else { + value = baseToNumber(value); + other = baseToNumber(other); + } + result = operator(value, other); + } + return result; + }; } /** - * The base implementation of `_.forEach` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEach = createBaseEach(baseForOwn); - - /** - * The base implementation of `_.forEachRight` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - */ - var baseEachRight = createBaseEach(baseForOwnRight, true); - - /** - * The base implementation of `_.every` without support for iteratee shorthands. + * Creates a function like `_.over`. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false` + * @param {Function} arrayFunc The function to iterate over iteratees. + * @returns {Function} Returns the new over function. */ - function baseEvery(collection, predicate) { - var result = true; - baseEach(collection, function(value, index, collection) { - result = !!predicate(value, index, collection); - return result; + function createOver(arrayFunc) { + return flatRest(function(iteratees) { + iteratees = arrayMap(iteratees, baseUnary(getIteratee())); + return baseRest(function(args) { + var thisArg = this; + return arrayFunc(iteratees, function(iteratee) { + return apply(iteratee, thisArg, args); + }); + }); }); - return result; } /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. + * Creates the padding for `string` based on `length`. The `chars` string + * is truncated if the number of characters exceeds `length`. * * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. + * @param {number} length The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padding for `string`. */ - function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - - while (++index < length) { - var value = array[index], - current = iteratee(value); + function createPadding(length, chars) { + chars = chars === undefined ? ' ' : baseToString(chars); - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; - } + var charsLength = chars.length; + if (charsLength < 2) { + return charsLength ? baseRepeat(chars, length) : chars; } - return result; + var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); + return hasUnicode(chars) + ? castSlice(stringToArray(result), 0, length).join('') + : result.slice(0, length); } /** - * The base implementation of `_.fill` without an iteratee call guard. + * Creates a function that wraps `func` to invoke it with the `this` binding + * of `thisArg` and `partials` prepended to the arguments it receives. * * @private - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {*} thisArg The `this` binding of `func`. + * @param {Array} partials The arguments to prepend to those provided to + * the new function. + * @returns {Function} Returns the new wrapped function. */ - function baseFill(array, value, start, end) { - var length = array.length; + function createPartial(func, bitmask, thisArg, partials) { + var isBind = bitmask & WRAP_BIND_FLAG, + Ctor = createCtor(func); - start = toInteger(start); - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = (end === undefined || end > length) ? length : toInteger(end); - if (end < 0) { - end += length; - } - end = start > end ? 0 : toLength(end); - while (start < end) { - array[start++] = value; + function wrapper() { + var argsIndex = -1, + argsLength = arguments.length, + leftIndex = -1, + leftLength = partials.length, + args = Array(leftLength + argsLength), + fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + + while (++leftIndex < leftLength) { + args[leftIndex] = partials[leftIndex]; + } + while (argsLength--) { + args[leftIndex++] = arguments[++argsIndex]; + } + return apply(fn, isBind ? thisArg : this, args); } - return array; + return wrapper; } /** - * The base implementation of `_.filter` without support for iteratee shorthands. + * Creates a `_.range` or `_.rangeRight` function. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {Array} Returns the new filtered array. + * @param {boolean} [fromRight] Specify iterating from right to left. + * @returns {Function} Returns the new range function. */ - function baseFilter(collection, predicate) { - var result = []; - baseEach(collection, function(value, index, collection) { - if (predicate(value, index, collection)) { - result.push(value); + function createRange(fromRight) { + return function(start, end, step) { + if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { + end = step = undefined; } - }); - return result; + // Ensure the sign of `-0` is preserved. + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); + return baseRange(start, end, step, fromRight); + }; } /** - * The base implementation of `_.flatten` with support for restricting flattening. + * Creates a function that performs a relational operation on two values. * * @private - * @param {Array} array The array to flatten. - * @param {number} depth The maximum recursion depth. - * @param {boolean} [predicate=isFlattenable] The function invoked per iteration. - * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks. - * @param {Array} [result=[]] The initial result value. - * @returns {Array} Returns the new flattened array. + * @param {Function} operator The function to perform the operation. + * @returns {Function} Returns the new relational operation function. */ - function baseFlatten(array, depth, predicate, isStrict, result) { - var index = -1, - length = array.length; - - predicate || (predicate = isFlattenable); - result || (result = []); - - while (++index < length) { - var value = array[index]; - if (depth > 0 && predicate(value)) { - if (depth > 1) { - // Recursively flatten arrays (susceptible to call stack limits). - baseFlatten(value, depth - 1, predicate, isStrict, result); - } else { - arrayPush(result, value); - } - } else if (!isStrict) { - result[result.length] = value; + function createRelationalOperation(operator) { + return function(value, other) { + if (!(typeof value == 'string' && typeof other == 'string')) { + value = toNumber(value); + other = toNumber(other); } - } - return result; + return operator(value, other); + }; } /** - * The base implementation of `baseForOwn` which iterates over `object` - * properties returned by `keysFunc` and invokes `iteratee` for each property. - * Iteratee functions may exit iteration early by explicitly returning `false`. + * Creates a function that wraps `func` to continue currying. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. + * @param {Function} func The function to wrap. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @param {Function} wrapFunc The function to create the `func` wrapper. + * @param {*} placeholder The placeholder value. + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to prepend to those provided to + * the new function. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. */ - var baseFor = createBaseFor(); + function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { + var isCurry = bitmask & WRAP_CURRY_FLAG, + newHolders = isCurry ? holders : undefined, + newHoldersRight = isCurry ? undefined : holders, + newPartials = isCurry ? partials : undefined, + newPartialsRight = isCurry ? undefined : partials; - /** - * This function is like `baseFor` except that it iterates over properties - * in the opposite order. - * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @param {Function} keysFunc The function to get the keys of `object`. - * @returns {Object} Returns `object`. - */ - var baseForRight = createBaseFor(true); + bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); + bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); + + if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { + bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + } + var newData = [ + func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, + newHoldersRight, argPos, ary, arity + ]; + + var result = wrapFunc.apply(undefined, newData); + if (isLaziable(func)) { + setData(result, newData); + } + result.placeholder = placeholder; + return setWrapToString(result, func, bitmask); + } /** - * The base implementation of `_.forOwn` without support for iteratee shorthands. + * Creates a function like `_.round`. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. + * @param {string} methodName The name of the `Math` method to use when rounding. + * @returns {Function} Returns the new round function. */ - function baseForOwn(object, iteratee) { - return object && baseFor(object, iteratee, keys); + function createRound(methodName) { + var func = Math[methodName]; + return function(number, precision) { + number = toNumber(number); + precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); + if (precision && nativeIsFinite(number)) { + // Shift with exponential notation to avoid floating-point issues. + // See [MDN](https://mdn.io/round#Examples) for more details. + var pair = (toString(number) + 'e').split('e'), + value = func(pair[0] + 'e' + (+pair[1] + precision)); + + pair = (toString(value) + 'e').split('e'); + return +(pair[0] + 'e' + (+pair[1] - precision)); + } + return func(number); + }; } /** - * The base implementation of `_.forOwnRight` without support for iteratee shorthands. + * Creates a set object of `values`. * * @private - * @param {Object} object The object to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Object} Returns `object`. + * @param {Array} values The values to add to the set. + * @returns {Object} Returns the new set. */ - function baseForOwnRight(object, iteratee) { - return object && baseForRight(object, iteratee, keys); - } + var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { + return new Set(values); + }; /** - * The base implementation of `_.functions` which creates an array of - * `object` function property names filtered from `props`. + * Creates a `_.toPairs` or `_.toPairsIn` function. * * @private - * @param {Object} object The object to inspect. - * @param {Array} props The property names to filter. - * @returns {Array} Returns the function names. + * @param {Function} keysFunc The function to get the keys of a given object. + * @returns {Function} Returns the new pairs function. */ - function baseFunctions(object, props) { - return arrayFilter(props, function(key) { - return isFunction(object[key]); - }); + function createToPairs(keysFunc) { + return function(object) { + var tag = getTag(object); + if (tag == mapTag) { + return mapToArray(object); + } + if (tag == setTag) { + return setToPairs(object); + } + return baseToPairs(object, keysFunc(object)); + }; } /** - * The base implementation of `_.get` without support for default values. + * Creates a function that either curries or invokes `func` with optional + * `this` binding and partially applied arguments. * * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @returns {*} Returns the resolved value. + * @param {Function|string} func The function or method name to wrap. + * @param {number} bitmask The bitmask flags. + * 1 - `_.bind` + * 2 - `_.bindKey` + * 4 - `_.curry` or `_.curryRight` of a bound function + * 8 - `_.curry` + * 16 - `_.curryRight` + * 32 - `_.partial` + * 64 - `_.partialRight` + * 128 - `_.rearg` + * 256 - `_.ary` + * 512 - `_.flip` + * @param {*} [thisArg] The `this` binding of `func`. + * @param {Array} [partials] The arguments to be partially applied. + * @param {Array} [holders] The `partials` placeholder indexes. + * @param {Array} [argPos] The argument positions of the new function. + * @param {number} [ary] The arity cap of `func`. + * @param {number} [arity] The arity of `func`. + * @returns {Function} Returns the new wrapped function. */ - function baseGet(object, path) { - path = castPath(path, object); + function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { + var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; + if (!isBindKey && typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + var length = partials ? partials.length : 0; + if (!length) { + bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); + partials = holders = undefined; + } + ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); + arity = arity === undefined ? arity : toInteger(arity); + length -= holders ? holders.length : 0; - var index = 0, - length = path.length; + if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { + var partialsRight = partials, + holdersRight = holders; - while (object != null && index < length) { - object = object[toKey(path[index++])]; + partials = holders = undefined; } - return (index && index == length) ? object : undefined; - } + var data = isBindKey ? undefined : getData(func); - /** - * The base implementation of `getAllKeys` and `getAllKeysIn` which uses - * `keysFunc` and `symbolsFunc` to get the enumerable property names and - * symbols of `object`. - * - * @private - * @param {Object} object The object to query. - * @param {Function} keysFunc The function to get the keys of `object`. - * @param {Function} symbolsFunc The function to get the symbols of `object`. - * @returns {Array} Returns the array of property names and symbols. - */ - function baseGetAllKeys(object, keysFunc, symbolsFunc) { - var result = keysFunc(object); - return isArray(object) ? result : arrayPush(result, symbolsFunc(object)); - } + var newData = [ + func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, + argPos, ary, arity + ]; - /** - * The base implementation of `getTag` without fallbacks for buggy environments. - * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. - */ - function baseGetTag(value) { - if (value == null) { - return value === undefined ? undefinedTag : nullTag; + if (data) { + mergeData(newData, data); } - return (symToStringTag && symToStringTag in Object(value)) - ? getRawTag(value) - : objectToString(value); - } + func = newData[0]; + bitmask = newData[1]; + thisArg = newData[2]; + partials = newData[3]; + holders = newData[4]; + arity = newData[9] = newData[9] === undefined + ? (isBindKey ? 0 : func.length) + : nativeMax(newData[9] - length, 0); - /** - * The base implementation of `_.gt` which doesn't coerce arguments. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - */ - function baseGt(value, other) { - return value > other; + if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { + bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); + } + if (!bitmask || bitmask == WRAP_BIND_FLAG) { + var result = createBind(func, bitmask, thisArg); + } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { + result = createCurry(func, bitmask, arity); + } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { + result = createPartial(func, bitmask, thisArg, partials); + } else { + result = createHybrid.apply(undefined, newData); + } + var setter = data ? baseSetData : setData; + return setWrapToString(setter(result, newData), func, bitmask); } /** - * The base implementation of `_.has` without support for deep paths. + * Used by `_.defaults` to customize its `_.assignIn` use to assign properties + * of source objects to the destination object for all destination properties + * that resolve to `undefined`. * * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to assign. + * @param {Object} object The parent object of `objValue`. + * @returns {*} Returns the value to assign. */ - function baseHas(object, key) { - return object != null && hasOwnProperty.call(object, key); + function customDefaultsAssignIn(objValue, srcValue, key, object) { + if (objValue === undefined || + (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { + return srcValue; + } + return objValue; } /** - * The base implementation of `_.hasIn` without support for deep paths. + * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source + * objects into destination objects that are passed thru. * * @private - * @param {Object} [object] The object to query. - * @param {Array|string} key The key to check. - * @returns {boolean} Returns `true` if `key` exists, else `false`. + * @param {*} objValue The destination value. + * @param {*} srcValue The source value. + * @param {string} key The key of the property to merge. + * @param {Object} object The parent object of `objValue`. + * @param {Object} source The parent object of `srcValue`. + * @param {Object} [stack] Tracks traversed source values and their merged + * counterparts. + * @returns {*} Returns the value to assign. */ - function baseHasIn(object, key) { - return object != null && key in Object(object); + function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { + if (isObject(objValue) && isObject(srcValue)) { + // Recursively merge objects and arrays (susceptible to call stack limits). + stack.set(srcValue, objValue); + baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); + stack['delete'](srcValue); + } + return objValue; } /** - * The base implementation of `_.inRange` which doesn't coerce arguments. + * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain + * objects. * * @private - * @param {number} number The number to check. - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @param {*} value The value to inspect. + * @param {string} key The key of the property to inspect. + * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. */ - function baseInRange(number, start, end) { - return number >= nativeMin(start, end) && number < nativeMax(start, end); + function customOmitClone(value) { + return isPlainObject(value) ? undefined : value; } /** - * The base implementation of methods like `_.intersection`, without support - * for iteratee shorthands, that accepts an array of arrays to inspect. + * A specialized version of `baseIsEqualDeep` for arrays with support for + * partial deep comparisons. * * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of shared values. + * @param {Array} array The array to compare. + * @param {Array} other The other array to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `array` and `other` objects. + * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. */ - function baseIntersection(arrays, iteratee, comparator) { - var includes = comparator ? arrayIncludesWith : arrayIncludes, - length = arrays[0].length, - othLength = arrays.length, - othIndex = othLength, - caches = Array(othLength), - maxLength = Infinity, - result = []; + function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + arrLength = array.length, + othLength = other.length; - while (othIndex--) { - var array = arrays[othIndex]; - if (othIndex && iteratee) { - array = arrayMap(array, baseUnary(iteratee)); - } - maxLength = nativeMin(array.length, maxLength); - caches[othIndex] = !comparator && (iteratee || (length >= 120 && array.length >= 120)) - ? new SetCache(othIndex && array) - : undefined; + if (arrLength != othLength && !(isPartial && othLength > arrLength)) { + return false; + } + // Check that cyclic values are equal. + var arrStacked = stack.get(array); + var othStacked = stack.get(other); + if (arrStacked && othStacked) { + return arrStacked == other && othStacked == array; } - array = arrays[0]; - var index = -1, - seen = caches[0]; + result = true, + seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - outer: - while (++index < length && result.length < maxLength) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; + stack.set(array, other); + stack.set(other, array); - value = (comparator || value !== 0) ? value : 0; - if (!(seen - ? cacheHas(seen, computed) - : includes(result, computed, comparator) - )) { - othIndex = othLength; - while (--othIndex) { - var cache = caches[othIndex]; - if (!(cache - ? cacheHas(cache, computed) - : includes(arrays[othIndex], computed, comparator)) - ) { - continue outer; - } + // Ignore non-index properties. + while (++index < arrLength) { + var arrValue = array[index], + othValue = other[index]; + + if (customizer) { + var compared = isPartial + ? customizer(othValue, arrValue, index, other, array, stack) + : customizer(arrValue, othValue, index, array, other, stack); + } + if (compared !== undefined) { + if (compared) { + continue; } - if (seen) { - seen.push(computed); + result = false; + break; + } + // Recursively compare arrays (susceptible to call stack limits). + if (seen) { + if (!arraySome(other, function(othValue, othIndex) { + if (!cacheHas(seen, othIndex) && + (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { + return seen.push(othIndex); + } + })) { + result = false; + break; } - result.push(value); + } else if (!( + arrValue === othValue || + equalFunc(arrValue, othValue, bitmask, customizer, stack) + )) { + result = false; + break; } } + stack['delete'](array); + stack['delete'](other); return result; } /** - * The base implementation of `_.invert` and `_.invertBy` which inverts - * `object` with values transformed by `iteratee` and set by `setter`. + * A specialized version of `baseIsEqualDeep` for comparing objects of + * the same `toStringTag`. * - * @private - * @param {Object} object The object to iterate over. - * @param {Function} setter The function to set `accumulator` values. - * @param {Function} iteratee The iteratee to transform values. - * @param {Object} accumulator The initial inverted object. - * @returns {Function} Returns `accumulator`. - */ - function baseInverter(object, setter, iteratee, accumulator) { - baseForOwn(object, function(value, key, object) { - setter(accumulator, iteratee(value), key, object); - }); - return accumulator; - } - - /** - * The base implementation of `_.invoke` without support for individual - * method arguments. + * **Note:** This function only supports comparing values with tags of + * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. * * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path of the method to invoke. - * @param {Array} args The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. + * @param {Object} object The object to compare. + * @param {Object} other The other object to compare. + * @param {string} tag The `toStringTag` of the objects to compare. + * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. + * @param {Function} customizer The function to customize comparisons. + * @param {Function} equalFunc The function to determine equivalents of values. + * @param {Object} stack Tracks traversed `object` and `other` objects. + * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function baseInvoke(object, path, args) { - path = castPath(path, object); - object = parent(object, path); - var func = object == null ? object : object[toKey(last(path))]; - return func == null ? undefined : apply(func, object, args); - } + function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { + switch (tag) { + case dataViewTag: + if ((object.byteLength != other.byteLength) || + (object.byteOffset != other.byteOffset)) { + return false; + } + object = object.buffer; + other = other.buffer; - /** - * The base implementation of `_.isArguments`. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - */ - function baseIsArguments(value) { - return isObjectLike(value) && baseGetTag(value) == argsTag; - } + case arrayBufferTag: + if ((object.byteLength != other.byteLength) || + !equalFunc(new Uint8Array(object), new Uint8Array(other))) { + return false; + } + return true; - /** - * The base implementation of `_.isArrayBuffer` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. - */ - function baseIsArrayBuffer(value) { - return isObjectLike(value) && baseGetTag(value) == arrayBufferTag; - } + case boolTag: + case dateTag: + case numberTag: + // Coerce booleans to `1` or `0` and dates to milliseconds. + // Invalid dates are coerced to `NaN`. + return eq(+object, +other); - /** - * The base implementation of `_.isDate` without Node.js optimizations. - * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. - */ - function baseIsDate(value) { - return isObjectLike(value) && baseGetTag(value) == dateTag; - } + case errorTag: + return object.name == other.name && object.message == other.message; - /** - * The base implementation of `_.isEqual` which supports partial comparisons - * and tracks traversed objects. - * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {boolean} bitmask The bitmask flags. - * 1 - Unordered comparison - * 2 - Partial comparison - * @param {Function} [customizer] The function to customize comparisons. - * @param {Object} [stack] Tracks traversed `value` and `other` objects. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - */ - function baseIsEqual(value, other, bitmask, customizer, stack) { - if (value === other) { - return true; - } - if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) { - return value !== value && other !== other; + case regexpTag: + case stringTag: + // Coerce regexes to strings and treat strings, primitives and objects, + // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring + // for more details. + return object == (other + ''); + + case mapTag: + var convert = mapToArray; + + case setTag: + var isPartial = bitmask & COMPARE_PARTIAL_FLAG; + convert || (convert = setToArray); + + if (object.size != other.size && !isPartial) { + return false; + } + // Assume cyclic values are equal. + var stacked = stack.get(object); + if (stacked) { + return stacked == other; + } + bitmask |= COMPARE_UNORDERED_FLAG; + + // Recursively compare objects (susceptible to call stack limits). + stack.set(object, other); + var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); + stack['delete'](object); + return result; + + case symbolTag: + if (symbolValueOf) { + return symbolValueOf.call(object) == symbolValueOf.call(other); + } } - return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack); + return false; } /** - * A specialized version of `baseIsEqual` for arrays and objects which performs - * deep comparisons and tracks traversed objects enabling objects with circular - * references to be compared. + * A specialized version of `baseIsEqualDeep` for objects with support for + * partial deep comparisons. * * @private * @param {Object} object The object to compare. @@ -128743,14272 +127934,11773 @@ exports.getQualification = getQualification; * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. * @param {Function} customizer The function to customize comparisons. * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} [stack] Tracks traversed `object` and `other` objects. + * @param {Object} stack Tracks traversed `object` and `other` objects. * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. */ - function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) { - var objIsArr = isArray(object), - othIsArr = isArray(other), - objTag = objIsArr ? arrayTag : getTag(object), - othTag = othIsArr ? arrayTag : getTag(other); - - objTag = objTag == argsTag ? objectTag : objTag; - othTag = othTag == argsTag ? objectTag : othTag; - - var objIsObj = objTag == objectTag, - othIsObj = othTag == objectTag, - isSameTag = objTag == othTag; + function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { + var isPartial = bitmask & COMPARE_PARTIAL_FLAG, + objProps = getAllKeys(object), + objLength = objProps.length, + othProps = getAllKeys(other), + othLength = othProps.length; - if (isSameTag && isBuffer(object)) { - if (!isBuffer(other)) { + if (objLength != othLength && !isPartial) { + return false; + } + var index = objLength; + while (index--) { + var key = objProps[index]; + if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { return false; } - objIsArr = true; - objIsObj = false; } - if (isSameTag && !objIsObj) { - stack || (stack = new Stack); - return (objIsArr || isTypedArray(object)) - ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) - : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); + // Check that cyclic values are equal. + var objStacked = stack.get(object); + var othStacked = stack.get(other); + if (objStacked && othStacked) { + return objStacked == other && othStacked == object; } - if (!(bitmask & COMPARE_PARTIAL_FLAG)) { - var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'), - othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__'); + var result = true; + stack.set(object, other); + stack.set(other, object); - if (objIsWrapped || othIsWrapped) { - var objUnwrapped = objIsWrapped ? object.value() : object, - othUnwrapped = othIsWrapped ? other.value() : other; + var skipCtor = isPartial; + while (++index < objLength) { + key = objProps[index]; + var objValue = object[key], + othValue = other[key]; - stack || (stack = new Stack); - return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); + if (customizer) { + var compared = isPartial + ? customizer(othValue, objValue, key, other, object, stack) + : customizer(objValue, othValue, key, object, other, stack); + } + // Recursively compare objects (susceptible to call stack limits). + if (!(compared === undefined + ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) + : compared + )) { + result = false; + break; } + skipCtor || (skipCtor = key == 'constructor'); } - if (!isSameTag) { - return false; + if (result && !skipCtor) { + var objCtor = object.constructor, + othCtor = other.constructor; + + // Non `Object` object instances with different constructors are not equal. + if (objCtor != othCtor && + ('constructor' in object && 'constructor' in other) && + !(typeof objCtor == 'function' && objCtor instanceof objCtor && + typeof othCtor == 'function' && othCtor instanceof othCtor)) { + result = false; + } } - stack || (stack = new Stack); - return equalObjects(object, other, bitmask, customizer, equalFunc, stack); + stack['delete'](object); + stack['delete'](other); + return result; } /** - * The base implementation of `_.isMap` without Node.js optimizations. + * A specialized version of `baseRest` which flattens the rest array. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @param {Function} func The function to apply a rest parameter to. + * @returns {Function} Returns the new function. */ - function baseIsMap(value) { - return isObjectLike(value) && getTag(value) == mapTag; + function flatRest(func) { + return setToString(overRest(func, undefined, flatten), func + ''); } /** - * The base implementation of `_.isMatch` without support for iteratee shorthands. + * Creates an array of own enumerable property names and symbols of `object`. * * @private - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Array} matchData The property names, values, and compare flags to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. */ - function baseIsMatch(object, source, matchData, customizer) { - var index = matchData.length, - length = index, - noCustomizer = !customizer; - - if (object == null) { - return !length; - } - object = Object(object); - while (index--) { - var data = matchData[index]; - if ((noCustomizer && data[2]) - ? data[1] !== object[data[0]] - : !(data[0] in object) - ) { - return false; - } - } - while (++index < length) { - data = matchData[index]; - var key = data[0], - objValue = object[key], - srcValue = data[1]; - - if (noCustomizer && data[2]) { - if (objValue === undefined && !(key in object)) { - return false; - } - } else { - var stack = new Stack; - if (customizer) { - var result = customizer(objValue, srcValue, key, object, source, stack); - } - if (!(result === undefined - ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) - : result - )) { - return false; - } - } - } - return true; + function getAllKeys(object) { + return baseGetAllKeys(object, keys, getSymbols); } /** - * The base implementation of `_.isNative` without bad shim checks. + * Creates an array of own and inherited enumerable property names and + * symbols of `object`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names and symbols. */ - function baseIsNative(value) { - if (!isObject(value) || isMasked(value)) { - return false; - } - var pattern = isFunction(value) ? reIsNative : reIsHostCtor; - return pattern.test(toSource(value)); + function getAllKeysIn(object) { + return baseGetAllKeys(object, keysIn, getSymbolsIn); } /** - * The base implementation of `_.isRegExp` without Node.js optimizations. + * Gets metadata for `func`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @param {Function} func The function to query. + * @returns {*} Returns the metadata for `func`. */ - function baseIsRegExp(value) { - return isObjectLike(value) && baseGetTag(value) == regexpTag; - } + var getData = !metaMap ? noop : function(func) { + return metaMap.get(func); + }; /** - * The base implementation of `_.isSet` without Node.js optimizations. + * Gets the name of `func`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @param {Function} func The function to query. + * @returns {string} Returns the function name. */ - function baseIsSet(value) { - return isObjectLike(value) && getTag(value) == setTag; + function getFuncName(func) { + var result = (func.name + ''), + array = realNames[result], + length = hasOwnProperty.call(realNames, result) ? array.length : 0; + + while (length--) { + var data = array[length], + otherFunc = data.func; + if (otherFunc == null || otherFunc == func) { + return data.name; + } + } + return result; } /** - * The base implementation of `_.isTypedArray` without Node.js optimizations. + * Gets the argument placeholder value for `func`. * * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @param {Function} func The function to inspect. + * @returns {*} Returns the placeholder value. */ - function baseIsTypedArray(value) { - return isObjectLike(value) && - isLength(value.length) && !!typedArrayTags[baseGetTag(value)]; + function getHolder(func) { + var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; + return object.placeholder; } /** - * The base implementation of `_.iteratee`. + * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, + * this function returns the custom method, otherwise it returns `baseIteratee`. + * If arguments are provided, the chosen function is invoked with them and + * its result is returned. * * @private - * @param {*} [value=_.identity] The value to convert to an iteratee. - * @returns {Function} Returns the iteratee. + * @param {*} [value] The value to convert to an iteratee. + * @param {number} [arity] The arity of the created iteratee. + * @returns {Function} Returns the chosen function or its result. */ - function baseIteratee(value) { - // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9. - // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details. - if (typeof value == 'function') { - return value; - } - if (value == null) { - return identity; - } - if (typeof value == 'object') { - return isArray(value) - ? baseMatchesProperty(value[0], value[1]) - : baseMatches(value); - } - return property(value); + function getIteratee() { + var result = lodash.iteratee || iteratee; + result = result === iteratee ? baseIteratee : result; + return arguments.length ? result(arguments[0], arguments[1]) : result; } /** - * The base implementation of `_.keys` which doesn't treat sparse arrays as dense. + * Gets the data for `map`. * * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @param {Object} map The map to query. + * @param {string} key The reference key. + * @returns {*} Returns the map data. */ - function baseKeys(object) { - if (!isPrototype(object)) { - return nativeKeys(object); - } - var result = []; - for (var key in Object(object)) { - if (hasOwnProperty.call(object, key) && key != 'constructor') { - result.push(key); - } - } - return result; + function getMapData(map, key) { + var data = map.__data__; + return isKeyable(key) + ? data[typeof key == 'string' ? 'string' : 'hash'] + : data.map; } /** - * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense. + * Gets the property names, values, and compare flags of `object`. * * @private * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @returns {Array} Returns the match data of `object`. */ - function baseKeysIn(object) { - if (!isObject(object)) { - return nativeKeysIn(object); - } - var isProto = isPrototype(object), - result = []; + function getMatchData(object) { + var result = keys(object), + length = result.length; - for (var key in object) { - if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) { - result.push(key); - } + while (length--) { + var key = result[length], + value = object[key]; + + result[length] = [key, value, isStrictComparable(value)]; } return result; } /** - * The base implementation of `_.lt` which doesn't coerce arguments. + * Gets the native function at `key` of `object`. * * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. + * @param {Object} object The object to query. + * @param {string} key The key of the method to get. + * @returns {*} Returns the function if it's native, else `undefined`. */ - function baseLt(value, other) { - return value < other; + function getNative(object, key) { + var value = getValue(object, key); + return baseIsNative(value) ? value : undefined; } /** - * The base implementation of `_.map` without support for iteratee shorthands. + * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {Array} Returns the new mapped array. + * @param {*} value The value to query. + * @returns {string} Returns the raw `toStringTag`. */ - function baseMap(collection, iteratee) { - var index = -1, - result = isArrayLike(collection) ? Array(collection.length) : []; + function getRawTag(value) { + var isOwn = hasOwnProperty.call(value, symToStringTag), + tag = value[symToStringTag]; - baseEach(collection, function(value, key, collection) { - result[++index] = iteratee(value, key, collection); - }); + try { + value[symToStringTag] = undefined; + var unmasked = true; + } catch (e) {} + + var result = nativeObjectToString.call(value); + if (unmasked) { + if (isOwn) { + value[symToStringTag] = tag; + } else { + delete value[symToStringTag]; + } + } return result; } /** - * The base implementation of `_.matches` which doesn't clone `source`. + * Creates an array of the own enumerable symbols of `object`. * * @private - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. */ - function baseMatches(source) { - var matchData = getMatchData(source); - if (matchData.length == 1 && matchData[0][2]) { - return matchesStrictComparable(matchData[0][0], matchData[0][1]); + var getSymbols = !nativeGetSymbols ? stubArray : function(object) { + if (object == null) { + return []; } - return function(object) { - return object === source || baseIsMatch(object, source, matchData); - }; - } + object = Object(object); + return arrayFilter(nativeGetSymbols(object), function(symbol) { + return propertyIsEnumerable.call(object, symbol); + }); + }; /** - * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`. + * Creates an array of the own and inherited enumerable symbols of `object`. * * @private - * @param {string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of symbols. */ - function baseMatchesProperty(path, srcValue) { - if (isKey(path) && isStrictComparable(srcValue)) { - return matchesStrictComparable(toKey(path), srcValue); + var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { + var result = []; + while (object) { + arrayPush(result, getSymbols(object)); + object = getPrototype(object); } - return function(object) { - var objValue = get(object, path); - return (objValue === undefined && objValue === srcValue) - ? hasIn(object, path) - : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG); - }; - } + return result; + }; /** - * The base implementation of `_.merge` without support for multiple sources. + * Gets the `toStringTag` of `value`. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {number} srcIndex The index of `source`. - * @param {Function} [customizer] The function to customize merged values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. */ - function baseMerge(object, source, srcIndex, customizer, stack) { - if (object === source) { - return; - } - baseFor(source, function(srcValue, key) { - stack || (stack = new Stack); - if (isObject(srcValue)) { - baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack); - } - else { - var newValue = customizer - ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack) - : undefined; + var getTag = baseGetTag; - if (newValue === undefined) { - newValue = srcValue; + // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. + if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || + (Map && getTag(new Map) != mapTag) || + (Promise && getTag(Promise.resolve()) != promiseTag) || + (Set && getTag(new Set) != setTag) || + (WeakMap && getTag(new WeakMap) != weakMapTag)) { + getTag = function(value) { + var result = baseGetTag(value), + Ctor = result == objectTag ? value.constructor : undefined, + ctorString = Ctor ? toSource(Ctor) : ''; + + if (ctorString) { + switch (ctorString) { + case dataViewCtorString: return dataViewTag; + case mapCtorString: return mapTag; + case promiseCtorString: return promiseTag; + case setCtorString: return setTag; + case weakMapCtorString: return weakMapTag; } - assignMergeValue(object, key, newValue); } - }, keysIn); + return result; + }; } /** - * A specialized version of `baseMerge` for arrays and objects which performs - * deep merges and tracks traversed objects enabling objects with circular - * references to be merged. + * Gets the view, applying any `transforms` to the `start` and `end` positions. * * @private - * @param {Object} object The destination object. - * @param {Object} source The source object. - * @param {string} key The key of the value to merge. - * @param {number} srcIndex The index of `source`. - * @param {Function} mergeFunc The function to merge values. - * @param {Function} [customizer] The function to customize assigned values. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - */ - function baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) { - var objValue = safeGet(object, key), - srcValue = safeGet(source, key), - stacked = stack.get(srcValue); - - if (stacked) { - assignMergeValue(object, key, stacked); - return; - } - var newValue = customizer - ? customizer(objValue, srcValue, (key + ''), object, source, stack) - : undefined; - - var isCommon = newValue === undefined; + * @param {number} start The start of the view. + * @param {number} end The end of the view. + * @param {Array} transforms The transformations to apply to the view. + * @returns {Object} Returns an object containing the `start` and `end` + * positions of the view. + */ + function getView(start, end, transforms) { + var index = -1, + length = transforms.length; - if (isCommon) { - var isArr = isArray(srcValue), - isBuff = !isArr && isBuffer(srcValue), - isTyped = !isArr && !isBuff && isTypedArray(srcValue); + while (++index < length) { + var data = transforms[index], + size = data.size; - newValue = srcValue; - if (isArr || isBuff || isTyped) { - if (isArray(objValue)) { - newValue = objValue; - } - else if (isArrayLikeObject(objValue)) { - newValue = copyArray(objValue); - } - else if (isBuff) { - isCommon = false; - newValue = cloneBuffer(srcValue, true); - } - else if (isTyped) { - isCommon = false; - newValue = cloneTypedArray(srcValue, true); - } - else { - newValue = []; - } - } - else if (isPlainObject(srcValue) || isArguments(srcValue)) { - newValue = objValue; - if (isArguments(objValue)) { - newValue = toPlainObject(objValue); - } - else if (!isObject(objValue) || isFunction(objValue)) { - newValue = initCloneObject(srcValue); - } - } - else { - isCommon = false; + switch (data.type) { + case 'drop': start += size; break; + case 'dropRight': end -= size; break; + case 'take': end = nativeMin(end, start + size); break; + case 'takeRight': start = nativeMax(start, end - size); break; } } - if (isCommon) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, newValue); - mergeFunc(newValue, srcValue, srcIndex, customizer, stack); - stack['delete'](srcValue); - } - assignMergeValue(object, key, newValue); + return { 'start': start, 'end': end }; } /** - * The base implementation of `_.nth` which doesn't coerce arguments. + * Extracts wrapper details from the `source` body comment. * * @private - * @param {Array} array The array to query. - * @param {number} n The index of the element to return. - * @returns {*} Returns the nth element of `array`. + * @param {string} source The source to inspect. + * @returns {Array} Returns the wrapper details. */ - function baseNth(array, n) { - var length = array.length; - if (!length) { - return; - } - n += n < 0 ? length : 0; - return isIndex(n, length) ? array[n] : undefined; + function getWrapDetails(source) { + var match = source.match(reWrapDetails); + return match ? match[1].split(reSplitDetails) : []; } /** - * The base implementation of `_.orderBy` without param guards. + * Checks if `path` exists on `object`. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by. - * @param {string[]} orders The sort orders of `iteratees`. - * @returns {Array} Returns the new sorted array. + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @param {Function} hasFunc The function to check properties. + * @returns {boolean} Returns `true` if `path` exists, else `false`. */ - function baseOrderBy(collection, iteratees, orders) { - if (iteratees.length) { - iteratees = arrayMap(iteratees, function(iteratee) { - if (isArray(iteratee)) { - return function(value) { - return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee); - } - } - return iteratee; - }); - } else { - iteratees = [identity]; - } - - var index = -1; - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - - var result = baseMap(collection, function(value, key, collection) { - var criteria = arrayMap(iteratees, function(iteratee) { - return iteratee(value); - }); - return { 'criteria': criteria, 'index': ++index, 'value': value }; - }); + function hasPath(object, path, hasFunc) { + path = castPath(path, object); - return baseSortBy(result, function(object, other) { - return compareMultiple(object, other, orders); - }); - } + var index = -1, + length = path.length, + result = false; - /** - * The base implementation of `_.pick` without support for individual - * property identifiers. - * - * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @returns {Object} Returns the new object. - */ - function basePick(object, paths) { - return basePickBy(object, paths, function(value, path) { - return hasIn(object, path); - }); + while (++index < length) { + var key = toKey(path[index]); + if (!(result = object != null && hasFunc(object, key))) { + break; + } + object = object[key]; + } + if (result || ++index != length) { + return result; + } + length = object == null ? 0 : object.length; + return !!length && isLength(length) && isIndex(key, length) && + (isArray(object) || isArguments(object)); } /** - * The base implementation of `_.pickBy` without support for iteratee shorthands. + * Initializes an array clone. * * @private - * @param {Object} object The source object. - * @param {string[]} paths The property paths to pick. - * @param {Function} predicate The function invoked per property. - * @returns {Object} Returns the new object. + * @param {Array} array The array to clone. + * @returns {Array} Returns the initialized clone. */ - function basePickBy(object, paths, predicate) { - var index = -1, - length = paths.length, - result = {}; - - while (++index < length) { - var path = paths[index], - value = baseGet(object, path); + function initCloneArray(array) { + var length = array.length, + result = new array.constructor(length); - if (predicate(value, path)) { - baseSet(result, castPath(path, object), value); - } + // Add properties assigned by `RegExp#exec`. + if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { + result.index = array.index; + result.input = array.input; } return result; } /** - * A specialized version of `baseProperty` which supports deep paths. + * Initializes an object clone. * * @private - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. + * @param {Object} object The object to clone. + * @returns {Object} Returns the initialized clone. */ - function basePropertyDeep(path) { - return function(object) { - return baseGet(object, path); - }; + function initCloneObject(object) { + return (typeof object.constructor == 'function' && !isPrototype(object)) + ? baseCreate(getPrototype(object)) + : {}; } /** - * The base implementation of `_.pullAllBy` without support for iteratee - * shorthands. + * Initializes an object clone based on its `toStringTag`. + * + * **Note:** This function only supports cloning values with tags of + * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. * * @private - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. + * @param {Object} object The object to clone. + * @param {string} tag The `toStringTag` of the object to clone. + * @param {boolean} [isDeep] Specify a deep clone. + * @returns {Object} Returns the initialized clone. */ - function basePullAll(array, values, iteratee, comparator) { - var indexOf = comparator ? baseIndexOfWith : baseIndexOf, - index = -1, - length = values.length, - seen = array; + function initCloneByTag(object, tag, isDeep) { + var Ctor = object.constructor; + switch (tag) { + case arrayBufferTag: + return cloneArrayBuffer(object); - if (array === values) { - values = copyArray(values); - } - if (iteratee) { - seen = arrayMap(array, baseUnary(iteratee)); - } - while (++index < length) { - var fromIndex = 0, - value = values[index], - computed = iteratee ? iteratee(value) : value; + case boolTag: + case dateTag: + return new Ctor(+object); - while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) { - if (seen !== array) { - splice.call(seen, fromIndex, 1); - } - splice.call(array, fromIndex, 1); - } + case dataViewTag: + return cloneDataView(object, isDeep); + + case float32Tag: case float64Tag: + case int8Tag: case int16Tag: case int32Tag: + case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: + return cloneTypedArray(object, isDeep); + + case mapTag: + return new Ctor; + + case numberTag: + case stringTag: + return new Ctor(object); + + case regexpTag: + return cloneRegExp(object); + + case setTag: + return new Ctor; + + case symbolTag: + return cloneSymbol(object); } - return array; } /** - * The base implementation of `_.pullAt` without support for individual - * indexes or capturing the removed elements. + * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private - * @param {Array} array The array to modify. - * @param {number[]} indexes The indexes of elements to remove. - * @returns {Array} Returns `array`. + * @param {string} source The source to modify. + * @returns {Array} details The details to insert. + * @returns {string} Returns the modified source. */ - function basePullAt(array, indexes) { - var length = array ? indexes.length : 0, - lastIndex = length - 1; - - while (length--) { - var index = indexes[length]; - if (length == lastIndex || index !== previous) { - var previous = index; - if (isIndex(index)) { - splice.call(array, index, 1); - } else { - baseUnset(array, index); - } - } + function insertWrapDetails(source, details) { + var length = details.length; + if (!length) { + return source; } - return array; + var lastIndex = length - 1; + details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; + details = details.join(length > 2 ? ', ' : ' '); + return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); } /** - * The base implementation of `_.random` without support for returning - * floating-point numbers. + * Checks if `value` is a flattenable `arguments` object or array. * * @private - * @param {number} lower The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the random number. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. */ - function baseRandom(lower, upper) { - return lower + nativeFloor(nativeRandom() * (upper - lower + 1)); + function isFlattenable(value) { + return isArray(value) || isArguments(value) || + !!(spreadableSymbol && value && value[spreadableSymbol]); } /** - * The base implementation of `_.range` and `_.rangeRight` which doesn't - * coerce arguments. + * Checks if `value` is a valid array-like index. * * @private - * @param {number} start The start of the range. - * @param {number} end The end of the range. - * @param {number} step The value to increment or decrement by. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the range of numbers. + * @param {*} value The value to check. + * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. + * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. */ - function baseRange(start, end, step, fromRight) { - var index = -1, - length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), - result = Array(length); + function isIndex(value, length) { + var type = typeof value; + length = length == null ? MAX_SAFE_INTEGER : length; - while (length--) { - result[fromRight ? length : ++index] = start; - start += step; - } - return result; + return !!length && + (type == 'number' || + (type != 'symbol' && reIsUint.test(value))) && + (value > -1 && value % 1 == 0 && value < length); } /** - * The base implementation of `_.repeat` which doesn't coerce arguments. + * Checks if the given arguments are from an iteratee call. * * @private - * @param {string} string The string to repeat. - * @param {number} n The number of times to repeat the string. - * @returns {string} Returns the repeated string. + * @param {*} value The potential iteratee value argument. + * @param {*} index The potential iteratee index or key argument. + * @param {*} object The potential iteratee object argument. + * @returns {boolean} Returns `true` if the arguments are from an iteratee call, + * else `false`. */ - function baseRepeat(string, n) { - var result = ''; - if (!string || n < 1 || n > MAX_SAFE_INTEGER) { - return result; + function isIterateeCall(value, index, object) { + if (!isObject(object)) { + return false; } - // Leverage the exponentiation by squaring algorithm for a faster repeat. - // See https://en.wikipedia.org/wiki/Exponentiation_by_squaring for more details. - do { - if (n % 2) { - result += string; - } - n = nativeFloor(n / 2); - if (n) { - string += string; - } - } while (n); - - return result; + var type = typeof index; + if (type == 'number' + ? (isArrayLike(object) && isIndex(index, object.length)) + : (type == 'string' && index in object) + ) { + return eq(object[index], value); + } + return false; } /** - * The base implementation of `_.rest` which doesn't validate or coerce arguments. + * Checks if `value` is a property name and not a property path. * * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. + * @param {*} value The value to check. + * @param {Object} [object] The object to query keys on. + * @returns {boolean} Returns `true` if `value` is a property name, else `false`. */ - function baseRest(func, start) { - return setToString(overRest(func, start, identity), func + ''); + function isKey(value, object) { + if (isArray(value)) { + return false; + } + var type = typeof value; + if (type == 'number' || type == 'symbol' || type == 'boolean' || + value == null || isSymbol(value)) { + return true; + } + return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || + (object != null && value in Object(object)); } /** - * The base implementation of `_.sample`. + * Checks if `value` is suitable for use as unique object key. * * @private - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is suitable, else `false`. */ - function baseSample(collection) { - return arraySample(values(collection)); + function isKeyable(value) { + var type = typeof value; + return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') + ? (value !== '__proto__') + : (value === null); } /** - * The base implementation of `_.sampleSize` without param guards. + * Checks if `func` has a lazy counterpart. * * @private - * @param {Array|Object} collection The collection to sample. - * @param {number} n The number of elements to sample. - * @returns {Array} Returns the random elements. + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` has a lazy counterpart, + * else `false`. */ - function baseSampleSize(collection, n) { - var array = values(collection); - return shuffleSelf(array, baseClamp(n, 0, array.length)); + function isLaziable(func) { + var funcName = getFuncName(func), + other = lodash[funcName]; + + if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { + return false; + } + if (func === other) { + return true; + } + var data = getData(other); + return !!data && func === data[0]; } /** - * The base implementation of `_.set`. + * Checks if `func` has its source masked. * * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. + * @param {Function} func The function to check. + * @returns {boolean} Returns `true` if `func` is masked, else `false`. */ - function baseSet(object, path, value, customizer) { - if (!isObject(object)) { - return object; - } - path = castPath(path, object); - - var index = -1, - length = path.length, - lastIndex = length - 1, - nested = object; - - while (nested != null && ++index < length) { - var key = toKey(path[index]), - newValue = value; - - if (key === '__proto__' || key === 'constructor' || key === 'prototype') { - return object; - } - - if (index != lastIndex) { - var objValue = nested[key]; - newValue = customizer ? customizer(objValue, key, nested) : undefined; - if (newValue === undefined) { - newValue = isObject(objValue) - ? objValue - : (isIndex(path[index + 1]) ? [] : {}); - } - } - assignValue(nested, key, newValue); - nested = nested[key]; - } - return object; + function isMasked(func) { + return !!maskSrcKey && (maskSrcKey in func); } /** - * The base implementation of `setData` without support for hot loop shorting. + * Checks if `func` is capable of being masked. * * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `func` is maskable, else `false`. */ - var baseSetData = !metaMap ? identity : function(func, data) { - metaMap.set(func, data); - return func; - }; + var isMaskable = coreJsData ? isFunction : stubFalse; /** - * The base implementation of `setToString` without support for hot loop shorting. + * Checks if `value` is likely a prototype object. * * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. */ - var baseSetToString = !defineProperty ? identity : function(func, string) { - return defineProperty(func, 'toString', { - 'configurable': true, - 'enumerable': false, - 'value': constant(string), - 'writable': true - }); - }; + function isPrototype(value) { + var Ctor = value && value.constructor, + proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; + + return value === proto; + } /** - * The base implementation of `_.shuffle`. + * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. * * @private - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` if suitable for strict + * equality comparisons, else `false`. */ - function baseShuffle(collection) { - return shuffleSelf(values(collection)); + function isStrictComparable(value) { + return value === value && !isObject(value); } /** - * The base implementation of `_.slice` without an iteratee call guard. + * A specialized version of `matchesProperty` for source values suitable + * for strict equality comparisons, i.e. `===`. * * @private - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. + * @param {string} key The key of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. */ - function baseSlice(array, start, end) { - var index = -1, - length = array.length; - - if (start < 0) { - start = -start > length ? 0 : (length + start); - } - end = end > length ? length : end; - if (end < 0) { - end += length; - } - length = start > end ? 0 : ((end - start) >>> 0); - start >>>= 0; - - var result = Array(length); - while (++index < length) { - result[index] = array[index + start]; - } - return result; + function matchesStrictComparable(key, srcValue) { + return function(object) { + if (object == null) { + return false; + } + return object[key] === srcValue && + (srcValue !== undefined || (key in Object(object))); + }; } /** - * The base implementation of `_.some` without support for iteratee shorthands. + * A specialized version of `_.memoize` which clears the memoized function's + * cache when it exceeds `MAX_MEMOIZE_SIZE`. * * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. + * @param {Function} func The function to have its output memoized. + * @returns {Function} Returns the new memoized function. */ - function baseSome(collection, predicate) { - var result; - - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; + function memoizeCapped(func) { + var result = memoize(func, function(key) { + if (cache.size === MAX_MEMOIZE_SIZE) { + cache.clear(); + } + return key; }); - return !!result; + + var cache = result.cache; + return result; } /** - * The base implementation of `_.sortedIndex` and `_.sortedLastIndex` which - * performs a binary search of `array` to determine the index at which `value` - * should be inserted into `array` in order to maintain its sort order. + * Merges the function metadata of `source` into `data`. + * + * Merging metadata reduces the number of wrappers used to invoke a function. + * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` + * may be applied regardless of execution order. Methods like `_.ary` and + * `_.rearg` modify function arguments, making the order in which they are + * executed important, preventing the merging of metadata. However, we make + * an exception for a safe combined case where curried functions have `_.ary` + * and or `_.rearg` applied. * * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. + * @param {Array} data The destination metadata. + * @param {Array} source The source metadata. + * @returns {Array} Returns `data`. */ - function baseSortedIndex(array, value, retHighest) { - var low = 0, - high = array == null ? low : array.length; + function mergeData(data, source) { + var bitmask = data[1], + srcBitmask = source[1], + newBitmask = bitmask | srcBitmask, + isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - if (typeof value == 'number' && value === value && high <= HALF_MAX_ARRAY_LENGTH) { - while (low < high) { - var mid = (low + high) >>> 1, - computed = array[mid]; + var isCombo = + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || + ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || + ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - if (computed !== null && !isSymbol(computed) && - (retHighest ? (computed <= value) : (computed < value))) { - low = mid + 1; - } else { - high = mid; - } - } - return high; + // Exit early if metadata can't be merged. + if (!(isCommon || isCombo)) { + return data; } - return baseSortedIndexBy(array, value, identity, retHighest); + // Use source `thisArg` if available. + if (srcBitmask & WRAP_BIND_FLAG) { + data[2] = source[2]; + // Set when currying a bound function. + newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; + } + // Compose partial arguments. + var value = source[3]; + if (value) { + var partials = data[3]; + data[3] = partials ? composeArgs(partials, value, source[4]) : value; + data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; + } + // Compose partial right arguments. + value = source[5]; + if (value) { + partials = data[5]; + data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; + data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; + } + // Use source `argPos` if available. + value = source[7]; + if (value) { + data[7] = value; + } + // Use source `ary` if it's smaller. + if (srcBitmask & WRAP_ARY_FLAG) { + data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); + } + // Use source `arity` if one is not provided. + if (data[9] == null) { + data[9] = source[9]; + } + // Use source `func` and merge bitmasks. + data[0] = source[0]; + data[1] = newBitmask; + + return data; } /** - * The base implementation of `_.sortedIndexBy` and `_.sortedLastIndexBy` - * which invokes `iteratee` for `value` and each element of `array` to compute - * their sort ranking. The iteratee is invoked with one argument; (value). + * This function is like + * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * except that it includes inherited enumerable properties. * * @private - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} iteratee The iteratee invoked per element. - * @param {boolean} [retHighest] Specify returning the highest qualified index. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. */ - function baseSortedIndexBy(array, value, iteratee, retHighest) { - var low = 0, - high = array == null ? 0 : array.length; - if (high === 0) { - return 0; - } - - value = iteratee(value); - var valIsNaN = value !== value, - valIsNull = value === null, - valIsSymbol = isSymbol(value), - valIsUndefined = value === undefined; - - while (low < high) { - var mid = nativeFloor((low + high) / 2), - computed = iteratee(array[mid]), - othIsDefined = computed !== undefined, - othIsNull = computed === null, - othIsReflexive = computed === computed, - othIsSymbol = isSymbol(computed); - - if (valIsNaN) { - var setLow = retHighest || othIsReflexive; - } else if (valIsUndefined) { - setLow = othIsReflexive && (retHighest || othIsDefined); - } else if (valIsNull) { - setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull); - } else if (valIsSymbol) { - setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol); - } else if (othIsNull || othIsSymbol) { - setLow = false; - } else { - setLow = retHighest ? (computed <= value) : (computed < value); - } - if (setLow) { - low = mid + 1; - } else { - high = mid; + function nativeKeysIn(object) { + var result = []; + if (object != null) { + for (var key in Object(object)) { + result.push(key); } } - return nativeMin(high, MAX_ARRAY_INDEX); + return result; } /** - * The base implementation of `_.sortedUniq` and `_.sortedUniqBy` without - * support for iteratee shorthands. + * Converts `value` to a string using `Object.prototype.toString`. * * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. */ - function baseSortedUniq(array, iteratee) { - var index = -1, - length = array.length, - resIndex = 0, - result = []; + function objectToString(value) { + return nativeObjectToString.call(value); + } - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; + /** + * A specialized version of `baseRest` which transforms the rest array. + * + * @private + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @param {Function} transform The rest array transform. + * @returns {Function} Returns the new function. + */ + function overRest(func, start, transform) { + start = nativeMax(start === undefined ? (func.length - 1) : start, 0); + return function() { + var args = arguments, + index = -1, + length = nativeMax(args.length - start, 0), + array = Array(length); - if (!index || !eq(computed, seen)) { - var seen = computed; - result[resIndex++] = value === 0 ? 0 : value; + while (++index < length) { + array[index] = args[start + index]; } - } - return result; + index = -1; + var otherArgs = Array(start + 1); + while (++index < start) { + otherArgs[index] = args[index]; + } + otherArgs[start] = transform(array); + return apply(func, this, otherArgs); + }; } /** - * The base implementation of `_.toNumber` which doesn't ensure correct - * conversions of binary, hexadecimal, or octal string values. + * Gets the parent value at `path` of `object`. * * @private - * @param {*} value The value to process. - * @returns {number} Returns the number. + * @param {Object} object The object to query. + * @param {Array} path The path to get the parent value of. + * @returns {*} Returns the parent value. */ - function baseToNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - return +value; + function parent(object, path) { + return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); } /** - * The base implementation of `_.toString` which doesn't convert nullish - * values to empty strings. + * Reorder `array` according to the specified indexes where the element at + * the first index is assigned as the first element, the element at + * the second index is assigned as the second element, and so on. * * @private - * @param {*} value The value to process. - * @returns {string} Returns the string. + * @param {Array} array The array to reorder. + * @param {Array} indexes The arranged array indexes. + * @returns {Array} Returns `array`. */ - function baseToString(value) { - // Exit early for strings to avoid a performance hit in some environments. - if (typeof value == 'string') { - return value; - } - if (isArray(value)) { - // Recursively convert values (susceptible to call stack limits). - return arrayMap(value, baseToString) + ''; - } - if (isSymbol(value)) { - return symbolToString ? symbolToString.call(value) : ''; + function reorder(array, indexes) { + var arrLength = array.length, + length = nativeMin(indexes.length, arrLength), + oldArray = copyArray(array); + + while (length--) { + var index = indexes[length]; + array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; + return array; } /** - * The base implementation of `_.uniqBy` without support for iteratee shorthands. + * Gets the value at `key`, unless `key` is "__proto__" or "constructor". * * @private - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. + * @param {Object} object The object to query. + * @param {string} key The key of the property to get. + * @returns {*} Returns the property value. */ - function baseUniq(array, iteratee, comparator) { - var index = -1, - includes = arrayIncludes, - length = array.length, - isCommon = true, - result = [], - seen = result; - - if (comparator) { - isCommon = false; - includes = arrayIncludesWith; - } - else if (length >= LARGE_ARRAY_SIZE) { - var set = iteratee ? null : createSet(array); - if (set) { - return setToArray(set); - } - isCommon = false; - includes = cacheHas; - seen = new SetCache; - } - else { - seen = iteratee ? [] : result; + function safeGet(object, key) { + if (key === 'constructor' && typeof object[key] === 'function') { + return; } - outer: - while (++index < length) { - var value = array[index], - computed = iteratee ? iteratee(value) : value; - value = (comparator || value !== 0) ? value : 0; - if (isCommon && computed === computed) { - var seenIndex = seen.length; - while (seenIndex--) { - if (seen[seenIndex] === computed) { - continue outer; - } - } - if (iteratee) { - seen.push(computed); - } - result.push(value); - } - else if (!includes(seen, computed, comparator)) { - if (seen !== result) { - seen.push(computed); - } - result.push(value); - } + if (key == '__proto__') { + return; } - return result; + + return object[key]; } /** - * The base implementation of `_.unset`. + * Sets metadata for `func`. + * + * **Note:** If this function becomes hot, i.e. is invoked a lot in a short + * period of time, it will trip its breaker and transition to an identity + * function to avoid garbage collection pauses in V8. See + * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) + * for more details. * * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The property path to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @param {Function} func The function to associate metadata with. + * @param {*} data The metadata. + * @returns {Function} Returns `func`. */ - function baseUnset(object, path) { - path = castPath(path, object); - object = parent(object, path); - return object == null || delete object[toKey(last(path))]; - } + var setData = shortOut(baseSetData); /** - * The base implementation of `_.update`. + * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). * * @private - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to update. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize path creation. - * @returns {Object} Returns `object`. + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @returns {number|Object} Returns the timer id or timeout object. */ - function baseUpdate(object, path, updater, customizer) { - return baseSet(object, path, updater(baseGet(object, path)), customizer); - } + var setTimeout = ctxSetTimeout || function(func, wait) { + return root.setTimeout(func, wait); + }; /** - * The base implementation of methods like `_.dropWhile` and `_.takeWhile` - * without support for iteratee shorthands. + * Sets the `toString` method of `func` to return `string`. * * @private - * @param {Array} array The array to query. - * @param {Function} predicate The function invoked per iteration. - * @param {boolean} [isDrop] Specify dropping elements instead of taking them. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Array} Returns the slice of `array`. + * @param {Function} func The function to modify. + * @param {Function} string The `toString` result. + * @returns {Function} Returns `func`. */ - function baseWhile(array, predicate, isDrop, fromRight) { - var length = array.length, - index = fromRight ? length : -1; - - while ((fromRight ? index-- : ++index < length) && - predicate(array[index], index, array)) {} - - return isDrop - ? baseSlice(array, (fromRight ? 0 : index), (fromRight ? index + 1 : length)) - : baseSlice(array, (fromRight ? index + 1 : 0), (fromRight ? length : index)); - } + var setToString = shortOut(baseSetToString); /** - * The base implementation of `wrapperValue` which returns the result of - * performing a sequence of actions on the unwrapped `value`, where each - * successive action is supplied the return value of the previous. + * Sets the `toString` method of `wrapper` to mimic the source of `reference` + * with wrapper details in a comment at the top of the source body. * * @private - * @param {*} value The unwrapped value. - * @param {Array} actions Actions to perform to resolve the unwrapped value. - * @returns {*} Returns the resolved value. + * @param {Function} wrapper The function to modify. + * @param {Function} reference The reference function. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Function} Returns `wrapper`. */ - function baseWrapperValue(value, actions) { - var result = value; - if (result instanceof LazyWrapper) { - result = result.value(); - } - return arrayReduce(actions, function(result, action) { - return action.func.apply(action.thisArg, arrayPush([result], action.args)); - }, result); + function setWrapToString(wrapper, reference, bitmask) { + var source = (reference + ''); + return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); } /** - * The base implementation of methods like `_.xor`, without support for - * iteratee shorthands, that accepts an array of arrays to inspect. + * Creates a function that'll short out and invoke `identity` instead + * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` + * milliseconds. * * @private - * @param {Array} arrays The arrays to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of values. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new shortable function. */ - function baseXor(arrays, iteratee, comparator) { - var length = arrays.length; - if (length < 2) { - return length ? baseUniq(arrays[0]) : []; - } - var index = -1, - result = Array(length); + function shortOut(func) { + var count = 0, + lastCalled = 0; - while (++index < length) { - var array = arrays[index], - othIndex = -1; + return function() { + var stamp = nativeNow(), + remaining = HOT_SPAN - (stamp - lastCalled); - while (++othIndex < length) { - if (othIndex != index) { - result[index] = baseDifference(result[index] || array, arrays[othIndex], iteratee, comparator); + lastCalled = stamp; + if (remaining > 0) { + if (++count >= HOT_COUNT) { + return arguments[0]; } + } else { + count = 0; } - } - return baseUniq(baseFlatten(result, 1), iteratee, comparator); + return func.apply(undefined, arguments); + }; } /** - * This base implementation of `_.zipObject` which assigns values using `assignFunc`. + * A specialized version of `_.shuffle` which mutates and sets the size of `array`. * * @private - * @param {Array} props The property identifiers. - * @param {Array} values The property values. - * @param {Function} assignFunc The function to assign values. - * @returns {Object} Returns the new object. + * @param {Array} array The array to shuffle. + * @param {number} [size=array.length] The size of `array`. + * @returns {Array} Returns `array`. */ - function baseZipObject(props, values, assignFunc) { + function shuffleSelf(array, size) { var index = -1, - length = props.length, - valsLength = values.length, - result = {}; + length = array.length, + lastIndex = length - 1; - while (++index < length) { - var value = index < valsLength ? values[index] : undefined; - assignFunc(result, props[index], value); + size = size === undefined ? length : size; + while (++index < size) { + var rand = baseRandom(index, lastIndex), + value = array[rand]; + + array[rand] = array[index]; + array[index] = value; } - return result; + array.length = size; + return array; } /** - * Casts `value` to an empty array if it's not an array like object. + * Converts `string` to a property path array. * * @private - * @param {*} value The value to inspect. - * @returns {Array|Object} Returns the cast array-like object. + * @param {string} string The string to convert. + * @returns {Array} Returns the property path array. */ - function castArrayLikeObject(value) { - return isArrayLikeObject(value) ? value : []; - } + var stringToPath = memoizeCapped(function(string) { + var result = []; + if (string.charCodeAt(0) === 46 /* . */) { + result.push(''); + } + string.replace(rePropName, function(match, number, quote, subString) { + result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); + }); + return result; + }); /** - * Casts `value` to `identity` if it's not a function. + * Converts `value` to a string key if it's not a string or symbol. * * @private * @param {*} value The value to inspect. - * @returns {Function} Returns cast function. + * @returns {string|symbol} Returns the key. */ - function castFunction(value) { - return typeof value == 'function' ? value : identity; + function toKey(value) { + if (typeof value == 'string' || isSymbol(value)) { + return value; + } + var result = (value + ''); + return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; } /** - * Casts `value` to a path array if it's not one. + * Converts `func` to its source code. * * @private - * @param {*} value The value to inspect. - * @param {Object} [object] The object to query keys on. - * @returns {Array} Returns the cast property path array. + * @param {Function} func The function to convert. + * @returns {string} Returns the source code. */ - function castPath(value, object) { - if (isArray(value)) { - return value; + function toSource(func) { + if (func != null) { + try { + return funcToString.call(func); + } catch (e) {} + try { + return (func + ''); + } catch (e) {} } - return isKey(value, object) ? [value] : stringToPath(toString(value)); + return ''; } /** - * A `baseRest` alias which can be replaced with `identity` by module - * replacement plugins. + * Updates wrapper `details` based on `bitmask` flags. * * @private - * @type {Function} - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. + * @returns {Array} details The details to modify. + * @param {number} bitmask The bitmask flags. See `createWrap` for more details. + * @returns {Array} Returns `details`. */ - var castRest = baseRest; + function updateWrapDetails(details, bitmask) { + arrayEach(wrapFlags, function(pair) { + var value = '_.' + pair[0]; + if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { + details.push(value); + } + }); + return details.sort(); + } /** - * Casts `array` to a slice if it's needed. + * Creates a clone of `wrapper`. * * @private - * @param {Array} array The array to inspect. - * @param {number} start The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the cast slice. + * @param {Object} wrapper The wrapper to clone. + * @returns {Object} Returns the cloned wrapper. */ - function castSlice(array, start, end) { - var length = array.length; - end = end === undefined ? length : end; - return (!start && end >= length) ? array : baseSlice(array, start, end); + function wrapperClone(wrapper) { + if (wrapper instanceof LazyWrapper) { + return wrapper.clone(); + } + var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); + result.__actions__ = copyArray(wrapper.__actions__); + result.__index__ = wrapper.__index__; + result.__values__ = wrapper.__values__; + return result; } - /** - * A simple wrapper around the global [`clearTimeout`](https://mdn.io/clearTimeout). - * - * @private - * @param {number|Object} id The timer id or timeout object of the timer to clear. - */ - var clearTimeout = ctxClearTimeout || function(id) { - return root.clearTimeout(id); - }; + /*------------------------------------------------------------------------*/ /** - * Creates a clone of `buffer`. + * Creates an array of elements split into groups the length of `size`. + * If `array` can't be split evenly, the final chunk will be the remaining + * elements. * - * @private - * @param {Buffer} buffer The buffer to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Buffer} Returns the cloned buffer. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to process. + * @param {number} [size=1] The length of each chunk + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the new array of chunks. + * @example + * + * _.chunk(['a', 'b', 'c', 'd'], 2); + * // => [['a', 'b'], ['c', 'd']] + * + * _.chunk(['a', 'b', 'c', 'd'], 3); + * // => [['a', 'b', 'c'], ['d']] */ - function cloneBuffer(buffer, isDeep) { - if (isDeep) { - return buffer.slice(); + function chunk(array, size, guard) { + if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { + size = 1; + } else { + size = nativeMax(toInteger(size), 0); } - var length = buffer.length, - result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length); + var length = array == null ? 0 : array.length; + if (!length || size < 1) { + return []; + } + var index = 0, + resIndex = 0, + result = Array(nativeCeil(length / size)); - buffer.copy(result); + while (index < length) { + result[resIndex++] = baseSlice(array, index, (index += size)); + } return result; } /** - * Creates a clone of `arrayBuffer`. + * Creates an array with all falsey values removed. The values `false`, `null`, + * `0`, `""`, `undefined`, and `NaN` are falsey. * - * @private - * @param {ArrayBuffer} arrayBuffer The array buffer to clone. - * @returns {ArrayBuffer} Returns the cloned array buffer. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to compact. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.compact([0, 1, false, 2, '', 3]); + * // => [1, 2, 3] */ - function cloneArrayBuffer(arrayBuffer) { - var result = new arrayBuffer.constructor(arrayBuffer.byteLength); - new Uint8Array(result).set(new Uint8Array(arrayBuffer)); + function compact(array) { + var index = -1, + length = array == null ? 0 : array.length, + resIndex = 0, + result = []; + + while (++index < length) { + var value = array[index]; + if (value) { + result[resIndex++] = value; + } + } return result; } /** - * Creates a clone of `dataView`. + * Creates a new array concatenating `array` with any additional arrays + * and/or values. * - * @private - * @param {Object} dataView The data view to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned data view. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to concatenate. + * @param {...*} [values] The values to concatenate. + * @returns {Array} Returns the new concatenated array. + * @example + * + * var array = [1]; + * var other = _.concat(array, 2, [3], [[4]]); + * + * console.log(other); + * // => [1, 2, 3, [4]] + * + * console.log(array); + * // => [1] */ - function cloneDataView(dataView, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer; - return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength); + function concat() { + var length = arguments.length; + if (!length) { + return []; + } + var args = Array(length - 1), + array = arguments[0], + index = length; + + while (index--) { + args[index - 1] = arguments[index]; + } + return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); } /** - * Creates a clone of `regexp`. + * Creates an array of `array` values not included in the other given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. * - * @private - * @param {Object} regexp The regexp to clone. - * @returns {Object} Returns the cloned regexp. + * **Note:** Unlike `_.pullAll`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.without, _.xor + * @example + * + * _.difference([2, 1], [2, 3]); + * // => [1] */ - function cloneRegExp(regexp) { - var result = new regexp.constructor(regexp.source, reFlags.exec(regexp)); - result.lastIndex = regexp.lastIndex; - return result; - } + var difference = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) + : []; + }); /** - * Creates a clone of the `symbol` object. + * This method is like `_.difference` except that it accepts `iteratee` which + * is invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * - * @private - * @param {Object} symbol The symbol object to clone. - * @returns {Object} Returns the cloned symbol object. + * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2] + * + * // The `_.property` iteratee shorthand. + * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] */ - function cloneSymbol(symbol) { - return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {}; - } + var differenceBy = baseRest(function(array, values) { + var iteratee = last(values); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) + : []; + }); /** - * Creates a clone of `typedArray`. + * This method is like `_.difference` except that it accepts `comparator` + * which is invoked to compare elements of `array` to `values`. The order and + * references of result values are determined by the first array. The comparator + * is invoked with two arguments: (arrVal, othVal). * - * @private - * @param {Object} typedArray The typed array to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the cloned typed array. + * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...Array} [values] The values to exclude. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * + * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); + * // => [{ 'x': 2, 'y': 1 }] */ - function cloneTypedArray(typedArray, isDeep) { - var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer; - return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length); - } + var differenceWith = baseRest(function(array, values) { + var comparator = last(values); + if (isArrayLikeObject(comparator)) { + comparator = undefined; + } + return isArrayLikeObject(array) + ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) + : []; + }); /** - * Compares values to sort them in ascending order. + * Creates a slice of `array` with `n` elements dropped from the beginning. * - * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {number} Returns the sort order indicator for `value`. + * @static + * @memberOf _ + * @since 0.5.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.drop([1, 2, 3]); + * // => [2, 3] + * + * _.drop([1, 2, 3], 2); + * // => [3] + * + * _.drop([1, 2, 3], 5); + * // => [] + * + * _.drop([1, 2, 3], 0); + * // => [1, 2, 3] */ - function compareAscending(value, other) { - if (value !== other) { - var valIsDefined = value !== undefined, - valIsNull = value === null, - valIsReflexive = value === value, - valIsSymbol = isSymbol(value); - - var othIsDefined = other !== undefined, - othIsNull = other === null, - othIsReflexive = other === other, - othIsSymbol = isSymbol(other); - - if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) || - (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) || - (valIsNull && othIsDefined && othIsReflexive) || - (!valIsDefined && othIsReflexive) || - !valIsReflexive) { - return 1; - } - if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) || - (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) || - (othIsNull && valIsDefined && valIsReflexive) || - (!othIsDefined && valIsReflexive) || - !othIsReflexive) { - return -1; - } + function drop(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - return 0; + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, n < 0 ? 0 : n, length); } /** - * Used by `_.orderBy` to compare multiple properties of a value to another - * and stable sort them. + * Creates a slice of `array` with `n` elements dropped from the end. * - * If `orders` is unspecified, all values are sorted in ascending order. Otherwise, - * specify an order of "desc" for descending or "asc" for ascending sort order - * of corresponding values. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to drop. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {boolean[]|string[]} orders The order to sort by for each property. - * @returns {number} Returns the sort order indicator for `object`. + * _.dropRight([1, 2, 3]); + * // => [1, 2] + * + * _.dropRight([1, 2, 3], 2); + * // => [1] + * + * _.dropRight([1, 2, 3], 5); + * // => [] + * + * _.dropRight([1, 2, 3], 0); + * // => [1, 2, 3] */ - function compareMultiple(object, other, orders) { - var index = -1, - objCriteria = object.criteria, - othCriteria = other.criteria, - length = objCriteria.length, - ordersLength = orders.length; - - while (++index < length) { - var result = compareAscending(objCriteria[index], othCriteria[index]); - if (result) { - if (index >= ordersLength) { - return result; - } - var order = orders[index]; - return result * (order == 'desc' ? -1 : 1); - } + function dropRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications - // that causes it, under certain circumstances, to provide the same value for - // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247 - // for more details. - // - // This also ensures a stable sort in V8 and other engines. - // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details. - return object.index - other.index; + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, 0, n < 0 ? 0 : n); } /** - * Creates an array that is the composition of partially applied arguments, - * placeholders, and provided arguments into a single array of arguments. + * Creates a slice of `array` excluding elements dropped from the end. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to prepend to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.dropRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney'] + * + * // The `_.matches` iteratee shorthand. + * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropRightWhile(users, ['active', false]); + * // => objects for ['barney'] + * + * // The `_.property` iteratee shorthand. + * _.dropRightWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] */ - function composeArgs(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersLength = holders.length, - leftIndex = -1, - leftLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(leftLength + rangeLength), - isUncurried = !isCurried; - - while (++leftIndex < leftLength) { - result[leftIndex] = partials[leftIndex]; - } - while (++argsIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[holders[argsIndex]] = args[argsIndex]; - } - } - while (rangeLength--) { - result[leftIndex++] = args[argsIndex++]; - } - return result; + function dropRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true, true) + : []; } /** - * This function is like `composeArgs` except that the arguments composition - * is tailored for `_.partialRight`. + * Creates a slice of `array` excluding elements dropped from the beginning. + * Elements are dropped until `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index, array). * - * @private - * @param {Array} args The provided arguments. - * @param {Array} partials The arguments to append to those provided. - * @param {Array} holders The `partials` placeholder indexes. - * @params {boolean} [isCurried] Specify composing for a curried function. - * @returns {Array} Returns the new array of composed arguments. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.dropWhile(users, function(o) { return !o.active; }); + * // => objects for ['pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.dropWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.dropWhile(users, ['active', false]); + * // => objects for ['pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.dropWhile(users, 'active'); + * // => objects for ['barney', 'fred', 'pebbles'] */ - function composeArgsRight(args, partials, holders, isCurried) { - var argsIndex = -1, - argsLength = args.length, - holdersIndex = -1, - holdersLength = holders.length, - rightIndex = -1, - rightLength = partials.length, - rangeLength = nativeMax(argsLength - holdersLength, 0), - result = Array(rangeLength + rightLength), - isUncurried = !isCurried; - - while (++argsIndex < rangeLength) { - result[argsIndex] = args[argsIndex]; - } - var offset = argsIndex; - while (++rightIndex < rightLength) { - result[offset + rightIndex] = partials[rightIndex]; - } - while (++holdersIndex < holdersLength) { - if (isUncurried || argsIndex < argsLength) { - result[offset + holders[holdersIndex]] = args[argsIndex++]; - } - } - return result; + function dropWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), true) + : []; } /** - * Copies the values of `source` to `array`. + * Fills elements of `array` with `value` from `start` up to, but not + * including, `end`. * - * @private - * @param {Array} source The array to copy values from. - * @param {Array} [array=[]] The array to copy values to. + * **Note:** This method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.2.0 + * @category Array + * @param {Array} array The array to fill. + * @param {*} value The value to fill `array` with. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.fill(array, 'a'); + * console.log(array); + * // => ['a', 'a', 'a'] + * + * _.fill(Array(3), 2); + * // => [2, 2, 2] + * + * _.fill([4, 6, 8, 10], '*', 1, 3); + * // => [4, '*', '*', 10] */ - function copyArray(source, array) { - var index = -1, - length = source.length; - - array || (array = Array(length)); - while (++index < length) { - array[index] = source[index]; + function fill(array, value, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - return array; + if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { + start = 0; + end = length; + } + return baseFill(array, value, start, end); } /** - * Copies properties of `source` to `object`. + * This method is like `_.find` except that it returns the index of the first + * element `predicate` returns truthy for instead of the element itself. * - * @private - * @param {Object} source The object to copy properties from. - * @param {Array} props The property identifiers to copy. - * @param {Object} [object={}] The object to copy properties to. - * @param {Function} [customizer] The function to customize copied values. - * @returns {Object} Returns `object`. + * @static + * @memberOf _ + * @since 1.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.findIndex(users, function(o) { return o.user == 'barney'; }); + * // => 0 + * + * // The `_.matches` iteratee shorthand. + * _.findIndex(users, { 'user': 'fred', 'active': false }); + * // => 1 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findIndex(users, ['active', false]); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.findIndex(users, 'active'); + * // => 2 */ - function copyObject(source, props, object, customizer) { - var isNew = !object; - object || (object = {}); - - var index = -1, - length = props.length; - - while (++index < length) { - var key = props[index]; - - var newValue = customizer - ? customizer(object[key], source[key], key, object, source) - : undefined; - - if (newValue === undefined) { - newValue = source[key]; - } - if (isNew) { - baseAssignValue(object, key, newValue); - } else { - assignValue(object, key, newValue); - } + function findIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; } - return object; + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseFindIndex(array, getIteratee(predicate, 3), index); } /** - * Copies own symbols of `source` to `object`. + * This method is like `_.findIndex` except that it iterates over elements + * of `collection` from right to left. * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the found element, else `-1`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); + * // => 2 + * + * // The `_.matches` iteratee shorthand. + * _.findLastIndex(users, { 'user': 'barney', 'active': true }); + * // => 0 + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastIndex(users, ['active', false]); + * // => 2 + * + * // The `_.property` iteratee shorthand. + * _.findLastIndex(users, 'active'); + * // => 0 */ - function copySymbols(source, object) { - return copyObject(source, getSymbols(source), object); + function findLastIndex(array, predicate, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; + } + var index = length - 1; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = fromIndex < 0 + ? nativeMax(length + index, 0) + : nativeMin(index, length - 1); + } + return baseFindIndex(array, getIteratee(predicate, 3), index, true); } /** - * Copies own and inherited symbols of `source` to `object`. + * Flattens `array` a single level deep. * - * @private - * @param {Object} source The object to copy symbols from. - * @param {Object} [object={}] The object to copy symbols to. - * @returns {Object} Returns `object`. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flatten([1, [2, [3, [4]], 5]]); + * // => [1, 2, [3, [4]], 5] */ - function copySymbolsIn(source, object) { - return copyObject(source, getSymbolsIn(source), object); + function flatten(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, 1) : []; } /** - * Creates a function like `_.groupBy`. + * Recursively flattens `array`. * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} [initializer] The accumulator object initializer. - * @returns {Function} Returns the new aggregator function. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to flatten. + * @returns {Array} Returns the new flattened array. + * @example + * + * _.flattenDeep([1, [2, [3, [4]], 5]]); + * // => [1, 2, 3, 4, 5] */ - function createAggregator(setter, initializer) { - return function(collection, iteratee) { - var func = isArray(collection) ? arrayAggregator : baseAggregator, - accumulator = initializer ? initializer() : {}; - - return func(collection, setter, getIteratee(iteratee, 2), accumulator); - }; + function flattenDeep(array) { + var length = array == null ? 0 : array.length; + return length ? baseFlatten(array, INFINITY) : []; } /** - * Creates a function like `_.assign`. + * Recursively flatten `array` up to `depth` times. * - * @private - * @param {Function} assigner The function to assign values. - * @returns {Function} Returns the new assigner function. + * @static + * @memberOf _ + * @since 4.4.0 + * @category Array + * @param {Array} array The array to flatten. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. + * @example + * + * var array = [1, [2, [3, [4]], 5]]; + * + * _.flattenDepth(array, 1); + * // => [1, 2, [3, [4]], 5] + * + * _.flattenDepth(array, 2); + * // => [1, 2, 3, [4], 5] */ - function createAssigner(assigner) { - return baseRest(function(object, sources) { - var index = -1, - length = sources.length, - customizer = length > 1 ? sources[length - 1] : undefined, - guard = length > 2 ? sources[2] : undefined; - - customizer = (assigner.length > 3 && typeof customizer == 'function') - ? (length--, customizer) - : undefined; - - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - customizer = length < 3 ? undefined : customizer; - length = 1; - } - object = Object(object); - while (++index < length) { - var source = sources[index]; - if (source) { - assigner(object, source, index, customizer); - } - } - return object; - }); + function flattenDepth(array, depth) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(array, depth); } /** - * Creates a `baseEach` or `baseEachRight` function. + * The inverse of `_.toPairs`; this method returns an object composed + * from key-value `pairs`. * - * @private - * @param {Function} eachFunc The function to iterate over a collection. - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} pairs The key-value pairs. + * @returns {Object} Returns the new object. + * @example + * + * _.fromPairs([['a', 1], ['b', 2]]); + * // => { 'a': 1, 'b': 2 } */ - function createBaseEach(eachFunc, fromRight) { - return function(collection, iteratee) { - if (collection == null) { - return collection; - } - if (!isArrayLike(collection)) { - return eachFunc(collection, iteratee); - } - var length = collection.length, - index = fromRight ? length : -1, - iterable = Object(collection); + function fromPairs(pairs) { + var index = -1, + length = pairs == null ? 0 : pairs.length, + result = {}; - while ((fromRight ? index-- : ++index < length)) { - if (iteratee(iterable[index], index, iterable) === false) { - break; - } - } - return collection; - }; + while (++index < length) { + var pair = pairs[index]; + result[pair[0]] = pair[1]; + } + return result; } /** - * Creates a base function for methods like `_.forIn` and `_.forOwn`. + * Gets the first element of `array`. * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new base function. + * @static + * @memberOf _ + * @since 0.1.0 + * @alias first + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the first element of `array`. + * @example + * + * _.head([1, 2, 3]); + * // => 1 + * + * _.head([]); + * // => undefined */ - function createBaseFor(fromRight) { - return function(object, iteratee, keysFunc) { - var index = -1, - iterable = Object(object), - props = keysFunc(object), - length = props.length; - - while (length--) { - var key = props[fromRight ? length : ++index]; - if (iteratee(iterable[key], key, iterable) === false) { - break; - } - } - return object; - }; + function head(array) { + return (array && array.length) ? array[0] : undefined; } /** - * Creates a function that wraps `func` to invoke it with the optional `this` - * binding of `thisArg`. + * Gets the index at which the first occurrence of `value` is found in `array` + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. If `fromIndex` is negative, it's used as the + * offset from the end of `array`. * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @returns {Function} Returns the new wrapped function. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.indexOf([1, 2, 1, 2], 2); + * // => 1 + * + * // Search from the `fromIndex`. + * _.indexOf([1, 2, 1, 2], 2, 2); + * // => 3 */ - function createBind(func, bitmask, thisArg) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); - - function wrapper() { - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return fn.apply(isBind ? thisArg : this, arguments); + function indexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; } - return wrapper; + var index = fromIndex == null ? 0 : toInteger(fromIndex); + if (index < 0) { + index = nativeMax(length + index, 0); + } + return baseIndexOf(array, value, index); } /** - * Creates a function like `_.lowerFirst`. + * Gets all but the last element of `array`. * - * @private - * @param {string} methodName The name of the `String` case method to use. - * @returns {Function} Returns the new case function. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.initial([1, 2, 3]); + * // => [1, 2] */ - function createCaseFirst(methodName) { - return function(string) { - string = toString(string); - - var strSymbols = hasUnicode(string) - ? stringToArray(string) - : undefined; - - var chr = strSymbols - ? strSymbols[0] - : string.charAt(0); - - var trailing = strSymbols - ? castSlice(strSymbols, 1).join('') - : string.slice(1); - - return chr[methodName]() + trailing; - }; - } + function initial(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 0, -1) : []; + } /** - * Creates a function like `_.camelCase`. + * Creates an array of unique values that are included in all given arrays + * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. The order and references of result values are + * determined by the first array. * - * @private - * @param {Function} callback The function to combine each word. - * @returns {Function} Returns the new compounder function. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersection([2, 1], [2, 3]); + * // => [2] */ - function createCompounder(callback) { - return function(string) { - return arrayReduce(words(deburr(string).replace(reApos, '')), callback, ''); - }; - } + var intersection = baseRest(function(arrays) { + var mapped = arrayMap(arrays, castArrayLikeObject); + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped) + : []; + }); /** - * Creates a function that produces an instance of `Ctor` regardless of - * whether it was invoked as part of a `new` expression or by `call` or `apply`. + * This method is like `_.intersection` except that it accepts `iteratee` + * which is invoked for each element of each `arrays` to generate the criterion + * by which they're compared. The order and references of result values are + * determined by the first array. The iteratee is invoked with one argument: + * (value). * - * @private - * @param {Function} Ctor The constructor to wrap. - * @returns {Function} Returns the new wrapped function. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [2.1] + * + * // The `_.property` iteratee shorthand. + * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }] */ - function createCtor(Ctor) { - return function() { - // Use a `switch` statement to work with class constructors. See - // http://ecma-international.org/ecma-262/7.0/#sec-ecmascript-function-objects-call-thisargument-argumentslist - // for more details. - var args = arguments; - switch (args.length) { - case 0: return new Ctor; - case 1: return new Ctor(args[0]); - case 2: return new Ctor(args[0], args[1]); - case 3: return new Ctor(args[0], args[1], args[2]); - case 4: return new Ctor(args[0], args[1], args[2], args[3]); - case 5: return new Ctor(args[0], args[1], args[2], args[3], args[4]); - case 6: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]); - case 7: return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]); - } - var thisBinding = baseCreate(Ctor.prototype), - result = Ctor.apply(thisBinding, args); + var intersectionBy = baseRest(function(arrays) { + var iteratee = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); - // Mimic the constructor's `return` behavior. - // See https://es5.github.io/#x13.2.2 for more details. - return isObject(result) ? result : thisBinding; - }; - } + if (iteratee === last(mapped)) { + iteratee = undefined; + } else { + mapped.pop(); + } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, getIteratee(iteratee, 2)) + : []; + }); /** - * Creates a function that wraps `func` to enable currying. + * This method is like `_.intersection` except that it accepts `comparator` + * which is invoked to compare elements of `arrays`. The order and references + * of result values are determined by the first array. The comparator is + * invoked with two arguments: (arrVal, othVal). * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {number} arity The arity of `func`. - * @returns {Function} Returns the new wrapped function. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of intersecting values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.intersectionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }] */ - function createCurry(func, bitmask, arity) { - var Ctor = createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length, - placeholder = getHolder(wrapper); - - while (index--) { - args[index] = arguments[index]; - } - var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder) - ? [] - : replaceHolders(args, placeholder); + var intersectionWith = baseRest(function(arrays) { + var comparator = last(arrays), + mapped = arrayMap(arrays, castArrayLikeObject); - length -= holders.length; - if (length < arity) { - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, undefined, - args, holders, undefined, undefined, arity - length); - } - var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; - return apply(fn, this, args); + comparator = typeof comparator == 'function' ? comparator : undefined; + if (comparator) { + mapped.pop(); } - return wrapper; - } + return (mapped.length && mapped[0] === arrays[0]) + ? baseIntersection(mapped, undefined, comparator) + : []; + }); /** - * Creates a `_.find` or `_.findLast` function. + * Converts all elements in `array` into a string separated by `separator`. * - * @private - * @param {Function} findIndexFunc The function to find the collection index. - * @returns {Function} Returns the new find function. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to convert. + * @param {string} [separator=','] The element separator. + * @returns {string} Returns the joined string. + * @example + * + * _.join(['a', 'b', 'c'], '~'); + * // => 'a~b~c' */ - function createFind(findIndexFunc) { - return function(collection, predicate, fromIndex) { - var iterable = Object(collection); - if (!isArrayLike(collection)) { - var iteratee = getIteratee(predicate, 3); - collection = keys(collection); - predicate = function(key) { return iteratee(iterable[key], key, iterable); }; - } - var index = findIndexFunc(collection, predicate, fromIndex); - return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined; - }; + function join(array, separator) { + return array == null ? '' : nativeJoin.call(array, separator); } /** - * Creates a `_.flow` or `_.flowRight` function. + * Gets the last element of `array`. * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new flow function. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @returns {*} Returns the last element of `array`. + * @example + * + * _.last([1, 2, 3]); + * // => 3 */ - function createFlow(fromRight) { - return flatRest(function(funcs) { - var length = funcs.length, - index = length, - prereq = LodashWrapper.prototype.thru; - - if (fromRight) { - funcs.reverse(); - } - while (index--) { - var func = funcs[index]; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - if (prereq && !wrapper && getFuncName(func) == 'wrapper') { - var wrapper = new LodashWrapper([], true); - } - } - index = wrapper ? index : length; - while (++index < length) { - func = funcs[index]; - - var funcName = getFuncName(func), - data = funcName == 'wrapper' ? getData(func) : undefined; - - if (data && isLaziable(data[0]) && - data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && - !data[4].length && data[9] == 1 - ) { - wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]); - } else { - wrapper = (func.length == 1 && isLaziable(func)) - ? wrapper[funcName]() - : wrapper.thru(func); - } - } - return function() { - var args = arguments, - value = args[0]; - - if (wrapper && args.length == 1 && isArray(value)) { - return wrapper.plant(value).value(); - } - var index = 0, - result = length ? funcs[index].apply(this, args) : value; - - while (++index < length) { - result = funcs[index].call(this, result); - } - return result; - }; - }); + function last(array) { + var length = array == null ? 0 : array.length; + return length ? array[length - 1] : undefined; } /** - * Creates a function that wraps `func` to invoke it with optional `this` - * binding of `thisArg`, partial application, and currying. + * This method is like `_.indexOf` except that it iterates over elements of + * `array` from right to left. * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [partialsRight] The arguments to append to those provided - * to the new function. - * @param {Array} [holdersRight] The `partialsRight` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=array.length-1] The index to search from. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.lastIndexOf([1, 2, 1, 2], 2); + * // => 3 + * + * // Search from the `fromIndex`. + * _.lastIndexOf([1, 2, 1, 2], 2, 2); + * // => 1 */ - function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) { - var isAry = bitmask & WRAP_ARY_FLAG, - isBind = bitmask & WRAP_BIND_FLAG, - isBindKey = bitmask & WRAP_BIND_KEY_FLAG, - isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), - isFlip = bitmask & WRAP_FLIP_FLAG, - Ctor = isBindKey ? undefined : createCtor(func); - - function wrapper() { - var length = arguments.length, - args = Array(length), - index = length; - - while (index--) { - args[index] = arguments[index]; - } - if (isCurried) { - var placeholder = getHolder(wrapper), - holdersCount = countHolders(args, placeholder); - } - if (partials) { - args = composeArgs(args, partials, holders, isCurried); - } - if (partialsRight) { - args = composeArgsRight(args, partialsRight, holdersRight, isCurried); - } - length -= holdersCount; - if (isCurried && length < arity) { - var newHolders = replaceHolders(args, placeholder); - return createRecurry( - func, bitmask, createHybrid, wrapper.placeholder, thisArg, - args, newHolders, argPos, ary, arity - length - ); - } - var thisBinding = isBind ? thisArg : this, - fn = isBindKey ? thisBinding[func] : func; - - length = args.length; - if (argPos) { - args = reorder(args, argPos); - } else if (isFlip && length > 1) { - args.reverse(); - } - if (isAry && ary < length) { - args.length = ary; - } - if (this && this !== root && this instanceof wrapper) { - fn = Ctor || createCtor(fn); - } - return fn.apply(thisBinding, args); + function lastIndexOf(array, value, fromIndex) { + var length = array == null ? 0 : array.length; + if (!length) { + return -1; } - return wrapper; + var index = length; + if (fromIndex !== undefined) { + index = toInteger(fromIndex); + index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + } + return value === value + ? strictLastIndexOf(array, value, index) + : baseFindIndex(array, baseIsNaN, index, true); } /** - * Creates a function like `_.invertBy`. + * Gets the element at index `n` of `array`. If `n` is negative, the nth + * element from the end is returned. * - * @private - * @param {Function} setter The function to set accumulator values. - * @param {Function} toIteratee The function to resolve iteratees. - * @returns {Function} Returns the new inverter function. + * @static + * @memberOf _ + * @since 4.11.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=0] The index of the element to return. + * @returns {*} Returns the nth element of `array`. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * + * _.nth(array, 1); + * // => 'b' + * + * _.nth(array, -2); + * // => 'c'; */ - function createInverter(setter, toIteratee) { - return function(object, iteratee) { - return baseInverter(object, setter, toIteratee(iteratee), {}); - }; + function nth(array, n) { + return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; } /** - * Creates a function that performs a mathematical operation on two values. + * Removes all given values from `array` using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * - * @private - * @param {Function} operator The function to perform the operation. - * @param {number} [defaultValue] The value used for `undefined` arguments. - * @returns {Function} Returns the new mathematical operation function. + * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` + * to remove elements from an array by predicate. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...*} [values] The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pull(array, 'a', 'c'); + * console.log(array); + * // => ['b', 'b'] */ - function createMathOperation(operator, defaultValue) { - return function(value, other) { - var result; - if (value === undefined && other === undefined) { - return defaultValue; - } - if (value !== undefined) { - result = value; - } - if (other !== undefined) { - if (result === undefined) { - return other; - } - if (typeof value == 'string' || typeof other == 'string') { - value = baseToString(value); - other = baseToString(other); - } else { - value = baseToNumber(value); - other = baseToNumber(other); - } - result = operator(value, other); - } - return result; - }; - } + var pull = baseRest(pullAll); /** - * Creates a function like `_.over`. + * This method is like `_.pull` except that it accepts an array of values to remove. * - * @private - * @param {Function} arrayFunc The function to iterate over iteratees. - * @returns {Function} Returns the new over function. + * **Note:** Unlike `_.difference`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @returns {Array} Returns `array`. + * @example + * + * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * + * _.pullAll(array, ['a', 'c']); + * console.log(array); + * // => ['b', 'b'] */ - function createOver(arrayFunc) { - return flatRest(function(iteratees) { - iteratees = arrayMap(iteratees, baseUnary(getIteratee())); - return baseRest(function(args) { - var thisArg = this; - return arrayFunc(iteratees, function(iteratee) { - return apply(iteratee, thisArg, args); - }); - }); - }); + function pullAll(array, values) { + return (array && array.length && values && values.length) + ? basePullAll(array, values) + : array; } /** - * Creates the padding for `string` based on `length`. The `chars` string - * is truncated if the number of characters exceeds `length`. + * This method is like `_.pullAll` except that it accepts `iteratee` which is + * invoked for each element of `array` and `values` to generate the criterion + * by which they're compared. The iteratee is invoked with one argument: (value). * - * @private - * @param {number} length The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padding for `string`. + * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * + * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); + * console.log(array); + * // => [{ 'x': 2 }] */ - function createPadding(length, chars) { - chars = chars === undefined ? ' ' : baseToString(chars); + function pullAllBy(array, values, iteratee) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, getIteratee(iteratee, 2)) + : array; + } - var charsLength = chars.length; - if (charsLength < 2) { - return charsLength ? baseRepeat(chars, length) : chars; - } - var result = baseRepeat(chars, nativeCeil(length / stringSize(chars))); - return hasUnicode(chars) - ? castSlice(stringToArray(result), 0, length).join('') - : result.slice(0, length); + /** + * This method is like `_.pullAll` except that it accepts `comparator` which + * is invoked to compare elements of `array` to `values`. The comparator is + * invoked with two arguments: (arrVal, othVal). + * + * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 4.6.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Array} values The values to remove. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns `array`. + * @example + * + * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; + * + * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); + * console.log(array); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + */ + function pullAllWith(array, values, comparator) { + return (array && array.length && values && values.length) + ? basePullAll(array, values, undefined, comparator) + : array; } /** - * Creates a function that wraps `func` to invoke it with the `this` binding - * of `thisArg` and `partials` prepended to the arguments it receives. + * Removes elements from `array` corresponding to `indexes` and returns an + * array of removed elements. * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {*} thisArg The `this` binding of `func`. - * @param {Array} partials The arguments to prepend to those provided to - * the new function. - * @returns {Function} Returns the new wrapped function. + * **Note:** Unlike `_.at`, this method mutates `array`. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {...(number|number[])} [indexes] The indexes of elements to remove. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = ['a', 'b', 'c', 'd']; + * var pulled = _.pullAt(array, [1, 3]); + * + * console.log(array); + * // => ['a', 'c'] + * + * console.log(pulled); + * // => ['b', 'd'] */ - function createPartial(func, bitmask, thisArg, partials) { - var isBind = bitmask & WRAP_BIND_FLAG, - Ctor = createCtor(func); + var pullAt = flatRest(function(array, indexes) { + var length = array == null ? 0 : array.length, + result = baseAt(array, indexes); - function wrapper() { - var argsIndex = -1, - argsLength = arguments.length, - leftIndex = -1, - leftLength = partials.length, - args = Array(leftLength + argsLength), - fn = (this && this !== root && this instanceof wrapper) ? Ctor : func; + basePullAt(array, arrayMap(indexes, function(index) { + return isIndex(index, length) ? +index : index; + }).sort(compareAscending)); - while (++leftIndex < leftLength) { - args[leftIndex] = partials[leftIndex]; - } - while (argsLength--) { - args[leftIndex++] = arguments[++argsIndex]; - } - return apply(fn, isBind ? thisArg : this, args); - } - return wrapper; - } + return result; + }); /** - * Creates a `_.range` or `_.rangeRight` function. + * Removes all elements from `array` that `predicate` returns truthy for + * and returns an array of the removed elements. The predicate is invoked + * with three arguments: (value, index, array). * - * @private - * @param {boolean} [fromRight] Specify iterating from right to left. - * @returns {Function} Returns the new range function. + * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` + * to pull elements from an array by value. + * + * @static + * @memberOf _ + * @since 2.0.0 + * @category Array + * @param {Array} array The array to modify. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new array of removed elements. + * @example + * + * var array = [1, 2, 3, 4]; + * var evens = _.remove(array, function(n) { + * return n % 2 == 0; + * }); + * + * console.log(array); + * // => [1, 3] + * + * console.log(evens); + * // => [2, 4] */ - function createRange(fromRight) { - return function(start, end, step) { - if (step && typeof step != 'number' && isIterateeCall(start, end, step)) { - end = step = undefined; - } - // Ensure the sign of `-0` is preserved. - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); + function remove(array, predicate) { + var result = []; + if (!(array && array.length)) { + return result; + } + var index = -1, + indexes = [], + length = array.length; + + predicate = getIteratee(predicate, 3); + while (++index < length) { + var value = array[index]; + if (predicate(value, index, array)) { + result.push(value); + indexes.push(index); } - step = step === undefined ? (start < end ? 1 : -1) : toFinite(step); - return baseRange(start, end, step, fromRight); - }; + } + basePullAt(array, indexes); + return result; } /** - * Creates a function that performs a relational operation on two values. + * Reverses `array` so that the first element becomes the last, the second + * element becomes the second to last, and so on. * - * @private - * @param {Function} operator The function to perform the operation. - * @returns {Function} Returns the new relational operation function. + * **Note:** This method mutates `array` and is based on + * [`Array#reverse`](https://mdn.io/Array/reverse). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to modify. + * @returns {Array} Returns `array`. + * @example + * + * var array = [1, 2, 3]; + * + * _.reverse(array); + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] */ - function createRelationalOperation(operator) { - return function(value, other) { - if (!(typeof value == 'string' && typeof other == 'string')) { - value = toNumber(value); - other = toNumber(other); - } - return operator(value, other); - }; + function reverse(array) { + return array == null ? array : nativeReverse.call(array); } /** - * Creates a function that wraps `func` to continue currying. + * Creates a slice of `array` from `start` up to, but not including, `end`. * - * @private - * @param {Function} func The function to wrap. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @param {Function} wrapFunc The function to create the `func` wrapper. - * @param {*} placeholder The placeholder value. - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to prepend to those provided to - * the new function. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. + * **Note:** This method is used instead of + * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are + * returned. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to slice. + * @param {number} [start=0] The start position. + * @param {number} [end=array.length] The end position. + * @returns {Array} Returns the slice of `array`. */ - function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary, arity) { - var isCurry = bitmask & WRAP_CURRY_FLAG, - newHolders = isCurry ? holders : undefined, - newHoldersRight = isCurry ? undefined : holders, - newPartials = isCurry ? partials : undefined, - newPartialsRight = isCurry ? undefined : partials; - - bitmask |= (isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG); - bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG); - - if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) { - bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG); + function slice(array, start, end) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; } - var newData = [ - func, bitmask, thisArg, newPartials, newHolders, newPartialsRight, - newHoldersRight, argPos, ary, arity - ]; - - var result = wrapFunc.apply(undefined, newData); - if (isLaziable(func)) { - setData(result, newData); + if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { + start = 0; + end = length; } - result.placeholder = placeholder; - return setWrapToString(result, func, bitmask); + else { + start = start == null ? 0 : toInteger(start); + end = end === undefined ? length : toInteger(end); + } + return baseSlice(array, start, end); } /** - * Creates a function like `_.round`. + * Uses a binary search to determine the lowest index at which `value` + * should be inserted into `array` in order to maintain its sort order. * - * @private - * @param {string} methodName The name of the `Math` method to use when rounding. - * @returns {Function} Returns the new round function. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedIndex([30, 50], 40); + * // => 1 */ - function createRound(methodName) { - var func = Math[methodName]; - return function(number, precision) { - number = toNumber(number); - precision = precision == null ? 0 : nativeMin(toInteger(precision), 292); - if (precision && nativeIsFinite(number)) { - // Shift with exponential notation to avoid floating-point issues. - // See [MDN](https://mdn.io/round#Examples) for more details. - var pair = (toString(number) + 'e').split('e'), - value = func(pair[0] + 'e' + (+pair[1] + precision)); - - pair = (toString(value) + 'e').split('e'); - return +(pair[0] + 'e' + (+pair[1] - precision)); - } - return func(number); - }; + function sortedIndex(array, value) { + return baseSortedIndex(array, value); } /** - * Creates a set object of `values`. + * This method is like `_.sortedIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). * - * @private - * @param {Array} values The values to add to the set. - * @returns {Object} Returns the new set. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 0 + * + * // The `_.property` iteratee shorthand. + * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); + * // => 0 */ - var createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) { - return new Set(values); - }; + function sortedIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); + } /** - * Creates a `_.toPairs` or `_.toPairsIn` function. + * This method is like `_.indexOf` except that it performs a binary + * search on a sorted `array`. * - * @private - * @param {Function} keysFunc The function to get the keys of a given object. - * @returns {Function} Returns the new pairs function. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedIndexOf([4, 5, 5, 5, 6], 5); + * // => 1 */ - function createToPairs(keysFunc) { - return function(object) { - var tag = getTag(object); - if (tag == mapTag) { - return mapToArray(object); - } - if (tag == setTag) { - return setToPairs(object); + function sortedIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value); + if (index < length && eq(array[index], value)) { + return index; } - return baseToPairs(object, keysFunc(object)); - }; + } + return -1; } /** - * Creates a function that either curries or invokes `func` with optional - * `this` binding and partially applied arguments. + * This method is like `_.sortedIndex` except that it returns the highest + * index at which `value` should be inserted into `array` in order to + * maintain its sort order. * - * @private - * @param {Function|string} func The function or method name to wrap. - * @param {number} bitmask The bitmask flags. - * 1 - `_.bind` - * 2 - `_.bindKey` - * 4 - `_.curry` or `_.curryRight` of a bound function - * 8 - `_.curry` - * 16 - `_.curryRight` - * 32 - `_.partial` - * 64 - `_.partialRight` - * 128 - `_.rearg` - * 256 - `_.ary` - * 512 - `_.flip` - * @param {*} [thisArg] The `this` binding of `func`. - * @param {Array} [partials] The arguments to be partially applied. - * @param {Array} [holders] The `partials` placeholder indexes. - * @param {Array} [argPos] The argument positions of the new function. - * @param {number} [ary] The arity cap of `func`. - * @param {number} [arity] The arity of `func`. - * @returns {Function} Returns the new wrapped function. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * _.sortedLastIndex([4, 5, 5, 5, 6], 5); + * // => 4 */ - function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary, arity) { - var isBindKey = bitmask & WRAP_BIND_KEY_FLAG; - if (!isBindKey && typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - var length = partials ? partials.length : 0; - if (!length) { - bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG); - partials = holders = undefined; - } - ary = ary === undefined ? ary : nativeMax(toInteger(ary), 0); - arity = arity === undefined ? arity : toInteger(arity); - length -= holders ? holders.length : 0; - - if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) { - var partialsRight = partials, - holdersRight = holders; - - partials = holders = undefined; - } - var data = isBindKey ? undefined : getData(func); - - var newData = [ - func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, - argPos, ary, arity - ]; - - if (data) { - mergeData(newData, data); - } - func = newData[0]; - bitmask = newData[1]; - thisArg = newData[2]; - partials = newData[3]; - holders = newData[4]; - arity = newData[9] = newData[9] === undefined - ? (isBindKey ? 0 : func.length) - : nativeMax(newData[9] - length, 0); - - if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) { - bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG); - } - if (!bitmask || bitmask == WRAP_BIND_FLAG) { - var result = createBind(func, bitmask, thisArg); - } else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) { - result = createCurry(func, bitmask, arity); - } else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) { - result = createPartial(func, bitmask, thisArg, partials); - } else { - result = createHybrid.apply(undefined, newData); - } - var setter = data ? baseSetData : setData; - return setWrapToString(setter(result, newData), func, bitmask); + function sortedLastIndex(array, value) { + return baseSortedIndex(array, value, true); } /** - * Used by `_.defaults` to customize its `_.assignIn` use to assign properties - * of source objects to the destination object for all destination properties - * that resolve to `undefined`. + * This method is like `_.sortedLastIndex` except that it accepts `iteratee` + * which is invoked for `value` and each element of `array` to compute their + * sort ranking. The iteratee is invoked with one argument: (value). * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to assign. - * @param {Object} object The parent object of `objValue`. - * @returns {*} Returns the value to assign. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The sorted array to inspect. + * @param {*} value The value to evaluate. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the index at which `value` should be inserted + * into `array`. + * @example + * + * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * + * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); + * // => 1 + * + * // The `_.property` iteratee shorthand. + * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); + * // => 1 */ - function customDefaultsAssignIn(objValue, srcValue, key, object) { - if (objValue === undefined || - (eq(objValue, objectProto[key]) && !hasOwnProperty.call(object, key))) { - return srcValue; - } - return objValue; + function sortedLastIndexBy(array, value, iteratee) { + return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); } /** - * Used by `_.defaultsDeep` to customize its `_.merge` use to merge source - * objects into destination objects that are passed thru. + * This method is like `_.lastIndexOf` except that it performs a binary + * search on a sorted `array`. * - * @private - * @param {*} objValue The destination value. - * @param {*} srcValue The source value. - * @param {string} key The key of the property to merge. - * @param {Object} object The parent object of `objValue`. - * @param {Object} source The parent object of `srcValue`. - * @param {Object} [stack] Tracks traversed source values and their merged - * counterparts. - * @returns {*} Returns the value to assign. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {*} value The value to search for. + * @returns {number} Returns the index of the matched value, else `-1`. + * @example + * + * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); + * // => 3 */ - function customDefaultsMerge(objValue, srcValue, key, object, source, stack) { - if (isObject(objValue) && isObject(srcValue)) { - // Recursively merge objects and arrays (susceptible to call stack limits). - stack.set(srcValue, objValue); - baseMerge(objValue, srcValue, undefined, customDefaultsMerge, stack); - stack['delete'](srcValue); + function sortedLastIndexOf(array, value) { + var length = array == null ? 0 : array.length; + if (length) { + var index = baseSortedIndex(array, value, true) - 1; + if (eq(array[index], value)) { + return index; + } } - return objValue; + return -1; } /** - * Used by `_.omit` to customize its `_.cloneDeep` use to only clone plain - * objects. + * This method is like `_.uniq` except that it's designed and optimized + * for sorted arrays. * - * @private - * @param {*} value The value to inspect. - * @param {string} key The key of the property to inspect. - * @returns {*} Returns the uncloned value or `undefined` to defer cloning to `_.cloneDeep`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniq([1, 1, 2]); + * // => [1, 2] */ - function customOmitClone(value) { - return isPlainObject(value) ? undefined : value; + function sortedUniq(array) { + return (array && array.length) + ? baseSortedUniq(array) + : []; } /** - * A specialized version of `baseIsEqualDeep` for arrays with support for - * partial deep comparisons. + * This method is like `_.uniqBy` except that it's designed and optimized + * for sorted arrays. * - * @private - * @param {Array} array The array to compare. - * @param {Array} other The other array to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `array` and `other` objects. - * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); + * // => [1.1, 2.3] */ - function equalArrays(array, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - arrLength = array.length, - othLength = other.length; - - if (arrLength != othLength && !(isPartial && othLength > arrLength)) { - return false; - } - // Check that cyclic values are equal. - var arrStacked = stack.get(array); - var othStacked = stack.get(other); - if (arrStacked && othStacked) { - return arrStacked == other && othStacked == array; - } - var index = -1, - result = true, - seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined; - - stack.set(array, other); - stack.set(other, array); - - // Ignore non-index properties. - while (++index < arrLength) { - var arrValue = array[index], - othValue = other[index]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, arrValue, index, other, array, stack) - : customizer(arrValue, othValue, index, array, other, stack); - } - if (compared !== undefined) { - if (compared) { - continue; - } - result = false; - break; - } - // Recursively compare arrays (susceptible to call stack limits). - if (seen) { - if (!arraySome(other, function(othValue, othIndex) { - if (!cacheHas(seen, othIndex) && - (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { - return seen.push(othIndex); - } - })) { - result = false; - break; - } - } else if (!( - arrValue === othValue || - equalFunc(arrValue, othValue, bitmask, customizer, stack) - )) { - result = false; - break; - } - } - stack['delete'](array); - stack['delete'](other); - return result; + function sortedUniqBy(array, iteratee) { + return (array && array.length) + ? baseSortedUniq(array, getIteratee(iteratee, 2)) + : []; } /** - * A specialized version of `baseIsEqualDeep` for comparing objects of - * the same `toStringTag`. + * Gets all but the first element of `array`. * - * **Note:** This function only supports comparing values with tags of - * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to query. + * @returns {Array} Returns the slice of `array`. + * @example * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {string} tag The `toStringTag` of the objects to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * _.tail([1, 2, 3]); + * // => [2, 3] */ - function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) { - switch (tag) { - case dataViewTag: - if ((object.byteLength != other.byteLength) || - (object.byteOffset != other.byteOffset)) { - return false; - } - object = object.buffer; - other = other.buffer; - - case arrayBufferTag: - if ((object.byteLength != other.byteLength) || - !equalFunc(new Uint8Array(object), new Uint8Array(other))) { - return false; - } - return true; - - case boolTag: - case dateTag: - case numberTag: - // Coerce booleans to `1` or `0` and dates to milliseconds. - // Invalid dates are coerced to `NaN`. - return eq(+object, +other); - - case errorTag: - return object.name == other.name && object.message == other.message; - - case regexpTag: - case stringTag: - // Coerce regexes to strings and treat strings, primitives and objects, - // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring - // for more details. - return object == (other + ''); - - case mapTag: - var convert = mapToArray; - - case setTag: - var isPartial = bitmask & COMPARE_PARTIAL_FLAG; - convert || (convert = setToArray); - - if (object.size != other.size && !isPartial) { - return false; - } - // Assume cyclic values are equal. - var stacked = stack.get(object); - if (stacked) { - return stacked == other; - } - bitmask |= COMPARE_UNORDERED_FLAG; - - // Recursively compare objects (susceptible to call stack limits). - stack.set(object, other); - var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack); - stack['delete'](object); - return result; - - case symbolTag: - if (symbolValueOf) { - return symbolValueOf.call(object) == symbolValueOf.call(other); - } - } - return false; + function tail(array) { + var length = array == null ? 0 : array.length; + return length ? baseSlice(array, 1, length) : []; } /** - * A specialized version of `baseIsEqualDeep` for objects with support for - * partial deep comparisons. + * Creates a slice of `array` with `n` elements taken from the beginning. * - * @private - * @param {Object} object The object to compare. - * @param {Object} other The other object to compare. - * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details. - * @param {Function} customizer The function to customize comparisons. - * @param {Function} equalFunc The function to determine equivalents of values. - * @param {Object} stack Tracks traversed `object` and `other` objects. - * @returns {boolean} Returns `true` if the objects are equivalent, else `false`. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.take([1, 2, 3]); + * // => [1] + * + * _.take([1, 2, 3], 2); + * // => [1, 2] + * + * _.take([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.take([1, 2, 3], 0); + * // => [] */ - function equalObjects(object, other, bitmask, customizer, equalFunc, stack) { - var isPartial = bitmask & COMPARE_PARTIAL_FLAG, - objProps = getAllKeys(object), - objLength = objProps.length, - othProps = getAllKeys(other), - othLength = othProps.length; - - if (objLength != othLength && !isPartial) { - return false; - } - var index = objLength; - while (index--) { - var key = objProps[index]; - if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) { - return false; - } - } - // Check that cyclic values are equal. - var objStacked = stack.get(object); - var othStacked = stack.get(other); - if (objStacked && othStacked) { - return objStacked == other && othStacked == object; - } - var result = true; - stack.set(object, other); - stack.set(other, object); - - var skipCtor = isPartial; - while (++index < objLength) { - key = objProps[index]; - var objValue = object[key], - othValue = other[key]; - - if (customizer) { - var compared = isPartial - ? customizer(othValue, objValue, key, other, object, stack) - : customizer(objValue, othValue, key, object, other, stack); - } - // Recursively compare objects (susceptible to call stack limits). - if (!(compared === undefined - ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack)) - : compared - )) { - result = false; - break; - } - skipCtor || (skipCtor = key == 'constructor'); - } - if (result && !skipCtor) { - var objCtor = object.constructor, - othCtor = other.constructor; - - // Non `Object` object instances with different constructors are not equal. - if (objCtor != othCtor && - ('constructor' in object && 'constructor' in other) && - !(typeof objCtor == 'function' && objCtor instanceof objCtor && - typeof othCtor == 'function' && othCtor instanceof othCtor)) { - result = false; - } + function take(array, n, guard) { + if (!(array && array.length)) { + return []; } - stack['delete'](object); - stack['delete'](other); - return result; + n = (guard || n === undefined) ? 1 : toInteger(n); + return baseSlice(array, 0, n < 0 ? 0 : n); } /** - * A specialized version of `baseRest` which flattens the rest array. + * Creates a slice of `array` with `n` elements taken from the end. * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @returns {Function} Returns the new function. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {number} [n=1] The number of elements to take. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the slice of `array`. + * @example + * + * _.takeRight([1, 2, 3]); + * // => [3] + * + * _.takeRight([1, 2, 3], 2); + * // => [2, 3] + * + * _.takeRight([1, 2, 3], 5); + * // => [1, 2, 3] + * + * _.takeRight([1, 2, 3], 0); + * // => [] */ - function flatRest(func) { - return setToString(overRest(func, undefined, flatten), func + ''); + function takeRight(array, n, guard) { + var length = array == null ? 0 : array.length; + if (!length) { + return []; + } + n = (guard || n === undefined) ? 1 : toInteger(n); + n = length - n; + return baseSlice(array, n < 0 ? 0 : n, length); } /** - * Creates an array of own enumerable property names and symbols of `object`. + * Creates a slice of `array` with elements taken from the end. Elements are + * taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': false } + * ]; + * + * _.takeRightWhile(users, function(o) { return !o.active; }); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.matches` iteratee shorthand. + * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); + * // => objects for ['pebbles'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeRightWhile(users, ['active', false]); + * // => objects for ['fred', 'pebbles'] + * + * // The `_.property` iteratee shorthand. + * _.takeRightWhile(users, 'active'); + * // => [] */ - function getAllKeys(object) { - return baseGetAllKeys(object, keys, getSymbols); + function takeRightWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3), false, true) + : []; } /** - * Creates an array of own and inherited enumerable property names and - * symbols of `object`. + * Creates a slice of `array` with elements taken from the beginning. Elements + * are taken until `predicate` returns falsey. The predicate is invoked with + * three arguments: (value, index, array). * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names and symbols. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Array + * @param {Array} array The array to query. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the slice of `array`. + * @example + * + * var users = [ + * { 'user': 'barney', 'active': false }, + * { 'user': 'fred', 'active': false }, + * { 'user': 'pebbles', 'active': true } + * ]; + * + * _.takeWhile(users, function(o) { return !o.active; }); + * // => objects for ['barney', 'fred'] + * + * // The `_.matches` iteratee shorthand. + * _.takeWhile(users, { 'user': 'barney', 'active': false }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.takeWhile(users, ['active', false]); + * // => objects for ['barney', 'fred'] + * + * // The `_.property` iteratee shorthand. + * _.takeWhile(users, 'active'); + * // => [] */ - function getAllKeysIn(object) { - return baseGetAllKeys(object, keysIn, getSymbolsIn); + function takeWhile(array, predicate) { + return (array && array.length) + ? baseWhile(array, getIteratee(predicate, 3)) + : []; } /** - * Gets metadata for `func`. + * Creates an array of unique values, in order, from all given arrays using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * - * @private - * @param {Function} func The function to query. - * @returns {*} Returns the metadata for `func`. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.union([2], [1, 2]); + * // => [2, 1] */ - var getData = !metaMap ? noop : function(func) { - return metaMap.get(func); - }; + var union = baseRest(function(arrays) { + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + }); /** - * Gets the name of `func`. + * This method is like `_.union` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which uniqueness is computed. Result values are chosen from the first + * array in which the value occurs. The iteratee is invoked with one argument: + * (value). * - * @private - * @param {Function} func The function to query. - * @returns {string} Returns the function name. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example + * + * _.unionBy([2.1], [1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] */ - function getFuncName(func) { - var result = (func.name + ''), - array = realNames[result], - length = hasOwnProperty.call(realNames, result) ? array.length : 0; - - while (length--) { - var data = array[length], - otherFunc = data.func; - if (otherFunc == null || otherFunc == func) { - return data.name; - } + var unionBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; } - return result; - } + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + }); /** - * Gets the argument placeholder value for `func`. + * This method is like `_.union` except that it accepts `comparator` which + * is invoked to compare elements of `arrays`. Result values are chosen from + * the first array in which the value occurs. The comparator is invoked + * with two arguments: (arrVal, othVal). * - * @private - * @param {Function} func The function to inspect. - * @returns {*} Returns the placeholder value. - */ - function getHolder(func) { - var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func; - return object.placeholder; - } - - /** - * Gets the appropriate "iteratee" function. If `_.iteratee` is customized, - * this function returns the custom method, otherwise it returns `baseIteratee`. - * If arguments are provided, the chosen function is invoked with them and - * its result is returned. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of combined values. + * @example * - * @private - * @param {*} [value] The value to convert to an iteratee. - * @param {number} [arity] The arity of the created iteratee. - * @returns {Function} Returns the chosen function or its result. + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.unionWith(objects, others, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - function getIteratee() { - var result = lodash.iteratee || iteratee; - result = result === iteratee ? baseIteratee : result; - return arguments.length ? result(arguments[0], arguments[1]) : result; - } + var unionWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + }); /** - * Gets the data for `map`. + * Creates a duplicate-free version of an array, using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons, in which only the first occurrence of each element + * is kept. The order of result values is determined by the order they occur + * in the array. * - * @private - * @param {Object} map The map to query. - * @param {string} key The reference key. - * @returns {*} Returns the map data. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniq([2, 1, 2]); + * // => [2, 1] */ - function getMapData(map, key) { - var data = map.__data__; - return isKeyable(key) - ? data[typeof key == 'string' ? 'string' : 'hash'] - : data.map; + function uniq(array) { + return (array && array.length) ? baseUniq(array) : []; } /** - * Gets the property names, values, and compare flags of `object`. + * This method is like `_.uniq` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * uniqueness is computed. The order of result values is determined by the + * order they occur in the array. The iteratee is invoked with one argument: + * (value). * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the match data of `object`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * _.uniqBy([2.1, 1.2, 2.3], Math.floor); + * // => [2.1, 1.2] + * + * // The `_.property` iteratee shorthand. + * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 1 }, { 'x': 2 }] */ - function getMatchData(object) { - var result = keys(object), - length = result.length; - - while (length--) { - var key = result[length], - value = object[key]; - - result[length] = [key, value, isStrictComparable(value)]; - } - return result; + function uniqBy(array, iteratee) { + return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; } /** - * Gets the native function at `key` of `object`. + * This method is like `_.uniq` except that it accepts `comparator` which + * is invoked to compare elements of `array`. The order of result values is + * determined by the order they occur in the array.The comparator is invoked + * with two arguments: (arrVal, othVal). * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the method to get. - * @returns {*} Returns the function if it's native, else `undefined`. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new duplicate free array. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.uniqWith(objects, _.isEqual); + * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] */ - function getNative(object, key) { - var value = getValue(object, key); - return baseIsNative(value) ? value : undefined; + function uniqWith(array, comparator) { + comparator = typeof comparator == 'function' ? comparator : undefined; + return (array && array.length) ? baseUniq(array, undefined, comparator) : []; } /** - * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values. + * This method is like `_.zip` except that it accepts an array of grouped + * elements and creates an array regrouping the elements to their pre-zip + * configuration. * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the raw `toStringTag`. + * @static + * @memberOf _ + * @since 1.2.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] + * + * _.unzip(zipped); + * // => [['a', 'b'], [1, 2], [true, false]] */ - function getRawTag(value) { - var isOwn = hasOwnProperty.call(value, symToStringTag), - tag = value[symToStringTag]; - - try { - value[symToStringTag] = undefined; - var unmasked = true; - } catch (e) {} - - var result = nativeObjectToString.call(value); - if (unmasked) { - if (isOwn) { - value[symToStringTag] = tag; - } else { - delete value[symToStringTag]; - } + function unzip(array) { + if (!(array && array.length)) { + return []; } - return result; + var length = 0; + array = arrayFilter(array, function(group) { + if (isArrayLikeObject(group)) { + length = nativeMax(group.length, length); + return true; + } + }); + return baseTimes(length, function(index) { + return arrayMap(array, baseProperty(index)); + }); } /** - * Creates an array of the own enumerable symbols of `object`. + * This method is like `_.unzip` except that it accepts `iteratee` to specify + * how regrouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {Array} array The array of grouped elements to process. + * @param {Function} [iteratee=_.identity] The function to combine + * regrouped values. + * @returns {Array} Returns the new array of regrouped elements. + * @example + * + * var zipped = _.zip([1, 2], [10, 20], [100, 200]); + * // => [[1, 10, 100], [2, 20, 200]] + * + * _.unzipWith(zipped, _.add); + * // => [3, 30, 300] */ - var getSymbols = !nativeGetSymbols ? stubArray : function(object) { - if (object == null) { + function unzipWith(array, iteratee) { + if (!(array && array.length)) { return []; } - object = Object(object); - return arrayFilter(nativeGetSymbols(object), function(symbol) { - return propertyIsEnumerable.call(object, symbol); + var result = unzip(array); + if (iteratee == null) { + return result; + } + return arrayMap(result, function(group) { + return apply(iteratee, undefined, group); }); - }; + } /** - * Creates an array of the own and inherited enumerable symbols of `object`. + * Creates an array excluding all given values using + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * for equality comparisons. * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of symbols. + * **Note:** Unlike `_.pull`, this method returns a new array. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {Array} array The array to inspect. + * @param {...*} [values] The values to exclude. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.xor + * @example + * + * _.without([2, 1, 2, 3], 1, 2); + * // => [3] */ - var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) { - var result = []; - while (object) { - arrayPush(result, getSymbols(object)); - object = getPrototype(object); - } - return result; - }; + var without = baseRest(function(array, values) { + return isArrayLikeObject(array) + ? baseDifference(array, values) + : []; + }); /** - * Gets the `toStringTag` of `value`. + * Creates an array of unique values that is the + * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) + * of the given arrays. The order of result values is determined by the order + * they occur in the arrays. * - * @private - * @param {*} value The value to query. - * @returns {string} Returns the `toStringTag`. + * @static + * @memberOf _ + * @since 2.4.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @returns {Array} Returns the new array of filtered values. + * @see _.difference, _.without + * @example + * + * _.xor([2, 1], [2, 3]); + * // => [1, 3] */ - var getTag = baseGetTag; - - // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6. - if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) || - (Map && getTag(new Map) != mapTag) || - (Promise && getTag(Promise.resolve()) != promiseTag) || - (Set && getTag(new Set) != setTag) || - (WeakMap && getTag(new WeakMap) != weakMapTag)) { - getTag = function(value) { - var result = baseGetTag(value), - Ctor = result == objectTag ? value.constructor : undefined, - ctorString = Ctor ? toSource(Ctor) : ''; - - if (ctorString) { - switch (ctorString) { - case dataViewCtorString: return dataViewTag; - case mapCtorString: return mapTag; - case promiseCtorString: return promiseTag; - case setCtorString: return setTag; - case weakMapCtorString: return weakMapTag; - } - } - return result; - }; - } + var xor = baseRest(function(arrays) { + return baseXor(arrayFilter(arrays, isArrayLikeObject)); + }); /** - * Gets the view, applying any `transforms` to the `start` and `end` positions. + * This method is like `_.xor` except that it accepts `iteratee` which is + * invoked for each element of each `arrays` to generate the criterion by + * which by which they're compared. The order of result values is determined + * by the order they occur in the arrays. The iteratee is invoked with one + * argument: (value). * - * @private - * @param {number} start The start of the view. - * @param {number} end The end of the view. - * @param {Array} transforms The transformations to apply to the view. - * @returns {Object} Returns an object containing the `start` and `end` - * positions of the view. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); + * // => [1.2, 3.4] + * + * // The `_.property` iteratee shorthand. + * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); + * // => [{ 'x': 2 }] */ - function getView(start, end, transforms) { - var index = -1, - length = transforms.length; - - while (++index < length) { - var data = transforms[index], - size = data.size; - - switch (data.type) { - case 'drop': start += size; break; - case 'dropRight': end -= size; break; - case 'take': end = nativeMin(end, start + size); break; - case 'takeRight': start = nativeMax(start, end - size); break; - } + var xorBy = baseRest(function(arrays) { + var iteratee = last(arrays); + if (isArrayLikeObject(iteratee)) { + iteratee = undefined; } - return { 'start': start, 'end': end }; - } + return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); + }); /** - * Extracts wrapper details from the `source` body comment. + * This method is like `_.xor` except that it accepts `comparator` which is + * invoked to compare elements of `arrays`. The order of result values is + * determined by the order they occur in the arrays. The comparator is invoked + * with two arguments: (arrVal, othVal). * - * @private - * @param {string} source The source to inspect. - * @returns {Array} Returns the wrapper details. + * @static + * @memberOf _ + * @since 4.0.0 + * @category Array + * @param {...Array} [arrays] The arrays to inspect. + * @param {Function} [comparator] The comparator invoked per element. + * @returns {Array} Returns the new array of filtered values. + * @example + * + * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; + * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * + * _.xorWith(objects, others, _.isEqual); + * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] */ - function getWrapDetails(source) { - var match = source.match(reWrapDetails); - return match ? match[1].split(reSplitDetails) : []; - } + var xorWith = baseRest(function(arrays) { + var comparator = last(arrays); + comparator = typeof comparator == 'function' ? comparator : undefined; + return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); + }); /** - * Checks if `path` exists on `object`. + * Creates an array of grouped elements, the first of which contains the + * first elements of the given arrays, the second of which contains the + * second elements of the given arrays, and so on. * - * @private - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @param {Function} hasFunc The function to check properties. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @returns {Array} Returns the new array of grouped elements. + * @example + * + * _.zip(['a', 'b'], [1, 2], [true, false]); + * // => [['a', 1, true], ['b', 2, false]] */ - function hasPath(object, path, hasFunc) { - path = castPath(path, object); - - var index = -1, - length = path.length, - result = false; - - while (++index < length) { - var key = toKey(path[index]); - if (!(result = object != null && hasFunc(object, key))) { - break; - } - object = object[key]; - } - if (result || ++index != length) { - return result; - } - length = object == null ? 0 : object.length; - return !!length && isLength(length) && isIndex(key, length) && - (isArray(object) || isArguments(object)); - } + var zip = baseRest(unzip); /** - * Initializes an array clone. + * This method is like `_.fromPairs` except that it accepts two arrays, + * one of property identifiers and one of corresponding values. * - * @private - * @param {Array} array The array to clone. - * @returns {Array} Returns the initialized clone. + * @static + * @memberOf _ + * @since 0.4.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObject(['a', 'b'], [1, 2]); + * // => { 'a': 1, 'b': 2 } */ - function initCloneArray(array) { - var length = array.length, - result = new array.constructor(length); - - // Add properties assigned by `RegExp#exec`. - if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) { - result.index = array.index; - result.input = array.input; - } - return result; + function zipObject(props, values) { + return baseZipObject(props || [], values || [], assignValue); } /** - * Initializes an object clone. + * This method is like `_.zipObject` except that it supports property paths. * - * @private - * @param {Object} object The object to clone. - * @returns {Object} Returns the initialized clone. + * @static + * @memberOf _ + * @since 4.1.0 + * @category Array + * @param {Array} [props=[]] The property identifiers. + * @param {Array} [values=[]] The property values. + * @returns {Object} Returns the new object. + * @example + * + * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); + * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } */ - function initCloneObject(object) { - return (typeof object.constructor == 'function' && !isPrototype(object)) - ? baseCreate(getPrototype(object)) - : {}; + function zipObjectDeep(props, values) { + return baseZipObject(props || [], values || [], baseSet); } /** - * Initializes an object clone based on its `toStringTag`. + * This method is like `_.zip` except that it accepts `iteratee` to specify + * how grouped values should be combined. The iteratee is invoked with the + * elements of each group: (...group). * - * **Note:** This function only supports cloning values with tags of - * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`. + * @static + * @memberOf _ + * @since 3.8.0 + * @category Array + * @param {...Array} [arrays] The arrays to process. + * @param {Function} [iteratee=_.identity] The function to combine + * grouped values. + * @returns {Array} Returns the new array of grouped elements. + * @example * - * @private - * @param {Object} object The object to clone. - * @param {string} tag The `toStringTag` of the object to clone. - * @param {boolean} [isDeep] Specify a deep clone. - * @returns {Object} Returns the initialized clone. + * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { + * return a + b + c; + * }); + * // => [111, 222] */ - function initCloneByTag(object, tag, isDeep) { - var Ctor = object.constructor; - switch (tag) { - case arrayBufferTag: - return cloneArrayBuffer(object); - - case boolTag: - case dateTag: - return new Ctor(+object); - - case dataViewTag: - return cloneDataView(object, isDeep); - - case float32Tag: case float64Tag: - case int8Tag: case int16Tag: case int32Tag: - case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag: - return cloneTypedArray(object, isDeep); - - case mapTag: - return new Ctor; - - case numberTag: - case stringTag: - return new Ctor(object); - - case regexpTag: - return cloneRegExp(object); + var zipWith = baseRest(function(arrays) { + var length = arrays.length, + iteratee = length > 1 ? arrays[length - 1] : undefined; - case setTag: - return new Ctor; + iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; + return unzipWith(arrays, iteratee); + }); - case symbolTag: - return cloneSymbol(object); - } - } + /*------------------------------------------------------------------------*/ /** - * Inserts wrapper `details` in a comment at the top of the `source` body. + * Creates a `lodash` wrapper instance that wraps `value` with explicit method + * chain sequences enabled. The result of such sequences must be unwrapped + * with `_#value`. * - * @private - * @param {string} source The source to modify. - * @returns {Array} details The details to insert. - * @returns {string} Returns the modified source. - */ - function insertWrapDetails(source, details) { - var length = details.length; - if (!length) { - return source; - } - var lastIndex = length - 1; - details[lastIndex] = (length > 1 ? '& ' : '') + details[lastIndex]; - details = details.join(length > 2 ? ', ' : ' '); - return source.replace(reWrapComment, '{\n/* [wrapped with ' + details + '] */\n'); - } - - /** - * Checks if `value` is a flattenable `arguments` object or array. + * @static + * @memberOf _ + * @since 1.3.0 + * @category Seq + * @param {*} value The value to wrap. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is flattenable, else `false`. - */ - function isFlattenable(value) { - return isArray(value) || isArguments(value) || - !!(spreadableSymbol && value && value[spreadableSymbol]); - } - - /** - * Checks if `value` is a valid array-like index. + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'pebbles', 'age': 1 } + * ]; * - * @private - * @param {*} value The value to check. - * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index. - * @returns {boolean} Returns `true` if `value` is a valid index, else `false`. + * var youngest = _ + * .chain(users) + * .sortBy('age') + * .map(function(o) { + * return o.user + ' is ' + o.age; + * }) + * .head() + * .value(); + * // => 'pebbles is 1' */ - function isIndex(value, length) { - var type = typeof value; - length = length == null ? MAX_SAFE_INTEGER : length; - - return !!length && - (type == 'number' || - (type != 'symbol' && reIsUint.test(value))) && - (value > -1 && value % 1 == 0 && value < length); + function chain(value) { + var result = lodash(value); + result.__chain__ = true; + return result; } /** - * Checks if the given arguments are from an iteratee call. + * This method invokes `interceptor` and returns `value`. The interceptor + * is invoked with one argument; (value). The purpose of this method is to + * "tap into" a method chain sequence in order to modify intermediate results. * - * @private - * @param {*} value The potential iteratee value argument. - * @param {*} index The potential iteratee index or key argument. - * @param {*} object The potential iteratee object argument. - * @returns {boolean} Returns `true` if the arguments are from an iteratee call, - * else `false`. - */ - function isIterateeCall(value, index, object) { - if (!isObject(object)) { - return false; - } - var type = typeof index; - if (type == 'number' - ? (isArrayLike(object) && isIndex(index, object.length)) - : (type == 'string' && index in object) - ) { - return eq(object[index], value); - } - return false; - } - - /** - * Checks if `value` is a property name and not a property path. + * @static + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns `value`. + * @example * - * @private - * @param {*} value The value to check. - * @param {Object} [object] The object to query keys on. - * @returns {boolean} Returns `true` if `value` is a property name, else `false`. + * _([1, 2, 3]) + * .tap(function(array) { + * // Mutate input array. + * array.pop(); + * }) + * .reverse() + * .value(); + * // => [2, 1] */ - function isKey(value, object) { - if (isArray(value)) { - return false; - } - var type = typeof value; - if (type == 'number' || type == 'symbol' || type == 'boolean' || - value == null || isSymbol(value)) { - return true; - } - return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || - (object != null && value in Object(object)); + function tap(value, interceptor) { + interceptor(value); + return value; } /** - * Checks if `value` is suitable for use as unique object key. + * This method is like `_.tap` except that it returns the result of `interceptor`. + * The purpose of this method is to "pass thru" values replacing intermediate + * results in a method chain sequence. * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is suitable, else `false`. + * @static + * @memberOf _ + * @since 3.0.0 + * @category Seq + * @param {*} value The value to provide to `interceptor`. + * @param {Function} interceptor The function to invoke. + * @returns {*} Returns the result of `interceptor`. + * @example + * + * _(' abc ') + * .chain() + * .trim() + * .thru(function(value) { + * return [value]; + * }) + * .value(); + * // => ['abc'] */ - function isKeyable(value) { - var type = typeof value; - return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean') - ? (value !== '__proto__') - : (value === null); + function thru(value, interceptor) { + return interceptor(value); } /** - * Checks if `func` has a lazy counterpart. + * This method is the wrapper version of `_.at`. * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` has a lazy counterpart, - * else `false`. + * @name at + * @memberOf _ + * @since 1.0.0 + * @category Seq + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * + * _(object).at(['a[0].b.c', 'a[1]']).value(); + * // => [3, 4] */ - function isLaziable(func) { - var funcName = getFuncName(func), - other = lodash[funcName]; + var wrapperAt = flatRest(function(paths) { + var length = paths.length, + start = length ? paths[0] : 0, + value = this.__wrapped__, + interceptor = function(object) { return baseAt(object, paths); }; - if (typeof other != 'function' || !(funcName in LazyWrapper.prototype)) { - return false; - } - if (func === other) { - return true; + if (length > 1 || this.__actions__.length || + !(value instanceof LazyWrapper) || !isIndex(start)) { + return this.thru(interceptor); } - var data = getData(other); - return !!data && func === data[0]; - } + value = value.slice(start, +start + (length ? 1 : 0)); + value.__actions__.push({ + 'func': thru, + 'args': [interceptor], + 'thisArg': undefined + }); + return new LodashWrapper(value, this.__chain__).thru(function(array) { + if (length && !array.length) { + array.push(undefined); + } + return array; + }); + }); /** - * Checks if `func` has its source masked. + * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. * - * @private - * @param {Function} func The function to check. - * @returns {boolean} Returns `true` if `func` is masked, else `false`. - */ - function isMasked(func) { - return !!maskSrcKey && (maskSrcKey in func); - } - - /** - * Checks if `func` is capable of being masked. + * @name chain + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `func` is maskable, else `false`. - */ - var isMaskable = coreJsData ? isFunction : stubFalse; - - /** - * Checks if `value` is likely a prototype object. + * var users = [ + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 40 } + * ]; * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a prototype, else `false`. - */ - function isPrototype(value) { - var Ctor = value && value.constructor, - proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto; - - return value === proto; - } - - /** - * Checks if `value` is suitable for strict equality comparisons, i.e. `===`. + * // A sequence without explicit chaining. + * _(users).head(); + * // => { 'user': 'barney', 'age': 36 } * - * @private - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` if suitable for strict - * equality comparisons, else `false`. + * // A sequence with explicit chaining. + * _(users) + * .chain() + * .head() + * .pick('user') + * .value(); + * // => { 'user': 'barney' } */ - function isStrictComparable(value) { - return value === value && !isObject(value); + function wrapperChain() { + return chain(this); } /** - * A specialized version of `matchesProperty` for source values suitable - * for strict equality comparisons, i.e. `===`. + * Executes the chain sequence and returns the wrapped result. * - * @private - * @param {string} key The key of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - */ - function matchesStrictComparable(key, srcValue) { - return function(object) { - if (object == null) { - return false; - } - return object[key] === srcValue && - (srcValue !== undefined || (key in Object(object))); - }; - } - - /** - * A specialized version of `_.memoize` which clears the memoized function's - * cache when it exceeds `MAX_MEMOIZE_SIZE`. + * @name commit + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example * - * @private - * @param {Function} func The function to have its output memoized. - * @returns {Function} Returns the new memoized function. - */ - function memoizeCapped(func) { - var result = memoize(func, function(key) { - if (cache.size === MAX_MEMOIZE_SIZE) { - cache.clear(); - } - return key; - }); - - var cache = result.cache; - return result; - } - - /** - * Merges the function metadata of `source` into `data`. + * var array = [1, 2]; + * var wrapped = _(array).push(3); * - * Merging metadata reduces the number of wrappers used to invoke a function. - * This is possible because methods like `_.bind`, `_.curry`, and `_.partial` - * may be applied regardless of execution order. Methods like `_.ary` and - * `_.rearg` modify function arguments, making the order in which they are - * executed important, preventing the merging of metadata. However, we make - * an exception for a safe combined case where curried functions have `_.ary` - * and or `_.rearg` applied. + * console.log(array); + * // => [1, 2] * - * @private - * @param {Array} data The destination metadata. - * @param {Array} source The source metadata. - * @returns {Array} Returns `data`. - */ - function mergeData(data, source) { - var bitmask = data[1], - srcBitmask = source[1], - newBitmask = bitmask | srcBitmask, - isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG); - - var isCombo = - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) || - ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) || - ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG)); - - // Exit early if metadata can't be merged. - if (!(isCommon || isCombo)) { - return data; - } - // Use source `thisArg` if available. - if (srcBitmask & WRAP_BIND_FLAG) { - data[2] = source[2]; - // Set when currying a bound function. - newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG; - } - // Compose partial arguments. - var value = source[3]; - if (value) { - var partials = data[3]; - data[3] = partials ? composeArgs(partials, value, source[4]) : value; - data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4]; - } - // Compose partial right arguments. - value = source[5]; - if (value) { - partials = data[5]; - data[5] = partials ? composeArgsRight(partials, value, source[6]) : value; - data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6]; - } - // Use source `argPos` if available. - value = source[7]; - if (value) { - data[7] = value; - } - // Use source `ary` if it's smaller. - if (srcBitmask & WRAP_ARY_FLAG) { - data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]); - } - // Use source `arity` if one is not provided. - if (data[9] == null) { - data[9] = source[9]; - } - // Use source `func` and merge bitmasks. - data[0] = source[0]; - data[1] = newBitmask; - - return data; - } - - /** - * This function is like - * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * except that it includes inherited enumerable properties. + * wrapped = wrapped.commit(); + * console.log(array); + * // => [1, 2, 3] * - * @private - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. - */ - function nativeKeysIn(object) { - var result = []; - if (object != null) { - for (var key in Object(object)) { - result.push(key); - } - } - return result; - } - - /** - * Converts `value` to a string using `Object.prototype.toString`. + * wrapped.last(); + * // => 3 * - * @private - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * console.log(array); + * // => [1, 2, 3] */ - function objectToString(value) { - return nativeObjectToString.call(value); + function wrapperCommit() { + return new LodashWrapper(this.value(), this.__chain__); } /** - * A specialized version of `baseRest` which transforms the rest array. + * Gets the next value on a wrapped object following the + * [iterator protocol](https://mdn.io/iteration_protocols#iterator). * - * @private - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @param {Function} transform The rest array transform. - * @returns {Function} Returns the new function. - */ - function overRest(func, start, transform) { - start = nativeMax(start === undefined ? (func.length - 1) : start, 0); - return function() { - var args = arguments, - index = -1, - length = nativeMax(args.length - start, 0), - array = Array(length); - - while (++index < length) { - array[index] = args[start + index]; - } - index = -1; - var otherArgs = Array(start + 1); - while (++index < start) { - otherArgs[index] = args[index]; - } - otherArgs[start] = transform(array); - return apply(func, this, otherArgs); - }; - } - - /** - * Gets the parent value at `path` of `object`. + * @name next + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the next iterator value. + * @example * - * @private - * @param {Object} object The object to query. - * @param {Array} path The path to get the parent value of. - * @returns {*} Returns the parent value. - */ - function parent(object, path) { - return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1)); - } - - /** - * Reorder `array` according to the specified indexes where the element at - * the first index is assigned as the first element, the element at - * the second index is assigned as the second element, and so on. + * var wrapped = _([1, 2]); * - * @private - * @param {Array} array The array to reorder. - * @param {Array} indexes The arranged array indexes. - * @returns {Array} Returns `array`. - */ - function reorder(array, indexes) { - var arrLength = array.length, - length = nativeMin(indexes.length, arrLength), - oldArray = copyArray(array); - - while (length--) { - var index = indexes[length]; - array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined; - } - return array; - } - - /** - * Gets the value at `key`, unless `key` is "__proto__" or "constructor". + * wrapped.next(); + * // => { 'done': false, 'value': 1 } * - * @private - * @param {Object} object The object to query. - * @param {string} key The key of the property to get. - * @returns {*} Returns the property value. + * wrapped.next(); + * // => { 'done': false, 'value': 2 } + * + * wrapped.next(); + * // => { 'done': true, 'value': undefined } */ - function safeGet(object, key) { - if (key === 'constructor' && typeof object[key] === 'function') { - return; - } - - if (key == '__proto__') { - return; + function wrapperNext() { + if (this.__values__ === undefined) { + this.__values__ = toArray(this.value()); } + var done = this.__index__ >= this.__values__.length, + value = done ? undefined : this.__values__[this.__index__++]; - return object[key]; + return { 'done': done, 'value': value }; } /** - * Sets metadata for `func`. - * - * **Note:** If this function becomes hot, i.e. is invoked a lot in a short - * period of time, it will trip its breaker and transition to an identity - * function to avoid garbage collection pauses in V8. See - * [V8 issue 2070](https://bugs.chromium.org/p/v8/issues/detail?id=2070) - * for more details. + * Enables the wrapper to be iterable. * - * @private - * @param {Function} func The function to associate metadata with. - * @param {*} data The metadata. - * @returns {Function} Returns `func`. - */ - var setData = shortOut(baseSetData); - - /** - * A simple wrapper around the global [`setTimeout`](https://mdn.io/setTimeout). + * @name Symbol.iterator + * @memberOf _ + * @since 4.0.0 + * @category Seq + * @returns {Object} Returns the wrapper object. + * @example * - * @private - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @returns {number|Object} Returns the timer id or timeout object. - */ - var setTimeout = ctxSetTimeout || function(func, wait) { - return root.setTimeout(func, wait); - }; - - /** - * Sets the `toString` method of `func` to return `string`. + * var wrapped = _([1, 2]); * - * @private - * @param {Function} func The function to modify. - * @param {Function} string The `toString` result. - * @returns {Function} Returns `func`. - */ - var setToString = shortOut(baseSetToString); - - /** - * Sets the `toString` method of `wrapper` to mimic the source of `reference` - * with wrapper details in a comment at the top of the source body. + * wrapped[Symbol.iterator]() === wrapped; + * // => true * - * @private - * @param {Function} wrapper The function to modify. - * @param {Function} reference The reference function. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Function} Returns `wrapper`. + * Array.from(wrapped); + * // => [1, 2] */ - function setWrapToString(wrapper, reference, bitmask) { - var source = (reference + ''); - return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask))); + function wrapperToIterator() { + return this; } /** - * Creates a function that'll short out and invoke `identity` instead - * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN` - * milliseconds. + * Creates a clone of the chain sequence planting `value` as the wrapped value. * - * @private - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new shortable function. + * @name plant + * @memberOf _ + * @since 3.2.0 + * @category Seq + * @param {*} value The value to plant. + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example + * + * function square(n) { + * return n * n; + * } + * + * var wrapped = _([1, 2]).map(square); + * var other = wrapped.plant([3, 4]); + * + * other.value(); + * // => [9, 16] + * + * wrapped.value(); + * // => [1, 4] */ - function shortOut(func) { - var count = 0, - lastCalled = 0; - - return function() { - var stamp = nativeNow(), - remaining = HOT_SPAN - (stamp - lastCalled); + function wrapperPlant(value) { + var result, + parent = this; - lastCalled = stamp; - if (remaining > 0) { - if (++count >= HOT_COUNT) { - return arguments[0]; - } + while (parent instanceof baseLodash) { + var clone = wrapperClone(parent); + clone.__index__ = 0; + clone.__values__ = undefined; + if (result) { + previous.__wrapped__ = clone; } else { - count = 0; + result = clone; } - return func.apply(undefined, arguments); - }; - } - - /** - * A specialized version of `_.shuffle` which mutates and sets the size of `array`. - * - * @private - * @param {Array} array The array to shuffle. - * @param {number} [size=array.length] The size of `array`. - * @returns {Array} Returns `array`. - */ - function shuffleSelf(array, size) { - var index = -1, - length = array.length, - lastIndex = length - 1; - - size = size === undefined ? length : size; - while (++index < size) { - var rand = baseRandom(index, lastIndex), - value = array[rand]; - - array[rand] = array[index]; - array[index] = value; + var previous = clone; + parent = parent.__wrapped__; } - array.length = size; - return array; + previous.__wrapped__ = value; + return result; } /** - * Converts `string` to a property path array. + * This method is the wrapper version of `_.reverse`. * - * @private - * @param {string} string The string to convert. - * @returns {Array} Returns the property path array. - */ - var stringToPath = memoizeCapped(function(string) { - var result = []; - if (string.charCodeAt(0) === 46 /* . */) { - result.push(''); - } - string.replace(rePropName, function(match, number, quote, subString) { - result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match)); - }); - return result; - }); - - /** - * Converts `value` to a string key if it's not a string or symbol. + * **Note:** This method mutates the wrapped array. * - * @private - * @param {*} value The value to inspect. - * @returns {string|symbol} Returns the key. - */ - function toKey(value) { - if (typeof value == 'string' || isSymbol(value)) { - return value; - } - var result = (value + ''); - return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result; - } - - /** - * Converts `func` to its source code. + * @name reverse + * @memberOf _ + * @since 0.1.0 + * @category Seq + * @returns {Object} Returns the new `lodash` wrapper instance. + * @example * - * @private - * @param {Function} func The function to convert. - * @returns {string} Returns the source code. - */ - function toSource(func) { - if (func != null) { - try { - return funcToString.call(func); - } catch (e) {} - try { - return (func + ''); - } catch (e) {} - } - return ''; - } - - /** - * Updates wrapper `details` based on `bitmask` flags. + * var array = [1, 2, 3]; * - * @private - * @returns {Array} details The details to modify. - * @param {number} bitmask The bitmask flags. See `createWrap` for more details. - * @returns {Array} Returns `details`. + * _(array).reverse().value() + * // => [3, 2, 1] + * + * console.log(array); + * // => [3, 2, 1] */ - function updateWrapDetails(details, bitmask) { - arrayEach(wrapFlags, function(pair) { - var value = '_.' + pair[0]; - if ((bitmask & pair[1]) && !arrayIncludes(details, value)) { - details.push(value); + function wrapperReverse() { + var value = this.__wrapped__; + if (value instanceof LazyWrapper) { + var wrapped = value; + if (this.__actions__.length) { + wrapped = new LazyWrapper(this); } - }); - return details.sort(); + wrapped = wrapped.reverse(); + wrapped.__actions__.push({ + 'func': thru, + 'args': [reverse], + 'thisArg': undefined + }); + return new LodashWrapper(wrapped, this.__chain__); + } + return this.thru(reverse); } /** - * Creates a clone of `wrapper`. + * Executes the chain sequence to resolve the unwrapped value. * - * @private - * @param {Object} wrapper The wrapper to clone. - * @returns {Object} Returns the cloned wrapper. + * @name value + * @memberOf _ + * @since 0.1.0 + * @alias toJSON, valueOf + * @category Seq + * @returns {*} Returns the resolved unwrapped value. + * @example + * + * _([1, 2, 3]).value(); + * // => [1, 2, 3] */ - function wrapperClone(wrapper) { - if (wrapper instanceof LazyWrapper) { - return wrapper.clone(); - } - var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__); - result.__actions__ = copyArray(wrapper.__actions__); - result.__index__ = wrapper.__index__; - result.__values__ = wrapper.__values__; - return result; + function wrapperValue() { + return baseWrapperValue(this.__wrapped__, this.__actions__); } /*------------------------------------------------------------------------*/ /** - * Creates an array of elements split into groups the length of `size`. - * If `array` can't be split evenly, the final chunk will be the remaining - * elements. + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the number of times the key was returned by `iteratee`. The + * iteratee is invoked with one argument: (value). * * @static * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to process. - * @param {number} [size=1] The length of each chunk - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the new array of chunks. + * @since 0.5.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. * @example * - * _.chunk(['a', 'b', 'c', 'd'], 2); - * // => [['a', 'b'], ['c', 'd']] + * _.countBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': 1, '6': 2 } * - * _.chunk(['a', 'b', 'c', 'd'], 3); - * // => [['a', 'b', 'c'], ['d']] + * // The `_.property` iteratee shorthand. + * _.countBy(['one', 'two', 'three'], 'length'); + * // => { '3': 2, '5': 1 } */ - function chunk(array, size, guard) { - if ((guard ? isIterateeCall(array, size, guard) : size === undefined)) { - size = 1; + var countBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + ++result[key]; } else { - size = nativeMax(toInteger(size), 0); - } - var length = array == null ? 0 : array.length; - if (!length || size < 1) { - return []; - } - var index = 0, - resIndex = 0, - result = Array(nativeCeil(length / size)); - - while (index < length) { - result[resIndex++] = baseSlice(array, index, (index += size)); + baseAssignValue(result, key, 1); } - return result; - } + }); /** - * Creates an array with all falsey values removed. The values `false`, `null`, - * `0`, `""`, `undefined`, and `NaN` are falsey. + * Checks if `predicate` returns truthy for **all** elements of `collection`. + * Iteration is stopped once `predicate` returns falsey. The predicate is + * invoked with three arguments: (value, index|key, collection). + * + * **Note:** This method returns `true` for + * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because + * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of + * elements of empty collections. * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {Array} array The array to compact. - * @returns {Array} Returns the new array of filtered values. + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if all elements pass the predicate check, + * else `false`. * @example * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] + * _.every([true, 1, null, 'yes'], Boolean); + * // => false + * + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; + * + * // The `_.matches` iteratee shorthand. + * _.every(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.every(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.every(users, 'active'); + * // => false */ - function compact(array) { - var index = -1, - length = array == null ? 0 : array.length, - resIndex = 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result[resIndex++] = value; - } + function every(collection, predicate, guard) { + var func = isArray(collection) ? arrayEvery : baseEvery; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; } - return result; + return func(collection, getIteratee(predicate, 3)); } /** - * Creates a new array concatenating `array` with any additional arrays - * and/or values. + * Iterates over elements of `collection`, returning an array of all elements + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). + * + * **Note:** Unlike `_.remove`, this method returns a new array. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to concatenate. - * @param {...*} [values] The values to concatenate. - * @returns {Array} Returns the new concatenated array. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.reject * @example * - * var array = [1]; - * var other = _.concat(array, 2, [3], [[4]]); + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; * - * console.log(other); - * // => [1, 2, 3, [4]] + * _.filter(users, function(o) { return !o.active; }); + * // => objects for ['fred'] * - * console.log(array); - * // => [1] + * // The `_.matches` iteratee shorthand. + * _.filter(users, { 'age': 36, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, ['active', false]); + * // => objects for ['fred'] + * + * // The `_.property` iteratee shorthand. + * _.filter(users, 'active'); + * // => objects for ['barney'] + * + * // Combining several predicates using `_.overEvery` or `_.overSome`. + * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); + * // => objects for ['fred', 'barney'] */ - function concat() { - var length = arguments.length; - if (!length) { - return []; - } - var args = Array(length - 1), - array = arguments[0], - index = length; - - while (index--) { - args[index - 1] = arguments[index]; - } - return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1)); + function filter(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, getIteratee(predicate, 3)); } /** - * Creates an array of `array` values not included in the other given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. - * - * **Note:** Unlike `_.pullAll`, this method returns a new array. + * Iterates over elements of `collection`, returning the first element + * `predicate` returns truthy for. The predicate is invoked with three + * arguments: (value, index|key, collection). * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.without, _.xor + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=0] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. * @example * - * _.difference([2, 1], [2, 3]); - * // => [1] - */ - var difference = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true)) - : []; - }); - - /** - * This method is like `_.difference` except that it accepts `iteratee` which - * is invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false }, + * { 'user': 'pebbles', 'age': 1, 'active': true } + * ]; * - * **Note:** Unlike `_.pullAllBy`, this method returns a new array. + * _.find(users, function(o) { return o.age < 40; }); + * // => object for 'barney' * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example + * // The `_.matches` iteratee shorthand. + * _.find(users, { 'age': 1, 'active': true }); + * // => object for 'pebbles' * - * _.differenceBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2] + * // The `_.matchesProperty` iteratee shorthand. + * _.find(users, ['active', false]); + * // => object for 'fred' * * // The `_.property` iteratee shorthand. - * _.differenceBy([{ 'x': 2 }, { 'x': 1 }], [{ 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] + * _.find(users, 'active'); + * // => object for 'barney' */ - var differenceBy = baseRest(function(array, values) { - var iteratee = last(values); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)) - : []; - }); + var find = createFind(findIndex); /** - * This method is like `_.difference` except that it accepts `comparator` - * which is invoked to compare elements of `array` to `values`. The order and - * references of result values are determined by the first array. The comparator - * is invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.pullAllWith`, this method returns a new array. + * This method is like `_.find` except that it iterates over elements of + * `collection` from right to left. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...Array} [values] The values to exclude. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param {number} [fromIndex=collection.length-1] The index to search from. + * @returns {*} Returns the matched element, else `undefined`. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * - * _.differenceWith(objects, [{ 'x': 1, 'y': 2 }], _.isEqual); - * // => [{ 'x': 2, 'y': 1 }] + * _.findLast([1, 2, 3, 4], function(n) { + * return n % 2 == 1; + * }); + * // => 3 */ - var differenceWith = baseRest(function(array, values) { - var comparator = last(values); - if (isArrayLikeObject(comparator)) { - comparator = undefined; - } - return isArrayLikeObject(array) - ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), undefined, comparator) - : []; - }); + var findLast = createFind(findLastIndex); /** - * Creates a slice of `array` with `n` elements dropped from the beginning. + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). * * @static * @memberOf _ - * @since 0.5.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. * @example * - * _.drop([1, 2, 3]); - * // => [2, 3] - * - * _.drop([1, 2, 3], 2); - * // => [3] - * - * _.drop([1, 2, 3], 5); - * // => [] + * function duplicate(n) { + * return [n, n]; + * } * - * _.drop([1, 2, 3], 0); - * // => [1, 2, 3] + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] */ - function drop(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, n < 0 ? 0 : n, length); + function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); } /** - * Creates a slice of `array` with `n` elements dropped from the end. + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results. * * @static * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to drop. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. * @example * - * _.dropRight([1, 2, 3]); - * // => [1, 2] - * - * _.dropRight([1, 2, 3], 2); - * // => [1] - * - * _.dropRight([1, 2, 3], 5); - * // => [] + * function duplicate(n) { + * return [[[n, n]]]; + * } * - * _.dropRight([1, 2, 3], 0); - * // => [1, 2, 3] + * _.flatMapDeep([1, 2], duplicate); + * // => [1, 1, 2, 2] */ - function dropRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, 0, n < 0 ? 0 : n); + function flatMapDeep(collection, iteratee) { + return baseFlatten(map(collection, iteratee), INFINITY); } /** - * Creates a slice of `array` excluding elements dropped from the end. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). + * This method is like `_.flatMap` except that it recursively flattens the + * mapped results up to `depth` times. * * @static * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. + * @since 4.7.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {number} [depth=1] The maximum recursion depth. + * @returns {Array} Returns the new flattened array. * @example * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.dropRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney'] - * - * // The `_.matches` iteratee shorthand. - * _.dropRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['barney', 'fred'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropRightWhile(users, ['active', false]); - * // => objects for ['barney'] + * function duplicate(n) { + * return [[[n, n]]]; + * } * - * // The `_.property` iteratee shorthand. - * _.dropRightWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] + * _.flatMapDepth([1, 2], duplicate, 2); + * // => [[1, 1], [2, 2]] */ - function dropRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), true, true) - : []; + function flatMapDepth(collection, iteratee, depth) { + depth = depth === undefined ? 1 : toInteger(depth); + return baseFlatten(map(collection, iteratee), depth); } /** - * Creates a slice of `array` excluding elements dropped from the beginning. - * Elements are dropped until `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index, array). + * Iterates over elements of `collection` and invokes `iteratee` for each element. + * The iteratee is invoked with three arguments: (value, index|key, collection). + * Iteratee functions may exit iteration early by explicitly returning `false`. + * + * **Note:** As with other "Collections" methods, objects with a "length" + * property are iterated like arrays. To avoid this behavior use `_.forIn` + * or `_.forOwn` for object iteration. * * @static * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. + * @since 0.1.0 + * @alias each + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEachRight * @example * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.dropWhile(users, function(o) { return !o.active; }); - * // => objects for ['pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.dropWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.dropWhile(users, ['active', false]); - * // => objects for ['pebbles'] + * _.forEach([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `1` then `2`. * - * // The `_.property` iteratee shorthand. - * _.dropWhile(users, 'active'); - * // => objects for ['barney', 'fred', 'pebbles'] + * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ - function dropWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), true) - : []; + function forEach(collection, iteratee) { + var func = isArray(collection) ? arrayEach : baseEach; + return func(collection, getIteratee(iteratee, 3)); } /** - * Fills elements of `array` with `value` from `start` up to, but not - * including, `end`. - * - * **Note:** This method mutates `array`. + * This method is like `_.forEach` except that it iterates over elements of + * `collection` from right to left. * * @static * @memberOf _ - * @since 3.2.0 - * @category Array - * @param {Array} array The array to fill. - * @param {*} value The value to fill `array` with. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns `array`. + * @since 2.0.0 + * @alias eachRight + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array|Object} Returns `collection`. + * @see _.forEach * @example * - * var array = [1, 2, 3]; - * - * _.fill(array, 'a'); - * console.log(array); - * // => ['a', 'a', 'a'] - * - * _.fill(Array(3), 2); - * // => [2, 2, 2] - * - * _.fill([4, 6, 8, 10], '*', 1, 3); - * // => [4, '*', '*', 10] + * _.forEachRight([1, 2], function(value) { + * console.log(value); + * }); + * // => Logs `2` then `1`. */ - function fill(array, value, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (start && typeof start != 'number' && isIterateeCall(array, value, start)) { - start = 0; - end = length; - } - return baseFill(array, value, start, end); + function forEachRight(collection, iteratee) { + var func = isArray(collection) ? arrayEachRight : baseEachRight; + return func(collection, getIteratee(iteratee, 3)); } /** - * This method is like `_.find` except that it returns the index of the first - * element `predicate` returns truthy for instead of the element itself. + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The order of grouped values + * is determined by the order they occur in `collection`. The corresponding + * value of each key is an array of elements responsible for generating the + * key. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ - * @since 1.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. * @example * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; - * - * _.findIndex(users, function(o) { return o.user == 'barney'; }); - * // => 0 - * - * // The `_.matches` iteratee shorthand. - * _.findIndex(users, { 'user': 'fred', 'active': false }); - * // => 1 - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findIndex(users, ['active', false]); - * // => 0 + * _.groupBy([6.1, 4.2, 6.3], Math.floor); + * // => { '4': [4.2], '6': [6.1, 6.3] } * * // The `_.property` iteratee shorthand. - * _.findIndex(users, 'active'); - * // => 2 + * _.groupBy(['one', 'two', 'three'], 'length'); + * // => { '3': ['one', 'two'], '5': ['three'] } */ - function findIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); + var groupBy = createAggregator(function(result, value, key) { + if (hasOwnProperty.call(result, key)) { + result[key].push(value); + } else { + baseAssignValue(result, key, [value]); } - return baseFindIndex(array, getIteratee(predicate, 3), index); - } + }); /** - * This method is like `_.findIndex` except that it iterates over elements - * of `collection` from right to left. + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. * * @static * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the found element, else `-1`. + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. * @example * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.findLastIndex(users, function(o) { return o.user == 'pebbles'; }); - * // => 2 + * _.includes([1, 2, 3], 1); + * // => true * - * // The `_.matches` iteratee shorthand. - * _.findLastIndex(users, { 'user': 'barney', 'active': true }); - * // => 0 + * _.includes([1, 2, 3], 1, 2); + * // => false * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastIndex(users, ['active', false]); - * // => 2 + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true * - * // The `_.property` iteratee shorthand. - * _.findLastIndex(users, 'active'); - * // => 0 + * _.includes('abcd', 'bc'); + * // => true */ - function findLastIndex(array, predicate, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = length - 1; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = fromIndex < 0 - ? nativeMax(length + index, 0) - : nativeMin(index, length - 1); + function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); } - return baseFindIndex(array, getIteratee(predicate, 3), index, true); + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } /** - * Flattens `array` a single level deep. + * Invokes the method at `path` of each element in `collection`, returning + * an array of the results of each invoked method. Any additional arguments + * are provided to each invoked method. If `path` is a function, it's invoked + * for, and `this` bound to, each element in `collection`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array|Function|string} path The path of the method to invoke or + * the function invoked per iteration. + * @param {...*} [args] The arguments to invoke each method with. + * @returns {Array} Returns the array of results. * @example * - * _.flatten([1, [2, [3, [4]], 5]]); - * // => [1, 2, [3, [4]], 5] + * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); + * // => [[1, 5, 7], [1, 2, 3]] + * + * _.invokeMap([123, 456], String.prototype.split, ''); + * // => [['1', '2', '3'], ['4', '5', '6']] */ - function flatten(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, 1) : []; - } + var invokeMap = baseRest(function(collection, path, args) { + var index = -1, + isFunc = typeof path == 'function', + result = isArrayLike(collection) ? Array(collection.length) : []; + + baseEach(collection, function(value) { + result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); + }); + return result; + }); /** - * Recursively flattens `array`. + * Creates an object composed of keys generated from the results of running + * each element of `collection` thru `iteratee`. The corresponding value of + * each key is the last element responsible for generating the key. The + * iteratee is invoked with one argument: (value). * * @static * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to flatten. - * @returns {Array} Returns the new flattened array. + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee to transform keys. + * @returns {Object} Returns the composed aggregate object. * @example * - * _.flattenDeep([1, [2, [3, [4]], 5]]); - * // => [1, 2, 3, 4, 5] + * var array = [ + * { 'dir': 'left', 'code': 97 }, + * { 'dir': 'right', 'code': 100 } + * ]; + * + * _.keyBy(array, function(o) { + * return String.fromCharCode(o.code); + * }); + * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * + * _.keyBy(array, 'dir'); + * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } */ - function flattenDeep(array) { - var length = array == null ? 0 : array.length; - return length ? baseFlatten(array, INFINITY) : []; - } + var keyBy = createAggregator(function(result, value, key) { + baseAssignValue(result, key, value); + }); /** - * Recursively flatten `array` up to `depth` times. + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` * * @static * @memberOf _ - * @since 4.4.0 - * @category Array - * @param {Array} array The array to flatten. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. * @example * - * var array = [1, [2, [3, [4]], 5]]; + * function square(n) { + * return n * n; + * } * - * _.flattenDepth(array, 1); - * // => [1, 2, [3, [4]], 5] + * _.map([4, 8], square); + * // => [16, 64] * - * _.flattenDepth(array, 2); - * // => [1, 2, 3, [4], 5] + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] */ - function flattenDepth(array, depth) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(array, depth); + function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, getIteratee(iteratee, 3)); } /** - * The inverse of `_.toPairs`; this method returns an object composed - * from key-value `pairs`. + * This method is like `_.sortBy` except that it allows specifying the sort + * orders of the iteratees to sort by. If `orders` is unspecified, all values + * are sorted in ascending order. Otherwise, specify an order of "desc" for + * descending or "asc" for ascending sort order of corresponding values. * * @static * @memberOf _ * @since 4.0.0 - * @category Array - * @param {Array} pairs The key-value pairs. - * @returns {Object} Returns the new object. + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] + * The iteratees to sort by. + * @param {string[]} [orders] The sort orders of `iteratees`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {Array} Returns the new sorted array. * @example * - * _.fromPairs([['a', 1], ['b', 2]]); - * // => { 'a': 1, 'b': 2 } + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 34 }, + * { 'user': 'fred', 'age': 40 }, + * { 'user': 'barney', 'age': 36 } + * ]; + * + * // Sort by `user` in ascending order and by `age` in descending order. + * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] */ - function fromPairs(pairs) { - var index = -1, - length = pairs == null ? 0 : pairs.length, - result = {}; - - while (++index < length) { - var pair = pairs[index]; - result[pair[0]] = pair[1]; + function orderBy(collection, iteratees, orders, guard) { + if (collection == null) { + return []; } - return result; + if (!isArray(iteratees)) { + iteratees = iteratees == null ? [] : [iteratees]; + } + orders = guard ? undefined : orders; + if (!isArray(orders)) { + orders = orders == null ? [] : [orders]; + } + return baseOrderBy(collection, iteratees, orders); } /** - * Gets the first element of `array`. + * Creates an array of elements split into two groups, the first of which + * contains elements `predicate` returns truthy for, the second of which + * contains elements `predicate` returns falsey for. The predicate is + * invoked with one argument: (value). * * @static * @memberOf _ - * @since 0.1.0 - * @alias first - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the first element of `array`. + * @since 3.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of grouped elements. * @example * - * _.head([1, 2, 3]); - * // => 1 + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true }, + * { 'user': 'pebbles', 'age': 1, 'active': false } + * ]; * - * _.head([]); - * // => undefined + * _.partition(users, function(o) { return o.active; }); + * // => objects for [['fred'], ['barney', 'pebbles']] + * + * // The `_.matches` iteratee shorthand. + * _.partition(users, { 'age': 1, 'active': false }); + * // => objects for [['pebbles'], ['barney', 'fred']] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.partition(users, ['active', false]); + * // => objects for [['barney', 'pebbles'], ['fred']] + * + * // The `_.property` iteratee shorthand. + * _.partition(users, 'active'); + * // => objects for [['fred'], ['barney', 'pebbles']] */ - function head(array) { - return (array && array.length) ? array[0] : undefined; - } + var partition = createAggregator(function(result, value, key) { + result[key ? 0 : 1].push(value); + }, function() { return [[], []]; }); /** - * Gets the index at which the first occurrence of `value` is found in `array` - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. If `fromIndex` is negative, it's used as the - * offset from the end of `array`. + * Reduces `collection` to a value which is the accumulated result of running + * each element in `collection` thru `iteratee`, where each successive + * invocation is supplied the return value of the previous. If `accumulator` + * is not given, the first element of `collection` is used as the initial + * value. The iteratee is invoked with four arguments: + * (accumulator, value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.reduce`, `_.reduceRight`, and `_.transform`. + * + * The guarded methods are: + * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, + * and `sortBy` * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduceRight * @example * - * _.indexOf([1, 2, 1, 2], 2); - * // => 1 - * - * // Search from the `fromIndex`. - * _.indexOf([1, 2, 1, 2], 2, 2); + * _.reduce([1, 2], function(sum, n) { + * return sum + n; + * }, 0); * // => 3 + * + * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * return result; + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) */ - function indexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; - } - var index = fromIndex == null ? 0 : toInteger(fromIndex); - if (index < 0) { - index = nativeMax(length + index, 0); - } - return baseIndexOf(array, value, index); + function reduce(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduce : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); } /** - * Gets all but the last element of `array`. + * This method is like `_.reduce` except that it iterates over elements of + * `collection` from right to left. * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The initial value. + * @returns {*} Returns the accumulated value. + * @see _.reduce * @example * - * _.initial([1, 2, 3]); - * // => [1, 2] + * var array = [[0, 1], [2, 3], [4, 5]]; + * + * _.reduceRight(array, function(flattened, other) { + * return flattened.concat(other); + * }, []); + * // => [4, 5, 2, 3, 0, 1] */ - function initial(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 0, -1) : []; + function reduceRight(collection, iteratee, accumulator) { + var func = isArray(collection) ? arrayReduceRight : baseReduce, + initAccum = arguments.length < 3; + + return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); } /** - * Creates an array of unique values that are included in all given arrays - * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. The order and references of result values are - * determined by the first array. + * The opposite of `_.filter`; this method returns the elements of `collection` + * that `predicate` does **not** return truthy for. * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of intersecting values. + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new filtered array. + * @see _.filter * @example * - * _.intersection([2, 1], [2, 3]); - * // => [2] - */ - var intersection = baseRest(function(arrays) { - var mapped = arrayMap(arrays, castArrayLikeObject); - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped) - : []; - }); - - /** - * This method is like `_.intersection` except that it accepts `iteratee` - * which is invoked for each element of each `arrays` to generate the criterion - * by which they're compared. The order and references of result values are - * determined by the first array. The iteratee is invoked with one argument: - * (value). + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': false }, + * { 'user': 'fred', 'age': 40, 'active': true } + * ]; * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of intersecting values. - * @example + * _.reject(users, function(o) { return !o.active; }); + * // => objects for ['fred'] * - * _.intersectionBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [2.1] + * // The `_.matches` iteratee shorthand. + * _.reject(users, { 'age': 40, 'active': true }); + * // => objects for ['barney'] + * + * // The `_.matchesProperty` iteratee shorthand. + * _.reject(users, ['active', false]); + * // => objects for ['fred'] * * // The `_.property` iteratee shorthand. - * _.intersectionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }] + * _.reject(users, 'active'); + * // => objects for ['barney'] */ - var intersectionBy = baseRest(function(arrays) { - var iteratee = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - if (iteratee === last(mapped)) { - iteratee = undefined; - } else { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, getIteratee(iteratee, 2)) - : []; - }); + function reject(collection, predicate) { + var func = isArray(collection) ? arrayFilter : baseFilter; + return func(collection, negate(getIteratee(predicate, 3))); + } /** - * This method is like `_.intersection` except that it accepts `comparator` - * which is invoked to compare elements of `arrays`. The order and references - * of result values are determined by the first array. The comparator is - * invoked with two arguments: (arrVal, othVal). + * Gets a random element from `collection`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of intersecting values. + * @since 2.0.0 + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @returns {*} Returns the random element. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.intersectionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }] + * _.sample([1, 2, 3, 4]); + * // => 2 */ - var intersectionWith = baseRest(function(arrays) { - var comparator = last(arrays), - mapped = arrayMap(arrays, castArrayLikeObject); - - comparator = typeof comparator == 'function' ? comparator : undefined; - if (comparator) { - mapped.pop(); - } - return (mapped.length && mapped[0] === arrays[0]) - ? baseIntersection(mapped, undefined, comparator) - : []; - }); + function sample(collection) { + var func = isArray(collection) ? arraySample : baseSample; + return func(collection); + } /** - * Converts all elements in `array` into a string separated by `separator`. + * Gets `n` random elements at unique keys from `collection` up to the + * size of `collection`. * * @static * @memberOf _ * @since 4.0.0 - * @category Array - * @param {Array} array The array to convert. - * @param {string} [separator=','] The element separator. - * @returns {string} Returns the joined string. + * @category Collection + * @param {Array|Object} collection The collection to sample. + * @param {number} [n=1] The number of elements to sample. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the random elements. * @example * - * _.join(['a', 'b', 'c'], '~'); - * // => 'a~b~c' + * _.sampleSize([1, 2, 3], 2); + * // => [3, 1] + * + * _.sampleSize([1, 2, 3], 4); + * // => [2, 3, 1] */ - function join(array, separator) { - return array == null ? '' : nativeJoin.call(array, separator); + function sampleSize(collection, n, guard) { + if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + var func = isArray(collection) ? arraySampleSize : baseSampleSize; + return func(collection, n); } /** - * Gets the last element of `array`. + * Creates an array of shuffled values, using a version of the + * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @returns {*} Returns the last element of `array`. + * @category Collection + * @param {Array|Object} collection The collection to shuffle. + * @returns {Array} Returns the new shuffled array. * @example * - * _.last([1, 2, 3]); - * // => 3 + * _.shuffle([1, 2, 3, 4]); + * // => [4, 1, 3, 2] */ - function last(array) { - var length = array == null ? 0 : array.length; - return length ? array[length - 1] : undefined; + function shuffle(collection) { + var func = isArray(collection) ? arrayShuffle : baseShuffle; + return func(collection); } /** - * This method is like `_.indexOf` except that it iterates over elements of - * `array` from right to left. + * Gets the size of `collection` by returning its length for array-like + * values or the number of own enumerable string keyed properties for objects. * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=array.length-1] The index to search from. - * @returns {number} Returns the index of the matched value, else `-1`. + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @returns {number} Returns the collection size. * @example * - * _.lastIndexOf([1, 2, 1, 2], 2); + * _.size([1, 2, 3]); * // => 3 * - * // Search from the `fromIndex`. - * _.lastIndexOf([1, 2, 1, 2], 2, 2); - * // => 1 + * _.size({ 'a': 1, 'b': 2 }); + * // => 2 + * + * _.size('pebbles'); + * // => 7 */ - function lastIndexOf(array, value, fromIndex) { - var length = array == null ? 0 : array.length; - if (!length) { - return -1; + function size(collection) { + if (collection == null) { + return 0; } - var index = length; - if (fromIndex !== undefined) { - index = toInteger(fromIndex); - index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1); + if (isArrayLike(collection)) { + return isString(collection) ? stringSize(collection) : collection.length; } - return value === value - ? strictLastIndexOf(array, value, index) - : baseFindIndex(array, baseIsNaN, index, true); + var tag = getTag(collection); + if (tag == mapTag || tag == setTag) { + return collection.size; + } + return baseKeys(collection).length; } /** - * Gets the element at index `n` of `array`. If `n` is negative, the nth - * element from the end is returned. + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). * * @static * @memberOf _ - * @since 4.11.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=0] The index of the element to return. - * @returns {*} Returns the nth element of `array`. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. * @example * - * var array = ['a', 'b', 'c', 'd']; + * _.some([null, 0, 'yes', false], Boolean); + * // => true * - * _.nth(array, 1); - * // => 'b' + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; * - * _.nth(array, -2); - * // => 'c'; + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false + * + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true + * + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true */ - function nth(array, n) { - return (array && array.length) ? baseNth(array, toInteger(n)) : undefined; + function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, getIteratee(predicate, 3)); } /** - * Removes all given values from `array` using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove` - * to remove elements from an array by predicate. + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). * * @static * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...*} [values] The values to remove. - * @returns {Array} Returns `array`. + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. * @example * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; * - * _.pull(array, 'a', 'c'); - * console.log(array); - * // => ['b', 'b'] + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] */ - var pull = baseRest(pullAll); + var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); + }); + + /*------------------------------------------------------------------------*/ /** - * This method is like `_.pull` except that it accepts an array of values to remove. - * - * **Note:** Unlike `_.difference`, this method mutates `array`. + * Gets the timestamp of the number of milliseconds that have elapsed since + * the Unix epoch (1 January 1970 00:00:00 UTC). * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @returns {Array} Returns `array`. + * @since 2.4.0 + * @category Date + * @returns {number} Returns the timestamp. * @example * - * var array = ['a', 'b', 'c', 'a', 'b', 'c']; - * - * _.pullAll(array, ['a', 'c']); - * console.log(array); - * // => ['b', 'b'] + * _.defer(function(stamp) { + * console.log(_.now() - stamp); + * }, _.now()); + * // => Logs the number of milliseconds it took for the deferred invocation. */ - function pullAll(array, values) { - return (array && array.length && values && values.length) - ? basePullAll(array, values) - : array; - } + var now = ctxNow || function() { + return root.Date.now(); + }; + + /*------------------------------------------------------------------------*/ /** - * This method is like `_.pullAll` except that it accepts `iteratee` which is - * invoked for each element of `array` and `values` to generate the criterion - * by which they're compared. The iteratee is invoked with one argument: (value). - * - * **Note:** Unlike `_.differenceBy`, this method mutates `array`. + * The opposite of `_.before`; this method creates a function that invokes + * `func` once it's called `n` or more times. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns `array`. + * @since 0.1.0 + * @category Function + * @param {number} n The number of calls before `func` is invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. * @example * - * var array = [{ 'x': 1 }, { 'x': 2 }, { 'x': 3 }, { 'x': 1 }]; + * var saves = ['profile', 'settings']; * - * _.pullAllBy(array, [{ 'x': 1 }, { 'x': 3 }], 'x'); - * console.log(array); - * // => [{ 'x': 2 }] + * var done = _.after(saves.length, function() { + * console.log('done saving!'); + * }); + * + * _.forEach(saves, function(type) { + * asyncSave({ 'type': type, 'complete': done }); + * }); + * // => Logs 'done saving!' after the two async saves have completed. */ - function pullAllBy(array, values, iteratee) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, getIteratee(iteratee, 2)) - : array; + function after(n, func) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n < 1) { + return func.apply(this, arguments); + } + }; } /** - * This method is like `_.pullAll` except that it accepts `comparator` which - * is invoked to compare elements of `array` to `values`. The comparator is - * invoked with two arguments: (arrVal, othVal). - * - * **Note:** Unlike `_.differenceWith`, this method mutates `array`. + * Creates a function that invokes `func`, with up to `n` arguments, + * ignoring any additional arguments. * * @static * @memberOf _ - * @since 4.6.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Array} values The values to remove. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns `array`. + * @since 3.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @param {number} [n=func.length] The arity cap. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new capped function. * @example * - * var array = [{ 'x': 1, 'y': 2 }, { 'x': 3, 'y': 4 }, { 'x': 5, 'y': 6 }]; - * - * _.pullAllWith(array, [{ 'x': 3, 'y': 4 }], _.isEqual); - * console.log(array); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 5, 'y': 6 }] + * _.map(['6', '8', '10'], _.ary(parseInt, 1)); + * // => [6, 8, 10] */ - function pullAllWith(array, values, comparator) { - return (array && array.length && values && values.length) - ? basePullAll(array, values, undefined, comparator) - : array; + function ary(func, n, guard) { + n = guard ? undefined : n; + n = (func && n == null) ? func.length : n; + return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); } /** - * Removes elements from `array` corresponding to `indexes` and returns an - * array of removed elements. - * - * **Note:** Unlike `_.at`, this method mutates `array`. + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. * * @static * @memberOf _ * @since 3.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {...(number|number[])} [indexes] The indexes of elements to remove. - * @returns {Array} Returns the new array of removed elements. + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. * @example * - * var array = ['a', 'b', 'c', 'd']; - * var pulled = _.pullAt(array, [1, 3]); - * - * console.log(array); - * // => ['a', 'c'] - * - * console.log(pulled); - * // => ['b', 'd'] + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. */ - var pullAt = flatRest(function(array, indexes) { - var length = array == null ? 0 : array.length, - result = baseAt(array, indexes); - - basePullAt(array, arrayMap(indexes, function(index) { - return isIndex(index, length) ? +index : index; - }).sort(compareAscending)); - - return result; - }); + function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; + } /** - * Removes all elements from `array` that `predicate` returns truthy for - * and returns an array of the removed elements. The predicate is invoked - * with three arguments: (value, index, array). + * Creates a function that invokes `func` with the `this` binding of `thisArg` + * and `partials` prepended to the arguments it receives. * - * **Note:** Unlike `_.filter`, this method mutates `array`. Use `_.pull` - * to pull elements from an array by value. + * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for partially applied arguments. + * + * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" + * property of bound functions. * * @static * @memberOf _ - * @since 2.0.0 - * @category Array - * @param {Array} array The array to modify. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new array of removed elements. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to bind. + * @param {*} thisArg The `this` binding of `func`. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. * @example * - * var array = [1, 2, 3, 4]; - * var evens = _.remove(array, function(n) { - * return n % 2 == 0; - * }); + * function greet(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } * - * console.log(array); - * // => [1, 3] + * var object = { 'user': 'fred' }; * - * console.log(evens); - * // => [2, 4] + * var bound = _.bind(greet, object, 'hi'); + * bound('!'); + * // => 'hi fred!' + * + * // Bound with placeholders. + * var bound = _.bind(greet, object, _, '!'); + * bound('hi'); + * // => 'hi fred!' */ - function remove(array, predicate) { - var result = []; - if (!(array && array.length)) { - return result; - } - var index = -1, - indexes = [], - length = array.length; - - predicate = getIteratee(predicate, 3); - while (++index < length) { - var value = array[index]; - if (predicate(value, index, array)) { - result.push(value); - indexes.push(index); - } + var bind = baseRest(function(func, thisArg, partials) { + var bitmask = WRAP_BIND_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bind)); + bitmask |= WRAP_PARTIAL_FLAG; } - basePullAt(array, indexes); - return result; - } + return createWrap(func, bitmask, thisArg, partials, holders); + }); /** - * Reverses `array` so that the first element becomes the last, the second - * element becomes the second to last, and so on. + * Creates a function that invokes the method at `object[key]` with `partials` + * prepended to the arguments it receives. * - * **Note:** This method mutates `array` and is based on - * [`Array#reverse`](https://mdn.io/Array/reverse). + * This method differs from `_.bind` by allowing bound functions to reference + * methods that may be redefined or don't yet exist. See + * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) + * for more details. + * + * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to modify. - * @returns {Array} Returns `array`. + * @since 0.10.0 + * @category Function + * @param {Object} object The object to invoke the method on. + * @param {string} key The key of the method. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new bound function. * @example * - * var array = [1, 2, 3]; + * var object = { + * 'user': 'fred', + * 'greet': function(greeting, punctuation) { + * return greeting + ' ' + this.user + punctuation; + * } + * }; * - * _.reverse(array); - * // => [3, 2, 1] + * var bound = _.bindKey(object, 'greet', 'hi'); + * bound('!'); + * // => 'hi fred!' * - * console.log(array); - * // => [3, 2, 1] - */ - function reverse(array) { - return array == null ? array : nativeReverse.call(array); - } - - /** - * Creates a slice of `array` from `start` up to, but not including, `end`. + * object.greet = function(greeting, punctuation) { + * return greeting + 'ya ' + this.user + punctuation; + * }; * - * **Note:** This method is used instead of - * [`Array#slice`](https://mdn.io/Array/slice) to ensure dense arrays are - * returned. + * bound('!'); + * // => 'hiya fred!' * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to slice. - * @param {number} [start=0] The start position. - * @param {number} [end=array.length] The end position. - * @returns {Array} Returns the slice of `array`. + * // Bound with placeholders. + * var bound = _.bindKey(object, 'greet', _, '!'); + * bound('hi'); + * // => 'hiya fred!' */ - function slice(array, start, end) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; - } - if (end && typeof end != 'number' && isIterateeCall(array, start, end)) { - start = 0; - end = length; - } - else { - start = start == null ? 0 : toInteger(start); - end = end === undefined ? length : toInteger(end); + var bindKey = baseRest(function(object, key, partials) { + var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; + if (partials.length) { + var holders = replaceHolders(partials, getHolder(bindKey)); + bitmask |= WRAP_PARTIAL_FLAG; } - return baseSlice(array, start, end); - } + return createWrap(key, bitmask, object, partials, holders); + }); /** - * Uses a binary search to determine the lowest index at which `value` - * should be inserted into `array` in order to maintain its sort order. + * Creates a function that accepts arguments of `func` and either invokes + * `func` returning its result, if at least `arity` number of arguments have + * been provided, or returns a function that accepts the remaining `func` + * arguments, and so on. The arity of `func` may be specified if `func.length` + * is not sufficient. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example + * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, + * may be used as a placeholder for provided arguments. * - * _.sortedIndex([30, 50], 40); - * // => 1 - */ - function sortedIndex(array, value) { - return baseSortedIndex(array, value); - } - - /** - * This method is like `_.sortedIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). + * **Note:** This method doesn't set the "length" property of curried functions. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. + * @since 2.0.0 + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. * @example * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; * - * _.sortedIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 0 + * var curried = _.curry(abc); * - * // The `_.property` iteratee shorthand. - * _.sortedIndexBy(objects, { 'x': 4 }, 'x'); - * // => 0 - */ - function sortedIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee, 2)); - } - - /** - * This method is like `_.indexOf` except that it performs a binary - * search on a sorted `array`. + * curried(1)(2)(3); + * // => [1, 2, 3] * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. - * @example + * curried(1, 2)(3); + * // => [1, 2, 3] * - * _.sortedIndexOf([4, 5, 5, 5, 6], 5); - * // => 1 + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(1)(_, 3)(2); + * // => [1, 2, 3] */ - function sortedIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value); - if (index < length && eq(array[index], value)) { - return index; - } - } - return -1; + function curry(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curry.placeholder; + return result; } /** - * This method is like `_.sortedIndex` except that it returns the highest - * index at which `value` should be inserted into `array` in order to - * maintain its sort order. + * This method is like `_.curry` except that arguments are applied to `func` + * in the manner of `_.partialRight` instead of `_.partial`. + * + * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for provided arguments. + * + * **Note:** This method doesn't set the "length" property of curried functions. * * @static * @memberOf _ * @since 3.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. + * @category Function + * @param {Function} func The function to curry. + * @param {number} [arity=func.length] The arity of `func`. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the new curried function. * @example * - * _.sortedLastIndex([4, 5, 5, 5, 6], 5); - * // => 4 - */ - function sortedLastIndex(array, value) { - return baseSortedIndex(array, value, true); - } - - /** - * This method is like `_.sortedLastIndex` except that it accepts `iteratee` - * which is invoked for `value` and each element of `array` to compute their - * sort ranking. The iteratee is invoked with one argument: (value). + * var abc = function(a, b, c) { + * return [a, b, c]; + * }; * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The sorted array to inspect. - * @param {*} value The value to evaluate. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the index at which `value` should be inserted - * into `array`. - * @example + * var curried = _.curryRight(abc); * - * var objects = [{ 'x': 4 }, { 'x': 5 }]; + * curried(3)(2)(1); + * // => [1, 2, 3] * - * _.sortedLastIndexBy(objects, { 'x': 4 }, function(o) { return o.x; }); - * // => 1 + * curried(2, 3)(1); + * // => [1, 2, 3] * - * // The `_.property` iteratee shorthand. - * _.sortedLastIndexBy(objects, { 'x': 4 }, 'x'); - * // => 1 + * curried(1, 2, 3); + * // => [1, 2, 3] + * + * // Curried with placeholders. + * curried(3)(1, _)(2); + * // => [1, 2, 3] */ - function sortedLastIndexBy(array, value, iteratee) { - return baseSortedIndexBy(array, value, getIteratee(iteratee, 2), true); + function curryRight(func, arity, guard) { + arity = guard ? undefined : arity; + var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); + result.placeholder = curryRight.placeholder; + return result; } /** - * This method is like `_.lastIndexOf` except that it performs a binary - * search on a sorted `array`. + * Creates a debounced function that delays invoking `func` until after `wait` + * milliseconds have elapsed since the last time the debounced function was + * invoked. The debounced function comes with a `cancel` method to cancel + * delayed `func` invocations and a `flush` method to immediately invoke them. + * Provide `options` to indicate whether `func` should be invoked on the + * leading and/or trailing edge of the `wait` timeout. The `func` is invoked + * with the last arguments provided to the debounced function. Subsequent + * calls to the debounced function return the result of the last `func` + * invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the debounced function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.debounce` and `_.throttle`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {*} value The value to search for. - * @returns {number} Returns the index of the matched value, else `-1`. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to debounce. + * @param {number} [wait=0] The number of milliseconds to delay. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=false] + * Specify invoking on the leading edge of the timeout. + * @param {number} [options.maxWait] + * The maximum time `func` is allowed to be delayed before it's invoked. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new debounced function. * @example * - * _.sortedLastIndexOf([4, 5, 5, 5, 6], 5); - * // => 3 + * // Avoid costly calculations while the window size is in flux. + * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * + * // Invoke `sendMail` when clicked, debouncing subsequent calls. + * jQuery(element).on('click', _.debounce(sendMail, 300, { + * 'leading': true, + * 'trailing': false + * })); + * + * // Ensure `batchLog` is invoked once after 1 second of debounced calls. + * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); + * var source = new EventSource('/stream'); + * jQuery(source).on('message', debounced); + * + * // Cancel the trailing debounced invocation. + * jQuery(window).on('popstate', debounced.cancel); */ - function sortedLastIndexOf(array, value) { - var length = array == null ? 0 : array.length; - if (length) { - var index = baseSortedIndex(array, value, true) - 1; - if (eq(array[index], value)) { - return index; + function debounce(func, wait, options) { + var lastArgs, + lastThis, + maxWait, + result, + timerId, + lastCallTime, + lastInvokeTime = 0, + leading = false, + maxing = false, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + wait = toNumber(wait) || 0; + if (isObject(options)) { + leading = !!options.leading; + maxing = 'maxWait' in options; + maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; + trailing = 'trailing' in options ? !!options.trailing : trailing; + } + + function invokeFunc(time) { + var args = lastArgs, + thisArg = lastThis; + + lastArgs = lastThis = undefined; + lastInvokeTime = time; + result = func.apply(thisArg, args); + return result; + } + + function leadingEdge(time) { + // Reset any `maxWait` timer. + lastInvokeTime = time; + // Start the timer for the trailing edge. + timerId = setTimeout(timerExpired, wait); + // Invoke the leading edge. + return leading ? invokeFunc(time) : result; + } + + function remainingWait(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime, + timeWaiting = wait - timeSinceLastCall; + + return maxing + ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) + : timeWaiting; + } + + function shouldInvoke(time) { + var timeSinceLastCall = time - lastCallTime, + timeSinceLastInvoke = time - lastInvokeTime; + + // Either this is the first call, activity has stopped and we're at the + // trailing edge, the system time has gone backwards and we're treating + // it as the trailing edge, or we've hit the `maxWait` limit. + return (lastCallTime === undefined || (timeSinceLastCall >= wait) || + (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); + } + + function timerExpired() { + var time = now(); + if (shouldInvoke(time)) { + return trailingEdge(time); } + // Restart the timer. + timerId = setTimeout(timerExpired, remainingWait(time)); } - return -1; + + function trailingEdge(time) { + timerId = undefined; + + // Only invoke if we have `lastArgs` which means `func` has been + // debounced at least once. + if (trailing && lastArgs) { + return invokeFunc(time); + } + lastArgs = lastThis = undefined; + return result; + } + + function cancel() { + if (timerId !== undefined) { + clearTimeout(timerId); + } + lastInvokeTime = 0; + lastArgs = lastCallTime = lastThis = timerId = undefined; + } + + function flush() { + return timerId === undefined ? result : trailingEdge(now()); + } + + function debounced() { + var time = now(), + isInvoking = shouldInvoke(time); + + lastArgs = arguments; + lastThis = this; + lastCallTime = time; + + if (isInvoking) { + if (timerId === undefined) { + return leadingEdge(lastCallTime); + } + if (maxing) { + // Handle invocations in a tight loop. + clearTimeout(timerId); + timerId = setTimeout(timerExpired, wait); + return invokeFunc(lastCallTime); + } + } + if (timerId === undefined) { + timerId = setTimeout(timerExpired, wait); + } + return result; + } + debounced.cancel = cancel; + debounced.flush = flush; + return debounced; } /** - * This method is like `_.uniq` except that it's designed and optimized - * for sorted arrays. + * Defers invoking the `func` until the current call stack has cleared. Any + * additional arguments are provided to `func` when it's invoked. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to defer. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. * @example * - * _.sortedUniq([1, 1, 2]); - * // => [1, 2] + * _.defer(function(text) { + * console.log(text); + * }, 'deferred'); + * // => Logs 'deferred' after one millisecond. */ - function sortedUniq(array) { - return (array && array.length) - ? baseSortedUniq(array) - : []; - } + var defer = baseRest(function(func, args) { + return baseDelay(func, 1, args); + }); /** - * This method is like `_.uniqBy` except that it's designed and optimized - * for sorted arrays. + * Invokes `func` after `wait` milliseconds. Any additional arguments are + * provided to `func` when it's invoked. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to delay. + * @param {number} wait The number of milliseconds to delay invocation. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {number} Returns the timer id. * @example * - * _.sortedUniqBy([1.1, 1.2, 2.3, 2.4], Math.floor); - * // => [1.1, 2.3] + * _.delay(function(text) { + * console.log(text); + * }, 1000, 'later'); + * // => Logs 'later' after one second. */ - function sortedUniqBy(array, iteratee) { - return (array && array.length) - ? baseSortedUniq(array, getIteratee(iteratee, 2)) - : []; - } + var delay = baseRest(function(func, wait, args) { + return baseDelay(func, toNumber(wait) || 0, args); + }); /** - * Gets all but the first element of `array`. + * Creates a function that invokes `func` with arguments reversed. * * @static * @memberOf _ * @since 4.0.0 - * @category Array - * @param {Array} array The array to query. - * @returns {Array} Returns the slice of `array`. + * @category Function + * @param {Function} func The function to flip arguments for. + * @returns {Function} Returns the new flipped function. * @example * - * _.tail([1, 2, 3]); - * // => [2, 3] + * var flipped = _.flip(function() { + * return _.toArray(arguments); + * }); + * + * flipped('a', 'b', 'c', 'd'); + * // => ['d', 'c', 'b', 'a'] */ - function tail(array) { - var length = array == null ? 0 : array.length; - return length ? baseSlice(array, 1, length) : []; + function flip(func) { + return createWrap(func, WRAP_FLIP_FLAG); } /** - * Creates a slice of `array` with `n` elements taken from the beginning. + * Creates a function that memoizes the result of `func`. If `resolver` is + * provided, it determines the cache key for storing the result based on the + * arguments provided to the memoized function. By default, the first argument + * provided to the memoized function is used as the map cache key. The `func` + * is invoked with the `this` binding of the memoized function. + * + * **Note:** The cache is exposed as the `cache` property on the memoized + * function. Its creation may be customized by replacing the `_.memoize.Cache` + * constructor with one whose instances implement the + * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) + * method interface of `clear`, `delete`, `get`, `has`, and `set`. * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. + * @category Function + * @param {Function} func The function to have its output memoized. + * @param {Function} [resolver] The function to resolve the cache key. + * @returns {Function} Returns the new memoized function. * @example * - * _.take([1, 2, 3]); - * // => [1] + * var object = { 'a': 1, 'b': 2 }; + * var other = { 'c': 3, 'd': 4 }; * - * _.take([1, 2, 3], 2); + * var values = _.memoize(_.values); + * values(object); * // => [1, 2] * - * _.take([1, 2, 3], 5); - * // => [1, 2, 3] + * values(other); + * // => [3, 4] * - * _.take([1, 2, 3], 0); - * // => [] + * object.a = 2; + * values(object); + * // => [1, 2] + * + * // Modify the result cache. + * values.cache.set(object, ['a', 'b']); + * values(object); + * // => ['a', 'b'] + * + * // Replace `_.memoize.Cache`. + * _.memoize.Cache = WeakMap; */ - function take(array, n, guard) { - if (!(array && array.length)) { - return []; + function memoize(func, resolver) { + if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { + throw new TypeError(FUNC_ERROR_TEXT); } - n = (guard || n === undefined) ? 1 : toInteger(n); - return baseSlice(array, 0, n < 0 ? 0 : n); + var memoized = function() { + var args = arguments, + key = resolver ? resolver.apply(this, args) : args[0], + cache = memoized.cache; + + if (cache.has(key)) { + return cache.get(key); + } + var result = func.apply(this, args); + memoized.cache = cache.set(key, result) || cache; + return result; + }; + memoized.cache = new (memoize.Cache || MapCache); + return memoized; } + // Expose `MapCache`. + memoize.Cache = MapCache; + /** - * Creates a slice of `array` with `n` elements taken from the end. + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. * * @static * @memberOf _ * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {number} [n=1] The number of elements to take. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the slice of `array`. + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. * @example * - * _.takeRight([1, 2, 3]); - * // => [3] - * - * _.takeRight([1, 2, 3], 2); - * // => [2, 3] - * - * _.takeRight([1, 2, 3], 5); - * // => [1, 2, 3] + * function isEven(n) { + * return n % 2 == 0; + * } * - * _.takeRight([1, 2, 3], 0); - * // => [] + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] */ - function takeRight(array, n, guard) { - var length = array == null ? 0 : array.length; - if (!length) { - return []; + function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } - n = (guard || n === undefined) ? 1 : toInteger(n); - n = length - n; - return baseSlice(array, n < 0 ? 0 : n, length); + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; } /** - * Creates a slice of `array` with elements taken from the end. Elements are - * taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. * * @static * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. * @example * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': false } - * ]; - * - * _.takeRightWhile(users, function(o) { return !o.active; }); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.matches` iteratee shorthand. - * _.takeRightWhile(users, { 'user': 'pebbles', 'active': false }); - * // => objects for ['pebbles'] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeRightWhile(users, ['active', false]); - * // => objects for ['fred', 'pebbles'] - * - * // The `_.property` iteratee shorthand. - * _.takeRightWhile(users, 'active'); - * // => [] + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once */ - function takeRightWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3), false, true) - : []; + function once(func) { + return before(2, func); } /** - * Creates a slice of `array` with elements taken from the beginning. Elements - * are taken until `predicate` returns falsey. The predicate is invoked with - * three arguments: (value, index, array). + * Creates a function that invokes `func` with its arguments transformed. * * @static + * @since 4.0.0 * @memberOf _ - * @since 3.0.0 - * @category Array - * @param {Array} array The array to query. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the slice of `array`. + * @category Function + * @param {Function} func The function to wrap. + * @param {...(Function|Function[])} [transforms=[_.identity]] + * The argument transforms. + * @returns {Function} Returns the new function. * @example * - * var users = [ - * { 'user': 'barney', 'active': false }, - * { 'user': 'fred', 'active': false }, - * { 'user': 'pebbles', 'active': true } - * ]; + * function doubled(n) { + * return n * 2; + * } * - * _.takeWhile(users, function(o) { return !o.active; }); - * // => objects for ['barney', 'fred'] + * function square(n) { + * return n * n; + * } * - * // The `_.matches` iteratee shorthand. - * _.takeWhile(users, { 'user': 'barney', 'active': false }); - * // => objects for ['barney'] + * var func = _.overArgs(function(x, y) { + * return [x, y]; + * }, [square, doubled]); * - * // The `_.matchesProperty` iteratee shorthand. - * _.takeWhile(users, ['active', false]); - * // => objects for ['barney', 'fred'] + * func(9, 3); + * // => [81, 6] * - * // The `_.property` iteratee shorthand. - * _.takeWhile(users, 'active'); - * // => [] + * func(10, 5); + * // => [100, 10] */ - function takeWhile(array, predicate) { - return (array && array.length) - ? baseWhile(array, getIteratee(predicate, 3)) - : []; - } + var overArgs = castRest(function(func, transforms) { + transforms = (transforms.length == 1 && isArray(transforms[0])) + ? arrayMap(transforms[0], baseUnary(getIteratee())) + : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); + + var funcsLength = transforms.length; + return baseRest(function(args) { + var index = -1, + length = nativeMin(args.length, funcsLength); + + while (++index < length) { + args[index] = transforms[index].call(this, args[index]); + } + return apply(func, this, args); + }); + }); /** - * Creates an array of unique values, in order, from all given arrays using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. + * Creates a function that invokes `func` with `partials` prepended to the + * arguments it receives. This method is like `_.bind` except it does **not** + * alter the `this` binding. + * + * The `_.partial.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. * * @static * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of combined values. + * @since 0.2.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. * @example * - * _.union([2], [1, 2]); - * // => [2, 1] + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } + * + * var sayHelloTo = _.partial(greet, 'hello'); + * sayHelloTo('fred'); + * // => 'hello fred' + * + * // Partially applied with placeholders. + * var greetFred = _.partial(greet, _, 'fred'); + * greetFred('hi'); + * // => 'hi fred' */ - var union = baseRest(function(arrays) { - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true)); + var partial = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partial)); + return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); }); /** - * This method is like `_.union` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by - * which uniqueness is computed. Result values are chosen from the first - * array in which the value occurs. The iteratee is invoked with one argument: - * (value). + * This method is like `_.partial` except that partially applied arguments + * are appended to the arguments it receives. + * + * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic + * builds, may be used as a placeholder for partially applied arguments. + * + * **Note:** This method doesn't set the "length" property of partially + * applied functions. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of combined values. + * @since 1.0.0 + * @category Function + * @param {Function} func The function to partially apply arguments to. + * @param {...*} [partials] The arguments to be partially applied. + * @returns {Function} Returns the new partially applied function. * @example * - * _.unionBy([2.1], [1.2, 2.3], Math.floor); - * // => [2.1, 1.2] + * function greet(greeting, name) { + * return greeting + ' ' + name; + * } * - * // The `_.property` iteratee shorthand. - * _.unionBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] + * var greetFred = _.partialRight(greet, 'fred'); + * greetFred('hi'); + * // => 'hi fred' + * + * // Partially applied with placeholders. + * var sayHelloTo = _.partialRight(greet, 'hello', _); + * sayHelloTo('fred'); + * // => 'hello fred' */ - var unionBy = baseRest(function(arrays) { - var iteratee = last(arrays); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee, 2)); + var partialRight = baseRest(function(func, partials) { + var holders = replaceHolders(partials, getHolder(partialRight)); + return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); }); /** - * This method is like `_.union` except that it accepts `comparator` which - * is invoked to compare elements of `arrays`. Result values are chosen from - * the first array in which the value occurs. The comparator is invoked - * with two arguments: (arrVal, othVal). + * Creates a function that invokes `func` with arguments arranged according + * to the specified `indexes` where the argument value at the first index is + * provided as the first argument, the argument value at the second index is + * provided as the second argument, and so on. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of combined values. + * @since 3.0.0 + * @category Function + * @param {Function} func The function to rearrange arguments for. + * @param {...(number|number[])} indexes The arranged argument indexes. + * @returns {Function} Returns the new function. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * var rearged = _.rearg(function(a, b, c) { + * return [a, b, c]; + * }, [2, 0, 1]); * - * _.unionWith(objects, others, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + * rearged('b', 'c', 'a') + * // => ['a', 'b', 'c'] */ - var unionWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == 'function' ? comparator : undefined; - return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined, comparator); + var rearg = flatRest(function(func, indexes) { + return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); }); /** - * Creates a duplicate-free version of an array, using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons, in which only the first occurrence of each element - * is kept. The order of result values is determined by the order they occur - * in the array. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @returns {Array} Returns the new duplicate free array. - * @example + * Creates a function that invokes `func` with the `this` binding of the + * created function and arguments from `start` and beyond provided as + * an array. * - * _.uniq([2, 1, 2]); - * // => [2, 1] - */ - function uniq(array) { - return (array && array.length) ? baseUniq(array) : []; - } - - /** - * This method is like `_.uniq` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * uniqueness is computed. The order of result values is determined by the - * order they occur in the array. The iteratee is invoked with one argument: - * (value). + * **Note:** This method is based on the + * [rest parameter](https://mdn.io/rest_parameters). * * @static * @memberOf _ * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new duplicate free array. + * @category Function + * @param {Function} func The function to apply a rest parameter to. + * @param {number} [start=func.length-1] The start position of the rest parameter. + * @returns {Function} Returns the new function. * @example * - * _.uniqBy([2.1, 1.2, 2.3], Math.floor); - * // => [2.1, 1.2] + * var say = _.rest(function(what, names) { + * return what + ' ' + _.initial(names).join(', ') + + * (_.size(names) > 1 ? ', & ' : '') + _.last(names); + * }); * - * // The `_.property` iteratee shorthand. - * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] + * say('hello', 'fred', 'barney', 'pebbles'); + * // => 'hello fred, barney, & pebbles' */ - function uniqBy(array, iteratee) { - return (array && array.length) ? baseUniq(array, getIteratee(iteratee, 2)) : []; + function rest(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + start = start === undefined ? start : toInteger(start); + return baseRest(func, start); } /** - * This method is like `_.uniq` except that it accepts `comparator` which - * is invoked to compare elements of `array`. The order of result values is - * determined by the order they occur in the array.The comparator is invoked - * with two arguments: (arrVal, othVal). + * Creates a function that invokes `func` with the `this` binding of the + * create function and an array of arguments much like + * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). + * + * **Note:** This method is based on the + * [spread operator](https://mdn.io/spread_operator). * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new duplicate free array. + * @since 3.2.0 + * @category Function + * @param {Function} func The function to spread arguments over. + * @param {number} [start=0] The start position of the spread. + * @returns {Function} Returns the new function. * @example * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }]; - * - * _.uniqWith(objects, _.isEqual); - * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }] - */ - function uniqWith(array, comparator) { - comparator = typeof comparator == 'function' ? comparator : undefined; - return (array && array.length) ? baseUniq(array, undefined, comparator) : []; - } - - /** - * This method is like `_.zip` except that it accepts an array of grouped - * elements and creates an array regrouping the elements to their pre-zip - * configuration. + * var say = _.spread(function(who, what) { + * return who + ' says ' + what; + * }); * - * @static - * @memberOf _ - * @since 1.2.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @returns {Array} Returns the new array of regrouped elements. - * @example + * say(['fred', 'hello']); + * // => 'fred says hello' * - * var zipped = _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] + * var numbers = Promise.all([ + * Promise.resolve(40), + * Promise.resolve(36) + * ]); * - * _.unzip(zipped); - * // => [['a', 'b'], [1, 2], [true, false]] + * numbers.then(_.spread(function(x, y) { + * return x + y; + * })); + * // => a Promise of 76 */ - function unzip(array) { - if (!(array && array.length)) { - return []; + function spread(func, start) { + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } - var length = 0; - array = arrayFilter(array, function(group) { - if (isArrayLikeObject(group)) { - length = nativeMax(group.length, length); - return true; + start = start == null ? 0 : nativeMax(toInteger(start), 0); + return baseRest(function(args) { + var array = args[start], + otherArgs = castSlice(args, 0, start); + + if (array) { + arrayPush(otherArgs, array); } - }); - return baseTimes(length, function(index) { - return arrayMap(array, baseProperty(index)); + return apply(func, this, otherArgs); }); } /** - * This method is like `_.unzip` except that it accepts `iteratee` to specify - * how regrouped values should be combined. The iteratee is invoked with the - * elements of each group: (...group). + * Creates a throttled function that only invokes `func` at most once per + * every `wait` milliseconds. The throttled function comes with a `cancel` + * method to cancel delayed `func` invocations and a `flush` method to + * immediately invoke them. Provide `options` to indicate whether `func` + * should be invoked on the leading and/or trailing edge of the `wait` + * timeout. The `func` is invoked with the last arguments provided to the + * throttled function. Subsequent calls to the throttled function return the + * result of the last `func` invocation. + * + * **Note:** If `leading` and `trailing` options are `true`, `func` is + * invoked on the trailing edge of the timeout only if the throttled function + * is invoked more than once during the `wait` timeout. + * + * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred + * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * + * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) + * for details over the differences between `_.throttle` and `_.debounce`. * * @static * @memberOf _ - * @since 3.8.0 - * @category Array - * @param {Array} array The array of grouped elements to process. - * @param {Function} [iteratee=_.identity] The function to combine - * regrouped values. - * @returns {Array} Returns the new array of regrouped elements. + * @since 0.1.0 + * @category Function + * @param {Function} func The function to throttle. + * @param {number} [wait=0] The number of milliseconds to throttle invocations to. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.leading=true] + * Specify invoking on the leading edge of the timeout. + * @param {boolean} [options.trailing=true] + * Specify invoking on the trailing edge of the timeout. + * @returns {Function} Returns the new throttled function. * @example * - * var zipped = _.zip([1, 2], [10, 20], [100, 200]); - * // => [[1, 10, 100], [2, 20, 200]] + * // Avoid excessively updating the position while scrolling. + * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); * - * _.unzipWith(zipped, _.add); - * // => [3, 30, 300] + * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. + * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); + * jQuery(element).on('click', throttled); + * + * // Cancel the trailing throttled invocation. + * jQuery(window).on('popstate', throttled.cancel); */ - function unzipWith(array, iteratee) { - if (!(array && array.length)) { - return []; + function throttle(func, wait, options) { + var leading = true, + trailing = true; + + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); } - var result = unzip(array); - if (iteratee == null) { - return result; + if (isObject(options)) { + leading = 'leading' in options ? !!options.leading : leading; + trailing = 'trailing' in options ? !!options.trailing : trailing; } - return arrayMap(result, function(group) { - return apply(iteratee, undefined, group); + return debounce(func, wait, { + 'leading': leading, + 'maxWait': wait, + 'trailing': trailing }); } /** - * Creates an array excluding all given values using - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * for equality comparisons. - * - * **Note:** Unlike `_.pull`, this method returns a new array. + * Creates a function that accepts up to one argument, ignoring any + * additional arguments. * * @static * @memberOf _ - * @since 0.1.0 - * @category Array - * @param {Array} array The array to inspect. - * @param {...*} [values] The values to exclude. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.xor + * @since 4.0.0 + * @category Function + * @param {Function} func The function to cap arguments for. + * @returns {Function} Returns the new capped function. * @example * - * _.without([2, 1, 2, 3], 1, 2); - * // => [3] + * _.map(['6', '8', '10'], _.unary(parseInt)); + * // => [6, 8, 10] */ - var without = baseRest(function(array, values) { - return isArrayLikeObject(array) - ? baseDifference(array, values) - : []; - }); + function unary(func) { + return ary(func, 1); + } /** - * Creates an array of unique values that is the - * [symmetric difference](https://en.wikipedia.org/wiki/Symmetric_difference) - * of the given arrays. The order of result values is determined by the order - * they occur in the arrays. + * Creates a function that provides `value` to `wrapper` as its first + * argument. Any additional arguments provided to the function are appended + * to those provided to the `wrapper`. The wrapper is invoked with the `this` + * binding of the created function. * * @static * @memberOf _ - * @since 2.4.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @returns {Array} Returns the new array of filtered values. - * @see _.difference, _.without + * @since 0.1.0 + * @category Function + * @param {*} value The value to wrap. + * @param {Function} [wrapper=identity] The wrapper function. + * @returns {Function} Returns the new function. * @example * - * _.xor([2, 1], [2, 3]); - * // => [1, 3] + * var p = _.wrap(_.escape, function(func, text) { + * return '<p>' + func(text) + '</p>'; + * }); + * + * p('fred, barney, & pebbles'); + * // => '<p>fred, barney, & pebbles</p>' */ - var xor = baseRest(function(arrays) { - return baseXor(arrayFilter(arrays, isArrayLikeObject)); - }); + function wrap(value, wrapper) { + return partial(castFunction(wrapper), value); + } + + /*------------------------------------------------------------------------*/ /** - * This method is like `_.xor` except that it accepts `iteratee` which is - * invoked for each element of each `arrays` to generate the criterion by - * which by which they're compared. The order of result values is determined - * by the order they occur in the arrays. The iteratee is invoked with one - * argument: (value). + * Casts `value` as an array if it's not one. * * @static * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Array} Returns the new array of filtered values. + * @since 4.4.0 + * @category Lang + * @param {*} value The value to inspect. + * @returns {Array} Returns the cast array. * @example * - * _.xorBy([2.1, 1.2], [2.3, 3.4], Math.floor); - * // => [1.2, 3.4] + * _.castArray(1); + * // => [1] * - * // The `_.property` iteratee shorthand. - * _.xorBy([{ 'x': 1 }], [{ 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 2 }] - */ - var xorBy = baseRest(function(arrays) { - var iteratee = last(arrays); - if (isArrayLikeObject(iteratee)) { - iteratee = undefined; - } - return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee, 2)); - }); - - /** - * This method is like `_.xor` except that it accepts `comparator` which is - * invoked to compare elements of `arrays`. The order of result values is - * determined by the order they occur in the arrays. The comparator is invoked - * with two arguments: (arrVal, othVal). + * _.castArray({ 'a': 1 }); + * // => [{ 'a': 1 }] * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Array - * @param {...Array} [arrays] The arrays to inspect. - * @param {Function} [comparator] The comparator invoked per element. - * @returns {Array} Returns the new array of filtered values. - * @example + * _.castArray('abc'); + * // => ['abc'] * - * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]; - * var others = [{ 'x': 1, 'y': 1 }, { 'x': 1, 'y': 2 }]; + * _.castArray(null); + * // => [null] * - * _.xorWith(objects, others, _.isEqual); - * // => [{ 'x': 2, 'y': 1 }, { 'x': 1, 'y': 1 }] + * _.castArray(undefined); + * // => [undefined] + * + * _.castArray(); + * // => [] + * + * var array = [1, 2, 3]; + * console.log(_.castArray(array) === array); + * // => true */ - var xorWith = baseRest(function(arrays) { - var comparator = last(arrays); - comparator = typeof comparator == 'function' ? comparator : undefined; - return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined, comparator); - }); + function castArray() { + if (!arguments.length) { + return []; + } + var value = arguments[0]; + return isArray(value) ? value : [value]; + } /** - * Creates an array of grouped elements, the first of which contains the - * first elements of the given arrays, the second of which contains the - * second elements of the given arrays, and so on. + * Creates a shallow clone of `value`. + * + * **Note:** This method is loosely based on the + * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) + * and supports cloning arrays, array buffers, booleans, date objects, maps, + * numbers, `Object` objects, regexes, sets, strings, symbols, and typed + * arrays. The own enumerable properties of `arguments` objects are cloned + * as plain objects. An empty object is returned for uncloneable values such + * as error objects, functions, DOM nodes, and WeakMaps. * * @static * @memberOf _ * @since 0.1.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @returns {Array} Returns the new array of grouped elements. + * @category Lang + * @param {*} value The value to clone. + * @returns {*} Returns the cloned value. + * @see _.cloneDeep * @example * - * _.zip(['a', 'b'], [1, 2], [true, false]); - * // => [['a', 1, true], ['b', 2, false]] + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var shallow = _.clone(objects); + * console.log(shallow[0] === objects[0]); + * // => true */ - var zip = baseRest(unzip); + function clone(value) { + return baseClone(value, CLONE_SYMBOLS_FLAG); + } /** - * This method is like `_.fromPairs` except that it accepts two arrays, - * one of property identifiers and one of corresponding values. + * This method is like `_.clone` except that it accepts `customizer` which + * is invoked to produce the cloned value. If `customizer` returns `undefined`, + * cloning is handled by the method instead. The `customizer` is invoked with + * up to four arguments; (value [, index|key, object, stack]). * * @static * @memberOf _ - * @since 0.4.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the cloned value. + * @see _.cloneDeepWith * @example * - * _.zipObject(['a', 'b'], [1, 2]); - * // => { 'a': 1, 'b': 2 } + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(false); + * } + * } + * + * var el = _.cloneWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 0 */ - function zipObject(props, values) { - return baseZipObject(props || [], values || [], assignValue); + function cloneWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); } /** - * This method is like `_.zipObject` except that it supports property paths. + * This method is like `_.clone` except that it recursively clones `value`. * * @static * @memberOf _ - * @since 4.1.0 - * @category Array - * @param {Array} [props=[]] The property identifiers. - * @param {Array} [values=[]] The property values. - * @returns {Object} Returns the new object. + * @since 1.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @returns {*} Returns the deep cloned value. + * @see _.clone * @example * - * _.zipObjectDeep(['a.b[0].c', 'a.b[1].d'], [1, 2]); - * // => { 'a': { 'b': [{ 'c': 1 }, { 'd': 2 }] } } + * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * + * var deep = _.cloneDeep(objects); + * console.log(deep[0] === objects[0]); + * // => false */ - function zipObjectDeep(props, values) { - return baseZipObject(props || [], values || [], baseSet); + function cloneDeep(value) { + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); } /** - * This method is like `_.zip` except that it accepts `iteratee` to specify - * how grouped values should be combined. The iteratee is invoked with the - * elements of each group: (...group). + * This method is like `_.cloneWith` except that it recursively clones `value`. * * @static * @memberOf _ - * @since 3.8.0 - * @category Array - * @param {...Array} [arrays] The arrays to process. - * @param {Function} [iteratee=_.identity] The function to combine - * grouped values. - * @returns {Array} Returns the new array of grouped elements. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to recursively clone. + * @param {Function} [customizer] The function to customize cloning. + * @returns {*} Returns the deep cloned value. + * @see _.cloneWith * @example * - * _.zipWith([1, 2], [10, 20], [100, 200], function(a, b, c) { - * return a + b + c; - * }); - * // => [111, 222] + * function customizer(value) { + * if (_.isElement(value)) { + * return value.cloneNode(true); + * } + * } + * + * var el = _.cloneDeepWith(document.body, customizer); + * + * console.log(el === document.body); + * // => false + * console.log(el.nodeName); + * // => 'BODY' + * console.log(el.childNodes.length); + * // => 20 */ - var zipWith = baseRest(function(arrays) { - var length = arrays.length, - iteratee = length > 1 ? arrays[length - 1] : undefined; - - iteratee = typeof iteratee == 'function' ? (arrays.pop(), iteratee) : undefined; - return unzipWith(arrays, iteratee); - }); - - /*------------------------------------------------------------------------*/ + function cloneDeepWith(value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + } /** - * Creates a `lodash` wrapper instance that wraps `value` with explicit method - * chain sequences enabled. The result of such sequences must be unwrapped - * with `_#value`. + * Checks if `object` conforms to `source` by invoking the predicate + * properties of `source` with the corresponding property values of `object`. + * + * **Note:** This method is equivalent to `_.conforms` when `source` is + * partially applied. * * @static * @memberOf _ - * @since 1.3.0 - * @category Seq - * @param {*} value The value to wrap. - * @returns {Object} Returns the new `lodash` wrapper instance. + * @since 4.14.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property predicates to conform to. + * @returns {boolean} Returns `true` if `object` conforms, else `false`. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'pebbles', 'age': 1 } - * ]; + * var object = { 'a': 1, 'b': 2 }; * - * var youngest = _ - * .chain(users) - * .sortBy('age') - * .map(function(o) { - * return o.user + ' is ' + o.age; - * }) - * .head() - * .value(); - * // => 'pebbles is 1' + * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); + * // => true + * + * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); + * // => false */ - function chain(value) { - var result = lodash(value); - result.__chain__ = true; - return result; + function conformsTo(object, source) { + return source == null || baseConformsTo(object, source, keys(source)); } /** - * This method invokes `interceptor` and returns `value`. The interceptor - * is invoked with one argument; (value). The purpose of this method is to - * "tap into" a method chain sequence in order to modify intermediate results. + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. * * @static * @memberOf _ - * @since 0.1.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns `value`. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * _([1, 2, 3]) - * .tap(function(array) { - * // Mutate input array. - * array.pop(); - * }) - * .reverse() - * .value(); - * // => [2, 1] + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true */ - function tap(value, interceptor) { - interceptor(value); - return value; + function eq(value, other) { + return value === other || (value !== value && other !== other); } /** - * This method is like `_.tap` except that it returns the result of `interceptor`. - * The purpose of this method is to "pass thru" values replacing intermediate - * results in a method chain sequence. + * Checks if `value` is greater than `other`. * * @static * @memberOf _ - * @since 3.0.0 - * @category Seq - * @param {*} value The value to provide to `interceptor`. - * @param {Function} interceptor The function to invoke. - * @returns {*} Returns the result of `interceptor`. + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + * @see _.lt * @example * - * _(' abc ') - * .chain() - * .trim() - * .thru(function(value) { - * return [value]; - * }) - * .value(); - * // => ['abc'] + * _.gt(3, 1); + * // => true + * + * _.gt(3, 3); + * // => false + * + * _.gt(1, 3); + * // => false */ - function thru(value, interceptor) { - return interceptor(value); - } + var gt = createRelationalOperation(baseGt); /** - * This method is the wrapper version of `_.at`. + * Checks if `value` is greater than or equal to `other`. * - * @name at + * @static * @memberOf _ - * @since 1.0.0 - * @category Seq - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new `lodash` wrapper instance. + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than or equal to + * `other`, else `false`. + * @see _.lte * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * _.gte(3, 1); + * // => true * - * _(object).at(['a[0].b.c', 'a[1]']).value(); - * // => [3, 4] + * _.gte(3, 3); + * // => true + * + * _.gte(1, 3); + * // => false */ - var wrapperAt = flatRest(function(paths) { - var length = paths.length, - start = length ? paths[0] : 0, - value = this.__wrapped__, - interceptor = function(object) { return baseAt(object, paths); }; - - if (length > 1 || this.__actions__.length || - !(value instanceof LazyWrapper) || !isIndex(start)) { - return this.thru(interceptor); - } - value = value.slice(start, +start + (length ? 1 : 0)); - value.__actions__.push({ - 'func': thru, - 'args': [interceptor], - 'thisArg': undefined - }); - return new LodashWrapper(value, this.__chain__).thru(function(array) { - if (length && !array.length) { - array.push(undefined); - } - return array; - }); + var gte = createRelationalOperation(function(value, other) { + return value >= other; }); /** - * Creates a `lodash` wrapper instance with explicit method chain sequences enabled. + * Checks if `value` is likely an `arguments` object. * - * @name chain + * @static * @memberOf _ * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an `arguments` object, + * else `false`. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 40 } - * ]; - * - * // A sequence without explicit chaining. - * _(users).head(); - * // => { 'user': 'barney', 'age': 36 } + * _.isArguments(function() { return arguments; }()); + * // => true * - * // A sequence with explicit chaining. - * _(users) - * .chain() - * .head() - * .pick('user') - * .value(); - * // => { 'user': 'barney' } + * _.isArguments([1, 2, 3]); + * // => false */ - function wrapperChain() { - return chain(this); - } + var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { + return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && + !propertyIsEnumerable.call(value, 'callee'); + }; /** - * Executes the chain sequence and returns the wrapped result. + * Checks if `value` is classified as an `Array` object. * - * @name commit + * @static * @memberOf _ - * @since 3.2.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array, else `false`. * @example * - * var array = [1, 2]; - * var wrapped = _(array).push(3); - * - * console.log(array); - * // => [1, 2] + * _.isArray([1, 2, 3]); + * // => true * - * wrapped = wrapped.commit(); - * console.log(array); - * // => [1, 2, 3] + * _.isArray(document.body.children); + * // => false * - * wrapped.last(); - * // => 3 + * _.isArray('abc'); + * // => false * - * console.log(array); - * // => [1, 2, 3] + * _.isArray(_.noop); + * // => false */ - function wrapperCommit() { - return new LodashWrapper(this.value(), this.__chain__); - } + var isArray = Array.isArray; /** - * Gets the next value on a wrapped object following the - * [iterator protocol](https://mdn.io/iteration_protocols#iterator). + * Checks if `value` is classified as an `ArrayBuffer` object. * - * @name next + * @static * @memberOf _ - * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the next iterator value. + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. * @example * - * var wrapped = _([1, 2]); - * - * wrapped.next(); - * // => { 'done': false, 'value': 1 } - * - * wrapped.next(); - * // => { 'done': false, 'value': 2 } + * _.isArrayBuffer(new ArrayBuffer(2)); + * // => true * - * wrapped.next(); - * // => { 'done': true, 'value': undefined } + * _.isArrayBuffer(new Array(2)); + * // => false */ - function wrapperNext() { - if (this.__values__ === undefined) { - this.__values__ = toArray(this.value()); - } - var done = this.__index__ >= this.__values__.length, - value = done ? undefined : this.__values__[this.__index__++]; - - return { 'done': done, 'value': value }; - } + var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; /** - * Enables the wrapper to be iterable. + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. * - * @name Symbol.iterator + * @static * @memberOf _ * @since 4.0.0 - * @category Seq - * @returns {Object} Returns the wrapper object. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. * @example * - * var wrapped = _([1, 2]); + * _.isArrayLike([1, 2, 3]); + * // => true * - * wrapped[Symbol.iterator]() === wrapped; + * _.isArrayLike(document.body.children); * // => true * - * Array.from(wrapped); - * // => [1, 2] + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false */ - function wrapperToIterator() { - return this; + function isArrayLike(value) { + return value != null && isLength(value.length) && !isFunction(value); } /** - * Creates a clone of the chain sequence planting `value` as the wrapped value. + * This method is like `_.isArrayLike` except that it also checks if `value` + * is an object. * - * @name plant + * @static * @memberOf _ - * @since 3.2.0 - * @category Seq - * @param {*} value The value to plant. - * @returns {Object} Returns the new `lodash` wrapper instance. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an array-like object, + * else `false`. * @example * - * function square(n) { - * return n * n; - * } + * _.isArrayLikeObject([1, 2, 3]); + * // => true * - * var wrapped = _([1, 2]).map(square); - * var other = wrapped.plant([3, 4]); + * _.isArrayLikeObject(document.body.children); + * // => true * - * other.value(); - * // => [9, 16] + * _.isArrayLikeObject('abc'); + * // => false * - * wrapped.value(); - * // => [1, 4] + * _.isArrayLikeObject(_.noop); + * // => false */ - function wrapperPlant(value) { - var result, - parent = this; - - while (parent instanceof baseLodash) { - var clone = wrapperClone(parent); - clone.__index__ = 0; - clone.__values__ = undefined; - if (result) { - previous.__wrapped__ = clone; - } else { - result = clone; - } - var previous = clone; - parent = parent.__wrapped__; - } - previous.__wrapped__ = value; - return result; + function isArrayLikeObject(value) { + return isObjectLike(value) && isArrayLike(value); } /** - * This method is the wrapper version of `_.reverse`. - * - * **Note:** This method mutates the wrapped array. + * Checks if `value` is classified as a boolean primitive or object. * - * @name reverse + * @static * @memberOf _ * @since 0.1.0 - * @category Seq - * @returns {Object} Returns the new `lodash` wrapper instance. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. * @example * - * var array = [1, 2, 3]; - * - * _(array).reverse().value() - * // => [3, 2, 1] + * _.isBoolean(false); + * // => true * - * console.log(array); - * // => [3, 2, 1] + * _.isBoolean(null); + * // => false */ - function wrapperReverse() { - var value = this.__wrapped__; - if (value instanceof LazyWrapper) { - var wrapped = value; - if (this.__actions__.length) { - wrapped = new LazyWrapper(this); - } - wrapped = wrapped.reverse(); - wrapped.__actions__.push({ - 'func': thru, - 'args': [reverse], - 'thisArg': undefined - }); - return new LodashWrapper(wrapped, this.__chain__); - } - return this.thru(reverse); + function isBoolean(value) { + return value === true || value === false || + (isObjectLike(value) && baseGetTag(value) == boolTag); } /** - * Executes the chain sequence to resolve the unwrapped value. + * Checks if `value` is a buffer. * - * @name value + * @static * @memberOf _ - * @since 0.1.0 - * @alias toJSON, valueOf - * @category Seq - * @returns {*} Returns the resolved unwrapped value. + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. * @example * - * _([1, 2, 3]).value(); - * // => [1, 2, 3] + * _.isBuffer(new Buffer(2)); + * // => true + * + * _.isBuffer(new Uint8Array(2)); + * // => false */ - function wrapperValue() { - return baseWrapperValue(this.__wrapped__, this.__actions__); - } - - /*------------------------------------------------------------------------*/ + var isBuffer = nativeIsBuffer || stubFalse; /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the number of times the key was returned by `iteratee`. The - * iteratee is invoked with one argument: (value). + * Checks if `value` is classified as a `Date` object. * * @static * @memberOf _ - * @since 0.5.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a date object, else `false`. * @example * - * _.countBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': 1, '6': 2 } + * _.isDate(new Date); + * // => true * - * // The `_.property` iteratee shorthand. - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } + * _.isDate('Mon April 23 2012'); + * // => false */ - var countBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - ++result[key]; - } else { - baseAssignValue(result, key, 1); - } - }); + var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; /** - * Checks if `predicate` returns truthy for **all** elements of `collection`. - * Iteration is stopped once `predicate` returns falsey. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * **Note:** This method returns `true` for - * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because - * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of - * elements of empty collections. + * Checks if `value` is likely a DOM element. * * @static * @memberOf _ * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if all elements pass the predicate check, - * else `false`. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. * @example * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.every(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.every(users, ['active', false]); + * _.isElement(document.body); * // => true * - * // The `_.property` iteratee shorthand. - * _.every(users, 'active'); + * _.isElement('<body>'); * // => false */ - function every(collection, predicate, guard) { - var func = isArray(collection) ? arrayEvery : baseEvery; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, getIteratee(predicate, 3)); + function isElement(value) { + return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); } /** - * Iterates over elements of `collection`, returning an array of all elements - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). + * Checks if `value` is an empty object, collection, map, or set. * - * **Note:** Unlike `_.remove`, this method returns a new array. + * Objects are considered empty if they have no own enumerable string keyed + * properties. + * + * Array-like values such as `arguments` objects, arrays, buffers, strings, or + * jQuery-like collections are considered empty if they have a `length` of `0`. + * Similarly, maps and sets are considered empty if they have a `size` of `0`. * * @static * @memberOf _ * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.reject + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is empty, else `false`. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * _.filter(users, function(o) { return !o.active; }); - * // => objects for ['fred'] + * _.isEmpty(null); + * // => true * - * // The `_.matches` iteratee shorthand. - * _.filter(users, { 'age': 36, 'active': true }); - * // => objects for ['barney'] + * _.isEmpty(true); + * // => true * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, ['active', false]); - * // => objects for ['fred'] + * _.isEmpty(1); + * // => true * - * // The `_.property` iteratee shorthand. - * _.filter(users, 'active'); - * // => objects for ['barney'] + * _.isEmpty([1, 2, 3]); + * // => false * - * // Combining several predicates using `_.overEvery` or `_.overSome`. - * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]])); - * // => objects for ['fred', 'barney'] + * _.isEmpty({ 'a': 1 }); + * // => false */ - function filter(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, getIteratee(predicate, 3)); + function isEmpty(value) { + if (value == null) { + return true; + } + if (isArrayLike(value) && + (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || + isBuffer(value) || isTypedArray(value) || isArguments(value))) { + return !value.length; + } + var tag = getTag(value); + if (tag == mapTag || tag == setTag) { + return !value.size; + } + if (isPrototype(value)) { + return !baseKeys(value).length; + } + for (var key in value) { + if (hasOwnProperty.call(value, key)) { + return false; + } + } + return true; } /** - * Iterates over elements of `collection`, returning the first element - * `predicate` returns truthy for. The predicate is invoked with three - * arguments: (value, index|key, collection). + * Performs a deep comparison between two values to determine if they are + * equivalent. + * + * **Note:** This method supports comparing arrays, array buffers, booleans, + * date objects, error objects, maps, numbers, `Object` objects, regexes, + * sets, strings, symbols, and typed arrays. `Object` objects are compared + * by their own, not inherited, enumerable properties. Functions and DOM + * nodes are compared by strict equality, i.e. `===`. * * @static * @memberOf _ * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=0] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false }, - * { 'user': 'pebbles', 'age': 1, 'active': true } - * ]; - * - * _.find(users, function(o) { return o.age < 40; }); - * // => object for 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.find(users, { 'age': 1, 'active': true }); - * // => object for 'pebbles' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.find(users, ['active', false]); - * // => object for 'fred' - * - * // The `_.property` iteratee shorthand. - * _.find(users, 'active'); - * // => object for 'barney' - */ - var find = createFind(findIndex); - - /** - * This method is like `_.find` except that it iterates over elements of - * `collection` from right to left. + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; * - * @static - * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param {number} [fromIndex=collection.length-1] The index to search from. - * @returns {*} Returns the matched element, else `undefined`. - * @example + * _.isEqual(object, other); + * // => true * - * _.findLast([1, 2, 3, 4], function(n) { - * return n % 2 == 1; - * }); - * // => 3 + * object === other; + * // => false */ - var findLast = createFind(findLastIndex); + function isEqual(value, other) { + return baseIsEqual(value, other); + } /** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). * * @static * @memberOf _ * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. * @example * - * function duplicate(n) { - * return [n, n]; + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); * } * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true */ - function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); + function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; } /** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results. + * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, + * `SyntaxError`, `TypeError`, or `URIError` object. * * @static * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an error object, else `false`. * @example * - * function duplicate(n) { - * return [[[n, n]]]; - * } + * _.isError(new Error); + * // => true * - * _.flatMapDeep([1, 2], duplicate); - * // => [1, 1, 2, 2] + * _.isError(Error); + * // => false */ - function flatMapDeep(collection, iteratee) { - return baseFlatten(map(collection, iteratee), INFINITY); + function isError(value) { + if (!isObjectLike(value)) { + return false; + } + var tag = baseGetTag(value); + return tag == errorTag || tag == domExcTag || + (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); } /** - * This method is like `_.flatMap` except that it recursively flattens the - * mapped results up to `depth` times. + * Checks if `value` is a finite primitive number. + * + * **Note:** This method is based on + * [`Number.isFinite`](https://mdn.io/Number/isFinite). * * @static * @memberOf _ - * @since 4.7.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {number} [depth=1] The maximum recursion depth. - * @returns {Array} Returns the new flattened array. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. * @example * - * function duplicate(n) { - * return [[[n, n]]]; - * } + * _.isFinite(3); + * // => true * - * _.flatMapDepth([1, 2], duplicate, 2); - * // => [[1, 1], [2, 2]] + * _.isFinite(Number.MIN_VALUE); + * // => true + * + * _.isFinite(Infinity); + * // => false + * + * _.isFinite('3'); + * // => false */ - function flatMapDepth(collection, iteratee, depth) { - depth = depth === undefined ? 1 : toInteger(depth); - return baseFlatten(map(collection, iteratee), depth); + function isFinite(value) { + return typeof value == 'number' && nativeIsFinite(value); } /** - * Iterates over elements of `collection` and invokes `iteratee` for each element. - * The iteratee is invoked with three arguments: (value, index|key, collection). - * Iteratee functions may exit iteration early by explicitly returning `false`. - * - * **Note:** As with other "Collections" methods, objects with a "length" - * property are iterated like arrays. To avoid this behavior use `_.forIn` - * or `_.forOwn` for object iteration. + * Checks if `value` is classified as a `Function` object. * * @static * @memberOf _ * @since 0.1.0 - * @alias each - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEachRight + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a function, else `false`. * @example * - * _.forEach([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `1` then `2`. + * _.isFunction(_); + * // => true * - * _.forEach({ 'a': 1, 'b': 2 }, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). + * _.isFunction(/abc/); + * // => false */ - function forEach(collection, iteratee) { - var func = isArray(collection) ? arrayEach : baseEach; - return func(collection, getIteratee(iteratee, 3)); + function isFunction(value) { + if (!isObject(value)) { + return false; + } + // The use of `Object#toString` avoids issues with the `typeof` operator + // in Safari 9 which returns 'object' for typed arrays and other constructors. + var tag = baseGetTag(value); + return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; } /** - * This method is like `_.forEach` except that it iterates over elements of - * `collection` from right to left. + * Checks if `value` is an integer. + * + * **Note:** This method is based on + * [`Number.isInteger`](https://mdn.io/Number/isInteger). * * @static * @memberOf _ - * @since 2.0.0 - * @alias eachRight - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array|Object} Returns `collection`. - * @see _.forEach + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an integer, else `false`. * @example * - * _.forEachRight([1, 2], function(value) { - * console.log(value); - * }); - * // => Logs `2` then `1`. + * _.isInteger(3); + * // => true + * + * _.isInteger(Number.MIN_VALUE); + * // => false + * + * _.isInteger(Infinity); + * // => false + * + * _.isInteger('3'); + * // => false */ - function forEachRight(collection, iteratee) { - var func = isArray(collection) ? arrayEachRight : baseEachRight; - return func(collection, getIteratee(iteratee, 3)); + function isInteger(value) { + return typeof value == 'number' && value == toInteger(value); } /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The order of grouped values - * is determined by the order they occur in `collection`. The corresponding - * value of each key is an array of elements responsible for generating the - * key. The iteratee is invoked with one argument: (value). + * Checks if `value` is a valid array-like length. + * + * **Note:** This method is loosely based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. * @example * - * _.groupBy([6.1, 4.2, 6.3], Math.floor); - * // => { '4': [4.2], '6': [6.1, 6.3] } + * _.isLength(3); + * // => true * - * // The `_.property` iteratee shorthand. - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } + * _.isLength(Number.MIN_VALUE); + * // => false + * + * _.isLength(Infinity); + * // => false + * + * _.isLength('3'); + * // => false */ - var groupBy = createAggregator(function(result, value, key) { - if (hasOwnProperty.call(result, key)) { - result[key].push(value); - } else { - baseAssignValue(result, key, [value]); - } - }); + function isLength(value) { + return typeof value == 'number' && + value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; + } /** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) * * @static * @memberOf _ * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. * @example * - * _.includes([1, 2, 3], 1); + * _.isObject({}); * // => true * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); + * _.isObject([1, 2, 3]); * // => true * - * _.includes('abcd', 'bc'); + * _.isObject(_.noop); * // => true + * + * _.isObject(null); + * // => false */ - function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; - - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); + function isObject(value) { + var type = typeof value; + return value != null && (type == 'object' || type == 'function'); } /** - * Invokes the method at `path` of each element in `collection`, returning - * an array of the results of each invoked method. Any additional arguments - * are provided to each invoked method. If `path` is a function, it's invoked - * for, and `this` bound to, each element in `collection`. + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". * * @static * @memberOf _ * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array|Function|string} path The path of the method to invoke or - * the function invoked per iteration. - * @param {...*} [args] The arguments to invoke each method with. - * @returns {Array} Returns the array of results. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. * @example * - * _.invokeMap([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] + * _.isObjectLike({}); + * // => true * - * _.invokeMap([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false */ - var invokeMap = baseRest(function(collection, path, args) { - var index = -1, - isFunc = typeof path == 'function', - result = isArrayLike(collection) ? Array(collection.length) : []; - - baseEach(collection, function(value) { - result[++index] = isFunc ? apply(path, value, args) : baseInvoke(value, path, args); - }); - return result; - }); + function isObjectLike(value) { + return value != null && typeof value == 'object'; + } /** - * Creates an object composed of keys generated from the results of running - * each element of `collection` thru `iteratee`. The corresponding value of - * each key is the last element responsible for generating the key. The - * iteratee is invoked with one argument: (value). + * Checks if `value` is classified as a `Map` object. * * @static * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee to transform keys. - * @returns {Object} Returns the composed aggregate object. + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a map, else `false`. * @example * - * var array = [ - * { 'dir': 'left', 'code': 97 }, - * { 'dir': 'right', 'code': 100 } - * ]; - * - * _.keyBy(array, function(o) { - * return String.fromCharCode(o.code); - * }); - * // => { 'a': { 'dir': 'left', 'code': 97 }, 'd': { 'dir': 'right', 'code': 100 } } + * _.isMap(new Map); + * // => true * - * _.keyBy(array, 'dir'); - * // => { 'left': { 'dir': 'left', 'code': 97 }, 'right': { 'dir': 'right', 'code': 100 } } + * _.isMap(new WeakMap); + * // => false */ - var keyBy = createAggregator(function(result, value, key) { - baseAssignValue(result, key, value); - }); + var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). + * Performs a partial deep comparison between `object` and `source` to + * determine if `object` contains equivalent property values. * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * **Note:** This method is equivalent to `_.matches` when `source` is + * partially applied. * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. * * @static * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. + * @since 3.0.0 + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) + * var object = { 'a': 1, 'b': 2 }; * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; + * _.isMatch(object, { 'b': 2 }); + * // => true * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] + * _.isMatch(object, { 'b': 1 }); + * // => false */ - function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, getIteratee(iteratee, 3)); + function isMatch(object, source) { + return object === source || baseIsMatch(object, source, getMatchData(source)); } /** - * This method is like `_.sortBy` except that it allows specifying the sort - * orders of the iteratees to sort by. If `orders` is unspecified, all values - * are sorted in ascending order. Otherwise, specify an order of "desc" for - * descending or "asc" for ascending sort order of corresponding values. + * This method is like `_.isMatch` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with five + * arguments: (objValue, srcValue, index|key, object, source). * * @static * @memberOf _ * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Array[]|Function[]|Object[]|string[]} [iteratees=[_.identity]] - * The iteratees to sort by. - * @param {string[]} [orders] The sort orders of `iteratees`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {Array} Returns the new sorted array. + * @category Lang + * @param {Object} object The object to inspect. + * @param {Object} source The object of property values to match. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if `object` is a match, else `false`. * @example * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 34 }, - * { 'user': 'fred', 'age': 40 }, - * { 'user': 'barney', 'age': 36 } - * ]; + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } * - * // Sort by `user` in ascending order and by `age` in descending order. - * _.orderBy(users, ['user', 'age'], ['asc', 'desc']); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]] + * function customizer(objValue, srcValue) { + * if (isGreeting(objValue) && isGreeting(srcValue)) { + * return true; + * } + * } + * + * var object = { 'greeting': 'hello' }; + * var source = { 'greeting': 'hi' }; + * + * _.isMatchWith(object, source, customizer); + * // => true */ - function orderBy(collection, iteratees, orders, guard) { - if (collection == null) { - return []; - } - if (!isArray(iteratees)) { - iteratees = iteratees == null ? [] : [iteratees]; - } - orders = guard ? undefined : orders; - if (!isArray(orders)) { - orders = orders == null ? [] : [orders]; - } - return baseOrderBy(collection, iteratees, orders); + function isMatchWith(object, source, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return baseIsMatch(object, source, getMatchData(source), customizer); } /** - * Creates an array of elements split into two groups, the first of which - * contains elements `predicate` returns truthy for, the second of which - * contains elements `predicate` returns falsey for. The predicate is - * invoked with one argument: (value). + * Checks if `value` is `NaN`. + * + * **Note:** This method is based on + * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as + * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for + * `undefined` and other non-number values. * * @static * @memberOf _ - * @since 3.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the array of grouped elements. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true }, - * { 'user': 'pebbles', 'age': 1, 'active': false } - * ]; - * - * _.partition(users, function(o) { return o.active; }); - * // => objects for [['fred'], ['barney', 'pebbles']] + * _.isNaN(NaN); + * // => true * - * // The `_.matches` iteratee shorthand. - * _.partition(users, { 'age': 1, 'active': false }); - * // => objects for [['pebbles'], ['barney', 'fred']] + * _.isNaN(new Number(NaN)); + * // => true * - * // The `_.matchesProperty` iteratee shorthand. - * _.partition(users, ['active', false]); - * // => objects for [['barney', 'pebbles'], ['fred']] + * isNaN(undefined); + * // => true * - * // The `_.property` iteratee shorthand. - * _.partition(users, 'active'); - * // => objects for [['fred'], ['barney', 'pebbles']] + * _.isNaN(undefined); + * // => false */ - var partition = createAggregator(function(result, value, key) { - result[key ? 0 : 1].push(value); - }, function() { return [[], []]; }); + function isNaN(value) { + // An `NaN` primitive is the only value that is not equal to itself. + // Perform the `toStringTag` check first to avoid errors with some + // ActiveX objects in IE. + return isNumber(value) && value != +value; + } /** - * Reduces `collection` to a value which is the accumulated result of running - * each element in `collection` thru `iteratee`, where each successive - * invocation is supplied the return value of the previous. If `accumulator` - * is not given, the first element of `collection` is used as the initial - * value. The iteratee is invoked with four arguments: - * (accumulator, value, index|key, collection). - * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.reduce`, `_.reduceRight`, and `_.transform`. + * Checks if `value` is a pristine native function. * - * The guarded methods are: - * `assign`, `defaults`, `defaultsDeep`, `includes`, `merge`, `orderBy`, - * and `sortBy` + * **Note:** This method can't reliably detect native functions in the presence + * of the core-js package because core-js circumvents this kind of detection. + * Despite multiple requests, the core-js maintainer has made it clear: any + * attempt to fix the detection will be obstructed. As a result, we're left + * with little choice but to throw an error. Unfortunately, this also affects + * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), + * which rely on core-js. * * @static * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduceRight + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a native function, + * else `false`. * @example * - * _.reduce([1, 2], function(sum, n) { - * return sum + n; - * }, 0); - * // => 3 + * _.isNative(Array.prototype.push); + * // => true * - * _.reduce({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * return result; - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } (iteration order is not guaranteed) + * _.isNative(_); + * // => false */ - function reduce(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduce : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEach); + function isNative(value) { + if (isMaskable(value)) { + throw new Error(CORE_ERROR_TEXT); + } + return baseIsNative(value); } /** - * This method is like `_.reduce` except that it iterates over elements of - * `collection` from right to left. + * Checks if `value` is `null`. * * @static * @memberOf _ * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The initial value. - * @returns {*} Returns the accumulated value. - * @see _.reduce + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `null`, else `false`. * @example * - * var array = [[0, 1], [2, 3], [4, 5]]; + * _.isNull(null); + * // => true * - * _.reduceRight(array, function(flattened, other) { - * return flattened.concat(other); - * }, []); - * // => [4, 5, 2, 3, 0, 1] + * _.isNull(void 0); + * // => false */ - function reduceRight(collection, iteratee, accumulator) { - var func = isArray(collection) ? arrayReduceRight : baseReduce, - initAccum = arguments.length < 3; - - return func(collection, getIteratee(iteratee, 4), accumulator, initAccum, baseEachRight); + function isNull(value) { + return value === null; } /** - * The opposite of `_.filter`; this method returns the elements of `collection` - * that `predicate` does **not** return truthy for. + * Checks if `value` is `null` or `undefined`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new filtered array. - * @see _.filter + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is nullish, else `false`. * @example * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': false }, - * { 'user': 'fred', 'age': 40, 'active': true } - * ]; - * - * _.reject(users, function(o) { return !o.active; }); - * // => objects for ['fred'] - * - * // The `_.matches` iteratee shorthand. - * _.reject(users, { 'age': 40, 'active': true }); - * // => objects for ['barney'] + * _.isNil(null); + * // => true * - * // The `_.matchesProperty` iteratee shorthand. - * _.reject(users, ['active', false]); - * // => objects for ['fred'] + * _.isNil(void 0); + * // => true * - * // The `_.property` iteratee shorthand. - * _.reject(users, 'active'); - * // => objects for ['barney'] + * _.isNil(NaN); + * // => false */ - function reject(collection, predicate) { - var func = isArray(collection) ? arrayFilter : baseFilter; - return func(collection, negate(getIteratee(predicate, 3))); + function isNil(value) { + return value == null; } /** - * Gets a random element from `collection`. + * Checks if `value` is classified as a `Number` primitive or object. + * + * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are + * classified as numbers, use the `_.isFinite` method. * * @static * @memberOf _ - * @since 2.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @returns {*} Returns the random element. + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a number, else `false`. * @example * - * _.sample([1, 2, 3, 4]); - * // => 2 + * _.isNumber(3); + * // => true + * + * _.isNumber(Number.MIN_VALUE); + * // => true + * + * _.isNumber(Infinity); + * // => true + * + * _.isNumber('3'); + * // => false */ - function sample(collection) { - var func = isArray(collection) ? arraySample : baseSample; - return func(collection); + function isNumber(value) { + return typeof value == 'number' || + (isObjectLike(value) && baseGetTag(value) == numberTag); } /** - * Gets `n` random elements at unique keys from `collection` up to the - * size of `collection`. + * Checks if `value` is a plain object, that is, an object created by the + * `Object` constructor or one with a `[[Prototype]]` of `null`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to sample. - * @param {number} [n=1] The number of elements to sample. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the random elements. + * @since 0.8.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. * @example * - * _.sampleSize([1, 2, 3], 2); - * // => [3, 1] + * function Foo() { + * this.a = 1; + * } * - * _.sampleSize([1, 2, 3], 4); - * // => [2, 3, 1] + * _.isPlainObject(new Foo); + * // => false + * + * _.isPlainObject([1, 2, 3]); + * // => false + * + * _.isPlainObject({ 'x': 0, 'y': 0 }); + * // => true + * + * _.isPlainObject(Object.create(null)); + * // => true */ - function sampleSize(collection, n, guard) { - if ((guard ? isIterateeCall(collection, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); + function isPlainObject(value) { + if (!isObjectLike(value) || baseGetTag(value) != objectTag) { + return false; } - var func = isArray(collection) ? arraySampleSize : baseSampleSize; - return func(collection, n); + var proto = getPrototype(value); + if (proto === null) { + return true; + } + var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; + return typeof Ctor == 'function' && Ctor instanceof Ctor && + funcToString.call(Ctor) == objectCtorString; } /** - * Creates an array of shuffled values, using a version of the - * [Fisher-Yates shuffle](https://en.wikipedia.org/wiki/Fisher-Yates_shuffle). + * Checks if `value` is classified as a `RegExp` object. * * @static * @memberOf _ * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to shuffle. - * @returns {Array} Returns the new shuffled array. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. * @example * - * _.shuffle([1, 2, 3, 4]); - * // => [4, 1, 3, 2] + * _.isRegExp(/abc/); + * // => true + * + * _.isRegExp('/abc/'); + * // => false */ - function shuffle(collection) { - var func = isArray(collection) ? arrayShuffle : baseShuffle; - return func(collection); - } + var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; /** - * Gets the size of `collection` by returning its length for array-like - * values or the number of own enumerable string keyed properties for objects. + * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 + * double precision number which isn't the result of a rounded unsafe integer. + * + * **Note:** This method is based on + * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). * * @static * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @returns {number} Returns the collection size. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. * @example * - * _.size([1, 2, 3]); - * // => 3 + * _.isSafeInteger(3); + * // => true * - * _.size({ 'a': 1, 'b': 2 }); - * // => 2 + * _.isSafeInteger(Number.MIN_VALUE); + * // => false * - * _.size('pebbles'); - * // => 7 + * _.isSafeInteger(Infinity); + * // => false + * + * _.isSafeInteger('3'); + * // => false */ - function size(collection) { - if (collection == null) { - return 0; - } - if (isArrayLike(collection)) { - return isString(collection) ? stringSize(collection) : collection.length; - } - var tag = getTag(collection); - if (tag == mapTag || tag == setTag) { - return collection.size; - } - return baseKeys(collection).length; + function isSafeInteger(value) { + return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; } /** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). + * Checks if `value` is classified as a `Set` object. * * @static * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a set, else `false`. * @example * - * _.some([null, 0, 'yes', false], Boolean); + * _.isSet(new Set); * // => true * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); + * _.isSet(new WeakSet); * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true */ - function some(collection, predicate, guard) { - var func = isArray(collection) ? arraySome : baseSome; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; - } - return func(collection, getIteratee(predicate, 3)); - } + var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). + * Checks if `value` is classified as a `String` primitive or object. * * @static - * @memberOf _ * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a string, else `false`. * @example * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * _.isString('abc'); + * // => true * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + * _.isString(1); + * // => false */ - var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); - }); - - /*------------------------------------------------------------------------*/ + function isString(value) { + return typeof value == 'string' || + (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + } /** - * Gets the timestamp of the number of milliseconds that have elapsed since - * the Unix epoch (1 January 1970 00:00:00 UTC). + * Checks if `value` is classified as a `Symbol` primitive or object. * * @static * @memberOf _ - * @since 2.4.0 - * @category Date - * @returns {number} Returns the timestamp. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. * @example * - * _.defer(function(stamp) { - * console.log(_.now() - stamp); - * }, _.now()); - * // => Logs the number of milliseconds it took for the deferred invocation. + * _.isSymbol(Symbol.iterator); + * // => true + * + * _.isSymbol('abc'); + * // => false */ - var now = ctxNow || function() { - return root.Date.now(); - }; - - /*------------------------------------------------------------------------*/ + function isSymbol(value) { + return typeof value == 'symbol' || + (isObjectLike(value) && baseGetTag(value) == symbolTag); + } /** - * The opposite of `_.before`; this method creates a function that invokes - * `func` once it's called `n` or more times. + * Checks if `value` is classified as a typed array. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {number} n The number of calls before `func` is invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @since 3.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. * @example * - * var saves = ['profile', 'settings']; - * - * var done = _.after(saves.length, function() { - * console.log('done saving!'); - * }); + * _.isTypedArray(new Uint8Array); + * // => true * - * _.forEach(saves, function(type) { - * asyncSave({ 'type': type, 'complete': done }); - * }); - * // => Logs 'done saving!' after the two async saves have completed. + * _.isTypedArray([]); + * // => false */ - function after(n, func) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } + var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; /** - * Creates a function that invokes `func`, with up to `n` arguments, - * ignoring any additional arguments. + * Checks if `value` is `undefined`. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @param {number} [n=func.length] The arity cap. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new capped function. + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. * @example * - * _.map(['6', '8', '10'], _.ary(parseInt, 1)); - * // => [6, 8, 10] + * _.isUndefined(void 0); + * // => true + * + * _.isUndefined(null); + * // => false */ - function ary(func, n, guard) { - n = guard ? undefined : n; - n = (func && n == null) ? func.length : n; - return createWrap(func, WRAP_ARY_FLAG, undefined, undefined, undefined, undefined, n); + function isUndefined(value) { + return value === undefined; } /** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. + * Checks if `value` is classified as a `WeakMap` object. * * @static * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. * @example * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. + * _.isWeakMap(new WeakMap); + * // => true + * + * _.isWeakMap(new Map); + * // => false */ - function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); - } - if (n <= 1) { - func = undefined; - } - return result; - }; + function isWeakMap(value) { + return isObjectLike(value) && getTag(value) == weakMapTag; } /** - * Creates a function that invokes `func` with the `this` binding of `thisArg` - * and `partials` prepended to the arguments it receives. - * - * The `_.bind.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for partially applied arguments. - * - * **Note:** Unlike native `Function#bind`, this method doesn't set the "length" - * property of bound functions. + * Checks if `value` is classified as a `WeakSet` object. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to bind. - * @param {*} thisArg The `this` binding of `func`. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @since 4.3.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. * @example * - * function greet(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * - * var object = { 'user': 'fred' }; - * - * var bound = _.bind(greet, object, 'hi'); - * bound('!'); - * // => 'hi fred!' + * _.isWeakSet(new WeakSet); + * // => true * - * // Bound with placeholders. - * var bound = _.bind(greet, object, _, '!'); - * bound('hi'); - * // => 'hi fred!' + * _.isWeakSet(new Set); + * // => false */ - var bind = baseRest(function(func, thisArg, partials) { - var bitmask = WRAP_BIND_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bind)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(func, bitmask, thisArg, partials, holders); - }); + function isWeakSet(value) { + return isObjectLike(value) && baseGetTag(value) == weakSetTag; + } /** - * Creates a function that invokes the method at `object[key]` with `partials` - * prepended to the arguments it receives. - * - * This method differs from `_.bind` by allowing bound functions to reference - * methods that may be redefined or don't yet exist. See - * [Peter Michaux's article](http://peter.michaux.ca/articles/lazy-function-definition-pattern) - * for more details. - * - * The `_.bindKey.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. + * Checks if `value` is less than `other`. * * @static * @memberOf _ - * @since 0.10.0 - * @category Function - * @param {Object} object The object to invoke the method on. - * @param {string} key The key of the method. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new bound function. + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than `other`, + * else `false`. + * @see _.gt * @example * - * var object = { - * 'user': 'fred', - * 'greet': function(greeting, punctuation) { - * return greeting + ' ' + this.user + punctuation; - * } - * }; - * - * var bound = _.bindKey(object, 'greet', 'hi'); - * bound('!'); - * // => 'hi fred!' - * - * object.greet = function(greeting, punctuation) { - * return greeting + 'ya ' + this.user + punctuation; - * }; + * _.lt(1, 3); + * // => true * - * bound('!'); - * // => 'hiya fred!' + * _.lt(3, 3); + * // => false * - * // Bound with placeholders. - * var bound = _.bindKey(object, 'greet', _, '!'); - * bound('hi'); - * // => 'hiya fred!' + * _.lt(3, 1); + * // => false */ - var bindKey = baseRest(function(object, key, partials) { - var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG; - if (partials.length) { - var holders = replaceHolders(partials, getHolder(bindKey)); - bitmask |= WRAP_PARTIAL_FLAG; - } - return createWrap(key, bitmask, object, partials, holders); - }); + var lt = createRelationalOperation(baseLt); /** - * Creates a function that accepts arguments of `func` and either invokes - * `func` returning its result, if at least `arity` number of arguments have - * been provided, or returns a function that accepts the remaining `func` - * arguments, and so on. The arity of `func` may be specified if `func.length` - * is not sufficient. - * - * The `_.curry.placeholder` value, which defaults to `_` in monolithic builds, - * may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. + * Checks if `value` is less than or equal to `other`. * * @static * @memberOf _ - * @since 2.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. + * @since 3.9.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is less than or equal to + * `other`, else `false`. + * @see _.gte * @example * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curry(abc); - * - * curried(1)(2)(3); - * // => [1, 2, 3] - * - * curried(1, 2)(3); - * // => [1, 2, 3] + * _.lte(1, 3); + * // => true * - * curried(1, 2, 3); - * // => [1, 2, 3] + * _.lte(3, 3); + * // => true * - * // Curried with placeholders. - * curried(1)(_, 3)(2); - * // => [1, 2, 3] + * _.lte(3, 1); + * // => false */ - function curry(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curry.placeholder; - return result; - } + var lte = createRelationalOperation(function(value, other) { + return value <= other; + }); /** - * This method is like `_.curry` except that arguments are applied to `func` - * in the manner of `_.partialRight` instead of `_.partial`. - * - * The `_.curryRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for provided arguments. - * - * **Note:** This method doesn't set the "length" property of curried functions. + * Converts `value` to an array. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to curry. - * @param {number} [arity=func.length] The arity of `func`. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the new curried function. + * @category Lang + * @param {*} value The value to convert. + * @returns {Array} Returns the converted array. * @example * - * var abc = function(a, b, c) { - * return [a, b, c]; - * }; - * - * var curried = _.curryRight(abc); - * - * curried(3)(2)(1); - * // => [1, 2, 3] + * _.toArray({ 'a': 1, 'b': 2 }); + * // => [1, 2] * - * curried(2, 3)(1); - * // => [1, 2, 3] + * _.toArray('abc'); + * // => ['a', 'b', 'c'] * - * curried(1, 2, 3); - * // => [1, 2, 3] + * _.toArray(1); + * // => [] * - * // Curried with placeholders. - * curried(3)(1, _)(2); - * // => [1, 2, 3] + * _.toArray(null); + * // => [] */ - function curryRight(func, arity, guard) { - arity = guard ? undefined : arity; - var result = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined, undefined, undefined, undefined, undefined, arity); - result.placeholder = curryRight.placeholder; - return result; + function toArray(value) { + if (!value) { + return []; + } + if (isArrayLike(value)) { + return isString(value) ? stringToArray(value) : copyArray(value); + } + if (symIterator && value[symIterator]) { + return iteratorToArray(value[symIterator]()); + } + var tag = getTag(value), + func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + + return func(value); } /** - * Creates a debounced function that delays invoking `func` until after `wait` - * milliseconds have elapsed since the last time the debounced function was - * invoked. The debounced function comes with a `cancel` method to cancel - * delayed `func` invocations and a `flush` method to immediately invoke them. - * Provide `options` to indicate whether `func` should be invoked on the - * leading and/or trailing edge of the `wait` timeout. The `func` is invoked - * with the last arguments provided to the debounced function. Subsequent - * calls to the debounced function return the result of the last `func` - * invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the debounced function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. - * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.debounce` and `_.throttle`. + * Converts `value` to a finite number. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to debounce. - * @param {number} [wait=0] The number of milliseconds to delay. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=false] - * Specify invoking on the leading edge of the timeout. - * @param {number} [options.maxWait] - * The maximum time `func` is allowed to be delayed before it's invoked. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new debounced function. + * @since 4.12.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted number. * @example * - * // Avoid costly calculations while the window size is in flux. - * jQuery(window).on('resize', _.debounce(calculateLayout, 150)); + * _.toFinite(3.2); + * // => 3.2 * - * // Invoke `sendMail` when clicked, debouncing subsequent calls. - * jQuery(element).on('click', _.debounce(sendMail, 300, { - * 'leading': true, - * 'trailing': false - * })); + * _.toFinite(Number.MIN_VALUE); + * // => 5e-324 * - * // Ensure `batchLog` is invoked once after 1 second of debounced calls. - * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 }); - * var source = new EventSource('/stream'); - * jQuery(source).on('message', debounced); + * _.toFinite(Infinity); + * // => 1.7976931348623157e+308 * - * // Cancel the trailing debounced invocation. - * jQuery(window).on('popstate', debounced.cancel); + * _.toFinite('3.2'); + * // => 3.2 */ - function debounce(func, wait, options) { - var lastArgs, - lastThis, - maxWait, - result, - timerId, - lastCallTime, - lastInvokeTime = 0, - leading = false, - maxing = false, - trailing = true; - - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - wait = toNumber(wait) || 0; - if (isObject(options)) { - leading = !!options.leading; - maxing = 'maxWait' in options; - maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait; - trailing = 'trailing' in options ? !!options.trailing : trailing; - } - - function invokeFunc(time) { - var args = lastArgs, - thisArg = lastThis; - - lastArgs = lastThis = undefined; - lastInvokeTime = time; - result = func.apply(thisArg, args); - return result; - } - - function leadingEdge(time) { - // Reset any `maxWait` timer. - lastInvokeTime = time; - // Start the timer for the trailing edge. - timerId = setTimeout(timerExpired, wait); - // Invoke the leading edge. - return leading ? invokeFunc(time) : result; - } - - function remainingWait(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime, - timeWaiting = wait - timeSinceLastCall; - - return maxing - ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) - : timeWaiting; - } - - function shouldInvoke(time) { - var timeSinceLastCall = time - lastCallTime, - timeSinceLastInvoke = time - lastInvokeTime; - - // Either this is the first call, activity has stopped and we're at the - // trailing edge, the system time has gone backwards and we're treating - // it as the trailing edge, or we've hit the `maxWait` limit. - return (lastCallTime === undefined || (timeSinceLastCall >= wait) || - (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait)); - } - - function timerExpired() { - var time = now(); - if (shouldInvoke(time)) { - return trailingEdge(time); - } - // Restart the timer. - timerId = setTimeout(timerExpired, remainingWait(time)); - } - - function trailingEdge(time) { - timerId = undefined; - - // Only invoke if we have `lastArgs` which means `func` has been - // debounced at least once. - if (trailing && lastArgs) { - return invokeFunc(time); - } - lastArgs = lastThis = undefined; - return result; - } - - function cancel() { - if (timerId !== undefined) { - clearTimeout(timerId); - } - lastInvokeTime = 0; - lastArgs = lastCallTime = lastThis = timerId = undefined; - } - - function flush() { - return timerId === undefined ? result : trailingEdge(now()); + function toFinite(value) { + if (!value) { + return value === 0 ? value : 0; } - - function debounced() { - var time = now(), - isInvoking = shouldInvoke(time); - - lastArgs = arguments; - lastThis = this; - lastCallTime = time; - - if (isInvoking) { - if (timerId === undefined) { - return leadingEdge(lastCallTime); - } - if (maxing) { - // Handle invocations in a tight loop. - clearTimeout(timerId); - timerId = setTimeout(timerExpired, wait); - return invokeFunc(lastCallTime); - } - } - if (timerId === undefined) { - timerId = setTimeout(timerExpired, wait); - } - return result; + value = toNumber(value); + if (value === INFINITY || value === -INFINITY) { + var sign = (value < 0 ? -1 : 1); + return sign * MAX_INTEGER; } - debounced.cancel = cancel; - debounced.flush = flush; - return debounced; + return value === value ? value : 0; } /** - * Defers invoking the `func` until the current call stack has cleared. Any - * additional arguments are provided to `func` when it's invoked. + * Converts `value` to an integer. + * + * **Note:** This method is loosely based on + * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to defer. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. * @example * - * _.defer(function(text) { - * console.log(text); - * }, 'deferred'); - * // => Logs 'deferred' after one millisecond. + * _.toInteger(3.2); + * // => 3 + * + * _.toInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toInteger(Infinity); + * // => 1.7976931348623157e+308 + * + * _.toInteger('3.2'); + * // => 3 */ - var defer = baseRest(function(func, args) { - return baseDelay(func, 1, args); - }); + function toInteger(value) { + var result = toFinite(value), + remainder = result % 1; + + return result === result ? (remainder ? result - remainder : result) : 0; + } /** - * Invokes `func` after `wait` milliseconds. Any additional arguments are - * provided to `func` when it's invoked. + * Converts `value` to an integer suitable for use as the length of an + * array-like object. + * + * **Note:** This method is based on + * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to delay. - * @param {number} wait The number of milliseconds to delay invocation. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {number} Returns the timer id. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. * @example * - * _.delay(function(text) { - * console.log(text); - * }, 1000, 'later'); - * // => Logs 'later' after one second. + * _.toLength(3.2); + * // => 3 + * + * _.toLength(Number.MIN_VALUE); + * // => 0 + * + * _.toLength(Infinity); + * // => 4294967295 + * + * _.toLength('3.2'); + * // => 3 */ - var delay = baseRest(function(func, wait, args) { - return baseDelay(func, toNumber(wait) || 0, args); - }); + function toLength(value) { + return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + } /** - * Creates a function that invokes `func` with arguments reversed. + * Converts `value` to a number. * * @static * @memberOf _ * @since 4.0.0 - * @category Function - * @param {Function} func The function to flip arguments for. - * @returns {Function} Returns the new flipped function. + * @category Lang + * @param {*} value The value to process. + * @returns {number} Returns the number. * @example * - * var flipped = _.flip(function() { - * return _.toArray(arguments); - * }); + * _.toNumber(3.2); + * // => 3.2 * - * flipped('a', 'b', 'c', 'd'); - * // => ['d', 'c', 'b', 'a'] + * _.toNumber(Number.MIN_VALUE); + * // => 5e-324 + * + * _.toNumber(Infinity); + * // => Infinity + * + * _.toNumber('3.2'); + * // => 3.2 */ - function flip(func) { - return createWrap(func, WRAP_FLIP_FLAG); + function toNumber(value) { + if (typeof value == 'number') { + return value; + } + if (isSymbol(value)) { + return NAN; + } + if (isObject(value)) { + var other = typeof value.valueOf == 'function' ? value.valueOf() : value; + value = isObject(other) ? (other + '') : other; + } + if (typeof value != 'string') { + return value === 0 ? value : +value; + } + value = baseTrim(value); + var isBinary = reIsBinary.test(value); + return (isBinary || reIsOctal.test(value)) + ? freeParseInt(value.slice(2), isBinary ? 2 : 8) + : (reIsBadHex.test(value) ? NAN : +value); } /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * provided, it determines the cache key for storing the result based on the - * arguments provided to the memoized function. By default, the first argument - * provided to the memoized function is used as the map cache key. The `func` - * is invoked with the `this` binding of the memoized function. - * - * **Note:** The cache is exposed as the `cache` property on the memoized - * function. Its creation may be customized by replacing the `_.memoize.Cache` - * constructor with one whose instances implement the - * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object) - * method interface of `clear`, `delete`, `get`, `has`, and `set`. + * Converts `value` to a plain object flattening inherited enumerable string + * keyed properties of `value` to own properties of the plain object. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] The function to resolve the cache key. - * @returns {Function} Returns the new memoized function. + * @since 3.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {Object} Returns the converted plain object. * @example * - * var object = { 'a': 1, 'b': 2 }; - * var other = { 'c': 3, 'd': 4 }; - * - * var values = _.memoize(_.values); - * values(object); - * // => [1, 2] - * - * values(other); - * // => [3, 4] + * function Foo() { + * this.b = 2; + * } * - * object.a = 2; - * values(object); - * // => [1, 2] + * Foo.prototype.c = 3; * - * // Modify the result cache. - * values.cache.set(object, ['a', 'b']); - * values(object); - * // => ['a', 'b'] + * _.assign({ 'a': 1 }, new Foo); + * // => { 'a': 1, 'b': 2 } * - * // Replace `_.memoize.Cache`. - * _.memoize.Cache = WeakMap; + * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); + * // => { 'a': 1, 'b': 2, 'c': 3 } */ - function memoize(func, resolver) { - if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) { - throw new TypeError(FUNC_ERROR_TEXT); - } - var memoized = function() { - var args = arguments, - key = resolver ? resolver.apply(this, args) : args[0], - cache = memoized.cache; - - if (cache.has(key)) { - return cache.get(key); - } - var result = func.apply(this, args); - memoized.cache = cache.set(key, result) || cache; - return result; - }; - memoized.cache = new (memoize.Cache || MapCache); - return memoized; + function toPlainObject(value) { + return copyObject(value, keysIn(value)); } - // Expose `MapCache`. - memoize.Cache = MapCache; - /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. + * Converts `value` to a safe integer. A safe integer can be compared and + * represented correctly. * * @static * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {number} Returns the converted integer. * @example * - * function isEven(n) { - * return n % 2 == 0; - * } + * _.toSafeInteger(3.2); + * // => 3 * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] + * _.toSafeInteger(Number.MIN_VALUE); + * // => 0 + * + * _.toSafeInteger(Infinity); + * // => 9007199254740991 + * + * _.toSafeInteger('3.2'); + * // => 3 */ - function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - switch (args.length) { - case 0: return !predicate.call(this); - case 1: return !predicate.call(this, args[0]); - case 2: return !predicate.call(this, args[0], args[1]); - case 3: return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; + function toSafeInteger(value) { + return value + ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) + : (value === 0 ? value : 0); } /** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. + * Converts `value` to a string. An empty string is returned for `null` + * and `undefined` values. The sign of `-0` is preserved. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. + * @since 4.0.0 + * @category Lang + * @param {*} value The value to convert. + * @returns {string} Returns the converted string. * @example * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once + * _.toString(null); + * // => '' + * + * _.toString(-0); + * // => '-0' + * + * _.toString([1, 2, 3]); + * // => '1,2,3' */ - function once(func) { - return before(2, func); + function toString(value) { + return value == null ? '' : baseToString(value); } + /*------------------------------------------------------------------------*/ + /** - * Creates a function that invokes `func` with its arguments transformed. + * Assigns own enumerable string keyed properties of source objects to the + * destination object. Source objects are applied from left to right. + * Subsequent sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object` and is loosely based on + * [`Object.assign`](https://mdn.io/Object/assign). * * @static - * @since 4.0.0 * @memberOf _ - * @category Function - * @param {Function} func The function to wrap. - * @param {...(Function|Function[])} [transforms=[_.identity]] - * The argument transforms. - * @returns {Function} Returns the new function. + * @since 0.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assignIn * @example * - * function doubled(n) { - * return n * 2; + * function Foo() { + * this.a = 1; * } * - * function square(n) { - * return n * n; + * function Bar() { + * this.c = 3; * } * - * var func = _.overArgs(function(x, y) { - * return [x, y]; - * }, [square, doubled]); - * - * func(9, 3); - * // => [81, 6] + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; * - * func(10, 5); - * // => [100, 10] + * _.assign({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'c': 3 } */ - var overArgs = castRest(function(func, transforms) { - transforms = (transforms.length == 1 && isArray(transforms[0])) - ? arrayMap(transforms[0], baseUnary(getIteratee())) - : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee())); - - var funcsLength = transforms.length; - return baseRest(function(args) { - var index = -1, - length = nativeMin(args.length, funcsLength); - - while (++index < length) { - args[index] = transforms[index].call(this, args[index]); + var assign = createAssigner(function(object, source) { + if (isPrototype(source) || isArrayLike(source)) { + copyObject(source, keys(source), object); + return; + } + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + assignValue(object, key, source[key]); } - return apply(func, this, args); - }); + } }); /** - * Creates a function that invokes `func` with `partials` prepended to the - * arguments it receives. This method is like `_.bind` except it does **not** - * alter the `this` binding. - * - * The `_.partial.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. + * This method is like `_.assign` except that it iterates over own and + * inherited source properties. * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 0.2.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @since 4.0.0 + * @alias extend + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.assign * @example * - * function greet(greeting, name) { - * return greeting + ' ' + name; + * function Foo() { + * this.a = 1; * } * - * var sayHelloTo = _.partial(greet, 'hello'); - * sayHelloTo('fred'); - * // => 'hello fred' + * function Bar() { + * this.c = 3; + * } * - * // Partially applied with placeholders. - * var greetFred = _.partial(greet, _, 'fred'); - * greetFred('hi'); - * // => 'hi fred' + * Foo.prototype.b = 2; + * Bar.prototype.d = 4; + * + * _.assignIn({ 'a': 0 }, new Foo, new Bar); + * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } */ - var partial = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partial)); - return createWrap(func, WRAP_PARTIAL_FLAG, undefined, partials, holders); + var assignIn = createAssigner(function(object, source) { + copyObject(source, keysIn(source), object); }); /** - * This method is like `_.partial` except that partially applied arguments - * are appended to the arguments it receives. - * - * The `_.partialRight.placeholder` value, which defaults to `_` in monolithic - * builds, may be used as a placeholder for partially applied arguments. + * This method is like `_.assignIn` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). * - * **Note:** This method doesn't set the "length" property of partially - * applied functions. + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 1.0.0 - * @category Function - * @param {Function} func The function to partially apply arguments to. - * @param {...*} [partials] The arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. + * @since 4.0.0 + * @alias extendWith + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignWith * @example * - * function greet(greeting, name) { - * return greeting + ' ' + name; + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; * } * - * var greetFred = _.partialRight(greet, 'fred'); - * greetFred('hi'); - * // => 'hi fred' + * var defaults = _.partialRight(_.assignInWith, customizer); * - * // Partially applied with placeholders. - * var sayHelloTo = _.partialRight(greet, 'hello', _); - * sayHelloTo('fred'); - * // => 'hello fred' + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - var partialRight = baseRest(function(func, partials) { - var holders = replaceHolders(partials, getHolder(partialRight)); - return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined, partials, holders); + var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keysIn(source), object, customizer); }); /** - * Creates a function that invokes `func` with arguments arranged according - * to the specified `indexes` where the argument value at the first index is - * provided as the first argument, the argument value at the second index is - * provided as the second argument, and so on. + * This method is like `_.assign` except that it accepts `customizer` + * which is invoked to produce the assigned values. If `customizer` returns + * `undefined`, assignment is handled by the method instead. The `customizer` + * is invoked with five arguments: (objValue, srcValue, key, object, source). + * + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} func The function to rearrange arguments for. - * @param {...(number|number[])} indexes The arranged argument indexes. - * @returns {Function} Returns the new function. + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. + * @see _.assignInWith * @example * - * var rearged = _.rearg(function(a, b, c) { - * return [a, b, c]; - * }, [2, 0, 1]); + * function customizer(objValue, srcValue) { + * return _.isUndefined(objValue) ? srcValue : objValue; + * } * - * rearged('b', 'c', 'a') - * // => ['a', 'b', 'c'] + * var defaults = _.partialRight(_.assignWith, customizer); + * + * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - var rearg = flatRest(function(func, indexes) { - return createWrap(func, WRAP_REARG_FLAG, undefined, undefined, undefined, indexes); + var assignWith = createAssigner(function(object, source, srcIndex, customizer) { + copyObject(source, keys(source), object, customizer); }); /** - * Creates a function that invokes `func` with the `this` binding of the - * created function and arguments from `start` and beyond provided as - * an array. - * - * **Note:** This method is based on the - * [rest parameter](https://mdn.io/rest_parameters). + * Creates an array of values corresponding to `paths` of `object`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to apply a rest parameter to. - * @param {number} [start=func.length-1] The start position of the rest parameter. - * @returns {Function} Returns the new function. + * @since 1.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Array} Returns the picked values. * @example * - * var say = _.rest(function(what, names) { - * return what + ' ' + _.initial(names).join(', ') + - * (_.size(names) > 1 ? ', & ' : '') + _.last(names); - * }); + * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; * - * say('hello', 'fred', 'barney', 'pebbles'); - * // => 'hello fred, barney, & pebbles' + * _.at(object, ['a[0].b.c', 'a[1]']); + * // => [3, 4] */ - function rest(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start === undefined ? start : toInteger(start); - return baseRest(func, start); - } + var at = flatRest(baseAt); /** - * Creates a function that invokes `func` with the `this` binding of the - * create function and an array of arguments much like - * [`Function#apply`](http://www.ecma-international.org/ecma-262/7.0/#sec-function.prototype.apply). - * - * **Note:** This method is based on the - * [spread operator](https://mdn.io/spread_operator). + * Creates an object that inherits from the `prototype` object. If a + * `properties` object is given, its own enumerable string keyed properties + * are assigned to the created object. * * @static * @memberOf _ - * @since 3.2.0 - * @category Function - * @param {Function} func The function to spread arguments over. - * @param {number} [start=0] The start position of the spread. - * @returns {Function} Returns the new function. + * @since 2.3.0 + * @category Object + * @param {Object} prototype The object to inherit from. + * @param {Object} [properties] The properties to assign to the object. + * @returns {Object} Returns the new object. * @example * - * var say = _.spread(function(who, what) { - * return who + ' says ' + what; - * }); + * function Shape() { + * this.x = 0; + * this.y = 0; + * } * - * say(['fred', 'hello']); - * // => 'fred says hello' + * function Circle() { + * Shape.call(this); + * } * - * var numbers = Promise.all([ - * Promise.resolve(40), - * Promise.resolve(36) - * ]); + * Circle.prototype = _.create(Shape.prototype, { + * 'constructor': Circle + * }); * - * numbers.then(_.spread(function(x, y) { - * return x + y; - * })); - * // => a Promise of 76 + * var circle = new Circle; + * circle instanceof Circle; + * // => true + * + * circle instanceof Shape; + * // => true */ - function spread(func, start) { - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - start = start == null ? 0 : nativeMax(toInteger(start), 0); - return baseRest(function(args) { - var array = args[start], - otherArgs = castSlice(args, 0, start); - - if (array) { - arrayPush(otherArgs, array); - } - return apply(func, this, otherArgs); - }); + function create(prototype, properties) { + var result = baseCreate(prototype); + return properties == null ? result : baseAssign(result, properties); } /** - * Creates a throttled function that only invokes `func` at most once per - * every `wait` milliseconds. The throttled function comes with a `cancel` - * method to cancel delayed `func` invocations and a `flush` method to - * immediately invoke them. Provide `options` to indicate whether `func` - * should be invoked on the leading and/or trailing edge of the `wait` - * timeout. The `func` is invoked with the last arguments provided to the - * throttled function. Subsequent calls to the throttled function return the - * result of the last `func` invocation. - * - * **Note:** If `leading` and `trailing` options are `true`, `func` is - * invoked on the trailing edge of the timeout only if the throttled function - * is invoked more than once during the `wait` timeout. - * - * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred - * until to the next tick, similar to `setTimeout` with a timeout of `0`. + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. * - * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/) - * for details over the differences between `_.throttle` and `_.debounce`. + * **Note:** This method mutates `object`. * * @static - * @memberOf _ * @since 0.1.0 - * @category Function - * @param {Function} func The function to throttle. - * @param {number} [wait=0] The number of milliseconds to throttle invocations to. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.leading=true] - * Specify invoking on the leading edge of the timeout. - * @param {boolean} [options.trailing=true] - * Specify invoking on the trailing edge of the timeout. - * @returns {Function} Returns the new throttled function. + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep * @example * - * // Avoid excessively updating the position while scrolling. - * jQuery(window).on('scroll', _.throttle(updatePosition, 100)); - * - * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes. - * var throttled = _.throttle(renewToken, 300000, { 'trailing': false }); - * jQuery(element).on('click', throttled); - * - * // Cancel the trailing throttled invocation. - * jQuery(window).on('popstate', throttled.cancel); + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } */ - function throttle(func, wait, options) { - var leading = true, - trailing = true; + var defaults = baseRest(function(object, sources) { + object = Object(object); - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; } - if (isObject(options)) { - leading = 'leading' in options ? !!options.leading : leading; - trailing = 'trailing' in options ? !!options.trailing : trailing; + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; + + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } } - return debounce(func, wait, { - 'leading': leading, - 'maxWait': wait, - 'trailing': trailing - }); - } + + return object; + }); /** - * Creates a function that accepts up to one argument, ignoring any - * additional arguments. + * This method is like `_.defaults` except that it recursively assigns + * default properties. + * + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Function - * @param {Function} func The function to cap arguments for. - * @returns {Function} Returns the new capped function. + * @since 3.10.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaults * @example * - * _.map(['6', '8', '10'], _.unary(parseInt)); - * // => [6, 8, 10] + * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); + * // => { 'a': { 'b': 2, 'c': 3 } } */ - function unary(func) { - return ary(func, 1); - } + var defaultsDeep = baseRest(function(args) { + args.push(undefined, customDefaultsMerge); + return apply(mergeWith, undefined, args); + }); /** - * Creates a function that provides `value` to `wrapper` as its first - * argument. Any additional arguments provided to the function are appended - * to those provided to the `wrapper`. The wrapper is invoked with the `this` - * binding of the created function. + * This method is like `_.find` except that it returns the key of the first + * element `predicate` returns truthy for instead of the element itself. * * @static * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {*} value The value to wrap. - * @param {Function} [wrapper=identity] The wrapper function. - * @returns {Function} Returns the new function. + * @since 1.1.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. * @example * - * var p = _.wrap(_.escape, function(func, text) { - * return '<p>' + func(text) + '</p>'; - * }); + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; * - * p('fred, barney, & pebbles'); - * // => '<p>fred, barney, & pebbles</p>' + * _.findKey(users, function(o) { return o.age < 40; }); + * // => 'barney' (iteration order is not guaranteed) + * + * // The `_.matches` iteratee shorthand. + * _.findKey(users, { 'age': 1, 'active': true }); + * // => 'pebbles' + * + * // The `_.matchesProperty` iteratee shorthand. + * _.findKey(users, ['active', false]); + * // => 'fred' + * + * // The `_.property` iteratee shorthand. + * _.findKey(users, 'active'); + * // => 'barney' */ - function wrap(value, wrapper) { - return partial(castFunction(wrapper), value); + function findKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); } - /*------------------------------------------------------------------------*/ - /** - * Casts `value` as an array if it's not one. + * This method is like `_.findKey` except that it iterates over elements of + * a collection in the opposite order. * * @static * @memberOf _ - * @since 4.4.0 - * @category Lang - * @param {*} value The value to inspect. - * @returns {Array} Returns the cast array. + * @since 2.0.0 + * @category Object + * @param {Object} object The object to inspect. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @returns {string|undefined} Returns the key of the matched element, + * else `undefined`. * @example * - * _.castArray(1); - * // => [1] - * - * _.castArray({ 'a': 1 }); - * // => [{ 'a': 1 }] - * - * _.castArray('abc'); - * // => ['abc'] + * var users = { + * 'barney': { 'age': 36, 'active': true }, + * 'fred': { 'age': 40, 'active': false }, + * 'pebbles': { 'age': 1, 'active': true } + * }; * - * _.castArray(null); - * // => [null] + * _.findLastKey(users, function(o) { return o.age < 40; }); + * // => returns 'pebbles' assuming `_.findKey` returns 'barney' * - * _.castArray(undefined); - * // => [undefined] + * // The `_.matches` iteratee shorthand. + * _.findLastKey(users, { 'age': 36, 'active': true }); + * // => 'barney' * - * _.castArray(); - * // => [] + * // The `_.matchesProperty` iteratee shorthand. + * _.findLastKey(users, ['active', false]); + * // => 'fred' * - * var array = [1, 2, 3]; - * console.log(_.castArray(array) === array); - * // => true + * // The `_.property` iteratee shorthand. + * _.findLastKey(users, 'active'); + * // => 'pebbles' */ - function castArray() { - if (!arguments.length) { - return []; - } - var value = arguments[0]; - return isArray(value) ? value : [value]; + function findLastKey(object, predicate) { + return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); } /** - * Creates a shallow clone of `value`. - * - * **Note:** This method is loosely based on the - * [structured clone algorithm](https://mdn.io/Structured_clone_algorithm) - * and supports cloning arrays, array buffers, booleans, date objects, maps, - * numbers, `Object` objects, regexes, sets, strings, symbols, and typed - * arrays. The own enumerable properties of `arguments` objects are cloned - * as plain objects. An empty object is returned for uncloneable values such - * as error objects, functions, DOM nodes, and WeakMaps. + * Iterates over own and inherited enumerable string keyed properties of an + * object and invokes `iteratee` for each property. The iteratee is invoked + * with three arguments: (value, key, object). Iteratee functions may exit + * iteration early by explicitly returning `false`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to clone. - * @returns {*} Returns the cloned value. - * @see _.cloneDeep + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forInRight * @example * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * var shallow = _.clone(objects); - * console.log(shallow[0] === objects[0]); - * // => true + * Foo.prototype.c = 3; + * + * _.forIn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). */ - function clone(value) { - return baseClone(value, CLONE_SYMBOLS_FLAG); + function forIn(object, iteratee) { + return object == null + ? object + : baseFor(object, getIteratee(iteratee, 3), keysIn); } /** - * This method is like `_.clone` except that it accepts `customizer` which - * is invoked to produce the cloned value. If `customizer` returns `undefined`, - * cloning is handled by the method instead. The `customizer` is invoked with - * up to four arguments; (value [, index|key, object, stack]). + * This method is like `_.forIn` except that it iterates over properties of + * `object` in the opposite order. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the cloned value. - * @see _.cloneDeepWith + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forIn * @example * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(false); - * } + * function Foo() { + * this.a = 1; + * this.b = 2; * } * - * var el = _.cloneWith(document.body, customizer); + * Foo.prototype.c = 3; * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 0 + * _.forInRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. */ - function cloneWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_SYMBOLS_FLAG, customizer); + function forInRight(object, iteratee) { + return object == null + ? object + : baseForRight(object, getIteratee(iteratee, 3), keysIn); } /** - * This method is like `_.clone` except that it recursively clones `value`. + * Iterates over own enumerable string keyed properties of an object and + * invokes `iteratee` for each property. The iteratee is invoked with three + * arguments: (value, key, object). Iteratee functions may exit iteration + * early by explicitly returning `false`. * * @static * @memberOf _ - * @since 1.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @returns {*} Returns the deep cloned value. - * @see _.clone + * @since 0.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwnRight * @example * - * var objects = [{ 'a': 1 }, { 'b': 2 }]; + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * var deep = _.cloneDeep(objects); - * console.log(deep[0] === objects[0]); - * // => false + * Foo.prototype.c = 3; + * + * _.forOwn(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'a' then 'b' (iteration order is not guaranteed). */ - function cloneDeep(value) { - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG); + function forOwn(object, iteratee) { + return object && baseForOwn(object, getIteratee(iteratee, 3)); } /** - * This method is like `_.cloneWith` except that it recursively clones `value`. + * This method is like `_.forOwn` except that it iterates over properties of + * `object` in the opposite order. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to recursively clone. - * @param {Function} [customizer] The function to customize cloning. - * @returns {*} Returns the deep cloned value. - * @see _.cloneWith + * @since 2.0.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns `object`. + * @see _.forOwn * @example * - * function customizer(value) { - * if (_.isElement(value)) { - * return value.cloneNode(true); - * } + * function Foo() { + * this.a = 1; + * this.b = 2; * } * - * var el = _.cloneDeepWith(document.body, customizer); + * Foo.prototype.c = 3; * - * console.log(el === document.body); - * // => false - * console.log(el.nodeName); - * // => 'BODY' - * console.log(el.childNodes.length); - * // => 20 + * _.forOwnRight(new Foo, function(value, key) { + * console.log(key); + * }); + * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. */ - function cloneDeepWith(value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer); + function forOwnRight(object, iteratee) { + return object && baseForOwnRight(object, getIteratee(iteratee, 3)); } /** - * Checks if `object` conforms to `source` by invoking the predicate - * properties of `source` with the corresponding property values of `object`. - * - * **Note:** This method is equivalent to `_.conforms` when `source` is - * partially applied. + * Creates an array of function property names from own enumerable properties + * of `object`. * * @static + * @since 0.1.0 * @memberOf _ - * @since 4.14.0 - * @category Lang + * @category Object * @param {Object} object The object to inspect. - * @param {Object} source The object of property predicates to conform to. - * @returns {boolean} Returns `true` if `object` conforms, else `false`. + * @returns {Array} Returns the function names. + * @see _.functionsIn * @example * - * var object = { 'a': 1, 'b': 2 }; + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } * - * _.conformsTo(object, { 'b': function(n) { return n > 1; } }); - * // => true + * Foo.prototype.c = _.constant('c'); * - * _.conformsTo(object, { 'b': function(n) { return n > 2; } }); - * // => false + * _.functions(new Foo); + * // => ['a', 'b'] */ - function conformsTo(object, source) { - return source == null || baseConformsTo(object, source, keys(source)); + function functions(object) { + return object == null ? [] : baseFunctions(object, keys(object)); } /** - * Performs a - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * comparison between two values to determine if they are equivalent. + * Creates an array of function property names from own and inherited + * enumerable properties of `object`. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @category Object + * @param {Object} object The object to inspect. + * @returns {Array} Returns the function names. + * @see _.functions * @example * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; + * function Foo() { + * this.a = _.constant('a'); + * this.b = _.constant('b'); + * } * - * _.eq(object, object); - * // => true + * Foo.prototype.c = _.constant('c'); * - * _.eq(object, other); - * // => false + * _.functionsIn(new Foo); + * // => ['a', 'b', 'c'] + */ + function functionsIn(object) { + return object == null ? [] : baseFunctions(object, keysIn(object)); + } + + /** + * Gets the value at `path` of `object`. If the resolved value is + * `undefined`, the `defaultValue` is returned in its place. * - * _.eq('a', 'a'); - * // => true + * @static + * @memberOf _ + * @since 3.7.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to get. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. + * @example * - * _.eq('a', Object('a')); - * // => false + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * - * _.eq(NaN, NaN); - * // => true + * _.get(object, 'a[0].b.c'); + * // => 3 + * + * _.get(object, ['a', '0', 'b', 'c']); + * // => 3 + * + * _.get(object, 'a.b.c', 'default'); + * // => 'default' */ - function eq(value, other) { - return value === other || (value !== value && other !== other); + function get(object, path, defaultValue) { + var result = object == null ? undefined : baseGet(object, path); + return result === undefined ? defaultValue : result; } /** - * Checks if `value` is greater than `other`. + * Checks if `path` is a direct property of `object`. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. - * @see _.lt + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * - * _.gt(3, 1); + * var object = { 'a': { 'b': 2 } }; + * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.has(object, 'a'); * // => true * - * _.gt(3, 3); - * // => false + * _.has(object, 'a.b'); + * // => true * - * _.gt(1, 3); + * _.has(object, ['a', 'b']); + * // => true + * + * _.has(other, 'a'); * // => false */ - var gt = createRelationalOperation(baseGt); + function has(object, path) { + return object != null && hasPath(object, path, baseHas); + } /** - * Checks if `value` is greater than or equal to `other`. + * Checks if `path` is a direct or inherited property of `object`. * * @static * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than or equal to - * `other`, else `false`. - * @see _.lte + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path to check. + * @returns {boolean} Returns `true` if `path` exists, else `false`. * @example * - * _.gte(3, 1); + * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * + * _.hasIn(object, 'a'); * // => true * - * _.gte(3, 3); + * _.hasIn(object, 'a.b'); * // => true * - * _.gte(1, 3); + * _.hasIn(object, ['a', 'b']); + * // => true + * + * _.hasIn(object, 'b'); * // => false */ - var gte = createRelationalOperation(function(value, other) { - return value >= other; - }); + function hasIn(object, path) { + return object != null && hasPath(object, path, baseHasIn); + } /** - * Checks if `value` is likely an `arguments` object. + * Creates an object composed of the inverted keys and values of `object`. + * If `object` contains duplicate values, subsequent values overwrite + * property assignments of previous values. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an `arguments` object, - * else `false`. + * @since 0.7.0 + * @category Object + * @param {Object} object The object to invert. + * @returns {Object} Returns the new inverted object. * @example * - * _.isArguments(function() { return arguments; }()); - * // => true + * var object = { 'a': 1, 'b': 2, 'c': 1 }; * - * _.isArguments([1, 2, 3]); - * // => false + * _.invert(object); + * // => { '1': 'c', '2': 'b' } */ - var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { - return isObjectLike(value) && hasOwnProperty.call(value, 'callee') && - !propertyIsEnumerable.call(value, 'callee'); - }; + var invert = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + result[value] = key; + }, constant(identity)); /** - * Checks if `value` is classified as an `Array` object. + * This method is like `_.invert` except that the inverted object is generated + * from the results of running each element of `object` thru `iteratee`. The + * corresponding inverted value of each inverted key is an array of keys + * responsible for generating the inverted value. The iteratee is invoked + * with one argument: (value). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array, else `false`. + * @since 4.1.0 + * @category Object + * @param {Object} object The object to invert. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {Object} Returns the new inverted object. * @example * - * _.isArray([1, 2, 3]); - * // => true - * - * _.isArray(document.body.children); - * // => false + * var object = { 'a': 1, 'b': 2, 'c': 1 }; * - * _.isArray('abc'); - * // => false + * _.invertBy(object); + * // => { '1': ['a', 'c'], '2': ['b'] } * - * _.isArray(_.noop); - * // => false + * _.invertBy(object, function(value) { + * return 'group' + value; + * }); + * // => { 'group1': ['a', 'c'], 'group2': ['b'] } */ - var isArray = Array.isArray; + var invertBy = createInverter(function(result, value, key) { + if (value != null && + typeof value.toString != 'function') { + value = nativeObjectToString.call(value); + } + + if (hasOwnProperty.call(result, value)) { + result[value].push(key); + } else { + result[value] = [key]; + } + }, getIteratee); /** - * Checks if `value` is classified as an `ArrayBuffer` object. + * Invokes the method at `path` of `object`. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array buffer, else `false`. + * @since 4.0.0 + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the method to invoke. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {*} Returns the result of the invoked method. * @example * - * _.isArrayBuffer(new ArrayBuffer(2)); - * // => true + * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; * - * _.isArrayBuffer(new Array(2)); - * // => false + * _.invoke(object, 'a[0].b.c.slice', 1, 3); + * // => [2, 3] */ - var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer; + var invoke = baseRest(baseInvoke); /** - * Checks if `value` is array-like. A value is considered array-like if it's - * not a function and has a `value.length` that's an integer greater than or - * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * Creates an array of the own enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. See the + * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) + * for more details. * * @static + * @since 0.1.0 * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. * @example * - * _.isArrayLike([1, 2, 3]); - * // => true + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * _.isArrayLike(document.body.children); - * // => true + * Foo.prototype.c = 3; * - * _.isArrayLike('abc'); - * // => true + * _.keys(new Foo); + * // => ['a', 'b'] (iteration order is not guaranteed) * - * _.isArrayLike(_.noop); - * // => false + * _.keys('hi'); + * // => ['0', '1'] */ - function isArrayLike(value) { - return value != null && isLength(value.length) && !isFunction(value); + function keys(object) { + return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } /** - * This method is like `_.isArrayLike` except that it also checks if `value` - * is an object. + * Creates an array of the own and inherited enumerable property names of `object`. + * + * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an array-like object, - * else `false`. + * @since 3.0.0 + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property names. * @example * - * _.isArrayLikeObject([1, 2, 3]); - * // => true - * - * _.isArrayLikeObject(document.body.children); - * // => true + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * _.isArrayLikeObject('abc'); - * // => false + * Foo.prototype.c = 3; * - * _.isArrayLikeObject(_.noop); - * // => false + * _.keysIn(new Foo); + * // => ['a', 'b', 'c'] (iteration order is not guaranteed) */ - function isArrayLikeObject(value) { - return isObjectLike(value) && isArrayLike(value); + function keysIn(object) { + return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); } /** - * Checks if `value` is classified as a boolean primitive or object. + * The opposite of `_.mapValues`; this method creates an object with the + * same values as `object` and keys generated by running each own enumerable + * string keyed property of `object` thru `iteratee`. The iteratee is invoked + * with three arguments: (value, key, object). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a boolean, else `false`. + * @since 3.8.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapValues * @example * - * _.isBoolean(false); - * // => true - * - * _.isBoolean(null); - * // => false + * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { + * return key + value; + * }); + * // => { 'a1': 1, 'b2': 2 } */ - function isBoolean(value) { - return value === true || value === false || - (isObjectLike(value) && baseGetTag(value) == boolTag); + function mapKeys(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, iteratee(value, key, object), value); + }); + return result; } /** - * Checks if `value` is a buffer. + * Creates an object with the same keys as `object` and values generated + * by running each own enumerable string keyed property of `object` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, key, object). * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a buffer, else `false`. + * @since 2.4.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Object} Returns the new mapped object. + * @see _.mapKeys * @example * - * _.isBuffer(new Buffer(2)); - * // => true + * var users = { + * 'fred': { 'user': 'fred', 'age': 40 }, + * 'pebbles': { 'user': 'pebbles', 'age': 1 } + * }; * - * _.isBuffer(new Uint8Array(2)); - * // => false + * _.mapValues(users, function(o) { return o.age; }); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * + * // The `_.property` iteratee shorthand. + * _.mapValues(users, 'age'); + * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) */ - var isBuffer = nativeIsBuffer || stubFalse; + function mapValues(object, iteratee) { + var result = {}; + iteratee = getIteratee(iteratee, 3); + + baseForOwn(object, function(value, key, object) { + baseAssignValue(result, key, iteratee(value, key, object)); + }); + return result; + } /** - * Checks if `value` is classified as a `Date` object. + * This method is like `_.assign` except that it recursively merges own and + * inherited enumerable string keyed properties of source objects into the + * destination object. Source properties that resolve to `undefined` are + * skipped if a destination value exists. Array and plain object properties + * are merged recursively. Other objects and value types are overridden by + * assignment. Source objects are applied from left to right. Subsequent + * sources overwrite property assignments of previous sources. + * + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a date object, else `false`. + * @since 0.5.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. * @example * - * _.isDate(new Date); - * // => true + * var object = { + * 'a': [{ 'b': 2 }, { 'd': 4 }] + * }; * - * _.isDate('Mon April 23 2012'); - * // => false + * var other = { + * 'a': [{ 'c': 3 }, { 'e': 5 }] + * }; + * + * _.merge(object, other); + * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } */ - var isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate; + var merge = createAssigner(function(object, source, srcIndex) { + baseMerge(object, source, srcIndex); + }); /** - * Checks if `value` is likely a DOM element. + * This method is like `_.merge` except that it accepts `customizer` which + * is invoked to produce the merged values of the destination and source + * properties. If `customizer` returns `undefined`, merging is handled by the + * method instead. The `customizer` is invoked with six arguments: + * (objValue, srcValue, key, object, source, stack). + * + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a DOM element, else `false`. + * @since 4.0.0 + * @category Object + * @param {Object} object The destination object. + * @param {...Object} sources The source objects. + * @param {Function} customizer The function to customize assigned values. + * @returns {Object} Returns `object`. * @example * - * _.isElement(document.body); - * // => true + * function customizer(objValue, srcValue) { + * if (_.isArray(objValue)) { + * return objValue.concat(srcValue); + * } + * } * - * _.isElement('<body>'); - * // => false + * var object = { 'a': [1], 'b': [2] }; + * var other = { 'a': [3], 'b': [4] }; + * + * _.mergeWith(object, other, customizer); + * // => { 'a': [1, 3], 'b': [2, 4] } */ - function isElement(value) { - return isObjectLike(value) && value.nodeType === 1 && !isPlainObject(value); - } + var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { + baseMerge(object, source, srcIndex, customizer); + }); /** - * Checks if `value` is an empty object, collection, map, or set. - * - * Objects are considered empty if they have no own enumerable string keyed - * properties. + * The opposite of `_.pick`; this method creates an object composed of the + * own and inherited enumerable property paths of `object` that are not omitted. * - * Array-like values such as `arguments` objects, arrays, buffers, strings, or - * jQuery-like collections are considered empty if they have a `length` of `0`. - * Similarly, maps and sets are considered empty if they have a `size` of `0`. + * **Note:** This method is considerably slower than `_.pick`. * * @static - * @memberOf _ * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is empty, else `false`. + * @memberOf _ + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to omit. + * @returns {Object} Returns the new object. * @example * - * _.isEmpty(null); - * // => true - * - * _.isEmpty(true); - * // => true - * - * _.isEmpty(1); - * // => true - * - * _.isEmpty([1, 2, 3]); - * // => false + * var object = { 'a': 1, 'b': '2', 'c': 3 }; * - * _.isEmpty({ 'a': 1 }); - * // => false + * _.omit(object, ['a', 'c']); + * // => { 'b': '2' } */ - function isEmpty(value) { - if (value == null) { - return true; - } - if (isArrayLike(value) && - (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' || - isBuffer(value) || isTypedArray(value) || isArguments(value))) { - return !value.length; - } - var tag = getTag(value); - if (tag == mapTag || tag == setTag) { - return !value.size; + var omit = flatRest(function(object, paths) { + var result = {}; + if (object == null) { + return result; } - if (isPrototype(value)) { - return !baseKeys(value).length; + var isDeep = false; + paths = arrayMap(paths, function(path) { + path = castPath(path, object); + isDeep || (isDeep = path.length > 1); + return path; + }); + copyObject(object, getAllKeysIn(object), result); + if (isDeep) { + result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); } - for (var key in value) { - if (hasOwnProperty.call(value, key)) { - return false; - } + var length = paths.length; + while (length--) { + baseUnset(result, paths[length]); } - return true; - } + return result; + }); /** - * Performs a deep comparison between two values to determine if they are - * equivalent. - * - * **Note:** This method supports comparing arrays, array buffers, booleans, - * date objects, error objects, maps, numbers, `Object` objects, regexes, - * sets, strings, symbols, and typed arrays. `Object` objects are compared - * by their own, not inherited, enumerable properties. Functions and DOM - * nodes are compared by strict equality, i.e. `===`. + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. * @example * - * var object = { 'a': 1 }; - * var other = { 'a': 1 }; - * - * _.isEqual(object, other); - * // => true + * var object = { 'a': 1, 'b': '2', 'c': 3 }; * - * object === other; - * // => false + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } */ - function isEqual(value, other) { - return baseIsEqual(value, other); + function omitBy(object, predicate) { + return pickBy(object, negate(getIteratee(predicate))); } /** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * Creates an object composed of the picked `object` properties. * * @static + * @since 0.1.0 * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @category Object + * @param {Object} object The source object. + * @param {...(string|string[])} [paths] The property paths to pick. + * @returns {Object} Returns the new object. * @example * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } + * var object = { 'a': 1, 'b': '2', 'c': 3 }; * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true + * _.pick(object, ['a', 'c']); + * // => { 'a': 1, 'c': 3 } */ - function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; - } + var pick = flatRest(function(object, paths) { + return object == null ? {} : basePick(object, paths); + }); /** - * Checks if `value` is an `Error`, `EvalError`, `RangeError`, `ReferenceError`, - * `SyntaxError`, `TypeError`, or `URIError` object. + * Creates an object composed of the `object` properties `predicate` returns + * truthy for. The predicate is invoked with two arguments: (value, key). * * @static * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an error object, else `false`. + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. * @example * - * _.isError(new Error); - * // => true + * var object = { 'a': 1, 'b': '2', 'c': 3 }; * - * _.isError(Error); - * // => false + * _.pickBy(object, _.isNumber); + * // => { 'a': 1, 'c': 3 } */ - function isError(value) { - if (!isObjectLike(value)) { - return false; + function pickBy(object, predicate) { + if (object == null) { + return {}; } - var tag = baseGetTag(value); - return tag == errorTag || tag == domExcTag || - (typeof value.message == 'string' && typeof value.name == 'string' && !isPlainObject(value)); + var props = arrayMap(getAllKeysIn(object), function(prop) { + return [prop]; + }); + predicate = getIteratee(predicate); + return basePickBy(object, props, function(value, path) { + return predicate(value, path[0]); + }); } /** - * Checks if `value` is a finite primitive number. - * - * **Note:** This method is based on - * [`Number.isFinite`](https://mdn.io/Number/isFinite). + * This method is like `_.get` except that if the resolved value is a + * function it's invoked with the `this` binding of its parent object and + * its result is returned. * * @static - * @memberOf _ * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a finite number, else `false`. + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @param {Array|string} path The path of the property to resolve. + * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @returns {*} Returns the resolved value. * @example * - * _.isFinite(3); - * // => true + * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; * - * _.isFinite(Number.MIN_VALUE); - * // => true + * _.result(object, 'a[0].b.c1'); + * // => 3 * - * _.isFinite(Infinity); - * // => false + * _.result(object, 'a[0].b.c2'); + * // => 4 * - * _.isFinite('3'); - * // => false + * _.result(object, 'a[0].b.c3', 'default'); + * // => 'default' + * + * _.result(object, 'a[0].b.c3', _.constant('default')); + * // => 'default' */ - function isFinite(value) { - return typeof value == 'number' && nativeIsFinite(value); + function result(object, path, defaultValue) { + path = castPath(path, object); + + var index = -1, + length = path.length; + + // Ensure the loop is entered when path is empty. + if (!length) { + length = 1; + object = undefined; + } + while (++index < length) { + var value = object == null ? undefined : object[toKey(path[index])]; + if (value === undefined) { + index = length; + value = defaultValue; + } + object = isFunction(value) ? value.call(object) : value; + } + return object; } /** - * Checks if `value` is classified as a `Function` object. + * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, + * it's created. Arrays are created for missing index properties while objects + * are created for all other missing properties. Use `_.setWith` to customize + * `path` creation. + * + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a function, else `false`. + * @since 3.7.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @returns {Object} Returns `object`. * @example * - * _.isFunction(_); - * // => true + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * - * _.isFunction(/abc/); - * // => false + * _.set(object, 'a[0].b.c', 4); + * console.log(object.a[0].b.c); + * // => 4 + * + * _.set(object, ['x', '0', 'y', 'z'], 5); + * console.log(object.x[0].y.z); + * // => 5 */ - function isFunction(value) { - if (!isObject(value)) { - return false; - } - // The use of `Object#toString` avoids issues with the `typeof` operator - // in Safari 9 which returns 'object' for typed arrays and other constructors. - var tag = baseGetTag(value); - return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag; + function set(object, path, value) { + return object == null ? object : baseSet(object, path, value); } /** - * Checks if `value` is an integer. + * This method is like `_.set` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). * - * **Note:** This method is based on - * [`Number.isInteger`](https://mdn.io/Number/isInteger). + * **Note:** This method mutates `object`. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an integer, else `false`. + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {*} value The value to set. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. * @example * - * _.isInteger(3); - * // => true - * - * _.isInteger(Number.MIN_VALUE); - * // => false - * - * _.isInteger(Infinity); - * // => false + * var object = {}; * - * _.isInteger('3'); - * // => false + * _.setWith(object, '[0][1]', 'a', Object); + * // => { '0': { '1': 'a' } } */ - function isInteger(value) { - return typeof value == 'number' && value == toInteger(value); + function setWith(object, path, value, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + return object == null ? object : baseSet(object, path, value, customizer); } /** - * Checks if `value` is a valid array-like length. - * - * **Note:** This method is loosely based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * Creates an array of own enumerable string keyed-value pairs for `object` + * which can be consumed by `_.fromPairs`. If `object` is a map or set, its + * entries are returned. * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a valid length, else `false`. + * @alias entries + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. * @example * - * _.isLength(3); - * // => true - * - * _.isLength(Number.MIN_VALUE); - * // => false + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * _.isLength(Infinity); - * // => false + * Foo.prototype.c = 3; * - * _.isLength('3'); - * // => false + * _.toPairs(new Foo); + * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) */ - function isLength(value) { - return typeof value == 'number' && - value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER; - } + var toPairs = createToPairs(keys); /** - * Checks if `value` is the - * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) - * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * Creates an array of own and inherited enumerable string keyed-value pairs + * for `object` which can be consumed by `_.fromPairs`. If `object` is a map + * or set, its entries are returned. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @since 4.0.0 + * @alias entriesIn + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the key-value pairs. * @example * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * _.isObject(_.noop); - * // => true + * Foo.prototype.c = 3; * - * _.isObject(null); - * // => false + * _.toPairsIn(new Foo); + * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) */ - function isObject(value) { - var type = typeof value; - return value != null && (type == 'object' || type == 'function'); - } + var toPairsIn = createToPairs(keysIn); /** - * Checks if `value` is object-like. A value is object-like if it's not `null` - * and has a `typeof` result of "object". + * An alternative to `_.reduce`; this method transforms `object` to a new + * `accumulator` object which is the result of running each of its own + * enumerable string keyed properties thru `iteratee`, with each invocation + * potentially mutating the `accumulator` object. If `accumulator` is not + * provided, a new object with the same `[[Prototype]]` will be used. The + * iteratee is invoked with four arguments: (accumulator, value, key, object). + * Iteratee functions may exit iteration early by explicitly returning `false`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @since 1.3.0 + * @category Object + * @param {Object} object The object to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @param {*} [accumulator] The custom accumulator value. + * @returns {*} Returns the accumulated value. * @example * - * _.isObjectLike({}); - * // => true - * - * _.isObjectLike([1, 2, 3]); - * // => true - * - * _.isObjectLike(_.noop); - * // => false + * _.transform([2, 3, 4], function(result, n) { + * result.push(n *= n); + * return n % 2 == 0; + * }, []); + * // => [4, 9] * - * _.isObjectLike(null); - * // => false + * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { + * (result[value] || (result[value] = [])).push(key); + * }, {}); + * // => { '1': ['a', 'c'], '2': ['b'] } */ - function isObjectLike(value) { - return value != null && typeof value == 'object'; + function transform(object, iteratee, accumulator) { + var isArr = isArray(object), + isArrLike = isArr || isBuffer(object) || isTypedArray(object); + + iteratee = getIteratee(iteratee, 4); + if (accumulator == null) { + var Ctor = object && object.constructor; + if (isArrLike) { + accumulator = isArr ? new Ctor : []; + } + else if (isObject(object)) { + accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; + } + else { + accumulator = {}; + } + } + (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { + return iteratee(accumulator, value, index, object); + }); + return accumulator; } /** - * Checks if `value` is classified as a `Map` object. + * Removes the property at `path` of `object`. + * + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a map, else `false`. + * @since 4.0.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to unset. + * @returns {boolean} Returns `true` if the property is deleted, else `false`. * @example * - * _.isMap(new Map); + * var object = { 'a': [{ 'b': { 'c': 7 } }] }; + * _.unset(object, 'a[0].b.c'); * // => true * - * _.isMap(new WeakMap); - * // => false + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; + * + * _.unset(object, ['a', '0', 'b', 'c']); + * // => true + * + * console.log(object); + * // => { 'a': [{ 'b': {} }] }; */ - var isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap; + function unset(object, path) { + return object == null ? true : baseUnset(object, path); + } /** - * Performs a partial deep comparison between `object` and `source` to - * determine if `object` contains equivalent property values. - * - * **Note:** This method is equivalent to `_.matches` when `source` is - * partially applied. + * This method is like `_.set` except that accepts `updater` to produce the + * value to set. Use `_.updateWith` to customize `path` creation. The `updater` + * is invoked with one argument: (value). * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @returns {Object} Returns `object`. * @example * - * var object = { 'a': 1, 'b': 2 }; + * var object = { 'a': [{ 'b': { 'c': 3 } }] }; * - * _.isMatch(object, { 'b': 2 }); - * // => true + * _.update(object, 'a[0].b.c', function(n) { return n * n; }); + * console.log(object.a[0].b.c); + * // => 9 * - * _.isMatch(object, { 'b': 1 }); - * // => false + * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); + * console.log(object.x[0].y.z); + * // => 0 */ - function isMatch(object, source) { - return object === source || baseIsMatch(object, source, getMatchData(source)); + function update(object, path, updater) { + return object == null ? object : baseUpdate(object, path, castFunction(updater)); } /** - * This method is like `_.isMatch` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with five - * arguments: (objValue, srcValue, index|key, object, source). + * This method is like `_.update` except that it accepts `customizer` which is + * invoked to produce the objects of `path`. If `customizer` returns `undefined` + * path creation is handled by the method instead. The `customizer` is invoked + * with three arguments: (nsValue, key, nsObject). + * + * **Note:** This method mutates `object`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {Object} object The object to inspect. - * @param {Object} source The object of property values to match. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if `object` is a match, else `false`. + * @since 4.6.0 + * @category Object + * @param {Object} object The object to modify. + * @param {Array|string} path The path of the property to set. + * @param {Function} updater The function to produce the updated value. + * @param {Function} [customizer] The function to customize assigned values. + * @returns {Object} Returns `object`. * @example * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, srcValue) { - * if (isGreeting(objValue) && isGreeting(srcValue)) { - * return true; - * } - * } - * - * var object = { 'greeting': 'hello' }; - * var source = { 'greeting': 'hi' }; + * var object = {}; * - * _.isMatchWith(object, source, customizer); - * // => true + * _.updateWith(object, '[0][1]', _.constant('a'), Object); + * // => { '0': { '1': 'a' } } */ - function isMatchWith(object, source, customizer) { + function updateWith(object, path, updater, customizer) { customizer = typeof customizer == 'function' ? customizer : undefined; - return baseIsMatch(object, source, getMatchData(source), customizer); + return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); } /** - * Checks if `value` is `NaN`. + * Creates an array of the own enumerable string keyed property values of `object`. * - * **Note:** This method is based on - * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as - * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for - * `undefined` and other non-number values. + * **Note:** Non-object values are coerced to objects. * * @static - * @memberOf _ * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`. + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. * @example * - * _.isNaN(NaN); - * // => true + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * _.isNaN(new Number(NaN)); - * // => true + * Foo.prototype.c = 3; * - * isNaN(undefined); - * // => true + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) * - * _.isNaN(undefined); - * // => false + * _.values('hi'); + * // => ['h', 'i'] */ - function isNaN(value) { - // An `NaN` primitive is the only value that is not equal to itself. - // Perform the `toStringTag` check first to avoid errors with some - // ActiveX objects in IE. - return isNumber(value) && value != +value; + function values(object) { + return object == null ? [] : baseValues(object, keys(object)); } /** - * Checks if `value` is a pristine native function. + * Creates an array of the own and inherited enumerable string keyed property + * values of `object`. * - * **Note:** This method can't reliably detect native functions in the presence - * of the core-js package because core-js circumvents this kind of detection. - * Despite multiple requests, the core-js maintainer has made it clear: any - * attempt to fix the detection will be obstructed. As a result, we're left - * with little choice but to throw an error. Unfortunately, this also affects - * packages, like [babel-polyfill](https://www.npmjs.com/package/babel-polyfill), - * which rely on core-js. + * **Note:** Non-object values are coerced to objects. * * @static * @memberOf _ * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a native function, - * else `false`. + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. * @example * - * _.isNative(Array.prototype.push); - * // => true + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * _.isNative(_); - * // => false + * Foo.prototype.c = 3; + * + * _.valuesIn(new Foo); + * // => [1, 2, 3] (iteration order is not guaranteed) */ - function isNative(value) { - if (isMaskable(value)) { - throw new Error(CORE_ERROR_TEXT); - } - return baseIsNative(value); + function valuesIn(object) { + return object == null ? [] : baseValues(object, keysIn(object)); } + /*------------------------------------------------------------------------*/ + /** - * Checks if `value` is `null`. + * Clamps `number` within the inclusive `lower` and `upper` bounds. * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `null`, else `false`. + * @since 4.0.0 + * @category Number + * @param {number} number The number to clamp. + * @param {number} [lower] The lower bound. + * @param {number} upper The upper bound. + * @returns {number} Returns the clamped number. * @example * - * _.isNull(null); - * // => true + * _.clamp(-10, -5, 5); + * // => -5 * - * _.isNull(void 0); - * // => false + * _.clamp(10, -5, 5); + * // => 5 */ - function isNull(value) { - return value === null; + function clamp(number, lower, upper) { + if (upper === undefined) { + upper = lower; + lower = undefined; + } + if (upper !== undefined) { + upper = toNumber(upper); + upper = upper === upper ? upper : 0; + } + if (lower !== undefined) { + lower = toNumber(lower); + lower = lower === lower ? lower : 0; + } + return baseClamp(toNumber(number), lower, upper); } /** - * Checks if `value` is `null` or `undefined`. + * Checks if `n` is between `start` and up to, but not including, `end`. If + * `end` is not specified, it's set to `start` with `start` then set to `0`. + * If `start` is greater than `end` the params are swapped to support + * negative ranges. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is nullish, else `false`. + * @since 3.3.0 + * @category Number + * @param {number} number The number to check. + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @returns {boolean} Returns `true` if `number` is in the range, else `false`. + * @see _.range, _.rangeRight * @example * - * _.isNil(null); + * _.inRange(3, 2, 4); * // => true * - * _.isNil(void 0); + * _.inRange(4, 8); * // => true * - * _.isNil(NaN); + * _.inRange(4, 2); * // => false - */ - function isNil(value) { - return value == null; - } - - /** - * Checks if `value` is classified as a `Number` primitive or object. - * - * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are - * classified as numbers, use the `_.isFinite` method. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a number, else `false`. - * @example + * _.inRange(2, 2); + * // => false * - * _.isNumber(3); + * _.inRange(1.2, 2); * // => true * - * _.isNumber(Number.MIN_VALUE); - * // => true + * _.inRange(5.2, 4); + * // => false * - * _.isNumber(Infinity); + * _.inRange(-3, -2, -6); * // => true - * - * _.isNumber('3'); - * // => false */ - function isNumber(value) { - return typeof value == 'number' || - (isObjectLike(value) && baseGetTag(value) == numberTag); + function inRange(number, start, end) { + start = toFinite(start); + if (end === undefined) { + end = start; + start = 0; + } else { + end = toFinite(end); + } + number = toNumber(number); + return baseInRange(number, start, end); } /** - * Checks if `value` is a plain object, that is, an object created by the - * `Object` constructor or one with a `[[Prototype]]` of `null`. + * Produces a random number between the inclusive `lower` and `upper` bounds. + * If only one argument is provided a number between `0` and the given number + * is returned. If `floating` is `true`, or either `lower` or `upper` are + * floats, a floating-point number is returned instead of an integer. + * + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. * * @static * @memberOf _ - * @since 0.8.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a plain object, else `false`. + * @since 0.7.0 + * @category Number + * @param {number} [lower=0] The lower bound. + * @param {number} [upper=1] The upper bound. + * @param {boolean} [floating] Specify returning a floating-point number. + * @returns {number} Returns the random number. * @example * - * function Foo() { - * this.a = 1; - * } - * - * _.isPlainObject(new Foo); - * // => false + * _.random(0, 5); + * // => an integer between 0 and 5 * - * _.isPlainObject([1, 2, 3]); - * // => false + * _.random(5); + * // => also an integer between 0 and 5 * - * _.isPlainObject({ 'x': 0, 'y': 0 }); - * // => true + * _.random(5, true); + * // => a floating-point number between 0 and 5 * - * _.isPlainObject(Object.create(null)); - * // => true + * _.random(1.2, 5.2); + * // => a floating-point number between 1.2 and 5.2 */ - function isPlainObject(value) { - if (!isObjectLike(value) || baseGetTag(value) != objectTag) { - return false; + function random(lower, upper, floating) { + if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { + upper = floating = undefined; } - var proto = getPrototype(value); - if (proto === null) { - return true; + if (floating === undefined) { + if (typeof upper == 'boolean') { + floating = upper; + upper = undefined; + } + else if (typeof lower == 'boolean') { + floating = lower; + lower = undefined; + } } - var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor; - return typeof Ctor == 'function' && Ctor instanceof Ctor && - funcToString.call(Ctor) == objectCtorString; + if (lower === undefined && upper === undefined) { + lower = 0; + upper = 1; + } + else { + lower = toFinite(lower); + if (upper === undefined) { + upper = lower; + lower = 0; + } else { + upper = toFinite(upper); + } + } + if (lower > upper) { + var temp = lower; + lower = upper; + upper = temp; + } + if (floating || lower % 1 || upper % 1) { + var rand = nativeRandom(); + return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); + } + return baseRandom(lower, upper); } + /*------------------------------------------------------------------------*/ + /** - * Checks if `value` is classified as a `RegExp` object. + * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). * * @static * @memberOf _ - * @since 0.1.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a regexp, else `false`. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the camel cased string. * @example * - * _.isRegExp(/abc/); - * // => true + * _.camelCase('Foo Bar'); + * // => 'fooBar' * - * _.isRegExp('/abc/'); - * // => false + * _.camelCase('--foo-bar--'); + * // => 'fooBar' + * + * _.camelCase('__FOO_BAR__'); + * // => 'fooBar' */ - var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp; + var camelCase = createCompounder(function(result, word, index) { + word = word.toLowerCase(); + return result + (index ? capitalize(word) : word); + }); /** - * Checks if `value` is a safe integer. An integer is safe if it's an IEEE-754 - * double precision number which isn't the result of a rounded unsafe integer. - * - * **Note:** This method is based on - * [`Number.isSafeInteger`](https://mdn.io/Number/isSafeInteger). + * Converts the first character of `string` to upper case and the remaining + * to lower case. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a safe integer, else `false`. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to capitalize. + * @returns {string} Returns the capitalized string. * @example * - * _.isSafeInteger(3); - * // => true - * - * _.isSafeInteger(Number.MIN_VALUE); - * // => false - * - * _.isSafeInteger(Infinity); - * // => false - * - * _.isSafeInteger('3'); - * // => false + * _.capitalize('FRED'); + * // => 'Fred' */ - function isSafeInteger(value) { - return isInteger(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER; + function capitalize(string) { + return upperFirst(toString(string).toLowerCase()); } /** - * Checks if `value` is classified as a `Set` object. + * Deburrs `string` by converting + * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) + * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) + * letters to basic Latin letters and removing + * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a set, else `false`. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to deburr. + * @returns {string} Returns the deburred string. * @example * - * _.isSet(new Set); - * // => true - * - * _.isSet(new WeakSet); - * // => false + * _.deburr('déjà vu'); + * // => 'deja vu' */ - var isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet; + function deburr(string) { + string = toString(string); + return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); + } /** - * Checks if `value` is classified as a `String` primitive or object. + * Checks if `string` ends with the given target string. * * @static - * @since 0.1.0 * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a string, else `false`. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=string.length] The position to search up to. + * @returns {boolean} Returns `true` if `string` ends with `target`, + * else `false`. * @example * - * _.isString('abc'); + * _.endsWith('abc', 'c'); * // => true * - * _.isString(1); + * _.endsWith('abc', 'b'); * // => false + * + * _.endsWith('abc', 'b', 2); + * // => true */ - function isString(value) { - return typeof value == 'string' || - (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag); + function endsWith(string, target, position) { + string = toString(string); + target = baseToString(target); + + var length = string.length; + position = position === undefined + ? length + : baseClamp(toInteger(position), 0, length); + + var end = position; + position -= target.length; + return position >= 0 && string.slice(position, end) == target; } /** - * Checks if `value` is classified as a `Symbol` primitive or object. + * Converts the characters "&", "<", ">", '"', and "'" in `string` to their + * corresponding HTML entities. + * + * **Note:** No other characters are escaped. To escape additional + * characters use a third-party library like [_he_](https://mths.be/he). + * + * Though the ">" character is escaped for symmetry, characters like + * ">" and "/" don't need escaping in HTML and have no special meaning + * unless they're part of a tag or unquoted attribute value. See + * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) + * (under "semi-related fun fact") for more details. + * + * When working with HTML you should always + * [quote attribute values](http://wonko.com/post/html-escaping) to reduce + * XSS vectors. * * @static + * @since 0.1.0 * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a symbol, else `false`. + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. * @example * - * _.isSymbol(Symbol.iterator); - * // => true - * - * _.isSymbol('abc'); - * // => false + * _.escape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' */ - function isSymbol(value) { - return typeof value == 'symbol' || - (isObjectLike(value) && baseGetTag(value) == symbolTag); + function escape(string) { + string = toString(string); + return (string && reHasUnescapedHtml.test(string)) + ? string.replace(reUnescapedHtml, escapeHtmlChar) + : string; } /** - * Checks if `value` is classified as a typed array. + * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", + * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. * * @static * @memberOf _ * @since 3.0.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a typed array, else `false`. + * @category String + * @param {string} [string=''] The string to escape. + * @returns {string} Returns the escaped string. * @example * - * _.isTypedArray(new Uint8Array); - * // => true - * - * _.isTypedArray([]); - * // => false + * _.escapeRegExp('[lodash](https://lodash.com/)'); + * // => '\[lodash\]\(https://lodash\.com/\)' */ - var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; + function escapeRegExp(string) { + string = toString(string); + return (string && reHasRegExpChar.test(string)) + ? string.replace(reRegExpChar, '\\$&') + : string; + } /** - * Checks if `value` is `undefined`. + * Converts `string` to + * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). * * @static - * @since 0.1.0 * @memberOf _ - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is `undefined`, else `false`. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the kebab cased string. * @example * - * _.isUndefined(void 0); - * // => true + * _.kebabCase('Foo Bar'); + * // => 'foo-bar' * - * _.isUndefined(null); - * // => false + * _.kebabCase('fooBar'); + * // => 'foo-bar' + * + * _.kebabCase('__FOO_BAR__'); + * // => 'foo-bar' */ - function isUndefined(value) { - return value === undefined; - } + var kebabCase = createCompounder(function(result, word, index) { + return result + (index ? '-' : '') + word.toLowerCase(); + }); /** - * Checks if `value` is classified as a `WeakMap` object. + * Converts `string`, as space separated words, to lower case. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak map, else `false`. + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. * @example * - * _.isWeakMap(new WeakMap); - * // => true + * _.lowerCase('--Foo-Bar--'); + * // => 'foo bar' * - * _.isWeakMap(new Map); - * // => false + * _.lowerCase('fooBar'); + * // => 'foo bar' + * + * _.lowerCase('__FOO_BAR__'); + * // => 'foo bar' */ - function isWeakMap(value) { - return isObjectLike(value) && getTag(value) == weakMapTag; - } + var lowerCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toLowerCase(); + }); /** - * Checks if `value` is classified as a `WeakSet` object. + * Converts the first character of `string` to lower case. * * @static * @memberOf _ - * @since 4.3.0 - * @category Lang - * @param {*} value The value to check. - * @returns {boolean} Returns `true` if `value` is a weak set, else `false`. + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. * @example * - * _.isWeakSet(new WeakSet); - * // => true + * _.lowerFirst('Fred'); + * // => 'fred' * - * _.isWeakSet(new Set); - * // => false + * _.lowerFirst('FRED'); + * // => 'fRED' */ - function isWeakSet(value) { - return isObjectLike(value) && baseGetTag(value) == weakSetTag; - } + var lowerFirst = createCaseFirst('toLowerCase'); /** - * Checks if `value` is less than `other`. + * Pads `string` on the left and right sides if it's shorter than `length`. + * Padding characters are truncated if they can't be evenly divided by `length`. * * @static * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than `other`, - * else `false`. - * @see _.gt + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. * @example * - * _.lt(1, 3); - * // => true + * _.pad('abc', 8); + * // => ' abc ' * - * _.lt(3, 3); - * // => false + * _.pad('abc', 8, '_-'); + * // => '_-abc_-_' * - * _.lt(3, 1); - * // => false + * _.pad('abc', 3); + * // => 'abc' */ - var lt = createRelationalOperation(baseLt); + function pad(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + if (!length || strLength >= length) { + return string; + } + var mid = (length - strLength) / 2; + return ( + createPadding(nativeFloor(mid), chars) + + string + + createPadding(nativeCeil(mid), chars) + ); + } /** - * Checks if `value` is less than or equal to `other`. + * Pads `string` on the right side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. * * @static * @memberOf _ - * @since 3.9.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is less than or equal to - * `other`, else `false`. - * @see _.gte + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. * @example * - * _.lte(1, 3); - * // => true + * _.padEnd('abc', 6); + * // => 'abc ' * - * _.lte(3, 3); - * // => true + * _.padEnd('abc', 6, '_-'); + * // => 'abc_-_' * - * _.lte(3, 1); - * // => false + * _.padEnd('abc', 3); + * // => 'abc' */ - var lte = createRelationalOperation(function(value, other) { - return value <= other; - }); + function padEnd(string, length, chars) { + string = toString(string); + length = toInteger(length); + + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (string + createPadding(length - strLength, chars)) + : string; + } /** - * Converts `value` to an array. + * Pads `string` on the left side if it's shorter than `length`. Padding + * characters are truncated if they exceed `length`. * * @static - * @since 0.1.0 * @memberOf _ - * @category Lang - * @param {*} value The value to convert. - * @returns {Array} Returns the converted array. + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to pad. + * @param {number} [length=0] The padding length. + * @param {string} [chars=' '] The string used as padding. + * @returns {string} Returns the padded string. * @example * - * _.toArray({ 'a': 1, 'b': 2 }); - * // => [1, 2] - * - * _.toArray('abc'); - * // => ['a', 'b', 'c'] + * _.padStart('abc', 6); + * // => ' abc' * - * _.toArray(1); - * // => [] + * _.padStart('abc', 6, '_-'); + * // => '_-_abc' * - * _.toArray(null); - * // => [] + * _.padStart('abc', 3); + * // => 'abc' */ - function toArray(value) { - if (!value) { - return []; - } - if (isArrayLike(value)) { - return isString(value) ? stringToArray(value) : copyArray(value); - } - if (symIterator && value[symIterator]) { - return iteratorToArray(value[symIterator]()); - } - var tag = getTag(value), - func = tag == mapTag ? mapToArray : (tag == setTag ? setToArray : values); + function padStart(string, length, chars) { + string = toString(string); + length = toInteger(length); - return func(value); + var strLength = length ? stringSize(string) : 0; + return (length && strLength < length) + ? (createPadding(length - strLength, chars) + string) + : string; } /** - * Converts `value` to a finite number. + * Converts `string` to an integer of the specified radix. If `radix` is + * `undefined` or `0`, a `radix` of `10` is used unless `value` is a + * hexadecimal, in which case a `radix` of `16` is used. + * + * **Note:** This method aligns with the + * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. * * @static * @memberOf _ - * @since 4.12.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted number. + * @since 1.1.0 + * @category String + * @param {string} string The string to convert. + * @param {number} [radix=10] The radix to interpret `value` by. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {number} Returns the converted integer. * @example * - * _.toFinite(3.2); - * // => 3.2 - * - * _.toFinite(Number.MIN_VALUE); - * // => 5e-324 - * - * _.toFinite(Infinity); - * // => 1.7976931348623157e+308 + * _.parseInt('08'); + * // => 8 * - * _.toFinite('3.2'); - * // => 3.2 + * _.map(['6', '08', '10'], _.parseInt); + * // => [6, 8, 10] */ - function toFinite(value) { - if (!value) { - return value === 0 ? value : 0; - } - value = toNumber(value); - if (value === INFINITY || value === -INFINITY) { - var sign = (value < 0 ? -1 : 1); - return sign * MAX_INTEGER; + function parseInt(string, radix, guard) { + if (guard || radix == null) { + radix = 0; + } else if (radix) { + radix = +radix; } - return value === value ? value : 0; + return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); } /** - * Converts `value` to an integer. - * - * **Note:** This method is loosely based on - * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger). + * Repeats the given string `n` times. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to repeat. + * @param {number} [n=1] The number of times to repeat the string. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the repeated string. * @example * - * _.toInteger(3.2); - * // => 3 - * - * _.toInteger(Number.MIN_VALUE); - * // => 0 + * _.repeat('*', 3); + * // => '***' * - * _.toInteger(Infinity); - * // => 1.7976931348623157e+308 + * _.repeat('abc', 2); + * // => 'abcabc' * - * _.toInteger('3.2'); - * // => 3 + * _.repeat('abc', 0); + * // => '' */ - function toInteger(value) { - var result = toFinite(value), - remainder = result % 1; - - return result === result ? (remainder ? result - remainder : result) : 0; + function repeat(string, n, guard) { + if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { + n = 1; + } else { + n = toInteger(n); + } + return baseRepeat(toString(string), n); } /** - * Converts `value` to an integer suitable for use as the length of an - * array-like object. + * Replaces matches for `pattern` in `string` with `replacement`. * * **Note:** This method is based on - * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength). + * [`String#replace`](https://mdn.io/String/replace). * * @static * @memberOf _ * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @category String + * @param {string} [string=''] The string to modify. + * @param {RegExp|string} pattern The pattern to replace. + * @param {Function|string} replacement The match replacement. + * @returns {string} Returns the modified string. * @example * - * _.toLength(3.2); - * // => 3 - * - * _.toLength(Number.MIN_VALUE); - * // => 0 - * - * _.toLength(Infinity); - * // => 4294967295 - * - * _.toLength('3.2'); - * // => 3 + * _.replace('Hi Fred', 'Fred', 'Barney'); + * // => 'Hi Barney' */ - function toLength(value) { - return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0; + function replace() { + var args = arguments, + string = toString(args[0]); + + return args.length < 3 ? string : string.replace(args[1], args[2]); } /** - * Converts `value` to a number. + * Converts `string` to + * [snake case](https://en.wikipedia.org/wiki/Snake_case). * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to process. - * @returns {number} Returns the number. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the snake cased string. * @example * - * _.toNumber(3.2); - * // => 3.2 - * - * _.toNumber(Number.MIN_VALUE); - * // => 5e-324 + * _.snakeCase('Foo Bar'); + * // => 'foo_bar' * - * _.toNumber(Infinity); - * // => Infinity + * _.snakeCase('fooBar'); + * // => 'foo_bar' * - * _.toNumber('3.2'); - * // => 3.2 + * _.snakeCase('--FOO-BAR--'); + * // => 'foo_bar' */ - function toNumber(value) { - if (typeof value == 'number') { - return value; - } - if (isSymbol(value)) { - return NAN; - } - if (isObject(value)) { - var other = typeof value.valueOf == 'function' ? value.valueOf() : value; - value = isObject(other) ? (other + '') : other; - } - if (typeof value != 'string') { - return value === 0 ? value : +value; - } - value = baseTrim(value); - var isBinary = reIsBinary.test(value); - return (isBinary || reIsOctal.test(value)) - ? freeParseInt(value.slice(2), isBinary ? 2 : 8) - : (reIsBadHex.test(value) ? NAN : +value); - } + var snakeCase = createCompounder(function(result, word, index) { + return result + (index ? '_' : '') + word.toLowerCase(); + }); /** - * Converts `value` to a plain object flattening inherited enumerable string - * keyed properties of `value` to own properties of the plain object. + * Splits `string` by `separator`. + * + * **Note:** This method is based on + * [`String#split`](https://mdn.io/String/split). * * @static * @memberOf _ - * @since 3.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {Object} Returns the converted plain object. + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to split. + * @param {RegExp|string} separator The separator pattern to split by. + * @param {number} [limit] The length to truncate results to. + * @returns {Array} Returns the string segments. * @example * - * function Foo() { - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.assign({ 'a': 1 }, new Foo); - * // => { 'a': 1, 'b': 2 } - * - * _.assign({ 'a': 1 }, _.toPlainObject(new Foo)); - * // => { 'a': 1, 'b': 2, 'c': 3 } + * _.split('a-b-c', '-', 2); + * // => ['a', 'b'] */ - function toPlainObject(value) { - return copyObject(value, keysIn(value)); + function split(string, separator, limit) { + if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { + separator = limit = undefined; + } + limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; + if (!limit) { + return []; + } + string = toString(string); + if (string && ( + typeof separator == 'string' || + (separator != null && !isRegExp(separator)) + )) { + separator = baseToString(separator); + if (!separator && hasUnicode(string)) { + return castSlice(stringToArray(string), 0, limit); + } + } + return string.split(separator, limit); } /** - * Converts `value` to a safe integer. A safe integer can be compared and - * represented correctly. + * Converts `string` to + * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {number} Returns the converted integer. + * @since 3.1.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the start cased string. * @example * - * _.toSafeInteger(3.2); - * // => 3 - * - * _.toSafeInteger(Number.MIN_VALUE); - * // => 0 + * _.startCase('--foo-bar--'); + * // => 'Foo Bar' * - * _.toSafeInteger(Infinity); - * // => 9007199254740991 + * _.startCase('fooBar'); + * // => 'Foo Bar' * - * _.toSafeInteger('3.2'); - * // => 3 + * _.startCase('__FOO_BAR__'); + * // => 'FOO BAR' */ - function toSafeInteger(value) { - return value - ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) - : (value === 0 ? value : 0); - } + var startCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + upperFirst(word); + }); /** - * Converts `value` to a string. An empty string is returned for `null` - * and `undefined` values. The sign of `-0` is preserved. + * Checks if `string` starts with the given target string. * * @static * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to convert. - * @returns {string} Returns the converted string. + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {string} [target] The string to search for. + * @param {number} [position=0] The position to search from. + * @returns {boolean} Returns `true` if `string` starts with `target`, + * else `false`. * @example * - * _.toString(null); - * // => '' + * _.startsWith('abc', 'a'); + * // => true * - * _.toString(-0); - * // => '-0' + * _.startsWith('abc', 'b'); + * // => false * - * _.toString([1, 2, 3]); - * // => '1,2,3' + * _.startsWith('abc', 'b', 1); + * // => true */ - function toString(value) { - return value == null ? '' : baseToString(value); - } + function startsWith(string, target, position) { + string = toString(string); + position = position == null + ? 0 + : baseClamp(toInteger(position), 0, string.length); - /*------------------------------------------------------------------------*/ + target = baseToString(target); + return string.slice(position, position + target.length) == target; + } /** - * Assigns own enumerable string keyed properties of source objects to the - * destination object. Source objects are applied from left to right. - * Subsequent sources overwrite property assignments of previous sources. + * Creates a compiled template function that can interpolate data properties + * in "interpolate" delimiters, HTML-escape interpolated data properties in + * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data + * properties may be accessed as free variables in the template. If a setting + * object is given, it takes precedence over `_.templateSettings` values. * - * **Note:** This method mutates `object` and is loosely based on - * [`Object.assign`](https://mdn.io/Object/assign). + * **Note:** In the development build `_.template` utilizes + * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) + * for easier debugging. + * + * For more information on precompiling templates see + * [lodash's custom builds documentation](https://lodash.com/custom-builds). + * + * For more information on Chrome extension sandboxes see + * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). * * @static + * @since 0.1.0 * @memberOf _ - * @since 0.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assignIn + * @category String + * @param {string} [string=''] The template string. + * @param {Object} [options={}] The options object. + * @param {RegExp} [options.escape=_.templateSettings.escape] + * The HTML "escape" delimiter. + * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] + * The "evaluate" delimiter. + * @param {Object} [options.imports=_.templateSettings.imports] + * An object to import into the template as free variables. + * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] + * The "interpolate" delimiter. + * @param {string} [options.sourceURL='lodash.templateSources[n]'] + * The sourceURL of the compiled template. + * @param {string} [options.variable='obj'] + * The data object variable name. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Function} Returns the compiled template function. * @example * - * function Foo() { - * this.a = 1; - * } + * // Use the "interpolate" delimiter to create a compiled template. + * var compiled = _.template('hello <%= user %>!'); + * compiled({ 'user': 'fred' }); + * // => 'hello fred!' * - * function Bar() { - * this.c = 3; - * } + * // Use the HTML "escape" delimiter to escape data property values. + * var compiled = _.template('<b><%- value %></b>'); + * compiled({ 'value': '<script>' }); + * // => '<b><script></b>' * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; + * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. + * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' * - * _.assign({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'c': 3 } + * // Use the internal `print` function in "evaluate" delimiters. + * var compiled = _.template('<% print("hello " + user); %>!'); + * compiled({ 'user': 'barney' }); + * // => 'hello barney!' + * + * // Use the ES template literal delimiter as an "interpolate" delimiter. + * // Disable support by replacing the "interpolate" delimiter. + * var compiled = _.template('hello ${ user }!'); + * compiled({ 'user': 'pebbles' }); + * // => 'hello pebbles!' + * + * // Use backslashes to treat delimiters as plain text. + * var compiled = _.template('<%= "\\<%- value %\\>" %>'); + * compiled({ 'value': 'ignored' }); + * // => '<%- value %>' + * + * // Use the `imports` option to import `jQuery` as `jq`. + * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; + * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); + * compiled({ 'users': ['fred', 'barney'] }); + * // => '<li>fred</li><li>barney</li>' + * + * // Use the `sourceURL` option to specify a custom sourceURL for the template. + * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); + * compiled(data); + * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. + * + * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. + * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); + * compiled.source; + * // => function(data) { + * // var __t, __p = ''; + * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; + * // return __p; + * // } + * + * // Use custom template delimiters. + * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; + * var compiled = _.template('hello {{ user }}!'); + * compiled({ 'user': 'mustache' }); + * // => 'hello mustache!' + * + * // Use the `source` property to inline compiled templates for meaningful + * // line numbers in error messages and stack traces. + * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ + * var JST = {\ + * "main": ' + _.template(mainText).source + '\ + * };\ + * '); */ - var assign = createAssigner(function(object, source) { - if (isPrototype(source) || isArrayLike(source)) { - copyObject(source, keys(source), object); - return; + function template(string, options, guard) { + // Based on John Resig's `tmpl` implementation + // (http://ejohn.org/blog/javascript-micro-templating/) + // and Laura Doktorova's doT.js (https://github.com/olado/doT). + var settings = lodash.templateSettings; + + if (guard && isIterateeCall(string, options, guard)) { + options = undefined; } - for (var key in source) { - if (hasOwnProperty.call(source, key)) { - assignValue(object, key, source[key]); + string = toString(string); + options = assignInWith({}, options, settings, customDefaultsAssignIn); + + var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), + importsKeys = keys(imports), + importsValues = baseValues(imports, importsKeys); + + var isEscaping, + isEvaluating, + index = 0, + interpolate = options.interpolate || reNoMatch, + source = "__p += '"; + + // Compile the regexp to match each delimiter. + var reDelimiters = RegExp( + (options.escape || reNoMatch).source + '|' + + interpolate.source + '|' + + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + + (options.evaluate || reNoMatch).source + '|$' + , 'g'); + + // Use a sourceURL for easier debugging. + // The sourceURL gets injected into the source that's eval-ed, so be careful + // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in + // and escape the comment, thus injecting code that gets evaled. + var sourceURL = '//# sourceURL=' + + (hasOwnProperty.call(options, 'sourceURL') + ? (options.sourceURL + '').replace(/\s/g, ' ') + : ('lodash.templateSources[' + (++templateCounter) + ']') + ) + '\n'; + + string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { + interpolateValue || (interpolateValue = esTemplateValue); + + // Escape characters that can't be included in string literals. + source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + + // Replace delimiters with snippets. + if (escapeValue) { + isEscaping = true; + source += "' +\n__e(" + escapeValue + ") +\n'"; } + if (evaluateValue) { + isEvaluating = true; + source += "';\n" + evaluateValue + ";\n__p += '"; + } + if (interpolateValue) { + source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; + } + index = offset + match.length; + + // The JS engine embedded in Adobe products needs `match` returned in + // order to produce the correct `offset` value. + return match; + }); + + source += "';\n"; + + // If `variable` is not specified wrap a with-statement around the generated + // code to add the data object to the top of the scope chain. + var variable = hasOwnProperty.call(options, 'variable') && options.variable; + if (!variable) { + source = 'with (obj) {\n' + source + '\n}\n'; } - }); + // Throw an error if a forbidden character was found in `variable`, to prevent + // potential command injection attacks. + else if (reForbiddenIdentifierChars.test(variable)) { + throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT); + } + + // Cleanup code by stripping empty strings. + source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) + .replace(reEmptyStringMiddle, '$1') + .replace(reEmptyStringTrailing, '$1;'); + + // Frame code as the function body. + source = 'function(' + (variable || 'obj') + ') {\n' + + (variable + ? '' + : 'obj || (obj = {});\n' + ) + + "var __t, __p = ''" + + (isEscaping + ? ', __e = _.escape' + : '' + ) + + (isEvaluating + ? ', __j = Array.prototype.join;\n' + + "function print() { __p += __j.call(arguments, '') }\n" + : ';\n' + ) + + source + + 'return __p\n}'; + + var result = attempt(function() { + return Function(importsKeys, sourceURL + 'return ' + source) + .apply(undefined, importsValues); + }); + + // Provide the compiled function's source by its `toString` method or + // the `source` property as a convenience for inlining compiled templates. + result.source = source; + if (isError(result)) { + throw result; + } + return result; + } /** - * This method is like `_.assign` except that it iterates over own and - * inherited source properties. - * - * **Note:** This method mutates `object`. + * Converts `string`, as a whole, to lower case just like + * [String#toLowerCase](https://mdn.io/toLowerCase). * * @static * @memberOf _ * @since 4.0.0 - * @alias extend - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.assign + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the lower cased string. * @example * - * function Foo() { - * this.a = 1; - * } - * - * function Bar() { - * this.c = 3; - * } + * _.toLower('--Foo-Bar--'); + * // => '--foo-bar--' * - * Foo.prototype.b = 2; - * Bar.prototype.d = 4; + * _.toLower('fooBar'); + * // => 'foobar' * - * _.assignIn({ 'a': 0 }, new Foo, new Bar); - * // => { 'a': 1, 'b': 2, 'c': 3, 'd': 4 } + * _.toLower('__FOO_BAR__'); + * // => '__foo_bar__' */ - var assignIn = createAssigner(function(object, source) { - copyObject(source, keysIn(source), object); - }); + function toLower(value) { + return toString(value).toLowerCase(); + } /** - * This method is like `_.assignIn` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. + * Converts `string`, as a whole, to upper case just like + * [String#toUpperCase](https://mdn.io/toUpperCase). * * @static * @memberOf _ * @since 4.0.0 - * @alias extendWith - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignWith + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. * @example * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } + * _.toUpper('--foo-bar--'); + * // => '--FOO-BAR--' * - * var defaults = _.partialRight(_.assignInWith, customizer); + * _.toUpper('fooBar'); + * // => 'FOOBAR' * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } + * _.toUpper('__foo_bar__'); + * // => '__FOO_BAR__' */ - var assignInWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keysIn(source), object, customizer); - }); + function toUpper(value) { + return toString(value).toUpperCase(); + } /** - * This method is like `_.assign` except that it accepts `customizer` - * which is invoked to produce the assigned values. If `customizer` returns - * `undefined`, assignment is handled by the method instead. The `customizer` - * is invoked with five arguments: (objValue, srcValue, key, object, source). - * - * **Note:** This method mutates `object`. + * Removes leading and trailing whitespace or specified characters from `string`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @see _.assignInWith + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. * @example * - * function customizer(objValue, srcValue) { - * return _.isUndefined(objValue) ? srcValue : objValue; - * } + * _.trim(' abc '); + * // => 'abc' * - * var defaults = _.partialRight(_.assignWith, customizer); + * _.trim('-_-abc-_-', '_-'); + * // => 'abc' * - * defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } + * _.map([' foo ', ' bar '], _.trim); + * // => ['foo', 'bar'] */ - var assignWith = createAssigner(function(object, source, srcIndex, customizer) { - copyObject(source, keys(source), object, customizer); - }); + function trim(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return baseTrim(string); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + chrSymbols = stringToArray(chars), + start = charsStartIndex(strSymbols, chrSymbols), + end = charsEndIndex(strSymbols, chrSymbols) + 1; + + return castSlice(strSymbols, start, end).join(''); + } /** - * Creates an array of values corresponding to `paths` of `object`. + * Removes trailing whitespace or specified characters from `string`. * * @static * @memberOf _ - * @since 1.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Array} Returns the picked values. + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }, 4] }; + * _.trimEnd(' abc '); + * // => ' abc' * - * _.at(object, ['a[0].b.c', 'a[1]']); - * // => [3, 4] + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' */ - var at = flatRest(baseAt); + function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.slice(0, trimmedEndIndex(string) + 1); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + + return castSlice(strSymbols, 0, end).join(''); + } /** - * Creates an object that inherits from the `prototype` object. If a - * `properties` object is given, its own enumerable string keyed properties - * are assigned to the created object. + * Removes leading whitespace or specified characters from `string`. * * @static * @memberOf _ - * @since 2.3.0 - * @category Object - * @param {Object} prototype The object to inherit from. - * @param {Object} [properties] The properties to assign to the object. - * @returns {Object} Returns the new object. + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. * @example * - * function Shape() { - * this.x = 0; - * this.y = 0; - * } - * - * function Circle() { - * Shape.call(this); - * } - * - * Circle.prototype = _.create(Shape.prototype, { - * 'constructor': Circle - * }); - * - * var circle = new Circle; - * circle instanceof Circle; - * // => true + * _.trimStart(' abc '); + * // => 'abc ' * - * circle instanceof Shape; - * // => true + * _.trimStart('-_-abc-_-', '_-'); + * // => 'abc-_-' */ - function create(prototype, properties) { - var result = baseCreate(prototype); - return properties == null ? result : baseAssign(result, properties); + function trimStart(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.replace(reTrimStart, ''); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + start = charsStartIndex(strSymbols, stringToArray(chars)); + + return castSlice(strSymbols, start).join(''); } /** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. + * Truncates `string` if it's longer than the given maximum string length. + * The last characters of the truncated string are replaced with the omission + * string which defaults to "...". * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to truncate. + * @param {Object} [options={}] The options object. + * @param {number} [options.length=30] The maximum string length. + * @param {string} [options.omission='...'] The string to indicate text is omitted. + * @param {RegExp|string} [options.separator] The separator pattern to truncate to. + * @returns {string} Returns the truncated string. * @example * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } + * _.truncate('hi-diddly-ho there, neighborino'); + * // => 'hi-diddly-ho there, neighbo...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': ' ' + * }); + * // => 'hi-diddly-ho there,...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'length': 24, + * 'separator': /,? +/ + * }); + * // => 'hi-diddly-ho there...' + * + * _.truncate('hi-diddly-ho there, neighborino', { + * 'omission': ' [...]' + * }); + * // => 'hi-diddly-ho there, neig [...]' */ - var defaults = baseRest(function(object, sources) { - object = Object(object); - - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; + function truncate(string, options) { + var length = DEFAULT_TRUNC_LENGTH, + omission = DEFAULT_TRUNC_OMISSION; - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; + if (isObject(options)) { + var separator = 'separator' in options ? options.separator : separator; + length = 'length' in options ? toInteger(options.length) : length; + omission = 'omission' in options ? baseToString(options.omission) : omission; } + string = toString(string); - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; + var strLength = string.length; + if (hasUnicode(string)) { + var strSymbols = stringToArray(string); + strLength = strSymbols.length; + } + if (length >= strLength) { + return string; + } + var end = length - stringSize(omission); + if (end < 1) { + return omission; + } + var result = strSymbols + ? castSlice(strSymbols, 0, end).join('') + : string.slice(0, end); - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; + if (separator === undefined) { + return result + omission; + } + if (strSymbols) { + end += (result.length - end); + } + if (isRegExp(separator)) { + if (string.slice(end).search(separator)) { + var match, + substring = result; - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; + if (!separator.global) { + separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); + } + separator.lastIndex = 0; + while ((match = separator.exec(substring))) { + var newEnd = match.index; } + result = result.slice(0, newEnd === undefined ? end : newEnd); + } + } else if (string.indexOf(baseToString(separator), end) != end) { + var index = result.lastIndexOf(separator); + if (index > -1) { + result = result.slice(0, index); } } - - return object; - }); + return result + omission; + } /** - * This method is like `_.defaults` except that it recursively assigns - * default properties. + * The inverse of `_.escape`; this method converts the HTML entities + * `&`, `<`, `>`, `"`, and `'` in `string` to + * their corresponding characters. * - * **Note:** This method mutates `object`. + * **Note:** No other HTML entities are unescaped. To unescape additional + * HTML entities use a third-party library like [_he_](https://mths.be/he). * * @static * @memberOf _ - * @since 3.10.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaults + * @since 0.6.0 + * @category String + * @param {string} [string=''] The string to unescape. + * @returns {string} Returns the unescaped string. * @example * - * _.defaultsDeep({ 'a': { 'b': 2 } }, { 'a': { 'b': 1, 'c': 3 } }); - * // => { 'a': { 'b': 2, 'c': 3 } } + * _.unescape('fred, barney, & pebbles'); + * // => 'fred, barney, & pebbles' */ - var defaultsDeep = baseRest(function(args) { - args.push(undefined, customDefaultsMerge); - return apply(mergeWith, undefined, args); - }); + function unescape(string) { + string = toString(string); + return (string && reHasEscapedHtml.test(string)) + ? string.replace(reEscapedHtml, unescapeHtmlChar) + : string; + } /** - * This method is like `_.find` except that it returns the key of the first - * element `predicate` returns truthy for instead of the element itself. + * Converts `string`, as space separated words, to upper case. * * @static * @memberOf _ - * @since 1.1.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the upper cased string. * @example * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findKey(users, function(o) { return o.age < 40; }); - * // => 'barney' (iteration order is not guaranteed) - * - * // The `_.matches` iteratee shorthand. - * _.findKey(users, { 'age': 1, 'active': true }); - * // => 'pebbles' + * _.upperCase('--foo-bar'); + * // => 'FOO BAR' * - * // The `_.matchesProperty` iteratee shorthand. - * _.findKey(users, ['active', false]); - * // => 'fred' + * _.upperCase('fooBar'); + * // => 'FOO BAR' * - * // The `_.property` iteratee shorthand. - * _.findKey(users, 'active'); - * // => 'barney' + * _.upperCase('__foo_bar__'); + * // => 'FOO BAR' */ - function findKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwn); - } + var upperCase = createCompounder(function(result, word, index) { + return result + (index ? ' ' : '') + word.toUpperCase(); + }); /** - * This method is like `_.findKey` except that it iterates over elements of - * a collection in the opposite order. + * Converts the first character of `string` to upper case. * * @static * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @returns {string|undefined} Returns the key of the matched element, - * else `undefined`. + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to convert. + * @returns {string} Returns the converted string. * @example * - * var users = { - * 'barney': { 'age': 36, 'active': true }, - * 'fred': { 'age': 40, 'active': false }, - * 'pebbles': { 'age': 1, 'active': true } - * }; - * - * _.findLastKey(users, function(o) { return o.age < 40; }); - * // => returns 'pebbles' assuming `_.findKey` returns 'barney' - * - * // The `_.matches` iteratee shorthand. - * _.findLastKey(users, { 'age': 36, 'active': true }); - * // => 'barney' - * - * // The `_.matchesProperty` iteratee shorthand. - * _.findLastKey(users, ['active', false]); - * // => 'fred' + * _.upperFirst('fred'); + * // => 'Fred' * - * // The `_.property` iteratee shorthand. - * _.findLastKey(users, 'active'); - * // => 'pebbles' + * _.upperFirst('FRED'); + * // => 'FRED' */ - function findLastKey(object, predicate) { - return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight); - } + var upperFirst = createCaseFirst('toUpperCase'); /** - * Iterates over own and inherited enumerable string keyed properties of an - * object and invokes `iteratee` for each property. The iteratee is invoked - * with three arguments: (value, key, object). Iteratee functions may exit - * iteration early by explicitly returning `false`. + * Splits `string` into an array of its words. * * @static * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forInRight + * @since 3.0.0 + * @category String + * @param {string} [string=''] The string to inspect. + * @param {RegExp|string} [pattern] The pattern to match words. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {Array} Returns the words of `string`. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; + * _.words('fred, barney, & pebbles'); + * // => ['fred', 'barney', 'pebbles'] * - * _.forIn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a', 'b', then 'c' (iteration order is not guaranteed). + * _.words('fred, barney, & pebbles', /[^, ]+/g); + * // => ['fred', 'barney', '&', 'pebbles'] */ - function forIn(object, iteratee) { - return object == null - ? object - : baseFor(object, getIteratee(iteratee, 3), keysIn); + function words(string, pattern, guard) { + string = toString(string); + pattern = guard ? undefined : pattern; + + if (pattern === undefined) { + return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); + } + return string.match(pattern) || []; } + /*------------------------------------------------------------------------*/ + /** - * This method is like `_.forIn` except that it iterates over properties of - * `object` in the opposite order. + * Attempts to invoke `func`, returning either the result or the caught error + * object. Any additional arguments are provided to `func` when it's invoked. * * @static * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forIn + * @since 3.0.0 + * @category Util + * @param {Function} func The function to attempt. + * @param {...*} [args] The arguments to invoke `func` with. + * @returns {*} Returns the `func` result or error object. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; + * // Avoid throwing errors for invalid selectors. + * var elements = _.attempt(function(selector) { + * return document.querySelectorAll(selector); + * }, '>_>'); * - * _.forInRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'c', 'b', then 'a' assuming `_.forIn` logs 'a', 'b', then 'c'. + * if (_.isError(elements)) { + * elements = []; + * } */ - function forInRight(object, iteratee) { - return object == null - ? object - : baseForRight(object, getIteratee(iteratee, 3), keysIn); - } + var attempt = baseRest(function(func, args) { + try { + return apply(func, undefined, args); + } catch (e) { + return isError(e) ? e : new Error(e); + } + }); /** - * Iterates over own enumerable string keyed properties of an object and - * invokes `iteratee` for each property. The iteratee is invoked with three - * arguments: (value, key, object). Iteratee functions may exit iteration - * early by explicitly returning `false`. + * Binds methods of an object to the object itself, overwriting the existing + * method. + * + * **Note:** This method doesn't set the "length" property of bound functions. * * @static + * @since 0.1.0 * @memberOf _ - * @since 0.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @category Util + * @param {Object} object The object to bind and assign the bound methods to. + * @param {...(string|string[])} methodNames The object method names to bind. * @returns {Object} Returns `object`. - * @see _.forOwnRight * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; + * var view = { + * 'label': 'docs', + * 'click': function() { + * console.log('clicked ' + this.label); + * } + * }; * - * _.forOwn(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'a' then 'b' (iteration order is not guaranteed). + * _.bindAll(view, ['click']); + * jQuery(element).on('click', view.click); + * // => Logs 'clicked docs' when clicked. */ - function forOwn(object, iteratee) { - return object && baseForOwn(object, getIteratee(iteratee, 3)); - } + var bindAll = flatRest(function(object, methodNames) { + arrayEach(methodNames, function(key) { + key = toKey(key); + baseAssignValue(object, key, bind(object[key], object)); + }); + return object; + }); /** - * This method is like `_.forOwn` except that it iterates over properties of - * `object` in the opposite order. + * Creates a function that iterates over `pairs` and invokes the corresponding + * function of the first predicate to return truthy. The predicate-function + * pairs are invoked with the `this` binding and arguments of the created + * function. * * @static * @memberOf _ - * @since 2.0.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns `object`. - * @see _.forOwn + * @since 4.0.0 + * @category Util + * @param {Array} pairs The predicate-function pairs. + * @returns {Function} Returns the new composite function. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } + * var func = _.cond([ + * [_.matches({ 'a': 1 }), _.constant('matches A')], + * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], + * [_.stubTrue, _.constant('no match')] + * ]); * - * Foo.prototype.c = 3; + * func({ 'a': 1, 'b': 2 }); + * // => 'matches A' * - * _.forOwnRight(new Foo, function(value, key) { - * console.log(key); - * }); - * // => Logs 'b' then 'a' assuming `_.forOwn` logs 'a' then 'b'. + * func({ 'a': 0, 'b': 1 }); + * // => 'matches B' + * + * func({ 'a': '1', 'b': '2' }); + * // => 'no match' */ - function forOwnRight(object, iteratee) { - return object && baseForOwnRight(object, getIteratee(iteratee, 3)); + function cond(pairs) { + var length = pairs == null ? 0 : pairs.length, + toIteratee = getIteratee(); + + pairs = !length ? [] : arrayMap(pairs, function(pair) { + if (typeof pair[1] != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return [toIteratee(pair[0]), pair[1]]; + }); + + return baseRest(function(args) { + var index = -1; + while (++index < length) { + var pair = pairs[index]; + if (apply(pair[0], this, args)) { + return apply(pair[1], this, args); + } + } + }); } /** - * Creates an array of function property names from own enumerable properties - * of `object`. + * Creates a function that invokes the predicate properties of `source` with + * the corresponding property values of a given object, returning `true` if + * all predicates return truthy, else `false`. + * + * **Note:** The created function is equivalent to `_.conformsTo` with + * `source` partially applied. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functionsIn + * @since 4.0.0 + * @category Util + * @param {Object} source The object of property predicates to conform to. + * @returns {Function} Returns the new spec function. * @example * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } - * - * Foo.prototype.c = _.constant('c'); + * var objects = [ + * { 'a': 2, 'b': 1 }, + * { 'a': 1, 'b': 2 } + * ]; * - * _.functions(new Foo); - * // => ['a', 'b'] + * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); + * // => [{ 'a': 1, 'b': 2 }] */ - function functions(object) { - return object == null ? [] : baseFunctions(object, keys(object)); + function conforms(source) { + return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); } /** - * Creates an array of function property names from own and inherited - * enumerable properties of `object`. + * Creates a function that returns `value`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to inspect. - * @returns {Array} Returns the function names. - * @see _.functions + * @since 2.4.0 + * @category Util + * @param {*} value The value to return from the new function. + * @returns {Function} Returns the new constant function. * @example * - * function Foo() { - * this.a = _.constant('a'); - * this.b = _.constant('b'); - * } + * var objects = _.times(2, _.constant({ 'a': 1 })); * - * Foo.prototype.c = _.constant('c'); + * console.log(objects); + * // => [{ 'a': 1 }, { 'a': 1 }] * - * _.functionsIn(new Foo); - * // => ['a', 'b', 'c'] + * console.log(objects[0] === objects[1]); + * // => true */ - function functionsIn(object) { - return object == null ? [] : baseFunctions(object, keysIn(object)); + function constant(value) { + return function() { + return value; + }; } /** - * Gets the value at `path` of `object`. If the resolved value is - * `undefined`, the `defaultValue` is returned in its place. + * Checks `value` to determine whether a default value should be returned in + * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, + * or `undefined`. * * @static * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to get. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. + * @since 4.14.0 + * @category Util + * @param {*} value The value to check. + * @param {*} defaultValue The default value. * @returns {*} Returns the resolved value. * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * _.defaultTo(1, 10); + * // => 1 * - * _.get(object, 'a[0].b.c'); - * // => 3 + * _.defaultTo(undefined, 10); + * // => 10 + */ + function defaultTo(value, defaultValue) { + return (value == null || value !== value) ? defaultValue : value; + } + + /** + * Creates a function that returns the result of invoking the given functions + * with the `this` binding of the created function, where each successive + * invocation is supplied the return value of the previous. * - * _.get(object, ['a', '0', 'b', 'c']); - * // => 3 + * @static + * @memberOf _ + * @since 3.0.0 + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flowRight + * @example * - * _.get(object, 'a.b.c', 'default'); - * // => 'default' + * function square(n) { + * return n * n; + * } + * + * var addSquare = _.flow([_.add, square]); + * addSquare(1, 2); + * // => 9 */ - function get(object, path, defaultValue) { - var result = object == null ? undefined : baseGet(object, path); - return result === undefined ? defaultValue : result; - } + var flow = createFlow(); /** - * Checks if `path` is a direct property of `object`. + * This method is like `_.flow` except that it creates a function that + * invokes the given functions from right to left. * * @static - * @since 0.1.0 + * @since 3.0.0 * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @category Util + * @param {...(Function|Function[])} [funcs] The functions to invoke. + * @returns {Function} Returns the new composite function. + * @see _.flow * @example * - * var object = { 'a': { 'b': 2 } }; - * var other = _.create({ 'a': _.create({ 'b': 2 }) }); + * function square(n) { + * return n * n; + * } * - * _.has(object, 'a'); - * // => true + * var addSquare = _.flowRight([square, _.add]); + * addSquare(1, 2); + * // => 9 + */ + var flowRight = createFlow(true); + + /** + * This method returns the first argument it receives. * - * _.has(object, 'a.b'); - * // => true + * @static + * @since 0.1.0 + * @memberOf _ + * @category Util + * @param {*} value Any value. + * @returns {*} Returns `value`. + * @example * - * _.has(object, ['a', 'b']); - * // => true + * var object = { 'a': 1 }; * - * _.has(other, 'a'); - * // => false + * console.log(_.identity(object) === object); + * // => true */ - function has(object, path) { - return object != null && hasPath(object, path, baseHas); + function identity(value) { + return value; } /** - * Checks if `path` is a direct or inherited property of `object`. + * Creates a function that invokes `func` with the arguments of the created + * function. If `func` is a property name, the created function returns the + * property value for a given element. If `func` is an array or object, the + * created function returns `true` for elements that contain the equivalent + * source properties, otherwise it returns `false`. * * @static - * @memberOf _ * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. - * @param {Array|string} path The path to check. - * @returns {boolean} Returns `true` if `path` exists, else `false`. + * @memberOf _ + * @category Util + * @param {*} [func=_.identity] The value to convert to a callback. + * @returns {Function} Returns the callback. * @example * - * var object = _.create({ 'a': _.create({ 'b': 2 }) }); + * var users = [ + * { 'user': 'barney', 'age': 36, 'active': true }, + * { 'user': 'fred', 'age': 40, 'active': false } + * ]; * - * _.hasIn(object, 'a'); - * // => true + * // The `_.matches` iteratee shorthand. + * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); + * // => [{ 'user': 'barney', 'age': 36, 'active': true }] * - * _.hasIn(object, 'a.b'); - * // => true + * // The `_.matchesProperty` iteratee shorthand. + * _.filter(users, _.iteratee(['user', 'fred'])); + * // => [{ 'user': 'fred', 'age': 40 }] * - * _.hasIn(object, ['a', 'b']); - * // => true + * // The `_.property` iteratee shorthand. + * _.map(users, _.iteratee('user')); + * // => ['barney', 'fred'] * - * _.hasIn(object, 'b'); - * // => false + * // Create custom iteratee shorthands. + * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { + * return !_.isRegExp(func) ? iteratee(func) : function(string) { + * return func.test(string); + * }; + * }); + * + * _.filter(['abc', 'def'], /ef/); + * // => ['def'] */ - function hasIn(object, path) { - return object != null && hasPath(object, path, baseHasIn); + function iteratee(func) { + return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); } /** - * Creates an object composed of the inverted keys and values of `object`. - * If `object` contains duplicate values, subsequent values overwrite - * property assignments of previous values. + * Creates a function that performs a partial deep comparison between a given + * object and `source`, returning `true` if the given object has equivalent + * property values, else `false`. + * + * **Note:** The created function is equivalent to `_.isMatch` with `source` + * partially applied. + * + * Partial comparisons will match empty array and empty object `source` + * values against any array or object value, respectively. See `_.isEqual` + * for a list of supported value comparisons. + * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` * * @static * @memberOf _ - * @since 0.7.0 - * @category Object - * @param {Object} object The object to invert. - * @returns {Object} Returns the new inverted object. + * @since 3.0.0 + * @category Util + * @param {Object} source The object of property values to match. + * @returns {Function} Returns the new spec function. * @example * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; * - * _.invert(object); - * // => { '1': 'c', '2': 'b' } + * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); + * // => [{ 'a': 4, 'b': 5, 'c': 6 }] + * + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ - var invert = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - result[value] = key; - }, constant(identity)); + function matches(source) { + return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); + } /** - * This method is like `_.invert` except that the inverted object is generated - * from the results of running each element of `object` thru `iteratee`. The - * corresponding inverted value of each inverted key is an array of keys - * responsible for generating the inverted value. The iteratee is invoked - * with one argument: (value). + * Creates a function that performs a partial deep comparison between the + * value at `path` of a given object to `srcValue`, returning `true` if the + * object value is equivalent, else `false`. + * + * **Note:** Partial comparisons will match empty array and empty object + * `srcValue` values against any array or object value, respectively. See + * `_.isEqual` for a list of supported value comparisons. + * + * **Note:** Multiple values can be checked by combining several matchers + * using `_.overSome` * * @static * @memberOf _ - * @since 4.1.0 - * @category Object - * @param {Object} object The object to invert. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {Object} Returns the new inverted object. + * @since 3.2.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @param {*} srcValue The value to match. + * @returns {Function} Returns the new spec function. * @example * - * var object = { 'a': 1, 'b': 2, 'c': 1 }; + * var objects = [ + * { 'a': 1, 'b': 2, 'c': 3 }, + * { 'a': 4, 'b': 5, 'c': 6 } + * ]; * - * _.invertBy(object); - * // => { '1': ['a', 'c'], '2': ['b'] } + * _.find(objects, _.matchesProperty('a', 4)); + * // => { 'a': 4, 'b': 5, 'c': 6 } * - * _.invertBy(object, function(value) { - * return 'group' + value; - * }); - * // => { 'group1': ['a', 'c'], 'group2': ['b'] } + * // Checking for several possible values + * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); + * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] */ - var invertBy = createInverter(function(result, value, key) { - if (value != null && - typeof value.toString != 'function') { - value = nativeObjectToString.call(value); - } - - if (hasOwnProperty.call(result, value)) { - result[value].push(key); - } else { - result[value] = [key]; - } - }, getIteratee); + function matchesProperty(path, srcValue) { + return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); + } /** - * Invokes the method at `path` of `object`. + * Creates a function that invokes the method at `path` of a given object. + * Any additional arguments are provided to the invoked method. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to query. + * @since 3.7.0 + * @category Util * @param {Array|string} path The path of the method to invoke. * @param {...*} [args] The arguments to invoke the method with. - * @returns {*} Returns the result of the invoked method. + * @returns {Function} Returns the new invoker function. * @example * - * var object = { 'a': [{ 'b': { 'c': [1, 2, 3, 4] } }] }; + * var objects = [ + * { 'a': { 'b': _.constant(2) } }, + * { 'a': { 'b': _.constant(1) } } + * ]; * - * _.invoke(object, 'a[0].b.c.slice', 1, 3); - * // => [2, 3] + * _.map(objects, _.method('a.b')); + * // => [2, 1] + * + * _.map(objects, _.method(['a', 'b'])); + * // => [2, 1] */ - var invoke = baseRest(baseInvoke); + var method = baseRest(function(path, args) { + return function(object) { + return baseInvoke(object, path, args); + }; + }); /** - * Creates an array of the own enumerable property names of `object`. - * - * **Note:** Non-object values are coerced to objects. See the - * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys) - * for more details. + * The opposite of `_.method`; this method creates a function that invokes + * the method at a given path of `object`. Any additional arguments are + * provided to the invoked method. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object + * @since 3.7.0 + * @category Util * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @param {...*} [args] The arguments to invoke the method with. + * @returns {Function} Returns the new invoker function. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; + * var array = _.times(3, _.constant), + * object = { 'a': array, 'b': array, 'c': array }; * - * _.keys(new Foo); - * // => ['a', 'b'] (iteration order is not guaranteed) + * _.map(['a[2]', 'c[0]'], _.methodOf(object)); + * // => [2, 0] * - * _.keys('hi'); - * // => ['0', '1'] + * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); + * // => [2, 0] */ - function keys(object) { - return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); - } + var methodOf = baseRest(function(object, args) { + return function(path) { + return baseInvoke(object, path, args); + }; + }); /** - * Creates an array of the own and inherited enumerable property names of `object`. + * Adds all own enumerable string keyed function properties of a source + * object to the destination object. If `object` is a function, then methods + * are added to its prototype as well. * - * **Note:** Non-object values are coerced to objects. + * **Note:** Use `_.runInContext` to create a pristine `lodash` function to + * avoid conflicts caused by modifying the original. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property names. + * @category Util + * @param {Function|Object} [object=lodash] The destination object. + * @param {Object} source The object of functions to add. + * @param {Object} [options={}] The options object. + * @param {boolean} [options.chain=true] Specify whether mixins are chainable. + * @returns {Function|Object} Returns `object`. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; + * function vowels(string) { + * return _.filter(string, function(v) { + * return /[aeiou]/i.test(v); + * }); * } * - * Foo.prototype.c = 3; + * _.mixin({ 'vowels': vowels }); + * _.vowels('fred'); + * // => ['e'] * - * _.keysIn(new Foo); - * // => ['a', 'b', 'c'] (iteration order is not guaranteed) + * _('fred').vowels().value(); + * // => ['e'] + * + * _.mixin({ 'vowels': vowels }, { 'chain': false }); + * _('fred').vowels(); + * // => ['e'] */ - function keysIn(object) { - return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object); + function mixin(object, source, options) { + var props = keys(source), + methodNames = baseFunctions(source, props); + + if (options == null && + !(isObject(source) && (methodNames.length || !props.length))) { + options = source; + source = object; + object = this; + methodNames = baseFunctions(source, keys(source)); + } + var chain = !(isObject(options) && 'chain' in options) || !!options.chain, + isFunc = isFunction(object); + + arrayEach(methodNames, function(methodName) { + var func = source[methodName]; + object[methodName] = func; + if (isFunc) { + object.prototype[methodName] = function() { + var chainAll = this.__chain__; + if (chain || chainAll) { + var result = object(this.__wrapped__), + actions = result.__actions__ = copyArray(this.__actions__); + + actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); + result.__chain__ = chainAll; + return result; + } + return func.apply(object, arrayPush([this.value()], arguments)); + }; + } + }); + + return object; } /** - * The opposite of `_.mapValues`; this method creates an object with the - * same values as `object` and keys generated by running each own enumerable - * string keyed property of `object` thru `iteratee`. The iteratee is invoked - * with three arguments: (value, key, object). + * Reverts the `_` variable to its previous value and returns a reference to + * the `lodash` function. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.8.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapValues + * @category Util + * @returns {Function} Returns the `lodash` function. * @example * - * _.mapKeys({ 'a': 1, 'b': 2 }, function(value, key) { - * return key + value; - * }); - * // => { 'a1': 1, 'b2': 2 } + * var lodash = _.noConflict(); */ - function mapKeys(object, iteratee) { - var result = {}; - iteratee = getIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, iteratee(value, key, object), value); - }); - return result; + function noConflict() { + if (root._ === this) { + root._ = oldDash; + } + return this; } /** - * Creates an object with the same keys as `object` and values generated - * by running each own enumerable string keyed property of `object` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, key, object). + * This method returns `undefined`. * * @static * @memberOf _ - * @since 2.4.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Object} Returns the new mapped object. - * @see _.mapKeys + * @since 2.3.0 + * @category Util * @example * - * var users = { - * 'fred': { 'user': 'fred', 'age': 40 }, - * 'pebbles': { 'user': 'pebbles', 'age': 1 } - * }; - * - * _.mapValues(users, function(o) { return o.age; }); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) - * - * // The `_.property` iteratee shorthand. - * _.mapValues(users, 'age'); - * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed) + * _.times(2, _.noop); + * // => [undefined, undefined] */ - function mapValues(object, iteratee) { - var result = {}; - iteratee = getIteratee(iteratee, 3); - - baseForOwn(object, function(value, key, object) { - baseAssignValue(result, key, iteratee(value, key, object)); - }); - return result; + function noop() { + // No operation performed. } /** - * This method is like `_.assign` except that it recursively merges own and - * inherited enumerable string keyed properties of source objects into the - * destination object. Source properties that resolve to `undefined` are - * skipped if a destination value exists. Array and plain object properties - * are merged recursively. Other objects and value types are overridden by - * assignment. Source objects are applied from left to right. Subsequent - * sources overwrite property assignments of previous sources. - * - * **Note:** This method mutates `object`. + * Creates a function that gets the argument at index `n`. If `n` is negative, + * the nth argument from the end is returned. * * @static * @memberOf _ - * @since 0.5.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. + * @since 4.0.0 + * @category Util + * @param {number} [n=0] The index of the argument to return. + * @returns {Function} Returns the new pass-thru function. * @example * - * var object = { - * 'a': [{ 'b': 2 }, { 'd': 4 }] - * }; - * - * var other = { - * 'a': [{ 'c': 3 }, { 'e': 5 }] - * }; + * var func = _.nthArg(1); + * func('a', 'b', 'c', 'd'); + * // => 'b' * - * _.merge(object, other); - * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] } + * var func = _.nthArg(-2); + * func('a', 'b', 'c', 'd'); + * // => 'c' */ - var merge = createAssigner(function(object, source, srcIndex) { - baseMerge(object, source, srcIndex); - }); + function nthArg(n) { + n = toInteger(n); + return baseRest(function(args) { + return baseNth(args, n); + }); + } /** - * This method is like `_.merge` except that it accepts `customizer` which - * is invoked to produce the merged values of the destination and source - * properties. If `customizer` returns `undefined`, merging is handled by the - * method instead. The `customizer` is invoked with six arguments: - * (objValue, srcValue, key, object, source, stack). - * - * **Note:** This method mutates `object`. + * Creates a function that invokes `iteratees` with the arguments it receives + * and returns their results. * * @static * @memberOf _ * @since 4.0.0 - * @category Object - * @param {Object} object The destination object. - * @param {...Object} sources The source objects. - * @param {Function} customizer The function to customize assigned values. - * @returns {Object} Returns `object`. + * @category Util + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to invoke. + * @returns {Function} Returns the new function. * @example * - * function customizer(objValue, srcValue) { - * if (_.isArray(objValue)) { - * return objValue.concat(srcValue); - * } - * } - * - * var object = { 'a': [1], 'b': [2] }; - * var other = { 'a': [3], 'b': [4] }; + * var func = _.over([Math.max, Math.min]); * - * _.mergeWith(object, other, customizer); - * // => { 'a': [1, 3], 'b': [2, 4] } + * func(1, 2, 3, 4); + * // => [4, 1] */ - var mergeWith = createAssigner(function(object, source, srcIndex, customizer) { - baseMerge(object, source, srcIndex, customizer); - }); + var over = createOver(arrayMap); /** - * The opposite of `_.pick`; this method creates an object composed of the - * own and inherited enumerable property paths of `object` that are not omitted. + * Creates a function that checks if **all** of the `predicates` return + * truthy when invoked with the arguments it receives. * - * **Note:** This method is considerably slower than `_.pick`. + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to omit. - * @returns {Object} Returns the new object. + * @since 4.0.0 + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. * @example * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * var func = _.overEvery([Boolean, isFinite]); * - * _.omit(object, ['a', 'c']); - * // => { 'b': '2' } + * func('1'); + * // => true + * + * func(null); + * // => false + * + * func(NaN); + * // => false */ - var omit = flatRest(function(object, paths) { - var result = {}; - if (object == null) { - return result; - } - var isDeep = false; - paths = arrayMap(paths, function(path) { - path = castPath(path, object); - isDeep || (isDeep = path.length > 1); - return path; - }); - copyObject(object, getAllKeysIn(object), result); - if (isDeep) { - result = baseClone(result, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone); - } - var length = paths.length; - while (length--) { - baseUnset(result, paths[length]); - } - return result; - }); + var overEvery = createOver(arrayEvery); /** - * The opposite of `_.pickBy`; this method creates an object composed of - * the own and inherited enumerable string keyed properties of `object` that - * `predicate` doesn't return truthy for. The predicate is invoked with two - * arguments: (value, key). + * Creates a function that checks if **any** of the `predicates` return + * truthy when invoked with the arguments it receives. + * + * Following shorthands are possible for providing predicates. + * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. + * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. * * @static * @memberOf _ * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. + * @category Util + * @param {...(Function|Function[])} [predicates=[_.identity]] + * The predicates to check. + * @returns {Function} Returns the new function. * @example * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * var func = _.overSome([Boolean, isFinite]); * - * _.omitBy(object, _.isNumber); - * // => { 'b': '2' } - */ - function omitBy(object, predicate) { - return pickBy(object, negate(getIteratee(predicate))); - } - - /** - * Creates an object composed of the picked `object` properties. + * func('1'); + * // => true * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The source object. - * @param {...(string|string[])} [paths] The property paths to pick. - * @returns {Object} Returns the new object. - * @example + * func(null); + * // => true * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * func(NaN); + * // => false * - * _.pick(object, ['a', 'c']); - * // => { 'a': 1, 'c': 3 } + * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) + * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) */ - var pick = flatRest(function(object, paths) { - return object == null ? {} : basePick(object, paths); - }); + var overSome = createOver(arraySome); /** - * Creates an object composed of the `object` properties `predicate` returns - * truthy for. The predicate is invoked with two arguments: (value, key). + * Creates a function that returns the value at `path` of a given object. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. + * @since 2.4.0 + * @category Util + * @param {Array|string} path The path of the property to get. + * @returns {Function} Returns the new accessor function. * @example * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * var objects = [ + * { 'a': { 'b': 2 } }, + * { 'a': { 'b': 1 } } + * ]; * - * _.pickBy(object, _.isNumber); - * // => { 'a': 1, 'c': 3 } + * _.map(objects, _.property('a.b')); + * // => [2, 1] + * + * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); + * // => [1, 2] */ - function pickBy(object, predicate) { - if (object == null) { - return {}; - } - var props = arrayMap(getAllKeysIn(object), function(prop) { - return [prop]; - }); - predicate = getIteratee(predicate); - return basePickBy(object, props, function(value, path) { - return predicate(value, path[0]); - }); + function property(path) { + return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); } /** - * This method is like `_.get` except that if the resolved value is a - * function it's invoked with the `this` binding of its parent object and - * its result is returned. + * The opposite of `_.property`; this method creates a function that returns + * the value at a given path of `object`. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object + * @since 3.0.0 + * @category Util * @param {Object} object The object to query. - * @param {Array|string} path The path of the property to resolve. - * @param {*} [defaultValue] The value returned for `undefined` resolved values. - * @returns {*} Returns the resolved value. + * @returns {Function} Returns the new accessor function. * @example * - * var object = { 'a': [{ 'b': { 'c1': 3, 'c2': _.constant(4) } }] }; - * - * _.result(object, 'a[0].b.c1'); - * // => 3 - * - * _.result(object, 'a[0].b.c2'); - * // => 4 + * var array = [0, 1, 2], + * object = { 'a': array, 'b': array, 'c': array }; * - * _.result(object, 'a[0].b.c3', 'default'); - * // => 'default' + * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); + * // => [2, 0] * - * _.result(object, 'a[0].b.c3', _.constant('default')); - * // => 'default' + * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); + * // => [2, 0] */ - function result(object, path, defaultValue) { - path = castPath(path, object); - - var index = -1, - length = path.length; - - // Ensure the loop is entered when path is empty. - if (!length) { - length = 1; - object = undefined; - } - while (++index < length) { - var value = object == null ? undefined : object[toKey(path[index])]; - if (value === undefined) { - index = length; - value = defaultValue; - } - object = isFunction(value) ? value.call(object) : value; - } - return object; + function propertyOf(object) { + return function(path) { + return object == null ? undefined : baseGet(object, path); + }; } /** - * Sets the value at `path` of `object`. If a portion of `path` doesn't exist, - * it's created. Arrays are created for missing index properties while objects - * are created for all other missing properties. Use `_.setWith` to customize - * `path` creation. + * Creates an array of numbers (positive and/or negative) progressing from + * `start` up to, but not including, `end`. A step of `-1` is used if a negative + * `start` is specified without an `end` or `step`. If `end` is not specified, + * it's set to `start` with `start` then set to `0`. * - * **Note:** This method mutates `object`. + * **Note:** JavaScript follows the IEEE-754 standard for resolving + * floating-point values which can produce unexpected results. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.7.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @returns {Object} Returns `object`. + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.rangeRight * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * _.range(4); + * // => [0, 1, 2, 3] * - * _.set(object, 'a[0].b.c', 4); - * console.log(object.a[0].b.c); - * // => 4 + * _.range(-4); + * // => [0, -1, -2, -3] * - * _.set(object, ['x', '0', 'y', 'z'], 5); - * console.log(object.x[0].y.z); - * // => 5 - */ - function set(object, path, value) { - return object == null ? object : baseSet(object, path, value); - } - - /** - * This method is like `_.set` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). + * _.range(1, 5); + * // => [1, 2, 3, 4] * - * **Note:** This method mutates `object`. + * _.range(0, 20, 5); + * // => [0, 5, 10, 15] * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {*} value The value to set. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. - * @example + * _.range(0, -4, -1); + * // => [0, -1, -2, -3] * - * var object = {}; + * _.range(1, 4, 0); + * // => [1, 1, 1] * - * _.setWith(object, '[0][1]', 'a', Object); - * // => { '0': { '1': 'a' } } + * _.range(0); + * // => [] */ - function setWith(object, path, value, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseSet(object, path, value, customizer); - } + var range = createRange(); /** - * Creates an array of own enumerable string keyed-value pairs for `object` - * which can be consumed by `_.fromPairs`. If `object` is a map or set, its - * entries are returned. + * This method is like `_.range` except that it populates values in + * descending order. * * @static * @memberOf _ * @since 4.0.0 - * @alias entries - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. + * @category Util + * @param {number} [start=0] The start of the range. + * @param {number} end The end of the range. + * @param {number} [step=1] The value to increment or decrement by. + * @returns {Array} Returns the range of numbers. + * @see _.inRange, _.range * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } + * _.rangeRight(4); + * // => [3, 2, 1, 0] * - * Foo.prototype.c = 3; + * _.rangeRight(-4); + * // => [-3, -2, -1, 0] * - * _.toPairs(new Foo); - * // => [['a', 1], ['b', 2]] (iteration order is not guaranteed) - */ - var toPairs = createToPairs(keys); - - /** - * Creates an array of own and inherited enumerable string keyed-value pairs - * for `object` which can be consumed by `_.fromPairs`. If `object` is a map - * or set, its entries are returned. + * _.rangeRight(1, 5); + * // => [4, 3, 2, 1] * - * @static - * @memberOf _ - * @since 4.0.0 - * @alias entriesIn - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the key-value pairs. - * @example + * _.rangeRight(0, 20, 5); + * // => [15, 10, 5, 0] * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } + * _.rangeRight(0, -4, -1); + * // => [-3, -2, -1, 0] * - * Foo.prototype.c = 3; + * _.rangeRight(1, 4, 0); + * // => [1, 1, 1] * - * _.toPairsIn(new Foo); - * // => [['a', 1], ['b', 2], ['c', 3]] (iteration order is not guaranteed) + * _.rangeRight(0); + * // => [] */ - var toPairsIn = createToPairs(keysIn); + var rangeRight = createRange(true); /** - * An alternative to `_.reduce`; this method transforms `object` to a new - * `accumulator` object which is the result of running each of its own - * enumerable string keyed properties thru `iteratee`, with each invocation - * potentially mutating the `accumulator` object. If `accumulator` is not - * provided, a new object with the same `[[Prototype]]` will be used. The - * iteratee is invoked with four arguments: (accumulator, value, key, object). - * Iteratee functions may exit iteration early by explicitly returning `false`. + * This method returns a new empty array. * * @static * @memberOf _ - * @since 1.3.0 - * @category Object - * @param {Object} object The object to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @param {*} [accumulator] The custom accumulator value. - * @returns {*} Returns the accumulated value. + * @since 4.13.0 + * @category Util + * @returns {Array} Returns the new empty array. * @example * - * _.transform([2, 3, 4], function(result, n) { - * result.push(n *= n); - * return n % 2 == 0; - * }, []); - * // => [4, 9] + * var arrays = _.times(2, _.stubArray); * - * _.transform({ 'a': 1, 'b': 2, 'c': 1 }, function(result, value, key) { - * (result[value] || (result[value] = [])).push(key); - * }, {}); - * // => { '1': ['a', 'c'], '2': ['b'] } + * console.log(arrays); + * // => [[], []] + * + * console.log(arrays[0] === arrays[1]); + * // => false */ - function transform(object, iteratee, accumulator) { - var isArr = isArray(object), - isArrLike = isArr || isBuffer(object) || isTypedArray(object); - - iteratee = getIteratee(iteratee, 4); - if (accumulator == null) { - var Ctor = object && object.constructor; - if (isArrLike) { - accumulator = isArr ? new Ctor : []; - } - else if (isObject(object)) { - accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {}; - } - else { - accumulator = {}; - } - } - (isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object) { - return iteratee(accumulator, value, index, object); - }); - return accumulator; + function stubArray() { + return []; } /** - * Removes the property at `path` of `object`. - * - * **Note:** This method mutates `object`. + * This method returns `false`. * * @static * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to unset. - * @returns {boolean} Returns `true` if the property is deleted, else `false`. + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `false`. * @example * - * var object = { 'a': [{ 'b': { 'c': 7 } }] }; - * _.unset(object, 'a[0].b.c'); - * // => true - * - * console.log(object); - * // => { 'a': [{ 'b': {} }] }; - * - * _.unset(object, ['a', '0', 'b', 'c']); - * // => true - * - * console.log(object); - * // => { 'a': [{ 'b': {} }] }; + * _.times(2, _.stubFalse); + * // => [false, false] */ - function unset(object, path) { - return object == null ? true : baseUnset(object, path); + function stubFalse() { + return false; } /** - * This method is like `_.set` except that accepts `updater` to produce the - * value to set. Use `_.updateWith` to customize `path` creation. The `updater` - * is invoked with one argument: (value). - * - * **Note:** This method mutates `object`. + * This method returns a new empty object. * * @static * @memberOf _ - * @since 4.6.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {Function} updater The function to produce the updated value. - * @returns {Object} Returns `object`. + * @since 4.13.0 + * @category Util + * @returns {Object} Returns the new empty object. * @example * - * var object = { 'a': [{ 'b': { 'c': 3 } }] }; + * var objects = _.times(2, _.stubObject); * - * _.update(object, 'a[0].b.c', function(n) { return n * n; }); - * console.log(object.a[0].b.c); - * // => 9 + * console.log(objects); + * // => [{}, {}] * - * _.update(object, 'x[0].y.z', function(n) { return n ? n + 1 : 0; }); - * console.log(object.x[0].y.z); - * // => 0 + * console.log(objects[0] === objects[1]); + * // => false */ - function update(object, path, updater) { - return object == null ? object : baseUpdate(object, path, castFunction(updater)); + function stubObject() { + return {}; } /** - * This method is like `_.update` except that it accepts `customizer` which is - * invoked to produce the objects of `path`. If `customizer` returns `undefined` - * path creation is handled by the method instead. The `customizer` is invoked - * with three arguments: (nsValue, key, nsObject). - * - * **Note:** This method mutates `object`. + * This method returns an empty string. * * @static * @memberOf _ - * @since 4.6.0 - * @category Object - * @param {Object} object The object to modify. - * @param {Array|string} path The path of the property to set. - * @param {Function} updater The function to produce the updated value. - * @param {Function} [customizer] The function to customize assigned values. - * @returns {Object} Returns `object`. + * @since 4.13.0 + * @category Util + * @returns {string} Returns the empty string. * @example * - * var object = {}; - * - * _.updateWith(object, '[0][1]', _.constant('a'), Object); - * // => { '0': { '1': 'a' } } + * _.times(2, _.stubString); + * // => ['', ''] */ - function updateWith(object, path, updater, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - return object == null ? object : baseUpdate(object, path, castFunction(updater), customizer); + function stubString() { + return ''; } /** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. + * This method returns `true`. * * @static - * @since 0.1.0 * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. + * @since 4.13.0 + * @category Util + * @returns {boolean} Returns `true`. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] + * _.times(2, _.stubTrue); + * // => [true, true] */ - function values(object) { - return object == null ? [] : baseValues(object, keys(object)); + function stubTrue() { + return true; } /** - * Creates an array of the own and inherited enumerable string keyed property - * values of `object`. - * - * **Note:** Non-object values are coerced to objects. + * Invokes the iteratee `n` times, returning an array of the results of + * each invocation. The iteratee is invoked with one argument; (index). * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.0.0 - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. + * @category Util + * @param {number} n The number of times to invoke `iteratee`. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the array of results. * @example * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; + * _.times(3, String); + * // => ['0', '1', '2'] * - * _.valuesIn(new Foo); - * // => [1, 2, 3] (iteration order is not guaranteed) + * _.times(4, _.constant(0)); + * // => [0, 0, 0, 0] */ - function valuesIn(object) { - return object == null ? [] : baseValues(object, keysIn(object)); - } + function times(n, iteratee) { + n = toInteger(n); + if (n < 1 || n > MAX_SAFE_INTEGER) { + return []; + } + var index = MAX_ARRAY_LENGTH, + length = nativeMin(n, MAX_ARRAY_LENGTH); - /*------------------------------------------------------------------------*/ + iteratee = getIteratee(iteratee); + n -= MAX_ARRAY_LENGTH; - /** - * Clamps `number` within the inclusive `lower` and `upper` bounds. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Number - * @param {number} number The number to clamp. - * @param {number} [lower] The lower bound. - * @param {number} upper The upper bound. - * @returns {number} Returns the clamped number. - * @example - * - * _.clamp(-10, -5, 5); - * // => -5 - * - * _.clamp(10, -5, 5); - * // => 5 - */ - function clamp(number, lower, upper) { - if (upper === undefined) { - upper = lower; - lower = undefined; - } - if (upper !== undefined) { - upper = toNumber(upper); - upper = upper === upper ? upper : 0; - } - if (lower !== undefined) { - lower = toNumber(lower); - lower = lower === lower ? lower : 0; + var result = baseTimes(length, iteratee); + while (++index < n) { + iteratee(index); } - return baseClamp(toNumber(number), lower, upper); + return result; } /** - * Checks if `n` is between `start` and up to, but not including, `end`. If - * `end` is not specified, it's set to `start` with `start` then set to `0`. - * If `start` is greater than `end` the params are swapped to support - * negative ranges. + * Converts `value` to a property path array. * * @static * @memberOf _ - * @since 3.3.0 - * @category Number - * @param {number} number The number to check. - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @returns {boolean} Returns `true` if `number` is in the range, else `false`. - * @see _.range, _.rangeRight + * @since 4.0.0 + * @category Util + * @param {*} value The value to convert. + * @returns {Array} Returns the new property path array. * @example * - * _.inRange(3, 2, 4); - * // => true - * - * _.inRange(4, 8); - * // => true - * - * _.inRange(4, 2); - * // => false - * - * _.inRange(2, 2); - * // => false - * - * _.inRange(1.2, 2); - * // => true - * - * _.inRange(5.2, 4); - * // => false + * _.toPath('a.b.c'); + * // => ['a', 'b', 'c'] * - * _.inRange(-3, -2, -6); - * // => true + * _.toPath('a[0].b.c'); + * // => ['a', '0', 'b', 'c'] */ - function inRange(number, start, end) { - start = toFinite(start); - if (end === undefined) { - end = start; - start = 0; - } else { - end = toFinite(end); + function toPath(value) { + if (isArray(value)) { + return arrayMap(value, toKey); } - number = toNumber(number); - return baseInRange(number, start, end); + return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); } /** - * Produces a random number between the inclusive `lower` and `upper` bounds. - * If only one argument is provided a number between `0` and the given number - * is returned. If `floating` is `true`, or either `lower` or `upper` are - * floats, a floating-point number is returned instead of an integer. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. + * Generates a unique ID. If `prefix` is given, the ID is appended to it. * * @static + * @since 0.1.0 * @memberOf _ - * @since 0.7.0 - * @category Number - * @param {number} [lower=0] The lower bound. - * @param {number} [upper=1] The upper bound. - * @param {boolean} [floating] Specify returning a floating-point number. - * @returns {number} Returns the random number. + * @category Util + * @param {string} [prefix=''] The value to prefix the ID with. + * @returns {string} Returns the unique ID. * @example * - * _.random(0, 5); - * // => an integer between 0 and 5 - * - * _.random(5); - * // => also an integer between 0 and 5 - * - * _.random(5, true); - * // => a floating-point number between 0 and 5 + * _.uniqueId('contact_'); + * // => 'contact_104' * - * _.random(1.2, 5.2); - * // => a floating-point number between 1.2 and 5.2 + * _.uniqueId(); + * // => '105' */ - function random(lower, upper, floating) { - if (floating && typeof floating != 'boolean' && isIterateeCall(lower, upper, floating)) { - upper = floating = undefined; - } - if (floating === undefined) { - if (typeof upper == 'boolean') { - floating = upper; - upper = undefined; - } - else if (typeof lower == 'boolean') { - floating = lower; - lower = undefined; - } - } - if (lower === undefined && upper === undefined) { - lower = 0; - upper = 1; - } - else { - lower = toFinite(lower); - if (upper === undefined) { - upper = lower; - lower = 0; - } else { - upper = toFinite(upper); - } - } - if (lower > upper) { - var temp = lower; - lower = upper; - upper = temp; - } - if (floating || lower % 1 || upper % 1) { - var rand = nativeRandom(); - return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper); - } - return baseRandom(lower, upper); + function uniqueId(prefix) { + var id = ++idCounter; + return toString(prefix) + id; } /*------------------------------------------------------------------------*/ /** - * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase). + * Adds two numbers. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the camel cased string. + * @since 3.4.0 + * @category Math + * @param {number} augend The first number in an addition. + * @param {number} addend The second number in an addition. + * @returns {number} Returns the total. * @example * - * _.camelCase('Foo Bar'); - * // => 'fooBar' - * - * _.camelCase('--foo-bar--'); - * // => 'fooBar' - * - * _.camelCase('__FOO_BAR__'); - * // => 'fooBar' + * _.add(6, 4); + * // => 10 */ - var camelCase = createCompounder(function(result, word, index) { - word = word.toLowerCase(); - return result + (index ? capitalize(word) : word); - }); + var add = createMathOperation(function(augend, addend) { + return augend + addend; + }, 0); /** - * Converts the first character of `string` to upper case and the remaining - * to lower case. + * Computes `number` rounded up to `precision`. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to capitalize. - * @returns {string} Returns the capitalized string. + * @since 3.10.0 + * @category Math + * @param {number} number The number to round up. + * @param {number} [precision=0] The precision to round up to. + * @returns {number} Returns the rounded up number. * @example * - * _.capitalize('FRED'); - * // => 'Fred' - */ - function capitalize(string) { - return upperFirst(toString(string).toLowerCase()); - } - - /** - * Deburrs `string` by converting - * [Latin-1 Supplement](https://en.wikipedia.org/wiki/Latin-1_Supplement_(Unicode_block)#Character_table) - * and [Latin Extended-A](https://en.wikipedia.org/wiki/Latin_Extended-A) - * letters to basic Latin letters and removing - * [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks). + * _.ceil(4.006); + * // => 5 * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to deburr. - * @returns {string} Returns the deburred string. - * @example + * _.ceil(6.004, 2); + * // => 6.01 * - * _.deburr('déjà vu'); - * // => 'deja vu' + * _.ceil(6040, -2); + * // => 6100 */ - function deburr(string) { - string = toString(string); - return string && string.replace(reLatin, deburrLetter).replace(reComboMark, ''); - } + var ceil = createRound('ceil'); /** - * Checks if `string` ends with the given target string. + * Divide two numbers. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=string.length] The position to search up to. - * @returns {boolean} Returns `true` if `string` ends with `target`, - * else `false`. + * @since 4.7.0 + * @category Math + * @param {number} dividend The first number in a division. + * @param {number} divisor The second number in a division. + * @returns {number} Returns the quotient. * @example * - * _.endsWith('abc', 'c'); - * // => true - * - * _.endsWith('abc', 'b'); - * // => false - * - * _.endsWith('abc', 'b', 2); - * // => true + * _.divide(6, 4); + * // => 1.5 */ - function endsWith(string, target, position) { - string = toString(string); - target = baseToString(target); - - var length = string.length; - position = position === undefined - ? length - : baseClamp(toInteger(position), 0, length); - - var end = position; - position -= target.length; - return position >= 0 && string.slice(position, end) == target; - } + var divide = createMathOperation(function(dividend, divisor) { + return dividend / divisor; + }, 1); /** - * Converts the characters "&", "<", ">", '"', and "'" in `string` to their - * corresponding HTML entities. - * - * **Note:** No other characters are escaped. To escape additional - * characters use a third-party library like [_he_](https://mths.be/he). - * - * Though the ">" character is escaped for symmetry, characters like - * ">" and "/" don't need escaping in HTML and have no special meaning - * unless they're part of a tag or unquoted attribute value. See - * [Mathias Bynens's article](https://mathiasbynens.be/notes/ambiguous-ampersands) - * (under "semi-related fun fact") for more details. - * - * When working with HTML you should always - * [quote attribute values](http://wonko.com/post/html-escaping) to reduce - * XSS vectors. + * Computes `number` rounded down to `precision`. * * @static - * @since 0.1.0 * @memberOf _ - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. + * @since 3.10.0 + * @category Math + * @param {number} number The number to round down. + * @param {number} [precision=0] The precision to round down to. + * @returns {number} Returns the rounded down number. * @example * - * _.escape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function escape(string) { - string = toString(string); - return (string && reHasUnescapedHtml.test(string)) - ? string.replace(reUnescapedHtml, escapeHtmlChar) - : string; - } - - /** - * Escapes the `RegExp` special characters "^", "$", "\", ".", "*", "+", - * "?", "(", ")", "[", "]", "{", "}", and "|" in `string`. + * _.floor(4.006); + * // => 4 * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to escape. - * @returns {string} Returns the escaped string. - * @example + * _.floor(0.046, 2); + * // => 0.04 * - * _.escapeRegExp('[lodash](https://lodash.com/)'); - * // => '\[lodash\]\(https://lodash\.com/\)' + * _.floor(4060, -2); + * // => 4000 */ - function escapeRegExp(string) { - string = toString(string); - return (string && reHasRegExpChar.test(string)) - ? string.replace(reRegExpChar, '\\$&') - : string; - } + var floor = createRound('floor'); /** - * Converts `string` to - * [kebab case](https://en.wikipedia.org/wiki/Letter_case#Special_case_styles). + * Computes the maximum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. * * @static + * @since 0.1.0 * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the kebab cased string. + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the maximum value. * @example * - * _.kebabCase('Foo Bar'); - * // => 'foo-bar' - * - * _.kebabCase('fooBar'); - * // => 'foo-bar' + * _.max([4, 2, 8, 6]); + * // => 8 * - * _.kebabCase('__FOO_BAR__'); - * // => 'foo-bar' + * _.max([]); + * // => undefined */ - var kebabCase = createCompounder(function(result, word, index) { - return result + (index ? '-' : '') + word.toLowerCase(); - }); + function max(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseGt) + : undefined; + } /** - * Converts `string`, as space separated words, to lower case. + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the lower cased string. + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. * @example * - * _.lowerCase('--Foo-Bar--'); - * // => 'foo bar' + * var objects = [{ 'n': 1 }, { 'n': 2 }]; * - * _.lowerCase('fooBar'); - * // => 'foo bar' + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } * - * _.lowerCase('__FOO_BAR__'); - * // => 'foo bar' + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } */ - var lowerCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + word.toLowerCase(); - }); + function maxBy(array, iteratee) { + return (array && array.length) + ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) + : undefined; + } /** - * Converts the first character of `string` to lower case. + * Computes the mean of the values in `array`. * * @static * @memberOf _ * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the mean. * @example * - * _.lowerFirst('Fred'); - * // => 'fred' - * - * _.lowerFirst('FRED'); - * // => 'fRED' + * _.mean([4, 2, 8, 6]); + * // => 5 */ - var lowerFirst = createCaseFirst('toLowerCase'); + function mean(array) { + return baseMean(array, identity); + } /** - * Pads `string` on the left and right sides if it's shorter than `length`. - * Padding characters are truncated if they can't be evenly divided by `length`. + * This method is like `_.mean` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be averaged. + * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. + * @since 4.7.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the mean. * @example * - * _.pad('abc', 8); - * // => ' abc ' + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; * - * _.pad('abc', 8, '_-'); - * // => '_-abc_-_' + * _.meanBy(objects, function(o) { return o.n; }); + * // => 5 * - * _.pad('abc', 3); - * // => 'abc' + * // The `_.property` iteratee shorthand. + * _.meanBy(objects, 'n'); + * // => 5 */ - function pad(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - if (!length || strLength >= length) { - return string; - } - var mid = (length - strLength) / 2; - return ( - createPadding(nativeFloor(mid), chars) + - string + - createPadding(nativeCeil(mid), chars) - ); + function meanBy(array, iteratee) { + return baseMean(array, getIteratee(iteratee, 2)); } /** - * Pads `string` on the right side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. + * Computes the minimum value of `array`. If `array` is empty or falsey, + * `undefined` is returned. * * @static + * @since 0.1.0 * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. + * @category Math + * @param {Array} array The array to iterate over. + * @returns {*} Returns the minimum value. * @example * - * _.padEnd('abc', 6); - * // => 'abc ' - * - * _.padEnd('abc', 6, '_-'); - * // => 'abc_-_' + * _.min([4, 2, 8, 6]); + * // => 2 * - * _.padEnd('abc', 3); - * // => 'abc' + * _.min([]); + * // => undefined */ - function padEnd(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (string + createPadding(length - strLength, chars)) - : string; + function min(array) { + return (array && array.length) + ? baseExtremum(array, identity, baseLt) + : undefined; } /** - * Pads `string` on the left side if it's shorter than `length`. Padding - * characters are truncated if they exceed `length`. + * This method is like `_.min` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to pad. - * @param {number} [length=0] The padding length. - * @param {string} [chars=' '] The string used as padding. - * @returns {string} Returns the padded string. + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the minimum value. * @example * - * _.padStart('abc', 6); - * // => ' abc' + * var objects = [{ 'n': 1 }, { 'n': 2 }]; * - * _.padStart('abc', 6, '_-'); - * // => '_-_abc' + * _.minBy(objects, function(o) { return o.n; }); + * // => { 'n': 1 } * - * _.padStart('abc', 3); - * // => 'abc' + * // The `_.property` iteratee shorthand. + * _.minBy(objects, 'n'); + * // => { 'n': 1 } */ - function padStart(string, length, chars) { - string = toString(string); - length = toInteger(length); - - var strLength = length ? stringSize(string) : 0; - return (length && strLength < length) - ? (createPadding(length - strLength, chars) + string) - : string; + function minBy(array, iteratee) { + return (array && array.length) + ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) + : undefined; } /** - * Converts `string` to an integer of the specified radix. If `radix` is - * `undefined` or `0`, a `radix` of `10` is used unless `value` is a - * hexadecimal, in which case a `radix` of `16` is used. - * - * **Note:** This method aligns with the - * [ES5 implementation](https://es5.github.io/#x15.1.2.2) of `parseInt`. + * Multiply two numbers. * * @static * @memberOf _ - * @since 1.1.0 - * @category String - * @param {string} string The string to convert. - * @param {number} [radix=10] The radix to interpret `value` by. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {number} Returns the converted integer. + * @since 4.7.0 + * @category Math + * @param {number} multiplier The first number in a multiplication. + * @param {number} multiplicand The second number in a multiplication. + * @returns {number} Returns the product. * @example * - * _.parseInt('08'); - * // => 8 - * - * _.map(['6', '08', '10'], _.parseInt); - * // => [6, 8, 10] + * _.multiply(6, 4); + * // => 24 */ - function parseInt(string, radix, guard) { - if (guard || radix == null) { - radix = 0; - } else if (radix) { - radix = +radix; - } - return nativeParseInt(toString(string).replace(reTrimStart, ''), radix || 0); - } + var multiply = createMathOperation(function(multiplier, multiplicand) { + return multiplier * multiplicand; + }, 1); /** - * Repeats the given string `n` times. + * Computes `number` rounded to `precision`. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to repeat. - * @param {number} [n=1] The number of times to repeat the string. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the repeated string. + * @since 3.10.0 + * @category Math + * @param {number} number The number to round. + * @param {number} [precision=0] The precision to round to. + * @returns {number} Returns the rounded number. * @example * - * _.repeat('*', 3); - * // => '***' + * _.round(4.006); + * // => 4 * - * _.repeat('abc', 2); - * // => 'abcabc' + * _.round(4.006, 2); + * // => 4.01 * - * _.repeat('abc', 0); - * // => '' + * _.round(4060, -2); + * // => 4100 */ - function repeat(string, n, guard) { - if ((guard ? isIterateeCall(string, n, guard) : n === undefined)) { - n = 1; - } else { - n = toInteger(n); - } - return baseRepeat(toString(string), n); - } + var round = createRound('round'); /** - * Replaces matches for `pattern` in `string` with `replacement`. - * - * **Note:** This method is based on - * [`String#replace`](https://mdn.io/String/replace). + * Subtract two numbers. * * @static * @memberOf _ * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to modify. - * @param {RegExp|string} pattern The pattern to replace. - * @param {Function|string} replacement The match replacement. - * @returns {string} Returns the modified string. + * @category Math + * @param {number} minuend The first number in a subtraction. + * @param {number} subtrahend The second number in a subtraction. + * @returns {number} Returns the difference. * @example * - * _.replace('Hi Fred', 'Fred', 'Barney'); - * // => 'Hi Barney' + * _.subtract(6, 4); + * // => 2 */ - function replace() { - var args = arguments, - string = toString(args[0]); - - return args.length < 3 ? string : string.replace(args[1], args[2]); - } + var subtract = createMathOperation(function(minuend, subtrahend) { + return minuend - subtrahend; + }, 0); /** - * Converts `string` to - * [snake case](https://en.wikipedia.org/wiki/Snake_case). + * Computes the sum of the values in `array`. * * @static * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the snake cased string. + * @since 3.4.0 + * @category Math + * @param {Array} array The array to iterate over. + * @returns {number} Returns the sum. * @example * - * _.snakeCase('Foo Bar'); - * // => 'foo_bar' - * - * _.snakeCase('fooBar'); - * // => 'foo_bar' - * - * _.snakeCase('--FOO-BAR--'); - * // => 'foo_bar' + * _.sum([4, 2, 8, 6]); + * // => 20 */ - var snakeCase = createCompounder(function(result, word, index) { - return result + (index ? '_' : '') + word.toLowerCase(); - }); + function sum(array) { + return (array && array.length) + ? baseSum(array, identity) + : 0; + } /** - * Splits `string` by `separator`. - * - * **Note:** This method is based on - * [`String#split`](https://mdn.io/String/split). + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). * * @static * @memberOf _ * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to split. - * @param {RegExp|string} separator The separator pattern to split by. - * @param {number} [limit] The length to truncate results to. - * @returns {Array} Returns the string segments. + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. * @example * - * _.split('a-b-c', '-', 2); - * // => ['a', 'b'] - */ - function split(string, separator, limit) { - if (limit && typeof limit != 'number' && isIterateeCall(string, separator, limit)) { - separator = limit = undefined; - } - limit = limit === undefined ? MAX_ARRAY_LENGTH : limit >>> 0; - if (!limit) { - return []; - } - string = toString(string); - if (string && ( - typeof separator == 'string' || - (separator != null && !isRegExp(separator)) - )) { - separator = baseToString(separator); - if (!separator && hasUnicode(string)) { - return castSlice(stringToArray(string), 0, limit); - } - } - return string.split(separator, limit); - } - - /** - * Converts `string` to - * [start case](https://en.wikipedia.org/wiki/Letter_case#Stylistic_or_specialised_usage). + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; * - * @static - * @memberOf _ - * @since 3.1.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the start cased string. - * @example - * - * _.startCase('--foo-bar--'); - * // => 'Foo Bar' - * - * _.startCase('fooBar'); - * // => 'Foo Bar' + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 * - * _.startCase('__FOO_BAR__'); - * // => 'FOO BAR' + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 */ - var startCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + upperFirst(word); - }); + function sumBy(array, iteratee) { + return (array && array.length) + ? baseSum(array, getIteratee(iteratee, 2)) + : 0; + } - /** - * Checks if `string` starts with the given target string. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {string} [target] The string to search for. - * @param {number} [position=0] The position to search from. - * @returns {boolean} Returns `true` if `string` starts with `target`, - * else `false`. - * @example - * - * _.startsWith('abc', 'a'); - * // => true - * - * _.startsWith('abc', 'b'); - * // => false - * - * _.startsWith('abc', 'b', 1); - * // => true - */ - function startsWith(string, target, position) { - string = toString(string); - position = position == null - ? 0 - : baseClamp(toInteger(position), 0, string.length); + /*------------------------------------------------------------------------*/ - target = baseToString(target); - return string.slice(position, position + target.length) == target; - } + // Add methods that return wrapped values in chain sequences. + lodash.after = after; + lodash.ary = ary; + lodash.assign = assign; + lodash.assignIn = assignIn; + lodash.assignInWith = assignInWith; + lodash.assignWith = assignWith; + lodash.at = at; + lodash.before = before; + lodash.bind = bind; + lodash.bindAll = bindAll; + lodash.bindKey = bindKey; + lodash.castArray = castArray; + lodash.chain = chain; + lodash.chunk = chunk; + lodash.compact = compact; + lodash.concat = concat; + lodash.cond = cond; + lodash.conforms = conforms; + lodash.constant = constant; + lodash.countBy = countBy; + lodash.create = create; + lodash.curry = curry; + lodash.curryRight = curryRight; + lodash.debounce = debounce; + lodash.defaults = defaults; + lodash.defaultsDeep = defaultsDeep; + lodash.defer = defer; + lodash.delay = delay; + lodash.difference = difference; + lodash.differenceBy = differenceBy; + lodash.differenceWith = differenceWith; + lodash.drop = drop; + lodash.dropRight = dropRight; + lodash.dropRightWhile = dropRightWhile; + lodash.dropWhile = dropWhile; + lodash.fill = fill; + lodash.filter = filter; + lodash.flatMap = flatMap; + lodash.flatMapDeep = flatMapDeep; + lodash.flatMapDepth = flatMapDepth; + lodash.flatten = flatten; + lodash.flattenDeep = flattenDeep; + lodash.flattenDepth = flattenDepth; + lodash.flip = flip; + lodash.flow = flow; + lodash.flowRight = flowRight; + lodash.fromPairs = fromPairs; + lodash.functions = functions; + lodash.functionsIn = functionsIn; + lodash.groupBy = groupBy; + lodash.initial = initial; + lodash.intersection = intersection; + lodash.intersectionBy = intersectionBy; + lodash.intersectionWith = intersectionWith; + lodash.invert = invert; + lodash.invertBy = invertBy; + lodash.invokeMap = invokeMap; + lodash.iteratee = iteratee; + lodash.keyBy = keyBy; + lodash.keys = keys; + lodash.keysIn = keysIn; + lodash.map = map; + lodash.mapKeys = mapKeys; + lodash.mapValues = mapValues; + lodash.matches = matches; + lodash.matchesProperty = matchesProperty; + lodash.memoize = memoize; + lodash.merge = merge; + lodash.mergeWith = mergeWith; + lodash.method = method; + lodash.methodOf = methodOf; + lodash.mixin = mixin; + lodash.negate = negate; + lodash.nthArg = nthArg; + lodash.omit = omit; + lodash.omitBy = omitBy; + lodash.once = once; + lodash.orderBy = orderBy; + lodash.over = over; + lodash.overArgs = overArgs; + lodash.overEvery = overEvery; + lodash.overSome = overSome; + lodash.partial = partial; + lodash.partialRight = partialRight; + lodash.partition = partition; + lodash.pick = pick; + lodash.pickBy = pickBy; + lodash.property = property; + lodash.propertyOf = propertyOf; + lodash.pull = pull; + lodash.pullAll = pullAll; + lodash.pullAllBy = pullAllBy; + lodash.pullAllWith = pullAllWith; + lodash.pullAt = pullAt; + lodash.range = range; + lodash.rangeRight = rangeRight; + lodash.rearg = rearg; + lodash.reject = reject; + lodash.remove = remove; + lodash.rest = rest; + lodash.reverse = reverse; + lodash.sampleSize = sampleSize; + lodash.set = set; + lodash.setWith = setWith; + lodash.shuffle = shuffle; + lodash.slice = slice; + lodash.sortBy = sortBy; + lodash.sortedUniq = sortedUniq; + lodash.sortedUniqBy = sortedUniqBy; + lodash.split = split; + lodash.spread = spread; + lodash.tail = tail; + lodash.take = take; + lodash.takeRight = takeRight; + lodash.takeRightWhile = takeRightWhile; + lodash.takeWhile = takeWhile; + lodash.tap = tap; + lodash.throttle = throttle; + lodash.thru = thru; + lodash.toArray = toArray; + lodash.toPairs = toPairs; + lodash.toPairsIn = toPairsIn; + lodash.toPath = toPath; + lodash.toPlainObject = toPlainObject; + lodash.transform = transform; + lodash.unary = unary; + lodash.union = union; + lodash.unionBy = unionBy; + lodash.unionWith = unionWith; + lodash.uniq = uniq; + lodash.uniqBy = uniqBy; + lodash.uniqWith = uniqWith; + lodash.unset = unset; + lodash.unzip = unzip; + lodash.unzipWith = unzipWith; + lodash.update = update; + lodash.updateWith = updateWith; + lodash.values = values; + lodash.valuesIn = valuesIn; + lodash.without = without; + lodash.words = words; + lodash.wrap = wrap; + lodash.xor = xor; + lodash.xorBy = xorBy; + lodash.xorWith = xorWith; + lodash.zip = zip; + lodash.zipObject = zipObject; + lodash.zipObjectDeep = zipObjectDeep; + lodash.zipWith = zipWith; + + // Add aliases. + lodash.entries = toPairs; + lodash.entriesIn = toPairsIn; + lodash.extend = assignIn; + lodash.extendWith = assignInWith; + + // Add methods to `lodash.prototype`. + mixin(lodash, lodash); + + /*------------------------------------------------------------------------*/ + + // Add methods that return unwrapped values in chain sequences. + lodash.add = add; + lodash.attempt = attempt; + lodash.camelCase = camelCase; + lodash.capitalize = capitalize; + lodash.ceil = ceil; + lodash.clamp = clamp; + lodash.clone = clone; + lodash.cloneDeep = cloneDeep; + lodash.cloneDeepWith = cloneDeepWith; + lodash.cloneWith = cloneWith; + lodash.conformsTo = conformsTo; + lodash.deburr = deburr; + lodash.defaultTo = defaultTo; + lodash.divide = divide; + lodash.endsWith = endsWith; + lodash.eq = eq; + lodash.escape = escape; + lodash.escapeRegExp = escapeRegExp; + lodash.every = every; + lodash.find = find; + lodash.findIndex = findIndex; + lodash.findKey = findKey; + lodash.findLast = findLast; + lodash.findLastIndex = findLastIndex; + lodash.findLastKey = findLastKey; + lodash.floor = floor; + lodash.forEach = forEach; + lodash.forEachRight = forEachRight; + lodash.forIn = forIn; + lodash.forInRight = forInRight; + lodash.forOwn = forOwn; + lodash.forOwnRight = forOwnRight; + lodash.get = get; + lodash.gt = gt; + lodash.gte = gte; + lodash.has = has; + lodash.hasIn = hasIn; + lodash.head = head; + lodash.identity = identity; + lodash.includes = includes; + lodash.indexOf = indexOf; + lodash.inRange = inRange; + lodash.invoke = invoke; + lodash.isArguments = isArguments; + lodash.isArray = isArray; + lodash.isArrayBuffer = isArrayBuffer; + lodash.isArrayLike = isArrayLike; + lodash.isArrayLikeObject = isArrayLikeObject; + lodash.isBoolean = isBoolean; + lodash.isBuffer = isBuffer; + lodash.isDate = isDate; + lodash.isElement = isElement; + lodash.isEmpty = isEmpty; + lodash.isEqual = isEqual; + lodash.isEqualWith = isEqualWith; + lodash.isError = isError; + lodash.isFinite = isFinite; + lodash.isFunction = isFunction; + lodash.isInteger = isInteger; + lodash.isLength = isLength; + lodash.isMap = isMap; + lodash.isMatch = isMatch; + lodash.isMatchWith = isMatchWith; + lodash.isNaN = isNaN; + lodash.isNative = isNative; + lodash.isNil = isNil; + lodash.isNull = isNull; + lodash.isNumber = isNumber; + lodash.isObject = isObject; + lodash.isObjectLike = isObjectLike; + lodash.isPlainObject = isPlainObject; + lodash.isRegExp = isRegExp; + lodash.isSafeInteger = isSafeInteger; + lodash.isSet = isSet; + lodash.isString = isString; + lodash.isSymbol = isSymbol; + lodash.isTypedArray = isTypedArray; + lodash.isUndefined = isUndefined; + lodash.isWeakMap = isWeakMap; + lodash.isWeakSet = isWeakSet; + lodash.join = join; + lodash.kebabCase = kebabCase; + lodash.last = last; + lodash.lastIndexOf = lastIndexOf; + lodash.lowerCase = lowerCase; + lodash.lowerFirst = lowerFirst; + lodash.lt = lt; + lodash.lte = lte; + lodash.max = max; + lodash.maxBy = maxBy; + lodash.mean = mean; + lodash.meanBy = meanBy; + lodash.min = min; + lodash.minBy = minBy; + lodash.stubArray = stubArray; + lodash.stubFalse = stubFalse; + lodash.stubObject = stubObject; + lodash.stubString = stubString; + lodash.stubTrue = stubTrue; + lodash.multiply = multiply; + lodash.nth = nth; + lodash.noConflict = noConflict; + lodash.noop = noop; + lodash.now = now; + lodash.pad = pad; + lodash.padEnd = padEnd; + lodash.padStart = padStart; + lodash.parseInt = parseInt; + lodash.random = random; + lodash.reduce = reduce; + lodash.reduceRight = reduceRight; + lodash.repeat = repeat; + lodash.replace = replace; + lodash.result = result; + lodash.round = round; + lodash.runInContext = runInContext; + lodash.sample = sample; + lodash.size = size; + lodash.snakeCase = snakeCase; + lodash.some = some; + lodash.sortedIndex = sortedIndex; + lodash.sortedIndexBy = sortedIndexBy; + lodash.sortedIndexOf = sortedIndexOf; + lodash.sortedLastIndex = sortedLastIndex; + lodash.sortedLastIndexBy = sortedLastIndexBy; + lodash.sortedLastIndexOf = sortedLastIndexOf; + lodash.startCase = startCase; + lodash.startsWith = startsWith; + lodash.subtract = subtract; + lodash.sum = sum; + lodash.sumBy = sumBy; + lodash.template = template; + lodash.times = times; + lodash.toFinite = toFinite; + lodash.toInteger = toInteger; + lodash.toLength = toLength; + lodash.toLower = toLower; + lodash.toNumber = toNumber; + lodash.toSafeInteger = toSafeInteger; + lodash.toString = toString; + lodash.toUpper = toUpper; + lodash.trim = trim; + lodash.trimEnd = trimEnd; + lodash.trimStart = trimStart; + lodash.truncate = truncate; + lodash.unescape = unescape; + lodash.uniqueId = uniqueId; + lodash.upperCase = upperCase; + lodash.upperFirst = upperFirst; + + // Add aliases. + lodash.each = forEach; + lodash.eachRight = forEachRight; + lodash.first = head; + + mixin(lodash, (function() { + var source = {}; + baseForOwn(lodash, function(func, methodName) { + if (!hasOwnProperty.call(lodash.prototype, methodName)) { + source[methodName] = func; + } + }); + return source; + }()), { 'chain': false }); + + /*------------------------------------------------------------------------*/ /** - * Creates a compiled template function that can interpolate data properties - * in "interpolate" delimiters, HTML-escape interpolated data properties in - * "escape" delimiters, and execute JavaScript in "evaluate" delimiters. Data - * properties may be accessed as free variables in the template. If a setting - * object is given, it takes precedence over `_.templateSettings` values. - * - * **Note:** In the development build `_.template` utilizes - * [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * for easier debugging. - * - * For more information on precompiling templates see - * [lodash's custom builds documentation](https://lodash.com/custom-builds). - * - * For more information on Chrome extension sandboxes see - * [Chrome's extensions documentation](https://developer.chrome.com/extensions/sandboxingEval). + * The semantic version number. * * @static - * @since 0.1.0 * @memberOf _ - * @category String - * @param {string} [string=''] The template string. - * @param {Object} [options={}] The options object. - * @param {RegExp} [options.escape=_.templateSettings.escape] - * The HTML "escape" delimiter. - * @param {RegExp} [options.evaluate=_.templateSettings.evaluate] - * The "evaluate" delimiter. - * @param {Object} [options.imports=_.templateSettings.imports] - * An object to import into the template as free variables. - * @param {RegExp} [options.interpolate=_.templateSettings.interpolate] - * The "interpolate" delimiter. - * @param {string} [options.sourceURL='lodash.templateSources[n]'] - * The sourceURL of the compiled template. - * @param {string} [options.variable='obj'] - * The data object variable name. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Function} Returns the compiled template function. - * @example - * - * // Use the "interpolate" delimiter to create a compiled template. - * var compiled = _.template('hello <%= user %>!'); - * compiled({ 'user': 'fred' }); - * // => 'hello fred!' - * - * // Use the HTML "escape" delimiter to escape data property values. - * var compiled = _.template('<b><%- value %></b>'); - * compiled({ 'value': '<script>' }); - * // => '<b><script></b>' - * - * // Use the "evaluate" delimiter to execute JavaScript and generate HTML. - * var compiled = _.template('<% _.forEach(users, function(user) { %><li><%- user %></li><% }); %>'); - * compiled({ 'users': ['fred', 'barney'] }); - * // => '<li>fred</li><li>barney</li>' - * - * // Use the internal `print` function in "evaluate" delimiters. - * var compiled = _.template('<% print("hello " + user); %>!'); - * compiled({ 'user': 'barney' }); - * // => 'hello barney!' - * - * // Use the ES template literal delimiter as an "interpolate" delimiter. - * // Disable support by replacing the "interpolate" delimiter. - * var compiled = _.template('hello ${ user }!'); - * compiled({ 'user': 'pebbles' }); - * // => 'hello pebbles!' - * - * // Use backslashes to treat delimiters as plain text. - * var compiled = _.template('<%= "\\<%- value %\\>" %>'); - * compiled({ 'value': 'ignored' }); - * // => '<%- value %>' - * - * // Use the `imports` option to import `jQuery` as `jq`. - * var text = '<% jq.each(users, function(user) { %><li><%- user %></li><% }); %>'; - * var compiled = _.template(text, { 'imports': { 'jq': jQuery } }); - * compiled({ 'users': ['fred', 'barney'] }); - * // => '<li>fred</li><li>barney</li>' - * - * // Use the `sourceURL` option to specify a custom sourceURL for the template. - * var compiled = _.template('hello <%= user %>!', { 'sourceURL': '/basic/greeting.jst' }); - * compiled(data); - * // => Find the source of "greeting.jst" under the Sources tab or Resources panel of the web inspector. - * - * // Use the `variable` option to ensure a with-statement isn't used in the compiled template. - * var compiled = _.template('hi <%= data.user %>!', { 'variable': 'data' }); - * compiled.source; - * // => function(data) { - * // var __t, __p = ''; - * // __p += 'hi ' + ((__t = ( data.user )) == null ? '' : __t) + '!'; - * // return __p; - * // } - * - * // Use custom template delimiters. - * _.templateSettings.interpolate = /{{([\s\S]+?)}}/g; - * var compiled = _.template('hello {{ user }}!'); - * compiled({ 'user': 'mustache' }); - * // => 'hello mustache!' - * - * // Use the `source` property to inline compiled templates for meaningful - * // line numbers in error messages and stack traces. - * fs.writeFileSync(path.join(process.cwd(), 'jst.js'), '\ - * var JST = {\ - * "main": ' + _.template(mainText).source + '\ - * };\ - * '); + * @type {string} */ - function template(string, options, guard) { - // Based on John Resig's `tmpl` implementation - // (http://ejohn.org/blog/javascript-micro-templating/) - // and Laura Doktorova's doT.js (https://github.com/olado/doT). - var settings = lodash.templateSettings; + lodash.VERSION = VERSION; - if (guard && isIterateeCall(string, options, guard)) { - options = undefined; - } - string = toString(string); - options = assignInWith({}, options, settings, customDefaultsAssignIn); + // Assign default placeholders. + arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) { + lodash[methodName].placeholder = lodash; + }); - var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), - importsKeys = keys(imports), - importsValues = baseValues(imports, importsKeys); + // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. + arrayEach(['drop', 'take'], function(methodName, index) { + LazyWrapper.prototype[methodName] = function(n) { + n = n === undefined ? 1 : nativeMax(toInteger(n), 0); - var isEscaping, - isEvaluating, - index = 0, - interpolate = options.interpolate || reNoMatch, - source = "__p += '"; + var result = (this.__filtered__ && !index) + ? new LazyWrapper(this) + : this.clone(); - // Compile the regexp to match each delimiter. - var reDelimiters = RegExp( - (options.escape || reNoMatch).source + '|' + - interpolate.source + '|' + - (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + '|' + - (options.evaluate || reNoMatch).source + '|$' - , 'g'); + if (result.__filtered__) { + result.__takeCount__ = nativeMin(n, result.__takeCount__); + } else { + result.__views__.push({ + 'size': nativeMin(n, MAX_ARRAY_LENGTH), + 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') + }); + } + return result; + }; - // Use a sourceURL for easier debugging. - // The sourceURL gets injected into the source that's eval-ed, so be careful - // to normalize all kinds of whitespace, so e.g. newlines (and unicode versions of it) can't sneak in - // and escape the comment, thus injecting code that gets evaled. - var sourceURL = '//# sourceURL=' + - (hasOwnProperty.call(options, 'sourceURL') - ? (options.sourceURL + '').replace(/\s/g, ' ') - : ('lodash.templateSources[' + (++templateCounter) + ']') - ) + '\n'; + LazyWrapper.prototype[methodName + 'Right'] = function(n) { + return this.reverse()[methodName](n).reverse(); + }; + }); - string.replace(reDelimiters, function(match, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset) { - interpolateValue || (interpolateValue = esTemplateValue); + // Add `LazyWrapper` methods that accept an `iteratee` value. + arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) { + var type = index + 1, + isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; - // Escape characters that can't be included in string literals. - source += string.slice(index, offset).replace(reUnescapedString, escapeStringChar); + LazyWrapper.prototype[methodName] = function(iteratee) { + var result = this.clone(); + result.__iteratees__.push({ + 'iteratee': getIteratee(iteratee, 3), + 'type': type + }); + result.__filtered__ = result.__filtered__ || isFilter; + return result; + }; + }); - // Replace delimiters with snippets. - if (escapeValue) { - isEscaping = true; - source += "' +\n__e(" + escapeValue + ") +\n'"; - } - if (evaluateValue) { - isEvaluating = true; - source += "';\n" + evaluateValue + ";\n__p += '"; - } - if (interpolateValue) { - source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'"; - } - index = offset + match.length; + // Add `LazyWrapper` methods for `_.head` and `_.last`. + arrayEach(['head', 'last'], function(methodName, index) { + var takeName = 'take' + (index ? 'Right' : ''); - // The JS engine embedded in Adobe products needs `match` returned in - // order to produce the correct `offset` value. - return match; - }); + LazyWrapper.prototype[methodName] = function() { + return this[takeName](1).value()[0]; + }; + }); - source += "';\n"; + // Add `LazyWrapper` methods for `_.initial` and `_.tail`. + arrayEach(['initial', 'tail'], function(methodName, index) { + var dropName = 'drop' + (index ? '' : 'Right'); - // If `variable` is not specified wrap a with-statement around the generated - // code to add the data object to the top of the scope chain. - var variable = hasOwnProperty.call(options, 'variable') && options.variable; - if (!variable) { - source = 'with (obj) {\n' + source + '\n}\n'; - } - // Throw an error if a forbidden character was found in `variable`, to prevent - // potential command injection attacks. - else if (reForbiddenIdentifierChars.test(variable)) { - throw new Error(INVALID_TEMPL_VAR_ERROR_TEXT); - } + LazyWrapper.prototype[methodName] = function() { + return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); + }; + }); - // Cleanup code by stripping empty strings. - source = (isEvaluating ? source.replace(reEmptyStringLeading, '') : source) - .replace(reEmptyStringMiddle, '$1') - .replace(reEmptyStringTrailing, '$1;'); + LazyWrapper.prototype.compact = function() { + return this.filter(identity); + }; - // Frame code as the function body. - source = 'function(' + (variable || 'obj') + ') {\n' + - (variable - ? '' - : 'obj || (obj = {});\n' - ) + - "var __t, __p = ''" + - (isEscaping - ? ', __e = _.escape' - : '' - ) + - (isEvaluating - ? ', __j = Array.prototype.join;\n' + - "function print() { __p += __j.call(arguments, '') }\n" - : ';\n' - ) + - source + - 'return __p\n}'; + LazyWrapper.prototype.find = function(predicate) { + return this.filter(predicate).head(); + }; - var result = attempt(function() { - return Function(importsKeys, sourceURL + 'return ' + source) - .apply(undefined, importsValues); - }); + LazyWrapper.prototype.findLast = function(predicate) { + return this.reverse().find(predicate); + }; - // Provide the compiled function's source by its `toString` method or - // the `source` property as a convenience for inlining compiled templates. - result.source = source; - if (isError(result)) { - throw result; + LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { + if (typeof path == 'function') { + return new LazyWrapper(this); } - return result; - } + return this.map(function(value) { + return baseInvoke(value, path, args); + }); + }); - /** - * Converts `string`, as a whole, to lower case just like - * [String#toLowerCase](https://mdn.io/toLowerCase). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the lower cased string. - * @example - * - * _.toLower('--Foo-Bar--'); - * // => '--foo-bar--' - * - * _.toLower('fooBar'); - * // => 'foobar' - * - * _.toLower('__FOO_BAR__'); - * // => '__foo_bar__' - */ - function toLower(value) { - return toString(value).toLowerCase(); - } + LazyWrapper.prototype.reject = function(predicate) { + return this.filter(negate(getIteratee(predicate))); + }; - /** - * Converts `string`, as a whole, to upper case just like - * [String#toUpperCase](https://mdn.io/toUpperCase). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the upper cased string. - * @example - * - * _.toUpper('--foo-bar--'); - * // => '--FOO-BAR--' - * - * _.toUpper('fooBar'); - * // => 'FOOBAR' - * - * _.toUpper('__foo_bar__'); - * // => '__FOO_BAR__' - */ - function toUpper(value) { - return toString(value).toUpperCase(); - } + LazyWrapper.prototype.slice = function(start, end) { + start = toInteger(start); - /** - * Removes leading and trailing whitespace or specified characters from `string`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to trim. - * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the trimmed string. - * @example - * - * _.trim(' abc '); - * // => 'abc' - * - * _.trim('-_-abc-_-', '_-'); - * // => 'abc' - * - * _.map([' foo ', ' bar '], _.trim); - * // => ['foo', 'bar'] - */ - function trim(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return baseTrim(string); - } - if (!string || !(chars = baseToString(chars))) { - return string; + var result = this; + if (result.__filtered__ && (start > 0 || end < 0)) { + return new LazyWrapper(result); } - var strSymbols = stringToArray(string), - chrSymbols = stringToArray(chars), - start = charsStartIndex(strSymbols, chrSymbols), - end = charsEndIndex(strSymbols, chrSymbols) + 1; - - return castSlice(strSymbols, start, end).join(''); - } - - /** - * Removes trailing whitespace or specified characters from `string`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to trim. - * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the trimmed string. - * @example - * - * _.trimEnd(' abc '); - * // => ' abc' - * - * _.trimEnd('-_-abc-_-', '_-'); - * // => '-_-abc' - */ - function trimEnd(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.slice(0, trimmedEndIndex(string) + 1); + if (start < 0) { + result = result.takeRight(-start); + } else if (start) { + result = result.drop(start); } - if (!string || !(chars = baseToString(chars))) { - return string; + if (end !== undefined) { + end = toInteger(end); + result = end < 0 ? result.dropRight(-end) : result.take(end - start); } - var strSymbols = stringToArray(string), - end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; - - return castSlice(strSymbols, 0, end).join(''); - } + return result; + }; - /** - * Removes leading whitespace or specified characters from `string`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to trim. - * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the trimmed string. - * @example - * - * _.trimStart(' abc '); - * // => 'abc ' - * - * _.trimStart('-_-abc-_-', '_-'); - * // => 'abc-_-' - */ - function trimStart(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.replace(reTrimStart, ''); - } - if (!string || !(chars = baseToString(chars))) { - return string; - } - var strSymbols = stringToArray(string), - start = charsStartIndex(strSymbols, stringToArray(chars)); + LazyWrapper.prototype.takeRightWhile = function(predicate) { + return this.reverse().takeWhile(predicate).reverse(); + }; - return castSlice(strSymbols, start).join(''); - } + LazyWrapper.prototype.toArray = function() { + return this.take(MAX_ARRAY_LENGTH); + }; - /** - * Truncates `string` if it's longer than the given maximum string length. - * The last characters of the truncated string are replaced with the omission - * string which defaults to "...". - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to truncate. - * @param {Object} [options={}] The options object. - * @param {number} [options.length=30] The maximum string length. - * @param {string} [options.omission='...'] The string to indicate text is omitted. - * @param {RegExp|string} [options.separator] The separator pattern to truncate to. - * @returns {string} Returns the truncated string. - * @example - * - * _.truncate('hi-diddly-ho there, neighborino'); - * // => 'hi-diddly-ho there, neighbo...' - * - * _.truncate('hi-diddly-ho there, neighborino', { - * 'length': 24, - * 'separator': ' ' - * }); - * // => 'hi-diddly-ho there,...' - * - * _.truncate('hi-diddly-ho there, neighborino', { - * 'length': 24, - * 'separator': /,? +/ - * }); - * // => 'hi-diddly-ho there...' - * - * _.truncate('hi-diddly-ho there, neighborino', { - * 'omission': ' [...]' - * }); - * // => 'hi-diddly-ho there, neig [...]' - */ - function truncate(string, options) { - var length = DEFAULT_TRUNC_LENGTH, - omission = DEFAULT_TRUNC_OMISSION; + // Add `LazyWrapper` methods to `lodash.prototype`. + baseForOwn(LazyWrapper.prototype, function(func, methodName) { + var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), + isTaker = /^(?:head|last)$/.test(methodName), + lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName], + retUnwrapped = isTaker || /^find/.test(methodName); - if (isObject(options)) { - var separator = 'separator' in options ? options.separator : separator; - length = 'length' in options ? toInteger(options.length) : length; - omission = 'omission' in options ? baseToString(options.omission) : omission; + if (!lodashFunc) { + return; } - string = toString(string); + lodash.prototype[methodName] = function() { + var value = this.__wrapped__, + args = isTaker ? [1] : arguments, + isLazy = value instanceof LazyWrapper, + iteratee = args[0], + useLazy = isLazy || isArray(value); - var strLength = string.length; - if (hasUnicode(string)) { - var strSymbols = stringToArray(string); - strLength = strSymbols.length; - } - if (length >= strLength) { - return string; - } - var end = length - stringSize(omission); - if (end < 1) { - return omission; - } - var result = strSymbols - ? castSlice(strSymbols, 0, end).join('') - : string.slice(0, end); + var interceptor = function(value) { + var result = lodashFunc.apply(lodash, arrayPush([value], args)); + return (isTaker && chainAll) ? result[0] : result; + }; - if (separator === undefined) { - return result + omission; - } - if (strSymbols) { - end += (result.length - end); - } - if (isRegExp(separator)) { - if (string.slice(end).search(separator)) { - var match, - substring = result; + if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { + // Avoid lazy use if the iteratee has a "length" value other than `1`. + isLazy = useLazy = false; + } + var chainAll = this.__chain__, + isHybrid = !!this.__actions__.length, + isUnwrapped = retUnwrapped && !chainAll, + onlyLazy = isLazy && !isHybrid; - if (!separator.global) { - separator = RegExp(separator.source, toString(reFlags.exec(separator)) + 'g'); - } - separator.lastIndex = 0; - while ((match = separator.exec(substring))) { - var newEnd = match.index; - } - result = result.slice(0, newEnd === undefined ? end : newEnd); + if (!retUnwrapped && useLazy) { + value = onlyLazy ? value : new LazyWrapper(this); + var result = func.apply(value, args); + result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); + return new LodashWrapper(result, chainAll); } - } else if (string.indexOf(baseToString(separator), end) != end) { - var index = result.lastIndexOf(separator); - if (index > -1) { - result = result.slice(0, index); + if (isUnwrapped && onlyLazy) { + return func.apply(this, args); } - } - return result + omission; - } + result = this.thru(interceptor); + return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; + }; + }); - /** - * The inverse of `_.escape`; this method converts the HTML entities - * `&`, `<`, `>`, `"`, and `'` in `string` to - * their corresponding characters. - * - * **Note:** No other HTML entities are unescaped. To unescape additional - * HTML entities use a third-party library like [_he_](https://mths.be/he). - * - * @static - * @memberOf _ - * @since 0.6.0 - * @category String - * @param {string} [string=''] The string to unescape. - * @returns {string} Returns the unescaped string. - * @example - * - * _.unescape('fred, barney, & pebbles'); - * // => 'fred, barney, & pebbles' - */ - function unescape(string) { - string = toString(string); - return (string && reHasEscapedHtml.test(string)) - ? string.replace(reEscapedHtml, unescapeHtmlChar) - : string; - } + // Add `Array` methods to `lodash.prototype`. + arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { + var func = arrayProto[methodName], + chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', + retUnwrapped = /^(?:pop|shift)$/.test(methodName); - /** - * Converts `string`, as space separated words, to upper case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the upper cased string. - * @example - * - * _.upperCase('--foo-bar'); - * // => 'FOO BAR' - * - * _.upperCase('fooBar'); - * // => 'FOO BAR' - * - * _.upperCase('__foo_bar__'); - * // => 'FOO BAR' - */ - var upperCase = createCompounder(function(result, word, index) { - return result + (index ? ' ' : '') + word.toUpperCase(); + lodash.prototype[methodName] = function() { + var args = arguments; + if (retUnwrapped && !this.__chain__) { + var value = this.value(); + return func.apply(isArray(value) ? value : [], args); + } + return this[chainName](function(value) { + return func.apply(isArray(value) ? value : [], args); + }); + }; }); - /** - * Converts the first character of `string` to upper case. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to convert. - * @returns {string} Returns the converted string. - * @example - * - * _.upperFirst('fred'); - * // => 'Fred' - * - * _.upperFirst('FRED'); - * // => 'FRED' - */ - var upperFirst = createCaseFirst('toUpperCase'); + // Map minified method names to their real names. + baseForOwn(LazyWrapper.prototype, function(func, methodName) { + var lodashFunc = lodash[methodName]; + if (lodashFunc) { + var key = lodashFunc.name + ''; + if (!hasOwnProperty.call(realNames, key)) { + realNames[key] = []; + } + realNames[key].push({ 'name': methodName, 'func': lodashFunc }); + } + }); - /** - * Splits `string` into an array of its words. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category String - * @param {string} [string=''] The string to inspect. - * @param {RegExp|string} [pattern] The pattern to match words. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {Array} Returns the words of `string`. - * @example - * - * _.words('fred, barney, & pebbles'); - * // => ['fred', 'barney', 'pebbles'] - * - * _.words('fred, barney, & pebbles', /[^, ]+/g); - * // => ['fred', 'barney', '&', 'pebbles'] - */ - function words(string, pattern, guard) { - string = toString(string); - pattern = guard ? undefined : pattern; + realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ + 'name': 'wrapper', + 'func': undefined + }]; - if (pattern === undefined) { - return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string); - } - return string.match(pattern) || []; + // Add methods to `LazyWrapper`. + LazyWrapper.prototype.clone = lazyClone; + LazyWrapper.prototype.reverse = lazyReverse; + LazyWrapper.prototype.value = lazyValue; + + // Add chain sequence methods to the `lodash` wrapper. + lodash.prototype.at = wrapperAt; + lodash.prototype.chain = wrapperChain; + lodash.prototype.commit = wrapperCommit; + lodash.prototype.next = wrapperNext; + lodash.prototype.plant = wrapperPlant; + lodash.prototype.reverse = wrapperReverse; + lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; + + // Add lazy aliases. + lodash.prototype.first = lodash.prototype.head; + + if (symIterator) { + lodash.prototype[symIterator] = wrapperToIterator; } + return lodash; + }); - /*------------------------------------------------------------------------*/ + /*--------------------------------------------------------------------------*/ - /** - * Attempts to invoke `func`, returning either the result or the caught error - * object. Any additional arguments are provided to `func` when it's invoked. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Function} func The function to attempt. - * @param {...*} [args] The arguments to invoke `func` with. - * @returns {*} Returns the `func` result or error object. - * @example - * - * // Avoid throwing errors for invalid selectors. - * var elements = _.attempt(function(selector) { - * return document.querySelectorAll(selector); - * }, '>_>'); - * - * if (_.isError(elements)) { - * elements = []; - * } - */ - var attempt = baseRest(function(func, args) { - try { - return apply(func, undefined, args); - } catch (e) { - return isError(e) ? e : new Error(e); - } - }); + // Export lodash. + var _ = runInContext(); - /** - * Binds methods of an object to the object itself, overwriting the existing - * method. - * - * **Note:** This method doesn't set the "length" property of bound functions. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Object} object The object to bind and assign the bound methods to. - * @param {...(string|string[])} methodNames The object method names to bind. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'click': function() { - * console.log('clicked ' + this.label); - * } - * }; - * - * _.bindAll(view, ['click']); - * jQuery(element).on('click', view.click); - * // => Logs 'clicked docs' when clicked. - */ - var bindAll = flatRest(function(object, methodNames) { - arrayEach(methodNames, function(key) { - key = toKey(key); - baseAssignValue(object, key, bind(object[key], object)); - }); - return object; - }); + // Some AMD build optimizers, like r.js, check for condition patterns like: + if (true) { + // Expose Lodash on the global object to prevent errors when Lodash is + // loaded by a script tag in the presence of an AMD loader. + // See http://requirejs.org/docs/errors.html#mismatch for more details. + // Use `_.noConflict` to remove Lodash from the global object. + root._ = _; - /** - * Creates a function that iterates over `pairs` and invokes the corresponding - * function of the first predicate to return truthy. The predicate-function - * pairs are invoked with the `this` binding and arguments of the created - * function. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {Array} pairs The predicate-function pairs. - * @returns {Function} Returns the new composite function. - * @example - * - * var func = _.cond([ - * [_.matches({ 'a': 1 }), _.constant('matches A')], - * [_.conforms({ 'b': _.isNumber }), _.constant('matches B')], - * [_.stubTrue, _.constant('no match')] - * ]); - * - * func({ 'a': 1, 'b': 2 }); - * // => 'matches A' - * - * func({ 'a': 0, 'b': 1 }); - * // => 'matches B' - * - * func({ 'a': '1', 'b': '2' }); - * // => 'no match' - */ - function cond(pairs) { - var length = pairs == null ? 0 : pairs.length, - toIteratee = getIteratee(); + // Define as an anonymous module so, through path mapping, it can be + // referenced as the "underscore" module. + !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { + return _; + }).call(exports, __webpack_require__, exports, module), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); + } + // Check for `exports` after `define` in case a build optimizer adds it. + else {} +}.call(this)); - pairs = !length ? [] : arrayMap(pairs, function(pair) { - if (typeof pair[1] != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return [toIteratee(pair[0]), pair[1]]; - }); +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(13)(module))) - return baseRest(function(args) { - var index = -1; - while (++index < length) { - var pair = pairs[index]; - if (apply(pair[0], this, args)) { - return apply(pair[1], this, args); - } - } - }); - } +/***/ }), +/* 824 */ +/***/ (function(module) { - /** - * Creates a function that invokes the predicate properties of `source` with - * the corresponding property values of a given object, returning `true` if - * all predicates return truthy, else `false`. - * - * **Note:** The created function is equivalent to `_.conformsTo` with - * `source` partially applied. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {Object} source The object of property predicates to conform to. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 2, 'b': 1 }, - * { 'a': 1, 'b': 2 } - * ]; - * - * _.filter(objects, _.conforms({ 'b': function(n) { return n > 1; } })); - * // => [{ 'a': 1, 'b': 2 }] - */ - function conforms(source) { - return baseConforms(baseClone(source, CLONE_DEEP_FLAG)); - } +module.exports = JSON.parse("{\"qualifications\":[{\"label\":\"national_id_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\"]},{\"label\":\"passport\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\"]},{\"label\":\"residence_permit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"immigration\",\"subjects\":[\"permit\",\"identity\"]},{\"label\":\"family_record_book\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"birth_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\",\"family\"]},{\"label\":\"driver_license\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"permit\",\"driving\"]},{\"label\":\"other_identity_document\",\"purpose\":\"attestation\"},{\"label\":\"wedding\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"pacs\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"divorce\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"large_family_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"transport\",\"subjects\":[\"right\"]},{\"label\":\"caf\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"family\",\"subjects\":[\"right\"]},{\"label\":\"other_family_document\"},{\"label\":\"diploma\",\"purpose\":\"attestation\",\"sourceCategory\":\"education\",\"subjects\":[\"achievement\"]},{\"label\":\"work_contract\",\"purpose\":\"contract\",\"sourceCategory\":\"employer\",\"subjects\":[\"work\",\"employment\"]},{\"label\":\"pay_sheet\",\"purpose\":\"attestation\",\"sourceCategory\":\"employer\",\"subjects\":[\"work\",\"revenues\"]},{\"label\":\"unemployment_benefit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"subjects\":[\"revenues\"]},{\"label\":\"pension\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"subjects\":[\"revenues\"]},{\"label\":\"other_revenue\",\"purpose\":\"attestation\",\"subjects\":[\"revenues\"]},{\"label\":\"gradebook\",\"purpose\":\"report\",\"sourceCategory\":\"education\",\"subjects\":[\"history\"]},{\"label\":\"student_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"education\",\"subjects\":[\"identity\"]},{\"label\":\"resume\",\"purpose\":\"description\",\"subjects\":[\"employment\"]},{\"label\":\"motivation_letter\",\"purpose\":\"description\",\"subjects\":[\"employment\"]},{\"label\":\"other_work_document\"},{\"label\":\"health_book\",\"purpose\":\"report\",\"sourceCategory\":\"health\",\"subjects\":[\"history\"]},{\"label\":\"national_insurance_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"health\",\"subjects\":[\"insurance\"]},{\"label\":\"health_insurance_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"health\",\"subjects\":[\"insurance\"]},{\"label\":\"prescription\",\"purpose\":\"attestation\",\"sourceCategory\":\"health\",\"subjects\":[\"right\"]},{\"label\":\"health_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"health\"},{\"label\":\"other_health_document\"},{\"label\":\"vehicle_registration\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"right\",\"identity\"]},{\"label\":\"car_insurance\",\"purpose\":\"attestation\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"insurance\",\"car\"]},{\"label\":\"mechanic_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"transport\"},{\"label\":\"transport_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"transport\"},{\"label\":\"other_transport_document\"},{\"label\":\"house_sale_agreeement\",\"purpose\":\"contract\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"building_permit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"real_estate\",\"subjects\":[\"permit\",\"house\"]},{\"label\":\"technical_diagnostic_record\",\"purpose\":\"report\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"compliance\",\"house\"]},{\"label\":\"lease\",\"purpose\":\"contract\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"rent_receipt\",\"purpose\":\"invoice\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"house_insurance\",\"purpose\":\"contract\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"real_estate\",\"subjects\":[\"insurance\",\"house\"]},{\"label\":\"work_quote\",\"purpose\":\"description\",\"sourceCategory\":\"building\",\"subjects\":[\"building\",\"house\"]},{\"label\":\"work_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"building\",\"subjects\":[\"building\",\"house\"]},{\"label\":\"other_house_document\"},{\"label\":\"phone_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\",\"sourceSubCategory\":\"mobile\"},{\"label\":\"isp_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\",\"sourceSubCategory\":\"internet\",\"subjects\":[\"subscription\"]},{\"label\":\"telecom_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\"},{\"label\":\"energy_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"energy\"},{\"label\":\"water_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"water\"},{\"label\":\"appliance_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"retail\"},{\"label\":\"web_service_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"web\"},{\"label\":\"restaurant_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"alimentation\"},{\"label\":\"other_invoice\",\"purpose\":\"invoice\"},{\"label\":\"tax_return\",\"purpose\":\"report\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"tax_notice\",\"purpose\":\"invoice\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"tax_timetable\",\"purpose\":\"report\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"other_tax_document\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"bank_details\",\"purpose\":\"attestation\",\"sourceCategory\":\"bank\",\"subjects\":[\"identity\"]},{\"label\":\"bank_statement\",\"purpose\":\"report\",\"sourceCategory\":\"bank\",\"subjects\":[\"history\"]},{\"label\":\"loan_agreement\",\"purpose\":\"contract\",\"sourceCategory\":\"bank\"},{\"label\":\"other_bank_document\",\"sourceCategory\":\"bank\"},{\"label\":\"receipt\",\"purpose\":\"report\"}],\"purposeKnownValues\":[\"attestation\",\"contract\",\"invoice\",\"report\",\"description\",\"evaluation\"],\"sourceCategoryKnownValues\":[\"bank\",\"insurance\",\"retail\",\"telecom\",\"energy\",\"water\",\"health\",\"gov\",\"education\",\"employer\",\"transport\",\"goods\",\"alimentation\",\"building\",\"real_estate\",\"web\"],\"sourceSubCategoryKnownValues\":[\"civil_registration\",\"immigration\",\"transport\",\"family\",\"tax\",\"health\",\"real_estate\",\"mobile\",\"internet\"],\"subjectsKnownValues\":[\"identity\",\"permit\",\"family\",\"driving\",\"right\",\"subvention\",\"achievement\",\"degree\",\"work\",\"employment\",\"revenues\",\"history\",\"insurance\",\"drugs\",\"medical_act\",\"car\",\"moto\",\"truck\",\"boat\",\"subscription\",\"buy/sale\",\"house\",\"compliance\",\"building\",\"food\",\"real_estate\",\"tax\",\"insurance\",\"education\",\"statement\",\"course\",\"internet\",\"phone\"]}"); - /** - * Creates a function that returns `value`. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {*} value The value to return from the new function. - * @returns {Function} Returns the new constant function. - * @example - * - * var objects = _.times(2, _.constant({ 'a': 1 })); - * - * console.log(objects); - * // => [{ 'a': 1 }, { 'a': 1 }] - * - * console.log(objects[0] === objects[1]); - * // => true - */ - function constant(value) { - return function() { - return value; - }; - } +/***/ }), +/* 825 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Checks `value` to determine whether a default value should be returned in - * its place. The `defaultValue` is returned if `value` is `NaN`, `null`, - * or `undefined`. - * - * @static - * @memberOf _ - * @since 4.14.0 - * @category Util - * @param {*} value The value to check. - * @param {*} defaultValue The default value. - * @returns {*} Returns the resolved value. - * @example - * - * _.defaultTo(1, 10); - * // => 1 - * - * _.defaultTo(undefined, 10); - * // => 10 - */ - function defaultTo(value, defaultValue) { - return (value == null || value !== value) ? defaultValue : value; - } +"use strict"; - /** - * Creates a function that returns the result of invoking the given functions - * with the `this` binding of the created function, where each successive - * invocation is supplied the return value of the previous. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {...(Function|Function[])} [funcs] The functions to invoke. - * @returns {Function} Returns the new composite function. - * @see _.flowRight - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flow([_.add, square]); - * addSquare(1, 2); - * // => 9 - */ - var flow = createFlow(); - /** - * This method is like `_.flow` except that it creates a function that - * invokes the given functions from right to left. - * - * @static - * @since 3.0.0 - * @memberOf _ - * @category Util - * @param {...(Function|Function[])} [funcs] The functions to invoke. - * @returns {Function} Returns the new composite function. - * @see _.flow - * @example - * - * function square(n) { - * return n * n; - * } - * - * var addSquare = _.flowRight([square, _.add]); - * addSquare(1, 2); - * // => 9 - */ - var flowRight = createFlow(true); +var _interopRequireDefault = __webpack_require__(530); - /** - * This method returns the first argument it receives. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {*} value Any value. - * @returns {*} Returns `value`. - * @example - * - * var object = { 'a': 1 }; - * - * console.log(_.identity(object) === object); - * // => true - */ - function identity(value) { - return value; - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.getReferencedFolder = exports.createFolderWithReference = exports.ensureMagicFolder = exports.MAGIC_FOLDERS = void 0; - /** - * Creates a function that invokes `func` with the arguments of the created - * function. If `func` is a property name, the created function returns the - * property value for a given element. If `func` is an array or object, the - * created function returns `true` for elements that contain the equivalent - * source properties, otherwise it returns `false`. - * - * @static - * @since 4.0.0 - * @memberOf _ - * @category Util - * @param {*} [func=_.identity] The value to convert to a callback. - * @returns {Function} Returns the callback. - * @example - * - * var users = [ - * { 'user': 'barney', 'age': 36, 'active': true }, - * { 'user': 'fred', 'age': 40, 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.filter(users, _.iteratee({ 'user': 'barney', 'active': true })); - * // => [{ 'user': 'barney', 'age': 36, 'active': true }] - * - * // The `_.matchesProperty` iteratee shorthand. - * _.filter(users, _.iteratee(['user', 'fred'])); - * // => [{ 'user': 'fred', 'age': 40 }] - * - * // The `_.property` iteratee shorthand. - * _.map(users, _.iteratee('user')); - * // => ['barney', 'fred'] - * - * // Create custom iteratee shorthands. - * _.iteratee = _.wrap(_.iteratee, function(iteratee, func) { - * return !_.isRegExp(func) ? iteratee(func) : function(string) { - * return func.test(string); - * }; - * }); - * - * _.filter(['abc', 'def'], /ef/); - * // => ['def'] - */ - function iteratee(func) { - return baseIteratee(typeof func == 'function' ? func : baseClone(func, CLONE_DEEP_FLAG)); - } +var _regenerator = _interopRequireDefault(__webpack_require__(545)); - /** - * Creates a function that performs a partial deep comparison between a given - * object and `source`, returning `true` if the given object has equivalent - * property values, else `false`. - * - * **Note:** The created function is equivalent to `_.isMatch` with `source` - * partially applied. - * - * Partial comparisons will match empty array and empty object `source` - * values against any array or object value, respectively. See `_.isEqual` - * for a list of supported value comparisons. - * - * **Note:** Multiple values can be checked by combining several matchers - * using `_.overSome` - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Object} source The object of property values to match. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 1, 'b': 2, 'c': 3 }, - * { 'a': 4, 'b': 5, 'c': 6 } - * ]; - * - * _.filter(objects, _.matches({ 'a': 4, 'c': 6 })); - * // => [{ 'a': 4, 'b': 5, 'c': 6 }] - * - * // Checking for several possible values - * _.filter(objects, _.overSome([_.matches({ 'a': 1 }), _.matches({ 'a': 4 })])); - * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] - */ - function matches(source) { - return baseMatches(baseClone(source, CLONE_DEEP_FLAG)); - } +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); - /** - * Creates a function that performs a partial deep comparison between the - * value at `path` of a given object to `srcValue`, returning `true` if the - * object value is equivalent, else `false`. - * - * **Note:** Partial comparisons will match empty array and empty object - * `srcValue` values against any array or object value, respectively. See - * `_.isEqual` for a list of supported value comparisons. - * - * **Note:** Multiple values can be checked by combining several matchers - * using `_.overSome` - * - * @static - * @memberOf _ - * @since 3.2.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @param {*} srcValue The value to match. - * @returns {Function} Returns the new spec function. - * @example - * - * var objects = [ - * { 'a': 1, 'b': 2, 'c': 3 }, - * { 'a': 4, 'b': 5, 'c': 6 } - * ]; - * - * _.find(objects, _.matchesProperty('a', 4)); - * // => { 'a': 4, 'b': 5, 'c': 6 } - * - * // Checking for several possible values - * _.filter(objects, _.overSome([_.matchesProperty('a', 1), _.matchesProperty('a', 4)])); - * // => [{ 'a': 1, 'b': 2, 'c': 3 }, { 'a': 4, 'b': 5, 'c': 6 }] - */ - function matchesProperty(path, srcValue) { - return baseMatchesProperty(path, baseClone(srcValue, CLONE_DEEP_FLAG)); - } +var _sortBy = _interopRequireDefault(__webpack_require__(826)); - /** - * Creates a function that invokes the method at `path` of a given object. - * Any additional arguments are provided to the invoked method. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Util - * @param {Array|string} path The path of the method to invoke. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new invoker function. - * @example - * - * var objects = [ - * { 'a': { 'b': _.constant(2) } }, - * { 'a': { 'b': _.constant(1) } } - * ]; - * - * _.map(objects, _.method('a.b')); - * // => [2, 1] - * - * _.map(objects, _.method(['a', 'b'])); - * // => [2, 1] - */ - var method = baseRest(function(path, args) { - return function(object) { - return baseInvoke(object, path, args); - }; - }); +var _CozyClient = _interopRequireDefault(__webpack_require__(531)); - /** - * The opposite of `_.method`; this method creates a function that invokes - * the method at a given path of `object`. Any additional arguments are - * provided to the invoked method. - * - * @static - * @memberOf _ - * @since 3.7.0 - * @category Util - * @param {Object} object The object to query. - * @param {...*} [args] The arguments to invoke the method with. - * @returns {Function} Returns the new invoker function. - * @example - * - * var array = _.times(3, _.constant), - * object = { 'a': array, 'b': array, 'c': array }; - * - * _.map(['a[2]', 'c[0]'], _.methodOf(object)); - * // => [2, 0] - * - * _.map([['a', '2'], ['c', '0']], _.methodOf(object)); - * // => [2, 0] - */ - var methodOf = baseRest(function(object, args) { - return function(path) { - return baseInvoke(object, path, args); - }; - }); +var _types = __webpack_require__(628); - /** - * Adds all own enumerable string keyed function properties of a source - * object to the destination object. If `object` is a function, then methods - * are added to its prototype as well. - * - * **Note:** Use `_.runInContext` to create a pristine `lodash` function to - * avoid conflicts caused by modifying the original. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {Function|Object} [object=lodash] The destination object. - * @param {Object} source The object of functions to add. - * @param {Object} [options={}] The options object. - * @param {boolean} [options.chain=true] Specify whether mixins are chainable. - * @returns {Function|Object} Returns `object`. - * @example - * - * function vowels(string) { - * return _.filter(string, function(v) { - * return /[aeiou]/i.test(v); - * }); - * } - * - * _.mixin({ 'vowels': vowels }); - * _.vowels('fred'); - * // => ['e'] - * - * _('fred').vowels().value(); - * // => ['e'] - * - * _.mixin({ 'vowels': vowels }, { 'chain': false }); - * _('fred').vowels(); - * // => ['e'] - */ - function mixin(object, source, options) { - var props = keys(source), - methodNames = baseFunctions(source, props); +var APP_DOCTYPE = 'io.cozy.apps'; +var MAGIC_FOLDERS = { + ADMINISTRATIVE: "".concat(APP_DOCTYPE, "/administrative"), + PHOTOS: "".concat(APP_DOCTYPE, "/photos"), + PHOTOS_BACKUP: "".concat(APP_DOCTYPE, "/photos/mobile"), + PHOTOS_UPLOAD: "".concat(APP_DOCTYPE, "/photos/upload"), + NOTES: "".concat(APP_DOCTYPE, "/notes"), + HOME: "".concat(APP_DOCTYPE, "/home") +}; +/** + * Returns a "Magic Folder", given its id. See https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.apps/#special-iocozyapps-doctypes + * + * @param {CozyClient} client cozy-client instance + * @param {string} id Magic Folder id. `CozyFolder.magicFolders` contains the + * ids of folders that can be magic folders. + * @param {string} path Default path to use if magic folder does not exist + * @returns {Promise<IOCozyFolder>} Folder document + */ - if (options == null && - !(isObject(source) && (methodNames.length || !props.length))) { - options = source; - source = object; - object = this; - methodNames = baseFunctions(source, keys(source)); - } - var chain = !(isObject(options) && 'chain' in options) || !!options.chain, - isFunc = isFunction(object); +exports.MAGIC_FOLDERS = MAGIC_FOLDERS; - arrayEach(methodNames, function(methodName) { - var func = source[methodName]; - object[methodName] = func; - if (isFunc) { - object.prototype[methodName] = function() { - var chainAll = this.__chain__; - if (chain || chainAll) { - var result = object(this.__wrapped__), - actions = result.__actions__ = copyArray(this.__actions__); +var ensureMagicFolder = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, id, path) { + var magicFolderDocument, existingMagicFolder, magicFoldersValues; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + magicFolderDocument = { + _type: APP_DOCTYPE, + _id: id + }; + _context.next = 3; + return getReferencedFolder(client, magicFolderDocument); - actions.push({ 'func': func, 'args': arguments, 'thisArg': object }); - result.__chain__ = chainAll; - return result; - } - return func.apply(object, arrayPush([this.value()], arguments)); - }; - } - }); + case 3: + existingMagicFolder = _context.sent; - return object; - } + if (!existingMagicFolder) { + _context.next = 6; + break; + } - /** - * Reverts the `_` variable to its previous value and returns a reference to - * the `lodash` function. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @returns {Function} Returns the `lodash` function. - * @example - * - * var lodash = _.noConflict(); - */ - function noConflict() { - if (root._ === this) { - root._ = oldDash; - } - return this; - } + return _context.abrupt("return", existingMagicFolder); - /** - * This method returns `undefined`. - * - * @static - * @memberOf _ - * @since 2.3.0 - * @category Util - * @example - * - * _.times(2, _.noop); - * // => [undefined, undefined] - */ - function noop() { - // No operation performed. - } + case 6: + magicFoldersValues = Object.values(MAGIC_FOLDERS); - /** - * Creates a function that gets the argument at index `n`. If `n` is negative, - * the nth argument from the end is returned. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {number} [n=0] The index of the argument to return. - * @returns {Function} Returns the new pass-thru function. - * @example - * - * var func = _.nthArg(1); - * func('a', 'b', 'c', 'd'); - * // => 'b' - * - * var func = _.nthArg(-2); - * func('a', 'b', 'c', 'd'); - * // => 'c' - */ - function nthArg(n) { - n = toInteger(n); - return baseRest(function(args) { - return baseNth(args, n); - }); - } + if (magicFoldersValues.includes(id)) { + _context.next = 9; + break; + } - /** - * Creates a function that invokes `iteratees` with the arguments it receives - * and returns their results. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to invoke. - * @returns {Function} Returns the new function. - * @example - * - * var func = _.over([Math.max, Math.min]); - * - * func(1, 2, 3, 4); - * // => [4, 1] - */ - var over = createOver(arrayMap); + throw new Error("Cannot create Magic folder with id ".concat(id, ". Allowed values are ").concat(magicFoldersValues.join(', '), ".")); - /** - * Creates a function that checks if **all** of the `predicates` return - * truthy when invoked with the arguments it receives. - * - * Following shorthands are possible for providing predicates. - * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. - * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {...(Function|Function[])} [predicates=[_.identity]] - * The predicates to check. - * @returns {Function} Returns the new function. - * @example - * - * var func = _.overEvery([Boolean, isFinite]); - * - * func('1'); - * // => true - * - * func(null); - * // => false - * - * func(NaN); - * // => false - */ - var overEvery = createOver(arrayEvery); + case 9: + if (path) { + _context.next = 11; + break; + } - /** - * Creates a function that checks if **any** of the `predicates` return - * truthy when invoked with the arguments it receives. - * - * Following shorthands are possible for providing predicates. - * Pass an `Object` and it will be used as an parameter for `_.matches` to create the predicate. - * Pass an `Array` of parameters for `_.matchesProperty` and the predicate will be created using them. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {...(Function|Function[])} [predicates=[_.identity]] - * The predicates to check. - * @returns {Function} Returns the new function. - * @example - * - * var func = _.overSome([Boolean, isFinite]); - * - * func('1'); - * // => true - * - * func(null); - * // => true - * - * func(NaN); - * // => false - * - * var matchesFunc = _.overSome([{ 'a': 1 }, { 'a': 2 }]) - * var matchesPropertyFunc = _.overSome([['a', 1], ['a', 2]]) - */ - var overSome = createOver(arraySome); + throw new Error('Magic folder default path must be defined'); - /** - * Creates a function that returns the value at `path` of a given object. - * - * @static - * @memberOf _ - * @since 2.4.0 - * @category Util - * @param {Array|string} path The path of the property to get. - * @returns {Function} Returns the new accessor function. - * @example - * - * var objects = [ - * { 'a': { 'b': 2 } }, - * { 'a': { 'b': 1 } } - * ]; - * - * _.map(objects, _.property('a.b')); - * // => [2, 1] - * - * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b'); - * // => [1, 2] - */ - function property(path) { - return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path); - } + case 11: + return _context.abrupt("return", createFolderWithReference(client, path, magicFolderDocument)); - /** - * The opposite of `_.property`; this method creates a function that returns - * the value at a given path of `object`. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Util - * @param {Object} object The object to query. - * @returns {Function} Returns the new accessor function. - * @example - * - * var array = [0, 1, 2], - * object = { 'a': array, 'b': array, 'c': array }; - * - * _.map(['a[2]', 'c[0]'], _.propertyOf(object)); - * // => [2, 0] - * - * _.map([['a', '2'], ['c', '0']], _.propertyOf(object)); - * // => [2, 0] - */ - function propertyOf(object) { - return function(path) { - return object == null ? undefined : baseGet(object, path); - }; - } + case 12: + case "end": + return _context.stop(); + } + } + }, _callee); + })); - /** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to, but not including, `end`. A step of `-1` is used if a negative - * `start` is specified without an `end` or `step`. If `end` is not specified, - * it's set to `start` with `start` then set to `0`. - * - * **Note:** JavaScript follows the IEEE-754 standard for resolving - * floating-point values which can produce unexpected results. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.rangeRight - * @example - * - * _.range(4); - * // => [0, 1, 2, 3] - * - * _.range(-4); - * // => [0, -1, -2, -3] - * - * _.range(1, 5); - * // => [1, 2, 3, 4] - * - * _.range(0, 20, 5); - * // => [0, 5, 10, 15] - * - * _.range(0, -4, -1); - * // => [0, -1, -2, -3] - * - * _.range(1, 4, 0); - * // => [1, 1, 1] - * - * _.range(0); - * // => [] - */ - var range = createRange(); + return function ensureMagicFolder(_x, _x2, _x3) { + return _ref.apply(this, arguments); + }; +}(); +/** + * The next functions are considered private and only exported for unit tests + */ - /** - * This method is like `_.range` except that it populates values in - * descending order. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {number} [start=0] The start of the range. - * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns the range of numbers. - * @see _.inRange, _.range - * @example - * - * _.rangeRight(4); - * // => [3, 2, 1, 0] - * - * _.rangeRight(-4); - * // => [-3, -2, -1, 0] - * - * _.rangeRight(1, 5); - * // => [4, 3, 2, 1] - * - * _.rangeRight(0, 20, 5); - * // => [15, 10, 5, 0] - * - * _.rangeRight(0, -4, -1); - * // => [-3, -2, -1, 0] - * - * _.rangeRight(1, 4, 0); - * // => [1, 1, 1] - * - * _.rangeRight(0); - * // => [] - */ - var rangeRight = createRange(true); +/** + * Create a folder with a reference to the given document + * + * @param {CozyClient} client - cozy-client instance + * @param {string} path - Folder path + * @param {CozyClientDocument} document - Document to make reference to. Any doctype. + * @returns {Promise<IOCozyFolder>} Folder document + */ - /** - * This method returns a new empty array. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Array} Returns the new empty array. - * @example - * - * var arrays = _.times(2, _.stubArray); - * - * console.log(arrays); - * // => [[], []] - * - * console.log(arrays[0] === arrays[1]); - * // => false - */ - function stubArray() { - return []; - } - /** - * This method returns `false`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `false`. - * @example - * - * _.times(2, _.stubFalse); - * // => [false, false] - */ - function stubFalse() { - return false; - } +exports.ensureMagicFolder = ensureMagicFolder; - /** - * This method returns a new empty object. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {Object} Returns the new empty object. - * @example - * - * var objects = _.times(2, _.stubObject); - * - * console.log(objects); - * // => [{}, {}] - * - * console.log(objects[0] === objects[1]); - * // => false - */ - function stubObject() { - return {}; - } +var createFolderWithReference = /*#__PURE__*/function () { + var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(client, path, document) { + var collection, dirId, _yield$collection$get, dirInfos; - /** - * This method returns an empty string. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {string} Returns the empty string. - * @example - * - * _.times(2, _.stubString); - * // => ['', ''] - */ - function stubString() { - return ''; - } + return _regenerator.default.wrap(function _callee2$(_context2) { + while (1) { + switch (_context2.prev = _context2.next) { + case 0: + collection = client.collection('io.cozy.files'); + _context2.next = 3; + return collection.ensureDirectoryExists(path); - /** - * This method returns `true`. - * - * @static - * @memberOf _ - * @since 4.13.0 - * @category Util - * @returns {boolean} Returns `true`. - * @example - * - * _.times(2, _.stubTrue); - * // => [true, true] - */ - function stubTrue() { - return true; - } + case 3: + dirId = _context2.sent; + _context2.next = 6; + return collection.addReferencesTo(document, [{ + _id: dirId + }]); - /** - * Invokes the iteratee `n` times, returning an array of the results of - * each invocation. The iteratee is invoked with one argument; (index). - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {number} n The number of times to invoke `iteratee`. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the array of results. - * @example - * - * _.times(3, String); - * // => ['0', '1', '2'] - * - * _.times(4, _.constant(0)); - * // => [0, 0, 0, 0] - */ - function times(n, iteratee) { - n = toInteger(n); - if (n < 1 || n > MAX_SAFE_INTEGER) { - return []; - } - var index = MAX_ARRAY_LENGTH, - length = nativeMin(n, MAX_ARRAY_LENGTH); + case 6: + _context2.next = 8; + return collection.get(dirId); - iteratee = getIteratee(iteratee); - n -= MAX_ARRAY_LENGTH; + case 8: + _yield$collection$get = _context2.sent; + dirInfos = _yield$collection$get.data; + return _context2.abrupt("return", dirInfos); - var result = baseTimes(length, iteratee); - while (++index < n) { - iteratee(index); + case 11: + case "end": + return _context2.stop(); + } } - return result; - } + }, _callee2); + })); - /** - * Converts `value` to a property path array. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Util - * @param {*} value The value to convert. - * @returns {Array} Returns the new property path array. - * @example - * - * _.toPath('a.b.c'); - * // => ['a', 'b', 'c'] - * - * _.toPath('a[0].b.c'); - * // => ['a', '0', 'b', 'c'] - */ - function toPath(value) { - if (isArray(value)) { - return arrayMap(value, toKey); - } - return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value))); - } + return function createFolderWithReference(_x4, _x5, _x6) { + return _ref2.apply(this, arguments); + }; +}(); +/** + * Returns the most recent folder referenced by the given document + * + * @param {CozyClient} client cozy-client instance + * @param {CozyClientDocument} document Document to get references from + * @returns {Promise<IOCozyFolder>} Folder referenced by the given document + */ - /** - * Generates a unique ID. If `prefix` is given, the ID is appended to it. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Util - * @param {string} [prefix=''] The value to prefix the ID with. - * @returns {string} Returns the unique ID. - * @example - * - * _.uniqueId('contact_'); - * // => 'contact_104' - * - * _.uniqueId(); - * // => '105' - */ - function uniqueId(prefix) { - var id = ++idCounter; - return toString(prefix) + id; - } - /*------------------------------------------------------------------------*/ +exports.createFolderWithReference = createFolderWithReference; - /** - * Adds two numbers. - * - * @static - * @memberOf _ - * @since 3.4.0 - * @category Math - * @param {number} augend The first number in an addition. - * @param {number} addend The second number in an addition. - * @returns {number} Returns the total. - * @example - * - * _.add(6, 4); - * // => 10 - */ - var add = createMathOperation(function(augend, addend) { - return augend + addend; - }, 0); +var getReferencedFolder = /*#__PURE__*/function () { + var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(client, document) { + var _yield$client$collect, included, foldersOutsideTrash; - /** - * Computes `number` rounded up to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round up. - * @param {number} [precision=0] The precision to round up to. - * @returns {number} Returns the rounded up number. - * @example - * - * _.ceil(4.006); - * // => 5 - * - * _.ceil(6.004, 2); - * // => 6.01 - * - * _.ceil(6040, -2); - * // => 6100 - */ - var ceil = createRound('ceil'); + return _regenerator.default.wrap(function _callee3$(_context3) { + while (1) { + switch (_context3.prev = _context3.next) { + case 0: + _context3.next = 2; + return client.collection('io.cozy.files').findReferencedBy(document); - /** - * Divide two numbers. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Math - * @param {number} dividend The first number in a division. - * @param {number} divisor The second number in a division. - * @returns {number} Returns the quotient. - * @example - * - * _.divide(6, 4); - * // => 1.5 - */ - var divide = createMathOperation(function(dividend, divisor) { - return dividend / divisor; - }, 1); + case 2: + _yield$client$collect = _context3.sent; + included = _yield$client$collect.included; + foldersOutsideTrash = included.filter(function (folder) { + return !/^\/\.cozy_trash/.test(folder.attributes.path); + }); // there can be multiple folders with the same reference in some edge cases + // when this happens we return the most recent one - /** - * Computes `number` rounded down to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round down. - * @param {number} [precision=0] The precision to round down to. - * @returns {number} Returns the rounded down number. - * @example - * - * _.floor(4.006); - * // => 4 - * - * _.floor(0.046, 2); - * // => 0.04 - * - * _.floor(4060, -2); - * // => 4000 - */ - var floor = createRound('floor'); + return _context3.abrupt("return", foldersOutsideTrash.length > 0 ? (0, _sortBy.default)(foldersOutsideTrash, 'created_at').pop() : null); - /** - * Computes the maximum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * _.max([]); - * // => undefined - */ - function max(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseGt) - : undefined; - } + case 6: + case "end": + return _context3.stop(); + } + } + }, _callee3); + })); - /** - * This method is like `_.max` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the maximum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.maxBy(objects, function(o) { return o.n; }); - * // => { 'n': 2 } - * - * // The `_.property` iteratee shorthand. - * _.maxBy(objects, 'n'); - * // => { 'n': 2 } - */ - function maxBy(array, iteratee) { - return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee, 2), baseGt) - : undefined; - } + return function getReferencedFolder(_x7, _x8) { + return _ref3.apply(this, arguments); + }; +}(); - /** - * Computes the mean of the values in `array`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @returns {number} Returns the mean. - * @example - * - * _.mean([4, 2, 8, 6]); - * // => 5 - */ - function mean(array) { - return baseMean(array, identity); - } +exports.getReferencedFolder = getReferencedFolder; - /** - * This method is like `_.mean` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the value to be averaged. - * The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the mean. - * @example - * - * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; - * - * _.meanBy(objects, function(o) { return o.n; }); - * // => 5 - * - * // The `_.property` iteratee shorthand. - * _.meanBy(objects, 'n'); - * // => 5 - */ - function meanBy(array, iteratee) { - return baseMean(array, getIteratee(iteratee, 2)); - } +/***/ }), +/* 826 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Computes the minimum value of `array`. If `array` is empty or falsey, - * `undefined` is returned. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Math - * @param {Array} array The array to iterate over. - * @returns {*} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * _.min([]); - * // => undefined - */ - function min(array) { - return (array && array.length) - ? baseExtremum(array, identity, baseLt) - : undefined; - } +var baseFlatten = __webpack_require__(559), + baseOrderBy = __webpack_require__(737), + baseRest = __webpack_require__(562), + isIterateeCall = __webpack_require__(754); - /** - * This method is like `_.min` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the minimum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.minBy(objects, function(o) { return o.n; }); - * // => { 'n': 1 } - * - * // The `_.property` iteratee shorthand. - * _.minBy(objects, 'n'); - * // => { 'n': 1 } - */ - function minBy(array, iteratee) { - return (array && array.length) - ? baseExtremum(array, getIteratee(iteratee, 2), baseLt) - : undefined; - } +/** + * Creates an array of elements, sorted in ascending order by the results of + * running each element in a collection thru each iteratee. This method + * performs a stable sort, that is, it preserves the original sort order of + * equal elements. The iteratees are invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {...(Function|Function[])} [iteratees=[_.identity]] + * The iteratees to sort by. + * @returns {Array} Returns the new sorted array. + * @example + * + * var users = [ + * { 'user': 'fred', 'age': 48 }, + * { 'user': 'barney', 'age': 36 }, + * { 'user': 'fred', 'age': 30 }, + * { 'user': 'barney', 'age': 34 } + * ]; + * + * _.sortBy(users, [function(o) { return o.user; }]); + * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] + * + * _.sortBy(users, ['user', 'age']); + * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] + */ +var sortBy = baseRest(function(collection, iteratees) { + if (collection == null) { + return []; + } + var length = iteratees.length; + if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { + iteratees = []; + } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { + iteratees = [iteratees[0]]; + } + return baseOrderBy(collection, baseFlatten(iteratees, 1), []); +}); - /** - * Multiply two numbers. - * - * @static - * @memberOf _ - * @since 4.7.0 - * @category Math - * @param {number} multiplier The first number in a multiplication. - * @param {number} multiplicand The second number in a multiplication. - * @returns {number} Returns the product. - * @example - * - * _.multiply(6, 4); - * // => 24 - */ - var multiply = createMathOperation(function(multiplier, multiplicand) { - return multiplier * multiplicand; - }, 1); +module.exports = sortBy; - /** - * Computes `number` rounded to `precision`. - * - * @static - * @memberOf _ - * @since 3.10.0 - * @category Math - * @param {number} number The number to round. - * @param {number} [precision=0] The precision to round to. - * @returns {number} Returns the rounded number. - * @example - * - * _.round(4.006); - * // => 4 - * - * _.round(4.006, 2); - * // => 4.01 - * - * _.round(4060, -2); - * // => 4100 - */ - var round = createRound('round'); - /** - * Subtract two numbers. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {number} minuend The first number in a subtraction. - * @param {number} subtrahend The second number in a subtraction. - * @returns {number} Returns the difference. - * @example - * - * _.subtract(6, 4); - * // => 2 - */ - var subtract = createMathOperation(function(minuend, subtrahend) { - return minuend - subtrahend; - }, 0); +/***/ }), +/* 827 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Computes the sum of the values in `array`. - * - * @static - * @memberOf _ - * @since 3.4.0 - * @category Math - * @param {Array} array The array to iterate over. - * @returns {number} Returns the sum. - * @example - * - * _.sum([4, 2, 8, 6]); - * // => 20 - */ - function sum(array) { - return (array && array.length) - ? baseSum(array, identity) - : 0; - } +"use strict"; - /** - * This method is like `_.sum` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the value to be summed. - * The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the sum. - * @example - * - * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; - * - * _.sumBy(objects, function(o) { return o.n; }); - * // => 20 - * - * // The `_.property` iteratee shorthand. - * _.sumBy(objects, 'n'); - * // => 20 - */ - function sumBy(array, iteratee) { - return (array && array.length) - ? baseSum(array, getIteratee(iteratee, 2)) - : 0; - } - /*------------------------------------------------------------------------*/ +var _interopRequireDefault = __webpack_require__(530); - // Add methods that return wrapped values in chain sequences. - lodash.after = after; - lodash.ary = ary; - lodash.assign = assign; - lodash.assignIn = assignIn; - lodash.assignInWith = assignInWith; - lodash.assignWith = assignWith; - lodash.at = at; - lodash.before = before; - lodash.bind = bind; - lodash.bindAll = bindAll; - lodash.bindKey = bindKey; - lodash.castArray = castArray; - lodash.chain = chain; - lodash.chunk = chunk; - lodash.compact = compact; - lodash.concat = concat; - lodash.cond = cond; - lodash.conforms = conforms; - lodash.constant = constant; - lodash.countBy = countBy; - lodash.create = create; - lodash.curry = curry; - lodash.curryRight = curryRight; - lodash.debounce = debounce; - lodash.defaults = defaults; - lodash.defaultsDeep = defaultsDeep; - lodash.defer = defer; - lodash.delay = delay; - lodash.difference = difference; - lodash.differenceBy = differenceBy; - lodash.differenceWith = differenceWith; - lodash.drop = drop; - lodash.dropRight = dropRight; - lodash.dropRightWhile = dropRightWhile; - lodash.dropWhile = dropWhile; - lodash.fill = fill; - lodash.filter = filter; - lodash.flatMap = flatMap; - lodash.flatMapDeep = flatMapDeep; - lodash.flatMapDepth = flatMapDepth; - lodash.flatten = flatten; - lodash.flattenDeep = flattenDeep; - lodash.flattenDepth = flattenDepth; - lodash.flip = flip; - lodash.flow = flow; - lodash.flowRight = flowRight; - lodash.fromPairs = fromPairs; - lodash.functions = functions; - lodash.functionsIn = functionsIn; - lodash.groupBy = groupBy; - lodash.initial = initial; - lodash.intersection = intersection; - lodash.intersectionBy = intersectionBy; - lodash.intersectionWith = intersectionWith; - lodash.invert = invert; - lodash.invertBy = invertBy; - lodash.invokeMap = invokeMap; - lodash.iteratee = iteratee; - lodash.keyBy = keyBy; - lodash.keys = keys; - lodash.keysIn = keysIn; - lodash.map = map; - lodash.mapKeys = mapKeys; - lodash.mapValues = mapValues; - lodash.matches = matches; - lodash.matchesProperty = matchesProperty; - lodash.memoize = memoize; - lodash.merge = merge; - lodash.mergeWith = mergeWith; - lodash.method = method; - lodash.methodOf = methodOf; - lodash.mixin = mixin; - lodash.negate = negate; - lodash.nthArg = nthArg; - lodash.omit = omit; - lodash.omitBy = omitBy; - lodash.once = once; - lodash.orderBy = orderBy; - lodash.over = over; - lodash.overArgs = overArgs; - lodash.overEvery = overEvery; - lodash.overSome = overSome; - lodash.partial = partial; - lodash.partialRight = partialRight; - lodash.partition = partition; - lodash.pick = pick; - lodash.pickBy = pickBy; - lodash.property = property; - lodash.propertyOf = propertyOf; - lodash.pull = pull; - lodash.pullAll = pullAll; - lodash.pullAllBy = pullAllBy; - lodash.pullAllWith = pullAllWith; - lodash.pullAt = pullAt; - lodash.range = range; - lodash.rangeRight = rangeRight; - lodash.rearg = rearg; - lodash.reject = reject; - lodash.remove = remove; - lodash.rest = rest; - lodash.reverse = reverse; - lodash.sampleSize = sampleSize; - lodash.set = set; - lodash.setWith = setWith; - lodash.shuffle = shuffle; - lodash.slice = slice; - lodash.sortBy = sortBy; - lodash.sortedUniq = sortedUniq; - lodash.sortedUniqBy = sortedUniqBy; - lodash.split = split; - lodash.spread = spread; - lodash.tail = tail; - lodash.take = take; - lodash.takeRight = takeRight; - lodash.takeRightWhile = takeRightWhile; - lodash.takeWhile = takeWhile; - lodash.tap = tap; - lodash.throttle = throttle; - lodash.thru = thru; - lodash.toArray = toArray; - lodash.toPairs = toPairs; - lodash.toPairsIn = toPairsIn; - lodash.toPath = toPath; - lodash.toPlainObject = toPlainObject; - lodash.transform = transform; - lodash.unary = unary; - lodash.union = union; - lodash.unionBy = unionBy; - lodash.unionWith = unionWith; - lodash.uniq = uniq; - lodash.uniqBy = uniqBy; - lodash.uniqWith = uniqWith; - lodash.unset = unset; - lodash.unzip = unzip; - lodash.unzipWith = unzipWith; - lodash.update = update; - lodash.updateWith = updateWith; - lodash.values = values; - lodash.valuesIn = valuesIn; - lodash.without = without; - lodash.words = words; - lodash.wrap = wrap; - lodash.xor = xor; - lodash.xorBy = xorBy; - lodash.xorWith = xorWith; - lodash.zip = zip; - lodash.zipObject = zipObject; - lodash.zipObjectDeep = zipObjectDeep; - lodash.zipWith = zipWith; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.fetchURL = exports.generateUrlForNote = exports.generatePrivateUrl = void 0; - // Add aliases. - lodash.entries = toPairs; - lodash.entriesIn = toPairsIn; - lodash.extend = assignIn; - lodash.extendWith = assignInWith; +var _regenerator = _interopRequireDefault(__webpack_require__(545)); - // Add methods to `lodash.prototype`. - mixin(lodash, lodash); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); - /*------------------------------------------------------------------------*/ +var _helpers = __webpack_require__(761); - // Add methods that return unwrapped values in chain sequences. - lodash.add = add; - lodash.attempt = attempt; - lodash.camelCase = camelCase; - lodash.capitalize = capitalize; - lodash.ceil = ceil; - lodash.clamp = clamp; - lodash.clone = clone; - lodash.cloneDeep = cloneDeep; - lodash.cloneDeepWith = cloneDeepWith; - lodash.cloneWith = cloneWith; - lodash.conformsTo = conformsTo; - lodash.deburr = deburr; - lodash.defaultTo = defaultTo; - lodash.divide = divide; - lodash.endsWith = endsWith; - lodash.eq = eq; - lodash.escape = escape; - lodash.escapeRegExp = escapeRegExp; - lodash.every = every; - lodash.find = find; - lodash.findIndex = findIndex; - lodash.findKey = findKey; - lodash.findLast = findLast; - lodash.findLastIndex = findLastIndex; - lodash.findLastKey = findLastKey; - lodash.floor = floor; - lodash.forEach = forEach; - lodash.forEachRight = forEachRight; - lodash.forIn = forIn; - lodash.forInRight = forInRight; - lodash.forOwn = forOwn; - lodash.forOwnRight = forOwnRight; - lodash.get = get; - lodash.gt = gt; - lodash.gte = gte; - lodash.has = has; - lodash.hasIn = hasIn; - lodash.head = head; - lodash.identity = identity; - lodash.includes = includes; - lodash.indexOf = indexOf; - lodash.inRange = inRange; - lodash.invoke = invoke; - lodash.isArguments = isArguments; - lodash.isArray = isArray; - lodash.isArrayBuffer = isArrayBuffer; - lodash.isArrayLike = isArrayLike; - lodash.isArrayLikeObject = isArrayLikeObject; - lodash.isBoolean = isBoolean; - lodash.isBuffer = isBuffer; - lodash.isDate = isDate; - lodash.isElement = isElement; - lodash.isEmpty = isEmpty; - lodash.isEqual = isEqual; - lodash.isEqualWith = isEqualWith; - lodash.isError = isError; - lodash.isFinite = isFinite; - lodash.isFunction = isFunction; - lodash.isInteger = isInteger; - lodash.isLength = isLength; - lodash.isMap = isMap; - lodash.isMatch = isMatch; - lodash.isMatchWith = isMatchWith; - lodash.isNaN = isNaN; - lodash.isNative = isNative; - lodash.isNil = isNil; - lodash.isNull = isNull; - lodash.isNumber = isNumber; - lodash.isObject = isObject; - lodash.isObjectLike = isObjectLike; - lodash.isPlainObject = isPlainObject; - lodash.isRegExp = isRegExp; - lodash.isSafeInteger = isSafeInteger; - lodash.isSet = isSet; - lodash.isString = isString; - lodash.isSymbol = isSymbol; - lodash.isTypedArray = isTypedArray; - lodash.isUndefined = isUndefined; - lodash.isWeakMap = isWeakMap; - lodash.isWeakSet = isWeakSet; - lodash.join = join; - lodash.kebabCase = kebabCase; - lodash.last = last; - lodash.lastIndexOf = lastIndexOf; - lodash.lowerCase = lowerCase; - lodash.lowerFirst = lowerFirst; - lodash.lt = lt; - lodash.lte = lte; - lodash.max = max; - lodash.maxBy = maxBy; - lodash.mean = mean; - lodash.meanBy = meanBy; - lodash.min = min; - lodash.minBy = minBy; - lodash.stubArray = stubArray; - lodash.stubFalse = stubFalse; - lodash.stubObject = stubObject; - lodash.stubString = stubString; - lodash.stubTrue = stubTrue; - lodash.multiply = multiply; - lodash.nth = nth; - lodash.noConflict = noConflict; - lodash.noop = noop; - lodash.now = now; - lodash.pad = pad; - lodash.padEnd = padEnd; - lodash.padStart = padStart; - lodash.parseInt = parseInt; - lodash.random = random; - lodash.reduce = reduce; - lodash.reduceRight = reduceRight; - lodash.repeat = repeat; - lodash.replace = replace; - lodash.result = result; - lodash.round = round; - lodash.runInContext = runInContext; - lodash.sample = sample; - lodash.size = size; - lodash.snakeCase = snakeCase; - lodash.some = some; - lodash.sortedIndex = sortedIndex; - lodash.sortedIndexBy = sortedIndexBy; - lodash.sortedIndexOf = sortedIndexOf; - lodash.sortedLastIndex = sortedLastIndex; - lodash.sortedLastIndexBy = sortedLastIndexBy; - lodash.sortedLastIndexOf = sortedLastIndexOf; - lodash.startCase = startCase; - lodash.startsWith = startsWith; - lodash.subtract = subtract; - lodash.sum = sum; - lodash.sumBy = sumBy; - lodash.template = template; - lodash.times = times; - lodash.toFinite = toFinite; - lodash.toInteger = toInteger; - lodash.toLength = toLength; - lodash.toLower = toLower; - lodash.toNumber = toNumber; - lodash.toSafeInteger = toSafeInteger; - lodash.toString = toString; - lodash.toUpper = toUpper; - lodash.trim = trim; - lodash.trimEnd = trimEnd; - lodash.trimStart = trimStart; - lodash.truncate = truncate; - lodash.unescape = unescape; - lodash.uniqueId = uniqueId; - lodash.upperCase = upperCase; - lodash.upperFirst = upperFirst; +/** + * + * @param {string} notesAppUrl URL to the Notes App (https://notes.foo.mycozy.cloud) + * @param {object} file io.cozy.files object + */ +var generatePrivateUrl = function generatePrivateUrl(notesAppUrl, file) { + var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; + var returnUrl = options.returnUrl; + var url = new URL(notesAppUrl); - // Add aliases. - lodash.each = forEach; - lodash.eachRight = forEachRight; - lodash.first = head; + if (returnUrl) { + url.searchParams.set('returnUrl', returnUrl); + } - mixin(lodash, (function() { - var source = {}; - baseForOwn(lodash, function(func, methodName) { - if (!hasOwnProperty.call(lodash.prototype, methodName)) { - source[methodName] = func; - } - }); - return source; - }()), { 'chain': false }); + url.hash = "#/n/".concat(file.id); + return url.toString(); +}; - /*------------------------------------------------------------------------*/ +exports.generatePrivateUrl = generatePrivateUrl; - /** - * The semantic version number. - * - * @static - * @memberOf _ - * @type {string} - */ - lodash.VERSION = VERSION; +var generateUrlForNote = function generateUrlForNote(notesAppUrl, file) { + console.warn('generateUrlForNote is deprecated. Please use models.note.generatePrivateUrl instead'); + return generatePrivateUrl(notesAppUrl, file); +}; +/** + * Fetch and build an URL to open a note. + * + * @param {object} client CozyClient instance + * @param {object} file io.cozy.file object + * @returns {Promise<string>} url + */ - // Assign default placeholders. - arrayEach(['bind', 'bindKey', 'curry', 'curryRight', 'partial', 'partialRight'], function(methodName) { - lodash[methodName].placeholder = lodash; - }); - // Add `LazyWrapper` methods for `_.drop` and `_.take` variants. - arrayEach(['drop', 'take'], function(methodName, index) { - LazyWrapper.prototype[methodName] = function(n) { - n = n === undefined ? 1 : nativeMax(toInteger(n), 0); +exports.generateUrlForNote = generateUrlForNote; - var result = (this.__filtered__ && !index) - ? new LazyWrapper(this) - : this.clone(); +var fetchURL = /*#__PURE__*/function () { + var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, file) { + var _yield$client$getStac, _yield$client$getStac2, note_id, subdomain, protocol, instance, sharecode, public_name, searchParams; - if (result.__filtered__) { - result.__takeCount__ = nativeMin(n, result.__takeCount__); - } else { - result.__views__.push({ - 'size': nativeMin(n, MAX_ARRAY_LENGTH), - 'type': methodName + (result.__dir__ < 0 ? 'Right' : '') - }); - } - return result; - }; + return _regenerator.default.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + _context.next = 2; + return client.getStackClient().collection('io.cozy.notes').fetchURL({ + _id: file.id + }); - LazyWrapper.prototype[methodName + 'Right'] = function(n) { - return this.reverse()[methodName](n).reverse(); - }; - }); + case 2: + _yield$client$getStac = _context.sent; + _yield$client$getStac2 = _yield$client$getStac.data; + note_id = _yield$client$getStac2.note_id; + subdomain = _yield$client$getStac2.subdomain; + protocol = _yield$client$getStac2.protocol; + instance = _yield$client$getStac2.instance; + sharecode = _yield$client$getStac2.sharecode; + public_name = _yield$client$getStac2.public_name; - // Add `LazyWrapper` methods that accept an `iteratee` value. - arrayEach(['filter', 'map', 'takeWhile'], function(methodName, index) { - var type = index + 1, - isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG; + if (!sharecode) { + _context.next = 17; + break; + } - LazyWrapper.prototype[methodName] = function(iteratee) { - var result = this.clone(); - result.__iteratees__.push({ - 'iteratee': getIteratee(iteratee, 3), - 'type': type - }); - result.__filtered__ = result.__filtered__ || isFilter; - return result; - }; - }); + searchParams = [['id', note_id]]; + searchParams.push(['sharecode', sharecode]); + if (public_name) searchParams.push(['username', public_name]); + return _context.abrupt("return", (0, _helpers.generateWebLink)({ + cozyUrl: "".concat(protocol, "://").concat(instance), + searchParams: searchParams, + pathname: '/public/', + slug: 'notes', + subDomainType: subdomain + })); - // Add `LazyWrapper` methods for `_.head` and `_.last`. - arrayEach(['head', 'last'], function(methodName, index) { - var takeName = 'take' + (index ? 'Right' : ''); + case 17: + return _context.abrupt("return", (0, _helpers.generateWebLink)({ + cozyUrl: "".concat(protocol, "://").concat(instance), + pathname: '', + slug: 'notes', + subDomainType: subdomain, + hash: "/n/".concat(note_id) + })); - LazyWrapper.prototype[methodName] = function() { - return this[takeName](1).value()[0]; - }; - }); + case 18: + case "end": + return _context.stop(); + } + } + }, _callee); + })); - // Add `LazyWrapper` methods for `_.initial` and `_.tail`. - arrayEach(['initial', 'tail'], function(methodName, index) { - var dropName = 'drop' + (index ? '' : 'Right'); + return function fetchURL(_x, _x2) { + return _ref.apply(this, arguments); + }; +}(); - LazyWrapper.prototype[methodName] = function() { - return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1); - }; - }); +exports.fetchURL = fetchURL; - LazyWrapper.prototype.compact = function() { - return this.filter(identity); - }; +/***/ }), +/* 828 */ +/***/ (function(module, exports, __webpack_require__) { - LazyWrapper.prototype.find = function(predicate) { - return this.filter(predicate).head(); - }; +"use strict"; - LazyWrapper.prototype.findLast = function(predicate) { - return this.reverse().find(predicate); - }; - LazyWrapper.prototype.invokeMap = baseRest(function(path, args) { - if (typeof path == 'function') { - return new LazyWrapper(this); - } - return this.map(function(value) { - return baseInvoke(value, path, args); - }); - }); - - LazyWrapper.prototype.reject = function(predicate) { - return this.filter(negate(getIteratee(predicate))); - }; - - LazyWrapper.prototype.slice = function(start, end) { - start = toInteger(start); - - var result = this; - if (result.__filtered__ && (start > 0 || end < 0)) { - return new LazyWrapper(result); - } - if (start < 0) { - result = result.takeRight(-start); - } else if (start) { - result = result.drop(start); - } - if (end !== undefined) { - end = toInteger(end); - result = end < 0 ? result.dropRight(-end) : result.take(end - start); - } - return result; - }; - - LazyWrapper.prototype.takeRightWhile = function(predicate) { - return this.reverse().takeWhile(predicate).reverse(); - }; - - LazyWrapper.prototype.toArray = function() { - return this.take(MAX_ARRAY_LENGTH); - }; - - // Add `LazyWrapper` methods to `lodash.prototype`. - baseForOwn(LazyWrapper.prototype, function(func, methodName) { - var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), - isTaker = /^(?:head|last)$/.test(methodName), - lodashFunc = lodash[isTaker ? ('take' + (methodName == 'last' ? 'Right' : '')) : methodName], - retUnwrapped = isTaker || /^find/.test(methodName); - - if (!lodashFunc) { - return; - } - lodash.prototype[methodName] = function() { - var value = this.__wrapped__, - args = isTaker ? [1] : arguments, - isLazy = value instanceof LazyWrapper, - iteratee = args[0], - useLazy = isLazy || isArray(value); - - var interceptor = function(value) { - var result = lodashFunc.apply(lodash, arrayPush([value], args)); - return (isTaker && chainAll) ? result[0] : result; - }; - - if (useLazy && checkIteratee && typeof iteratee == 'function' && iteratee.length != 1) { - // Avoid lazy use if the iteratee has a "length" value other than `1`. - isLazy = useLazy = false; - } - var chainAll = this.__chain__, - isHybrid = !!this.__actions__.length, - isUnwrapped = retUnwrapped && !chainAll, - onlyLazy = isLazy && !isHybrid; - - if (!retUnwrapped && useLazy) { - value = onlyLazy ? value : new LazyWrapper(this); - var result = func.apply(value, args); - result.__actions__.push({ 'func': thru, 'args': [interceptor], 'thisArg': undefined }); - return new LodashWrapper(result, chainAll); - } - if (isUnwrapped && onlyLazy) { - return func.apply(this, args); - } - result = this.thru(interceptor); - return isUnwrapped ? (isTaker ? result.value()[0] : result.value()) : result; - }; - }); - - // Add `Array` methods to `lodash.prototype`. - arrayEach(['pop', 'push', 'shift', 'sort', 'splice', 'unshift'], function(methodName) { - var func = arrayProto[methodName], - chainName = /^(?:push|sort|unshift)$/.test(methodName) ? 'tap' : 'thru', - retUnwrapped = /^(?:pop|shift)$/.test(methodName); - - lodash.prototype[methodName] = function() { - var args = arguments; - if (retUnwrapped && !this.__chain__) { - var value = this.value(); - return func.apply(isArray(value) ? value : [], args); - } - return this[chainName](function(value) { - return func.apply(isArray(value) ? value : [], args); - }); - }; - }); - - // Map minified method names to their real names. - baseForOwn(LazyWrapper.prototype, function(func, methodName) { - var lodashFunc = lodash[methodName]; - if (lodashFunc) { - var key = lodashFunc.name + ''; - if (!hasOwnProperty.call(realNames, key)) { - realNames[key] = []; - } - realNames[key].push({ 'name': methodName, 'func': lodashFunc }); - } - }); - - realNames[createHybrid(undefined, WRAP_BIND_KEY_FLAG).name] = [{ - 'name': 'wrapper', - 'func': undefined - }]; - - // Add methods to `LazyWrapper`. - LazyWrapper.prototype.clone = lazyClone; - LazyWrapper.prototype.reverse = lazyReverse; - LazyWrapper.prototype.value = lazyValue; - - // Add chain sequence methods to the `lodash` wrapper. - lodash.prototype.at = wrapperAt; - lodash.prototype.chain = wrapperChain; - lodash.prototype.commit = wrapperCommit; - lodash.prototype.next = wrapperNext; - lodash.prototype.plant = wrapperPlant; - lodash.prototype.reverse = wrapperReverse; - lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue; - - // Add lazy aliases. - lodash.prototype.first = lodash.prototype.head; - - if (symIterator) { - lodash.prototype[symIterator] = wrapperToIterator; - } - return lodash; - }); - - /*--------------------------------------------------------------------------*/ - - // Export lodash. - var _ = runInContext(); - - // Some AMD build optimizers, like r.js, check for condition patterns like: - if (true) { - // Expose Lodash on the global object to prevent errors when Lodash is - // loaded by a script tag in the presence of an AMD loader. - // See http://requirejs.org/docs/errors.html#mismatch for more details. - // Use `_.noConflict` to remove Lodash from the global object. - root._ = _; - - // Define as an anonymous module so, through path mapping, it can be - // referenced as the "underscore" module. - !(__WEBPACK_AMD_DEFINE_RESULT__ = (function() { - return _; - }).call(exports, __webpack_require__, exports, module), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); - } - // Check for `exports` after `define` in case a build optimizer adds it. - else {} -}.call(this)); - -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(13)(module))) - -/***/ }), -/* 826 */ -/***/ (function(module) { - -module.exports = JSON.parse("{\"qualifications\":[{\"label\":\"national_id_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\"]},{\"label\":\"passport\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\"]},{\"label\":\"residence_permit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"immigration\",\"subjects\":[\"permit\",\"identity\"]},{\"label\":\"family_record_book\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"birth_certificate\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"identity\",\"family\"]},{\"label\":\"driver_license\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"permit\",\"driving\"]},{\"label\":\"other_identity_document\",\"purpose\":\"attestation\"},{\"label\":\"wedding\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"pacs\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"divorce\",\"purpose\":\"contract\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"civil_registration\",\"subjects\":[\"family\"]},{\"label\":\"large_family_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"transport\",\"subjects\":[\"right\"]},{\"label\":\"caf\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"family\",\"subjects\":[\"right\"]},{\"label\":\"other_family_document\"},{\"label\":\"diploma\",\"purpose\":\"attestation\",\"sourceCategory\":\"education\",\"subjects\":[\"achievement\"]},{\"label\":\"work_contract\",\"purpose\":\"contract\",\"sourceCategory\":\"employer\",\"subjects\":[\"work\",\"employment\"]},{\"label\":\"pay_sheet\",\"purpose\":\"attestation\",\"sourceCategory\":\"employer\",\"subjects\":[\"work\",\"revenues\"]},{\"label\":\"unemployment_benefit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"subjects\":[\"revenues\"]},{\"label\":\"pension\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"subjects\":[\"revenues\"]},{\"label\":\"other_revenue\",\"purpose\":\"attestation\",\"subjects\":[\"revenues\"]},{\"label\":\"gradebook\",\"purpose\":\"report\",\"sourceCategory\":\"education\",\"subjects\":[\"history\"]},{\"label\":\"student_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"education\",\"subjects\":[\"identity\"]},{\"label\":\"resume\",\"purpose\":\"description\",\"subjects\":[\"employment\"]},{\"label\":\"motivation_letter\",\"purpose\":\"description\",\"subjects\":[\"employment\"]},{\"label\":\"other_work_document\"},{\"label\":\"health_book\",\"purpose\":\"report\",\"sourceCategory\":\"health\",\"subjects\":[\"history\"]},{\"label\":\"national_insurance_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"health\",\"subjects\":[\"insurance\"]},{\"label\":\"health_insurance_card\",\"purpose\":\"attestation\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"health\",\"subjects\":[\"insurance\"]},{\"label\":\"prescription\",\"purpose\":\"attestation\",\"sourceCategory\":\"health\",\"subjects\":[\"right\"]},{\"label\":\"health_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"health\"},{\"label\":\"other_health_document\"},{\"label\":\"vehicle_registration\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"right\",\"identity\"]},{\"label\":\"car_insurance\",\"purpose\":\"attestation\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"transport\",\"subjects\":[\"insurance\",\"car\"]},{\"label\":\"mechanic_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"transport\"},{\"label\":\"transport_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"transport\"},{\"label\":\"other_transport_document\"},{\"label\":\"house_sale_agreeement\",\"purpose\":\"contract\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"building_permit\",\"purpose\":\"attestation\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"real_estate\",\"subjects\":[\"permit\",\"house\"]},{\"label\":\"technical_diagnostic_record\",\"purpose\":\"report\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"compliance\",\"house\"]},{\"label\":\"lease\",\"purpose\":\"contract\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"rent_receipt\",\"purpose\":\"invoice\",\"sourceCategory\":\"real_estate\",\"subjects\":[\"house\"]},{\"label\":\"house_insurance\",\"purpose\":\"contract\",\"sourceCategory\":\"insurance\",\"sourceSubCategory\":\"real_estate\",\"subjects\":[\"insurance\",\"house\"]},{\"label\":\"work_quote\",\"purpose\":\"description\",\"sourceCategory\":\"building\",\"subjects\":[\"building\",\"house\"]},{\"label\":\"work_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"building\",\"subjects\":[\"building\",\"house\"]},{\"label\":\"other_house_document\"},{\"label\":\"phone_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\",\"sourceSubCategory\":\"mobile\"},{\"label\":\"isp_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\",\"sourceSubCategory\":\"internet\",\"subjects\":[\"subscription\"]},{\"label\":\"telecom_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"telecom\"},{\"label\":\"energy_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"energy\"},{\"label\":\"water_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"water\"},{\"label\":\"appliance_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"retail\"},{\"label\":\"web_service_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"web\"},{\"label\":\"restaurant_invoice\",\"purpose\":\"invoice\",\"sourceCategory\":\"alimentation\"},{\"label\":\"other_invoice\",\"purpose\":\"invoice\"},{\"label\":\"tax_return\",\"purpose\":\"report\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"tax_notice\",\"purpose\":\"invoice\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"tax_timetable\",\"purpose\":\"report\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"other_tax_document\",\"sourceCategory\":\"gov\",\"sourceSubCategory\":\"tax\",\"subjects\":[\"tax\"]},{\"label\":\"bank_details\",\"purpose\":\"attestation\",\"sourceCategory\":\"bank\",\"subjects\":[\"identity\"]},{\"label\":\"bank_statement\",\"purpose\":\"report\",\"sourceCategory\":\"bank\",\"subjects\":[\"history\"]},{\"label\":\"loan_agreement\",\"purpose\":\"contract\",\"sourceCategory\":\"bank\"},{\"label\":\"other_bank_document\",\"sourceCategory\":\"bank\"},{\"label\":\"receipt\",\"purpose\":\"report\"}],\"purposeKnownValues\":[\"attestation\",\"contract\",\"invoice\",\"report\",\"description\",\"evaluation\"],\"sourceCategoryKnownValues\":[\"bank\",\"insurance\",\"retail\",\"telecom\",\"energy\",\"water\",\"health\",\"gov\",\"education\",\"employer\",\"transport\",\"goods\",\"alimentation\",\"building\",\"real_estate\",\"web\"],\"sourceSubCategoryKnownValues\":[\"civil_registration\",\"immigration\",\"transport\",\"family\",\"tax\",\"health\",\"real_estate\",\"mobile\",\"internet\"],\"subjectsKnownValues\":[\"identity\",\"permit\",\"family\",\"driving\",\"right\",\"subvention\",\"achievement\",\"degree\",\"work\",\"employment\",\"revenues\",\"history\",\"insurance\",\"drugs\",\"medical_act\",\"car\",\"moto\",\"truck\",\"boat\",\"subscription\",\"buy/sale\",\"house\",\"compliance\",\"building\",\"food\",\"real_estate\",\"tax\",\"insurance\",\"education\",\"statement\",\"course\",\"internet\",\"phone\"]}"); - -/***/ }), -/* 827 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(531); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.getReferencedFolder = exports.createFolderWithReference = exports.ensureMagicFolder = exports.MAGIC_FOLDERS = void 0; - -var _regenerator = _interopRequireDefault(__webpack_require__(546)); - -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); - -var _sortBy = _interopRequireDefault(__webpack_require__(828)); - -var _CozyClient = _interopRequireDefault(__webpack_require__(532)); - -var _types = __webpack_require__(629); - -var APP_DOCTYPE = 'io.cozy.apps'; -var MAGIC_FOLDERS = { - ADMINISTRATIVE: "".concat(APP_DOCTYPE, "/administrative"), - PHOTOS: "".concat(APP_DOCTYPE, "/photos"), - PHOTOS_BACKUP: "".concat(APP_DOCTYPE, "/photos/mobile"), - PHOTOS_UPLOAD: "".concat(APP_DOCTYPE, "/photos/upload"), - NOTES: "".concat(APP_DOCTYPE, "/notes"), - HOME: "".concat(APP_DOCTYPE, "/home") -}; -/** - * Returns a "Magic Folder", given its id. See https://docs.cozy.io/en/cozy-doctypes/docs/io.cozy.apps/#special-iocozyapps-doctypes - * - * @param {CozyClient} client cozy-client instance - * @param {string} id Magic Folder id. `CozyFolder.magicFolders` contains the - * ids of folders that can be magic folders. - * @param {string} path Default path to use if magic folder does not exist - * @returns {Promise<IOCozyFolder>} Folder document - */ - -exports.MAGIC_FOLDERS = MAGIC_FOLDERS; - -var ensureMagicFolder = /*#__PURE__*/function () { - var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, id, path) { - var magicFolderDocument, existingMagicFolder, magicFoldersValues; - return _regenerator.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - magicFolderDocument = { - _type: APP_DOCTYPE, - _id: id - }; - _context.next = 3; - return getReferencedFolder(client, magicFolderDocument); - - case 3: - existingMagicFolder = _context.sent; - - if (!existingMagicFolder) { - _context.next = 6; - break; - } - - return _context.abrupt("return", existingMagicFolder); - - case 6: - magicFoldersValues = Object.values(MAGIC_FOLDERS); - - if (magicFoldersValues.includes(id)) { - _context.next = 9; - break; - } - - throw new Error("Cannot create Magic folder with id ".concat(id, ". Allowed values are ").concat(magicFoldersValues.join(', '), ".")); - - case 9: - if (path) { - _context.next = 11; - break; - } - - throw new Error('Magic folder default path must be defined'); - - case 11: - return _context.abrupt("return", createFolderWithReference(client, path, magicFolderDocument)); - - case 12: - case "end": - return _context.stop(); - } - } - }, _callee); - })); - - return function ensureMagicFolder(_x, _x2, _x3) { - return _ref.apply(this, arguments); - }; -}(); -/** - * The next functions are considered private and only exported for unit tests - */ - -/** - * Create a folder with a reference to the given document - * - * @param {CozyClient} client - cozy-client instance - * @param {string} path - Folder path - * @param {CozyClientDocument} document - Document to make reference to. Any doctype. - * @returns {Promise<IOCozyFolder>} Folder document - */ - - -exports.ensureMagicFolder = ensureMagicFolder; - -var createFolderWithReference = /*#__PURE__*/function () { - var _ref2 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee2(client, path, document) { - var collection, dirId, _yield$collection$get, dirInfos; - - return _regenerator.default.wrap(function _callee2$(_context2) { - while (1) { - switch (_context2.prev = _context2.next) { - case 0: - collection = client.collection('io.cozy.files'); - _context2.next = 3; - return collection.ensureDirectoryExists(path); - - case 3: - dirId = _context2.sent; - _context2.next = 6; - return collection.addReferencesTo(document, [{ - _id: dirId - }]); - - case 6: - _context2.next = 8; - return collection.get(dirId); - - case 8: - _yield$collection$get = _context2.sent; - dirInfos = _yield$collection$get.data; - return _context2.abrupt("return", dirInfos); - - case 11: - case "end": - return _context2.stop(); - } - } - }, _callee2); - })); - - return function createFolderWithReference(_x4, _x5, _x6) { - return _ref2.apply(this, arguments); - }; -}(); -/** - * Returns the most recent folder referenced by the given document - * - * @param {CozyClient} client cozy-client instance - * @param {CozyClientDocument} document Document to get references from - * @returns {Promise<IOCozyFolder>} Folder referenced by the given document - */ - - -exports.createFolderWithReference = createFolderWithReference; - -var getReferencedFolder = /*#__PURE__*/function () { - var _ref3 = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee3(client, document) { - var _yield$client$collect, included, foldersOutsideTrash; - - return _regenerator.default.wrap(function _callee3$(_context3) { - while (1) { - switch (_context3.prev = _context3.next) { - case 0: - _context3.next = 2; - return client.collection('io.cozy.files').findReferencedBy(document); - - case 2: - _yield$client$collect = _context3.sent; - included = _yield$client$collect.included; - foldersOutsideTrash = included.filter(function (folder) { - return !/^\/\.cozy_trash/.test(folder.attributes.path); - }); // there can be multiple folders with the same reference in some edge cases - // when this happens we return the most recent one - - return _context3.abrupt("return", foldersOutsideTrash.length > 0 ? (0, _sortBy.default)(foldersOutsideTrash, 'created_at').pop() : null); - - case 6: - case "end": - return _context3.stop(); - } - } - }, _callee3); - })); - - return function getReferencedFolder(_x7, _x8) { - return _ref3.apply(this, arguments); - }; -}(); - -exports.getReferencedFolder = getReferencedFolder; - -/***/ }), -/* 828 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseFlatten = __webpack_require__(560), - baseOrderBy = __webpack_require__(738), - baseRest = __webpack_require__(563), - isIterateeCall = __webpack_require__(755); - -/** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in a collection thru each iteratee. This method - * performs a stable sort, that is, it preserves the original sort order of - * equal elements. The iteratees are invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {...(Function|Function[])} [iteratees=[_.identity]] - * The iteratees to sort by. - * @returns {Array} Returns the new sorted array. - * @example - * - * var users = [ - * { 'user': 'fred', 'age': 48 }, - * { 'user': 'barney', 'age': 36 }, - * { 'user': 'fred', 'age': 30 }, - * { 'user': 'barney', 'age': 34 } - * ]; - * - * _.sortBy(users, [function(o) { return o.user; }]); - * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 30]] - * - * _.sortBy(users, ['user', 'age']); - * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['fred', 48]] - */ -var sortBy = baseRest(function(collection, iteratees) { - if (collection == null) { - return []; - } - var length = iteratees.length; - if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) { - iteratees = []; - } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) { - iteratees = [iteratees[0]]; - } - return baseOrderBy(collection, baseFlatten(iteratees, 1), []); -}); - -module.exports = sortBy; - - -/***/ }), -/* 829 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(531); - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.fetchURL = exports.generateUrlForNote = exports.generatePrivateUrl = void 0; - -var _regenerator = _interopRequireDefault(__webpack_require__(546)); - -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); - -var _helpers = __webpack_require__(762); - -/** - * - * @param {string} notesAppUrl URL to the Notes App (https://notes.foo.mycozy.cloud) - * @param {object} file io.cozy.files object - */ -var generatePrivateUrl = function generatePrivateUrl(notesAppUrl, file) { - var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; - var returnUrl = options.returnUrl; - var url = new URL(notesAppUrl); - - if (returnUrl) { - url.searchParams.set('returnUrl', returnUrl); - } - - url.hash = "#/n/".concat(file.id); - return url.toString(); -}; - -exports.generatePrivateUrl = generatePrivateUrl; - -var generateUrlForNote = function generateUrlForNote(notesAppUrl, file) { - console.warn('generateUrlForNote is deprecated. Please use models.note.generatePrivateUrl instead'); - return generatePrivateUrl(notesAppUrl, file); -}; -/** - * Fetch and build an URL to open a note. - * - * @param {object} client CozyClient instance - * @param {object} file io.cozy.file object - * @returns {Promise<string>} url - */ - - -exports.generateUrlForNote = generateUrlForNote; - -var fetchURL = /*#__PURE__*/function () { - var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/_regenerator.default.mark(function _callee(client, file) { - var _yield$client$getStac, _yield$client$getStac2, note_id, subdomain, protocol, instance, sharecode, public_name, searchParams; - - return _regenerator.default.wrap(function _callee$(_context) { - while (1) { - switch (_context.prev = _context.next) { - case 0: - _context.next = 2; - return client.getStackClient().collection('io.cozy.notes').fetchURL({ - _id: file.id - }); - - case 2: - _yield$client$getStac = _context.sent; - _yield$client$getStac2 = _yield$client$getStac.data; - note_id = _yield$client$getStac2.note_id; - subdomain = _yield$client$getStac2.subdomain; - protocol = _yield$client$getStac2.protocol; - instance = _yield$client$getStac2.instance; - sharecode = _yield$client$getStac2.sharecode; - public_name = _yield$client$getStac2.public_name; - - if (!sharecode) { - _context.next = 17; - break; - } - - searchParams = [['id', note_id]]; - searchParams.push(['sharecode', sharecode]); - if (public_name) searchParams.push(['username', public_name]); - return _context.abrupt("return", (0, _helpers.generateWebLink)({ - cozyUrl: "".concat(protocol, "://").concat(instance), - searchParams: searchParams, - pathname: '/public/', - slug: 'notes', - subDomainType: subdomain - })); - - case 17: - return _context.abrupt("return", (0, _helpers.generateWebLink)({ - cozyUrl: "".concat(protocol, "://").concat(instance), - pathname: '', - slug: 'notes', - subDomainType: subdomain, - hash: "/n/".concat(note_id) - })); - - case 18: - case "end": - return _context.stop(); - } - } - }, _callee); - })); - - return function fetchURL(_x, _x2) { - return _ref.apply(this, arguments); - }; -}(); - -exports.fetchURL = fetchURL; - -/***/ }), -/* 830 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true @@ -143019,23 +139711,23 @@ exports.isForType = isForType; exports.isDocumentReadOnly = isDocumentReadOnly; exports.isShortcutCreatedOnTheRecipientCozy = void 0; -var _defineProperty2 = _interopRequireDefault(__webpack_require__(551)); +var _defineProperty2 = _interopRequireDefault(__webpack_require__(550)); -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(541)); +var _toConsumableArray2 = _interopRequireDefault(__webpack_require__(540)); -var _intersection = _interopRequireDefault(__webpack_require__(733)); +var _intersection = _interopRequireDefault(__webpack_require__(732)); var _get = _interopRequireDefault(__webpack_require__(370)); -var _CozyClient = _interopRequireDefault(__webpack_require__(532)); +var _CozyClient = _interopRequireDefault(__webpack_require__(531)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _file = __webpack_require__(823); +var _file = __webpack_require__(821); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } @@ -143432,13 +140124,13 @@ var isShortcutCreatedOnTheRecipientCozy = function isShortcutCreatedOnTheRecipie exports.isShortcutCreatedOnTheRecipientCozy = isShortcutCreatedOnTheRecipientCozy; /***/ }), -/* 831 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true @@ -143463,13 +140155,13 @@ var getCreatedByApp = function getCreatedByApp(doc) { exports.getCreatedByApp = getCreatedByApp; /***/ }), -/* 832 */ +/* 830 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true @@ -143478,7 +140170,7 @@ exports.getIndexByFamilyNameGivenNameEmailCozyUrl = exports.getDefaultSortIndexV var _get = _interopRequireDefault(__webpack_require__(370)); -var _isEmpty = _interopRequireDefault(__webpack_require__(833)); +var _isEmpty = _interopRequireDefault(__webpack_require__(831)); var getPrimaryOrFirst = function getPrimaryOrFirst(property) { return function (obj) { @@ -143729,7 +140421,7 @@ var getIndexByFamilyNameGivenNameEmailCozyUrl = function getIndexByFamilyNameGiv exports.getIndexByFamilyNameGivenNameEmailCozyUrl = getIndexByFamilyNameGivenNameEmailCozyUrl; /***/ }), -/* 833 */ +/* 831 */ /***/ (function(module, exports, __webpack_require__) { var baseKeys = __webpack_require__(454), @@ -143812,26 +140504,26 @@ module.exports = isEmpty; /***/ }), -/* 834 */ +/* 832 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var _interopRequireDefault = __webpack_require__(531); +var _interopRequireDefault = __webpack_require__(530); Object.defineProperty(exports, "__esModule", { value: true }); exports.fetchTimeSeriesByIntervalAndSource = exports.saveTimeSeries = void 0; -var _regenerator = _interopRequireDefault(__webpack_require__(546)); +var _regenerator = _interopRequireDefault(__webpack_require__(545)); -var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(548)); +var _asyncToGenerator2 = _interopRequireDefault(__webpack_require__(547)); -var _dsl = __webpack_require__(626); +var _dsl = __webpack_require__(625); -var _types = __webpack_require__(629); +var _types = __webpack_require__(628); var validateTimeSeriesFormat = function validateTimeSeriesFormat(timeseries) { if (!timeseries.startDate || !timeseries.endDate) { @@ -143974,2108 +140666,1872 @@ var fetchTimeSeriesByIntervalAndSource = /*#__PURE__*/function () { exports.fetchTimeSeriesByIntervalAndSource = fetchTimeSeriesByIntervalAndSource; /***/ }), -/* 835 */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Headers", function() { return Headers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Request", function() { return Request; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Response", function() { return Response; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FetchError", function() { return FetchError; }); -/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100); -/* harmony import */ var http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98); -/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83); -/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99); -/* harmony import */ var zlib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(101); - - - - - +/* 833 */ +/***/ (function(module, exports, __webpack_require__) { -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js +/* global __WEBPACK_PROVIDED_MANIFEST__ */ -// fix for "Readable" isn't a named export issue -const Readable = stream__WEBPACK_IMPORTED_MODULE_0__.Readable; +/** + * Manifest is provided differently in developement that in production. + * + * - In production, the manifest has been "merged" via Webpack via the + * DefinePlugin + * + * - In development/test, we simply read the manifest from the fs + */ +const fs = __webpack_require__(167); -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); +const path = __webpack_require__(160); -class Blob { - constructor() { - this[TYPE] = ''; +let manifest = typeof {"version":"1.0.4","name":"EGL","type":"konnector","language":"node","icon":"icon.png","slug":"eglgrandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git","editor":"Métropole de Lyon","vendor_link":"www.grandlyon.com","frequency":"daily","categories":["energy"],"fields":{"login":{"type":"text"},"password":{"type":"password"},"advancedFields":{"folderPath":{"advanced":true,"isRequired":false}}},"data_types":[],"screenshots":[],"permissions":{"egl data":{"type":"com.grandlyon.egl.*"},"accounts":{"type":"io.cozy.accounts","verbs":["GET"]}},"developer":{"name":"Métropole de Lyon","url":"https://grandlyon.com"},"langs":["fr"],"locales":{"fr":{"short_description":"Courbe de charge depuis l'API eau du Grand Lyon","long_description":"Ce connecteur récupère la courbe de charge enregistrée par le compteur Téléo","permissions":{"egl data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Téléo et exposées par les API Eau du Grand Lyon (consommations d’eau au jour, mois et année)."},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Water consumption data fetched from \"Eau du Grand Lyon\" API","long_description":"This konnector fetches the data curve gathered by Téléo device.","permissions":{"egl data":{"description":"Required to access and store the data collected by the Téléo meter and exposed by Eau du Grand Lyon APIs (daily, monthly and yearly consumption)."},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2"} === 'undefined' ? {} : {"version":"1.0.4","name":"EGL","type":"konnector","language":"node","icon":"icon.png","slug":"eglgrandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git","editor":"Métropole de Lyon","vendor_link":"www.grandlyon.com","frequency":"daily","categories":["energy"],"fields":{"login":{"type":"text"},"password":{"type":"password"},"advancedFields":{"folderPath":{"advanced":true,"isRequired":false}}},"data_types":[],"screenshots":[],"permissions":{"egl data":{"type":"com.grandlyon.egl.*"},"accounts":{"type":"io.cozy.accounts","verbs":["GET"]}},"developer":{"name":"Métropole de Lyon","url":"https://grandlyon.com"},"langs":["fr"],"locales":{"fr":{"short_description":"Courbe de charge depuis l'API eau du Grand Lyon","long_description":"Ce connecteur récupère la courbe de charge enregistrée par le compteur Téléo","permissions":{"egl data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Téléo et exposées par les API Eau du Grand Lyon (consommations d’eau au jour, mois et année)."},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Water consumption data fetched from \"Eau du Grand Lyon\" API","long_description":"This konnector fetches the data curve gathered by Téléo device.","permissions":{"egl data":{"description":"Required to access and store the data collected by the Téléo meter and exposed by Eau du Grand Lyon APIs (daily, monthly and yearly consumption)."},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2"}; - const blobParts = arguments[0]; - const options = arguments[1]; +if ("none" !== undefined && "none" !== 'none' && "none" !== 'production') { + try { + manifest = getManifestFromFile(); + } catch (err) { + manifest = {}; + } +} - const buffers = []; - let size = 0; +function getManifestFromFile() { + return JSON.parse(fs.readFileSync(path.join(process.cwd(), 'manifest.konnector'))); +} - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } +function setManifest(data) { + manifest = data; +} - this[BUFFER] = Buffer.concat(buffers); +function getCozyMetadata(data = {}) { + const now = new Date(Date.now()); + const defaultData = { + doctypeVersion: 1, + metadataVersion: 1, + createdAt: now, + createdByApp: manifest.slug, + createdByAppVersion: manifest.version, + updatedAt: now, + updatedByApps: [{ + slug: manifest.slug, + date: now, + version: manifest.version + }] + }; - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; + if (data.updatedByApps) { + const index = data.updatedByApps.findIndex(app => app.slug === manifest.slug); - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); + if (index !== -1) { + data.updatedByApps[index] = defaultData.updatedByApps.pop(); + } + } - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } + return { ...defaultData, + ...data + }; } -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); +module.exports = { + data: manifest, + getCozyMetadata, + setManifest +}; -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); +/***/ }), +/* 834 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ +const fs = __webpack_require__(167); -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); +const path = __webpack_require__(160); - this.message = message; - this.type = type; +const log = __webpack_require__(2).namespace('cozy-client-js-stub'); - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; - } +const mimetypes = __webpack_require__(835); - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} +const low = __webpack_require__(838); -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; +const lodashId = __webpack_require__(840); -let convert; -try { - convert = require('encoding').convert; -} catch (e) {} +const get = __webpack_require__(370); -const INTERNALS = Symbol('Body internals'); +const FileSync = __webpack_require__(841); -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = stream__WEBPACK_IMPORTED_MODULE_0__.PassThrough; +const rawBody = __webpack_require__(849); -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; +const stripJsonComments = __webpack_require__(885); - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; +const manifest = __webpack_require__(833); - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; +const sleep = __webpack_require__(9).promisify(global.setTimeout); - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; +const rootPath = JSON.parse(process.env.COZY_FIELDS || '{"folder_to_save": "."}').folder_to_save; +let db = setUpDb(); - if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } +function setDefaults(doctype) { + const defaults = { + 'io.cozy.files': [] + }; + if (doctype) defaults[doctype] = []; + db.defaults(defaults).write(); } -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, +module.exports = { + _setDb(newDb) { + db = newDb; + }, - get bodyUsed() { - return this[INTERNALS].disturbed; - }, + fetchJSON() { + return Promise.resolve({ + rows: [] + }); + }, - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, + data: { + create(doctype, item) { + setDefaults(doctype); + const doc = db.get(doctype).insert(item).write(); + return Promise.resolve(doc); + }, - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, + update(doctype, doc, changes) { + setDefaults(doctype); + db.get(doctype).updateById(doc._id, changes).write(); + return Promise.resolve(doc); + }, - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; + updateAttributes(doctype, id, attrs) { + setDefaults(doctype); + const doc = db.get(doctype).updateById(id, attrs).write(); + return Promise.resolve(doc); + }, - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, + defineIndex(doctype) { + return Promise.resolve({ + doctype + }); + }, - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, + query(index, options) { + // this stub only supposes that there are keys defined in options.selectors + // this is only needed by the hydrateAndFilter function + // supporting all mango selectors is not planned here + const { + doctype + } = index; + setDefaults(doctype); + const { + selector + } = options; + let result = db.get(doctype).filter(selector).value(); - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, + if (options.wholeResponse) { + result = { + docs: result + }; + } - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; + return Promise.resolve(result); + }, - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; + findAll(doctype) { + setDefaults(doctype); + return Promise.resolve(db.get(doctype).value()); + }, -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); + delete(doctype, doc) { + setDefaults(doctype); + const result = db.get(doctype).removeById(doc._id).write(); + return Promise.resolve(result); + }, -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; + find(doctype, id) { + setDefaults(doctype); + let result = db.get(doctype).getById(id).value(); + const accountExists = Boolean(result); -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; + if (doctype === 'io.cozy.accounts') { + const configPath = path.resolve('konnector-dev-config.json'); + const config = JSON.parse(stripJsonComments(fs.readFileSync(configPath, 'utf8'))); + result = { + _id: id, + ...result, + auth: config.fields + }; - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } + if (!accountExists) { + this.create(doctype, result); + } else { + this.update(doctype, result, result); + } + } - this[INTERNALS].disturbed = true; + return Promise.resolve(result); + }, - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } + listReferencedFiles() { + return Promise.resolve([]); + }, - let body = this.body; + addReferencedFiles() { + return Promise.resolve({}); + } - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } + }, + files: { + statByPath(pathToCheck) { + setDefaults(); // check this path in . - // body is blob - if (isBlob(body)) { - body = body.stream(); - } - - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } + return new Promise((resolve, reject) => { + log('debug', `Checking if ${pathToCheck} exists`); + if (pathToCheck === '/') return resolve({ + _id: '.' + }); + const realpath = path.join(rootPath, pathToCheck); + log('debug', `Real path : ${realpath}`); - // istanbul ignore if: should never happen - if (!(body instanceof stream__WEBPACK_IMPORTED_MODULE_0__)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } + if (fs.existsSync(realpath)) { + const extension = path.extname(pathToCheck).substr(1); + const doc = db.get('io.cozy.files').getById(pathToCheck.split('/').pop()).value(); - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; + if (!doc) { + resolve({ + _id: removeFirstSlash(pathToCheck), + attributes: { + mime: mimetypes.lookup(extension), + name: pathToCheck, + size: fs.statSync(realpath).size + } + }); + } else { + resolve(doc); + } + } else { + const err = new Error(`${pathToCheck} does not exist`); + err.status = 404; + reject(err); + } + }); + }, - return new Body.Promise(function (resolve, reject) { - let resTimeout; + statById(id) { + setDefaults(); + const doc = db.get('io.cozy.files').getById(id).value(); - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } + if (doc) { + return doc; + } else { + return Promise.resolve({ + attributes: { + path: '/' + } + }); + } + }, - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); + async updateById(id, file, options) { + setDefaults(); + await removeFile(id); + return createFile(file, options); + }, - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } + async updateAttributesById(id, attrs) { + setDefaults(); + const doc = db.get('io.cozy.files').getById(id).value(); - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } + if (doc) { + if (attrs.name && attrs.name !== get(doc, 'attributes.name')) { + await renameFile(id, attrs.name); + } - accumBytes += chunk.length; - accum.push(chunk); - }); + doc.attributes = { ...doc.attributes, + ...attrs + }; + db.get('io.cozy.files').updateById(id, doc).write(); + } + }, - body.on('end', function () { - if (abort) { - return; - } + create(file, options) { + setDefaults(); + return createFile(file, options); + }, - clearTimeout(resTimeout); + createDirectory(options) { + setDefaults(); + return new Promise(resolve => { + log('debug', `Creating new directory ${options.name}`); + const finalPath = path.join(rootPath, options.dirID, options.name); + const returnPath = path.join(options.dirID, options.name); + log('debug', `Real path : ${finalPath}`); - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); -} + try { + fs.mkdirSync(finalPath); + } catch (err) {// directory already exists + } -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } + resolve({ + _id: returnPath, + path: returnPath + }); + }); + }, - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; + downloadByPath(filePath) { + setDefaults(); + return this.downloadById(filePath); + }, - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } + downloadById(fileId) { + setDefaults(); + const fileInDb = db.get('io.cozy.files').getById(fileId).value(); + let fileName; - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); + if (fileInDb) { + fileName = fileInDb.attributes.name; + } else throw new Error('could not find the file'); - // html5 - if (!res && str) { - res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str); - } + const realpath = path.join(rootPath, fileName); + const stream = fs.createReadStream(realpath); + return { + body: stream, + buffer: () => rawBody(stream) + }; + }, - // html4 - if (!res && str) { - res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str); - if (!res) { - res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str); - if (res) { - res.pop(); // drop last quote - } - } + trashById(fileId) { + setDefaults(); + return removeFile(fileId); + }, - if (res) { - res = /charset=(.*)/i.exec(res.pop()); - } - } + destroyById() { + setDefaults(); // there is no trash with the stub - // xml - if (!res && str) { - res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str); - } + return Promise.resolve(); + } - // found charset - if (res) { - charset = res.pop(); + } +}; - // prevent decode issues when sites use incorrect encoding - // ref: https://hsivonen.fi/encoding-menu/ - if (charset === 'gb2312' || charset === 'gbk') { - charset = 'gb18030'; - } - } +async function removeFile(fileId) { + const file = db.get('io.cozy.files').getById(fileId).value(); + db.get('io.cozy.files').removeById(fileId).write(); + const realpath = path.join(rootPath, file.dir_id, file.attributes.name); + fs.unlinkSync(realpath); +} - // turn raw buffers into a single utf-8 buffer - return convert(buffer, 'UTF-8', charset).toString(); +async function renameFile(fileId, newName) { + const doc = db.get('io.cozy.files').getById(fileId).write(); + const oldPath = path.join(rootPath, doc.dir_id, doc.attributes.name); + const newPath = path.join(rootPath, doc.dir_id, newName); + fs.renameSync(oldPath, newPath); } -/** - * Detect a URLSearchParams object - * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143 - * - * @param Object obj Object to detect by type or brand - * @return String - */ -function isURLSearchParams(obj) { - // Duck-typing as a necessary condition. - if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') { - return false; - } +function setUpDb() { + let DUMP_PATH = 'importedData.json'; + const KONNECTOR_DEV_CONFIG_PATH = path.resolve('konnector-dev-config.json'); - // Brand-checking and more duck-typing as optional condition. - return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function'; + if (fs.existsSync(KONNECTOR_DEV_CONFIG_PATH)) { + const KONNECTOR_DEV_CONFIG = JSON.parse(fs.readFileSync(KONNECTOR_DEV_CONFIG_PATH, 'utf-8')); + DUMP_PATH = path.join(KONNECTOR_DEV_CONFIG.fields.folderPath || rootPath, DUMP_PATH); + } + + const db = low(new FileSync(DUMP_PATH)); + + db._.mixin(lodashId); + + db._.id = '_id'; + return db; } -/** - * Check if `obj` is a W3C `Blob` object (which `File` inherits from) - * @param {*} obj - * @return {boolean} - */ -function isBlob(obj) { - return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); +function removeFirstSlash(pathToCheck) { + if (pathToCheck[0] === '/') { + return pathToCheck.substr(1); + } + + return pathToCheck; } -/** - * Clone body given Res/Req instance - * - * @param Mixed instance Response or Request instance - * @return Mixed - */ -function clone(instance) { - let p1, p2; - let body = instance.body; +async function createFile(file, options = {}) { + log('debug', `Creating new file ${options.name}`); + const finalPath = path.join(rootPath, options.dirID, options.name); + log('debug', `Real path : ${finalPath}`); + const extension = path.extname(options.name).substr(1); + const mime = mimetypes.lookup(extension); + const fileDoc = { + _id: get(options, 'metadata.fileIdAttributes') || options.name, + dir_id: options.dirID || '.', + metadata: options.metadata, + trashed: false, + attributes: { + mime, + name: options.name + }, + cozyMetadata: { + sourceAccount: options.sourceAccount, + sourceAccountIdentifier: options.sourceAccountIdentifier, + createdByApp: manifest.data.slug + } + }; - // don't allow cloning a used body - if (instance.bodyUsed) { - throw new Error('cannot clone body after it is used'); - } + if (file.pipe) { + let writeStream = fs.createWriteStream(finalPath); + file.pipe(writeStream); + await waitForFileEnd(file, finalPath, writeStream); + } else { + // file is a string + fs.writeFileSync(finalPath, file); + } - // check that body is a stream and not form-data object - // note: we can't clone the form-data object without having it as a dependency - if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__ && typeof body.getBoundary !== 'function') { - // tee instance body - p1 = new PassThrough(); - p2 = new PassThrough(); - body.pipe(p1); - body.pipe(p2); - // set instance body to teed body and return the other teed body - instance[INTERNALS].body = p1; - body = p2; - } + addFileSizeAndWrite(fileDoc, finalPath); + return fileDoc; +} - return body; +function addFileSizeAndWrite(doc, filePath) { + doc.attributes.size = fs.statSync(filePath).size; + db.get('io.cozy.files').insert(doc).write(); } -/** - * Performs the operation "extract a `Content-Type` value from |object|" as - * specified in the specification: - * https://fetch.spec.whatwg.org/#concept-bodyinit-extract - * - * This function assumes that instance.body is present. - * - * @param Mixed instance Any options.body input - */ -function extractContentType(body) { - if (body === null) { - // body is null - return null; - } else if (typeof body === 'string') { - // body is string - return 'text/plain;charset=UTF-8'; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - return 'application/x-www-form-urlencoded;charset=UTF-8'; - } else if (isBlob(body)) { - // body is blob - return body.type || null; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return null; - } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - return null; - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - return null; - } else if (typeof body.getBoundary === 'function') { - // detect form data input from form-data module - return `multipart/form-data;boundary=${body.getBoundary()}`; - } else if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) { - // body is stream - // can't really do much about this - return null; - } else { - // Body constructor defaults other things to string - return 'text/plain;charset=UTF-8'; - } +async function waitForFileEnd(file, finalPath, writeStream) { + await new Promise((resolve, reject) => { + file.on('end', () => { + log('debug', `File ${finalPath} created`); + resolve(); + }); + writeStream.on('error', err => { + log('warn', `Error : ${err} while trying to write file`); + reject(new Error(err)); + }); + }); + await sleep(1); // allow the the file size to be correct (or else we get 0) } -/** - * The Fetch Standard treats this as if "total bytes" is a property on the body. - * For us, we have to explicitly get it with a function. - * - * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes - * - * @param Body instance Instance of Body - * @return Number? Number of bytes, or null if not possible +/***/ }), +/* 835 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed */ -function getTotalBytes(instance) { - const body = instance.body; - if (body === null) { - // body is null - return 0; - } else if (isBlob(body)) { - return body.size; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return body.length; - } else if (body && typeof body.getLengthSync === 'function') { - // detect form data input from form-data module - if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x - body.hasKnownLength && body.hasKnownLength()) { - // 2.x - return body.getLengthSync(); - } - return null; - } else { - // body is stream - return null; - } -} /** - * Write a Body to a Node.js WritableStream (e.g. http.Request) object. - * - * @param Body instance Instance of Body - * @return Void + * Module dependencies. + * @private */ -function writeToStream(dest, instance) { - const body = instance.body; +var db = __webpack_require__(836) +var extname = __webpack_require__(160).extname - if (body === null) { - // body is null - dest.end(); - } else if (isBlob(body)) { - body.stream().pipe(dest); - } else if (Buffer.isBuffer(body)) { - // body is buffer - dest.write(body); - dest.end(); - } else { - // body is stream - body.pipe(dest); - } -} +/** + * Module variables. + * @private + */ -// expose Promise -Body.Promise = global.Promise; +var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ +var TEXT_TYPE_REGEXP = /^text\//i /** - * headers.js - * - * Headers class offers convenient helpers + * Module exports. + * @public */ -const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; -const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; - -function validateName(name) { - name = `${name}`; - if (invalidTokenRegex.test(name) || name === '') { - throw new TypeError(`${name} is not a legal HTTP header name`); - } -} +exports.charset = charset +exports.charsets = { lookup: charset } +exports.contentType = contentType +exports.extension = extension +exports.extensions = Object.create(null) +exports.lookup = lookup +exports.types = Object.create(null) -function validateValue(value) { - value = `${value}`; - if (invalidHeaderCharRegex.test(value)) { - throw new TypeError(`${value} is not a legal HTTP header value`); - } -} +// Populate the extensions/types maps +populateMaps(exports.extensions, exports.types) /** - * Find the key in the map object given a header name. - * - * Returns undefined if not found. + * Get the default charset for a MIME type. * - * @param String name Header name - * @return String|Undefined + * @param {string} type + * @return {boolean|string} */ -function find(map, name) { - name = name.toLowerCase(); - for (const key in map) { - if (key.toLowerCase() === name) { - return key; - } - } - return undefined; -} -const MAP = Symbol('map'); -class Headers { - /** - * Headers class - * - * @param Object headers Response headers - * @return Void - */ - constructor() { - let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; +function charset (type) { + if (!type || typeof type !== 'string') { + return false + } - this[MAP] = Object.create(null); + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) + var mime = match && db[match[1].toLowerCase()] - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); + if (mime && mime.charset) { + return mime.charset + } - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } + // default text/* to utf-8 + if (match && TEXT_TYPE_REGEXP.test(match[1])) { + return 'UTF-8' + } - return; - } + return false +} - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } +/** + * Create a full Content-Type header given a MIME type or extension. + * + * @param {string} str + * @return {boolean|string} + */ - // sequence<sequence<ByteString>> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } +function contentType (str) { + // TODO: should this even be in this module? + if (!str || typeof str !== 'string') { + return false + } - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record<ByteString, ByteString> - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } + var mime = str.indexOf('/') === -1 + ? exports.lookup(str) + : str - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } + if (!mime) { + return false + } - return this[MAP][key].join(', '); - } + // TODO: use content-type or other module + if (mime.indexOf('charset') === -1) { + var charset = exports.charset(mime) + if (charset) mime += '; charset=' + charset.toLowerCase() + } - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; + return mime +} - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; +/** + * Get the default extension for a MIME type. + * + * @param {string} type + * @return {boolean|string} + */ - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } +function extension (type) { + if (!type || typeof type !== 'string') { + return false + } - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } + // TODO: use media-typer + var match = EXTRACT_TYPE_REGEXP.exec(type) - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } + // get extensions + var exts = match && exports.extensions[match[1].toLowerCase()] - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } + if (!exts || !exts.length) { + return false + } - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } + return exts[0] +} - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } +/** + * Lookup the MIME type for a file path/extension. + * + * @param {string} path + * @return {boolean|string} + */ - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } +function lookup (path) { + if (!path || typeof path !== 'string') { + return false + } - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } + // get the extension ("ext" or ".ext" or full path) + var extension = extname('x.' + path) + .toLowerCase() + .substr(1) - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } + if (!extension) { + return false + } + + return exports.types[extension] || false } -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); +/** + * Populate the extensions and types maps. + * @private + */ -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); +function populateMaps (extensions, types) { + // source preference (least -> most) + var preference = ['nginx', 'apache', undefined, 'iana'] -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + Object.keys(db).forEach(function forEachMimeType (type) { + var mime = db[type] + var exts = mime.extensions - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} + if (!exts || !exts.length) { + return + } -const INTERNAL = Symbol('internal'); + // mime -> extensions + extensions[type] = exts -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} + // extension -> mime + for (var i = 0; i < exts.length; i++) { + var extension = exts[i] -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } + if (types[extension]) { + var from = preference.indexOf(db[types[extension]].source) + var to = preference.indexOf(mime.source) - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; + if (types[extension] !== 'application/octet-stream' && + (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { + // skip the remapping + continue + } + } - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } + // set the extension -> mime + types[extension] = type + } + }) +} - this[INTERNAL].index = index + 1; - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); +/***/ }), +/* 836 */ +/***/ (function(module, exports, __webpack_require__) { -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * MIT Licensed + */ /** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object + * Module exports. */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } +module.exports = __webpack_require__(837) - return obj; -} -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} +/***/ }), +/* 837 */ +/***/ (function(module) { -const INTERNALS$1 = Symbol('Response internals'); +module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"application/3gpdash-qoe-report+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/3gpp-ims+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/3gpphal+json\":{\"source\":\"iana\",\"compressible\":true},\"application/3gpphalforms+json\":{\"source\":\"iana\",\"compressible\":true},\"application/a2l\":{\"source\":\"iana\"},\"application/ace+cbor\":{\"source\":\"iana\"},\"application/activemessage\":{\"source\":\"iana\"},\"application/activity+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-directory+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcost+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcostparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointprop+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointpropparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-error+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-updatestreamcontrol+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-updatestreamparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/aml\":{\"source\":\"iana\"},\"application/andrew-inset\":{\"source\":\"iana\",\"extensions\":[\"ez\"]},\"application/applefile\":{\"source\":\"iana\"},\"application/applixware\":{\"source\":\"apache\",\"extensions\":[\"aw\"]},\"application/at+jwt\":{\"source\":\"iana\"},\"application/atf\":{\"source\":\"iana\"},\"application/atfx\":{\"source\":\"iana\"},\"application/atom+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atom\"]},\"application/atomcat+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomcat\"]},\"application/atomdeleted+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomdeleted\"]},\"application/atomicmail\":{\"source\":\"iana\"},\"application/atomsvc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomsvc\"]},\"application/atsc-dwd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dwd\"]},\"application/atsc-dynamic-event-message\":{\"source\":\"iana\"},\"application/atsc-held+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"held\"]},\"application/atsc-rdt+json\":{\"source\":\"iana\",\"compressible\":true},\"application/atsc-rsat+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rsat\"]},\"application/atxml\":{\"source\":\"iana\"},\"application/auth-policy+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/bacnet-xdd+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/batch-smtp\":{\"source\":\"iana\"},\"application/bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/beep+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/calendar+json\":{\"source\":\"iana\",\"compressible\":true},\"application/calendar+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xcs\"]},\"application/call-completion\":{\"source\":\"iana\"},\"application/cals-1840\":{\"source\":\"iana\"},\"application/captive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/cbor\":{\"source\":\"iana\"},\"application/cbor-seq\":{\"source\":\"iana\"},\"application/cccex\":{\"source\":\"iana\"},\"application/ccmp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ccxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ccxml\"]},\"application/cdfx+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"cdfx\"]},\"application/cdmi-capability\":{\"source\":\"iana\",\"extensions\":[\"cdmia\"]},\"application/cdmi-container\":{\"source\":\"iana\",\"extensions\":[\"cdmic\"]},\"application/cdmi-domain\":{\"source\":\"iana\",\"extensions\":[\"cdmid\"]},\"application/cdmi-object\":{\"source\":\"iana\",\"extensions\":[\"cdmio\"]},\"application/cdmi-queue\":{\"source\":\"iana\",\"extensions\":[\"cdmiq\"]},\"application/cdni\":{\"source\":\"iana\"},\"application/cea\":{\"source\":\"iana\"},\"application/cea-2018+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cellml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cfw\":{\"source\":\"iana\"},\"application/clr\":{\"source\":\"iana\"},\"application/clue+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/clue_info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cms\":{\"source\":\"iana\"},\"application/cnrp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-group+json\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-payload\":{\"source\":\"iana\"},\"application/commonground\":{\"source\":\"iana\"},\"application/conference-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cose\":{\"source\":\"iana\"},\"application/cose-key\":{\"source\":\"iana\"},\"application/cose-key-set\":{\"source\":\"iana\"},\"application/cpl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/csrattrs\":{\"source\":\"iana\"},\"application/csta+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cstadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/csvm+json\":{\"source\":\"iana\",\"compressible\":true},\"application/cu-seeme\":{\"source\":\"apache\",\"extensions\":[\"cu\"]},\"application/cwt\":{\"source\":\"iana\"},\"application/cybercash\":{\"source\":\"iana\"},\"application/dart\":{\"compressible\":true},\"application/dash+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mpd\"]},\"application/dashdelta\":{\"source\":\"iana\"},\"application/davmount+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"davmount\"]},\"application/dca-rft\":{\"source\":\"iana\"},\"application/dcd\":{\"source\":\"iana\"},\"application/dec-dx\":{\"source\":\"iana\"},\"application/dialog-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom\":{\"source\":\"iana\"},\"application/dicom+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dii\":{\"source\":\"iana\"},\"application/dit\":{\"source\":\"iana\"},\"application/dns\":{\"source\":\"iana\"},\"application/dns+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dns-message\":{\"source\":\"iana\"},\"application/docbook+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"dbk\"]},\"application/dots+cbor\":{\"source\":\"iana\"},\"application/dskpp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dssc+der\":{\"source\":\"iana\",\"extensions\":[\"dssc\"]},\"application/dssc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdssc\"]},\"application/dvcs\":{\"source\":\"iana\"},\"application/ecmascript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"es\",\"ecma\"]},\"application/edi-consent\":{\"source\":\"iana\"},\"application/edi-x12\":{\"source\":\"iana\",\"compressible\":false},\"application/edifact\":{\"source\":\"iana\",\"compressible\":false},\"application/efi\":{\"source\":\"iana\"},\"application/elm+json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/elm+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.cap+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/emergencycalldata.comment+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.deviceinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.ecall.msd\":{\"source\":\"iana\"},\"application/emergencycalldata.providerinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.serviceinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.subscriberinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.veds+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emma+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"emma\"]},\"application/emotionml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"emotionml\"]},\"application/encaprtp\":{\"source\":\"iana\"},\"application/epp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/epub+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"epub\"]},\"application/eshop\":{\"source\":\"iana\"},\"application/exi\":{\"source\":\"iana\",\"extensions\":[\"exi\"]},\"application/expect-ct-report+json\":{\"source\":\"iana\",\"compressible\":true},\"application/express\":{\"source\":\"iana\",\"extensions\":[\"exp\"]},\"application/fastinfoset\":{\"source\":\"iana\"},\"application/fastsoap\":{\"source\":\"iana\"},\"application/fdt+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"fdt\"]},\"application/fhir+json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/fhir+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/fido.trusted-apps+json\":{\"compressible\":true},\"application/fits\":{\"source\":\"iana\"},\"application/flexfec\":{\"source\":\"iana\"},\"application/font-sfnt\":{\"source\":\"iana\"},\"application/font-tdpfr\":{\"source\":\"iana\",\"extensions\":[\"pfr\"]},\"application/font-woff\":{\"source\":\"iana\",\"compressible\":false},\"application/framework-attributes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/geo+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"geojson\"]},\"application/geo+json-seq\":{\"source\":\"iana\"},\"application/geopackage+sqlite3\":{\"source\":\"iana\"},\"application/geoxacml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/gltf-buffer\":{\"source\":\"iana\"},\"application/gml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gml\"]},\"application/gpx+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"gpx\"]},\"application/gxf\":{\"source\":\"apache\",\"extensions\":[\"gxf\"]},\"application/gzip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gz\"]},\"application/h224\":{\"source\":\"iana\"},\"application/held+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/hjson\":{\"extensions\":[\"hjson\"]},\"application/http\":{\"source\":\"iana\"},\"application/hyperstudio\":{\"source\":\"iana\",\"extensions\":[\"stk\"]},\"application/ibe-key-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ibe-pkg-reply+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ibe-pp-data\":{\"source\":\"iana\"},\"application/iges\":{\"source\":\"iana\"},\"application/im-iscomposing+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/index\":{\"source\":\"iana\"},\"application/index.cmd\":{\"source\":\"iana\"},\"application/index.obj\":{\"source\":\"iana\"},\"application/index.response\":{\"source\":\"iana\"},\"application/index.vnd\":{\"source\":\"iana\"},\"application/inkml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ink\",\"inkml\"]},\"application/iotp\":{\"source\":\"iana\"},\"application/ipfix\":{\"source\":\"iana\",\"extensions\":[\"ipfix\"]},\"application/ipp\":{\"source\":\"iana\"},\"application/isup\":{\"source\":\"iana\"},\"application/its+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"its\"]},\"application/java-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jar\",\"war\",\"ear\"]},\"application/java-serialized-object\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"ser\"]},\"application/java-vm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"class\"]},\"application/javascript\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"js\",\"mjs\"]},\"application/jf2feed+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jose\":{\"source\":\"iana\"},\"application/jose+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jrd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jscalendar+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"json\",\"map\"]},\"application/json-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json-seq\":{\"source\":\"iana\"},\"application/json5\":{\"extensions\":[\"json5\"]},\"application/jsonml+json\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"jsonml\"]},\"application/jwk+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwk-set+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwt\":{\"source\":\"iana\"},\"application/kpml-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/kpml-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ld+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"jsonld\"]},\"application/lgr+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lgr\"]},\"application/link-format\":{\"source\":\"iana\"},\"application/load-control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/lost+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lostxml\"]},\"application/lostsync+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/lpf+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/lxf\":{\"source\":\"iana\"},\"application/mac-binhex40\":{\"source\":\"iana\",\"extensions\":[\"hqx\"]},\"application/mac-compactpro\":{\"source\":\"apache\",\"extensions\":[\"cpt\"]},\"application/macwriteii\":{\"source\":\"iana\"},\"application/mads+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mads\"]},\"application/manifest+json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"webmanifest\"]},\"application/marc\":{\"source\":\"iana\",\"extensions\":[\"mrc\"]},\"application/marcxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mrcx\"]},\"application/mathematica\":{\"source\":\"iana\",\"extensions\":[\"ma\",\"nb\",\"mb\"]},\"application/mathml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mathml\"]},\"application/mathml-content+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mathml-presentation+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-associated-procedure-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-deregister+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-envelope+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-msk+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-msk-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-protection-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-reception-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-register+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-register-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-schedule+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-user-service-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbox\":{\"source\":\"iana\",\"extensions\":[\"mbox\"]},\"application/media-policy-dataset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/media_control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mediaservercontrol+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mscml\"]},\"application/merge-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/metalink+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"metalink\"]},\"application/metalink4+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"meta4\"]},\"application/mets+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mets\"]},\"application/mf4\":{\"source\":\"iana\"},\"application/mikey\":{\"source\":\"iana\"},\"application/mipc\":{\"source\":\"iana\"},\"application/missing-blocks+cbor-seq\":{\"source\":\"iana\"},\"application/mmt-aei+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"maei\"]},\"application/mmt-usd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"musd\"]},\"application/mods+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mods\"]},\"application/moss-keys\":{\"source\":\"iana\"},\"application/moss-signature\":{\"source\":\"iana\"},\"application/mosskey-data\":{\"source\":\"iana\"},\"application/mosskey-request\":{\"source\":\"iana\"},\"application/mp21\":{\"source\":\"iana\",\"extensions\":[\"m21\",\"mp21\"]},\"application/mp4\":{\"source\":\"iana\",\"extensions\":[\"mp4s\",\"m4p\"]},\"application/mpeg4-generic\":{\"source\":\"iana\"},\"application/mpeg4-iod\":{\"source\":\"iana\"},\"application/mpeg4-iod-xmt\":{\"source\":\"iana\"},\"application/mrb-consumer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mrb-publish+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/msc-ivr+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/msc-mixer+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/msword\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"doc\",\"dot\"]},\"application/mud+json\":{\"source\":\"iana\",\"compressible\":true},\"application/multipart-core\":{\"source\":\"iana\"},\"application/mxf\":{\"source\":\"iana\",\"extensions\":[\"mxf\"]},\"application/n-quads\":{\"source\":\"iana\",\"extensions\":[\"nq\"]},\"application/n-triples\":{\"source\":\"iana\",\"extensions\":[\"nt\"]},\"application/nasdata\":{\"source\":\"iana\"},\"application/news-checkgroups\":{\"source\":\"iana\",\"charset\":\"US-ASCII\"},\"application/news-groupinfo\":{\"source\":\"iana\",\"charset\":\"US-ASCII\"},\"application/news-transmission\":{\"source\":\"iana\"},\"application/nlsml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/node\":{\"source\":\"iana\",\"extensions\":[\"cjs\"]},\"application/nss\":{\"source\":\"iana\"},\"application/oauth-authz-req+jwt\":{\"source\":\"iana\"},\"application/ocsp-request\":{\"source\":\"iana\"},\"application/ocsp-response\":{\"source\":\"iana\"},\"application/octet-stream\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"bin\",\"dms\",\"lrf\",\"mar\",\"so\",\"dist\",\"distz\",\"pkg\",\"bpk\",\"dump\",\"elc\",\"deploy\",\"exe\",\"dll\",\"deb\",\"dmg\",\"iso\",\"img\",\"msi\",\"msp\",\"msm\",\"buffer\"]},\"application/oda\":{\"source\":\"iana\",\"extensions\":[\"oda\"]},\"application/odm+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/odx\":{\"source\":\"iana\"},\"application/oebps-package+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"opf\"]},\"application/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogx\"]},\"application/omdoc+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"omdoc\"]},\"application/onenote\":{\"source\":\"apache\",\"extensions\":[\"onetoc\",\"onetoc2\",\"onetmp\",\"onepkg\"]},\"application/opc-nodeset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/oscore\":{\"source\":\"iana\"},\"application/oxps\":{\"source\":\"iana\",\"extensions\":[\"oxps\"]},\"application/p21\":{\"source\":\"iana\"},\"application/p21+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/p2p-overlay+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"relo\"]},\"application/parityfec\":{\"source\":\"iana\"},\"application/passport\":{\"source\":\"iana\"},\"application/patch-ops-error+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xer\"]},\"application/pdf\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pdf\"]},\"application/pdx\":{\"source\":\"iana\"},\"application/pem-certificate-chain\":{\"source\":\"iana\"},\"application/pgp-encrypted\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pgp\"]},\"application/pgp-keys\":{\"source\":\"iana\"},\"application/pgp-signature\":{\"source\":\"iana\",\"extensions\":[\"asc\",\"sig\"]},\"application/pics-rules\":{\"source\":\"apache\",\"extensions\":[\"prf\"]},\"application/pidf+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/pidf-diff+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/pkcs10\":{\"source\":\"iana\",\"extensions\":[\"p10\"]},\"application/pkcs12\":{\"source\":\"iana\"},\"application/pkcs7-mime\":{\"source\":\"iana\",\"extensions\":[\"p7m\",\"p7c\"]},\"application/pkcs7-signature\":{\"source\":\"iana\",\"extensions\":[\"p7s\"]},\"application/pkcs8\":{\"source\":\"iana\",\"extensions\":[\"p8\"]},\"application/pkcs8-encrypted\":{\"source\":\"iana\"},\"application/pkix-attr-cert\":{\"source\":\"iana\",\"extensions\":[\"ac\"]},\"application/pkix-cert\":{\"source\":\"iana\",\"extensions\":[\"cer\"]},\"application/pkix-crl\":{\"source\":\"iana\",\"extensions\":[\"crl\"]},\"application/pkix-pkipath\":{\"source\":\"iana\",\"extensions\":[\"pkipath\"]},\"application/pkixcmp\":{\"source\":\"iana\",\"extensions\":[\"pki\"]},\"application/pls+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"pls\"]},\"application/poc-settings+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/postscript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ai\",\"eps\",\"ps\"]},\"application/ppsp-tracker+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/provenance+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"provx\"]},\"application/prs.alvestrand.titrax-sheet\":{\"source\":\"iana\"},\"application/prs.cww\":{\"source\":\"iana\",\"extensions\":[\"cww\"]},\"application/prs.cyn\":{\"source\":\"iana\",\"charset\":\"7-BIT\"},\"application/prs.hpub+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/prs.nprend\":{\"source\":\"iana\"},\"application/prs.plucker\":{\"source\":\"iana\"},\"application/prs.rdf-xml-crypt\":{\"source\":\"iana\"},\"application/prs.xsf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/pskc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"pskcxml\"]},\"application/pvd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/qsig\":{\"source\":\"iana\"},\"application/raml+yaml\":{\"compressible\":true,\"extensions\":[\"raml\"]},\"application/raptorfec\":{\"source\":\"iana\"},\"application/rdap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/rdf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rdf\",\"owl\"]},\"application/reginfo+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rif\"]},\"application/relax-ng-compact-syntax\":{\"source\":\"iana\",\"extensions\":[\"rnc\"]},\"application/remote-printing\":{\"source\":\"iana\"},\"application/reputon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/resource-lists+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rl\"]},\"application/resource-lists-diff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rld\"]},\"application/rfc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/riscos\":{\"source\":\"iana\"},\"application/rlmi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/rls-services+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rs\"]},\"application/route-apd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rapd\"]},\"application/route-s-tsid+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sls\"]},\"application/route-usd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rusd\"]},\"application/rpki-ghostbusters\":{\"source\":\"iana\",\"extensions\":[\"gbr\"]},\"application/rpki-manifest\":{\"source\":\"iana\",\"extensions\":[\"mft\"]},\"application/rpki-publication\":{\"source\":\"iana\"},\"application/rpki-roa\":{\"source\":\"iana\",\"extensions\":[\"roa\"]},\"application/rpki-updown\":{\"source\":\"iana\"},\"application/rsd+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rsd\"]},\"application/rss+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rss\"]},\"application/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"application/rtploopback\":{\"source\":\"iana\"},\"application/rtx\":{\"source\":\"iana\"},\"application/samlassertion+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/samlmetadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sarif+json\":{\"source\":\"iana\",\"compressible\":true},\"application/sarif-external-properties+json\":{\"source\":\"iana\",\"compressible\":true},\"application/sbe\":{\"source\":\"iana\"},\"application/sbml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sbml\"]},\"application/scaip+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/scim+json\":{\"source\":\"iana\",\"compressible\":true},\"application/scvp-cv-request\":{\"source\":\"iana\",\"extensions\":[\"scq\"]},\"application/scvp-cv-response\":{\"source\":\"iana\",\"extensions\":[\"scs\"]},\"application/scvp-vp-request\":{\"source\":\"iana\",\"extensions\":[\"spq\"]},\"application/scvp-vp-response\":{\"source\":\"iana\",\"extensions\":[\"spp\"]},\"application/sdp\":{\"source\":\"iana\",\"extensions\":[\"sdp\"]},\"application/secevent+jwt\":{\"source\":\"iana\"},\"application/senml+cbor\":{\"source\":\"iana\"},\"application/senml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/senml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"senmlx\"]},\"application/senml-etch+cbor\":{\"source\":\"iana\"},\"application/senml-etch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/senml-exi\":{\"source\":\"iana\"},\"application/sensml+cbor\":{\"source\":\"iana\"},\"application/sensml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/sensml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sensmlx\"]},\"application/sensml-exi\":{\"source\":\"iana\"},\"application/sep+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sep-exi\":{\"source\":\"iana\"},\"application/session-info\":{\"source\":\"iana\"},\"application/set-payment\":{\"source\":\"iana\"},\"application/set-payment-initiation\":{\"source\":\"iana\",\"extensions\":[\"setpay\"]},\"application/set-registration\":{\"source\":\"iana\"},\"application/set-registration-initiation\":{\"source\":\"iana\",\"extensions\":[\"setreg\"]},\"application/sgml\":{\"source\":\"iana\"},\"application/sgml-open-catalog\":{\"source\":\"iana\"},\"application/shf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"shf\"]},\"application/sieve\":{\"source\":\"iana\",\"extensions\":[\"siv\",\"sieve\"]},\"application/simple-filter+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/simple-message-summary\":{\"source\":\"iana\"},\"application/simplesymbolcontainer\":{\"source\":\"iana\"},\"application/sipc\":{\"source\":\"iana\"},\"application/slate\":{\"source\":\"iana\"},\"application/smil\":{\"source\":\"iana\"},\"application/smil+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"smi\",\"smil\"]},\"application/smpte336m\":{\"source\":\"iana\"},\"application/soap+fastinfoset\":{\"source\":\"iana\"},\"application/soap+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sparql-query\":{\"source\":\"iana\",\"extensions\":[\"rq\"]},\"application/sparql-results+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"srx\"]},\"application/spirits-event+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sql\":{\"source\":\"iana\"},\"application/srgs\":{\"source\":\"iana\",\"extensions\":[\"gram\"]},\"application/srgs+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"grxml\"]},\"application/sru+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sru\"]},\"application/ssdl+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ssdl\"]},\"application/ssml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ssml\"]},\"application/stix+json\":{\"source\":\"iana\",\"compressible\":true},\"application/swid+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"swidtag\"]},\"application/tamp-apex-update\":{\"source\":\"iana\"},\"application/tamp-apex-update-confirm\":{\"source\":\"iana\"},\"application/tamp-community-update\":{\"source\":\"iana\"},\"application/tamp-community-update-confirm\":{\"source\":\"iana\"},\"application/tamp-error\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust-confirm\":{\"source\":\"iana\"},\"application/tamp-status-query\":{\"source\":\"iana\"},\"application/tamp-status-response\":{\"source\":\"iana\"},\"application/tamp-update\":{\"source\":\"iana\"},\"application/tamp-update-confirm\":{\"source\":\"iana\"},\"application/tar\":{\"compressible\":true},\"application/taxii+json\":{\"source\":\"iana\",\"compressible\":true},\"application/td+json\":{\"source\":\"iana\",\"compressible\":true},\"application/tei+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tei\",\"teicorpus\"]},\"application/tetra_isi\":{\"source\":\"iana\"},\"application/thraud+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tfi\"]},\"application/timestamp-query\":{\"source\":\"iana\"},\"application/timestamp-reply\":{\"source\":\"iana\"},\"application/timestamped-data\":{\"source\":\"iana\",\"extensions\":[\"tsd\"]},\"application/tlsrpt+gzip\":{\"source\":\"iana\"},\"application/tlsrpt+json\":{\"source\":\"iana\",\"compressible\":true},\"application/tnauthlist\":{\"source\":\"iana\"},\"application/token-introspection+jwt\":{\"source\":\"iana\"},\"application/toml\":{\"compressible\":true,\"extensions\":[\"toml\"]},\"application/trickle-ice-sdpfrag\":{\"source\":\"iana\"},\"application/trig\":{\"source\":\"iana\",\"extensions\":[\"trig\"]},\"application/ttml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ttml\"]},\"application/tve-trigger\":{\"source\":\"iana\"},\"application/tzif\":{\"source\":\"iana\"},\"application/tzif-leap\":{\"source\":\"iana\"},\"application/ubjson\":{\"compressible\":false,\"extensions\":[\"ubj\"]},\"application/ulpfec\":{\"source\":\"iana\"},\"application/urc-grpsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/urc-ressheet+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rsheet\"]},\"application/urc-targetdesc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"td\"]},\"application/urc-uisocketdesc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vemmi\":{\"source\":\"iana\"},\"application/vividence.scriptfile\":{\"source\":\"apache\"},\"application/vnd.1000minds.decision-model+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"1km\"]},\"application/vnd.3gpp-prose+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp-prose-pc3ch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp-v2x-local-service-information\":{\"source\":\"iana\"},\"application/vnd.3gpp.5gnas\":{\"source\":\"iana\"},\"application/vnd.3gpp.access-transfer-events+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.bsf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.gmop+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.gtpc\":{\"source\":\"iana\"},\"application/vnd.3gpp.interworking-data\":{\"source\":\"iana\"},\"application/vnd.3gpp.lpp\":{\"source\":\"iana\"},\"application/vnd.3gpp.mc-signalling-ear\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-payload\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-signalling\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-floor-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-location-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-mbms-usage-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-signed+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-ue-init-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-affiliation-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-location-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-mbms-usage-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-transmission-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mid-call+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.ngap\":{\"source\":\"iana\"},\"application/vnd.3gpp.pfcp\":{\"source\":\"iana\"},\"application/vnd.3gpp.pic-bw-large\":{\"source\":\"iana\",\"extensions\":[\"plb\"]},\"application/vnd.3gpp.pic-bw-small\":{\"source\":\"iana\",\"extensions\":[\"psb\"]},\"application/vnd.3gpp.pic-bw-var\":{\"source\":\"iana\",\"extensions\":[\"pvb\"]},\"application/vnd.3gpp.s1ap\":{\"source\":\"iana\"},\"application/vnd.3gpp.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp.sms+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.srvcc-ext+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.srvcc-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.state-and-event-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.ussd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp2.bcmcsinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp2.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp2.tcap\":{\"source\":\"iana\",\"extensions\":[\"tcap\"]},\"application/vnd.3lightssoftware.imagescal\":{\"source\":\"iana\"},\"application/vnd.3m.post-it-notes\":{\"source\":\"iana\",\"extensions\":[\"pwn\"]},\"application/vnd.accpac.simply.aso\":{\"source\":\"iana\",\"extensions\":[\"aso\"]},\"application/vnd.accpac.simply.imp\":{\"source\":\"iana\",\"extensions\":[\"imp\"]},\"application/vnd.acucobol\":{\"source\":\"iana\",\"extensions\":[\"acu\"]},\"application/vnd.acucorp\":{\"source\":\"iana\",\"extensions\":[\"atc\",\"acutc\"]},\"application/vnd.adobe.air-application-installer-package+zip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"air\"]},\"application/vnd.adobe.flash.movie\":{\"source\":\"iana\"},\"application/vnd.adobe.formscentral.fcdt\":{\"source\":\"iana\",\"extensions\":[\"fcdt\"]},\"application/vnd.adobe.fxp\":{\"source\":\"iana\",\"extensions\":[\"fxp\",\"fxpl\"]},\"application/vnd.adobe.partial-upload\":{\"source\":\"iana\"},\"application/vnd.adobe.xdp+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdp\"]},\"application/vnd.adobe.xfdf\":{\"source\":\"iana\",\"extensions\":[\"xfdf\"]},\"application/vnd.aether.imp\":{\"source\":\"iana\"},\"application/vnd.afpc.afplinedata\":{\"source\":\"iana\"},\"application/vnd.afpc.afplinedata-pagedef\":{\"source\":\"iana\"},\"application/vnd.afpc.cmoca-cmresource\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-charset\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-codedfont\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-codepage\":{\"source\":\"iana\"},\"application/vnd.afpc.modca\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-cmtable\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-formdef\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-mediummap\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-objectcontainer\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-overlay\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-pagesegment\":{\"source\":\"iana\"},\"application/vnd.ah-barcode\":{\"source\":\"iana\"},\"application/vnd.ahead.space\":{\"source\":\"iana\",\"extensions\":[\"ahead\"]},\"application/vnd.airzip.filesecure.azf\":{\"source\":\"iana\",\"extensions\":[\"azf\"]},\"application/vnd.airzip.filesecure.azs\":{\"source\":\"iana\",\"extensions\":[\"azs\"]},\"application/vnd.amadeus+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.amazon.ebook\":{\"source\":\"apache\",\"extensions\":[\"azw\"]},\"application/vnd.amazon.mobi8-ebook\":{\"source\":\"iana\"},\"application/vnd.americandynamics.acc\":{\"source\":\"iana\",\"extensions\":[\"acc\"]},\"application/vnd.amiga.ami\":{\"source\":\"iana\",\"extensions\":[\"ami\"]},\"application/vnd.amundsen.maze+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.android.ota\":{\"source\":\"iana\"},\"application/vnd.android.package-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"apk\"]},\"application/vnd.anki\":{\"source\":\"iana\"},\"application/vnd.anser-web-certificate-issue-initiation\":{\"source\":\"iana\",\"extensions\":[\"cii\"]},\"application/vnd.anser-web-funds-transfer-initiation\":{\"source\":\"apache\",\"extensions\":[\"fti\"]},\"application/vnd.antix.game-component\":{\"source\":\"iana\",\"extensions\":[\"atx\"]},\"application/vnd.apache.arrow.file\":{\"source\":\"iana\"},\"application/vnd.apache.arrow.stream\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.binary\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.compact\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.json\":{\"source\":\"iana\"},\"application/vnd.api+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.aplextor.warrp+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apothekende.reservation+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apple.installer+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mpkg\"]},\"application/vnd.apple.keynote\":{\"source\":\"iana\",\"extensions\":[\"key\"]},\"application/vnd.apple.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"m3u8\"]},\"application/vnd.apple.numbers\":{\"source\":\"iana\",\"extensions\":[\"numbers\"]},\"application/vnd.apple.pages\":{\"source\":\"iana\",\"extensions\":[\"pages\"]},\"application/vnd.apple.pkpass\":{\"compressible\":false,\"extensions\":[\"pkpass\"]},\"application/vnd.arastra.swi\":{\"source\":\"iana\"},\"application/vnd.aristanetworks.swi\":{\"source\":\"iana\",\"extensions\":[\"swi\"]},\"application/vnd.artisan+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.artsquare\":{\"source\":\"iana\"},\"application/vnd.astraea-software.iota\":{\"source\":\"iana\",\"extensions\":[\"iota\"]},\"application/vnd.audiograph\":{\"source\":\"iana\",\"extensions\":[\"aep\"]},\"application/vnd.autopackage\":{\"source\":\"iana\"},\"application/vnd.avalon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.avistar+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.balsamiq.bmml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmml\"]},\"application/vnd.balsamiq.bmpr\":{\"source\":\"iana\"},\"application/vnd.banana-accounting\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.error\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bekitzur-stech+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bint.med-content\":{\"source\":\"iana\"},\"application/vnd.biopax.rdf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.blink-idb-value-wrapper\":{\"source\":\"iana\"},\"application/vnd.blueice.multipass\":{\"source\":\"iana\",\"extensions\":[\"mpm\"]},\"application/vnd.bluetooth.ep.oob\":{\"source\":\"iana\"},\"application/vnd.bluetooth.le.oob\":{\"source\":\"iana\"},\"application/vnd.bmi\":{\"source\":\"iana\",\"extensions\":[\"bmi\"]},\"application/vnd.bpf\":{\"source\":\"iana\"},\"application/vnd.bpf3\":{\"source\":\"iana\"},\"application/vnd.businessobjects\":{\"source\":\"iana\",\"extensions\":[\"rep\"]},\"application/vnd.byu.uapi+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cab-jscript\":{\"source\":\"iana\"},\"application/vnd.canon-cpdl\":{\"source\":\"iana\"},\"application/vnd.canon-lips\":{\"source\":\"iana\"},\"application/vnd.capasystems-pg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cendio.thinlinc.clientconf\":{\"source\":\"iana\"},\"application/vnd.century-systems.tcp_stream\":{\"source\":\"iana\"},\"application/vnd.chemdraw+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"cdxml\"]},\"application/vnd.chess-pgn\":{\"source\":\"iana\"},\"application/vnd.chipnuts.karaoke-mmd\":{\"source\":\"iana\",\"extensions\":[\"mmd\"]},\"application/vnd.ciedi\":{\"source\":\"iana\"},\"application/vnd.cinderella\":{\"source\":\"iana\",\"extensions\":[\"cdy\"]},\"application/vnd.cirpack.isdn-ext\":{\"source\":\"iana\"},\"application/vnd.citationstyles.style+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csl\"]},\"application/vnd.claymore\":{\"source\":\"iana\",\"extensions\":[\"cla\"]},\"application/vnd.cloanto.rp9\":{\"source\":\"iana\",\"extensions\":[\"rp9\"]},\"application/vnd.clonk.c4group\":{\"source\":\"iana\",\"extensions\":[\"c4g\",\"c4d\",\"c4f\",\"c4p\",\"c4u\"]},\"application/vnd.cluetrust.cartomobile-config\":{\"source\":\"iana\",\"extensions\":[\"c11amc\"]},\"application/vnd.cluetrust.cartomobile-config-pkg\":{\"source\":\"iana\",\"extensions\":[\"c11amz\"]},\"application/vnd.coffeescript\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet-template\":{\"source\":\"iana\"},\"application/vnd.collection+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.doc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.next+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.comicbook+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.comicbook-rar\":{\"source\":\"iana\"},\"application/vnd.commerce-battelle\":{\"source\":\"iana\"},\"application/vnd.commonspace\":{\"source\":\"iana\",\"extensions\":[\"csp\"]},\"application/vnd.contact.cmsg\":{\"source\":\"iana\",\"extensions\":[\"cdbcmsg\"]},\"application/vnd.coreos.ignition+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cosmocaller\":{\"source\":\"iana\",\"extensions\":[\"cmc\"]},\"application/vnd.crick.clicker\":{\"source\":\"iana\",\"extensions\":[\"clkx\"]},\"application/vnd.crick.clicker.keyboard\":{\"source\":\"iana\",\"extensions\":[\"clkk\"]},\"application/vnd.crick.clicker.palette\":{\"source\":\"iana\",\"extensions\":[\"clkp\"]},\"application/vnd.crick.clicker.template\":{\"source\":\"iana\",\"extensions\":[\"clkt\"]},\"application/vnd.crick.clicker.wordbank\":{\"source\":\"iana\",\"extensions\":[\"clkw\"]},\"application/vnd.criticaltools.wbs+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wbs\"]},\"application/vnd.cryptii.pipe+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.crypto-shade-file\":{\"source\":\"iana\"},\"application/vnd.cryptomator.encrypted\":{\"source\":\"iana\"},\"application/vnd.cryptomator.vault\":{\"source\":\"iana\"},\"application/vnd.ctc-posml\":{\"source\":\"iana\",\"extensions\":[\"pml\"]},\"application/vnd.ctct.ws+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cups-pdf\":{\"source\":\"iana\"},\"application/vnd.cups-postscript\":{\"source\":\"iana\"},\"application/vnd.cups-ppd\":{\"source\":\"iana\",\"extensions\":[\"ppd\"]},\"application/vnd.cups-raster\":{\"source\":\"iana\"},\"application/vnd.cups-raw\":{\"source\":\"iana\"},\"application/vnd.curl\":{\"source\":\"iana\"},\"application/vnd.curl.car\":{\"source\":\"apache\",\"extensions\":[\"car\"]},\"application/vnd.curl.pcurl\":{\"source\":\"apache\",\"extensions\":[\"pcurl\"]},\"application/vnd.cyan.dean.root+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cybank\":{\"source\":\"iana\"},\"application/vnd.cyclonedx+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cyclonedx+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.d2l.coursepackage1p0+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.d3m-dataset\":{\"source\":\"iana\"},\"application/vnd.d3m-problem\":{\"source\":\"iana\"},\"application/vnd.dart\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dart\"]},\"application/vnd.data-vision.rdz\":{\"source\":\"iana\",\"extensions\":[\"rdz\"]},\"application/vnd.datapackage+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dataresource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dbf\":{\"source\":\"iana\",\"extensions\":[\"dbf\"]},\"application/vnd.debian.binary-package\":{\"source\":\"iana\"},\"application/vnd.dece.data\":{\"source\":\"iana\",\"extensions\":[\"uvf\",\"uvvf\",\"uvd\",\"uvvd\"]},\"application/vnd.dece.ttml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uvt\",\"uvvt\"]},\"application/vnd.dece.unspecified\":{\"source\":\"iana\",\"extensions\":[\"uvx\",\"uvvx\"]},\"application/vnd.dece.zip\":{\"source\":\"iana\",\"extensions\":[\"uvz\",\"uvvz\"]},\"application/vnd.denovo.fcselayout-link\":{\"source\":\"iana\",\"extensions\":[\"fe_launch\"]},\"application/vnd.desmume.movie\":{\"source\":\"iana\"},\"application/vnd.dir-bi.plate-dl-nosuffix\":{\"source\":\"iana\"},\"application/vnd.dm.delegation+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dna\":{\"source\":\"iana\",\"extensions\":[\"dna\"]},\"application/vnd.document+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dolby.mlp\":{\"source\":\"apache\",\"extensions\":[\"mlp\"]},\"application/vnd.dolby.mobile.1\":{\"source\":\"iana\"},\"application/vnd.dolby.mobile.2\":{\"source\":\"iana\"},\"application/vnd.doremir.scorecloud-binary-document\":{\"source\":\"iana\"},\"application/vnd.dpgraph\":{\"source\":\"iana\",\"extensions\":[\"dpg\"]},\"application/vnd.dreamfactory\":{\"source\":\"iana\",\"extensions\":[\"dfac\"]},\"application/vnd.drive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ds-keypoint\":{\"source\":\"apache\",\"extensions\":[\"kpxx\"]},\"application/vnd.dtg.local\":{\"source\":\"iana\"},\"application/vnd.dtg.local.flash\":{\"source\":\"iana\"},\"application/vnd.dtg.local.html\":{\"source\":\"iana\"},\"application/vnd.dvb.ait\":{\"source\":\"iana\",\"extensions\":[\"ait\"]},\"application/vnd.dvb.dvbisl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.dvbj\":{\"source\":\"iana\"},\"application/vnd.dvb.esgcontainer\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcdftnotifaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess2\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgpdd\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcroaming\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-base\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-enhancement\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-aggregate-root+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-container+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-generic+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-msglist+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-registration-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-registration-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-init+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.pfr\":{\"source\":\"iana\"},\"application/vnd.dvb.service\":{\"source\":\"iana\",\"extensions\":[\"svc\"]},\"application/vnd.dxr\":{\"source\":\"iana\"},\"application/vnd.dynageo\":{\"source\":\"iana\",\"extensions\":[\"geo\"]},\"application/vnd.dzr\":{\"source\":\"iana\"},\"application/vnd.easykaraoke.cdgdownload\":{\"source\":\"iana\"},\"application/vnd.ecdis-update\":{\"source\":\"iana\"},\"application/vnd.ecip.rlp\":{\"source\":\"iana\"},\"application/vnd.ecowin.chart\":{\"source\":\"iana\",\"extensions\":[\"mag\"]},\"application/vnd.ecowin.filerequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.fileupdate\":{\"source\":\"iana\"},\"application/vnd.ecowin.series\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesrequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesupdate\":{\"source\":\"iana\"},\"application/vnd.efi.img\":{\"source\":\"iana\"},\"application/vnd.efi.iso\":{\"source\":\"iana\"},\"application/vnd.emclient.accessrequest+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.enliven\":{\"source\":\"iana\",\"extensions\":[\"nml\"]},\"application/vnd.enphase.envoy\":{\"source\":\"iana\"},\"application/vnd.eprints.data+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.epson.esf\":{\"source\":\"iana\",\"extensions\":[\"esf\"]},\"application/vnd.epson.msf\":{\"source\":\"iana\",\"extensions\":[\"msf\"]},\"application/vnd.epson.quickanime\":{\"source\":\"iana\",\"extensions\":[\"qam\"]},\"application/vnd.epson.salt\":{\"source\":\"iana\",\"extensions\":[\"slt\"]},\"application/vnd.epson.ssf\":{\"source\":\"iana\",\"extensions\":[\"ssf\"]},\"application/vnd.ericsson.quickcall\":{\"source\":\"iana\"},\"application/vnd.espass-espass+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.eszigno3+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"es3\",\"et3\"]},\"application/vnd.etsi.aoc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.asic-e+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.etsi.asic-s+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.etsi.cug+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvcommand+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvdiscovery+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-bc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-cod+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-npvr+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvservice+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsync+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvueprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.mcid+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.mheg5\":{\"source\":\"iana\"},\"application/vnd.etsi.overload-control-policy-dataset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.pstn+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.sci+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.simservs+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.timestamp-token\":{\"source\":\"iana\"},\"application/vnd.etsi.tsl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.tsl.der\":{\"source\":\"iana\"},\"application/vnd.eudora.data\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.profile\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.settings\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.theme\":{\"source\":\"iana\"},\"application/vnd.exstream-empower+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.exstream-package\":{\"source\":\"iana\"},\"application/vnd.ezpix-album\":{\"source\":\"iana\",\"extensions\":[\"ez2\"]},\"application/vnd.ezpix-package\":{\"source\":\"iana\",\"extensions\":[\"ez3\"]},\"application/vnd.f-secure.mobile\":{\"source\":\"iana\"},\"application/vnd.fastcopy-disk-image\":{\"source\":\"iana\"},\"application/vnd.fdf\":{\"source\":\"iana\",\"extensions\":[\"fdf\"]},\"application/vnd.fdsn.mseed\":{\"source\":\"iana\",\"extensions\":[\"mseed\"]},\"application/vnd.fdsn.seed\":{\"source\":\"iana\",\"extensions\":[\"seed\",\"dataless\"]},\"application/vnd.ffsns\":{\"source\":\"iana\"},\"application/vnd.ficlab.flb+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.filmit.zfc\":{\"source\":\"iana\"},\"application/vnd.fints\":{\"source\":\"iana\"},\"application/vnd.firemonkeys.cloudcell\":{\"source\":\"iana\"},\"application/vnd.flographit\":{\"source\":\"iana\",\"extensions\":[\"gph\"]},\"application/vnd.fluxtime.clip\":{\"source\":\"iana\",\"extensions\":[\"ftc\"]},\"application/vnd.font-fontforge-sfd\":{\"source\":\"iana\"},\"application/vnd.framemaker\":{\"source\":\"iana\",\"extensions\":[\"fm\",\"frame\",\"maker\",\"book\"]},\"application/vnd.frogans.fnc\":{\"source\":\"iana\",\"extensions\":[\"fnc\"]},\"application/vnd.frogans.ltf\":{\"source\":\"iana\",\"extensions\":[\"ltf\"]},\"application/vnd.fsc.weblaunch\":{\"source\":\"iana\",\"extensions\":[\"fsc\"]},\"application/vnd.fujifilm.fb.docuworks\":{\"source\":\"iana\"},\"application/vnd.fujifilm.fb.docuworks.binder\":{\"source\":\"iana\"},\"application/vnd.fujifilm.fb.docuworks.container\":{\"source\":\"iana\"},\"application/vnd.fujifilm.fb.jfi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.fujitsu.oasys\":{\"source\":\"iana\",\"extensions\":[\"oas\"]},\"application/vnd.fujitsu.oasys2\":{\"source\":\"iana\",\"extensions\":[\"oa2\"]},\"application/vnd.fujitsu.oasys3\":{\"source\":\"iana\",\"extensions\":[\"oa3\"]},\"application/vnd.fujitsu.oasysgp\":{\"source\":\"iana\",\"extensions\":[\"fg5\"]},\"application/vnd.fujitsu.oasysprs\":{\"source\":\"iana\",\"extensions\":[\"bh2\"]},\"application/vnd.fujixerox.art-ex\":{\"source\":\"iana\"},\"application/vnd.fujixerox.art4\":{\"source\":\"iana\"},\"application/vnd.fujixerox.ddd\":{\"source\":\"iana\",\"extensions\":[\"ddd\"]},\"application/vnd.fujixerox.docuworks\":{\"source\":\"iana\",\"extensions\":[\"xdw\"]},\"application/vnd.fujixerox.docuworks.binder\":{\"source\":\"iana\",\"extensions\":[\"xbd\"]},\"application/vnd.fujixerox.docuworks.container\":{\"source\":\"iana\"},\"application/vnd.fujixerox.hbpl\":{\"source\":\"iana\"},\"application/vnd.fut-misnet\":{\"source\":\"iana\"},\"application/vnd.futoin+cbor\":{\"source\":\"iana\"},\"application/vnd.futoin+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.fuzzysheet\":{\"source\":\"iana\",\"extensions\":[\"fzs\"]},\"application/vnd.genomatix.tuxedo\":{\"source\":\"iana\",\"extensions\":[\"txd\"]},\"application/vnd.gentics.grd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geo+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geocube+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geogebra.file\":{\"source\":\"iana\",\"extensions\":[\"ggb\"]},\"application/vnd.geogebra.slides\":{\"source\":\"iana\"},\"application/vnd.geogebra.tool\":{\"source\":\"iana\",\"extensions\":[\"ggt\"]},\"application/vnd.geometry-explorer\":{\"source\":\"iana\",\"extensions\":[\"gex\",\"gre\"]},\"application/vnd.geonext\":{\"source\":\"iana\",\"extensions\":[\"gxt\"]},\"application/vnd.geoplan\":{\"source\":\"iana\",\"extensions\":[\"g2w\"]},\"application/vnd.geospace\":{\"source\":\"iana\",\"extensions\":[\"g3w\"]},\"application/vnd.gerber\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt-response\":{\"source\":\"iana\"},\"application/vnd.gmx\":{\"source\":\"iana\",\"extensions\":[\"gmx\"]},\"application/vnd.google-apps.document\":{\"compressible\":false,\"extensions\":[\"gdoc\"]},\"application/vnd.google-apps.presentation\":{\"compressible\":false,\"extensions\":[\"gslides\"]},\"application/vnd.google-apps.spreadsheet\":{\"compressible\":false,\"extensions\":[\"gsheet\"]},\"application/vnd.google-earth.kml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"kml\"]},\"application/vnd.google-earth.kmz\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"kmz\"]},\"application/vnd.gov.sk.e-form+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.gov.sk.e-form+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.gov.sk.xmldatacontainer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.grafeq\":{\"source\":\"iana\",\"extensions\":[\"gqf\",\"gqs\"]},\"application/vnd.gridmp\":{\"source\":\"iana\"},\"application/vnd.groove-account\":{\"source\":\"iana\",\"extensions\":[\"gac\"]},\"application/vnd.groove-help\":{\"source\":\"iana\",\"extensions\":[\"ghf\"]},\"application/vnd.groove-identity-message\":{\"source\":\"iana\",\"extensions\":[\"gim\"]},\"application/vnd.groove-injector\":{\"source\":\"iana\",\"extensions\":[\"grv\"]},\"application/vnd.groove-tool-message\":{\"source\":\"iana\",\"extensions\":[\"gtm\"]},\"application/vnd.groove-tool-template\":{\"source\":\"iana\",\"extensions\":[\"tpl\"]},\"application/vnd.groove-vcard\":{\"source\":\"iana\",\"extensions\":[\"vcg\"]},\"application/vnd.hal+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hal+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"hal\"]},\"application/vnd.handheld-entertainment+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"zmm\"]},\"application/vnd.hbci\":{\"source\":\"iana\",\"extensions\":[\"hbci\"]},\"application/vnd.hc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hcl-bireports\":{\"source\":\"iana\"},\"application/vnd.hdt\":{\"source\":\"iana\"},\"application/vnd.heroku+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hhe.lesson-player\":{\"source\":\"iana\",\"extensions\":[\"les\"]},\"application/vnd.hp-hpgl\":{\"source\":\"iana\",\"extensions\":[\"hpgl\"]},\"application/vnd.hp-hpid\":{\"source\":\"iana\",\"extensions\":[\"hpid\"]},\"application/vnd.hp-hps\":{\"source\":\"iana\",\"extensions\":[\"hps\"]},\"application/vnd.hp-jlyt\":{\"source\":\"iana\",\"extensions\":[\"jlt\"]},\"application/vnd.hp-pcl\":{\"source\":\"iana\",\"extensions\":[\"pcl\"]},\"application/vnd.hp-pclxl\":{\"source\":\"iana\",\"extensions\":[\"pclxl\"]},\"application/vnd.httphone\":{\"source\":\"iana\"},\"application/vnd.hydrostatix.sof-data\":{\"source\":\"iana\",\"extensions\":[\"sfd-hdstx\"]},\"application/vnd.hyper+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyper-item+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyperdrive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hzn-3d-crossword\":{\"source\":\"iana\"},\"application/vnd.ibm.afplinedata\":{\"source\":\"iana\"},\"application/vnd.ibm.electronic-media\":{\"source\":\"iana\"},\"application/vnd.ibm.minipay\":{\"source\":\"iana\",\"extensions\":[\"mpy\"]},\"application/vnd.ibm.modcap\":{\"source\":\"iana\",\"extensions\":[\"afp\",\"listafp\",\"list3820\"]},\"application/vnd.ibm.rights-management\":{\"source\":\"iana\",\"extensions\":[\"irm\"]},\"application/vnd.ibm.secure-container\":{\"source\":\"iana\",\"extensions\":[\"sc\"]},\"application/vnd.iccprofile\":{\"source\":\"iana\",\"extensions\":[\"icc\",\"icm\"]},\"application/vnd.ieee.1905\":{\"source\":\"iana\"},\"application/vnd.igloader\":{\"source\":\"iana\",\"extensions\":[\"igl\"]},\"application/vnd.imagemeter.folder+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.imagemeter.image+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.immervision-ivp\":{\"source\":\"iana\",\"extensions\":[\"ivp\"]},\"application/vnd.immervision-ivu\":{\"source\":\"iana\",\"extensions\":[\"ivu\"]},\"application/vnd.ims.imsccv1p1\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p2\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p3\":{\"source\":\"iana\"},\"application/vnd.ims.lis.v2.result+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolconsumerprofile+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy.id+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings.simple+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informedcontrol.rms+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informix-visionary\":{\"source\":\"iana\"},\"application/vnd.infotech.project\":{\"source\":\"iana\"},\"application/vnd.infotech.project+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.innopath.wamp.notification\":{\"source\":\"iana\"},\"application/vnd.insors.igm\":{\"source\":\"iana\",\"extensions\":[\"igm\"]},\"application/vnd.intercon.formnet\":{\"source\":\"iana\",\"extensions\":[\"xpw\",\"xpx\"]},\"application/vnd.intergeo\":{\"source\":\"iana\",\"extensions\":[\"i2g\"]},\"application/vnd.intertrust.digibox\":{\"source\":\"iana\"},\"application/vnd.intertrust.nncp\":{\"source\":\"iana\"},\"application/vnd.intu.qbo\":{\"source\":\"iana\",\"extensions\":[\"qbo\"]},\"application/vnd.intu.qfx\":{\"source\":\"iana\",\"extensions\":[\"qfx\"]},\"application/vnd.iptc.g2.catalogitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.conceptitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.knowledgeitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.newsitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.newsmessage+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.packageitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.planningitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ipunplugged.rcprofile\":{\"source\":\"iana\",\"extensions\":[\"rcprofile\"]},\"application/vnd.irepository.package+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"irp\"]},\"application/vnd.is-xpr\":{\"source\":\"iana\",\"extensions\":[\"xpr\"]},\"application/vnd.isac.fcs\":{\"source\":\"iana\",\"extensions\":[\"fcs\"]},\"application/vnd.iso11783-10+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.jam\":{\"source\":\"iana\",\"extensions\":[\"jam\"]},\"application/vnd.japannet-directory-service\":{\"source\":\"iana\"},\"application/vnd.japannet-jpnstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-payment-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-registration\":{\"source\":\"iana\"},\"application/vnd.japannet-registration-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-setstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-verification\":{\"source\":\"iana\"},\"application/vnd.japannet-verification-wakeup\":{\"source\":\"iana\"},\"application/vnd.jcp.javame.midlet-rms\":{\"source\":\"iana\",\"extensions\":[\"rms\"]},\"application/vnd.jisp\":{\"source\":\"iana\",\"extensions\":[\"jisp\"]},\"application/vnd.joost.joda-archive\":{\"source\":\"iana\",\"extensions\":[\"joda\"]},\"application/vnd.jsk.isdn-ngn\":{\"source\":\"iana\"},\"application/vnd.kahootz\":{\"source\":\"iana\",\"extensions\":[\"ktz\",\"ktr\"]},\"application/vnd.kde.karbon\":{\"source\":\"iana\",\"extensions\":[\"karbon\"]},\"application/vnd.kde.kchart\":{\"source\":\"iana\",\"extensions\":[\"chrt\"]},\"application/vnd.kde.kformula\":{\"source\":\"iana\",\"extensions\":[\"kfo\"]},\"application/vnd.kde.kivio\":{\"source\":\"iana\",\"extensions\":[\"flw\"]},\"application/vnd.kde.kontour\":{\"source\":\"iana\",\"extensions\":[\"kon\"]},\"application/vnd.kde.kpresenter\":{\"source\":\"iana\",\"extensions\":[\"kpr\",\"kpt\"]},\"application/vnd.kde.kspread\":{\"source\":\"iana\",\"extensions\":[\"ksp\"]},\"application/vnd.kde.kword\":{\"source\":\"iana\",\"extensions\":[\"kwd\",\"kwt\"]},\"application/vnd.kenameaapp\":{\"source\":\"iana\",\"extensions\":[\"htke\"]},\"application/vnd.kidspiration\":{\"source\":\"iana\",\"extensions\":[\"kia\"]},\"application/vnd.kinar\":{\"source\":\"iana\",\"extensions\":[\"kne\",\"knp\"]},\"application/vnd.koan\":{\"source\":\"iana\",\"extensions\":[\"skp\",\"skd\",\"skt\",\"skm\"]},\"application/vnd.kodak-descriptor\":{\"source\":\"iana\",\"extensions\":[\"sse\"]},\"application/vnd.las\":{\"source\":\"iana\"},\"application/vnd.las.las+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.las.las+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lasxml\"]},\"application/vnd.laszip\":{\"source\":\"iana\"},\"application/vnd.leap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.liberty-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.llamagraphics.life-balance.desktop\":{\"source\":\"iana\",\"extensions\":[\"lbd\"]},\"application/vnd.llamagraphics.life-balance.exchange+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lbe\"]},\"application/vnd.logipipe.circuit+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.loom\":{\"source\":\"iana\"},\"application/vnd.lotus-1-2-3\":{\"source\":\"iana\",\"extensions\":[\"123\"]},\"application/vnd.lotus-approach\":{\"source\":\"iana\",\"extensions\":[\"apr\"]},\"application/vnd.lotus-freelance\":{\"source\":\"iana\",\"extensions\":[\"pre\"]},\"application/vnd.lotus-notes\":{\"source\":\"iana\",\"extensions\":[\"nsf\"]},\"application/vnd.lotus-organizer\":{\"source\":\"iana\",\"extensions\":[\"org\"]},\"application/vnd.lotus-screencam\":{\"source\":\"iana\",\"extensions\":[\"scm\"]},\"application/vnd.lotus-wordpro\":{\"source\":\"iana\",\"extensions\":[\"lwp\"]},\"application/vnd.macports.portpkg\":{\"source\":\"iana\",\"extensions\":[\"portpkg\"]},\"application/vnd.mapbox-vector-tile\":{\"source\":\"iana\",\"extensions\":[\"mvt\"]},\"application/vnd.marlin.drm.actiontoken+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.conftoken+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.license+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.mdcf\":{\"source\":\"iana\"},\"application/vnd.mason+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.maxmind.maxmind-db\":{\"source\":\"iana\"},\"application/vnd.mcd\":{\"source\":\"iana\",\"extensions\":[\"mcd\"]},\"application/vnd.medcalcdata\":{\"source\":\"iana\",\"extensions\":[\"mc1\"]},\"application/vnd.mediastation.cdkey\":{\"source\":\"iana\",\"extensions\":[\"cdkey\"]},\"application/vnd.meridian-slingshot\":{\"source\":\"iana\"},\"application/vnd.mfer\":{\"source\":\"iana\",\"extensions\":[\"mwf\"]},\"application/vnd.mfmp\":{\"source\":\"iana\",\"extensions\":[\"mfm\"]},\"application/vnd.micro+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.micrografx.flo\":{\"source\":\"iana\",\"extensions\":[\"flo\"]},\"application/vnd.micrografx.igx\":{\"source\":\"iana\",\"extensions\":[\"igx\"]},\"application/vnd.microsoft.portable-executable\":{\"source\":\"iana\"},\"application/vnd.microsoft.windows.thumbnail-cache\":{\"source\":\"iana\"},\"application/vnd.miele+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.mif\":{\"source\":\"iana\",\"extensions\":[\"mif\"]},\"application/vnd.minisoft-hp3000-save\":{\"source\":\"iana\"},\"application/vnd.mitsubishi.misty-guard.trustweb\":{\"source\":\"iana\"},\"application/vnd.mobius.daf\":{\"source\":\"iana\",\"extensions\":[\"daf\"]},\"application/vnd.mobius.dis\":{\"source\":\"iana\",\"extensions\":[\"dis\"]},\"application/vnd.mobius.mbk\":{\"source\":\"iana\",\"extensions\":[\"mbk\"]},\"application/vnd.mobius.mqy\":{\"source\":\"iana\",\"extensions\":[\"mqy\"]},\"application/vnd.mobius.msl\":{\"source\":\"iana\",\"extensions\":[\"msl\"]},\"application/vnd.mobius.plc\":{\"source\":\"iana\",\"extensions\":[\"plc\"]},\"application/vnd.mobius.txf\":{\"source\":\"iana\",\"extensions\":[\"txf\"]},\"application/vnd.mophun.application\":{\"source\":\"iana\",\"extensions\":[\"mpn\"]},\"application/vnd.mophun.certificate\":{\"source\":\"iana\",\"extensions\":[\"mpc\"]},\"application/vnd.motorola.flexsuite\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.adsi\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.fis\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.gotap\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.kmr\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.ttc\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.wem\":{\"source\":\"iana\"},\"application/vnd.motorola.iprm\":{\"source\":\"iana\"},\"application/vnd.mozilla.xul+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xul\"]},\"application/vnd.ms-3mfdocument\":{\"source\":\"iana\"},\"application/vnd.ms-artgalry\":{\"source\":\"iana\",\"extensions\":[\"cil\"]},\"application/vnd.ms-asf\":{\"source\":\"iana\"},\"application/vnd.ms-cab-compressed\":{\"source\":\"iana\",\"extensions\":[\"cab\"]},\"application/vnd.ms-color.iccprofile\":{\"source\":\"apache\"},\"application/vnd.ms-excel\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xls\",\"xlm\",\"xla\",\"xlc\",\"xlt\",\"xlw\"]},\"application/vnd.ms-excel.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlam\"]},\"application/vnd.ms-excel.sheet.binary.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsb\"]},\"application/vnd.ms-excel.sheet.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsm\"]},\"application/vnd.ms-excel.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xltm\"]},\"application/vnd.ms-fontobject\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eot\"]},\"application/vnd.ms-htmlhelp\":{\"source\":\"iana\",\"extensions\":[\"chm\"]},\"application/vnd.ms-ims\":{\"source\":\"iana\",\"extensions\":[\"ims\"]},\"application/vnd.ms-lrm\":{\"source\":\"iana\",\"extensions\":[\"lrm\"]},\"application/vnd.ms-office.activex+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-officetheme\":{\"source\":\"iana\",\"extensions\":[\"thmx\"]},\"application/vnd.ms-opentype\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-outlook\":{\"compressible\":false,\"extensions\":[\"msg\"]},\"application/vnd.ms-package.obfuscated-opentype\":{\"source\":\"apache\"},\"application/vnd.ms-pki.seccat\":{\"source\":\"apache\",\"extensions\":[\"cat\"]},\"application/vnd.ms-pki.stl\":{\"source\":\"apache\",\"extensions\":[\"stl\"]},\"application/vnd.ms-playready.initiator+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-powerpoint\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ppt\",\"pps\",\"pot\"]},\"application/vnd.ms-powerpoint.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppam\"]},\"application/vnd.ms-powerpoint.presentation.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"pptm\"]},\"application/vnd.ms-powerpoint.slide.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"sldm\"]},\"application/vnd.ms-powerpoint.slideshow.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppsm\"]},\"application/vnd.ms-powerpoint.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"potm\"]},\"application/vnd.ms-printdevicecapabilities+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-printing.printticket+xml\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-printschematicket+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-project\":{\"source\":\"iana\",\"extensions\":[\"mpp\",\"mpt\"]},\"application/vnd.ms-tnef\":{\"source\":\"iana\"},\"application/vnd.ms-windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.nwprinting.oob\":{\"source\":\"iana\"},\"application/vnd.ms-windows.printerpairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.wsd.oob\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-resp\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-resp\":{\"source\":\"iana\"},\"application/vnd.ms-word.document.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"docm\"]},\"application/vnd.ms-word.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"dotm\"]},\"application/vnd.ms-works\":{\"source\":\"iana\",\"extensions\":[\"wps\",\"wks\",\"wcm\",\"wdb\"]},\"application/vnd.ms-wpl\":{\"source\":\"iana\",\"extensions\":[\"wpl\"]},\"application/vnd.ms-xpsdocument\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xps\"]},\"application/vnd.msa-disk-image\":{\"source\":\"iana\"},\"application/vnd.mseq\":{\"source\":\"iana\",\"extensions\":[\"mseq\"]},\"application/vnd.msign\":{\"source\":\"iana\"},\"application/vnd.multiad.creator\":{\"source\":\"iana\"},\"application/vnd.multiad.creator.cif\":{\"source\":\"iana\"},\"application/vnd.music-niff\":{\"source\":\"iana\"},\"application/vnd.musician\":{\"source\":\"iana\",\"extensions\":[\"mus\"]},\"application/vnd.muvee.style\":{\"source\":\"iana\",\"extensions\":[\"msty\"]},\"application/vnd.mynfc\":{\"source\":\"iana\",\"extensions\":[\"taglet\"]},\"application/vnd.ncd.control\":{\"source\":\"iana\"},\"application/vnd.ncd.reference\":{\"source\":\"iana\"},\"application/vnd.nearst.inv+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nebumind.line\":{\"source\":\"iana\"},\"application/vnd.nervana\":{\"source\":\"iana\"},\"application/vnd.netfpx\":{\"source\":\"iana\"},\"application/vnd.neurolanguage.nlu\":{\"source\":\"iana\",\"extensions\":[\"nlu\"]},\"application/vnd.nimn\":{\"source\":\"iana\"},\"application/vnd.nintendo.nitro.rom\":{\"source\":\"iana\"},\"application/vnd.nintendo.snes.rom\":{\"source\":\"iana\"},\"application/vnd.nitf\":{\"source\":\"iana\",\"extensions\":[\"ntf\",\"nitf\"]},\"application/vnd.noblenet-directory\":{\"source\":\"iana\",\"extensions\":[\"nnd\"]},\"application/vnd.noblenet-sealer\":{\"source\":\"iana\",\"extensions\":[\"nns\"]},\"application/vnd.noblenet-web\":{\"source\":\"iana\",\"extensions\":[\"nnw\"]},\"application/vnd.nokia.catalogs\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.iptv.config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.isds-radio-presets\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.landmarkcollection+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.n-gage.ac+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ac\"]},\"application/vnd.nokia.n-gage.data\":{\"source\":\"iana\",\"extensions\":[\"ngdat\"]},\"application/vnd.nokia.n-gage.symbian.install\":{\"source\":\"iana\",\"extensions\":[\"n-gage\"]},\"application/vnd.nokia.ncd\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.radio-preset\":{\"source\":\"iana\",\"extensions\":[\"rpst\"]},\"application/vnd.nokia.radio-presets\":{\"source\":\"iana\",\"extensions\":[\"rpss\"]},\"application/vnd.novadigm.edm\":{\"source\":\"iana\",\"extensions\":[\"edm\"]},\"application/vnd.novadigm.edx\":{\"source\":\"iana\",\"extensions\":[\"edx\"]},\"application/vnd.novadigm.ext\":{\"source\":\"iana\",\"extensions\":[\"ext\"]},\"application/vnd.ntt-local.content-share\":{\"source\":\"iana\"},\"application/vnd.ntt-local.file-transfer\":{\"source\":\"iana\"},\"application/vnd.ntt-local.ogw_remote-access\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_remote\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_tcp_stream\":{\"source\":\"iana\"},\"application/vnd.oasis.opendocument.chart\":{\"source\":\"iana\",\"extensions\":[\"odc\"]},\"application/vnd.oasis.opendocument.chart-template\":{\"source\":\"iana\",\"extensions\":[\"otc\"]},\"application/vnd.oasis.opendocument.database\":{\"source\":\"iana\",\"extensions\":[\"odb\"]},\"application/vnd.oasis.opendocument.formula\":{\"source\":\"iana\",\"extensions\":[\"odf\"]},\"application/vnd.oasis.opendocument.formula-template\":{\"source\":\"iana\",\"extensions\":[\"odft\"]},\"application/vnd.oasis.opendocument.graphics\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odg\"]},\"application/vnd.oasis.opendocument.graphics-template\":{\"source\":\"iana\",\"extensions\":[\"otg\"]},\"application/vnd.oasis.opendocument.image\":{\"source\":\"iana\",\"extensions\":[\"odi\"]},\"application/vnd.oasis.opendocument.image-template\":{\"source\":\"iana\",\"extensions\":[\"oti\"]},\"application/vnd.oasis.opendocument.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odp\"]},\"application/vnd.oasis.opendocument.presentation-template\":{\"source\":\"iana\",\"extensions\":[\"otp\"]},\"application/vnd.oasis.opendocument.spreadsheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ods\"]},\"application/vnd.oasis.opendocument.spreadsheet-template\":{\"source\":\"iana\",\"extensions\":[\"ots\"]},\"application/vnd.oasis.opendocument.text\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odt\"]},\"application/vnd.oasis.opendocument.text-master\":{\"source\":\"iana\",\"extensions\":[\"odm\"]},\"application/vnd.oasis.opendocument.text-template\":{\"source\":\"iana\",\"extensions\":[\"ott\"]},\"application/vnd.oasis.opendocument.text-web\":{\"source\":\"iana\",\"extensions\":[\"oth\"]},\"application/vnd.obn\":{\"source\":\"iana\"},\"application/vnd.ocf+cbor\":{\"source\":\"iana\"},\"application/vnd.oci.image.manifest.v1+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oftn.l10n+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessdownload+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessstreaming+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.cspg-hexbinary\":{\"source\":\"iana\"},\"application/vnd.oipf.dae.svg+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.dae.xhtml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.mippvcontrolmessage+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.pae.gem\":{\"source\":\"iana\"},\"application/vnd.oipf.spdiscovery+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.spdlist+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.ueprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.userprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.olpc-sugar\":{\"source\":\"iana\",\"extensions\":[\"xo\"]},\"application/vnd.oma-scws-config\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-request\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-response\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.associated-procedure-parameter+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.drm-trigger+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.imd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.ltkm\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.notification+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.provisioningtrigger\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgboot\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgdd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.sgdu\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.simple-symbol-container\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.smartcard-trigger+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.sprov+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.stkm\":{\"source\":\"iana\"},\"application/vnd.oma.cab-address-book+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-feature-handler+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-pcc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-subs-invite+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-user-prefs+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.dcd\":{\"source\":\"iana\"},\"application/vnd.oma.dcdc\":{\"source\":\"iana\"},\"application/vnd.oma.dd2+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dd2\"]},\"application/vnd.oma.drm.risd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.group-usage-list+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+cbor\":{\"source\":\"iana\"},\"application/vnd.oma.lwm2m+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+tlv\":{\"source\":\"iana\"},\"application/vnd.oma.pal+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.detailed-progress-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.final-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.groups+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.invocation-descriptor+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.optimized-progress-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.push\":{\"source\":\"iana\"},\"application/vnd.oma.scidm.messages+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.xcap-directory+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.omads-email+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omads-file+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omads-folder+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omaloc-supl-init\":{\"source\":\"iana\"},\"application/vnd.onepager\":{\"source\":\"iana\"},\"application/vnd.onepagertamp\":{\"source\":\"iana\"},\"application/vnd.onepagertamx\":{\"source\":\"iana\"},\"application/vnd.onepagertat\":{\"source\":\"iana\"},\"application/vnd.onepagertatp\":{\"source\":\"iana\"},\"application/vnd.onepagertatx\":{\"source\":\"iana\"},\"application/vnd.openblox.game+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"obgx\"]},\"application/vnd.openblox.game-binary\":{\"source\":\"iana\"},\"application/vnd.openeye.oeb\":{\"source\":\"iana\"},\"application/vnd.openofficeorg.extension\":{\"source\":\"apache\",\"extensions\":[\"oxt\"]},\"application/vnd.openstreetmap.data+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"osm\"]},\"application/vnd.opentimestamps.ots\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.custom-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.customxmlproperties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawing+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.extended-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pptx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slide\":{\"source\":\"iana\",\"extensions\":[\"sldx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slide+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow\":{\"source\":\"iana\",\"extensions\":[\"ppsx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.tags+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.template\":{\"source\":\"iana\",\"extensions\":[\"potx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xlsx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template\":{\"source\":\"iana\",\"extensions\":[\"xltx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.theme+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.themeoverride+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.vmldrawing\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"docx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template\":{\"source\":\"iana\",\"extensions\":[\"dotx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.core-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.relationships+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oracle.resource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.orange.indata\":{\"source\":\"iana\"},\"application/vnd.osa.netdeploy\":{\"source\":\"iana\"},\"application/vnd.osgeo.mapguide.package\":{\"source\":\"iana\",\"extensions\":[\"mgp\"]},\"application/vnd.osgi.bundle\":{\"source\":\"iana\"},\"application/vnd.osgi.dp\":{\"source\":\"iana\",\"extensions\":[\"dp\"]},\"application/vnd.osgi.subsystem\":{\"source\":\"iana\",\"extensions\":[\"esa\"]},\"application/vnd.otps.ct-kip+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oxli.countgraph\":{\"source\":\"iana\"},\"application/vnd.pagerduty+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.palm\":{\"source\":\"iana\",\"extensions\":[\"pdb\",\"pqa\",\"oprc\"]},\"application/vnd.panoply\":{\"source\":\"iana\"},\"application/vnd.paos.xml\":{\"source\":\"iana\"},\"application/vnd.patentdive\":{\"source\":\"iana\"},\"application/vnd.patientecommsdoc\":{\"source\":\"iana\"},\"application/vnd.pawaafile\":{\"source\":\"iana\",\"extensions\":[\"paw\"]},\"application/vnd.pcos\":{\"source\":\"iana\"},\"application/vnd.pg.format\":{\"source\":\"iana\",\"extensions\":[\"str\"]},\"application/vnd.pg.osasli\":{\"source\":\"iana\",\"extensions\":[\"ei6\"]},\"application/vnd.piaccess.application-licence\":{\"source\":\"iana\"},\"application/vnd.picsel\":{\"source\":\"iana\",\"extensions\":[\"efif\"]},\"application/vnd.pmi.widget\":{\"source\":\"iana\",\"extensions\":[\"wg\"]},\"application/vnd.poc.group-advertisement+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.pocketlearn\":{\"source\":\"iana\",\"extensions\":[\"plf\"]},\"application/vnd.powerbuilder6\":{\"source\":\"iana\",\"extensions\":[\"pbd\"]},\"application/vnd.powerbuilder6-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75-s\":{\"source\":\"iana\"},\"application/vnd.preminet\":{\"source\":\"iana\"},\"application/vnd.previewsystems.box\":{\"source\":\"iana\",\"extensions\":[\"box\"]},\"application/vnd.proteus.magazine\":{\"source\":\"iana\",\"extensions\":[\"mgz\"]},\"application/vnd.psfs\":{\"source\":\"iana\"},\"application/vnd.publishare-delta-tree\":{\"source\":\"iana\",\"extensions\":[\"qps\"]},\"application/vnd.pvi.ptid1\":{\"source\":\"iana\",\"extensions\":[\"ptid\"]},\"application/vnd.pwg-multiplexed\":{\"source\":\"iana\"},\"application/vnd.pwg-xhtml-print+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.qualcomm.brew-app-res\":{\"source\":\"iana\"},\"application/vnd.quarantainenet\":{\"source\":\"iana\"},\"application/vnd.quark.quarkxpress\":{\"source\":\"iana\",\"extensions\":[\"qxd\",\"qxt\",\"qwd\",\"qwt\",\"qxl\",\"qxb\"]},\"application/vnd.quobject-quoxdocument\":{\"source\":\"iana\"},\"application/vnd.radisys.moml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-conf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-conn+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-dialog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-stream+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-conf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-base+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-fax-detect+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-fax-sendrecv+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-group+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-speech+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-transform+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rainstor.data\":{\"source\":\"iana\"},\"application/vnd.rapid\":{\"source\":\"iana\"},\"application/vnd.rar\":{\"source\":\"iana\",\"extensions\":[\"rar\"]},\"application/vnd.realvnc.bed\":{\"source\":\"iana\",\"extensions\":[\"bed\"]},\"application/vnd.recordare.musicxml\":{\"source\":\"iana\",\"extensions\":[\"mxl\"]},\"application/vnd.recordare.musicxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"musicxml\"]},\"application/vnd.renlearn.rlprint\":{\"source\":\"iana\"},\"application/vnd.resilient.logic\":{\"source\":\"iana\"},\"application/vnd.restful+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rig.cryptonote\":{\"source\":\"iana\",\"extensions\":[\"cryptonote\"]},\"application/vnd.rim.cod\":{\"source\":\"apache\",\"extensions\":[\"cod\"]},\"application/vnd.rn-realmedia\":{\"source\":\"apache\",\"extensions\":[\"rm\"]},\"application/vnd.rn-realmedia-vbr\":{\"source\":\"apache\",\"extensions\":[\"rmvb\"]},\"application/vnd.route66.link66+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"link66\"]},\"application/vnd.rs-274x\":{\"source\":\"iana\"},\"application/vnd.ruckus.download\":{\"source\":\"iana\"},\"application/vnd.s3sms\":{\"source\":\"iana\"},\"application/vnd.sailingtracker.track\":{\"source\":\"iana\",\"extensions\":[\"st\"]},\"application/vnd.sar\":{\"source\":\"iana\"},\"application/vnd.sbm.cid\":{\"source\":\"iana\"},\"application/vnd.sbm.mid2\":{\"source\":\"iana\"},\"application/vnd.scribus\":{\"source\":\"iana\"},\"application/vnd.sealed.3df\":{\"source\":\"iana\"},\"application/vnd.sealed.csf\":{\"source\":\"iana\"},\"application/vnd.sealed.doc\":{\"source\":\"iana\"},\"application/vnd.sealed.eml\":{\"source\":\"iana\"},\"application/vnd.sealed.mht\":{\"source\":\"iana\"},\"application/vnd.sealed.net\":{\"source\":\"iana\"},\"application/vnd.sealed.ppt\":{\"source\":\"iana\"},\"application/vnd.sealed.tiff\":{\"source\":\"iana\"},\"application/vnd.sealed.xls\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.html\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.pdf\":{\"source\":\"iana\"},\"application/vnd.seemail\":{\"source\":\"iana\",\"extensions\":[\"see\"]},\"application/vnd.seis+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.sema\":{\"source\":\"iana\",\"extensions\":[\"sema\"]},\"application/vnd.semd\":{\"source\":\"iana\",\"extensions\":[\"semd\"]},\"application/vnd.semf\":{\"source\":\"iana\",\"extensions\":[\"semf\"]},\"application/vnd.shade-save-file\":{\"source\":\"iana\"},\"application/vnd.shana.informed.formdata\":{\"source\":\"iana\",\"extensions\":[\"ifm\"]},\"application/vnd.shana.informed.formtemplate\":{\"source\":\"iana\",\"extensions\":[\"itp\"]},\"application/vnd.shana.informed.interchange\":{\"source\":\"iana\",\"extensions\":[\"iif\"]},\"application/vnd.shana.informed.package\":{\"source\":\"iana\",\"extensions\":[\"ipk\"]},\"application/vnd.shootproof+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.shopkick+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.shp\":{\"source\":\"iana\"},\"application/vnd.shx\":{\"source\":\"iana\"},\"application/vnd.sigrok.session\":{\"source\":\"iana\"},\"application/vnd.simtech-mindmapper\":{\"source\":\"iana\",\"extensions\":[\"twd\",\"twds\"]},\"application/vnd.siren+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.smaf\":{\"source\":\"iana\",\"extensions\":[\"mmf\"]},\"application/vnd.smart.notebook\":{\"source\":\"iana\"},\"application/vnd.smart.teacher\":{\"source\":\"iana\",\"extensions\":[\"teacher\"]},\"application/vnd.snesdev-page-table\":{\"source\":\"iana\"},\"application/vnd.software602.filler.form+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"fo\"]},\"application/vnd.software602.filler.form-xml-zip\":{\"source\":\"iana\"},\"application/vnd.solent.sdkm+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sdkm\",\"sdkd\"]},\"application/vnd.spotfire.dxp\":{\"source\":\"iana\",\"extensions\":[\"dxp\"]},\"application/vnd.spotfire.sfs\":{\"source\":\"iana\",\"extensions\":[\"sfs\"]},\"application/vnd.sqlite3\":{\"source\":\"iana\"},\"application/vnd.sss-cod\":{\"source\":\"iana\"},\"application/vnd.sss-dtf\":{\"source\":\"iana\"},\"application/vnd.sss-ntf\":{\"source\":\"iana\"},\"application/vnd.stardivision.calc\":{\"source\":\"apache\",\"extensions\":[\"sdc\"]},\"application/vnd.stardivision.draw\":{\"source\":\"apache\",\"extensions\":[\"sda\"]},\"application/vnd.stardivision.impress\":{\"source\":\"apache\",\"extensions\":[\"sdd\"]},\"application/vnd.stardivision.math\":{\"source\":\"apache\",\"extensions\":[\"smf\"]},\"application/vnd.stardivision.writer\":{\"source\":\"apache\",\"extensions\":[\"sdw\",\"vor\"]},\"application/vnd.stardivision.writer-global\":{\"source\":\"apache\",\"extensions\":[\"sgl\"]},\"application/vnd.stepmania.package\":{\"source\":\"iana\",\"extensions\":[\"smzip\"]},\"application/vnd.stepmania.stepchart\":{\"source\":\"iana\",\"extensions\":[\"sm\"]},\"application/vnd.street-stream\":{\"source\":\"iana\"},\"application/vnd.sun.wadl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wadl\"]},\"application/vnd.sun.xml.calc\":{\"source\":\"apache\",\"extensions\":[\"sxc\"]},\"application/vnd.sun.xml.calc.template\":{\"source\":\"apache\",\"extensions\":[\"stc\"]},\"application/vnd.sun.xml.draw\":{\"source\":\"apache\",\"extensions\":[\"sxd\"]},\"application/vnd.sun.xml.draw.template\":{\"source\":\"apache\",\"extensions\":[\"std\"]},\"application/vnd.sun.xml.impress\":{\"source\":\"apache\",\"extensions\":[\"sxi\"]},\"application/vnd.sun.xml.impress.template\":{\"source\":\"apache\",\"extensions\":[\"sti\"]},\"application/vnd.sun.xml.math\":{\"source\":\"apache\",\"extensions\":[\"sxm\"]},\"application/vnd.sun.xml.writer\":{\"source\":\"apache\",\"extensions\":[\"sxw\"]},\"application/vnd.sun.xml.writer.global\":{\"source\":\"apache\",\"extensions\":[\"sxg\"]},\"application/vnd.sun.xml.writer.template\":{\"source\":\"apache\",\"extensions\":[\"stw\"]},\"application/vnd.sus-calendar\":{\"source\":\"iana\",\"extensions\":[\"sus\",\"susp\"]},\"application/vnd.svd\":{\"source\":\"iana\",\"extensions\":[\"svd\"]},\"application/vnd.swiftview-ics\":{\"source\":\"iana\"},\"application/vnd.sycle+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.symbian.install\":{\"source\":\"apache\",\"extensions\":[\"sis\",\"sisx\"]},\"application/vnd.syncml+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"xsm\"]},\"application/vnd.syncml.dm+wbxml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"bdm\"]},\"application/vnd.syncml.dm+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"xdm\"]},\"application/vnd.syncml.dm.notification\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"ddf\"]},\"application/vnd.syncml.dmtnds+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmtnds+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.syncml.ds.notification\":{\"source\":\"iana\"},\"application/vnd.tableschema+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tao.intent-module-archive\":{\"source\":\"iana\",\"extensions\":[\"tao\"]},\"application/vnd.tcpdump.pcap\":{\"source\":\"iana\",\"extensions\":[\"pcap\",\"cap\",\"dmp\"]},\"application/vnd.think-cell.ppttc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tmd.mediaflex.api+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tml\":{\"source\":\"iana\"},\"application/vnd.tmobile-livetv\":{\"source\":\"iana\",\"extensions\":[\"tmo\"]},\"application/vnd.tri.onesource\":{\"source\":\"iana\"},\"application/vnd.trid.tpt\":{\"source\":\"iana\",\"extensions\":[\"tpt\"]},\"application/vnd.triscape.mxs\":{\"source\":\"iana\",\"extensions\":[\"mxs\"]},\"application/vnd.trueapp\":{\"source\":\"iana\",\"extensions\":[\"tra\"]},\"application/vnd.truedoc\":{\"source\":\"iana\"},\"application/vnd.ubisoft.webplayer\":{\"source\":\"iana\"},\"application/vnd.ufdl\":{\"source\":\"iana\",\"extensions\":[\"ufd\",\"ufdl\"]},\"application/vnd.uiq.theme\":{\"source\":\"iana\",\"extensions\":[\"utz\"]},\"application/vnd.umajin\":{\"source\":\"iana\",\"extensions\":[\"umj\"]},\"application/vnd.unity\":{\"source\":\"iana\",\"extensions\":[\"unityweb\"]},\"application/vnd.uoml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uoml\"]},\"application/vnd.uplanet.alert\":{\"source\":\"iana\"},\"application/vnd.uplanet.alert-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.list\":{\"source\":\"iana\"},\"application/vnd.uplanet.list-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.signal\":{\"source\":\"iana\"},\"application/vnd.uri-map\":{\"source\":\"iana\"},\"application/vnd.valve.source.material\":{\"source\":\"iana\"},\"application/vnd.vcx\":{\"source\":\"iana\",\"extensions\":[\"vcx\"]},\"application/vnd.vd-study\":{\"source\":\"iana\"},\"application/vnd.vectorworks\":{\"source\":\"iana\"},\"application/vnd.vel+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.verimatrix.vcas\":{\"source\":\"iana\"},\"application/vnd.veritone.aion+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.veryant.thin\":{\"source\":\"iana\"},\"application/vnd.ves.encrypted\":{\"source\":\"iana\"},\"application/vnd.vidsoft.vidconference\":{\"source\":\"iana\"},\"application/vnd.visio\":{\"source\":\"iana\",\"extensions\":[\"vsd\",\"vst\",\"vss\",\"vsw\"]},\"application/vnd.visionary\":{\"source\":\"iana\",\"extensions\":[\"vis\"]},\"application/vnd.vividence.scriptfile\":{\"source\":\"iana\"},\"application/vnd.vsf\":{\"source\":\"iana\",\"extensions\":[\"vsf\"]},\"application/vnd.wap.sic\":{\"source\":\"iana\"},\"application/vnd.wap.slc\":{\"source\":\"iana\"},\"application/vnd.wap.wbxml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"wbxml\"]},\"application/vnd.wap.wmlc\":{\"source\":\"iana\",\"extensions\":[\"wmlc\"]},\"application/vnd.wap.wmlscriptc\":{\"source\":\"iana\",\"extensions\":[\"wmlsc\"]},\"application/vnd.webturbo\":{\"source\":\"iana\",\"extensions\":[\"wtb\"]},\"application/vnd.wfa.dpp\":{\"source\":\"iana\"},\"application/vnd.wfa.p2p\":{\"source\":\"iana\"},\"application/vnd.wfa.wsc\":{\"source\":\"iana\"},\"application/vnd.windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.wmc\":{\"source\":\"iana\"},\"application/vnd.wmf.bootstrap\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica.package\":{\"source\":\"iana\"},\"application/vnd.wolfram.player\":{\"source\":\"iana\",\"extensions\":[\"nbp\"]},\"application/vnd.wordperfect\":{\"source\":\"iana\",\"extensions\":[\"wpd\"]},\"application/vnd.wqd\":{\"source\":\"iana\",\"extensions\":[\"wqd\"]},\"application/vnd.wrq-hp3000-labelled\":{\"source\":\"iana\"},\"application/vnd.wt.stf\":{\"source\":\"iana\",\"extensions\":[\"stf\"]},\"application/vnd.wv.csp+wbxml\":{\"source\":\"iana\"},\"application/vnd.wv.csp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.wv.ssp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xacml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xara\":{\"source\":\"iana\",\"extensions\":[\"xar\"]},\"application/vnd.xfdl\":{\"source\":\"iana\",\"extensions\":[\"xfdl\"]},\"application/vnd.xfdl.webform\":{\"source\":\"iana\"},\"application/vnd.xmi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xmpie.cpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.dpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.plan\":{\"source\":\"iana\"},\"application/vnd.xmpie.ppkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.xlim\":{\"source\":\"iana\"},\"application/vnd.yamaha.hv-dic\":{\"source\":\"iana\",\"extensions\":[\"hvd\"]},\"application/vnd.yamaha.hv-script\":{\"source\":\"iana\",\"extensions\":[\"hvs\"]},\"application/vnd.yamaha.hv-voice\":{\"source\":\"iana\",\"extensions\":[\"hvp\"]},\"application/vnd.yamaha.openscoreformat\":{\"source\":\"iana\",\"extensions\":[\"osf\"]},\"application/vnd.yamaha.openscoreformat.osfpvg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"osfpvg\"]},\"application/vnd.yamaha.remote-setup\":{\"source\":\"iana\"},\"application/vnd.yamaha.smaf-audio\":{\"source\":\"iana\",\"extensions\":[\"saf\"]},\"application/vnd.yamaha.smaf-phrase\":{\"source\":\"iana\",\"extensions\":[\"spf\"]},\"application/vnd.yamaha.through-ngn\":{\"source\":\"iana\"},\"application/vnd.yamaha.tunnel-udpencap\":{\"source\":\"iana\"},\"application/vnd.yaoweme\":{\"source\":\"iana\"},\"application/vnd.yellowriver-custom-menu\":{\"source\":\"iana\",\"extensions\":[\"cmp\"]},\"application/vnd.youtube.yt\":{\"source\":\"iana\"},\"application/vnd.zul\":{\"source\":\"iana\",\"extensions\":[\"zir\",\"zirz\"]},\"application/vnd.zzazz.deck+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"zaz\"]},\"application/voicexml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vxml\"]},\"application/voucher-cms+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vq-rtcpxr\":{\"source\":\"iana\"},\"application/wasm\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wasm\"]},\"application/watcherinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/webpush-options+json\":{\"source\":\"iana\",\"compressible\":true},\"application/whoispp-query\":{\"source\":\"iana\"},\"application/whoispp-response\":{\"source\":\"iana\"},\"application/widget\":{\"source\":\"iana\",\"extensions\":[\"wgt\"]},\"application/winhlp\":{\"source\":\"apache\",\"extensions\":[\"hlp\"]},\"application/wita\":{\"source\":\"iana\"},\"application/wordperfect5.1\":{\"source\":\"iana\"},\"application/wsdl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wsdl\"]},\"application/wspolicy+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wspolicy\"]},\"application/x-7z-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"7z\"]},\"application/x-abiword\":{\"source\":\"apache\",\"extensions\":[\"abw\"]},\"application/x-ace-compressed\":{\"source\":\"apache\",\"extensions\":[\"ace\"]},\"application/x-amf\":{\"source\":\"apache\"},\"application/x-apple-diskimage\":{\"source\":\"apache\",\"extensions\":[\"dmg\"]},\"application/x-arj\":{\"compressible\":false,\"extensions\":[\"arj\"]},\"application/x-authorware-bin\":{\"source\":\"apache\",\"extensions\":[\"aab\",\"x32\",\"u32\",\"vox\"]},\"application/x-authorware-map\":{\"source\":\"apache\",\"extensions\":[\"aam\"]},\"application/x-authorware-seg\":{\"source\":\"apache\",\"extensions\":[\"aas\"]},\"application/x-bcpio\":{\"source\":\"apache\",\"extensions\":[\"bcpio\"]},\"application/x-bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/x-bittorrent\":{\"source\":\"apache\",\"extensions\":[\"torrent\"]},\"application/x-blorb\":{\"source\":\"apache\",\"extensions\":[\"blb\",\"blorb\"]},\"application/x-bzip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz\"]},\"application/x-bzip2\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz2\",\"boz\"]},\"application/x-cbr\":{\"source\":\"apache\",\"extensions\":[\"cbr\",\"cba\",\"cbt\",\"cbz\",\"cb7\"]},\"application/x-cdlink\":{\"source\":\"apache\",\"extensions\":[\"vcd\"]},\"application/x-cfs-compressed\":{\"source\":\"apache\",\"extensions\":[\"cfs\"]},\"application/x-chat\":{\"source\":\"apache\",\"extensions\":[\"chat\"]},\"application/x-chess-pgn\":{\"source\":\"apache\",\"extensions\":[\"pgn\"]},\"application/x-chrome-extension\":{\"extensions\":[\"crx\"]},\"application/x-cocoa\":{\"source\":\"nginx\",\"extensions\":[\"cco\"]},\"application/x-compress\":{\"source\":\"apache\"},\"application/x-conference\":{\"source\":\"apache\",\"extensions\":[\"nsc\"]},\"application/x-cpio\":{\"source\":\"apache\",\"extensions\":[\"cpio\"]},\"application/x-csh\":{\"source\":\"apache\",\"extensions\":[\"csh\"]},\"application/x-deb\":{\"compressible\":false},\"application/x-debian-package\":{\"source\":\"apache\",\"extensions\":[\"deb\",\"udeb\"]},\"application/x-dgc-compressed\":{\"source\":\"apache\",\"extensions\":[\"dgc\"]},\"application/x-director\":{\"source\":\"apache\",\"extensions\":[\"dir\",\"dcr\",\"dxr\",\"cst\",\"cct\",\"cxt\",\"w3d\",\"fgd\",\"swa\"]},\"application/x-doom\":{\"source\":\"apache\",\"extensions\":[\"wad\"]},\"application/x-dtbncx+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ncx\"]},\"application/x-dtbook+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"dtb\"]},\"application/x-dtbresource+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"res\"]},\"application/x-dvi\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"dvi\"]},\"application/x-envoy\":{\"source\":\"apache\",\"extensions\":[\"evy\"]},\"application/x-eva\":{\"source\":\"apache\",\"extensions\":[\"eva\"]},\"application/x-font-bdf\":{\"source\":\"apache\",\"extensions\":[\"bdf\"]},\"application/x-font-dos\":{\"source\":\"apache\"},\"application/x-font-framemaker\":{\"source\":\"apache\"},\"application/x-font-ghostscript\":{\"source\":\"apache\",\"extensions\":[\"gsf\"]},\"application/x-font-libgrx\":{\"source\":\"apache\"},\"application/x-font-linux-psf\":{\"source\":\"apache\",\"extensions\":[\"psf\"]},\"application/x-font-pcf\":{\"source\":\"apache\",\"extensions\":[\"pcf\"]},\"application/x-font-snf\":{\"source\":\"apache\",\"extensions\":[\"snf\"]},\"application/x-font-speedo\":{\"source\":\"apache\"},\"application/x-font-sunos-news\":{\"source\":\"apache\"},\"application/x-font-type1\":{\"source\":\"apache\",\"extensions\":[\"pfa\",\"pfb\",\"pfm\",\"afm\"]},\"application/x-font-vfont\":{\"source\":\"apache\"},\"application/x-freearc\":{\"source\":\"apache\",\"extensions\":[\"arc\"]},\"application/x-futuresplash\":{\"source\":\"apache\",\"extensions\":[\"spl\"]},\"application/x-gca-compressed\":{\"source\":\"apache\",\"extensions\":[\"gca\"]},\"application/x-glulx\":{\"source\":\"apache\",\"extensions\":[\"ulx\"]},\"application/x-gnumeric\":{\"source\":\"apache\",\"extensions\":[\"gnumeric\"]},\"application/x-gramps-xml\":{\"source\":\"apache\",\"extensions\":[\"gramps\"]},\"application/x-gtar\":{\"source\":\"apache\",\"extensions\":[\"gtar\"]},\"application/x-gzip\":{\"source\":\"apache\"},\"application/x-hdf\":{\"source\":\"apache\",\"extensions\":[\"hdf\"]},\"application/x-httpd-php\":{\"compressible\":true,\"extensions\":[\"php\"]},\"application/x-install-instructions\":{\"source\":\"apache\",\"extensions\":[\"install\"]},\"application/x-iso9660-image\":{\"source\":\"apache\",\"extensions\":[\"iso\"]},\"application/x-iwork-keynote-sffkey\":{\"extensions\":[\"key\"]},\"application/x-iwork-numbers-sffnumbers\":{\"extensions\":[\"numbers\"]},\"application/x-iwork-pages-sffpages\":{\"extensions\":[\"pages\"]},\"application/x-java-archive-diff\":{\"source\":\"nginx\",\"extensions\":[\"jardiff\"]},\"application/x-java-jnlp-file\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jnlp\"]},\"application/x-javascript\":{\"compressible\":true},\"application/x-keepass2\":{\"extensions\":[\"kdbx\"]},\"application/x-latex\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"latex\"]},\"application/x-lua-bytecode\":{\"extensions\":[\"luac\"]},\"application/x-lzh-compressed\":{\"source\":\"apache\",\"extensions\":[\"lzh\",\"lha\"]},\"application/x-makeself\":{\"source\":\"nginx\",\"extensions\":[\"run\"]},\"application/x-mie\":{\"source\":\"apache\",\"extensions\":[\"mie\"]},\"application/x-mobipocket-ebook\":{\"source\":\"apache\",\"extensions\":[\"prc\",\"mobi\"]},\"application/x-mpegurl\":{\"compressible\":false},\"application/x-ms-application\":{\"source\":\"apache\",\"extensions\":[\"application\"]},\"application/x-ms-shortcut\":{\"source\":\"apache\",\"extensions\":[\"lnk\"]},\"application/x-ms-wmd\":{\"source\":\"apache\",\"extensions\":[\"wmd\"]},\"application/x-ms-wmz\":{\"source\":\"apache\",\"extensions\":[\"wmz\"]},\"application/x-ms-xbap\":{\"source\":\"apache\",\"extensions\":[\"xbap\"]},\"application/x-msaccess\":{\"source\":\"apache\",\"extensions\":[\"mdb\"]},\"application/x-msbinder\":{\"source\":\"apache\",\"extensions\":[\"obd\"]},\"application/x-mscardfile\":{\"source\":\"apache\",\"extensions\":[\"crd\"]},\"application/x-msclip\":{\"source\":\"apache\",\"extensions\":[\"clp\"]},\"application/x-msdos-program\":{\"extensions\":[\"exe\"]},\"application/x-msdownload\":{\"source\":\"apache\",\"extensions\":[\"exe\",\"dll\",\"com\",\"bat\",\"msi\"]},\"application/x-msmediaview\":{\"source\":\"apache\",\"extensions\":[\"mvb\",\"m13\",\"m14\"]},\"application/x-msmetafile\":{\"source\":\"apache\",\"extensions\":[\"wmf\",\"wmz\",\"emf\",\"emz\"]},\"application/x-msmoney\":{\"source\":\"apache\",\"extensions\":[\"mny\"]},\"application/x-mspublisher\":{\"source\":\"apache\",\"extensions\":[\"pub\"]},\"application/x-msschedule\":{\"source\":\"apache\",\"extensions\":[\"scd\"]},\"application/x-msterminal\":{\"source\":\"apache\",\"extensions\":[\"trm\"]},\"application/x-mswrite\":{\"source\":\"apache\",\"extensions\":[\"wri\"]},\"application/x-netcdf\":{\"source\":\"apache\",\"extensions\":[\"nc\",\"cdf\"]},\"application/x-ns-proxy-autoconfig\":{\"compressible\":true,\"extensions\":[\"pac\"]},\"application/x-nzb\":{\"source\":\"apache\",\"extensions\":[\"nzb\"]},\"application/x-perl\":{\"source\":\"nginx\",\"extensions\":[\"pl\",\"pm\"]},\"application/x-pilot\":{\"source\":\"nginx\",\"extensions\":[\"prc\",\"pdb\"]},\"application/x-pkcs12\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"p12\",\"pfx\"]},\"application/x-pkcs7-certificates\":{\"source\":\"apache\",\"extensions\":[\"p7b\",\"spc\"]},\"application/x-pkcs7-certreqresp\":{\"source\":\"apache\",\"extensions\":[\"p7r\"]},\"application/x-pki-message\":{\"source\":\"iana\"},\"application/x-rar-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"rar\"]},\"application/x-redhat-package-manager\":{\"source\":\"nginx\",\"extensions\":[\"rpm\"]},\"application/x-research-info-systems\":{\"source\":\"apache\",\"extensions\":[\"ris\"]},\"application/x-sea\":{\"source\":\"nginx\",\"extensions\":[\"sea\"]},\"application/x-sh\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"sh\"]},\"application/x-shar\":{\"source\":\"apache\",\"extensions\":[\"shar\"]},\"application/x-shockwave-flash\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"swf\"]},\"application/x-silverlight-app\":{\"source\":\"apache\",\"extensions\":[\"xap\"]},\"application/x-sql\":{\"source\":\"apache\",\"extensions\":[\"sql\"]},\"application/x-stuffit\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"sit\"]},\"application/x-stuffitx\":{\"source\":\"apache\",\"extensions\":[\"sitx\"]},\"application/x-subrip\":{\"source\":\"apache\",\"extensions\":[\"srt\"]},\"application/x-sv4cpio\":{\"source\":\"apache\",\"extensions\":[\"sv4cpio\"]},\"application/x-sv4crc\":{\"source\":\"apache\",\"extensions\":[\"sv4crc\"]},\"application/x-t3vm-image\":{\"source\":\"apache\",\"extensions\":[\"t3\"]},\"application/x-tads\":{\"source\":\"apache\",\"extensions\":[\"gam\"]},\"application/x-tar\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"tar\"]},\"application/x-tcl\":{\"source\":\"apache\",\"extensions\":[\"tcl\",\"tk\"]},\"application/x-tex\":{\"source\":\"apache\",\"extensions\":[\"tex\"]},\"application/x-tex-tfm\":{\"source\":\"apache\",\"extensions\":[\"tfm\"]},\"application/x-texinfo\":{\"source\":\"apache\",\"extensions\":[\"texinfo\",\"texi\"]},\"application/x-tgif\":{\"source\":\"apache\",\"extensions\":[\"obj\"]},\"application/x-ustar\":{\"source\":\"apache\",\"extensions\":[\"ustar\"]},\"application/x-virtualbox-hdd\":{\"compressible\":true,\"extensions\":[\"hdd\"]},\"application/x-virtualbox-ova\":{\"compressible\":true,\"extensions\":[\"ova\"]},\"application/x-virtualbox-ovf\":{\"compressible\":true,\"extensions\":[\"ovf\"]},\"application/x-virtualbox-vbox\":{\"compressible\":true,\"extensions\":[\"vbox\"]},\"application/x-virtualbox-vbox-extpack\":{\"compressible\":false,\"extensions\":[\"vbox-extpack\"]},\"application/x-virtualbox-vdi\":{\"compressible\":true,\"extensions\":[\"vdi\"]},\"application/x-virtualbox-vhd\":{\"compressible\":true,\"extensions\":[\"vhd\"]},\"application/x-virtualbox-vmdk\":{\"compressible\":true,\"extensions\":[\"vmdk\"]},\"application/x-wais-source\":{\"source\":\"apache\",\"extensions\":[\"src\"]},\"application/x-web-app-manifest+json\":{\"compressible\":true,\"extensions\":[\"webapp\"]},\"application/x-www-form-urlencoded\":{\"source\":\"iana\",\"compressible\":true},\"application/x-x509-ca-cert\":{\"source\":\"iana\",\"extensions\":[\"der\",\"crt\",\"pem\"]},\"application/x-x509-ca-ra-cert\":{\"source\":\"iana\"},\"application/x-x509-next-ca-cert\":{\"source\":\"iana\"},\"application/x-xfig\":{\"source\":\"apache\",\"extensions\":[\"fig\"]},\"application/x-xliff+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xlf\"]},\"application/x-xpinstall\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"xpi\"]},\"application/x-xz\":{\"source\":\"apache\",\"extensions\":[\"xz\"]},\"application/x-zmachine\":{\"source\":\"apache\",\"extensions\":[\"z1\",\"z2\",\"z3\",\"z4\",\"z5\",\"z6\",\"z7\",\"z8\"]},\"application/x400-bp\":{\"source\":\"iana\"},\"application/xacml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xaml+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xaml\"]},\"application/xcap-att+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xav\"]},\"application/xcap-caps+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xca\"]},\"application/xcap-diff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdf\"]},\"application/xcap-el+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xel\"]},\"application/xcap-error+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xcap-ns+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xns\"]},\"application/xcon-conference-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xcon-conference-info-diff+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xenc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xenc\"]},\"application/xhtml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xhtml\",\"xht\"]},\"application/xhtml-voice+xml\":{\"source\":\"apache\",\"compressible\":true},\"application/xliff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xlf\"]},\"application/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\",\"xsl\",\"xsd\",\"rng\"]},\"application/xml-dtd\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dtd\"]},\"application/xml-external-parsed-entity\":{\"source\":\"iana\"},\"application/xml-patch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xmpp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xop+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xop\"]},\"application/xproc+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xpl\"]},\"application/xslt+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xsl\",\"xslt\"]},\"application/xspf+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xspf\"]},\"application/xv+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mxml\",\"xhvml\",\"xvml\",\"xvm\"]},\"application/yang\":{\"source\":\"iana\",\"extensions\":[\"yang\"]},\"application/yang-data+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-data+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/yin+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"yin\"]},\"application/zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"zip\"]},\"application/zlib\":{\"source\":\"iana\"},\"application/zstd\":{\"source\":\"iana\"},\"audio/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"audio/32kadpcm\":{\"source\":\"iana\"},\"audio/3gpp\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"3gpp\"]},\"audio/3gpp2\":{\"source\":\"iana\"},\"audio/aac\":{\"source\":\"iana\"},\"audio/ac3\":{\"source\":\"iana\"},\"audio/adpcm\":{\"source\":\"apache\",\"extensions\":[\"adp\"]},\"audio/amr\":{\"source\":\"iana\",\"extensions\":[\"amr\"]},\"audio/amr-wb\":{\"source\":\"iana\"},\"audio/amr-wb+\":{\"source\":\"iana\"},\"audio/aptx\":{\"source\":\"iana\"},\"audio/asc\":{\"source\":\"iana\"},\"audio/atrac-advanced-lossless\":{\"source\":\"iana\"},\"audio/atrac-x\":{\"source\":\"iana\"},\"audio/atrac3\":{\"source\":\"iana\"},\"audio/basic\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"au\",\"snd\"]},\"audio/bv16\":{\"source\":\"iana\"},\"audio/bv32\":{\"source\":\"iana\"},\"audio/clearmode\":{\"source\":\"iana\"},\"audio/cn\":{\"source\":\"iana\"},\"audio/dat12\":{\"source\":\"iana\"},\"audio/dls\":{\"source\":\"iana\"},\"audio/dsr-es201108\":{\"source\":\"iana\"},\"audio/dsr-es202050\":{\"source\":\"iana\"},\"audio/dsr-es202211\":{\"source\":\"iana\"},\"audio/dsr-es202212\":{\"source\":\"iana\"},\"audio/dv\":{\"source\":\"iana\"},\"audio/dvi4\":{\"source\":\"iana\"},\"audio/eac3\":{\"source\":\"iana\"},\"audio/encaprtp\":{\"source\":\"iana\"},\"audio/evrc\":{\"source\":\"iana\"},\"audio/evrc-qcp\":{\"source\":\"iana\"},\"audio/evrc0\":{\"source\":\"iana\"},\"audio/evrc1\":{\"source\":\"iana\"},\"audio/evrcb\":{\"source\":\"iana\"},\"audio/evrcb0\":{\"source\":\"iana\"},\"audio/evrcb1\":{\"source\":\"iana\"},\"audio/evrcnw\":{\"source\":\"iana\"},\"audio/evrcnw0\":{\"source\":\"iana\"},\"audio/evrcnw1\":{\"source\":\"iana\"},\"audio/evrcwb\":{\"source\":\"iana\"},\"audio/evrcwb0\":{\"source\":\"iana\"},\"audio/evrcwb1\":{\"source\":\"iana\"},\"audio/evs\":{\"source\":\"iana\"},\"audio/flexfec\":{\"source\":\"iana\"},\"audio/fwdred\":{\"source\":\"iana\"},\"audio/g711-0\":{\"source\":\"iana\"},\"audio/g719\":{\"source\":\"iana\"},\"audio/g722\":{\"source\":\"iana\"},\"audio/g7221\":{\"source\":\"iana\"},\"audio/g723\":{\"source\":\"iana\"},\"audio/g726-16\":{\"source\":\"iana\"},\"audio/g726-24\":{\"source\":\"iana\"},\"audio/g726-32\":{\"source\":\"iana\"},\"audio/g726-40\":{\"source\":\"iana\"},\"audio/g728\":{\"source\":\"iana\"},\"audio/g729\":{\"source\":\"iana\"},\"audio/g7291\":{\"source\":\"iana\"},\"audio/g729d\":{\"source\":\"iana\"},\"audio/g729e\":{\"source\":\"iana\"},\"audio/gsm\":{\"source\":\"iana\"},\"audio/gsm-efr\":{\"source\":\"iana\"},\"audio/gsm-hr-08\":{\"source\":\"iana\"},\"audio/ilbc\":{\"source\":\"iana\"},\"audio/ip-mr_v2.5\":{\"source\":\"iana\"},\"audio/isac\":{\"source\":\"apache\"},\"audio/l16\":{\"source\":\"iana\"},\"audio/l20\":{\"source\":\"iana\"},\"audio/l24\":{\"source\":\"iana\",\"compressible\":false},\"audio/l8\":{\"source\":\"iana\"},\"audio/lpc\":{\"source\":\"iana\"},\"audio/melp\":{\"source\":\"iana\"},\"audio/melp1200\":{\"source\":\"iana\"},\"audio/melp2400\":{\"source\":\"iana\"},\"audio/melp600\":{\"source\":\"iana\"},\"audio/mhas\":{\"source\":\"iana\"},\"audio/midi\":{\"source\":\"apache\",\"extensions\":[\"mid\",\"midi\",\"kar\",\"rmi\"]},\"audio/mobile-xmf\":{\"source\":\"iana\",\"extensions\":[\"mxmf\"]},\"audio/mp3\":{\"compressible\":false,\"extensions\":[\"mp3\"]},\"audio/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"m4a\",\"mp4a\"]},\"audio/mp4a-latm\":{\"source\":\"iana\"},\"audio/mpa\":{\"source\":\"iana\"},\"audio/mpa-robust\":{\"source\":\"iana\"},\"audio/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpga\",\"mp2\",\"mp2a\",\"mp3\",\"m2a\",\"m3a\"]},\"audio/mpeg4-generic\":{\"source\":\"iana\"},\"audio/musepack\":{\"source\":\"apache\"},\"audio/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"oga\",\"ogg\",\"spx\",\"opus\"]},\"audio/opus\":{\"source\":\"iana\"},\"audio/parityfec\":{\"source\":\"iana\"},\"audio/pcma\":{\"source\":\"iana\"},\"audio/pcma-wb\":{\"source\":\"iana\"},\"audio/pcmu\":{\"source\":\"iana\"},\"audio/pcmu-wb\":{\"source\":\"iana\"},\"audio/prs.sid\":{\"source\":\"iana\"},\"audio/qcelp\":{\"source\":\"iana\"},\"audio/raptorfec\":{\"source\":\"iana\"},\"audio/red\":{\"source\":\"iana\"},\"audio/rtp-enc-aescm128\":{\"source\":\"iana\"},\"audio/rtp-midi\":{\"source\":\"iana\"},\"audio/rtploopback\":{\"source\":\"iana\"},\"audio/rtx\":{\"source\":\"iana\"},\"audio/s3m\":{\"source\":\"apache\",\"extensions\":[\"s3m\"]},\"audio/scip\":{\"source\":\"iana\"},\"audio/silk\":{\"source\":\"apache\",\"extensions\":[\"sil\"]},\"audio/smv\":{\"source\":\"iana\"},\"audio/smv-qcp\":{\"source\":\"iana\"},\"audio/smv0\":{\"source\":\"iana\"},\"audio/sofa\":{\"source\":\"iana\"},\"audio/sp-midi\":{\"source\":\"iana\"},\"audio/speex\":{\"source\":\"iana\"},\"audio/t140c\":{\"source\":\"iana\"},\"audio/t38\":{\"source\":\"iana\"},\"audio/telephone-event\":{\"source\":\"iana\"},\"audio/tetra_acelp\":{\"source\":\"iana\"},\"audio/tetra_acelp_bb\":{\"source\":\"iana\"},\"audio/tone\":{\"source\":\"iana\"},\"audio/tsvcis\":{\"source\":\"iana\"},\"audio/uemclip\":{\"source\":\"iana\"},\"audio/ulpfec\":{\"source\":\"iana\"},\"audio/usac\":{\"source\":\"iana\"},\"audio/vdvi\":{\"source\":\"iana\"},\"audio/vmr-wb\":{\"source\":\"iana\"},\"audio/vnd.3gpp.iufp\":{\"source\":\"iana\"},\"audio/vnd.4sb\":{\"source\":\"iana\"},\"audio/vnd.audiokoz\":{\"source\":\"iana\"},\"audio/vnd.celp\":{\"source\":\"iana\"},\"audio/vnd.cisco.nse\":{\"source\":\"iana\"},\"audio/vnd.cmles.radio-events\":{\"source\":\"iana\"},\"audio/vnd.cns.anp1\":{\"source\":\"iana\"},\"audio/vnd.cns.inf1\":{\"source\":\"iana\"},\"audio/vnd.dece.audio\":{\"source\":\"iana\",\"extensions\":[\"uva\",\"uvva\"]},\"audio/vnd.digital-winds\":{\"source\":\"iana\",\"extensions\":[\"eol\"]},\"audio/vnd.dlna.adts\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.1\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.2\":{\"source\":\"iana\"},\"audio/vnd.dolby.mlp\":{\"source\":\"iana\"},\"audio/vnd.dolby.mps\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2x\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2z\":{\"source\":\"iana\"},\"audio/vnd.dolby.pulse.1\":{\"source\":\"iana\"},\"audio/vnd.dra\":{\"source\":\"iana\",\"extensions\":[\"dra\"]},\"audio/vnd.dts\":{\"source\":\"iana\",\"extensions\":[\"dts\"]},\"audio/vnd.dts.hd\":{\"source\":\"iana\",\"extensions\":[\"dtshd\"]},\"audio/vnd.dts.uhd\":{\"source\":\"iana\"},\"audio/vnd.dvb.file\":{\"source\":\"iana\"},\"audio/vnd.everad.plj\":{\"source\":\"iana\"},\"audio/vnd.hns.audio\":{\"source\":\"iana\"},\"audio/vnd.lucent.voice\":{\"source\":\"iana\",\"extensions\":[\"lvp\"]},\"audio/vnd.ms-playready.media.pya\":{\"source\":\"iana\",\"extensions\":[\"pya\"]},\"audio/vnd.nokia.mobile-xmf\":{\"source\":\"iana\"},\"audio/vnd.nortel.vbk\":{\"source\":\"iana\"},\"audio/vnd.nuera.ecelp4800\":{\"source\":\"iana\",\"extensions\":[\"ecelp4800\"]},\"audio/vnd.nuera.ecelp7470\":{\"source\":\"iana\",\"extensions\":[\"ecelp7470\"]},\"audio/vnd.nuera.ecelp9600\":{\"source\":\"iana\",\"extensions\":[\"ecelp9600\"]},\"audio/vnd.octel.sbc\":{\"source\":\"iana\"},\"audio/vnd.presonus.multitrack\":{\"source\":\"iana\"},\"audio/vnd.qcelp\":{\"source\":\"iana\"},\"audio/vnd.rhetorex.32kadpcm\":{\"source\":\"iana\"},\"audio/vnd.rip\":{\"source\":\"iana\",\"extensions\":[\"rip\"]},\"audio/vnd.rn-realaudio\":{\"compressible\":false},\"audio/vnd.sealedmedia.softseal.mpeg\":{\"source\":\"iana\"},\"audio/vnd.vmx.cvsd\":{\"source\":\"iana\"},\"audio/vnd.wave\":{\"compressible\":false},\"audio/vorbis\":{\"source\":\"iana\",\"compressible\":false},\"audio/vorbis-config\":{\"source\":\"iana\"},\"audio/wav\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/wave\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"weba\"]},\"audio/x-aac\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"aac\"]},\"audio/x-aiff\":{\"source\":\"apache\",\"extensions\":[\"aif\",\"aiff\",\"aifc\"]},\"audio/x-caf\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"caf\"]},\"audio/x-flac\":{\"source\":\"apache\",\"extensions\":[\"flac\"]},\"audio/x-m4a\":{\"source\":\"nginx\",\"extensions\":[\"m4a\"]},\"audio/x-matroska\":{\"source\":\"apache\",\"extensions\":[\"mka\"]},\"audio/x-mpegurl\":{\"source\":\"apache\",\"extensions\":[\"m3u\"]},\"audio/x-ms-wax\":{\"source\":\"apache\",\"extensions\":[\"wax\"]},\"audio/x-ms-wma\":{\"source\":\"apache\",\"extensions\":[\"wma\"]},\"audio/x-pn-realaudio\":{\"source\":\"apache\",\"extensions\":[\"ram\",\"ra\"]},\"audio/x-pn-realaudio-plugin\":{\"source\":\"apache\",\"extensions\":[\"rmp\"]},\"audio/x-realaudio\":{\"source\":\"nginx\",\"extensions\":[\"ra\"]},\"audio/x-tta\":{\"source\":\"apache\"},\"audio/x-wav\":{\"source\":\"apache\",\"extensions\":[\"wav\"]},\"audio/xm\":{\"source\":\"apache\",\"extensions\":[\"xm\"]},\"chemical/x-cdx\":{\"source\":\"apache\",\"extensions\":[\"cdx\"]},\"chemical/x-cif\":{\"source\":\"apache\",\"extensions\":[\"cif\"]},\"chemical/x-cmdf\":{\"source\":\"apache\",\"extensions\":[\"cmdf\"]},\"chemical/x-cml\":{\"source\":\"apache\",\"extensions\":[\"cml\"]},\"chemical/x-csml\":{\"source\":\"apache\",\"extensions\":[\"csml\"]},\"chemical/x-pdb\":{\"source\":\"apache\"},\"chemical/x-xyz\":{\"source\":\"apache\",\"extensions\":[\"xyz\"]},\"font/collection\":{\"source\":\"iana\",\"extensions\":[\"ttc\"]},\"font/otf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"otf\"]},\"font/sfnt\":{\"source\":\"iana\"},\"font/ttf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ttf\"]},\"font/woff\":{\"source\":\"iana\",\"extensions\":[\"woff\"]},\"font/woff2\":{\"source\":\"iana\",\"extensions\":[\"woff2\"]},\"image/aces\":{\"source\":\"iana\",\"extensions\":[\"exr\"]},\"image/apng\":{\"compressible\":false,\"extensions\":[\"apng\"]},\"image/avci\":{\"source\":\"iana\"},\"image/avcs\":{\"source\":\"iana\"},\"image/avif\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"avif\"]},\"image/bmp\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/cgm\":{\"source\":\"iana\",\"extensions\":[\"cgm\"]},\"image/dicom-rle\":{\"source\":\"iana\",\"extensions\":[\"drle\"]},\"image/emf\":{\"source\":\"iana\",\"extensions\":[\"emf\"]},\"image/fits\":{\"source\":\"iana\",\"extensions\":[\"fits\"]},\"image/g3fax\":{\"source\":\"iana\",\"extensions\":[\"g3\"]},\"image/gif\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gif\"]},\"image/heic\":{\"source\":\"iana\",\"extensions\":[\"heic\"]},\"image/heic-sequence\":{\"source\":\"iana\",\"extensions\":[\"heics\"]},\"image/heif\":{\"source\":\"iana\",\"extensions\":[\"heif\"]},\"image/heif-sequence\":{\"source\":\"iana\",\"extensions\":[\"heifs\"]},\"image/hej2k\":{\"source\":\"iana\",\"extensions\":[\"hej2\"]},\"image/hsj2\":{\"source\":\"iana\",\"extensions\":[\"hsj2\"]},\"image/ief\":{\"source\":\"iana\",\"extensions\":[\"ief\"]},\"image/jls\":{\"source\":\"iana\",\"extensions\":[\"jls\"]},\"image/jp2\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jp2\",\"jpg2\"]},\"image/jpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpeg\",\"jpg\",\"jpe\"]},\"image/jph\":{\"source\":\"iana\",\"extensions\":[\"jph\"]},\"image/jphc\":{\"source\":\"iana\",\"extensions\":[\"jhc\"]},\"image/jpm\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpm\"]},\"image/jpx\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpx\",\"jpf\"]},\"image/jxr\":{\"source\":\"iana\",\"extensions\":[\"jxr\"]},\"image/jxra\":{\"source\":\"iana\",\"extensions\":[\"jxra\"]},\"image/jxrs\":{\"source\":\"iana\",\"extensions\":[\"jxrs\"]},\"image/jxs\":{\"source\":\"iana\",\"extensions\":[\"jxs\"]},\"image/jxsc\":{\"source\":\"iana\",\"extensions\":[\"jxsc\"]},\"image/jxsi\":{\"source\":\"iana\",\"extensions\":[\"jxsi\"]},\"image/jxss\":{\"source\":\"iana\",\"extensions\":[\"jxss\"]},\"image/ktx\":{\"source\":\"iana\",\"extensions\":[\"ktx\"]},\"image/ktx2\":{\"source\":\"iana\",\"extensions\":[\"ktx2\"]},\"image/naplps\":{\"source\":\"iana\"},\"image/pjpeg\":{\"compressible\":false},\"image/png\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"png\"]},\"image/prs.btif\":{\"source\":\"iana\",\"extensions\":[\"btif\"]},\"image/prs.pti\":{\"source\":\"iana\",\"extensions\":[\"pti\"]},\"image/pwg-raster\":{\"source\":\"iana\"},\"image/sgi\":{\"source\":\"apache\",\"extensions\":[\"sgi\"]},\"image/svg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"svg\",\"svgz\"]},\"image/t38\":{\"source\":\"iana\",\"extensions\":[\"t38\"]},\"image/tiff\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"tif\",\"tiff\"]},\"image/tiff-fx\":{\"source\":\"iana\",\"extensions\":[\"tfx\"]},\"image/vnd.adobe.photoshop\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"psd\"]},\"image/vnd.airzip.accelerator.azv\":{\"source\":\"iana\",\"extensions\":[\"azv\"]},\"image/vnd.cns.inf2\":{\"source\":\"iana\"},\"image/vnd.dece.graphic\":{\"source\":\"iana\",\"extensions\":[\"uvi\",\"uvvi\",\"uvg\",\"uvvg\"]},\"image/vnd.djvu\":{\"source\":\"iana\",\"extensions\":[\"djvu\",\"djv\"]},\"image/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"image/vnd.dwg\":{\"source\":\"iana\",\"extensions\":[\"dwg\"]},\"image/vnd.dxf\":{\"source\":\"iana\",\"extensions\":[\"dxf\"]},\"image/vnd.fastbidsheet\":{\"source\":\"iana\",\"extensions\":[\"fbs\"]},\"image/vnd.fpx\":{\"source\":\"iana\",\"extensions\":[\"fpx\"]},\"image/vnd.fst\":{\"source\":\"iana\",\"extensions\":[\"fst\"]},\"image/vnd.fujixerox.edmics-mmr\":{\"source\":\"iana\",\"extensions\":[\"mmr\"]},\"image/vnd.fujixerox.edmics-rlc\":{\"source\":\"iana\",\"extensions\":[\"rlc\"]},\"image/vnd.globalgraphics.pgb\":{\"source\":\"iana\"},\"image/vnd.microsoft.icon\":{\"source\":\"iana\",\"extensions\":[\"ico\"]},\"image/vnd.mix\":{\"source\":\"iana\"},\"image/vnd.mozilla.apng\":{\"source\":\"iana\"},\"image/vnd.ms-dds\":{\"extensions\":[\"dds\"]},\"image/vnd.ms-modi\":{\"source\":\"iana\",\"extensions\":[\"mdi\"]},\"image/vnd.ms-photo\":{\"source\":\"apache\",\"extensions\":[\"wdp\"]},\"image/vnd.net-fpx\":{\"source\":\"iana\",\"extensions\":[\"npx\"]},\"image/vnd.pco.b16\":{\"source\":\"iana\",\"extensions\":[\"b16\"]},\"image/vnd.radiance\":{\"source\":\"iana\"},\"image/vnd.sealed.png\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.gif\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.jpg\":{\"source\":\"iana\"},\"image/vnd.svf\":{\"source\":\"iana\"},\"image/vnd.tencent.tap\":{\"source\":\"iana\",\"extensions\":[\"tap\"]},\"image/vnd.valve.source.texture\":{\"source\":\"iana\",\"extensions\":[\"vtf\"]},\"image/vnd.wap.wbmp\":{\"source\":\"iana\",\"extensions\":[\"wbmp\"]},\"image/vnd.xiff\":{\"source\":\"iana\",\"extensions\":[\"xif\"]},\"image/vnd.zbrush.pcx\":{\"source\":\"iana\",\"extensions\":[\"pcx\"]},\"image/webp\":{\"source\":\"apache\",\"extensions\":[\"webp\"]},\"image/wmf\":{\"source\":\"iana\",\"extensions\":[\"wmf\"]},\"image/x-3ds\":{\"source\":\"apache\",\"extensions\":[\"3ds\"]},\"image/x-cmu-raster\":{\"source\":\"apache\",\"extensions\":[\"ras\"]},\"image/x-cmx\":{\"source\":\"apache\",\"extensions\":[\"cmx\"]},\"image/x-freehand\":{\"source\":\"apache\",\"extensions\":[\"fh\",\"fhc\",\"fh4\",\"fh5\",\"fh7\"]},\"image/x-icon\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ico\"]},\"image/x-jng\":{\"source\":\"nginx\",\"extensions\":[\"jng\"]},\"image/x-mrsid-image\":{\"source\":\"apache\",\"extensions\":[\"sid\"]},\"image/x-ms-bmp\":{\"source\":\"nginx\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/x-pcx\":{\"source\":\"apache\",\"extensions\":[\"pcx\"]},\"image/x-pict\":{\"source\":\"apache\",\"extensions\":[\"pic\",\"pct\"]},\"image/x-portable-anymap\":{\"source\":\"apache\",\"extensions\":[\"pnm\"]},\"image/x-portable-bitmap\":{\"source\":\"apache\",\"extensions\":[\"pbm\"]},\"image/x-portable-graymap\":{\"source\":\"apache\",\"extensions\":[\"pgm\"]},\"image/x-portable-pixmap\":{\"source\":\"apache\",\"extensions\":[\"ppm\"]},\"image/x-rgb\":{\"source\":\"apache\",\"extensions\":[\"rgb\"]},\"image/x-tga\":{\"source\":\"apache\",\"extensions\":[\"tga\"]},\"image/x-xbitmap\":{\"source\":\"apache\",\"extensions\":[\"xbm\"]},\"image/x-xcf\":{\"compressible\":false},\"image/x-xpixmap\":{\"source\":\"apache\",\"extensions\":[\"xpm\"]},\"image/x-xwindowdump\":{\"source\":\"apache\",\"extensions\":[\"xwd\"]},\"message/cpim\":{\"source\":\"iana\"},\"message/delivery-status\":{\"source\":\"iana\"},\"message/disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"disposition-notification\"]},\"message/external-body\":{\"source\":\"iana\"},\"message/feedback-report\":{\"source\":\"iana\"},\"message/global\":{\"source\":\"iana\",\"extensions\":[\"u8msg\"]},\"message/global-delivery-status\":{\"source\":\"iana\",\"extensions\":[\"u8dsn\"]},\"message/global-disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"u8mdn\"]},\"message/global-headers\":{\"source\":\"iana\",\"extensions\":[\"u8hdr\"]},\"message/http\":{\"source\":\"iana\",\"compressible\":false},\"message/imdn+xml\":{\"source\":\"iana\",\"compressible\":true},\"message/news\":{\"source\":\"iana\"},\"message/partial\":{\"source\":\"iana\",\"compressible\":false},\"message/rfc822\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eml\",\"mime\"]},\"message/s-http\":{\"source\":\"iana\"},\"message/sip\":{\"source\":\"iana\"},\"message/sipfrag\":{\"source\":\"iana\"},\"message/tracking-status\":{\"source\":\"iana\"},\"message/vnd.si.simp\":{\"source\":\"iana\"},\"message/vnd.wfa.wsc\":{\"source\":\"iana\",\"extensions\":[\"wsc\"]},\"model/3mf\":{\"source\":\"iana\",\"extensions\":[\"3mf\"]},\"model/e57\":{\"source\":\"iana\"},\"model/gltf+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gltf\"]},\"model/gltf-binary\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"glb\"]},\"model/iges\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"igs\",\"iges\"]},\"model/mesh\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"msh\",\"mesh\",\"silo\"]},\"model/mtl\":{\"source\":\"iana\",\"extensions\":[\"mtl\"]},\"model/obj\":{\"source\":\"iana\",\"extensions\":[\"obj\"]},\"model/step\":{\"source\":\"iana\"},\"model/step+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"stpx\"]},\"model/step+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"stpz\"]},\"model/step-xml+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"stpxz\"]},\"model/stl\":{\"source\":\"iana\",\"extensions\":[\"stl\"]},\"model/vnd.collada+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dae\"]},\"model/vnd.dwf\":{\"source\":\"iana\",\"extensions\":[\"dwf\"]},\"model/vnd.flatland.3dml\":{\"source\":\"iana\"},\"model/vnd.gdl\":{\"source\":\"iana\",\"extensions\":[\"gdl\"]},\"model/vnd.gs-gdl\":{\"source\":\"apache\"},\"model/vnd.gs.gdl\":{\"source\":\"iana\"},\"model/vnd.gtw\":{\"source\":\"iana\",\"extensions\":[\"gtw\"]},\"model/vnd.moml+xml\":{\"source\":\"iana\",\"compressible\":true},\"model/vnd.mts\":{\"source\":\"iana\",\"extensions\":[\"mts\"]},\"model/vnd.opengex\":{\"source\":\"iana\",\"extensions\":[\"ogex\"]},\"model/vnd.parasolid.transmit.binary\":{\"source\":\"iana\",\"extensions\":[\"x_b\"]},\"model/vnd.parasolid.transmit.text\":{\"source\":\"iana\",\"extensions\":[\"x_t\"]},\"model/vnd.pytha.pyox\":{\"source\":\"iana\"},\"model/vnd.rosette.annotated-data-model\":{\"source\":\"iana\"},\"model/vnd.sap.vds\":{\"source\":\"iana\",\"extensions\":[\"vds\"]},\"model/vnd.usdz+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"usdz\"]},\"model/vnd.valve.source.compiled-map\":{\"source\":\"iana\",\"extensions\":[\"bsp\"]},\"model/vnd.vtu\":{\"source\":\"iana\",\"extensions\":[\"vtu\"]},\"model/vrml\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"wrl\",\"vrml\"]},\"model/x3d+binary\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3db\",\"x3dbz\"]},\"model/x3d+fastinfoset\":{\"source\":\"iana\",\"extensions\":[\"x3db\"]},\"model/x3d+vrml\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3dv\",\"x3dvz\"]},\"model/x3d+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"x3d\",\"x3dz\"]},\"model/x3d-vrml\":{\"source\":\"iana\",\"extensions\":[\"x3dv\"]},\"multipart/alternative\":{\"source\":\"iana\",\"compressible\":false},\"multipart/appledouble\":{\"source\":\"iana\"},\"multipart/byteranges\":{\"source\":\"iana\"},\"multipart/digest\":{\"source\":\"iana\"},\"multipart/encrypted\":{\"source\":\"iana\",\"compressible\":false},\"multipart/form-data\":{\"source\":\"iana\",\"compressible\":false},\"multipart/header-set\":{\"source\":\"iana\"},\"multipart/mixed\":{\"source\":\"iana\"},\"multipart/multilingual\":{\"source\":\"iana\"},\"multipart/parallel\":{\"source\":\"iana\"},\"multipart/related\":{\"source\":\"iana\",\"compressible\":false},\"multipart/report\":{\"source\":\"iana\"},\"multipart/signed\":{\"source\":\"iana\",\"compressible\":false},\"multipart/vnd.bint.med-plus\":{\"source\":\"iana\"},\"multipart/voice-message\":{\"source\":\"iana\"},\"multipart/x-mixed-replace\":{\"source\":\"iana\"},\"text/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"text/cache-manifest\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"appcache\",\"manifest\"]},\"text/calendar\":{\"source\":\"iana\",\"extensions\":[\"ics\",\"ifb\"]},\"text/calender\":{\"compressible\":true},\"text/cmd\":{\"compressible\":true},\"text/coffeescript\":{\"extensions\":[\"coffee\",\"litcoffee\"]},\"text/cql\":{\"source\":\"iana\"},\"text/cql-expression\":{\"source\":\"iana\"},\"text/cql-identifier\":{\"source\":\"iana\"},\"text/css\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"css\"]},\"text/csv\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csv\"]},\"text/csv-schema\":{\"source\":\"iana\"},\"text/directory\":{\"source\":\"iana\"},\"text/dns\":{\"source\":\"iana\"},\"text/ecmascript\":{\"source\":\"iana\"},\"text/encaprtp\":{\"source\":\"iana\"},\"text/enriched\":{\"source\":\"iana\"},\"text/fhirpath\":{\"source\":\"iana\"},\"text/flexfec\":{\"source\":\"iana\"},\"text/fwdred\":{\"source\":\"iana\"},\"text/gff3\":{\"source\":\"iana\"},\"text/grammar-ref-list\":{\"source\":\"iana\"},\"text/html\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"html\",\"htm\",\"shtml\"]},\"text/jade\":{\"extensions\":[\"jade\"]},\"text/javascript\":{\"source\":\"iana\",\"compressible\":true},\"text/jcr-cnd\":{\"source\":\"iana\"},\"text/jsx\":{\"compressible\":true,\"extensions\":[\"jsx\"]},\"text/less\":{\"compressible\":true,\"extensions\":[\"less\"]},\"text/markdown\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"markdown\",\"md\"]},\"text/mathml\":{\"source\":\"nginx\",\"extensions\":[\"mml\"]},\"text/mdx\":{\"compressible\":true,\"extensions\":[\"mdx\"]},\"text/mizar\":{\"source\":\"iana\"},\"text/n3\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"n3\"]},\"text/parameters\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/parityfec\":{\"source\":\"iana\"},\"text/plain\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"txt\",\"text\",\"conf\",\"def\",\"list\",\"log\",\"in\",\"ini\"]},\"text/provenance-notation\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/prs.fallenstein.rst\":{\"source\":\"iana\"},\"text/prs.lines.tag\":{\"source\":\"iana\",\"extensions\":[\"dsc\"]},\"text/prs.prop.logic\":{\"source\":\"iana\"},\"text/raptorfec\":{\"source\":\"iana\"},\"text/red\":{\"source\":\"iana\"},\"text/rfc822-headers\":{\"source\":\"iana\"},\"text/richtext\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtx\"]},\"text/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"text/rtp-enc-aescm128\":{\"source\":\"iana\"},\"text/rtploopback\":{\"source\":\"iana\"},\"text/rtx\":{\"source\":\"iana\"},\"text/sgml\":{\"source\":\"iana\",\"extensions\":[\"sgml\",\"sgm\"]},\"text/shaclc\":{\"source\":\"iana\"},\"text/shex\":{\"source\":\"iana\",\"extensions\":[\"shex\"]},\"text/slim\":{\"extensions\":[\"slim\",\"slm\"]},\"text/spdx\":{\"source\":\"iana\",\"extensions\":[\"spdx\"]},\"text/strings\":{\"source\":\"iana\"},\"text/stylus\":{\"extensions\":[\"stylus\",\"styl\"]},\"text/t140\":{\"source\":\"iana\"},\"text/tab-separated-values\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tsv\"]},\"text/troff\":{\"source\":\"iana\",\"extensions\":[\"t\",\"tr\",\"roff\",\"man\",\"me\",\"ms\"]},\"text/turtle\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"ttl\"]},\"text/ulpfec\":{\"source\":\"iana\"},\"text/uri-list\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uri\",\"uris\",\"urls\"]},\"text/vcard\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vcard\"]},\"text/vnd.a\":{\"source\":\"iana\"},\"text/vnd.abc\":{\"source\":\"iana\"},\"text/vnd.ascii-art\":{\"source\":\"iana\"},\"text/vnd.curl\":{\"source\":\"iana\",\"extensions\":[\"curl\"]},\"text/vnd.curl.dcurl\":{\"source\":\"apache\",\"extensions\":[\"dcurl\"]},\"text/vnd.curl.mcurl\":{\"source\":\"apache\",\"extensions\":[\"mcurl\"]},\"text/vnd.curl.scurl\":{\"source\":\"apache\",\"extensions\":[\"scurl\"]},\"text/vnd.debian.copyright\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.dmclientscript\":{\"source\":\"iana\"},\"text/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"text/vnd.esmertec.theme-descriptor\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.ficlab.flt\":{\"source\":\"iana\"},\"text/vnd.fly\":{\"source\":\"iana\",\"extensions\":[\"fly\"]},\"text/vnd.fmi.flexstor\":{\"source\":\"iana\",\"extensions\":[\"flx\"]},\"text/vnd.gml\":{\"source\":\"iana\"},\"text/vnd.graphviz\":{\"source\":\"iana\",\"extensions\":[\"gv\"]},\"text/vnd.hans\":{\"source\":\"iana\"},\"text/vnd.hgl\":{\"source\":\"iana\"},\"text/vnd.in3d.3dml\":{\"source\":\"iana\",\"extensions\":[\"3dml\"]},\"text/vnd.in3d.spot\":{\"source\":\"iana\",\"extensions\":[\"spot\"]},\"text/vnd.iptc.newsml\":{\"source\":\"iana\"},\"text/vnd.iptc.nitf\":{\"source\":\"iana\"},\"text/vnd.latex-z\":{\"source\":\"iana\"},\"text/vnd.motorola.reflex\":{\"source\":\"iana\"},\"text/vnd.ms-mediapackage\":{\"source\":\"iana\"},\"text/vnd.net2phone.commcenter.command\":{\"source\":\"iana\"},\"text/vnd.radisys.msml-basic-layout\":{\"source\":\"iana\"},\"text/vnd.senx.warpscript\":{\"source\":\"iana\"},\"text/vnd.si.uricatalogue\":{\"source\":\"iana\"},\"text/vnd.sosi\":{\"source\":\"iana\"},\"text/vnd.sun.j2me.app-descriptor\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"jad\"]},\"text/vnd.trolltech.linguist\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.wap.si\":{\"source\":\"iana\"},\"text/vnd.wap.sl\":{\"source\":\"iana\"},\"text/vnd.wap.wml\":{\"source\":\"iana\",\"extensions\":[\"wml\"]},\"text/vnd.wap.wmlscript\":{\"source\":\"iana\",\"extensions\":[\"wmls\"]},\"text/vtt\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"vtt\"]},\"text/x-asm\":{\"source\":\"apache\",\"extensions\":[\"s\",\"asm\"]},\"text/x-c\":{\"source\":\"apache\",\"extensions\":[\"c\",\"cc\",\"cxx\",\"cpp\",\"h\",\"hh\",\"dic\"]},\"text/x-component\":{\"source\":\"nginx\",\"extensions\":[\"htc\"]},\"text/x-fortran\":{\"source\":\"apache\",\"extensions\":[\"f\",\"for\",\"f77\",\"f90\"]},\"text/x-gwt-rpc\":{\"compressible\":true},\"text/x-handlebars-template\":{\"extensions\":[\"hbs\"]},\"text/x-java-source\":{\"source\":\"apache\",\"extensions\":[\"java\"]},\"text/x-jquery-tmpl\":{\"compressible\":true},\"text/x-lua\":{\"extensions\":[\"lua\"]},\"text/x-markdown\":{\"compressible\":true,\"extensions\":[\"mkd\"]},\"text/x-nfo\":{\"source\":\"apache\",\"extensions\":[\"nfo\"]},\"text/x-opml\":{\"source\":\"apache\",\"extensions\":[\"opml\"]},\"text/x-org\":{\"compressible\":true,\"extensions\":[\"org\"]},\"text/x-pascal\":{\"source\":\"apache\",\"extensions\":[\"p\",\"pas\"]},\"text/x-processing\":{\"compressible\":true,\"extensions\":[\"pde\"]},\"text/x-sass\":{\"extensions\":[\"sass\"]},\"text/x-scss\":{\"extensions\":[\"scss\"]},\"text/x-setext\":{\"source\":\"apache\",\"extensions\":[\"etx\"]},\"text/x-sfv\":{\"source\":\"apache\",\"extensions\":[\"sfv\"]},\"text/x-suse-ymp\":{\"compressible\":true,\"extensions\":[\"ymp\"]},\"text/x-uuencode\":{\"source\":\"apache\",\"extensions\":[\"uu\"]},\"text/x-vcalendar\":{\"source\":\"apache\",\"extensions\":[\"vcs\"]},\"text/x-vcard\":{\"source\":\"apache\",\"extensions\":[\"vcf\"]},\"text/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\"]},\"text/xml-external-parsed-entity\":{\"source\":\"iana\"},\"text/yaml\":{\"compressible\":true,\"extensions\":[\"yaml\",\"yml\"]},\"video/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"video/3gpp\":{\"source\":\"iana\",\"extensions\":[\"3gp\",\"3gpp\"]},\"video/3gpp-tt\":{\"source\":\"iana\"},\"video/3gpp2\":{\"source\":\"iana\",\"extensions\":[\"3g2\"]},\"video/av1\":{\"source\":\"iana\"},\"video/bmpeg\":{\"source\":\"iana\"},\"video/bt656\":{\"source\":\"iana\"},\"video/celb\":{\"source\":\"iana\"},\"video/dv\":{\"source\":\"iana\"},\"video/encaprtp\":{\"source\":\"iana\"},\"video/ffv1\":{\"source\":\"iana\"},\"video/flexfec\":{\"source\":\"iana\"},\"video/h261\":{\"source\":\"iana\",\"extensions\":[\"h261\"]},\"video/h263\":{\"source\":\"iana\",\"extensions\":[\"h263\"]},\"video/h263-1998\":{\"source\":\"iana\"},\"video/h263-2000\":{\"source\":\"iana\"},\"video/h264\":{\"source\":\"iana\",\"extensions\":[\"h264\"]},\"video/h264-rcdo\":{\"source\":\"iana\"},\"video/h264-svc\":{\"source\":\"iana\"},\"video/h265\":{\"source\":\"iana\"},\"video/iso.segment\":{\"source\":\"iana\",\"extensions\":[\"m4s\"]},\"video/jpeg\":{\"source\":\"iana\",\"extensions\":[\"jpgv\"]},\"video/jpeg2000\":{\"source\":\"iana\"},\"video/jpm\":{\"source\":\"apache\",\"extensions\":[\"jpm\",\"jpgm\"]},\"video/jxsv\":{\"source\":\"iana\"},\"video/mj2\":{\"source\":\"iana\",\"extensions\":[\"mj2\",\"mjp2\"]},\"video/mp1s\":{\"source\":\"iana\"},\"video/mp2p\":{\"source\":\"iana\"},\"video/mp2t\":{\"source\":\"iana\",\"extensions\":[\"ts\"]},\"video/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mp4\",\"mp4v\",\"mpg4\"]},\"video/mp4v-es\":{\"source\":\"iana\"},\"video/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpeg\",\"mpg\",\"mpe\",\"m1v\",\"m2v\"]},\"video/mpeg4-generic\":{\"source\":\"iana\"},\"video/mpv\":{\"source\":\"iana\"},\"video/nv\":{\"source\":\"iana\"},\"video/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogv\"]},\"video/parityfec\":{\"source\":\"iana\"},\"video/pointer\":{\"source\":\"iana\"},\"video/quicktime\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"qt\",\"mov\"]},\"video/raptorfec\":{\"source\":\"iana\"},\"video/raw\":{\"source\":\"iana\"},\"video/rtp-enc-aescm128\":{\"source\":\"iana\"},\"video/rtploopback\":{\"source\":\"iana\"},\"video/rtx\":{\"source\":\"iana\"},\"video/scip\":{\"source\":\"iana\"},\"video/smpte291\":{\"source\":\"iana\"},\"video/smpte292m\":{\"source\":\"iana\"},\"video/ulpfec\":{\"source\":\"iana\"},\"video/vc1\":{\"source\":\"iana\"},\"video/vc2\":{\"source\":\"iana\"},\"video/vnd.cctv\":{\"source\":\"iana\"},\"video/vnd.dece.hd\":{\"source\":\"iana\",\"extensions\":[\"uvh\",\"uvvh\"]},\"video/vnd.dece.mobile\":{\"source\":\"iana\",\"extensions\":[\"uvm\",\"uvvm\"]},\"video/vnd.dece.mp4\":{\"source\":\"iana\"},\"video/vnd.dece.pd\":{\"source\":\"iana\",\"extensions\":[\"uvp\",\"uvvp\"]},\"video/vnd.dece.sd\":{\"source\":\"iana\",\"extensions\":[\"uvs\",\"uvvs\"]},\"video/vnd.dece.video\":{\"source\":\"iana\",\"extensions\":[\"uvv\",\"uvvv\"]},\"video/vnd.directv.mpeg\":{\"source\":\"iana\"},\"video/vnd.directv.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dlna.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dvb.file\":{\"source\":\"iana\",\"extensions\":[\"dvb\"]},\"video/vnd.fvt\":{\"source\":\"iana\",\"extensions\":[\"fvt\"]},\"video/vnd.hns.video\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsavc\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsmpeg2\":{\"source\":\"iana\"},\"video/vnd.motorola.video\":{\"source\":\"iana\"},\"video/vnd.motorola.videop\":{\"source\":\"iana\"},\"video/vnd.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"mxu\",\"m4u\"]},\"video/vnd.ms-playready.media.pyv\":{\"source\":\"iana\",\"extensions\":[\"pyv\"]},\"video/vnd.nokia.interleaved-multimedia\":{\"source\":\"iana\"},\"video/vnd.nokia.mp4vr\":{\"source\":\"iana\"},\"video/vnd.nokia.videovoip\":{\"source\":\"iana\"},\"video/vnd.objectvideo\":{\"source\":\"iana\"},\"video/vnd.radgamettools.bink\":{\"source\":\"iana\"},\"video/vnd.radgamettools.smacker\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg1\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg4\":{\"source\":\"iana\"},\"video/vnd.sealed.swf\":{\"source\":\"iana\"},\"video/vnd.sealedmedia.softseal.mov\":{\"source\":\"iana\"},\"video/vnd.uvvu.mp4\":{\"source\":\"iana\",\"extensions\":[\"uvu\",\"uvvu\"]},\"video/vnd.vivo\":{\"source\":\"iana\",\"extensions\":[\"viv\"]},\"video/vnd.youtube.yt\":{\"source\":\"iana\"},\"video/vp8\":{\"source\":\"iana\"},\"video/vp9\":{\"source\":\"iana\"},\"video/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"webm\"]},\"video/x-f4v\":{\"source\":\"apache\",\"extensions\":[\"f4v\"]},\"video/x-fli\":{\"source\":\"apache\",\"extensions\":[\"fli\"]},\"video/x-flv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"flv\"]},\"video/x-m4v\":{\"source\":\"apache\",\"extensions\":[\"m4v\"]},\"video/x-matroska\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"mkv\",\"mk3d\",\"mks\"]},\"video/x-mng\":{\"source\":\"apache\",\"extensions\":[\"mng\"]},\"video/x-ms-asf\":{\"source\":\"apache\",\"extensions\":[\"asf\",\"asx\"]},\"video/x-ms-vob\":{\"source\":\"apache\",\"extensions\":[\"vob\"]},\"video/x-ms-wm\":{\"source\":\"apache\",\"extensions\":[\"wm\"]},\"video/x-ms-wmv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"wmv\"]},\"video/x-ms-wmx\":{\"source\":\"apache\",\"extensions\":[\"wmx\"]},\"video/x-ms-wvx\":{\"source\":\"apache\",\"extensions\":[\"wvx\"]},\"video/x-msvideo\":{\"source\":\"apache\",\"extensions\":[\"avi\"]},\"video/x-sgi-movie\":{\"source\":\"apache\",\"extensions\":[\"movie\"]},\"video/x-smv\":{\"source\":\"apache\",\"extensions\":[\"smv\"]},\"x-conference/x-cooltalk\":{\"source\":\"apache\",\"extensions\":[\"ice\"]},\"x-shader/x-fragment\":{\"compressible\":true},\"x-shader/x-vertex\":{\"compressible\":true}}"); -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http__WEBPACK_IMPORTED_MODULE_1__.STATUS_CODES; +/***/ }), +/* 838 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +"use strict"; - Body.call(this, body, opts); - const status = opts.status || 200; - const headers = new Headers(opts.headers); +var lodash = __webpack_require__(823); +var isPromise = __webpack_require__(839); - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } +module.exports = function (adapter) { + if (typeof adapter !== 'object') { + throw new Error('An adapter must be provided, see https://github.com/typicode/lowdb/#usage'); + } - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } + // Create a fresh copy of lodash + var _ = lodash.runInContext(); + var db = _.chain({}); - get url() { - return this[INTERNALS$1].url || ''; - } + // Add write function to lodash + // Calls save before returning result + _.prototype.write = _.wrap(_.prototype.value, function (func) { + var funcRes = func.apply(this); + return db.write(funcRes); + }); - get status() { - return this[INTERNALS$1].status; - } + function plant(state) { + db.__wrapped__ = state; + return db; + } - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } + // Lowdb API + // Expose _ for mixins + db._ = _; - get redirected() { - return this[INTERNALS$1].counter > 0; - } + db.read = function () { + var r = adapter.read(); + return isPromise(r) ? r.then(plant) : plant(r); + }; - get statusText() { - return this[INTERNALS$1].statusText; - } + db.write = function (returnValue) { + var w = adapter.write(db.getState()); + return isPromise(w) ? w.then(function () { + return returnValue; + }) : returnValue; + }; - get headers() { - return this[INTERNALS$1].headers; - } + db.getState = function () { + return db.__wrapped__; + }; - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} - -Body.mixIn(Response.prototype); - -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); - -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); + db.setState = function (state) { + return plant(state); + }; -const INTERNALS$2 = Symbol('Request internals'); + return db.read(); +}; -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = url__WEBPACK_IMPORTED_MODULE_2__.parse; -const format_url = url__WEBPACK_IMPORTED_MODULE_2__.format; +/***/ }), +/* 839 */ +/***/ (function(module, exports) { -const streamDestructionSupported = 'destroy' in stream__WEBPACK_IMPORTED_MODULE_0__.Readable.prototype; +module.exports = isPromise; +module.exports.default = isPromise; -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; +function isPromise(obj) { + return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; } -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; +/***/ }), +/* 840 */ +/***/ (function(module, exports) { - let parsedURL; +// UUID +// https://gist.github.com/LeverOne/1308368 +/* jshint ignore:start */ +function uuid (a, b) { for (b = a = ''; a++ < 36; b += a * 51 & 52 ? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-');return b } +/* jshint ignore:end */ + +module.exports = { + // Empties properties + __empty: function (doc) { + this.forEach(doc, function (value, key) { + delete doc[key] + }) + }, + + // Copies properties from an object to another + __update: function (dest, src) { + this.forEach(src, function (value, key) { + dest[key] = value + }) + }, + + // Removes an item from an array + __remove: function (array, item) { + var index = this.indexOf(array, item) + if (index !== -1) array.splice(index, 1) + }, + + __id: function () { + var id = this.id || 'id' + return id + }, + + getById: function (collection, id) { + var self = this + return this.find(collection, function (doc) { + if (self.has(doc, self.__id())) { + return doc[self.__id()].toString() === id.toString() + } + }) + }, + + createId: function (collection, doc) { + return uuid() + }, + + insert: function (collection, doc) { + doc[this.__id()] = doc[this.__id()] || this.createId(collection, doc) + var d = this.getById(collection, doc[this.__id()]) + if (d) throw new Error('Insert failed, duplicate id') + collection.push(doc) + return doc + }, + + upsert: function (collection, doc) { + if (doc[this.__id()]) { + // id is set + var d = this.getById(collection, doc[this.__id()]) + if (d) { + // replace properties of existing object + this.__empty(d) + this.assign(d, doc) + } else { + // push new object + collection.push(doc) + } + } else { + // create id and push new object + doc[this.__id()] = this.createId(collection, doc) + collection.push(doc) + } + + return doc + }, + + updateById: function (collection, id, attrs) { + var doc = this.getById(collection, id) + + if (doc) { + this.assign(doc, attrs, {id: doc.id}) + } + + return doc + }, + + updateWhere: function (collection, predicate, attrs) { + var self = this + var docs = this.filter(collection, predicate) + + docs.forEach(function (doc) { + self.assign(doc, attrs, {id: doc.id}) + }) + + return docs + }, + + replaceById: function (collection, id, attrs) { + var doc = this.getById(collection, id) + + if (doc) { + var docId = doc.id + this.__empty(doc) + this.assign(doc, attrs, {id: docId}) + } + + return doc + }, + + removeById: function (collection, id) { + var doc = this.getById(collection, id) + + this.__remove(collection, doc) + + return doc + }, + + removeWhere: function (collection, predicate) { + var self = this + var docs = this.filter(collection, predicate) + + docs.forEach(function (doc) { + self.__remove(collection, doc) + }) + + return docs + } +} - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parse_url(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parse_url(`${input}`); - } - input = {}; - } else { - parsedURL = parse_url(input.url); - } - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); +/***/ }), +/* 841 */ +/***/ (function(module, exports, __webpack_require__) { - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } +"use strict"; - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - const headers = new Headers(init.headers || input.headers || {}); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } +var fs = __webpack_require__(842); +var Base = __webpack_require__(847); - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; +var readFile = fs.readFileSync; +var writeFile = fs.writeFileSync; - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } +// Same code as in FileAsync, minus `await` - get method() { - return this[INTERNALS$2].method; - } +var FileSync = function (_Base) { + _inherits(FileSync, _Base); - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } + function FileSync() { + _classCallCheck(this, FileSync); - get headers() { - return this[INTERNALS$2].headers; - } + return _possibleConstructorReturn(this, (FileSync.__proto__ || Object.getPrototypeOf(FileSync)).apply(this, arguments)); + } - get redirect() { - return this[INTERNALS$2].redirect; - } + _createClass(FileSync, [{ + key: 'read', + value: function read() { + // fs.exists is deprecated but not fs.existsSync + if (fs.existsSync(this.source)) { + // Read database + try { + var data = readFile(this.source, 'utf-8').trim(); + // Handle blank file + return data ? this.deserialize(data) : this.defaultValue; + } catch (e) { + if (e instanceof SyntaxError) { + e.message = `Malformed JSON in file: ${this.source}\n${e.message}`; + } + throw e; + } + } else { + // Initialize + writeFile(this.source, this.serialize(this.defaultValue)); + return this.defaultValue; + } + } + }, { + key: 'write', + value: function write(data) { + return writeFile(this.source, this.serialize(data)); + } + }]); - get signal() { - return this[INTERNALS$2].signal; - } + return FileSync; +}(Base); - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} +module.exports = FileSync; -Body.mixIn(Request.prototype); +/***/ }), +/* 842 */ +/***/ (function(module, exports, __webpack_require__) { -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); +var fs = __webpack_require__(167) +var polyfills = __webpack_require__(843) +var legacy = __webpack_require__(845) +var clone = __webpack_require__(846) -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); +var util = __webpack_require__(9) -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); +/* istanbul ignore next - node 0.x polyfill */ +var gracefulQueue +var previousSymbol - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } +/* istanbul ignore else - node 0.x polyfill */ +if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { + gracefulQueue = Symbol.for('graceful-fs.queue') + // This is used in testing by future versions + previousSymbol = Symbol.for('graceful-fs.previous') +} else { + gracefulQueue = '___graceful-fs.queue' + previousSymbol = '___graceful-fs.previous' +} - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } +function noop () {} - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } +function publishQueue(context, queue) { + Object.defineProperty(context, gracefulQueue, { + get: function() { + return queue + } + }) +} - if (request.signal && request.body instanceof stream__WEBPACK_IMPORTED_MODULE_0__.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } +var debug = noop +if (util.debuglog) + debug = util.debuglog('gfs4') +else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) + debug = function() { + var m = util.format.apply(util, arguments) + m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') + console.error(m) + } - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } +// Once time initialization +if (!fs[gracefulQueue]) { + // This queue can be shared by multiple loaded instances + var queue = global[gracefulQueue] || [] + publishQueue(fs, queue) - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } + // Patch fs.close/closeSync to shared queue version, because we need + // to retry() whenever a close happens *anywhere* in the program. + // This is essential when multiple graceful-fs instances are + // in play at the same time. + fs.close = (function (fs$close) { + function close (fd, cb) { + return fs$close.call(fs, fd, function (err) { + // This function uses the graceful-fs shared queue + if (!err) { + retry() + } - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } + if (typeof cb === 'function') + cb.apply(this, arguments) + }) + } - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } + Object.defineProperty(close, previousSymbol, { + value: fs$close + }) + return close + })(fs.close) - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } + fs.closeSync = (function (fs$closeSync) { + function closeSync (fd) { + // This function uses the graceful-fs shared queue + fs$closeSync.apply(fs, arguments) + retry() + } - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js + Object.defineProperty(closeSync, previousSymbol, { + value: fs$closeSync + }) + return closeSync + })(fs.closeSync) - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); + if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { + process.on('exit', function() { + debug(fs[gracefulQueue]) + __webpack_require__(109).equal(fs[gracefulQueue].length, 0) + }) + } } -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ - -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); - - this.type = 'aborted'; - this.message = message; - - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); +if (!global[gracefulQueue]) { + publishQueue(global, fs[gracefulQueue]); } -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; - -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = stream__WEBPACK_IMPORTED_MODULE_0__.PassThrough; -const resolve_url = url__WEBPACK_IMPORTED_MODULE_2__.resolve; - -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } +module.exports = patch(clone(fs)) +if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { + module.exports = patch(fs) + fs.__patched = true; +} - Body.Promise = fetch.Promise; +function patch (fs) { + // Everything that references the open() function needs to be in here + polyfills(fs) + fs.gracefulify = patch - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); + fs.createReadStream = createReadStream + fs.createWriteStream = createWriteStream + var fs$readFile = fs.readFile + fs.readFile = readFile + function readFile (path, options, cb) { + if (typeof options === 'function') + cb = options, options = null - const send = (options.protocol === 'https:' ? https__WEBPACK_IMPORTED_MODULE_3__ : http__WEBPACK_IMPORTED_MODULE_1__).request; - const signal = request.signal; + return go$readFile(path, options, cb) - let response = null; + function go$readFile (path, options, cb) { + return fs$readFile(path, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readFile, [path, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof stream__WEBPACK_IMPORTED_MODULE_0__.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; + var fs$writeFile = fs.writeFile + fs.writeFile = writeFile + function writeFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null - if (signal && signal.aborted) { - abort(); - return; - } + return go$writeFile(path, data, options, cb) - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; + function go$writeFile (path, data, options, cb) { + return fs$writeFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$writeFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } - // send request - const req = send(options); - let reqTimeout; + var fs$appendFile = fs.appendFile + if (fs$appendFile) + fs.appendFile = appendFile + function appendFile (path, data, options, cb) { + if (typeof options === 'function') + cb = options, options = null - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } + return go$appendFile(path, data, options, cb) - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } + function go$appendFile (path, data, options, cb) { + return fs$appendFile(path, data, options, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$appendFile, [path, data, options, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } + var fs$copyFile = fs.copyFile + if (fs$copyFile) + fs.copyFile = copyFile + function copyFile (src, dest, flags, cb) { + if (typeof flags === 'function') { + cb = flags + flags = 0 + } + return fs$copyFile(src, dest, flags, function (err) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([fs$copyFile, [src, dest, flags, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); + var fs$readdir = fs.readdir + fs.readdir = readdir + function readdir (path, options, cb) { + var args = [path] + if (typeof options !== 'function') { + args.push(options) + } else { + cb = options + } + args.push(go$readdir$cb) - req.on('response', function (res) { - clearTimeout(reqTimeout); + return go$readdir(args) - const headers = createHeadersLenient(res.headers); + function go$readdir$cb (err, files) { + if (files && files.sort) + files.sort() - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$readdir, [args]]) - // HTTP fetch step 5.3 - const locationURL = location === null ? null : resolve_url(request.url, location); + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + } + } - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } + function go$readdir (args) { + return fs$readdir.apply(fs, args) + } - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } + if (process.version.substr(0, 4) === 'v0.8') { + var legStreams = legacy(fs) + ReadStream = legStreams.ReadStream + WriteStream = legStreams.WriteStream + } - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; + var fs$ReadStream = fs.ReadStream + if (fs$ReadStream) { + ReadStream.prototype = Object.create(fs$ReadStream.prototype) + ReadStream.prototype.open = ReadStream$open + } - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } + var fs$WriteStream = fs.WriteStream + if (fs$WriteStream) { + WriteStream.prototype = Object.create(fs$WriteStream.prototype) + WriteStream.prototype.open = WriteStream$open + } - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } + Object.defineProperty(fs, 'ReadStream', { + get: function () { + return ReadStream + }, + set: function (val) { + ReadStream = val + }, + enumerable: true, + configurable: true + }) + Object.defineProperty(fs, 'WriteStream', { + get: function () { + return WriteStream + }, + set: function (val) { + WriteStream = val + }, + enumerable: true, + configurable: true + }) - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } + // legacy names + var FileReadStream = ReadStream + Object.defineProperty(fs, 'FileReadStream', { + get: function () { + return FileReadStream + }, + set: function (val) { + FileReadStream = val + }, + enumerable: true, + configurable: true + }) + var FileWriteStream = WriteStream + Object.defineProperty(fs, 'FileWriteStream', { + get: function () { + return FileWriteStream + }, + set: function (val) { + FileWriteStream = val + }, + enumerable: true, + configurable: true + }) - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); + function ReadStream (path, options) { + if (this instanceof ReadStream) + return fs$ReadStream.apply(this, arguments), this + else + return ReadStream.apply(Object.create(ReadStream.prototype), arguments) + } - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; + function ReadStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + if (that.autoClose) + that.destroy() - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + that.read() + } + }) + } - // HTTP-network fetch step 12.1.1.4: handle content codings + function WriteStream (path, options) { + if (this instanceof WriteStream) + return fs$WriteStream.apply(this, arguments), this + else + return WriteStream.apply(Object.create(WriteStream.prototype), arguments) + } - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } + function WriteStream$open () { + var that = this + open(that.path, that.flags, that.mode, function (err, fd) { + if (err) { + that.destroy() + that.emit('error', err) + } else { + that.fd = fd + that.emit('open', fd) + } + }) + } - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib__WEBPACK_IMPORTED_MODULE_4__.Z_SYNC_FLUSH, - finishFlush: zlib__WEBPACK_IMPORTED_MODULE_4__.Z_SYNC_FLUSH - }; + function createReadStream (path, options) { + return new fs.ReadStream(path, options) + } - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } + function createWriteStream (path, options) { + return new fs.WriteStream(path, options) + } - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createInflate()); - } else { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } + var fs$open = fs.open + fs.open = open + function open (path, flags, mode, cb) { + if (typeof mode === 'function') + cb = mode, mode = null - // for br - if (codings == 'br' && typeof zlib__WEBPACK_IMPORTED_MODULE_4__.createBrotliDecompress === 'function') { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_4__.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } + return go$open(path, flags, mode, cb) - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); + function go$open (path, flags, mode, cb) { + return fs$open(path, flags, mode, function (err, fd) { + if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) + enqueue([go$open, [path, flags, mode, cb]]) + else { + if (typeof cb === 'function') + cb.apply(this, arguments) + retry() + } + }) + } + } - writeToStream(req, request); - }); + return fs } -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; -// expose Promise -fetch.Promise = global.Promise; - -/* harmony default export */ __webpack_exports__["default"] = (fetch); +function enqueue (elem) { + debug('ENQUEUE', elem[0].name, elem[1]) + fs[gracefulQueue].push(elem) +} +function retry () { + var elem = fs[gracefulQueue].shift() + if (elem) { + debug('RETRY', elem[0].name, elem[1]) + elem[0].apply(null, elem[1]) + } +} /***/ }), -/* 836 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { -/* global __WEBPACK_PROVIDED_MANIFEST__ */ +var constants = __webpack_require__(844) -/** - * Manifest is provided differently in developement that in production. - * - * - In production, the manifest has been "merged" via Webpack via the - * DefinePlugin - * - * - In development/test, we simply read the manifest from the fs - */ -const fs = __webpack_require__(167); +var origCwd = process.cwd +var cwd = null -const path = __webpack_require__(160); +var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform -let manifest = typeof {"version":"1.0.4","name":"EGL","type":"konnector","language":"node","icon":"icon.png","slug":"eglgrandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git","editor":"Métropole de Lyon","vendor_link":"www.grandlyon.com","frequency":"daily","categories":["energy"],"fields":{"login":{"type":"text"},"password":{"type":"password"},"advancedFields":{"folderPath":{"advanced":true,"isRequired":false}}},"data_types":[],"screenshots":[],"permissions":{"egl data":{"type":"com.grandlyon.egl.*"},"accounts":{"type":"io.cozy.accounts","verbs":["GET"]}},"developer":{"name":"Métropole de Lyon","url":"https://grandlyon.com"},"langs":["fr"],"locales":{"fr":{"short_description":"Courbe de charge depuis l'API eau du Grand Lyon","long_description":"Ce connecteur récupère la courbe de charge enregistrée par le compteur Téléo","permissions":{"egl data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Téléo et exposées par les API Eau du Grand Lyon (consommations d’eau au jour, mois et année)."},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Water consumption data fetched from \"Eau du Grand Lyon\" API","long_description":"This konnector fetches the data curve gathered by Téléo device.","permissions":{"egl data":{"description":"Required to access and store the data collected by the Téléo meter and exposed by Eau du Grand Lyon APIs (daily, monthly and yearly consumption)."},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2"} === 'undefined' ? {} : {"version":"1.0.4","name":"EGL","type":"konnector","language":"node","icon":"icon.png","slug":"eglgrandlyon","source":"https://forge.grandlyon.com/web-et-numerique/llle_project/egl-konnector.git","editor":"Métropole de Lyon","vendor_link":"www.grandlyon.com","frequency":"daily","categories":["energy"],"fields":{"login":{"type":"text"},"password":{"type":"password"},"advancedFields":{"folderPath":{"advanced":true,"isRequired":false}}},"data_types":[],"screenshots":[],"permissions":{"egl data":{"type":"com.grandlyon.egl.*"},"accounts":{"type":"io.cozy.accounts","verbs":["GET"]}},"developer":{"name":"Métropole de Lyon","url":"https://grandlyon.com"},"langs":["fr"],"locales":{"fr":{"short_description":"Courbe de charge depuis l'API eau du Grand Lyon","long_description":"Ce connecteur récupère la courbe de charge enregistrée par le compteur Téléo","permissions":{"egl data":{"description":"Requises pour accéder et stocker les données collectées par le compteur Téléo et exposées par les API Eau du Grand Lyon (consommations d’eau au jour, mois et année)."},"accounts":{"description":"Utilisé pour accéder à vos données de consommation."}}},"en":{"short_description":"Water consumption data fetched from \"Eau du Grand Lyon\" API","long_description":"This konnector fetches the data curve gathered by Téléo device.","permissions":{"egl data":{"description":"Required to access and store the data collected by the Téléo meter and exposed by Eau du Grand Lyon APIs (daily, monthly and yearly consumption)."},"accounts":{"description":"Used to access your consumption data."}}}},"manifest_version":"2"}; +process.cwd = function() { + if (!cwd) + cwd = origCwd.call(process) + return cwd +} +try { + process.cwd() +} catch (er) {} -if ("none" !== undefined && "none" !== 'none' && "none" !== 'production') { - try { - manifest = getManifestFromFile(); - } catch (err) { - manifest = {}; +// This check is needed until node.js 12 is required +if (typeof process.chdir === 'function') { + var chdir = process.chdir + process.chdir = function (d) { + cwd = null + chdir.call(process, d) } + if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) } -function getManifestFromFile() { - return JSON.parse(fs.readFileSync(path.join(process.cwd(), 'manifest.konnector'))); -} +module.exports = patch -function setManifest(data) { - manifest = data; -} +function patch (fs) { + // (re-)implement some things that are known busted or missing. -function getCozyMetadata(data = {}) { - const now = new Date(Date.now()); - const defaultData = { - doctypeVersion: 1, - metadataVersion: 1, - createdAt: now, - createdByApp: manifest.slug, - createdByAppVersion: manifest.version, - updatedAt: now, - updatedByApps: [{ - slug: manifest.slug, - date: now, - version: manifest.version - }] - }; - - if (data.updatedByApps) { - const index = data.updatedByApps.findIndex(app => app.slug === manifest.slug); + // lchmod, broken prior to 0.6.2 + // back-port the fix here. + if (constants.hasOwnProperty('O_SYMLINK') && + process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { + patchLchmod(fs) + } - if (index !== -1) { - data.updatedByApps[index] = defaultData.updatedByApps.pop(); - } + // lutimes implementation, or no-op + if (!fs.lutimes) { + patchLutimes(fs) } - return { ...defaultData, - ...data - }; -} + // https://github.com/isaacs/node-graceful-fs/issues/4 + // Chown should not fail on einval or eperm if non-root. + // It should not fail on enosys ever, as this just indicates + // that a fs doesn't support the intended operation. -module.exports = { - data: manifest, - getCozyMetadata, - setManifest -}; + fs.chown = chownFix(fs.chown) + fs.fchown = chownFix(fs.fchown) + fs.lchown = chownFix(fs.lchown) -/***/ }), -/* 837 */ -/***/ (function(module, exports, __webpack_require__) { + fs.chmod = chmodFix(fs.chmod) + fs.fchmod = chmodFix(fs.fchmod) + fs.lchmod = chmodFix(fs.lchmod) -const fs = __webpack_require__(167); + fs.chownSync = chownFixSync(fs.chownSync) + fs.fchownSync = chownFixSync(fs.fchownSync) + fs.lchownSync = chownFixSync(fs.lchownSync) -const path = __webpack_require__(160); + fs.chmodSync = chmodFixSync(fs.chmodSync) + fs.fchmodSync = chmodFixSync(fs.fchmodSync) + fs.lchmodSync = chmodFixSync(fs.lchmodSync) -const log = __webpack_require__(2).namespace('cozy-client-js-stub'); + fs.stat = statFix(fs.stat) + fs.fstat = statFix(fs.fstat) + fs.lstat = statFix(fs.lstat) -const mimetypes = __webpack_require__(838); + fs.statSync = statFixSync(fs.statSync) + fs.fstatSync = statFixSync(fs.fstatSync) + fs.lstatSync = statFixSync(fs.lstatSync) -const low = __webpack_require__(841); + // if lchmod/lchown do not exist, then make them no-ops + if (!fs.lchmod) { + fs.lchmod = function (path, mode, cb) { + if (cb) process.nextTick(cb) + } + fs.lchmodSync = function () {} + } + if (!fs.lchown) { + fs.lchown = function (path, uid, gid, cb) { + if (cb) process.nextTick(cb) + } + fs.lchownSync = function () {} + } -const lodashId = __webpack_require__(843); + // on Windows, A/V software can lock the directory, causing this + // to fail with an EACCES or EPERM if the directory contains newly + // created files. Try again on failure, for up to 60 seconds. -const get = __webpack_require__(370); + // Set the timeout this long because some Windows Anti-Virus, such as Parity + // bit9, may lock files for up to a minute, causing npm package install + // failures. Also, take care to yield the scheduler. Windows scheduling gives + // CPU to a busy looping process, which can cause the program causing the lock + // contention to be starved of CPU by node, so the contention doesn't resolve. + if (platform === "win32") { + fs.rename = (function (fs$rename) { return function (from, to, cb) { + var start = Date.now() + var backoff = 0; + fs$rename(from, to, function CB (er) { + if (er + && (er.code === "EACCES" || er.code === "EPERM") + && Date.now() - start < 60000) { + setTimeout(function() { + fs.stat(to, function (stater, st) { + if (stater && stater.code === "ENOENT") + fs$rename(from, to, CB); + else + cb(er) + }) + }, backoff) + if (backoff < 100) + backoff += 10; + return; + } + if (cb) cb(er) + }) + }})(fs.rename) + } -const FileSync = __webpack_require__(844); + // if read() returns EAGAIN, then just try it again. + fs.read = (function (fs$read) { + function read (fd, buffer, offset, length, position, callback_) { + var callback + if (callback_ && typeof callback_ === 'function') { + var eagCounter = 0 + callback = function (er, _, __) { + if (er && er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } + callback_.apply(this, arguments) + } + } + return fs$read.call(fs, fd, buffer, offset, length, position, callback) + } -const rawBody = __webpack_require__(852); + // This ensures `util.promisify` works as it does for native `fs.read`. + if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) + return read + })(fs.read) -const stripJsonComments = __webpack_require__(888); + fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { + var eagCounter = 0 + while (true) { + try { + return fs$readSync.call(fs, fd, buffer, offset, length, position) + } catch (er) { + if (er.code === 'EAGAIN' && eagCounter < 10) { + eagCounter ++ + continue + } + throw er + } + } + }})(fs.readSync) -const manifest = __webpack_require__(836); + function patchLchmod (fs) { + fs.lchmod = function (path, mode, callback) { + fs.open( path + , constants.O_WRONLY | constants.O_SYMLINK + , mode + , function (err, fd) { + if (err) { + if (callback) callback(err) + return + } + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + fs.fchmod(fd, mode, function (err) { + fs.close(fd, function(err2) { + if (callback) callback(err || err2) + }) + }) + }) + } -const sleep = __webpack_require__(9).promisify(global.setTimeout); + fs.lchmodSync = function (path, mode) { + var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) -const rootPath = JSON.parse(process.env.COZY_FIELDS || '{"folder_to_save": "."}').folder_to_save; -let db = setUpDb(); + // prefer to return the chmod error, if one occurs, + // but still try to close, and report closing errors if they occur. + var threw = true + var ret + try { + ret = fs.fchmodSync(fd, mode) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } + } -function setDefaults(doctype) { - const defaults = { - 'io.cozy.files': [] - }; - if (doctype) defaults[doctype] = []; - db.defaults(defaults).write(); -} + function patchLutimes (fs) { + if (constants.hasOwnProperty("O_SYMLINK")) { + fs.lutimes = function (path, at, mt, cb) { + fs.open(path, constants.O_SYMLINK, function (er, fd) { + if (er) { + if (cb) cb(er) + return + } + fs.futimes(fd, at, mt, function (er) { + fs.close(fd, function (er2) { + if (cb) cb(er || er2) + }) + }) + }) + } -module.exports = { - _setDb(newDb) { - db = newDb; - }, + fs.lutimesSync = function (path, at, mt) { + var fd = fs.openSync(path, constants.O_SYMLINK) + var ret + var threw = true + try { + ret = fs.futimesSync(fd, at, mt) + threw = false + } finally { + if (threw) { + try { + fs.closeSync(fd) + } catch (er) {} + } else { + fs.closeSync(fd) + } + } + return ret + } - fetchJSON() { - return Promise.resolve({ - rows: [] - }); - }, + } else { + fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } + fs.lutimesSync = function () {} + } + } - data: { - create(doctype, item) { - setDefaults(doctype); - const doc = db.get(doctype).insert(item).write(); - return Promise.resolve(doc); - }, + function chmodFix (orig) { + if (!orig) return orig + return function (target, mode, cb) { + return orig.call(fs, target, mode, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } - update(doctype, doc, changes) { - setDefaults(doctype); - db.get(doctype).updateById(doc._id, changes).write(); - return Promise.resolve(doc); - }, + function chmodFixSync (orig) { + if (!orig) return orig + return function (target, mode) { + try { + return orig.call(fs, target, mode) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } - updateAttributes(doctype, id, attrs) { - setDefaults(doctype); - const doc = db.get(doctype).updateById(id, attrs).write(); - return Promise.resolve(doc); - }, - defineIndex(doctype) { - return Promise.resolve({ - doctype - }); - }, + function chownFix (orig) { + if (!orig) return orig + return function (target, uid, gid, cb) { + return orig.call(fs, target, uid, gid, function (er) { + if (chownErOk(er)) er = null + if (cb) cb.apply(this, arguments) + }) + } + } - query(index, options) { - // this stub only supposes that there are keys defined in options.selectors - // this is only needed by the hydrateAndFilter function - // supporting all mango selectors is not planned here - const { - doctype - } = index; - setDefaults(doctype); - const { - selector - } = options; - let result = db.get(doctype).filter(selector).value(); + function chownFixSync (orig) { + if (!orig) return orig + return function (target, uid, gid) { + try { + return orig.call(fs, target, uid, gid) + } catch (er) { + if (!chownErOk(er)) throw er + } + } + } - if (options.wholeResponse) { - result = { - docs: result - }; + function statFix (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options, cb) { + if (typeof options === 'function') { + cb = options + options = null } + function callback (er, stats) { + if (stats) { + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + } + if (cb) cb.apply(this, arguments) + } + return options ? orig.call(fs, target, options, callback) + : orig.call(fs, target, callback) + } + } - return Promise.resolve(result); - }, + function statFixSync (orig) { + if (!orig) return orig + // Older versions of Node erroneously returned signed integers for + // uid + gid. + return function (target, options) { + var stats = options ? orig.call(fs, target, options) + : orig.call(fs, target) + if (stats.uid < 0) stats.uid += 0x100000000 + if (stats.gid < 0) stats.gid += 0x100000000 + return stats; + } + } - findAll(doctype) { - setDefaults(doctype); - return Promise.resolve(db.get(doctype).value()); - }, + // ENOSYS means that the fs doesn't support the op. Just ignore + // that, because it doesn't matter. + // + // if there's no getuid, or if getuid() is something other + // than 0, and the error is EINVAL or EPERM, then just ignore + // it. + // + // This specific case is a silent failure in cp, install, tar, + // and most other unix tools that manage permissions. + // + // When running as root, or if other types of errors are + // encountered, then it's strict. + function chownErOk (er) { + if (!er) + return true - delete(doctype, doc) { - setDefaults(doctype); - const result = db.get(doctype).removeById(doc._id).write(); - return Promise.resolve(result); - }, + if (er.code === "ENOSYS") + return true - find(doctype, id) { - setDefaults(doctype); - let result = db.get(doctype).getById(id).value(); - const accountExists = Boolean(result); + var nonroot = !process.getuid || process.getuid() !== 0 + if (nonroot) { + if (er.code === "EINVAL" || er.code === "EPERM") + return true + } - if (doctype === 'io.cozy.accounts') { - const configPath = path.resolve('konnector-dev-config.json'); - const config = JSON.parse(stripJsonComments(fs.readFileSync(configPath, 'utf8'))); - result = { - _id: id, - ...result, - auth: config.fields - }; + return false + } +} - if (!accountExists) { - this.create(doctype, result); - } else { - this.update(doctype, result, result); - } - } - return Promise.resolve(result); - }, +/***/ }), +/* 844 */ +/***/ (function(module, exports) { - listReferencedFiles() { - return Promise.resolve([]); - }, +module.exports = require("constants"); - addReferencedFiles() { - return Promise.resolve({}); - } +/***/ }), +/* 845 */ +/***/ (function(module, exports, __webpack_require__) { - }, - files: { - statByPath(pathToCheck) { - setDefaults(); // check this path in . +var Stream = __webpack_require__(100).Stream - return new Promise((resolve, reject) => { - log('debug', `Checking if ${pathToCheck} exists`); - if (pathToCheck === '/') return resolve({ - _id: '.' - }); - const realpath = path.join(rootPath, pathToCheck); - log('debug', `Real path : ${realpath}`); +module.exports = legacy - if (fs.existsSync(realpath)) { - const extension = path.extname(pathToCheck).substr(1); - const doc = db.get('io.cozy.files').getById(pathToCheck.split('/').pop()).value(); +function legacy (fs) { + return { + ReadStream: ReadStream, + WriteStream: WriteStream + } - if (!doc) { - resolve({ - _id: removeFirstSlash(pathToCheck), - attributes: { - mime: mimetypes.lookup(extension), - name: pathToCheck, - size: fs.statSync(realpath).size - } - }); - } else { - resolve(doc); - } - } else { - const err = new Error(`${pathToCheck} does not exist`); - err.status = 404; - reject(err); - } - }); - }, + function ReadStream (path, options) { + if (!(this instanceof ReadStream)) return new ReadStream(path, options); - statById(id) { - setDefaults(); - const doc = db.get('io.cozy.files').getById(id).value(); + Stream.call(this); - if (doc) { - return doc; - } else { - return Promise.resolve({ - attributes: { - path: '/' - } - }); - } - }, + var self = this; - async updateById(id, file, options) { - setDefaults(); - await removeFile(id); - return createFile(file, options); - }, + this.path = path; + this.fd = null; + this.readable = true; + this.paused = false; - async updateAttributesById(id, attrs) { - setDefaults(); - const doc = db.get('io.cozy.files').getById(id).value(); + this.flags = 'r'; + this.mode = 438; /*=0666*/ + this.bufferSize = 64 * 1024; - if (doc) { - if (attrs.name && attrs.name !== get(doc, 'attributes.name')) { - await renameFile(id, attrs.name); - } + options = options || {}; - doc.attributes = { ...doc.attributes, - ...attrs - }; - db.get('io.cozy.files').updateById(id, doc).write(); - } - }, + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; + } - create(file, options) { - setDefaults(); - return createFile(file, options); - }, + if (this.encoding) this.setEncoding(this.encoding); - createDirectory(options) { - setDefaults(); - return new Promise(resolve => { - log('debug', `Creating new directory ${options.name}`); - const finalPath = path.join(rootPath, options.dirID, options.name); - const returnPath = path.join(options.dirID, options.name); - log('debug', `Real path : ${finalPath}`); + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.end === undefined) { + this.end = Infinity; + } else if ('number' !== typeof this.end) { + throw TypeError('end must be a Number'); + } - try { - fs.mkdirSync(finalPath); - } catch (err) {// directory already exists - } + if (this.start > this.end) { + throw new Error('start must be <= end'); + } - resolve({ - _id: returnPath, - path: returnPath - }); + this.pos = this.start; + } + + if (this.fd !== null) { + process.nextTick(function() { + self._read(); }); - }, + return; + } - downloadByPath(filePath) { - setDefaults(); - return this.downloadById(filePath); - }, + fs.open(this.path, this.flags, this.mode, function (err, fd) { + if (err) { + self.emit('error', err); + self.readable = false; + return; + } - downloadById(fileId) { - setDefaults(); - const fileInDb = db.get('io.cozy.files').getById(fileId).value(); - let fileName; + self.fd = fd; + self.emit('open', fd); + self._read(); + }) + } - if (fileInDb) { - fileName = fileInDb.attributes.name; - } else throw new Error('could not find the file'); + function WriteStream (path, options) { + if (!(this instanceof WriteStream)) return new WriteStream(path, options); - const realpath = path.join(rootPath, fileName); - const stream = fs.createReadStream(realpath); - return { - body: stream, - buffer: () => rawBody(stream) - }; - }, + Stream.call(this); - trashById(fileId) { - setDefaults(); - return removeFile(fileId); - }, + this.path = path; + this.fd = null; + this.writable = true; - destroyById() { - setDefaults(); // there is no trash with the stub + this.flags = 'w'; + this.encoding = 'binary'; + this.mode = 438; /*=0666*/ + this.bytesWritten = 0; - return Promise.resolve(); + options = options || {}; + + // Mixin options into this + var keys = Object.keys(options); + for (var index = 0, length = keys.length; index < length; index++) { + var key = keys[index]; + this[key] = options[key]; } - } -}; + if (this.start !== undefined) { + if ('number' !== typeof this.start) { + throw TypeError('start must be a Number'); + } + if (this.start < 0) { + throw new Error('start must be >= zero'); + } -async function removeFile(fileId) { - const file = db.get('io.cozy.files').getById(fileId).value(); - db.get('io.cozy.files').removeById(fileId).write(); - const realpath = path.join(rootPath, file.dir_id, file.attributes.name); - fs.unlinkSync(realpath); -} + this.pos = this.start; + } -async function renameFile(fileId, newName) { - const doc = db.get('io.cozy.files').getById(fileId).write(); - const oldPath = path.join(rootPath, doc.dir_id, doc.attributes.name); - const newPath = path.join(rootPath, doc.dir_id, newName); - fs.renameSync(oldPath, newPath); + this.busy = false; + this._queue = []; + + if (this.fd === null) { + this._open = fs.open; + this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); + this.flush(); + } + } } -function setUpDb() { - let DUMP_PATH = 'importedData.json'; - const KONNECTOR_DEV_CONFIG_PATH = path.resolve('konnector-dev-config.json'); - if (fs.existsSync(KONNECTOR_DEV_CONFIG_PATH)) { - const KONNECTOR_DEV_CONFIG = JSON.parse(fs.readFileSync(KONNECTOR_DEV_CONFIG_PATH, 'utf-8')); - DUMP_PATH = path.join(KONNECTOR_DEV_CONFIG.fields.folderPath || rootPath, DUMP_PATH); - } +/***/ }), +/* 846 */ +/***/ (function(module, exports, __webpack_require__) { - const db = low(new FileSync(DUMP_PATH)); +"use strict"; - db._.mixin(lodashId); - db._.id = '_id'; - return db; +module.exports = clone + +var getPrototypeOf = Object.getPrototypeOf || function (obj) { + return obj.__proto__ } -function removeFirstSlash(pathToCheck) { - if (pathToCheck[0] === '/') { - return pathToCheck.substr(1); - } +function clone (obj) { + if (obj === null || typeof obj !== 'object') + return obj - return pathToCheck; + if (obj instanceof Object) + var copy = { __proto__: getPrototypeOf(obj) } + else + var copy = Object.create(null) + + Object.getOwnPropertyNames(obj).forEach(function (key) { + Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) + }) + + return copy } -async function createFile(file, options = {}) { - log('debug', `Creating new file ${options.name}`); - const finalPath = path.join(rootPath, options.dirID, options.name); - log('debug', `Real path : ${finalPath}`); - const extension = path.extname(options.name).substr(1); - const mime = mimetypes.lookup(extension); - const fileDoc = { - _id: get(options, 'metadata.fileIdAttributes') || options.name, - dir_id: options.dirID || '.', - metadata: options.metadata, - trashed: false, - attributes: { - mime, - name: options.name - }, - cozyMetadata: { - sourceAccount: options.sourceAccount, - sourceAccountIdentifier: options.sourceAccountIdentifier, - createdByApp: manifest.data.slug - } - }; - if (file.pipe) { - let writeStream = fs.createWriteStream(finalPath); - file.pipe(writeStream); - await waitForFileEnd(file, finalPath, writeStream); - } else { - // file is a string - fs.writeFileSync(finalPath, file); - } +/***/ }), +/* 847 */ +/***/ (function(module, exports, __webpack_require__) { - addFileSizeAndWrite(fileDoc, finalPath); - return fileDoc; -} +"use strict"; -function addFileSizeAndWrite(doc, filePath) { - doc.attributes.size = fs.statSync(filePath).size; - db.get('io.cozy.files').insert(doc).write(); -} -async function waitForFileEnd(file, finalPath, writeStream) { - await new Promise((resolve, reject) => { - file.on('end', () => { - log('debug', `File ${finalPath} created`); - resolve(); - }); - writeStream.on('error', err => { - log('warn', `Error : ${err} while trying to write file`); - reject(new Error(err)); - }); - }); - await sleep(1); // allow the the file size to be correct (or else we get 0) -} +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +var stringify = __webpack_require__(848); + +var Base = function Base(source) { + var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, + _ref$defaultValue = _ref.defaultValue, + defaultValue = _ref$defaultValue === undefined ? {} : _ref$defaultValue, + _ref$serialize = _ref.serialize, + serialize = _ref$serialize === undefined ? stringify : _ref$serialize, + _ref$deserialize = _ref.deserialize, + deserialize = _ref$deserialize === undefined ? JSON.parse : _ref$deserialize; + + _classCallCheck(this, Base); + + this.source = source; + this.defaultValue = defaultValue; + this.serialize = serialize; + this.deserialize = deserialize; +}; + +module.exports = Base; /***/ }), -/* 838 */ +/* 848 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +// Pretty stringify +module.exports = function stringify(obj) { + return JSON.stringify(obj, null, 2); +}; + +/***/ }), +/* 849 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /*! - * mime-types - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2015 Douglas Christopher Wilson + * raw-body + * Copyright(c) 2013-2014 Jonathan Ong + * Copyright(c) 2014-2015 Douglas Christopher Wilson * MIT Licensed */ @@ -146086,1414 +142542,1257 @@ async function waitForFileEnd(file, finalPath, writeStream) { * @private */ -var db = __webpack_require__(839) -var extname = __webpack_require__(160).extname +var bytes = __webpack_require__(850) +var createError = __webpack_require__(851) +var iconv = __webpack_require__(862) +var unpipe = __webpack_require__(884) /** - * Module variables. - * @private + * Module exports. + * @public */ -var EXTRACT_TYPE_REGEXP = /^\s*([^;\s]*)(?:;|\s|$)/ -var TEXT_TYPE_REGEXP = /^text\//i +module.exports = getRawBody /** - * Module exports. - * @public + * Module variables. + * @private */ -exports.charset = charset -exports.charsets = { lookup: charset } -exports.contentType = contentType -exports.extension = extension -exports.extensions = Object.create(null) -exports.lookup = lookup -exports.types = Object.create(null) - -// Populate the extensions/types maps -populateMaps(exports.extensions, exports.types) +var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: / /** - * Get the default charset for a MIME type. + * Get the decoder for a given encoding. * - * @param {string} type - * @return {boolean|string} + * @param {string} encoding + * @private */ -function charset (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - var mime = match && db[match[1].toLowerCase()] +function getDecoder (encoding) { + if (!encoding) return null - if (mime && mime.charset) { - return mime.charset - } + try { + return iconv.getDecoder(encoding) + } catch (e) { + // error getting decoder + if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e - // default text/* to utf-8 - if (match && TEXT_TYPE_REGEXP.test(match[1])) { - return 'UTF-8' + // the encoding was not found + throw createError(415, 'specified encoding unsupported', { + encoding: encoding, + type: 'encoding.unsupported' + }) } - - return false } /** - * Create a full Content-Type header given a MIME type or extension. + * Get the raw body of a stream (typically HTTP). * - * @param {string} str - * @return {boolean|string} + * @param {object} stream + * @param {object|string|function} [options] + * @param {function} [callback] + * @public */ -function contentType (str) { - // TODO: should this even be in this module? - if (!str || typeof str !== 'string') { - return false +function getRawBody (stream, options, callback) { + var done = callback + var opts = options || {} + + if (options === true || typeof options === 'string') { + // short cut for encoding + opts = { + encoding: options + } } - var mime = str.indexOf('/') === -1 - ? exports.lookup(str) - : str + if (typeof options === 'function') { + done = options + opts = {} + } - if (!mime) { - return false + // validate callback is a function, if provided + if (done !== undefined && typeof done !== 'function') { + throw new TypeError('argument callback must be a function') } - // TODO: use content-type or other module - if (mime.indexOf('charset') === -1) { - var charset = exports.charset(mime) - if (charset) mime += '; charset=' + charset.toLowerCase() + // require the callback without promises + if (!done && !global.Promise) { + throw new TypeError('argument callback is required') } - return mime + // get encoding + var encoding = opts.encoding !== true + ? opts.encoding + : 'utf-8' + + // convert the limit to an integer + var limit = bytes.parse(opts.limit) + + // convert the expected length to an integer + var length = opts.length != null && !isNaN(opts.length) + ? parseInt(opts.length, 10) + : null + + if (done) { + // classic callback style + return readStream(stream, encoding, length, limit, done) + } + + return new Promise(function executor (resolve, reject) { + readStream(stream, encoding, length, limit, function onRead (err, buf) { + if (err) return reject(err) + resolve(buf) + }) + }) } /** - * Get the default extension for a MIME type. + * Halt a stream. * - * @param {string} type - * @return {boolean|string} + * @param {Object} stream + * @private */ -function extension (type) { - if (!type || typeof type !== 'string') { - return false - } - - // TODO: use media-typer - var match = EXTRACT_TYPE_REGEXP.exec(type) - - // get extensions - var exts = match && exports.extensions[match[1].toLowerCase()] +function halt (stream) { + // unpipe everything from the stream + unpipe(stream) - if (!exts || !exts.length) { - return false + // pause stream + if (typeof stream.pause === 'function') { + stream.pause() } - - return exts[0] } /** - * Lookup the MIME type for a file path/extension. + * Read the data from the stream. * - * @param {string} path - * @return {boolean|string} + * @param {object} stream + * @param {string} encoding + * @param {number} length + * @param {number} limit + * @param {function} callback + * @public */ -function lookup (path) { - if (!path || typeof path !== 'string') { - return false +function readStream (stream, encoding, length, limit, callback) { + var complete = false + var sync = true + + // check the length and limit options. + // note: we intentionally leave the stream paused, + // so users should handle the stream themselves. + if (limit !== null && length !== null && length > limit) { + return done(createError(413, 'request entity too large', { + expected: length, + length: length, + limit: limit, + type: 'entity.too.large' + })) } - // get the extension ("ext" or ".ext" or full path) - var extension = extname('x.' + path) - .toLowerCase() - .substr(1) + // streams1: assert request encoding is buffer. + // streams2+: assert the stream encoding is buffer. + // stream._decoder: streams1 + // state.encoding: streams2 + // state.decoder: streams2, specifically < 0.10.6 + var state = stream._readableState + if (stream._decoder || (state && (state.encoding || state.decoder))) { + // developer error + return done(createError(500, 'stream encoding should not be set', { + type: 'stream.encoding.set' + })) + } - if (!extension) { - return false + var received = 0 + var decoder + + try { + decoder = getDecoder(encoding) + } catch (err) { + return done(err) } - return exports.types[extension] || false -} + var buffer = decoder + ? '' + : [] -/** - * Populate the extensions and types maps. - * @private - */ + // attach listeners + stream.on('aborted', onAborted) + stream.on('close', cleanup) + stream.on('data', onData) + stream.on('end', onEnd) + stream.on('error', onEnd) -function populateMaps (extensions, types) { - // source preference (least -> most) - var preference = ['nginx', 'apache', undefined, 'iana'] + // mark sync section complete + sync = false - Object.keys(db).forEach(function forEachMimeType (type) { - var mime = db[type] - var exts = mime.extensions + function done () { + var args = new Array(arguments.length) - if (!exts || !exts.length) { - return + // copy arguments + for (var i = 0; i < args.length; i++) { + args[i] = arguments[i] } - // mime -> extensions - extensions[type] = exts + // mark complete + complete = true - // extension -> mime - for (var i = 0; i < exts.length; i++) { - var extension = exts[i] + if (sync) { + process.nextTick(invokeCallback) + } else { + invokeCallback() + } - if (types[extension]) { - var from = preference.indexOf(db[types[extension]].source) - var to = preference.indexOf(mime.source) + function invokeCallback () { + cleanup() - if (types[extension] !== 'application/octet-stream' && - (from > to || (from === to && types[extension].substr(0, 12) === 'application/'))) { - // skip the remapping - continue - } + if (args[0]) { + // halt the stream on error + halt(stream) } - // set the extension -> mime - types[extension] = type + callback.apply(null, args) } - }) -} + } + function onAborted () { + if (complete) return -/***/ }), -/* 839 */ -/***/ (function(module, exports, __webpack_require__) { + done(createError(400, 'request aborted', { + code: 'ECONNABORTED', + expected: length, + length: length, + received: received, + type: 'request.aborted' + })) + } -/*! - * mime-db - * Copyright(c) 2014 Jonathan Ong + function onData (chunk) { + if (complete) return + + received += chunk.length + + if (limit !== null && received > limit) { + done(createError(413, 'request entity too large', { + limit: limit, + received: received, + type: 'entity.too.large' + })) + } else if (decoder) { + buffer += decoder.write(chunk) + } else { + buffer.push(chunk) + } + } + + function onEnd (err) { + if (complete) return + if (err) return done(err) + + if (length !== null && received !== length) { + done(createError(400, 'request size did not match content length', { + expected: length, + length: length, + received: received, + type: 'request.size.invalid' + })) + } else { + var string = decoder + ? buffer + (decoder.end() || '') + : Buffer.concat(buffer) + done(null, string) + } + } + + function cleanup () { + buffer = null + + stream.removeListener('aborted', onAborted) + stream.removeListener('data', onData) + stream.removeListener('end', onEnd) + stream.removeListener('error', onEnd) + stream.removeListener('close', cleanup) + } +} + + +/***/ }), +/* 850 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * bytes + * Copyright(c) 2012-2014 TJ Holowaychuk + * Copyright(c) 2015 Jed Watson * MIT Licensed */ + + /** * Module exports. + * @public */ -module.exports = __webpack_require__(840) +module.exports = bytes; +module.exports.format = format; +module.exports.parse = parse; +/** + * Module variables. + * @private + */ -/***/ }), -/* 840 */ -/***/ (function(module) { +var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; -module.exports = JSON.parse("{\"application/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"application/3gpdash-qoe-report+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/3gpp-ims+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/3gpphal+json\":{\"source\":\"iana\",\"compressible\":true},\"application/3gpphalforms+json\":{\"source\":\"iana\",\"compressible\":true},\"application/a2l\":{\"source\":\"iana\"},\"application/ace+cbor\":{\"source\":\"iana\"},\"application/activemessage\":{\"source\":\"iana\"},\"application/activity+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-costmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-directory+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcost+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointcostparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointprop+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-endpointpropparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-error+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-networkmapfilter+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-updatestreamcontrol+json\":{\"source\":\"iana\",\"compressible\":true},\"application/alto-updatestreamparams+json\":{\"source\":\"iana\",\"compressible\":true},\"application/aml\":{\"source\":\"iana\"},\"application/andrew-inset\":{\"source\":\"iana\",\"extensions\":[\"ez\"]},\"application/applefile\":{\"source\":\"iana\"},\"application/applixware\":{\"source\":\"apache\",\"extensions\":[\"aw\"]},\"application/at+jwt\":{\"source\":\"iana\"},\"application/atf\":{\"source\":\"iana\"},\"application/atfx\":{\"source\":\"iana\"},\"application/atom+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atom\"]},\"application/atomcat+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomcat\"]},\"application/atomdeleted+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomdeleted\"]},\"application/atomicmail\":{\"source\":\"iana\"},\"application/atomsvc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"atomsvc\"]},\"application/atsc-dwd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dwd\"]},\"application/atsc-dynamic-event-message\":{\"source\":\"iana\"},\"application/atsc-held+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"held\"]},\"application/atsc-rdt+json\":{\"source\":\"iana\",\"compressible\":true},\"application/atsc-rsat+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rsat\"]},\"application/atxml\":{\"source\":\"iana\"},\"application/auth-policy+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/bacnet-xdd+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/batch-smtp\":{\"source\":\"iana\"},\"application/bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/beep+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/calendar+json\":{\"source\":\"iana\",\"compressible\":true},\"application/calendar+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xcs\"]},\"application/call-completion\":{\"source\":\"iana\"},\"application/cals-1840\":{\"source\":\"iana\"},\"application/captive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/cbor\":{\"source\":\"iana\"},\"application/cbor-seq\":{\"source\":\"iana\"},\"application/cccex\":{\"source\":\"iana\"},\"application/ccmp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ccxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ccxml\"]},\"application/cdfx+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"cdfx\"]},\"application/cdmi-capability\":{\"source\":\"iana\",\"extensions\":[\"cdmia\"]},\"application/cdmi-container\":{\"source\":\"iana\",\"extensions\":[\"cdmic\"]},\"application/cdmi-domain\":{\"source\":\"iana\",\"extensions\":[\"cdmid\"]},\"application/cdmi-object\":{\"source\":\"iana\",\"extensions\":[\"cdmio\"]},\"application/cdmi-queue\":{\"source\":\"iana\",\"extensions\":[\"cdmiq\"]},\"application/cdni\":{\"source\":\"iana\"},\"application/cea\":{\"source\":\"iana\"},\"application/cea-2018+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cellml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cfw\":{\"source\":\"iana\"},\"application/clr\":{\"source\":\"iana\"},\"application/clue+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/clue_info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cms\":{\"source\":\"iana\"},\"application/cnrp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-group+json\":{\"source\":\"iana\",\"compressible\":true},\"application/coap-payload\":{\"source\":\"iana\"},\"application/commonground\":{\"source\":\"iana\"},\"application/conference-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cose\":{\"source\":\"iana\"},\"application/cose-key\":{\"source\":\"iana\"},\"application/cose-key-set\":{\"source\":\"iana\"},\"application/cpl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/csrattrs\":{\"source\":\"iana\"},\"application/csta+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/cstadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/csvm+json\":{\"source\":\"iana\",\"compressible\":true},\"application/cu-seeme\":{\"source\":\"apache\",\"extensions\":[\"cu\"]},\"application/cwt\":{\"source\":\"iana\"},\"application/cybercash\":{\"source\":\"iana\"},\"application/dart\":{\"compressible\":true},\"application/dash+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mpd\"]},\"application/dashdelta\":{\"source\":\"iana\"},\"application/davmount+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"davmount\"]},\"application/dca-rft\":{\"source\":\"iana\"},\"application/dcd\":{\"source\":\"iana\"},\"application/dec-dx\":{\"source\":\"iana\"},\"application/dialog-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom\":{\"source\":\"iana\"},\"application/dicom+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dicom+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dii\":{\"source\":\"iana\"},\"application/dit\":{\"source\":\"iana\"},\"application/dns\":{\"source\":\"iana\"},\"application/dns+json\":{\"source\":\"iana\",\"compressible\":true},\"application/dns-message\":{\"source\":\"iana\"},\"application/docbook+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"dbk\"]},\"application/dots+cbor\":{\"source\":\"iana\"},\"application/dskpp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/dssc+der\":{\"source\":\"iana\",\"extensions\":[\"dssc\"]},\"application/dssc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdssc\"]},\"application/dvcs\":{\"source\":\"iana\"},\"application/ecmascript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"es\",\"ecma\"]},\"application/edi-consent\":{\"source\":\"iana\"},\"application/edi-x12\":{\"source\":\"iana\",\"compressible\":false},\"application/edifact\":{\"source\":\"iana\",\"compressible\":false},\"application/efi\":{\"source\":\"iana\"},\"application/elm+json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/elm+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.cap+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/emergencycalldata.comment+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.deviceinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.ecall.msd\":{\"source\":\"iana\"},\"application/emergencycalldata.providerinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.serviceinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.subscriberinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emergencycalldata.veds+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/emma+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"emma\"]},\"application/emotionml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"emotionml\"]},\"application/encaprtp\":{\"source\":\"iana\"},\"application/epp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/epub+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"epub\"]},\"application/eshop\":{\"source\":\"iana\"},\"application/exi\":{\"source\":\"iana\",\"extensions\":[\"exi\"]},\"application/expect-ct-report+json\":{\"source\":\"iana\",\"compressible\":true},\"application/express\":{\"source\":\"iana\",\"extensions\":[\"exp\"]},\"application/fastinfoset\":{\"source\":\"iana\"},\"application/fastsoap\":{\"source\":\"iana\"},\"application/fdt+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"fdt\"]},\"application/fhir+json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/fhir+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/fido.trusted-apps+json\":{\"compressible\":true},\"application/fits\":{\"source\":\"iana\"},\"application/flexfec\":{\"source\":\"iana\"},\"application/font-sfnt\":{\"source\":\"iana\"},\"application/font-tdpfr\":{\"source\":\"iana\",\"extensions\":[\"pfr\"]},\"application/font-woff\":{\"source\":\"iana\",\"compressible\":false},\"application/framework-attributes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/geo+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"geojson\"]},\"application/geo+json-seq\":{\"source\":\"iana\"},\"application/geopackage+sqlite3\":{\"source\":\"iana\"},\"application/geoxacml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/gltf-buffer\":{\"source\":\"iana\"},\"application/gml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gml\"]},\"application/gpx+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"gpx\"]},\"application/gxf\":{\"source\":\"apache\",\"extensions\":[\"gxf\"]},\"application/gzip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gz\"]},\"application/h224\":{\"source\":\"iana\"},\"application/held+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/hjson\":{\"extensions\":[\"hjson\"]},\"application/http\":{\"source\":\"iana\"},\"application/hyperstudio\":{\"source\":\"iana\",\"extensions\":[\"stk\"]},\"application/ibe-key-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ibe-pkg-reply+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ibe-pp-data\":{\"source\":\"iana\"},\"application/iges\":{\"source\":\"iana\"},\"application/im-iscomposing+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/index\":{\"source\":\"iana\"},\"application/index.cmd\":{\"source\":\"iana\"},\"application/index.obj\":{\"source\":\"iana\"},\"application/index.response\":{\"source\":\"iana\"},\"application/index.vnd\":{\"source\":\"iana\"},\"application/inkml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ink\",\"inkml\"]},\"application/iotp\":{\"source\":\"iana\"},\"application/ipfix\":{\"source\":\"iana\",\"extensions\":[\"ipfix\"]},\"application/ipp\":{\"source\":\"iana\"},\"application/isup\":{\"source\":\"iana\"},\"application/its+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"its\"]},\"application/java-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jar\",\"war\",\"ear\"]},\"application/java-serialized-object\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"ser\"]},\"application/java-vm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"class\"]},\"application/javascript\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"js\",\"mjs\"]},\"application/jf2feed+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jose\":{\"source\":\"iana\"},\"application/jose+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jrd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jscalendar+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"json\",\"map\"]},\"application/json-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/json-seq\":{\"source\":\"iana\"},\"application/json5\":{\"extensions\":[\"json5\"]},\"application/jsonml+json\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"jsonml\"]},\"application/jwk+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwk-set+json\":{\"source\":\"iana\",\"compressible\":true},\"application/jwt\":{\"source\":\"iana\"},\"application/kpml-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/kpml-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/ld+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"jsonld\"]},\"application/lgr+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lgr\"]},\"application/link-format\":{\"source\":\"iana\"},\"application/load-control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/lost+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lostxml\"]},\"application/lostsync+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/lpf+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/lxf\":{\"source\":\"iana\"},\"application/mac-binhex40\":{\"source\":\"iana\",\"extensions\":[\"hqx\"]},\"application/mac-compactpro\":{\"source\":\"apache\",\"extensions\":[\"cpt\"]},\"application/macwriteii\":{\"source\":\"iana\"},\"application/mads+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mads\"]},\"application/manifest+json\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"webmanifest\"]},\"application/marc\":{\"source\":\"iana\",\"extensions\":[\"mrc\"]},\"application/marcxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mrcx\"]},\"application/mathematica\":{\"source\":\"iana\",\"extensions\":[\"ma\",\"nb\",\"mb\"]},\"application/mathml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mathml\"]},\"application/mathml-content+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mathml-presentation+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-associated-procedure-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-deregister+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-envelope+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-msk+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-msk-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-protection-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-reception-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-register+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-register-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-schedule+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbms-user-service-description+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mbox\":{\"source\":\"iana\",\"extensions\":[\"mbox\"]},\"application/media-policy-dataset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/media_control+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mediaservercontrol+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mscml\"]},\"application/merge-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/metalink+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"metalink\"]},\"application/metalink4+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"meta4\"]},\"application/mets+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mets\"]},\"application/mf4\":{\"source\":\"iana\"},\"application/mikey\":{\"source\":\"iana\"},\"application/mipc\":{\"source\":\"iana\"},\"application/missing-blocks+cbor-seq\":{\"source\":\"iana\"},\"application/mmt-aei+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"maei\"]},\"application/mmt-usd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"musd\"]},\"application/mods+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mods\"]},\"application/moss-keys\":{\"source\":\"iana\"},\"application/moss-signature\":{\"source\":\"iana\"},\"application/mosskey-data\":{\"source\":\"iana\"},\"application/mosskey-request\":{\"source\":\"iana\"},\"application/mp21\":{\"source\":\"iana\",\"extensions\":[\"m21\",\"mp21\"]},\"application/mp4\":{\"source\":\"iana\",\"extensions\":[\"mp4s\",\"m4p\"]},\"application/mpeg4-generic\":{\"source\":\"iana\"},\"application/mpeg4-iod\":{\"source\":\"iana\"},\"application/mpeg4-iod-xmt\":{\"source\":\"iana\"},\"application/mrb-consumer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/mrb-publish+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/msc-ivr+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/msc-mixer+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/msword\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"doc\",\"dot\"]},\"application/mud+json\":{\"source\":\"iana\",\"compressible\":true},\"application/multipart-core\":{\"source\":\"iana\"},\"application/mxf\":{\"source\":\"iana\",\"extensions\":[\"mxf\"]},\"application/n-quads\":{\"source\":\"iana\",\"extensions\":[\"nq\"]},\"application/n-triples\":{\"source\":\"iana\",\"extensions\":[\"nt\"]},\"application/nasdata\":{\"source\":\"iana\"},\"application/news-checkgroups\":{\"source\":\"iana\",\"charset\":\"US-ASCII\"},\"application/news-groupinfo\":{\"source\":\"iana\",\"charset\":\"US-ASCII\"},\"application/news-transmission\":{\"source\":\"iana\"},\"application/nlsml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/node\":{\"source\":\"iana\",\"extensions\":[\"cjs\"]},\"application/nss\":{\"source\":\"iana\"},\"application/oauth-authz-req+jwt\":{\"source\":\"iana\"},\"application/ocsp-request\":{\"source\":\"iana\"},\"application/ocsp-response\":{\"source\":\"iana\"},\"application/octet-stream\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"bin\",\"dms\",\"lrf\",\"mar\",\"so\",\"dist\",\"distz\",\"pkg\",\"bpk\",\"dump\",\"elc\",\"deploy\",\"exe\",\"dll\",\"deb\",\"dmg\",\"iso\",\"img\",\"msi\",\"msp\",\"msm\",\"buffer\"]},\"application/oda\":{\"source\":\"iana\",\"extensions\":[\"oda\"]},\"application/odm+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/odx\":{\"source\":\"iana\"},\"application/oebps-package+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"opf\"]},\"application/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogx\"]},\"application/omdoc+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"omdoc\"]},\"application/onenote\":{\"source\":\"apache\",\"extensions\":[\"onetoc\",\"onetoc2\",\"onetmp\",\"onepkg\"]},\"application/opc-nodeset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/oscore\":{\"source\":\"iana\"},\"application/oxps\":{\"source\":\"iana\",\"extensions\":[\"oxps\"]},\"application/p21\":{\"source\":\"iana\"},\"application/p21+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/p2p-overlay+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"relo\"]},\"application/parityfec\":{\"source\":\"iana\"},\"application/passport\":{\"source\":\"iana\"},\"application/patch-ops-error+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xer\"]},\"application/pdf\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pdf\"]},\"application/pdx\":{\"source\":\"iana\"},\"application/pem-certificate-chain\":{\"source\":\"iana\"},\"application/pgp-encrypted\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pgp\"]},\"application/pgp-keys\":{\"source\":\"iana\"},\"application/pgp-signature\":{\"source\":\"iana\",\"extensions\":[\"asc\",\"sig\"]},\"application/pics-rules\":{\"source\":\"apache\",\"extensions\":[\"prf\"]},\"application/pidf+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/pidf-diff+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/pkcs10\":{\"source\":\"iana\",\"extensions\":[\"p10\"]},\"application/pkcs12\":{\"source\":\"iana\"},\"application/pkcs7-mime\":{\"source\":\"iana\",\"extensions\":[\"p7m\",\"p7c\"]},\"application/pkcs7-signature\":{\"source\":\"iana\",\"extensions\":[\"p7s\"]},\"application/pkcs8\":{\"source\":\"iana\",\"extensions\":[\"p8\"]},\"application/pkcs8-encrypted\":{\"source\":\"iana\"},\"application/pkix-attr-cert\":{\"source\":\"iana\",\"extensions\":[\"ac\"]},\"application/pkix-cert\":{\"source\":\"iana\",\"extensions\":[\"cer\"]},\"application/pkix-crl\":{\"source\":\"iana\",\"extensions\":[\"crl\"]},\"application/pkix-pkipath\":{\"source\":\"iana\",\"extensions\":[\"pkipath\"]},\"application/pkixcmp\":{\"source\":\"iana\",\"extensions\":[\"pki\"]},\"application/pls+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"pls\"]},\"application/poc-settings+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/postscript\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ai\",\"eps\",\"ps\"]},\"application/ppsp-tracker+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+json\":{\"source\":\"iana\",\"compressible\":true},\"application/problem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/provenance+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"provx\"]},\"application/prs.alvestrand.titrax-sheet\":{\"source\":\"iana\"},\"application/prs.cww\":{\"source\":\"iana\",\"extensions\":[\"cww\"]},\"application/prs.cyn\":{\"source\":\"iana\",\"charset\":\"7-BIT\"},\"application/prs.hpub+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/prs.nprend\":{\"source\":\"iana\"},\"application/prs.plucker\":{\"source\":\"iana\"},\"application/prs.rdf-xml-crypt\":{\"source\":\"iana\"},\"application/prs.xsf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/pskc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"pskcxml\"]},\"application/pvd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/qsig\":{\"source\":\"iana\"},\"application/raml+yaml\":{\"compressible\":true,\"extensions\":[\"raml\"]},\"application/raptorfec\":{\"source\":\"iana\"},\"application/rdap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/rdf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rdf\",\"owl\"]},\"application/reginfo+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rif\"]},\"application/relax-ng-compact-syntax\":{\"source\":\"iana\",\"extensions\":[\"rnc\"]},\"application/remote-printing\":{\"source\":\"iana\"},\"application/reputon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/resource-lists+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rl\"]},\"application/resource-lists-diff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rld\"]},\"application/rfc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/riscos\":{\"source\":\"iana\"},\"application/rlmi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/rls-services+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rs\"]},\"application/route-apd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rapd\"]},\"application/route-s-tsid+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sls\"]},\"application/route-usd+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rusd\"]},\"application/rpki-ghostbusters\":{\"source\":\"iana\",\"extensions\":[\"gbr\"]},\"application/rpki-manifest\":{\"source\":\"iana\",\"extensions\":[\"mft\"]},\"application/rpki-publication\":{\"source\":\"iana\"},\"application/rpki-roa\":{\"source\":\"iana\",\"extensions\":[\"roa\"]},\"application/rpki-updown\":{\"source\":\"iana\"},\"application/rsd+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rsd\"]},\"application/rss+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"rss\"]},\"application/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"application/rtploopback\":{\"source\":\"iana\"},\"application/rtx\":{\"source\":\"iana\"},\"application/samlassertion+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/samlmetadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sarif+json\":{\"source\":\"iana\",\"compressible\":true},\"application/sarif-external-properties+json\":{\"source\":\"iana\",\"compressible\":true},\"application/sbe\":{\"source\":\"iana\"},\"application/sbml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sbml\"]},\"application/scaip+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/scim+json\":{\"source\":\"iana\",\"compressible\":true},\"application/scvp-cv-request\":{\"source\":\"iana\",\"extensions\":[\"scq\"]},\"application/scvp-cv-response\":{\"source\":\"iana\",\"extensions\":[\"scs\"]},\"application/scvp-vp-request\":{\"source\":\"iana\",\"extensions\":[\"spq\"]},\"application/scvp-vp-response\":{\"source\":\"iana\",\"extensions\":[\"spp\"]},\"application/sdp\":{\"source\":\"iana\",\"extensions\":[\"sdp\"]},\"application/secevent+jwt\":{\"source\":\"iana\"},\"application/senml+cbor\":{\"source\":\"iana\"},\"application/senml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/senml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"senmlx\"]},\"application/senml-etch+cbor\":{\"source\":\"iana\"},\"application/senml-etch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/senml-exi\":{\"source\":\"iana\"},\"application/sensml+cbor\":{\"source\":\"iana\"},\"application/sensml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/sensml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sensmlx\"]},\"application/sensml-exi\":{\"source\":\"iana\"},\"application/sep+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sep-exi\":{\"source\":\"iana\"},\"application/session-info\":{\"source\":\"iana\"},\"application/set-payment\":{\"source\":\"iana\"},\"application/set-payment-initiation\":{\"source\":\"iana\",\"extensions\":[\"setpay\"]},\"application/set-registration\":{\"source\":\"iana\"},\"application/set-registration-initiation\":{\"source\":\"iana\",\"extensions\":[\"setreg\"]},\"application/sgml\":{\"source\":\"iana\"},\"application/sgml-open-catalog\":{\"source\":\"iana\"},\"application/shf+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"shf\"]},\"application/sieve\":{\"source\":\"iana\",\"extensions\":[\"siv\",\"sieve\"]},\"application/simple-filter+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/simple-message-summary\":{\"source\":\"iana\"},\"application/simplesymbolcontainer\":{\"source\":\"iana\"},\"application/sipc\":{\"source\":\"iana\"},\"application/slate\":{\"source\":\"iana\"},\"application/smil\":{\"source\":\"iana\"},\"application/smil+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"smi\",\"smil\"]},\"application/smpte336m\":{\"source\":\"iana\"},\"application/soap+fastinfoset\":{\"source\":\"iana\"},\"application/soap+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sparql-query\":{\"source\":\"iana\",\"extensions\":[\"rq\"]},\"application/sparql-results+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"srx\"]},\"application/spirits-event+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/sql\":{\"source\":\"iana\"},\"application/srgs\":{\"source\":\"iana\",\"extensions\":[\"gram\"]},\"application/srgs+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"grxml\"]},\"application/sru+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sru\"]},\"application/ssdl+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ssdl\"]},\"application/ssml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ssml\"]},\"application/stix+json\":{\"source\":\"iana\",\"compressible\":true},\"application/swid+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"swidtag\"]},\"application/tamp-apex-update\":{\"source\":\"iana\"},\"application/tamp-apex-update-confirm\":{\"source\":\"iana\"},\"application/tamp-community-update\":{\"source\":\"iana\"},\"application/tamp-community-update-confirm\":{\"source\":\"iana\"},\"application/tamp-error\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust\":{\"source\":\"iana\"},\"application/tamp-sequence-adjust-confirm\":{\"source\":\"iana\"},\"application/tamp-status-query\":{\"source\":\"iana\"},\"application/tamp-status-response\":{\"source\":\"iana\"},\"application/tamp-update\":{\"source\":\"iana\"},\"application/tamp-update-confirm\":{\"source\":\"iana\"},\"application/tar\":{\"compressible\":true},\"application/taxii+json\":{\"source\":\"iana\",\"compressible\":true},\"application/td+json\":{\"source\":\"iana\",\"compressible\":true},\"application/tei+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tei\",\"teicorpus\"]},\"application/tetra_isi\":{\"source\":\"iana\"},\"application/thraud+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tfi\"]},\"application/timestamp-query\":{\"source\":\"iana\"},\"application/timestamp-reply\":{\"source\":\"iana\"},\"application/timestamped-data\":{\"source\":\"iana\",\"extensions\":[\"tsd\"]},\"application/tlsrpt+gzip\":{\"source\":\"iana\"},\"application/tlsrpt+json\":{\"source\":\"iana\",\"compressible\":true},\"application/tnauthlist\":{\"source\":\"iana\"},\"application/token-introspection+jwt\":{\"source\":\"iana\"},\"application/toml\":{\"compressible\":true,\"extensions\":[\"toml\"]},\"application/trickle-ice-sdpfrag\":{\"source\":\"iana\"},\"application/trig\":{\"source\":\"iana\",\"extensions\":[\"trig\"]},\"application/ttml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ttml\"]},\"application/tve-trigger\":{\"source\":\"iana\"},\"application/tzif\":{\"source\":\"iana\"},\"application/tzif-leap\":{\"source\":\"iana\"},\"application/ubjson\":{\"compressible\":false,\"extensions\":[\"ubj\"]},\"application/ulpfec\":{\"source\":\"iana\"},\"application/urc-grpsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/urc-ressheet+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rsheet\"]},\"application/urc-targetdesc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"td\"]},\"application/urc-uisocketdesc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vcard+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vemmi\":{\"source\":\"iana\"},\"application/vividence.scriptfile\":{\"source\":\"apache\"},\"application/vnd.1000minds.decision-model+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"1km\"]},\"application/vnd.3gpp-prose+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp-prose-pc3ch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp-v2x-local-service-information\":{\"source\":\"iana\"},\"application/vnd.3gpp.5gnas\":{\"source\":\"iana\"},\"application/vnd.3gpp.access-transfer-events+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.bsf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.gmop+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.gtpc\":{\"source\":\"iana\"},\"application/vnd.3gpp.interworking-data\":{\"source\":\"iana\"},\"application/vnd.3gpp.lpp\":{\"source\":\"iana\"},\"application/vnd.3gpp.mc-signalling-ear\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-payload\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-signalling\":{\"source\":\"iana\"},\"application/vnd.3gpp.mcdata-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcdata-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-floor-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-location-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-mbms-usage-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-signed+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-ue-init-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcptt-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-affiliation-command+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-affiliation-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-location-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-mbms-usage-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-service-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-transmission-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-ue-config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mcvideo-user-profile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.mid-call+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.ngap\":{\"source\":\"iana\"},\"application/vnd.3gpp.pfcp\":{\"source\":\"iana\"},\"application/vnd.3gpp.pic-bw-large\":{\"source\":\"iana\",\"extensions\":[\"plb\"]},\"application/vnd.3gpp.pic-bw-small\":{\"source\":\"iana\",\"extensions\":[\"psb\"]},\"application/vnd.3gpp.pic-bw-var\":{\"source\":\"iana\",\"extensions\":[\"pvb\"]},\"application/vnd.3gpp.s1ap\":{\"source\":\"iana\"},\"application/vnd.3gpp.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp.sms+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.srvcc-ext+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.srvcc-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.state-and-event-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp.ussd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp2.bcmcsinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.3gpp2.sms\":{\"source\":\"iana\"},\"application/vnd.3gpp2.tcap\":{\"source\":\"iana\",\"extensions\":[\"tcap\"]},\"application/vnd.3lightssoftware.imagescal\":{\"source\":\"iana\"},\"application/vnd.3m.post-it-notes\":{\"source\":\"iana\",\"extensions\":[\"pwn\"]},\"application/vnd.accpac.simply.aso\":{\"source\":\"iana\",\"extensions\":[\"aso\"]},\"application/vnd.accpac.simply.imp\":{\"source\":\"iana\",\"extensions\":[\"imp\"]},\"application/vnd.acucobol\":{\"source\":\"iana\",\"extensions\":[\"acu\"]},\"application/vnd.acucorp\":{\"source\":\"iana\",\"extensions\":[\"atc\",\"acutc\"]},\"application/vnd.adobe.air-application-installer-package+zip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"air\"]},\"application/vnd.adobe.flash.movie\":{\"source\":\"iana\"},\"application/vnd.adobe.formscentral.fcdt\":{\"source\":\"iana\",\"extensions\":[\"fcdt\"]},\"application/vnd.adobe.fxp\":{\"source\":\"iana\",\"extensions\":[\"fxp\",\"fxpl\"]},\"application/vnd.adobe.partial-upload\":{\"source\":\"iana\"},\"application/vnd.adobe.xdp+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdp\"]},\"application/vnd.adobe.xfdf\":{\"source\":\"iana\",\"extensions\":[\"xfdf\"]},\"application/vnd.aether.imp\":{\"source\":\"iana\"},\"application/vnd.afpc.afplinedata\":{\"source\":\"iana\"},\"application/vnd.afpc.afplinedata-pagedef\":{\"source\":\"iana\"},\"application/vnd.afpc.cmoca-cmresource\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-charset\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-codedfont\":{\"source\":\"iana\"},\"application/vnd.afpc.foca-codepage\":{\"source\":\"iana\"},\"application/vnd.afpc.modca\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-cmtable\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-formdef\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-mediummap\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-objectcontainer\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-overlay\":{\"source\":\"iana\"},\"application/vnd.afpc.modca-pagesegment\":{\"source\":\"iana\"},\"application/vnd.ah-barcode\":{\"source\":\"iana\"},\"application/vnd.ahead.space\":{\"source\":\"iana\",\"extensions\":[\"ahead\"]},\"application/vnd.airzip.filesecure.azf\":{\"source\":\"iana\",\"extensions\":[\"azf\"]},\"application/vnd.airzip.filesecure.azs\":{\"source\":\"iana\",\"extensions\":[\"azs\"]},\"application/vnd.amadeus+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.amazon.ebook\":{\"source\":\"apache\",\"extensions\":[\"azw\"]},\"application/vnd.amazon.mobi8-ebook\":{\"source\":\"iana\"},\"application/vnd.americandynamics.acc\":{\"source\":\"iana\",\"extensions\":[\"acc\"]},\"application/vnd.amiga.ami\":{\"source\":\"iana\",\"extensions\":[\"ami\"]},\"application/vnd.amundsen.maze+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.android.ota\":{\"source\":\"iana\"},\"application/vnd.android.package-archive\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"apk\"]},\"application/vnd.anki\":{\"source\":\"iana\"},\"application/vnd.anser-web-certificate-issue-initiation\":{\"source\":\"iana\",\"extensions\":[\"cii\"]},\"application/vnd.anser-web-funds-transfer-initiation\":{\"source\":\"apache\",\"extensions\":[\"fti\"]},\"application/vnd.antix.game-component\":{\"source\":\"iana\",\"extensions\":[\"atx\"]},\"application/vnd.apache.arrow.file\":{\"source\":\"iana\"},\"application/vnd.apache.arrow.stream\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.binary\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.compact\":{\"source\":\"iana\"},\"application/vnd.apache.thrift.json\":{\"source\":\"iana\"},\"application/vnd.api+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.aplextor.warrp+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apothekende.reservation+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.apple.installer+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mpkg\"]},\"application/vnd.apple.keynote\":{\"source\":\"iana\",\"extensions\":[\"key\"]},\"application/vnd.apple.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"m3u8\"]},\"application/vnd.apple.numbers\":{\"source\":\"iana\",\"extensions\":[\"numbers\"]},\"application/vnd.apple.pages\":{\"source\":\"iana\",\"extensions\":[\"pages\"]},\"application/vnd.apple.pkpass\":{\"compressible\":false,\"extensions\":[\"pkpass\"]},\"application/vnd.arastra.swi\":{\"source\":\"iana\"},\"application/vnd.aristanetworks.swi\":{\"source\":\"iana\",\"extensions\":[\"swi\"]},\"application/vnd.artisan+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.artsquare\":{\"source\":\"iana\"},\"application/vnd.astraea-software.iota\":{\"source\":\"iana\",\"extensions\":[\"iota\"]},\"application/vnd.audiograph\":{\"source\":\"iana\",\"extensions\":[\"aep\"]},\"application/vnd.autopackage\":{\"source\":\"iana\"},\"application/vnd.avalon+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.avistar+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.balsamiq.bmml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmml\"]},\"application/vnd.balsamiq.bmpr\":{\"source\":\"iana\"},\"application/vnd.banana-accounting\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.error\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg\":{\"source\":\"iana\"},\"application/vnd.bbf.usp.msg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bekitzur-stech+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.bint.med-content\":{\"source\":\"iana\"},\"application/vnd.biopax.rdf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.blink-idb-value-wrapper\":{\"source\":\"iana\"},\"application/vnd.blueice.multipass\":{\"source\":\"iana\",\"extensions\":[\"mpm\"]},\"application/vnd.bluetooth.ep.oob\":{\"source\":\"iana\"},\"application/vnd.bluetooth.le.oob\":{\"source\":\"iana\"},\"application/vnd.bmi\":{\"source\":\"iana\",\"extensions\":[\"bmi\"]},\"application/vnd.bpf\":{\"source\":\"iana\"},\"application/vnd.bpf3\":{\"source\":\"iana\"},\"application/vnd.businessobjects\":{\"source\":\"iana\",\"extensions\":[\"rep\"]},\"application/vnd.byu.uapi+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cab-jscript\":{\"source\":\"iana\"},\"application/vnd.canon-cpdl\":{\"source\":\"iana\"},\"application/vnd.canon-lips\":{\"source\":\"iana\"},\"application/vnd.capasystems-pg+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cendio.thinlinc.clientconf\":{\"source\":\"iana\"},\"application/vnd.century-systems.tcp_stream\":{\"source\":\"iana\"},\"application/vnd.chemdraw+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"cdxml\"]},\"application/vnd.chess-pgn\":{\"source\":\"iana\"},\"application/vnd.chipnuts.karaoke-mmd\":{\"source\":\"iana\",\"extensions\":[\"mmd\"]},\"application/vnd.ciedi\":{\"source\":\"iana\"},\"application/vnd.cinderella\":{\"source\":\"iana\",\"extensions\":[\"cdy\"]},\"application/vnd.cirpack.isdn-ext\":{\"source\":\"iana\"},\"application/vnd.citationstyles.style+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csl\"]},\"application/vnd.claymore\":{\"source\":\"iana\",\"extensions\":[\"cla\"]},\"application/vnd.cloanto.rp9\":{\"source\":\"iana\",\"extensions\":[\"rp9\"]},\"application/vnd.clonk.c4group\":{\"source\":\"iana\",\"extensions\":[\"c4g\",\"c4d\",\"c4f\",\"c4p\",\"c4u\"]},\"application/vnd.cluetrust.cartomobile-config\":{\"source\":\"iana\",\"extensions\":[\"c11amc\"]},\"application/vnd.cluetrust.cartomobile-config-pkg\":{\"source\":\"iana\",\"extensions\":[\"c11amz\"]},\"application/vnd.coffeescript\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.document-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.presentation-template\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet\":{\"source\":\"iana\"},\"application/vnd.collabio.xodocuments.spreadsheet-template\":{\"source\":\"iana\"},\"application/vnd.collection+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.doc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.collection.next+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.comicbook+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.comicbook-rar\":{\"source\":\"iana\"},\"application/vnd.commerce-battelle\":{\"source\":\"iana\"},\"application/vnd.commonspace\":{\"source\":\"iana\",\"extensions\":[\"csp\"]},\"application/vnd.contact.cmsg\":{\"source\":\"iana\",\"extensions\":[\"cdbcmsg\"]},\"application/vnd.coreos.ignition+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cosmocaller\":{\"source\":\"iana\",\"extensions\":[\"cmc\"]},\"application/vnd.crick.clicker\":{\"source\":\"iana\",\"extensions\":[\"clkx\"]},\"application/vnd.crick.clicker.keyboard\":{\"source\":\"iana\",\"extensions\":[\"clkk\"]},\"application/vnd.crick.clicker.palette\":{\"source\":\"iana\",\"extensions\":[\"clkp\"]},\"application/vnd.crick.clicker.template\":{\"source\":\"iana\",\"extensions\":[\"clkt\"]},\"application/vnd.crick.clicker.wordbank\":{\"source\":\"iana\",\"extensions\":[\"clkw\"]},\"application/vnd.criticaltools.wbs+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wbs\"]},\"application/vnd.cryptii.pipe+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.crypto-shade-file\":{\"source\":\"iana\"},\"application/vnd.cryptomator.encrypted\":{\"source\":\"iana\"},\"application/vnd.cryptomator.vault\":{\"source\":\"iana\"},\"application/vnd.ctc-posml\":{\"source\":\"iana\",\"extensions\":[\"pml\"]},\"application/vnd.ctct.ws+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cups-pdf\":{\"source\":\"iana\"},\"application/vnd.cups-postscript\":{\"source\":\"iana\"},\"application/vnd.cups-ppd\":{\"source\":\"iana\",\"extensions\":[\"ppd\"]},\"application/vnd.cups-raster\":{\"source\":\"iana\"},\"application/vnd.cups-raw\":{\"source\":\"iana\"},\"application/vnd.curl\":{\"source\":\"iana\"},\"application/vnd.curl.car\":{\"source\":\"apache\",\"extensions\":[\"car\"]},\"application/vnd.curl.pcurl\":{\"source\":\"apache\",\"extensions\":[\"pcurl\"]},\"application/vnd.cyan.dean.root+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cybank\":{\"source\":\"iana\"},\"application/vnd.cyclonedx+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.cyclonedx+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.d2l.coursepackage1p0+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.d3m-dataset\":{\"source\":\"iana\"},\"application/vnd.d3m-problem\":{\"source\":\"iana\"},\"application/vnd.dart\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dart\"]},\"application/vnd.data-vision.rdz\":{\"source\":\"iana\",\"extensions\":[\"rdz\"]},\"application/vnd.datapackage+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dataresource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dbf\":{\"source\":\"iana\",\"extensions\":[\"dbf\"]},\"application/vnd.debian.binary-package\":{\"source\":\"iana\"},\"application/vnd.dece.data\":{\"source\":\"iana\",\"extensions\":[\"uvf\",\"uvvf\",\"uvd\",\"uvvd\"]},\"application/vnd.dece.ttml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uvt\",\"uvvt\"]},\"application/vnd.dece.unspecified\":{\"source\":\"iana\",\"extensions\":[\"uvx\",\"uvvx\"]},\"application/vnd.dece.zip\":{\"source\":\"iana\",\"extensions\":[\"uvz\",\"uvvz\"]},\"application/vnd.denovo.fcselayout-link\":{\"source\":\"iana\",\"extensions\":[\"fe_launch\"]},\"application/vnd.desmume.movie\":{\"source\":\"iana\"},\"application/vnd.dir-bi.plate-dl-nosuffix\":{\"source\":\"iana\"},\"application/vnd.dm.delegation+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dna\":{\"source\":\"iana\",\"extensions\":[\"dna\"]},\"application/vnd.document+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dolby.mlp\":{\"source\":\"apache\",\"extensions\":[\"mlp\"]},\"application/vnd.dolby.mobile.1\":{\"source\":\"iana\"},\"application/vnd.dolby.mobile.2\":{\"source\":\"iana\"},\"application/vnd.doremir.scorecloud-binary-document\":{\"source\":\"iana\"},\"application/vnd.dpgraph\":{\"source\":\"iana\",\"extensions\":[\"dpg\"]},\"application/vnd.dreamfactory\":{\"source\":\"iana\",\"extensions\":[\"dfac\"]},\"application/vnd.drive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ds-keypoint\":{\"source\":\"apache\",\"extensions\":[\"kpxx\"]},\"application/vnd.dtg.local\":{\"source\":\"iana\"},\"application/vnd.dtg.local.flash\":{\"source\":\"iana\"},\"application/vnd.dtg.local.html\":{\"source\":\"iana\"},\"application/vnd.dvb.ait\":{\"source\":\"iana\",\"extensions\":[\"ait\"]},\"application/vnd.dvb.dvbisl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.dvbj\":{\"source\":\"iana\"},\"application/vnd.dvb.esgcontainer\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcdftnotifaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgaccess2\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcesgpdd\":{\"source\":\"iana\"},\"application/vnd.dvb.ipdcroaming\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-base\":{\"source\":\"iana\"},\"application/vnd.dvb.iptv.alfec-enhancement\":{\"source\":\"iana\"},\"application/vnd.dvb.notif-aggregate-root+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-container+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-generic+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-msglist+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-registration-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-ia-registration-response+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.notif-init+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.dvb.pfr\":{\"source\":\"iana\"},\"application/vnd.dvb.service\":{\"source\":\"iana\",\"extensions\":[\"svc\"]},\"application/vnd.dxr\":{\"source\":\"iana\"},\"application/vnd.dynageo\":{\"source\":\"iana\",\"extensions\":[\"geo\"]},\"application/vnd.dzr\":{\"source\":\"iana\"},\"application/vnd.easykaraoke.cdgdownload\":{\"source\":\"iana\"},\"application/vnd.ecdis-update\":{\"source\":\"iana\"},\"application/vnd.ecip.rlp\":{\"source\":\"iana\"},\"application/vnd.ecowin.chart\":{\"source\":\"iana\",\"extensions\":[\"mag\"]},\"application/vnd.ecowin.filerequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.fileupdate\":{\"source\":\"iana\"},\"application/vnd.ecowin.series\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesrequest\":{\"source\":\"iana\"},\"application/vnd.ecowin.seriesupdate\":{\"source\":\"iana\"},\"application/vnd.efi.img\":{\"source\":\"iana\"},\"application/vnd.efi.iso\":{\"source\":\"iana\"},\"application/vnd.emclient.accessrequest+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.enliven\":{\"source\":\"iana\",\"extensions\":[\"nml\"]},\"application/vnd.enphase.envoy\":{\"source\":\"iana\"},\"application/vnd.eprints.data+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.epson.esf\":{\"source\":\"iana\",\"extensions\":[\"esf\"]},\"application/vnd.epson.msf\":{\"source\":\"iana\",\"extensions\":[\"msf\"]},\"application/vnd.epson.quickanime\":{\"source\":\"iana\",\"extensions\":[\"qam\"]},\"application/vnd.epson.salt\":{\"source\":\"iana\",\"extensions\":[\"slt\"]},\"application/vnd.epson.ssf\":{\"source\":\"iana\",\"extensions\":[\"ssf\"]},\"application/vnd.ericsson.quickcall\":{\"source\":\"iana\"},\"application/vnd.espass-espass+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.eszigno3+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"es3\",\"et3\"]},\"application/vnd.etsi.aoc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.asic-e+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.etsi.asic-s+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.etsi.cug+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvcommand+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvdiscovery+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-bc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-cod+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsad-npvr+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvservice+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvsync+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.iptvueprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.mcid+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.mheg5\":{\"source\":\"iana\"},\"application/vnd.etsi.overload-control-policy-dataset+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.pstn+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.sci+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.simservs+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.timestamp-token\":{\"source\":\"iana\"},\"application/vnd.etsi.tsl+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.etsi.tsl.der\":{\"source\":\"iana\"},\"application/vnd.eudora.data\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.profile\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.settings\":{\"source\":\"iana\"},\"application/vnd.evolv.ecig.theme\":{\"source\":\"iana\"},\"application/vnd.exstream-empower+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.exstream-package\":{\"source\":\"iana\"},\"application/vnd.ezpix-album\":{\"source\":\"iana\",\"extensions\":[\"ez2\"]},\"application/vnd.ezpix-package\":{\"source\":\"iana\",\"extensions\":[\"ez3\"]},\"application/vnd.f-secure.mobile\":{\"source\":\"iana\"},\"application/vnd.fastcopy-disk-image\":{\"source\":\"iana\"},\"application/vnd.fdf\":{\"source\":\"iana\",\"extensions\":[\"fdf\"]},\"application/vnd.fdsn.mseed\":{\"source\":\"iana\",\"extensions\":[\"mseed\"]},\"application/vnd.fdsn.seed\":{\"source\":\"iana\",\"extensions\":[\"seed\",\"dataless\"]},\"application/vnd.ffsns\":{\"source\":\"iana\"},\"application/vnd.ficlab.flb+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.filmit.zfc\":{\"source\":\"iana\"},\"application/vnd.fints\":{\"source\":\"iana\"},\"application/vnd.firemonkeys.cloudcell\":{\"source\":\"iana\"},\"application/vnd.flographit\":{\"source\":\"iana\",\"extensions\":[\"gph\"]},\"application/vnd.fluxtime.clip\":{\"source\":\"iana\",\"extensions\":[\"ftc\"]},\"application/vnd.font-fontforge-sfd\":{\"source\":\"iana\"},\"application/vnd.framemaker\":{\"source\":\"iana\",\"extensions\":[\"fm\",\"frame\",\"maker\",\"book\"]},\"application/vnd.frogans.fnc\":{\"source\":\"iana\",\"extensions\":[\"fnc\"]},\"application/vnd.frogans.ltf\":{\"source\":\"iana\",\"extensions\":[\"ltf\"]},\"application/vnd.fsc.weblaunch\":{\"source\":\"iana\",\"extensions\":[\"fsc\"]},\"application/vnd.fujifilm.fb.docuworks\":{\"source\":\"iana\"},\"application/vnd.fujifilm.fb.docuworks.binder\":{\"source\":\"iana\"},\"application/vnd.fujifilm.fb.docuworks.container\":{\"source\":\"iana\"},\"application/vnd.fujifilm.fb.jfi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.fujitsu.oasys\":{\"source\":\"iana\",\"extensions\":[\"oas\"]},\"application/vnd.fujitsu.oasys2\":{\"source\":\"iana\",\"extensions\":[\"oa2\"]},\"application/vnd.fujitsu.oasys3\":{\"source\":\"iana\",\"extensions\":[\"oa3\"]},\"application/vnd.fujitsu.oasysgp\":{\"source\":\"iana\",\"extensions\":[\"fg5\"]},\"application/vnd.fujitsu.oasysprs\":{\"source\":\"iana\",\"extensions\":[\"bh2\"]},\"application/vnd.fujixerox.art-ex\":{\"source\":\"iana\"},\"application/vnd.fujixerox.art4\":{\"source\":\"iana\"},\"application/vnd.fujixerox.ddd\":{\"source\":\"iana\",\"extensions\":[\"ddd\"]},\"application/vnd.fujixerox.docuworks\":{\"source\":\"iana\",\"extensions\":[\"xdw\"]},\"application/vnd.fujixerox.docuworks.binder\":{\"source\":\"iana\",\"extensions\":[\"xbd\"]},\"application/vnd.fujixerox.docuworks.container\":{\"source\":\"iana\"},\"application/vnd.fujixerox.hbpl\":{\"source\":\"iana\"},\"application/vnd.fut-misnet\":{\"source\":\"iana\"},\"application/vnd.futoin+cbor\":{\"source\":\"iana\"},\"application/vnd.futoin+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.fuzzysheet\":{\"source\":\"iana\",\"extensions\":[\"fzs\"]},\"application/vnd.genomatix.tuxedo\":{\"source\":\"iana\",\"extensions\":[\"txd\"]},\"application/vnd.gentics.grd+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geo+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geocube+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.geogebra.file\":{\"source\":\"iana\",\"extensions\":[\"ggb\"]},\"application/vnd.geogebra.slides\":{\"source\":\"iana\"},\"application/vnd.geogebra.tool\":{\"source\":\"iana\",\"extensions\":[\"ggt\"]},\"application/vnd.geometry-explorer\":{\"source\":\"iana\",\"extensions\":[\"gex\",\"gre\"]},\"application/vnd.geonext\":{\"source\":\"iana\",\"extensions\":[\"gxt\"]},\"application/vnd.geoplan\":{\"source\":\"iana\",\"extensions\":[\"g2w\"]},\"application/vnd.geospace\":{\"source\":\"iana\",\"extensions\":[\"g3w\"]},\"application/vnd.gerber\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt\":{\"source\":\"iana\"},\"application/vnd.globalplatform.card-content-mgt-response\":{\"source\":\"iana\"},\"application/vnd.gmx\":{\"source\":\"iana\",\"extensions\":[\"gmx\"]},\"application/vnd.google-apps.document\":{\"compressible\":false,\"extensions\":[\"gdoc\"]},\"application/vnd.google-apps.presentation\":{\"compressible\":false,\"extensions\":[\"gslides\"]},\"application/vnd.google-apps.spreadsheet\":{\"compressible\":false,\"extensions\":[\"gsheet\"]},\"application/vnd.google-earth.kml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"kml\"]},\"application/vnd.google-earth.kmz\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"kmz\"]},\"application/vnd.gov.sk.e-form+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.gov.sk.e-form+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.gov.sk.xmldatacontainer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.grafeq\":{\"source\":\"iana\",\"extensions\":[\"gqf\",\"gqs\"]},\"application/vnd.gridmp\":{\"source\":\"iana\"},\"application/vnd.groove-account\":{\"source\":\"iana\",\"extensions\":[\"gac\"]},\"application/vnd.groove-help\":{\"source\":\"iana\",\"extensions\":[\"ghf\"]},\"application/vnd.groove-identity-message\":{\"source\":\"iana\",\"extensions\":[\"gim\"]},\"application/vnd.groove-injector\":{\"source\":\"iana\",\"extensions\":[\"grv\"]},\"application/vnd.groove-tool-message\":{\"source\":\"iana\",\"extensions\":[\"gtm\"]},\"application/vnd.groove-tool-template\":{\"source\":\"iana\",\"extensions\":[\"tpl\"]},\"application/vnd.groove-vcard\":{\"source\":\"iana\",\"extensions\":[\"vcg\"]},\"application/vnd.hal+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hal+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"hal\"]},\"application/vnd.handheld-entertainment+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"zmm\"]},\"application/vnd.hbci\":{\"source\":\"iana\",\"extensions\":[\"hbci\"]},\"application/vnd.hc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hcl-bireports\":{\"source\":\"iana\"},\"application/vnd.hdt\":{\"source\":\"iana\"},\"application/vnd.heroku+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hhe.lesson-player\":{\"source\":\"iana\",\"extensions\":[\"les\"]},\"application/vnd.hp-hpgl\":{\"source\":\"iana\",\"extensions\":[\"hpgl\"]},\"application/vnd.hp-hpid\":{\"source\":\"iana\",\"extensions\":[\"hpid\"]},\"application/vnd.hp-hps\":{\"source\":\"iana\",\"extensions\":[\"hps\"]},\"application/vnd.hp-jlyt\":{\"source\":\"iana\",\"extensions\":[\"jlt\"]},\"application/vnd.hp-pcl\":{\"source\":\"iana\",\"extensions\":[\"pcl\"]},\"application/vnd.hp-pclxl\":{\"source\":\"iana\",\"extensions\":[\"pclxl\"]},\"application/vnd.httphone\":{\"source\":\"iana\"},\"application/vnd.hydrostatix.sof-data\":{\"source\":\"iana\",\"extensions\":[\"sfd-hdstx\"]},\"application/vnd.hyper+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyper-item+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hyperdrive+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.hzn-3d-crossword\":{\"source\":\"iana\"},\"application/vnd.ibm.afplinedata\":{\"source\":\"iana\"},\"application/vnd.ibm.electronic-media\":{\"source\":\"iana\"},\"application/vnd.ibm.minipay\":{\"source\":\"iana\",\"extensions\":[\"mpy\"]},\"application/vnd.ibm.modcap\":{\"source\":\"iana\",\"extensions\":[\"afp\",\"listafp\",\"list3820\"]},\"application/vnd.ibm.rights-management\":{\"source\":\"iana\",\"extensions\":[\"irm\"]},\"application/vnd.ibm.secure-container\":{\"source\":\"iana\",\"extensions\":[\"sc\"]},\"application/vnd.iccprofile\":{\"source\":\"iana\",\"extensions\":[\"icc\",\"icm\"]},\"application/vnd.ieee.1905\":{\"source\":\"iana\"},\"application/vnd.igloader\":{\"source\":\"iana\",\"extensions\":[\"igl\"]},\"application/vnd.imagemeter.folder+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.imagemeter.image+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.immervision-ivp\":{\"source\":\"iana\",\"extensions\":[\"ivp\"]},\"application/vnd.immervision-ivu\":{\"source\":\"iana\",\"extensions\":[\"ivu\"]},\"application/vnd.ims.imsccv1p1\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p2\":{\"source\":\"iana\"},\"application/vnd.ims.imsccv1p3\":{\"source\":\"iana\"},\"application/vnd.ims.lis.v2.result+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolconsumerprofile+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolproxy.id+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ims.lti.v2.toolsettings.simple+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informedcontrol.rms+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.informix-visionary\":{\"source\":\"iana\"},\"application/vnd.infotech.project\":{\"source\":\"iana\"},\"application/vnd.infotech.project+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.innopath.wamp.notification\":{\"source\":\"iana\"},\"application/vnd.insors.igm\":{\"source\":\"iana\",\"extensions\":[\"igm\"]},\"application/vnd.intercon.formnet\":{\"source\":\"iana\",\"extensions\":[\"xpw\",\"xpx\"]},\"application/vnd.intergeo\":{\"source\":\"iana\",\"extensions\":[\"i2g\"]},\"application/vnd.intertrust.digibox\":{\"source\":\"iana\"},\"application/vnd.intertrust.nncp\":{\"source\":\"iana\"},\"application/vnd.intu.qbo\":{\"source\":\"iana\",\"extensions\":[\"qbo\"]},\"application/vnd.intu.qfx\":{\"source\":\"iana\",\"extensions\":[\"qfx\"]},\"application/vnd.iptc.g2.catalogitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.conceptitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.knowledgeitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.newsitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.newsmessage+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.packageitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.iptc.g2.planningitem+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ipunplugged.rcprofile\":{\"source\":\"iana\",\"extensions\":[\"rcprofile\"]},\"application/vnd.irepository.package+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"irp\"]},\"application/vnd.is-xpr\":{\"source\":\"iana\",\"extensions\":[\"xpr\"]},\"application/vnd.isac.fcs\":{\"source\":\"iana\",\"extensions\":[\"fcs\"]},\"application/vnd.iso11783-10+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.jam\":{\"source\":\"iana\",\"extensions\":[\"jam\"]},\"application/vnd.japannet-directory-service\":{\"source\":\"iana\"},\"application/vnd.japannet-jpnstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-payment-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-registration\":{\"source\":\"iana\"},\"application/vnd.japannet-registration-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-setstore-wakeup\":{\"source\":\"iana\"},\"application/vnd.japannet-verification\":{\"source\":\"iana\"},\"application/vnd.japannet-verification-wakeup\":{\"source\":\"iana\"},\"application/vnd.jcp.javame.midlet-rms\":{\"source\":\"iana\",\"extensions\":[\"rms\"]},\"application/vnd.jisp\":{\"source\":\"iana\",\"extensions\":[\"jisp\"]},\"application/vnd.joost.joda-archive\":{\"source\":\"iana\",\"extensions\":[\"joda\"]},\"application/vnd.jsk.isdn-ngn\":{\"source\":\"iana\"},\"application/vnd.kahootz\":{\"source\":\"iana\",\"extensions\":[\"ktz\",\"ktr\"]},\"application/vnd.kde.karbon\":{\"source\":\"iana\",\"extensions\":[\"karbon\"]},\"application/vnd.kde.kchart\":{\"source\":\"iana\",\"extensions\":[\"chrt\"]},\"application/vnd.kde.kformula\":{\"source\":\"iana\",\"extensions\":[\"kfo\"]},\"application/vnd.kde.kivio\":{\"source\":\"iana\",\"extensions\":[\"flw\"]},\"application/vnd.kde.kontour\":{\"source\":\"iana\",\"extensions\":[\"kon\"]},\"application/vnd.kde.kpresenter\":{\"source\":\"iana\",\"extensions\":[\"kpr\",\"kpt\"]},\"application/vnd.kde.kspread\":{\"source\":\"iana\",\"extensions\":[\"ksp\"]},\"application/vnd.kde.kword\":{\"source\":\"iana\",\"extensions\":[\"kwd\",\"kwt\"]},\"application/vnd.kenameaapp\":{\"source\":\"iana\",\"extensions\":[\"htke\"]},\"application/vnd.kidspiration\":{\"source\":\"iana\",\"extensions\":[\"kia\"]},\"application/vnd.kinar\":{\"source\":\"iana\",\"extensions\":[\"kne\",\"knp\"]},\"application/vnd.koan\":{\"source\":\"iana\",\"extensions\":[\"skp\",\"skd\",\"skt\",\"skm\"]},\"application/vnd.kodak-descriptor\":{\"source\":\"iana\",\"extensions\":[\"sse\"]},\"application/vnd.las\":{\"source\":\"iana\"},\"application/vnd.las.las+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.las.las+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lasxml\"]},\"application/vnd.laszip\":{\"source\":\"iana\"},\"application/vnd.leap+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.liberty-request+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.llamagraphics.life-balance.desktop\":{\"source\":\"iana\",\"extensions\":[\"lbd\"]},\"application/vnd.llamagraphics.life-balance.exchange+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"lbe\"]},\"application/vnd.logipipe.circuit+zip\":{\"source\":\"iana\",\"compressible\":false},\"application/vnd.loom\":{\"source\":\"iana\"},\"application/vnd.lotus-1-2-3\":{\"source\":\"iana\",\"extensions\":[\"123\"]},\"application/vnd.lotus-approach\":{\"source\":\"iana\",\"extensions\":[\"apr\"]},\"application/vnd.lotus-freelance\":{\"source\":\"iana\",\"extensions\":[\"pre\"]},\"application/vnd.lotus-notes\":{\"source\":\"iana\",\"extensions\":[\"nsf\"]},\"application/vnd.lotus-organizer\":{\"source\":\"iana\",\"extensions\":[\"org\"]},\"application/vnd.lotus-screencam\":{\"source\":\"iana\",\"extensions\":[\"scm\"]},\"application/vnd.lotus-wordpro\":{\"source\":\"iana\",\"extensions\":[\"lwp\"]},\"application/vnd.macports.portpkg\":{\"source\":\"iana\",\"extensions\":[\"portpkg\"]},\"application/vnd.mapbox-vector-tile\":{\"source\":\"iana\",\"extensions\":[\"mvt\"]},\"application/vnd.marlin.drm.actiontoken+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.conftoken+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.license+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.marlin.drm.mdcf\":{\"source\":\"iana\"},\"application/vnd.mason+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.maxmind.maxmind-db\":{\"source\":\"iana\"},\"application/vnd.mcd\":{\"source\":\"iana\",\"extensions\":[\"mcd\"]},\"application/vnd.medcalcdata\":{\"source\":\"iana\",\"extensions\":[\"mc1\"]},\"application/vnd.mediastation.cdkey\":{\"source\":\"iana\",\"extensions\":[\"cdkey\"]},\"application/vnd.meridian-slingshot\":{\"source\":\"iana\"},\"application/vnd.mfer\":{\"source\":\"iana\",\"extensions\":[\"mwf\"]},\"application/vnd.mfmp\":{\"source\":\"iana\",\"extensions\":[\"mfm\"]},\"application/vnd.micro+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.micrografx.flo\":{\"source\":\"iana\",\"extensions\":[\"flo\"]},\"application/vnd.micrografx.igx\":{\"source\":\"iana\",\"extensions\":[\"igx\"]},\"application/vnd.microsoft.portable-executable\":{\"source\":\"iana\"},\"application/vnd.microsoft.windows.thumbnail-cache\":{\"source\":\"iana\"},\"application/vnd.miele+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.mif\":{\"source\":\"iana\",\"extensions\":[\"mif\"]},\"application/vnd.minisoft-hp3000-save\":{\"source\":\"iana\"},\"application/vnd.mitsubishi.misty-guard.trustweb\":{\"source\":\"iana\"},\"application/vnd.mobius.daf\":{\"source\":\"iana\",\"extensions\":[\"daf\"]},\"application/vnd.mobius.dis\":{\"source\":\"iana\",\"extensions\":[\"dis\"]},\"application/vnd.mobius.mbk\":{\"source\":\"iana\",\"extensions\":[\"mbk\"]},\"application/vnd.mobius.mqy\":{\"source\":\"iana\",\"extensions\":[\"mqy\"]},\"application/vnd.mobius.msl\":{\"source\":\"iana\",\"extensions\":[\"msl\"]},\"application/vnd.mobius.plc\":{\"source\":\"iana\",\"extensions\":[\"plc\"]},\"application/vnd.mobius.txf\":{\"source\":\"iana\",\"extensions\":[\"txf\"]},\"application/vnd.mophun.application\":{\"source\":\"iana\",\"extensions\":[\"mpn\"]},\"application/vnd.mophun.certificate\":{\"source\":\"iana\",\"extensions\":[\"mpc\"]},\"application/vnd.motorola.flexsuite\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.adsi\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.fis\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.gotap\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.kmr\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.ttc\":{\"source\":\"iana\"},\"application/vnd.motorola.flexsuite.wem\":{\"source\":\"iana\"},\"application/vnd.motorola.iprm\":{\"source\":\"iana\"},\"application/vnd.mozilla.xul+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xul\"]},\"application/vnd.ms-3mfdocument\":{\"source\":\"iana\"},\"application/vnd.ms-artgalry\":{\"source\":\"iana\",\"extensions\":[\"cil\"]},\"application/vnd.ms-asf\":{\"source\":\"iana\"},\"application/vnd.ms-cab-compressed\":{\"source\":\"iana\",\"extensions\":[\"cab\"]},\"application/vnd.ms-color.iccprofile\":{\"source\":\"apache\"},\"application/vnd.ms-excel\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xls\",\"xlm\",\"xla\",\"xlc\",\"xlt\",\"xlw\"]},\"application/vnd.ms-excel.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlam\"]},\"application/vnd.ms-excel.sheet.binary.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsb\"]},\"application/vnd.ms-excel.sheet.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xlsm\"]},\"application/vnd.ms-excel.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"xltm\"]},\"application/vnd.ms-fontobject\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eot\"]},\"application/vnd.ms-htmlhelp\":{\"source\":\"iana\",\"extensions\":[\"chm\"]},\"application/vnd.ms-ims\":{\"source\":\"iana\",\"extensions\":[\"ims\"]},\"application/vnd.ms-lrm\":{\"source\":\"iana\",\"extensions\":[\"lrm\"]},\"application/vnd.ms-office.activex+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-officetheme\":{\"source\":\"iana\",\"extensions\":[\"thmx\"]},\"application/vnd.ms-opentype\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-outlook\":{\"compressible\":false,\"extensions\":[\"msg\"]},\"application/vnd.ms-package.obfuscated-opentype\":{\"source\":\"apache\"},\"application/vnd.ms-pki.seccat\":{\"source\":\"apache\",\"extensions\":[\"cat\"]},\"application/vnd.ms-pki.stl\":{\"source\":\"apache\",\"extensions\":[\"stl\"]},\"application/vnd.ms-playready.initiator+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-powerpoint\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ppt\",\"pps\",\"pot\"]},\"application/vnd.ms-powerpoint.addin.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppam\"]},\"application/vnd.ms-powerpoint.presentation.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"pptm\"]},\"application/vnd.ms-powerpoint.slide.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"sldm\"]},\"application/vnd.ms-powerpoint.slideshow.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"ppsm\"]},\"application/vnd.ms-powerpoint.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"potm\"]},\"application/vnd.ms-printdevicecapabilities+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-printing.printticket+xml\":{\"source\":\"apache\",\"compressible\":true},\"application/vnd.ms-printschematicket+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.ms-project\":{\"source\":\"iana\",\"extensions\":[\"mpp\",\"mpt\"]},\"application/vnd.ms-tnef\":{\"source\":\"iana\"},\"application/vnd.ms-windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.nwprinting.oob\":{\"source\":\"iana\"},\"application/vnd.ms-windows.printerpairing\":{\"source\":\"iana\"},\"application/vnd.ms-windows.wsd.oob\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.lic-resp\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-chlg-req\":{\"source\":\"iana\"},\"application/vnd.ms-wmdrm.meter-resp\":{\"source\":\"iana\"},\"application/vnd.ms-word.document.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"docm\"]},\"application/vnd.ms-word.template.macroenabled.12\":{\"source\":\"iana\",\"extensions\":[\"dotm\"]},\"application/vnd.ms-works\":{\"source\":\"iana\",\"extensions\":[\"wps\",\"wks\",\"wcm\",\"wdb\"]},\"application/vnd.ms-wpl\":{\"source\":\"iana\",\"extensions\":[\"wpl\"]},\"application/vnd.ms-xpsdocument\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xps\"]},\"application/vnd.msa-disk-image\":{\"source\":\"iana\"},\"application/vnd.mseq\":{\"source\":\"iana\",\"extensions\":[\"mseq\"]},\"application/vnd.msign\":{\"source\":\"iana\"},\"application/vnd.multiad.creator\":{\"source\":\"iana\"},\"application/vnd.multiad.creator.cif\":{\"source\":\"iana\"},\"application/vnd.music-niff\":{\"source\":\"iana\"},\"application/vnd.musician\":{\"source\":\"iana\",\"extensions\":[\"mus\"]},\"application/vnd.muvee.style\":{\"source\":\"iana\",\"extensions\":[\"msty\"]},\"application/vnd.mynfc\":{\"source\":\"iana\",\"extensions\":[\"taglet\"]},\"application/vnd.ncd.control\":{\"source\":\"iana\"},\"application/vnd.ncd.reference\":{\"source\":\"iana\"},\"application/vnd.nearst.inv+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nebumind.line\":{\"source\":\"iana\"},\"application/vnd.nervana\":{\"source\":\"iana\"},\"application/vnd.netfpx\":{\"source\":\"iana\"},\"application/vnd.neurolanguage.nlu\":{\"source\":\"iana\",\"extensions\":[\"nlu\"]},\"application/vnd.nimn\":{\"source\":\"iana\"},\"application/vnd.nintendo.nitro.rom\":{\"source\":\"iana\"},\"application/vnd.nintendo.snes.rom\":{\"source\":\"iana\"},\"application/vnd.nitf\":{\"source\":\"iana\",\"extensions\":[\"ntf\",\"nitf\"]},\"application/vnd.noblenet-directory\":{\"source\":\"iana\",\"extensions\":[\"nnd\"]},\"application/vnd.noblenet-sealer\":{\"source\":\"iana\",\"extensions\":[\"nns\"]},\"application/vnd.noblenet-web\":{\"source\":\"iana\",\"extensions\":[\"nnw\"]},\"application/vnd.nokia.catalogs\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.conml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.iptv.config+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.isds-radio-presets\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.landmark+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.landmarkcollection+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.n-gage.ac+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ac\"]},\"application/vnd.nokia.n-gage.data\":{\"source\":\"iana\",\"extensions\":[\"ngdat\"]},\"application/vnd.nokia.n-gage.symbian.install\":{\"source\":\"iana\",\"extensions\":[\"n-gage\"]},\"application/vnd.nokia.ncd\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+wbxml\":{\"source\":\"iana\"},\"application/vnd.nokia.pcd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.nokia.radio-preset\":{\"source\":\"iana\",\"extensions\":[\"rpst\"]},\"application/vnd.nokia.radio-presets\":{\"source\":\"iana\",\"extensions\":[\"rpss\"]},\"application/vnd.novadigm.edm\":{\"source\":\"iana\",\"extensions\":[\"edm\"]},\"application/vnd.novadigm.edx\":{\"source\":\"iana\",\"extensions\":[\"edx\"]},\"application/vnd.novadigm.ext\":{\"source\":\"iana\",\"extensions\":[\"ext\"]},\"application/vnd.ntt-local.content-share\":{\"source\":\"iana\"},\"application/vnd.ntt-local.file-transfer\":{\"source\":\"iana\"},\"application/vnd.ntt-local.ogw_remote-access\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_remote\":{\"source\":\"iana\"},\"application/vnd.ntt-local.sip-ta_tcp_stream\":{\"source\":\"iana\"},\"application/vnd.oasis.opendocument.chart\":{\"source\":\"iana\",\"extensions\":[\"odc\"]},\"application/vnd.oasis.opendocument.chart-template\":{\"source\":\"iana\",\"extensions\":[\"otc\"]},\"application/vnd.oasis.opendocument.database\":{\"source\":\"iana\",\"extensions\":[\"odb\"]},\"application/vnd.oasis.opendocument.formula\":{\"source\":\"iana\",\"extensions\":[\"odf\"]},\"application/vnd.oasis.opendocument.formula-template\":{\"source\":\"iana\",\"extensions\":[\"odft\"]},\"application/vnd.oasis.opendocument.graphics\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odg\"]},\"application/vnd.oasis.opendocument.graphics-template\":{\"source\":\"iana\",\"extensions\":[\"otg\"]},\"application/vnd.oasis.opendocument.image\":{\"source\":\"iana\",\"extensions\":[\"odi\"]},\"application/vnd.oasis.opendocument.image-template\":{\"source\":\"iana\",\"extensions\":[\"oti\"]},\"application/vnd.oasis.opendocument.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odp\"]},\"application/vnd.oasis.opendocument.presentation-template\":{\"source\":\"iana\",\"extensions\":[\"otp\"]},\"application/vnd.oasis.opendocument.spreadsheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ods\"]},\"application/vnd.oasis.opendocument.spreadsheet-template\":{\"source\":\"iana\",\"extensions\":[\"ots\"]},\"application/vnd.oasis.opendocument.text\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"odt\"]},\"application/vnd.oasis.opendocument.text-master\":{\"source\":\"iana\",\"extensions\":[\"odm\"]},\"application/vnd.oasis.opendocument.text-template\":{\"source\":\"iana\",\"extensions\":[\"ott\"]},\"application/vnd.oasis.opendocument.text-web\":{\"source\":\"iana\",\"extensions\":[\"oth\"]},\"application/vnd.obn\":{\"source\":\"iana\"},\"application/vnd.ocf+cbor\":{\"source\":\"iana\"},\"application/vnd.oci.image.manifest.v1+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oftn.l10n+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessdownload+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.contentaccessstreaming+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.cspg-hexbinary\":{\"source\":\"iana\"},\"application/vnd.oipf.dae.svg+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.dae.xhtml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.mippvcontrolmessage+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.pae.gem\":{\"source\":\"iana\"},\"application/vnd.oipf.spdiscovery+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.spdlist+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.ueprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oipf.userprofile+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.olpc-sugar\":{\"source\":\"iana\",\"extensions\":[\"xo\"]},\"application/vnd.oma-scws-config\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-request\":{\"source\":\"iana\"},\"application/vnd.oma-scws-http-response\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.associated-procedure-parameter+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.drm-trigger+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.imd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.ltkm\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.notification+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.provisioningtrigger\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgboot\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.sgdd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.sgdu\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.simple-symbol-container\":{\"source\":\"iana\"},\"application/vnd.oma.bcast.smartcard-trigger+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.sprov+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.bcast.stkm\":{\"source\":\"iana\"},\"application/vnd.oma.cab-address-book+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-feature-handler+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-pcc+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-subs-invite+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.cab-user-prefs+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.dcd\":{\"source\":\"iana\"},\"application/vnd.oma.dcdc\":{\"source\":\"iana\"},\"application/vnd.oma.dd2+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dd2\"]},\"application/vnd.oma.drm.risd+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.group-usage-list+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+cbor\":{\"source\":\"iana\"},\"application/vnd.oma.lwm2m+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.lwm2m+tlv\":{\"source\":\"iana\"},\"application/vnd.oma.pal+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.detailed-progress-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.final-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.groups+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.invocation-descriptor+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.poc.optimized-progress-report+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.push\":{\"source\":\"iana\"},\"application/vnd.oma.scidm.messages+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oma.xcap-directory+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.omads-email+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omads-file+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omads-folder+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.omaloc-supl-init\":{\"source\":\"iana\"},\"application/vnd.onepager\":{\"source\":\"iana\"},\"application/vnd.onepagertamp\":{\"source\":\"iana\"},\"application/vnd.onepagertamx\":{\"source\":\"iana\"},\"application/vnd.onepagertat\":{\"source\":\"iana\"},\"application/vnd.onepagertatp\":{\"source\":\"iana\"},\"application/vnd.onepagertatx\":{\"source\":\"iana\"},\"application/vnd.openblox.game+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"obgx\"]},\"application/vnd.openblox.game-binary\":{\"source\":\"iana\"},\"application/vnd.openeye.oeb\":{\"source\":\"iana\"},\"application/vnd.openofficeorg.extension\":{\"source\":\"apache\",\"extensions\":[\"oxt\"]},\"application/vnd.openstreetmap.data+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"osm\"]},\"application/vnd.opentimestamps.ots\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.custom-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.customxmlproperties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawing+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.chart+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.extended-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.presentation\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"pptx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slide\":{\"source\":\"iana\",\"extensions\":[\"sldx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slide+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow\":{\"source\":\"iana\",\"extensions\":[\"ppsx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.tags+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.template\":{\"source\":\"iana\",\"extensions\":[\"potx\"]},\"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"xlsx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template\":{\"source\":\"iana\",\"extensions\":[\"xltx\"]},\"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.theme+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.themeoverride+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.vmldrawing\":{\"source\":\"iana\"},\"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"docx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template\":{\"source\":\"iana\",\"extensions\":[\"dotx\"]},\"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.core-properties+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.openxmlformats-package.relationships+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oracle.resource+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.orange.indata\":{\"source\":\"iana\"},\"application/vnd.osa.netdeploy\":{\"source\":\"iana\"},\"application/vnd.osgeo.mapguide.package\":{\"source\":\"iana\",\"extensions\":[\"mgp\"]},\"application/vnd.osgi.bundle\":{\"source\":\"iana\"},\"application/vnd.osgi.dp\":{\"source\":\"iana\",\"extensions\":[\"dp\"]},\"application/vnd.osgi.subsystem\":{\"source\":\"iana\",\"extensions\":[\"esa\"]},\"application/vnd.otps.ct-kip+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.oxli.countgraph\":{\"source\":\"iana\"},\"application/vnd.pagerduty+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.palm\":{\"source\":\"iana\",\"extensions\":[\"pdb\",\"pqa\",\"oprc\"]},\"application/vnd.panoply\":{\"source\":\"iana\"},\"application/vnd.paos.xml\":{\"source\":\"iana\"},\"application/vnd.patentdive\":{\"source\":\"iana\"},\"application/vnd.patientecommsdoc\":{\"source\":\"iana\"},\"application/vnd.pawaafile\":{\"source\":\"iana\",\"extensions\":[\"paw\"]},\"application/vnd.pcos\":{\"source\":\"iana\"},\"application/vnd.pg.format\":{\"source\":\"iana\",\"extensions\":[\"str\"]},\"application/vnd.pg.osasli\":{\"source\":\"iana\",\"extensions\":[\"ei6\"]},\"application/vnd.piaccess.application-licence\":{\"source\":\"iana\"},\"application/vnd.picsel\":{\"source\":\"iana\",\"extensions\":[\"efif\"]},\"application/vnd.pmi.widget\":{\"source\":\"iana\",\"extensions\":[\"wg\"]},\"application/vnd.poc.group-advertisement+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.pocketlearn\":{\"source\":\"iana\",\"extensions\":[\"plf\"]},\"application/vnd.powerbuilder6\":{\"source\":\"iana\",\"extensions\":[\"pbd\"]},\"application/vnd.powerbuilder6-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7\":{\"source\":\"iana\"},\"application/vnd.powerbuilder7-s\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75\":{\"source\":\"iana\"},\"application/vnd.powerbuilder75-s\":{\"source\":\"iana\"},\"application/vnd.preminet\":{\"source\":\"iana\"},\"application/vnd.previewsystems.box\":{\"source\":\"iana\",\"extensions\":[\"box\"]},\"application/vnd.proteus.magazine\":{\"source\":\"iana\",\"extensions\":[\"mgz\"]},\"application/vnd.psfs\":{\"source\":\"iana\"},\"application/vnd.publishare-delta-tree\":{\"source\":\"iana\",\"extensions\":[\"qps\"]},\"application/vnd.pvi.ptid1\":{\"source\":\"iana\",\"extensions\":[\"ptid\"]},\"application/vnd.pwg-multiplexed\":{\"source\":\"iana\"},\"application/vnd.pwg-xhtml-print+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.qualcomm.brew-app-res\":{\"source\":\"iana\"},\"application/vnd.quarantainenet\":{\"source\":\"iana\"},\"application/vnd.quark.quarkxpress\":{\"source\":\"iana\",\"extensions\":[\"qxd\",\"qxt\",\"qwd\",\"qwt\",\"qxl\",\"qxb\"]},\"application/vnd.quobject-quoxdocument\":{\"source\":\"iana\"},\"application/vnd.radisys.moml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-conf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-conn+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-dialog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-audit-stream+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-conf+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-base+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-fax-detect+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-fax-sendrecv+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-group+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-speech+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.radisys.msml-dialog-transform+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rainstor.data\":{\"source\":\"iana\"},\"application/vnd.rapid\":{\"source\":\"iana\"},\"application/vnd.rar\":{\"source\":\"iana\",\"extensions\":[\"rar\"]},\"application/vnd.realvnc.bed\":{\"source\":\"iana\",\"extensions\":[\"bed\"]},\"application/vnd.recordare.musicxml\":{\"source\":\"iana\",\"extensions\":[\"mxl\"]},\"application/vnd.recordare.musicxml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"musicxml\"]},\"application/vnd.renlearn.rlprint\":{\"source\":\"iana\"},\"application/vnd.resilient.logic\":{\"source\":\"iana\"},\"application/vnd.restful+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.rig.cryptonote\":{\"source\":\"iana\",\"extensions\":[\"cryptonote\"]},\"application/vnd.rim.cod\":{\"source\":\"apache\",\"extensions\":[\"cod\"]},\"application/vnd.rn-realmedia\":{\"source\":\"apache\",\"extensions\":[\"rm\"]},\"application/vnd.rn-realmedia-vbr\":{\"source\":\"apache\",\"extensions\":[\"rmvb\"]},\"application/vnd.route66.link66+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"link66\"]},\"application/vnd.rs-274x\":{\"source\":\"iana\"},\"application/vnd.ruckus.download\":{\"source\":\"iana\"},\"application/vnd.s3sms\":{\"source\":\"iana\"},\"application/vnd.sailingtracker.track\":{\"source\":\"iana\",\"extensions\":[\"st\"]},\"application/vnd.sar\":{\"source\":\"iana\"},\"application/vnd.sbm.cid\":{\"source\":\"iana\"},\"application/vnd.sbm.mid2\":{\"source\":\"iana\"},\"application/vnd.scribus\":{\"source\":\"iana\"},\"application/vnd.sealed.3df\":{\"source\":\"iana\"},\"application/vnd.sealed.csf\":{\"source\":\"iana\"},\"application/vnd.sealed.doc\":{\"source\":\"iana\"},\"application/vnd.sealed.eml\":{\"source\":\"iana\"},\"application/vnd.sealed.mht\":{\"source\":\"iana\"},\"application/vnd.sealed.net\":{\"source\":\"iana\"},\"application/vnd.sealed.ppt\":{\"source\":\"iana\"},\"application/vnd.sealed.tiff\":{\"source\":\"iana\"},\"application/vnd.sealed.xls\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.html\":{\"source\":\"iana\"},\"application/vnd.sealedmedia.softseal.pdf\":{\"source\":\"iana\"},\"application/vnd.seemail\":{\"source\":\"iana\",\"extensions\":[\"see\"]},\"application/vnd.seis+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.sema\":{\"source\":\"iana\",\"extensions\":[\"sema\"]},\"application/vnd.semd\":{\"source\":\"iana\",\"extensions\":[\"semd\"]},\"application/vnd.semf\":{\"source\":\"iana\",\"extensions\":[\"semf\"]},\"application/vnd.shade-save-file\":{\"source\":\"iana\"},\"application/vnd.shana.informed.formdata\":{\"source\":\"iana\",\"extensions\":[\"ifm\"]},\"application/vnd.shana.informed.formtemplate\":{\"source\":\"iana\",\"extensions\":[\"itp\"]},\"application/vnd.shana.informed.interchange\":{\"source\":\"iana\",\"extensions\":[\"iif\"]},\"application/vnd.shana.informed.package\":{\"source\":\"iana\",\"extensions\":[\"ipk\"]},\"application/vnd.shootproof+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.shopkick+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.shp\":{\"source\":\"iana\"},\"application/vnd.shx\":{\"source\":\"iana\"},\"application/vnd.sigrok.session\":{\"source\":\"iana\"},\"application/vnd.simtech-mindmapper\":{\"source\":\"iana\",\"extensions\":[\"twd\",\"twds\"]},\"application/vnd.siren+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.smaf\":{\"source\":\"iana\",\"extensions\":[\"mmf\"]},\"application/vnd.smart.notebook\":{\"source\":\"iana\"},\"application/vnd.smart.teacher\":{\"source\":\"iana\",\"extensions\":[\"teacher\"]},\"application/vnd.snesdev-page-table\":{\"source\":\"iana\"},\"application/vnd.software602.filler.form+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"fo\"]},\"application/vnd.software602.filler.form-xml-zip\":{\"source\":\"iana\"},\"application/vnd.solent.sdkm+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"sdkm\",\"sdkd\"]},\"application/vnd.spotfire.dxp\":{\"source\":\"iana\",\"extensions\":[\"dxp\"]},\"application/vnd.spotfire.sfs\":{\"source\":\"iana\",\"extensions\":[\"sfs\"]},\"application/vnd.sqlite3\":{\"source\":\"iana\"},\"application/vnd.sss-cod\":{\"source\":\"iana\"},\"application/vnd.sss-dtf\":{\"source\":\"iana\"},\"application/vnd.sss-ntf\":{\"source\":\"iana\"},\"application/vnd.stardivision.calc\":{\"source\":\"apache\",\"extensions\":[\"sdc\"]},\"application/vnd.stardivision.draw\":{\"source\":\"apache\",\"extensions\":[\"sda\"]},\"application/vnd.stardivision.impress\":{\"source\":\"apache\",\"extensions\":[\"sdd\"]},\"application/vnd.stardivision.math\":{\"source\":\"apache\",\"extensions\":[\"smf\"]},\"application/vnd.stardivision.writer\":{\"source\":\"apache\",\"extensions\":[\"sdw\",\"vor\"]},\"application/vnd.stardivision.writer-global\":{\"source\":\"apache\",\"extensions\":[\"sgl\"]},\"application/vnd.stepmania.package\":{\"source\":\"iana\",\"extensions\":[\"smzip\"]},\"application/vnd.stepmania.stepchart\":{\"source\":\"iana\",\"extensions\":[\"sm\"]},\"application/vnd.street-stream\":{\"source\":\"iana\"},\"application/vnd.sun.wadl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wadl\"]},\"application/vnd.sun.xml.calc\":{\"source\":\"apache\",\"extensions\":[\"sxc\"]},\"application/vnd.sun.xml.calc.template\":{\"source\":\"apache\",\"extensions\":[\"stc\"]},\"application/vnd.sun.xml.draw\":{\"source\":\"apache\",\"extensions\":[\"sxd\"]},\"application/vnd.sun.xml.draw.template\":{\"source\":\"apache\",\"extensions\":[\"std\"]},\"application/vnd.sun.xml.impress\":{\"source\":\"apache\",\"extensions\":[\"sxi\"]},\"application/vnd.sun.xml.impress.template\":{\"source\":\"apache\",\"extensions\":[\"sti\"]},\"application/vnd.sun.xml.math\":{\"source\":\"apache\",\"extensions\":[\"sxm\"]},\"application/vnd.sun.xml.writer\":{\"source\":\"apache\",\"extensions\":[\"sxw\"]},\"application/vnd.sun.xml.writer.global\":{\"source\":\"apache\",\"extensions\":[\"sxg\"]},\"application/vnd.sun.xml.writer.template\":{\"source\":\"apache\",\"extensions\":[\"stw\"]},\"application/vnd.sus-calendar\":{\"source\":\"iana\",\"extensions\":[\"sus\",\"susp\"]},\"application/vnd.svd\":{\"source\":\"iana\",\"extensions\":[\"svd\"]},\"application/vnd.swiftview-ics\":{\"source\":\"iana\"},\"application/vnd.sycle+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.symbian.install\":{\"source\":\"apache\",\"extensions\":[\"sis\",\"sisx\"]},\"application/vnd.syncml+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"xsm\"]},\"application/vnd.syncml.dm+wbxml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"bdm\"]},\"application/vnd.syncml.dm+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"xdm\"]},\"application/vnd.syncml.dm.notification\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmddf+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"ddf\"]},\"application/vnd.syncml.dmtnds+wbxml\":{\"source\":\"iana\"},\"application/vnd.syncml.dmtnds+xml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true},\"application/vnd.syncml.ds.notification\":{\"source\":\"iana\"},\"application/vnd.tableschema+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tao.intent-module-archive\":{\"source\":\"iana\",\"extensions\":[\"tao\"]},\"application/vnd.tcpdump.pcap\":{\"source\":\"iana\",\"extensions\":[\"pcap\",\"cap\",\"dmp\"]},\"application/vnd.think-cell.ppttc+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tmd.mediaflex.api+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.tml\":{\"source\":\"iana\"},\"application/vnd.tmobile-livetv\":{\"source\":\"iana\",\"extensions\":[\"tmo\"]},\"application/vnd.tri.onesource\":{\"source\":\"iana\"},\"application/vnd.trid.tpt\":{\"source\":\"iana\",\"extensions\":[\"tpt\"]},\"application/vnd.triscape.mxs\":{\"source\":\"iana\",\"extensions\":[\"mxs\"]},\"application/vnd.trueapp\":{\"source\":\"iana\",\"extensions\":[\"tra\"]},\"application/vnd.truedoc\":{\"source\":\"iana\"},\"application/vnd.ubisoft.webplayer\":{\"source\":\"iana\"},\"application/vnd.ufdl\":{\"source\":\"iana\",\"extensions\":[\"ufd\",\"ufdl\"]},\"application/vnd.uiq.theme\":{\"source\":\"iana\",\"extensions\":[\"utz\"]},\"application/vnd.umajin\":{\"source\":\"iana\",\"extensions\":[\"umj\"]},\"application/vnd.unity\":{\"source\":\"iana\",\"extensions\":[\"unityweb\"]},\"application/vnd.uoml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uoml\"]},\"application/vnd.uplanet.alert\":{\"source\":\"iana\"},\"application/vnd.uplanet.alert-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice\":{\"source\":\"iana\"},\"application/vnd.uplanet.bearer-choice-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop\":{\"source\":\"iana\"},\"application/vnd.uplanet.cacheop-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel\":{\"source\":\"iana\"},\"application/vnd.uplanet.channel-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.list\":{\"source\":\"iana\"},\"application/vnd.uplanet.list-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd\":{\"source\":\"iana\"},\"application/vnd.uplanet.listcmd-wbxml\":{\"source\":\"iana\"},\"application/vnd.uplanet.signal\":{\"source\":\"iana\"},\"application/vnd.uri-map\":{\"source\":\"iana\"},\"application/vnd.valve.source.material\":{\"source\":\"iana\"},\"application/vnd.vcx\":{\"source\":\"iana\",\"extensions\":[\"vcx\"]},\"application/vnd.vd-study\":{\"source\":\"iana\"},\"application/vnd.vectorworks\":{\"source\":\"iana\"},\"application/vnd.vel+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.verimatrix.vcas\":{\"source\":\"iana\"},\"application/vnd.veritone.aion+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.veryant.thin\":{\"source\":\"iana\"},\"application/vnd.ves.encrypted\":{\"source\":\"iana\"},\"application/vnd.vidsoft.vidconference\":{\"source\":\"iana\"},\"application/vnd.visio\":{\"source\":\"iana\",\"extensions\":[\"vsd\",\"vst\",\"vss\",\"vsw\"]},\"application/vnd.visionary\":{\"source\":\"iana\",\"extensions\":[\"vis\"]},\"application/vnd.vividence.scriptfile\":{\"source\":\"iana\"},\"application/vnd.vsf\":{\"source\":\"iana\",\"extensions\":[\"vsf\"]},\"application/vnd.wap.sic\":{\"source\":\"iana\"},\"application/vnd.wap.slc\":{\"source\":\"iana\"},\"application/vnd.wap.wbxml\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"wbxml\"]},\"application/vnd.wap.wmlc\":{\"source\":\"iana\",\"extensions\":[\"wmlc\"]},\"application/vnd.wap.wmlscriptc\":{\"source\":\"iana\",\"extensions\":[\"wmlsc\"]},\"application/vnd.webturbo\":{\"source\":\"iana\",\"extensions\":[\"wtb\"]},\"application/vnd.wfa.dpp\":{\"source\":\"iana\"},\"application/vnd.wfa.p2p\":{\"source\":\"iana\"},\"application/vnd.wfa.wsc\":{\"source\":\"iana\"},\"application/vnd.windows.devicepairing\":{\"source\":\"iana\"},\"application/vnd.wmc\":{\"source\":\"iana\"},\"application/vnd.wmf.bootstrap\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica\":{\"source\":\"iana\"},\"application/vnd.wolfram.mathematica.package\":{\"source\":\"iana\"},\"application/vnd.wolfram.player\":{\"source\":\"iana\",\"extensions\":[\"nbp\"]},\"application/vnd.wordperfect\":{\"source\":\"iana\",\"extensions\":[\"wpd\"]},\"application/vnd.wqd\":{\"source\":\"iana\",\"extensions\":[\"wqd\"]},\"application/vnd.wrq-hp3000-labelled\":{\"source\":\"iana\"},\"application/vnd.wt.stf\":{\"source\":\"iana\",\"extensions\":[\"stf\"]},\"application/vnd.wv.csp+wbxml\":{\"source\":\"iana\"},\"application/vnd.wv.csp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.wv.ssp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xacml+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xara\":{\"source\":\"iana\",\"extensions\":[\"xar\"]},\"application/vnd.xfdl\":{\"source\":\"iana\",\"extensions\":[\"xfdl\"]},\"application/vnd.xfdl.webform\":{\"source\":\"iana\"},\"application/vnd.xmi+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/vnd.xmpie.cpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.dpkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.plan\":{\"source\":\"iana\"},\"application/vnd.xmpie.ppkg\":{\"source\":\"iana\"},\"application/vnd.xmpie.xlim\":{\"source\":\"iana\"},\"application/vnd.yamaha.hv-dic\":{\"source\":\"iana\",\"extensions\":[\"hvd\"]},\"application/vnd.yamaha.hv-script\":{\"source\":\"iana\",\"extensions\":[\"hvs\"]},\"application/vnd.yamaha.hv-voice\":{\"source\":\"iana\",\"extensions\":[\"hvp\"]},\"application/vnd.yamaha.openscoreformat\":{\"source\":\"iana\",\"extensions\":[\"osf\"]},\"application/vnd.yamaha.openscoreformat.osfpvg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"osfpvg\"]},\"application/vnd.yamaha.remote-setup\":{\"source\":\"iana\"},\"application/vnd.yamaha.smaf-audio\":{\"source\":\"iana\",\"extensions\":[\"saf\"]},\"application/vnd.yamaha.smaf-phrase\":{\"source\":\"iana\",\"extensions\":[\"spf\"]},\"application/vnd.yamaha.through-ngn\":{\"source\":\"iana\"},\"application/vnd.yamaha.tunnel-udpencap\":{\"source\":\"iana\"},\"application/vnd.yaoweme\":{\"source\":\"iana\"},\"application/vnd.yellowriver-custom-menu\":{\"source\":\"iana\",\"extensions\":[\"cmp\"]},\"application/vnd.youtube.yt\":{\"source\":\"iana\"},\"application/vnd.zul\":{\"source\":\"iana\",\"extensions\":[\"zir\",\"zirz\"]},\"application/vnd.zzazz.deck+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"zaz\"]},\"application/voicexml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vxml\"]},\"application/voucher-cms+json\":{\"source\":\"iana\",\"compressible\":true},\"application/vq-rtcpxr\":{\"source\":\"iana\"},\"application/wasm\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wasm\"]},\"application/watcherinfo+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/webpush-options+json\":{\"source\":\"iana\",\"compressible\":true},\"application/whoispp-query\":{\"source\":\"iana\"},\"application/whoispp-response\":{\"source\":\"iana\"},\"application/widget\":{\"source\":\"iana\",\"extensions\":[\"wgt\"]},\"application/winhlp\":{\"source\":\"apache\",\"extensions\":[\"hlp\"]},\"application/wita\":{\"source\":\"iana\"},\"application/wordperfect5.1\":{\"source\":\"iana\"},\"application/wsdl+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wsdl\"]},\"application/wspolicy+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"wspolicy\"]},\"application/x-7z-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"7z\"]},\"application/x-abiword\":{\"source\":\"apache\",\"extensions\":[\"abw\"]},\"application/x-ace-compressed\":{\"source\":\"apache\",\"extensions\":[\"ace\"]},\"application/x-amf\":{\"source\":\"apache\"},\"application/x-apple-diskimage\":{\"source\":\"apache\",\"extensions\":[\"dmg\"]},\"application/x-arj\":{\"compressible\":false,\"extensions\":[\"arj\"]},\"application/x-authorware-bin\":{\"source\":\"apache\",\"extensions\":[\"aab\",\"x32\",\"u32\",\"vox\"]},\"application/x-authorware-map\":{\"source\":\"apache\",\"extensions\":[\"aam\"]},\"application/x-authorware-seg\":{\"source\":\"apache\",\"extensions\":[\"aas\"]},\"application/x-bcpio\":{\"source\":\"apache\",\"extensions\":[\"bcpio\"]},\"application/x-bdoc\":{\"compressible\":false,\"extensions\":[\"bdoc\"]},\"application/x-bittorrent\":{\"source\":\"apache\",\"extensions\":[\"torrent\"]},\"application/x-blorb\":{\"source\":\"apache\",\"extensions\":[\"blb\",\"blorb\"]},\"application/x-bzip\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz\"]},\"application/x-bzip2\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"bz2\",\"boz\"]},\"application/x-cbr\":{\"source\":\"apache\",\"extensions\":[\"cbr\",\"cba\",\"cbt\",\"cbz\",\"cb7\"]},\"application/x-cdlink\":{\"source\":\"apache\",\"extensions\":[\"vcd\"]},\"application/x-cfs-compressed\":{\"source\":\"apache\",\"extensions\":[\"cfs\"]},\"application/x-chat\":{\"source\":\"apache\",\"extensions\":[\"chat\"]},\"application/x-chess-pgn\":{\"source\":\"apache\",\"extensions\":[\"pgn\"]},\"application/x-chrome-extension\":{\"extensions\":[\"crx\"]},\"application/x-cocoa\":{\"source\":\"nginx\",\"extensions\":[\"cco\"]},\"application/x-compress\":{\"source\":\"apache\"},\"application/x-conference\":{\"source\":\"apache\",\"extensions\":[\"nsc\"]},\"application/x-cpio\":{\"source\":\"apache\",\"extensions\":[\"cpio\"]},\"application/x-csh\":{\"source\":\"apache\",\"extensions\":[\"csh\"]},\"application/x-deb\":{\"compressible\":false},\"application/x-debian-package\":{\"source\":\"apache\",\"extensions\":[\"deb\",\"udeb\"]},\"application/x-dgc-compressed\":{\"source\":\"apache\",\"extensions\":[\"dgc\"]},\"application/x-director\":{\"source\":\"apache\",\"extensions\":[\"dir\",\"dcr\",\"dxr\",\"cst\",\"cct\",\"cxt\",\"w3d\",\"fgd\",\"swa\"]},\"application/x-doom\":{\"source\":\"apache\",\"extensions\":[\"wad\"]},\"application/x-dtbncx+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ncx\"]},\"application/x-dtbook+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"dtb\"]},\"application/x-dtbresource+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"res\"]},\"application/x-dvi\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"dvi\"]},\"application/x-envoy\":{\"source\":\"apache\",\"extensions\":[\"evy\"]},\"application/x-eva\":{\"source\":\"apache\",\"extensions\":[\"eva\"]},\"application/x-font-bdf\":{\"source\":\"apache\",\"extensions\":[\"bdf\"]},\"application/x-font-dos\":{\"source\":\"apache\"},\"application/x-font-framemaker\":{\"source\":\"apache\"},\"application/x-font-ghostscript\":{\"source\":\"apache\",\"extensions\":[\"gsf\"]},\"application/x-font-libgrx\":{\"source\":\"apache\"},\"application/x-font-linux-psf\":{\"source\":\"apache\",\"extensions\":[\"psf\"]},\"application/x-font-pcf\":{\"source\":\"apache\",\"extensions\":[\"pcf\"]},\"application/x-font-snf\":{\"source\":\"apache\",\"extensions\":[\"snf\"]},\"application/x-font-speedo\":{\"source\":\"apache\"},\"application/x-font-sunos-news\":{\"source\":\"apache\"},\"application/x-font-type1\":{\"source\":\"apache\",\"extensions\":[\"pfa\",\"pfb\",\"pfm\",\"afm\"]},\"application/x-font-vfont\":{\"source\":\"apache\"},\"application/x-freearc\":{\"source\":\"apache\",\"extensions\":[\"arc\"]},\"application/x-futuresplash\":{\"source\":\"apache\",\"extensions\":[\"spl\"]},\"application/x-gca-compressed\":{\"source\":\"apache\",\"extensions\":[\"gca\"]},\"application/x-glulx\":{\"source\":\"apache\",\"extensions\":[\"ulx\"]},\"application/x-gnumeric\":{\"source\":\"apache\",\"extensions\":[\"gnumeric\"]},\"application/x-gramps-xml\":{\"source\":\"apache\",\"extensions\":[\"gramps\"]},\"application/x-gtar\":{\"source\":\"apache\",\"extensions\":[\"gtar\"]},\"application/x-gzip\":{\"source\":\"apache\"},\"application/x-hdf\":{\"source\":\"apache\",\"extensions\":[\"hdf\"]},\"application/x-httpd-php\":{\"compressible\":true,\"extensions\":[\"php\"]},\"application/x-install-instructions\":{\"source\":\"apache\",\"extensions\":[\"install\"]},\"application/x-iso9660-image\":{\"source\":\"apache\",\"extensions\":[\"iso\"]},\"application/x-iwork-keynote-sffkey\":{\"extensions\":[\"key\"]},\"application/x-iwork-numbers-sffnumbers\":{\"extensions\":[\"numbers\"]},\"application/x-iwork-pages-sffpages\":{\"extensions\":[\"pages\"]},\"application/x-java-archive-diff\":{\"source\":\"nginx\",\"extensions\":[\"jardiff\"]},\"application/x-java-jnlp-file\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"jnlp\"]},\"application/x-javascript\":{\"compressible\":true},\"application/x-keepass2\":{\"extensions\":[\"kdbx\"]},\"application/x-latex\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"latex\"]},\"application/x-lua-bytecode\":{\"extensions\":[\"luac\"]},\"application/x-lzh-compressed\":{\"source\":\"apache\",\"extensions\":[\"lzh\",\"lha\"]},\"application/x-makeself\":{\"source\":\"nginx\",\"extensions\":[\"run\"]},\"application/x-mie\":{\"source\":\"apache\",\"extensions\":[\"mie\"]},\"application/x-mobipocket-ebook\":{\"source\":\"apache\",\"extensions\":[\"prc\",\"mobi\"]},\"application/x-mpegurl\":{\"compressible\":false},\"application/x-ms-application\":{\"source\":\"apache\",\"extensions\":[\"application\"]},\"application/x-ms-shortcut\":{\"source\":\"apache\",\"extensions\":[\"lnk\"]},\"application/x-ms-wmd\":{\"source\":\"apache\",\"extensions\":[\"wmd\"]},\"application/x-ms-wmz\":{\"source\":\"apache\",\"extensions\":[\"wmz\"]},\"application/x-ms-xbap\":{\"source\":\"apache\",\"extensions\":[\"xbap\"]},\"application/x-msaccess\":{\"source\":\"apache\",\"extensions\":[\"mdb\"]},\"application/x-msbinder\":{\"source\":\"apache\",\"extensions\":[\"obd\"]},\"application/x-mscardfile\":{\"source\":\"apache\",\"extensions\":[\"crd\"]},\"application/x-msclip\":{\"source\":\"apache\",\"extensions\":[\"clp\"]},\"application/x-msdos-program\":{\"extensions\":[\"exe\"]},\"application/x-msdownload\":{\"source\":\"apache\",\"extensions\":[\"exe\",\"dll\",\"com\",\"bat\",\"msi\"]},\"application/x-msmediaview\":{\"source\":\"apache\",\"extensions\":[\"mvb\",\"m13\",\"m14\"]},\"application/x-msmetafile\":{\"source\":\"apache\",\"extensions\":[\"wmf\",\"wmz\",\"emf\",\"emz\"]},\"application/x-msmoney\":{\"source\":\"apache\",\"extensions\":[\"mny\"]},\"application/x-mspublisher\":{\"source\":\"apache\",\"extensions\":[\"pub\"]},\"application/x-msschedule\":{\"source\":\"apache\",\"extensions\":[\"scd\"]},\"application/x-msterminal\":{\"source\":\"apache\",\"extensions\":[\"trm\"]},\"application/x-mswrite\":{\"source\":\"apache\",\"extensions\":[\"wri\"]},\"application/x-netcdf\":{\"source\":\"apache\",\"extensions\":[\"nc\",\"cdf\"]},\"application/x-ns-proxy-autoconfig\":{\"compressible\":true,\"extensions\":[\"pac\"]},\"application/x-nzb\":{\"source\":\"apache\",\"extensions\":[\"nzb\"]},\"application/x-perl\":{\"source\":\"nginx\",\"extensions\":[\"pl\",\"pm\"]},\"application/x-pilot\":{\"source\":\"nginx\",\"extensions\":[\"prc\",\"pdb\"]},\"application/x-pkcs12\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"p12\",\"pfx\"]},\"application/x-pkcs7-certificates\":{\"source\":\"apache\",\"extensions\":[\"p7b\",\"spc\"]},\"application/x-pkcs7-certreqresp\":{\"source\":\"apache\",\"extensions\":[\"p7r\"]},\"application/x-pki-message\":{\"source\":\"iana\"},\"application/x-rar-compressed\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"rar\"]},\"application/x-redhat-package-manager\":{\"source\":\"nginx\",\"extensions\":[\"rpm\"]},\"application/x-research-info-systems\":{\"source\":\"apache\",\"extensions\":[\"ris\"]},\"application/x-sea\":{\"source\":\"nginx\",\"extensions\":[\"sea\"]},\"application/x-sh\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"sh\"]},\"application/x-shar\":{\"source\":\"apache\",\"extensions\":[\"shar\"]},\"application/x-shockwave-flash\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"swf\"]},\"application/x-silverlight-app\":{\"source\":\"apache\",\"extensions\":[\"xap\"]},\"application/x-sql\":{\"source\":\"apache\",\"extensions\":[\"sql\"]},\"application/x-stuffit\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"sit\"]},\"application/x-stuffitx\":{\"source\":\"apache\",\"extensions\":[\"sitx\"]},\"application/x-subrip\":{\"source\":\"apache\",\"extensions\":[\"srt\"]},\"application/x-sv4cpio\":{\"source\":\"apache\",\"extensions\":[\"sv4cpio\"]},\"application/x-sv4crc\":{\"source\":\"apache\",\"extensions\":[\"sv4crc\"]},\"application/x-t3vm-image\":{\"source\":\"apache\",\"extensions\":[\"t3\"]},\"application/x-tads\":{\"source\":\"apache\",\"extensions\":[\"gam\"]},\"application/x-tar\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"tar\"]},\"application/x-tcl\":{\"source\":\"apache\",\"extensions\":[\"tcl\",\"tk\"]},\"application/x-tex\":{\"source\":\"apache\",\"extensions\":[\"tex\"]},\"application/x-tex-tfm\":{\"source\":\"apache\",\"extensions\":[\"tfm\"]},\"application/x-texinfo\":{\"source\":\"apache\",\"extensions\":[\"texinfo\",\"texi\"]},\"application/x-tgif\":{\"source\":\"apache\",\"extensions\":[\"obj\"]},\"application/x-ustar\":{\"source\":\"apache\",\"extensions\":[\"ustar\"]},\"application/x-virtualbox-hdd\":{\"compressible\":true,\"extensions\":[\"hdd\"]},\"application/x-virtualbox-ova\":{\"compressible\":true,\"extensions\":[\"ova\"]},\"application/x-virtualbox-ovf\":{\"compressible\":true,\"extensions\":[\"ovf\"]},\"application/x-virtualbox-vbox\":{\"compressible\":true,\"extensions\":[\"vbox\"]},\"application/x-virtualbox-vbox-extpack\":{\"compressible\":false,\"extensions\":[\"vbox-extpack\"]},\"application/x-virtualbox-vdi\":{\"compressible\":true,\"extensions\":[\"vdi\"]},\"application/x-virtualbox-vhd\":{\"compressible\":true,\"extensions\":[\"vhd\"]},\"application/x-virtualbox-vmdk\":{\"compressible\":true,\"extensions\":[\"vmdk\"]},\"application/x-wais-source\":{\"source\":\"apache\",\"extensions\":[\"src\"]},\"application/x-web-app-manifest+json\":{\"compressible\":true,\"extensions\":[\"webapp\"]},\"application/x-www-form-urlencoded\":{\"source\":\"iana\",\"compressible\":true},\"application/x-x509-ca-cert\":{\"source\":\"iana\",\"extensions\":[\"der\",\"crt\",\"pem\"]},\"application/x-x509-ca-ra-cert\":{\"source\":\"iana\"},\"application/x-x509-next-ca-cert\":{\"source\":\"iana\"},\"application/x-xfig\":{\"source\":\"apache\",\"extensions\":[\"fig\"]},\"application/x-xliff+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xlf\"]},\"application/x-xpinstall\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"xpi\"]},\"application/x-xz\":{\"source\":\"apache\",\"extensions\":[\"xz\"]},\"application/x-zmachine\":{\"source\":\"apache\",\"extensions\":[\"z1\",\"z2\",\"z3\",\"z4\",\"z5\",\"z6\",\"z7\",\"z8\"]},\"application/x400-bp\":{\"source\":\"iana\"},\"application/xacml+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xaml+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xaml\"]},\"application/xcap-att+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xav\"]},\"application/xcap-caps+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xca\"]},\"application/xcap-diff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xdf\"]},\"application/xcap-el+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xel\"]},\"application/xcap-error+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xcap-ns+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xns\"]},\"application/xcon-conference-info+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xcon-conference-info-diff+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xenc+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xenc\"]},\"application/xhtml+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xhtml\",\"xht\"]},\"application/xhtml-voice+xml\":{\"source\":\"apache\",\"compressible\":true},\"application/xliff+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xlf\"]},\"application/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\",\"xsl\",\"xsd\",\"rng\"]},\"application/xml-dtd\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dtd\"]},\"application/xml-external-parsed-entity\":{\"source\":\"iana\"},\"application/xml-patch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xmpp+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/xop+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xop\"]},\"application/xproc+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xpl\"]},\"application/xslt+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xsl\",\"xslt\"]},\"application/xspf+xml\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"xspf\"]},\"application/xv+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"mxml\",\"xhvml\",\"xvml\",\"xvm\"]},\"application/yang\":{\"source\":\"iana\",\"extensions\":[\"yang\"]},\"application/yang-data+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-data+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+json\":{\"source\":\"iana\",\"compressible\":true},\"application/yang-patch+xml\":{\"source\":\"iana\",\"compressible\":true},\"application/yin+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"yin\"]},\"application/zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"zip\"]},\"application/zlib\":{\"source\":\"iana\"},\"application/zstd\":{\"source\":\"iana\"},\"audio/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"audio/32kadpcm\":{\"source\":\"iana\"},\"audio/3gpp\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"3gpp\"]},\"audio/3gpp2\":{\"source\":\"iana\"},\"audio/aac\":{\"source\":\"iana\"},\"audio/ac3\":{\"source\":\"iana\"},\"audio/adpcm\":{\"source\":\"apache\",\"extensions\":[\"adp\"]},\"audio/amr\":{\"source\":\"iana\",\"extensions\":[\"amr\"]},\"audio/amr-wb\":{\"source\":\"iana\"},\"audio/amr-wb+\":{\"source\":\"iana\"},\"audio/aptx\":{\"source\":\"iana\"},\"audio/asc\":{\"source\":\"iana\"},\"audio/atrac-advanced-lossless\":{\"source\":\"iana\"},\"audio/atrac-x\":{\"source\":\"iana\"},\"audio/atrac3\":{\"source\":\"iana\"},\"audio/basic\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"au\",\"snd\"]},\"audio/bv16\":{\"source\":\"iana\"},\"audio/bv32\":{\"source\":\"iana\"},\"audio/clearmode\":{\"source\":\"iana\"},\"audio/cn\":{\"source\":\"iana\"},\"audio/dat12\":{\"source\":\"iana\"},\"audio/dls\":{\"source\":\"iana\"},\"audio/dsr-es201108\":{\"source\":\"iana\"},\"audio/dsr-es202050\":{\"source\":\"iana\"},\"audio/dsr-es202211\":{\"source\":\"iana\"},\"audio/dsr-es202212\":{\"source\":\"iana\"},\"audio/dv\":{\"source\":\"iana\"},\"audio/dvi4\":{\"source\":\"iana\"},\"audio/eac3\":{\"source\":\"iana\"},\"audio/encaprtp\":{\"source\":\"iana\"},\"audio/evrc\":{\"source\":\"iana\"},\"audio/evrc-qcp\":{\"source\":\"iana\"},\"audio/evrc0\":{\"source\":\"iana\"},\"audio/evrc1\":{\"source\":\"iana\"},\"audio/evrcb\":{\"source\":\"iana\"},\"audio/evrcb0\":{\"source\":\"iana\"},\"audio/evrcb1\":{\"source\":\"iana\"},\"audio/evrcnw\":{\"source\":\"iana\"},\"audio/evrcnw0\":{\"source\":\"iana\"},\"audio/evrcnw1\":{\"source\":\"iana\"},\"audio/evrcwb\":{\"source\":\"iana\"},\"audio/evrcwb0\":{\"source\":\"iana\"},\"audio/evrcwb1\":{\"source\":\"iana\"},\"audio/evs\":{\"source\":\"iana\"},\"audio/flexfec\":{\"source\":\"iana\"},\"audio/fwdred\":{\"source\":\"iana\"},\"audio/g711-0\":{\"source\":\"iana\"},\"audio/g719\":{\"source\":\"iana\"},\"audio/g722\":{\"source\":\"iana\"},\"audio/g7221\":{\"source\":\"iana\"},\"audio/g723\":{\"source\":\"iana\"},\"audio/g726-16\":{\"source\":\"iana\"},\"audio/g726-24\":{\"source\":\"iana\"},\"audio/g726-32\":{\"source\":\"iana\"},\"audio/g726-40\":{\"source\":\"iana\"},\"audio/g728\":{\"source\":\"iana\"},\"audio/g729\":{\"source\":\"iana\"},\"audio/g7291\":{\"source\":\"iana\"},\"audio/g729d\":{\"source\":\"iana\"},\"audio/g729e\":{\"source\":\"iana\"},\"audio/gsm\":{\"source\":\"iana\"},\"audio/gsm-efr\":{\"source\":\"iana\"},\"audio/gsm-hr-08\":{\"source\":\"iana\"},\"audio/ilbc\":{\"source\":\"iana\"},\"audio/ip-mr_v2.5\":{\"source\":\"iana\"},\"audio/isac\":{\"source\":\"apache\"},\"audio/l16\":{\"source\":\"iana\"},\"audio/l20\":{\"source\":\"iana\"},\"audio/l24\":{\"source\":\"iana\",\"compressible\":false},\"audio/l8\":{\"source\":\"iana\"},\"audio/lpc\":{\"source\":\"iana\"},\"audio/melp\":{\"source\":\"iana\"},\"audio/melp1200\":{\"source\":\"iana\"},\"audio/melp2400\":{\"source\":\"iana\"},\"audio/melp600\":{\"source\":\"iana\"},\"audio/mhas\":{\"source\":\"iana\"},\"audio/midi\":{\"source\":\"apache\",\"extensions\":[\"mid\",\"midi\",\"kar\",\"rmi\"]},\"audio/mobile-xmf\":{\"source\":\"iana\",\"extensions\":[\"mxmf\"]},\"audio/mp3\":{\"compressible\":false,\"extensions\":[\"mp3\"]},\"audio/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"m4a\",\"mp4a\"]},\"audio/mp4a-latm\":{\"source\":\"iana\"},\"audio/mpa\":{\"source\":\"iana\"},\"audio/mpa-robust\":{\"source\":\"iana\"},\"audio/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpga\",\"mp2\",\"mp2a\",\"mp3\",\"m2a\",\"m3a\"]},\"audio/mpeg4-generic\":{\"source\":\"iana\"},\"audio/musepack\":{\"source\":\"apache\"},\"audio/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"oga\",\"ogg\",\"spx\",\"opus\"]},\"audio/opus\":{\"source\":\"iana\"},\"audio/parityfec\":{\"source\":\"iana\"},\"audio/pcma\":{\"source\":\"iana\"},\"audio/pcma-wb\":{\"source\":\"iana\"},\"audio/pcmu\":{\"source\":\"iana\"},\"audio/pcmu-wb\":{\"source\":\"iana\"},\"audio/prs.sid\":{\"source\":\"iana\"},\"audio/qcelp\":{\"source\":\"iana\"},\"audio/raptorfec\":{\"source\":\"iana\"},\"audio/red\":{\"source\":\"iana\"},\"audio/rtp-enc-aescm128\":{\"source\":\"iana\"},\"audio/rtp-midi\":{\"source\":\"iana\"},\"audio/rtploopback\":{\"source\":\"iana\"},\"audio/rtx\":{\"source\":\"iana\"},\"audio/s3m\":{\"source\":\"apache\",\"extensions\":[\"s3m\"]},\"audio/scip\":{\"source\":\"iana\"},\"audio/silk\":{\"source\":\"apache\",\"extensions\":[\"sil\"]},\"audio/smv\":{\"source\":\"iana\"},\"audio/smv-qcp\":{\"source\":\"iana\"},\"audio/smv0\":{\"source\":\"iana\"},\"audio/sofa\":{\"source\":\"iana\"},\"audio/sp-midi\":{\"source\":\"iana\"},\"audio/speex\":{\"source\":\"iana\"},\"audio/t140c\":{\"source\":\"iana\"},\"audio/t38\":{\"source\":\"iana\"},\"audio/telephone-event\":{\"source\":\"iana\"},\"audio/tetra_acelp\":{\"source\":\"iana\"},\"audio/tetra_acelp_bb\":{\"source\":\"iana\"},\"audio/tone\":{\"source\":\"iana\"},\"audio/tsvcis\":{\"source\":\"iana\"},\"audio/uemclip\":{\"source\":\"iana\"},\"audio/ulpfec\":{\"source\":\"iana\"},\"audio/usac\":{\"source\":\"iana\"},\"audio/vdvi\":{\"source\":\"iana\"},\"audio/vmr-wb\":{\"source\":\"iana\"},\"audio/vnd.3gpp.iufp\":{\"source\":\"iana\"},\"audio/vnd.4sb\":{\"source\":\"iana\"},\"audio/vnd.audiokoz\":{\"source\":\"iana\"},\"audio/vnd.celp\":{\"source\":\"iana\"},\"audio/vnd.cisco.nse\":{\"source\":\"iana\"},\"audio/vnd.cmles.radio-events\":{\"source\":\"iana\"},\"audio/vnd.cns.anp1\":{\"source\":\"iana\"},\"audio/vnd.cns.inf1\":{\"source\":\"iana\"},\"audio/vnd.dece.audio\":{\"source\":\"iana\",\"extensions\":[\"uva\",\"uvva\"]},\"audio/vnd.digital-winds\":{\"source\":\"iana\",\"extensions\":[\"eol\"]},\"audio/vnd.dlna.adts\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.1\":{\"source\":\"iana\"},\"audio/vnd.dolby.heaac.2\":{\"source\":\"iana\"},\"audio/vnd.dolby.mlp\":{\"source\":\"iana\"},\"audio/vnd.dolby.mps\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2x\":{\"source\":\"iana\"},\"audio/vnd.dolby.pl2z\":{\"source\":\"iana\"},\"audio/vnd.dolby.pulse.1\":{\"source\":\"iana\"},\"audio/vnd.dra\":{\"source\":\"iana\",\"extensions\":[\"dra\"]},\"audio/vnd.dts\":{\"source\":\"iana\",\"extensions\":[\"dts\"]},\"audio/vnd.dts.hd\":{\"source\":\"iana\",\"extensions\":[\"dtshd\"]},\"audio/vnd.dts.uhd\":{\"source\":\"iana\"},\"audio/vnd.dvb.file\":{\"source\":\"iana\"},\"audio/vnd.everad.plj\":{\"source\":\"iana\"},\"audio/vnd.hns.audio\":{\"source\":\"iana\"},\"audio/vnd.lucent.voice\":{\"source\":\"iana\",\"extensions\":[\"lvp\"]},\"audio/vnd.ms-playready.media.pya\":{\"source\":\"iana\",\"extensions\":[\"pya\"]},\"audio/vnd.nokia.mobile-xmf\":{\"source\":\"iana\"},\"audio/vnd.nortel.vbk\":{\"source\":\"iana\"},\"audio/vnd.nuera.ecelp4800\":{\"source\":\"iana\",\"extensions\":[\"ecelp4800\"]},\"audio/vnd.nuera.ecelp7470\":{\"source\":\"iana\",\"extensions\":[\"ecelp7470\"]},\"audio/vnd.nuera.ecelp9600\":{\"source\":\"iana\",\"extensions\":[\"ecelp9600\"]},\"audio/vnd.octel.sbc\":{\"source\":\"iana\"},\"audio/vnd.presonus.multitrack\":{\"source\":\"iana\"},\"audio/vnd.qcelp\":{\"source\":\"iana\"},\"audio/vnd.rhetorex.32kadpcm\":{\"source\":\"iana\"},\"audio/vnd.rip\":{\"source\":\"iana\",\"extensions\":[\"rip\"]},\"audio/vnd.rn-realaudio\":{\"compressible\":false},\"audio/vnd.sealedmedia.softseal.mpeg\":{\"source\":\"iana\"},\"audio/vnd.vmx.cvsd\":{\"source\":\"iana\"},\"audio/vnd.wave\":{\"compressible\":false},\"audio/vorbis\":{\"source\":\"iana\",\"compressible\":false},\"audio/vorbis-config\":{\"source\":\"iana\"},\"audio/wav\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/wave\":{\"compressible\":false,\"extensions\":[\"wav\"]},\"audio/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"weba\"]},\"audio/x-aac\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"aac\"]},\"audio/x-aiff\":{\"source\":\"apache\",\"extensions\":[\"aif\",\"aiff\",\"aifc\"]},\"audio/x-caf\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"caf\"]},\"audio/x-flac\":{\"source\":\"apache\",\"extensions\":[\"flac\"]},\"audio/x-m4a\":{\"source\":\"nginx\",\"extensions\":[\"m4a\"]},\"audio/x-matroska\":{\"source\":\"apache\",\"extensions\":[\"mka\"]},\"audio/x-mpegurl\":{\"source\":\"apache\",\"extensions\":[\"m3u\"]},\"audio/x-ms-wax\":{\"source\":\"apache\",\"extensions\":[\"wax\"]},\"audio/x-ms-wma\":{\"source\":\"apache\",\"extensions\":[\"wma\"]},\"audio/x-pn-realaudio\":{\"source\":\"apache\",\"extensions\":[\"ram\",\"ra\"]},\"audio/x-pn-realaudio-plugin\":{\"source\":\"apache\",\"extensions\":[\"rmp\"]},\"audio/x-realaudio\":{\"source\":\"nginx\",\"extensions\":[\"ra\"]},\"audio/x-tta\":{\"source\":\"apache\"},\"audio/x-wav\":{\"source\":\"apache\",\"extensions\":[\"wav\"]},\"audio/xm\":{\"source\":\"apache\",\"extensions\":[\"xm\"]},\"chemical/x-cdx\":{\"source\":\"apache\",\"extensions\":[\"cdx\"]},\"chemical/x-cif\":{\"source\":\"apache\",\"extensions\":[\"cif\"]},\"chemical/x-cmdf\":{\"source\":\"apache\",\"extensions\":[\"cmdf\"]},\"chemical/x-cml\":{\"source\":\"apache\",\"extensions\":[\"cml\"]},\"chemical/x-csml\":{\"source\":\"apache\",\"extensions\":[\"csml\"]},\"chemical/x-pdb\":{\"source\":\"apache\"},\"chemical/x-xyz\":{\"source\":\"apache\",\"extensions\":[\"xyz\"]},\"font/collection\":{\"source\":\"iana\",\"extensions\":[\"ttc\"]},\"font/otf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"otf\"]},\"font/sfnt\":{\"source\":\"iana\"},\"font/ttf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"ttf\"]},\"font/woff\":{\"source\":\"iana\",\"extensions\":[\"woff\"]},\"font/woff2\":{\"source\":\"iana\",\"extensions\":[\"woff2\"]},\"image/aces\":{\"source\":\"iana\",\"extensions\":[\"exr\"]},\"image/apng\":{\"compressible\":false,\"extensions\":[\"apng\"]},\"image/avci\":{\"source\":\"iana\"},\"image/avcs\":{\"source\":\"iana\"},\"image/avif\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"avif\"]},\"image/bmp\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/cgm\":{\"source\":\"iana\",\"extensions\":[\"cgm\"]},\"image/dicom-rle\":{\"source\":\"iana\",\"extensions\":[\"drle\"]},\"image/emf\":{\"source\":\"iana\",\"extensions\":[\"emf\"]},\"image/fits\":{\"source\":\"iana\",\"extensions\":[\"fits\"]},\"image/g3fax\":{\"source\":\"iana\",\"extensions\":[\"g3\"]},\"image/gif\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"gif\"]},\"image/heic\":{\"source\":\"iana\",\"extensions\":[\"heic\"]},\"image/heic-sequence\":{\"source\":\"iana\",\"extensions\":[\"heics\"]},\"image/heif\":{\"source\":\"iana\",\"extensions\":[\"heif\"]},\"image/heif-sequence\":{\"source\":\"iana\",\"extensions\":[\"heifs\"]},\"image/hej2k\":{\"source\":\"iana\",\"extensions\":[\"hej2\"]},\"image/hsj2\":{\"source\":\"iana\",\"extensions\":[\"hsj2\"]},\"image/ief\":{\"source\":\"iana\",\"extensions\":[\"ief\"]},\"image/jls\":{\"source\":\"iana\",\"extensions\":[\"jls\"]},\"image/jp2\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jp2\",\"jpg2\"]},\"image/jpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpeg\",\"jpg\",\"jpe\"]},\"image/jph\":{\"source\":\"iana\",\"extensions\":[\"jph\"]},\"image/jphc\":{\"source\":\"iana\",\"extensions\":[\"jhc\"]},\"image/jpm\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpm\"]},\"image/jpx\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"jpx\",\"jpf\"]},\"image/jxr\":{\"source\":\"iana\",\"extensions\":[\"jxr\"]},\"image/jxra\":{\"source\":\"iana\",\"extensions\":[\"jxra\"]},\"image/jxrs\":{\"source\":\"iana\",\"extensions\":[\"jxrs\"]},\"image/jxs\":{\"source\":\"iana\",\"extensions\":[\"jxs\"]},\"image/jxsc\":{\"source\":\"iana\",\"extensions\":[\"jxsc\"]},\"image/jxsi\":{\"source\":\"iana\",\"extensions\":[\"jxsi\"]},\"image/jxss\":{\"source\":\"iana\",\"extensions\":[\"jxss\"]},\"image/ktx\":{\"source\":\"iana\",\"extensions\":[\"ktx\"]},\"image/ktx2\":{\"source\":\"iana\",\"extensions\":[\"ktx2\"]},\"image/naplps\":{\"source\":\"iana\"},\"image/pjpeg\":{\"compressible\":false},\"image/png\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"png\"]},\"image/prs.btif\":{\"source\":\"iana\",\"extensions\":[\"btif\"]},\"image/prs.pti\":{\"source\":\"iana\",\"extensions\":[\"pti\"]},\"image/pwg-raster\":{\"source\":\"iana\"},\"image/sgi\":{\"source\":\"apache\",\"extensions\":[\"sgi\"]},\"image/svg+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"svg\",\"svgz\"]},\"image/t38\":{\"source\":\"iana\",\"extensions\":[\"t38\"]},\"image/tiff\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"tif\",\"tiff\"]},\"image/tiff-fx\":{\"source\":\"iana\",\"extensions\":[\"tfx\"]},\"image/vnd.adobe.photoshop\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"psd\"]},\"image/vnd.airzip.accelerator.azv\":{\"source\":\"iana\",\"extensions\":[\"azv\"]},\"image/vnd.cns.inf2\":{\"source\":\"iana\"},\"image/vnd.dece.graphic\":{\"source\":\"iana\",\"extensions\":[\"uvi\",\"uvvi\",\"uvg\",\"uvvg\"]},\"image/vnd.djvu\":{\"source\":\"iana\",\"extensions\":[\"djvu\",\"djv\"]},\"image/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"image/vnd.dwg\":{\"source\":\"iana\",\"extensions\":[\"dwg\"]},\"image/vnd.dxf\":{\"source\":\"iana\",\"extensions\":[\"dxf\"]},\"image/vnd.fastbidsheet\":{\"source\":\"iana\",\"extensions\":[\"fbs\"]},\"image/vnd.fpx\":{\"source\":\"iana\",\"extensions\":[\"fpx\"]},\"image/vnd.fst\":{\"source\":\"iana\",\"extensions\":[\"fst\"]},\"image/vnd.fujixerox.edmics-mmr\":{\"source\":\"iana\",\"extensions\":[\"mmr\"]},\"image/vnd.fujixerox.edmics-rlc\":{\"source\":\"iana\",\"extensions\":[\"rlc\"]},\"image/vnd.globalgraphics.pgb\":{\"source\":\"iana\"},\"image/vnd.microsoft.icon\":{\"source\":\"iana\",\"extensions\":[\"ico\"]},\"image/vnd.mix\":{\"source\":\"iana\"},\"image/vnd.mozilla.apng\":{\"source\":\"iana\"},\"image/vnd.ms-dds\":{\"extensions\":[\"dds\"]},\"image/vnd.ms-modi\":{\"source\":\"iana\",\"extensions\":[\"mdi\"]},\"image/vnd.ms-photo\":{\"source\":\"apache\",\"extensions\":[\"wdp\"]},\"image/vnd.net-fpx\":{\"source\":\"iana\",\"extensions\":[\"npx\"]},\"image/vnd.pco.b16\":{\"source\":\"iana\",\"extensions\":[\"b16\"]},\"image/vnd.radiance\":{\"source\":\"iana\"},\"image/vnd.sealed.png\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.gif\":{\"source\":\"iana\"},\"image/vnd.sealedmedia.softseal.jpg\":{\"source\":\"iana\"},\"image/vnd.svf\":{\"source\":\"iana\"},\"image/vnd.tencent.tap\":{\"source\":\"iana\",\"extensions\":[\"tap\"]},\"image/vnd.valve.source.texture\":{\"source\":\"iana\",\"extensions\":[\"vtf\"]},\"image/vnd.wap.wbmp\":{\"source\":\"iana\",\"extensions\":[\"wbmp\"]},\"image/vnd.xiff\":{\"source\":\"iana\",\"extensions\":[\"xif\"]},\"image/vnd.zbrush.pcx\":{\"source\":\"iana\",\"extensions\":[\"pcx\"]},\"image/webp\":{\"source\":\"apache\",\"extensions\":[\"webp\"]},\"image/wmf\":{\"source\":\"iana\",\"extensions\":[\"wmf\"]},\"image/x-3ds\":{\"source\":\"apache\",\"extensions\":[\"3ds\"]},\"image/x-cmu-raster\":{\"source\":\"apache\",\"extensions\":[\"ras\"]},\"image/x-cmx\":{\"source\":\"apache\",\"extensions\":[\"cmx\"]},\"image/x-freehand\":{\"source\":\"apache\",\"extensions\":[\"fh\",\"fhc\",\"fh4\",\"fh5\",\"fh7\"]},\"image/x-icon\":{\"source\":\"apache\",\"compressible\":true,\"extensions\":[\"ico\"]},\"image/x-jng\":{\"source\":\"nginx\",\"extensions\":[\"jng\"]},\"image/x-mrsid-image\":{\"source\":\"apache\",\"extensions\":[\"sid\"]},\"image/x-ms-bmp\":{\"source\":\"nginx\",\"compressible\":true,\"extensions\":[\"bmp\"]},\"image/x-pcx\":{\"source\":\"apache\",\"extensions\":[\"pcx\"]},\"image/x-pict\":{\"source\":\"apache\",\"extensions\":[\"pic\",\"pct\"]},\"image/x-portable-anymap\":{\"source\":\"apache\",\"extensions\":[\"pnm\"]},\"image/x-portable-bitmap\":{\"source\":\"apache\",\"extensions\":[\"pbm\"]},\"image/x-portable-graymap\":{\"source\":\"apache\",\"extensions\":[\"pgm\"]},\"image/x-portable-pixmap\":{\"source\":\"apache\",\"extensions\":[\"ppm\"]},\"image/x-rgb\":{\"source\":\"apache\",\"extensions\":[\"rgb\"]},\"image/x-tga\":{\"source\":\"apache\",\"extensions\":[\"tga\"]},\"image/x-xbitmap\":{\"source\":\"apache\",\"extensions\":[\"xbm\"]},\"image/x-xcf\":{\"compressible\":false},\"image/x-xpixmap\":{\"source\":\"apache\",\"extensions\":[\"xpm\"]},\"image/x-xwindowdump\":{\"source\":\"apache\",\"extensions\":[\"xwd\"]},\"message/cpim\":{\"source\":\"iana\"},\"message/delivery-status\":{\"source\":\"iana\"},\"message/disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"disposition-notification\"]},\"message/external-body\":{\"source\":\"iana\"},\"message/feedback-report\":{\"source\":\"iana\"},\"message/global\":{\"source\":\"iana\",\"extensions\":[\"u8msg\"]},\"message/global-delivery-status\":{\"source\":\"iana\",\"extensions\":[\"u8dsn\"]},\"message/global-disposition-notification\":{\"source\":\"iana\",\"extensions\":[\"u8mdn\"]},\"message/global-headers\":{\"source\":\"iana\",\"extensions\":[\"u8hdr\"]},\"message/http\":{\"source\":\"iana\",\"compressible\":false},\"message/imdn+xml\":{\"source\":\"iana\",\"compressible\":true},\"message/news\":{\"source\":\"iana\"},\"message/partial\":{\"source\":\"iana\",\"compressible\":false},\"message/rfc822\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"eml\",\"mime\"]},\"message/s-http\":{\"source\":\"iana\"},\"message/sip\":{\"source\":\"iana\"},\"message/sipfrag\":{\"source\":\"iana\"},\"message/tracking-status\":{\"source\":\"iana\"},\"message/vnd.si.simp\":{\"source\":\"iana\"},\"message/vnd.wfa.wsc\":{\"source\":\"iana\",\"extensions\":[\"wsc\"]},\"model/3mf\":{\"source\":\"iana\",\"extensions\":[\"3mf\"]},\"model/e57\":{\"source\":\"iana\"},\"model/gltf+json\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"gltf\"]},\"model/gltf-binary\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"glb\"]},\"model/iges\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"igs\",\"iges\"]},\"model/mesh\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"msh\",\"mesh\",\"silo\"]},\"model/mtl\":{\"source\":\"iana\",\"extensions\":[\"mtl\"]},\"model/obj\":{\"source\":\"iana\",\"extensions\":[\"obj\"]},\"model/step\":{\"source\":\"iana\"},\"model/step+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"stpx\"]},\"model/step+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"stpz\"]},\"model/step-xml+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"stpxz\"]},\"model/stl\":{\"source\":\"iana\",\"extensions\":[\"stl\"]},\"model/vnd.collada+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"dae\"]},\"model/vnd.dwf\":{\"source\":\"iana\",\"extensions\":[\"dwf\"]},\"model/vnd.flatland.3dml\":{\"source\":\"iana\"},\"model/vnd.gdl\":{\"source\":\"iana\",\"extensions\":[\"gdl\"]},\"model/vnd.gs-gdl\":{\"source\":\"apache\"},\"model/vnd.gs.gdl\":{\"source\":\"iana\"},\"model/vnd.gtw\":{\"source\":\"iana\",\"extensions\":[\"gtw\"]},\"model/vnd.moml+xml\":{\"source\":\"iana\",\"compressible\":true},\"model/vnd.mts\":{\"source\":\"iana\",\"extensions\":[\"mts\"]},\"model/vnd.opengex\":{\"source\":\"iana\",\"extensions\":[\"ogex\"]},\"model/vnd.parasolid.transmit.binary\":{\"source\":\"iana\",\"extensions\":[\"x_b\"]},\"model/vnd.parasolid.transmit.text\":{\"source\":\"iana\",\"extensions\":[\"x_t\"]},\"model/vnd.pytha.pyox\":{\"source\":\"iana\"},\"model/vnd.rosette.annotated-data-model\":{\"source\":\"iana\"},\"model/vnd.sap.vds\":{\"source\":\"iana\",\"extensions\":[\"vds\"]},\"model/vnd.usdz+zip\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"usdz\"]},\"model/vnd.valve.source.compiled-map\":{\"source\":\"iana\",\"extensions\":[\"bsp\"]},\"model/vnd.vtu\":{\"source\":\"iana\",\"extensions\":[\"vtu\"]},\"model/vrml\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"wrl\",\"vrml\"]},\"model/x3d+binary\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3db\",\"x3dbz\"]},\"model/x3d+fastinfoset\":{\"source\":\"iana\",\"extensions\":[\"x3db\"]},\"model/x3d+vrml\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"x3dv\",\"x3dvz\"]},\"model/x3d+xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"x3d\",\"x3dz\"]},\"model/x3d-vrml\":{\"source\":\"iana\",\"extensions\":[\"x3dv\"]},\"multipart/alternative\":{\"source\":\"iana\",\"compressible\":false},\"multipart/appledouble\":{\"source\":\"iana\"},\"multipart/byteranges\":{\"source\":\"iana\"},\"multipart/digest\":{\"source\":\"iana\"},\"multipart/encrypted\":{\"source\":\"iana\",\"compressible\":false},\"multipart/form-data\":{\"source\":\"iana\",\"compressible\":false},\"multipart/header-set\":{\"source\":\"iana\"},\"multipart/mixed\":{\"source\":\"iana\"},\"multipart/multilingual\":{\"source\":\"iana\"},\"multipart/parallel\":{\"source\":\"iana\"},\"multipart/related\":{\"source\":\"iana\",\"compressible\":false},\"multipart/report\":{\"source\":\"iana\"},\"multipart/signed\":{\"source\":\"iana\",\"compressible\":false},\"multipart/vnd.bint.med-plus\":{\"source\":\"iana\"},\"multipart/voice-message\":{\"source\":\"iana\"},\"multipart/x-mixed-replace\":{\"source\":\"iana\"},\"text/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"text/cache-manifest\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"appcache\",\"manifest\"]},\"text/calendar\":{\"source\":\"iana\",\"extensions\":[\"ics\",\"ifb\"]},\"text/calender\":{\"compressible\":true},\"text/cmd\":{\"compressible\":true},\"text/coffeescript\":{\"extensions\":[\"coffee\",\"litcoffee\"]},\"text/cql\":{\"source\":\"iana\"},\"text/cql-expression\":{\"source\":\"iana\"},\"text/cql-identifier\":{\"source\":\"iana\"},\"text/css\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"css\"]},\"text/csv\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"csv\"]},\"text/csv-schema\":{\"source\":\"iana\"},\"text/directory\":{\"source\":\"iana\"},\"text/dns\":{\"source\":\"iana\"},\"text/ecmascript\":{\"source\":\"iana\"},\"text/encaprtp\":{\"source\":\"iana\"},\"text/enriched\":{\"source\":\"iana\"},\"text/fhirpath\":{\"source\":\"iana\"},\"text/flexfec\":{\"source\":\"iana\"},\"text/fwdred\":{\"source\":\"iana\"},\"text/gff3\":{\"source\":\"iana\"},\"text/grammar-ref-list\":{\"source\":\"iana\"},\"text/html\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"html\",\"htm\",\"shtml\"]},\"text/jade\":{\"extensions\":[\"jade\"]},\"text/javascript\":{\"source\":\"iana\",\"compressible\":true},\"text/jcr-cnd\":{\"source\":\"iana\"},\"text/jsx\":{\"compressible\":true,\"extensions\":[\"jsx\"]},\"text/less\":{\"compressible\":true,\"extensions\":[\"less\"]},\"text/markdown\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"markdown\",\"md\"]},\"text/mathml\":{\"source\":\"nginx\",\"extensions\":[\"mml\"]},\"text/mdx\":{\"compressible\":true,\"extensions\":[\"mdx\"]},\"text/mizar\":{\"source\":\"iana\"},\"text/n3\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"n3\"]},\"text/parameters\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/parityfec\":{\"source\":\"iana\"},\"text/plain\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"txt\",\"text\",\"conf\",\"def\",\"list\",\"log\",\"in\",\"ini\"]},\"text/provenance-notation\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/prs.fallenstein.rst\":{\"source\":\"iana\"},\"text/prs.lines.tag\":{\"source\":\"iana\",\"extensions\":[\"dsc\"]},\"text/prs.prop.logic\":{\"source\":\"iana\"},\"text/raptorfec\":{\"source\":\"iana\"},\"text/red\":{\"source\":\"iana\"},\"text/rfc822-headers\":{\"source\":\"iana\"},\"text/richtext\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtx\"]},\"text/rtf\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"rtf\"]},\"text/rtp-enc-aescm128\":{\"source\":\"iana\"},\"text/rtploopback\":{\"source\":\"iana\"},\"text/rtx\":{\"source\":\"iana\"},\"text/sgml\":{\"source\":\"iana\",\"extensions\":[\"sgml\",\"sgm\"]},\"text/shaclc\":{\"source\":\"iana\"},\"text/shex\":{\"source\":\"iana\",\"extensions\":[\"shex\"]},\"text/slim\":{\"extensions\":[\"slim\",\"slm\"]},\"text/spdx\":{\"source\":\"iana\",\"extensions\":[\"spdx\"]},\"text/strings\":{\"source\":\"iana\"},\"text/stylus\":{\"extensions\":[\"stylus\",\"styl\"]},\"text/t140\":{\"source\":\"iana\"},\"text/tab-separated-values\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"tsv\"]},\"text/troff\":{\"source\":\"iana\",\"extensions\":[\"t\",\"tr\",\"roff\",\"man\",\"me\",\"ms\"]},\"text/turtle\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"ttl\"]},\"text/ulpfec\":{\"source\":\"iana\"},\"text/uri-list\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"uri\",\"uris\",\"urls\"]},\"text/vcard\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"vcard\"]},\"text/vnd.a\":{\"source\":\"iana\"},\"text/vnd.abc\":{\"source\":\"iana\"},\"text/vnd.ascii-art\":{\"source\":\"iana\"},\"text/vnd.curl\":{\"source\":\"iana\",\"extensions\":[\"curl\"]},\"text/vnd.curl.dcurl\":{\"source\":\"apache\",\"extensions\":[\"dcurl\"]},\"text/vnd.curl.mcurl\":{\"source\":\"apache\",\"extensions\":[\"mcurl\"]},\"text/vnd.curl.scurl\":{\"source\":\"apache\",\"extensions\":[\"scurl\"]},\"text/vnd.debian.copyright\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.dmclientscript\":{\"source\":\"iana\"},\"text/vnd.dvb.subtitle\":{\"source\":\"iana\",\"extensions\":[\"sub\"]},\"text/vnd.esmertec.theme-descriptor\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.ficlab.flt\":{\"source\":\"iana\"},\"text/vnd.fly\":{\"source\":\"iana\",\"extensions\":[\"fly\"]},\"text/vnd.fmi.flexstor\":{\"source\":\"iana\",\"extensions\":[\"flx\"]},\"text/vnd.gml\":{\"source\":\"iana\"},\"text/vnd.graphviz\":{\"source\":\"iana\",\"extensions\":[\"gv\"]},\"text/vnd.hans\":{\"source\":\"iana\"},\"text/vnd.hgl\":{\"source\":\"iana\"},\"text/vnd.in3d.3dml\":{\"source\":\"iana\",\"extensions\":[\"3dml\"]},\"text/vnd.in3d.spot\":{\"source\":\"iana\",\"extensions\":[\"spot\"]},\"text/vnd.iptc.newsml\":{\"source\":\"iana\"},\"text/vnd.iptc.nitf\":{\"source\":\"iana\"},\"text/vnd.latex-z\":{\"source\":\"iana\"},\"text/vnd.motorola.reflex\":{\"source\":\"iana\"},\"text/vnd.ms-mediapackage\":{\"source\":\"iana\"},\"text/vnd.net2phone.commcenter.command\":{\"source\":\"iana\"},\"text/vnd.radisys.msml-basic-layout\":{\"source\":\"iana\"},\"text/vnd.senx.warpscript\":{\"source\":\"iana\"},\"text/vnd.si.uricatalogue\":{\"source\":\"iana\"},\"text/vnd.sosi\":{\"source\":\"iana\"},\"text/vnd.sun.j2me.app-descriptor\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"extensions\":[\"jad\"]},\"text/vnd.trolltech.linguist\":{\"source\":\"iana\",\"charset\":\"UTF-8\"},\"text/vnd.wap.si\":{\"source\":\"iana\"},\"text/vnd.wap.sl\":{\"source\":\"iana\"},\"text/vnd.wap.wml\":{\"source\":\"iana\",\"extensions\":[\"wml\"]},\"text/vnd.wap.wmlscript\":{\"source\":\"iana\",\"extensions\":[\"wmls\"]},\"text/vtt\":{\"source\":\"iana\",\"charset\":\"UTF-8\",\"compressible\":true,\"extensions\":[\"vtt\"]},\"text/x-asm\":{\"source\":\"apache\",\"extensions\":[\"s\",\"asm\"]},\"text/x-c\":{\"source\":\"apache\",\"extensions\":[\"c\",\"cc\",\"cxx\",\"cpp\",\"h\",\"hh\",\"dic\"]},\"text/x-component\":{\"source\":\"nginx\",\"extensions\":[\"htc\"]},\"text/x-fortran\":{\"source\":\"apache\",\"extensions\":[\"f\",\"for\",\"f77\",\"f90\"]},\"text/x-gwt-rpc\":{\"compressible\":true},\"text/x-handlebars-template\":{\"extensions\":[\"hbs\"]},\"text/x-java-source\":{\"source\":\"apache\",\"extensions\":[\"java\"]},\"text/x-jquery-tmpl\":{\"compressible\":true},\"text/x-lua\":{\"extensions\":[\"lua\"]},\"text/x-markdown\":{\"compressible\":true,\"extensions\":[\"mkd\"]},\"text/x-nfo\":{\"source\":\"apache\",\"extensions\":[\"nfo\"]},\"text/x-opml\":{\"source\":\"apache\",\"extensions\":[\"opml\"]},\"text/x-org\":{\"compressible\":true,\"extensions\":[\"org\"]},\"text/x-pascal\":{\"source\":\"apache\",\"extensions\":[\"p\",\"pas\"]},\"text/x-processing\":{\"compressible\":true,\"extensions\":[\"pde\"]},\"text/x-sass\":{\"extensions\":[\"sass\"]},\"text/x-scss\":{\"extensions\":[\"scss\"]},\"text/x-setext\":{\"source\":\"apache\",\"extensions\":[\"etx\"]},\"text/x-sfv\":{\"source\":\"apache\",\"extensions\":[\"sfv\"]},\"text/x-suse-ymp\":{\"compressible\":true,\"extensions\":[\"ymp\"]},\"text/x-uuencode\":{\"source\":\"apache\",\"extensions\":[\"uu\"]},\"text/x-vcalendar\":{\"source\":\"apache\",\"extensions\":[\"vcs\"]},\"text/x-vcard\":{\"source\":\"apache\",\"extensions\":[\"vcf\"]},\"text/xml\":{\"source\":\"iana\",\"compressible\":true,\"extensions\":[\"xml\"]},\"text/xml-external-parsed-entity\":{\"source\":\"iana\"},\"text/yaml\":{\"compressible\":true,\"extensions\":[\"yaml\",\"yml\"]},\"video/1d-interleaved-parityfec\":{\"source\":\"iana\"},\"video/3gpp\":{\"source\":\"iana\",\"extensions\":[\"3gp\",\"3gpp\"]},\"video/3gpp-tt\":{\"source\":\"iana\"},\"video/3gpp2\":{\"source\":\"iana\",\"extensions\":[\"3g2\"]},\"video/av1\":{\"source\":\"iana\"},\"video/bmpeg\":{\"source\":\"iana\"},\"video/bt656\":{\"source\":\"iana\"},\"video/celb\":{\"source\":\"iana\"},\"video/dv\":{\"source\":\"iana\"},\"video/encaprtp\":{\"source\":\"iana\"},\"video/ffv1\":{\"source\":\"iana\"},\"video/flexfec\":{\"source\":\"iana\"},\"video/h261\":{\"source\":\"iana\",\"extensions\":[\"h261\"]},\"video/h263\":{\"source\":\"iana\",\"extensions\":[\"h263\"]},\"video/h263-1998\":{\"source\":\"iana\"},\"video/h263-2000\":{\"source\":\"iana\"},\"video/h264\":{\"source\":\"iana\",\"extensions\":[\"h264\"]},\"video/h264-rcdo\":{\"source\":\"iana\"},\"video/h264-svc\":{\"source\":\"iana\"},\"video/h265\":{\"source\":\"iana\"},\"video/iso.segment\":{\"source\":\"iana\",\"extensions\":[\"m4s\"]},\"video/jpeg\":{\"source\":\"iana\",\"extensions\":[\"jpgv\"]},\"video/jpeg2000\":{\"source\":\"iana\"},\"video/jpm\":{\"source\":\"apache\",\"extensions\":[\"jpm\",\"jpgm\"]},\"video/jxsv\":{\"source\":\"iana\"},\"video/mj2\":{\"source\":\"iana\",\"extensions\":[\"mj2\",\"mjp2\"]},\"video/mp1s\":{\"source\":\"iana\"},\"video/mp2p\":{\"source\":\"iana\"},\"video/mp2t\":{\"source\":\"iana\",\"extensions\":[\"ts\"]},\"video/mp4\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mp4\",\"mp4v\",\"mpg4\"]},\"video/mp4v-es\":{\"source\":\"iana\"},\"video/mpeg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"mpeg\",\"mpg\",\"mpe\",\"m1v\",\"m2v\"]},\"video/mpeg4-generic\":{\"source\":\"iana\"},\"video/mpv\":{\"source\":\"iana\"},\"video/nv\":{\"source\":\"iana\"},\"video/ogg\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"ogv\"]},\"video/parityfec\":{\"source\":\"iana\"},\"video/pointer\":{\"source\":\"iana\"},\"video/quicktime\":{\"source\":\"iana\",\"compressible\":false,\"extensions\":[\"qt\",\"mov\"]},\"video/raptorfec\":{\"source\":\"iana\"},\"video/raw\":{\"source\":\"iana\"},\"video/rtp-enc-aescm128\":{\"source\":\"iana\"},\"video/rtploopback\":{\"source\":\"iana\"},\"video/rtx\":{\"source\":\"iana\"},\"video/scip\":{\"source\":\"iana\"},\"video/smpte291\":{\"source\":\"iana\"},\"video/smpte292m\":{\"source\":\"iana\"},\"video/ulpfec\":{\"source\":\"iana\"},\"video/vc1\":{\"source\":\"iana\"},\"video/vc2\":{\"source\":\"iana\"},\"video/vnd.cctv\":{\"source\":\"iana\"},\"video/vnd.dece.hd\":{\"source\":\"iana\",\"extensions\":[\"uvh\",\"uvvh\"]},\"video/vnd.dece.mobile\":{\"source\":\"iana\",\"extensions\":[\"uvm\",\"uvvm\"]},\"video/vnd.dece.mp4\":{\"source\":\"iana\"},\"video/vnd.dece.pd\":{\"source\":\"iana\",\"extensions\":[\"uvp\",\"uvvp\"]},\"video/vnd.dece.sd\":{\"source\":\"iana\",\"extensions\":[\"uvs\",\"uvvs\"]},\"video/vnd.dece.video\":{\"source\":\"iana\",\"extensions\":[\"uvv\",\"uvvv\"]},\"video/vnd.directv.mpeg\":{\"source\":\"iana\"},\"video/vnd.directv.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dlna.mpeg-tts\":{\"source\":\"iana\"},\"video/vnd.dvb.file\":{\"source\":\"iana\",\"extensions\":[\"dvb\"]},\"video/vnd.fvt\":{\"source\":\"iana\",\"extensions\":[\"fvt\"]},\"video/vnd.hns.video\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.1dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-1010\":{\"source\":\"iana\"},\"video/vnd.iptvforum.2dparityfec-2005\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsavc\":{\"source\":\"iana\"},\"video/vnd.iptvforum.ttsmpeg2\":{\"source\":\"iana\"},\"video/vnd.motorola.video\":{\"source\":\"iana\"},\"video/vnd.motorola.videop\":{\"source\":\"iana\"},\"video/vnd.mpegurl\":{\"source\":\"iana\",\"extensions\":[\"mxu\",\"m4u\"]},\"video/vnd.ms-playready.media.pyv\":{\"source\":\"iana\",\"extensions\":[\"pyv\"]},\"video/vnd.nokia.interleaved-multimedia\":{\"source\":\"iana\"},\"video/vnd.nokia.mp4vr\":{\"source\":\"iana\"},\"video/vnd.nokia.videovoip\":{\"source\":\"iana\"},\"video/vnd.objectvideo\":{\"source\":\"iana\"},\"video/vnd.radgamettools.bink\":{\"source\":\"iana\"},\"video/vnd.radgamettools.smacker\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg1\":{\"source\":\"iana\"},\"video/vnd.sealed.mpeg4\":{\"source\":\"iana\"},\"video/vnd.sealed.swf\":{\"source\":\"iana\"},\"video/vnd.sealedmedia.softseal.mov\":{\"source\":\"iana\"},\"video/vnd.uvvu.mp4\":{\"source\":\"iana\",\"extensions\":[\"uvu\",\"uvvu\"]},\"video/vnd.vivo\":{\"source\":\"iana\",\"extensions\":[\"viv\"]},\"video/vnd.youtube.yt\":{\"source\":\"iana\"},\"video/vp8\":{\"source\":\"iana\"},\"video/vp9\":{\"source\":\"iana\"},\"video/webm\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"webm\"]},\"video/x-f4v\":{\"source\":\"apache\",\"extensions\":[\"f4v\"]},\"video/x-fli\":{\"source\":\"apache\",\"extensions\":[\"fli\"]},\"video/x-flv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"flv\"]},\"video/x-m4v\":{\"source\":\"apache\",\"extensions\":[\"m4v\"]},\"video/x-matroska\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"mkv\",\"mk3d\",\"mks\"]},\"video/x-mng\":{\"source\":\"apache\",\"extensions\":[\"mng\"]},\"video/x-ms-asf\":{\"source\":\"apache\",\"extensions\":[\"asf\",\"asx\"]},\"video/x-ms-vob\":{\"source\":\"apache\",\"extensions\":[\"vob\"]},\"video/x-ms-wm\":{\"source\":\"apache\",\"extensions\":[\"wm\"]},\"video/x-ms-wmv\":{\"source\":\"apache\",\"compressible\":false,\"extensions\":[\"wmv\"]},\"video/x-ms-wmx\":{\"source\":\"apache\",\"extensions\":[\"wmx\"]},\"video/x-ms-wvx\":{\"source\":\"apache\",\"extensions\":[\"wvx\"]},\"video/x-msvideo\":{\"source\":\"apache\",\"extensions\":[\"avi\"]},\"video/x-sgi-movie\":{\"source\":\"apache\",\"extensions\":[\"movie\"]},\"video/x-smv\":{\"source\":\"apache\",\"extensions\":[\"smv\"]},\"x-conference/x-cooltalk\":{\"source\":\"apache\",\"extensions\":[\"ice\"]},\"x-shader/x-fragment\":{\"compressible\":true},\"x-shader/x-vertex\":{\"compressible\":true}}"); +var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; -/***/ }), -/* 841 */ -/***/ (function(module, exports, __webpack_require__) { +var map = { + b: 1, + kb: 1 << 10, + mb: 1 << 20, + gb: 1 << 30, + tb: Math.pow(1024, 4), + pb: Math.pow(1024, 5), +}; -"use strict"; +var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i; +/** + * Convert the given value in bytes into a string or parse to string to an integer in bytes. + * + * @param {string|number} value + * @param {{ + * case: [string], + * decimalPlaces: [number] + * fixedDecimals: [boolean] + * thousandsSeparator: [string] + * unitSeparator: [string] + * }} [options] bytes options. + * + * @returns {string|number|null} + */ -var lodash = __webpack_require__(825); -var isPromise = __webpack_require__(842); +function bytes(value, options) { + if (typeof value === 'string') { + return parse(value); + } -module.exports = function (adapter) { - if (typeof adapter !== 'object') { - throw new Error('An adapter must be provided, see https://github.com/typicode/lowdb/#usage'); + if (typeof value === 'number') { + return format(value, options); } - // Create a fresh copy of lodash - var _ = lodash.runInContext(); - var db = _.chain({}); + return null; +} - // Add write function to lodash - // Calls save before returning result - _.prototype.write = _.wrap(_.prototype.value, function (func) { - var funcRes = func.apply(this); - return db.write(funcRes); - }); +/** + * Format the given value in bytes into a string. + * + * If the value is negative, it is kept as such. If it is a float, + * it is rounded. + * + * @param {number} value + * @param {object} [options] + * @param {number} [options.decimalPlaces=2] + * @param {number} [options.fixedDecimals=false] + * @param {string} [options.thousandsSeparator=] + * @param {string} [options.unit=] + * @param {string} [options.unitSeparator=] + * + * @returns {string|null} + * @public + */ - function plant(state) { - db.__wrapped__ = state; - return db; +function format(value, options) { + if (!Number.isFinite(value)) { + return null; } - // Lowdb API - // Expose _ for mixins - db._ = _; + var mag = Math.abs(value); + var thousandsSeparator = (options && options.thousandsSeparator) || ''; + var unitSeparator = (options && options.unitSeparator) || ''; + var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2; + var fixedDecimals = Boolean(options && options.fixedDecimals); + var unit = (options && options.unit) || ''; - db.read = function () { - var r = adapter.read(); - return isPromise(r) ? r.then(plant) : plant(r); - }; + if (!unit || !map[unit.toLowerCase()]) { + if (mag >= map.pb) { + unit = 'PB'; + } else if (mag >= map.tb) { + unit = 'TB'; + } else if (mag >= map.gb) { + unit = 'GB'; + } else if (mag >= map.mb) { + unit = 'MB'; + } else if (mag >= map.kb) { + unit = 'KB'; + } else { + unit = 'B'; + } + } - db.write = function (returnValue) { - var w = adapter.write(db.getState()); - return isPromise(w) ? w.then(function () { - return returnValue; - }) : returnValue; - }; + var val = value / map[unit.toLowerCase()]; + var str = val.toFixed(decimalPlaces); - db.getState = function () { - return db.__wrapped__; - }; + if (!fixedDecimals) { + str = str.replace(formatDecimalsRegExp, '$1'); + } - db.setState = function (state) { - return plant(state); - }; + if (thousandsSeparator) { + str = str.replace(formatThousandsRegExp, thousandsSeparator); + } - return db.read(); -}; + return str + unitSeparator + unit; +} -/***/ }), -/* 842 */ -/***/ (function(module, exports) { +/** + * Parse the string value into an integer in bytes. + * + * If no unit is given, it is assumed the value is in bytes. + * + * @param {number|string} val + * + * @returns {number|null} + * @public + */ -module.exports = isPromise; -module.exports.default = isPromise; +function parse(val) { + if (typeof val === 'number' && !isNaN(val)) { + return val; + } -function isPromise(obj) { - return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function'; -} + if (typeof val !== 'string') { + return null; + } + // Test if the string passed is valid + var results = parseRegExp.exec(val); + var floatValue; + var unit = 'b'; -/***/ }), -/* 843 */ -/***/ (function(module, exports) { + if (!results) { + // Nothing could be extracted from the given string + floatValue = parseInt(val, 10); + unit = 'b' + } else { + // Retrieve the value and the unit + floatValue = parseFloat(results[1]); + unit = results[4].toLowerCase(); + } -// UUID -// https://gist.github.com/LeverOne/1308368 -/* jshint ignore:start */ -function uuid (a, b) { for (b = a = ''; a++ < 36; b += a * 51 & 52 ? (a ^ 15 ? 8 ^ Math.random() * (a ^ 20 ? 16 : 4) : 4).toString(16) : '-');return b } -/* jshint ignore:end */ - -module.exports = { - // Empties properties - __empty: function (doc) { - this.forEach(doc, function (value, key) { - delete doc[key] - }) - }, - - // Copies properties from an object to another - __update: function (dest, src) { - this.forEach(src, function (value, key) { - dest[key] = value - }) - }, - - // Removes an item from an array - __remove: function (array, item) { - var index = this.indexOf(array, item) - if (index !== -1) array.splice(index, 1) - }, - - __id: function () { - var id = this.id || 'id' - return id - }, - - getById: function (collection, id) { - var self = this - return this.find(collection, function (doc) { - if (self.has(doc, self.__id())) { - return doc[self.__id()].toString() === id.toString() - } - }) - }, - - createId: function (collection, doc) { - return uuid() - }, - - insert: function (collection, doc) { - doc[this.__id()] = doc[this.__id()] || this.createId(collection, doc) - var d = this.getById(collection, doc[this.__id()]) - if (d) throw new Error('Insert failed, duplicate id') - collection.push(doc) - return doc - }, - - upsert: function (collection, doc) { - if (doc[this.__id()]) { - // id is set - var d = this.getById(collection, doc[this.__id()]) - if (d) { - // replace properties of existing object - this.__empty(d) - this.assign(d, doc) - } else { - // push new object - collection.push(doc) - } - } else { - // create id and push new object - doc[this.__id()] = this.createId(collection, doc) - collection.push(doc) - } - - return doc - }, - - updateById: function (collection, id, attrs) { - var doc = this.getById(collection, id) - - if (doc) { - this.assign(doc, attrs, {id: doc.id}) - } - - return doc - }, - - updateWhere: function (collection, predicate, attrs) { - var self = this - var docs = this.filter(collection, predicate) - - docs.forEach(function (doc) { - self.assign(doc, attrs, {id: doc.id}) - }) - - return docs - }, - - replaceById: function (collection, id, attrs) { - var doc = this.getById(collection, id) - - if (doc) { - var docId = doc.id - this.__empty(doc) - this.assign(doc, attrs, {id: docId}) - } - - return doc - }, - - removeById: function (collection, id) { - var doc = this.getById(collection, id) - - this.__remove(collection, doc) - - return doc - }, - - removeWhere: function (collection, predicate) { - var self = this - var docs = this.filter(collection, predicate) - - docs.forEach(function (doc) { - self.__remove(collection, doc) - }) - - return docs - } -} + return Math.floor(map[unit] * floatValue); +} /***/ }), -/* 844 */ +/* 851 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/*! + * http-errors + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); - -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } -function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } +/** + * Module dependencies. + * @private + */ -function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; } +var deprecate = __webpack_require__(852)('http-errors') +var setPrototypeOf = __webpack_require__(856) +var statuses = __webpack_require__(857) +var inherits = __webpack_require__(859) +var toIdentifier = __webpack_require__(861) -var fs = __webpack_require__(845); -var Base = __webpack_require__(850); +/** + * Module exports. + * @public + */ -var readFile = fs.readFileSync; -var writeFile = fs.writeFileSync; +module.exports = createError +module.exports.HttpError = createHttpErrorConstructor() -// Same code as in FileAsync, minus `await` +// Populate exports for all constructors +populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError) -var FileSync = function (_Base) { - _inherits(FileSync, _Base); +/** + * Get the code class of a status code. + * @private + */ - function FileSync() { - _classCallCheck(this, FileSync); +function codeClass (status) { + return Number(String(status).charAt(0) + '00') +} - return _possibleConstructorReturn(this, (FileSync.__proto__ || Object.getPrototypeOf(FileSync)).apply(this, arguments)); - } +/** + * Create a new HTTP Error. + * + * @returns {Error} + * @public + */ - _createClass(FileSync, [{ - key: 'read', - value: function read() { - // fs.exists is deprecated but not fs.existsSync - if (fs.existsSync(this.source)) { - // Read database - try { - var data = readFile(this.source, 'utf-8').trim(); - // Handle blank file - return data ? this.deserialize(data) : this.defaultValue; - } catch (e) { - if (e instanceof SyntaxError) { - e.message = `Malformed JSON in file: ${this.source}\n${e.message}`; - } - throw e; - } - } else { - // Initialize - writeFile(this.source, this.serialize(this.defaultValue)); - return this.defaultValue; - } +function createError () { + // so much arity going on ~_~ + var err + var msg + var status = 500 + var props = {} + for (var i = 0; i < arguments.length; i++) { + var arg = arguments[i] + if (arg instanceof Error) { + err = arg + status = err.status || err.statusCode || status + continue } - }, { - key: 'write', - value: function write(data) { - return writeFile(this.source, this.serialize(data)); + switch (typeof arg) { + case 'string': + msg = arg + break + case 'number': + status = arg + if (i !== 0) { + deprecate('non-first-argument status code; replace with createError(' + arg + ', ...)') + } + break + case 'object': + props = arg + break } - }]); + } - return FileSync; -}(Base); + if (typeof status === 'number' && (status < 400 || status >= 600)) { + deprecate('non-error status code; use only 4xx or 5xx status codes') + } -module.exports = FileSync; + if (typeof status !== 'number' || + (!statuses[status] && (status < 400 || status >= 600))) { + status = 500 + } -/***/ }), -/* 845 */ -/***/ (function(module, exports, __webpack_require__) { + // constructor + var HttpError = createError[status] || createError[codeClass(status)] -var fs = __webpack_require__(167) -var polyfills = __webpack_require__(846) -var legacy = __webpack_require__(848) -var clone = __webpack_require__(849) + if (!err) { + // create error + err = HttpError + ? new HttpError(msg) + : new Error(msg || statuses[status]) + Error.captureStackTrace(err, createError) + } -var util = __webpack_require__(9) + if (!HttpError || !(err instanceof HttpError) || err.status !== status) { + // add properties to generic error + err.expose = status < 500 + err.status = err.statusCode = status + } -/* istanbul ignore next - node 0.x polyfill */ -var gracefulQueue -var previousSymbol + for (var key in props) { + if (key !== 'status' && key !== 'statusCode') { + err[key] = props[key] + } + } -/* istanbul ignore else - node 0.x polyfill */ -if (typeof Symbol === 'function' && typeof Symbol.for === 'function') { - gracefulQueue = Symbol.for('graceful-fs.queue') - // This is used in testing by future versions - previousSymbol = Symbol.for('graceful-fs.previous') -} else { - gracefulQueue = '___graceful-fs.queue' - previousSymbol = '___graceful-fs.previous' + return err } -function noop () {} - -function publishQueue(context, queue) { - Object.defineProperty(context, gracefulQueue, { - get: function() { - return queue - } - }) -} +/** + * Create HTTP error abstract base class. + * @private + */ -var debug = noop -if (util.debuglog) - debug = util.debuglog('gfs4') -else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS4: ' + m.split(/\n/).join('\nGFS4: ') - console.error(m) +function createHttpErrorConstructor () { + function HttpError () { + throw new TypeError('cannot construct abstract class') } -// Once time initialization -if (!fs[gracefulQueue]) { - // This queue can be shared by multiple loaded instances - var queue = global[gracefulQueue] || [] - publishQueue(fs, queue) + inherits(HttpError, Error) - // Patch fs.close/closeSync to shared queue version, because we need - // to retry() whenever a close happens *anywhere* in the program. - // This is essential when multiple graceful-fs instances are - // in play at the same time. - fs.close = (function (fs$close) { - function close (fd, cb) { - return fs$close.call(fs, fd, function (err) { - // This function uses the graceful-fs shared queue - if (!err) { - retry() - } + return HttpError +} - if (typeof cb === 'function') - cb.apply(this, arguments) - }) - } +/** + * Create a constructor for a client error. + * @private + */ - Object.defineProperty(close, previousSymbol, { - value: fs$close - }) - return close - })(fs.close) +function createClientErrorConstructor (HttpError, name, code) { + var className = name.match(/Error$/) ? name : name + 'Error' - fs.closeSync = (function (fs$closeSync) { - function closeSync (fd) { - // This function uses the graceful-fs shared queue - fs$closeSync.apply(fs, arguments) - retry() - } + function ClientError (message) { + // create the error object + var msg = message != null ? message : statuses[code] + var err = new Error(msg) - Object.defineProperty(closeSync, previousSymbol, { - value: fs$closeSync + // capture a stack trace to the construction point + Error.captureStackTrace(err, ClientError) + + // adjust the [[Prototype]] + setPrototypeOf(err, ClientError.prototype) + + // redefine the error message + Object.defineProperty(err, 'message', { + enumerable: true, + configurable: true, + value: msg, + writable: true }) - return closeSync - })(fs.closeSync) - if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug(fs[gracefulQueue]) - __webpack_require__(109).equal(fs[gracefulQueue].length, 0) + // redefine the error name + Object.defineProperty(err, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true }) + + return err } -} -if (!global[gracefulQueue]) { - publishQueue(global, fs[gracefulQueue]); -} + inherits(ClientError, HttpError) + nameFunc(ClientError, className) -module.exports = patch(clone(fs)) -if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) { - module.exports = patch(fs) - fs.__patched = true; + ClientError.prototype.status = code + ClientError.prototype.statusCode = code + ClientError.prototype.expose = true + + return ClientError } -function patch (fs) { - // Everything that references the open() function needs to be in here - polyfills(fs) - fs.gracefulify = patch +/** + * Create a constructor for a server error. + * @private + */ - fs.createReadStream = createReadStream - fs.createWriteStream = createWriteStream - var fs$readFile = fs.readFile - fs.readFile = readFile - function readFile (path, options, cb) { - if (typeof options === 'function') - cb = options, options = null +function createServerErrorConstructor (HttpError, name, code) { + var className = name.match(/Error$/) ? name : name + 'Error' - return go$readFile(path, options, cb) + function ServerError (message) { + // create the error object + var msg = message != null ? message : statuses[code] + var err = new Error(msg) - function go$readFile (path, options, cb) { - return fs$readFile(path, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readFile, [path, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } + // capture a stack trace to the construction point + Error.captureStackTrace(err, ServerError) - var fs$writeFile = fs.writeFile - fs.writeFile = writeFile - function writeFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null + // adjust the [[Prototype]] + setPrototypeOf(err, ServerError.prototype) - return go$writeFile(path, data, options, cb) + // redefine the error message + Object.defineProperty(err, 'message', { + enumerable: true, + configurable: true, + value: msg, + writable: true + }) - function go$writeFile (path, data, options, cb) { - return fs$writeFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$writeFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } + // redefine the error name + Object.defineProperty(err, 'name', { + enumerable: false, + configurable: true, + value: className, + writable: true + }) + + return err } - var fs$appendFile = fs.appendFile - if (fs$appendFile) - fs.appendFile = appendFile - function appendFile (path, data, options, cb) { - if (typeof options === 'function') - cb = options, options = null + inherits(ServerError, HttpError) + nameFunc(ServerError, className) - return go$appendFile(path, data, options, cb) + ServerError.prototype.status = code + ServerError.prototype.statusCode = code + ServerError.prototype.expose = false - function go$appendFile (path, data, options, cb) { - return fs$appendFile(path, data, options, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$appendFile, [path, data, options, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } - } + return ServerError +} - var fs$copyFile = fs.copyFile - if (fs$copyFile) - fs.copyFile = copyFile - function copyFile (src, dest, flags, cb) { - if (typeof flags === 'function') { - cb = flags - flags = 0 - } - return fs$copyFile(src, dest, flags, function (err) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([fs$copyFile, [src, dest, flags, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) - } +/** + * Set the name of a function, if possible. + * @private + */ - var fs$readdir = fs.readdir - fs.readdir = readdir - function readdir (path, options, cb) { - var args = [path] - if (typeof options !== 'function') { - args.push(options) - } else { - cb = options - } - args.push(go$readdir$cb) +function nameFunc (func, name) { + var desc = Object.getOwnPropertyDescriptor(func, 'name') - return go$readdir(args) + if (desc && desc.configurable) { + desc.value = name + Object.defineProperty(func, 'name', desc) + } +} - function go$readdir$cb (err, files) { - if (files && files.sort) - files.sort() +/** + * Populate the exports object with constructors for every error class. + * @private + */ - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$readdir, [args]]) +function populateConstructorExports (exports, codes, HttpError) { + codes.forEach(function forEachCode (code) { + var CodeError + var name = toIdentifier(statuses[code]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } + switch (codeClass(code)) { + case 400: + CodeError = createClientErrorConstructor(HttpError, name, code) + break + case 500: + CodeError = createServerErrorConstructor(HttpError, name, code) + break } - } - - function go$readdir (args) { - return fs$readdir.apply(fs, args) - } - if (process.version.substr(0, 4) === 'v0.8') { - var legStreams = legacy(fs) - ReadStream = legStreams.ReadStream - WriteStream = legStreams.WriteStream - } + if (CodeError) { + // export the constructor + exports[code] = CodeError + exports[name] = CodeError + } + }) - var fs$ReadStream = fs.ReadStream - if (fs$ReadStream) { - ReadStream.prototype = Object.create(fs$ReadStream.prototype) - ReadStream.prototype.open = ReadStream$open - } + // backwards-compatibility + exports["I'mateapot"] = deprecate.function(exports.ImATeapot, + '"I\'mateapot"; use "ImATeapot" instead') +} - var fs$WriteStream = fs.WriteStream - if (fs$WriteStream) { - WriteStream.prototype = Object.create(fs$WriteStream.prototype) - WriteStream.prototype.open = WriteStream$open - } - Object.defineProperty(fs, 'ReadStream', { - get: function () { - return ReadStream - }, - set: function (val) { - ReadStream = val - }, - enumerable: true, - configurable: true - }) - Object.defineProperty(fs, 'WriteStream', { - get: function () { - return WriteStream - }, - set: function (val) { - WriteStream = val - }, - enumerable: true, - configurable: true - }) +/***/ }), +/* 852 */ +/***/ (function(module, exports, __webpack_require__) { - // legacy names - var FileReadStream = ReadStream - Object.defineProperty(fs, 'FileReadStream', { - get: function () { - return FileReadStream - }, - set: function (val) { - FileReadStream = val - }, - enumerable: true, - configurable: true - }) - var FileWriteStream = WriteStream - Object.defineProperty(fs, 'FileWriteStream', { - get: function () { - return FileWriteStream - }, - set: function (val) { - FileWriteStream = val - }, - enumerable: true, - configurable: true - }) +/*! + * depd + * Copyright(c) 2014-2017 Douglas Christopher Wilson + * MIT Licensed + */ - function ReadStream (path, options) { - if (this instanceof ReadStream) - return fs$ReadStream.apply(this, arguments), this - else - return ReadStream.apply(Object.create(ReadStream.prototype), arguments) - } +/** + * Module dependencies. + */ - function ReadStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - if (that.autoClose) - that.destroy() +var callSiteToString = __webpack_require__(853).callSiteToString +var eventListenerCount = __webpack_require__(853).eventListenerCount +var relative = __webpack_require__(160).relative - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - that.read() - } - }) - } +/** + * Module exports. + */ - function WriteStream (path, options) { - if (this instanceof WriteStream) - return fs$WriteStream.apply(this, arguments), this - else - return WriteStream.apply(Object.create(WriteStream.prototype), arguments) - } +module.exports = depd - function WriteStream$open () { - var that = this - open(that.path, that.flags, that.mode, function (err, fd) { - if (err) { - that.destroy() - that.emit('error', err) - } else { - that.fd = fd - that.emit('open', fd) - } - }) - } +/** + * Get the path to base files on. + */ - function createReadStream (path, options) { - return new fs.ReadStream(path, options) - } +var basePath = process.cwd() - function createWriteStream (path, options) { - return new fs.WriteStream(path, options) - } +/** + * Determine if namespace is contained in the string. + */ - var fs$open = fs.open - fs.open = open - function open (path, flags, mode, cb) { - if (typeof mode === 'function') - cb = mode, mode = null +function containsNamespace (str, namespace) { + var vals = str.split(/[ ,]+/) + var ns = String(namespace).toLowerCase() - return go$open(path, flags, mode, cb) + for (var i = 0; i < vals.length; i++) { + var val = vals[i] - function go$open (path, flags, mode, cb) { - return fs$open(path, flags, mode, function (err, fd) { - if (err && (err.code === 'EMFILE' || err.code === 'ENFILE')) - enqueue([go$open, [path, flags, mode, cb]]) - else { - if (typeof cb === 'function') - cb.apply(this, arguments) - retry() - } - }) + // namespace contained + if (val && (val === '*' || val.toLowerCase() === ns)) { + return true } } - return fs -} - -function enqueue (elem) { - debug('ENQUEUE', elem[0].name, elem[1]) - fs[gracefulQueue].push(elem) + return false } -function retry () { - var elem = fs[gracefulQueue].shift() - if (elem) { - debug('RETRY', elem[0].name, elem[1]) - elem[0].apply(null, elem[1]) - } -} +/** + * Convert a data descriptor to accessor descriptor. + */ +function convertDataDescriptorToAccessor (obj, prop, message) { + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) + var value = descriptor.value -/***/ }), -/* 846 */ -/***/ (function(module, exports, __webpack_require__) { + descriptor.get = function getter () { return value } -var constants = __webpack_require__(847) + if (descriptor.writable) { + descriptor.set = function setter (val) { return (value = val) } + } -var origCwd = process.cwd -var cwd = null + delete descriptor.value + delete descriptor.writable -var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform + Object.defineProperty(obj, prop, descriptor) -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd + return descriptor } -try { - process.cwd() -} catch (er) {} -// This check is needed until node.js 12 is required -if (typeof process.chdir === 'function') { - var chdir = process.chdir - process.chdir = function (d) { - cwd = null - chdir.call(process, d) +/** + * Create arguments string to keep arity. + */ + +function createArgumentsString (arity) { + var str = '' + + for (var i = 0; i < arity; i++) { + str += ', arg' + i } - if (Object.setPrototypeOf) Object.setPrototypeOf(process.chdir, chdir) + + return str.substr(2) } -module.exports = patch +/** + * Create stack string from stack. + */ -function patch (fs) { - // (re-)implement some things that are known busted or missing. +function createStackString (stack) { + var str = this.name + ': ' + this.namespace - // lchmod, broken prior to 0.6.2 - // back-port the fix here. - if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - patchLchmod(fs) + if (this.message) { + str += ' deprecated ' + this.message } - // lutimes implementation, or no-op - if (!fs.lutimes) { - patchLutimes(fs) + for (var i = 0; i < stack.length; i++) { + str += '\n at ' + callSiteToString(stack[i]) } - // https://github.com/isaacs/node-graceful-fs/issues/4 - // Chown should not fail on einval or eperm if non-root. - // It should not fail on enosys ever, as this just indicates - // that a fs doesn't support the intended operation. + return str +} - fs.chown = chownFix(fs.chown) - fs.fchown = chownFix(fs.fchown) - fs.lchown = chownFix(fs.lchown) +/** + * Create deprecate for namespace in caller. + */ - fs.chmod = chmodFix(fs.chmod) - fs.fchmod = chmodFix(fs.fchmod) - fs.lchmod = chmodFix(fs.lchmod) +function depd (namespace) { + if (!namespace) { + throw new TypeError('argument namespace is required') + } - fs.chownSync = chownFixSync(fs.chownSync) - fs.fchownSync = chownFixSync(fs.fchownSync) - fs.lchownSync = chownFixSync(fs.lchownSync) + var stack = getStack() + var site = callSiteLocation(stack[1]) + var file = site[0] - fs.chmodSync = chmodFixSync(fs.chmodSync) - fs.fchmodSync = chmodFixSync(fs.fchmodSync) - fs.lchmodSync = chmodFixSync(fs.lchmodSync) + function deprecate (message) { + // call to self as log + log.call(deprecate, message) + } - fs.stat = statFix(fs.stat) - fs.fstat = statFix(fs.fstat) - fs.lstat = statFix(fs.lstat) + deprecate._file = file + deprecate._ignored = isignored(namespace) + deprecate._namespace = namespace + deprecate._traced = istraced(namespace) + deprecate._warned = Object.create(null) - fs.statSync = statFixSync(fs.statSync) - fs.fstatSync = statFixSync(fs.fstatSync) - fs.lstatSync = statFixSync(fs.lstatSync) + deprecate.function = wrapfunction + deprecate.property = wrapproperty - // if lchmod/lchown do not exist, then make them no-ops - if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - if (cb) process.nextTick(cb) - } - fs.lchmodSync = function () {} - } - if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - if (cb) process.nextTick(cb) - } - fs.lchownSync = function () {} - } + return deprecate +} - // on Windows, A/V software can lock the directory, causing this - // to fail with an EACCES or EPERM if the directory contains newly - // created files. Try again on failure, for up to 60 seconds. +/** + * Determine if namespace is ignored. + */ - // Set the timeout this long because some Windows Anti-Virus, such as Parity - // bit9, may lock files for up to a minute, causing npm package install - // failures. Also, take care to yield the scheduler. Windows scheduling gives - // CPU to a busy looping process, which can cause the program causing the lock - // contention to be starved of CPU by node, so the contention doesn't resolve. - if (platform === "win32") { - fs.rename = (function (fs$rename) { return function (from, to, cb) { - var start = Date.now() - var backoff = 0; - fs$rename(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 60000) { - setTimeout(function() { - fs.stat(to, function (stater, st) { - if (stater && stater.code === "ENOENT") - fs$rename(from, to, CB); - else - cb(er) - }) - }, backoff) - if (backoff < 100) - backoff += 10; - return; - } - if (cb) cb(er) - }) - }})(fs.rename) +function isignored (namespace) { + /* istanbul ignore next: tested in a child processs */ + if (process.noDeprecation) { + // --no-deprecation support + return true } - // if read() returns EAGAIN, then just try it again. - fs.read = (function (fs$read) { - function read (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return fs$read.call(fs, fd, buffer, offset, length, position, callback) - } + var str = process.env.NO_DEPRECATION || '' - // This ensures `util.promisify` works as it does for native `fs.read`. - if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read) - return read - })(fs.read) + // namespace ignored + return containsNamespace(str, namespace) +} - fs.readSync = (function (fs$readSync) { return function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return fs$readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } - }})(fs.readSync) +/** + * Determine if namespace is traced. + */ - function patchLchmod (fs) { - fs.lchmod = function (path, mode, callback) { - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - if (callback) callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - if (callback) callback(err || err2) - }) - }) - }) - } +function istraced (namespace) { + /* istanbul ignore next: tested in a child processs */ + if (process.traceDeprecation) { + // --trace-deprecation support + return true + } - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) + var str = process.env.TRACE_DEPRECATION || '' - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var threw = true - var ret - try { - ret = fs.fchmodSync(fd, mode) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } - } + // namespace traced + return containsNamespace(str, namespace) +} - function patchLutimes (fs) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - if (er) { - if (cb) cb(er) - return - } - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - if (cb) cb(er || er2) - }) - }) - }) - } +/** + * Display deprecation message. + */ - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - var ret - var threw = true - try { - ret = fs.futimesSync(fd, at, mt) - threw = false - } finally { - if (threw) { - try { - fs.closeSync(fd) - } catch (er) {} - } else { - fs.closeSync(fd) - } - } - return ret - } +function log (message, site) { + var haslisteners = eventListenerCount(process, 'deprecation') !== 0 - } else { - fs.lutimes = function (_a, _b, _c, cb) { if (cb) process.nextTick(cb) } - fs.lutimesSync = function () {} - } + // abort early if no destination + if (!haslisteners && this._ignored) { + return } - function chmodFix (orig) { - if (!orig) return orig - return function (target, mode, cb) { - return orig.call(fs, target, mode, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) - } - } + var caller + var callFile + var callSite + var depSite + var i = 0 + var seen = false + var stack = getStack() + var file = this._file - function chmodFixSync (orig) { - if (!orig) return orig - return function (target, mode) { - try { - return orig.call(fs, target, mode) - } catch (er) { - if (!chownErOk(er)) throw er - } - } + if (site) { + // provided site + depSite = site + callSite = callSiteLocation(stack[1]) + callSite.name = depSite.name + file = callSite[0] + } else { + // get call site + i = 2 + depSite = callSiteLocation(stack[i]) + callSite = depSite } + // get caller of deprecated thing in relation to file + for (; i < stack.length; i++) { + caller = callSiteLocation(stack[i]) + callFile = caller[0] - function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er) { - if (chownErOk(er)) er = null - if (cb) cb.apply(this, arguments) - }) + if (callFile === file) { + seen = true + } else if (callFile === this._file) { + file = this._file + } else if (seen) { + break } } - function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } + var key = caller + ? depSite.join(':') + '__' + caller.join(':') + : undefined + + if (key !== undefined && key in this._warned) { + // already warned + return } - function statFix (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options, cb) { - if (typeof options === 'function') { - cb = options - options = null - } - function callback (er, stats) { - if (stats) { - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - } - if (cb) cb.apply(this, arguments) - } - return options ? orig.call(fs, target, options, callback) - : orig.call(fs, target, callback) - } + this._warned[key] = true + + // generate automatic message from call site + var msg = message + if (!msg) { + msg = callSite === depSite || !callSite.name + ? defaultMessage(depSite) + : defaultMessage(callSite) } - function statFixSync (orig) { - if (!orig) return orig - // Older versions of Node erroneously returned signed integers for - // uid + gid. - return function (target, options) { - var stats = options ? orig.call(fs, target, options) - : orig.call(fs, target) - if (stats.uid < 0) stats.uid += 0x100000000 - if (stats.gid < 0) stats.gid += 0x100000000 - return stats; - } + // emit deprecation if listeners exist + if (haslisteners) { + var err = DeprecationError(this._namespace, msg, stack.slice(i)) + process.emit('deprecation', err) + return } - // ENOSYS means that the fs doesn't support the op. Just ignore - // that, because it doesn't matter. - // - // if there's no getuid, or if getuid() is something other - // than 0, and the error is EINVAL or EPERM, then just ignore - // it. - // - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // - // When running as root, or if other types of errors are - // encountered, then it's strict. - function chownErOk (er) { - if (!er) - return true + // format and write message + var format = process.stderr.isTTY + ? formatColor + : formatPlain + var output = format.call(this, msg, caller, stack.slice(i)) + process.stderr.write(output + '\n', 'utf8') +} - if (er.code === "ENOSYS") - return true +/** + * Get call site location as array. + */ - var nonroot = !process.getuid || process.getuid() !== 0 - if (nonroot) { - if (er.code === "EINVAL" || er.code === "EPERM") - return true - } +function callSiteLocation (callSite) { + var file = callSite.getFileName() || '<anonymous>' + var line = callSite.getLineNumber() + var colm = callSite.getColumnNumber() - return false + if (callSite.isEval()) { + file = callSite.getEvalOrigin() + ', ' + file } -} + var site = [file, line, colm] -/***/ }), -/* 847 */ -/***/ (function(module, exports) { - -module.exports = require("constants"); + site.callSite = callSite + site.name = callSite.getFunctionName() -/***/ }), -/* 848 */ -/***/ (function(module, exports, __webpack_require__) { + return site +} -var Stream = __webpack_require__(100).Stream +/** + * Generate a default message from the site. + */ -module.exports = legacy +function defaultMessage (site) { + var callSite = site.callSite + var funcName = site.name -function legacy (fs) { - return { - ReadStream: ReadStream, - WriteStream: WriteStream + // make useful anonymous name + if (!funcName) { + funcName = '<anonymous@' + formatLocation(site) + '>' } - function ReadStream (path, options) { - if (!(this instanceof ReadStream)) return new ReadStream(path, options); + var context = callSite.getThis() + var typeName = context && callSite.getTypeName() - Stream.call(this); + // ignore useless type name + if (typeName === 'Object') { + typeName = undefined + } - var self = this; + // make useful type name + if (typeName === 'Function') { + typeName = context.name || typeName + } - this.path = path; - this.fd = null; - this.readable = true; - this.paused = false; + return typeName && callSite.getMethodName() + ? typeName + '.' + funcName + : funcName +} - this.flags = 'r'; - this.mode = 438; /*=0666*/ - this.bufferSize = 64 * 1024; +/** + * Format deprecation message without color. + */ - options = options || {}; +function formatPlain (msg, caller, stack) { + var timestamp = new Date().toUTCString() - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; + var formatted = timestamp + + ' ' + this._namespace + + ' deprecated ' + msg + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n at ' + callSiteToString(stack[i]) } - if (this.encoding) this.setEncoding(this.encoding); + return formatted + } - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } + if (caller) { + formatted += ' at ' + formatLocation(caller) + } - if (this.start > this.end) { - throw new Error('start must be <= end'); - } + return formatted +} - this.pos = this.start; - } +/** + * Format deprecation message with color. + */ - if (this.fd !== null) { - process.nextTick(function() { - self._read(); - }); - return; +function formatColor (msg, caller, stack) { + var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan + ' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow + ' \x1b[0m' + msg + '\x1b[39m' // reset + + // add stack trace + if (this._traced) { + for (var i = 0; i < stack.length; i++) { + formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan } - fs.open(this.path, this.flags, this.mode, function (err, fd) { - if (err) { - self.emit('error', err); - self.readable = false; - return; - } + return formatted + } - self.fd = fd; - self.emit('open', fd); - self._read(); - }) + if (caller) { + formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan } - function WriteStream (path, options) { - if (!(this instanceof WriteStream)) return new WriteStream(path, options); + return formatted +} - Stream.call(this); +/** + * Format call site location. + */ - this.path = path; - this.fd = null; - this.writable = true; +function formatLocation (callSite) { + return relative(basePath, callSite[0]) + + ':' + callSite[1] + + ':' + callSite[2] +} - this.flags = 'w'; - this.encoding = 'binary'; - this.mode = 438; /*=0666*/ - this.bytesWritten = 0; +/** + * Get the stack as array of call sites. + */ - options = options || {}; +function getStack () { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace - // Mixin options into this - var keys = Object.keys(options); - for (var index = 0, length = keys.length; index < length; index++) { - var key = keys[index]; - this[key] = options[key]; - } + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = Math.max(10, limit) - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } + // capture the stack + Error.captureStackTrace(obj) - this.pos = this.start; - } + // slice this function off the top + var stack = obj.stack.slice(1) - this.busy = false; - this._queue = []; + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit - if (this.fd === null) { - this._open = fs.open; - this._queue.push([this._open, this.path, this.flags, this.mode, undefined]); - this.flush(); - } - } + return stack } +/** + * Capture call site stack from v8. + */ -/***/ }), -/* 849 */ -/***/ (function(module, exports, __webpack_require__) { +function prepareObjectStackTrace (obj, stack) { + return stack +} -"use strict"; +/** + * Return a wrapped function in a deprecation message. + */ + +function wrapfunction (fn, message) { + if (typeof fn !== 'function') { + throw new TypeError('argument fn must be a function') + } + var args = createArgumentsString(fn.length) + var deprecate = this // eslint-disable-line no-unused-vars + var stack = getStack() + var site = callSiteLocation(stack[1]) -module.exports = clone + site.name = fn.name -var getPrototypeOf = Object.getPrototypeOf || function (obj) { - return obj.__proto__ + // eslint-disable-next-line no-eval + var deprecatedfn = eval('(function (' + args + ') {\n' + + '"use strict"\n' + + 'log.call(deprecate, message, site)\n' + + 'return fn.apply(this, arguments)\n' + + '})') + + return deprecatedfn } -function clone (obj) { - if (obj === null || typeof obj !== 'object') - return obj +/** + * Wrap property in a deprecation message. + */ - if (obj instanceof Object) - var copy = { __proto__: getPrototypeOf(obj) } - else - var copy = Object.create(null) +function wrapproperty (obj, prop, message) { + if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { + throw new TypeError('argument obj must be object') + } - Object.getOwnPropertyNames(obj).forEach(function (key) { - Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key)) - }) + var descriptor = Object.getOwnPropertyDescriptor(obj, prop) - return copy -} + if (!descriptor) { + throw new TypeError('must call property on owner object') + } + if (!descriptor.configurable) { + throw new TypeError('property must be configurable') + } -/***/ }), -/* 850 */ -/***/ (function(module, exports, __webpack_require__) { + var deprecate = this + var stack = getStack() + var site = callSiteLocation(stack[1]) -"use strict"; + // set site name + site.name = prop + // convert data descriptor + if ('value' in descriptor) { + descriptor = convertDataDescriptorToAccessor(obj, prop, message) + } -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + var get = descriptor.get + var set = descriptor.set -var stringify = __webpack_require__(851); + // wrap getter + if (typeof get === 'function') { + descriptor.get = function getter () { + log.call(deprecate, message, site) + return get.apply(this, arguments) + } + } -var Base = function Base(source) { - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$defaultValue = _ref.defaultValue, - defaultValue = _ref$defaultValue === undefined ? {} : _ref$defaultValue, - _ref$serialize = _ref.serialize, - serialize = _ref$serialize === undefined ? stringify : _ref$serialize, - _ref$deserialize = _ref.deserialize, - deserialize = _ref$deserialize === undefined ? JSON.parse : _ref$deserialize; + // wrap setter + if (typeof set === 'function') { + descriptor.set = function setter () { + log.call(deprecate, message, site) + return set.apply(this, arguments) + } + } - _classCallCheck(this, Base); + Object.defineProperty(obj, prop, descriptor) +} - this.source = source; - this.defaultValue = defaultValue; - this.serialize = serialize; - this.deserialize = deserialize; -}; +/** + * Create DeprecationError for deprecation + */ -module.exports = Base; +function DeprecationError (namespace, message, stack) { + var error = new Error() + var stackString -/***/ }), -/* 851 */ -/***/ (function(module, exports, __webpack_require__) { + Object.defineProperty(error, 'constructor', { + value: DeprecationError + }) -"use strict"; + Object.defineProperty(error, 'message', { + configurable: true, + enumerable: false, + value: message, + writable: true + }) + + Object.defineProperty(error, 'name', { + enumerable: false, + configurable: true, + value: 'DeprecationError', + writable: true + }) + Object.defineProperty(error, 'namespace', { + configurable: true, + enumerable: false, + value: namespace, + writable: true + }) + + Object.defineProperty(error, 'stack', { + configurable: true, + enumerable: false, + get: function () { + if (stackString !== undefined) { + return stackString + } + + // prepare stack trace + return (stackString = createStackString.call(this, stack)) + }, + set: function setter (val) { + stackString = val + } + }) + + return error +} -// Pretty stringify -module.exports = function stringify(obj) { - return JSON.stringify(obj, null, 2); -}; /***/ }), -/* 852 */ +/* 853 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /*! - * raw-body - * Copyright(c) 2013-2014 Jonathan Ong + * depd * Copyright(c) 2014-2015 Douglas Christopher Wilson * MIT Licensed */ @@ -147505,289 +143804,192 @@ module.exports = function stringify(obj) { * @private */ -var bytes = __webpack_require__(853) -var createError = __webpack_require__(854) -var iconv = __webpack_require__(865) -var unpipe = __webpack_require__(887) +var EventEmitter = __webpack_require__(271).EventEmitter /** * Module exports. * @public */ -module.exports = getRawBody +lazyProperty(module.exports, 'callSiteToString', function callSiteToString () { + var limit = Error.stackTraceLimit + var obj = {} + var prep = Error.prepareStackTrace -/** - * Module variables. - * @private - */ + function prepareObjectStackTrace (obj, stack) { + return stack + } -var ICONV_ENCODING_MESSAGE_REGEXP = /^Encoding not recognized: / + Error.prepareStackTrace = prepareObjectStackTrace + Error.stackTraceLimit = 2 -/** - * Get the decoder for a given encoding. - * - * @param {string} encoding - * @private - */ + // capture the stack + Error.captureStackTrace(obj) -function getDecoder (encoding) { - if (!encoding) return null + // slice the stack + var stack = obj.stack.slice() - try { - return iconv.getDecoder(encoding) - } catch (e) { - // error getting decoder - if (!ICONV_ENCODING_MESSAGE_REGEXP.test(e.message)) throw e + Error.prepareStackTrace = prep + Error.stackTraceLimit = limit - // the encoding was not found - throw createError(415, 'specified encoding unsupported', { - encoding: encoding, - type: 'encoding.unsupported' - }) - } -} + return stack[0].toString ? toString : __webpack_require__(854) +}) + +lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () { + return EventEmitter.listenerCount || __webpack_require__(855) +}) /** - * Get the raw body of a stream (typically HTTP). - * - * @param {object} stream - * @param {object|string|function} [options] - * @param {function} [callback] - * @public + * Define a lazy property. */ -function getRawBody (stream, options, callback) { - var done = callback - var opts = options || {} +function lazyProperty (obj, prop, getter) { + function get () { + var val = getter() - if (options === true || typeof options === 'string') { - // short cut for encoding - opts = { - encoding: options - } - } + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + value: val + }) - if (typeof options === 'function') { - done = options - opts = {} + return val } - // validate callback is a function, if provided - if (done !== undefined && typeof done !== 'function') { - throw new TypeError('argument callback must be a function') - } + Object.defineProperty(obj, prop, { + configurable: true, + enumerable: true, + get: get + }) +} - // require the callback without promises - if (!done && !global.Promise) { - throw new TypeError('argument callback is required') - } +/** + * Call toString() on the obj + */ - // get encoding - var encoding = opts.encoding !== true - ? opts.encoding - : 'utf-8' +function toString (obj) { + return obj.toString() +} - // convert the limit to an integer - var limit = bytes.parse(opts.limit) - // convert the expected length to an integer - var length = opts.length != null && !isNaN(opts.length) - ? parseInt(opts.length, 10) - : null +/***/ }), +/* 854 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/*! + * depd + * Copyright(c) 2014 Douglas Christopher Wilson + * MIT Licensed + */ - if (done) { - // classic callback style - return readStream(stream, encoding, length, limit, done) - } - return new Promise(function executor (resolve, reject) { - readStream(stream, encoding, length, limit, function onRead (err, buf) { - if (err) return reject(err) - resolve(buf) - }) - }) -} /** - * Halt a stream. - * - * @param {Object} stream - * @private + * Module exports. */ -function halt (stream) { - // unpipe everything from the stream - unpipe(stream) - - // pause stream - if (typeof stream.pause === 'function') { - stream.pause() - } -} +module.exports = callSiteToString /** - * Read the data from the stream. - * - * @param {object} stream - * @param {string} encoding - * @param {number} length - * @param {number} limit - * @param {function} callback - * @public + * Format a CallSite file location to a string. */ -function readStream (stream, encoding, length, limit, callback) { - var complete = false - var sync = true +function callSiteFileLocation (callSite) { + var fileName + var fileLocation = '' - // check the length and limit options. - // note: we intentionally leave the stream paused, - // so users should handle the stream themselves. - if (limit !== null && length !== null && length > limit) { - return done(createError(413, 'request entity too large', { - expected: length, - length: length, - limit: limit, - type: 'entity.too.large' - })) + if (callSite.isNative()) { + fileLocation = 'native' + } else if (callSite.isEval()) { + fileName = callSite.getScriptNameOrSourceURL() + if (!fileName) { + fileLocation = callSite.getEvalOrigin() + } + } else { + fileName = callSite.getFileName() } - // streams1: assert request encoding is buffer. - // streams2+: assert the stream encoding is buffer. - // stream._decoder: streams1 - // state.encoding: streams2 - // state.decoder: streams2, specifically < 0.10.6 - var state = stream._readableState - if (stream._decoder || (state && (state.encoding || state.decoder))) { - // developer error - return done(createError(500, 'stream encoding should not be set', { - type: 'stream.encoding.set' - })) - } + if (fileName) { + fileLocation += fileName - var received = 0 - var decoder + var lineNumber = callSite.getLineNumber() + if (lineNumber != null) { + fileLocation += ':' + lineNumber - try { - decoder = getDecoder(encoding) - } catch (err) { - return done(err) + var columnNumber = callSite.getColumnNumber() + if (columnNumber) { + fileLocation += ':' + columnNumber + } + } } - var buffer = decoder - ? '' - : [] + return fileLocation || 'unknown source' +} - // attach listeners - stream.on('aborted', onAborted) - stream.on('close', cleanup) - stream.on('data', onData) - stream.on('end', onEnd) - stream.on('error', onEnd) +/** + * Format a CallSite to a string. + */ - // mark sync section complete - sync = false +function callSiteToString (callSite) { + var addSuffix = true + var fileLocation = callSiteFileLocation(callSite) + var functionName = callSite.getFunctionName() + var isConstructor = callSite.isConstructor() + var isMethodCall = !(callSite.isToplevel() || isConstructor) + var line = '' - function done () { - var args = new Array(arguments.length) + if (isMethodCall) { + var methodName = callSite.getMethodName() + var typeName = getConstructorName(callSite) - // copy arguments - for (var i = 0; i < args.length; i++) { - args[i] = arguments[i] - } + if (functionName) { + if (typeName && functionName.indexOf(typeName) !== 0) { + line += typeName + '.' + } - // mark complete - complete = true + line += functionName - if (sync) { - process.nextTick(invokeCallback) + if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) { + line += ' [as ' + methodName + ']' + } } else { - invokeCallback() + line += typeName + '.' + (methodName || '<anonymous>') } + } else if (isConstructor) { + line += 'new ' + (functionName || '<anonymous>') + } else if (functionName) { + line += functionName + } else { + addSuffix = false + line += fileLocation + } - function invokeCallback () { - cleanup() + if (addSuffix) { + line += ' (' + fileLocation + ')' + } - if (args[0]) { - // halt the stream on error - halt(stream) - } + return line +} - callback.apply(null, args) - } - } +/** + * Get constructor name of reviver. + */ - function onAborted () { - if (complete) return - - done(createError(400, 'request aborted', { - code: 'ECONNABORTED', - expected: length, - length: length, - received: received, - type: 'request.aborted' - })) - } - - function onData (chunk) { - if (complete) return - - received += chunk.length - - if (limit !== null && received > limit) { - done(createError(413, 'request entity too large', { - limit: limit, - received: received, - type: 'entity.too.large' - })) - } else if (decoder) { - buffer += decoder.write(chunk) - } else { - buffer.push(chunk) - } - } - - function onEnd (err) { - if (complete) return - if (err) return done(err) - - if (length !== null && received !== length) { - done(createError(400, 'request size did not match content length', { - expected: length, - length: length, - received: received, - type: 'request.size.invalid' - })) - } else { - var string = decoder - ? buffer + (decoder.end() || '') - : Buffer.concat(buffer) - done(null, string) - } - } - - function cleanup () { - buffer = null - - stream.removeListener('aborted', onAborted) - stream.removeListener('data', onData) - stream.removeListener('end', onEnd) - stream.removeListener('error', onEnd) - stream.removeListener('close', cleanup) - } -} +function getConstructorName (obj) { + var receiver = obj.receiver + return (receiver.constructor && receiver.constructor.name) || null +} /***/ }), -/* 853 */ +/* 855 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /*! - * bytes - * Copyright(c) 2012-2014 TJ Holowaychuk - * Copyright(c) 2015 Jed Watson + * depd + * Copyright(c) 2015 Douglas Christopher Wilson * MIT Licensed */ @@ -147798,163 +144000,48 @@ function readStream (stream, encoding, length, limit, callback) { * @public */ -module.exports = bytes; -module.exports.format = format; -module.exports.parse = parse; - -/** - * Module variables. - * @private - */ - -var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g; - -var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/; - -var map = { - b: 1, - kb: 1 << 10, - mb: 1 << 20, - gb: 1 << 30, - tb: Math.pow(1024, 4), - pb: Math.pow(1024, 5), -}; - -var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i; +module.exports = eventListenerCount /** - * Convert the given value in bytes into a string or parse to string to an integer in bytes. - * - * @param {string|number} value - * @param {{ - * case: [string], - * decimalPlaces: [number] - * fixedDecimals: [boolean] - * thousandsSeparator: [string] - * unitSeparator: [string] - * }} [options] bytes options. - * - * @returns {string|number|null} + * Get the count of listeners on an event emitter of a specific type. */ -function bytes(value, options) { - if (typeof value === 'string') { - return parse(value); - } - - if (typeof value === 'number') { - return format(value, options); - } - - return null; +function eventListenerCount (emitter, type) { + return emitter.listeners(type).length } -/** - * Format the given value in bytes into a string. - * - * If the value is negative, it is kept as such. If it is a float, - * it is rounded. - * - * @param {number} value - * @param {object} [options] - * @param {number} [options.decimalPlaces=2] - * @param {number} [options.fixedDecimals=false] - * @param {string} [options.thousandsSeparator=] - * @param {string} [options.unit=] - * @param {string} [options.unitSeparator=] - * - * @returns {string|null} - * @public - */ - -function format(value, options) { - if (!Number.isFinite(value)) { - return null; - } - - var mag = Math.abs(value); - var thousandsSeparator = (options && options.thousandsSeparator) || ''; - var unitSeparator = (options && options.unitSeparator) || ''; - var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2; - var fixedDecimals = Boolean(options && options.fixedDecimals); - var unit = (options && options.unit) || ''; - - if (!unit || !map[unit.toLowerCase()]) { - if (mag >= map.pb) { - unit = 'PB'; - } else if (mag >= map.tb) { - unit = 'TB'; - } else if (mag >= map.gb) { - unit = 'GB'; - } else if (mag >= map.mb) { - unit = 'MB'; - } else if (mag >= map.kb) { - unit = 'KB'; - } else { - unit = 'B'; - } - } - var val = value / map[unit.toLowerCase()]; - var str = val.toFixed(decimalPlaces); +/***/ }), +/* 856 */ +/***/ (function(module, exports, __webpack_require__) { - if (!fixedDecimals) { - str = str.replace(formatDecimalsRegExp, '$1'); - } +"use strict"; - if (thousandsSeparator) { - str = str.replace(formatThousandsRegExp, thousandsSeparator); - } +/* eslint no-proto: 0 */ +module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties) - return str + unitSeparator + unit; +function setProtoOf (obj, proto) { + obj.__proto__ = proto + return obj } -/** - * Parse the string value into an integer in bytes. - * - * If no unit is given, it is assumed the value is in bytes. - * - * @param {number|string} val - * - * @returns {number|null} - * @public - */ - -function parse(val) { - if (typeof val === 'number' && !isNaN(val)) { - return val; - } - - if (typeof val !== 'string') { - return null; - } - - // Test if the string passed is valid - var results = parseRegExp.exec(val); - var floatValue; - var unit = 'b'; - - if (!results) { - // Nothing could be extracted from the given string - floatValue = parseInt(val, 10); - unit = 'b' - } else { - // Retrieve the value and the unit - floatValue = parseFloat(results[1]); - unit = results[4].toLowerCase(); +function mixinProperties (obj, proto) { + for (var prop in proto) { + if (!obj.hasOwnProperty(prop)) { + obj[prop] = proto[prop] + } } - - return Math.floor(map[unit] * floatValue); + return obj } /***/ }), -/* 854 */ +/* 857 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; /*! - * http-errors + * statuses * Copyright(c) 2014 Jonathan Ong * Copyright(c) 2016 Douglas Christopher Wilson * MIT Licensed @@ -147967,1588 +144054,538 @@ function parse(val) { * @private */ -var deprecate = __webpack_require__(855)('http-errors') -var setPrototypeOf = __webpack_require__(859) -var statuses = __webpack_require__(860) -var inherits = __webpack_require__(862) -var toIdentifier = __webpack_require__(864) +var codes = __webpack_require__(858) /** * Module exports. * @public */ -module.exports = createError -module.exports.HttpError = createHttpErrorConstructor() +module.exports = status -// Populate exports for all constructors -populateConstructorExports(module.exports, statuses.codes, module.exports.HttpError) +// status code to message map +status.STATUS_CODES = codes + +// array of status codes +status.codes = populateStatusesMap(status, codes) + +// status codes for redirects +status.redirect = { + 300: true, + 301: true, + 302: true, + 303: true, + 305: true, + 307: true, + 308: true +} + +// status codes for empty bodies +status.empty = { + 204: true, + 205: true, + 304: true +} + +// status codes for when you should retry the request +status.retry = { + 502: true, + 503: true, + 504: true +} /** - * Get the code class of a status code. + * Populate the statuses map for given codes. * @private */ -function codeClass (status) { - return Number(String(status).charAt(0) + '00') +function populateStatusesMap (statuses, codes) { + var arr = [] + + Object.keys(codes).forEach(function forEachCode (code) { + var message = codes[code] + var status = Number(code) + + // Populate properties + statuses[status] = message + statuses[message] = status + statuses[message.toLowerCase()] = status + + // Add to array + arr.push(status) + }) + + return arr } /** - * Create a new HTTP Error. + * Get the status code. * - * @returns {Error} + * Given a number, this will throw if it is not a known status + * code, otherwise the code will be returned. Given a string, + * the string will be parsed for a number and return the code + * if valid, otherwise will lookup the code assuming this is + * the status message. + * + * @param {string|number} code + * @returns {number} * @public */ -function createError () { - // so much arity going on ~_~ - var err - var msg - var status = 500 - var props = {} - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i] - if (arg instanceof Error) { - err = arg - status = err.status || err.statusCode || status - continue - } - switch (typeof arg) { - case 'string': - msg = arg - break - case 'number': - status = arg - if (i !== 0) { - deprecate('non-first-argument status code; replace with createError(' + arg + ', ...)') - } - break - case 'object': - props = arg - break - } +function status (code) { + if (typeof code === 'number') { + if (!status[code]) throw new Error('invalid status code: ' + code) + return code } - if (typeof status === 'number' && (status < 400 || status >= 600)) { - deprecate('non-error status code; use only 4xx or 5xx status codes') + if (typeof code !== 'string') { + throw new TypeError('code must be a number or string') } - if (typeof status !== 'number' || - (!statuses[status] && (status < 400 || status >= 600))) { - status = 500 + // '403' + var n = parseInt(code, 10) + if (!isNaN(n)) { + if (!status[n]) throw new Error('invalid status code: ' + n) + return n } - // constructor - var HttpError = createError[status] || createError[codeClass(status)] + n = status[code.toLowerCase()] + if (!n) throw new Error('invalid status message: "' + code + '"') + return n +} - if (!err) { - // create error - err = HttpError - ? new HttpError(msg) - : new Error(msg || statuses[status]) - Error.captureStackTrace(err, createError) - } - if (!HttpError || !(err instanceof HttpError) || err.status !== status) { - // add properties to generic error - err.expose = status < 500 - err.status = err.statusCode = status - } +/***/ }), +/* 858 */ +/***/ (function(module) { - for (var key in props) { - if (key !== 'status' && key !== 'statusCode') { - err[key] = props[key] - } - } +module.exports = JSON.parse("{\"100\":\"Continue\",\"101\":\"Switching Protocols\",\"102\":\"Processing\",\"103\":\"Early Hints\",\"200\":\"OK\",\"201\":\"Created\",\"202\":\"Accepted\",\"203\":\"Non-Authoritative Information\",\"204\":\"No Content\",\"205\":\"Reset Content\",\"206\":\"Partial Content\",\"207\":\"Multi-Status\",\"208\":\"Already Reported\",\"226\":\"IM Used\",\"300\":\"Multiple Choices\",\"301\":\"Moved Permanently\",\"302\":\"Found\",\"303\":\"See Other\",\"304\":\"Not Modified\",\"305\":\"Use Proxy\",\"306\":\"(Unused)\",\"307\":\"Temporary Redirect\",\"308\":\"Permanent Redirect\",\"400\":\"Bad Request\",\"401\":\"Unauthorized\",\"402\":\"Payment Required\",\"403\":\"Forbidden\",\"404\":\"Not Found\",\"405\":\"Method Not Allowed\",\"406\":\"Not Acceptable\",\"407\":\"Proxy Authentication Required\",\"408\":\"Request Timeout\",\"409\":\"Conflict\",\"410\":\"Gone\",\"411\":\"Length Required\",\"412\":\"Precondition Failed\",\"413\":\"Payload Too Large\",\"414\":\"URI Too Long\",\"415\":\"Unsupported Media Type\",\"416\":\"Range Not Satisfiable\",\"417\":\"Expectation Failed\",\"418\":\"I'm a teapot\",\"421\":\"Misdirected Request\",\"422\":\"Unprocessable Entity\",\"423\":\"Locked\",\"424\":\"Failed Dependency\",\"425\":\"Unordered Collection\",\"426\":\"Upgrade Required\",\"428\":\"Precondition Required\",\"429\":\"Too Many Requests\",\"431\":\"Request Header Fields Too Large\",\"451\":\"Unavailable For Legal Reasons\",\"500\":\"Internal Server Error\",\"501\":\"Not Implemented\",\"502\":\"Bad Gateway\",\"503\":\"Service Unavailable\",\"504\":\"Gateway Timeout\",\"505\":\"HTTP Version Not Supported\",\"506\":\"Variant Also Negotiates\",\"507\":\"Insufficient Storage\",\"508\":\"Loop Detected\",\"509\":\"Bandwidth Limit Exceeded\",\"510\":\"Not Extended\",\"511\":\"Network Authentication Required\"}"); - return err -} +/***/ }), +/* 859 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Create HTTP error abstract base class. - * @private - */ +try { + var util = __webpack_require__(9); + /* istanbul ignore next */ + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + /* istanbul ignore next */ + module.exports = __webpack_require__(860); +} -function createHttpErrorConstructor () { - function HttpError () { - throw new TypeError('cannot construct abstract class') - } - inherits(HttpError, Error) +/***/ }), +/* 860 */ +/***/ (function(module, exports) { - return HttpError +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }) + } + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + if (superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } + } } -/** - * Create a constructor for a client error. - * @private - */ -function createClientErrorConstructor (HttpError, name, code) { - var className = name.match(/Error$/) ? name : name + 'Error' +/***/ }), +/* 861 */ +/***/ (function(module, exports) { - function ClientError (message) { - // create the error object - var msg = message != null ? message : statuses[code] - var err = new Error(msg) +/*! + * toidentifier + * Copyright(c) 2016 Douglas Christopher Wilson + * MIT Licensed + */ - // capture a stack trace to the construction point - Error.captureStackTrace(err, ClientError) +/** + * Module exports. + * @public + */ - // adjust the [[Prototype]] - setPrototypeOf(err, ClientError.prototype) +module.exports = toIdentifier - // redefine the error message - Object.defineProperty(err, 'message', { - enumerable: true, - configurable: true, - value: msg, - writable: true - }) +/** + * Trasform the given string into a JavaScript identifier + * + * @param {string} str + * @returns {string} + * @public + */ - // redefine the error name - Object.defineProperty(err, 'name', { - enumerable: false, - configurable: true, - value: className, - writable: true +function toIdentifier (str) { + return str + .split(' ') + .map(function (token) { + return token.slice(0, 1).toUpperCase() + token.slice(1) }) - - return err - } - - inherits(ClientError, HttpError) - nameFunc(ClientError, className) - - ClientError.prototype.status = code - ClientError.prototype.statusCode = code - ClientError.prototype.expose = true - - return ClientError + .join('') + .replace(/[^ _0-9a-z]/gi, '') } -/** - * Create a constructor for a server error. - * @private - */ -function createServerErrorConstructor (HttpError, name, code) { - var className = name.match(/Error$/) ? name : name + 'Error' +/***/ }), +/* 862 */ +/***/ (function(module, exports, __webpack_require__) { - function ServerError (message) { - // create the error object - var msg = message != null ? message : statuses[code] - var err = new Error(msg) +"use strict"; - // capture a stack trace to the construction point - Error.captureStackTrace(err, ServerError) - // adjust the [[Prototype]] - setPrototypeOf(err, ServerError.prototype) +// Some environments don't have global Buffer (e.g. React Native). +// Solution would be installing npm modules "buffer" and "stream" explicitly. +var Buffer = __webpack_require__(114).Buffer; - // redefine the error message - Object.defineProperty(err, 'message', { - enumerable: true, - configurable: true, - value: msg, - writable: true - }) +var bomHandling = __webpack_require__(863), + iconv = module.exports; - // redefine the error name - Object.defineProperty(err, 'name', { - enumerable: false, - configurable: true, - value: className, - writable: true - }) +// All codecs and aliases are kept here, keyed by encoding name/alias. +// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. +iconv.encodings = null; - return err - } +// Characters emitted in case of error. +iconv.defaultCharUnicode = '�'; +iconv.defaultCharSingleByte = '?'; - inherits(ServerError, HttpError) - nameFunc(ServerError, className) +// Public API. +iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); // Ensure string. - ServerError.prototype.status = code - ServerError.prototype.statusCode = code - ServerError.prototype.expose = false + var encoder = iconv.getEncoder(encoding, options); - return ServerError + var res = encoder.write(str); + var trail = encoder.end(); + + return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; } -/** - * Set the name of a function, if possible. - * @private - */ - -function nameFunc (func, name) { - var desc = Object.getOwnPropertyDescriptor(func, 'name') +iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === 'string') { + if (!iconv.skipDecodeWarning) { + console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); + iconv.skipDecodeWarning = true; + } - if (desc && desc.configurable) { - desc.value = name - Object.defineProperty(func, 'name', desc) - } -} + buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. + } -/** - * Populate the exports object with constructors for every error class. - * @private - */ + var decoder = iconv.getDecoder(encoding, options); -function populateConstructorExports (exports, codes, HttpError) { - codes.forEach(function forEachCode (code) { - var CodeError - var name = toIdentifier(statuses[code]) + var res = decoder.write(buf); + var trail = decoder.end(); - switch (codeClass(code)) { - case 400: - CodeError = createClientErrorConstructor(HttpError, name, code) - break - case 500: - CodeError = createServerErrorConstructor(HttpError, name, code) - break - } + return trail ? (res + trail) : res; +} - if (CodeError) { - // export the constructor - exports[code] = CodeError - exports[name] = CodeError +iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; } - }) - - // backwards-compatibility - exports["I'mateapot"] = deprecate.function(exports.ImATeapot, - '"I\'mateapot"; use "ImATeapot" instead') } +// Legacy aliases to convert functions +iconv.toEncoding = iconv.encode; +iconv.fromEncoding = iconv.decode; -/***/ }), -/* 855 */ -/***/ (function(module, exports, __webpack_require__) { +// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. +iconv._codecDataCache = {}; +iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) + iconv.encodings = __webpack_require__(864); // Lazy load all encoding definitions. + + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + var enc = iconv._canonicalizeEncoding(encoding); -/*! - * depd - * Copyright(c) 2014-2017 Douglas Christopher Wilson - * MIT Licensed - */ + // Traverse iconv.encodings to find actual codec. + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; -/** - * Module dependencies. - */ + var codecDef = iconv.encodings[enc]; -var callSiteToString = __webpack_require__(856).callSiteToString -var eventListenerCount = __webpack_require__(856).eventListenerCount -var relative = __webpack_require__(160).relative + switch (typeof codecDef) { + case "string": // Direct alias to other encoding. + enc = codecDef; + break; -/** - * Module exports. - */ + case "object": // Alias with options. Can be layered. + for (var key in codecDef) + codecOptions[key] = codecDef[key]; -module.exports = depd + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + enc = codecDef.type; + break; -/** - * Get the path to base files on. - */ + case "function": // Codec itself. + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; -var basePath = process.cwd() + // The codec function must load all tables and return object with .encoder and .decoder methods. + // It'll be called only once (for each different options object). + codec = new codecDef(codecOptions, iconv); -/** - * Determine if namespace is contained in the string. - */ + iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. + return codec; -function containsNamespace (str, namespace) { - var vals = str.split(/[ ,]+/) - var ns = String(namespace).toLowerCase() + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + } + } +} - for (var i = 0; i < vals.length; i++) { - var val = vals[i] +iconv._canonicalizeEncoding = function(encoding) { + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); +} - // namespace contained - if (val && (val === '*' || val.toLowerCase() === ns)) { - return true - } - } +iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), + encoder = new codec.encoder(options, codec); - return false + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + + return encoder; } -/** - * Convert a data descriptor to accessor descriptor. - */ +iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), + decoder = new codec.decoder(options, codec); -function convertDataDescriptorToAccessor (obj, prop, message) { - var descriptor = Object.getOwnPropertyDescriptor(obj, prop) - var value = descriptor.value + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); - descriptor.get = function getter () { return value } + return decoder; +} - if (descriptor.writable) { - descriptor.set = function setter (val) { return (value = val) } - } - delete descriptor.value - delete descriptor.writable +// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. +var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; +if (nodeVer) { - Object.defineProperty(obj, prop, descriptor) + // Load streaming support in Node v0.10+ + var nodeVerArr = nodeVer.split(".").map(Number); + if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { + __webpack_require__(882)(iconv); + } - return descriptor + // Load Node primitive extensions. + __webpack_require__(883)(iconv); } -/** - * Create arguments string to keep arity. - */ +if (false) {} -function createArgumentsString (arity) { - var str = '' - for (var i = 0; i < arity; i++) { - str += ', arg' + i - } +/***/ }), +/* 863 */ +/***/ (function(module, exports, __webpack_require__) { - return str.substr(2) -} +"use strict"; -/** - * Create stack string from stack. - */ -function createStackString (stack) { - var str = this.name + ': ' + this.namespace +var BOMChar = '\uFEFF'; - if (this.message) { - str += ' deprecated ' + this.message - } +exports.PrependBOM = PrependBOMWrapper +function PrependBOMWrapper(encoder, options) { + this.encoder = encoder; + this.addBOM = true; +} - for (var i = 0; i < stack.length; i++) { - str += '\n at ' + callSiteToString(stack[i]) - } +PrependBOMWrapper.prototype.write = function(str) { + if (this.addBOM) { + str = BOMChar + str; + this.addBOM = false; + } - return str + return this.encoder.write(str); } -/** - * Create deprecate for namespace in caller. - */ +PrependBOMWrapper.prototype.end = function() { + return this.encoder.end(); +} -function depd (namespace) { - if (!namespace) { - throw new TypeError('argument namespace is required') - } - var stack = getStack() - var site = callSiteLocation(stack[1]) - var file = site[0] +//------------------------------------------------------------------------------ - function deprecate (message) { - // call to self as log - log.call(deprecate, message) - } +exports.StripBOM = StripBOMWrapper; +function StripBOMWrapper(decoder, options) { + this.decoder = decoder; + this.pass = false; + this.options = options || {}; +} - deprecate._file = file - deprecate._ignored = isignored(namespace) - deprecate._namespace = namespace - deprecate._traced = istraced(namespace) - deprecate._warned = Object.create(null) +StripBOMWrapper.prototype.write = function(buf) { + var res = this.decoder.write(buf); + if (this.pass || !res) + return res; - deprecate.function = wrapfunction - deprecate.property = wrapproperty + if (res[0] === BOMChar) { + res = res.slice(1); + if (typeof this.options.stripBOM === 'function') + this.options.stripBOM(); + } - return deprecate + this.pass = true; + return res; } -/** - * Determine if namespace is ignored. - */ +StripBOMWrapper.prototype.end = function() { + return this.decoder.end(); +} -function isignored (namespace) { - /* istanbul ignore next: tested in a child processs */ - if (process.noDeprecation) { - // --no-deprecation support - return true - } - var str = process.env.NO_DEPRECATION || '' - // namespace ignored - return containsNamespace(str, namespace) -} +/***/ }), +/* 864 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Determine if namespace is traced. - */ +"use strict"; -function istraced (namespace) { - /* istanbul ignore next: tested in a child processs */ - if (process.traceDeprecation) { - // --trace-deprecation support - return true - } - var str = process.env.TRACE_DEPRECATION || '' +// Update this array if you add/rename/remove files in this directory. +// We support Browserify by skipping automatic module discovery and requiring modules directly. +var modules = [ + __webpack_require__(865), + __webpack_require__(867), + __webpack_require__(868), + __webpack_require__(869), + __webpack_require__(870), + __webpack_require__(871), + __webpack_require__(872), + __webpack_require__(873), +]; - // namespace traced - return containsNamespace(str, namespace) +// Put all encoding/alias/codec definitions to single object and export it. +for (var i = 0; i < modules.length; i++) { + var module = modules[i]; + for (var enc in module) + if (Object.prototype.hasOwnProperty.call(module, enc)) + exports[enc] = module[enc]; } -/** - * Display deprecation message. - */ -function log (message, site) { - var haslisteners = eventListenerCount(process, 'deprecation') !== 0 +/***/ }), +/* 865 */ +/***/ (function(module, exports, __webpack_require__) { - // abort early if no destination - if (!haslisteners && this._ignored) { - return - } +"use strict"; - var caller - var callFile - var callSite - var depSite - var i = 0 - var seen = false - var stack = getStack() - var file = this._file +var Buffer = __webpack_require__(114).Buffer; - if (site) { - // provided site - depSite = site - callSite = callSiteLocation(stack[1]) - callSite.name = depSite.name - file = callSite[0] - } else { - // get call site - i = 2 - depSite = callSiteLocation(stack[i]) - callSite = depSite - } +// Export Node.js internal encodings. - // get caller of deprecated thing in relation to file - for (; i < stack.length; i++) { - caller = callSiteLocation(stack[i]) - callFile = caller[0] +module.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true}, + cesu8: { type: "_internal", bomAware: true}, + unicode11utf8: "utf8", - if (callFile === file) { - seen = true - } else if (callFile === this._file) { - file = this._file - } else if (seen) { - break - } - } + ucs2: { type: "_internal", bomAware: true}, + utf16le: "ucs2", - var key = caller - ? depSite.join(':') + '__' + caller.join(':') - : undefined + binary: { type: "_internal" }, + base64: { type: "_internal" }, + hex: { type: "_internal" }, - if (key !== undefined && key in this._warned) { - // already warned - return - } + // Codec. + _internal: InternalCodec, +}; - this._warned[key] = true +//------------------------------------------------------------------------------ - // generate automatic message from call site - var msg = message - if (!msg) { - msg = callSite === depSite || !callSite.name - ? defaultMessage(depSite) - : defaultMessage(callSite) - } +function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; - // emit deprecation if listeners exist - if (haslisteners) { - var err = DeprecationError(this._namespace, msg, stack.slice(i)) - process.emit('deprecation', err) - return - } + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; // Use utf8 for decoding. + this.encoder = InternalEncoderCesu8; - // format and write message - var format = process.stderr.isTTY - ? formatColor - : formatPlain - var output = format.call(this, msg, caller, stack.slice(i)) - process.stderr.write(output + '\n', 'utf8') + // Add decoder for versions of Node not supporting CESU-8 + if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } } -/** - * Get call site location as array. - */ +InternalCodec.prototype.encoder = InternalEncoder; +InternalCodec.prototype.decoder = InternalDecoder; -function callSiteLocation (callSite) { - var file = callSite.getFileName() || '<anonymous>' - var line = callSite.getLineNumber() - var colm = callSite.getColumnNumber() +//------------------------------------------------------------------------------ - if (callSite.isEval()) { - file = callSite.getEvalOrigin() + ', ' + file - } +// We use node.js internal decoder. Its signature is the same as ours. +var StringDecoder = __webpack_require__(866).StringDecoder; - var site = [file, line, colm] +if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. + StringDecoder.prototype.end = function() {}; - site.callSite = callSite - site.name = callSite.getFunctionName() - return site +function InternalDecoder(options, codec) { + StringDecoder.call(this, codec.enc); } -/** - * Generate a default message from the site. - */ - -function defaultMessage (site) { - var callSite = site.callSite - var funcName = site.name - - // make useful anonymous name - if (!funcName) { - funcName = '<anonymous@' + formatLocation(site) + '>' - } - - var context = callSite.getThis() - var typeName = context && callSite.getTypeName() +InternalDecoder.prototype = StringDecoder.prototype; - // ignore useless type name - if (typeName === 'Object') { - typeName = undefined - } - // make useful type name - if (typeName === 'Function') { - typeName = context.name || typeName - } +//------------------------------------------------------------------------------ +// Encoder is mostly trivial - return typeName && callSite.getMethodName() - ? typeName + '.' + funcName - : funcName +function InternalEncoder(options, codec) { + this.enc = codec.enc; } -/** - * Format deprecation message without color. - */ +InternalEncoder.prototype.write = function(str) { + return Buffer.from(str, this.enc); +} -function formatPlain (msg, caller, stack) { - var timestamp = new Date().toUTCString() +InternalEncoder.prototype.end = function() { +} - var formatted = timestamp + - ' ' + this._namespace + - ' deprecated ' + msg - // add stack trace - if (this._traced) { - for (var i = 0; i < stack.length; i++) { - formatted += '\n at ' + callSiteToString(stack[i]) - } +//------------------------------------------------------------------------------ +// Except base64 encoder, which must keep its state. - return formatted - } +function InternalEncoderBase64(options, codec) { + this.prevStr = ''; +} - if (caller) { - formatted += ' at ' + formatLocation(caller) - } +InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - (str.length % 4); + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); - return formatted -} - -/** - * Format deprecation message with color. - */ - -function formatColor (msg, caller, stack) { - var formatted = '\x1b[36;1m' + this._namespace + '\x1b[22;39m' + // bold cyan - ' \x1b[33;1mdeprecated\x1b[22;39m' + // bold yellow - ' \x1b[0m' + msg + '\x1b[39m' // reset - - // add stack trace - if (this._traced) { - for (var i = 0; i < stack.length; i++) { - formatted += '\n \x1b[36mat ' + callSiteToString(stack[i]) + '\x1b[39m' // cyan - } - - return formatted - } - - if (caller) { - formatted += ' \x1b[36m' + formatLocation(caller) + '\x1b[39m' // cyan - } - - return formatted -} - -/** - * Format call site location. - */ - -function formatLocation (callSite) { - return relative(basePath, callSite[0]) + - ':' + callSite[1] + - ':' + callSite[2] -} - -/** - * Get the stack as array of call sites. - */ - -function getStack () { - var limit = Error.stackTraceLimit - var obj = {} - var prep = Error.prepareStackTrace - - Error.prepareStackTrace = prepareObjectStackTrace - Error.stackTraceLimit = Math.max(10, limit) - - // capture the stack - Error.captureStackTrace(obj) - - // slice this function off the top - var stack = obj.stack.slice(1) - - Error.prepareStackTrace = prep - Error.stackTraceLimit = limit - - return stack -} - -/** - * Capture call site stack from v8. - */ - -function prepareObjectStackTrace (obj, stack) { - return stack -} - -/** - * Return a wrapped function in a deprecation message. - */ - -function wrapfunction (fn, message) { - if (typeof fn !== 'function') { - throw new TypeError('argument fn must be a function') - } - - var args = createArgumentsString(fn.length) - var deprecate = this // eslint-disable-line no-unused-vars - var stack = getStack() - var site = callSiteLocation(stack[1]) - - site.name = fn.name - - // eslint-disable-next-line no-eval - var deprecatedfn = eval('(function (' + args + ') {\n' + - '"use strict"\n' + - 'log.call(deprecate, message, site)\n' + - 'return fn.apply(this, arguments)\n' + - '})') - - return deprecatedfn -} - -/** - * Wrap property in a deprecation message. - */ - -function wrapproperty (obj, prop, message) { - if (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) { - throw new TypeError('argument obj must be object') - } - - var descriptor = Object.getOwnPropertyDescriptor(obj, prop) - - if (!descriptor) { - throw new TypeError('must call property on owner object') - } - - if (!descriptor.configurable) { - throw new TypeError('property must be configurable') - } - - var deprecate = this - var stack = getStack() - var site = callSiteLocation(stack[1]) - - // set site name - site.name = prop - - // convert data descriptor - if ('value' in descriptor) { - descriptor = convertDataDescriptorToAccessor(obj, prop, message) - } - - var get = descriptor.get - var set = descriptor.set - - // wrap getter - if (typeof get === 'function') { - descriptor.get = function getter () { - log.call(deprecate, message, site) - return get.apply(this, arguments) - } - } - - // wrap setter - if (typeof set === 'function') { - descriptor.set = function setter () { - log.call(deprecate, message, site) - return set.apply(this, arguments) - } - } - - Object.defineProperty(obj, prop, descriptor) -} - -/** - * Create DeprecationError for deprecation - */ - -function DeprecationError (namespace, message, stack) { - var error = new Error() - var stackString - - Object.defineProperty(error, 'constructor', { - value: DeprecationError - }) - - Object.defineProperty(error, 'message', { - configurable: true, - enumerable: false, - value: message, - writable: true - }) - - Object.defineProperty(error, 'name', { - enumerable: false, - configurable: true, - value: 'DeprecationError', - writable: true - }) - - Object.defineProperty(error, 'namespace', { - configurable: true, - enumerable: false, - value: namespace, - writable: true - }) - - Object.defineProperty(error, 'stack', { - configurable: true, - enumerable: false, - get: function () { - if (stackString !== undefined) { - return stackString - } - - // prepare stack trace - return (stackString = createStackString.call(this, stack)) - }, - set: function setter (val) { - stackString = val - } - }) - - return error -} - - -/***/ }), -/* 856 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * depd - * Copyright(c) 2014-2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var EventEmitter = __webpack_require__(271).EventEmitter - -/** - * Module exports. - * @public - */ - -lazyProperty(module.exports, 'callSiteToString', function callSiteToString () { - var limit = Error.stackTraceLimit - var obj = {} - var prep = Error.prepareStackTrace - - function prepareObjectStackTrace (obj, stack) { - return stack - } - - Error.prepareStackTrace = prepareObjectStackTrace - Error.stackTraceLimit = 2 - - // capture the stack - Error.captureStackTrace(obj) - - // slice the stack - var stack = obj.stack.slice() - - Error.prepareStackTrace = prep - Error.stackTraceLimit = limit - - return stack[0].toString ? toString : __webpack_require__(857) -}) - -lazyProperty(module.exports, 'eventListenerCount', function eventListenerCount () { - return EventEmitter.listenerCount || __webpack_require__(858) -}) - -/** - * Define a lazy property. - */ - -function lazyProperty (obj, prop, getter) { - function get () { - var val = getter() - - Object.defineProperty(obj, prop, { - configurable: true, - enumerable: true, - value: val - }) - - return val - } - - Object.defineProperty(obj, prop, { - configurable: true, - enumerable: true, - get: get - }) -} - -/** - * Call toString() on the obj - */ - -function toString (obj) { - return obj.toString() -} - - -/***/ }), -/* 857 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * depd - * Copyright(c) 2014 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - */ - -module.exports = callSiteToString - -/** - * Format a CallSite file location to a string. - */ - -function callSiteFileLocation (callSite) { - var fileName - var fileLocation = '' - - if (callSite.isNative()) { - fileLocation = 'native' - } else if (callSite.isEval()) { - fileName = callSite.getScriptNameOrSourceURL() - if (!fileName) { - fileLocation = callSite.getEvalOrigin() - } - } else { - fileName = callSite.getFileName() - } - - if (fileName) { - fileLocation += fileName - - var lineNumber = callSite.getLineNumber() - if (lineNumber != null) { - fileLocation += ':' + lineNumber - - var columnNumber = callSite.getColumnNumber() - if (columnNumber) { - fileLocation += ':' + columnNumber - } - } - } - - return fileLocation || 'unknown source' -} - -/** - * Format a CallSite to a string. - */ - -function callSiteToString (callSite) { - var addSuffix = true - var fileLocation = callSiteFileLocation(callSite) - var functionName = callSite.getFunctionName() - var isConstructor = callSite.isConstructor() - var isMethodCall = !(callSite.isToplevel() || isConstructor) - var line = '' - - if (isMethodCall) { - var methodName = callSite.getMethodName() - var typeName = getConstructorName(callSite) - - if (functionName) { - if (typeName && functionName.indexOf(typeName) !== 0) { - line += typeName + '.' - } - - line += functionName - - if (methodName && functionName.lastIndexOf('.' + methodName) !== functionName.length - methodName.length - 1) { - line += ' [as ' + methodName + ']' - } - } else { - line += typeName + '.' + (methodName || '<anonymous>') - } - } else if (isConstructor) { - line += 'new ' + (functionName || '<anonymous>') - } else if (functionName) { - line += functionName - } else { - addSuffix = false - line += fileLocation - } - - if (addSuffix) { - line += ' (' + fileLocation + ')' - } - - return line -} - -/** - * Get constructor name of reviver. - */ - -function getConstructorName (obj) { - var receiver = obj.receiver - return (receiver.constructor && receiver.constructor.name) || null -} - - -/***/ }), -/* 858 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * depd - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module exports. - * @public - */ - -module.exports = eventListenerCount - -/** - * Get the count of listeners on an event emitter of a specific type. - */ - -function eventListenerCount (emitter, type) { - return emitter.listeners(type).length -} - - -/***/ }), -/* 859 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -/* eslint no-proto: 0 */ -module.exports = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array ? setProtoOf : mixinProperties) - -function setProtoOf (obj, proto) { - obj.__proto__ = proto - return obj -} - -function mixinProperties (obj, proto) { - for (var prop in proto) { - if (!obj.hasOwnProperty(prop)) { - obj[prop] = proto[prop] - } - } - return obj -} - - -/***/ }), -/* 860 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; -/*! - * statuses - * Copyright(c) 2014 Jonathan Ong - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - - - -/** - * Module dependencies. - * @private - */ - -var codes = __webpack_require__(861) - -/** - * Module exports. - * @public - */ - -module.exports = status - -// status code to message map -status.STATUS_CODES = codes - -// array of status codes -status.codes = populateStatusesMap(status, codes) - -// status codes for redirects -status.redirect = { - 300: true, - 301: true, - 302: true, - 303: true, - 305: true, - 307: true, - 308: true -} - -// status codes for empty bodies -status.empty = { - 204: true, - 205: true, - 304: true -} - -// status codes for when you should retry the request -status.retry = { - 502: true, - 503: true, - 504: true -} - -/** - * Populate the statuses map for given codes. - * @private - */ - -function populateStatusesMap (statuses, codes) { - var arr = [] - - Object.keys(codes).forEach(function forEachCode (code) { - var message = codes[code] - var status = Number(code) - - // Populate properties - statuses[status] = message - statuses[message] = status - statuses[message.toLowerCase()] = status - - // Add to array - arr.push(status) - }) - - return arr -} - -/** - * Get the status code. - * - * Given a number, this will throw if it is not a known status - * code, otherwise the code will be returned. Given a string, - * the string will be parsed for a number and return the code - * if valid, otherwise will lookup the code assuming this is - * the status message. - * - * @param {string|number} code - * @returns {number} - * @public - */ - -function status (code) { - if (typeof code === 'number') { - if (!status[code]) throw new Error('invalid status code: ' + code) - return code - } - - if (typeof code !== 'string') { - throw new TypeError('code must be a number or string') - } - - // '403' - var n = parseInt(code, 10) - if (!isNaN(n)) { - if (!status[n]) throw new Error('invalid status code: ' + n) - return n - } - - n = status[code.toLowerCase()] - if (!n) throw new Error('invalid status message: "' + code + '"') - return n -} - - -/***/ }), -/* 861 */ -/***/ (function(module) { - -module.exports = JSON.parse("{\"100\":\"Continue\",\"101\":\"Switching Protocols\",\"102\":\"Processing\",\"103\":\"Early Hints\",\"200\":\"OK\",\"201\":\"Created\",\"202\":\"Accepted\",\"203\":\"Non-Authoritative Information\",\"204\":\"No Content\",\"205\":\"Reset Content\",\"206\":\"Partial Content\",\"207\":\"Multi-Status\",\"208\":\"Already Reported\",\"226\":\"IM Used\",\"300\":\"Multiple Choices\",\"301\":\"Moved Permanently\",\"302\":\"Found\",\"303\":\"See Other\",\"304\":\"Not Modified\",\"305\":\"Use Proxy\",\"306\":\"(Unused)\",\"307\":\"Temporary Redirect\",\"308\":\"Permanent Redirect\",\"400\":\"Bad Request\",\"401\":\"Unauthorized\",\"402\":\"Payment Required\",\"403\":\"Forbidden\",\"404\":\"Not Found\",\"405\":\"Method Not Allowed\",\"406\":\"Not Acceptable\",\"407\":\"Proxy Authentication Required\",\"408\":\"Request Timeout\",\"409\":\"Conflict\",\"410\":\"Gone\",\"411\":\"Length Required\",\"412\":\"Precondition Failed\",\"413\":\"Payload Too Large\",\"414\":\"URI Too Long\",\"415\":\"Unsupported Media Type\",\"416\":\"Range Not Satisfiable\",\"417\":\"Expectation Failed\",\"418\":\"I'm a teapot\",\"421\":\"Misdirected Request\",\"422\":\"Unprocessable Entity\",\"423\":\"Locked\",\"424\":\"Failed Dependency\",\"425\":\"Unordered Collection\",\"426\":\"Upgrade Required\",\"428\":\"Precondition Required\",\"429\":\"Too Many Requests\",\"431\":\"Request Header Fields Too Large\",\"451\":\"Unavailable For Legal Reasons\",\"500\":\"Internal Server Error\",\"501\":\"Not Implemented\",\"502\":\"Bad Gateway\",\"503\":\"Service Unavailable\",\"504\":\"Gateway Timeout\",\"505\":\"HTTP Version Not Supported\",\"506\":\"Variant Also Negotiates\",\"507\":\"Insufficient Storage\",\"508\":\"Loop Detected\",\"509\":\"Bandwidth Limit Exceeded\",\"510\":\"Not Extended\",\"511\":\"Network Authentication Required\"}"); - -/***/ }), -/* 862 */ -/***/ (function(module, exports, __webpack_require__) { - -try { - var util = __webpack_require__(9); - /* istanbul ignore next */ - if (typeof util.inherits !== 'function') throw ''; - module.exports = util.inherits; -} catch (e) { - /* istanbul ignore next */ - module.exports = __webpack_require__(863); -} - - -/***/ }), -/* 863 */ -/***/ (function(module, exports) { - -if (typeof Object.create === 'function') { - // implementation from standard node.js 'util' module - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - ctor.prototype = Object.create(superCtor.prototype, { - constructor: { - value: ctor, - enumerable: false, - writable: true, - configurable: true - } - }) - } - }; -} else { - // old school shim for old browsers - module.exports = function inherits(ctor, superCtor) { - if (superCtor) { - ctor.super_ = superCtor - var TempCtor = function () {} - TempCtor.prototype = superCtor.prototype - ctor.prototype = new TempCtor() - ctor.prototype.constructor = ctor - } - } -} - - -/***/ }), -/* 864 */ -/***/ (function(module, exports) { - -/*! - * toidentifier - * Copyright(c) 2016 Douglas Christopher Wilson - * MIT Licensed - */ - -/** - * Module exports. - * @public - */ - -module.exports = toIdentifier - -/** - * Trasform the given string into a JavaScript identifier - * - * @param {string} str - * @returns {string} - * @public - */ - -function toIdentifier (str) { - return str - .split(' ') - .map(function (token) { - return token.slice(0, 1).toUpperCase() + token.slice(1) - }) - .join('') - .replace(/[^ _0-9a-z]/gi, '') -} - - -/***/ }), -/* 865 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// Some environments don't have global Buffer (e.g. React Native). -// Solution would be installing npm modules "buffer" and "stream" explicitly. -var Buffer = __webpack_require__(114).Buffer; - -var bomHandling = __webpack_require__(866), - iconv = module.exports; - -// All codecs and aliases are kept here, keyed by encoding name/alias. -// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. -iconv.encodings = null; - -// Characters emitted in case of error. -iconv.defaultCharUnicode = '�'; -iconv.defaultCharSingleByte = '?'; - -// Public API. -iconv.encode = function encode(str, encoding, options) { - str = "" + (str || ""); // Ensure string. - - var encoder = iconv.getEncoder(encoding, options); - - var res = encoder.write(str); - var trail = encoder.end(); - - return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; -} - -iconv.decode = function decode(buf, encoding, options) { - if (typeof buf === 'string') { - if (!iconv.skipDecodeWarning) { - console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); - iconv.skipDecodeWarning = true; - } - - buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. - } - - var decoder = iconv.getDecoder(encoding, options); - - var res = decoder.write(buf); - var trail = decoder.end(); - - return trail ? (res + trail) : res; -} - -iconv.encodingExists = function encodingExists(enc) { - try { - iconv.getCodec(enc); - return true; - } catch (e) { - return false; - } -} - -// Legacy aliases to convert functions -iconv.toEncoding = iconv.encode; -iconv.fromEncoding = iconv.decode; - -// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. -iconv._codecDataCache = {}; -iconv.getCodec = function getCodec(encoding) { - if (!iconv.encodings) - iconv.encodings = __webpack_require__(867); // Lazy load all encoding definitions. - - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - var enc = iconv._canonicalizeEncoding(encoding); - - // Traverse iconv.encodings to find actual codec. - var codecOptions = {}; - while (true) { - var codec = iconv._codecDataCache[enc]; - if (codec) - return codec; - - var codecDef = iconv.encodings[enc]; - - switch (typeof codecDef) { - case "string": // Direct alias to other encoding. - enc = codecDef; - break; - - case "object": // Alias with options. Can be layered. - for (var key in codecDef) - codecOptions[key] = codecDef[key]; - - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - enc = codecDef.type; - break; - - case "function": // Codec itself. - if (!codecOptions.encodingName) - codecOptions.encodingName = enc; - - // The codec function must load all tables and return object with .encoder and .decoder methods. - // It'll be called only once (for each different options object). - codec = new codecDef(codecOptions, iconv); - - iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. - return codec; - - default: - throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); - } - } -} - -iconv._canonicalizeEncoding = function(encoding) { - // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. - return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); -} - -iconv.getEncoder = function getEncoder(encoding, options) { - var codec = iconv.getCodec(encoding), - encoder = new codec.encoder(options, codec); - - if (codec.bomAware && options && options.addBOM) - encoder = new bomHandling.PrependBOM(encoder, options); - - return encoder; -} - -iconv.getDecoder = function getDecoder(encoding, options) { - var codec = iconv.getCodec(encoding), - decoder = new codec.decoder(options, codec); - - if (codec.bomAware && !(options && options.stripBOM === false)) - decoder = new bomHandling.StripBOM(decoder, options); - - return decoder; -} - - -// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. -var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; -if (nodeVer) { - - // Load streaming support in Node v0.10+ - var nodeVerArr = nodeVer.split(".").map(Number); - if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { - __webpack_require__(885)(iconv); - } - - // Load Node primitive extensions. - __webpack_require__(886)(iconv); -} - -if (false) {} - - -/***/ }), -/* 866 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var BOMChar = '\uFEFF'; - -exports.PrependBOM = PrependBOMWrapper -function PrependBOMWrapper(encoder, options) { - this.encoder = encoder; - this.addBOM = true; -} - -PrependBOMWrapper.prototype.write = function(str) { - if (this.addBOM) { - str = BOMChar + str; - this.addBOM = false; - } - - return this.encoder.write(str); -} - -PrependBOMWrapper.prototype.end = function() { - return this.encoder.end(); -} - - -//------------------------------------------------------------------------------ - -exports.StripBOM = StripBOMWrapper; -function StripBOMWrapper(decoder, options) { - this.decoder = decoder; - this.pass = false; - this.options = options || {}; -} - -StripBOMWrapper.prototype.write = function(buf) { - var res = this.decoder.write(buf); - if (this.pass || !res) - return res; - - if (res[0] === BOMChar) { - res = res.slice(1); - if (typeof this.options.stripBOM === 'function') - this.options.stripBOM(); - } - - this.pass = true; - return res; -} - -StripBOMWrapper.prototype.end = function() { - return this.decoder.end(); -} - - - -/***/ }), -/* 867 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -// Update this array if you add/rename/remove files in this directory. -// We support Browserify by skipping automatic module discovery and requiring modules directly. -var modules = [ - __webpack_require__(868), - __webpack_require__(870), - __webpack_require__(871), - __webpack_require__(872), - __webpack_require__(873), - __webpack_require__(874), - __webpack_require__(875), - __webpack_require__(876), -]; - -// Put all encoding/alias/codec definitions to single object and export it. -for (var i = 0; i < modules.length; i++) { - var module = modules[i]; - for (var enc in module) - if (Object.prototype.hasOwnProperty.call(module, enc)) - exports[enc] = module[enc]; -} - - -/***/ }), -/* 868 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - -var Buffer = __webpack_require__(114).Buffer; - -// Export Node.js internal encodings. - -module.exports = { - // Encodings - utf8: { type: "_internal", bomAware: true}, - cesu8: { type: "_internal", bomAware: true}, - unicode11utf8: "utf8", - - ucs2: { type: "_internal", bomAware: true}, - utf16le: "ucs2", - - binary: { type: "_internal" }, - base64: { type: "_internal" }, - hex: { type: "_internal" }, - - // Codec. - _internal: InternalCodec, -}; - -//------------------------------------------------------------------------------ - -function InternalCodec(codecOptions, iconv) { - this.enc = codecOptions.encodingName; - this.bomAware = codecOptions.bomAware; - - if (this.enc === "base64") - this.encoder = InternalEncoderBase64; - else if (this.enc === "cesu8") { - this.enc = "utf8"; // Use utf8 for decoding. - this.encoder = InternalEncoderCesu8; - - // Add decoder for versions of Node not supporting CESU-8 - if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { - this.decoder = InternalDecoderCesu8; - this.defaultCharUnicode = iconv.defaultCharUnicode; - } - } -} - -InternalCodec.prototype.encoder = InternalEncoder; -InternalCodec.prototype.decoder = InternalDecoder; - -//------------------------------------------------------------------------------ - -// We use node.js internal decoder. Its signature is the same as ours. -var StringDecoder = __webpack_require__(869).StringDecoder; - -if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. - StringDecoder.prototype.end = function() {}; - - -function InternalDecoder(options, codec) { - StringDecoder.call(this, codec.enc); -} - -InternalDecoder.prototype = StringDecoder.prototype; - - -//------------------------------------------------------------------------------ -// Encoder is mostly trivial - -function InternalEncoder(options, codec) { - this.enc = codec.enc; -} - -InternalEncoder.prototype.write = function(str) { - return Buffer.from(str, this.enc); -} - -InternalEncoder.prototype.end = function() { -} - - -//------------------------------------------------------------------------------ -// Except base64 encoder, which must keep its state. - -function InternalEncoderBase64(options, codec) { - this.prevStr = ''; -} - -InternalEncoderBase64.prototype.write = function(str) { - str = this.prevStr + str; - var completeQuads = str.length - (str.length % 4); - this.prevStr = str.slice(completeQuads); - str = str.slice(0, completeQuads); - - return Buffer.from(str, "base64"); + return Buffer.from(str, "base64"); } InternalEncoderBase64.prototype.end = function() { @@ -149650,13 +144687,13 @@ InternalDecoderCesu8.prototype.end = function() { /***/ }), -/* 869 */ +/* 866 */ /***/ (function(module, exports) { module.exports = require("string_decoder"); /***/ }), -/* 870 */ +/* 867 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -149840,7 +144877,7 @@ function detectEncoding(buf, defaultEncoding) { /***/ }), -/* 871 */ +/* 868 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -150137,7 +145174,7 @@ Utf7IMAPDecoder.prototype.end = function() { /***/ }), -/* 872 */ +/* 869 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -150216,7 +145253,7 @@ SBCSDecoder.prototype.end = function() { /***/ }), -/* 873 */ +/* 870 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -150397,7 +145434,7 @@ module.exports = { /***/ }), -/* 874 */ +/* 871 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -150854,7 +145891,7 @@ module.exports = { } /***/ }), -/* 875 */ +/* 872 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -151416,7 +146453,7 @@ function findIdx(table, val) { /***/ }), -/* 876 */ +/* 873 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -151462,7 +146499,7 @@ module.exports = { 'shiftjis': { type: '_dbcs', - table: function() { return __webpack_require__(877) }, + table: function() { return __webpack_require__(874) }, encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, encodeSkipVals: [{from: 0xED40, to: 0xF940}], }, @@ -151479,7 +146516,7 @@ module.exports = { 'eucjp': { type: '_dbcs', - table: function() { return __webpack_require__(878) }, + table: function() { return __webpack_require__(875) }, encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, }, @@ -151506,13 +146543,13 @@ module.exports = { '936': 'cp936', 'cp936': { type: '_dbcs', - table: function() { return __webpack_require__(879) }, + table: function() { return __webpack_require__(876) }, }, // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. 'gbk': { type: '_dbcs', - table: function() { return __webpack_require__(879).concat(__webpack_require__(880)) }, + table: function() { return __webpack_require__(876).concat(__webpack_require__(877)) }, }, 'xgbk': 'gbk', 'isoir58': 'gbk', @@ -151524,8 +146561,8 @@ module.exports = { // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 'gb18030': { type: '_dbcs', - table: function() { return __webpack_require__(879).concat(__webpack_require__(880)) }, - gb18030: function() { return __webpack_require__(881) }, + table: function() { return __webpack_require__(876).concat(__webpack_require__(877)) }, + gb18030: function() { return __webpack_require__(878) }, encodeSkipVals: [0x80], encodeAdd: {'€': 0xA2E3}, }, @@ -151540,7 +146577,7 @@ module.exports = { '949': 'cp949', 'cp949': { type: '_dbcs', - table: function() { return __webpack_require__(882) }, + table: function() { return __webpack_require__(879) }, }, 'cseuckr': 'cp949', @@ -151581,14 +146618,14 @@ module.exports = { '950': 'cp950', 'cp950': { type: '_dbcs', - table: function() { return __webpack_require__(883) }, + table: function() { return __webpack_require__(880) }, }, // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. 'big5': 'big5hkscs', 'big5hkscs': { type: '_dbcs', - table: function() { return __webpack_require__(883).concat(__webpack_require__(884)) }, + table: function() { return __webpack_require__(880).concat(__webpack_require__(881)) }, encodeSkipVals: [0xa2cc], }, @@ -151599,55 +146636,55 @@ module.exports = { /***/ }), -/* 877 */ +/* 874 */ /***/ (function(module) { module.exports = JSON.parse("[[\"0\",\"\\u0000\",128],[\"a1\",\"。\",62],[\"8140\",\" ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½ãƒ¾ã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ï½žâˆ¥ï½œâ€¦â€¥â€˜â€™â€œâ€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆ\",9,\"+ï¼Â±Ã—\"],[\"8180\",\"÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚â™€Â°â€²â€³â„ƒï¿¥ï¼„ï¿ ï¿¡ï¼…ï¼ƒï¼†ï¼Šï¼ Â§â˜†â˜…â—‹â—◎◇◆□■△▲▽▼※〒→â†â†‘↓〓\"],[\"81b8\",\"∈∋⊆⊇⊂⊃∪∩\"],[\"81c8\",\"∧∨¬⇒⇔∀∃\"],[\"81da\",\"∠⊥⌒∂∇≡≒≪≫√∽âˆâˆµâˆ«âˆ¬\"],[\"81f0\",\"ʼn♯â™â™ªâ€ ‡¶\"],[\"81fc\",\"â—¯\"],[\"824f\",\"ï¼\",9],[\"8260\",\"A\",25],[\"8281\",\"ï½\",25],[\"829f\",\"ã\",82],[\"8340\",\"ã‚¡\",62],[\"8380\",\"ム\",22],[\"839f\",\"Α\",16,\"Σ\",6],[\"83bf\",\"α\",16,\"σ\",6],[\"8440\",\"Ð\",5,\"ÐЖ\",25],[\"8470\",\"а\",5,\"ёж\",7],[\"8480\",\"о\",17],[\"849f\",\"─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂\"],[\"8740\",\"â‘ \",19,\"â… \",9],[\"875f\",\"ã‰ãŒ”㌢ã㌘㌧㌃㌶ã‘ã—ãŒãŒ¦ãŒ£ãŒ«ãŠãŒ»ãŽœãŽãŽžãŽŽãŽã„㎡\"],[\"877e\",\"ã»\"],[\"8780\",\"ã€ã€Ÿâ„–ã℡㊤\",4,\"㈱㈲㈹ã¾ã½ã¼â‰’≡∫∮∑√⊥∠∟⊿∵∩∪\"],[\"889f\",\"亜唖娃阿哀愛挨姶逢葵茜ç©æ‚ªæ¡æ¸¥æ—葦芦鯵梓圧斡扱宛å§è™»é£´çµ¢ç¶¾é®Žæˆ–粟袷安庵按暗案闇éžæ以伊ä½ä¾å‰å›²å¤·å§”å¨å°‰æƒŸæ„慰易椅為ç•ç•°ç§»ç¶ç·¯èƒƒèŽè¡£è¬‚é•éºåŒ»äº•äº¥åŸŸè‚²éƒç£¯ä¸€å£±æº¢é€¸ç¨²èŒ¨èŠ‹é°¯å…å°å’½å“¡å› 姻引飲淫胤è”\"],[\"8940\",\"é™¢é™°éš éŸ»å‹å³å®‡çƒç¾½è¿‚雨å¯éµœçªºä¸‘碓臼渦嘘唄æ¬è”šé°»å§¥åŽ©æµ¦ç“œé–噂云é‹é›²è餌å¡å–¶å¬°å½±æ˜ æ›³æ „æ°¸æ³³æ´©ç‘›ç›ˆç©Žé ´è‹±è¡›è© é‹æ¶²ç–«ç›Šé§…悦è¬è¶Šé–²æ¦ŽåŽå††\"],[\"8980\",\"åœ’å °å¥„å®´å»¶æ€¨æŽ©æ´æ²¿æ¼”炎焔煙燕猿ç¸è‰¶è‹‘è–—é 鉛鴛塩於汚甥凹央奥往応押旺横欧殴王ç¿è¥–鴬鴎黄岡沖è»å„„屋憶臆桶牡乙俺å¸æ©æ¸©ç©éŸ³ä¸‹åŒ–ä»®ä½•ä¼½ä¾¡ä½³åŠ å¯å˜‰å¤å«å®¶å¯¡ç§‘暇果架æŒæ²³ç«ç‚ç¦ç¦¾ç¨¼ç®‡èŠ±è‹›èŒ„è·è¯è“è¦èª²å˜©è²¨è¿¦éŽéœžèšŠä¿„峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔æ¢æ‡æˆ’æ‹æ”¹\"],[\"8a40\",\"é晦械海ç°ç•Œçš†çµµèŠ¥èŸ¹é–‹éšŽè²å‡±åŠ¾å¤–咳害崖慨概涯ç¢è“‹è¡—該鎧骸浬馨蛙垣柿蛎鈎劃嚇å„å»“æ‹¡æ’¹æ ¼æ ¸æ®»ç²ç¢ºç©«è¦šè§’赫較éƒé–£éš”é©å¦å²³æ¥½é¡é¡ŽæŽ›ç¬ 樫\"],[\"8a80\",\"橿梶é°æ½Ÿå‰²å–æ°æ‹¬æ´»æ¸‡æ»‘è‘›è¤è½„且鰹å¶æ¤›æ¨ºéž„æ ªå…œç«ƒè’²é‡œéŽŒå™›é´¨æ ¢èŒ…è±ç²¥åˆˆè‹…ç“¦ä¹¾ä¾ƒå† å¯’åˆŠå‹˜å‹§å·»å–šå ªå§¦å®Œå®˜å¯›å¹²å¹¹æ‚£æ„Ÿæ…£æ†¾æ›æ•¢æŸ‘桓棺款æ“汗漢澗潅環甘監看竿管簡緩缶翰è‚艦莞観諌貫還鑑間閑関陥韓館舘丸å«å²¸å·ŒçŽ©ç™Œçœ¼å²©ç¿«è´‹é›é ‘顔願ä¼ä¼Žå±å–œå™¨åŸºå¥‡å¬‰å¯„å²å¸Œå¹¾å¿Œæ®æœºæ——既期棋棄\"],[\"8b40\",\"機帰毅気汽畿祈å£ç¨€ç´€å¾½è¦è¨˜è²´èµ·è»Œè¼é£¢é¨Žé¬¼äº€å½å„€å¦“å®œæˆ¯æŠ€æ“¬æ¬ºçŠ ç–‘ç¥‡ç¾©èŸ»èª¼è°æŽ¬èŠéž å‰åƒå–«æ¡”æ©˜è©°ç §æµé»å´å®¢è„šè™é€†ä¸˜ä¹…仇休åŠå¸å®®å¼“急救\"],[\"8b80\",\"朽求汲泣ç¸çƒç©¶çª®ç¬ˆç´šç³¾çµ¦æ—§ç‰›åŽ»å±…å·¨æ‹’æ‹ æŒ™æ¸ è™šè¨±è·é‹¸æ¼ç¦¦éšäº¨äº«äº¬ä¾›ä¾ 僑兇競共凶å”匡å¿å«å–¬å¢ƒå³¡å¼·å½Šæ€¯ææ挟教橋æ³ç‹‚ç‹çŸ¯èƒ¸è„…興蕎郷é¡éŸ¿é¥—é©šä»°å‡å°æšæ¥å±€æ›²æ¥µçŽ‰æ¡ç²åƒ…勤å‡å·¾éŒ¦æ–¤æ¬£æ¬½ç´ç¦ç¦½ç‹ç·ŠèŠ¹èŒè¡¿è¥Ÿè¬¹è¿‘金åŸéŠ€ä¹å€¶å¥åŒºç‹—玖矩苦躯駆駈駒具愚虞喰空å¶å¯“é‡éš…串櫛釧屑屈\"],[\"8c40\",\"掘窟沓é´è½¡çªªç†Šéšˆç²‚æ —ç¹°æ¡‘é¬å‹²å›è–«è¨“群è»éƒ¡å¦è¢ˆç¥ä¿‚傾刑兄啓åœçªåž‹å¥‘形径æµæ…¶æ…§æ†©æŽ²æºæ•¬æ™¯æ¡‚渓畦稽系経継繋罫茎èŠè›è¨ˆè©£è¦è»½é šé¶èŠ¸è¿Žé¯¨\"],[\"8c80\",\"劇戟撃激隙æ¡å‚‘æ¬ æ±ºæ½”ç©´çµè¡€è¨£æœˆä»¶å€¹å€¦å¥å…¼åˆ¸å‰£å–§åœå …嫌建憲懸拳æ²æ¤œæ¨©ç‰½çŠ¬çŒ®ç ”硯絹県肩見謙賢軒é£éµé™ºé¡•é¨“鹸元原厳幻弦減æºçŽ„ç¾çµƒèˆ·è¨€è«ºé™ä¹Žå€‹å¤å‘¼å›ºå§‘å¤å·±åº«å¼§æˆ¸æ•…枯湖ç‹ç³Šè¢´è‚¡èƒ¡è°è™Žèª‡è·¨éˆ·é›‡é¡§é¼“五互ä¼åˆå‘‰å¾å¨¯å¾Œå¾¡æ‚Ÿæ¢§æªŽç‘šç¢èªžèª¤è·é†ä¹žé¯‰äº¤ä½¼ä¾¯å€™å€–光公功効勾厚å£å‘\"],[\"8d40\",\"åŽå–‰å‘垢好å”åå®å·¥å·§å··å¹¸åºƒåºšåº·å¼˜æ’慌抗拘控攻昂晃更ææ ¡æ¢—æ§‹æ±Ÿæ´ªæµ©æ¸¯æºç”²çš‡ç¡¬ç¨¿ç³ 紅紘絞綱耕考肯肱腔è†èˆªè’è¡Œè¡¡è¬›è²¢è³¼éƒŠé…µé‰±ç ¿é‹¼é–¤é™\"],[\"8d80\",\"é …é¦™é«˜é´»å‰›åŠ«å·åˆå£•æ‹·æ¿ è±ªè½Ÿéº¹å…‹åˆ»å‘Šå›½ç©€é…·éµ é»’ç„漉腰甑忽惚骨狛込æ¤é ƒä»Šå›°å¤å¢¾å©šæ¨æ‡‡æ˜æ˜†æ ¹æ¢±æ··ç—•ç´ºè‰®é‚些ä½å‰å”†åµ¯å·¦å·®æŸ»æ²™ç‘³ç ‚è©éŽ–裟å座挫債催å†æœ€å“‰å¡žå¦»å®°å½©æ‰æŽ¡æ ½æ³æ¸ˆç½é‡‡çŠ€ç •ç ¦ç¥æ–Žç´°èœè£è¼‰éš›å‰¤åœ¨æ罪財冴å‚é˜ªå ºæ¦Šè‚´å’²å´ŽåŸ¼ç¢•é·ºä½œå‰Šå’‹æ¾æ˜¨æœ”柵窄ç–索錯桜é®ç¬¹åŒ™å†Šåˆ·\"],[\"8e40\",\"察拶撮擦æœæ®ºè–©é›‘çšé¯–æŒéŒ†é®«çš¿æ™’三傘å‚山惨撒散桟燦çŠç”£ç®—纂蚕讃賛酸é¤æ–¬æš«æ®‹ä»•ä»”伺使刺å¸å²å—£å››å£«å§‹å§‰å§¿åå±å¸‚師志æ€æŒ‡æ”¯åœæ–¯æ–½æ—¨æžæ¢\"],[\"8e80\",\"æ»æ°ç…祉ç§ç³¸ç´™ç´«è‚¢è„‚至視詞詩試誌諮資賜雌飼æ¯äº‹ä¼¼ä¾å…å—寺慈æŒæ™‚次滋治爾璽痔ç£ç¤ºè€Œè€³è‡ªè’”辞æ±é¹¿å¼è˜é´«ç«ºè»¸å®é›«ä¸ƒå±åŸ·å¤±å«‰å®¤æ‚‰æ¹¿æ¼†ç–¾è³ªå®Ÿè”€ç¯ å²æŸ´èŠå±¡è•Šç¸žèˆŽå†™å°„æ¨èµ¦æ–œç…®ç¤¾ç´—者è¬è»Šé®è›‡é‚ªå€Ÿå‹ºå°ºæ“ç¼çˆµé…Œé‡ˆéŒ«è‹¥å¯‚弱惹主å–守手朱殊狩ç 種腫趣酒首儒å—呪寿授樹綬需囚åŽå‘¨\"],[\"8f40\",\"宗就州修æ„拾洲秀秋終ç¹ç¿’è‡èˆŸè’衆襲è®è¹´è¼¯é€±é…‹é…¬é›†é†œä»€ä½å……å従戎柔æ±æ¸‹ç£ç¸¦é‡éŠƒå”夙宿淑ç¥ç¸®ç²›å¡¾ç†Ÿå‡ºè¡“述俊峻春瞬竣舜駿准循旬楯殉淳\"],[\"8f80\",\"準潤盾純巡éµé†‡é †å‡¦åˆæ‰€æš‘曙渚庶緒署書薯藷諸助å™å¥³åºå¾æ•é‹¤é™¤å‚·å„Ÿå‹åŒ å‡å¬å“¨å•†å”±å˜—奨妾娼宵将å°å°‘å°šåº„åºŠå» å½°æ‰¿æŠ„æ‹›æŽŒæ·æ˜‡æ˜Œæ˜æ™¶æ¾æ¢¢æ¨Ÿæ¨µæ²¼æ¶ˆæ¸‰æ¹˜ç„¼ç„¦ç…§ç—‡çœç¡ç¤ç¥¥ç§°ç« 笑粧紹肖è–蒋蕉è¡è£³è¨Ÿè¨¼è©”詳象賞醤鉦é¾é˜éšœéž˜ä¸Šä¸ˆä¸žä¹—å†—å‰°åŸŽå ´å£Œå¬¢å¸¸æƒ…æ“¾æ¡æ–浄状畳穣蒸è²é†¸éŒ 嘱埴飾\"],[\"9040\",\"æ‹æ¤æ®–ç‡ç¹”è·è‰²è§¦é£Ÿè•è¾±å°»ä¼¸ä¿¡ä¾µå”‡å¨ å¯å¯©å¿ƒæ…ŽæŒ¯æ–°æ™‹æ£®æ¦›æµ¸æ·±ç”³ç–¹çœŸç¥žç§¦ç´³è‡£èŠ¯è–ªè¦ªè¨ºèº«è¾›é€²é‡éœ‡äººä»åˆƒå¡µå£¬å°‹ç”šå°½è…Žè¨Šè¿…陣é笥è«é ˆé…¢å›³åŽ¨\"],[\"9080\",\"逗å¹åž‚帥推水炊ç¡ç²‹ç¿ è¡°é‚é…”éŒéŒ˜éšç‘žé«„崇嵩数枢趨雛æ®æ‰æ¤™è…é —é›€è£¾æ¾„æ‘ºå¯¸ä¸–ç€¬ç•æ˜¯å‡„制勢姓å¾æ€§æˆæ”¿æ•´æ˜Ÿæ™´æ£²æ –æ£æ¸…牲生盛精è–å£°è£½è¥¿èª èª“è«‹é€é†’é’é™æ–‰ç¨Žè„†éš»å¸æƒœæˆšæ–¥æ˜”æžçŸ³ç©ç±ç¸¾è„Šè²¬èµ¤è·¡è¹Ÿç¢©åˆ‡æ‹™æŽ¥æ‘‚折è¨çªƒç¯€èª¬é›ªçµ¶èˆŒè‰ä»™å…ˆåƒå 宣専尖å·æˆ¦æ‰‡æ’°æ “æ ´æ³‰æµ…æ´—æŸ“æ½œç…Žç…½æ—‹ç©¿ç®ç·š\"],[\"9140\",\"繊羨腺舛船薦詮賎践é¸é·éŠéŠ‘閃鮮å‰å–„漸然全禅繕膳糎噌塑岨措曾曽楚狙ç–ç–Žç¤Žç¥–ç§Ÿç²—ç´ çµ„è˜‡è¨´é˜»é¡é¼ 僧創åŒå¢å€‰å–ªå£®å¥çˆ½å®‹å±¤åŒæƒ£æƒ³æœæŽƒæŒ¿æŽ»\"],[\"9180\",\"æ“早曹巣æ§æ§½æ¼•ç‡¥äº‰ç—©ç›¸çª“糟ç·ç¶œè¡è‰è˜è‘¬è’¼è—»è£…èµ°é€é鎗霜騒åƒå¢—æ†Žè‡“è”µè´ˆé€ ä¿ƒå´å‰‡å³æ¯æ‰æŸæ¸¬è¶³é€Ÿä¿—属賊æ—続å’袖其æƒå˜å«å°Šææ‘éœä»–å¤šå¤ªæ±°è©‘å”¾å •å¦¥æƒ°æ‰“æŸèˆµæ¥•é™€é§„é¨¨ä½“å †å¯¾è€å²±å¸¯å¾…æ€ æ…‹æˆ´æ›¿æ³°æ»žèƒŽè…¿è‹”è¢‹è²¸é€€é€®éšŠé»›é¯›ä»£å°å¤§ç¬¬é†é¡Œé·¹æ»ç€§å“啄宅托択拓沢濯ç¢è¨—é¸æ¿è«¾èŒ¸å‡§è›¸åª\"],[\"9240\",\"å©ä½†é”辰奪脱巽竪辿棚谷狸鱈樽誰丹å˜å˜†å¦æ‹…探旦æŽæ·¡æ¹›ç‚çŸç«¯ç®ªç¶»è€½èƒ†è›‹èª•é›å›£å£‡å¼¾æ–暖檀段男談値知地弛æ¥æ™ºæ± 痴稚置致蜘é…馳築畜竹ç‘è“„\"],[\"9280\",\"é€ç§©çª’茶嫡ç€ä¸ä»²å®™å¿ 抽昼柱注虫衷註酎鋳é§æ¨—瀦猪苧著貯ä¸å…†å‡‹å–‹å¯µå¸–帳åºå¼”張彫徴懲挑暢æœæ½®ç‰’町眺è´è„¹è…¸è¶èª¿è«œè¶…è·³éŠšé•·é ‚é³¥å‹…æ—直朕沈çè³ƒéŽ®é™³æ´¥å¢œæ¤Žæ§Œè¿½éŽšç—›é€šå¡šæ ‚æŽ´æ§»ä½ƒæ¼¬æŸ˜è¾»è”¦ç¶´é”椿潰åªå£·å¬¬ç´¬çˆªåŠé‡£é¶´äºä½Žåœåµå‰ƒè²žå‘ˆå ¤å®šå¸åº•åºå»·å¼Ÿæ‚ŒæŠµæŒºææ¢¯æ±€ç¢‡ç¦Žç¨‹ç· è‰‡è¨‚è«¦è¹„é€“\"],[\"9340\",\"邸é„釘鼎泥摘擢敵滴的笛é©é‘溺哲徹撤è½è¿é‰„典填天展店添çºç”œè²¼è»¢é¡›ç‚¹ä¼æ®¿æ¾±ç”°é›»å…Žåå µå¡—å¦¬å± å¾’æ–—æœæ¸¡ç™»èŸè³é€”都éç ¥ç ºåŠªåº¦åœŸå¥´æ€’å€’å…šå†¬\"],[\"9380\",\"å‡åˆ€å”塔塘套宕島嶋悼投ææ±æ¡ƒæ¢¼æ£Ÿç›—淘湯涛ç¯ç‡ˆå½“痘祷ç‰ç”ç’糖統到董蕩藤討謄豆è¸é€ƒé€é™é™¶é 騰闘åƒå‹•åŒå ‚導憧撞洞瞳童胴è„é“éŠ…å³ é´‡åŒ¿å¾—å¾³æ¶œç‰¹ç£ç¦¿ç¯¤æ¯’独èªæ ƒæ©¡å‡¸çªæ¤´å±Šé³¶è‹«å¯…酉瀞噸屯惇敦沌豚éé “å‘‘æ›‡éˆå¥ˆé‚£å†…ä¹å‡ªè–™è¬Žç˜æºé‹æ¥¢é¦´ç¸„ç•·å—æ¥ è»Ÿé›£æ±äºŒå°¼å¼è¿©åŒ‚賑肉虹廿日乳入\"],[\"9440\",\"如尿韮任妊å¿èªæ¿¡ç¦°ç¥¢å¯§è‘±çŒ«ç†±å¹´å¿µæ»æ’šç‡ƒç²˜ä¹ƒå»¼ä¹‹åŸœåš¢æ‚©æ¿ƒç´èƒ½è„³è†¿è¾²è¦—蚤巴把æ’覇æ·æ³¢æ´¾ç¶ç ´å©†ç½µèŠé¦¬ä¿³å»ƒæ‹æŽ’æ•—æ¯ç›ƒç‰ŒèƒŒè‚ºè¼©é…å€åŸ¹åª’梅\"],[\"9480\",\"æ¥³ç…¤ç‹½è²·å£²è³ é™ªé€™è¿ç§¤çŸ§è©ä¼¯å‰¥åšæ‹æŸæ³Šç™½ç®”粕舶薄迫æ›æ¼ 爆縛莫é§éº¦å‡½ç®±ç¡²ç®¸è‚‡çˆæ«¨å¹¡è‚Œç•‘ç• å…«é‰¢æºŒç™ºé†—é«ªä¼ç½°æŠœç閥鳩噺塙蛤隼伴判åŠåå›å¸†æ¬æ–‘æ¿æ°¾æ±Žç‰ˆçŠ¯çç•”ç¹èˆ¬è—©è²©ç¯„é‡†ç…©é ’é£¯æŒ½æ™©ç•ªç›¤ç£è•ƒè›®åŒªå‘å¦å¦ƒåº‡å½¼æ‚²æ‰‰æ‰¹æŠ«æ–比泌疲皮碑秘緋罷肥被誹費é¿éžé£›æ¨‹ç°¸å‚™å°¾å¾®æž‡æ¯˜çµçœ‰ç¾Ž\"],[\"9540\",\"鼻柊稗匹疋é«å½¦è†è±è‚˜å¼¼å¿…ç•¢ç†é€¼æ¡§å§«åª›ç´ç™¾è¬¬ä¿µå½ªæ¨™æ°·æ¼‚瓢票表評豹廟æ病秒苗錨鋲蒜è›é°å“å½¬æ–Œæµœç€•è²§è³“é »æ•ç“¶ä¸ä»˜åŸ 夫婦富冨布府怖扶敷\"],[\"9580\",\"斧普浮父符è…膚芙èœè² 賦赴阜附侮撫æ¦èˆžè‘¡è•ªéƒ¨å°æ¥“風葺蕗ä¼å‰¯å¾©å¹…æœç¦è…¹è¤‡è¦†æ·µå¼—払沸ä»ç‰©é®’分å»å™´å¢³æ†¤æ‰®ç„šå¥®ç²‰ç³žç´›é›°æ–‡èžä¸™ä½µå…µå¡€å¹£å¹³å¼ŠæŸ„並蔽閉陛米é 僻å£ç™–碧別瞥蔑箆å変片篇編辺返é便勉娩å¼éžä¿èˆ—鋪圃æ•æ©ç”«è£œè¼”穂募墓慕戊暮æ¯ç°¿è©å€£ä¿¸åŒ…å‘†å ±å¥‰å®å³°å³¯å´©åº–抱æ§æ”¾æ–¹æœ‹\"],[\"9640\",\"æ³•æ³¡çƒ¹ç ²ç¸«èƒžèŠ³èŒè“¬èœ‚褒訪豊邦鋒飽鳳鵬ä¹äº¡å‚剖åŠå¦¨å¸½å¿˜å¿™æˆ¿æš´æœ›æŸæ£’冒紡肪膨謀貌貿鉾防å é ¬åŒ—åƒ•åœå¢¨æ’²æœ´ç‰§ç¦ç©†é‡¦å‹ƒæ²¡æ®†å €å¹Œå¥”本翻凡盆\"],[\"9680\",\"摩磨é”麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒æ¡äº¦ä¿£åˆæŠ¹æœ«æ²«è¿„ä¾ç¹éº¿ä¸‡æ…¢æº€æ¼«è”“味未é…巳箕岬密蜜湊蓑稔脈妙ç²æ°‘çœ å‹™å¤¢ç„¡ç‰ŸçŸ›éœ§éµ¡æ¤‹å©¿å¨˜å†¥å命明盟迷銘鳴姪ç‰æ»…å…棉綿緬é¢éººæ‘¸æ¨¡èŒ‚妄åŸæ¯›çŒ›ç›²ç¶²è€—蒙儲木黙目æ¢å‹¿é¤…尤戻籾貰å•æ‚¶ç´‹é–€åŒä¹Ÿå†¶å¤œçˆºè€¶é‡Žå¼¥çŸ¢åŽ„役約薬訳èºé–柳薮鑓愉愈油癒\"],[\"9740\",\"è«è¼¸å”¯ä½‘優勇å‹å®¥å¹½æ‚ 憂æ–有柚湧涌猶猷由ç¥è£•èª˜éŠé‚‘郵雄èžå¤•äºˆä½™ä¸Žèª‰è¼¿é å‚幼妖容庸æšæºæ“曜楊様洋溶熔用窯羊耀葉蓉è¦è¬¡è¸Šé¥é™½é¤Šæ…¾æŠ‘欲\"],[\"9780\",\"沃浴翌翼淀羅螺裸æ¥èŽ±é ¼é›·æ´›çµ¡è½é…ªä¹±åµåµæ¬„æ¿«è—è˜è¦§åˆ©åå±¥æŽæ¢¨ç†ç’ƒç—¢è£è£¡é‡Œé›¢é™¸å¾‹çŽ‡ç«‹è‘ŽæŽ 略劉æµæºœç‰ç•™ç¡«ç²’隆竜é¾ä¾¶æ…®æ—…虜了亮僚両凌寮料æ¢æ¶¼çŒŸç™‚çžç¨œç³§è‰¯è«’é¼é‡é™µé ˜åŠ›ç·‘倫厘林淋ç‡ç³è‡¨è¼ªéš£é±—éºŸç‘ å¡æ¶™ç´¯é¡žä»¤ä¼¶ä¾‹å†·åŠ±å¶ºæ€œçŽ²ç¤¼è‹“鈴隷零霊麗齢暦æ´åˆ—劣烈裂廉æ‹æ†æ¼£ç…‰ç°¾ç·´è¯\"],[\"9840\",\"蓮連錬呂é¯æ«“炉賂路露労å©å»Šå¼„朗楼榔浪æ¼ç‰¢ç‹¼ç¯è€è¾è‹éƒŽå…麓禄肋録論å€å’Œè©±æªè³„è„‡æƒ‘æž é·²äº™äº˜é°è©«è—蕨椀湾碗腕\"],[\"989f\",\"弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºžäºŸäº 亢亰亳亶从ä»ä»„仆仂仗仞ä»ä»Ÿä»·ä¼‰ä½šä¼°ä½›ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆åƒå‡æœƒå•ååˆåšå–å¬å¸å‚€å‚šå‚…傴傲\"],[\"9940\",\"僉僊傳僂僖僞僥åƒåƒ£åƒ®åƒ¹åƒµå„‰å„儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉å†å†‘å†“å†•å†–å†¤å†¦å†¢å†©å†ªå†«å†³å†±å†²å†°å†µå†½å‡…å‡‰å‡›å‡ è™•å‡©å‡\"],[\"9980\",\"凰凵凾刄刋刔刎刧刪刮刳刹å‰å‰„剋剌剞剔剪剴剩剳剿剽åŠåŠ”劒剱劈劑辨辧劬åŠåŠ¼åŠµå‹å‹å‹—勞勣勦é£å‹ 勳勵勸勹匆匈甸åŒåŒåŒåŒ•åŒšåŒ£åŒ¯åŒ±åŒ³åŒ¸å€å†å…丗å‰å凖åžå©å®å¤˜å»å·åŽ‚åŽ–åŽ åŽ¦åŽ¥åŽ®åŽ°åŽ¶åƒç°’é›™åŸæ›¼ç‡®å®å¨ååºåå½å‘€å¬åå¼å®å¶å©åå‘Žå’呵咎呟呱呷呰咒呻咀呶咄å’咆哇咢咸咥咬哄哈咨\"],[\"9a40\",\"咫哂咤咾咼哘哥哦å”唔哽哮å“哺哢唹啀啣啌售啜啅啖啗唸唳å•å–™å–€å’¯å–Šå–Ÿå•»å•¾å–˜å–žå–®å•¼å–ƒå–©å–‡å–¨å—šå—…嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎å™ç‡Ÿå˜´å˜¶å˜²å˜¸\"],[\"9a80\",\"å™«å™¤å˜¯å™¬å™ªåš†åš€åšŠåš åš”åšåš¥åš®åš¶åš´å›‚åš¼å›å›ƒå›€å›ˆå›Žå›‘囓囗囮囹圀囿圄圉圈國åœåœ“團圖嗇圜圦圷圸åŽåœ»å€åå©åŸ€åžˆå¡å¿åž‰åž“åž åž³åž¤åžªåž°åŸƒåŸ†åŸ”åŸ’åŸ“å ŠåŸ–åŸ£å ‹å ™å å¡²å ¡å¡¢å¡‹å¡°æ¯€å¡’å ½å¡¹å¢…å¢¹å¢Ÿå¢«å¢ºå£žå¢»å¢¸å¢®å£…å£“å£‘å£—å£™å£˜å£¥å£œå£¤å£Ÿå£¯å£ºå£¹å£»å£¼å£½å¤‚å¤Šå¤å¤›æ¢¦å¤¥å¤¬å¤å¤²å¤¸å¤¾ç«’奕å¥å¥Žå¥šå¥˜å¥¢å¥ 奧奬奩\"],[\"9b40\",\"奸å¦å¦ä½žä¾«å¦£å¦²å§†å§¨å§œå¦å§™å§šå¨¥å¨Ÿå¨‘娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲å«å¬ªå¬¶å¬¾åƒå…å€å‘å•åšå›å¥å©å°å³åµå¸æ–ˆåºå®€\"],[\"9b80\",\"它宦宸寃寇寉寔å¯å¯¤å¯¦å¯¢å¯žå¯¥å¯«å¯°å¯¶å¯³å°…將專å°å°“å° å°¢å°¨å°¸å°¹å±å±†å±Žå±“å±å±å±å±¬å±®ä¹¢å±¶å±¹å²Œå²‘岔妛岫岻岶岼岷峅岾峇峙峩峽峺å³å¶Œå³ªå´‹å´•å´—嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢å¶å¶¬å¶®å¶½å¶å¶·å¶¼å·‰å·å·“å·’å·–å·›å·«å·²å·µå¸‹å¸šå¸™å¸‘å¸›å¸¶å¸·å¹„å¹ƒå¹€å¹Žå¹—å¹”å¹Ÿå¹¢å¹¤å¹‡å¹µå¹¶å¹ºéº¼å¹¿åº å»å»‚廈å»å»\"],[\"9c40\",\"廖廣å»å»šå»›å»¢å»¡å»¨å»©å»¬å»±å»³å»°å»´å»¸å»¾å¼ƒå¼‰å½å½œå¼‹å¼‘弖弩å¼å¼¸å½å½ˆå½Œå½Žå¼¯å½‘彖彗彙彡å½å½³å½·å¾ƒå¾‚å½¿å¾Šå¾ˆå¾‘å¾‡å¾žå¾™å¾˜å¾ å¾¨å¾å¾¼å¿–忻忤忸忱å¿æ‚³å¿¿æ€¡æ \"],[\"9c80\",\"怙æ€æ€©æ€Žæ€±æ€›æ€•æ€«æ€¦æ€æ€ºæšææªæ·æŸæŠæ†ææ£æƒæ¤æ‚æ¬æ«æ™æ‚æ‚æƒ§æ‚ƒæ‚šæ‚„æ‚›æ‚–æ‚—æ‚’æ‚§æ‚‹æƒ¡æ‚¸æƒ æƒ“æ‚´å¿°æ‚½æƒ†æ‚µæƒ˜æ…愕愆惶惷愀惴惺愃愡惻惱æ„愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟æ…慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹æ‡æ‡¦æ‡£æ‡¶æ‡ºæ‡´æ‡¿æ‡½æ‡¼æ‡¾æˆ€æˆˆæˆ‰æˆæˆŒæˆ”戛\"],[\"9d40\",\"戞戡截戮戰戲戳æ‰æ‰Žæ‰žæ‰£æ‰›æ‰ 扨扼抂抉找抒抓抖拔抃抔拗拑抻æ‹æ‹¿æ‹†æ“”拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵æ挾ææœæ掖掎掀掫æ¶æŽ£æŽæŽ‰æŽŸæŽµæ«\"],[\"9d80\",\"æ©æŽ¾æ©æ€æ†æ£æ‰æ’æ¶æ„æ–æ´æ†æ“æ¦æ¶æ”æ—æ¨ææ‘§æ‘¯æ‘¶æ‘Žæ”ªæ’•æ’“æ’¥æ’©æ’ˆæ’¼æ“šæ“’æ“…æ“‡æ’»æ“˜æ“‚æ“±æ“§èˆ‰æ“ æ“¡æŠ¬æ“£æ“¯æ”¬æ“¶æ“´æ“²æ“ºæ”€æ“½æ”˜æ”œæ”…æ”¤æ”£æ”«æ”´æ”µæ”·æ”¶æ”¸ç•‹æ•ˆæ•–æ••æ•æ•˜æ•žæ•æ•²æ•¸æ–‚斃變斛斟斫斷旃旆æ—æ—„æ—Œæ—’æ—›æ—™æ— æ—¡æ—±æ²æ˜Šæ˜ƒæ—»æ³æ˜µæ˜¶æ˜´æ˜œæ™æ™„晉æ™æ™žæ™æ™¤æ™§æ™¨æ™Ÿæ™¢æ™°æšƒæšˆæšŽæš‰æš„暘æšæ›æš¹æ›‰æš¾æš¼\"],[\"9e40\",\"æ›„æš¸æ›–æ›šæ› æ˜¿æ›¦æ›©æ›°æ›µæ›·æœæœ–朞朦朧霸朮朿朶æ朸朷æ†æžæ æ™æ£æ¤æž‰æ°æž©æ¼æªæžŒæž‹æž¦æž¡æž…枷柯枴柬枳柩枸柤柞æŸæŸ¢æŸ®æž¹æŸŽæŸ†æŸ§æªœæ žæ¡†æ ©æ¡€æ¡æ ²æ¡Ž\"],[\"9e80\",\"æ¢³æ «æ¡™æ¡£æ¡·æ¡¿æ¢Ÿæ¢æ¢æ¢”æ¢æ¢›æ¢ƒæª®æ¢¹æ¡´æ¢µæ¢ 梺æ¤æ¢æ¡¾æ¤æ£Šæ¤ˆæ£˜æ¤¢æ¤¦æ£¡æ¤Œæ£æ£”æ£§æ£•æ¤¶æ¤’æ¤„æ£—æ££æ¤¥æ£¹æ£ æ£¯æ¤¨æ¤ªæ¤šæ¤£æ¤¡æ£†æ¥¹æ¥·æ¥œæ¥¸æ¥«æ¥”æ¥¾æ¥®æ¤¹æ¥´æ¤½æ¥™æ¤°æ¥¡æ¥žæ¥æ¦æ¥ªæ¦²æ¦®æ§æ¦¿æ§æ§“榾槎寨槊æ§æ¦»æ§ƒæ¦§æ¨®æ¦‘æ¦ æ¦œæ¦•æ¦´æ§žæ§¨æ¨‚æ¨›æ§¿æ¬Šæ§¹æ§²æ§§æ¨…æ¦±æ¨žæ§æ¨”槫樊樒æ«æ¨£æ¨“橄樌橲樶橸橇橢橙橦橈樸樢æªæªæª 檄檢檣\"],[\"9f40\",\"檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮æ‡æƒæ‰ææ™æ”æ›æŸæ¡æ¸æ¹æ¿æ®€æ®„殃æ®æ®˜æ®•æ®žæ®¤æ®ªæ®«æ®¯æ®²æ®±æ®³æ®·æ®¼æ¯†æ¯‹æ¯“毟毬毫毳毯\"],[\"9f80\",\"麾氈氓气氛氤氣汞汕汢汪沂æ²æ²šæ²æ²›æ±¾æ±¨æ±³æ²’æ²æ³„泱泓沽泗泅æ³æ²®æ²±æ²¾æ²ºæ³›æ³¯æ³™æ³ªæ´Ÿè¡æ´¶æ´«æ´½æ´¸æ´™æ´µæ´³æ´’洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮æ¸æ¹®æ¸®æ¸™æ¹²æ¹Ÿæ¸¾æ¸£æ¹«æ¸«æ¹¶æ¹æ¸Ÿæ¹ƒæ¸ºæ¹Žæ¸¤æ»¿æ¸æ¸¸æº‚溪溘滉溷滓溽溯滄溲滔滕æºæº¥æ»‚溟æ½æ¼‘çŒæ»¬æ»¸æ»¾æ¼¿æ»²æ¼±æ»¯æ¼²æ»Œ\"],[\"e040\",\"漾漓滷澆潺潸æ¾æ¾€æ½¯æ½›æ¿³æ½æ¾‚潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑ç€ç€æ¿¾ç€›ç€šæ½´ç€ç€˜ç€Ÿç€°ç€¾ç€²ç‘ç£ç‚™ç‚’炯烱炬炸炳炮烟烋çƒ\"],[\"e080\",\"烙焉烽焜焙煥煕熈煦煢煌煖煬ç†ç‡»ç†„ç†•ç†¨ç†¬ç‡—ç†¹ç†¾ç‡’ç‡‰ç‡”ç‡Žç‡ ç‡¬ç‡§ç‡µç‡¼ç‡¹ç‡¿çˆçˆçˆ›çˆ¨çˆçˆ¬çˆ°çˆ²çˆ»çˆ¼çˆ¿ç‰€ç‰†ç‰‹ç‰˜ç‰´ç‰¾çŠ‚çŠçŠ‡çŠ’çŠ–çŠ¢çŠ§çŠ¹çŠ²ç‹ƒç‹†ç‹„ç‹Žç‹’ç‹¢ç‹ ç‹¡ç‹¹ç‹·å€çŒ—猊猜猖çŒçŒ´çŒ¯çŒ©çŒ¥çŒ¾çŽç默ç—çªç¨ç°ç¸çµç»çºçˆçŽ³çŽçŽ»ç€ç¥ç®çžç’¢ç…瑯ç¥ç¸ç²çºç‘•ç¿ç‘Ÿç‘™ç‘瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊ç“ç“”ç±\"],[\"e140\",\"ç“ ç“£ç“§ç“©ç“®ç“²ç“°ç“±ç“¸ç“·ç”„ç”ƒç”…ç”Œç”Žç”甕甓甞甦甬甼畄ç•ç•Šç•‰ç•›ç•†ç•šç•©ç•¤ç•§ç•«ç•ç•¸ç•¶ç–†ç–‡ç•´ç–Šç–‰ç–‚疔疚ç–疥疣痂疳痃疵疽疸疼疱ç—痊痒痙痣痞痾痿\"],[\"e180\",\"ç—¼ç˜ç—°ç—ºç—²ç—³ç˜‹ç˜ç˜‰ç˜Ÿç˜§ç˜ 瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂ç›ç›–盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸ç‡çšç¨ç«ç›ç¥ç¿ç¾ç¹çžŽçž‹çž‘çž çžžçž°çž¶çž¹çž¿çž¼çž½çž»çŸ‡çŸçŸ—çŸšçŸœçŸ£çŸ®çŸ¼ç Œç ’ç¤¦ç 礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬\"],[\"e240\",\"ç£§ç£šç£½ç£´ç¤‡ç¤’ç¤‘ç¤™ç¤¬ç¤«ç¥€ç¥ ç¥—ç¥Ÿç¥šç¥•ç¥“ç¥ºç¥¿ç¦Šç¦ç¦§é½‹ç¦ªç¦®ç¦³ç¦¹ç¦ºç§‰ç§•ç§§ç§¬ç§¡ç§£ç¨ˆç¨ç¨˜ç¨™ç¨ 稟禀稱稻稾稷穃穗穉穡穢穩é¾ç©°ç©¹ç©½çªˆçª—窕窘窖窩竈窰\"],[\"e280\",\"窶竅竄窿邃竇竊ç«ç«ç«•ç«“站竚ç«ç«¡ç«¢ç«¦ç«ç«°ç¬‚ç¬ç¬Šç¬†ç¬³ç¬˜ç¬™ç¬žç¬µç¬¨ç¬¶ççºç¬„ç笋çŒç…çµç¥ç´ç§ç°ç±ç¬ç®ç®ç®˜ç®Ÿç®ç®œç®šç®‹ç®’ç®ç箙篋ç¯ç¯Œç¯ç®´ç¯†ç¯ç¯©ç°‘ç°”ç¯¦ç¯¥ç± ç°€ç°‡ç°“ç¯³ç¯·ç°—ç°ç¯¶ç°£ç°§ç°ªç°Ÿç°·ç°«ç°½ç±Œç±ƒç±”ç±ç±€ç±ç±˜ç±Ÿç±¤ç±–籥籬籵粃ç²ç²¤ç²ç²¢ç²«ç²¡ç²¨ç²³ç²²ç²±ç²®ç²¹ç²½ç³€ç³…糂糘糒糜糢鬻糯糲糴糶糺紆\"],[\"e340\",\"紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮çµçµ£ç¶“綉絛ç¶çµ½ç¶›ç¶ºç¶®ç¶£ç¶µç·‡ç¶½ç¶«ç¸½ç¶¢ç¶¯ç·œç¶¸ç¶Ÿç¶°ç·˜ç·ç·¤ç·žç·»ç·²ç·¡ç¸…縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷\"],[\"e380\",\"縲縺繧ç¹ç¹–繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒çºçº“纔纖纎纛纜缸缺罅罌ç½ç½Žç½ç½‘ç½•ç½”ç½˜ç½Ÿç½ ç½¨ç½©ç½§ç½¸ç¾‚ç¾†ç¾ƒç¾ˆç¾‡ç¾Œç¾”ç¾žç¾ç¾šç¾£ç¾¯ç¾²ç¾¹ç¾®ç¾¶ç¾¸è±ç¿…翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻èŠè†è’è˜èšèŸè¢è¨è³è²è°è¶è¹è½è¿è‚„肆肅肛肓肚è‚å†è‚¬èƒ›èƒ¥èƒ™èƒèƒ„胚胖脉胯胱脛脩脣脯腋\"],[\"e440\",\"éš‹è…†è„¾è…“è…‘èƒ¼è…±è…®è…¥è…¦è…´è†ƒè†ˆè†Šè†€è†‚è† è†•è†¤è†£è…Ÿè†“è†©è†°è†µè†¾è†¸è†½è‡€è‡‚è†ºè‡‰è‡è‡‘è‡™è‡˜è‡ˆè‡šè‡Ÿè‡ è‡§è‡ºè‡»è‡¾èˆèˆ‚舅與舊èˆèˆèˆ–舩舫舸舳艀艙艘è‰è‰šè‰Ÿè‰¤\"],[\"e480\",\"艢艨艪艫舮艱艷艸艾èŠèŠ’芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱è€èŒ¹èè…茯茫茗茘莅莚莪莟莢莖茣莎莇莊è¼èŽµè³èµèŽ 莉莨è´è“è«èŽè½èƒè˜è‹èè·è‡è è²èè¢è 莽è¸è”†è»è‘èªè¼è•šè’„è‘·è‘«è’葮蒂葩葆è¬è‘¯è‘¹èµè“Šè‘¢è’¹è’¿è’Ÿè“™è“蒻蓚è“è“蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈\"],[\"e540\",\"è•è˜‚蕋蕕薀薤薈薑薊薨è•è–”薛藪薇薜蕷蕾è–藉薺è—è–¹è—è—•è—藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿è™ä¹•è™”è™Ÿè™§è™±èš“èš£èš©èšªèš‹èšŒèš¶èš¯è›„è›†èš°è›‰è £èš«è›”è›žè›©è›¬\"],[\"e580\",\"蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉èœè›¹èœŠèœ´èœ¿èœ·èœ»èœ¥èœ©èœšè èŸè¸èŒèŽè´è—è¨è®è™è“è£èªè …螢螟螂螯蟋螽蟀èŸé›–èž«èŸ„èž³èŸ‡èŸ†èž»èŸ¯èŸ²èŸ è è èŸ¾èŸ¶èŸ·è ŽèŸ’è ‘è –è •è ¢è ¡è ±è ¶è ¹è §è »è¡„è¡‚è¡’è¡™è¡žè¡¢è¡«è¢è¡¾è¢žè¡µè¡½è¢µè¡²è¢‚袗袒袮袙袢è¢è¢¤è¢°è¢¿è¢±è£ƒè£„裔裘裙è£è£¹è¤‚裼裴裨裲褄褌褊褓襃褞褥褪褫è¥è¥„褻褶褸襌è¤è¥ 襞\"],[\"e640\",\"襦襤è¥è¥ªè¥¯è¥´è¥·è¥¾è¦ƒè¦ˆè¦Šè¦“覘覡覩覦覬覯覲覺覽覿觀觚觜è§è§§è§´è§¸è¨ƒè¨–è¨è¨Œè¨›è¨è¨¥è¨¶è©è©›è©’詆詈詼è©è©¬è©¢èª…誂誄誨誡誑誥誦誚誣諄è«è«‚諚諫諳諧\"],[\"e680\",\"è«¤è«±è¬”è« è«¢è«·è«žè«›è¬Œè¬‡è¬šè«¡è¬–è¬è¬—è¬ è¬³éž«è¬¦è¬«è¬¾è¬¨èèŒèèŽè‰è–è›èšè«èŸè¬è¯è´è½è®€è®Œè®Žè®’讓讖讙讚谺è±è°¿è±ˆè±Œè±Žè±è±•è±¢è±¬è±¸è±ºè²‚貉貅貊è²è²Žè²”豼貘æˆè²è²ªè²½è²²è²³è²®è²¶è³ˆè³è³¤è³£è³šè³½è³ºè³»è´„è´…è´Šè´‡è´è´è´é½Žè´“è³è´”贖赧èµèµ±èµ³è¶è¶™è·‚趾趺è·è·šè·–跌跛跋跪跫跟跣跼踈踉跿è¸è¸žè¸è¸Ÿè¹‚踵踰踴蹊\"],[\"e740\",\"蹇蹉蹌è¹è¹ˆè¹™è¹¤è¹ 踪蹣蹕蹶蹲蹼èºèº‡èº…躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜\"],[\"e780\",\"轢轣轤辜辟辣è¾è¾¯è¾·è¿šè¿¥è¿¢è¿ªè¿¯é‚‡è¿´é€…迹迺逑逕逡é€é€žé€–逋逧逶逵逹迸ééé‘é’逎é‰é€¾é–é˜éžé¨é¯é¶éš¨é²é‚‚é½é‚邀邊邉é‚邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀é‡é‡‰é‡‹é‡é‡–釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋é‰éŠœéŠ–銓銛鉚é‹éŠ¹éŠ·é‹©éŒé‹ºé„錮\"],[\"e840\",\"錙錢錚錣錺錵錻éœé é¼é®é–鎰鎬éŽéŽ”鎹é–é—é¨é¥é˜éƒéééˆé¤éšé”é“éƒé‡éé¶é«éµé¡éºé‘é‘’é‘„é‘›é‘ é‘¢é‘žé‘ªéˆ©é‘°é‘µé‘·é‘½é‘šé‘¼é‘¾é’鑿閂閇閊閔閖閘閙\"],[\"e880\",\"é– é–¨é–§é–閼閻閹閾闊濶闃é—闌闕闔闖關闡闥闢阡阨阮阯陂陌é™é™‹é™·é™œé™žé™é™Ÿé™¦é™²é™¬éšéš˜éš•éš—險隧隱隲隰隴隶隸隹雎雋雉é›è¥é›œéœé›•é›¹éœ„霆霈霓霎霑éœéœ–霙霤霪霰霹霽霾é„é†éˆé‚é‰éœé é¤é¦é¨å‹’é«é±é¹éž…é¼éžéºéž†éž‹éžéžéžœéž¨éž¦éž£éž³éž´éŸƒéŸ†éŸˆéŸ‹éŸœéŸé½éŸ²ç«ŸéŸ¶éŸµé é Œé ¸é ¤é ¡é ·é ½é¡†é¡é¡‹é¡«é¡¯é¡°\"],[\"e940\",\"顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡é¤é¤žé¤¤é¤ 餬餮餽餾饂饉饅é¥é¥‹é¥‘饒饌饕馗馘馥é¦é¦®é¦¼é§Ÿé§›é§é§˜é§‘é§é§®é§±é§²é§»é§¸é¨é¨é¨…駢騙騫騷驅驂驀驃\"],[\"e980\",\"騾驕é©é©›é©—驟驢驥驤驩驫驪éªéª°éª¼é«€é«é«‘髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲é„éƒéééŽé‘é˜é´é®“é®ƒé®‘é®–é®—é®Ÿé® é®¨é®´é¯€é¯Šé®¹é¯†é¯é¯‘é¯’é¯£é¯¢é¯¤é¯”é¯¡é°ºé¯²é¯±é¯°é°•é°”é°‰é°“é°Œé°†é°ˆé°’é°Šé°„é°®é°›é°¥é°¤é°¡é°°é±‡é°²é±†é°¾é±šé± é±§é±¶é±¸é³§é³¬é³°é´‰é´ˆé³«é´ƒé´†é´ªé´¦é¶¯é´£é´Ÿéµ„é´•é´’éµé´¿é´¾éµ†éµˆ\"],[\"ea40\",\"éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»é¶¸é¶ºé·†é·é·‚鷙鷓鷸鷦é·é·¯é·½é¸šé¸›é¸žé¹µé¹¹é¹½éºéºˆéº‹éºŒéº’麕麑éºéº¥éº©éº¸éºªéºé¡é»Œé»Žé»é»é»”黜點é»é» 黥黨黯\"],[\"ea80\",\"é»´é»¶é»·é»¹é»»é»¼é»½é¼‡é¼ˆçš·é¼•é¼¡é¼¬é¼¾é½Šé½’é½”é½£é½Ÿé½ é½¡é½¦é½§é½¬é½ªé½·é½²é½¶é¾•é¾œé¾ å ¯æ§‡é™ç‘¤å‡œç†™\"],[\"ed40\",\"纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊兤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨\"],[\"ed80\",\"ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå–寀甯寘寬尞岦岺峵崧嵓﨑嵂åµå¶¸å¶¹å·å¼¡å¼´å½§å¾·å¿žææ‚…æ‚Šæƒžæƒ•æ„ æƒ²æ„‘æ„·æ„°æ†˜æˆ“æŠ¦æµæ‘ æ’æ“Žæ•Žæ˜€æ˜•æ˜»æ˜‰æ˜®æ˜žæ˜¤æ™¥æ™—æ™™ï¨’æ™³æš™æš æš²æš¿æ›ºæœŽï¤©æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±\"],[\"ee40\",\"犾猤猪ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™ï¨šç¦”福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ 緖繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“è•™\"],[\"ee80\",\"è•«ï¨Ÿè–°ï¨ ï¨¡è ‡è£µè¨’è¨·è©¹èª§èª¾è«Ÿï¨¢è«¶è“è¿è³°è³´è´’赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡šé‡—釞é‡é‡®é‡¤é‡¥éˆ†éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ 鋓錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙髜éµé²é®é®±é®»é°€éµ°éµ«ï¨é¸™é»‘\"],[\"eeef\",\"â…°\",9,\"¬¦'"\"],[\"f040\",\"\",62],[\"f080\",\"\",124],[\"f140\",\"\",62],[\"f180\",\"\",124],[\"f240\",\"î…¸\",62],[\"f280\",\"\",124],[\"f340\",\"\",62],[\"f380\",\"\",124],[\"f440\",\"î‹°\",62],[\"f480\",\"\",124],[\"f540\",\"\",62],[\"f580\",\"î«\",124],[\"f640\",\"\",62],[\"f680\",\"î’§\",124],[\"f740\",\"\",62],[\"f780\",\"î•£\",124],[\"f840\",\"î— \",62],[\"f880\",\"\",124],[\"f940\",\"îšœ\"],[\"fa40\",\"â…°\",9,\"â… \",9,\"¬¦'"㈱№℡∵纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊\"],[\"fa80\",\"å…¤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå–寀甯寘寬尞岦岺峵崧嵓﨑嵂åµå¶¸å¶¹å·å¼¡å¼´å½§å¾·å¿žææ‚…æ‚Šæƒžæƒ•æ„ æƒ²æ„‘æ„·æ„°æ†˜æˆ“æŠ¦æµæ‘ æ’æ“Žæ•Žæ˜€æ˜•æ˜»æ˜‰æ˜®æ˜žæ˜¤æ™¥æ™—æ™™ï¨’æ™³æš™æš æš²æš¿æ›ºæœŽï¤©æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯\"],[\"fb40\",\"涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±çŠ¾çŒ¤ï¨–ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™\"],[\"fb80\",\"祥禔福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ 緖繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“è•™è•«ï¨Ÿè–°ï¨ ï¨¡è ‡è£µè¨’è¨·è©¹èª§èª¾è«Ÿï¨¢è«¶è“è¿è³°è³´è´’赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡šé‡—釞é‡é‡®é‡¤é‡¥éˆ†éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ 鋓錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙\"],[\"fc40\",\"é«œéµé²é®é®±é®»é°€éµ°éµ«ï¨é¸™é»‘\"]]"); /***/ }), -/* 878 */ +/* 875 */ /***/ (function(module) { module.exports = JSON.parse("[[\"0\",\"\\u0000\",127],[\"8ea1\",\"。\",62],[\"a1a1\",\" ã€ã€‚,.・:;?ï¼ã‚›ã‚œÂ´ï½€Â¨ï¼¾ï¿£ï¼¿ãƒ½ãƒ¾ã‚ゞ〃ä»ã€…〆〇ー―â€ï¼ï¼¼ï½žâˆ¥ï½œâ€¦â€¥â€˜â€™â€œâ€ï¼ˆï¼‰ã€”〕[]{ï½ã€ˆ\",9,\"+ï¼Â±Ã—÷ï¼â‰ ï¼œï¼žâ‰¦â‰§âˆžâˆ´â™‚â™€Â°â€²â€³â„ƒï¿¥ï¼„ï¿ ï¿¡ï¼…ï¼ƒï¼†ï¼Šï¼ Â§â˜†â˜…â—‹â—â—Žâ—‡\"],[\"a2a1\",\"◆□■△▲▽▼※〒→â†â†‘↓〓\"],[\"a2ba\",\"∈∋⊆⊇⊂⊃∪∩\"],[\"a2ca\",\"∧∨¬⇒⇔∀∃\"],[\"a2dc\",\"∠⊥⌒∂∇≡≒≪≫√∽âˆâˆµâˆ«âˆ¬\"],[\"a2f2\",\"ʼn♯â™â™ªâ€ ‡¶\"],[\"a2fe\",\"â—¯\"],[\"a3b0\",\"ï¼\",9],[\"a3c1\",\"A\",25],[\"a3e1\",\"ï½\",25],[\"a4a1\",\"ã\",82],[\"a5a1\",\"ã‚¡\",85],[\"a6a1\",\"Α\",16,\"Σ\",6],[\"a6c1\",\"α\",16,\"σ\",6],[\"a7a1\",\"Ð\",5,\"ÐЖ\",25],[\"a7d1\",\"а\",5,\"ёж\",25],[\"a8a1\",\"─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂\"],[\"ada1\",\"â‘ \",19,\"â… \",9],[\"adc0\",\"ã‰ãŒ”㌢ã㌘㌧㌃㌶ã‘ã—ãŒãŒ¦ãŒ£ãŒ«ãŠãŒ»ãŽœãŽãŽžãŽŽãŽã„㎡\"],[\"addf\",\"ã»ã€ã€Ÿâ„–ã℡㊤\",4,\"㈱㈲㈹ã¾ã½ã¼â‰’≡∫∮∑√⊥∠∟⊿∵∩∪\"],[\"b0a1\",\"亜唖娃阿哀愛挨姶逢葵茜ç©æ‚ªæ¡æ¸¥æ—葦芦鯵梓圧斡扱宛å§è™»é£´çµ¢ç¶¾é®Žæˆ–粟袷安庵按暗案闇éžæ以伊ä½ä¾å‰å›²å¤·å§”å¨å°‰æƒŸæ„慰易椅為ç•ç•°ç§»ç¶ç·¯èƒƒèŽè¡£è¬‚é•éºåŒ»äº•äº¥åŸŸè‚²éƒç£¯ä¸€å£±æº¢é€¸ç¨²èŒ¨èŠ‹é°¯å…å°å’½å“¡å› 姻引飲淫胤è”\"],[\"b1a1\",\"é™¢é™°éš éŸ»å‹å³å®‡çƒç¾½è¿‚雨å¯éµœçªºä¸‘碓臼渦嘘唄æ¬è”šé°»å§¥åŽ©æµ¦ç“œé–噂云é‹é›²è餌å¡å–¶å¬°å½±æ˜ æ›³æ „æ°¸æ³³æ´©ç‘›ç›ˆç©Žé ´è‹±è¡›è© é‹æ¶²ç–«ç›Šé§…悦è¬è¶Šé–²æ¦ŽåŽå††åœ’å °å¥„å®´å»¶æ€¨æŽ©æ´æ²¿æ¼”炎焔煙燕猿ç¸è‰¶è‹‘è–—é 鉛鴛塩於汚甥凹央奥往応\"],[\"b2a1\",\"押旺横欧殴王ç¿è¥–鴬鴎黄岡沖è»å„„屋憶臆桶牡乙俺å¸æ©æ¸©ç©éŸ³ä¸‹åŒ–ä»®ä½•ä¼½ä¾¡ä½³åŠ å¯å˜‰å¤å«å®¶å¯¡ç§‘暇果架æŒæ²³ç«ç‚ç¦ç¦¾ç¨¼ç®‡èŠ±è‹›èŒ„è·è¯è“è¦èª²å˜©è²¨è¿¦éŽéœžèšŠä¿„峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔æ¢æ‡æˆ’æ‹æ”¹\"],[\"b3a1\",\"é晦械海ç°ç•Œçš†çµµèŠ¥èŸ¹é–‹éšŽè²å‡±åŠ¾å¤–咳害崖慨概涯ç¢è“‹è¡—該鎧骸浬馨蛙垣柿蛎鈎劃嚇å„å»“æ‹¡æ’¹æ ¼æ ¸æ®»ç²ç¢ºç©«è¦šè§’赫較éƒé–£éš”é©å¦å²³æ¥½é¡é¡ŽæŽ›ç¬ 樫橿梶é°æ½Ÿå‰²å–æ°æ‹¬æ´»æ¸‡æ»‘è‘›è¤è½„且鰹å¶æ¤›æ¨ºéž„æ ªå…œç«ƒè’²é‡œéŽŒå™›é´¨æ ¢èŒ…è±\"],[\"b4a1\",\"ç²¥åˆˆè‹…ç“¦ä¹¾ä¾ƒå† å¯’åˆŠå‹˜å‹§å·»å–šå ªå§¦å®Œå®˜å¯›å¹²å¹¹æ‚£æ„Ÿæ…£æ†¾æ›æ•¢æŸ‘桓棺款æ“汗漢澗潅環甘監看竿管簡緩缶翰è‚艦莞観諌貫還鑑間閑関陥韓館舘丸å«å²¸å·ŒçŽ©ç™Œçœ¼å²©ç¿«è´‹é›é ‘顔願ä¼ä¼Žå±å–œå™¨åŸºå¥‡å¬‰å¯„å²å¸Œå¹¾å¿Œæ®æœºæ——既期棋棄\"],[\"b5a1\",\"機帰毅気汽畿祈å£ç¨€ç´€å¾½è¦è¨˜è²´èµ·è»Œè¼é£¢é¨Žé¬¼äº€å½å„€å¦“å®œæˆ¯æŠ€æ“¬æ¬ºçŠ ç–‘ç¥‡ç¾©èŸ»èª¼è°æŽ¬èŠéž å‰åƒå–«æ¡”æ©˜è©°ç §æµé»å´å®¢è„šè™é€†ä¸˜ä¹…仇休åŠå¸å®®å¼“急救朽求汲泣ç¸çƒç©¶çª®ç¬ˆç´šç³¾çµ¦æ—§ç‰›åŽ»å±…å·¨æ‹’æ‹ æŒ™æ¸ è™šè¨±è·é‹¸æ¼ç¦¦éšäº¨äº«äº¬\"],[\"b6a1\",\"ä¾›ä¾ åƒ‘å…‡ç«¶å…±å‡¶å”匡å¿å«å–¬å¢ƒå³¡å¼·å½Šæ€¯ææ挟教橋æ³ç‹‚ç‹çŸ¯èƒ¸è„…興蕎郷é¡éŸ¿é¥—é©šä»°å‡å°æšæ¥å±€æ›²æ¥µçŽ‰æ¡ç²åƒ…勤å‡å·¾éŒ¦æ–¤æ¬£æ¬½ç´ç¦ç¦½ç‹ç·ŠèŠ¹èŒè¡¿è¥Ÿè¬¹è¿‘金åŸéŠ€ä¹å€¶å¥åŒºç‹—玖矩苦躯駆駈駒具愚虞喰空å¶å¯“é‡éš…串櫛釧屑屈\"],[\"b7a1\",\"掘窟沓é´è½¡çªªç†Šéšˆç²‚æ —ç¹°æ¡‘é¬å‹²å›è–«è¨“群è»éƒ¡å¦è¢ˆç¥ä¿‚傾刑兄啓åœçªåž‹å¥‘形径æµæ…¶æ…§æ†©æŽ²æºæ•¬æ™¯æ¡‚渓畦稽系経継繋罫茎èŠè›è¨ˆè©£è¦è»½é šé¶èŠ¸è¿Žé¯¨åŠ‡æˆŸæ’ƒæ¿€éš™æ¡å‚‘æ¬ æ±ºæ½”ç©´çµè¡€è¨£æœˆä»¶å€¹å€¦å¥å…¼åˆ¸å‰£å–§åœå …嫌建憲懸拳æ²\"],[\"b8a1\",\"æ¤œæ¨©ç‰½çŠ¬çŒ®ç ”ç¡¯çµ¹çœŒè‚©è¦‹è¬™è³¢è»’é£éµé™ºé¡•é¨“鹸元原厳幻弦減æºçŽ„ç¾çµƒèˆ·è¨€è«ºé™ä¹Žå€‹å¤å‘¼å›ºå§‘å¤å·±åº«å¼§æˆ¸æ•…枯湖ç‹ç³Šè¢´è‚¡èƒ¡è°è™Žèª‡è·¨éˆ·é›‡é¡§é¼“五互ä¼åˆå‘‰å¾å¨¯å¾Œå¾¡æ‚Ÿæ¢§æªŽç‘šç¢èªžèª¤è·é†ä¹žé¯‰äº¤ä½¼ä¾¯å€™å€–光公功効勾厚å£å‘\"],[\"b9a1\",\"åŽå–‰å‘垢好å”åå®å·¥å·§å··å¹¸åºƒåºšåº·å¼˜æ’慌抗拘控攻昂晃更ææ ¡æ¢—æ§‹æ±Ÿæ´ªæµ©æ¸¯æºç”²çš‡ç¡¬ç¨¿ç³ 紅紘絞綱耕考肯肱腔è†èˆªè’è¡Œè¡¡è¬›è²¢è³¼éƒŠé…µé‰±ç ¿é‹¼é–¤é™é …香高鴻剛劫å·åˆå£•æ‹·æ¿ è±ªè½Ÿéº¹å…‹åˆ»å‘Šå›½ç©€é…·éµ é»’ç„漉腰甑忽惚骨狛込\"],[\"baa1\",\"æ¤é ƒä»Šå›°å¤å¢¾å©šæ¨æ‡‡æ˜æ˜†æ ¹æ¢±æ··ç—•ç´ºè‰®é‚些ä½å‰å”†åµ¯å·¦å·®æŸ»æ²™ç‘³ç ‚è©éŽ–裟å座挫債催å†æœ€å“‰å¡žå¦»å®°å½©æ‰æŽ¡æ ½æ³æ¸ˆç½é‡‡çŠ€ç •ç ¦ç¥æ–Žç´°èœè£è¼‰éš›å‰¤åœ¨æ罪財冴å‚é˜ªå ºæ¦Šè‚´å’²å´ŽåŸ¼ç¢•é·ºä½œå‰Šå’‹æ¾æ˜¨æœ”柵窄ç–索錯桜é®ç¬¹åŒ™å†Šåˆ·\"],[\"bba1\",\"察拶撮擦æœæ®ºè–©é›‘çšé¯–æŒéŒ†é®«çš¿æ™’三傘å‚山惨撒散桟燦çŠç”£ç®—纂蚕讃賛酸é¤æ–¬æš«æ®‹ä»•ä»”伺使刺å¸å²å—£å››å£«å§‹å§‰å§¿åå±å¸‚師志æ€æŒ‡æ”¯åœæ–¯æ–½æ—¨æžæ¢æ»æ°ç…祉ç§ç³¸ç´™ç´«è‚¢è„‚至視詞詩試誌諮資賜雌飼æ¯äº‹ä¼¼ä¾å…å—寺慈æŒæ™‚\"],[\"bca1\",\"次滋治爾璽痔ç£ç¤ºè€Œè€³è‡ªè’”辞æ±é¹¿å¼è˜é´«ç«ºè»¸å®é›«ä¸ƒå±åŸ·å¤±å«‰å®¤æ‚‰æ¹¿æ¼†ç–¾è³ªå®Ÿè”€ç¯ å²æŸ´èŠå±¡è•Šç¸žèˆŽå†™å°„æ¨èµ¦æ–œç…®ç¤¾ç´—者è¬è»Šé®è›‡é‚ªå€Ÿå‹ºå°ºæ“ç¼çˆµé…Œé‡ˆéŒ«è‹¥å¯‚弱惹主å–守手朱殊狩ç 種腫趣酒首儒å—呪寿授樹綬需囚åŽå‘¨\"],[\"bda1\",\"宗就州修æ„拾洲秀秋終ç¹ç¿’è‡èˆŸè’衆襲è®è¹´è¼¯é€±é…‹é…¬é›†é†œä»€ä½å……å従戎柔æ±æ¸‹ç£ç¸¦é‡éŠƒå”夙宿淑ç¥ç¸®ç²›å¡¾ç†Ÿå‡ºè¡“述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡éµé†‡é †å‡¦åˆæ‰€æš‘曙渚庶緒署書薯藷諸助å™å¥³åºå¾æ•é‹¤é™¤å‚·å„Ÿ\"],[\"bea1\",\"å‹åŒ å‡å¬å“¨å•†å”±å˜—奨妾娼宵将å°å°‘å°šåº„åºŠå» å½°æ‰¿æŠ„æ‹›æŽŒæ·æ˜‡æ˜Œæ˜æ™¶æ¾æ¢¢æ¨Ÿæ¨µæ²¼æ¶ˆæ¸‰æ¹˜ç„¼ç„¦ç…§ç—‡çœç¡ç¤ç¥¥ç§°ç« 笑粧紹肖è–蒋蕉è¡è£³è¨Ÿè¨¼è©”詳象賞醤鉦é¾é˜éšœéž˜ä¸Šä¸ˆä¸žä¹—å†—å‰°åŸŽå ´å£Œå¬¢å¸¸æƒ…æ“¾æ¡æ–浄状畳穣蒸è²é†¸éŒ 嘱埴飾\"],[\"bfa1\",\"æ‹æ¤æ®–ç‡ç¹”è·è‰²è§¦é£Ÿè•è¾±å°»ä¼¸ä¿¡ä¾µå”‡å¨ å¯å¯©å¿ƒæ…ŽæŒ¯æ–°æ™‹æ£®æ¦›æµ¸æ·±ç”³ç–¹çœŸç¥žç§¦ç´³è‡£èŠ¯è–ªè¦ªè¨ºèº«è¾›é€²é‡éœ‡äººä»åˆƒå¡µå£¬å°‹ç”šå°½è…Žè¨Šè¿…陣é笥è«é ˆé…¢å›³åŽ¨é€—å¹åž‚帥推水炊ç¡ç²‹ç¿ è¡°é‚é…”éŒéŒ˜éšç‘žé«„崇嵩数枢趨雛æ®æ‰æ¤™è…é —é›€è£¾\"],[\"c0a1\",\"澄摺寸世瀬ç•æ˜¯å‡„制勢姓å¾æ€§æˆæ”¿æ•´æ˜Ÿæ™´æ£²æ –æ£æ¸…牲生盛精è–å£°è£½è¥¿èª èª“è«‹é€é†’é’é™æ–‰ç¨Žè„†éš»å¸æƒœæˆšæ–¥æ˜”æžçŸ³ç©ç±ç¸¾è„Šè²¬èµ¤è·¡è¹Ÿç¢©åˆ‡æ‹™æŽ¥æ‘‚折è¨çªƒç¯€èª¬é›ªçµ¶èˆŒè‰ä»™å…ˆåƒå 宣専尖å·æˆ¦æ‰‡æ’°æ “æ ´æ³‰æµ…æ´—æŸ“æ½œç…Žç…½æ—‹ç©¿ç®ç·š\"],[\"c1a1\",\"繊羨腺舛船薦詮賎践é¸é·éŠéŠ‘閃鮮å‰å–„漸然全禅繕膳糎噌塑岨措曾曽楚狙ç–ç–Žç¤Žç¥–ç§Ÿç²—ç´ çµ„è˜‡è¨´é˜»é¡é¼ 僧創åŒå¢å€‰å–ªå£®å¥çˆ½å®‹å±¤åŒæƒ£æƒ³æœæŽƒæŒ¿æŽ»æ“早曹巣æ§æ§½æ¼•ç‡¥äº‰ç—©ç›¸çª“糟ç·ç¶œè¡è‰è˜è‘¬è’¼è—»è£…èµ°é€é鎗霜騒åƒå¢—憎\"],[\"c2a1\",\"è‡“è”µè´ˆé€ ä¿ƒå´å‰‡å³æ¯æ‰æŸæ¸¬è¶³é€Ÿä¿—属賊æ—続å’袖其æƒå˜å«å°Šææ‘éœä»–å¤šå¤ªæ±°è©‘å”¾å •å¦¥æƒ°æ‰“æŸèˆµæ¥•é™€é§„é¨¨ä½“å †å¯¾è€å²±å¸¯å¾…æ€ æ…‹æˆ´æ›¿æ³°æ»žèƒŽè…¿è‹”è¢‹è²¸é€€é€®éšŠé»›é¯›ä»£å°å¤§ç¬¬é†é¡Œé·¹æ»ç€§å“啄宅托択拓沢濯ç¢è¨—é¸æ¿è«¾èŒ¸å‡§è›¸åª\"],[\"c3a1\",\"å©ä½†é”辰奪脱巽竪辿棚谷狸鱈樽誰丹å˜å˜†å¦æ‹…探旦æŽæ·¡æ¹›ç‚çŸç«¯ç®ªç¶»è€½èƒ†è›‹èª•é›å›£å£‡å¼¾æ–暖檀段男談値知地弛æ¥æ™ºæ± 痴稚置致蜘é…馳築畜竹ç‘è“„é€ç§©çª’茶嫡ç€ä¸ä»²å®™å¿ 抽昼柱注虫衷註酎鋳é§æ¨—瀦猪苧著貯ä¸å…†å‡‹å–‹å¯µ\"],[\"c4a1\",\"帖帳åºå¼”張彫徴懲挑暢æœæ½®ç‰’町眺è´è„¹è…¸è¶èª¿è«œè¶…è·³éŠšé•·é ‚é³¥å‹…æ—直朕沈çè³ƒéŽ®é™³æ´¥å¢œæ¤Žæ§Œè¿½éŽšç—›é€šå¡šæ ‚æŽ´æ§»ä½ƒæ¼¬æŸ˜è¾»è”¦ç¶´é”椿潰åªå£·å¬¬ç´¬çˆªåŠé‡£é¶´äºä½Žåœåµå‰ƒè²žå‘ˆå ¤å®šå¸åº•åºå»·å¼Ÿæ‚ŒæŠµæŒºææ¢¯æ±€ç¢‡ç¦Žç¨‹ç· è‰‡è¨‚è«¦è¹„é€“\"],[\"c5a1\",\"邸é„釘鼎泥摘擢敵滴的笛é©é‘溺哲徹撤è½è¿é‰„典填天展店添çºç”œè²¼è»¢é¡›ç‚¹ä¼æ®¿æ¾±ç”°é›»å…Žåå µå¡—å¦¬å± å¾’æ–—æœæ¸¡ç™»èŸè³é€”都éç ¥ç ºåŠªåº¦åœŸå¥´æ€’å€’å…šå†¬å‡åˆ€å”塔塘套宕島嶋悼投ææ±æ¡ƒæ¢¼æ£Ÿç›—淘湯涛ç¯ç‡ˆå½“痘祷ç‰ç”ç’糖統到\"],[\"c6a1\",\"董蕩藤討謄豆è¸é€ƒé€é™é™¶é 騰闘åƒå‹•åŒå ‚導憧撞洞瞳童胴è„é“éŠ…å³ é´‡åŒ¿å¾—å¾³æ¶œç‰¹ç£ç¦¿ç¯¤æ¯’独èªæ ƒæ©¡å‡¸çªæ¤´å±Šé³¶è‹«å¯…酉瀞噸屯惇敦沌豚éé “å‘‘æ›‡éˆå¥ˆé‚£å†…ä¹å‡ªè–™è¬Žç˜æºé‹æ¥¢é¦´ç¸„ç•·å—æ¥ è»Ÿé›£æ±äºŒå°¼å¼è¿©åŒ‚賑肉虹廿日乳入\"],[\"c7a1\",\"如尿韮任妊å¿èªæ¿¡ç¦°ç¥¢å¯§è‘±çŒ«ç†±å¹´å¿µæ»æ’šç‡ƒç²˜ä¹ƒå»¼ä¹‹åŸœåš¢æ‚©æ¿ƒç´èƒ½è„³è†¿è¾²è¦—蚤巴把æ’覇æ·æ³¢æ´¾ç¶ç ´å©†ç½µèŠé¦¬ä¿³å»ƒæ‹æŽ’æ•—æ¯ç›ƒç‰ŒèƒŒè‚ºè¼©é…å€åŸ¹åª’æ¢…æ¥³ç…¤ç‹½è²·å£²è³ é™ªé€™è¿ç§¤çŸ§è©ä¼¯å‰¥åšæ‹æŸæ³Šç™½ç®”粕舶薄迫æ›æ¼ 爆縛莫é§éº¦\"],[\"c8a1\",\"函箱硲箸肇çˆæ«¨å¹¡è‚Œç•‘ç• å…«é‰¢æºŒç™ºé†—é«ªä¼ç½°æŠœç閥鳩噺塙蛤隼伴判åŠåå›å¸†æ¬æ–‘æ¿æ°¾æ±Žç‰ˆçŠ¯çç•”ç¹èˆ¬è—©è²©ç¯„é‡†ç…©é ’é£¯æŒ½æ™©ç•ªç›¤ç£è•ƒè›®åŒªå‘å¦å¦ƒåº‡å½¼æ‚²æ‰‰æ‰¹æŠ«æ–比泌疲皮碑秘緋罷肥被誹費é¿éžé£›æ¨‹ç°¸å‚™å°¾å¾®æž‡æ¯˜çµçœ‰ç¾Ž\"],[\"c9a1\",\"鼻柊稗匹疋é«å½¦è†è±è‚˜å¼¼å¿…ç•¢ç†é€¼æ¡§å§«åª›ç´ç™¾è¬¬ä¿µå½ªæ¨™æ°·æ¼‚瓢票表評豹廟æ病秒苗錨鋲蒜è›é°å“å½¬æ–Œæµœç€•è²§è³“é »æ•ç“¶ä¸ä»˜åŸ 夫婦富冨布府怖扶敷斧普浮父符è…膚芙èœè² 賦赴阜附侮撫æ¦èˆžè‘¡è•ªéƒ¨å°æ¥“風葺蕗ä¼å‰¯å¾©å¹…æœ\"],[\"caa1\",\"ç¦è…¹è¤‡è¦†æ·µå¼—払沸ä»ç‰©é®’分å»å™´å¢³æ†¤æ‰®ç„šå¥®ç²‰ç³žç´›é›°æ–‡èžä¸™ä½µå…µå¡€å¹£å¹³å¼ŠæŸ„並蔽閉陛米é 僻å£ç™–碧別瞥蔑箆å変片篇編辺返é便勉娩å¼éžä¿èˆ—鋪圃æ•æ©ç”«è£œè¼”穂募墓慕戊暮æ¯ç°¿è©å€£ä¿¸åŒ…å‘†å ±å¥‰å®å³°å³¯å´©åº–抱æ§æ”¾æ–¹æœ‹\"],[\"cba1\",\"æ³•æ³¡çƒ¹ç ²ç¸«èƒžèŠ³èŒè“¬èœ‚褒訪豊邦鋒飽鳳鵬ä¹äº¡å‚剖åŠå¦¨å¸½å¿˜å¿™æˆ¿æš´æœ›æŸæ£’冒紡肪膨謀貌貿鉾防å é ¬åŒ—åƒ•åœå¢¨æ’²æœ´ç‰§ç¦ç©†é‡¦å‹ƒæ²¡æ®†å €å¹Œå¥”本翻凡盆摩磨é”麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒æ¡äº¦ä¿£åˆæŠ¹æœ«æ²«è¿„ä¾ç¹éº¿ä¸‡æ…¢æº€\"],[\"cca1\",\"漫蔓味未é…巳箕岬密蜜湊蓑稔脈妙ç²æ°‘çœ å‹™å¤¢ç„¡ç‰ŸçŸ›éœ§éµ¡æ¤‹å©¿å¨˜å†¥å命明盟迷銘鳴姪ç‰æ»…å…棉綿緬é¢éººæ‘¸æ¨¡èŒ‚妄åŸæ¯›çŒ›ç›²ç¶²è€—蒙儲木黙目æ¢å‹¿é¤…尤戻籾貰å•æ‚¶ç´‹é–€åŒä¹Ÿå†¶å¤œçˆºè€¶é‡Žå¼¥çŸ¢åŽ„役約薬訳èºé–柳薮鑓愉愈油癒\"],[\"cda1\",\"è«è¼¸å”¯ä½‘優勇å‹å®¥å¹½æ‚ 憂æ–有柚湧涌猶猷由ç¥è£•èª˜éŠé‚‘郵雄èžå¤•äºˆä½™ä¸Žèª‰è¼¿é å‚幼妖容庸æšæºæ“曜楊様洋溶熔用窯羊耀葉蓉è¦è¬¡è¸Šé¥é™½é¤Šæ…¾æŠ‘欲沃浴翌翼淀羅螺裸æ¥èŽ±é ¼é›·æ´›çµ¡è½é…ªä¹±åµåµæ¬„æ¿«è—è˜è¦§åˆ©åå±¥æŽæ¢¨ç†ç’ƒ\"],[\"cea1\",\"ç—¢è£è£¡é‡Œé›¢é™¸å¾‹çŽ‡ç«‹è‘ŽæŽ 略劉æµæºœç‰ç•™ç¡«ç²’隆竜é¾ä¾¶æ…®æ—…虜了亮僚両凌寮料æ¢æ¶¼çŒŸç™‚çžç¨œç³§è‰¯è«’é¼é‡é™µé ˜åŠ›ç·‘倫厘林淋ç‡ç³è‡¨è¼ªéš£é±—éºŸç‘ å¡æ¶™ç´¯é¡žä»¤ä¼¶ä¾‹å†·åŠ±å¶ºæ€œçŽ²ç¤¼è‹“鈴隷零霊麗齢暦æ´åˆ—劣烈裂廉æ‹æ†æ¼£ç…‰ç°¾ç·´è¯\"],[\"cfa1\",\"蓮連錬呂é¯æ«“炉賂路露労å©å»Šå¼„朗楼榔浪æ¼ç‰¢ç‹¼ç¯è€è¾è‹éƒŽå…麓禄肋録論å€å’Œè©±æªè³„è„‡æƒ‘æž é·²äº™äº˜é°è©«è—蕨椀湾碗腕\"],[\"d0a1\",\"弌ä¸ä¸•ä¸ªä¸±ä¸¶ä¸¼ä¸¿ä¹‚乖乘亂亅豫亊舒å¼äºŽäºžäºŸäº 亢亰亳亶从ä»ä»„仆仂仗仞ä»ä»Ÿä»·ä¼‰ä½šä¼°ä½›ä½ä½—佇佶侈ä¾ä¾˜ä½»ä½©ä½°ä¾‘佯來侖儘俔俟俎俘俛俑俚ä¿ä¿¤ä¿¥å€šå€¨å€”倪倥倅伜俶倡倩倬俾俯們倆åƒå‡æœƒå•ååˆåšå–å¬å¸å‚€å‚šå‚…傴傲\"],[\"d1a1\",\"僉僊傳僂僖僞僥åƒåƒ£åƒ®åƒ¹åƒµå„‰å„儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉å†å†‘å†“å†•å†–å†¤å†¦å†¢å†©å†ªå†«å†³å†±å†²å†°å†µå†½å‡…å‡‰å‡›å‡ è™•å‡©å‡å‡°å‡µå‡¾åˆ„刋刔刎刧刪刮刳刹å‰å‰„剋剌剞剔剪剴剩剳剿剽åŠåŠ”劒剱劈劑辨\"],[\"d2a1\",\"辧劬åŠåŠ¼åŠµå‹å‹å‹—勞勣勦é£å‹ 勳勵勸勹匆匈甸åŒåŒåŒåŒ•åŒšåŒ£åŒ¯åŒ±åŒ³åŒ¸å€å†å…丗å‰å凖åžå©å®å¤˜å»å·åŽ‚åŽ–åŽ åŽ¦åŽ¥åŽ®åŽ°åŽ¶åƒç°’é›™åŸæ›¼ç‡®å®å¨ååºåå½å‘€å¬åå¼å®å¶å©åå‘Žå’呵咎呟呱呷呰咒呻咀呶咄å’咆哇咢咸咥咬哄哈咨\"],[\"d3a1\",\"咫哂咤咾咼哘哥哦å”唔哽哮å“哺哢唹啀啣啌售啜啅啖啗唸唳å•å–™å–€å’¯å–Šå–Ÿå•»å•¾å–˜å–žå–®å•¼å–ƒå–©å–‡å–¨å—šå—…嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎å™ç‡Ÿå˜´å˜¶å˜²å˜¸å™«å™¤å˜¯å™¬å™ªåš†åš€åšŠåš åš”åšåš¥åš®åš¶åš´å›‚åš¼å›å›ƒå›€å›ˆå›Žå›‘囓囗囮囹圀囿圄圉\"],[\"d4a1\",\"圈國åœåœ“團圖嗇圜圦圷圸åŽåœ»å€åå©åŸ€åžˆå¡å¿åž‰åž“åž åž³åž¤åžªåž°åŸƒåŸ†åŸ”åŸ’åŸ“å ŠåŸ–åŸ£å ‹å ™å å¡²å ¡å¡¢å¡‹å¡°æ¯€å¡’å ½å¡¹å¢…å¢¹å¢Ÿå¢«å¢ºå£žå¢»å¢¸å¢®å£…å£“å£‘å£—å£™å£˜å£¥å£œå£¤å£Ÿå£¯å£ºå£¹å£»å£¼å£½å¤‚å¤Šå¤å¤›æ¢¦å¤¥å¤¬å¤å¤²å¤¸å¤¾ç«’奕å¥å¥Žå¥šå¥˜å¥¢å¥ 奧奬奩\"],[\"d5a1\",\"奸å¦å¦ä½žä¾«å¦£å¦²å§†å§¨å§œå¦å§™å§šå¨¥å¨Ÿå¨‘娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲å«å¬ªå¬¶å¬¾åƒå…å€å‘å•åšå›å¥å©å°å³åµå¸æ–ˆåºå®€å®ƒå®¦å®¸å¯ƒå¯‡å¯‰å¯”å¯å¯¤å¯¦å¯¢å¯žå¯¥å¯«å¯°å¯¶å¯³å°…將專å°å°“å° å°¢å°¨å°¸å°¹å±å±†å±Žå±“\"],[\"d6a1\",\"å±å±å±å±¬å±®ä¹¢å±¶å±¹å²Œå²‘岔妛岫岻岶岼岷峅岾峇峙峩峽峺å³å¶Œå³ªå´‹å´•å´—嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢å¶å¶¬å¶®å¶½å¶å¶·å¶¼å·‰å·å·“å·’å·–å·›å·«å·²å·µå¸‹å¸šå¸™å¸‘å¸›å¸¶å¸·å¹„å¹ƒå¹€å¹Žå¹—å¹”å¹Ÿå¹¢å¹¤å¹‡å¹µå¹¶å¹ºéº¼å¹¿åº å»å»‚廈å»å»\"],[\"d7a1\",\"廖廣å»å»šå»›å»¢å»¡å»¨å»©å»¬å»±å»³å»°å»´å»¸å»¾å¼ƒå¼‰å½å½œå¼‹å¼‘弖弩å¼å¼¸å½å½ˆå½Œå½Žå¼¯å½‘彖彗彙彡å½å½³å½·å¾ƒå¾‚å½¿å¾Šå¾ˆå¾‘å¾‡å¾žå¾™å¾˜å¾ å¾¨å¾å¾¼å¿–忻忤忸忱å¿æ‚³å¿¿æ€¡æ 怙æ€æ€©æ€Žæ€±æ€›æ€•æ€«æ€¦æ€æ€ºæšææªæ·æŸæŠæ†ææ£æƒæ¤æ‚æ¬æ«æ™æ‚æ‚惧悃悚\"],[\"d8a1\",\"æ‚„æ‚›æ‚–æ‚—æ‚’æ‚§æ‚‹æƒ¡æ‚¸æƒ æƒ“æ‚´å¿°æ‚½æƒ†æ‚µæƒ˜æ…愕愆惶惷愀惴惺愃愡惻惱æ„愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟æ…慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹æ‡æ‡¦æ‡£æ‡¶æ‡ºæ‡´æ‡¿æ‡½æ‡¼æ‡¾æˆ€æˆˆæˆ‰æˆæˆŒæˆ”戛\"],[\"d9a1\",\"戞戡截戮戰戲戳æ‰æ‰Žæ‰žæ‰£æ‰›æ‰ 扨扼抂抉找抒抓抖拔抃抔拗拑抻æ‹æ‹¿æ‹†æ“”拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵æ挾ææœæ掖掎掀掫æ¶æŽ£æŽæŽ‰æŽŸæŽµæ«æ©æŽ¾æ©æ€æ†æ£æ‰æ’æ¶æ„æ–æ´æ†æ“æ¦æ¶æ”æ—æ¨æ摧摯摶摎攪撕撓撥撩撈撼\"],[\"daa1\",\"æ“šæ“’æ“…æ“‡æ’»æ“˜æ“‚æ“±æ“§èˆ‰æ“ æ“¡æŠ¬æ“£æ“¯æ”¬æ“¶æ“´æ“²æ“ºæ”€æ“½æ”˜æ”œæ”…æ”¤æ”£æ”«æ”´æ”µæ”·æ”¶æ”¸ç•‹æ•ˆæ•–æ••æ•æ•˜æ•žæ•æ•²æ•¸æ–‚斃變斛斟斫斷旃旆æ—æ—„æ—Œæ—’æ—›æ—™æ— æ—¡æ—±æ²æ˜Šæ˜ƒæ—»æ³æ˜µæ˜¶æ˜´æ˜œæ™æ™„晉æ™æ™žæ™æ™¤æ™§æ™¨æ™Ÿæ™¢æ™°æšƒæšˆæšŽæš‰æš„暘æšæ›æš¹æ›‰æš¾æš¼\"],[\"dba1\",\"æ›„æš¸æ›–æ›šæ› æ˜¿æ›¦æ›©æ›°æ›µæ›·æœæœ–朞朦朧霸朮朿朶æ朸朷æ†æžæ æ™æ£æ¤æž‰æ°æž©æ¼æªæžŒæž‹æž¦æž¡æž…枷柯枴柬枳柩枸柤柞æŸæŸ¢æŸ®æž¹æŸŽæŸ†æŸ§æªœæ žæ¡†æ ©æ¡€æ¡æ ²æ¡Žæ¢³æ «æ¡™æ¡£æ¡·æ¡¿æ¢Ÿæ¢æ¢æ¢”æ¢æ¢›æ¢ƒæª®æ¢¹æ¡´æ¢µæ¢ 梺æ¤æ¢æ¡¾æ¤æ£Šæ¤ˆæ£˜æ¤¢æ¤¦æ£¡æ¤Œæ£\"],[\"dca1\",\"æ£”æ£§æ£•æ¤¶æ¤’æ¤„æ£—æ££æ¤¥æ£¹æ£ æ£¯æ¤¨æ¤ªæ¤šæ¤£æ¤¡æ£†æ¥¹æ¥·æ¥œæ¥¸æ¥«æ¥”æ¥¾æ¥®æ¤¹æ¥´æ¤½æ¥™æ¤°æ¥¡æ¥žæ¥æ¦æ¥ªæ¦²æ¦®æ§æ¦¿æ§æ§“榾槎寨槊æ§æ¦»æ§ƒæ¦§æ¨®æ¦‘æ¦ æ¦œæ¦•æ¦´æ§žæ§¨æ¨‚æ¨›æ§¿æ¬Šæ§¹æ§²æ§§æ¨…æ¦±æ¨žæ§æ¨”槫樊樒æ«æ¨£æ¨“橄樌橲樶橸橇橢橙橦橈樸樢æªæªæª 檄檢檣\"],[\"dda1\",\"檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮æ‡æƒæ‰ææ™æ”æ›æŸæ¡æ¸æ¹æ¿æ®€æ®„殃æ®æ®˜æ®•æ®žæ®¤æ®ªæ®«æ®¯æ®²æ®±æ®³æ®·æ®¼æ¯†æ¯‹æ¯“毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂æ²æ²šæ²æ²›æ±¾æ±¨æ±³æ²’æ²æ³„泱泓沽泗泅æ³æ²®æ²±æ²¾\"],[\"dea1\",\"沺泛泯泙泪洟è¡æ´¶æ´«æ´½æ´¸æ´™æ´µæ´³æ´’洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮æ¸æ¹®æ¸®æ¸™æ¹²æ¹Ÿæ¸¾æ¸£æ¹«æ¸«æ¹¶æ¹æ¸Ÿæ¹ƒæ¸ºæ¹Žæ¸¤æ»¿æ¸æ¸¸æº‚溪溘滉溷滓溽溯滄溲滔滕æºæº¥æ»‚溟æ½æ¼‘çŒæ»¬æ»¸æ»¾æ¼¿æ»²æ¼±æ»¯æ¼²æ»Œ\"],[\"dfa1\",\"漾漓滷澆潺潸æ¾æ¾€æ½¯æ½›æ¿³æ½æ¾‚潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑ç€ç€æ¿¾ç€›ç€šæ½´ç€ç€˜ç€Ÿç€°ç€¾ç€²ç‘ç£ç‚™ç‚’炯烱炬炸炳炮烟烋çƒçƒ™ç„‰çƒ½ç„œç„™ç…¥ç…•ç†ˆç…¦ç…¢ç…Œç…–ç…¬ç†ç‡»ç†„ç†•ç†¨ç†¬ç‡—ç†¹ç†¾ç‡’ç‡‰ç‡”ç‡Žç‡ ç‡¬ç‡§ç‡µç‡¼\"],[\"e0a1\",\"燹燿çˆçˆçˆ›çˆ¨çˆçˆ¬çˆ°çˆ²çˆ»çˆ¼çˆ¿ç‰€ç‰†ç‰‹ç‰˜ç‰´ç‰¾çŠ‚çŠçŠ‡çŠ’çŠ–çŠ¢çŠ§çŠ¹çŠ²ç‹ƒç‹†ç‹„ç‹Žç‹’ç‹¢ç‹ ç‹¡ç‹¹ç‹·å€çŒ—猊猜猖çŒçŒ´çŒ¯çŒ©çŒ¥çŒ¾çŽç默ç—çªç¨ç°ç¸çµç»çºçˆçŽ³çŽçŽ»ç€ç¥ç®çžç’¢ç…瑯ç¥ç¸ç²çºç‘•ç¿ç‘Ÿç‘™ç‘瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊ç“ç“”ç±\"],[\"e1a1\",\"ç“ ç“£ç“§ç“©ç“®ç“²ç“°ç“±ç“¸ç“·ç”„ç”ƒç”…ç”Œç”Žç”甕甓甞甦甬甼畄ç•ç•Šç•‰ç•›ç•†ç•šç•©ç•¤ç•§ç•«ç•ç•¸ç•¶ç–†ç–‡ç•´ç–Šç–‰ç–‚疔疚ç–疥疣痂疳痃疵疽疸疼疱ç—痊痒痙痣痞痾痿痼ç˜ç—°ç—ºç—²ç—³ç˜‹ç˜ç˜‰ç˜Ÿç˜§ç˜ 瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰\"],[\"e2a1\",\"癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂ç›ç›–盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸ç‡çšç¨ç«ç›ç¥ç¿ç¾ç¹çžŽçž‹çž‘çž çžžçž°çž¶çž¹çž¿çž¼çž½çž»çŸ‡çŸçŸ—çŸšçŸœçŸ£çŸ®çŸ¼ç Œç ’ç¤¦ç 礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬\"],[\"e3a1\",\"ç£§ç£šç£½ç£´ç¤‡ç¤’ç¤‘ç¤™ç¤¬ç¤«ç¥€ç¥ ç¥—ç¥Ÿç¥šç¥•ç¥“ç¥ºç¥¿ç¦Šç¦ç¦§é½‹ç¦ªç¦®ç¦³ç¦¹ç¦ºç§‰ç§•ç§§ç§¬ç§¡ç§£ç¨ˆç¨ç¨˜ç¨™ç¨ 稟禀稱稻稾稷穃穗穉穡穢穩é¾ç©°ç©¹ç©½çªˆçª—窕窘窖窩竈窰窶竅竄窿邃竇竊ç«ç«ç«•ç«“站竚ç«ç«¡ç«¢ç«¦ç«ç«°ç¬‚ç¬ç¬Šç¬†ç¬³ç¬˜ç¬™ç¬žç¬µç¬¨ç¬¶ç\"],[\"e4a1\",\"çºç¬„ç笋çŒç…çµç¥ç´ç§ç°ç±ç¬ç®ç®ç®˜ç®Ÿç®ç®œç®šç®‹ç®’ç®ç箙篋ç¯ç¯Œç¯ç®´ç¯†ç¯ç¯©ç°‘ç°”ç¯¦ç¯¥ç± ç°€ç°‡ç°“ç¯³ç¯·ç°—ç°ç¯¶ç°£ç°§ç°ªç°Ÿç°·ç°«ç°½ç±Œç±ƒç±”ç±ç±€ç±ç±˜ç±Ÿç±¤ç±–籥籬籵粃ç²ç²¤ç²ç²¢ç²«ç²¡ç²¨ç²³ç²²ç²±ç²®ç²¹ç²½ç³€ç³…糂糘糒糜糢鬻糯糲糴糶糺紆\"],[\"e5a1\",\"紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮çµçµ£ç¶“綉絛ç¶çµ½ç¶›ç¶ºç¶®ç¶£ç¶µç·‡ç¶½ç¶«ç¸½ç¶¢ç¶¯ç·œç¶¸ç¶Ÿç¶°ç·˜ç·ç·¤ç·žç·»ç·²ç·¡ç¸…縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧ç¹ç¹–繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒çºçº“纔纖纎纛纜缸缺\"],[\"e6a1\",\"罅罌ç½ç½Žç½ç½‘ç½•ç½”ç½˜ç½Ÿç½ ç½¨ç½©ç½§ç½¸ç¾‚ç¾†ç¾ƒç¾ˆç¾‡ç¾Œç¾”ç¾žç¾ç¾šç¾£ç¾¯ç¾²ç¾¹ç¾®ç¾¶ç¾¸è±ç¿…翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻èŠè†è’è˜èšèŸè¢è¨è³è²è°è¶è¹è½è¿è‚„肆肅肛肓肚è‚å†è‚¬èƒ›èƒ¥èƒ™èƒèƒ„胚胖脉胯胱脛脩脣脯腋\"],[\"e7a1\",\"éš‹è…†è„¾è…“è…‘èƒ¼è…±è…®è…¥è…¦è…´è†ƒè†ˆè†Šè†€è†‚è† è†•è†¤è†£è…Ÿè†“è†©è†°è†µè†¾è†¸è†½è‡€è‡‚è†ºè‡‰è‡è‡‘è‡™è‡˜è‡ˆè‡šè‡Ÿè‡ è‡§è‡ºè‡»è‡¾èˆèˆ‚舅與舊èˆèˆèˆ–舩舫舸舳艀艙艘è‰è‰šè‰Ÿè‰¤è‰¢è‰¨è‰ªè‰«èˆ®è‰±è‰·è‰¸è‰¾èŠèŠ’芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙\"],[\"e8a1\",\"茵茴茖茲茱è€èŒ¹èè…茯茫茗茘莅莚莪莟莢莖茣莎莇莊è¼èŽµè³èµèŽ 莉莨è´è“è«èŽè½èƒè˜è‹èè·è‡è è²èè¢è 莽è¸è”†è»è‘èªè¼è•šè’„è‘·è‘«è’葮蒂葩葆è¬è‘¯è‘¹èµè“Šè‘¢è’¹è’¿è’Ÿè“™è“蒻蓚è“è“蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈\"],[\"e9a1\",\"è•è˜‚蕋蕕薀薤薈薑薊薨è•è–”薛藪薇薜蕷蕾è–藉薺è—è–¹è—è—•è—藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿è™ä¹•è™”è™Ÿè™§è™±èš“èš£èš©èšªèš‹èšŒèš¶èš¯è›„è›†èš°è›‰è £èš«è›”è›žè›©è›¬è›Ÿè››è›¯èœ’èœ†èœˆèœ€èœƒè›»èœ‘èœ‰èœè›¹èœŠèœ´èœ¿èœ·èœ»èœ¥èœ©èœšè èŸè¸èŒèŽè´è—è¨è®è™\"],[\"eaa1\",\"è“è£èªè …螢螟螂螯蟋螽蟀èŸé›–èž«èŸ„èž³èŸ‡èŸ†èž»èŸ¯èŸ²èŸ è è èŸ¾èŸ¶èŸ·è ŽèŸ’è ‘è –è •è ¢è ¡è ±è ¶è ¹è §è »è¡„è¡‚è¡’è¡™è¡žè¡¢è¡«è¢è¡¾è¢žè¡µè¡½è¢µè¡²è¢‚袗袒袮袙袢è¢è¢¤è¢°è¢¿è¢±è£ƒè£„裔裘裙è£è£¹è¤‚裼裴裨裲褄褌褊褓襃褞褥褪褫è¥è¥„褻褶褸襌è¤è¥ 襞\"],[\"eba1\",\"襦襤è¥è¥ªè¥¯è¥´è¥·è¥¾è¦ƒè¦ˆè¦Šè¦“覘覡覩覦覬覯覲覺覽覿觀觚觜è§è§§è§´è§¸è¨ƒè¨–è¨è¨Œè¨›è¨è¨¥è¨¶è©è©›è©’詆詈詼è©è©¬è©¢èª…誂誄誨誡誑誥誦誚誣諄è«è«‚è«šè««è«³è«§è«¤è«±è¬”è« è«¢è«·è«žè«›è¬Œè¬‡è¬šè«¡è¬–è¬è¬—è¬ è¬³éž«è¬¦è¬«è¬¾è¬¨èèŒèèŽè‰è–è›èšè«\"],[\"eca1\",\"èŸè¬è¯è´è½è®€è®Œè®Žè®’讓讖讙讚谺è±è°¿è±ˆè±Œè±Žè±è±•è±¢è±¬è±¸è±ºè²‚貉貅貊è²è²Žè²”豼貘æˆè²è²ªè²½è²²è²³è²®è²¶è³ˆè³è³¤è³£è³šè³½è³ºè³»è´„è´…è´Šè´‡è´è´è´é½Žè´“è³è´”贖赧èµèµ±èµ³è¶è¶™è·‚趾趺è·è·šè·–跌跛跋跪跫跟跣跼踈踉跿è¸è¸žè¸è¸Ÿè¹‚踵踰踴蹊\"],[\"eda1\",\"蹇蹉蹌è¹è¹ˆè¹™è¹¤è¹ 踪蹣蹕蹶蹲蹼èºèº‡èº…躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣è¾è¾¯è¾·è¿šè¿¥è¿¢è¿ªè¿¯é‚‡è¿´é€…迹迺逑逕逡é€é€žé€–逋逧逶逵逹迸\"],[\"eea1\",\"ééé‘é’逎é‰é€¾é–é˜éžé¨é¯é¶éš¨é²é‚‚é½é‚邀邊邉é‚邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀é‡é‡‰é‡‹é‡é‡–釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋é‰éŠœéŠ–銓銛鉚é‹éŠ¹éŠ·é‹©éŒé‹ºé„錮\"],[\"efa1\",\"錙錢錚錣錺錵錻éœé é¼é®é–鎰鎬éŽéŽ”鎹é–é—é¨é¥é˜éƒéééˆé¤éšé”é“éƒé‡éé¶é«éµé¡éºé‘é‘’é‘„é‘›é‘ é‘¢é‘žé‘ªéˆ©é‘°é‘µé‘·é‘½é‘šé‘¼é‘¾é’é‘¿é–‚é–‡é–Šé–”é––é–˜é–™é– é–¨é–§é–閼閻閹閾闊濶闃é—闌闕闔闖關闡闥闢阡阨阮阯陂陌é™é™‹é™·é™œé™ž\"],[\"f0a1\",\"é™é™Ÿé™¦é™²é™¬éšéš˜éš•éš—險隧隱隲隰隴隶隸隹雎雋雉é›è¥é›œéœé›•é›¹éœ„霆霈霓霎霑éœéœ–霙霤霪霰霹霽霾é„é†éˆé‚é‰éœé é¤é¦é¨å‹’é«é±é¹éž…é¼éžéºéž†éž‹éžéžéžœéž¨éž¦éž£éž³éž´éŸƒéŸ†éŸˆéŸ‹éŸœéŸé½éŸ²ç«ŸéŸ¶éŸµé é Œé ¸é ¤é ¡é ·é ½é¡†é¡é¡‹é¡«é¡¯é¡°\"],[\"f1a1\",\"顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡é¤é¤žé¤¤é¤ 餬餮餽餾饂饉饅é¥é¥‹é¥‘饒饌饕馗馘馥é¦é¦®é¦¼é§Ÿé§›é§é§˜é§‘é§é§®é§±é§²é§»é§¸é¨é¨é¨…駢騙騫騷驅驂驀驃騾驕é©é©›é©—驟驢驥驤驩驫驪éªéª°éª¼é«€é«é«‘髓體髞髟髢髣髦髯髫髮髴髱髷\"],[\"f2a1\",\"髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲é„éƒéééŽé‘é˜é´é®“é®ƒé®‘é®–é®—é®Ÿé® é®¨é®´é¯€é¯Šé®¹é¯†é¯é¯‘é¯’é¯£é¯¢é¯¤é¯”é¯¡é°ºé¯²é¯±é¯°é°•é°”é°‰é°“é°Œé°†é°ˆé°’é°Šé°„é°®é°›é°¥é°¤é°¡é°°é±‡é°²é±†é°¾é±šé± é±§é±¶é±¸é³§é³¬é³°é´‰é´ˆé³«é´ƒé´†é´ªé´¦é¶¯é´£é´Ÿéµ„é´•é´’éµé´¿é´¾éµ†éµˆ\"],[\"f3a1\",\"éµéµžéµ¤éµ‘éµéµ™éµ²é¶‰é¶‡é¶«éµ¯éµºé¶šé¶¤é¶©é¶²é·„é·é¶»é¶¸é¶ºé·†é·é·‚鷙鷓鷸鷦é·é·¯é·½é¸šé¸›é¸žé¹µé¹¹é¹½éºéºˆéº‹éºŒéº’麕麑éºéº¥éº©éº¸éºªéºé¡é»Œé»Žé»é»é»”黜點é»é» é»¥é»¨é»¯é»´é»¶é»·é»¹é»»é»¼é»½é¼‡é¼ˆçš·é¼•é¼¡é¼¬é¼¾é½Šé½’é½”é½£é½Ÿé½ é½¡é½¦é½§é½¬é½ªé½·é½²é½¶é¾•é¾œé¾ \"],[\"f4a1\",\"å ¯æ§‡é™ç‘¤å‡œç†™\"],[\"f9a1\",\"纊褜éˆéŠˆè“œä¿‰ç‚»æ˜±æ£ˆé‹¹æ›»å½…丨仡仼伀伃伹佖侒侊侚侔ä¿å€å€¢ä¿¿å€žå†å°å‚傔僴僘兊兤å†å†¾å‡¬åˆ•åŠœåŠ¦å‹€å‹›åŒ€åŒ‡åŒ¤å²åŽ“厲å﨎咜咊咩哿喆å™å¥åž¬åŸˆåŸ‡ï¨ï¨å¢žå¢²å¤‹å¥“奛å¥å¥£å¦¤å¦ºå–寀甯寘寬尞岦岺峵崧嵓﨑嵂åµå¶¸å¶¹å·å¼¡å¼´å½§å¾·\"],[\"faa1\",\"å¿žææ‚…æ‚Šæƒžæƒ•æ„ æƒ²æ„‘æ„·æ„°æ†˜æˆ“æŠ¦æµæ‘ æ’æ“Žæ•Žæ˜€æ˜•æ˜»æ˜‰æ˜®æ˜žæ˜¤æ™¥æ™—æ™™ï¨’æ™³æš™æš æš²æš¿æ›ºæœŽï¤©æ¦æž»æ¡’柀æ æ¡„æ£ï¨“楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬æ·æ·¸æ·²æ·¼æ¸¹æ¹œæ¸§æ¸¼æº¿æ¾ˆæ¾µæ¿µç€…瀇瀨炅炫ç„焄煜煆煇凞ç‡ç‡¾çŠ±\"],[\"fba1\",\"犾猤猪ç·çŽ½ç‰ç–ç£ç’ç‡çµç¦çªç©ç®ç‘¢ç’‰ç’Ÿç”畯皂皜皞皛皦益ç†åŠ¯ç ¡ç¡Žç¡¤ç¡ºç¤°ï¨˜ï¨™ï¨šç¦”福禛竑竧靖竫箞ï¨çµˆçµœç¶·ç¶ 緖繒罇羡羽èŒè¢è¿è‡è¶è‘ˆè’´è•“è•™è•«ï¨Ÿè–°ï¨ ï¨¡è ‡è£µè¨’è¨·è©¹èª§èª¾è«Ÿï¨¢è«¶è“è¿è³°è³´è´’赶﨣è»ï¨¤ï¨¥é§éƒžï¨¦é„•é„§é‡š\"],[\"fca1\",\"釗釞é‡é‡®é‡¤é‡¥éˆ†éˆéˆŠéˆºé‰€éˆ¼é‰Žé‰™é‰‘鈹鉧銧鉷鉸鋧鋗鋙é‹ï¨§é‹•é‹ 鋓錥錡鋻﨨錞鋿éŒéŒ‚é°é—鎤é†éžé¸é±é‘…鑈閒隆﨩éšéš¯éœ³éœ»éƒééé‘é•é¡—顥飯飼餧館馞驎髙髜éµé²é®é®±é®»é°€éµ°éµ«ï¨é¸™é»‘\"],[\"fcf1\",\"â…°\",9,\"¬¦'"\"],[\"8fa2af\",\"˘ˇ¸˙˯˛˚~΄΅\"],[\"8fa2c2\",\"¡¦¿\"],[\"8fa2eb\",\"ºª©®™¤№\"],[\"8fa6e1\",\"ΆΈΉΊΪ\"],[\"8fa6e7\",\"ÎŒ\"],[\"8fa6e9\",\"ΎΫ\"],[\"8fa6ec\",\"Î\"],[\"8fa6f1\",\"άÎήίϊÎόςÏϋΰώ\"],[\"8fa7c2\",\"Ђ\",10,\"ÐŽÐ\"],[\"8fa7f2\",\"Ñ’\",10,\"ўџ\"],[\"8fa9a1\",\"ÆÄ\"],[\"8fa9a4\",\"Ħ\"],[\"8fa9a6\",\"IJ\"],[\"8fa9a8\",\"ÅÄ¿\"],[\"8fa9ab\",\"ŊØŒ\"],[\"8fa9af\",\"ŦÞ\"],[\"8fa9c1\",\"æđðħıijĸłŀʼnŋøœßŧþ\"],[\"8faaa1\",\"ÃÀÄÂĂÇĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ\"],[\"8faaba\",\"ÄœÄžÄ¢Ä Ä¤ÃÃŒÃÃŽÇİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑÅŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴßŶŹŽŻ\"],[\"8faba1\",\"áà äâăǎÄąåãćĉÄçċÄéèëêěėēęǵÄÄŸ\"],[\"8fabbd\",\"Ä¡Ä¥ÃìïîÇ\"],[\"8fabc5\",\"īįĩĵķĺľļńňņñóòöôǒőÅõŕřŗśÅšşťţúùüûÅǔűūųůũǘǜǚǖŵýÿŷźžż\"],[\"8fb0a1\",\"丂丄丅丌丒丟丣两丨丫丮丯丰丵乀ä¹ä¹„乇乑乚乜乣乨乩乴乵乹乿äºäº–亗äºäº¯äº¹ä»ƒä»ä»šä»›ä» ä»¡ä»¢ä»¨ä»¯ä»±ä»³ä»µä»½ä»¾ä»¿ä¼€ä¼‚ä¼ƒä¼ˆä¼‹ä¼Œä¼’ä¼•ä¼–ä¼—ä¼™ä¼®ä¼±ä½ ä¼³ä¼µä¼·ä¼¹ä¼»ä¼¾ä½€ä½‚ä½ˆä½‰ä½‹ä½Œä½’ä½”ä½–ä½˜ä½Ÿä½£ä½ªä½¬ä½®ä½±ä½·ä½¸ä½¹ä½ºä½½ä½¾ä¾ä¾‚侄\"],[\"8fb1a1\",\"侅侉侊侌侎ä¾ä¾’侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀ä¿ä¿…俆俈俉俋俌ä¿ä¿ä¿’ä¿œä¿ ä¿¢ä¿°ä¿²ä¿¼ä¿½ä¿¿å€€å€å€„倇倊倌倎å€å€“倗倘倛倜å€å€žå€¢å€§å€®å€°å€²å€³å€µå€åå‚å…å†åŠåŒåŽå‘å’å“å—å™åŸå å¢å£å¦å§åªåå°å±å€»å‚傃傄傆傊傎å‚å‚\"],[\"8fb2a1\",\"傒傓傔傖傛傜傞\",4,\"傪傯傰傹傺傽僀僃僄僇僌僎åƒåƒ“僔僘僜åƒåƒŸåƒ¢åƒ¤åƒ¦åƒ¨åƒ©åƒ¯åƒ±åƒ¶åƒºåƒ¾å„ƒå„†å„‡å„ˆå„‹å„Œå„儎僲å„儗儙儛儜å„儞儣儧儨儬å„儯儱儳儴儵儸儹兂兊å…兓兕兗兘兟兤兦兾冃冄冋冎冘å†å†¡å†£å†å†¸å†ºå†¼å†¾å†¿å‡‚\"],[\"8fb3a1\",\"凈å‡å‡‘凒凓凕凘凞凢凥凮凲凳凴凷åˆåˆ‚åˆ…åˆ’åˆ“åˆ•åˆ–åˆ˜åˆ¢åˆ¨åˆ±åˆ²åˆµåˆ¼å‰…å‰‰å‰•å‰—å‰˜å‰šå‰œå‰Ÿå‰ å‰¡å‰¦å‰®å‰·å‰¸å‰¹åŠ€åŠ‚åŠ…åŠŠåŠŒåŠ“åŠ•åŠ–åŠ—åŠ˜åŠšåŠœåŠ¤åŠ¥åŠ¦åŠ§åŠ¯åŠ°åŠ¶åŠ·åŠ¸åŠºåŠ»åŠ½å‹€å‹„å‹†å‹ˆå‹Œå‹å‹‘勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋\"],[\"8fb4a1\",\"匌匑匓匘匛匜匞匟匥匧匨匩匫匬åŒåŒ°åŒ²åŒµåŒ¼åŒ½åŒ¾å‚åŒå‹å™å›å¡å£å¥å¬åå²å¹å¾åŽƒåŽ‡åŽˆåŽŽåŽ“厔厙åŽåŽ¡åŽ¤åŽªåŽ«åŽ¯åŽ²åŽ´åŽµåŽ·åŽ¸åŽºåŽ½å€å…åå’å“å•åšååžå å¦å§åµå‚å“åšå¡å§å¨åªå¯å±å´åµå‘ƒå‘„呇å‘å‘呞呢呤呦呧呩呫å‘呮呴呿\"],[\"8fb5a1\",\"å’咃咅咈咉å’咑咕咖咜咟咡咦咧咩咪å’咮咱咷咹咺咻咿哆哊å“å“Žå“ å“ªå“¬å“¯å“¶å“¼å“¾å“¿å”€å”唅唈唉唌å”唎唕唪唫唲唵唶唻唼唽å•å•‡å•‰å•Šå•å•å•‘å•˜å•šå•›å•žå• å•¡å•¤å•¦å•¿å–喂喆喈喎å–喑喒喓喔喗喣喤å–喲喿å—嗃嗆嗉嗋嗌嗎嗑嗒\"],[\"8fb6a1\",\"嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊å˜\",5,\"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀å™å™ƒå™„噆噉噋å™å™å™”å™žå™ å™¡å™¢å™£å™¦å™©å™å™¯å™±å™²å™µåš„嚅嚈嚋嚌嚕嚙嚚åšåšžåšŸåš¦åš§åš¨åš©åš«åš¬åšåš±åš³åš·åš¾å›…囉囊囋å›å›å›Œå›å›™å›œå›å›Ÿå›¡å›¤\",4,\"囱囫å›\"],[\"8fb7a1\",\"囶囷åœåœ‚圇圊圌圑圕圚圛åœåœ 圢圣圤圥圩圪圬圮圯圳圴圽圾圿å…å†åŒåå’å¢å¥å§å¨å«å\",4,\"å³å´åµå·å¹åºå»å¼å¾åžåžƒåžŒåž”垗垙垚垜åžåžžåžŸåž¡åž•åž§åž¨åž©åž¬åž¸åž½åŸ‡åŸˆåŸŒåŸåŸ•åŸåŸžåŸ¤åŸ¦åŸ§åŸ©åŸåŸ°åŸµåŸ¶åŸ¸åŸ½åŸ¾åŸ¿å ƒå „å ˆå ‰åŸ¡\"],[\"8fb8a1\",\"å Œå å ›å žå Ÿå å ¦å §å å ²å ¹å ¿å¡‰å¡Œå¡å¡å¡å¡•å¡Ÿå¡¡å¡¤å¡§å¡¨å¡¸å¡¼å¡¿å¢€å¢å¢‡å¢ˆå¢‰å¢Šå¢Œå¢å¢å¢å¢”墖å¢å¢ 墡墢墦墩墱墲壄墼壂壈å£å£Žå£å£’壔壖壚å£å£¡å£¢å£©å£³å¤…夆夋夌夒夓夔è™å¤å¤¡å¤£å¤¤å¤¨å¤¯å¤°å¤³å¤µå¤¶å¤¿å¥ƒå¥†å¥’奓奙奛å¥å¥žå¥Ÿå¥¡å¥£å¥«å¥\"],[\"8fb9a1\",\"奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧å¦å¦®å¦¯å¦°å¦³å¦·å¦ºå¦¼å§å§ƒå§„姈姊å§å§’å§å§žå§Ÿå§£å§¤å§§å§®å§¯å§±å§²å§´å§·å¨€å¨„娌å¨å¨Žå¨’娓娞娣娤娧娨娪å¨å¨°å©„婅婇婈婌å©å©•å©žå©£å©¥å©§å©å©·å©ºå©»å©¾åª‹åªåª“åª–åª™åªœåªžåªŸåª åª¢åª§åª¬åª±åª²åª³åªµåª¸åªºåª»åª¿\"],[\"8fbaa1\",\"嫄嫆嫈å«å«šå«œå« 嫥嫪嫮嫵嫶嫽嬀å¬å¬ˆå¬—嬴嬙嬛å¬å¬¡å¬¥å¬å¬¸åå‹åŒå’å–åžå¨å®å¯å¼å½å¾å¿å®å®„宆宊宎å®å®‘宓宔宖宨宩宬å®å®¯å®±å®²å®·å®ºå®¼å¯€å¯å¯å¯å¯–\",4,\"å¯ å¯¯å¯±å¯´å¯½å°Œå°—å°žå°Ÿå°£å°¦å°©å°«å°¬å°®å°°å°²å°µå°¶å±™å±šå±œå±¢å±£å±§å±¨å±©\"],[\"8fbba1\",\"å±å±°å±´å±µå±ºå±»å±¼å±½å²‡å²ˆå²Šå²å²’å²å²Ÿå² 岢岣岦岪岲岴岵岺峉峋峒å³å³—峮峱峲峴å´å´†å´å´’å´«å´£å´¤å´¦å´§å´±å´´å´¹å´½å´¿åµ‚åµƒåµ†åµˆåµ•åµ‘åµ™åµŠåµŸåµ åµ¡åµ¢åµ¤åµªåµåµ°åµ¹åµºåµ¾åµ¿å¶å¶ƒå¶ˆå¶Šå¶’å¶“å¶”å¶•å¶™å¶›å¶Ÿå¶ å¶§å¶«å¶°å¶´å¶¸å¶¹å·ƒå·‡å·‹å·å·Žå·˜å·™å· å·¤\"],[\"8fbca1\",\"巩巸巹帀帇å¸å¸’å¸”å¸•å¸˜å¸Ÿå¸ å¸®å¸¨å¸²å¸µå¸¾å¹‹å¹å¹‰å¹‘幖幘幛幜幞幨幪\",4,\"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜å¼å¼¡å¼¢å¼£å¼¤å¼¨å¼«å¼¬å¼®å¼°å¼´å¼¶å¼»å¼½å¼¿å½€å½„彅彇å½å½å½”å½˜å½›å½ å½£å½¤å½§\"],[\"8fbda1\",\"彯彲彴彵彸彺彽彾徉å¾å¾å¾–徜å¾å¾¢å¾§å¾«å¾¤å¾¬å¾¯å¾°å¾±å¾¸å¿„忇忈忉忋å¿\",4,\"忞忡忢忨忩忪忬å¿å¿®å¿¯å¿²å¿³å¿¶å¿ºå¿¼æ€‡æ€Šæ€æ€“怔怗怘怚怟怤æ€æ€³æ€µæ€æ‡æˆæ‰æŒæ‘æ”æ–æ—ææ¡æ§æ±æ¾æ¿æ‚‚悆悈悊悎悑悓悕悘æ‚悞悢悤悥您悰悱悷\"],[\"8fbea1\",\"悻悾惂惄惈惉惊惋惎æƒæƒ”惕惙惛æƒæƒžæƒ¢æƒ¥æƒ²æƒµæƒ¸æƒ¼æƒ½æ„‚愇愊愌æ„\",4,\"愖愗愙愜愞愢愪愫愰愱愵愶愷愹æ…æ……æ…†æ…‰æ…žæ… æ…¬æ…²æ…¸æ…»æ…¼æ…¿æ†€æ†æ†ƒæ†„憋æ†æ†’憓憗憘憜æ†æ†Ÿæ† 憥憨憪æ†æ†¸æ†¹æ†¼æ‡€æ‡æ‡‚懎æ‡æ‡•æ‡œæ‡æ‡žæ‡Ÿæ‡¡æ‡¢æ‡§æ‡©æ‡¥\"],[\"8fbfa1\",\"懬æ‡æ‡¯æˆæˆƒæˆ„æˆ‡æˆ“æˆ•æˆœæˆ æˆ¢æˆ£æˆ§æˆ©æˆ«æˆ¹æˆ½æ‰‚æ‰ƒæ‰„æ‰†æ‰Œæ‰æ‰‘扒扔扖扚扜扤æ‰æ‰¯æ‰³æ‰ºæ‰½æŠæŠŽæŠæŠæŠ¦æŠ¨æŠ³æŠ¶æŠ·æŠºæŠ¾æŠ¿æ‹„拎拕拖拚拪拲拴拼拽挃挄挊挋æŒæŒæŒ“挖挘挩挪æŒæŒµæŒ¶æŒ¹æŒ¼ææ‚æƒæ„æ†æŠæ‹æŽæ’æ“æ”æ˜æ›æ¥æ¦æ¬ææ±æ´æµ\"],[\"8fc0a1\",\"æ¸æ¼æ½æ¿æŽ‚掄掇掊æŽæŽ”掕掙掚掞掤掦æŽæŽ®æŽ¯æŽ½ææ…æˆæŽæ‘æ“æ”æ•æœæ æ¥æªæ¬æ²æ³æµæ¸æ¹æ‰æŠææ’æ”æ˜æžæ æ¢æ¤æ¥æ©æªæ¯æ°æµæ½æ¿æ‘‹æ‘摑摒摓摔摚摛摜æ‘æ‘Ÿæ‘ æ‘¡æ‘£æ‘摳摴摻摽撅撇æ’æ’撑撘撙撛æ’撟撡撣撦撨撬撳撽撾撿\"],[\"8fc1a1\",\"擄擉擊擋擌擎æ“擑擕擗擤擥擩擪æ“擰擵擷擻擿æ”攄攈攉攊æ”攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉æ•æ•’æ•”æ•Ÿæ• æ•§æ•«æ•ºæ•½æ–æ–…æ–Šæ–’æ–•æ–˜æ–æ– æ–£æ–¦æ–®æ–²æ–³æ–´æ–¿æ—‚æ—ˆæ—‰æ—Žæ—旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉æ˜æ˜‘昒昕昖æ˜\"],[\"8fc2a1\",\"æ˜žæ˜¡æ˜¢æ˜£æ˜¤æ˜¦æ˜©æ˜ªæ˜«æ˜¬æ˜®æ˜°æ˜±æ˜³æ˜¹æ˜·æ™€æ™…æ™†æ™Šæ™Œæ™‘æ™Žæ™—æ™˜æ™™æ™›æ™œæ™ æ™¡æ›»æ™ªæ™«æ™¬æ™¾æ™³æ™µæ™¿æ™·æ™¸æ™¹æ™»æš€æ™¼æš‹æšŒæšæšæš’æš™æššæš›æšœæšŸæš æš¤æšæš±æš²æšµæš»æš¿æ›€æ›‚曃曈曌曎æ›æ›”æ››æ›Ÿæ›¨æ›«æ›¬æ›®æ›ºæœ…æœ‡æœŽæœ“æœ™æœœæœ æœ¢æœ³æœ¾æ…æ‡æˆæŒæ”æ•æ\"],[\"8fc3a1\",\"æ¦æ¬æ®æ´æ¶æ»æžæž„枎æžæž‘æž“æž–æž˜æž™æž›æž°æž±æž²æžµæž»æž¼æž½æŸ¹æŸ€æŸ‚æŸƒæŸ…æŸˆæŸ‰æŸ’æŸ—æŸ™æŸœæŸ¡æŸ¦æŸ°æŸ²æŸ¶æŸ·æ¡’æ ”æ ™æ æ Ÿæ ¨æ §æ ¬æ æ ¯æ °æ ±æ ³æ »æ ¿æ¡„æ¡…æ¡Šæ¡Œæ¡•æ¡—æ¡˜æ¡›æ¡«æ¡®\",4,\"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌æ£\"],[\"8fc4a1\",\"æ£æ£‘棓棖棙棜æ£æ£¥æ£¨æ£ªæ£«æ£¬æ£æ£°æ£±æ£µæ£¶æ£»æ£¼æ£½æ¤†æ¤‰æ¤Šæ¤æ¤‘椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀æ¦æ¦’榖榘榡榥榦榨榫æ¦æ¦¯æ¦·æ¦¸æ¦ºæ¦¼æ§…槈槑槖槗槢槥槮槯槱槳槵槾樀æ¨æ¨ƒæ¨æ¨‘樕樚æ¨æ¨ 樤樨樰樲\"],[\"8fc5a1\",\"樴樷樻樾樿橅橆橉橊橎æ©æ©‘橒橕橖橛橤橧橪橱橳橾æªæªƒæª†æª‡æª‰æª‹æª‘檛æªæªžæªŸæª¥æª«æª¯æª°æª±æª´æª½æª¾æª¿æ«†æ«‰æ«ˆæ«Œæ«æ«”æ«•æ«–æ«œæ«æ«¤æ«§æ«¬æ«°æ«±æ«²æ«¼æ«½æ¬‚欃欆欇欉æ¬æ¬æ¬‘欗欛欞欤欨欫欬欯欵欶欻欿æ†æŠææ’æ–æ˜ææ æ§æ«æ®æ°æµæ½\"],[\"8fc6a1\",\"æ¾æ®‚æ®…æ®—æ®›æ®Ÿæ® æ®¢æ®£æ®¨æ®©æ®¬æ®æ®®æ®°æ®¸æ®¹æ®½æ®¾æ¯ƒæ¯„毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉æ°æ°Žæ°æ°’氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋æ±æ±æ±’汔汙汛汜汫æ±æ±¯æ±´æ±¶æ±¸æ±¹æ±»æ²…沆沇沉沔沕沗沘沜沟沰沲沴泂泆æ³æ³æ³æ³‘泒泔泖\"],[\"8fc7a1\",\"æ³šæ³œæ³ æ³§æ³©æ³«æ³¬æ³®æ³²æ³´æ´„æ´‡æ´Šæ´Žæ´æ´‘洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎æ·æ·–æ·›æ·æ·Ÿæ· 淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋æ¹æ¹‘湒湓湔湗湜æ¹æ¹ž\"],[\"8fc8a1\",\"湢湣湨湳湻湽æºæº“æº™æº æº§æºæº®æº±æº³æº»æº¿æ»€æ»æ»ƒæ»‡æ»ˆæ»Šæ»æ»Žæ»æ»«æ»æ»®æ»¹æ»»æ»½æ¼„漈漊漌æ¼æ¼–漘漚漛漦漩漪漯漰漳漶漻漼æ¼æ½æ½‘潒潓潗潙潚æ½æ½žæ½¡æ½¢æ½¨æ½¬æ½½æ½¾æ¾ƒæ¾‡æ¾ˆæ¾‹æ¾Œæ¾æ¾æ¾’æ¾“æ¾”æ¾–æ¾šæ¾Ÿæ¾ æ¾¥æ¾¦æ¾§æ¾¨æ¾®æ¾¯æ¾°æ¾µæ¾¶æ¾¼æ¿…æ¿‡æ¿ˆæ¿Š\"],[\"8fc9a1\",\"濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇ç€ç€—ç€ ç€£ç€¯ç€´ç€·ç€¹ç€¼çƒç„çˆç‰çŠç‹ç”ç•ççžçŽç¤ç¥ç¬ç®çµç¶ç¾ç‚炅炆炔\",4,\"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃\",4,\"ç„‹ç„Œç„ç„žç„ ç„«ç„焯焰焱焸ç…煅煆煇煊煋ç…ç…’ç…—ç…šç…œç…žç… \"],[\"8fcaa1\",\"ç…¨ç…¹ç†€ç†…ç†‡ç†Œç†’ç†šç†›ç† ç†¢ç†¯ç†°ç†²ç†³ç†ºç†¿ç‡€ç‡ç‡„燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚çˆçˆŸçˆ¤çˆ«çˆ¯çˆ´çˆ¸çˆ¹ç‰ç‰‚牃牅牎ç‰ç‰ç‰“ç‰•ç‰–ç‰šç‰œç‰žç‰ ç‰£ç‰¨ç‰«ç‰®ç‰¯ç‰±ç‰·ç‰¸ç‰»ç‰¼ç‰¿çŠ„çŠ‰çŠçŠŽçŠ“犛犨çŠçŠ®çŠ±çŠ´çŠ¾ç‹ç‹‡ç‹‰ç‹Œç‹•ç‹–狘狟狥狳狴狺狻\"],[\"8fcba1\",\"狾猂猄猅猇猋çŒçŒ’猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽çƒççç’ç–ç˜ççžçŸç ç¦ç§ç©ç«ç¬ç®ç¯ç±ç·ç¹ç¼çŽ€çŽçŽƒçŽ…玆玎çŽçŽ“çŽ•çŽ—çŽ˜çŽœçŽžçŽŸçŽ çŽ¢çŽ¥çŽ¦çŽªçŽ«çŽçŽµçŽ·çŽ¹çŽ¼çŽ½çŽ¿ç…ç†ç‰ç‹çŒçç’ç“ç–ç™çç¡ç£ç¦ç§ç©ç´çµç·ç¹çºç»ç½\"],[\"8fcca1\",\"ç¿ç€çç„ç‡çŠç‘çšç›ç¤ç¦ç¨\",9,\"ç¹ç‘€ç‘ƒç‘„瑆瑇瑋ç‘ç‘‘ç‘’ç‘—ç‘瑢瑦瑧瑨瑫ç‘瑮瑱瑲璀ç’璅璆璇璉ç’ç’ç’‘ç’’ç’˜ç’™ç’šç’œç’Ÿç’ ç’¡ç’£ç’¦ç’¨ç’©ç’ªç’«ç’®ç’¯ç’±ç’²ç’µç’¹ç’»ç’¿ç“ˆç“‰ç“Œç“瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆\"],[\"8fcda1\",\"ç”’ç”–ç”—ç” ç”¡ç”¤ç”§ç”©ç”ªç”¯ç”¶ç”¹ç”½ç”¾ç”¿ç•€ç•ƒç•‡ç•ˆç•Žç•ç•’畗畞畟畡畯畱畹\",5,\"ç–ç–…ç–疒疓疕疙疜疢疤疴疺疿痀ç—痄痆痌痎ç—ç——ç—œç—Ÿç— ç—¡ç—¤ç—§ç—¬ç—®ç—¯ç—±ç—¹ç˜€ç˜‚ç˜ƒç˜„ç˜‡ç˜ˆç˜Šç˜Œç˜ç˜’瘓瘕瘖瘙瘛瘜ç˜ç˜žç˜£ç˜¥ç˜¦ç˜©ç˜ç˜²ç˜³ç˜µç˜¸ç˜¹\"],[\"8fcea1\",\"瘺瘼癊癀ç™ç™ƒç™„癅癉癋癕癙癟癤癥ç™ç™®ç™¯ç™±ç™´çšçš…皌çšçš•çš›çšœçšçšŸçš 皢\",6,\"皪çšçš½ç›ç›…ç›‰ç›‹ç›Œç›Žç›”ç›™ç› ç›¦ç›¨ç›¬ç›°ç›±ç›¶ç›¹ç›¼çœ€çœ†çœŠçœŽçœ’çœ”çœ•çœ—çœ™çœšçœœçœ¢çœ¨çœçœ®çœ¯çœ´çœµçœ¶çœ¹çœ½çœ¾ç‚ç…ç†çŠççŽçç’ç–ç—çœçžçŸç ç¢\"],[\"8fcfa1\",\"ç¤ç§çªç¬ç°ç²ç³ç´çºç½çž€çž„瞌çžçž”çž•çž–çžšçžŸçž¢çž§çžªçž®çž¯çž±çžµçž¾çŸƒçŸ‰çŸ‘çŸ’çŸ•çŸ™çŸžçŸŸçŸ çŸ¤çŸ¦çŸªçŸ¬çŸ°çŸ±çŸ´çŸ¸çŸ»ç …ç †ç ‰ç ç Žç ‘ç ç ¡ç ¢ç £ç ç ®ç °ç µç ·ç¡ƒç¡„ç¡‡ç¡ˆç¡Œç¡Žç¡’ç¡œç¡žç¡ ç¡¡ç¡£ç¡¤ç¡¨ç¡ªç¡®ç¡ºç¡¾ç¢Šç¢ç¢”碘碡ç¢ç¢žç¢Ÿç¢¤ç¢¨ç¢¬ç¢ç¢°ç¢±ç¢²ç¢³\"],[\"8fd0a1\",\"ç¢»ç¢½ç¢¿ç£‡ç£ˆç£‰ç£Œç£Žç£’ç£“ç£•ç£–ç£¤ç£›ç£Ÿç£ ç£¡ç£¦ç£ªç£²ç£³ç¤€ç£¶ç£·ç£ºç£»ç£¿ç¤†ç¤Œç¤ç¤šç¤œç¤žç¤Ÿç¤ 礥礧礩ç¤ç¤±ç¤´ç¤µç¤»ç¤½ç¤¿ç¥„祅祆祊祋ç¥ç¥‘祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊ç§ç§”秖秚ç§ç§ž\"],[\"8fd1a1\",\"ç§ ç§¢ç§¥ç§ªç§«ç§ç§±ç§¸ç§¼ç¨‚稃稇稉稊稌稑稕稛稞稡稧稫ç¨ç¨¯ç¨°ç¨´ç¨µç¨¸ç¨¹ç¨ºç©„穅穇穈穌穕穖穙穜ç©ç©Ÿç© 穥穧穪ç©ç©µç©¸ç©¾çª€çª‚窅窆窊窋çªçª‘çª”çªžçª çª£çª¬çª³çªµçª¹çª»çª¼ç«†ç«‰ç«Œç«Žç«‘ç«›ç«¨ç«©ç««ç«¬ç«±ç«´ç«»ç«½ç«¾ç¬‡ç¬”ç¬Ÿç¬£ç¬§ç¬©ç¬ªç¬«ç¬ç¬®ç¬¯ç¬°\"],[\"8fd2a1\",\"笱笴笽笿ç€çç‡çŽç•ç ç¤ç¦ç©çªçç¯ç²ç³ç·ç®„箉箎ç®ç®‘ç®–ç®›ç®žç® ç®¥ç®¬ç®¯ç®°ç®²ç®µç®¶ç®ºç®»ç®¼ç®½ç¯‚ç¯…ç¯ˆç¯Šç¯”ç¯–ç¯—ç¯™ç¯šç¯›ç¯¨ç¯ªç¯²ç¯´ç¯µç¯¸ç¯¹ç¯ºç¯¼ç¯¾ç°ç°‚簃簄簆簉簋簌簎ç°ç°™ç°›ç° 簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙\",5],[\"8fd3a1\",\"籡籣籧籩ç±ç±®ç±°ç±²ç±¹ç±¼ç±½ç²†ç²‡ç²ç²”ç²žç² ç²¦ç²°ç²¶ç²·ç²ºç²»ç²¼ç²¿ç³„ç³‡ç³ˆç³‰ç³ç³ç³“糔糕糗糙糚ç³ç³¦ç³©ç³«ç³µç´ƒç´‡ç´ˆç´‰ç´ç´‘ç´’ç´“ç´–ç´ç´žç´£ç´¦ç´ªç´ç´±ç´¼ç´½ç´¾çµ€çµçµ‡çµˆçµçµ‘絓絗絙絚絜çµçµ¥çµ§çµªçµ°çµ¸çµºçµ»çµ¿ç¶ç¶‚綃綅綆綈綋綌ç¶ç¶‘綖綗ç¶\"],[\"8fd4a1\",\"綞綦綧綪綳綶綷綹緂\",4,\"ç·Œç·ç·Žç·—緙縀緢緥緦緪緫ç·ç·±ç·µç·¶ç·¹ç·ºç¸ˆç¸ç¸‘縕縗縜ç¸ç¸ 縧縨縬ç¸ç¸¯ç¸³ç¸¶ç¸¿ç¹„繅繇繎ç¹ç¹’繘繟繡繢繥繫繮繯繳繸繾çºçº†çº‡çºŠçºçº‘纕纘纚çºçºžç¼¼ç¼»ç¼½ç¼¾ç¼¿ç½ƒç½„罇ç½ç½’罓罛罜ç½ç½¡ç½£ç½¤ç½¥ç½¦ç½\"],[\"8fd5a1\",\"罱罽罾罿羀羋ç¾ç¾ç¾ç¾‘羖羗羜羡羢羦羪ç¾ç¾´ç¾¼ç¾¿ç¿€ç¿ƒç¿ˆç¿Žç¿ç¿›ç¿Ÿç¿£ç¿¥ç¿¨ç¿¬ç¿®ç¿¯ç¿²ç¿ºç¿½ç¿¾ç¿¿è€‡è€ˆè€Šè€è€Žè€è€‘耓耔耖è€è€žè€Ÿè€ 耤耦耬耮耰耴耵耷耹耺耼耾è€è„è è¤è¦èè±èµè‚肈肎肜肞肦肧肫肸肹胈èƒèƒèƒ’èƒ”èƒ•èƒ—èƒ˜èƒ èƒèƒ®\"],[\"8fd6a1\",\"èƒ°èƒ²èƒ³èƒ¶èƒ¹èƒºèƒ¾è„ƒè„‹è„–è„—è„˜è„œè„žè„ è„¤è„§è„¬è„°è„µè„ºè„¼è……è…‡è…Šè…Œè…’è…—è… è…¡è…§è…¨è…©è…腯腷è†è†è†„膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎è‡è‡•è‡—臛è‡è‡žè‡¡è‡¤è‡«è‡¬è‡°è‡±è‡²è‡µè‡¶è‡¸è‡¹è‡½è‡¿èˆ€èˆƒèˆèˆ“舔舙舚èˆèˆ¡èˆ¢èˆ¨èˆ²èˆ´èˆºè‰ƒè‰„艅艆\"],[\"8fd7a1\",\"艋艎è‰è‰‘è‰–è‰œè‰ è‰£è‰§è‰è‰´è‰»è‰½è‰¿èŠ€èŠèŠƒèŠ„èŠ‡èŠ‰èŠŠèŠŽèŠ‘èŠ”èŠ–èŠ˜èŠšèŠ›èŠ èŠ¡èŠ£èŠ¤èŠ§èŠ¨èŠ©èŠªèŠ®èŠ°èŠ²èŠ´èŠ·èŠºèŠ¼èŠ¾èŠ¿è‹†è‹è‹•è‹šè‹ 苢苤苨苪è‹è‹¯è‹¶è‹·è‹½è‹¾èŒ€èŒèŒ‡èŒˆèŒŠèŒ‹è”茛èŒèŒžèŒŸèŒ¡èŒ¢èŒ¬èŒèŒ®èŒ°èŒ³èŒ·èŒºèŒ¼èŒ½è‚èƒè„è‡èèŽè‘è•è–è—è°è¸\"],[\"8fd8a1\",\"è½è¿èŽ€èŽ‚莄莆èŽèŽ’莔莕莘莙莛莜èŽèŽ¦èŽ§èŽ©èŽ¬èŽ¾èŽ¿è€è‡è‰èèè‘è”èè“è¨èªè¶è¸è¹è¼èè†èŠèè‘è•è™èŽè¯è¹è‘…葇葈葊è‘è‘è‘‘è‘’è‘–è‘˜è‘™è‘šè‘œè‘ è‘¤è‘¥è‘§è‘ªè‘°è‘³è‘´è‘¶è‘¸è‘¼è‘½è’蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌è“è““\"],[\"8fd9a1\",\"蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎è”蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆è•\",4,\"蕖蕙蕜\",6,\"蕤蕫蕯蕹蕺蕻蕽蕿è–薅薆薉薋薌è–è–“è–˜è–è–Ÿè– è–¢è–¥è–§è–´è–¶è–·è–¸è–¼è–½è–¾è–¿è—‚è—‡è—Šè—‹è—Žè–è—˜è—šè—Ÿè— è—¦è—¨è—藳藶藼\"],[\"8fdaa1\",\"藿蘀蘄蘅è˜è˜Žè˜è˜‘蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙è™è™ \",4,\"虩虬虯虵虶虷虺èšèš‘蚖蚘蚚蚜蚡蚦蚧蚨èšèš±èš³èš´èšµèš·èš¸èš¹èš¿è›€è›è›ƒè›…è›‘è›’è›•è›—è›šè›œè› è›£è›¥è›§èšˆè›ºè›¼è›½èœ„èœ…èœ‡èœ‹èœŽèœèœèœ“蜔蜙蜞蜟蜡蜣\"],[\"8fdba1\",\"蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾è€èƒè…èè˜èè¡è¤è¥è¯è±è²è»èžƒ\",6,\"螋螌èžèž“èž•èž—èž˜èž™èžžèž èž£èž§èž¬èžèž®èž±èžµèž¾èž¿èŸèŸˆèŸ‰èŸŠèŸŽèŸ•èŸ–蟙蟚蟜蟟蟢蟣蟤蟪蟫èŸèŸ±èŸ³èŸ¸èŸºèŸ¿è è ƒè †è ‰è Šè ‹è è ™è ’è “è ”è ˜è šè ›è œè žè Ÿè ¨è è ®è °è ²è µ\"],[\"8fdca1\",\"è ºè ¼è¡è¡ƒè¡…è¡ˆè¡‰è¡Šè¡‹è¡Žè¡‘è¡•è¡–è¡˜è¡šè¡œè¡Ÿè¡ è¡¤è¡©è¡±è¡¹è¡»è¢€è¢˜è¢šè¢›è¢œè¢Ÿè¢ è¢¨è¢ªè¢ºè¢½è¢¾è£€è£Š\",4,\"裑裒裓裛裞裧裯裰裱裵裷è¤è¤†è¤è¤Žè¤è¤•è¤–è¤˜è¤™è¤šè¤œè¤ è¤¦è¤§è¤¨è¤°è¤±è¤²è¤µè¤¹è¤ºè¤¾è¥€è¥‚è¥…è¥†è¥‰è¥è¥’襗襚襛襜襡襢襣襫襮襰襳襵襺\"],[\"8fdda1\",\"襻襼襽覉è¦è¦è¦”è¦•è¦›è¦œè¦Ÿè¦ è¦¥è¦°è¦´è¦µè¦¶è¦·è¦¼è§”\",4,\"觥觩觫è§è§±è§³è§¶è§¹è§½è§¿è¨„訅訇è¨è¨‘è¨’è¨”è¨•è¨žè¨ è¨¢è¨¤è¨¦è¨«è¨¬è¨¯è¨µè¨·è¨½è¨¾è©€è©ƒè©…è©‡è©‰è©è©Žè©“詖詗詘詜è©è©¡è©¥è©§è©µè©¶è©·è©¹è©ºè©»è©¾è©¿èª€èªƒèª†èª‹èªèªèª’誖誗誙誟誧誩誮誯誳\"],[\"8fdea1\",\"誶誷誻誾諃諆諈諉諊諑諓諔諕諗è«è«Ÿè«¬è«°è«´è«µè«¶è«¼è«¿è¬…謆謋謑謜謞謟謊è¬è¬°è¬·è¬¼è‚\",4,\"èˆè’è“è”è™èèžè£èè¶è¸è¹è¼è¾è®è®„讅讋è®è®è®”讕讜讞讟谸谹谽谾豅豇豉豋è±è±‘豓豔豗豘豛è±è±™è±£è±¤è±¦è±¨è±©è±è±³è±µè±¶è±»è±¾è²†\"],[\"8fdfa1\",\"貇貋è²è²’貓貙貛貜貤貹貺賅賆賉賋è³è³–賕賙è³è³¡è³¨è³¬è³¯è³°è³²è³µè³·è³¸è³¾è³¿è´è´ƒè´‰è´’贗贛赥赩赬赮赿趂趄趈è¶è¶è¶‘è¶•è¶žè¶Ÿè¶ è¶¦è¶«è¶¬è¶¯è¶²è¶µè¶·è¶¹è¶»è·€è·…è·†è·‡è·ˆè·Šè·Žè·‘è·”è·•è·—è·™è·¤è·¥è·§è·¬è·°è¶¼è·±è·²è·´è·½è¸è¸„è¸…è¸†è¸‹è¸‘è¸”è¸–è¸ è¸¡è¸¢\"],[\"8fe0a1\",\"踣踦踧踱踳踶踷踸踹踽蹀è¹è¹‹è¹è¹Žè¹è¹”蹛蹜è¹è¹žè¹¡è¹¢è¹©è¹¬è¹è¹¯è¹°è¹±è¹¹è¹ºè¹»èº‚躃躉èºèº’躕躚躛èºèºžèº¢èº§èº©èºèº®èº³èºµèººèº»è»€è»è»ƒè»„軇è»è»‘軔軜軨軮軰軱軷軹軺è»è¼€è¼‚輇輈è¼è¼è¼–è¼—è¼˜è¼žè¼ è¼¡è¼£è¼¥è¼§è¼¨è¼¬è¼è¼®è¼´è¼µè¼¶è¼·è¼ºè½€è½\"],[\"8fe1a1\",\"轃轇è½è½‘\",4,\"轘è½è½žè½¥è¾è¾ 辡辤辥辦辵辶辸达迀è¿è¿†è¿Šè¿‹è¿è¿è¿’è¿“è¿•è¿ è¿£è¿¤è¿¨è¿®è¿±è¿µè¿¶è¿»è¿¾é€‚é€„é€ˆé€Œé€˜é€›é€¨é€©é€¯é€ªé€¬é€é€³é€´é€·é€¿éƒé„éŒé›éé¢é¦é§é¬é°é´é¹é‚…邈邋邌邎é‚é‚•é‚—é‚˜é‚™é‚›é‚ é‚¡é‚¢é‚¥é‚°é‚²é‚³é‚´é‚¶é‚½éƒŒé‚¾éƒƒ\"],[\"8fe2a1\",\"郄郅郇郈郕郗郘郙郜éƒéƒŸéƒ¥éƒ’郶郫郯郰郴郾郿鄀鄄鄅鄆鄈é„é„é„”é„–é„—é„˜é„šé„œé„žé„ é„¥é„¢é„£é„§é„©é„®é„¯é„±é„´é„¶é„·é„¹é„ºé„¼é„½é…ƒé…‡é…ˆé…酓酗酙酚酛酡酤酧é…酴酹酺酻é†é†ƒé†…醆醊醎醑醓醔醕醘醞醡醦醨醬é†é†®é†°é†±é†²é†³é†¶é†»é†¼é†½é†¿\"],[\"8fe3a1\",\"釂釃釅釓釔釗釙釚釞釤釥釩釪釬\",5,\"釷釹釻釽鈀éˆéˆ„鈅鈆鈇鈉鈊鈌éˆéˆ’鈓鈖鈘鈜éˆéˆ£éˆ¤éˆ¥éˆ¦éˆ¨éˆ®éˆ¯éˆ°éˆ³éˆµéˆ¶éˆ¸éˆ¹éˆºéˆ¼éˆ¾é‰€é‰‚鉃鉆鉇鉊é‰é‰Žé‰é‰‘鉘鉙鉜é‰é‰ 鉡鉥鉧鉨鉩鉮鉯鉰鉵\",4,\"鉻鉼鉽鉿銈銉銊éŠéŠŽéŠ’銗\"],[\"8fe4a1\",\"éŠ™éŠŸéŠ éŠ¤éŠ¥éŠ§éŠ¨éŠ«éŠ¯éŠ²éŠ¶éŠ¸éŠºéŠ»éŠ¼éŠ½éŠ¿\",4,\"鋅鋆鋇鋈鋋鋌é‹é‹Žé‹é‹“鋕鋗鋘鋙鋜é‹é‹Ÿé‹ 鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈éŒéŒ‘錔錕錜éŒéŒžéŒŸéŒ¡éŒ¤éŒ¥éŒ§éŒ©éŒªéŒ³éŒ´éŒ¶éŒ·é‡éˆé‰éé‘é’é•é—é˜éšéžé¤é¥é§é©éªéé¯é°é±é³é´é¶\"],[\"8fe5a1\",\"éºé½é¿éŽ€éŽéŽ‚鎈鎊鎋éŽéŽéŽ’鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩éé„é…é†é‡é‰\",4,\"é“é™éœéžéŸé¢é¦é§é¹é·é¸éºé»é½éé‚é„éˆé‰ééŽéé•é–é—éŸé®é¯é±é²é³é´é»é¿é½é‘ƒé‘…鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫é‘鑮鑯鑱鑲钄钃镸镹\"],[\"8fe6a1\",\"镾閄閈閌é–é–Žé–閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋é—闑闒闓闙闚é—é—žé—Ÿé— é—¤é—¦é˜é˜žé˜¢é˜¤é˜¥é˜¦é˜¬é˜±é˜³é˜·é˜¸é˜¹é˜ºé˜¼é˜½é™é™’陔陖陗陘陡陮陴陻陼陾陿éšéš‚隃隄隉隑隖隚éšéšŸéš¤éš¥éš¦éš©éš®éš¯éš³éšºé›Šé›’嶲雘雚é›é›žé›Ÿé›©é›¯é›±é›ºéœ‚\"],[\"8fe7a1\",\"霃霅霉霚霛éœéœ¡éœ¢éœ£éœ¨éœ±éœ³ééƒéŠéŽéé•é—é˜éšé›é£é§éªé®é³é¶é·é¸é»é½é¿éž€éž‰éž•éž–鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿éŸéŸ„韅韇韉韊韌éŸéŸŽéŸéŸ‘韔韗韘韙éŸéŸžéŸ éŸ›éŸ¡éŸ¤éŸ¯éŸ±éŸ´éŸ·éŸ¸éŸºé ‡é Šé ™é é Žé ”é –é œé žé é £é ¦\"],[\"8fe8a1\",\"é «é ®é ¯é °é ²é ³é µé ¥é ¾é¡„é¡‡é¡Šé¡‘é¡’é¡“é¡–é¡—é¡™é¡šé¡¢é¡£é¡¥é¡¦é¡ªé¡¬é¢«é¢é¢®é¢°é¢´é¢·é¢¸é¢ºé¢»é¢¿é£‚飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱\",4,\"餹餺餻餼饀é¥é¥†é¥‡é¥ˆé¥é¥Žé¥”é¥˜é¥™é¥›é¥œé¥žé¥Ÿé¥ é¦›é¦é¦Ÿé¦¦é¦°é¦±é¦²é¦µ\"],[\"8fe9a1\",\"馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌é¨é¨‘é¨–é¨žé¨ é¨¢é¨£é¨¤é¨§é¨é¨®é¨³é¨µé¨¶é¨¸é©‡é©é©„驊驋驌驎驑驔驖é©éªªéª¬éª®éª¯éª²éª´éªµéª¶éª¹éª»éª¾éª¿é«é«ƒé«†é«ˆé«Žé«é«’é«•é«–é«—é«›é«œé« é«¤é«¥é«§é«©é«¬é«²é«³é«µé«¹é«ºé«½é«¿\",4],[\"8feaa1\",\"鬄鬅鬈鬉鬋鬌é¬é¬Žé¬é¬’é¬–é¬™é¬›é¬œé¬ é¬¦é¬«é¬é¬³é¬´é¬µé¬·é¬¹é¬ºé¬½éˆé‹éŒé•é–é—é›éžé¡é£é¥é¦é¨éª\",4,\"é³éµé·é¸é¹é¿é®€é®„鮅鮆鮇鮉鮊鮋é®é®é®é®”鮚é®é®žé®¦é®§é®©é®¬é®°é®±é®²é®·é®¸é®»é®¼é®¾é®¿é¯é¯‡é¯ˆé¯Žé¯é¯—鯘é¯é¯Ÿé¯¥é¯§é¯ªé¯«é¯¯é¯³é¯·é¯¸\"],[\"8feba1\",\"鯹鯺鯽鯿鰀鰂鰋é°é°‘鰖鰘鰙鰚鰜鰞鰢鰣鰦\",4,\"鰱鰵鰶鰷鰽é±é±ƒé±„鱅鱉鱊鱎é±é±é±“鱔鱖鱘鱛é±é±žé±Ÿé±£é±©é±ªé±œé±«é±¨é±®é±°é±²é±µé±·é±»é³¦é³²é³·é³¹é´‹é´‚鴑鴗鴘鴜é´é´žé´¯é´°é´²é´³é´´é´ºé´¼éµ…鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻\"],[\"8feca1\",\"鵼鵾鶃鶄鶆鶊é¶é¶Žé¶’é¶“é¶•é¶–é¶—é¶˜é¶¡é¶ªé¶¬é¶®é¶±é¶µé¶¹é¶¼é¶¿é·ƒé·‡é·‰é·Šé·”é·•é·–é·—é·šé·žé·Ÿé· é·¥é·§é·©é·«é·®é·°é·³é·´é·¾é¸Šé¸‚é¸‡é¸Žé¸é¸‘鸒鸕鸖鸙鸜é¸é¹ºé¹»é¹¼éº€éº‚麃麄麅麇麎éºéº–麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬é»é»®é»°é»±é»²é»µ\"],[\"8feda1\",\"黸黿鼂鼃鼉é¼é¼é¼‘鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿é½é½ƒ\",4,\"齓齕齖齗齘齚é½é½žé½¨é½©é½\",4,\"齳齵齺齽é¾é¾é¾‘龒龔龖龗龞龡龢龣龥\"]]"); /***/ }), -/* 879 */ +/* 876 */ /***/ (function(module) { module.exports = JSON.parse("[[\"0\",\"\\u0000\",127,\"€\"],[\"8140\",\"丂丄丅丆ä¸ä¸’ä¸—ä¸Ÿä¸ ä¸¡ä¸£ä¸¦ä¸©ä¸®ä¸¯ä¸±ä¸³ä¸µä¸·ä¸¼ä¹€ä¹ä¹‚乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪\",5,\"乲乴\",9,\"乿\",6,\"亇亊\"],[\"8180\",\"äºäº–亗亙亜äºäºžäº£äºªäº¯äº°äº±äº´äº¶äº·äº¸äº¹äº¼äº½äº¾ä»ˆä»Œä»ä»ä»’ä»šä»›ä»œä» ä»¢ä»¦ä»§ä»©ä»ä»®ä»¯ä»±ä»´ä»¸ä»¹ä»ºä»¼ä»¾ä¼€ä¼‚\",6,\"伋伌伒\",4,\"伜ä¼ä¼¡ä¼£ä¼¨ä¼©ä¼¬ä¼ä¼®ä¼±ä¼³ä¼µä¼·ä¼¹ä¼»ä¼¾\",4,\"佄佅佇\",5,\"佒佔佖佡佢佦佨佪佫ä½ä½®ä½±ä½²ä½µä½·ä½¸ä½¹ä½ºä½½ä¾€ä¾ä¾‚侅來侇侊侌侎ä¾ä¾’侓侕侖侘侙侚侜侞侟価侢\"],[\"8240\",\"侤侫ä¾ä¾°\",4,\"侶\",8,\"ä¿€ä¿ä¿‚俆俇俈俉俋俌ä¿ä¿’\",4,\"ä¿™ä¿›ä¿ ä¿¢ä¿¤ä¿¥ä¿§ä¿«ä¿¬ä¿°ä¿²ä¿´ä¿µä¿¶ä¿·ä¿¹ä¿»ä¿¼ä¿½ä¿¿\",11],[\"8280\",\"個倎å€å€‘倓倕倖倗倛å€å€žå€ 倢倣値倧倫倯\",10,\"倻倽倿å€åå‚å„å…å†å‰åŠå‹åå\",4,\"å–å—å˜å™å›å\",7,\"å¦\",5,\"å\",8,\"å¸å¹åºå¼å½å‚傂傃傄傆傇傉傊傋傌傎\",20,\"傤傦傪傫å‚\",4,\"傳\",6,\"傼\"],[\"8340\",\"傽\",17,\"åƒ\",5,\"僗僘僙僛\",10,\"僨僩僪僫僯僰僱僲僴僶\",4,\"僼\",9,\"儈\"],[\"8380\",\"儉儊儌\",5,\"å„“\",13,\"å„¢\",28,\"兂兇兊兌兎å…å…兒兓兗兘兙兛å…\",4,\"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎å†å†å†‘冓冔冘冚å†å†žå†Ÿå†¡å†£å†¦\",4,\"å†å†®å†´å†¸å†¹å†ºå†¾å†¿å‡å‡‚凃凅凈凊å‡å‡Žå‡å‡’\",5],[\"8440\",\"凘凙凚凜凞凟凢凣凥\",5,\"凬凮凱凲凴凷凾刄刅刉刋刌åˆåˆåˆ“刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄\",5,\"剋剎å‰å‰’剓剕剗剘\"],[\"8480\",\"剙剚剛å‰å‰Ÿå‰ 剢剣剤剦剨剫剬å‰å‰®å‰°å‰±å‰³\",9,\"剾劀劃\",4,\"劉\",6,\"劑劒劔\",6,\"劜劤劥劦劧劮劯劰労\",9,\"å‹€å‹å‹‚勄勅勆勈勊勌å‹å‹Žå‹å‹‘勓勔動勗務\",5,\"å‹ å‹¡å‹¢å‹£å‹¥\",10,\"勱\",7,\"勻勼勽åŒåŒ‚匃匄匇匉匊匋匌匎\"],[\"8540\",\"匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬åŒåŒ¯\",9,\"匼匽å€å‚å„å†å‹åŒååå”å˜å™å›åå¥å¨åªå¬åå²å¶å¹å»å¼å½å¾åŽ€åŽåŽƒåŽ‡åŽˆåŽŠåŽŽåŽ\"],[\"8580\",\"åŽ\",4,\"åŽ–åŽ—åŽ™åŽ›åŽœåŽžåŽ åŽ¡åŽ¤åŽ§åŽªåŽ«åŽ¬åŽåŽ¯\",6,\"厷厸厹厺厼厽厾å€åƒ\",4,\"åŽååå’å“å•åšåœååžå¡å¢å§å´åºå¾å¿å€å‚å…å‡å‹å”å˜å™åšåœå¢å¤å¥åªå°å³å¶å·åºå½å¿å‘呂呄呅呇呉呌å‘å‘Žå‘å‘‘å‘šå‘\",4,\"呣呥呧呩\",7,\"呴呹呺呾呿å’咃咅咇咈咉咊å’å’‘å’“å’—å’˜å’œå’žå’Ÿå’ å’¡\"],[\"8640\",\"å’¢å’¥å’®å’°å’²å’µå’¶å’·å’¹å’ºå’¼å’¾å“ƒå“…å“Šå“‹å“–å“˜å“›å“ \",4,\"哫哬哯哰哱哴\",5,\"哻哾唀唂唃唄唅唈唊\",4,\"唒唓唕\",5,\"唜å”唞唟唡唥唦\"],[\"8680\",\"唨唩唫å”唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋\",4,\"啑啒啓啔啗\",4,\"å•å•žå•Ÿå• 啢啣啨啩啫啯\",5,\"啹啺啽啿喅喆喌å–å–Žå–å–’å–“å–•å––å–—å–šå–›å–žå– \",6,\"å–¨\",8,\"喲喴営喸喺喼喿\",4,\"嗆嗇嗈嗊嗋嗎å—å—å—•å——\",4,\"å—žå— å—¢å—§å—©å—嗮嗰嗱嗴嗶嗸\",4,\"嗿嘂嘃嘄嘅\"],[\"8740\",\"嘆嘇嘊嘋å˜å˜\",7,\"嘙嘚嘜å˜å˜ 嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀\",11,\"å™\",4,\"噕噖噚噛å™\",4],[\"8780\",\"噣噥噦噧å™å™®å™¯å™°å™²å™³å™´å™µå™·å™¸å™¹å™ºå™½\",7,\"嚇\",6,\"åšåš‘åš’åš”\",14,\"嚤\",10,\"åš°\",6,\"嚸嚹嚺嚻嚽\",12,\"囋\",8,\"囕囖囘囙囜団囥\",5,\"囬囮囯囲図囶囷囸囻囼圀åœåœ‚圅圇國\",6],[\"8840\",\"園\",9,\"åœåœžåœ 圡圢圤圥圦圧圫圱圲圴\",4,\"圼圽圿ååƒå„å…å†åˆå‰å‹å’\",4,\"å˜å™å¢å£å¥å§å¬å®å°å±å²å´åµå¸å¹åºå½å¾å¿åž€\"],[\"8880\",\"åžåž‡åžˆåž‰åžŠåž\",4,\"åž”\",6,\"åžœåžåžžåžŸåž¥åž¨åžªåž¬åž¯åž°åž±åž³åžµåž¶åž·åž¹\",8,\"埄\",6,\"埌åŸåŸåŸ‘埓埖埗埛埜埞埡埢埣埥\",7,\"埮埰埱埲埳埵埶執埻埼埾埿å å ƒå „å …å ˆå ‰å Šå Œå Žå å å ’å “å ”å –å —å ˜å šå ›å œå å Ÿå ¢å £å ¥\",4,\"å «\",4,\"å ±å ²å ³å ´å ¶\",7],[\"8940\",\"å ¾\",5,\"å¡…\",6,\"å¡Žå¡å¡å¡’å¡“å¡•å¡–å¡—å¡™\",4,\"å¡Ÿ\",5,\"塦\",4,\"å¡\",16,\"塿墂墄墆墇墈墊墋墌\"],[\"8980\",\"å¢\",4,\"墔\",4,\"墛墜å¢å¢ \",7,\"墪\",17,\"墽墾墿壀壂壃壄壆\",10,\"壒壓壔壖\",13,\"壥\",5,\"å£å£¯å£±å£²å£´å£µå£·å£¸å£º\",7,\"夃夅夆夈\",4,\"夎å¤å¤‘夒夓夗夘夛å¤å¤žå¤ 夡夢夣夦夨夬夰夲夳夵夶夻\"],[\"8a40\",\"夽夾夿奀奃奅奆奊奌å¥å¥å¥’奓奙奛\",4,\"奡奣奤奦\",12,\"奵奷奺奻奼奾奿妀妅妉妋妌妎å¦å¦å¦‘妔妕妘妚妛妜å¦å¦Ÿå¦ 妡妢妦\"],[\"8a80\",\"妧妬å¦å¦°å¦±å¦³\",5,\"妺妼妽妿\",6,\"姇姈姉姌å§å§Žå§å§•å§–姙姛姞\",4,\"姤姦姧姩姪姫å§\",11,\"姺姼姽姾娀娂娊娋å¨å¨Žå¨å¨å¨’娔娕娖娗娙娚娛å¨å¨žå¨¡å¨¢å¨¤å¨¦å¨§å¨¨å¨ª\",6,\"娳娵娷\",4,\"娽娾娿å©\",4,\"婇婈婋\",9,\"婖婗婘婙婛\",5],[\"8b40\",\"婡婣婤婥婦婨婩婫\",8,\"婸婹婻婼婽婾媀\",17,\"媓\",6,\"媜\",13,\"媫媬\"],[\"8b80\",\"åª\",4,\"媴媶媷媹\",4,\"媿嫀嫃\",5,\"å«Šå«‹å«\",4,\"嫓嫕嫗嫙嫚嫛å«å«žå«Ÿå«¢å«¤å«¥å«§å«¨å«ªå«¬\",4,\"嫲\",22,\"嬊\",11,\"嬘\",25,\"嬳嬵嬶嬸\",7,\"å\",6],[\"8c40\",\"åˆ\",7,\"å’å–åžå å¡å§å¨å«åå®å¯å²å´å¶å·å¸å¹å»å¼å¾å¿å®‚宆宊å®å®Žå®å®‘宒宔宖実宧宨宩宬å®å®®å®¯å®±å®²å®·å®ºå®»å®¼å¯€å¯å¯ƒå¯ˆå¯‰å¯Šå¯‹å¯å¯Žå¯\"],[\"8c80\",\"寑寔\",8,\"å¯ å¯¢å¯£å¯¦å¯§å¯©\",4,\"寯寱\",6,\"寽対尀専尃尅將專尋尌å°å°Žå°å°’å°“å°—å°™å°›å°žå°Ÿå° å°¡å°£å°¦å°¨å°©å°ªå°«å°å°®å°¯å°°å°²å°³å°µå°¶å°·å±ƒå±„屆屇屌å±å±’屓屔屖屗屘屚屛屜å±å±Ÿå±¢å±¤å±§\",6,\"å±°å±²\",6,\"屻屼屽屾岀岃\",4,\"岉岊岋岎å²å²’岓岕å²\",4,\"岤\",4],[\"8d40\",\"岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅\",5,\"峌\",5,\"峓\",5,\"峚\",6,\"峢峣峧峩峫峬峮峯峱\",9,\"å³¼\",4],[\"8d80\",\"å´å´„å´…å´ˆ\",5,\"å´\",4,\"崕崗崘崙崚崜å´å´Ÿ\",4,\"崥崨崪崫崬崯\",4,\"å´µ\",7,\"å´¿\",7,\"嵈嵉åµ\",10,\"嵙嵚嵜嵞\",10,\"嵪åµåµ®åµ°åµ±åµ²åµ³åµµ\",12,\"嶃\",21,\"å¶šå¶›å¶œå¶žå¶Ÿå¶ \"],[\"8e40\",\"嶡\",21,\"嶸\",12,\"å·†\",6,\"å·Ž\",12,\"å·œå·Ÿå· å·£å·¤å·ªå·¬å·\"],[\"8e80\",\"巰巵巶巸\",4,\"巿帀帄帇帉帊帋å¸å¸Žå¸’帓帗帞\",7,\"帨\",4,\"帯帰帲\",4,\"帹帺帾帿幀å¹å¹ƒå¹†\",5,\"å¹\",6,\"å¹–\",4,\"幜å¹å¹Ÿå¹ å¹£\",14,\"幵幷幹幾åºåº‚広庅庈庉庌åºåºŽåº’庘庛åºåº¡åº¢åº£åº¤åº¨\",4,\"庮\",4,\"庴庺庻庼庽庿\",6],[\"8f40\",\"廆廇廈廋\",5,\"廔廕廗廘廙廚廜\",11,\"廩廫\",8,\"廵廸廹廻廼廽弅弆弇弉弌å¼å¼Žå¼å¼’弔弖弙弚弜å¼å¼žå¼¡å¼¢å¼£å¼¤\"],[\"8f80\",\"弨弫弬弮弰弲\",6,\"弻弽弾弿å½\",14,\"å½‘å½”å½™å½šå½›å½œå½žå½Ÿå½ å½£å½¥å½§å½¨å½«å½®å½¯å½²å½´å½µå½¶å½¸å½ºå½½å½¾å½¿å¾ƒå¾†å¾å¾Žå¾å¾‘従徔徖徚徛å¾å¾žå¾Ÿå¾ å¾¢\",5,\"復徫徬徯\",5,\"徶徸徹徺徻徾\",4,\"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇\"],[\"9040\",\"怈怉怋怌æ€æ€‘怓怗怘怚怞怟怢怣怤怬æ€æ€®æ€°\",4,\"怶\",4,\"怽怾æ€æ„\",6,\"æŒæŽææ‘æ“æ”æ–æ—æ˜æ›æœæžæŸæ æ¡æ¥æ¦æ®æ±æ²æ´æµæ·æ¾æ‚€\"],[\"9080\",\"æ‚悂悅悆悇悈悊悋悎æ‚æ‚悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽\",7,\"惇惈惉惌\",4,\"惒惓惔惖惗惙惛惞惡\",4,\"惪惱惲惵惷惸惻\",4,\"愂愃愄愅愇愊愋愌æ„\",4,\"愖愗愘愙愛愜æ„愞愡愢愥愨愩愪愬\",18,\"æ…€\",6],[\"9140\",\"慇慉態æ…æ…æ…慒慓慔慖\",6,\"æ…žæ…Ÿæ… æ…¡æ…£æ…¤æ…¥æ…¦æ…©\",6,\"慱慲慳慴慶慸\",18,\"憌æ†æ†\",4,\"憕\"],[\"9180\",\"憖\",6,\"憞\",8,\"憪憫æ†\",9,\"憸\",5,\"憿懀æ‡æ‡ƒ\",4,\"應懌\",4,\"懓懕\",16,\"懧\",13,\"懶\",8,\"戀\",5,\"戇戉戓戔戙戜æˆæˆžæˆ 戣戦戧戨戩戫æˆæˆ¯æˆ°æˆ±æˆ²æˆµæˆ¶æˆ¸\",4,\"扂扄扅扆扊\"],[\"9240\",\"æ‰æ‰æ‰•æ‰–扗扙扚扜\",6,\"扤扥扨扱扲扴扵扷扸扺扻扽æŠæŠ‚抃抅抆抇抈抋\",5,\"抔抙抜æŠæŠžæŠ£æŠ¦æŠ§æŠ©æŠªæŠæŠ®æŠ¯æŠ°æŠ²æŠ³æŠ´æŠ¶æŠ·æŠ¸æŠºæŠ¾æ‹€æ‹\"],[\"9280\",\"拃拋æ‹æ‹‘æ‹•æ‹æ‹žæ‹ 拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌æŒæŒæŒæŒ’挓挔挕挗挘挙挜挦挧挩挬æŒæŒ®æŒ°æŒ±æŒ³\",5,\"挻挼挾挿æ€ææ„æ‡æˆæŠæ‘æ’æ“æ”æ–\",7,\"æ æ¤æ¥æ¦æ¨æªæ«æ¬æ¯æ°æ²æ³æ´æµæ¸æ¹æ¼æ½æ¾æ¿æŽæŽƒæŽ„掅掆掋æŽæŽ‘掓掔掕掗掙\",6,\"採掤掦掫掯掱掲掵掶掹掻掽掿æ€\"],[\"9340\",\"ææ‚æƒæ…æ‡æˆæŠæ‹æŒæ‘æ“æ”æ•æ—\",6,\"æŸæ¢æ¤\",4,\"æ«æ¬æ®æ¯æ°æ±æ³æµæ·æ¹æºæ»æ¼æ¾æƒæ„æ†\",4,\"ææŽæ‘æ’æ•\",5,\"ææŸæ¢æ£æ¤\"],[\"9380\",\"æ¥æ§æ¨æ©æ«æ®\",5,\"æµ\",4,\"æ»æ¼æ¾æ‘€æ‘‚摃摉摋\",6,\"æ‘“æ‘•æ‘–æ‘—æ‘™\",4,\"æ‘Ÿ\",7,\"摨摪摫摬摮\",9,\"æ‘»\",6,\"撃撆撈\",8,\"撓撔撗撘撚撛撜æ’æ’Ÿ\",4,\"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿æ“擃擄擆\",6,\"æ“擑擓擔擕擖擙據\"],[\"9440\",\"擛擜æ“æ“Ÿæ“ æ“¡æ“£æ“¥æ“§\",24,\"æ”\",7,\"攊\",7,\"攓\",4,\"æ”™\",8],[\"9480\",\"攢攣攤攦\",4,\"攬æ”攰攱攲攳攷攺攼攽敀\",4,\"敆敇敊敋æ•æ•Žæ•æ•’æ•“æ•”æ•—æ•˜æ•šæ•œæ•Ÿæ• æ•¡æ•¤æ•¥æ•§æ•¨æ•©æ•ªæ•æ•®æ•¯æ•±æ•³æ•µæ•¶æ•¸\",14,\"斈斉斊æ–æ–Žæ–斒斔斕斖斘斚æ–æ–žæ– æ–¢æ–£æ–¦æ–¨æ–ªæ–¬æ–®æ–±\",7,\"斺斻斾斿旀旂旇旈旉旊æ—æ—旑旓旔旕旘\",7,\"旡旣旤旪旫\"],[\"9540\",\"旲旳旴旵旸旹旻\",4,\"æ˜æ˜„昅昇昈昉昋æ˜æ˜æ˜‘昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷\",4,\"昽昿晀時晄\",6,\"æ™æ™Žæ™æ™‘晘\"],[\"9580\",\"晙晛晜æ™æ™žæ™ 晢晣晥晧晩\",4,\"晱晲晳晵晸晹晻晼晽晿暀æšæšƒæš…暆暈暉暊暋æšæšŽæšæšæš’暓暔暕暘\",4,\"æšž\",8,\"æš©\",4,\"暯\",4,\"暵暶暷暸暺暻暼暽暿\",25,\"曚曞\",7,\"曧曨曪\",5,\"曱曵曶書曺曻曽æœæœ‚會\"],[\"9640\",\"朄朅朆朇朌朎æœæœ‘æœ’æœ“æœ–æœ˜æœ™æœšæœœæœžæœ \",5,\"朧朩朮朰朲朳朶朷朸朹朻朼朾朿ææ„æ…æ‡æŠæ‹ææ’æ”æ•æ—\",4,\"ææ¢æ£æ¤æ¦æ§æ«æ¬æ®æ±æ´æ¶\"],[\"9680\",\"æ¸æ¹æºæ»æ½æž€æž‚枃枅枆枈枊枌æžæžŽæžæž‘æž’æž“æž”æž–æž™æž›æžŸæž æž¡æž¤æž¦æž©æž¬æž®æž±æž²æž´æž¹\",7,\"柂柅\",9,\"柕柖柗柛柟柡柣柤柦柧柨柪柫æŸæŸ®æŸ²æŸµ\",7,\"柾æ æ ‚æ ƒæ „æ †æ æ æ ’æ ”æ •æ ˜\",4,\"æ žæ Ÿæ æ ¢\",6,\"æ «\",6,\"æ ´æ µæ ¶æ ºæ »æ ¿æ¡‡æ¡‹æ¡æ¡æ¡’æ¡–\",5],[\"9740\",\"æ¡œæ¡æ¡žæ¡Ÿæ¡ªæ¡¬\",7,\"桵桸\",8,\"梂梄梇\",7,\"æ¢æ¢‘梒梔梕梖梘\",9,\"梣梤梥梩梪梫梬梮梱梲梴梶梷梸\"],[\"9780\",\"梹\",6,\"æ£æ£ƒ\",5,\"棊棌棎æ£æ£æ£‘棓棔棖棗棙棛\",4,\"棡棢棤\",9,\"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆\",4,\"椌æ¤æ¤‘椓\",11,\"椡椢椣椥\",7,\"椮椯椱椲椳椵椶椷椸椺椻椼椾楀æ¥æ¥ƒ\",16,\"楕楖楘楙楛楜楟\"],[\"9840\",\"楡楢楤楥楧楨楩楪楬æ¥æ¥¯æ¥°æ¥²\",4,\"楺楻楽楾楿æ¦æ¦ƒæ¦…榊榋榌榎\",5,\"榖榗榙榚æ¦\",9,\"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽\"],[\"9880\",\"榾榿槀槂\",7,\"構æ§æ§æ§‘槒槓槕\",5,\"槜æ§æ§žæ§¡\",11,\"槮槯槰槱槳\",9,\"槾樀\",9,\"樋\",11,\"標\",5,\"æ¨ æ¨¢\",5,\"権樫樬æ¨æ¨®æ¨°æ¨²æ¨³æ¨´æ¨¶\",6,\"樿\",4,\"橅橆橈\",7,\"æ©‘\",6,\"æ©š\"],[\"9940\",\"æ©œ\",4,\"橢橣橤橦\",10,\"橲\",6,\"橺橻橽橾橿æªæª‚檃檅\",8,\"æªæª’\",4,\"檘\",7,\"檡\",5],[\"9980\",\"檧檨檪æª\",114,\"欥欦欨\",6],[\"9a40\",\"欯欰欱欳欴欵欶欸欻欼欽欿æ€ææ‚æ„æ…æˆæŠæ‹æ\",11,\"æš\",7,\"æ¨æ©æ«\",13,\"æºæ½æ¾æ¿æ®€æ®…殈\"],[\"9a80\",\"殌殎æ®æ®æ®‘殔殕殗殘殙殜\",4,\"殢\",7,\"殫\",7,\"殶殸\",6,\"毀毃毄毆\",4,\"毌毎æ¯æ¯‘毘毚毜\",4,\"毢\",7,\"毬æ¯æ¯®æ¯°æ¯±æ¯²æ¯´æ¯¶æ¯·æ¯¸æ¯ºæ¯»æ¯¼æ¯¾\",6,\"æ°ˆ\",4,\"æ°Žæ°’æ°—æ°œæ°æ°žæ° 氣氥氫氬æ°æ°±æ°³æ°¶æ°·æ°¹æ°ºæ°»æ°¼æ°¾æ°¿æ±ƒæ±„汅汈汋\",4,\"汑汒汓汖汘\"],[\"9b40\",\"汙汚汢汣汥汦汧汫\",4,\"汱汳汵汷汸決汻汼汿沀沄沇沊沋æ²æ²Žæ²‘沒沕沖沗沘沚沜æ²æ²žæ² 沢沨沬沯沰沴沵沶沷沺泀æ³æ³‚泃泆泇泈泋æ³æ³Žæ³æ³‘泒泘\"],[\"9b80\",\"泙泚泜æ³æ³Ÿæ³¤æ³¦æ³§æ³©æ³¬æ³æ³²æ³´æ³¹æ³¿æ´€æ´‚洃洅洆洈洉洊æ´æ´æ´æ´‘洓洔洕洖洘洜æ´æ´Ÿ\",5,\"洦洨洩洬æ´æ´¯æ´°æ´´æ´¶æ´·æ´¸æ´ºæ´¿æµ€æµ‚浄浉浌æµæµ•æµ–浗浘浛æµæµŸæµ¡æµ¢æµ¤æµ¥æµ§æµ¨æµ«æµ¬æµæµ°æµ±æµ²æµ³æµµæµ¶æµ¹æµºæµ»æµ½\",4,\"涃涄涆涇涊涋æ¶æ¶æ¶æ¶’涖\",4,\"涜涢涥涬æ¶æ¶°æ¶±æ¶³æ¶´æ¶¶æ¶·æ¶¹\",5,\"æ·æ·‚淃淈淉淊\"],[\"9c40\",\"æ·æ·Žæ·æ·æ·’淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪æ·æ·¯æ·°æ·²æ·´æ·µæ·¶æ·¸æ·ºæ·½\",7,\"渆渇済渉渋æ¸æ¸’渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵\"],[\"9c80\",\"渶渷渹渻\",7,\"æ¹…\",7,\"æ¹æ¹æ¹‘湒湕湗湙湚湜æ¹æ¹žæ¹ \",10,\"湬æ¹æ¹¯\",14,\"満æºæº‚溄溇溈溊\",4,\"溑\",6,\"溙溚溛æºæºžæº 溡溣溤溦溨溩溫溬æºæº®æº°æº³æºµæº¸æº¹æº¼æº¾æº¿æ»€æ»ƒæ»„滅滆滈滉滊滌æ»æ»Žæ»æ»’滖滘滙滛滜æ»æ»£æ»§æ»ª\",5],[\"9d40\",\"滰滱滲滳滵滶滷滸滺\",7,\"漃漄漅漇漈漊\",4,\"æ¼æ¼‘æ¼’æ¼–\",9,\"漡漢漣漥漦漧漨漬漮漰漲漴漵漷\",6,\"漿潀æ½æ½‚\"],[\"9d80\",\"潃潄潅潈潉潊潌潎\",9,\"潙潚潛æ½æ½Ÿæ½ 潡潣潤潥潧\",5,\"潯潰潱潳潵潶潷潹潻潽\",6,\"澅澆澇澊澋æ¾\",12,\"æ¾æ¾žæ¾Ÿæ¾ æ¾¢\",4,\"澨\",10,\"澴澵澷澸澺\",5,\"æ¿æ¿ƒ\",5,\"æ¿Š\",6,\"æ¿“\",10,\"濟濢濣濤濥\"],[\"9e40\",\"濦\",7,\"æ¿°\",32,\"瀒\",7,\"瀜\",6,\"瀤\",6],[\"9e80\",\"瀫\",9,\"瀶瀷瀸瀺\",17,\"ççŽç\",13,\"çŸ\",11,\"ç®ç±ç²ç³ç´ç·ç¹çºç»ç½ç‚炂炃炄炆炇炈炋炌ç‚ç‚ç‚炑炓炗炘炚炛炞\",12,\"炰炲炴炵炶為炾炿烄烅烆烇烉烋\",12,\"烚\"],[\"9f40\",\"烜çƒçƒžçƒ 烡烢烣烥烪烮烰\",6,\"烸烺烻烼烾\",10,\"ç„‹\",4,\"焑焒焔焗焛\",10,\"焧\",7,\"焲焳焴\"],[\"9f80\",\"焵焷\",13,\"煆煇煈煉煋ç…ç…\",12,\"ç…ç…Ÿ\",4,\"煥煩\",4,\"煯煰煱煴煵煶煷煹煻煼煾\",5,\"熅\",4,\"熋熌ç†ç†Žç†ç†‘熒熓熕熖熗熚\",4,\"熡\",6,\"熩熪熫ç†\",5,\"熴熶熷熸熺\",8,\"燄\",9,\"ç‡\",4],[\"a040\",\"燖\",9,\"燡燢燣燤燦燨\",5,\"燯\",9,\"燺\",11,\"爇\",19],[\"a080\",\"爛爜爞\",9,\"爩爫çˆçˆ®çˆ¯çˆ²çˆ³çˆ´çˆºçˆ¼çˆ¾ç‰€\",6,\"牉牊牋牎ç‰ç‰ç‰‘ç‰“ç‰”ç‰•ç‰—ç‰˜ç‰šç‰œç‰žç‰ ç‰£ç‰¤ç‰¥ç‰¨ç‰ªç‰«ç‰¬ç‰ç‰°ç‰±ç‰³ç‰´ç‰¶ç‰·ç‰¸ç‰»ç‰¼ç‰½çŠ‚犃犅\",4,\"犌犎çŠçŠ‘犓\",11,\"çŠ \",11,\"犮犱犲犳犵犺\",6,\"狅狆狇狉狊狋狌ç‹ç‹‘狓狔狕狖狘狚狛\"],[\"a1a1\",\" ã€ã€‚·ˉˇ¨〃々—~‖…‘’“â€ã€”〕〈\",7,\"〖〗ã€ã€‘±×÷∶∧∨∑âˆâˆªâˆ©âˆˆâˆ·âˆšâŠ¥âˆ¥âˆ ⌒⊙∫∮≡≌≈∽âˆâ‰ â‰®â‰¯â‰¤â‰¥âˆžâˆµâˆ´â™‚â™€Â°â€²â€³â„ƒï¼„Â¤ï¿ ï¿¡â€°Â§â„–â˜†â˜…â—‹â—◎◇◆□■△▲※→â†â†‘↓〓\"],[\"a2a1\",\"â…°\",9],[\"a2b1\",\"â’ˆ\",19,\"â‘´\",19,\"â‘ \",9],[\"a2e5\",\"㈠\",9],[\"a2f1\",\"â… \",11],[\"a3a1\",\"ï¼ï¼‚#¥%\",88,\"ï¿£\"],[\"a4a1\",\"ã\",82],[\"a5a1\",\"ã‚¡\",85],[\"a6a1\",\"Α\",16,\"Σ\",6],[\"a6c1\",\"α\",16,\"σ\",6],[\"a6e0\",\"︵︶︹︺︿﹀︽︾ï¹ï¹‚﹃﹄\"],[\"a6ee\",\"︻︼︷︸︱\"],[\"a6f4\",\"︳︴\"],[\"a7a1\",\"Ð\",5,\"ÐЖ\",25],[\"a7d1\",\"а\",5,\"ёж\",25],[\"a840\",\"ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿â•\",35,\"â–\",6],[\"a880\",\"â–ˆ\",7,\"▓▔▕▼▽◢◣◤◥☉⊕〒ã€ã€ž\"],[\"a8a1\",\"Äáǎà ēéěèīÃÇìÅóǒòūúǔùǖǘǚǜüêɑ\"],[\"a8bd\",\"ńň\"],[\"a8c0\",\"É¡\"],[\"a8c5\",\"ã„…\",36],[\"a940\",\"〡\",8,\"㊣㎎ãŽãŽœãŽãŽžãŽ¡ã„ãŽã‘ã’ã•ï¸°ï¿¢ï¿¤\"],[\"a959\",\"℡㈱\"],[\"a95c\",\"â€\"],[\"a960\",\"ー゛゜ヽヾ〆ã‚ゞ﹉\",9,\"﹔﹕﹖﹗﹙\",8],[\"a980\",\"ï¹¢\",4,\"﹨﹩﹪﹫\"],[\"a996\",\"〇\"],[\"a9a4\",\"─\",75],[\"aa40\",\"ç‹œç‹ç‹Ÿç‹¢\",5,\"狪狫狵狶狹狽狾狿猀猂猄\",5,\"猋猌çŒçŒçŒçŒ‘çŒ’çŒ”çŒ˜çŒ™çŒšçŒŸçŒ çŒ£çŒ¤çŒ¦çŒ§çŒ¨çŒçŒ¯çŒ°çŒ²çŒ³çŒµçŒ¶çŒºçŒ»çŒ¼çŒ½ç€\",8],[\"aa80\",\"ç‰çŠç‹çŒçŽçç‘ç“ç”ç•ç–ç˜\",7,\"ç¡\",10,\"ç®ç°ç±\"],[\"ab40\",\"ç²\",11,\"ç¿\",4,\"玅玆玈玊玌çŽçŽçŽçŽ’玓玔玕玗玘玙玚玜çŽçŽžçŽ 玡玣\",5,\"玪玬çŽçŽ±çŽ´çŽµçŽ¶çŽ¸çŽ¹çŽ¼çŽ½çŽ¾çŽ¿ççƒ\",4],[\"ab80\",\"ç‹çŒçŽç’\",6,\"çšç›çœççŸç¡ç¢ç£ç¤ç¦ç¨çªç«ç¬ç®ç¯ç°ç±ç³\",4],[\"ac40\",\"ç¸\",10,\"ç„ç‡çˆç‹çŒççŽç‘\",8,\"çœ\",5,\"ç£ç¤ç§ç©ç«çç¯ç±ç²ç·\",4,\"ç½ç¾ç¿ç‘€ç‘‚\",11],[\"ac80\",\"ç‘Ž\",6,\"瑖瑘ç‘ç‘ \",12,\"瑮瑯瑱\",4,\"瑸瑹瑺\"],[\"ad40\",\"瑻瑼瑽瑿璂璄璅璆璈璉璊璌ç’ç’ç’‘\",10,\"ç’ç’Ÿ\",7,\"ç’ª\",15,\"ç’»\",12],[\"ad80\",\"瓈\",9,\"ç““\",8,\"ç“瓟瓡瓥瓧\",6,\"瓰瓱瓲\"],[\"ae40\",\"瓳瓵瓸\",6,\"甀ç”甂甃甅\",7,\"甎ç”甒甔甕甖甗甛ç”ç”žç” \",4,\"甦甧甪甮甴甶甹甼甽甿ç•ç•‚畃畄畆畇畉畊ç•ç•ç•‘畒畓畕畖畗畘\"],[\"ae80\",\"ç•\",7,\"畧畨畩畫\",6,\"畳畵當畷畺\",4,\"ç–€ç–ç–‚ç–„ç–…ç–‡\"],[\"af40\",\"疈疉疊疌ç–ç–Žç–疓疕疘疛疜疞疢疦\",4,\"ç–疶疷疺疻疿痀ç—痆痋痌痎ç—ç—痑痓痗痙痚痜ç—ç—Ÿç— ç—¡ç—¥ç—©ç—¬ç—痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇\"],[\"af80\",\"瘈瘉瘋ç˜ç˜Žç˜ç˜‘瘒瘓瘔瘖瘚瘜ç˜ç˜žç˜¡ç˜£ç˜§ç˜¨ç˜¬ç˜®ç˜¯ç˜±ç˜²ç˜¶ç˜·ç˜¹ç˜ºç˜»ç˜½ç™ç™‚癄\"],[\"b040\",\"ç™…\",6,\"癎\",5,\"癕癗\",4,\"ç™ç™Ÿç™ 癡癢癤\",6,\"癬ç™ç™®ç™°\",7,\"癹発發癿皀çšçšƒçš…皉皊皌çšçšçšçš’皔皕皗皘皚皛\"],[\"b080\",\"çšœ\",7,\"皥\",8,\"皯皰皳皵\",9,\"盀ç›ç›ƒå•Šé˜¿åŸƒæŒ¨å“Žå”‰å“€çš‘癌蔼矮艾ç¢çˆ±éš˜éžæ°¨å®‰ä¿ºæŒ‰æš—岸胺案肮昂盎凹敖熬翱袄傲奥懊澳èŠæŒæ‰’åå§ç¬†å…«ç–¤å·´æ‹”è·‹é¶æŠŠè€™å霸罢爸白æŸç™¾æ‘†ä½°è´¥æ‹œç¨—æ–‘çæ¬æ‰³èˆ¬é¢æ¿ç‰ˆæ‰®æ‹Œä¼´ç“£åŠåŠžç»Šé‚¦å¸®æ¢†æ¦œè†€ç»‘棒磅蚌镑å‚谤苞胞包褒剥\"],[\"b140\",\"盄盇盉盋盌盓盕盙盚盜ç›ç›žç› \",4,\"盦\",7,\"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎\",10,\"眛眜çœçœžçœ¡çœ£çœ¤çœ¥çœ§çœªçœ«\"],[\"b180\",\"眬眮眰\",4,\"眹眻眽眾眿ç‚ç„ç…ç†çˆ\",7,\"ç’\",7,\"çœè–„雹ä¿å ¡é¥±å®æŠ±æŠ¥æš´è±¹é²çˆ†æ¯ç¢‘悲å‘北辈背è´é’¡å€ç‹ˆå¤‡æƒ«ç„™è¢«å¥”苯本笨崩绷ç”泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖å¸åº‡ç—¹é—æ•å¼Šå¿…辟å£è‡‚é¿é™›éžè¾¹ç¼–è´¬æ‰ä¾¿å˜åžè¾¨è¾©è¾«éæ ‡å½ªè†˜è¡¨é³–æ†‹åˆ«ç˜ªå½¬æ–Œæ¿’æ»¨å®¾æ‘ˆå…µå†°æŸ„ä¸™ç§‰é¥¼ç‚³\"],[\"b240\",\"ççžçŸç ç¤ç§ç©çªç\",11,\"çºç»ç¼çžçž‚瞃瞆\",5,\"çžçžçž“\",11,\"瞡瞣瞤瞦瞨瞫çžçž®çž¯çž±çž²çž´çž¶\",4],[\"b280\",\"瞼瞾矀\",12,\"矎\",8,\"矘矙矚çŸ\",4,\"矤病并玻è æ’拨钵波åšå‹ƒæ铂箔伯帛舶脖膊渤泊驳æ•åœå“ºè¡¥åŸ ä¸å¸ƒæ¥ç°¿éƒ¨æ€–擦猜è£ææ‰è´¢ç¬è¸©é‡‡å½©èœè”¡é¤å‚蚕残æƒæƒ¨ç¿è‹èˆ±ä»“沧è—æ“糙槽曹è‰åŽ•ç–侧册测层è¹æ’å‰èŒ¬èŒ¶æŸ¥ç¢´æ½å¯Ÿå²”差诧拆柴豺æ€æŽºè‰é¦‹è°—ç¼ é“²äº§é˜é¢¤æ˜ŒçŒ–\"],[\"b340\",\"çŸ¦çŸ¨çŸªçŸ¯çŸ°çŸ±çŸ²çŸ´çŸµçŸ·çŸ¹çŸºçŸ»çŸ¼ç ƒ\",5,\"ç Šç ‹ç Žç ç ç “ç •ç ™ç ›ç žç ç ¡ç ¢ç ¤ç ¨ç ªç «ç ®ç ¯ç ±ç ²ç ³ç µç ¶ç ½ç ¿ç¡ç¡‚硃硄硆硈硉硊硋ç¡ç¡ç¡‘硓硔硘硙硚\"],[\"b380\",\"硛硜硞\",11,\"硯\",7,\"硸硹硺硻硽\",6,\"场å°å¸¸é•¿å¿è‚ 厂敞畅唱倡超抄钞æœå˜²æ½®å·¢åµç‚’车扯撤掣彻澈郴臣辰尘晨忱沉陈è¶è¡¬æ’‘称城橙æˆå‘ˆä¹˜ç¨‹æƒ©æ¾„诚承逞骋秤åƒç—´æŒåŒ™æ± è¿Ÿå¼›é©°è€»é½¿ä¾ˆå°ºèµ¤ç¿…æ–¥ç‚½å……å†²è™«å´‡å® æŠ½é…¬ç•´è¸Œç¨ æ„ç¹ä»‡ç»¸çž…丑è‡åˆå‡ºæ©±åŽ¨èº‡é”„é›æ»é™¤æ¥š\"],[\"b440\",\"碄碅碆碈碊碋ç¢ç¢ç¢’碔碕碖碙ç¢ç¢žç¢ 碢碤碦碨\",7,\"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌ç£ç£Žç£ç£‘磒磓磖磗磘磚\",9],[\"b480\",\"磤磥磦磧磩磪磫ç£\",4,\"磳磵磶磸磹磻\",5,\"礂礃礄礆\",6,\"础储矗æ触处æ£å·ç©¿æ¤½ä¼ 船喘串疮窗幢床闯创å¹ç‚Šæ¶é”¤åž‚æ˜¥æ¤¿é†‡å”‡æ·³çº¯è ¢æˆ³ç»°ç–µèŒ¨ç£é›Œè¾žæ…ˆç“·è¯æ¤åˆºèµæ¬¡èªè‘±å›±åŒ†ä»Žä¸›å‡‘粗醋簇促蹿篡窜摧崔催脆ç˜ç²¹æ·¬ç¿ æ‘å˜å¯¸ç£‹æ’®æ“措挫错æè¾¾ç”瘩打大呆æ¹å‚£æˆ´å¸¦æ®†ä»£è´·è¢‹å¾…逮\"],[\"b540\",\"ç¤\",5,\"礔\",9,\"礟\",4,\"礥\",14,\"礵\",4,\"礽礿祂祃祄祅祇祊\",8,\"祔祕祘祙祡祣\"],[\"b580\",\"祤祦祩祪祫祬祮祰\",6,\"祹祻\",4,\"禂禃禆禇禈禉禋禌ç¦ç¦Žç¦ç¦‘ç¦’æ€ è€½æ‹…ä¸¹å•éƒ¸æŽ¸èƒ†æ—¦æ°®ä½†æƒ®æ·¡è¯žå¼¹è›‹å½“挡党è¡æ¡£åˆ€æ£è¹ˆå€’岛祷导到稻悼é“盗德得的蹬ç¯ç™»ç‰çžªå‡³é‚“å ¤ä½Žæ»´è¿ªæ•Œç¬›ç‹„æ¶¤ç¿Ÿå«¡æŠµåº•åœ°è’‚ç¬¬å¸å¼Ÿé€’ç¼”é¢ æŽ‚æ»‡ç¢˜ç‚¹å…¸é›åž«ç”µä½ƒç”¸åº—æƒ¦å¥ æ·€æ®¿ç¢‰å¼é›•å‡‹åˆæŽ‰åŠé’“调跌爹碟è¶è¿è°å \"],[\"b640\",\"禓\",6,\"禛\",11,\"禨\",10,\"禴\",4,\"禼禿秂秄秅秇秈秊秌秎ç§ç§ç§“秔秖秗秙\",5,\"ç§ ç§¡ç§¢ç§¥ç§¨ç§ª\"],[\"b680\",\"秬秮秱\",6,\"秹秺秼秾秿ç¨ç¨„稅稇稈稉稊稌ç¨\",4,\"稕稖稘稙稛稜ä¸ç›¯å®é’‰é¡¶é¼Žé”å®šè®¢ä¸¢ä¸œå†¬è‘£æ‡‚åŠ¨æ ‹ä¾—æ«å†»æ´žå…œæŠ–斗陡豆逗痘都ç£æ¯’çŠŠç‹¬è¯»å µç¹èµŒæœé•€è‚šåº¦æ¸¡å¦’端çŸé”»æ®µæ–ç¼Žå †å…‘é˜Ÿå¯¹å¢©å¨è¹²æ•¦é¡¿å›¤é’盾é掇哆多夺垛躲朵跺舵å‰æƒ°å •è›¾å³¨é¹…ä¿„é¢è®¹å¨¥æ¶åŽ„扼é鄂饿æ©è€Œå„¿è€³å°”饵洱二\"],[\"b740\",\"ç¨ç¨Ÿç¨¡ç¨¢ç¨¤\",14,\"稴稵稶稸稺稾穀\",5,\"穇\",9,\"ç©’\",4,\"穘\",16],[\"b780\",\"ç©©\",6,\"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎çªçªçª“窔窙窚窛窞窡窢贰å‘罚çä¼ä¹é˜€æ³•ç藩帆番翻樊矾钒ç¹å‡¡çƒ¦å返范贩犯é¥æ³›åŠèŠ³æ–¹è‚ªæˆ¿é˜²å¦¨ä»¿è®¿çººæ”¾è²éžå•¡é£žè‚¥åŒªè¯½å 肺废沸费芬酚å©æ°›åˆ†çº·åŸç„šæ±¾ç²‰å¥‹ä»½å¿¿æ„¤ç²ªä¸°å°æž«èœ‚峰锋风疯烽逢冯ç¼è®½å¥‰å‡¤ä½›å¦å¤«æ•·è‚¤åµæ‰¶æ‹‚è¾å¹…氟符ä¼ä¿˜æœ\"],[\"b840\",\"窣窤窧窩窪窫窮\",4,\"窴\",10,\"ç«€\",10,\"ç«Œ\",9,\"竗竘竚竛竜ç«ç«¡ç«¢ç«¤ç«§\",5,\"竮竰竱竲竳\"],[\"b880\",\"ç«´\",4,\"竻竼竾笀ç¬ç¬‚笅笇笉笌ç¬ç¬Žç¬ç¬’笓笖笗笘笚笜ç¬ç¬Ÿç¬¡ç¬¢ç¬£ç¬§ç¬©ç¬æµ®æ¶ªç¦è¢±å¼—甫抚辅俯釜斧脯腑府è…赴副覆赋å¤å‚…付阜父腹负富讣附妇缚å’噶嘎该改概钙盖溉干甘æ†æŸ‘ç«¿è‚赶感秆敢赣冈刚钢缸肛纲岗港æ 篙皋高è†ç¾”糕æžé•ç¨¿å‘Šå“¥æŒæ戈鸽胳疙割é©è‘›æ ¼è›¤é˜éš”铬个å„ç»™æ ¹è·Ÿè€•æ›´åºšç¾¹\"],[\"b940\",\"笯笰笲笴笵笶笷笹笻笽笿\",5,\"ç†çˆçŠççŽç“ç•ç—ç™çœçžçŸç¡ç£\",10,\"ç¯ç°ç³ç´ç¶ç¸çºç¼ç½ç¿ç®ç®‚箃箄箆\",6,\"箎ç®\"],[\"b980\",\"ç®‘ç®’ç®“ç®–ç®˜ç®™ç®šç®›ç®žç®Ÿç® ç®£ç®¤ç®¥ç®®ç®¯ç®°ç®²ç®³ç®µç®¶ç®·ç®¹\",7,\"篂篃範埂耿梗工攻功æ龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构è´å¤Ÿè¾œè‡å’•ç®ä¼°æ²½å¤å§‘鼓å¤è›Šéª¨è°·è‚¡æ•…顾固雇刮瓜å‰å¯¡æŒ‚褂乖æ‹æ€ªæ£ºå…³å®˜å† 观管馆ç½æƒ¯çŒè´¯å…‰å¹¿é€›ç‘°è§„åœç¡…归龟闺轨鬼诡癸桂柜跪贵刽辊滚æ£é”…éƒå›½æžœè£¹è¿‡å“ˆ\"],[\"ba40\",\"篅篈築篊篋ç¯ç¯Žç¯ç¯ç¯’篔\",4,\"ç¯›ç¯œç¯žç¯Ÿç¯ ç¯¢ç¯£ç¯¤ç¯§ç¯¨ç¯©ç¯«ç¯¬ç¯ç¯¯ç¯°ç¯²\",4,\"篸篹篺篻篽篿\",7,\"簈簉簊ç°ç°Žç°\",5,\"簗簘簙\"],[\"ba80\",\"ç°š\",4,\"ç° \",5,\"簨簩簫\",12,\"ç°¹\",5,\"籂骸å©æµ·æ°¦äº¥å®³éª‡é…£æ†¨é‚¯éŸ©å«æ¶µå¯’函喊罕翰撼æ旱憾æ‚焊汗汉夯æ航壕嚎豪毫éƒå¥½è€—å·æµ©å‘µå–è·èæ ¸ç¦¾å’Œä½•åˆç›’貉阂河涸赫è¤é¹¤è´ºå˜¿é»‘ç—•å¾ˆç‹ æ¨å“¼äº¨æ¨ªè¡¡æ’轰哄烘虹鸿洪å®å¼˜çº¢å–‰ä¾¯çŒ´å¼åŽšå€™åŽå‘¼ä¹Žå¿½ç‘šå£¶è‘«èƒ¡è´ç‹ç³Šæ¹–\"],[\"bb40\",\"籃\",9,\"籎\",36,\"ç±µ\",5,\"ç±¾\",9],[\"bb80\",\"粈粊\",6,\"ç²“ç²”ç²–ç²™ç²šç²›ç² ç²¡ç²£ç²¦ç²§ç²¨ç²©ç²«ç²¬ç²ç²¯ç²°ç²´\",4,\"粺粻弧虎唬护互沪户花哗åŽçŒ¾æ»‘画划化è¯æ§å¾Šæ€€æ·®å欢环桓还缓æ¢æ‚£å”¤ç—ªè±¢ç„•æ¶£å®¦å¹»è’慌黄磺è—簧皇凰惶煌晃幌æè°Žç°æŒ¥è¾‰å¾½æ¢è›”回æ¯æ‚”æ…§å‰æƒ 晦贿秽会烩汇讳诲绘è¤æ˜å©šé‚浑混è±æ´»ä¼™ç«èŽ·æˆ–惑éœè´§ç¥¸å‡»åœ¾åŸºæœºç•¸ç¨½ç§¯ç®•\"],[\"bc40\",\"粿糀糂糃糄糆糉糋糎\",6,\"糘糚糛ç³ç³žç³¡\",6,\"糩\",5,\"ç³°\",7,\"糹糺糼\",13,\"ç´‹\",5],[\"bc80\",\"ç´‘\",14,\"紡紣紤紥紦紨紩紪紬ç´ç´®ç´°\",6,\"肌饥迹激讥鸡姬绩缉å‰æžæ£˜è¾‘ç±é›†åŠæ€¥ç–¾æ±²å³å«‰çº§æŒ¤å‡ 脊己蓟技冀å£ä¼Žç¥å‰‚æ‚¸æµŽå¯„å¯‚è®¡è®°æ—¢å¿Œé™…å¦“ç»§çºªå˜‰æž·å¤¹ä½³å®¶åŠ èšé¢Šè´¾ç”²é’¾å‡ç¨¼ä»·æž¶é©¾å«æ¼ç›‘åšå°–笺间煎兼肩艰奸缄茧检柬碱硷拣æ¡ç®€ä¿å‰ªå‡è槛鉴践贱è§é”®ç®ä»¶\"],[\"bd40\",\"ç´·\",54,\"絯\",7],[\"bd80\",\"絸\",32,\"å¥èˆ°å‰‘饯æ¸æº…æ¶§å»ºåƒµå§œå°†æµ†æ±Ÿç–†è’‹æ¡¨å¥–è®²åŒ é…±é™è•‰æ¤’ç¤ç„¦èƒ¶äº¤éƒŠæµ‡éª„娇嚼æ…铰矫侥脚狡角饺缴绞剿教酵轿较å«çª–æ接皆秸街阶截劫节桔æ°æ·ç«ç«æ´ç»“解å§æˆ’藉芥界借介疥诫届巾ç‹æ–¤é‡‘今津襟紧锦仅谨进é³æ™‹ç¦è¿‘烬浸\"],[\"be40\",\"継\",12,\"綧\",6,\"綯\",42],[\"be80\",\"ç·š\",32,\"尽劲è†å…¢èŒŽç›æ™¶é²¸äº¬æƒŠç²¾ç²³ç»äº•è¦æ™¯é¢ˆé™å¢ƒæ•¬é•œå¾„ç—‰é–竟竞净炯窘æªç©¶çº 玖éŸä¹…ç¸ä¹é…’åŽ©æ•‘æ—§è‡¼èˆ…å’Žå°±ç–šéž æ‹˜ç‹™ç–½å±…é©¹èŠå±€å’€çŸ©ä¸¾æ²®èšæ‹’æ®å·¨å…·è·è¸žé”¯ä¿±å¥æƒ§ç‚¬å‰§æ鹃娟倦眷å·ç»¢æ’…攫抉掘倔爵觉决诀ç»å‡èŒé’§å†›å›å³»\"],[\"bf40\",\"ç·»\",62],[\"bf80\",\"縺縼\",4,\"繂\",4,\"繈\",21,\"俊竣浚郡éªå–€å’–å¡å’¯å¼€æ©æ¥·å‡¯æ…¨åˆŠå ªå‹˜åŽç çœ‹åº·æ…·ç³ æ‰›æŠ—äº¢ç‚•è€ƒæ‹·çƒ¤é å·è‹›æŸ¯æ£µç£•é¢—科壳咳å¯æ¸´å…‹åˆ»å®¢è¯¾è‚¯å•ƒåž¦æ³å‘å空æå”æŽ§æŠ å£æ‰£å¯‡æž¯å“窟苦酷库裤夸垮挎跨胯å—ç·ä¾©å¿«å®½æ¬¾åŒ¡ç狂框矿眶旷况äºç›”岿窥葵奎éå‚€\"],[\"c040\",\"繞\",35,\"纃\",23,\"纜çºçºž\"],[\"c080\",\"纮纴纻纼绖绤绬绹缊ç¼ç¼žç¼·ç¼¹ç¼»\",6,\"罃罆\",9,\"罒罓馈愧溃å¤æ˜†æ†å›°æ‹¬æ‰©å»“阔垃拉喇蜡腊辣啦莱æ¥èµ–è“婪æ 拦篮阑兰澜谰æ½è§ˆæ‡’缆烂滥ç…榔狼廊郎朗浪æžåŠ³ç‰¢è€ä½¬å§¥é…ªçƒ™æ¶å‹’ä¹é›·é•è•¾ç£Šç´¯å„¡åž’擂肋类泪棱楞冷厘梨çŠé»Žç¯±ç‹¸ç¦»æ¼“ç†æŽé‡Œé²¤ç¤¼èŽ‰è”åæ —ä¸½åŽ‰åŠ±ç ¾åŽ†åˆ©å‚ˆä¾‹ä¿\"],[\"c140\",\"罖罙罛罜ç½ç½žç½ ç½£\",4,\"罫罬ç½ç½¯ç½°ç½³ç½µç½¶ç½·ç½¸ç½ºç½»ç½¼ç½½ç½¿ç¾€ç¾‚\",7,\"羋ç¾ç¾\",4,\"羕\",4,\"ç¾›ç¾œç¾ ç¾¢ç¾£ç¾¥ç¾¦ç¾¨\",6,\"ç¾±\"],[\"c180\",\"ç¾³\",4,\"羺羻羾翀翂翃翄翆翇翈翉翋ç¿ç¿\",4,\"ç¿–ç¿—ç¿™\",5,\"翢翣痢立粒沥隶力璃哩俩è”莲连镰廉怜涟帘敛脸链æ‹ç‚¼ç»ƒç²®å‡‰æ¢ç²±è‰¯ä¸¤è¾†é‡æ™¾äº®è°…æ’©èŠåƒšç–—燎寥辽潦了撂镣廖料列裂烈劣猎ç³æž—磷霖临邻鳞淋凛èµå拎玲è±é›¶é¾„铃伶羚凌çµé™µå²é¢†å¦ä»¤æºœç‰æ¦´ç¡«é¦ç•™åˆ˜ç˜¤æµæŸ³å…é¾™è‹å’™ç¬¼çª¿\"],[\"c240\",\"翤翧翨翪翫翬ç¿ç¿¯ç¿²ç¿´\",6,\"翽翾翿耂耇耈耉耊耎è€è€‘耓耚耛è€è€žè€Ÿè€¡è€£è€¤è€«\",5,\"耲耴耹耺耼耾è€èè„è…è‡èˆè‰èŽèèè‘è“è•è–è—\"],[\"c280\",\"è™è›\",13,\"è«\",5,\"è²\",11,\"隆垄拢陇楼娄æ‚篓æ¼é™‹èŠ¦å¢é¢…åºç‚‰æŽ³å¤è™é²éº“碌露路赂鹿潞禄录陆戮驴å•é“侣旅履屡缕虑氯律率滤绿峦挛åªæ»¦åµä¹±æŽ 略抡轮伦仑沦纶论è螺罗逻锣箩骡裸è½æ´›éª†ç»œå¦ˆéº»çŽ›ç 蚂马骂嘛å—埋买麦å–迈脉瞒馒蛮满蔓曼慢漫\"],[\"c340\",\"è¾è‚肂肅肈肊è‚\",5,\"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇\",4,\"èƒ\",6,\"èƒ˜èƒŸèƒ èƒ¢èƒ£èƒ¦èƒ®èƒµèƒ·èƒ¹èƒ»èƒ¾èƒ¿è„€è„脃脄脅脇脈脋\"],[\"c380\",\"脌脕脗脙脛脜è„è„Ÿ\",12,\"è„脮脰脳脴脵脷脹\",4,\"脿谩芒茫盲氓忙莽猫茅锚毛矛铆å¯èŒ‚冒帽貌贸么玫枚梅酶霉煤没眉媒é•æ¯ç¾Žæ˜§å¯å¦¹åªšé—¨é—·ä»¬èŒè’™æª¬ç›Ÿé”°çŒ›æ¢¦åŸçœ¯é†šé¡ç³œè¿·è°œå¼¥ç±³ç§˜è§…æ³Œèœœå¯†å¹‚æ£‰çœ ç»µå†•å…勉娩缅é¢è‹—æçž„è—秒渺庙妙蔑ç民抿皿æ•æ‚¯é—½æ˜ŽèžŸé¸£é“å命谬摸\"],[\"c440\",\"è…€\",5,\"腇腉è…è…Žè…腒腖腗腘腛\",4,\"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸è†è†ƒ\",4,\"膉膋膌è†è†Žè†è†’\",5,\"膙膚膞\",4,\"膤膥\"],[\"c480\",\"膧膩膫\",7,\"膴\",5,\"膼膽膾膿臄臅臇臈臉臋è‡\",6,\"摹蘑模膜磨摩é”æŠ¹æœ«èŽ«å¢¨é»˜æ²«æ¼ å¯žé™Œè°‹ç‰ŸæŸæ‹‡ç‰¡äº©å§†æ¯å¢“暮幕募慕木目ç¦ç‰§ç©†æ‹¿å“ªå‘é’ é‚£å¨œçº³æ°–ä¹ƒå¥¶è€å¥ˆå—ç”·éš¾å›ŠæŒ è„‘æ¼é—¹æ·–å‘¢é¦å†…å«©èƒ½å¦®éœ“å€ªæ³¥å°¼æ‹Ÿä½ åŒ¿è…»é€†æººè”«æ‹ˆå¹´ç¢¾æ’µæ»å¿µå¨˜é…¿é¸Ÿå°¿æè‚å½å•®é•Šé•æ¶…æ‚¨æŸ ç‹žå‡å®\"],[\"c540\",\"臔\",14,\"臤臥臦臨臩臫臮\",4,\"臵\",5,\"臽臿舃與\",4,\"舎èˆèˆ‘舓舕\",5,\"èˆèˆ 舤舥舦舧舩舮舲舺舼舽舿\"],[\"c580\",\"艀è‰è‰‚艃艅艆艈艊艌è‰è‰Žè‰\",7,\"艙艛艜è‰è‰žè‰ \",7,\"艩拧泞牛æ‰é’®çº½è„“浓农弄奴努怒女暖è™ç–ŸæŒªæ‡¦ç³¯è¯ºå“¦æ¬§é¸¥æ®´è—•å‘•å¶æ²¤å•ªè¶´çˆ¬å¸•æ€•ç¶æ‹æŽ’牌徘湃派攀潘盘ç£ç›¼ç•”判å›ä¹“庞æ—耪胖抛咆刨炮è¢è·‘泡呸胚培裴赔陪é…ä½©æ²›å–·ç›†ç °æŠ¨çƒ¹æ¾Žå½è“¬æ£šç¡¼ç¯·è†¨æœ‹é¹æ§ç¢°å¯ç ’霹批披劈çµæ¯—\"],[\"c640\",\"艪艫艬è‰è‰±è‰µè‰¶è‰·è‰¸è‰»è‰¼èŠ€èŠèŠƒèŠ…芆芇芉芌èŠèŠ“èŠ”èŠ•èŠ–èŠšèŠ›èŠžèŠ èŠ¢èŠ£èŠ§èŠ²èŠµèŠ¶èŠºèŠ»èŠ¼èŠ¿è‹€è‹‚è‹ƒè‹…è‹†è‹‰è‹è‹–苙苚è‹è‹¢è‹§è‹¨è‹©è‹ªè‹¬è‹è‹®è‹°è‹²è‹³è‹µè‹¶è‹¸\"],[\"c680\",\"苺苼\",4,\"茊茋èŒèŒèŒ’茓茖茘茙èŒ\",9,\"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻å±è¬ç¯‡å片骗飘漂瓢票撇瞥拼频贫å“è˜ä¹’åªè‹¹èå¹³å‡ç“¶è¯„å±å¡æ³¼é¢‡å©†ç ´é„迫粕剖扑铺仆莆葡è©è’²åŸ”朴圃普浦谱æ›ç€‘æœŸæ¬ºæ –æˆšå¦»ä¸ƒå‡„æ¼†æŸ’æ²å…¶æ£‹å¥‡æ§ç•¦å´Žè„é½æ——祈ç¥éª‘起岂乞ä¼å¯å¥‘ç Œå™¨æ°”è¿„å¼ƒæ±½æ³£è®«æŽ\"],[\"c740\",\"茾茿èè‚è„è…èˆèŠ\",4,\"è“è•\",4,\"èè¢è°\",6,\"è¹èºè¾\",6,\"莇莈莊莋莌èŽèŽèŽèŽ‘莔莕莖莗莙莚èŽèŽŸèŽ¡\",6,\"莬èŽèŽ®\"],[\"c780\",\"莯莵莻莾莿è‚èƒè„è†èˆè‰è‹èèŽèè‘è’è“è•è—è™èšè›èžè¢è£è¤è¦è§è¨è«è¬èæ°æ´½ç‰µæ‰¦é’Žé“…åƒè¿ç¾ä»Ÿè°¦ä¹¾é»”钱钳å‰æ½œé£æµ…è°´å ‘åµŒæ¬ æ‰æžªå‘›è…”羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘å³ä¿çªåˆ‡èŒ„且怯窃钦侵亲秦ç´å‹¤èŠ¹æ“’禽å¯æ²é’轻氢倾å¿æ¸…擎晴氰情顷请庆ç¼ç©·ç§‹ä¸˜é‚±çƒæ±‚å›šé…‹æ³…è¶‹åŒºè›†æ›²èº¯å±ˆé©±æ¸ \"],[\"c840\",\"è®è¯è³\",4,\"èºè»è¼è¾è¿è€è‚è…è‡èˆè‰èŠèè’\",5,\"è™èšè›èž\",5,\"è©\",7,\"è²\",5,\"è¹èºè»è¾\",7,\"葇葈葉\"],[\"c880\",\"è‘Š\",6,\"è‘’\",4,\"葘è‘è‘žè‘Ÿè‘ è‘¢è‘¤\",4,\"葪葮葯葰葲葴葷葹葻葼å–娶龋趣去圈颧æƒé†›æ³‰å…¨ç—Šæ‹³çŠ¬åˆ¸åŠç¼ºç‚”瘸å´é¹Šæ¦·ç¡®é›€è£™ç¾¤ç„¶ç‡ƒå†‰æŸ“瓤壤攘嚷让饶扰绕惹çƒå£¬ä»äººå¿éŸ§ä»»è®¤åˆƒå¦Šçº«æ‰”ä»æ—¥æˆŽèŒ¸è“‰è£èžç†”溶容绒冗æ‰æŸ”è‚‰èŒ¹è •å„’åºå¦‚辱乳æ±å…¥è¤¥è½¯é˜®è•Šç‘žé”闰润若弱撒洒è¨è…®é³ƒå¡žèµ›ä¸‰å\"],[\"c940\",\"葽\",4,\"蒃蒄蒅蒆蒊è’è’\",7,\"蒘蒚蒛è’è’žè’Ÿè’ è’¢\",12,\"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎è“蓒蓔蓕蓗\"],[\"c980\",\"蓘\",4,\"蓞蓡蓢蓤蓧\",4,\"è“蓮蓯蓱\",10,\"蓽蓾蔀è”蔂伞散桑嗓丧æ”éªšæ‰«å«‚ç‘Ÿè‰²æ¶©æ£®åƒ§èŽŽç ‚æ€åˆ¹æ²™çº±å‚»å•¥ç…žç›æ™’çŠè‹«æ‰å±±åˆ 煽衫闪陕擅赡膳善汕扇缮墒伤商èµæ™Œä¸Šå°šè£³æ¢¢æŽç¨çƒ§èŠå‹ºéŸ¶å°‘哨邵ç»å¥¢èµŠè›‡èˆŒèˆèµ¦æ‘„å°„æ…‘æ¶‰ç¤¾è®¾ç ·ç”³å‘»ä¼¸èº«æ·±å¨ ç»…ç¥žæ²ˆå®¡å©¶ç”šè‚¾æ…Žæ¸—å£°ç”Ÿç”¥ç‰²å‡ç»³\"],[\"ca40\",\"蔃\",8,\"è”蔎è”è”蔒蔔蔕蔖蔘蔙蔛蔜è”è”žè” è”¢\",8,\"è”\",9,\"蔾\",4,\"蕄蕅蕆蕇蕋\",10],[\"ca80\",\"蕗蕘蕚蕛蕜è•è•Ÿ\",4,\"蕥蕦蕧蕩\",8,\"蕳蕵蕶蕷蕸蕼蕽蕿薀è–çœç››å‰©èƒœåœ£å¸ˆå¤±ç‹®æ–½æ¹¿è¯—尸虱å石拾时什食蚀实识å²çŸ¢ä½¿å±Žé©¶å§‹å¼ç¤ºå£«ä¸–柿事æ‹èª“é€åŠ¿æ˜¯å—œå™¬é€‚仕ä¾é‡Šé¥°æ°å¸‚æƒå®¤è§†è¯•æ”¶æ‰‹é¦–守寿授售å—瘦兽蔬枢梳殊抒输å”舒淑ç–书赎å°ç†Ÿè–¯æš‘曙署蜀é»é¼ å±žæœ¯è¿°æ ‘æŸæˆç«–墅庶数漱\"],[\"cb40\",\"薂薃薆薈\",6,\"è–\",10,\"è–\",6,\"薥薦薧薩薫薬è–è–±\",5,\"薸薺\",6,\"è—‚\",6,\"è—Š\",4,\"è—‘è—’\"],[\"cb80\",\"藔藖\",5,\"è—\",6,\"藥藦藧藨藪\",14,\"æ•åˆ·è€æ‘”è¡°ç”©å¸…æ “æ‹´éœœåŒçˆ½è°æ°´ç¡ç¨Žå®çž¬é¡ºèˆœè¯´ç¡•æœ”çƒæ–¯æ’•å˜¶æ€ç§å¸ä¸æ»è‚†å¯ºå—£å››ä¼ºä¼¼é¥²å·³æ¾è€¸æ€‚颂é€å®‹è®¼è¯µæœè‰˜æ“žå—½è‹é…¥ä¿—ç´ é€Ÿç²Ÿåƒ³å¡‘æº¯å®¿è¯‰è‚ƒé…¸è’œç®—è™½éš‹éšç»¥é«“碎å²ç©—é‚隧祟å™æŸç¬‹è“‘æ¢å”†ç¼©çç´¢é”所塌他它她塔\"],[\"cc40\",\"藹藺藼藽藾蘀\",4,\"蘆\",10,\"蘒蘓蘔蘕蘗\",15,\"蘨蘪\",13,\"蘹蘺蘻蘽蘾蘿虀\"],[\"cc80\",\"è™\",11,\"虒虓處\",4,\"虛虜è™è™Ÿè™ 虡虣\",7,\"ç挞蹋è¸èƒŽè‹”抬å°æ³°é…žå¤ªæ€æ±°å摊贪瘫滩å›æª€ç—°æ½è°è°ˆå¦æ¯¯è¢’碳探å¹ç‚汤塘æªå ‚æ£ è†›å”糖倘躺淌趟烫æŽæ¶›æ»”绦è„桃逃淘陶讨套特藤腾疼誊梯剔踢锑æ题蹄啼体替åšæƒ•æ¶•å‰ƒå±‰å¤©æ·»å¡«ç”°ç”œæ¬èˆ”腆挑æ¡è¿¢çœºè·³è´´é“帖厅å¬çƒƒ\"],[\"cd40\",\"è™è™¯è™°è™²\",6,\"蚃\",6,\"蚎\",4,\"蚔蚖\",5,\"èšž\",4,\"蚥蚦蚫èšèš®èš²èš³èš·èš¸èš¹èš»\",4,\"è›è›‚蛃蛅蛈蛌è›è›’蛓蛕蛖蛗蛚蛜\"],[\"cd80\",\"è›è› 蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿èœèœ„蜅蜆蜋蜌蜎èœèœèœ‘蜔蜖汀廷åœäºåºæŒºè‰‡é€šæ¡é…®çž³åŒé“œå½¤ç«¥æ¡¶æ…ç’统痛å·æŠ•å¤´é€å‡¸ç§ƒçªå›¾å¾’é€”æ¶‚å± åœŸåå…”æ¹å›¢æŽ¨é¢“腿蜕褪退åžå±¯è‡€æ‹–托脱鸵陀驮驼æ¤å¦¥æ‹“唾挖哇蛙洼娃瓦袜æªå¤–豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄å¨\"],[\"ce40\",\"蜙蜛èœèœŸèœ 蜤蜦蜧蜨蜪蜫蜬èœèœ¯èœ°èœ²èœ³èœµèœ¶èœ¸èœ¹èœºèœ¼èœ½è€\",6,\"èŠè‹èèèè‘è’è”è•è–è˜èš\",5,\"è¡è¢è¦\",7,\"è¯è±è²è³èµ\"],[\"ce80\",\"è·è¸è¹èºè¿èž€èžèž„螆螇螉螊螌螎\",4,\"螔螕螖螘\",6,\"èž \",4,\"å·å¾®å±éŸ¦è¿æ¡…围唯惟为æ½ç»´è‹‡èŽå§”伟伪尾纬未蔚味ç•èƒƒå–‚éä½æ¸è°“尉慰å«ç˜Ÿæ¸©èšŠæ–‡é—»çº¹å»ç¨³ç´Šé—®å—¡ç¿ç“®æŒèœ—涡çªæˆ‘æ–¡å§æ¡æ²ƒå·«å‘œé’¨ä¹Œæ±¡è¯¬å±‹æ— 芜梧å¾å´æ¯‹æ¦äº”æ‚åˆèˆžä¼ä¾®åžæˆŠé›¾æ™¤ç‰©å‹¿åŠ¡æ‚Ÿè¯¯æ˜”熙æžè¥¿ç¡’矽晰嘻å¸é”¡ç‰º\"],[\"cf40\",\"螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿èŸ\",4,\"蟇蟈蟉蟌\",4,\"蟔\",6,\"蟜èŸèŸžèŸŸèŸ¡èŸ¢èŸ£èŸ¤èŸ¦èŸ§èŸ¨èŸ©èŸ«èŸ¬èŸèŸ¯\",9],[\"cf80\",\"èŸºèŸ»èŸ¼èŸ½èŸ¿è €è è ‚è „\",5,\"è ‹\",7,\"è ”è —è ˜è ™è šè œ\",4,\"è £ç¨€æ¯å¸Œæ‚‰è†å¤•æƒœç†„烯溪æ±çŠ€æª„è¢å¸ä¹ 媳喜铣洗系隙æˆç»†çžŽè™¾åŒ£éœžè¾–æš‡å³¡ä¾ ç‹ä¸‹åŽ¦å¤å“掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷é™çº¿ç›¸åŽ¢é•¶é¦™ç®±è¥„湘乡翔祥详想å“享项巷橡åƒå‘象è§ç¡éœ„削哮嚣销消宵淆晓\"],[\"d040\",\"è ¤\",13,\"è ³\",5,\"è ºè »è ½è ¾è ¿è¡è¡‚衃衆\",5,\"è¡Ž\",5,\"衕衖衘衚\",6,\"衦衧衪è¡è¡¯è¡±è¡³è¡´è¡µè¡¶è¡¸è¡¹è¡º\"],[\"d080\",\"衻衼袀袃袆袇袉袊袌袎è¢è¢è¢‘袓袔袕袗\",4,\"è¢\",4,\"袣袥\",5,\"å°åæ ¡è‚–å•¸ç¬‘æ•ˆæ¥”äº›æ‡èŽéž‹å挟æºé‚ªæ–œèƒè°å†™æ¢°å¸èŸ¹æ‡ˆæ³„泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸æ性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须å¾è®¸è“„é…—å™æ—åºç•œæ¤çµ®å©¿ç»ªç»è½©å–§å®£æ‚¬æ—‹çŽ„\"],[\"d140\",\"袬袮袯袰袲\",4,\"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌è£è£è£è£‘裓裖裗裚\",4,\"è£ è£¡è£¦è£§è£©\",6,\"裲裵裶裷裺裻製裿褀è¤è¤ƒ\",5],[\"d180\",\"褉褋\",4,\"褑褔\",4,\"褜\",4,\"褢褣褤褦褧褨褩褬è¤è¤®è¤¯è¤±è¤²è¤³è¤µè¤·é€‰ç™£çœ©ç»šé´è–›å¦ç©´é›ªè¡€å‹‹ç†å¾ªæ—¬è¯¢å¯»é©¯å·¡æ®‰æ±›è®è®¯é€Šè¿…压押鸦é¸å‘€ä¸«èŠ½ç‰™èšœå´–衙涯雅哑亚讶焉咽阉烟淹ç›ä¸¥ç ”蜒岩延言颜阎炎沿奄掩眼è¡æ¼”è‰³å °ç‡•åŽŒç šé›å”彦焰宴谚验殃央鸯秧æ¨æ‰¬ä½¯ç–¡ç¾Šæ´‹é˜³æ°§ä»°ç—’å…»æ ·æ¼¾é‚€è…°å¦–ç‘¶\"],[\"d240\",\"褸\",8,\"襂襃襅\",24,\"è¥ \",5,\"襧\",19,\"襼\"],[\"d280\",\"襽襾覀覂覄覅覇\",26,\"摇尧é¥çª‘谣姚咬舀è¯è¦è€€æ¤°å™Žè€¶çˆ·é‡Žå†¶ä¹Ÿé¡µæŽ–业å¶æ›³è…‹å¤œæ¶²ä¸€å£¹åŒ»æ–铱ä¾ä¼Šè¡£é¢å¤·é—移仪胰疑沂宜姨å½æ¤…èšå€šå·²ä¹™çŸ£ä»¥è‰ºæŠ‘易邑屹亿役臆逸肄疫亦裔æ„毅忆义益溢诣议谊译异翼翌绎茵è«å› 殷音阴姻åŸé“¶æ·«å¯…饮尹引éš\"],[\"d340\",\"覢\",30,\"觃è§è§“觔觕觗觘觙觛è§è§Ÿè§ 觡觢觤觧觨觩觪觬è§è§®è§°è§±è§²è§´\",6],[\"d380\",\"觻\",4,\"è¨\",5,\"計\",21,\"å°è‹±æ¨±å©´é¹°åº”缨莹è¤è¥è§è‡è¿Žèµ¢ç›ˆå½±é¢–ç¡¬æ˜ å“Ÿæ‹¥ä½£è‡ƒç—ˆåº¸é›è¸Šè›¹å’泳涌永æ¿å‹‡ç”¨å¹½ä¼˜æ‚ 忧尤由邮铀犹油游酉有å‹å³ä½‘釉诱åˆå¹¼è¿‚淤于盂榆虞愚舆余俞逾鱼愉æ¸æ¸”隅予娱雨与屿禹宇è¯ç¾½çŽ‰åŸŸèŠ‹éƒåé‡å–»å³ªå¾¡æ„ˆæ¬²ç‹±è‚²èª‰\"],[\"d440\",\"訞\",31,\"訿\",8,\"詉\",21],[\"d480\",\"è©Ÿ\",25,\"詺\",6,\"浴寓裕预豫é©é¸³æ¸Šå†¤å…ƒåž£è¢åŽŸæ´è¾•å›å‘˜åœ†çŒ¿æºç¼˜è¿œè‹‘愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨å…è¿è•´é…晕韵å•åŒç ¸æ‚æ ½å“‰ç¾å®°è½½å†åœ¨å’±æ”’暂赞赃è„葬é糟凿藻枣早澡蚤èºå™ªé€ çš‚ç¶ç‡¥è´£æ‹©åˆ™æ³½è´¼æ€Žå¢žæ†Žæ›¾èµ 扎喳渣æœè½§\"],[\"d540\",\"èª\",7,\"誋\",7,\"誔\",46],[\"d580\",\"諃\",32,\"é“¡é—¸çœ¨æ …æ¦¨å’‹ä¹ç‚¸è¯ˆæ‘˜æ–‹å®…窄债寨瞻毡詹粘沾ç›æ–©è¾—å´å±•è˜¸æ ˆå æˆ˜ç«™æ¹›ç»½æ¨Ÿç« å½°æ¼³å¼ æŽŒæ¶¨æ–丈å¸è´¦ä»—胀瘴障招æ˜æ‰¾æ²¼èµµç…§ç½©å…†è‚‡å¬é®æŠ˜å“²è›°è¾™è€…锗蔗这浙çæ–ŸçœŸç”„ç §è‡»è´žé’ˆä¾¦æž•ç–¹è¯Šéœ‡æŒ¯é•‡é˜µè’¸æŒ£çå¾ç‹°äº‰æ€”整拯æ£æ”¿\"],[\"d640\",\"諤\",34,\"謈\",27],[\"d680\",\"謤謥謧\",30,\"帧症郑è¯èŠæžæ”¯å±èœ˜çŸ¥è‚¢è„‚æ±ä¹‹ç»‡èŒç›´æ¤æ®–执值侄å€æŒ‡æ¢è¶¾åªæ—¨çº¸å¿—挚掷至致置帜峙制智秩稚质炙痔滞治窒ä¸ç›…å¿ é’Ÿè¡·ç»ˆç§è‚¿é‡ä»²ä¼—舟周州洲诌粥轴肘帚咒皱宙昼骤ç æ ªè››æœ±çŒªè¯¸è¯›é€ç«¹çƒ›ç…®æ‹„瞩嘱主著柱助蛀贮铸ç‘\"],[\"d740\",\"è†\",31,\"è§\",4,\"è\",25],[\"d780\",\"讇\",24,\"讬讱讻诇è¯è¯ªè°‰è°žä½æ³¨ç¥é©»æŠ“çˆªæ‹½ä¸“ç –è½¬æ’°èµšç¯†æ¡©åº„è£…å¦†æ’žå£®çŠ¶æ¤Žé”¥è¿½èµ˜å 缀谆准æ‰æ‹™å“æ¡Œç¢èŒé…Œå•„ç€ç¼æµŠå…¹å’¨èµ„姿滋淄åœç´«ä»”籽滓å自æ¸å—鬃棕踪宗综总纵邹走å¥æ租足å’æ—祖诅阻组钻纂嘴醉最罪尊éµæ˜¨å·¦ä½æŸžåšä½œå座\"],[\"d840\",\"è°¸\",8,\"豂豃豄豅豈豊豋è±\",7,\"豖豗豘豙豛\",5,\"è±£\",6,\"豬\",6,\"豴豵豶豷豻\",6,\"貃貄貆貇\"],[\"d880\",\"貈貋è²\",6,\"貕貖貗貙\",20,\"äºä¸Œå…€ä¸å»¿å…丕亘丞鬲å¬å™©ä¸¨ç¦ºä¸¿åŒ•ä¹‡å¤çˆ»å®æ°å›Ÿèƒ¤é¦—毓ç¾é¼—丶亟é¼ä¹œä¹©äº“芈å›å•¬å˜ä»„åŽåŽåŽ£åŽ¥åŽ®é¥èµåŒšåµåŒ¦åŒ®åŒ¾èµœå¦å£åˆ‚刈刎åˆåˆ³åˆ¿å‰€å‰Œå‰žå‰¡å‰œè’¯å‰½åŠ‚åŠåŠåŠ“冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚ä½\"],[\"d940\",\"è²®\",62],[\"d980\",\"è³\",32,\"佟佗伲伽佶佴侑侉侃ä¾ä½¾ä½»ä¾ªä½¼ä¾¬ä¾”俦俨俪俅俚俣俜俑俟俸倩åŒä¿³å€¬å€å€®å€ä¿¾å€œå€Œå€¥å€¨å¾åƒå•åˆåŽå¬å»å‚¥å‚§å‚©å‚ºåƒ–儆åƒåƒ¬åƒ¦åƒ®å„‡å„‹ä»æ°½ä½˜ä½¥ä¿Žé¾ 汆籴兮巽黉馘å†å¤”勹åŒè¨‡åŒå‡«å¤™å…•äº å…–äº³è¡®è¢¤äºµè„”è£’ç¦€å¬´è ƒç¾¸å†«å†±å†½å†¼\"],[\"da40\",\"è´Ž\",14,\"è´ èµ‘èµ’èµ—èµŸèµ¥èµ¨èµ©èµªèµ¬èµ®èµ¯èµ±èµ²èµ¸\",8,\"趂趃趆趇趈趉趌\",4,\"趒趓趕\",9,\"è¶ è¶¡\"],[\"da80\",\"趢趤\",12,\"趲趶趷趹趻趽跀è·è·‚跅跇跈跉跊è·è·è·’è·“è·”å‡‡å†–å†¢å†¥è® è®¦è®§è®ªè®´è®µè®·è¯‚è¯ƒè¯‹è¯è¯Žè¯’è¯“è¯”è¯–è¯˜è¯™è¯œè¯Ÿè¯ è¯¤è¯¨è¯©è¯®è¯°è¯³è¯¶è¯¹è¯¼è¯¿è°€è°‚è°„è°‡è°Œè°è°‘谒谔谕谖谙谛谘è°è°Ÿè° 谡谥谧谪谫谮谯谲谳谵谶å©åºé˜é˜¢é˜¡é˜±é˜ªé˜½é˜¼é™‚陉陔陟陧陬陲陴隈éšéš—éš°é‚—é‚›é‚邙邬邡邴邳邶邺\"],[\"db40\",\"è·•è·˜è·™è·œè· è·¡è·¢è·¥è·¦è·§è·©è·è·®è·°è·±è·²è·´è·¶è·¼è·¾\",6,\"踆踇踈踋è¸è¸Žè¸è¸‘踒踓踕\",7,\"è¸ è¸¡è¸¤\",4,\"踫è¸è¸°è¸²è¸³è¸´è¸¶è¸·è¸¸è¸»è¸¼è¸¾\"],[\"db80\",\"踿蹃蹅蹆蹌\",4,\"蹓\",5,\"蹚\",11,\"蹧蹨蹪蹫蹮蹱邸邰éƒéƒ…邾éƒéƒ„郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆åˆå¥‚劢劬åŠåŠ¾å“¿å‹å‹–å‹°åŸç‡®çŸå»´å‡µå‡¼é¬¯åŽ¶å¼ç•šå·¯åŒåž©åž¡å¡¾å¢¼å£…壑圩圬圪圳圹圮圯åœåœ»å‚å©åž…å«åž†å¼å»å¨åå¶å³åžåž¤åžŒåž²åŸåž§åž´åž“åž åŸ•åŸ˜åŸšåŸ™åŸ’åž¸åŸ´åŸ¯åŸ¸åŸ¤åŸ\"],[\"dc40\",\"蹳蹵蹷\",4,\"蹽蹾躀躂躃躄躆躈\",6,\"躑躒躓躕\",6,\"èºèºŸ\",11,\"èºèº®èº°èº±èº³\",6,\"躻\",7],[\"dc80\",\"軃\",10,\"è»\",21,\"å ‹å 埽åŸå €å žå ™å¡„å 塥塬å¢å¢‰å¢šå¢€é¦¨é¼™æ‡¿è‰¹è‰½è‰¿èŠèŠŠèŠ¨èŠ„芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌è‹èŠ©èŠ´èŠ¡èŠªèŠŸè‹„苎芤苡茉苷苤èŒèŒ‡è‹œè‹´è‹’è‹˜èŒŒè‹»è‹“èŒ‘èŒšèŒ†èŒ”èŒ•è‹ è‹•èŒœè‘è›èœèŒˆèŽ’茼茴茱莛èžèŒ¯èè‡èƒèŸè€èŒ—è èŒèŒºèŒ³è¦è¥\"],[\"dd40\",\"軥\",62],[\"dd80\",\"輤\",32,\"è¨èŒ›è©è¬èªèè®èŽ°è¸èŽ³èŽ´èŽ 莪莓莜莅è¼èŽ¶èŽ©è½èŽ¸è»èŽ˜èŽžèŽ¨èŽºèŽ¼èèè¥è˜å ‡è˜è‹èè½è–èœè¸è‘è†è”èŸèèƒè¸è¹èªè…è€è¦è°è¡è‘œè‘‘葚葙葳蒇蒈葺蒉葸è¼è‘†è‘©è‘¶è’Œè’Žè±è‘è“è“è“è“¦è’½è““è“Šè’¿è’ºè“ è’¡è’¹è’´è’—è“¥è“£è”Œç”蔸蓰蔹蔟蔺\"],[\"de40\",\"è½…\",32,\"轪辀辌辒è¾è¾ 辡辢辤辥辦辧辪辬è¾è¾®è¾¯è¾²è¾³è¾´è¾µè¾·è¾¸è¾ºè¾»è¾¼è¾¿è¿€è¿ƒè¿†\"],[\"de80\",\"迉\",4,\"è¿è¿’è¿–è¿—è¿šè¿ è¿¡è¿£è¿§è¿¬è¿¯è¿±è¿²è¿´è¿µè¿¶è¿ºè¿»è¿¼è¿¾è¿¿é€‡é€ˆé€Œé€Žé€“é€•é€˜è•–è”»è“¿è“¼è•™è•ˆè•¨è•¤è•žè•ºçž¢è•ƒè•²è•»è–¤è–¨è–‡è–蕹薮薜薅薹薷薰藓è—藜藿蘧蘅蘩蘖蘼廾弈夼å¥è€·å¥•å¥šå¥˜åŒå°¢å°¥å°¬å°´æ‰Œæ‰ªæŠŸæŠ»æ‹Šæ‹šæ‹—拮挢拶挹æ‹æƒæŽæ¶æ±æºæŽŽæŽ´æ掬掊æ©æŽ®æŽ¼æ²æ¸æ æ¿æ„æžæŽæ‘’æ†æŽ¾æ‘…æ‘æ‹æ›æ æŒæ¦æ¡æ‘žæ’„æ‘æ’–\"],[\"df40\",\"這逜連逤逥逧\",5,\"逰\",4,\"逷逹逺逽逿é€éƒé…é†éˆ\",4,\"éŽé”é•é–é™éšéœ\",5,\"é¤é¦é§é©éªé«é¬é¯\",4,\"é¶\",6,\"é¾é‚\"],[\"df80\",\"還邅邆邇邉邊邌\",4,\"é‚’é‚”é‚–é‚˜é‚šé‚œé‚žé‚Ÿé‚ é‚¤é‚¥é‚§é‚¨é‚©é‚«é‚邲邷邼邽邿郀摺撷撸撙撺擀æ“擗擤擢攉攥攮弋忒甙弑åŸå±å½å©å¨å»å’å–å†å‘‹å‘’呓呔呖呃å¡å‘—å‘™å£å²å’‚咔呷呱呤咚咛咄呶呦å’å“å’哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤å“å“å“žå”›å“§å” å“½å””å“³å”¢å”£å”唑唧唪啧å–喵啉å•å•å••å”¿å•å”¼\"],[\"e040\",\"郂郃郆郈郉郋郌éƒéƒ’éƒ”éƒ•éƒ–éƒ˜éƒ™éƒšéƒžéƒŸéƒ éƒ£éƒ¤éƒ¥éƒ©éƒªéƒ¬éƒ®éƒ°éƒ±éƒ²éƒ³éƒµéƒ¶éƒ·éƒ¹éƒºéƒ»éƒ¼éƒ¿é„€é„鄃鄅\",19,\"鄚鄛鄜\"],[\"e080\",\"é„é„Ÿé„ é„¡é„¤\",10,\"鄰鄲\",6,\"鄺\",8,\"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈å–喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦å—嗄嗯嗥嗲嗳嗌å—嗨嗵嗤辔嘞嘈嘌å˜å˜¤å˜£å—¾å˜€å˜§å˜å™˜å˜¹å™—嘬å™å™¢å™™å™œå™Œå™”嚆噤噱噫噻噼嚅嚓嚯囔囗å›å›¡å›µå›«å›¹å›¿åœ„圊圉圜å¸å¸™å¸”帑帱帻帼\"],[\"e140\",\"é……é…‡é…ˆé…‘é…“é…”é…•é…–é…˜é…™é…›é…œé…Ÿé… é…¦é…§é…¨é…«é…酳酺酻酼醀\",4,\"醆醈醊醎é†é†“\",6,\"醜\",5,\"醤\",5,\"醫醬醰醱醲醳醶醷醸醹醻\"],[\"e180\",\"醼\",10,\"釈釋é‡é‡’\",9,\"é‡\",8,\"帷幄幔幛幞幡岌屺å²å²å²–岈岘岙岑岚岜岵岢岽岬岫岱岣å³å²·å³„峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯åµåµ«åµ‹åµŠåµ©åµ´å¶‚嶙å¶è±³å¶·å·…彳彷徂徇徉後徕徙徜徨å¾å¾µå¾¼è¡¢å½¡çŠçŠ°çŠ´çŠ·çŠ¸ç‹ƒç‹ç‹Žç‹ç‹’狨狯狩狲狴狷çŒç‹³çŒƒç‹º\"],[\"e240\",\"釦\",62],[\"e280\",\"鈥\",32,\"狻猗猓猡猊猞çŒçŒ•çŒ¢çŒ¹çŒ¥çŒ¬çŒ¸çŒ±ççç—ç ç¬ç¯ç¾èˆ›å¤¥é£§å¤¤å¤‚饣饧\",5,\"饴饷饽馀馄馇馊é¦é¦é¦‘é¦“é¦”é¦•åº€åº‘åº‹åº–åº¥åº åº¹åºµåº¾åº³èµ“å»’å»‘å»›å»¨å»ªè†ºå¿„å¿‰å¿–å¿æ€ƒå¿®æ€„忡忤忾怅怆忪å¿å¿¸æ€™æ€µæ€¦æ€›æ€æ€æ€©æ€«æ€Šæ€¿æ€¡æ¸æ¹æ»æºæ‚\"],[\"e340\",\"鉆\",45,\"鉵\",16],[\"e380\",\"銆\",7,\"éŠ\",24,\"æªæ½æ‚–æ‚šæ‚æ‚悃悒悌悛惬悻悱æƒæƒ˜æƒ†æƒšæ‚´æ„ 愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵å¿éš³é—©é—«é—±é—³é—µé—¶é—¼é—¾é˜ƒé˜„阆阈阊阋阌é˜é˜é˜’阕阖阗阙阚丬爿戕氵汔汜汊沣沅æ²æ²”沌汨汩汴汶沆沩æ³æ³”æ²æ³·æ³¸æ³±æ³—æ²²æ³ æ³–æ³ºæ³«æ³®æ²±æ³“æ³¯æ³¾\"],[\"e440\",\"銨\",5,\"銯\",24,\"鋉\",31],[\"e480\",\"é‹©\",32,\"洹洧洌浃浈洇洄洙洎洫æµæ´®æ´µæ´šæµæµ’æµ”æ´³æ¶‘æµ¯æ¶žæ¶ æµžæ¶“æ¶”æµœæµ æµ¼æµ£æ¸šæ·‡æ·…æ·žæ¸Žæ¶¿æ· æ¸‘æ·¦æ·æ·™æ¸–æ¶«æ¸Œæ¶®æ¸«æ¹®æ¹Žæ¹«æº²æ¹Ÿæº†æ¹“æ¹”æ¸²æ¸¥æ¹„æ»Ÿæº±æº˜æ» æ¼æ»¢æº¥æº§æº½æº»æº·æ»—溴æ»æºæ»‚溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉æ¾æ¾Œæ½¸æ½²æ½¼æ½ºæ¿‘\"],[\"e540\",\"錊\",51,\"錿\",10],[\"e580\",\"éŠ\",31,\"é«æ¿‰æ¾§æ¾¹æ¾¶æ¿‚æ¿¡æ¿®æ¿žæ¿ æ¿¯ç€šç€£ç€›ç€¹ç€µççžå®€å®„宕宓宥宸甯骞æ´å¯¤å¯®è¤°å¯°è¹‡è¬‡è¾¶è¿“迕迥迮迤迩迦迳迨逅逄逋逦逑é€é€–逡逵逶é€é€¯é„é‘é’éé¨é˜é¢é›æš¹é´é½é‚‚邈邃邋å½å½—彖彘尻咫å±å±™å±å±£å±¦ç¾¼å¼ªå¼©å¼è‰´å¼¼é¬»å±®å¦å¦ƒå¦å¦©å¦ªå¦£\"],[\"e640\",\"é¬\",34,\"éŽ\",27],[\"e680\",\"鎬\",29,\"é‹éŒé妗姊妫妞妤姒妲妯姗妾娅娆å§å¨ˆå§£å§˜å§¹å¨Œå¨‰å¨²å¨´å¨‘å¨£å¨“å©€å©§å©Šå©•å¨¼å©¢å©µèƒ¬åªªåª›å©·å©ºåª¾å««åª²å«’å«”åª¸å« å«£å«±å«–å«¦å«˜å«œå¬‰å¬—å¬–å¬²å¬·å€å°•å°œåšå¥å³å‘å“å¢é©µé©·é©¸é©ºé©¿é©½éª€éªéª…骈骊éªéª’骓骖骘骛骜éªéªŸéª 骢骣骥骧纟纡纣纥纨纩\"],[\"e740\",\"éŽ\",7,\"é—\",54],[\"e780\",\"éŽ\",32,\"çºçº°çº¾ç»€ç»ç»‚绉绋绌ç»ç»”ç»—ç»›ç» ç»¡ç»¨ç»«ç»®ç»¯ç»±ç»²ç¼ç»¶ç»ºç»»ç»¾ç¼ç¼‚缃缇缈缋缌ç¼ç¼‘缒缗缙缜缛缟缡\",6,\"缪缫缬ç¼ç¼¯\",4,\"缵幺畿巛甾邕玎玑玮玢玟çç‚ç‘玷玳ç€ç‰çˆç¥ç™é¡¼çŠç©ç§çžçŽºç²ççªç‘›ç¦ç¥ç¨ç°ç®ç¬\"],[\"e840\",\"é¯\",14,\"é¿\",43,\"鑬é‘鑮鑯\"],[\"e880\",\"é‘°\",20,\"钑钖钘铇é“é““é“”é“šé“¦é“»é”œé” ç›çšç‘瑜瑗瑕瑙瑷ç‘瑾璜璎璀ç’璇璋璞璨璩ç’璧瓒璺韪韫韬æŒæ“æžæˆæ©æž¥æž‡æªæ³æž˜æž§æµæž¨æžžæžæž‹æ·æ¼æŸ°æ ‰æŸ˜æ ŠæŸ©æž°æ ŒæŸ™æžµæŸšæž³æŸæ €æŸƒæž¸æŸ¢æ ŽæŸæŸ½æ ²æ ³æ¡ 桡桎桢桄桤梃æ 桕桦æ¡æ¡§æ¡€æ ¾æ¡Šæ¡‰æ ©æ¢µæ¢æ¡´æ¡·æ¢“æ¡«æ£‚æ¥®æ£¼æ¤Ÿæ¤ æ£¹\"],[\"e940\",\"é”§é”³é”½é•ƒé•ˆé•‹é••é•šé• é•®é•´é•µé•·\",7,\"é–€\",42],[\"e980\",\"é–«\",32,\"椤棰椋æ¤æ¥—棣æ¤æ¥±æ¤¹æ¥ 楂æ¥æ¦„楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫æ¦æ§”榱æ§æ§Šæ§Ÿæ¦•æ§ æ¦æ§¿æ¨¯æ§æ¨—æ¨˜æ©¥æ§²æ©„æ¨¾æª æ©æ©›æ¨µæªŽæ©¹æ¨½æ¨¨æ©˜æ©¼æª‘æªæª©æª—檫猷ç’æ®æ®‚殇殄殒殓æ®æ®šæ®›æ®¡æ®ªè½«è½è½±è½²è½³è½µè½¶è½¸è½·è½¹è½ºè½¼è½¾è¾è¾‚辄辇辋\"],[\"ea40\",\"é—Œ\",27,\"é—¬é—¿é˜‡é˜“é˜˜é˜›é˜žé˜ é˜£\",6,\"阫阬é˜é˜¯é˜°é˜·é˜¸é˜¹é˜ºé˜¾é™é™ƒé™Šé™Žé™é™‘陒陓陖陗\"],[\"ea80\",\"陘陙陚陜é™é™žé™ 陣陥陦陫é™\",4,\"陳陸\",12,\"隇隉隊è¾è¾Žè¾è¾˜è¾šè»Žæˆ‹æˆ—戛戟戢戡戥戤戬臧瓯瓴瓿ç”甑甓攴旮旯旰昊昙æ²æ˜ƒæ˜•æ˜€ç‚…æ›·æ˜æ˜´æ˜±æ˜¶æ˜µè€†æ™Ÿæ™”æ™æ™æ™–晡晗晷暄暌暧æšæš¾æ››æ›œæ›¦æ›©è´²è´³è´¶è´»è´½èµ€èµ…赆赈赉赇èµèµ•èµ™è§‡è§Šè§‹è§Œè§Žè§è§è§‘牮犟ç‰ç‰¦ç‰¯ç‰¾ç‰¿çŠ„犋çŠçŠçŠ’挈挲掰\"],[\"eb40\",\"隌階隑隒隓隕隖隚際éš\",9,\"隨\",7,\"隱隲隴隵隷隸隺隻隿雂雃雈雊雋é›é›‘雓雔雖\",9,\"雡\",6,\"雫\"],[\"eb80\",\"雬é›é›®é›°é›±é›²é›´é›µé›¸é›ºé›»é›¼é›½é›¿éœ‚霃霅霊霋霌éœéœ‘霒霔霕霗\",4,\"éœéœŸéœ æ¿æ“˜è€„毪毳毽毵毹氅氇氆æ°æ°•æ°˜æ°™æ°šæ°¡æ°©æ°¤æ°ªæ°²æ”µæ••æ•«ç‰ç‰’牖爰虢刖肟肜肓肼朊肽肱肫è‚肴肷胧胨胩胪胛胂胄胙èƒèƒ—æœèƒèƒ«èƒ±èƒ´èƒè„è„Žèƒ²èƒ¼æœ•è„’è±šè„¶è„žè„¬è„˜è„²è…ˆè…Œè…“è…´è…™è…šè…±è… è…©è…¼è…½è…è…§å¡åªµè†ˆè†‚膑滕膣膪臌朦臊膻\"],[\"ec40\",\"霡\",8,\"霫霬霮霯霱霳\",4,\"霺霻霼霽霿\",18,\"é”é•é—é˜éšéœééŸé£é¤é¦é§é¨éª\",7],[\"ec80\",\"é²éµé·\",4,\"é½\",7,\"鞆\",4,\"鞌鞎éžéžéž“éž•éž–éž—éž™\",4,\"è‡è†¦æ¬¤æ¬·æ¬¹æƒæ†æ™é£‘飒飓飕飙飚殳彀毂觳æ–齑斓於旆旄旃旌旎旒旖炀炜炖ç‚炻烀炷炫炱烨烊ç„ç„“ç„–ç„¯ç„±ç…³ç…œç…¨ç……ç…²ç…Šç…¸ç…ºç†˜ç†³ç†µç†¨ç† ç‡ ç‡”ç‡§ç‡¹çˆçˆ¨ç¬ç„˜ç…¦ç†¹æˆ¾æˆ½æ‰ƒæ‰ˆæ‰‰ç¤»ç¥€ç¥†ç¥‰ç¥›ç¥œç¥“ç¥šç¥¢ç¥—ç¥ ç¥¯ç¥§ç¥ºç¦…ç¦Šç¦šç¦§ç¦³å¿‘å¿\"],[\"ed40\",\"鞞鞟鞡鞢鞤\",6,\"鞬鞮鞰鞱鞳鞵\",46],[\"ed80\",\"韤韥韨韮\",4,\"韴韷\",23,\"怼ææšæ§ææ™æ£æ‚«æ„†æ„æ…憩æ†æ‡‹æ‡‘戆肀è¿æ²“æ³¶æ·¼çŸ¶çŸ¸ç €ç ‰ç —ç ˜ç ‘æ–«ç ç œç ç ¹ç ºç »ç Ÿç ¼ç ¥ç ¬ç £ç ©ç¡Žç¡ç¡–ç¡—ç ¦ç¡ç¡‡ç¡Œç¡ªç¢›ç¢“碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄çœç›¹çœ‡çœˆçœšçœ¢çœ™çœçœ¦çœµçœ¸çç‘ç‡çƒçšç¨\"],[\"ee40\",\"é \",62],[\"ee80\",\"é¡Ž\",32,\"ç¢ç¥ç¿çžç½çž€çžŒçž‘çžŸçž çž°çžµçž½ç”ºç•€ç•Žç•‹ç•ˆç•›ç•²ç•¹ç–ƒç½˜ç½¡ç½Ÿè©ˆç½¨ç½´ç½±ç½¹ç¾ç½¾ç›ç›¥è ²é’…钆钇钋钊钌é’é’é’钔钗钕钚钛钜钣钤钫钪é’钬钯钰钲钴钶\",4,\"钼钽钿铄铈\",6,\"é“é“‘é“’é“•é“–é“—é“™é“˜é“›é“žé“Ÿé“ é“¢é“¤é“¥é“§é“¨é“ª\"],[\"ef40\",\"顯\",5,\"颋颎颒颕颙颣風\",37,\"é£é£é£”飖飗飛飜é£é£ \",4],[\"ef80\",\"飥飦飩\",30,\"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊é”锎é”é”’\",4,\"锘锛é”锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎é•é•’镓镔镖镗镘镙镛镞镟é•é•¡é•¢é•¤\",8,\"镯镱镲镳锺矧矬雉秕ç§ç§£ç§«ç¨†åµ‡ç¨ƒç¨‚稞稔\"],[\"f040\",\"餈\",4,\"餎é¤é¤‘\",28,\"餯\",26],[\"f080\",\"饊\",9,\"饖\",12,\"饤饦饳饸饹饻饾馂馃馉稹稷穑é»é¦¥ç©°çšˆçšŽçš“çš™çš¤ç“žç“ ç”¬é¸ é¸¢é¸¨\",4,\"鸲鸱鸶鸸鸷鸹鸺鸾é¹é¹‚鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦\",6,\"é¹±é¹é¹³ç–’ç–”ç––ç– ç–疬疣疳疴疸痄疱疰痃痂痖ç—痣痨痦痤痫痧瘃痱痼痿ç˜ç˜€ç˜…瘌瘗瘊瘥瘘瘕瘙\"],[\"f140\",\"馌馎馚\",10,\"馦馧馩\",47],[\"f180\",\"駙\",32,\"ç˜›ç˜¼ç˜¢ç˜ ç™€ç˜ç˜°ç˜¿ç˜µç™ƒç˜¾ç˜³ç™ç™žç™”ç™œç™–ç™«ç™¯ç¿Šç«¦ç©¸ç©¹çª€çª†çªˆçª•çª¦çª çª¬çª¨çªçª³è¡¤è¡©è¡²è¡½è¡¿è¢‚袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶è¥è¥¦è¥»ç–‹èƒ¥çš²çš´çŸœè€’è€”è€–è€œè€ è€¢è€¥è€¦è€§è€©è€¨è€±è€‹è€µèƒè†èè’è©è±è¦ƒé¡¸é¢€é¢ƒ\"],[\"f240\",\"駺\",62],[\"f280\",\"騹\",32,\"颉颌é¢é¢é¢”颚颛颞颟颡颢颥颦è™è™”虬虮虿虺虼虻蚨èšèš‹èš¬èšèš§èš£èšªèš“蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉è›èš´è›©è›±è›²è›è›³è›èœ“蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊èœèœ‰èœ£èœ»èœžèœ¥èœ®èœšèœ¾èˆèœ´èœ±èœ©èœ·èœ¿èž‚蜢è½è¾è»è è°èŒè®èž‹è“è£è¼è¤è™è¥èž“螯螨蟒\"],[\"f340\",\"é©š\",17,\"驲骃骉éªéªŽéª”骕骙骦骩\",6,\"骲骳骴骵骹骻骽骾骿髃髄髆\",4,\"é«é«Žé«é«é«’體髕髖髗髙髚髛髜\"],[\"f380\",\"é«é«žé« 髢髣髤髥髧髨髩髪髬髮髰\",8,\"髺髼\",6,\"鬄鬅鬆蟆螈螅èžèž—èžƒèž«èŸ¥èž¬èžµèž³èŸ‹èŸ“èž½èŸ‘èŸ€èŸŠèŸ›èŸªèŸ èŸ®è –è “èŸ¾è Šè ›è ¡è ¹è ¼ç¼¶ç½‚ç½„ç½…èˆç«ºç«½ç¬ˆç¬ƒç¬„笕笊笫ç¬ç‡ç¬¸ç¬ªç¬™ç¬®ç¬±ç¬ 笥笤笳笾笞ç˜çšç…çµçŒçç ç®ç»ç¢ç²ç±ç®ç®¦ç®§ç®¸ç®¬ç®ç®¨ç®…箪箜箢箫箴篑ç¯ç¯Œç¯ç¯šç¯¥ç¯¦ç¯ªç°Œç¯¾ç¯¼ç°ç°–ç°‹\"],[\"f440\",\"鬇鬉\",5,\"é¬é¬‘鬒鬔\",10,\"é¬ é¬¡é¬¢é¬¤\",10,\"鬰鬱鬳\",7,\"鬽鬾鬿é€é†éŠé‹éŒéŽéé’é“é•\",5],[\"f480\",\"é›\",32,\"簟簪簦簸ç±ç±€è‡¾èˆèˆ‚舄臬衄舡舢舣èˆèˆ¯èˆ¨èˆ«èˆ¸èˆ»èˆ³èˆ´èˆ¾è‰„艉艋è‰è‰šè‰Ÿè‰¨è¡¾è¢…袈裘裟襞ç¾ç¾Ÿç¾§ç¾¯ç¾°ç¾²ç±¼æ•‰ç²‘ç²ç²œç²žç²¢ç²²ç²¼ç²½ç³ç³‡ç³Œç³ç³ˆç³…糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧èµè±‡è±‰é…Šé…é…Žé…é…¤\"],[\"f540\",\"é¼\",62],[\"f580\",\"é®»\",32,\"酢酡酰酩酯酽酾酲酴酹醌醅é†é†é†‘醢醣醪é†é†®é†¯é†µé†´é†ºè±•é¹¾è¶¸è·«è¸…蹙蹩趵趿趼趺跄跖跗跚跞跎è·è·›è·†è·¬è··è·¸è·£è·¹è·»è·¤è¸‰è·½è¸”è¸è¸Ÿè¸¬è¸®è¸£è¸¯è¸ºè¹€è¸¹è¸µè¸½è¸±è¹‰è¹è¹‚蹑蹒蹊蹰蹶蹼蹯蹴躅èºèº”èºèºœèºžè±¸è²‚貊貅貘貔斛觖觞觚觜\"],[\"f640\",\"鯜\",62],[\"f680\",\"é°›\",32,\"觥觫觯訾謦é“雩雳雯霆éœéœˆéœéœŽéœªéœéœ°éœ¾é¾€é¾ƒé¾…\",5,\"龌黾鼋é¼éš¹éš¼éš½é›Žé›’çž¿é› éŠŽéŠ®é‹ˆéŒ¾éªéŠéŽé¾é‘«é±¿é²‚鲅鲆鲇鲈稣鲋鲎é²é²‘鲒鲔鲕鲚鲛鲞\",5,\"é²¥\",4,\"鲫é²é²®é²°\",7,\"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋\"],[\"f740\",\"é°¼\",62],[\"f780\",\"鱻鱽鱾鲀鲃鲄鲉鲊鲌é²é²“鲖鲗鲘鲙é²é²ªé²¬é²¯é²¹é²¾\",4,\"é³ˆé³‰é³‘é³’é³šé³›é³ é³¡é³Œ\",4,\"鳓鳔鳕鳗鳘鳙鳜é³é³Ÿé³¢é¼éž…鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼é«é«€é«…髂髋髌髑é…éƒé‡é‰éˆéé‘飨é¤é¤®é¥•é¥”髟髡髦髯髫髻é«é«¹é¬ˆé¬é¬“鬟鬣麽麾縻麂麇麈麋麒é–éºéºŸé»›é»œé»é» 黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄\"],[\"f840\",\"é³£\",62],[\"f880\",\"é´¢\",32],[\"f940\",\"鵃\",62],[\"f980\",\"鶂\",32],[\"fa40\",\"鶣\",62],[\"fa80\",\"é·¢\",32],[\"fb40\",\"鸃\",27,\"鸤鸧鸮鸰鸴鸻鸼鹀é¹é¹é¹’鹓鹔鹖鹙é¹é¹Ÿé¹ 鹡鹢鹥鹮鹯鹲鹴\",9,\"麀\"],[\"fb80\",\"éºéºƒéº„麅麆麉麊麌\",5,\"麔\",8,\"éºžéº \",5,\"麧麨麩麪\"],[\"fc40\",\"麫\",8,\"麵麶麷麹麺麼麿\",4,\"黅黆黇黈黊黋黌é»é»’黓黕黖黗黙黚點黡黣黤黦黨黫黬é»é»®é»°\",8,\"黺黽黿\",6],[\"fc80\",\"鼆\",4,\"鼌é¼é¼‘鼒鼔鼕鼖鼘鼚\",5,\"鼡鼣\",8,\"é¼é¼®é¼°é¼±\"],[\"fd40\",\"é¼²\",4,\"鼸鼺鼼鼿\",4,\"é½…\",10,\"é½’\",38],[\"fd80\",\"é½¹\",5,\"é¾é¾‚é¾\",11,\"龜é¾é¾žé¾¡\",4,\"郎凉秊裏隣\"],[\"fe40\",\"兀ï¨ï¨Žï¨ï¨‘ï¨“ï¨”ï¨˜ï¨Ÿï¨ ï¨¡ï¨£ï¨¤ï¨§ï¨¨ï¨©\"]]"); /***/ }), -/* 880 */ +/* 877 */ /***/ (function(module) { module.exports = JSON.parse("[[\"a140\",\"\",62],[\"a180\",\"î”…\",32],[\"a240\",\"\",62],[\"a280\",\"î•¥\",32],[\"a2ab\",\"î¦\",5],[\"a2e3\",\"€î\"],[\"a2ef\",\"î®î¯\"],[\"a2fd\",\"î°î±\"],[\"a340\",\"î–†\",62],[\"a380\",\"î—…\",31,\" \"],[\"a440\",\"î—¦\",62],[\"a480\",\"\",32],[\"a4f4\",\"î²\",10],[\"a540\",\"\",62],[\"a580\",\"îš…\",32],[\"a5f7\",\"î½\",7],[\"a640\",\"\",62],[\"a680\",\"\",32],[\"a6b9\",\"îž…\",7],[\"a6d9\",\"îž\",6],[\"a6ec\",\"\"],[\"a6f3\",\"îž–\"],[\"a6f6\",\"îž—\",8],[\"a740\",\"\",62],[\"a780\",\"î…\",32],[\"a7c2\",\"îž \",14],[\"a7f2\",\"\",12],[\"a896\",\"îž¼\",10],[\"a8bc\",\"\"],[\"a8bf\",\"ǹ\"],[\"a8c1\",\"\"],[\"a8ea\",\"îŸ\",20],[\"a958\",\"\"],[\"a95b\",\"\"],[\"a95d\",\"\"],[\"a989\",\"〾⿰\",11],[\"a997\",\"\",12],[\"a9f0\",\"î \",14],[\"aaa1\",\"\",93],[\"aba1\",\"îž\",93],[\"aca1\",\"\",93],[\"ada1\",\"î„š\",93],[\"aea1\",\"î…¸\",93],[\"afa1\",\"\",93],[\"d7fa\",\"î \",4],[\"f8a1\",\"\",93],[\"f9a1\",\"\",93],[\"faa1\",\"î‹°\",93],[\"fba1\",\"îŽ\",93],[\"fca1\",\"\",93],[\"fda1\",\"îŠ\",93],[\"fe50\",\"âºî –î —î ˜âº„ã‘³ã‘‡âºˆâº‹î žã–žã˜šã˜ŽâºŒâº—ã¥®ã¤˜î ¦ã§ã§Ÿã©³ã§î «î ¬ãŽã±®ã³ âº§î ±î ²âºªä–ä…Ÿâº®äŒ·âº³âº¶âº·î »äŽ±äŽ¬âº»ä䓖䙡䙌\"],[\"fe80\",\"䜣䜩ä¼äžâ»Šä¥‡ä¥ºä¥½ä¦‚ä¦ƒä¦…ä¦†ä¦Ÿä¦›ä¦·ä¦¶î¡”î¡•ä²£ä²Ÿä² ä²¡ä±·ä²¢ä´“\",6,\"䶮\",93]]"); /***/ }), -/* 881 */ +/* 878 */ /***/ (function(module) { module.exports = JSON.parse("{\"uChars\":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],\"gbChars\":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]}"); /***/ }), -/* 882 */ +/* 879 */ /***/ (function(module) { module.exports = JSON.parse("[[\"0\",\"\\u0000\",127],[\"8141\",\"갂갃갅갆갋\",4,\"갘갞갟갡갢갣갥\",6,\"갮갲갳갴\"],[\"8161\",\"갵갶갷갺갻갽갾갿ê±\",9,\"걌걎\",5,\"걕\"],[\"8181\",\"걖걗걙걚걛ê±\",18,\"걲걳걵걶걹걻\",4,\"겂겇겈ê²ê²Žê²ê²‘겒겓겕\",6,\"겞겢\",5,\"겫ê²ê²®ê²±\",6,\"겺겾겿곀곂곃곅곆곇곉곊곋ê³\",7,\"곖곘\",7,\"곢곣곥곦곩곫ê³ê³®ê³²ê³´ê³·\",4,\"곾곿ê´ê´‚괃괅괇\",4,\"ê´Žê´ê´’ê´“\"],[\"8241\",\"괔괕괖괗괙괚괛ê´ê´žê´Ÿê´¡\",7,\"괪괫괮\",5],[\"8261\",\"괶괷괹괺괻괽\",6,\"굆굈굊\",5,\"굑굒굓굕굖굗\"],[\"8281\",\"êµ™\",7,\"굢굤\",7,\"굮굯굱굲굷굸굹굺굾궀궃\",4,\"궊궋ê¶ê¶Žê¶ê¶‘\",10,\"궞\",5,\"궥\",17,\"궸\",7,\"귂귃귅귆귇귉\",6,\"ê·’ê·”\",7,\"ê·ê·žê·Ÿê·¡ê·¢ê·£ê·¥\",18],[\"8341\",\"귺귻귽귾긂\",5,\"긊긌긎\",5,\"긕\",7],[\"8361\",\"ê¸\",18,\"긲긳긵긶긹긻긼\"],[\"8381\",\"긽긾긿깂깄깇깈깉깋ê¹ê¹‘깒깓깕깗\",4,\"깞깢깣깤깦깧깪깫ê¹ê¹®ê¹¯ê¹±\",6,\"깺깾\",5,\"꺆\",5,\"êº\",46,\"꺿ê»ê»‚껃껅\",6,\"껎껒\",5,\"껚껛ê»\",8],[\"8441\",\"껦껧껩껪껬껮\",5,\"껵껶껷껹껺껻껽\",8],[\"8461\",\"꼆꼉꼊꼋꼌꼎ê¼ê¼‘\",18],[\"8481\",\"꼤\",7,\"꼮꼯꼱꼳꼵\",6,\"꼾꽀꽄꽅꽆꽇꽊\",5,\"꽑\",10,\"꽞\",5,\"꽦\",18,\"꽺\",5,\"ê¾ê¾‚꾃꾅꾆꾇꾉\",6,\"꾒꾓꾔꾖\",5,\"ê¾\",26,\"꾺꾻꾽꾾\"],[\"8541\",\"꾿ê¿\",5,\"ê¿Šê¿Œê¿\",4,\"ê¿•\",6,\"ê¿\",4],[\"8561\",\"ê¿¢\",5,\"꿪\",5,\"꿲꿳꿵꿶꿷꿹\",6,\"뀂뀃\"],[\"8581\",\"뀅\",6,\"ë€ë€Žë€ë€‘뀒뀓뀕\",6,\"뀞\",9,\"뀩\",26,\"ë†ë‡ë‰ë‹ëëëë‘ë’ë–ë˜ëšë›ëœëž\",29,\"ë¾ë¿ë‚낂낃낅\",6,\"ë‚Žë‚ë‚’\",5,\"ë‚›ë‚낞낣낤\"],[\"8641\",\"낥낦낧낪낰낲낶낷낹낺낻낽\",6,\"냆냊\",5,\"냒\"],[\"8661\",\"냓냕냖냗냙\",6,\"냡냢냣냤냦\",10],[\"8681\",\"냱\",22,\"ë„Šë„ë„Žë„넑넔넕넖넗넚넞\",4,\"넦넧넩넪넫ë„\",6,\"넶넺\",5,\"녂녃녅녆녇녉\",6,\"녒녓녖녗녙녚녛ë…ë…žë…Ÿë…¡\",22,\"녺녻녽녾녿ë†ë†ƒ\",4,\"놊놌놎ë†ë†ë†‘놕놖놗놙놚놛ë†\"],[\"8741\",\"놞\",9,\"놩\",15],[\"8761\",\"놹\",18,\"ë‡ë‡Žë‡ë‡‘뇒뇓뇕\"],[\"8781\",\"뇖\",5,\"ë‡žë‡ \",7,\"뇪뇫ë‡ë‡®ë‡¯ë‡±\",7,\"뇺뇼뇾\",5,\"눆눇눉눊ëˆ\",6,\"눖눘눚\",5,\"눡\",18,\"눵\",6,\"눽\",26,\"뉙뉚뉛ë‰ë‰žë‰Ÿë‰¡\",6,\"뉪\",4],[\"8841\",\"뉯\",4,\"뉶\",5,\"뉽\",6,\"늆늇늈늊\",4],[\"8861\",\"ëŠëŠ’늓늕늖늗늛\",4,\"늢늤늧늨늩늫ëŠëŠ®ëŠ¯ëŠ±ëŠ²ëŠ³ëŠµëŠ¶ëŠ·\"],[\"8881\",\"늸\",15,\"ë‹Šë‹‹ë‹ë‹Žë‹ë‹‘ë‹“\",4,\"ë‹šë‹œë‹žë‹Ÿë‹ ë‹¡ë‹£ë‹§ë‹©ë‹ªë‹°ë‹±ë‹²ë‹¶ë‹¼ë‹½ë‹¾ëŒ‚ëŒƒëŒ…ëŒ†ëŒ‡ëŒ‰\",6,\"댒댖\",5,\"ëŒ\",54,\"ë—ë™ëšëë ë¡ë¢ë£\"],[\"8941\",\"ë¦ë¨ëªë¬ëë¯ë²ë³ëµë¶ë·ë¹\",6,\"뎂뎆\",5,\"ëŽ\"],[\"8961\",\"뎎ëŽëŽ‘뎒뎓뎕\",10,\"뎢\",5,\"뎩뎪뎫ëŽ\"],[\"8981\",\"뎮\",21,\"ë†ë‡ë‰ëŠëëë‘ë’ë“ë–ë˜ëšëœëžëŸë¡ë¢ë£ë¥ë¦ë§ë©\",18,\"ë½\",18,\"ë‘\",6,\"ë™ëšë›ëëžëŸë¡\",6,\"ëªë¬\",7,\"ëµ\",15],[\"8a41\",\"ë‘…\",10,\"ë‘’ë‘“ë‘•ë‘–ë‘—ë‘™\",6,\"둢둤둦\"],[\"8a61\",\"둧\",4,\"ë‘\",18,\"ë’ë’‚\"],[\"8a81\",\"ë’ƒ\",4,\"ë’‰\",19,\"ë’ž\",5,\"뒥뒦뒧뒩뒪뒫ë’\",7,\"뒶뒸뒺\",5,\"ë“듂듃듅듆듇듉\",6,\"듑듒듓듔듖\",5,\"듞듟듡듢듥듧\",4,\"듮듰듲\",5,\"듹\",26,\"딖딗딙딚ë”\"],[\"8b41\",\"딞\",5,\"딦딫\",4,\"딲딳딵딶딷딹\",6,\"땂땆\"],[\"8b61\",\"땇땈땉땊땎ë•ë•‘ë•’ë•“ë••\",6,\"ë•žë•¢\",8],[\"8b81\",\"ë•«\",52,\"떢떣떥떦떧떩떬ë–떮떯떲떶\",4,\"떾떿ë—뗂뗃뗅\",6,\"ë—Žë—’\",5,\"ë—™\",18,\"ë—\",18],[\"8c41\",\"똀\",15,\"똒똓똕똖똗똙\",4],[\"8c61\",\"똞\",6,\"똦\",5,\"ë˜\",6,\"똵\",5],[\"8c81\",\"똻\",12,\"뙉\",26,\"뙥뙦뙧뙩\",50,\"뚞뚟뚡뚢뚣뚥\",5,\"ëšëš®ëš¯ëš°ëš²\",16],[\"8d41\",\"뛃\",16,\"뛕\",8],[\"8d61\",\"뛞\",17,\"뛱뛲뛳뛵뛶뛷뛹뛺\"],[\"8d81\",\"ë›»\",4,\"뜂뜃뜄뜆\",33,\"뜪뜫ëœëœ®ëœ±\",6,\"뜺뜼\",7,\"ë…ë†ë‡ë‰ëŠë‹ë\",6,\"ë–\",9,\"ë¡ë¢ë£ë¥ë¦ë§ë©\",6,\"ë²ë´ë¶\",5,\"ë¾ë¿ëžëž‚랃랅\",6,\"랎랓랔랕랚랛ëžëžž\"],[\"8e41\",\"랟랡\",6,\"랪랮\",5,\"랶랷랹\",8],[\"8e61\",\"럂\",4,\"럈럊\",19],[\"8e81\",\"럞\",13,\"럮럯럱럲럳럵\",6,\"ëŸ¾ë ‚\",4,\"ë Šë ‹ë ë Žë ë ‘\",6,\"ë šë œë ž\",5,\"ë ¦ë §ë ©ë ªë «ë \",6,\"ë ¶ë º\",5,\"ë¡ë¡‚롃롅\",11,\"ë¡’ë¡”\",7,\"롞롟롡롢롣롥\",6,\"롮롰롲\",5,\"롹롺롻롽\",7],[\"8f41\",\"뢅\",7,\"뢎\",17],[\"8f61\",\"ë¢ \",7,\"뢩\",6,\"뢱뢲뢳뢵뢶뢷뢹\",4],[\"8f81\",\"뢾뢿룂룄룆\",5,\"ë£ë£Žë£ë£‘룒룓룕\",7,\"ë£žë£ ë£¢\",5,\"룪룫ë£ë£®ë£¯ë£±\",6,\"룺룼룾\",5,\"뤅\",18,\"뤙\",6,\"뤡\",26,\"뤾뤿ë¥ë¥‚륃륅\",6,\"ë¥ë¥Žë¥ë¥’\",5],[\"9041\",\"륚륛ë¥ë¥žë¥Ÿë¥¡\",6,\"륪륬륮\",5,\"륶륷륹륺륻륽\"],[\"9061\",\"륾\",5,\"릆릈릋릌ë¦\",15],[\"9081\",\"릟\",12,\"릮릯릱릲릳릵\",6,\"릾맀맂\",5,\"맊맋ë§ë§“\",4,\"ë§šë§œë§Ÿë§ ë§¢ë§¦ë§§ë§©ë§ªë§«ë§\",6,\"맶맻\",4,\"먂\",5,\"먉\",11,\"먖\",33,\"먺먻먽먾먿ë©ë©ƒë©„멅멆\"],[\"9141\",\"멇멊멌ë©ë©ë©‘멒멖멗멙멚멛ë©\",6,\"멦멪\",5],[\"9161\",\"멲멳멵멶멷멹\",9,\"몆몈몉몊몋ëª\",5],[\"9181\",\"몓\",20,\"몪ëªëª®ëª¯ëª±ëª³\",4,\"몺몼몾\",5,\"뫅뫆뫇뫉\",14,\"ë«š\",33,\"뫽뫾뫿ë¬ë¬‚묃묅\",7,\"묎ë¬ë¬’\",5,\"묙묚묛ë¬ë¬žë¬Ÿë¬¡\",6],[\"9241\",\"묨묪묬\",7,\"묷묹묺묿\",4,\"ë†ëˆëŠë‹ëŒëŽë‘ë’\"],[\"9261\",\"ë“ë•ë–ë—ë™\",7,\"ë¢ë¤\",7,\"ë\",4],[\"9281\",\"ë²\",21,\"뮉뮊뮋ë®ë®Žë®ë®‘\",18,\"뮥뮦뮧뮩뮪뮫ë®\",6,\"뮵뮶뮸\",7,\"ë¯ë¯‚믃믅믆믇믉\",6,\"믑믒믔\",35,\"믺믻믽믾ë°\"],[\"9341\",\"ë°ƒ\",4,\"ë°Šë°Žë°ë°’ë°“ë°™ë°šë° ë°¡ë°¢ë°£ë°¦ë°¨ë°ªë°«ë°¬ë°®ë°¯ë°²ë°³ë°µ\"],[\"9361\",\"밶밷밹\",6,\"뱂뱆뱇뱈뱊뱋뱎ë±ë±‘\",8],[\"9381\",\"뱚뱛뱜뱞\",37,\"벆벇벉벊ë²ë²\",4,\"벖벘벛\",4,\"벢벣벥벦벩\",6,\"벲벶\",5,\"벾벿ë³ë³‚볃볅\",7,\"볎볒볓볔볖볗볙볚볛ë³\",22,\"볷볹볺볻볽\"],[\"9441\",\"ë³¾\",5,\"봆봈봊\",5,\"ë´‘ë´’ë´“ë´•\",8],[\"9461\",\"ë´ž\",5,\"ë´¥\",6,\"ë´\",12],[\"9481\",\"ë´º\",5,\"ëµ\",6,\"뵊뵋ëµëµŽëµëµ‘\",6,\"뵚\",9,\"뵥뵦뵧뵩\",22,\"붂붃붅붆붋\",4,\"붒붔붖붗붘붛ë¶\",6,\"붥\",10,\"붱\",6,\"붹\",24],[\"9541\",\"뷒뷓뷖뷗뷙뷚뷛ë·\",11,\"ë·ª\",5,\"ë·±\"],[\"9561\",\"뷲뷳뷵뷶뷷뷹\",6,\"ë¸ë¸‚븄븆\",5,\"븎ë¸ë¸‘븒븓\"],[\"9581\",\"븕\",6,\"ë¸žë¸ \",35,\"빆빇빉빊빋ë¹ë¹\",4,\"빖빘빜ë¹ë¹žë¹Ÿë¹¢ë¹£ë¹¥ë¹¦ë¹§ë¹©ë¹«\",4,\"빲빶\",4,\"빾빿ëºëº‚뺃뺅\",6,\"뺎뺒\",5,\"뺚\",13,\"뺩\",14],[\"9641\",\"뺸\",23,\"뻒뻓\"],[\"9661\",\"뻕뻖뻙\",6,\"뻡뻢뻦\",5,\"ë»\",8],[\"9681\",\"뻶\",10,\"뼂\",5,\"뼊\",13,\"뼚뼞\",33,\"뽂뽃뽅뽆뽇뽉\",6,\"뽒뽓뽔뽖\",44],[\"9741\",\"뾃\",16,\"뾕\",8],[\"9761\",\"뾞\",17,\"ë¾±\",7],[\"9781\",\"ë¾¹\",11,\"뿆\",5,\"ë¿Žë¿ë¿‘ë¿’ë¿“ë¿•\",6,\"ë¿ë¿žë¿ ë¿¢\",89,\"쀽쀾쀿\"],[\"9841\",\"ì€\",16,\"ì’\",5,\"ì™ìšì›\"],[\"9861\",\"ììžìŸì¡\",6,\"ìª\",15],[\"9881\",\"ìº\",21,\"ì‚’ì‚“ì‚•ì‚–ì‚—ì‚™\",6,\"삢삤삦\",5,\"삮삱삲삷\",4,\"삾샂샃샄샆샇샊샋ìƒìƒŽìƒìƒ‘\",6,\"샚샞\",5,\"샦샧샩샪샫ìƒ\",6,\"샶샸샺\",5,\"ì„섂섃섅섆섇섉\",6,\"섑섒섓섔섖\",5,\"섡섢섥섨섩섪섫섮\"],[\"9941\",\"섲섳섴섵섷섺섻섽섾섿ì…\",6,\"ì…Šì…Ž\",5,\"ì…–ì…—\"],[\"9961\",\"셙셚셛ì…\",6,\"셦셪\",5,\"셱셲셳셵셶셷셹셺셻\"],[\"9981\",\"ì…¼\",8,\"솆\",5,\"ì†ì†‘솒솓솕솗\",4,\"ì†žì† ì†¢ì†£ì†¤ì†¦ì†§ì†ªì†«ì†ì†®ì†¯ì†±\",11,\"솾\",5,\"쇅쇆쇇쇉쇊쇋ì‡\",6,\"쇕쇖쇙\",6,\"쇡쇢쇣쇥쇦쇧쇩\",6,\"쇲쇴\",7,\"쇾쇿ìˆìˆ‚숃숅\",6,\"숎ìˆìˆ’\",5,\"숚숛ìˆìˆžìˆ¡ìˆ¢ìˆ£\"],[\"9a41\",\"숤숥숦숧숪숬숮숰숳숵\",16],[\"9a61\",\"쉆쉇쉉\",6,\"쉒쉓쉕쉖쉗쉙\",6,\"쉡쉢쉣쉤쉦\"],[\"9a81\",\"쉧\",4,\"쉮쉯쉱쉲쉳쉵\",6,\"쉾슀슂\",5,\"슊\",5,\"슑\",6,\"슙슚슜슞\",5,\"슦슧슩슪슫슮\",5,\"슶슸슺\",33,\"싞싟싡싢싥\",5,\"싮싰싲싳싴싵싷싺싽싾싿ìŒ\",6,\"쌊쌋쌎ìŒ\"],[\"9b41\",\"ìŒìŒ‘쌒쌖쌗쌙쌚쌛ìŒ\",6,\"쌦쌧쌪\",8],[\"9b61\",\"쌳\",17,\"ì†\",7],[\"9b81\",\"ìŽ\",25,\"ìªì«ìì®ì¯ì±ì³\",4,\"ìºì»ì¾\",5,\"쎅쎆쎇쎉쎊쎋ìŽ\",50,\"ì\",22,\"ìš\"],[\"9c41\",\"ì›ììžì¡ì£\",4,\"ìªì«ì¬ì®\",5,\"ì¶ì·ì¹\",5],[\"9c61\",\"ì¿\",8,\"ì‰\",6,\"ì‘\",9],[\"9c81\",\"ì›\",8,\"ì¥\",6,\"ìì®ì¯ì±ì²ì³ìµ\",6,\"ì¾\",9,\"쑉\",26,\"쑦쑧쑩쑪쑫ì‘\",6,\"쑶쑷쑸쑺\",5,\"ì’\",18,\"ì’•\",6,\"ì’\",12],[\"9d41\",\"ì’ª\",13,\"쒹쒺쒻쒽\",8],[\"9d61\",\"쓆\",25],[\"9d81\",\"ì“ \",8,\"쓪\",5,\"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂\",9,\"ì”씎ì”씑씒씓씕\",6,\"ì”\",10,\"씪씫ì”씮씯씱\",6,\"씺씼씾\",5,\"앆앇앋ì•ì•ì•‘앒앖앚앛앜앟앢앣앥앦앧앩\",6,\"앲앶\",5,\"앾앿ì–얂얃얅얆얈얉얊얋얎ì–ì–’ì–“ì–”\"],[\"9e41\",\"얖얙얚얛ì–ì–žì–Ÿì–¡\",7,\"ì–ª\",9,\"ì–¶\"],[\"9e61\",\"얷얺얿\",4,\"ì—‹ì—ì—ì—’ì—“ì—•ì—–ì——ì—™\",6,\"엢엤엦엧\"],[\"9e81\",\"엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋ì˜ì˜Žì˜ì˜‘\",6,\"옚ì˜\",6,\"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉\",6,\"ì™’ì™–\",5,\"왞왟왡\",10,\"ì™ì™®ì™°ì™²\",5,\"왺왻왽왾왿ìš\",6,\"욊욌욎\",5,\"욖욗욙욚욛ìš\",6,\"욦\"],[\"9f41\",\"욨욪\",5,\"욲욳욵욶욷욻\",4,\"웂웄웆\",5,\"웎\"],[\"9f61\",\"ì›ì›‘웒웓웕\",6,\"웞웟웢\",5,\"웪웫ì›ì›®ì›¯ì›±ì›²\"],[\"9f81\",\"웳\",4,\"웺웻웼웾\",5,\"윆윇윉윊윋ìœ\",6,\"윖윘윚\",5,\"윢윣윥윦윧윩\",6,\"윲윴윶윸윹윺윻윾윿ìì‚ìƒì…\",4,\"ì‹ìŽìì™ìšì›ììžìŸì¡\",6,\"ì©ìªì¬\",7,\"ì¶ì·ì¹ìºì»ì¿ìž€ìžìž‚잆잋잌ìžìžìž’잓잕잙잛\",4,\"잢잧\",4,\"잮잯잱잲잳잵잶잷\"],[\"a041\",\"잸잹잺잻잾쟂\",5,\"쟊쟋ìŸìŸìŸ‘\",6,\"쟙쟚쟛쟜\"],[\"a061\",\"쟞\",5,\"쟥쟦쟧쟩쟪쟫ìŸ\",13],[\"a081\",\"쟻\",4,\"ì ‚ì ƒì …ì †ì ‡ì ‰ì ‹\",4,\"ì ’ì ”ì —\",4,\"ì žì Ÿì ¡ì ¢ì £ì ¥\",6,\"ì ®ì °ì ²\",5,\"ì ¹ì ºì »ì ½ì ¾ì ¿ì¡\",6,\"ì¡Šì¡‹ì¡Ž\",5,\"ì¡•\",26,\"졲졳졵졶졷졹졻\",4,\"좂좄좈좉좊좎\",5,\"좕\",7,\"ì¢žì¢ ì¢¢ì¢£ì¢¤\"],[\"a141\",\"좥좦좧좩\",18,\"좾좿죀ì£\"],[\"a161\",\"죂죃죅죆죇죉죊죋ì£\",6,\"죖죘죚\",5,\"죢죣죥\"],[\"a181\",\"죦\",14,\"죶\",5,\"죾죿ì¤ì¤‚줃줇\",4,\"줎 ã€ã€‚·‥…¨〃Â―∥\∼‘’“â€ã€”〕〈\",9,\"Â±Ã—Ã·â‰ â‰¤â‰¥âˆžâˆ´Â°â€²â€³â„ƒâ„«ï¿ ï¿¡ï¿¥â™‚â™€âˆ âŠ¥âŒ’âˆ‚âˆ‡â‰¡â‰’Â§â€»â˜†â˜…â—‹â—◎◇◆□■△▲▽▼→â†â†‘↓↔〓≪≫√∽âˆâˆµâˆ«âˆ¬âˆˆâˆ‹âŠ†âŠ‡âŠ‚⊃∪∩∧∨¬\"],[\"a241\",\"ì¤ì¤’\",5,\"줙\",18],[\"a261\",\"ì¤\",6,\"줵\",18],[\"a281\",\"쥈\",7,\"쥒쥓쥕쥖쥗쥙\",6,\"쥢쥤\",7,\"ì¥ì¥®ì¥¯â‡’⇔∀∃´~ˇ˘Ë˚˙¸˛¡¿Ë∮∑âˆÂ¤â„‰â€°â—◀▷▶♤♠♡♥♧♣⊙◈▣â—◑▒▤▥▨▧▦▩♨â˜â˜Žâ˜œâ˜žÂ¶â€ ‡↕↗↙↖↘â™â™©â™ªâ™¬ã‰¿ãˆœâ„–ã‡â„¢ã‚ã˜â„¡â‚¬Â®\"],[\"a341\",\"쥱쥲쥳쥵\",6,\"쥽\",10,\"즊즋ì¦ì¦Žì¦\"],[\"a361\",\"즑\",6,\"즚즜즞\",16],[\"a381\",\"즯\",16,\"짂짃짅짆짉짋\",4,\"짒짔짗짘짛ï¼\",58,\"₩]\",32,\"ï¿£\"],[\"a441\",\"짞짟짡짣짥짦짨짩짪짫짮짲\",5,\"짺짻짽짾짿ì¨ì¨‚쨃쨄\"],[\"a461\",\"쨅쨆쨇쨊쨎\",5,\"쨕쨖쨗쨙\",12],[\"a481\",\"쨦쨧쨨쨪\",28,\"ㄱ\",93],[\"a541\",\"쩇\",4,\"ì©Žì©ì©‘ì©’ì©“ì©•\",6,\"ì©žì©¢\",5,\"쩩쩪\"],[\"a561\",\"ì©«\",17,\"쩾\",5,\"쪅쪆\"],[\"a581\",\"쪇\",16,\"쪙\",14,\"â…°\",9],[\"a5b0\",\"â… \",9],[\"a5c1\",\"Α\",16,\"Σ\",6],[\"a5e1\",\"α\",16,\"σ\",6],[\"a641\",\"쪨\",19,\"쪾쪿ì«ì«‚쫃쫅\"],[\"a661\",\"쫆\",5,\"ì«Žì«ì«’쫔쫕쫖쫗쫚\",5,\"ì«¡\",6],[\"a681\",\"쫨쫩쫪쫫ì«\",6,\"쫵\",18,\"쬉쬊─│┌â”┘└├┬┤┴┼â”┃â”┓┛┗┣┳┫┻╋┠┯┨┷┿â”┰┥┸╂┒┑┚┙┖┕┎â”┞┟┡┢┦┧┩┪â”┮┱┲┵┶┹┺┽┾╀â•â•ƒ\",7],[\"a741\",\"쬋\",4,\"쬑쬒쬓쬕쬖쬗쬙\",6,\"쬢\",7],[\"a761\",\"쬪\",22,\"ì‚ìƒì„\"],[\"a781\",\"ì…ì†ì‡ìŠì‹ììŽìì‘\",6,\"ìšì›ìœìž\",5,\"ì¥\",7,\"㎕㎖㎗ℓ㎘ã„㎣㎤㎥㎦㎙\",9,\"ãŠãŽãŽŽãŽã㎈㎉ãˆãŽ§ãŽ¨ãŽ°\",9,\"㎀\",4,\"㎺\",5,\"ãŽ\",4,\"Ωã€ã㎊㎋㎌ã–ã…ãŽãŽ®ãŽ¯ã›ãŽ©ãŽªãŽ«ãŽ¬ããã“ãƒã‰ãœã†\"],[\"a841\",\"ì\",10,\"ìº\",14],[\"a861\",\"쮉\",18,\"ì®\",6],[\"a881\",\"쮤\",19,\"쮹\",11,\"ÆêĦ\"],[\"a8a6\",\"IJ\"],[\"a8a8\",\"Ä¿ÅØŒºÞŦŊ\"],[\"a8b1\",\"㉠\",27,\"â“\",25,\"â‘ \",14,\"½⅓⅔¼¾⅛⅜â…â…ž\"],[\"a941\",\"쯅\",14,\"쯕\",10],[\"a961\",\"ì¯ ì¯¡ì¯¢ì¯£ì¯¥ì¯¦ì¯¨ì¯ª\",18],[\"a981\",\"쯽\",14,\"ì°Žì°ì°‘ì°’ì°“ì°•\",6,\"ì°žì°Ÿì° ì°£ì°¤Ã¦Ä‘Ã°Ä§Ä±Ä³Ä¸Å€Å‚Ã¸Å“ÃŸÃ¾Å§Å‹Å‰ãˆ€\",27,\"â’œ\",25,\"â‘´\",14,\"¹²³â´â¿â‚₂₃₄\"],[\"aa41\",\"찥찦찪찫ì°ì°¯ì°±\",6,\"찺찿\",4,\"챆챇챉챊챋ì±ì±Ž\"],[\"aa61\",\"ì±\",4,\"챖챚\",5,\"챡챢챣챥챧챩\",6,\"챱챲\"],[\"aa81\",\"챳챴챶\",29,\"ã\",82],[\"ab41\",\"첔첕첖첗첚첛ì²ì²žì²Ÿì²¡\",6,\"첪첮\",5,\"첶첷첹\"],[\"ab61\",\"첺첻첽\",6,\"쳆쳈쳊\",5,\"쳑쳒쳓쳕\",5],[\"ab81\",\"ì³›\",8,\"ì³¥\",6,\"ì³ì³®ì³¯ì³±\",12,\"ã‚¡\",85],[\"ac41\",\"쳾쳿촀촂\",5,\"ì´Šì´‹ì´ì´Žì´ì´‘\",6,\"ì´šì´œì´žì´Ÿì´ \"],[\"ac61\",\"촡촢촣촥촦촧촩촪촫ì´\",11,\"ì´º\",4],[\"ac81\",\"ì´¿\",28,\"ìµìµžìµŸÐ\",5,\"ÐЖ\",25],[\"acd1\",\"а\",5,\"ёж\",25],[\"ad41\",\"쵡쵢쵣쵥\",6,\"쵮쵰쵲\",5,\"ìµ¹\",7],[\"ad61\",\"ì¶\",6,\"춉\",10,\"춖춗춙춚춛ì¶ì¶žì¶Ÿ\"],[\"ad81\",\"ì¶ ì¶¡ì¶¢ì¶£ì¶¦ì¶¨ì¶ª\",5,\"춱\",18,\"ì·…\"],[\"ae41\",\"ì·†\",5,\"ì·ì·Žì·ì·‘\",16],[\"ae61\",\"ì·¢\",5,\"췩췪췫ì·ì·®ì·¯ì·±\",6,\"췺췼췾\",4],[\"ae81\",\"츃츅츆츇츉츊츋ì¸\",6,\"츕츖츗츘츚\",5,\"츢츣츥츦츧츩츪츫\"],[\"af41\",\"츬ì¸ì¸®ì¸¯ì¸²ì¸´ì¸¶\",19],[\"af61\",\"칊\",13,\"칚칛ì¹ì¹žì¹¢\",5,\"칪칬\"],[\"af81\",\"ì¹®\",5,\"칶칷칹칺칻칽\",6,\"캆캈캊\",5,\"캒캓캕캖캗캙\"],[\"b041\",\"캚\",5,\"캢캦\",5,\"캮\",12],[\"b061\",\"캻\",5,\"컂\",19],[\"b081\",\"ì»–\",13,\"컦컧컩컪ì»\",6,\"컶컺\",5,\"ê°€ê°ê°„갇갈갉갊ê°\",7,\"ê°™\",4,\"ê° ê°¤ê°¬ê°ê°¯ê°°ê°±ê°¸ê°¹ê°¼ê±€ê±‹ê±ê±”걘걜거걱건걷걸걺검ê²ê²ƒê²„겅겆겉겊겋게ê²ê²”겜ê²ê²Ÿê² 겡겨격겪견겯결겸겹겻겼경ê³ê³„ê³ˆê³Œê³•ê³—ê³ ê³¡ê³¤ê³§ê³¨ê³ªê³¬ê³¯ê³°ê³±ê³³ê³µê³¶ê³¼ê³½ê´€ê´„ê´†\"],[\"b141\",\"켂켃켅켆켇켉\",6,\"켒켔켖\",5,\"ì¼ì¼žì¼Ÿì¼¡ì¼¢ì¼£\"],[\"b161\",\"ì¼¥\",6,\"켮켲\",5,\"ì¼¹\",11],[\"b181\",\"ì½…\",14,\"콖콗콙콚콛ì½\",6,\"콦콨콪콫콬괌ê´ê´ê´‘ê´˜ê´œê´ ê´©ê´¬ê´ê´´ê´µê´¸ê´¼êµ„굅굇굉êµêµ”굘굡굣구êµêµ°êµ³êµ´êµµêµ¶êµ»êµ¼êµ½êµ¿ê¶ê¶‚궈궉권ê¶ê¶œê¶ê¶¤ê¶·ê·€ê·ê·„ê·ˆê·ê·‘ê·“ê·œê· ê·¤ê·¸ê·¹ê·¼ê·¿ê¸€ê¸ê¸ˆê¸‰ê¸‹ê¸ê¸”기긱긴긷길긺김ê¹ê¹ƒê¹…깆깊까ê¹ê¹Žê¹ê¹”깖깜ê¹ê¹Ÿê¹ 깡깥깨깩깬깰깸\"],[\"b241\",\"ì½ì½®ì½¯ì½²ì½³ì½µì½¶ì½·ì½¹\",6,\"ì¾ì¾‚쾃쾄쾆\",5,\"ì¾\"],[\"b261\",\"쾎\",18,\"ì¾¢\",5,\"쾩\"],[\"b281\",\"쾪\",5,\"ì¾±\",18,\"ì¿…\",6,\"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌ê»ê»ê»ê»‘께껙껜껨껫ê»ê»´ê»¸ê»¼ê¼‡ê¼ˆê¼ê¼ê¼¬ê¼ê¼°ê¼²ê¼´ê¼¼ê¼½ê¼¿ê½ê½‚꽃꽈꽉ê½ê½œê½ê½¤ê½¥ê½¹ê¾€ê¾„꾈ê¾ê¾‘꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋ê¿ê¿Žê¿”꿜꿨꿩꿰꿱꿴꿸뀀ë€ë€„뀌ë€ë€”뀜ë€ë€¨ë„ë…ëˆëŠëŒëŽë“ë”ë•ë—ë™\"],[\"b341\",\"ì¿Œ\",19,\"쿢쿣쿥쿦쿧쿩\"],[\"b361\",\"쿪\",5,\"쿲쿴쿶\",5,\"쿽쿾쿿í€í€‚퀃퀅\",5],[\"b381\",\"퀋\",5,\"퀒\",5,\"퀙\",19,\"ëë¼ë½ë‚€ë‚„ë‚Œë‚ë‚ë‚‘ë‚˜ë‚™ë‚šë‚œë‚Ÿë‚ ë‚¡ë‚¢ë‚¨ë‚©ë‚«\",4,\"낱낳내낵낸낼냄냅냇냈냉ëƒëƒ‘ëƒ”ëƒ˜ëƒ ëƒ¥ë„ˆë„‰ë„‹ë„Œë„넒넓넘넙넛넜ë„넣네넥넨넬넴넵넷넸넹녀ë…ë…„ë…ˆë…ë…‘ë…”ë…•ë…˜ë…œë… ë…¸ë…¹ë…¼ë†€ë†‚ë†ˆë†‰ë†‹ë†ë†’놓놔놘놜놨뇌ë‡ë‡”뇜ë‡\"],[\"b441\",\"퀮\",5,\"퀶퀷퀹퀺퀻퀽\",6,\"í†íˆíŠ\",5],[\"b461\",\"í‘í’í“í•í–í—í™\",6,\"í¡\",10,\"í®í¯\"],[\"b481\",\"í±í²í³íµ\",6,\"í¾í¿í‚€í‚‚\",18,\"ë‡Ÿë‡¨ë‡©ë‡¬ë‡°ë‡¹ë‡»ë‡½ëˆ„ëˆ…ëˆˆëˆ‹ëˆŒëˆ”ëˆ•ëˆ—ëˆ™ëˆ ëˆ´ëˆ¼ë‰˜ë‰œë‰ ë‰¨ë‰©ë‰´ë‰µë‰¼ëŠ„ëŠ…ëŠ‰ëŠëŠ‘ëŠ”ëŠ˜ëŠ™ëŠšëŠ ëŠ¡ëŠ£ëŠ¥ëŠ¦ëŠªëŠ¬ëŠ°ëŠ´ë‹ˆë‹‰ë‹Œë‹ë‹’님닙닛ë‹ë‹¢ë‹¤ë‹¥ë‹¦ë‹¨ë‹«\",4,\"닳담답닷\",4,\"닿대ëŒëŒ„댈ëŒëŒ‘댓댔댕댜ë”ë•ë–ë˜ë›ëœëžëŸë¤ë¥\"],[\"b541\",\"í‚•\",14,\"킦킧킩킪킫í‚\",5],[\"b561\",\"킳킶킸킺\",5,\"탂탃탅탆탇탊\",5,\"탒탖\",4],[\"b581\",\"탛탞탟탡탢탣탥\",6,\"탮탲\",5,\"탹\",11,\"ë§ë©ë«ë®ë°ë±ë´ë¸ëŽ€ëŽëŽƒëŽ„뎅뎌ëŽëŽ”ëŽ ëŽ¡ëŽ¨ëŽ¬ë„ë…ëˆë‹ëŒëŽëë”ë•ë—ë™ë›ëë ë¤ë¨ë¼ëë˜ëœë ë¨ë©ë«ë´ë‘ë‘‘ë‘”ë‘˜ë‘ ë‘¡ë‘£ë‘¥ë‘¬ë’€ë’ˆë’뒤뒨뒬뒵뒷뒹듀듄듈ë“ë“•ë“œë“ë“ ë“£ë“¤ë“¦ë“¬ë“듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸\"],[\"b641\",\"í„…\",7,\"í„Ž\",17],[\"b661\",\"í„ \",15,\"턲턳턵턶턷턹턻턼턽턾\"],[\"b681\",\"í„¿í…‚í…†\",5,\"í…Ží…í…‘í…’í…“í…•\",6,\"í…ží… í…¢\",5,\"텩텪텫í…ë•€ë•ë•ƒë•„ë•…ë•‹ë•Œë•ë•ë•”ë•œë•ë•Ÿë• ë•¡ë– ë–¡ë–¤ë–¨ë–ªë–«ë–°ë–±ë–³ë–´ë–µë–»ë–¼ë–½ë—€ë—„ë—Œë—ë—ë—뗑뗘뗬ë˜ë˜‘똔똘똥똬똴뙈뙤뙨뚜ëšëš 뚤뚫뚬뚱뛔뛰뛴뛸뜀ëœëœ…뜨뜩뜬뜯뜰뜸뜹뜻ë„ëˆëŒë”ë•ë ë¤ë¨ë°ë±ë³ëµë¼ë½ëž€ëž„람ëžëžëžëž‘ëž’ëž–ëž—\"],[\"b741\",\"í…®\",13,\"í…½\",6,\"톅톆톇톉톊\"],[\"b761\",\"톋\",20,\"톢톣톥톦톧\"],[\"b781\",\"톩\",6,\"톲톴톶톷톸톹톻톽톾톿í‡\",14,\"ëž˜ëž™ëžœëž ëž¨ëž©ëž«ëž¬ëžëž´ëžµëž¸ëŸ‡ëŸ‰ëŸ¬ëŸëŸ°ëŸ´ëŸ¼ëŸ½ëŸ¿ë €ë ë ‡ë ˆë ‰ë Œë ë ˜ë ™ë ›ë ë ¤ë ¥ë ¨ë ¬ë ´ë µë ·ë ¸ë ¹ë¡€ë¡„ë¡‘ë¡“ë¡œë¡ë¡ 롤롬ë¡ë¡¯ë¡±ë¡¸ë¡¼ë¢ë¢¨ë¢°ë¢´ë¢¸ë£€ë£ë£ƒë£…료ë£ë£”ë£ë£Ÿë£¡ë£¨ë£©ë£¬ë£°ë£¸ë£¹ë£»ë£½ë¤„ë¤˜ë¤ ë¤¼ë¤½ë¥€ë¥„ë¥Œë¥ë¥‘ë¥˜ë¥™ë¥œë¥ ë¥¨ë¥©\"],[\"b841\",\"í‡\",7,\"퇙\",17],[\"b861\",\"퇫\",8,\"퇵퇶퇷퇹\",13],[\"b881\",\"툈툊\",5,\"툑\",24,\"륫ë¥ë¥´ë¥µë¥¸ë¥¼ë¦„릅릇릉릊ë¦ë¦Žë¦¬ë¦ë¦°ë¦´ë¦¼ë¦½ë¦¿ë§ë§ˆë§‰ë§Œë§Ž\",4,\"맘맙맛ë§ë§žë§¡ë§£ë§¤ë§¥ë§¨ë§¬ë§´ë§µë§·ë§¸ë§¹ë§ºë¨€ë¨ë¨ˆë¨•ë¨¸ë¨¹ë¨¼ë©€ë©‚멈멉멋ë©ë©Žë©“메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼\"],[\"b941\",\"툪툫툮툯툱툲툳툵\",6,\"툾퉀퉂\",5,\"퉉퉊퉋퉌\"],[\"b961\",\"í‰\",14,\"í‰\",6,\"퉥퉦퉧퉨\"],[\"b981\",\"퉩\",22,\"튂튃튅튆튇튉튊튋튌묀묄ë¬ë¬ë¬‘ë¬˜ë¬œë¬ ë¬©ë¬«ë¬´ë¬µë¬¶ë¬¸ë¬»ë¬¼ë¬½ë¬¾ë„ë…ë‡ë‰ëëëë”ë˜ë¡ë£ë¬ë®ˆë®Œë®ë®¤ë®¨ë®¬ë®´ë®·ë¯€ë¯„믈ë¯ë¯“미믹민믿밀밂밈밉밋밌ë°ë°ë°‘ë°”\",4,\"ë°›\",4,\"밤밥밧방ë°ë°°ë°±ë°´ë°¸ë±€ë±ë±ƒë±„뱅뱉뱌ë±ë±ë±ë²„벅번벋벌벎범법벗\"],[\"ba41\",\"íŠíŠŽíŠíŠ’튓튔튖\",5,\"íŠíŠžíŠŸíŠ¡íŠ¢íŠ£íŠ¥\",6,\"íŠ\"],[\"ba61\",\"튮튯튰튲\",5,\"튺튻튽튾í‹í‹ƒ\",4,\"í‹Ší‹Œ\",5],[\"ba81\",\"틒틓틕틖틗틙틚틛í‹\",6,\"틦\",9,\"í‹²í‹³í‹µí‹¶í‹·í‹¹í‹ºë²™ë²šë² ë²¡ë²¤ë²§ë²¨ë²°ë²±ë²³ë²´ë²µë²¼ë²½ë³€ë³„ë³ë³ë³ë³‘볕볘볜보복볶본볼봄봅봇봉ë´ë´”봤봬뵀뵈뵉뵌ëµëµ˜ëµ™ëµ¤ëµ¨ë¶€ë¶ë¶„붇불붉붊ë¶ë¶‘붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브ë¸ë¸ë¸”븜ë¸ë¸Ÿë¹„ë¹…ë¹ˆë¹Œë¹Žë¹”ë¹•ë¹—ë¹™ë¹šë¹›ë¹ ë¹¡ë¹¤\"],[\"bb41\",\"í‹»\",4,\"팂팄팆\",5,\"íŒíŒ‘팒팓팕팗\",4,\"팞팢팣\"],[\"bb61\",\"팤팦팧팪팫íŒíŒ®íŒ¯íŒ±\",6,\"팺팾\",5,\"í†í‡íˆí‰\"],[\"bb81\",\"íŠ\",31,\"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌ëºëºëºëº‘뺘뺙뺨ë»ë»‘ë»”ë»—ë»˜ë» ë»£ë»¤ë»¥ë»¬ë¼ë¼ˆë¼‰ë¼˜ë¼™ë¼›ë¼œë¼ë½€ë½ë½„뽈ë½ë½‘뽕뾔뾰뿅뿌ë¿ë¿ë¿”뿜뿟뿡쀼ì‘ì˜ìœì ì¨ì©ì‚ì‚‘ì‚”ì‚˜ì‚ ì‚¡ì‚£ì‚¥ì‚¬ì‚삯산삳살삵삶삼삽삿샀ìƒìƒ…새색샌ìƒìƒ˜ìƒ™ìƒ›ìƒœìƒìƒ¤\"],[\"bc41\",\"íª\",17,\"í¾í¿íŽíŽ‚펃펅펆펇\"],[\"bc61\",\"펈펉펊펋펎펒\",5,\"펚펛íŽíŽžíŽŸíŽ¡\",6,\"펪펬펮\"],[\"bc81\",\"펯\",4,\"펵펶펷펹펺펻펽\",6,\"í†í‡íŠ\",5,\"í‘\",5,\"샥샨샬샴샵샷샹섀섄섈ì„ì„•ì„œ\",4,\"섣설섦섧섬ì„섯섰성섶세섹센셀셈셉셋셌ì…셔셕션셜셤셥셧셨셩셰셴셸솅소ì†ì†Žì†ì†”솖솜ì†ì†Ÿì†¡ì†¥ì†¨ì†©ì†¬ì†°ì†½ì‡„ì‡ˆì‡Œì‡”ì‡—ì‡˜ì‡ ì‡¤ì‡¨ì‡°ì‡±ì‡³ì‡¼ì‡½ìˆ€ìˆ„ìˆŒìˆìˆìˆ‘ìˆ˜ìˆ™ìˆœìˆŸìˆ ìˆ¨ìˆ©ìˆ«ìˆ\"],[\"bd41\",\"í—í™\",7,\"í¢í¤\",7,\"í®í¯í±í²í³íµí¶í·\"],[\"bd61\",\"í¸í¹íºí»í¾í€í‚\",5,\"í‰\",13],[\"bd81\",\"í—\",5,\"íž\",25,\"숯숱숲숴쉈ì‰ì‰‘ì‰”ì‰˜ì‰ ì‰¥ì‰¬ì‰ì‰°ì‰´ì‰¼ì‰½ì‰¿ìŠìŠˆìŠ‰ìŠìŠ˜ìŠ›ìŠìŠ¤ìŠ¥ìŠ¨ìŠ¬ìŠìŠ´ìŠµìŠ·ìŠ¹ì‹œì‹ì‹ 싣실싫심ì‹ì‹¯ì‹±ì‹¶ì‹¸ì‹¹ì‹»ì‹¼ìŒ€ìŒˆìŒ‰ìŒŒìŒìŒ“쌔쌕쌘쌜쌤쌥쌨쌩ì…ì¨ì©ì¬ì°ì²ì¸ì¹ì¼ì½ìŽ„쎈쎌ì€ì˜ì™ìœìŸì ì¢ì¨ì©ìì´ìµì¸ìˆìì¤ì¬ì°\"],[\"be41\",\"í¸\",7,\"í‘푂푃푅\",14],[\"be61\",\"í‘”\",7,\"í‘푞푟푡푢푣푥\",7,\"푮푰푱푲\"],[\"be81\",\"푳\",4,\"푺푻푽푾í’í’ƒ\",4,\"풊풌풎\",5,\"í’•\",8,\"ì´ì¼ì½ì‘ˆì‘¤ì‘¥ì‘¨ì‘¬ì‘´ì‘µì‘¹ì’€ì’”쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀ì”씌ì”씔씜씨씩씬씰씸씹씻씽아악안앉않알ì•ì•Žì•“암압앗았앙ì•ì•žì• 액앤앨앰앱앳앴앵야약얀얄얇얌ì–ì–ì–‘ì–•ì–—ì–˜ì–œì– ì–©ì–´ì–µì–¸ì–¹ì–»ì–¼ì–½ì–¾ì—„\",6,\"엌엎\"],[\"bf41\",\"í’ž\",10,\"í’ª\",14],[\"bf61\",\"í’¹\",18,\"í“í“Ží“í“‘í“’í““í“•\"],[\"bf81\",\"í“–\",5,\"í“í“ží“ \",7,\"퓩퓪퓫í“퓮퓯퓱\",6,\"퓹퓺퓼ì—ì—‘ì—”ì—˜ì— ì—¡ì—£ì—¥ì—¬ì—엮연열엶엷염\",5,\"옅옆옇예옌ì˜ì˜˜ì˜™ì˜›ì˜œì˜¤ì˜¥ì˜¨ì˜¬ì˜ì˜®ì˜°ì˜³ì˜´ì˜µì˜·ì˜¹ì˜»ì™€ì™ì™„왈ì™ì™‘왓왔왕왜ì™ì™ 왬왯왱외왹왼욀욈욉욋ìšìš”욕욘욜욤욥욧용우욱운울욹욺움ì›ì›ƒì›…워ì›ì›ì›”웜ì›ì› 웡웨\"],[\"c041\",\"퓾\",5,\"픅픆픇픉픊픋í”\",6,\"픖픘\",5],[\"c061\",\"픞\",25],[\"c081\",\"픸픹픺픻픾픿í•í•‚핃핅\",6,\"í•Ží•í•’\",5,\"í•ší•›í•í•ží•Ÿí•¡í•¢í•£ì›©ì›¬ì›°ì›¸ì›¹ì›½ìœ„ìœ…ìœˆìœŒìœ”ìœ•ìœ—ìœ™ìœ ìœ¡ìœ¤ìœ¨ìœ°ìœ±ìœ³ìœµìœ·ìœ¼ìœ½ì€ì„ìŠìŒììì‘\",7,\"ìœì ì¨ì«ì´ìµì¸ì¼ì½ì¾ìžƒìž„입잇있잉잊잎ìžìž‘ìž”ìž–ìž—ìž˜ìžšìž ìž¡ìž£ìž¤ìž¥ìž¦ìž¬ìžìž°ìž´ìž¼ìž½ìž¿ìŸ€ìŸìŸˆìŸ‰ìŸŒìŸŽìŸìŸ˜ìŸìŸ¤ìŸ¨ìŸ¬ì €ì ì „ì ˆì Š\"],[\"c141\",\"핤핦핧핪핬핮\",5,\"핶핷핹핺핻핽\",6,\"햆햊햋\"],[\"c161\",\"í–Œí–í–Ží–í–‘\",19,\"햦햧\"],[\"c181\",\"í–¨\",31,\"ì ì ‘ì “ì •ì –ì œì ì ì ¤ì ¬ì ì ¯ì ±ì ¸ì ¼ì¡€ì¡ˆì¡‰ì¡Œì¡ì¡”조족존졸졺좀ì¢ì¢ƒì¢…좆좇좋좌ì¢ì¢”ì¢ì¢Ÿì¢¡ì¢¨ì¢¼ì¢½ì£„ì£ˆì£Œì£”ì£•ì£—ì£™ì£ ì£¡ì£¤ì£µì£¼ì£½ì¤€ì¤„ì¤…ì¤†ì¤Œì¤ì¤ì¤‘줘줬줴ì¥ì¥‘ì¥”ì¥˜ì¥ ì¥¡ì¥£ì¥¬ì¥°ì¥´ì¥¼ì¦ˆì¦‰ì¦Œì¦ì¦˜ì¦™ì¦›ì¦ì§€ì§ì§„짇질짊ì§ì§‘짓\"],[\"c241\",\"í—Ší—‹í—í—Ží—í—‘í—“\",4,\"헚헜헞\",5,\"헦헧헩헪헫í—í—®\"],[\"c261\",\"í—¯\",4,\"헶헸헺\",5,\"혂혃혅혆혇혉\",6,\"혒\"],[\"c281\",\"혖\",5,\"í˜í˜ží˜Ÿí˜¡í˜¢í˜£í˜¥\",7,\"혮\",9,\"혺혻징짖짙짚짜ì§ì§ 짢짤짧짬ì§ì§¯ì§°ì§±ì§¸ì§¹ì§¼ì¨€ì¨ˆì¨‰ì¨‹ì¨Œì¨ì¨”쨘쨩쩌ì©ì©ì©”ì©œì©ì©Ÿì© 쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌ì«ì«ì«‘ì«“ì«˜ì«™ì« ì«¬ì«´ì¬ˆì¬ì¬”ì¬˜ì¬ ì¬¡ììˆì‰ìŒìì˜ì™ìì¤ì¸ì¹ì®œì®¸ì¯”쯤쯧쯩찌ì°ì°ì°”ì°œì°ì°¡ì°¢ì°§ì°¨ì°©ì°¬ì°®ì°°ì°¸ì°¹ì°»\"],[\"c341\",\"혽혾혿í™í™‚홃홄홆홇홊홌홎í™í™í™’홓홖홗홙홚홛í™\",4],[\"c361\",\"홢\",4,\"홨홪\",5,\"홲홳홵\",11],[\"c381\",\"íšíš‚횄횆\",5,\"횎íšíš‘íš’íš“íš•\",7,\"íšžíš íš¢\",5,\"íš©íšªì°¼ì°½ì°¾ì±„ì±…ì±ˆì±Œì±”ì±•ì±—ì±˜ì±™ì± ì±¤ì±¦ì±¨ì±°ì±µì²˜ì²™ì²œì² ì²¨ì²©ì²«ì²¬ì²ì²´ì²µì²¸ì²¼ì³„쳅쳇쳉ì³ì³”쳤쳬쳰ì´ì´ˆì´‰ì´Œì´ì´˜ì´™ì´›ì´ì´¤ì´¨ì´¬ì´¹ìµœìµ 쵤쵬ìµìµ¯ìµ±ìµ¸ì¶ˆì¶”축춘출춤춥춧충춰췄췌ì·ì·¨ì·¬ì·°ì·¸ì·¹ì·»ì·½ì¸„ì¸ˆì¸Œì¸”ì¸™ì¸ ì¸¡ì¸¤ì¸¨ì¸°ì¸±ì¸³ì¸µ\"],[\"c441\",\"íš«íšíš®íš¯íš±\",7,\"횺횼\",7,\"훆훇훉훊훋\"],[\"c461\",\"í›í›Ží›í›í›’훓훕훖훘훚\",5,\"훡훢훣훥훦훧훩\",4],[\"c481\",\"훮훯훱훲훳훴훶\",5,\"훾훿íœíœ‚휃휅\",11,\"íœ’íœ“íœ”ì¹˜ì¹™ì¹œì¹Ÿì¹ ì¹¡ì¹¨ì¹©ì¹«ì¹ì¹´ì¹µì¹¸ì¹¼ìº„캅캇캉ìºìº‘ìº”ìº˜ìº ìº¡ìº£ìº¤ìº¥ìº¬ìºì»ì»¤ì»¥ì»¨ì»«ì»¬ì»´ì»µì»·ì»¸ì»¹ì¼€ì¼ì¼„켈ì¼ì¼‘ì¼“ì¼•ì¼œì¼ ì¼¤ì¼¬ì¼ì¼¯ì¼°ì¼±ì¼¸ì½”ì½•ì½˜ì½œì½¤ì½¥ì½§ì½©ì½°ì½±ì½´ì½¸ì¾€ì¾…ì¾Œì¾¡ì¾¨ì¾°ì¿„ì¿ ì¿¡ì¿¤ì¿¨ì¿°ì¿±ì¿³ì¿µì¿¼í€€í€„í€‘í€˜í€í€´í€µí€¸í€¼\"],[\"c541\",\"휕휖휗휚휛íœíœžíœŸíœ¡\",6,\"휪휬휮\",5,\"휶휷휹\"],[\"c561\",\"휺휻휽\",6,\"í…í†íˆíŠ\",5,\"í’í“í•íš\",4],[\"c581\",\"íŸí¢í¤í¦í§í¨íªí«íí®í¯í±í²í³íµ\",6,\"í¾í¿íž€íž‚\",5,\"힊힋í„í…í‡í‰íí”í˜í í¬íí°í´í¼í½í‚키킥킨킬킴킵킷킹타íƒíƒ„탈탉íƒíƒ‘탓탔탕태íƒíƒ 탤탬íƒíƒ¯íƒ°íƒ±íƒ¸í„터턱턴털턺텀í…텃텄텅테í…í…텔템í…í…Ÿí…¡í…¨í…¬í…¼í†„í†ˆí† í†¡í†¤í†¨í†°í†±í†³í†µí†ºí†¼í‡€í‡˜í‡´í‡¸íˆ‡íˆ‰íˆíˆ¬íˆíˆ°íˆ´íˆ¼íˆ½íˆ¿í‰í‰ˆí‰œ\"],[\"c641\",\"ížížŽížíž‘\",6,\"힚힜힞\",5],[\"c6a1\",\"퉤튀íŠíŠ„튈íŠíŠ‘íŠ•íŠœíŠ íŠ¤íŠ¬íŠ±íŠ¸íŠ¹íŠ¼íŠ¿í‹€í‹‚í‹ˆí‹‰í‹‹í‹”í‹˜í‹œí‹¤í‹¥í‹°í‹±í‹´í‹¸íŒ€íŒíŒƒíŒ…파íŒíŒŽíŒíŒ”팖팜íŒíŒŸíŒ 팡팥패팩팬팰팸팹팻팼팽í„í…í¼í½íŽ€íŽ„펌íŽíŽíŽíŽ‘íŽ˜íŽ™íŽœíŽ íŽ¨íŽ©íŽ«íŽíŽ´íŽ¸íŽ¼í„í…íˆí‰íí˜í¡í£í¬íí°í´í¼í½í¿í\"],[\"c7a1\",\"íˆíí‘€í‘„í‘œí‘ í‘¤í‘푯푸푹푼푿풀풂품풉풋í’풔풩퓌í“퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌í•í•í•‘í•˜í•™í•œí• í•¥í•¨í•©í•«í•í•´í•µí•¸í•¼í–„햅햇했행í–향허헉헌í—헒험헙헛í—헤헥헨헬헴헵헷헹혀í˜í˜„혈í˜í˜‘í˜“í˜”í˜•í˜œí˜ \"],[\"c8a1\",\"혤í˜í˜¸í˜¹í˜¼í™€í™…홈홉홋í™í™‘화확환활홧황홰홱홴횃횅회íšíšíš”íšíšŸíš¡íš¨íš¬íš°íš¹íš»í›„í›…í›ˆí›Œí›‘í›”í›—í›™í› í›¤í›¨í›°í›µí›¼í›½íœ€íœ„íœ‘íœ˜íœ™íœœíœ íœ¨íœ©íœ«íœíœ´íœµíœ¸íœ¼í„í‡í‰íí‘í”í–í—í˜í™í í¡í£í¥í©í¬í°í´í¼í½ížížˆíž‰ížŒížíž˜íž™íž›íž\"],[\"caa1\",\"伽佳å‡åƒ¹åŠ å¯å‘µå“¥å˜‰å«å®¶æš‡æž¶æž·æŸ¯æŒç‚痂稼苛茄街袈訶賈è·è»»è¿¦é§•åˆ»å´å„æªæ…¤æ®¼ç脚覺角閣侃刊墾奸姦干幹懇æ€æ†æŸ¬æ¡¿æ¾—癎看磵稈竿簡è‚艮艱諫間乫å–曷渴碣ç«è‘›è¤èŽéž¨å‹˜åŽå ªåµŒæ„Ÿæ†¾æˆ¡æ•¢æŸ‘橄減甘疳監瞰紺邯鑑鑒龕\"],[\"cba1\",\"åŒ£å²¬ç”²èƒ›é‰€é–˜å‰›å ˆå§œå²¡å´—åº·å¼ºå½Šæ…·æ±Ÿç•ºç–†ç³ çµ³ç¶±ç¾Œè…”èˆ¡è–‘è¥è¬›é‹¼é™é±‡ä»‹ä»·å€‹å‡±å¡æ„·æ„¾æ…¨æ”¹æ§ªæ¼‘疥皆盖箇芥蓋豈鎧開喀客å‘ï¤ç²³ç¾¹é†µå€¨åŽ»å±…巨拒æ®æ“šæ“§æ¸ 炬祛è·è¸žï¤‚é½é‰…鋸乾件å¥å·¾å»ºæ„†æ¥—腱虔蹇éµé¨«ä¹žå‚‘æ°æ¡€å„‰åŠåŠ’檢\"],[\"cca1\",\"çž¼éˆé»”劫怯迲åˆæ†©ææ“Šæ ¼æª„æ¿€è†ˆè¦¡éš”å …ç‰½çŠ¬ç”„çµ¹ç¹è‚©è¦‹è´é£éµ‘抉決潔çµç¼ºè¨£å…¼æ…Šç®è¬™é‰—鎌京俓倞傾儆å‹å‹å¿å°å¢ƒåºšå¾‘慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖è¦è¼•é€•é¡é ƒé ¸é©šé¯¨ä¿‚å•“å ºå¥‘å£å±†æ‚¸æˆ’桂械\"],[\"cda1\",\"棨溪界癸磎稽系繫繼計誡谿階鷄å¤å©å‘Šå‘±å›ºå§‘å¤å°»åº«æ‹·æ”·æ•…æ•²æš æž¯æ§æ²½ç—¼çšç¾ç¨¿ç¾”考股è†è‹¦è‹½è°è—è ±è¢´èª¥ï¤ƒè¾œéŒ®é›‡é¡§é«˜é¼“å“斛曲æ¢ç©€è°·éµ å›°å¤å´‘昆梱æ£æ»¾ç¨è¢žé¯¤æ±¨ï¤„骨供公共功å”å·¥ææ拱控攻ç™ç©ºèš£è²¢éžä¸²å¯¡æˆˆæžœç“œ\"],[\"cea1\",\"科è“誇課跨éŽé‹é¡†å»“槨藿éƒï¤…å† å®˜å¯¬æ…£æ£ºæ¬¾çŒç¯ç“˜ç®¡ç½è…觀貫關館刮ææ‹¬é€‚ä¾Šå…‰åŒ¡å£™å»£æ› æ´¸ç‚šç‹‚ç–ç胱鑛å¦æŽ›ç½«ä¹–傀塊壞怪愧æ‹æ§éå®ç´˜è‚±è½Ÿäº¤åƒ‘å’¬å–¬å¬Œå¶ å·§æ”ªæ•Žæ ¡æ©‹ç‹¡çšŽçŸ¯çµžç¿¹è† è•Žè›Ÿè¼ƒè½ŽéƒŠé¤ƒé©•é®«ä¸˜ä¹…ä¹ä»‡ä¿±å…·å‹¾\"],[\"cfa1\",\"å€å£å¥å’Žå˜”åµåž¢å¯‡å¶‡å»æ‡¼æ‹˜æ•‘枸柩構æ毆毬求æºç¸ç‹—玖çƒçž¿çŸ©ç©¶çµ¿è€‰è‡¼èˆ…舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局èŠéž 鞫麴å›çª˜ç¾¤è£™è»éƒ¡å €å±ˆæŽ˜çªŸå®®å¼“穹窮芎躬倦券勸å·åœˆæ‹³æ²æ¬Šæ·ƒçœ·åŽ¥ç—蕨蹶闕机櫃潰è©è»Œé¥‹ï¤†æ™·æ¸è²´\"],[\"d0a1\",\"鬼龜å«åœå¥Žæ†æ§»çªç¡…窺竅糾葵è¦èµ³é€µé–¨å‹»å‡ç•‡ç èŒéˆžï¤ˆæ©˜å…‹å‰‹åŠ‡æˆŸæ£˜æ¥µéš™åƒ…åŠ¤å‹¤æ‡ƒæ–¤æ ¹æ§¿ç‘¾ç‹èŠ¹è«è¦²è¬¹è¿‘饉契今妗擒昑檎ç´ç¦ç¦½èŠ©è¡¾è¡¿è¥Ÿï¤ŠéŒ¦ä¼‹åŠæ€¥æ‰±æ±²ç´šçµ¦äº˜å…¢çŸœè‚¯ä¼ä¼Žå…¶å†€å—œå™¨åœ»åŸºåŸ¼å¤”奇妓寄å²å´Žå·±å¹¾å¿ŒæŠ€æ——æ—£\"],[\"d1a1\",\"朞期æžæ£‹æ£„機欺氣汽沂淇玘ç¦çªç’‚璣畸畿ç¢ç£¯ç¥ç¥‡ç¥ˆç¥ºç®•ç´€ç¶ºç¾ˆè€†è€è‚Œè¨˜è豈起錡錤飢饑騎é¨é©¥éº’緊佶å‰æ‹®æ¡”金喫儺喇奈娜懦ï¤æ‹æ‹¿ï¤Ž\",5,\"那樂\",4,\"諾酪駱亂卵暖ï¤ç…–ï¤žï¤Ÿé›£ï¤ ææºå—嵐æžæ¥ 湳濫男藍襤拉\"],[\"d2a1\",\"ç´ï¤¦ï¤§è¡²å›Šå¨˜ï¤¨\",4,\"乃ï¤å…§å¥ˆæŸ°è€ï¤®å¥³å¹´æ’šç§Šå¿µæ¬æ‹ˆæ»å¯§å¯—努勞奴弩怒擄櫓爐瑙盧\",5,\"駑魯\",10,\"濃籠聾膿農惱牢磊腦賂雷尿壘\",7,\"嫩訥æ»ç´ï¥’\",5,\"能菱陵尼泥匿溺多茶\"],[\"d3a1\",\"丹亶但單團壇彖斷旦檀段æ¹çŸç«¯ç°žç·žè›‹è¢’鄲é›æ’»æ¾¾çºç–¸é”å•–å憺擔曇淡湛æ½æ¾¹ç—°èƒè†½è•è¦ƒè«‡èšéŒŸæ²“ç•“ç”è¸éå”å ‚å¡˜å¹¢æˆ‡æ’žæ£ ç•¶ç³–èž³é»¨ä»£åžˆå®å¤§å°å²±å¸¶å¾…æˆ´æ“¡çŽ³è‡ºè¢‹è²¸éšŠé»›å®…å¾·æ‚³å€’åˆ€åˆ°åœ–å µå¡—å°Žå± å³¶å¶‹åº¦å¾’æ‚¼æŒ‘æŽ‰æ—桃\"],[\"d4a1\",\"棹櫂淘渡滔濤燾盜ç¹ç¦±ç¨»è„覩è³è·³è¹ˆé€ƒé€”é“都é陶韜毒瀆牘犢ç¨ç£ç¦¿ç¯¤çº›è®€å¢©æƒ‡æ•¦æ—½æš¾æ²Œç„žç‡‰è±šé “ä¹çªä»å†¬å‡å‹•åŒæ†§æ±æ¡æ£Ÿæ´žæ½¼ç–¼çž³ç«¥èƒ´è‘£éŠ…兜斗æœæž“痘竇è³ï¥šè±†é€—é 屯臀芚éé¯éˆå¾—å¶æ©™ç‡ˆç™»ç‰è—¤è¬„鄧騰喇懶拏癩羅\"],[\"d5a1\",\"蘿螺裸é‚樂洛烙çžçµ¡è½ï¥é…ªé§±ï¥žäº‚åµæ¬„欒瀾爛è˜é¸žå‰Œè¾£åµæ“¥æ”¬æ¬–濫籃纜è—è¥¤è¦½æ‹‰è‡˜è Ÿå»Šæœ—æµªç‹¼ç…瑯螂郞來å´å¾ èŠå†·æŽ 略亮倆兩凉æ¢æ¨‘粮粱糧良諒輛é‡ä¾¶å„·å‹µå‘‚å»¬æ…®æˆ¾æ—…æ«šæ¿¾ç¤ªè—œè £é–驢驪麗黎力曆æ·ç€ç¤«è½¢é‚æ†æˆ€æ”£æ¼£\"],[\"d6a1\",\"煉璉練è¯è“®è¼¦é€£éŠå†½åˆ—劣洌烈裂廉斂殮濂簾çµä»¤ä¼¶å›¹ï¥Ÿå²ºå¶ºæ€œçŽ²ç¬ç¾šç¿Žè†é€žéˆ´é›¶éˆé ˜é½¡ä¾‹æ¾§ç¦®é†´éš·å‹žï¥ 撈擄櫓潞瀘çˆç›§è€è˜†è™œè·¯è¼…露é¯é·ºé¹µç¢Œç¥¿ç¶ è‰éŒ„鹿麓論壟弄朧瀧ç“ç± è¾å„¡ç€¨ç‰¢ç£Šè³‚賚賴雷了僚寮廖料燎療çžèŠè“¼\"],[\"d7a1\",\"é¼é¬§é¾å£˜å©å±¢æ¨“æ·šæ¼ç˜»ç´¯ç¸·è”žè¤¸é¤é™‹åŠ‰æ—’柳榴æµæºœç€ç‰ç‘ 留瘤硫謬類å…æˆ®é™¸ä¾–å€«å´™æ·ªç¶¸è¼ªå¾‹æ…„æ —ï¥¡éš†å‹’è‚‹å‡œå‡Œæ¥žç¨œç¶¾è±é™µä¿šåˆ©åŽ˜å唎履悧æŽæ¢¨æµ¬çŠç‹¸ç†ç’ƒï¥¢ç—¢ç±¬ç½¹ç¾¸èŽ‰è£è£¡é‡Œé‡é›¢é¯‰åæ½¾ç‡ç’˜è—ºèºªéš£é±—麟林淋ç³è‡¨éœ–ç ¬\"],[\"d8a1\",\"ç«‹ç¬ ç²’æ‘©ç‘ªç—²ç¢¼ç£¨é¦¬é”éº»å¯žå¹•æ¼ è†œèŽ«é‚ˆä¸‡å娩巒彎慢挽晩曼滿漫ç£çžžè¬è”“è »è¼“é¥…é°»å”œæŠ¹æœ«æ²«èŒ‰è¥ªéºäº¡å¦„忘忙望網罔芒茫莽輞邙埋妹媒å¯æ˜§æžšæ¢…æ¯ç…¤ç½µè²·è³£é‚é…脈貊陌驀麥åŸæ°“猛盲盟èŒå†ªè¦“å…å†•å‹‰æ£‰æ²”çœ„çœ ç¶¿ç·¬é¢éºµæ»…\"],[\"d9a1\",\"蔑冥å命明æšæ¤§æºŸçš¿çž‘茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮æŸæ¨¡æ¯æ¯›ç‰Ÿç‰¡ç‘眸矛耗芼茅謀謨貌木æ²ç‰§ç›®ç¦ç©†é¶©æ¿æ²’夢朦蒙å¯å¢“妙廟æ昴æ³æ¸ºçŒ«ç«—è‹—éŒ¨å‹™å·«æ†®æ‡‹æˆŠæ‹‡æ’«æ— æ¥™æ¦æ¯‹ç„¡ç·ç•ç¹†èˆžèŒ‚蕪誣貿霧鵡墨默們刎å»å•æ–‡\"],[\"daa1\",\"汶紊紋èžèšŠé–€é›¯å‹¿æ²•ç‰©å‘³åªšå°¾åµ‹å½Œå¾®æœªæ¢¶æ¥£æ¸¼æ¹„眉米美薇謎迷é¡é»´å²·æ‚¶æ„憫æ•æ—»æ—¼æ°‘泯玟ç‰ç·¡é–”密蜜è¬å‰åšæ‹æ撲朴樸泊ç€ç’žç®”粕縛膊舶薄迫雹é§ä¼´åŠåå›æ‹Œæ¬æ”€æ–‘槃泮潘ç畔瘢盤盼ç£ç£»ç¤¬çµ†èˆ¬èŸ è¿”é ’é£¯å‹ƒæ‹”æ’¥æ¸¤æ½‘\"],[\"dba1\",\"發跋醱鉢髮éƒå€£å‚åŠå¦¨å°¨å¹‡å½·æˆ¿æ”¾æ–¹æ—昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防é¾å€ä¿³ï¥£åŸ¹å¾˜æ‹œæŽ’æ¯æ¹ƒç„™ç›ƒèƒŒèƒšè£´è£µè¤™è³ 輩é…陪伯佰帛æŸæ ¢ç™½ç™¾é„幡樊煩燔番磻ç¹è•ƒè—©é£œä¼ç罰閥凡帆梵氾汎泛犯範范法çºåƒ»åŠˆå£æ“˜æª—璧癖\"],[\"dca1\",\"碧蘗闢霹便åžå¼è®Šè¾¨è¾¯é‚Šåˆ¥çž¥é±‰é¼ˆä¸™å€‚兵屛幷昞昺柄棅炳ç”病秉ç«è¼§é¤ 騈ä¿å ¡å ±å¯¶æ™®æ¥æ´‘湺潽ç¤ç”«è©è£œè¤“èœè¼”ä¼åƒ•åŒåœå®“復æœç¦è…¹èŒ¯è””複覆輹輻馥鰒本乶俸奉å°å³¯å³°æ§æ£’烽熢ç«ç¸«è“¬èœ‚逢鋒鳳ä¸ä»˜ä¿¯å‚…剖副å¦å’åŸ å¤«å©¦\"],[\"dda1\",\"åšåµå¯Œåºœï¥¦æ‰¶æ•·æ–§æµ®æº¥çˆ¶ç¬¦ç°¿ç¼¶è…è…‘è†šè‰€èŠ™èŽ©è¨ƒè² è³¦è³»èµ´è¶ºéƒ¨é‡œé˜œé™„é§™é³§åŒ—åˆ†å©å™´å¢³å¥”奮忿憤扮æ˜æ±¾ç„šç›†ç²‰ç³žç´›èŠ¬è³é›°ï¥§ä½›å¼—彿拂崩朋棚硼繃鵬丕備匕匪å‘妃婢庇悲憊扉批æ–枇榧比毖毗毘沸泌çµç—ºç ’碑秕秘粃緋翡肥\"],[\"dea1\",\"脾臂è²èœšè£¨èª¹è¬è²»é„™éžé£›é¼»åš¬å¬ªå½¬æ–Œæª³æ®¯æµœæ¿±ç€•ç‰çŽè²§è³“é »æ†‘æ°·è˜é¨ä¹äº‹äº›ä»•ä¼ºä¼¼ä½¿ä¿Ÿåƒ¿å²å¸å”†å—£å››å£«å¥¢å¨‘寫寺射巳師徙æ€æ¨æ–œæ–¯æŸ¶æŸ»æ¢æ»æ²™æ³—渣瀉ç…ç ‚ç¤¾ç¥€ç¥ ç§ç¯©ç´—絲肆èˆèŽŽè“‘蛇裟è©è©žè¬è³œèµ¦è¾é‚ªé£¼é§Ÿéºå‰Šï¥©æœ”索\"],[\"dfa1\",\"傘刪山散汕çŠç”£ç–算蒜酸霰乷撒殺煞薩三參æ‰æ£®æ¸—芟蔘衫æ·æ¾éˆ’颯上傷åƒå„Ÿå•†å–ªå˜—å€å°™å³ å¸¸åºŠåº å»‚æƒ³æ¡‘æ©¡æ¹˜çˆ½ç‰€ç‹€ç›¸ç¥¥ç®±ç¿”è£³è§´è©³è±¡è³žéœœå¡žç’½è³½å—‡ï¥¬ç©¡ç´¢è‰²ç‰²ç”Ÿç”¥ï¥ç¬™å¢…壻嶼åºåº¶å¾æ•æŠ’æ¿æ•æš‘æ›™æ›¸æ –æ£²çŠ€ç‘žç®çµ®ç·–ç½²\"],[\"e0a1\",\"胥舒薯西誓é€é‹¤é»é¼ 夕å¥å¸æƒœæ˜”晳æžæ±æ·…潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽ç瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣é¸éŠ‘é¥é¥é®®å¨å±‘楔泄洩渫舌薛褻è¨èªªé›ªé½§å‰¡æš¹æ®²çº–蟾è´é–ƒé™æ”涉燮葉城姓宬性惺æˆæ˜Ÿæ™ŸçŒ©ç¹ç››çœç¬\"],[\"e1a1\",\"è–è²è…¥èª 醒世勢æ²æ´—稅笹細說貰å¬å˜¯å¡‘宵å°å°‘巢所掃æ”æ˜æ¢³æ²¼æ¶ˆæº¯ç€Ÿç‚¤ç‡’甦ç–ç–Žç˜™ç¬‘ç¯ ç°«ç´ ç´¹è”¬è•è˜‡è¨´é€é¡é‚µéŠ·éŸ¶é¨·ä¿—屬æŸæ¶‘粟續謖贖速å«å·½æè“€éœé£¡çŽ‡å®‹æ‚šæ¾æ·žè¨Ÿèª¦é€é Œåˆ·ï¥°ç‘碎鎖衰釗修å—嗽囚垂壽嫂守岫峀帥æ„\"],[\"e2a1\",\"æˆæ‰‹æŽˆæœæ”¶æ•¸æ¨¹æ®Šæ°´æ´™æ¼±ç‡§ç‹©ç¸ç‡ç’²ç˜¦ç¡ç§€ç©—竪粹ç¶ç¶¬ç¹¡ç¾žè„©èŒ±è’蓚藪袖誰è®è¼¸é‚é‚ƒé…¬éŠ–éŠ¹éš‹éš§éš¨é›–éœ€é ˆé¦–é«“é¬šå”塾夙å°å®¿æ·‘潚熟ç¡ç’¹è‚…è½å·¡å¾‡å¾ªæ‚æ—¬æ ’æ¥¯æ©“æ®‰æ´µæ·³ç£ç›¾çž¬ç純脣舜è€è“´è•£è©¢è«„é†‡éŒžé †é¦´æˆŒè¡“è¿°é‰¥å´‡å´§\"],[\"e3a1\",\"嵩瑟è†è¨æ¿•æ‹¾ç¿’褶襲丞乘僧å‹å‡æ‰¿æ˜‡ç¹©è …陞ä¾åŒ™å˜¶å§‹åª¤å°¸å±Žå±å¸‚弑æƒæ–½æ˜¯æ™‚枾柴猜矢示翅蒔è“視試詩諡豕豺埴寔å¼æ¯æ‹æ¤æ®–湜熄篒è•è˜è»¾é£Ÿé£¾ä¼¸ä¾ä¿¡å‘»å¨ 宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心æ²\"],[\"e4a1\",\"沈深瀋甚芯諶什å拾雙æ°äºžä¿„兒啞娥峨我牙芽莪蛾衙è¨é˜¿é›…餓鴉éµå Šå²³å¶½å¹„惡愕æ¡æ¨‚渥鄂é”é¡Žé°é½·å®‰å²¸æŒ‰æ™æ¡ˆçœ¼é›éžé¡”鮟斡è¬è»‹é–¼å”µå²©å·–庵暗癌è´é—‡å£“押狎鴨仰央æ€æ˜»æ®ƒç§§é´¦åŽ“哀埃崖愛曖涯ç¢è‰¾éš˜é„厄扼掖液縊腋é¡\"],[\"e5a1\",\"櫻罌鶯鸚也倻冶夜惹æ¶æ¤°çˆºè€¶ï¥´é‡Žå¼±ï¥µï¥¶ç´„若葯蒻藥èºï¥·ä½¯ï¥¸ï¥¹å£¤åƒæ™æšæ”˜æ•æš˜ï¥ºæ¥Šæ¨£æ´‹ç€ç…¬ç—’ç˜ç¦³ç©°ï¥»ç¾Šï¥¼è¥„諒讓釀陽量養圄御於æ¼ç˜€ç¦¦èªžé¦éšé½¬å„„憶抑æªè‡†åƒå °å½¦ç„‰è¨€è«ºå¼è˜–俺儼嚴奄掩淹嶪æ¥å††äºˆä½™ï¥¿ï¦€ï¦å¦‚廬\"],[\"e6a1\",\"旅æŸæ±ï¦„璵礖礪與艅茹輿è½ï¦†é¤˜ï¦‡ï¦ˆï¦‰äº¦ï¦ŠåŸŸå½¹æ˜“曆歷疫繹è¯ï¦é€†é©›åš¥å §å§¸å¨Ÿå®´ï¦Žå»¶ï¦ï¦æ挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉ç¡ç¡¯ï¦•çµç·£ï¦–縯聯è¡è»Ÿï¦˜ï¦™ï¦šé‰›ï¦›é³¶ï¦œï¦ï¦žæ‚…æ¶…ï¦Ÿç†±ï¦ ï¦¡é–±åŽï¦¢ï¦£ï¦¤æŸ“殮炎焰ç°è‰¶è‹’\"],[\"e7a1\",\"簾閻髥鹽曄獵ç‡è‘‰ï¦¨ï¦©å¡‹ï¦ªï¦«å¶¸å½±ï¦¬æ˜ 暎楹榮永泳渶æ½æ¿šç€›ç€¯ç…營ç°ï¦ç‘›ï¦®ç“”ç›ˆç©Žçº“ï¦¯ï¦°è‹±è© è¿Žï¦±éˆï¦²éœ™ï¦³ï¦´ä¹‚倪例刈å¡æ›³æ±æ¿ŠçŒŠç¿ç©¢èŠ®è—蘂禮裔詣è½è±«ï¦·éŠ³ï¦¸éœ“é 五ä¼ä¿‰å‚²åˆå¾å³å—šå¡¢å¢ºå¥§å¨›å¯¤æ‚Ÿï¦¹æ‡Šæ•–旿晤梧汚澳\"],[\"e8a1\",\"çƒç†¬ç’ç½èœˆèª¤é°²é¼‡å±‹æ²ƒç„玉鈺溫瑥瘟穩縕蘊兀壅æ“瓮甕癰ç¿é‚•é›é¥”渦瓦窩窪臥蛙è¸è¨›å©‰å®Œå®›æ¢¡æ¤€æµ£çŽ©ç“ç¬ç¢—ç·©ç¿«è„˜è…•èŽžè±Œé˜®é ‘æ›°å¾€æ—ºæž‰æ±ªçŽ‹å€å¨ƒæªçŸ®å¤–嵬å·çŒ¥ç•ï¦ºï¦»åƒ¥å‡¹å ¯å¤å¦–姚寥寮尿嶢拗æ–撓擾料曜樂橈燎燿瑤ï§\"],[\"e9a1\",\"窈窯繇繞耀腰蓼蟯è¦è¬ é™ï§ƒé‚€é¥’慾欲浴縟褥辱俑å‚冗勇埇墉容庸慂榕涌湧溶熔瑢用甬è³èŒ¸è“‰è¸ŠéŽ”éžï§„于佑å¶å„ªåˆå‹å³å®‡å¯“尤愚憂旴牛玗瑀盂ç¥ç¦‘禹紆羽芋藕虞迂é‡éƒµé‡ªéš…雨雩勖彧æ—æ˜±æ ¯ç…œç¨¶éƒé Šäº‘暈橒殞æ¾ç†‰è€˜èŠ¸è•“\"],[\"eaa1\",\"é‹éš•é›²éŸ»è”šé¬±äºç†Šé›„元原員圓園垣媛嫄寃怨愿æ´æ²…洹湲æºçˆ°çŒ¿ç‘—è‹‘è¢è½…é 阮院願鴛月越鉞ä½å‰åƒžå±åœå§”å¨å°‰æ…°æšæ¸çˆ²ç‘‹ç·¯èƒƒèŽè‘¦è”¿èŸè¡›è¤˜è¬‚é•éŸ‹é乳侑儒兪劉唯喩åºå®¥å¹¼å¹½åº¾æ‚ 惟愈愉æ„攸有杻柔柚柳楡楢油洧流游溜\"],[\"eba1\",\"濡猶猷琉瑜由ï§ç™’硫ï§ç¶è‡¾è¸è£•èª˜è«›è«è¸°è¹‚éŠé€¾éºé…‰é‡‰é®ï§ï§‘å ‰ï§’æ¯“è‚‰è‚²ï§“ï§”å…奫尹崙淪潤玧胤贇輪鈗é–律慄栗率è¿æˆŽç€œçµ¨èžï§œåž æ©æ…‡æ®·èª¾éŠ€éš±ä¹™åŸæ·«è”陰音飮æ–泣邑å‡æ‡‰è†ºé·¹ä¾å€šå„€å®œæ„懿擬椅毅疑矣義艤è–蟻衣誼\"],[\"eca1\",\"è°é†«äºŒä»¥ä¼Šï§ï§žå¤·å§¨ï§Ÿå·²å¼›å½›æ€¡ï§ 李梨泥爾ç¥ï§¤ç•°ç—痢移罹而耳肄苡è‘裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人ä»åˆƒå°ï§å’½å› 姻寅引å¿æ¹®ï§®ï§¯çµªèŒµï§°èš“èªï§±éé·ï§²ï§³ä¸€ä½šä½¾å£¹æ—¥æº¢é€¸éŽ°é¦¹ä»»å£¬å¦Šå§™æ林淋稔臨è賃入å„\"],[\"eda1\",\"立笠粒ä»å‰©å•èŠ¿ä»”刺咨姉姿åå—åœæ£æ…ˆæ»‹ç‚™ç…®çŽ†ç“·ç–µç£ç´«è€…自茨蔗藉諮資雌作勺嚼斫昨ç¼ç‚¸çˆµç¶½èŠé…Œé›€éµ²å±æ£§æ®˜æ½ºç›žå²‘æš«æ½›ç®´ç°ªè ¶é›œä¸ˆä»—åŒ å ´å¢»å£¯å¥¬å°‡å¸³åº„å¼µæŽŒæš²æ–樟檣欌漿牆狀çç’‹ç« ç²§è…¸è‡Ÿè‡§èŽŠè‘¬è”£è–”è—è£è´“醬長\"],[\"eea1\",\"éšœå†å“‰åœ¨å®°æ‰ææ ½æ¢“æ¸½æ»“ç½ç¸¡è£è²¡è¼‰é½‹é½Žçˆç®è«éŒšä½‡ä½Žå„²å’€å§åº•æŠµæµæ¥®æ¨—沮渚狙猪疽箸紵苧è¹è‘—藷詛貯躇這邸雎齟勣åŠå«¡å¯‚摘敵滴狄炙的ç©ç¬›ç±ç¸¾ç¿Ÿè»è¬«è³Šèµ¤è·¡è¹Ÿè¿ªè¿¹é©é‘佃佺傳全典å‰å‰ªå¡¡å¡¼å¥ å°ˆå±•å»›æ‚›æˆ°æ “æ®¿æ°ˆæ¾±\"],[\"efa1\",\"ç…Žç 田甸畑癲çŒç®‹ç®ç¯†çºè©®è¼¾è½‰éˆ¿éŠ“錢é«é›»é¡šé¡«é¤žåˆ‡æˆªæŠ˜æµ™ç™¤ç«Šç¯€çµ¶å 岾店漸点粘霑鮎點接摺è¶ä¸äº•äºåœåµå‘ˆå§ƒå®šå¹€åºå»·å¾æƒ…挺政整旌晶晸柾楨檉æ£æ±€æ·€æ·¨æ¸Ÿæ¹žç€žç‚¡çŽŽç½ç”ºç›ç¢‡ç¦Žç¨‹ç©½ç²¾ç¶Žè‰‡è¨‚諪貞é„é…Šé‡˜é‰¦é‹ŒéŒ éœ†é–\"],[\"f0a1\",\"éœé ‚é¼Žåˆ¶åŠ‘å•¼å ¤å¸å¼Ÿæ‚Œæ梯濟ç¥ç¬¬è‡è–ºè£½è«¸è¹„é†é™¤éš›éœ½é¡Œé½Šä¿Žå…†å‡‹åŠ©å˜²å¼”彫措æ“æ—©æ™æ›ºæ›¹æœæ¢æ£—æ§½æ¼•æ½®ç…§ç‡¥çˆªç’ªçœºç¥–ç¥šç§Ÿç¨ çª•ç²—ç³Ÿçµ„ç¹°è‚‡è—»èš¤è©”èª¿è¶™èºé€ é釣阻雕鳥æ—簇足éƒå˜å°Šå’æ‹™çŒå€§å®—從悰慫棕淙ç®ç¨®çµ‚綜縱腫\"],[\"f1a1\",\"踪踵é¾é˜ä½å左座挫罪主ä½ä¾åšå§èƒ„呪周嗾å¥å®™å·žå»šæ™æœ±æŸ±æ ªæ³¨æ´²æ¹Šæ¾ç‚·ç 疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄é§ç«¹ç²¥ä¿Šå„å‡†åŸˆå¯¯å³»æ™™æ¨½æµšæº–æ¿¬ç„Œç•¯ç«£è ¢é€¡éµé›‹é§¿èŒä¸ä»²è¡†é‡å½æ«›æ¥«æ±è‘ºå¢žæ†Žæ›¾æ‹¯çƒç”‘症繒蒸è‰è´ˆä¹‹åª\"],[\"f2a1\",\"咫地å€å¿—æŒæŒ‡æ‘¯æ”¯æ—¨æ™ºæžæž³æ¢æ± æ²šæ¼¬çŸ¥ç ¥ç¥‰ç¥—ç´™è‚¢è„‚è‡³èŠèŠ·èœ˜èªŒï§¼è´„趾é²ç›´ç¨™ç¨·ç¹”è·å”‡å—”塵振æ¢æ™‰æ™‹æ¡æ¦›æ®„津溱ç瑨璡畛疹盡眞瞋秦縉ç¸è‡»è”¯è¢—診賑軫辰進éŽé™£é™³éœ‡ä¾„å±å§ªå«‰å¸™æ¡Žç“†ç–¾ç§©çª’膣è›è³ªè·Œè¿æ–Ÿæœ•ï§½åŸ·æ½—ç·è¼¯\"],[\"f3a1\",\"é¶é›†å¾µæ‡²æ¾„且侘借å‰å—Ÿåµ¯å·®æ¬¡æ¤ç£‹ç®šï§¾è¹‰è»Šé®æ‰æ¾ç€çª„錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽é¤é¥Œåˆ¹å¯Ÿæ“¦æœç´®åƒåƒå¡¹æ…˜æ…™æ‡ºæ–¬ç«™è®’è®–å€‰å€¡å‰µå”±å¨¼å» å½°æ„´æ•žæ˜Œæ˜¶æš¢æ§æ»„漲猖瘡窓脹艙è–è’¼å‚µåŸ°å¯€å¯¨å½©æŽ¡ç ¦ç¶µèœè”¡é‡‡é‡µå†ŠæŸµç–\"],[\"f4a1\",\"è²¬å‡„å¦»æ‚½è™•å€œï§¿å‰”å°ºæ…½æˆšæ‹“æ“²æ–¥æ»Œç˜ è„Šè¹ é™Ÿéš»ä»Ÿåƒå–˜å¤©å·æ“…泉淺玔穿舛薦賤è¸é·é‡§é—¡é˜¡éŸ†å‡¸å“²å–†å¾¹æ’¤æ¾ˆç¶´è¼Ÿè½éµåƒ‰å°–æ²¾æ·»ç”›çž»ç°½ç±¤è©¹è«‚å žå¦¾å¸–æ·ç‰’ç–Šç«è«œè²¼è¼’廳晴淸è½èè«‹é‘é¯–ï¨€å‰ƒæ›¿æ¶•æ»¯ç· è«¦é€®éžé«”åˆå‰¿å“¨æ†”抄招梢\"],[\"f5a1\",\"椒楚樵炒焦ç¡ç¤ç¤Žç§’ç¨è‚–艸苕è‰è•‰è²‚超酢醋醮促囑ç‡çŸ—蜀觸寸忖æ‘邨å¢å¡šå¯µæ‚¤æ†æ‘ 總è°è”¥éŠƒæ’®å‚¬å´”最墜抽推椎楸樞湫皺秋芻è©è«è¶¨è¿½é„’酋醜éŒéŒ˜éŽšé››é¨¶é°ä¸‘ç•œç¥ç«ºç‘築縮蓄蹙蹴軸é€æ˜¥æ¤¿ç‘ƒå‡ºæœ®é»œå……å¿ æ²–èŸ²è¡è¡·æ‚´è†µèƒ\"],[\"f6a1\",\"è´…å–å¹å˜´å¨¶å°±ç‚Šç¿ èšè„†è‡è¶£é†‰é©Ÿé·²å´ä»„åŽ æƒ»æ¸¬å±¤ä¾ˆå€¤å—¤å³™å¹Ÿæ¥æ¢”治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅é£è¦ªä¸ƒæŸ’漆侵寢枕沈浸ç›ç §é‡é¼èŸ„秤稱快他咤唾墮妥惰打拖朶楕舵陀馱é§å€¬å“å•„å¼ï¨æ‰˜ï¨‚擢晫æŸæ¿æ¿¯ç¢ç¸è¨—\"],[\"f7a1\",\"é¸å‘‘嘆å¦å½ˆæ†šæŽç˜ç‚綻誕奪脫探眈耽貪塔æ榻宕帑湯糖蕩兌å°å¤ªæ€ 態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎å土討慟桶洞痛ç’çµ±é€šå †æ§Œè…¿è¤ªé€€é ¹å¸å¥—妬投é€é¬ªæ…特闖å¡å©†å·´æŠŠæ’擺æ·æ³¢æ´¾çˆ¬ç¶ç ´ç½·èŠè·›é —判å‚æ¿ç‰ˆç“£è²©è¾¦éˆ‘\"],[\"f8a1\",\"阪八åæŒä½©å”„悖敗沛浿牌狽稗覇è²å½æ¾Žçƒ¹è†¨æ„Žä¾¿åæ‰ç‰‡ç¯‡ç·¨ç¿©ééžé¨™è²¶åªå¹³æž°èè©•å 嬖幣廢弊斃肺蔽閉陛佈包åŒåŒå’†å“ºåœƒå¸ƒæ€–抛抱æ•ï¨†æ³¡æµ¦ç–±ç ²èƒžè„¯è‹žè‘¡è’²è¢è¤’逋鋪飽鮑幅暴æ›ç€‘爆輻俵剽彪慓æ“標漂瓢票表豹飇飄驃\"],[\"f9a1\",\"å“稟楓諷豊風馮彼披疲皮被é¿é™‚匹弼必泌çŒç•¢ç–‹ç†è‹¾é¦ä¹é€¼ä¸‹ä½•åŽ¦å¤å»ˆæ˜°æ²³ç‘•è·è¦è³€é霞鰕壑å¸è™è¬”鶴寒æ¨æ‚旱汗漢澣瀚罕翰閑閒é™éŸ“割轄函å«å’¸å•£å–Šæª»æ¶µç·˜è‰¦éŠœé™·é¹¹åˆå“ˆç›’蛤閤闔陜亢伉姮嫦巷æ’抗ææ¡æ²†æ¸¯ç¼¸è‚›èˆª\"],[\"faa1\",\"ï¨ˆï¨‰é …äº¥å•å’³åž“奚å©å®³æ‡ˆæ¥·æµ·ç€£èŸ¹è§£è©²è«§é‚‚é§éª¸åŠ¾æ ¸å€–幸æè‡è¡Œäº«å‘åš®ç¦é„•éŸ¿é¤‰é¥—香噓墟虛許憲櫶ç»è»’æ‡éšªé©—奕爀赫é©ä¿”峴弦懸晛泫炫玄玹ç¾çœ©ç絃絢縣舷衒見賢鉉顯å‘ç©´è¡€é å«Œä¿ å”夾峽挾浹狹脅脇莢é‹é °äº¨å…„刑型\"],[\"fba1\",\"形泂滎瀅ç炯熒ç©ç‘©èŠèž¢è¡¡é€ˆé‚¢éŽ£é¦¨å…®å½—æƒ æ…§æš³è•™è¹Šé†¯éž‹ä¹Žäº’å‘¼å£•å£ºå¥½å²µå¼§æˆ¶æ‰ˆæ˜Šæ™§æ¯«æµ©æ·æ¹–æ»¸æ¾”æ¿ æ¿©çç‹ç¥ç‘šç“ 皓祜糊縞胡芦葫蒿虎號è´è·è±ªéŽ¬é €é¡¥æƒ‘或酷婚æ˜æ··æ¸¾ç¿é‚忽惚ç¬å“„弘汞泓洪烘紅虹訌鴻化和嬅樺ç«ç•µ\"],[\"fca1\",\"ç¦ç¦¾èŠ±è¯è©±è貨é´ï¨‹æ“´æ”«ç¢ºç¢»ç©«ä¸¸å–šå¥å®¦å¹»æ‚£æ›æ¡æ™¥æ¡“渙煥環紈還驩鰥活滑猾è±é—Šå‡°å¹Œå¾¨æ惶愰慌晃晄榥æ³æ¹Ÿæ»‰æ½¢ç…Œç’œçš‡ç¯ç°§è’è—é‘éšé»ƒåŒ¯å›žå»»å¾Šæ¢æ‚”懷晦會檜淮澮ç°çªç¹ªè†¾èŒ´è›”誨賄劃ç²å®–æ©«é„哮嚆å效斅曉梟æ¶æ·†\"],[\"fda1\",\"爻肴酵é©ä¾¯å€™åŽšåŽå¼å–‰å—…帿後朽煦ç逅勛勳塤壎焄ç†ç‡»è–°è¨“暈薨喧暄煊è±å‰å–™æ¯å½™å¾½æ®æš‰ç…‡è«±è¼éº¾ä¼‘æºçƒ‹ç•¦è™§æ¤èŽé·¸å…‡å‡¶åŒˆæ´¶èƒ¸é»‘昕欣炘痕åƒå±¹ç´‡è¨–æ¬ æ¬½æ†å¸æ°æ´½ç¿•èˆˆåƒ–凞喜噫å›å§¬å¬‰å¸Œæ†™æ†˜æˆ±æ™žæ›¦ç†™ç†¹ç†ºçŠ§ç¦§ç¨€ç¾²è©°\"]]"); /***/ }), -/* 883 */ +/* 880 */ /***/ (function(module) { module.exports = JSON.parse("[[\"0\",\"\\u0000\",127],[\"a140\",\" ,ã€ã€‚.‧;:?ï¼ï¸°â€¦â€¥ï¹ï¹‘﹒·﹔﹕﹖﹗|–︱—︳╴︴ï¹ï¼ˆï¼‰ï¸µï¸¶ï½›ï½ï¸·ï¸¸ã€”〕︹︺ã€ã€‘︻︼《》︽︾〈〉︿﹀「ã€ï¹ï¹‚『ã€ï¹ƒï¹„﹙﹚\"],[\"a1a1\",\"﹛﹜ï¹ï¹žâ€˜â€™â€œâ€ã€ã€žâ€µâ€²ï¼ƒï¼†ï¼Šâ€»Â§ã€ƒâ—‹â—△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_Ë﹉﹊ï¹ï¹Žï¹‹ï¹Œï¹Ÿï¹ ﹡+ï¼Ã—÷±√<>ï¼â‰¦â‰§â‰ ∞≒≡﹢\",4,\"~∩∪⊥∠∟⊿ã’ã‘∫∮∵∴♀♂⊕⊙↑↓â†â†’↖↗↙↘∥∣ï¼\"],[\"a240\",\"ï¼¼âˆ•ï¹¨ï¼„ï¿¥ã€’ï¿ ï¿¡ï¼…ï¼ â„ƒâ„‰ï¹©ï¹ªï¹«ã•ãŽœãŽãŽžãŽãŽ¡ãŽŽãŽã„°兙兛兞å…兡兣嗧瓩糎â–\",7,\"â–â–Žâ–▌▋▊▉┼┴┬┤├▔─│▕┌â”└┘â•\"],[\"a2a1\",\"╮╰╯â•â•žâ•ªâ•¡â—¢â—£â—¥â—¤â•±â•²â•³ï¼\",9,\"â… \",9,\"〡\",8,\"åå„å…A\",25,\"ï½\",21],[\"a340\",\"wxyzΑ\",16,\"Σ\",6,\"α\",16,\"σ\",6,\"ã„…\",10],[\"a3a1\",\"ã„\",25,\"˙ˉˊˇˋ\"],[\"a3e1\",\"€\"],[\"a440\",\"一乙ä¸ä¸ƒä¹ƒä¹äº†äºŒäººå„¿å…¥å…«å‡ 刀åˆåŠ›åŒ•ååœåˆä¸‰ä¸‹ä¸ˆä¸Šä¸«ä¸¸å‡¡ä¹…么也乞于亡兀刃勺åƒå‰å£åœŸå£«å¤•å¤§å¥³åå‘å“寸å°å°¢å°¸å±±å·å·¥å·±å·²å·³å·¾å¹²å»¾å¼‹å¼“æ‰\"],[\"a4a1\",\"丑ä¸ä¸ä¸ä¸°ä¸¹ä¹‹å°¹äºˆäº‘井互五亢ä»ä»€ä»ƒä»†ä»‡ä»ä»Šä»‹ä»„å…ƒå…å…§å…兮公冗凶分切刈勻勾勿化匹åˆå‡å…åžåŽ„å‹åŠå壬天夫太å¤å”å°‘å°¤å°ºå±¯å·´å¹»å»¿å¼”å¼•å¿ƒæˆˆæˆ¶æ‰‹æ‰Žæ”¯æ–‡æ–—æ–¤æ–¹æ—¥æ›°æœˆæœ¨æ¬ æ¢æ¹æ¯‹æ¯”毛æ°æ°´ç«çˆªçˆ¶çˆ»ç‰‡ç‰™ç‰›çŠ¬çŽ‹ä¸™\"],[\"a540\",\"世丕且丘主ä¹ä¹ä¹Žä»¥ä»˜ä»”ä»•ä»–ä»—ä»£ä»¤ä»™ä»žå……å…„å†‰å†Šå†¬å‡¹å‡ºå‡¸åˆŠåŠ åŠŸåŒ…åŒ†åŒ—åŒä»ŸåŠå‰å¡å å¯å®åŽ»å¯å¤å³å¬å®å©å¨å¼å¸åµå«å¦åªå²å±å°å¥åå»å››å›šå¤–\"],[\"a5a1\",\"央失奴奶å•å®ƒå°¼å·¨å·§å·¦å¸‚布平幼å¼å¼˜å¼—必戊打扔扒扑斥旦朮本未末æœæ£æ¯æ°‘æ°æ°¸æ±æ±€æ°¾çŠ¯çŽ„玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕ä¼ä¼ä¼‘ä¼ä»²ä»¶ä»»ä»°ä»³ä»½ä¼ä¼‹å…‰å…‡å…†å…ˆå…¨\"],[\"a640\",\"å…±å†å†°åˆ—åˆ‘åˆ’åˆŽåˆ–åŠ£åŒˆåŒ¡åŒ å°å±å‰ååŒåŠååå‹å„å‘ååˆåƒåŽå†å’å› å›žå›åœ³åœ°åœ¨åœåœ¬åœ¯åœ©å¤™å¤šå¤·å¤¸å¦„奸妃好她如å¦å—å˜å®‡å®ˆå®…安寺尖屹州帆并年\"],[\"a6a1\",\"å¼å¼›å¿™å¿–戎戌æˆæˆæ‰£æ‰›æ‰˜æ”¶æ—©æ—¨æ—¬æ—曲曳有朽朴朱朵次æ¤æ»æ°–æ±æ±—æ±™æ±Ÿæ± æ±æ±•æ±¡æ±›æ±æ±Žç°ç‰Ÿç‰ç™¾ç«¹ç±³ç³¸ç¼¶ç¾Šç¾½è€è€ƒè€Œè€’耳è¿è‚‰è‚‹è‚Œè‡£è‡ªè‡³è‡¼èˆŒèˆ›èˆŸè‰®è‰²è‰¾è™«è¡€è¡Œè¡£è¥¿é˜¡ä¸²äº¨ä½ä½ä½‡ä½—佞伴佛何估ä½ä½‘伽伺伸佃佔似但佣\"],[\"a740\",\"ä½œä½ ä¼¯ä½Žä¼¶ä½™ä½ä½ˆä½šå…Œå…‹å…兵冶冷別判利刪刨劫助努劬匣å³åµåååžå¾å¦å‘Žå§å‘†å‘ƒå³å‘ˆå‘‚å›å©å‘Šå¹å»å¸å®åµå¶å å¼å‘€å±å«åŸå¬å›ªå›°å›¤å›«åŠå‘å€å\"],[\"a7a1\",\"å‡åŽåœ¾åå圻壯夾å¦å¦’妨妞妣妙妖å¦å¦¤å¦“妊妥ååœåšå›å®Œå®‹å®å°¬å±€å±å°¿å°¾å²å²‘岔岌巫希åºåº‡åºŠå»·å¼„弟彤形彷役忘忌志å¿å¿±å¿«å¿¸å¿ªæˆ’我抄抗抖技扶抉æ‰æŠŠæ‰¼æ‰¾æ‰¹æ‰³æŠ’扯折扮投抓抑抆改攻攸旱更æŸæŽæææ‘æœæ–æžæ‰æ†æ \"],[\"a840\",\"æ“æ—æ¥æ¯æ±‚汞沙æ²æ²ˆæ²‰æ²…沛汪決æ²æ±°æ²Œæ±¨æ²–沒汽沃汲汾汴沆汶æ²æ²”沘沂ç¶ç¼ç½ç¸ç‰¢ç‰¡ç‰ 狄狂玖甬甫男甸皂盯矣ç§ç§€ç¦¿ç©¶ç³»ç½•è‚–è‚“è‚肘肛肚育良芒\"],[\"a8a1\",\"芋èŠè¦‹è§’言谷豆豕è²èµ¤èµ°è¶³èº«è»Šè¾›è¾°è¿‚迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯ä¾ä¾ä½³ä½¿ä½¬ä¾›ä¾‹ä¾†ä¾ƒä½°ä½µä¾ˆä½©ä½»ä¾–ä½¾ä¾ä¾‘佺兔兒兕兩具其典冽函刻券刷刺到刮制å‰åŠ¾åŠ»å’å”å“å‘å¦å·å¸å¹å–å”å—味呵\"],[\"a940\",\"咖呸咕咀呻呷咄咒咆呼å’呱呶和咚呢周咋命咎固垃å·åªå©å¡å¦å¤å¼å¤œå¥‰å¥‡å¥ˆå¥„奔妾妻委妹妮姑姆å§å§å§‹å§“姊妯妳姒姅åŸå¤å£å®—定官宜宙宛尚屈居\"],[\"a9a1\",\"屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往å¾å½¿å½¼å¿å¿ 忽念忿æ€æ€”怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押æ‹æ‹™æ‹‡æ‹æŠµæ‹šæŠ±æ‹˜æ‹–拗拆抬拎放斧於旺昔易昌昆昂明昀æ˜æ˜•æ˜Š\"],[\"aa40\",\"昇æœæœ‹ææž‹æž•æ±æžœæ³æ·æž‡æžæž—æ¯æ°æ¿æž‰æ¾æžæµæžšæž“æ¼æªæ²æ¬£æ¦æ§æ¿æ°“氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油æ³æ²®æ³—æ³…æ³±æ²¿æ²»æ³¡æ³›æ³Šæ²¬æ³¯æ³œæ³–æ³ \"],[\"aaa1\",\"炕炎炒炊炙爬çˆçˆ¸ç‰ˆç‰§ç‰©ç‹€ç‹Žç‹™ç‹—ç‹çŽ©çŽ¨çŽŸçŽ«çŽ¥ç”½ç–疙疚的盂盲直知矽社祀ç¥ç§‰ç§ˆç©ºç©¹ç«ºç³¾ç½”羌羋者肺肥肢肱股肫肩肴肪肯臥臾èˆèŠ³èŠèŠ™èŠèŠ½èŠŸèŠ¹èŠ±èŠ¬èŠ¥èŠ¯èŠ¸èŠ£èŠ°èŠ¾èŠ·è™Žè™±åˆè¡¨è»‹è¿Žè¿”近邵邸邱邶采金長門阜陀阿阻附\"],[\"ab40\",\"陂隹雨é’éžäºŸäºäº®ä¿¡ä¾µä¾¯ä¾¿ä¿ ä¿‘ä¿ä¿ä¿ƒä¾¶ä¿˜ä¿Ÿä¿Šä¿—ä¾®ä¿ä¿„ä¿‚ä¿šä¿Žä¿žä¾·å…—å†’å†‘å† å‰Žå‰ƒå‰Šå‰å‰Œå‰‹å‰‡å‹‡å‹‰å‹ƒå‹åŒå—å»åŽšå›å’¬å“€å’¨å“Žå“‰å’¸å’¦å’³å“‡å“‚咽咪å“\"],[\"aba1\",\"å“„å“ˆå’¯å’«å’±å’»å’©å’§å’¿å›¿åž‚åž‹åž åž£åž¢åŸŽåž®åž“å¥•å¥‘å¥å¥Žå¥å§œå§˜å§¿å§£å§¨å¨ƒå§¥å§ªå§šå§¦å¨å§»å©å®£å®¦å®¤å®¢å®¥å°å±Žå±å±å±‹å³™å³’å··å¸å¸¥å¸Ÿå¹½åº 度建弈å¼å½¥å¾ˆå¾…徊律徇後徉怒æ€æ€ 急怎怨ææ°æ¨æ¢æ†æƒæ¬æ«æªæ¤æ‰æ‹œæŒ–按拼æ‹æŒæ‹®æ‹½æŒ‡æ‹±æ‹·\"],[\"ac40\",\"拯括拾拴挑挂政故斫施既春æ˜æ˜ 昧是星昨昱昤曷柿染柱柔æŸæŸ¬æž¶æž¯æŸµæŸ©æŸ¯æŸ„柑枴柚查枸æŸæŸžæŸ³æž°æŸ™æŸ¢æŸæŸ’æªæ®ƒæ®†æ®µæ¯’毗氟泉洋洲洪æµæ´¥æ´Œæ´±æ´žæ´—\"],[\"aca1\",\"活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯ç‚ç‚¸ç‚®ç‚¤çˆ°ç‰²ç‰¯ç‰´ç‹©ç‹ ç‹¡çŽ·çŠçŽ»çŽ²çç€çŽ³ç”šç”ç•ç•Œç•Žç•‹ç–«ç–¤ç–¥ç–¢ç–£ç™¸çš†çš‡çšˆç›ˆç›†ç›ƒç›…çœç›¹ç›¸çœ‰çœ‹ç›¾ç›¼çœ‡çŸœç ‚ç ”ç Œç 祆祉祈祇禹禺科秒秋穿çªç«¿ç«½ç±½ç´‚紅紀紉紇約紆缸美羿耄\"],[\"ad40\",\"è€è€è€‘耶胖胥胚胃胄背胡胛胎胞胤èƒè‡´èˆ¢è‹§èŒƒèŒ…苣苛苦茄若茂茉苒苗英èŒè‹œè‹”苑苞苓苟苯茆è™è™¹è™»è™ºè¡è¡«è¦è§”è¨ˆè¨‚è¨ƒè²žè² èµ´èµ³è¶´è»è»Œè¿°è¿¦è¿¢è¿ªè¿¥\"],[\"ada1\",\"è¿è¿«è¿¤è¿¨éƒŠéƒŽéƒéƒƒé…‹é…Šé‡é–‚é™é™‹é™Œé™é¢é©éŸ‹éŸéŸ³é 風飛食首香乘亳倌å€å€£ä¿¯å€¦å€¥ä¿¸å€©å€–倆值借倚倒們俺倀倔倨俱倡個候倘俳修å€å€ªä¿¾å€«å€‰å…¼å†¤å†¥å†¢å‡å‡Œå‡†å‡‹å‰–剜剔剛å‰åŒªå¿åŽŸåŽåŸå“¨å”å”唷哼哥哲唆哺唔哩å“員唉哮哪\"],[\"ae40\",\"哦唧唇哽å”åœƒåœ„åŸ‚åŸ”åŸ‹åŸƒå ‰å¤å¥—å¥˜å¥šå¨‘å¨˜å¨œå¨Ÿå¨›å¨“å§¬å¨ å¨£å¨©å¨¥å¨Œå¨‰å«å±˜å®°å®³å®¶å®´å®®å®µå®¹å®¸å°„屑展å±å³å³½å³»å³ªå³¨å³°å³¶å´å³´å·®å¸å¸«åº«åºåº§å¼±å¾’徑å¾æ™\"],[\"aea1\",\"æ£æ¥ææ•ææ©æ¯æ‚„æ‚Ÿæ‚šæ‚悔悌悅悖扇拳挈拿æŽæŒ¾æŒ¯æ•æ‚æ†ææ‰æŒºæ挽挪挫挨ææŒæ•ˆæ•‰æ–™æ—旅時晉æ™æ™ƒæ™’晌晅æ™æ›¸æœ”æœ•æœ—æ ¡æ ¸æ¡ˆæ¡†æ¡“æ ¹æ¡‚æ¡”æ ©æ¢³æ —æ¡Œæ¡‘æ ½æŸ´æ¡æ¡€æ ¼æ¡ƒæ ªæ¡…æ “æ ˜æ¡æ®Šæ®‰æ®·æ°£æ°§æ°¨æ°¦æ°¤æ³°æµªæ¶•æ¶ˆæ¶‡æµ¦æµ¸æµ·æµ™æ¶“\"],[\"af40\",\"浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈çƒçˆ¹ç‰¹ç‹¼ç‹¹ç‹½ç‹¸ç‹·çŽ†çç‰ç®ç çªçžç•”ç•ç•œç•šç•™ç–¾ç—…症疲疳疽疼疹痂疸皋皰益ç›ç›Žçœ©çœŸçœ çœ¨çŸ©ç °ç §ç ¸ç ç ´ç ·\"],[\"afa1\",\"ç ¥ç ç ç Ÿç ²ç¥•ç¥ç¥ 祟祖神ç¥ç¥—ç¥šç§¤ç§£ç§§ç§Ÿç§¦ç§©ç§˜çª„çªˆç«™ç¬†ç¬‘ç²‰ç´¡ç´—ç´‹ç´Šç´ ç´¢ç´”ç´ç´•ç´šç´œç´ç´™ç´›ç¼ºç½Ÿç¾”ç¿…ç¿è€†è€˜è€•è€™è€—耽耿胱脂胰脅èƒèƒ´è„†èƒ¸èƒ³è„ˆèƒ½è„Šèƒ¼èƒ¯è‡è‡¬èˆ€èˆèˆªèˆ«èˆ¨èˆ¬èŠ»èŒ«è’è”èŠèŒ¸èè‰èŒµèŒ´è茲茹茶茗è€èŒ±èŒ¨èƒ\"],[\"b040\",\"虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷è¢è¢‚衽衹記è¨è¨Žè¨Œè¨•è¨Šè¨—訓訖è¨è¨‘豈豺豹財貢起躬軒軔è»è¾±é€é€†è¿·é€€è¿ºè¿´é€ƒè¿½é€…迸邕郡éƒéƒ¢é…’é…酌釘é‡é‡—釜釙閃院陣陡\"],[\"b0a1\",\"é™›é™é™¤é™˜é™žéš»é£¢é¦¬éª¨é«˜é¬¥é¬²é¬¼ä¹¾åºå½åœå‡åƒåŒåšå‰å¥å¶åŽå•åµå´å·åå€å¯å兜冕凰剪副勒務勘動åŒåŒåŒ™åŒ¿å€åŒ¾åƒæ›¼å•†å•ªå•¦å•„啞啡啃啊唱啖å•å••å”¯å•¤å”¸å”®å•œå”¬å•£å”³å•å•—åœˆåœ‹åœ‰åŸŸå …å Šå †åŸ åŸ¤åŸºå ‚å µåŸ·åŸ¹å¤ å¥¢å¨¶å©å©‰å©¦å©ªå©€\"],[\"b140\",\"娼婢婚婆婊å°å¯‡å¯…å¯„å¯‚å®¿å¯†å°‰å°ˆå°‡å± å±œå±å´‡å´†å´Žå´›å´–å´¢å´‘å´©å´”å´™å´¤å´§å´—å·¢å¸¸å¸¶å¸³å¸·åº·åº¸åº¶åºµåº¾å¼µå¼·å½—å½¬å½©å½«å¾—å¾™å¾žå¾˜å¾¡å¾ å¾œæ¿æ‚£æ‚‰æ‚ 您惋悴惦悽\"],[\"b1a1\",\"æƒ…æ‚»æ‚µæƒœæ‚¼æƒ˜æƒ•æƒ†æƒŸæ‚¸æƒšæƒ‡æˆšæˆ›æ‰ˆæŽ æŽ§æ²æŽ–探接æ·æ§æŽ˜æŽªæ±æŽ©æŽ‰æŽƒæŽ›æ«æŽ¨æŽ„授掙採掬排æŽæŽ€æ»æ©æ¨æºæ•æ•–救教敗啟æ•æ•˜æ••æ•”斜斛斬æ—旋旌旎æ™æ™šæ™¤æ™¨æ™¦æ™žæ›¹å‹—望æ¢æ¢¯æ¢¢æ¢“梵桿桶梱梧梗械梃棄æ¢æ¢†æ¢…梔æ¢æ¢¨æ¢Ÿæ¢¡æ¢‚欲殺\"],[\"b240\",\"毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽çŠçŒœçŒ›çŒ–猓猙率ç…çŠçƒç†ç¾çç“ ç“¶\"],[\"b2a1\",\"瓷甜產略畦畢異ç–痔痕疵痊ç—皎盔盒盛眷眾眼眶眸眺硫硃硎祥票ç¥ç§»çª’çª•ç¬ ç¬¨ç¬›ç¬¬ç¬¦ç¬™ç¬žç¬®ç²’ç²—ç²•çµ†çµƒçµ±ç´®ç´¹ç´¼çµ€ç´°ç´³çµ„ç´¯çµ‚ç´²ç´±ç¼½ç¾žç¾šç¿Œç¿Žç¿’è€œèŠè†è„¯è„–脣脫脩脰脤舂舵舷舶船莎莞莘è¸èŽ¢èŽ–èŽ½èŽ«èŽ’èŽŠèŽ“èŽ‰èŽ è·è»è¼\"],[\"b340\",\"莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖è¢è¢‹è¦“è¦è¨ªè¨è¨£è¨¥è¨±è¨è¨Ÿè¨›è¨¢è±‰è±šè²©è²¬è²«è²¨è²ªè²§èµ§èµ¦è¶¾è¶ºè»›è»Ÿé€™é€é€šé€—連速é€é€é€•é€žé€ é€é€¢é€–逛途\"],[\"b3a1\",\"部éƒéƒ½é…—野釵釦釣釧é‡é‡©é–‰é™ªé™µé™³é™¸é™°é™´é™¶é™·é™¬é›€é›ªé›©ç« ç«Ÿé ‚é ƒéšé³¥é¹µé¹¿éº¥éº»å‚¢å‚傅備傑傀傖傘傚最凱割剴創剩勞å‹å‹›åšåŽ¥å•»å–€å–§å•¼å–Šå–喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙åœå ¯å ªå ´å ¤å °å ±å ¡å å å£¹å£ºå¥ \"],[\"b440\",\"婷媚婿媒媛媧å³å±å¯’富寓å¯å°Šå°‹å°±åµŒåµå´´åµ‡å·½å¹…帽幀幃幾廊å»å»‚廄弼å½å¾©å¾ªå¾¨æƒ‘æƒ¡æ‚²æ‚¶æƒ æ„œæ„£æƒºæ„•æƒ°æƒ»æƒ´æ…¨æƒ±æ„Žæƒ¶æ„‰æ„€æ„’æˆŸæ‰‰æŽ£æŽŒææ€æ©æ‰æ†æ\"],[\"b4a1\",\"æ’æ£ææ¡æ–ææ®æ¶æ´æªæ›æ‘’æšæ¹æ•žæ•¦æ•¢æ•£æ–‘æ–斯普晰晴晶景暑智晾晷曾替期æœæ£ºæ£•æ£ 棘棗椅棟棵森棧棹棒棲棣棋æ£æ¤æ¤’æ¤Žæ£‰æ£šæ¥®æ£»æ¬¾æ¬ºæ¬½æ®˜æ®–æ®¼æ¯¯æ°®æ°¯æ°¬æ¸¯æ¸¸æ¹”æ¸¡æ¸²æ¹§æ¹Šæ¸ æ¸¥æ¸£æ¸›æ¹›æ¹˜æ¸¤æ¹–æ¹®æ¸æ¸¦æ¹¯æ¸´æ¹æ¸ºæ¸¬æ¹ƒæ¸æ¸¾æ»‹\"],[\"b540\",\"溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩çºçªç³ç¢ç¥çµç¶ç´ç¯ç›ç¦ç¨ç”¥ç”¦ç•«ç•ªç—¢ç—›ç—£ç—™ç—˜ç—žç— 登發皖皓皴盜ççŸç¡ç¡¬ç¡¯ç¨ç¨ˆç¨‹ç¨…稀窘\"],[\"b5a1\",\"窗窖童竣ç‰ç–ç†çç’ç”çç‹çç‘粟粥絞çµçµ¨çµ•ç´«çµ®çµ²çµ¡çµ¦çµ¢çµ°çµ³å–„翔翕耋è’肅腕腔腋腑腎脹腆脾腌腓腴舒舜è©èƒè¸èè è…è‹èè¯è±è´è‘—èŠè°èŒèŒè½è²èŠè¸èŽè„èœè‡è”èŸè™›è›Ÿè›™è›è›”蛛蛤è›è›žè¡—è£è£‚è¢±è¦ƒè¦–è¨»è© è©•è©žè¨¼è©\"],[\"b640\",\"詔詛è©è©†è¨´è¨ºè¨¶è©–象貂貯貼貳貽è³è²»è³€è²´è²·è²¶è²¿è²¸è¶Šè¶…è¶è·Žè·è·‹è·šè·‘跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥é‡éˆ”鈕鈣鈉鈞éˆéˆéˆ‡éˆ‘é–”é–é–‹é–‘\"],[\"b6a1\",\"間閒閎隊階隋陽隅隆éšé™²éš„é›é›…é›„é›†é›‡é›¯é›²éŸŒé …é †é ˆé£§é£ªé£¯é£©é£²é£é¦®é¦é»ƒé»é»‘亂å‚債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌å¡å¡Šå¡¢å¡’塋奧å«å«‰å«Œåª¾åª½åª¼\"],[\"b740\",\"媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚æ„慈感想愛惹æ„愈慎慌慄æ…愾愴愧æ„愆愷戡戢æ“æ¾æžæªææ½æ¬ææœæ”ææ¶æ–æ—æ†æ•¬æ–Ÿæ–°æš—暉暇暈暖暄暘æšæœƒæ¦”æ¥\"],[\"b7a1\",\"æ¥šæ¥·æ¥ æ¥”æ¥µæ¤°æ¦‚æ¥Šæ¥¨æ¥«æ¥žæ¥“æ¥¹æ¦†æ¥æ¥£æ¥›æ‡æ²æ¯€æ®¿æ¯“毽溢溯滓溶滂æºæºæ»‡æ»…溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷ç…猿猾瑯瑚瑕瑟瑞ç‘ç¿ç‘™ç‘›ç‘œç•¶ç•¸ç˜€ç—°ç˜ç—²ç—±ç—ºç—¿ç—´ç—³ç›žç›Ÿç›ç«ç¦çžç£\"],[\"b840\",\"ç¹çªç¬çœç¥ç¨ç¢çŸ®ç¢Žç¢°ç¢—碘碌碉硼碑碓硿祺祿ç¦è¬ç¦½ç¨œç¨šç¨ ç¨”ç¨Ÿç¨žçªŸçª ç·ç¯€ç ç®ç§ç²±ç²³ç²µç¶“絹綑ç¶ç¶çµ›ç½®ç½©ç½ªç½²ç¾©ç¾¨ç¾¤è–è˜è‚†è‚„腱腰腸腥腮腳腫\"],[\"b8a1\",\"腹腺腦舅艇蒂葷è½è±è‘µè‘¦è‘«è‘‰è‘¬è‘›è¼èµè‘¡è‘£è‘©è‘葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘è£è£¡è£Šè£•è£’è¦œè§£è©«è©²è©³è©¦è©©è©°èª‡è©¼è©£èª è©±èª…è©è©¢è©®è©¬è©¹è©»è¨¾è©¨è±¢è²Šè²‰è³Šè³‡è³ˆè³„貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊\"],[\"b940\",\"辟農é‹éŠé“é‚é”逼é•éé‡ééŽéé‘逾é鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉é‰é‰…鈹鈿鉚閘隘隔隕é›é›‹é›‰é›Šé›·é›»é›¹é›¶é–é´é¶é é ‘é “é Šé ’é Œé£¼é£´\"],[\"b9a1\",\"é£½é£¾é¦³é¦±é¦´é«¡é³©éº‚é¼Žé¼“é¼ åƒ§åƒ®åƒ¥åƒ–åƒåƒšåƒ•åƒåƒ‘僱僎僩兢凳劃劂匱åŽå—¾å˜€å˜›å˜—嗽嘔嘆嘉å˜å˜Žå—·å˜–嘟嘈å˜å—¶åœ˜åœ–塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣åµå¯žå¯§å¯¡å¯¥å¯¦å¯¨å¯¢å¯¤å¯Ÿå°å±¢å¶„嶇幛幣幕幗幔廓廖弊彆彰徹慇\"],[\"ba40\",\"愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧æ´æ‘摻敲斡旗旖暢暨æšæ¦œæ¦¨æ¦•æ§æ¦®æ§“構榛榷榻榫榴æ§æ§æ¦æ§Œæ¦¦æ§ƒæ¦£æ‰æŒæ°³æ¼³æ¼”æ»¾æ¼“æ»´æ¼©æ¼¾æ¼ æ¼¬æ¼æ¼‚æ¼¢\"],[\"baa1\",\"滿滯漆漱漸漲漣漕漫漯澈漪滬æ¼æ»²æ»Œæ»·ç†”熙煽熊熄熒爾犒犖ç„ç瑤瑣瑪瑰ç‘甄疑瘧ç˜ç˜‹ç˜‰ç˜“盡監瞄ç½ç¿ç¡ç£ç¢Ÿç¢§ç¢³ç¢©ç¢£ç¦Žç¦ç¦ç¨®ç¨±çªªçª©ç«ç«¯ç®¡ç®•ç®‹çµç®—ç®ç®”ç®ç®¸ç®‡ç®„ç²¹ç²½ç²¾ç¶»ç¶°ç¶œç¶½ç¶¾ç¶ ç·Šç¶´ç¶²ç¶±ç¶ºç¶¢ç¶¿ç¶µç¶¸ç¶ç·’緇綬\"],[\"bb40\",\"ç½°ç¿ ç¿¡ç¿Ÿèžèšè‚‡è…膀è†è†ˆè†Šè…¿è†‚臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓è’蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘è•èœ·èœ©è£³è¤‚裴裹裸製裨褚裯誦誌語誣èªèª¡èª“誤\"],[\"bba1\",\"說誥誨誘誑誚誧豪è²è²Œè³“賑賒赫趙趕跼輔輒輕輓辣é é˜éœé£é™éžé¢éé›é„™é„˜é„žé…µé…¸é…·é…´é‰¸éŠ€éŠ…銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需é¼éž…éŸ¶é —é ˜é¢¯é¢±é¤ƒé¤…é¤Œé¤‰é§éª¯éª°é«¦éé‚鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜\"],[\"bc40\",\"劇劈劉åŠåŠŠå‹°åŽ²å˜®å˜»å˜¹å˜²å˜¿å˜´å˜©å™“噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦å¥å¬‰å«»å¬‹å«µå¬Œå¬ˆå¯®å¯¬å¯©å¯«å±¤å±¥å¶å¶”幢幟幡廢廚廟å»å»£å» 彈影德徵慶慧慮æ…慕憂\"],[\"bca1\",\"慼慰慫慾憧æ†æ†«æ†Žæ†¬æ†šæ†¤æ†”憮戮摩摯摹撞撲撈æ’撰撥撓撕撩撒撮æ’撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨æ¨æ¨žæ¨™æ§½æ¨¡æ¨“樊槳樂樅æ§æ¨‘ææŽæ®¤æ¯…毆漿潼澄潑潦潔澆æ½æ½›æ½¸æ½®æ¾Žæ½ºæ½°æ½¤æ¾—æ½˜æ»•æ½¯æ½ æ½Ÿç†Ÿç†¬ç†±ç†¨ç‰–çŠ›çŽç—ç‘©ç’‹ç’ƒ\"],[\"bd40\",\"ç‘¾ç’€ç•¿ç˜ ç˜©ç˜Ÿç˜¤ç˜¦ç˜¡ç˜¢çššçšºç›¤çžŽçž‡çžŒçž‘çž‹ç£‹ç£…ç¢ºç£Šç¢¾ç£•ç¢¼ç£ç¨¿ç¨¼ç©€ç¨½ç¨·ç¨»çª¯çª®ç®ç®±ç¯„箴篆篇ç¯ç® ç¯Œç³Šç· ç·´ç·¯ç·»ç·˜ç·¬ç·ç·¨ç·£ç·šç·žç·©ç¶žç·™ç·²ç·¹ç½µç½·ç¾¯\"],[\"bda1\",\"翩耦膛膜è†è† 膚膘蔗蔽蔚蓮蔬è”蔓蔑蔣蔡蔔蓬蔥蓿蔆螂è´è¶è è¦è¸è¨è™è—èŒè“è¡›è¡è¤è¤‡è¤’褓褕褊誼諒談諄誕請諸課諉諂調誰論è«èª¶èª¹è«›è±Œè±Žè±¬è³ 賞賦賤賬è³è³¢è³£è³œè³ªè³¡èµè¶Ÿè¶£è¸«è¸è¸è¸¢è¸è¸©è¸Ÿè¸¡è¸žèººè¼è¼›è¼Ÿè¼©è¼¦è¼ªè¼œè¼ž\"],[\"be40\",\"è¼¥é©é®é¨éé·é„°é„鄧鄱醇醉醋醃鋅銻銷鋪銬鋤é‹éŠ³éŠ¼é‹’鋇鋰銲é–閱霄霆震霉é éžéž‹éžé ¡é «é œé¢³é¤Šé¤“餒餘é§é§é§Ÿé§›é§‘駕駒駙骷髮髯鬧é…é„é·é¯é´†é´‰\"],[\"bea1\",\"鴃麩麾黎墨齒儒儘儔å„儕冀冪å‡åŠ‘劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶å£å¢¾å£‡å£…奮å¬å¬´å¸å¯°å°Žå½Šæ†²æ†‘憩憊æ‡æ†¶æ†¾æ‡Šæ‡ˆæˆ°æ“…æ“擋撻撼據擄擇擂æ“撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈æ™æ·æ°…濂澱澡\"],[\"bf40\",\"濃澤æ¿æ¾§æ¾³æ¿€æ¾¹æ¾¶æ¾¦æ¾ 澴熾燉ç‡ç‡’燈燕熹燎燙燜燃燄ç¨ç’œç’£ç’˜ç’Ÿç’žç“¢ç”Œç”ç˜´ç˜¸ç˜ºç›§ç›¥çž çžžçžŸçž¥ç£¨ç£šç£¬ç£§ç¦¦ç©ç©Žç©†ç©Œç©‹çªºç¯™ç°‘築篤篛篡篩篦糕糖縊\"],[\"bfa1\",\"縑縈縛縣縞ç¸ç¸‰ç¸ç½¹ç¾²ç¿°ç¿±ç¿®è€¨è†³è†©è†¨è‡»èˆˆè‰˜è‰™è•Šè•™è•ˆè•¨è•©è•ƒè•‰è•è•ªè•žèžƒèžŸèžžèž¢èžè¡¡è¤ªè¤²è¤¥è¤«è¤¡è¦ªè¦¦è«¦è«ºè««è«±è¬€è«œè«§è«®è«¾è¬è¬‚è«·è«è«³è«¶è«¼è±«è±è²“賴蹄踱踴蹂踹踵輻輯輸輳辨辦éµé´é¸é²é¼éºé„´é†’éŒ éŒ¶é‹¸éŒ³éŒ¯éŒ¢é‹¼éŒ«éŒ„éŒš\"],[\"c040\",\"éŒéŒ¦éŒ¡éŒ•éŒ®éŒ™é–»éš§éš¨éšªé›•éœŽéœ‘霖éœéœ“éœé›éœé¦éž˜é °é ¸é »é ·é é ¹é ¤é¤é¤¨é¤žé¤›é¤¡é¤šé§é§¢é§±éª¸éª¼é«»é«é¬¨é®‘鴕鴣鴦鴨鴒鴛默黔é¾é¾œå„ªå„Ÿå„¡å„²å‹µåšŽåš€åšåš…嚇\"],[\"c0a1\",\"åšå£•å£“壑壎嬰嬪嬤åºå°·å±¨å¶¼å¶ºå¶½å¶¸å¹«å½Œå¾½æ‡‰æ‡‚æ‡‡æ‡¦æ‡‹æˆ²æˆ´æ“Žæ“Šæ“˜æ“ æ“°æ“¦æ“¬æ“±æ“¢æ“斂斃曙曖檀檔檄檢檜櫛檣橾檗æªæª æœæ®®æ¯šæ°ˆæ¿˜æ¿±æ¿Ÿæ¿ 濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥ç‡ç‡¬ç‡´ç‡ 爵牆ç°ç²ç’©ç’°ç’¦ç’¨ç™†ç™‚癌盪瞳瞪瞰瞬\"],[\"c140\",\"瞧çžçŸ¯ç£·ç£ºç£´ç£¯ç¤ç¦§ç¦ªç©—窿簇ç°ç¯¾ç¯·ç°Œç¯ ç³ ç³œç³žç³¢ç³Ÿç³™ç³ç¸®ç¸¾ç¹†ç¸·ç¸²ç¹ƒç¸«ç¸½ç¸±ç¹…ç¹ç¸´ç¸¹ç¹ˆç¸µç¸¿ç¸¯ç½„翳翼è±è²è°è¯è³è‡†è‡ƒè†ºè‡‚臀膿膽臉膾臨舉艱薪\"],[\"c1a1\",\"è–„è•¾è–œè–‘è–”è–¯è–›è–‡è–¨è–Šè™§èŸ€èŸ‘èž³èŸ’èŸ†èž«èž»èžºèŸˆèŸ‹è¤»è¤¶è¥„è¤¸è¤½è¦¬è¬Žè¬—è¬™è¬›è¬Šè¬ è¬è¬„è¬è±è°¿è±³è³ºè³½è³¼è³¸è³»è¶¨è¹‰è¹‹è¹ˆè¹Šè½„輾轂轅輿é¿é½é‚„é‚邂邀鄹醣醞醜é鎂錨éµéŠé¥é‹éŒ˜é¾é¬é›é°éšé”é—Šé—‹é—Œé—ˆé—†éš±éš¸é›–éœœéœžéž éŸ“é¡†é¢¶é¤µé¨\"],[\"c240\",\"駿鮮鮫鮪é®é´»é´¿éº‹é»é»žé»œé»é»›é¼¾é½‹å¢åš•åš®å£™å£˜å¬¸å½æ‡£æˆ³æ“´æ“²æ“¾æ”†æ“ºæ“»æ“·æ–·æ›œæœ¦æª³æª¬æ«ƒæª»æª¸æ«‚檮檯æŸæ¸æ®¯ç€‰ç€‹æ¿¾ç€†æ¿ºç€‘ç€ç‡»ç‡¼ç‡¾ç‡¸ç·çµç’§ç’¿ç”•ç™–癘\"],[\"c2a1\",\"ç™’çž½çž¿çž»çž¼ç¤Žç¦®ç©¡ç©¢ç© ç«„ç«…ç°«ç°§ç°ªç°žç°£ç°¡ç³§ç¹”ç¹•ç¹žç¹šç¹¡ç¹’ç¹™ç½ˆç¿¹ç¿»è·è¶è‡è‡èˆŠè—è–©è—è—è—‰è–°è–ºè–¹è–¦èŸ¯èŸ¬èŸ²èŸ è¦†è¦²è§´è¬¨è¬¹è¬¬è¬«è±è´…蹙蹣蹦蹤蹟蹕軀轉è½é‚‡é‚ƒé‚ˆé†«é†¬é‡éŽ”鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖é—闕離雜雙雛雞霤鞣鞦\"],[\"c340\",\"éžéŸ¹é¡é¡é¡Œé¡Žé¡“颺餾餿餽餮馥騎é«é¬ƒé¬†ééŽé鯊鯉鯽鯈鯀鵑éµéµ é» é¼•é¼¬å„³åš¥å£žå£Ÿå£¢å¯µé¾å»¬æ‡²æ‡·æ‡¶æ‡µæ”€æ”æ› æ›æ«¥æ«æ«šæ«“瀛瀟瀨瀚ç€ç€•ç€˜çˆ†çˆç‰˜çŠ¢ç¸\"],[\"c3a1\",\"çºç’½ç“Šç“£ç–‡ç–†ç™Ÿç™¡çŸ‡ç¤™ç¦±ç©«ç©©ç°¾ç°¿ç°¸ç°½ç°·ç±€ç¹«ç¹ç¹¹ç¹©ç¹ªç¾…繳羶羹羸臘藩è—è—ªè—•è—¤è—¥è—·èŸ»è …è èŸ¹èŸ¾è¥ è¥Ÿè¥–è¥žèèœè˜è‰èšèŽèè†è™è´ˆè´Šè¹¼è¹²èº‡è¹¶è¹¬è¹ºè¹´è½”轎è¾é‚Šé‚‹é†±é†®é¡é‘éŸéƒéˆéœéé–é¢éé˜é¤é—é¨é—œéš´é›£éœªéœ§é¡éŸœéŸ»é¡ž\"],[\"c440\",\"願顛颼饅饉騖騙é¬é¯¨é¯§é¯–鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤å€åƒå½å¯¶å·‰æ‡¸æ‡ºæ”˜æ””攙曦朧櫬瀾瀰瀲çˆç»ç“癢癥礦礪礬礫竇競籌籃ç±ç³¯ç³°è¾®ç¹½ç¹¼\"],[\"c4a1\",\"çº‚ç½Œè€€è‡šè‰¦è—»è—¹è˜‘è—ºè˜†è˜‹è˜‡è˜Šè ”è •è¥¤è¦ºè§¸è°è¬è¦è¯èŸè«è´è´èº‰èºèº…躂醴釋é˜éƒé½é—¡éœ°é£„饒饑馨騫騰騷騵鰓é°é¹¹éºµé»¨é¼¯é½Ÿé½£é½¡å„·å„¸å›å›€å›‚夔屬å·æ‡¼æ‡¾æ”攜斕曩櫻欄櫺殲çŒçˆ›çŠ§ç“–瓔癩矓ç±çºçºŒç¾¼è˜—è˜è˜šè £è ¢è ¡è Ÿè¥ªè¥¬è¦½è´\"],[\"c540\",\"è·è½è´“躊èºèº‹è½Ÿè¾¯é†ºé®é³éµéºé¸é²é«é—¢éœ¸éœ¹éœ²éŸ¿é¡§é¡¥é¥—驅驃驀騾é«é”é‘é°é°¥é¶¯é¶´é·‚鶸éºé»¯é¼™é½œé½¦é½§å„¼å„»å›ˆå›Šå›‰å¿å·”巒彎懿攤權æ¡ç‘ç˜çŽ€ç“¤ç–Šç™®ç™¬\"],[\"c5a1\",\"ç¦³ç± ç±Ÿè¾è½è‡Ÿè¥²è¥¯è§¼è®€è´–贗躑躓轡酈鑄鑑鑒霽霾韃éŸé¡«é¥•é©•é©é«’鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬æ¬ç“šç«Šç±¤ç±£ç±¥çº“çº–çº”è‡¢è˜¸è˜¿è ±è®Šé‚é‚é‘£é‘ é‘¤é¨é¡¯é¥œé©šé©›é©—髓體髑鱔鱗鱖鷥麟黴囑壩攬çžç™±ç™²çŸ—ç½ç¾ˆè ¶è ¹è¡¢è®“è®’\"],[\"c640\",\"讖艷贛釀鑪é‚éˆé„韆顰驟鬢é˜é±Ÿé·¹é·ºé¹¼é¹½é¼‡é½·é½²å»³æ¬–ç£ç±¬ç±®è »è§€èº¡é‡é‘²é‘°é¡±é¥žé«–鬣黌ç¤çŸšè®šé‘·éŸ‰é©¢é©¥çºœè®œèºªé‡…鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲\"],[\"c940\",\"乂乜凵匚厂万丌乇äºå›—兀屮彳ä¸å†‡ä¸Žä¸®äº“仂仉仈冘勼å¬åŽ¹åœ 夃夬å°å·¿æ—¡æ®³æ¯Œæ°”爿丱丼仨仜仩仡ä»ä»šåˆŒåŒœåŒåœ¢åœ£å¤—夯å®å®„尒尻屴屳帄庀庂忉戉æ‰æ°•\"],[\"c9a1\",\"氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈ä¼ä¼‚伅伢伓伄仴伒冱刓刉åˆåŠ¦åŒ¢åŒŸå厊å‡å›¡å›Ÿåœ®åœªåœ´å¤¼å¦€å¥¼å¦…奻奾奷奿å–尕尥屼屺屻屾巟幵庄异弚彴忕忔å¿æ‰œæ‰žæ‰¤æ‰¡æ‰¦æ‰¢æ‰™æ‰ 扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜æ±æ±Šæ±”汋\"],[\"ca40\",\"汌ç±ç‰žçŠ´çŠµçŽŽç”ªç™¿ç©µç½‘艸艼芀艽艿è™è¥¾é‚™é‚—é‚˜é‚›é‚”é˜¢é˜¤é˜ é˜£ä½–ä¼»ä½¢ä½‰ä½“ä½¤ä¼¾ä½§ä½’ä½Ÿä½ä½˜ä¼ä¼³ä¼¿ä½¡å†å†¹åˆœåˆžåˆ¡åŠåŠ®åŒ‰å£å²åŽŽåŽå°å·åªå‘”å‘…å™åœå¥å˜\"],[\"caa1\",\"å½å‘å‘å¨å¤å‘‡å›®å›§å›¥åå…åŒå‰å‹å’å¤†å¥€å¦¦å¦˜å¦ å¦—å¦Žå¦¢å¦å¦å¦§å¦¡å®Žå®’尨尪å²å²å²ˆå²‹å²‰å²’å²Šå²†å²“å²•å· å¸Šå¸Žåº‹åº‰åºŒåºˆåºå¼…å¼å½¸å½¶å¿’å¿‘å¿å¿å¿¨å¿®å¿³å¿¡å¿¤å¿£å¿ºå¿¯å¿·å¿»æ€€å¿´æˆºæŠƒæŠŒæŠŽæŠæŠ”抇扱扻扺扰æŠæŠˆæ‰·æ‰½æ‰²æ‰´æ”·æ—°æ—´æ—³æ—²æ—µæ…æ‡\"],[\"cb40\",\"æ™æ•æŒæˆæææšæ‹æ¯æ°™æ°šæ±¸æ±§æ±«æ²„沋æ²æ±±æ±¯æ±©æ²šæ±æ²‡æ²•æ²œæ±¦æ±³æ±¥æ±»æ²Žç´çºç‰£çŠ¿çŠ½ç‹ƒç‹†ç‹çŠºç‹…玕玗玓玔玒町甹疔疕çšç¤½è€´è‚•è‚™è‚è‚’è‚œèŠèŠèŠ…芎芑芓\"],[\"cba1\",\"èŠŠèŠƒèŠ„è±¸è¿‰è¾¿é‚Ÿé‚¡é‚¥é‚žé‚§é‚ é˜°é˜¨é˜¯é˜ä¸³ä¾˜ä½¼ä¾…佽侀侇佶佴侉侄佷佌侗佪侚佹ä¾ä½¸ä¾ä¾œä¾”侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿å’咑咂咈呫呺呾呥呬呴呦å’å‘¯å‘¡å‘ å’˜å‘£å‘§å‘¤å›·å›¹å¯å²åå«å±å°å¶åž€åµå»å³å´å¢\"],[\"cc40\",\"å¨å½å¤Œå¥…妵妺å§å§Žå¦²å§Œå§å¦¶å¦¼å§ƒå§–妱妽姀姈妴姇å¢å¥å®“å®•å±„å±‡å²®å²¤å² å²µå²¯å²¨å²¬å²Ÿå²£å²å²¢å²ªå²§å²å²¥å²¶å²°å²¦å¸—帔帙弨弢弣弤彔徂彾彽忞忥æ€æ€¦æ€™æ€²æ€‹\"],[\"cca1\",\"怴怊怗怳怚怞怬怢æ€æ€æ€®æ€“怑怌怉怜戔戽æŠæŠ´æ‹‘抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋æ˜æ˜…旽昑æ˜æ›¶æœŠæž…æ¬æžŽæž’æ¶æ»æž˜æž†æž„æ´æžæžŒæºæžŸæž‘枙枃æ½æžæ¸æ¹æž”欥殀æ¾æ¯žæ°æ²“泬泫泮泙沶泔æ²æ³§æ²·æ³æ³‚沺泃泆æ³æ³²\"],[\"cd40\",\"æ³’æ³æ²´æ²Šæ²æ²€æ³žæ³€æ´°æ³æ³‡æ²°æ³¹æ³æ³©æ³‘炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡çŽçŽ¦çŽ¢çŽ 玬çŽç“瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺\"],[\"cda1\",\"矷祂礿秅穸穻竻籵糽耵è‚肮肣肸肵è‚èˆ èŠ è‹€èŠ«èŠšèŠ˜èŠ›èŠµèŠ§èŠ®èŠ¼èŠžèŠºèŠ´èŠ¨èŠ¡èŠ©è‹‚èŠ¤è‹ƒèŠ¶èŠ¢è™°è™¯è™è™®è±–è¿’è¿‹è¿“è¿è¿–迕迗邲邴邯邳邰阹阽阼阺陃ä¿ä¿…俓侲俉俋ä¿ä¿”俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽å¼åŽ—厖厙厘咺咡å’å’¥å“\"],[\"ce40\",\"哃èŒå’·å’®å“–å’¶å“…å“†å’ å‘°å’¼å’¢å’¾å‘²å“žå’°åžµåžžåžŸåž¤åžŒåž—åžåž›åž”垘åžåž™åž¥åžšåž•å£´å¤å¥“姡姞姮娀姱å§å§ºå§½å§¼å§¶å§¤å§²å§·å§›å§©å§³å§µå§ 姾姴å§å®¨å±Œå³å³˜å³Œå³—峋峛\"],[\"cea1\",\"峞峚峉峇峊峖峓峔å³å³ˆå³†å³Žå³Ÿå³¸å·¹å¸¡å¸¢å¸£å¸ 帤庰庤庢庛庣庥弇弮彖徆怷怹æ”æ²æžæ…æ“æ‡æ‰æ›æŒæ€æ‚æŸæ€¤æ„æ˜æ¦æ®æ‰‚扃æ‹æŒæŒ‹æ‹µæŒŽæŒƒæ‹«æ‹¹æŒæŒŒæ‹¸æ‹¶æŒ€æŒ“挔拺挕拻拰æ•æ•ƒæ–ªæ–¿æ˜¶æ˜¡æ˜²æ˜µæ˜œæ˜¦æ˜¢æ˜³æ˜«æ˜ºæ˜æ˜´æ˜¹æ˜®æœæœæŸæŸ²æŸˆæžº\"],[\"cf40\",\"柜枻柸柘柀枷柅柫柤柟枵æŸæž³æŸ·æŸ¶æŸ®æŸ£æŸ‚枹柎柧柰枲柼柆æŸæŸŒæž®æŸ¦æŸ›æŸºæŸ‰æŸŠæŸƒæŸªæŸ‹æ¬¨æ®‚æ®„æ®¶æ¯–æ¯˜æ¯ æ° æ°¡æ´¨æ´´æ´æ´Ÿæ´¼æ´¿æ´’洊泚洳洄洙洺洚洑洀æ´æµ‚\"],[\"cfa1\",\"æ´æ´˜æ´·æ´ƒæ´æµ€æ´‡æ´ 洬洈洢洉æ´ç‚·ç‚Ÿç‚¾ç‚±ç‚°ç‚¡ç‚´ç‚µç‚©ç‰ç‰‰ç‰Šç‰¬ç‰°ç‰³ç‰®ç‹Šç‹¤ç‹¨ç‹«ç‹Ÿç‹ªç‹¦ç‹£çŽ…çŒç‚çˆç…玹玶玵玴ç«çŽ¿ç‡çŽ¾çƒç†çŽ¸ç‹ç“¬ç“®ç”®ç•‡ç•ˆç–§ç–ªç™¹ç›„çœˆçœƒçœ„çœ…çœŠç›·ç›»ç›ºçŸ§çŸ¨ç †ç ‘ç ’ç …ç ç ç Žç ‰ç ƒç “ç¥Šç¥Œç¥‹ç¥…ç¥„ç§•ç§ç§ç§–秎窀\"],[\"d040\",\"穾竑笀ç¬ç±ºç±¸ç±¹ç±¿ç²€ç²ç´ƒç´ˆç´ç½˜ç¾‘ç¾ç¾¾è€‡è€Žè€è€”è€·èƒ˜èƒ‡èƒ èƒ‘èƒˆèƒ‚èƒèƒ…胣胙胜胊胕胉èƒèƒ—胦èƒè‡¿èˆ¡èŠ”苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪\"],[\"d0a1\",\"è‹¤è‹ è‹ºè‹³è‹è™·è™´è™¼è™³è¡è¡Žè¡§è¡ªè¡©è§“è¨„è¨‡èµ²è¿£è¿¡è¿®è¿ éƒ±é‚½é‚¿éƒ•éƒ…é‚¾éƒ‡éƒ‹éƒˆé‡”é‡“é™”é™é™‘é™“é™Šé™Žå€žå€…å€‡å€“å€¢å€°å€›ä¿µä¿´å€³å€·å€¬ä¿¶ä¿·å€—å€œå€ å€§å€µå€¯å€±å€Žå…šå†”å†“å‡Šå‡„å‡…å‡ˆå‡Žå‰¡å‰šå‰’å‰žå‰Ÿå‰•å‰¢å‹åŒŽåŽžå”¦å“¢å”—唒哧哳哤唚哿唄唈哫唑唅哱\"],[\"d140\",\"å”Šå“»å“·å“¸å“ å”Žå”ƒå”‹åœåœ‚åŸŒå ²åŸ•åŸ’åžºåŸ†åž½åž¼åž¸åž¶åž¿åŸ‡åŸåž¹åŸå¤Žå¥Šå¨™å¨–å¨å¨®å¨•å¨å¨—娊娞娳å¬å®§å®å®¬å°ƒå±–屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧ææšæ§\"],[\"d1a1\",\"æ悢悈悀悒æ‚æ‚悃悕悛悗悇悜悎戙扆拲æŒæ–挬æ„æ…挶æƒæ¤æŒ¹æ‹æŠæŒ¼æŒ©æ挴æ˜æ”æ™æŒæ‡æŒ³æšæ‘挸æ—æ€æˆæ•Šæ•†æ—†æ—ƒæ—„æ—‚æ™Šæ™Ÿæ™‡æ™‘æœ’æœ“æ Ÿæ šæ¡‰æ ²æ ³æ »æ¡‹æ¡æ –æ ±æ œæ µæ «æ æ ¯æ¡Žæ¡„æ ´æ æ ’æ ”æ ¦æ ¨æ ®æ¡æ ºæ ¥æ 欬欯æ¬æ¬±æ¬´æ肂殈毦毤\"],[\"d240\",\"毨毣毢毧氥浺浣浤浶æ´æµ¡æ¶’浘浢æµæµ¯æ¶‘æ¶æ·¯æµ¿æ¶†æµžæµ§æµ 涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵æ¶çƒœçƒ“烑çƒçƒ‹ç¼¹çƒ¢çƒ—çƒ’çƒžçƒ çƒ”çƒçƒ…烆烇烚烎烡牂牸\"],[\"d2a1\",\"牷牶猀狺狴狾狶狳狻çŒç“ç™ç¥ç–玼ç§ç£ç©çœç’ç›ç”ççšç—ç˜ç¨ç“žç“Ÿç“´ç“µç”¡ç•›ç•Ÿç–°ç—疻痄痀疿疶疺皊盉çœçœ›çœçœ“çœ’çœ£çœ‘çœ•çœ™çœšçœ¢çœ§ç £ç ¬ç ¢ç µç ¯ç ¨ç ®ç «ç ¡ç ©ç ³ç ªç ±ç¥”ç¥›ç¥ç¥œç¥“ç¥’ç¥‘ç§«ç§¬ç§ ç§®ç§ç§ªç§œç§žç§çª†çª‰çª…窋窌窊窇竘ç¬\"],[\"d340\",\"笄笓笅ç¬ç¬ˆç¬Šç¬Žç¬‰ç¬’粄粑粊粌粈ç²ç²…ç´žç´ç´‘紎紘紖紓紟紒ç´ç´Œç½œç½¡ç½žç½ ç½ç½›ç¾–羒翃翂翀耖耾耹胺胲胹胵è„胻脀èˆèˆ¯èˆ¥èŒ³èŒè„茙è‘茥è–茿è茦茜茢\"],[\"d3a1\",\"è‚èŽèŒ›èŒªèŒˆèŒ¼èèŒ–èŒ¤èŒ èŒ·èŒ¯èŒ©è‡è…èŒè“茞茬è‹èŒ§èˆè™“虒蚢蚨蚖èšèš‘蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎èšèšèš”衃衄è¡è¡µè¡¶è¡²è¢€è¡±è¡¿è¡¯è¢ƒè¡¾è¡´è¡¼è¨’è±‡è±—è±»è²¤è²£èµ¶èµ¸è¶µè¶·è¶¶è»‘è»“è¿¾è¿µé€‚è¿¿è¿»é€„è¿¼è¿¶éƒ–éƒ éƒ™éƒšéƒ£éƒŸéƒ¥éƒ˜éƒ›éƒ—éƒœéƒ¤é…\"],[\"d440\",\"é…Žé…釕釢釚陜陟隼飣髟鬯乿å°åªå¡åžå å“å‹åå²åˆååå›åŠå¢å€•å…åŸå©å«å£å¤å†å€å®å³å—å‘å‡å‰«å‰å‰¬å‰®å‹–å‹“åŒåŽœå•µå•¶å”¼å•å•å”´å”ªå•‘啢唶唵唰啒啅\"],[\"d4a1\",\"唌唲啥啎唹啈å”å”»å•€å•‹åœŠåœ‡åŸ»å ”åŸ¢åŸ¶åŸœåŸ´å €åŸåŸ½å ˆåŸ¸å ‹åŸ³åŸå ‡åŸ®åŸ£åŸ²åŸ¥åŸ¬åŸ¡å ŽåŸ¼å 埧å å ŒåŸ±åŸ©åŸ°å å „å¥œå© å©˜å©•å©§å©žå¨¸å¨µå©å©å©Ÿå©¥å©¬å©“婤婗婃å©å©’婄婛婈媎娾å©å¨¹å©Œå©°å©©å©‡å©‘å©–å©‚å©œå²å®å¯å¯€å±™å´žå´‹å´å´šå´ 崌崨å´å´¦å´¥å´\"],[\"d540\",\"崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊æ‚悆悾悰悺惓惔æƒæƒ¤æƒ™æƒæƒˆæ‚±æƒ›æ‚·æƒŠæ‚¿æƒƒæƒæƒ€æŒ²æ¥æŽŠæŽ‚æ½æŽ½æŽžæŽæŽæŽ—掫掎æ¯æŽ‡æŽæ®æŽ¯æµæŽœæ掮æ¼æŽ¤æŒ»æŽŸ\"],[\"d5a1\",\"æ¸æŽ…æŽæŽ‘æŽæ°æ•“æ—晥晡晛晙晜晢朘桹梇æ¢æ¢œæ¡æ¡®æ¢®æ¢«æ¥–桯梣梬梩桵桴梲æ¢æ¡·æ¢’æ¡¼æ¡«æ¡²æ¢ªæ¢€æ¡±æ¡¾æ¢›æ¢–æ¢‹æ¢ æ¢‰æ¢¤æ¡¸æ¡»æ¢‘æ¢Œæ¢Šæ¡½æ¬¶æ¬³æ¬·æ¬¸æ®‘æ®æ®æ®Žæ®Œæ°ªæ·€æ¶«æ¶´æ¶³æ¹´æ¶¬æ·©æ·¢æ¶·æ·¶æ·”æ¸€æ·ˆæ· æ·Ÿæ·–æ¶¾æ·¥æ·œæ·æ·›æ·´æ·Šæ¶½æ·æ·°æ¶ºæ·•æ·‚æ·æ·‰\"],[\"d640\",\"æ·æ·²æ·“淽淗æ·æ·£æ¶»çƒºç„烷焗烴焌烰焄烳ç„烼烿焆焓焀烸烶焋焂焎牾牻牼牿çŒçŒ—猇猑猘猊猈狿çŒçŒžçŽˆç¶ç¸çµç„çç½ç‡ç€çºç¼ç¿çŒç‹ç´çˆç•¤ç•£ç—Žç—’ç—\"],[\"d6a1\",\"痋痌痑ç—çšçš‰ç›“眹眯çœçœ±çœ²çœ´çœ³çœ½çœ¥çœ»çœµç¡ˆç¡’硉ç¡ç¡Šç¡Œç ¦ç¡…ç¡ç¥¤ç¥§ç¥©ç¥ªç¥£ç¥«ç¥¡ç¦»ç§ºç§¸ç§¶ç§·çªçª”çªç¬µç‡ç¬´ç¬¥ç¬°ç¬¢ç¬¤ç¬³ç¬˜ç¬ªç¬ç¬±ç¬«ç¬ç¬¯ç¬²ç¬¸ç¬šç¬£ç²”粘粖粣紵紽紸紶紺絅紬紩çµçµ‡ç´¾ç´¿çµŠç´»ç´¨ç½£ç¾•ç¾œç¾ç¾›ç¿Šç¿‹ç¿ç¿ç¿‘翇ç¿ç¿‰è€Ÿ\"],[\"d740\",\"耞耛è‡èƒèˆè„˜è„¥è„™è„›è„脟脬脞脡脕脧è„脢舑舸舳舺舴舲艴èŽèŽ£èŽ¨èŽèºè³èŽ¤è´èŽèŽèŽ•èŽ™èµèŽ”莩è½èŽƒèŽŒèŽèŽ›èŽªèŽ‹è¾èŽ¥èŽ¯èŽˆèŽ—莰è¿èŽ¦èŽ‡èŽ®è¶èŽšè™™è™–èš¿èš·\"],[\"d7a1\",\"蛂è›è›…蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜è±è±½è²¥èµ½èµ»èµ¹è¶¼è·‚趹趿è·è»˜è»žè»è»œè»—è» è»¡é€¤é€‹é€‘é€œé€Œé€¡éƒ¯éƒªéƒ°éƒ´éƒ²éƒ³éƒ”éƒ«éƒ¬éƒ©é…–é…˜é…šé…“é…•é‡¬é‡´é‡±é‡³é‡¸é‡¤é‡¹é‡ª\"],[\"d840\",\"釫釷釨釮镺閆閈陼é™é™«é™±é™¯éš¿éªé „飥馗傛傕傔傞傋傣傃傌傎å‚å¨å‚œå‚’傂傇兟凔匒匑厤厧喑喨喥å–啷噅喢喓喈å–å–µå–å–£å–’å–¤å•½å–Œå–¦å•¿å–•å–¡å–ŽåœŒå ©å ·\"],[\"d8a1\",\"å ™å žå §å £å ¨åŸµå¡ˆå ¥å œå ›å ³å ¿å ¶å ®å ¹å ¸å å ¬å »å¥¡åª¯åª”åªŸå©ºåª¢åªžå©¸åª¦å©¼åª¥åª¬åª•åª®å¨·åª„åªŠåª—åªƒåª‹åª©å©»å©½åªŒåªœåªåª“åªå¯ªå¯å¯‹å¯”寑寊寎尌尰崷嵃嵫åµåµ‹å´¿å´µåµ‘嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄å¹å½˜å¾¦å¾¥å¾«æƒ‰æ‚¹æƒŒæƒ¢æƒŽæƒ„æ„”\"],[\"d940\",\"惲愊愖愅惵愓惸惼惾æƒæ„ƒæ„˜æ„æ„惿愄愋扊掔掱掰æŽæ¥æ¨æ¯æƒæ’æ³æŠæ æ¶æ•æ²æµæ‘¡æŸæŽ¾ææœæ„æ˜æ“æ‚æ‡æŒæ‹æˆæ°æ—æ™æ”²æ•§æ•ªæ•¤æ•œæ•¨æ•¥æ–Œæ–æ–žæ–®æ—æ—’\"],[\"d9a1\",\"晼晬晻暀晱晹晪晲æœæ¤Œæ£“椄棜椪棬棪棱æ¤æ£–棷棫棤棶椓æ¤æ£³æ£¡æ¤‡æ£Œæ¤ˆæ¥°æ¢´æ¤‘棯棆椔棸æ£æ£½æ£¼æ£¨æ¤‹æ¤Šæ¤—棎棈æ£æ£žæ£¦æ£´æ£‘椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿æ¹æ¹æ¹³æ¸œæ¸³æ¹‹æ¹€æ¹‘渻渃渮湞\"],[\"da40\",\"æ¹¨æ¹œæ¹¡æ¸±æ¸¨æ¹ æ¹±æ¹«æ¸¹æ¸¢æ¸°æ¹“æ¹¥æ¸§æ¹¸æ¹¤æ¹·æ¹•æ¹¹æ¹’æ¹¦æ¸µæ¸¶æ¹šç„ ç„žç„¯çƒ»ç„®ç„±ç„£ç„¥ç„¢ç„²ç„Ÿç„¨ç„ºç„›ç‰‹ç‰šçŠˆçŠ‰çŠ†çŠ…çŠ‹çŒ’çŒ‹çŒ°çŒ¢çŒ±çŒ³çŒ§çŒ²çŒçŒ¦çŒ£çŒµçŒŒç®ç¬ç°ç«ç–\"],[\"daa1\",\"çšç¡çç±ç¤ç£çç©ç ç²ç“»ç”¯ç•¯ç•¬ç—§ç—šç—¡ç—¦ç—痟痤痗皕皒盚ç†ç‡ç„çç…çŠçŽç‹çŒçŸžçŸ¬ç¡ 硤硥硜ç¡ç¡±ç¡ªç¡®ç¡°ç¡©ç¡¨ç¡žç¡¢ç¥´ç¥³ç¥²ç¥°ç¨‚稊稃稌稄窙竦竤çŠç¬»ç„çˆçŒçŽç€ç˜ç…粢粞粨粡絘絯絣絓絖絧絪çµçµçµœçµ«çµ’絔絩絑絟絎缾缿罥\"],[\"db40\",\"ç½¦ç¾¢ç¾ ç¾¡ç¿—è‘èè胾胔腃腊腒è…腇脽è…脺臦臮臷臸臹舄舼舽舿艵茻èè¹è£è€è¨è’è§è¤è¼è¶èè†èˆè«è£èŽ¿èèè¥è˜è¿è¡è‹èŽè–èµè‰è‰èèžè‘è†è‚è³\"],[\"dba1\",\"è•èºè‡è‘èªè“èƒè¬è®è„è»è—è¢è›è›è¾è›˜è›¢è›¦è›“蛣蛚蛪è›è›«è›œè›¬è›©è›—蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲è¤è£‰è¦•è¦˜è¦—è§è§šè§›è©Žè©è¨¹è©™è©€è©—詘詄詅詒詈詑詊詌è©è±Ÿè²è²€è²ºè²¾è²°è²¹è²µè¶„趀趉跘跓è·è·‡è·–è·œè·è·•è·™è·ˆè·—跅軯軷軺\"],[\"dc40\",\"軹軦軮軥軵軧軨軶軫軱軬軴軩é€é€´é€¯é„†é„¬é„„郿郼鄈郹郻é„é„€é„‡é„…é„ƒé…¡é…¤é…Ÿé…¢é… éˆéˆŠéˆ¥éˆƒéˆšéˆ¦éˆéˆŒéˆ€éˆ’釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻é–é–Œé–隇陾隈\"],[\"dca1\",\"隉隃隀雂雈雃雱雰é¬é°é®é ‡é¢©é£«é³¦é»¹äºƒäº„亶傽傿僆傮僄僊傴僈僂傰åƒå‚ºå‚±åƒ‹åƒ‰å‚¶å‚¸å‡—剺剸剻剼嗃嗛嗌å—å—‹å—Šå—嗀嗔嗄嗩喿嗒å–å—嗕嗢嗖嗈嗲å—嗙嗂圔塓塨塤å¡å¡å¡‰å¡¯å¡•å¡Žå¡å¡™å¡¥å¡›å ½å¡£å¡±å£¼å«‡å«„嫋媺媸媱媵媰媿嫈媻嫆\"],[\"dd40\",\"媷嫀嫊媴媶å«åª¹åªå¯–寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰å¹å¹Žå¹Šå¹å¹‹å»…廌廆廋廇彀徯å¾æƒ·æ…‰æ…Šæ„«æ……愶愲愮慆愯æ…æ„©æ…€æˆ é…¨æˆ£æˆ¥æˆ¤æ…æ±æ«ææ’æ‰æ æ¤\"],[\"dda1\",\"æ³æ‘ƒæŸæ•æ˜æ¹æ·æ¢æ£æŒæ¦æ°æ¨æ‘æµæ¯æŠæšæ‘€æ¥æ§æ‹æ§æ›æ®æ¡æŽæ•¯æ–’旓暆暌暕æšæš‹æšŠæš™æš”æ™¸æœ æ¥¦æ¥Ÿæ¤¸æ¥Žæ¥¢æ¥±æ¤¿æ¥…æ¥ªæ¤¹æ¥‚æ¥—æ¥™æ¥ºæ¥ˆæ¥‰æ¤µæ¥¬æ¤³æ¤½æ¥¥æ£°æ¥¸æ¤´æ¥©æ¥€æ¥¯æ¥„æ¥¶æ¥˜æ¥æ¥´æ¥Œæ¤»æ¥‹æ¤·æ¥œæ¥æ¥‘椲楒椯楻椼æ†æ…æƒæ‚æˆææ®›ï¨æ¯»æ¯¼\"],[\"de40\",\"毹毷毸溛滖滈æºæ»€æºŸæº“æº”æº æº±æº¹æ»†æ»’æº½æ»æºžæ»‰æº·æº°æ»æº¦æ»æº²æº¾æ»ƒæ»œæ»˜æº™æº’溎æºæº¤æº¡æº¿æº³æ»æ»Šæº—æº®æº£ç…‡ç…”ç…’ç…£ç… ç…ç…煢煲煸煪煡煂煘煃煋煰煟ç…ç…“\"],[\"dea1\",\"ç…„ç…ç…šç‰çŠçŠŒçŠ‘çŠçŠŽçŒ¼ç‚猻猺ç€çŠç‰ç‘„ç‘Šç‘‹ç‘’ç‘‘ç‘—ç‘€ç‘ç‘瑎瑂瑆ç‘瑔瓡瓿瓾瓽ç”畹畷榃痯ç˜ç˜ƒç—·ç—¾ç—¼ç—¹ç—¸ç˜ç—»ç—¶ç—痵痽皙皵ç›ç•çŸç ç’ç–çšç©ç§ç”ç™ççŸ ç¢‡ç¢šç¢”ç¢ç¢„碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓\"],[\"df40\",\"稛ç¨çª£çª¢çªžç««ç¦ç¤çç´ç©ç²ç¥ç³ç±ç°ç¡ç¸ç¶ç£ç²²ç²´ç²¯ç¶ˆç¶†ç¶€ç¶çµ¿ç¶…絺綎絻綃絼綌綔綄絽綒ç½ç½«ç½§ç½¨ç½¬ç¾¦ç¾¥ç¾§ç¿›ç¿œè€¡è…¤è… 腷腜腩腛腢腲朡腞腶腧腯\"],[\"dfa1\",\"è…„è…¡èˆè‰‰è‰„艀艂艅蓱è¿è‘–葶葹è’è’葥葑葀蒆葧è°è‘葽葚葙葴葳è‘蔇葞è·èºè´è‘ºè‘ƒè‘¸è²è‘…è©è™è‘‹è¯è‘‚èè‘Ÿè‘°è¹è‘Žè‘Œè‘’葯蓅蒎è»è‘‡è¶è³è‘¨è‘¾è‘„è«è‘ 葔葮è‘蜋蜄蛷蜌蛺蛖蛵è蛸蜎蜉èœè›¶èœèœ…裖裋è£è£Žè£žè£›è£šè£Œè£è¦…覛觟觥觤\"],[\"e040\",\"è§¡è§ è§¢è§œè§¦è©¶èª†è©¿è©¡è¨¿è©·èª‚èª„è©µèªƒèªè©´è©ºè°¼è±‹è±Šè±¥è±¤è±¦è²†è²„貅賌赨赩趑趌趎è¶è¶è¶“趔è¶è¶’è·°è· è·¬è·±è·®è·è·©è·£è·¢è·§è·²è·«è·´è¼†è»¿è¼è¼€è¼…輇輈輂輋é’逿\"],[\"e0a1\",\"é„é‰é€½é„é„é„鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆é‰é‰¬é‰é‰ 鉧鉯鈶鉡鉰鈱鉔鉣é‰é‰²é‰Žé‰“鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵é³é·é¸é²é é é Žé¢¬é£¶é£¹é¦¯é¦²é¦°é¦µéªéª«é›é³ªé³é³§éº€é»½åƒ¦åƒ”僗僨僳僛僪åƒåƒ¤åƒ“åƒ¬åƒ°åƒ¯åƒ£åƒ \"],[\"e140\",\"凘劀åŠå‹©å‹«åŒ°åŽ¬å˜§å˜•å˜Œå˜’å—¼å˜å˜œå˜å˜“嘂嗺å˜å˜„嗿嗹墉塼å¢å¢˜å¢†å¢å¡¿å¡´å¢‹å¡ºå¢‡å¢‘墎塶墂墈塻墔å¢å£¾å¥«å«œå«®å«¥å«•å«ªå«šå«å««å«³å«¢å« 嫛嫬嫞å«å«™å«¨å«Ÿå·å¯ \"],[\"e1a1\",\"寣屣嶂嶀嵽嶆嵺å¶åµ·å¶Šå¶‰å¶ˆåµ¾åµ¼å¶åµ¹åµ¿å¹˜å¹™å¹“廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨æ…慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫æ«æ‘æ‘›æ‘æ‘´æ‘¶æ‘²æ‘³æ‘½æ‘µæ‘¦æ’¦æ‘Žæ’‚æ‘žæ‘œæ‘‹æ‘“æ‘ æ‘æ‘¿æ¿æ‘¬æ‘«æ‘™æ‘¥æ‘·æ•³æ– æš¡æš æšŸæœ…æœ„æœ¢æ¦±æ¦¶æ§‰\"],[\"e240\",\"æ¦ æ§Žæ¦–æ¦°æ¦¬æ¦¼æ¦‘æ¦™æ¦Žæ¦§æ¦æ¦©æ¦¾æ¦¯æ¦¿æ§„榽榤槔榹槊榚æ§æ¦³æ¦“榪榡榞槙榗æ¦æ§‚榵榥槆æŠææ‹æ®žæ®Ÿæ® 毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒æ»æ¼Š\"],[\"e2a1\",\"漶潳滹滮æ¼æ½€æ¼°æ¼¼æ¼µæ»«æ¼‡æ¼Žæ½ƒæ¼…滽滶漹漜滼漺漟æ¼æ¼žæ¼ˆæ¼¡ç†‡ç†ç†‰ç†€ç†…熂ç†ç…»ç††ç†ç†—牄牓犗犕犓çƒçç‘çŒç‘¢ç‘³ç‘±ç‘µç‘²ç‘§ç‘®ç”€ç”‚甃畽ç–瘖瘈瘌瘕瘑瘊瘔皸çžç¼çž…çž‚ç®çž€ç¯ç¾çžƒç¢²ç¢ªç¢´ç¢ç¢¨ç¡¾ç¢«ç¢žç¢¥ç¢ 碬碢碤禘禊禋禖禕禔禓\"],[\"e340\",\"禗禈禒ç¦ç¨«ç©Šç¨°ç¨¯ç¨¨ç¨¦çª¨çª«çª¬ç«®ç®ˆç®œç®Šç®‘ç®ç®–ç®ç®Œç®›ç®Žç®…箘劄箙箤箂粻粿粼粺綧綷緂綣綪ç·ç·€ç·…ç¶ç·Žç·„緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞\"],[\"e3a1\",\"耤èèœè†‰è††è†ƒè†‡è†è†Œè†‹èˆ•è’—蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴è“è“蒪蒚蒱è“è’蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶è“è’ è“—è“”è“’è“›è’°è’‘è™¡èœ³èœ£èœ¨è«è€èœ®èœžèœ¡èœ™èœ›èƒèœ¬è蜾è†èœ 蜲蜪èœèœ¼èœ’蜺蜱蜵è‚蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻\"],[\"e440\",\"裰裬裫è¦è¦¡è¦Ÿè¦žè§©è§«è§¨èª«èª™èª‹èª’èªèª–谽豨豩賕è³è³—趖踉踂跿è¸è·½è¸Šè¸ƒè¸‡è¸†è¸…跾踀踄è¼è¼‘輎è¼é„£é„œé„ 鄢鄟é„é„šé„¤é„¡é„›é…ºé…²é…¹é…³éŠ¥éŠ¤é‰¶éŠ›é‰ºéŠ éŠ”éŠªéŠ\"],[\"e4a1\",\"銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩éŠéŠ‹éˆéšžéš¡é›¿é˜é½éºé¾éžƒéž€éž‚é»éž„éžé¿éŸŽéŸé –é¢é¢®é¤‚餀餇é¦é¦œé§ƒé¦¹é¦»é¦ºé§‚馽駇骱髣髧鬾鬿é é¡éŸé³±é³²é³µéº§åƒ¿å„ƒå„°åƒ¸å„†å„‡åƒ¶åƒ¾å„‹å„Œåƒ½å„ŠåŠ‹åŠŒå‹±å‹¯å™ˆå™‚噌嘵å™å™Šå™‰å™†å™˜\"],[\"e540\",\"噚噀嘳嘽嘬嘾嘸嘪嘺圚墫å¢å¢±å¢ 墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹å¬å¬‡å¬…å¬å±§å¶™å¶—å¶Ÿå¶’å¶¢å¶“å¶•å¶ å¶œå¶¡å¶šå¶žå¹©å¹å¹ 幜緳廛廞廡彉徲憋憃慹憱憰憢憉\"],[\"e5a1\",\"憛憓憯æ†æ†Ÿæ†’憪憡æ†æ…¦æ†³æˆæ‘®æ‘°æ’–æ’ æ’…æ’—æ’œæ’æ’‹æ’Šæ’Œæ’£æ’Ÿæ‘¨æ’±æ’˜æ•¶æ•ºæ•¹æ•»æ–²æ–³æšµæš°æš©æš²æš·æšªæš¯æ¨€æ¨†æ¨—æ§¥æ§¸æ¨•æ§±æ§¤æ¨ æ§¿æ§¬æ§¢æ¨›æ¨æ§¾æ¨§æ§²æ§®æ¨”槷槧橀樈槦槻æ¨æ§¼æ§«æ¨‰æ¨„樘樥æ¨æ§¶æ¨¦æ¨‡æ§´æ¨–æ‘殥殣殢殦æ°æ°€æ¯¿æ°‚æ½æ¼¦æ½¾æ¾‡æ¿†æ¾’\"],[\"e640\",\"æ¾æ¾‰æ¾Œæ½¢æ½æ¾…潚澖潶潬澂潕潲潒æ½æ½—澔澓æ½æ¼€æ½¡æ½«æ½½æ½§æ¾æ½“æ¾‹æ½©æ½¿æ¾•æ½£æ½·æ½ªæ½»ç†²ç†¯ç†›ç†°ç† ç†šç†©ç†µç†ç†¥ç†žç†¤ç†¡ç†ªç†œç†§ç†³çŠ˜çŠšç˜ç’çžçŸç çç›ç¡çšç™\"],[\"e6a1\",\"ç¢ç’‡ç’‰ç’Šç’†ç’瑽璅璈瑼瑹甈甇畾瘥瘞瘙ç˜ç˜œç˜£ç˜šç˜¨ç˜›çšœçšçšžçš›çžçžçž‰çžˆç£ç¢»ç£ç£Œç£‘ç£Žç£”ç£ˆç£ƒç£„ç£‰ç¦šç¦¡ç¦ ç¦œç¦¢ç¦›æ¶ç¨¹çª²çª´çª³ç®·ç¯‹ç®¾ç®¬ç¯Žç®¯ç®¹ç¯Šç®µç³…糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰ç¾ç¿ç¿«ç¿ªç¿¬ç¿¦ç¿¨è¤è§è†£è†Ÿ\"],[\"e740\",\"膞膕膢膙膗舖è‰è‰“艒è‰è‰Žè‰‘蔤蔻è”蔀蔩蔎蔉è”蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨è”è”®è”‚è“½è”žè“¶è”±è”¦è“§è“¨è“°è“¯è“¹è”˜è” è”°è”‹è”™è”¯è™¢\"],[\"e7a1\",\"è–è£è¤è·èŸ¡è³è˜è”è›è’è¡èšè‘èžèèªèèŽèŸèè¯è¬èºè®èœè¥èè»èµè¢è§è©è¡šè¤…褌褔褋褗褘褙褆褖褑褎褉覢覤覣è§è§°è§¬è«è«†èª¸è«“諑諔諕誻諗誾諀諅諘諃誺誽諙谾è±è²è³¥è³Ÿè³™è³¨è³šè³è³§è¶ è¶œè¶¡è¶›è¸ è¸£è¸¥è¸¤è¸®è¸•è¸›è¸–è¸‘è¸™è¸¦è¸§\"],[\"e840\",\"è¸”è¸’è¸˜è¸“è¸œè¸—è¸šè¼¬è¼¤è¼˜è¼šè¼ è¼£è¼–è¼—é³é°é¯é§é«é„¯é„«é„©é„ªé„²é„¦é„®é†…醆醊é†é†‚醄醀é‹é‹ƒé‹„鋀鋙銶é‹é‹±é‹Ÿé‹˜é‹©é‹—é‹é‹Œé‹¯é‹‚鋨鋊鋈鋎鋦é‹é‹•é‹‰é‹ 鋞鋧鋑鋓\"],[\"e8a1\",\"銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂éšéžŠéžŽéžˆéŸéŸé žé é ¦é ©é ¨é é ›é §é¢²é¤ˆé£ºé¤‘é¤”é¤–é¤—é¤•é§œé§é§é§“駔駎駉駖駘駋駗駌骳髬髫髳髲髱é†éƒé§é´é±é¦é¶éµé°é¨é¤é¬é³¼é³ºé³½é³¿é³·é´‡é´€é³¹é³»é´ˆé´…鴄麃黓é¼é¼å„œå„“儗儚儑凞匴å¡å™°å™ å™®\"],[\"e940\",\"噳噦噣å™å™²å™žå™·åœœåœ›å£ˆå¢½å£‰å¢¿å¢ºå£‚墼壆嬗嬙嬛嬡嬔嬓å¬å¬–å¬¨å¬šå¬ å¬žå¯¯å¶¬å¶±å¶©å¶§å¶µå¶°å¶®å¶ªå¶¨å¶²å¶å¶¯å¶´å¹§å¹¨å¹¦å¹¯å»©å»§å»¦å»¨å»¥å½‹å¾¼æ†æ†¨æ†–懅憴懆æ‡æ‡Œæ†º\"],[\"e9a1\",\"憿憸憌擗擖æ“æ“擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋æ›æš½æš»æšºæ›Œæœ£æ¨´æ©¦æ©‰æ©§æ¨²æ©¨æ¨¾æ©æ©æ©¶æ©›æ©‘樨橚樻樿æ©æ©ªæ©¤æ©æ©æ©”æ©¯æ©©æ© æ¨¼æ©žæ©–æ©•æ©æ©Žæ©†æ•æ”æ–殧殪殫毈毇氄氃氆æ¾æ¿‹æ¾£æ¿‡æ¾¼æ¿Žæ¿ˆæ½žæ¿„澽澞濊澨瀄澥澮澺澬澪æ¿æ¾¿æ¾¸\"],[\"ea40\",\"澢濉澫æ¿æ¾¯æ¾²æ¾°ç‡…燂熿熸燖燀ç‡ç‡‹ç‡”燊燇ç‡ç†½ç‡˜ç†¼ç‡†ç‡šç‡›çŠçŠžç©ç¦ç§ç¬ç¥ç«çªç‘¿ç’šç’ 璔璒璕璡甋疀瘯ç˜ç˜±ç˜½ç˜³ç˜¼ç˜µç˜²ç˜°çš»ç›¦çžšçžçž¡çžœçž›çž¢çž£çž•çž™\"],[\"eaa1\",\"çž—ç£ç£©ç£¥ç£ªç£žç££ç£›ç£¡ç£¢ç£ç£Ÿç£ 禤穄穈穇窶窸窵窱窷篞篣篧ç¯ç¯•ç¯¥ç¯šç¯¨ç¯¹ç¯”篪篢篜篫篘篟糒糔糗ç³ç³‘ç¸’ç¸¡ç¸—ç¸Œç¸Ÿç¸ ç¸“ç¸Žç¸œç¸•ç¸šç¸¢ç¸‹ç¸ç¸–ç¸ç¸”縥縤罃罻罼罺羱翯耪耩è¬è†±è†¦è†®è†¹è†µè†«è†°è†¬è†´è†²è†·è†§è‡²è‰•è‰–艗蕖蕅蕫è•è•“蕡蕘\"],[\"eb40\",\"蕀蕆蕤è•è•¢è•„è•‘è•‡è•£è”¾è•›è•±è•Žè•®è•µè••è•§è• è–Œè•¦è•è•”蕥蕬虣虥虤螛èžèž—螓螒螈èžèž–螘è¹èž‡èž£èž…èžèž‘èžèž„螔螜螚螉褞褦褰è¤è¤®è¤§è¤±è¤¢è¤©è¤£è¤¯è¤¬è¤Ÿè§±è« \"],[\"eba1\",\"諢諲諴諵è«è¬”諤諟諰諈諞諡諨諿諯諻貑貒è²è³µè³®è³±è³°è³³èµ¬èµ®è¶¥è¶§è¸³è¸¾è¸¸è¹€è¹…踶踼踽è¹è¸°è¸¿èº½è¼¶è¼®è¼µè¼²è¼¹è¼·è¼´é¶é¹é»é‚†éƒºé„³é„µé„¶é†“é†é†‘é†é†éŒ§éŒžéŒˆéŒŸéŒ†éŒéºéŒ¸éŒ¼éŒ›éŒ£éŒ’éŒé†éŒéŒŽéŒé‹‹éŒé‹ºéŒ¥éŒ“鋹鋷錴錂錤鋿錩錹錵錪錔錌\"],[\"ec40\",\"錋鋾錉錀鋻錖閼é—閾閹閺閶閿閵閽隩雔霋霒éœéž™éž—éž”éŸ°éŸ¸é µé ¯é ²é¤¤é¤Ÿé¤§é¤©é¦žé§®é§¬é§¥é§¤é§°é§£é§ªé§©é§§éª¹éª¿éª´éª»é«¶é«ºé«¹é«·é¬³é®€é®…é®‡é¼é¾é»é®‚鮓鮒é®éºé®•\"],[\"eca1\",\"é½é®ˆé´¥é´—é´ é´žé´”é´©é´é´˜é´¢é´é´™é´Ÿéºˆéº†éº‡éº®éºé»•é»–é»ºé¼’é¼½å„¦å„¥å„¢å„¤å„ å„©å‹´åš“åšŒåšåš†åš„嚃噾嚂噿åšå£–壔å£å£’å¬å¬¥å¬²å¬£å¬¬å¬§å¬¦å¬¯å¬®å»å¯±å¯²å¶·å¹¬å¹ªå¾¾å¾»æ‡ƒæ†µæ†¼æ‡§æ‡ 懥懤懨懞擯擩擣擫擤擨æ–斀斶旚曒æªæª–æªæª¥æª‰æªŸæª›æª¡æªžæª‡æª“檎\"],[\"ed40\",\"檕檃檨檤檑橿檦檚檅檌檒æ›æ®æ°‰æ¿Œæ¾©æ¿´æ¿”濣濜æ¿æ¿§æ¿¦æ¿žæ¿²æ¿æ¿¢æ¿¨ç‡¡ç‡±ç‡¨ç‡²ç‡¤ç‡°ç‡¢ç³ç®ç¯ç’—璲璫ç’ç’ªç’璱璥璯ç”甑甒ç”疄癃癈癉癇皤盩瞵瞫瞲瞷瞶\"],[\"eda1\",\"瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀ç«ç°…ç°ç¯²ç°€ç¯¿ç¯»ç°Žç¯´ç°‹ç¯³ç°‚簉簃ç°ç¯¸ç¯½ç°†ç¯°ç¯±ç°ç°Šç³¨ç¸ç¸¼ç¹‚縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀è–è–§è–•è– è–‹è–£è•»è–¤è–šè–ž\"],[\"ee40\",\"蕷蕼薉薡蕺蕸蕗薎薖薆è–è–™è–è–薢薂薈薅蕹蕶薘è–薟虨螾螪èžèŸ…螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾è¥è¥’褷襂è¦è¦¯è¦®è§²è§³è¬ž\"],[\"eea1\",\"謘謖謑謅謋謢è¬è¬’謕謇è¬è¬ˆè¬†è¬œè¬“謚è±è±°è±²è±±è±¯è²•è²”賹赯蹎è¹è¹“è¹è¹Œè¹‡è½ƒè½€é‚…é¾é„¸é†šé†¢é†›é†™é†Ÿé†¡é†é† 鎡鎃鎯é¤é–é‡é¼é˜éœé¶é‰éé‘é ééŽéŒéªé¹é—é•é’éé±é·é»é¡éžé£é§éŽ€éŽé™é—‡é—€é—‰é—ƒé—…é–·éš®éš°éš¬éœ éœŸéœ˜éœéœ™éžšéž¡éžœ\"],[\"ef40\",\"éžžéžéŸ•éŸ”韱é¡é¡„顊顉顅顃餥餫餬餪餳餲餯é¤é¤±é¤°é¦˜é¦£é¦¡é¨‚駺駴駷駹駸駶駻駽駾駼騃骾髾髽é¬é«¼éˆé®šé®¨é®žé®›é®¦é®¡é®¥é®¤é®†é®¢é® 鮯鴳éµéµ§é´¶é´®é´¯é´±é´¸é´°\"],[\"efa1\",\"鵅鵂鵃鴾鴷鵀鴽翵é´éºŠéº‰éºéº°é»ˆé»šé»»é»¿é¼¤é¼£é¼¢é½”é¾ å„±å„儮嚘嚜嚗嚚åšåš™å¥°å¬¼å±©å±ªå·€å¹å¹®æ‡˜æ‡Ÿæ‡æ‡®æ‡±æ‡ªæ‡°æ‡«æ‡–懩擿攄擽擸æ”攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴æªæžæ¯‰æ°‹ç€‡ç€Œç€ç€ç€…瀔瀎濿瀀濻瀦濼濷瀊çˆç‡¿ç‡¹çˆƒç‡½ç¶\"],[\"f040\",\"璸瓀璵ç“璾璶璻瓂甔甓癜癤癙ç™ç™“癗癚皦皽盬矂瞺磿礌礓礔礉ç¤ç¤’礑ç¦ç¦¬ç©Ÿç°œç°©ç°™ç° ç°Ÿç°ç°ç°¦ç°¨ç°¢ç°¥ç°°ç¹œç¹ç¹–ç¹£ç¹˜ç¹¢ç¹Ÿç¹‘ç¹ ç¹—ç¹“ç¾µç¾³ç¿·ç¿¸èµè‡‘臒\"],[\"f0a1\",\"è‡è‰Ÿè‰žè–´è—†è—€è—ƒè—‚薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓èŸèŸ˜èŸ£èž¤èŸ—蟙è 蟴蟨èŸè¥“襋è¥è¥Œè¥†è¥è¥‘襉謪謧謣謳謰謵è‡è¬¯è¬¼è¬¾è¬±è¬¥è¬·è¬¦è¬¶è¬®è¬¤è¬»è¬½è¬ºè±‚è±µè²™è²˜è²—è³¾è´„è´‚è´€è¹œè¹¢è¹ è¹—è¹–è¹žè¹¥è¹§\"],[\"f140\",\"蹛蹚蹡è¹è¹©è¹”轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛éŽéŽ‰éŽ§éŽŽéŽªéŽžéŽ¦éŽ•éŽˆéŽ™éŽŸéŽéŽ±éŽ‘鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘é›éœ£éœ¢éœ¥éž¬éž®éž¨éž«éž¤éžª\"],[\"f1a1\",\"鞢鞥韗韙韖韘韺é¡é¡‘顒颸é¥é¤¼é¤ºé¨é¨‹é¨‰é¨é¨„騑騊騅騇騆髀髜鬈鬄鬅鬩鬵éŠéŒé‹é¯‡é¯†é¯ƒé®¿é¯é®µé®¸é¯“鮶鯄鮹鮽鵜鵓éµéµŠéµ›éµ‹éµ™éµ–鵌鵗鵒鵔鵟鵘鵚麎麌黟é¼é¼€é¼–鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫åšåš¦åš§åšªåš¬å£šå£å£›å¤’嬽嬾嬿巃幰\"],[\"f240\",\"徿懻攇æ”æ”攉攌攎斄旞æ—æ›žæ«§æ« æ«Œæ«‘æ«™æ«‹æ«Ÿæ«œæ«æ««æ«æ«æ«žæ æ®°æ°Œç€™ç€§ç€ ç€–ç€«ç€¡ç€¢ç€£ç€©ç€—ç€¤ç€œç€ªçˆŒçˆŠçˆ‡çˆ‚çˆ…çŠ¥çŠ¦çŠ¤çŠ£çŠ¡ç“‹ç“…ç’·ç“ƒç”–ç™ çŸ‰çŸŠçŸ„çŸ±ç¤ç¤›\"],[\"f2a1\",\"礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾è¸è‡—臕艤艡艣藫藱è—è—™è—¡è—¨è—šè——è—¬è—²è—¸è—˜è—Ÿè—£è—œè—‘è—°è—¦è—¯è—žè—¢è €èŸºè ƒèŸ¶èŸ·è ‰è Œè ‹è †èŸ¼è ˆèŸ¿è Šè ‚è¥¢è¥šè¥›è¥—è¥¡è¥œè¥˜è¥è¥™è¦ˆè¦·è¦¶è§¶èèˆèŠè€è“è–è”è‹è•\"],[\"f340\",\"è‘è‚è’è—豃豷豶貚贆贇贉趬趪è¶è¶«è¹è¹¸è¹³è¹ªè¹¯è¹»è»‚轒轑è½è½è½“辴酀鄿醰é†éžé‡éé‚éšéé¹é¬éŒé™éŽ©é¦éŠé”é®é£é•é„éŽé€é’é§é•½é—šé—›é›¡éœ©éœ«éœ¬éœ¨éœ¦\"],[\"f3a1\",\"鞳鞷鞶éŸéŸžéŸŸé¡œé¡™é¡é¡—颿颽颻颾饈饇饃馦馧騚騕騥é¨é¨¤é¨›é¨¢é¨ é¨§é¨£é¨žé¨œé¨”é«‚é¬‹é¬Šé¬Žé¬Œé¬·é¯ªé¯«é¯ é¯žé¯¤é¯¦é¯¢é¯°é¯”é¯—é¯¬é¯œé¯™é¯¥é¯•é¯¡é¯šéµ·é¶é¶Šé¶„鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼é¼é½€é½é½é½–齗齘匷嚲\"],[\"f440\",\"嚵嚳壣å…巆巇廮廯忀å¿æ‡¹æ”—攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱ç‚瀸瀿瀺瀹ç€ç€»ç€³ç爓爔犨ç½ç¼ç’ºçš«çšªçš¾ç›çŸŒçŸŽçŸçŸçŸ²ç¤¥ç¤£ç¤§ç¤¨ç¤¤ç¤©\"],[\"f4a1\",\"禲穮穬ç©ç«·ç±‰ç±ˆç±Šç±‡ç±…糮繻繾çºçº€ç¾ºç¿¿è¹è‡›è‡™èˆ‹è‰¨è‰©è˜¢è—¿è˜è—¾è˜›è˜€è—¶è˜„è˜‰è˜…è˜Œè—½è ™è è ‘è —è “è –è¥£è¥¦è¦¹è§·è èªèè¨è£è¥è§è趮躆躈躄轙轖轗轕轘轚é‚é…ƒé…醷醵醲醳é‹é“é»é éé”é¾é•éé¨é™ééµé€é·é‡éŽé–é’éºé‰é¸éŠé¿\"],[\"f540\",\"é¼éŒé¶é‘é†é—žé— é—Ÿéœ®éœ¯éž¹éž»éŸ½éŸ¾é¡ é¡¢é¡£é¡Ÿé£é£‚é¥é¥Žé¥™é¥Œé¥‹é¥“騲騴騱騬騪騶騩騮騸é¨é«‡é«Šé«†é¬é¬’鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤é¶é¶’鶘é¶é¶›\"],[\"f5a1\",\"é¶ é¶”é¶œé¶ªé¶—é¶¡é¶šé¶¢é¶¨é¶žé¶£é¶¿é¶©é¶–é¶¦é¶§éº™éº›éºšé»¥é»¤é»§é»¦é¼°é¼®é½›é½ é½žé½é½™é¾‘儺儹劘劗囃嚽嚾åˆå‡å·‹å·å»±æ‡½æ”›æ¬‚櫼欃櫸欀çƒç„çŠçˆç‰ç…ç†çˆçˆšçˆ™ç¾ç”—癪çŸç¤ç¤±ç¤¯ç±”籓糲纊纇纈纋纆çºç½ç¾»è€°è‡è˜˜è˜ªè˜¦è˜Ÿè˜£è˜œè˜™è˜§è˜®è˜¡è˜ 蘩蘞蘥\"],[\"f640\",\"è ©è è ›è è ¤è œè «è¡Šè¥è¥©è¥®è¥«è§ºè¹è¸è…èºè»è´è´”趯躎躌轞轛è½é…†é…„酅醹é¿é»é¶é©é½é¼é°é¹éªé·é¬é‘€é±é—¥é—¤é—£éœµéœºéž¿éŸ¡é¡¤é£‰é£†é£€é¥˜é¥–騹騽驆驄驂é©é¨º\"],[\"f6a1\",\"騿é«é¬•é¬—鬘鬖鬺é’é°«é°é°œé°¬é°£é°¨é°©é°¤é°¡é¶·é¶¶é¶¼é·é·‡é·Šé·é¶¾é·…鷃鶻鶵鷎鶹鶺鶬鷈鶱é¶é·Œé¶³é·é¶²é¹ºéºœé»«é»®é»é¼›é¼˜é¼šé¼±é½Žé½¥é½¤é¾’亹囆囅囋奱å‹åŒå·•å·‘å»²æ”¡æ” æ”¦æ”¢æ¬‹æ¬ˆæ¬‰æ°ç•ç–ç—ç’爞爟犩ç¿ç“˜ç“•ç“™ç“—ç™çšç¤µç¦´ç©°ç©±ç±—籜籙籛籚\"],[\"f740\",\"糴糱纑ç½ç¾‡è‡žè‰«è˜´è˜µè˜³è˜¬è˜²è˜¶è ¬è ¨è ¦è ªè ¥è¥±è¦¿è¦¾è§»è¾è®„讂讆讅è¿è´•èº•èº”躚躒èºèº–èº—è½ è½¢é…‡é‘Œé‘é‘Šé‘‹é‘鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌é©é©ˆé©Š\"],[\"f7a1\",\"驉驒é©é«é¬™é¬«é¬»é–é•é±†é±ˆé°¿é±„鰹鰳é±é°¼é°·é°´é°²é°½é°¶é·›é·’é·žé·šé·‹é·é·œé·‘鷟鷩鷙鷘鷖鷵鷕é·éº¶é»°é¼µé¼³é¼²é½‚齫龕龢儽劙壨壧奲åå·˜è ¯å½æˆæˆƒæˆ„攩攥斖曫欑欒æ¬æ¯Šç›çšçˆ¢çŽ‚çŽçŽƒç™°çŸ”ç±§ç±¦çº•è‰¬è˜ºè™€è˜¹è˜¼è˜±è˜»è˜¾è °è ²è ®è ³è¥¶è¥´è¥³è§¾\"],[\"f840\",\"讌讎讋讈豅贙躘轤轣醼鑢鑕é‘é‘—é‘žéŸ„éŸ…é €é©–é©™é¬žé¬Ÿé¬ é±’é±˜é±é±Šé±é±‹é±•é±™é±Œé±Žé·»é··é·¯é·£é·«é·¸é·¤é·¶é·¡é·®é·¦é·²é·°é·¢é·¬é·´é·³é·¨é·é»‚é»é»²é»³é¼†é¼œé¼¸é¼·é¼¶é½ƒé½\"],[\"f8a1\",\"齱齰齮齯囓å›åŽå±æ”æ›æ›®æ¬“çŸç¡çç 爣瓛瓥矕礸禷禶籪纗羉è‰è™ƒè ¸è ·è µè¡‹è®”è®•èºžèºŸèº èºé†¾é†½é‡‚鑫鑨鑩雥é†éƒé‡éŸ‡éŸ¥é©žé«•é™é±£é±§é±¦é±¢é±žé± 鸂鷾鸇鸃鸆鸅鸀é¸é¸‰é·¿é·½é¸„éº é¼žé½†é½´é½µé½¶å›”æ”®æ–¸æ¬˜æ¬™æ¬—æ¬šç¢çˆ¦çŠªçŸ˜çŸ™ç¤¹ç±©ç±«ç³¶çºš\"],[\"f940\",\"çº˜çº›çº™è‡ è‡¡è™†è™‡è™ˆè¥¹è¥ºè¥¼è¥»è§¿è®˜è®™èº¥èº¤èº£é‘®é‘鑯鑱鑳é‰é¡²é¥Ÿé±¨é±®é±é¸‹é¸é¸é¸é¸’鸑麡黵鼉齇齸齻齺齹圞ç¦ç±¯è ¼è¶²èº¦é‡ƒé‘´é‘¸é‘¶é‘µé© 鱴鱳鱱鱵鸔鸓黶鼊\"],[\"f9a1\",\"龤ç¨ç¥ç³·è™ªè ¾è ½è ¿è®žè²œèº©è»‰é‹é¡³é¡´é£Œé¥¡é¦«é©¤é©¦é©§é¬¤é¸•é¸—齈戇欞爧虌躨钂钀é’驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺é¸ç©çªéº¤é½¾é½‰é¾˜ç¢éŠ¹è£å¢»æ’粧嫺╔╦╗╠╬╣╚╩â•â•’╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║â•â•â•®â•°â•¯â–“\"]]"); /***/ }), -/* 884 */ +/* 881 */ /***/ (function(module) { module.exports = JSON.parse("[[\"8740\",\"ä°ä°²ä˜ƒä–¦ä•¸ð§‰§äµ·ä–³ð§²±ä³¢ð§³…㮕䜶ä„䱇䱀𤊿𣘗ð§’𦺋𧃒䱗ðª‘ä䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡æ™å›»\"],[\"8767\",\"綕å¤ð¨®¹ã·´éœ´ð§¯¯å¯›ð¡µžåª¤ã˜¥ð©º°å«‘å®·å³¼æ®è–“ð©¥…ç‘¡ç’㡵𡵓𣚞𦀡㻬\"],[\"87a1\",\"𥣞㫵竼龗𤅡ð¨¤ð£‡ªð ªŠð£‰žäŒŠè’„é¾–é¯ä¤°è˜“墖éŠéˆ˜ç§ç¨²æ™ 権è¢ç‘Œç¯…枂稬å‰é†ã“¦ç„ð¥¶¹ç“†é¿‡åž³ä¤¯å‘Œä„±ð£šŽå ˜ç©²ð§¥è®äš®ð¦ºˆä†ð¥¶™ç®®ð¢’¼é¿ˆð¢“𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿æ‹ç®é¿‹\"],[\"8840\",\"㇀\",4,\"𠄌㇅𠃑ð ƒã‡†ã‡‡ð ƒ‹ð¡¿¨ã‡ˆð ƒŠã‡‰ã‡Šã‡‹ã‡Œð „Žã‡ã‡ŽÄ€ÃÇÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊÄáǎà ɑēéěèīÃÇìÅóǒòūúǔùǖǘǚ\"],[\"88a1\",\"ǜü࿿ê̄ế࿿ê̌á»ÃªÉ¡âšâ›\"],[\"8940\",\"𪎩𡅅\"],[\"8943\",\"攊\"],[\"8946\",\"丽æ»éµŽé‡Ÿ\"],[\"894c\",\"𧜵撑会伨侨兖兴农凤务动医åŽå‘å˜å›¢å£°å¤„备夲头å¦å®žå®Ÿå²šåº†æ€»æ–‰æŸ¾æ „桥济炼电纤纬纺织ç»ç»Ÿç¼†ç¼·è‰ºè‹è¯è§†è®¾è¯¢è½¦è½§è½®\"],[\"89a1\",\"ç‘ç³¼ç·æ¥†ç«‰åˆ§\"],[\"89ab\",\"醌碸酞肼\"],[\"89b0\",\"贋胶𠧧\"],[\"89b5\",\"肟黇ä³é·‰é¸Œä°¾ð©·¶ð§€Žé¸Šðª„³ã—\"],[\"89c1\",\"溚舾甙\"],[\"89c5\",\"䤑马éªé¾™ç¦‡ð¨‘¬ð¡·Šð —𢫦两äºäº€äº‡äº¿ä»«ä¼·ã‘Œä¾½ã¹ˆå€ƒå‚ˆã‘½ã’“㒥円夅凛凼刅争剹åŠåŒ§ã—‡åŽ©ã•‘厰㕓å‚å£ã•ã•²ãšå’“咣咴咹å“哯唘唣唨㖘唿㖥㖿嗗㗅\"],[\"8a40\",\"𧶄唥\"],[\"8a43\",\"𠱂𠴕𥄫å–𢳆㧬ð 蹆𤶸𩓥ä“𨂾çºð¢°¸ã¨´äŸ•ð¨…𦧲𤷪æ“𠵼𠾴𠳕𡃴æ’蹾𠺖𠰋𠽤𢲩𨉖𤓓\"],[\"8a64\",\"𠵆ð©©ð¨ƒ©äŸ´ð¤º§ð¢³‚骲㩧𩗴ã¿ã”†ð¥‹‡ð©Ÿ”ð§£ˆð¢µ„éµ®é •\"],[\"8a76\",\"ä™ð¦‚¥æ’´å“£ð¢µŒð¢¯Šð¡·ã§»ð¡¯\"],[\"8aa1\",\"𦛚𦜖𧦠擪ð¥’𠱃蹨𢆡ð¨Œð œ±\"],[\"8aac\",\"ä ‹ð †©ã¿ºå¡³ð¢¶\"],[\"8ab2\",\"𤗈𠓼𦂗𠽌𠶖啹䂻䎺\"],[\"8abb\",\"䪴𢩦ð¡‚膪飵𠶜æ¹ã§¾ð¢µè·€åš¡æ‘¼ã¹ƒ\"],[\"8ac9\",\"ðª˜ð ¸‰ð¢«ð¢³‰\"],[\"8ace\",\"𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻\"],[\"8adf\",\"𧕴𢺋𢈈𪙛ð¨³ð ¹ºð °´ð¦ œç¾“ð¡ƒð¢ ƒð¢¤¹ã—»ð¥‡£ð ºŒð ¾ð ºªã¾“𠼰𠵇ð¡…𠹌\"],[\"8af6\",\"𠺫𠮩𠵈𡃀𡄽㿹𢚖æ²ð ¾\"],[\"8b40\",\"ð£´ð§˜¹ð¢¯Žð µ¾ð µ¿ð¢±‘𢱕㨘𠺘𡃇𠼮𪘲ð¦ð¨³’𨶙𨳊閪哌苄喹\"],[\"8b55\",\"𩻃鰦骶ð§žð¢·®ç…€è…胬尜𦕲脴㞗åŸð¨‚½é†¶ð »ºð ¸ð ¹·ð »»ã—𤷫㘉𠳖嚯𢞵𡃉ð ¸ð ¹¸ð¡¸ð¡…ˆð¨ˆ‡ð¡‘•ð ¹¹ð¤¹ð¢¶¤å©”ð¡€ð¡€žð¡ƒµð¡ƒ¶åžœð ¸‘\"],[\"8ba1\",\"𧚔ð¨‹ð ¾µð ¹»ð¥…¾ãœƒð ¾¶ð¡†€ð¥‹˜ðªŠ½ð¤§šð¡ ºð¤…·ð¨‰¼å¢™å‰¨ã˜šð¥œ½ç®²å¨ä €ä¬¬é¼§ä§§é°Ÿé®ð¥´ð£„½å—»ã—²åš‰ä¸¨å¤‚ð¡¯ð¯¡¸é‘𠂆乛亻㔾尣彑忄㣺扌攵æºæ°µæ°ºç¬çˆ«ä¸¬çŠð¤£©ç½’礻糹罓𦉪ã“\"],[\"8bde\",\"ð¦‹è€‚肀𦘒𦥑å衤è§ð§¢²è® è´é’…镸长门ð¨¸éŸ¦é¡µé£Žé£žé¥£ð© 鱼鸟黄æ¯ï¤‡ä¸·ð ‚‡é˜æˆ·é’¢\"],[\"8c40\",\"倻淾𩱳龦㷉è¢ð¤…Žç·å³µä¬ ð¥‡ã•™ð¥´°æ„¢ð¨¨²è¾§é‡¶ç†‘朙玺ð£Šðª„‡ã²‹ð¡¦€ä¬ç£¤ç‚冮ð¨œä€‰æ©£ðªŠºäˆ£è˜ð ©¯ç¨ªð©¥‡ð¨«ªé•ç匤ð¢¾é´ç›™ð¨§£é¾§çŸäº£ä¿°å‚¼ä¸¯ä¼—龨å´ç¶‹å¢’å£ð¡¶¶åº’庙忂𢜒斋\"],[\"8ca1\",\"ð£¹æ¤™æ©ƒð£±£æ³¿\"],[\"8ca7\",\"爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩è¢é¾ªèº¹é¾«è¿è•Ÿé§ 鈡龬𨶹ð¡¿ä±äŠ¢å¨š\"],[\"8cc9\",\"顨æ«ä‰¶åœ½\"],[\"8cce\",\"藖𤥻芿ð§„ä²ð¦µ´åµ»ð¦¬•ð¦¾¾é¾é¾®å®–龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶\"],[\"8ce6\",\"峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤ð¦±è«Œä¾´ð ˆ¹å¦¿è…¬é¡–𩣺弻\"],[\"8d40\",\"𠮟\"],[\"8d42\",\"ð¢‡ð¨¥ä„‚äš»ð©¹ã¼‡é¾³ðª†µäƒ¸ãŸ–䛷𦱆䅼𨚲ð§¿ä•ã£”𥒚䕡䔛䶉䱻䵶䗪㿈ð¤¬ã™¡ä“žä’½ä‡å´¾åµˆåµ–ã·¼ã 嶤嶹ã 㠸幂庽弥徃㤈㤔㤿ã¥æƒ—愽峥㦉憷憹æ‡ã¦¸æˆ¬æŠæ‹¥æŒ˜ã§¸åš±\"],[\"8da1\",\"㨃æ¢æ»æ‡æ‘šã©‹æ“€å´•å˜¡é¾Ÿãª—斆㪽旿晓㫲暒㬢朖ã‚æž¤æ €ã˜æ¡Šæ¢„ã²ã±ã»æ¤‰æ¥ƒç‰œæ¥¤æ¦Ÿæ¦…㮼槖ã¯æ©¥æ©´æ©±æª‚㯬檙㯲檫檵櫔櫶æ®æ¯æ¯ªæ±µæ²ªã³‹æ´‚洆洦æ¶ã³¯æ¶¤æ¶±æ¸•æ¸˜æ¸©æº†ð¨§€æº»æ»¢æ»šé½¿æ»¨æ»©æ¼¤æ¼´ãµ†ð£½æ¾æ¾¾ãµªãµµç†·å²™ã¶Šç€¬ã¶‘çç”ç¯ç¿ç‚‰ð Œ¥ä㗱𠻘\"],[\"8e40\",\"𣻗垾𦻓焾𥟠㙎榢𨯩å´ç©‰ð¥£¡ð©“™ç©¥ç©½ð¥¦¬çª»çª°ç«‚竃燑ð¦’䇊竚ç«ç«ªä‡¯å’²ð¥°ç¬‹ç•ç¬©ð¥ŒŽð¥³¾ç®¢ç¯èŽœð¥®´ð¦±¿ç¯è¡ç®’箸𥴠ã¶ð¥±¥è’’篺簆簵ð¥³ç±„粃𤢂粦晽𤕸糉糇糦籴糳糵糎\"],[\"8ea1\",\"繧ä”𦹄çµð¦»–ç’綉綫焵綳緒ð¤—𦀩緤㴓緵𡟹緥ð¨ç¸ð¦„¡ð¦…šç¹®çº’䌫鑬縧罀ç½ç½‡ç¤¶ð¦‹é§¡ç¾—ð¦‘羣𡙡ð ¨ä•œð£¦ä”ƒð¨Œºç¿ºð¦’‰è€…耈è€è€¨è€¯ðª‚‡ð¦³ƒè€»è€¼è¡ð¢œ”䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩ð ¬ð¦©’𣵾俹𡓽蓢è¢ð¦¬Šð¤¦§ð£”°ð¡³ð£·¸èŠªæ¤›ð¯¦”䇛\"],[\"8f40\",\"è•‹è‹èŒšð ¸–ð¡ž´ã›ð£…½ð£•šè‰»è‹¢èŒ˜ð£º‹ð¦¶£ð¦¬…𦮗𣗎㶿èŒå—¬èŽ…䔋𦶥莬èè“㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞èèŽ‘ä’ è’“è“¤ð¥²‘ä‰€ð¥³€ä•ƒè”´å«²ð¦º™ä”§è•³ä”–æž¿è˜–\"],[\"8fa1\",\"𨘥𨘻è—𧂈蘂𡖂ð§ƒð¯¦²ä•ªè˜¨ã™ˆð¡¢¢å·ð§Žšè™¾è±ðªƒ¸èŸ®ð¢°§èž±èŸšè 噡虬桖ä˜è¡…衆𧗠𣶹𧗤衞袜䙛袴袵æ装ç·ð§œè¦‡è¦Šè¦¦è¦©è¦§è¦¼ð¨¨¥è§§ð§¤¤ð§ª½èªœçž“釾èªð§©™ç«©ð§¬ºð£¾äœ“𧬸煼謌謟ð¥°ð¥•¥è¬¿èŒè誩𤩺è®è®›èª¯ð¡›Ÿä˜•è¡è²›ð§µ”ð§¶ð¯§”㜥𧵓賖𧶘𧶽贒贃ð¡¤è³›çœè´‘𤳉ã»èµ·\"],[\"9040\",\"趩𨀂𡀔𤦊ã¼ð¨†¼ð§„Œç«§èºèº¶è»ƒé‹”è¼™è¼ð¨¥ð¨’辥錃𪊟ð ©è¾³ä¤ªð¨§žð¨”½ð£¶»å»¸ð£‰¢è¿¹ðª€”𨚼ð¨”𢌥㦀𦻗逷𨔼𧪾é¡ð¨•¬ð¨˜‹é‚¨ð¨œ“郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟é‰é‰¢ð¥–¹éŠ¹ð¨«†ð£²›ð¨¬Œð¥—›\"],[\"90a1\",\"𠴱錬é«ð¨«¡ð¨¯«ç‚嫃𨫢𨫥䥥鉄𨯬𨰹𨯿é³é‘›èº¼é–…é–¦é¦é– 濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽åŒä¦¡ð¦²¸ð ‰´ð¦ð©‚¯ð©ƒ¥ð¤«‘𡤕𣌊霱虂霶ä¨ä”½ä–…𤫩çµå霛éœð©‡•é—åŠð©‡«éŸé¥åƒð£‚·ð£‚¼éž‰éžŸéž±éž¾éŸ€éŸ’éŸ ð¥‘¬éŸ®çœð©³éŸ¿éŸµð©ð§¥ºä«‘é ´é ³é¡‹é¡¦ã¬Žð§…µãµ‘ð ˜°ð¤…œ\"],[\"9140\",\"𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬é¸é¤¹ð¤¨©ä²ð©¡—𩤅駵騌騻é¨é©˜ð¥œ¥ã›„ð©‚±ð©¯•é« é«¢ð©¬…é«´ä°Žé¬”é¬ð¨˜€å€´é¬´ð¦¦¨ã£ƒð£½éé€ð©´¾å©…𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈\"],[\"91a1\",\"鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴éºéº•éºžéº¢ä´´éºªéº¯ð¤¤é»ã 㧥ã´ä¼²ãž¾ð¨°«é¼‚鼈䮖é¤ð¦¶¢é¼—鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸ð¤ˆð¤©‘玞𨯚𡣺禟𨥾𨸶é©é³ð¨©„鋬éŽé‹ð¨¥¬ð¤’¹çˆ—㻫ç²ç©ƒçƒð¤‘³ð¤¸ç…¾ð¡Ÿ¯ç‚£ð¡¢¾ð£–™ã»‡ð¡¢…ð¥¯ð¡Ÿ¸ãœ¢ð¡›»ð¡ ¹ã›¡ð¡´ð¡£‘𥽋㜣𡛀å›ð¤¨¥ð¡¾ð¡Š¨\"],[\"9240\",\"ð¡†ð¡’¶è”ƒð£š¦è”ƒè‘•ð¤¦”𧅥𣸱𥕜𣻻ð§’䓴𣛮ð©¦ð¦¼¦æŸ¹ãœ³ã°•ã·§å¡¬ð¡¤¢æ ä—𣜿𤃡𤂋ð¤„𦰡哋嚞𦚱嚒𠿟𠮨ð ¸é†ð¨¬“鎜仸儫㠙ð¤¶äº¼ð ‘¥ð ¿ä½‹ä¾Šð¥™‘婨𠆫ð ‹ã¦™ð ŒŠð ”ãµä¼©ð ‹€ð¨º³ð ‰µè«šð ˆŒäº˜\"],[\"92a1\",\"åƒå„侢伃𤨎𣺊佂倮å¬å‚俌俥å˜åƒ¼å…™å…›å…å…žæ¹¶ð£–•ð£¸¹ð£º¿æµ²ð¡¢„ð£º‰å†¨å‡ƒð — ä“𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡é®ä™ºç†Œð¤ŽŒð ° 𤦬𡃤槑ð ¸ç‘¹ã»žç’™ç”瑖玘䮎𤪼ð¤‚åã–„çˆð¤ƒ‰å–´ð …å“𠯆åœé‰é›´é¦åŸåžå¿ã˜¾å£‹åª™ð¨©†ð¡›ºð¡¯ð¡œå¨¬å¦¸éŠå©¾å«å¨’𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃\"],[\"9340\",\"åªð¨¯—ð “é 璌𡌃焅䥲éˆð¨§»éŽ½ãž 尞岞幞幈𡦖𡥼𣫮å»å𡤃𡤄ãœð¡¢ ã›ð¡›¾ã›“脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻å„è˜”ð§—½è¡ æ¾ð¢¡ 𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾ð †ð¢˜›æ†™æ†˜æµð¢²›ð¢´‡ð¤›”ð©…\"],[\"93a1\",\"摱𤙥ð¢ªã¨©ð¢¬¢ð£‘𩣪𢹸挷𪑛撶挱æ‘𤧣𢵧护𢲡æ»æ•«æ¥²ã¯´ð£‚Žð£Šð¤¦‰ð£Š«å”𣋠𡣙ð©¿æ›Žð£Š‰ð£†³ã« ä†ð¥–„𨬢ð¥–𡛼𥕛ð¥¥ç£®ð£„ƒð¡ ªð£ˆ´ã‘¤ð£ˆð£†‚𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢ð£¾ç“ã®–æžð¤˜ªæ¢¶æ žã¯„檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺æ—ð£¿€ð£²šéŽ é‹²ð¨¯ªð¨«‹\"],[\"9440\",\"銉𨀞𨧜鑧涥漋𤧬浧𣽿ã¶æ¸„𤀼娽渊塇洤硂焻𤌚𤉶烱ç‰çŠ‡çŠ”ð¤žð¤œ¥å…¹ð¤ª¤ð —«ç‘ºð£»¸ð£™Ÿð¤©Šð¤¤—𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌ç¼éŽ‡ç·ä’Ÿð¦·ªä•‘疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻\"],[\"94a1\",\"ã·ð¤©Žã»¿ð¤§…𤣳釺圲é‚𨫣𡡤僟𥈡𥇧ç¸ð£ˆ²çœŽçœç»ð¤š—ð£žã©žð¤£°ç¸ç’›ãº¿ð¤ªºð¤«‡äƒˆð¤ª–𦆮錇ð¥–ç žç¢ç¢ˆç£’ç祙ð§ð¥›£ä„Žç¦›è’–禥æ¨ð£»ºç¨ºç§´ä…®ð¡›¦ä„²éˆµç§±ð µŒð¤¦Œð Š™ð£¶ºð¡®ã–—啫㕰㚪𠇔ð °ç«¢å©™ð¢›µð¥ª¯ð¥ªœå¨ð ‰›ç£°å¨ªð¥¯†ç«¾ä‡¹ç±ç±äˆ‘𥮳𥺼𥺦ç³ð¤§¹ð¡ž°ç²Žç±¼ç²®æª²ç·œç¸‡ç·“罎𦉡\"],[\"9540\",\"𦅜ð§ˆç¶—𥺂䉪ð¦µð ¤–柖ð Žð£—埄ð¦’ð¦¸ð¤¥¢ç¿ç¬§ð ¬ð¥«©ð¥µƒç¬Œð¥¸Žé§¦è™…驣樜ð£¿ã§¢ð¤§·ð¦–騟𦖠蒀𧄧𦳑䓪脷ä‚胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧è˜ð§ˆ›åª†ä…¿ð¡¡€å¬«ð¡¢¡å«¤ð¡£˜èš 蜨ð£¶è ð§¢å¨‚\"],[\"95a1\",\"衮佅袇袿裦襥è¥ð¥šƒè¥”𧞅𧞄𨯵𨯙𨮜𨧹ãºè’£ä›µä›ãŸ²è¨½è¨œð©‘ˆå½éˆ«ð¤Š„旔焩烄𡡅éµè²Ÿè³©ð§·œå¦šçŸƒå§°ä®ã›”踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻é„𨩋ä¢ð¨«¼é§ð¨°ð¨°»è“¥è¨«é–™é–§é–—閖𨴴瑅㻂𤣿𤩂ð¤ªã»§ð£ˆ¥éšð¨»§ð¨¹¦ð¨¹¥ã»Œð¤§ð¤©¸ð£¿®ç’瑫㻼éð©‚°\"],[\"9640\",\"桇ä¨ð©‚“𥟟éé¨ð¨¦‰ð¨°¦ð¨¬¯ð¦Ž¾éŠºå¬‘è©ä¤¼ç¹ð¤ˆ›éž›é±é¤¸ð ¼¦å·ð¨¯…ð¤ª²é Ÿð©“šé‹¶ð©——é‡¥ä“€ð¨ð¤©§ð¨¤é£œð¨©…㼀鈪䤥è”餻é¥ð§¬†ã·½é¦›ä¯é¦ªé©œð¨¥ð¥£ˆæªé¨¡å«¾é¨¯ð©£±ä®ð©¥ˆé¦¼ä®½ä®—é½å¡²ð¡Œ‚å ¢ð¤¦¸\"],[\"96a1\",\"𡓨硄𢜟𣶸棅㵽鑘㤧æ…ð¢žð¢¥«æ„‡é±é±“鱻鰵é°é¿é¯ð©¸é®Ÿðª‡µðªƒ¾é´¡ä²®ð¤„„鸘䲰鴌𪆴ðªƒðªƒ³ð©¤¯é¶¥è’½ð¦¸’𦿟𦮂藼䔳𦶤𦺄𦷰è 藮𦸀𣟗ð¦¤ç§¢ð£–œð£™€ä¤ð¤§žãµ¢é›éŠ¾éˆð Š¿ç¢¹é‰·é‘俤㑀é¤ð¥•ç ½ç¡”碶硋ð¡—𣇉ð¤¥ãššä½²æ¿šæ¿™ç€žç€žå”𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉\"],[\"9740\",\"愌嫎娋䊼𤒈㜬ä»ð¨§¼éŽ»éŽ¸ð¡£–ð ¼è‘²ð¦³€ð¡“𤋺𢰦ð¤å¦”𣶷ð¦ç¶¨ð¦…›ð¦‚¤ð¤¦¹ð¤¦‹ð¨§ºé‹¥ç¢ã»©ç’´ð¨£ð¡¢Ÿã»¡ð¤ª³æ«˜ç³ç»ã»–𤨾𤪔𡟙𤩦𠎧ð¡¤ð¤§¥ç‘ˆð¤¤–炥𤥶銄ç¦éŸð “¾éŒ±ð¨«Žð¨¨–鎆𨯧𥗕䤵𨪂煫\"],[\"97a1\",\"𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂ð¤©ð¡¡’ä”®é㜊𨫀ð¤¦å¦°ð¡¢¿ð¡¢ƒð§’„媡㛢𣵛㚰鉟婹ð¨ªð¡¡¢é´ã³ð ª´äª–㦊僴㵩㵌𡎜煵䋻𨈘æ¸ð©ƒ¤ä“«æµ—ð§¹ç§æ²¯ã³–ð£¿ð£¸æ¸‚漌㵯ð µç•‘㚼㓈䚀㻚䡱姄鉮䤾è½ð¨°œð¦¯€å ’埈㛖𡑒烾ð¤¢ð¤©±ð¢¿£ð¡Š°ð¢Ž½æ¢¹æ¥§ð¡Ž˜ð£“¥ð§¯´ð£›Ÿð¨ªƒð£Ÿ–ð£ºð¤²Ÿæ¨šð£šð¦²·è¾ä“Ÿä“Ž\"],[\"9840\",\"𦴦𦵑𦲂𦿞漗𧄉茽𡜺è𦲀ð§“𡟛妉媂𡞳婡婱𡤅𤇼ãœå§¯ð¡œ¼ã›‡ç†ŽéŽæššð¤Š¥å©®å¨«ð¤Š“樫𣻹𧜶𤑛𤋊ç„𤉙𨧡侰𦴨峂𤓎ð§¹ð¤Ž½æ¨Œð¤‰–𡌄炦焳ð¤©ã¶¥æ³Ÿð¯ ¥ð¤©ç¹¥å§«å´¯ã·³å½œð¤©ð¡ŸŸç¶¤è¦\"],[\"98a1\",\"咅𣫺𣌀𠈔å¾ð £•ð ˜™ã¿¥ð¡¾žðªŠ¶ç€ƒð©…›åµ°çŽç³“𨩙ð© 俈翧ç‹çŒð§«´çŒ¸çŒ¹ð¥›¶ççˆãº©ð§¬˜é¬ç‡µð¤£²ç¡è‡¶ã»ŠçœŒã»‘沢国ç™çžçŸã»¢ã»°ã»´ã»ºç““㼎㽓畂ç•ç•²ç–㽼痈痜㿀ç™ã¿—癴㿜発𤽜熈嘣覀塩ä€çƒä€¹æ¡ä…㗛瞘äªä¯å±žçž¾çŸ‹å£²ç ˜ç‚¹ç œä‚¨ç ¹ç¡‡ç¡‘ç¡¦è‘ˆð¥”µç¤³æ ƒç¤²ä„ƒ\"],[\"9940\",\"䄉禑禙辻稆込䅧窑䆲窼艹䇄ç«ç«›ä‡ä¸¡ç¢ç¬ç»ç°’ç°›ä‰ ä‰ºç±»ç²œäŠŒç²¸äŠ”ç³è¾“烀ð ³ç·ç·”ç·ç·½ç¾®ç¾´çŠŸäŽ—è€ è€¥ç¬¹è€®è€±è”ã·Œåž´ç‚ è‚·èƒ©äè„ŒçŒªè„Žè„’ç• è„”ä㬹腖腙腚\"],[\"99a1\",\"ä“å ºè…¼è†„ä¥è†“ä膥埯è‡è‡¤è‰”ä’芦艶苊苘苿䒰è—险榊è…烵葤惣蒈䔄蒾蓡蓸è”è”¸è•’ä”»è•¯è•°è— ä•·è™²èš’èš²è›¯é™…èž‹ä˜†ä˜—è¢®è£¿è¤¤è¥‡è¦‘ð§¥§è¨©è¨¸èª”èª´è±‘è³”è³²è´œäž˜å¡Ÿè·ƒäŸä»®è¸ºå—˜å”è¹±å—µèº°ä ·è»Žè»¢è»¤è»è»²è¾·è¿è¿Šè¿Œé€³é§„ä¢é£ 鈓䤞鈨鉘鉫銱銮銿\"],[\"9a40\",\"鋣鋫鋳鋴鋽éƒéŽ„éŽä¥…䥑麿é—åŒééé¾ä¥ªé‘”鑹é”é–¢ä¦§é—´é˜³ä§¥æž ä¨¤é€ä¨µéž²éŸ‚噔䫤惨颹䬙飱塄餎餙冴餜餷饂é¥é¥¢ä°é§…ä®é¨¼é¬çªƒé©é®é¯é¯±é¯´ä±é° ã¯ð¡¯‚鵉鰺\"],[\"9aa1\",\"黾å™é¶“é¶½é·€é·¼é“¶è¾¶é¹»éº¬éº±éº½é»†é“œé»¢é»±é»¸ç«ˆé½„ð ‚”ð Š·ð Ž æ¤šé“ƒå¦¬ð “—å¡€é“㞹𠗕𠘕𠙶𡚺å—煳𠫂ð «ð ®¿å‘ªð¯ »ð ¯‹å’žð ¯»ð °»ð ±“𠱥𠱼惧ð ²å™ºð ²µð ³ð ³ð µ¯ð ¶²ð ·ˆæ¥•é°¯èž¥ð ¸„𠸎𠻗ð ¾ð ¼ð ¹³å° 𠾼帋ð¡œð¡ð¡¶æœžð¡»ð¡‚ˆð¡‚–㙇𡂿𡃓𡄯𡄻å¤è’ð¡‹£ð¡µð¡Œ¶è®ð¡•·ð¡˜™ð¡Ÿƒð¡Ÿ‡ä¹¸ç‚»ð¡ 𡥪\"],[\"9b40\",\"ð¡¨ð¡©…𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕ð¢…槩㛈𢉼ð¢—ð¢ºð¢œªð¢¡±ð¢¥è‹½ð¢¥§ð¢¦“ð¢«•è¦¥ð¢«¨è¾ ð¢¬Žéž¸ð¢¬¿é¡‡éª½ð¢±Œ\"],[\"9b62\",\"𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳ð£¦ð£ŒŸð£žå¾±æ™ˆæš¿ð§©¹ð£•§ð£—³çˆð¤¦ºçŸ—𣘚𣜖纇ð †å¢µæœŽ\"],[\"9ba1\",\"椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚ä£äª¸ð¤„™ð¨ªšð¤‹®ð¤Œð¤€»ð¤Œ´ð¤Ž–𤩅𠗊凒𠘑妟𡺨㮾𣳿ð¤„𤓖垈𤙴㦛𤜯𨗨𩧉ã¢ð¢‡ƒèžð¨Žé§–𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆ð ¹è»šð¥€¬åŠåœ¿ç…±ð¥Š™ð¥™ð£½Šð¤ª§å–¼ð¥‘†ð¥‘®ð¦’釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿ð¥¡å¦ã“»ð£Œæƒžð¥¤ƒä¼ð¨¥ˆð¥ª®ð¥®‰ð¥°†ð¡¶åž¡ç…‘澶𦄂𧰒é–𦆲𤾚è¢ð¦‚𦑊\"],[\"9c40\",\"嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧ð¯£ä¾»åš¹ð¤”¡ð¦›¼ä¹ªð¤¤´é™–æ¶ð¦²½ã˜˜è¥·ð¦ž™ð¦¡®ð¦‘𦡞營𦣇ç‚𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦ð¦¨ã™Ÿð¦‘©ð €¡ç¦ƒð¦¨´ð¦›å´¬ð£”™èð¦®ä›ð¦²¤ç”»è¡¥ð¦¶®å¢¶\"],[\"9ca1\",\"㜜ð¢–ð§‹ð§‡ã±”𧊀𧊅éŠð¢…ºð§Š‹éŒ°ð§‹¦ð¤§æ°¹é’Ÿð§‘ð »¸è §è£µð¢¤¦ð¨‘³ð¡ž±æº¸ð¤¨ªð¡ 㦤㚹å°ç§£ä”¿æš¶ð©²ð©¢¤è¥ƒð§ŸŒð§¡˜å›–䃟𡘊㦡𣜯𨃨ð¡…ç†è¦ð§§ð©†¨å©§ä²·ð§‚¯ð¨¦«ð§§½ð§¨Šð§¬‹ð§µ¦ð¤…ºçƒç¥¾ð¨€‰æ¾µðª‹Ÿæ¨ƒð¨Œ˜åŽ¢ð¦¸‡éŽ¿æ ¶é𨅯𨀣𦦵ð¡ð£ˆ¯ð¨ˆå¶…ð¨°°ð¨‚ƒåœ•é £ð¨¥‰å¶«ð¤¦ˆæ–¾æ§•å’𤪥ð£¾ã°‘朶ð¨‚𨃴𨄮𡾡ð¨…\"],[\"9d40\",\"𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺æ¦ð¨¥–ç ˆé‰•ð¨¦¸ä²ð¨§§äŸð¨§¨ð¨†ð¨¯”姸𨰉輋𨿅𩃬ç‘ð©„𩄼㷷𩅞𤫊è¿çŠåš‹ð©“§ð©—©ð©–°ð©–¸ð©œ²ð©£‘𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达å—\"],[\"9da1\",\"辺𢒰边𤪓䔉繿潖檱仪㓤𨬬ð§¢ãœºèº€ð¡Ÿµð¨€¤ð¨¬ð¨®™ð§¨¾ð¦š¯ã·«ð§™•ð£²·ð¥˜µð¥¥–亚ð¥ºð¦‰˜åš¿ð ¹è¸Žå𣺈𤲞æžæ‹ð¡Ÿ¶ð¡¡»æ”°å˜ð¥±Šåšð¥Œ‘㷆𩶘䱽嘢嘞罉𥻘奵𣵀è°ä¸œð ¿ªð µ‰ð£šºè„—鵞贘瘻鱅癎瞹é…å²è…ˆè‹·å˜¥è„²è˜è‚½å—ªç¥¢å™ƒå–ð ºã—Žå˜…嗱曱𨋢ã˜ç”´å—°å–ºå’—啲ð ±ð ²–å»ð¥…ˆð ¹¶ð¢±¢\"],[\"9e40\",\"𠺢麫絚嗞ð¡µæŠéå’”è³ç‡¶é…¶æ¼æŽ¹æ¾å•©ð¢ƒé±²ð¢º³å†šã“Ÿð ¶§å†§å‘唞唓癦è¸ð¦¢Šç–±è‚¶è „螆裇膶èœð¡ƒä“¬çŒ„𤜆å®èŒ‹ð¦¢“噻𢛴𧴯𤆣𧵳ð¦»ð§Š¶é…°ð¡‡™éˆˆð£³¼ðªš©ð º¬ð »¹ç‰¦ð¡²¢äŽð¤¿‚𧿹𠿫䃺\"],[\"9ea1\",\"é±æ”Ÿð¢¶ 䣳𤟠𩵼𠿬𠸊æ¢ð§–£ð ¿\"],[\"9ead\",\"ð¦ˆð¡†‡ç†£çºŽéµä¸šä¸„ã•·å¬æ²²å§ãš¬ã§œå½ãš¥ð¤˜˜å¢šð¤®èˆå‘‹åžªð¥ª•ð ¥¹\"],[\"9ec5\",\"㩒𢑥ç´ð©º¬ä´‰é¯ð£³¾ð©¼°ä±›ð¤¾©ð©–žð©¿žè‘œð£¶¶ð§Š²ð¦ž³ð£œ 挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔ðª´éº…䳡痹㟻愙𣃚ð¤²\"],[\"9ef5\",\"å™ð¡Š©åž§ð¤¥£ð©¸†åˆ´ð§‚®ã–汊鵼\"],[\"9f40\",\"籖鬹埞ð¡¬å±“æ““ð©“𦌵𧅤èšð ´¨ð¦´¢ð¤«¢ð µ±\"],[\"9f4f\",\"凾ð¡¼å¶Žéœƒð¡·‘éºéŒç¬Ÿé¬‚峑箣扨挵髿ç¯é¬ªç±¾é¬®ç±‚ç²†é°•ç¯¼é¬‰é¼—é°›ð¤¤¾é½šå•³å¯ƒä¿½éº˜ä¿²å‰ ã¸†å‹‘å§å–妷帒韈鶫轜呩鞴饀鞺匬愰\"],[\"9fa1\",\"椬åšé°Šé´‚ä°»é™æ¦€å‚¦ç•†ð¡é§šå‰³\"],[\"9fae\",\"é…™éšé…œ\"],[\"9fb2\",\"酑𨺗æ¿ð¦´£æ«Šå˜‘醎畺抅ð ¼ç籰𥰡𣳽\"],[\"9fc1\",\"𤤙盖é®ä¸ªð ³”莾衂\"],[\"9fc9\",\"届槀åƒåºåˆŸå·µä»Žæ°±ð ‡²ä¼¹å’œå“šåŠšè¶‚㗾弌㗳\"],[\"9fdb\",\"æ’é…¼é¾¥é®—é ®é¢´éªºéº¨éº„ç…ºç¬”\"],[\"9fe7\",\"æ¯ºè ˜ç½¸\"],[\"9feb\",\"å˜ ðª™Šè¹·é½“\"],[\"9ff0\",\"è·”è¹é¸œè¸æŠ‚ð¨½è¸¨è¹µç«“𤩷稾磘泪詧瘇\"],[\"a040\",\"𨩚鼦泎蟖痃𪊲硓咢贌狢ç±è¬çŒ‚ç“±è³«ð¤ª»è˜¯å¾ºè¢ ä’·\"],[\"a055\",\"𡠻𦸅\"],[\"a058\",\"詾𢔛\"],[\"a05b\",\"惽癧髗鵄é®é®èŸµ\"],[\"a063\",\"è 賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽\"],[\"a073\",\"åŸæ…¯æŠ¦æˆ¹æ‹Žã©œæ‡¢åŽªð£µæ¤æ ‚ã—’\"],[\"a0a1\",\"嵗𨯂迚𨸹\"],[\"a0a6\",\"僙𡵆礆匲阸𠼻ä¥\"],[\"a0ae\",\"矾\"],[\"a0b0\",\"糂𥼚糚ç¨è¦è£çµç”…瓲覔舚朌è¢ð§’†è›ç“°è„ƒçœ¤è¦‰ð¦ŸŒç•“𦻑螩蟎臈螌詉è²èƒçœ«ç“¸è“šã˜µæ¦²è¶¦\"],[\"a0d4\",\"覩瑨涹èŸð¤€‘瓧㷛煶悤憜㳑煢æ·\"],[\"a0e2\",\"ç½±ð¨¬ç‰æƒ©ä¾åˆ 㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜ð§‚å³ð¦†ð¨¨ð£™·ð ƒ®ð¦¡†ð¤¼Žä•¢å¬Ÿð¦Œé½éº¦ð¦‰«\"],[\"a3c0\",\"â€\",31,\"â¡\"],[\"c6a1\",\"â‘ \",9,\"â‘´\",9,\"â…°\",9,\"ä¸¶ä¸¿äº…äº å†‚å†–å†«å‹¹åŒ¸å©åŽ¶å¤Šå®€å·›â¼³å¹¿å»´å½å½¡æ”´æ— 疒癶辵隶¨ˆヽヾã‚ゞ〃ä»ã€…〆〇ー[]✽ã\",23],[\"c740\",\"ã™\",58,\"ァアィイ\"],[\"c7a1\",\"ã‚¥\",81,\"Ð\",5,\"ÐЖ\",4],[\"c840\",\"Л\",26,\"ёж\",25,\"⇧↸↹ã‡ð ƒŒä¹šð ‚Šåˆ‚ä’‘\"],[\"c8a1\",\"龰冈龱𧘇\"],[\"c8cd\",\"¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌âºâº•âºœâºâº¥âº§âºªâº¬âº®âº¶âº¼âº¾â»†â»Šâ»Œâ»â»â»–⻗⻞⻣\"],[\"c8f5\",\"ʃÉɛɔɵœøŋʊɪ\"],[\"f9fe\",\"ï¿\"],[\"fa40\",\"𠕇鋛𠗟𣿅蕌䊵ç¯å†µã™‰ð¤¥‚𨧤é„ð¡§›è‹®ð£³ˆç ¼æ„æ‹Ÿð¤¤³ð¨¦ªð Š ð¦®³ð¡Œ…ä¾«ð¢“倈𦴩𧪄𣘀𤪱𢔓倩ð ¾å¾¤ð Ž€ð ‡æ»›ð Ÿå½å„㑺儎顬ãƒè–ð¤¦¤ð ’‡å… ð£Ž´å…ªð ¯¿ð¢ƒ¼ð ‹¥ð¢”°ð –Žð£ˆ³ð¡¦ƒå®‚è½ð –³ð£²™å†²å†¸\"],[\"faa1\",\"鴴凉å‡å‡‘㳜凓𤪦决凢å‚å‡è椾ð£œå½»åˆ‹åˆ¦åˆ¼åŠµå‰—åŠ”åŠ¹å‹…ç°•è•‚å‹ è˜ð¦¬“包𨫞啉滙𣾀𠥔𣿬匳å„ð ¯¢æ³‹ð¡œ¦æ ›ç•æŠãºªã£Œð¡›¨ç‡ä’¢åå´ð¨š«å¾å¿ð¡––ð¡˜“çŸ¦åŽ“ð¨ª›åŽ åŽ«åŽ®çŽ§ð¥²ã½™çŽœåå…汉义埾å™ãª«ð ®å 𣿫𢶣å¶ð ±·å“ç¹å”«æ™—æµ›å‘ð¦“ð µ´å•å’咤䞦ð¡œð »ã¶´ð µ\"],[\"fb40\",\"𨦼𢚘啇ä³å¯ç—喆喩嘅𡣗𤀺䕒ð¤µæš³ð¡‚´å˜·æ›ð£ŠŠæš¤æšå™å™ç£±å›±éž‡å¾åœ€å›¯å›ð¨¦ã˜£ð¡‰å†ð¤†¥æ±®ç‚‹å‚㚱𦱾埦ð¡–å ƒð¡‘”ð¤£å ¦ð¤¯µå¡œå¢ªã•¡å£ 壜𡈼壻寿åƒðª…𤉸é“㖡够梦㛃湙\"],[\"fba1\",\"𡘾娤啓𡚒蔅姉𠵎ð¦²ð¦´ªð¡Ÿœå§™ð¡Ÿ»ð¡ž²ð¦¶¦æµ±ð¡ ¨ð¡›•å§¹ð¦¹…媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広å‹å¶æ–ˆå¼ð§¨Žä€„ä¡ð ˆ„å¯•æ… ð¡¨´ð¥§Œð –¥å¯³å®ä´å°…ð¡„å°“çŽå°”𡲥𦬨屉ä£å²…峩峯嶋𡷹𡸷å´å´˜åµ†ð¡º¤å²ºå·—苼ã ð¤¤ð¢‰ð¢…³èŠ‡ã ¶ã¯‚帮檊幵幺𤒼𠳓厦亷å»åŽ¨ð¡±å¸‰å»´ð¨’‚\"],[\"fc40\",\"å»¹å»»ã¢ å»¼æ ¾é›å¼ð ‡ð¯¢”㫞䢮𡌺强𦢈ð¢å½˜ð¢‘±å½£éž½ð¦¹®å½²é€ð¨¨¶å¾§å¶¶ãµŸð¥‰ð¡½ªð§ƒ¸ð¢™¨é‡–𠊞𨨩怱暅𡡷㥣㷇㘹åžð¢ž´ç¥±ã¹€æ‚žæ‚¤æ‚³ð¤¦‚ð¤¦ð§©“ç’¤åƒ¡åª æ…¤è¤æ…‚慈𦻒æ†å‡´ð ™–憇宪𣾷\"],[\"fca1\",\"𢡟懓ð¨®ð©¥æ‡ã¤²ð¢¦€ð¢£æ€£æ…œæ”žæŽ‹ð „˜æ‹…ð¡°æ‹•ð¢¸æ¬ð¤§Ÿã¨—æ¸æ¸ð¡ŽŽð¡Ÿ¼æ’æ¾Šð¢¸¶é ”ð¤‚Œð¥œæ“¡æ“¥é‘»ã©¦æºã©—æ•æ¼–𤨨𤨣斅æ•æ•Ÿð£¾æ–µð¤¥€ä¬·æ—‘äƒ˜ð¡ ©æ— æ—£å¿Ÿð£€æ˜˜ð£‡·ð£‡¸æ™„𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂æžæ§æ¢ð¤‡ð©ƒæŸ—ä“©æ ¢æ¹éˆ¼æ ð£¦ð¦¶ æ¡\"],[\"fd40\",\"𣑯槡樋𨫟楳棃ð£—æ¤æ¤€ã´²ã¨ð£˜¼ã®€æž¬æ¥¡ð¨©Šä‹¼æ¤¶æ¦˜ã®¡ð ‰è£å‚槹𣙙𢄪橅𣜃æªã¯³æž±æ«ˆð©†œã°æ¬ð ¤£æƒžæ¬µæ´ð¢Ÿæºµð£«›ð Žµð¡¥˜ã€å¡ð£šæ¯¡ð£»¼æ¯œæ°·ð¢’‹ð¤£±ð¦‘汚舦汹𣶼䓅𣶽𤆤𤤌𤤀\"],[\"fda1\",\"𣳉㛥㳫𠴲鮃𣇹𢒑ç¾æ ·ð¦´¥ð¦¶¡ð¦·«æ¶–浜湼漄𤥿𤂅𦹲蔳𦽴凇沜æ¸è®ð¨¬¡æ¸¯ð£¸¯ç‘“𣾂秌æ¹åª‘ð£‹æ¿¸ãœæ¾ð£¸°æ»ºð¡’—𤀽䕕é°æ½„潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀ð¦‡ç‹ç¾ç‚§ç‚烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜ð¤¥ç…é¢ð¤‹ç„¬ð¤‘šð¤¨§ð¤¨¢ç†ºð¨¯¨ç‚½çˆŽ\"],[\"fe40\",\"鑂爕夑鑃爤é𥘅爮牀𤥴梽牕牗㹕ð£„æ 漽犂猪猫𤠣𨠫ä£ð¨ „猨献ç玪𠰺𦨮ç‰ç‘‰ð¤‡¢ð¡›§ð¤¨¤æ˜£ã›…𤦷ð¤¦ð¤§»ç·ç•æ¤ƒð¤¨¦ç¹ð —ƒã»—ç‘œð¢¢ç‘ 𨺲瑇ç¤ç‘¶èŽ¹ç‘¬ãœ°ç‘´é±æ¨¬ç’‚䥓𤪌\"],[\"fea1\",\"𤅟𤩹ð¨®å†ð¨°ƒð¡¢žç“ˆð¡¦ˆç”Žç“©ç”žð¨»™ð¡©‹å¯—𨺬鎅ç•ç•Šç•§ç•®ð¤¾‚㼄𤴓疎ç‘疞疴瘂瘬癑ç™ç™¯ç™¶ð¦µçšè‡¯ãŸ¸ð¦¤‘𦤎皡皥皷盌𦾟葢ð¥‚𥅽𡸜眞眦ç€æ’¯ð¥ˆ ç˜ð£Š¬çž¯ð¨¥¤ð¨¥¨ð¡›çŸ´ç ‰ð¡¶ð¤¨’棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗ç¦ð§¬¹ç¤¼ç¦©æ¸ªð§„¦ãº¨ç§†ð©„秔\"]]"); /***/ }), -/* 885 */ +/* 882 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -151775,7 +146812,7 @@ IconvLiteDecoderStream.prototype.collect = function(cb) { /***/ }), -/* 886 */ +/* 883 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -151999,7 +147036,7 @@ module.exports = function (iconv) { /***/ }), -/* 887 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -152075,7 +147112,7 @@ function unpipe(stream) { /***/ }), -/* 888 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -152159,10 +147196,10 @@ module.exports = (jsonString, options = {}) => { /***/ }), -/* 889 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { -var createRange = __webpack_require__(890); +var createRange = __webpack_require__(887); /** * Creates an array of numbers (positive and/or negative) progressing from @@ -152211,12 +147248,12 @@ module.exports = range; /***/ }), -/* 890 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { -var baseRange = __webpack_require__(891), - isIterateeCall = __webpack_require__(755), - toFinite = __webpack_require__(644); +var baseRange = __webpack_require__(888), + isIterateeCall = __webpack_require__(754), + toFinite = __webpack_require__(643); /** * Creates a `_.range` or `_.rangeRight` function. @@ -152247,7 +147284,7 @@ module.exports = createRange; /***/ }), -/* 891 */ +/* 888 */ /***/ (function(module, exports) { /* Built-in method references for those with the same name as other `lodash` methods. */ @@ -152281,720 +147318,720 @@ module.exports = baseRange; /***/ }), -/* 892 */ +/* 889 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _add_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _add_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(890); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "add", function() { return _add_index_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); -/* harmony import */ var _addBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(899); +/* harmony import */ var _addBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addBusinessDays", function() { return _addBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(891); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addDays", function() { return _addDays_index_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); -/* harmony import */ var _addHours_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(903); +/* harmony import */ var _addHours_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(900); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addHours", function() { return _addHours_index_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); -/* harmony import */ var _addISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(905); +/* harmony import */ var _addISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(902); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addISOWeekYears", function() { return _addISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); -/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(904); +/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(901); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addMilliseconds", function() { return _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); -/* harmony import */ var _addMinutes_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(914); +/* harmony import */ var _addMinutes_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(911); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addMinutes", function() { return _addMinutes_index_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); -/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(898); +/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(895); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addMonths", function() { return _addMonths_index_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); -/* harmony import */ var _addQuarters_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(915); +/* harmony import */ var _addQuarters_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(912); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addQuarters", function() { return _addQuarters_index_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); -/* harmony import */ var _addSeconds_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(916); +/* harmony import */ var _addSeconds_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(913); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addSeconds", function() { return _addSeconds_index_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); -/* harmony import */ var _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(917); +/* harmony import */ var _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(914); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addWeeks", function() { return _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); -/* harmony import */ var _addYears_index_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(918); +/* harmony import */ var _addYears_index_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(915); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "addYears", function() { return _addYears_index_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); -/* harmony import */ var _areIntervalsOverlapping_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(919); +/* harmony import */ var _areIntervalsOverlapping_index_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(916); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areIntervalsOverlapping", function() { return _areIntervalsOverlapping_index_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); -/* harmony import */ var _clamp_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(920); +/* harmony import */ var _clamp_index_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(917); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "clamp", function() { return _clamp_index_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); -/* harmony import */ var _closestIndexTo_index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(923); +/* harmony import */ var _closestIndexTo_index_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(920); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "closestIndexTo", function() { return _closestIndexTo_index_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); -/* harmony import */ var _closestTo_index_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(924); +/* harmony import */ var _closestTo_index_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(921); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "closestTo", function() { return _closestTo_index_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); -/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(925); +/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(922); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "compareAsc", function() { return _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); -/* harmony import */ var _compareDesc_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(926); +/* harmony import */ var _compareDesc_index_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(923); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "compareDesc", function() { return _compareDesc_index_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); -/* harmony import */ var _daysToWeeks_index_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(927); +/* harmony import */ var _daysToWeeks_index_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(924); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "daysToWeeks", function() { return _daysToWeeks_index_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); -/* harmony import */ var _differenceInBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(929); +/* harmony import */ var _differenceInBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(926); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInBusinessDays", function() { return _differenceInBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); -/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(911); +/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(908); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInCalendarDays", function() { return _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); -/* harmony import */ var _differenceInCalendarISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(933); +/* harmony import */ var _differenceInCalendarISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(930); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInCalendarISOWeekYears", function() { return _differenceInCalendarISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); -/* harmony import */ var _differenceInCalendarISOWeeks_index_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(934); +/* harmony import */ var _differenceInCalendarISOWeeks_index_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(931); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInCalendarISOWeeks", function() { return _differenceInCalendarISOWeeks_index_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); -/* harmony import */ var _differenceInCalendarMonths_index_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(935); +/* harmony import */ var _differenceInCalendarMonths_index_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(932); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInCalendarMonths", function() { return _differenceInCalendarMonths_index_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); -/* harmony import */ var _differenceInCalendarQuarters_index_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(936); +/* harmony import */ var _differenceInCalendarQuarters_index_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(933); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInCalendarQuarters", function() { return _differenceInCalendarQuarters_index_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); -/* harmony import */ var _differenceInCalendarWeeks_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(938); +/* harmony import */ var _differenceInCalendarWeeks_index_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(935); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInCalendarWeeks", function() { return _differenceInCalendarWeeks_index_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); -/* harmony import */ var _differenceInCalendarYears_index_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(939); +/* harmony import */ var _differenceInCalendarYears_index_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(936); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInCalendarYears", function() { return _differenceInCalendarYears_index_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); -/* harmony import */ var _differenceInDays_index_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(940); +/* harmony import */ var _differenceInDays_index_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(937); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInDays", function() { return _differenceInDays_index_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); -/* harmony import */ var _differenceInHours_index_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(941); +/* harmony import */ var _differenceInHours_index_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(938); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInHours", function() { return _differenceInHours_index_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); -/* harmony import */ var _differenceInISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(944); +/* harmony import */ var _differenceInISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(941); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInISOWeekYears", function() { return _differenceInISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); -/* harmony import */ var _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(942); +/* harmony import */ var _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(939); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInMilliseconds", function() { return _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); -/* harmony import */ var _differenceInMinutes_index_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(946); +/* harmony import */ var _differenceInMinutes_index_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(943); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInMinutes", function() { return _differenceInMinutes_index_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); -/* harmony import */ var _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(947); +/* harmony import */ var _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(944); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInMonths", function() { return _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); -/* harmony import */ var _differenceInQuarters_index_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(951); +/* harmony import */ var _differenceInQuarters_index_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(948); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInQuarters", function() { return _differenceInQuarters_index_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); -/* harmony import */ var _differenceInSeconds_index_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(952); +/* harmony import */ var _differenceInSeconds_index_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(949); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInSeconds", function() { return _differenceInSeconds_index_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); -/* harmony import */ var _differenceInWeeks_index_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(953); +/* harmony import */ var _differenceInWeeks_index_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(950); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInWeeks", function() { return _differenceInWeeks_index_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); -/* harmony import */ var _differenceInYears_index_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(954); +/* harmony import */ var _differenceInYears_index_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(951); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "differenceInYears", function() { return _differenceInYears_index_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); -/* harmony import */ var _eachDayOfInterval_index_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(955); +/* harmony import */ var _eachDayOfInterval_index_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(952); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachDayOfInterval", function() { return _eachDayOfInterval_index_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); -/* harmony import */ var _eachHourOfInterval_index_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(956); +/* harmony import */ var _eachHourOfInterval_index_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(953); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachHourOfInterval", function() { return _eachHourOfInterval_index_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); -/* harmony import */ var _eachMinuteOfInterval_index_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(957); +/* harmony import */ var _eachMinuteOfInterval_index_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(954); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachMinuteOfInterval", function() { return _eachMinuteOfInterval_index_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); -/* harmony import */ var _eachMonthOfInterval_index_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(959); +/* harmony import */ var _eachMonthOfInterval_index_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(956); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachMonthOfInterval", function() { return _eachMonthOfInterval_index_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); -/* harmony import */ var _eachQuarterOfInterval_index_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(960); +/* harmony import */ var _eachQuarterOfInterval_index_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(957); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachQuarterOfInterval", function() { return _eachQuarterOfInterval_index_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); -/* harmony import */ var _eachWeekOfInterval_index_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(962); +/* harmony import */ var _eachWeekOfInterval_index_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(959); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachWeekOfInterval", function() { return _eachWeekOfInterval_index_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); -/* harmony import */ var _eachWeekendOfInterval_index_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(963); +/* harmony import */ var _eachWeekendOfInterval_index_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(960); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachWeekendOfInterval", function() { return _eachWeekendOfInterval_index_js__WEBPACK_IMPORTED_MODULE_43__["default"]; }); -/* harmony import */ var _eachWeekendOfMonth_index_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(964); +/* harmony import */ var _eachWeekendOfMonth_index_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(961); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachWeekendOfMonth", function() { return _eachWeekendOfMonth_index_js__WEBPACK_IMPORTED_MODULE_44__["default"]; }); -/* harmony import */ var _eachWeekendOfYear_index_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(966); +/* harmony import */ var _eachWeekendOfYear_index_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(963); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachWeekendOfYear", function() { return _eachWeekendOfYear_index_js__WEBPACK_IMPORTED_MODULE_45__["default"]; }); -/* harmony import */ var _eachYearOfInterval_index_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(969); +/* harmony import */ var _eachYearOfInterval_index_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(966); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "eachYearOfInterval", function() { return _eachYearOfInterval_index_js__WEBPACK_IMPORTED_MODULE_46__["default"]; }); -/* harmony import */ var _endOfDay_index_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(949); +/* harmony import */ var _endOfDay_index_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(946); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfDay", function() { return _endOfDay_index_js__WEBPACK_IMPORTED_MODULE_47__["default"]; }); -/* harmony import */ var _endOfDecade_index_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(970); +/* harmony import */ var _endOfDecade_index_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(967); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfDecade", function() { return _endOfDecade_index_js__WEBPACK_IMPORTED_MODULE_48__["default"]; }); -/* harmony import */ var _endOfHour_index_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(971); +/* harmony import */ var _endOfHour_index_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(968); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfHour", function() { return _endOfHour_index_js__WEBPACK_IMPORTED_MODULE_49__["default"]; }); -/* harmony import */ var _endOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(972); +/* harmony import */ var _endOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(969); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfISOWeek", function() { return _endOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_50__["default"]; }); -/* harmony import */ var _endOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(974); +/* harmony import */ var _endOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(971); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfISOWeekYear", function() { return _endOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_51__["default"]; }); -/* harmony import */ var _endOfMinute_index_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(975); +/* harmony import */ var _endOfMinute_index_js__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(972); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfMinute", function() { return _endOfMinute_index_js__WEBPACK_IMPORTED_MODULE_52__["default"]; }); -/* harmony import */ var _endOfMonth_index_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(950); +/* harmony import */ var _endOfMonth_index_js__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(947); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfMonth", function() { return _endOfMonth_index_js__WEBPACK_IMPORTED_MODULE_53__["default"]; }); -/* harmony import */ var _endOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(976); +/* harmony import */ var _endOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(973); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfQuarter", function() { return _endOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_54__["default"]; }); -/* harmony import */ var _endOfSecond_index_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(977); +/* harmony import */ var _endOfSecond_index_js__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(974); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfSecond", function() { return _endOfSecond_index_js__WEBPACK_IMPORTED_MODULE_55__["default"]; }); -/* harmony import */ var _endOfToday_index_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(978); +/* harmony import */ var _endOfToday_index_js__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(975); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfToday", function() { return _endOfToday_index_js__WEBPACK_IMPORTED_MODULE_56__["default"]; }); -/* harmony import */ var _endOfTomorrow_index_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(979); +/* harmony import */ var _endOfTomorrow_index_js__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(976); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfTomorrow", function() { return _endOfTomorrow_index_js__WEBPACK_IMPORTED_MODULE_57__["default"]; }); -/* harmony import */ var _endOfWeek_index_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(973); +/* harmony import */ var _endOfWeek_index_js__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(970); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfWeek", function() { return _endOfWeek_index_js__WEBPACK_IMPORTED_MODULE_58__["default"]; }); -/* harmony import */ var _endOfYear_index_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(968); +/* harmony import */ var _endOfYear_index_js__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(965); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfYear", function() { return _endOfYear_index_js__WEBPACK_IMPORTED_MODULE_59__["default"]; }); -/* harmony import */ var _endOfYesterday_index_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(980); +/* harmony import */ var _endOfYesterday_index_js__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(977); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "endOfYesterday", function() { return _endOfYesterday_index_js__WEBPACK_IMPORTED_MODULE_60__["default"]; }); -/* harmony import */ var _format_index_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(981); +/* harmony import */ var _format_index_js__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(978); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "format", function() { return _format_index_js__WEBPACK_IMPORTED_MODULE_61__["default"]; }); -/* harmony import */ var _formatDistance_index_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(1007); +/* harmony import */ var _formatDistance_index_js__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(1004); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDistance", function() { return _formatDistance_index_js__WEBPACK_IMPORTED_MODULE_62__["default"]; }); -/* harmony import */ var _formatDistanceStrict_index_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(1010); +/* harmony import */ var _formatDistanceStrict_index_js__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(1007); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDistanceStrict", function() { return _formatDistanceStrict_index_js__WEBPACK_IMPORTED_MODULE_63__["default"]; }); -/* harmony import */ var _formatDistanceToNow_index_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(1011); +/* harmony import */ var _formatDistanceToNow_index_js__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(1008); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDistanceToNow", function() { return _formatDistanceToNow_index_js__WEBPACK_IMPORTED_MODULE_64__["default"]; }); -/* harmony import */ var _formatDistanceToNowStrict_index_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(1012); +/* harmony import */ var _formatDistanceToNowStrict_index_js__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(1009); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDistanceToNowStrict", function() { return _formatDistanceToNowStrict_index_js__WEBPACK_IMPORTED_MODULE_65__["default"]; }); -/* harmony import */ var _formatDuration_index_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(1013); +/* harmony import */ var _formatDuration_index_js__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(1010); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatDuration", function() { return _formatDuration_index_js__WEBPACK_IMPORTED_MODULE_66__["default"]; }); -/* harmony import */ var _formatISO_index_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(1014); +/* harmony import */ var _formatISO_index_js__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(1011); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatISO", function() { return _formatISO_index_js__WEBPACK_IMPORTED_MODULE_67__["default"]; }); -/* harmony import */ var _formatISO9075_index_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(1015); +/* harmony import */ var _formatISO9075_index_js__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(1012); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatISO9075", function() { return _formatISO9075_index_js__WEBPACK_IMPORTED_MODULE_68__["default"]; }); -/* harmony import */ var _formatISODuration_index_js__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(1016); +/* harmony import */ var _formatISODuration_index_js__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(1013); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatISODuration", function() { return _formatISODuration_index_js__WEBPACK_IMPORTED_MODULE_69__["default"]; }); -/* harmony import */ var _formatRFC3339_index_js__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(1017); +/* harmony import */ var _formatRFC3339_index_js__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(1014); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatRFC3339", function() { return _formatRFC3339_index_js__WEBPACK_IMPORTED_MODULE_70__["default"]; }); -/* harmony import */ var _formatRFC7231_index_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(1018); +/* harmony import */ var _formatRFC7231_index_js__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(1015); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatRFC7231", function() { return _formatRFC7231_index_js__WEBPACK_IMPORTED_MODULE_71__["default"]; }); -/* harmony import */ var _formatRelative_index_js__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(1019); +/* harmony import */ var _formatRelative_index_js__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(1016); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "formatRelative", function() { return _formatRelative_index_js__WEBPACK_IMPORTED_MODULE_72__["default"]; }); -/* harmony import */ var _fromUnixTime_index_js__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(1020); +/* harmony import */ var _fromUnixTime_index_js__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(1017); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fromUnixTime", function() { return _fromUnixTime_index_js__WEBPACK_IMPORTED_MODULE_73__["default"]; }); -/* harmony import */ var _getDate_index_js__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(1021); +/* harmony import */ var _getDate_index_js__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(1018); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDate", function() { return _getDate_index_js__WEBPACK_IMPORTED_MODULE_74__["default"]; }); -/* harmony import */ var _getDay_index_js__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(1022); +/* harmony import */ var _getDay_index_js__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(1019); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDay", function() { return _getDay_index_js__WEBPACK_IMPORTED_MODULE_75__["default"]; }); -/* harmony import */ var _getDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(1023); +/* harmony import */ var _getDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(1020); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDayOfYear", function() { return _getDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_76__["default"]; }); -/* harmony import */ var _getDaysInMonth_index_js__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(1024); +/* harmony import */ var _getDaysInMonth_index_js__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(1021); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDaysInMonth", function() { return _getDaysInMonth_index_js__WEBPACK_IMPORTED_MODULE_77__["default"]; }); -/* harmony import */ var _getDaysInYear_index_js__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(1025); +/* harmony import */ var _getDaysInYear_index_js__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(1022); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDaysInYear", function() { return _getDaysInYear_index_js__WEBPACK_IMPORTED_MODULE_78__["default"]; }); -/* harmony import */ var _getDecade_index_js__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(1027); +/* harmony import */ var _getDecade_index_js__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(1024); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getDecade", function() { return _getDecade_index_js__WEBPACK_IMPORTED_MODULE_79__["default"]; }); -/* harmony import */ var _getHours_index_js__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(1028); +/* harmony import */ var _getHours_index_js__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(1025); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getHours", function() { return _getHours_index_js__WEBPACK_IMPORTED_MODULE_80__["default"]; }); -/* harmony import */ var _getISODay_index_js__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(1029); +/* harmony import */ var _getISODay_index_js__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(1026); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getISODay", function() { return _getISODay_index_js__WEBPACK_IMPORTED_MODULE_81__["default"]; }); -/* harmony import */ var _getISOWeek_index_js__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(1030); +/* harmony import */ var _getISOWeek_index_js__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(1027); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getISOWeek", function() { return _getISOWeek_index_js__WEBPACK_IMPORTED_MODULE_82__["default"]; }); -/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(906); +/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(903); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getISOWeekYear", function() { return _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_83__["default"]; }); -/* harmony import */ var _getISOWeeksInYear_index_js__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(1031); +/* harmony import */ var _getISOWeeksInYear_index_js__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(1028); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getISOWeeksInYear", function() { return _getISOWeeksInYear_index_js__WEBPACK_IMPORTED_MODULE_84__["default"]; }); -/* harmony import */ var _getMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(1032); +/* harmony import */ var _getMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(1029); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMilliseconds", function() { return _getMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_85__["default"]; }); -/* harmony import */ var _getMinutes_index_js__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(1033); +/* harmony import */ var _getMinutes_index_js__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(1030); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMinutes", function() { return _getMinutes_index_js__WEBPACK_IMPORTED_MODULE_86__["default"]; }); -/* harmony import */ var _getMonth_index_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(1034); +/* harmony import */ var _getMonth_index_js__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(1031); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getMonth", function() { return _getMonth_index_js__WEBPACK_IMPORTED_MODULE_87__["default"]; }); -/* harmony import */ var _getOverlappingDaysInIntervals_index_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(1035); +/* harmony import */ var _getOverlappingDaysInIntervals_index_js__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(1032); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getOverlappingDaysInIntervals", function() { return _getOverlappingDaysInIntervals_index_js__WEBPACK_IMPORTED_MODULE_88__["default"]; }); -/* harmony import */ var _getQuarter_index_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(937); +/* harmony import */ var _getQuarter_index_js__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(934); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getQuarter", function() { return _getQuarter_index_js__WEBPACK_IMPORTED_MODULE_89__["default"]; }); -/* harmony import */ var _getSeconds_index_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(1036); +/* harmony import */ var _getSeconds_index_js__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(1033); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getSeconds", function() { return _getSeconds_index_js__WEBPACK_IMPORTED_MODULE_90__["default"]; }); -/* harmony import */ var _getTime_index_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(1037); +/* harmony import */ var _getTime_index_js__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(1034); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getTime", function() { return _getTime_index_js__WEBPACK_IMPORTED_MODULE_91__["default"]; }); -/* harmony import */ var _getUnixTime_index_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(1038); +/* harmony import */ var _getUnixTime_index_js__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(1035); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getUnixTime", function() { return _getUnixTime_index_js__WEBPACK_IMPORTED_MODULE_92__["default"]; }); -/* harmony import */ var _getWeek_index_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(1039); +/* harmony import */ var _getWeek_index_js__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(1036); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getWeek", function() { return _getWeek_index_js__WEBPACK_IMPORTED_MODULE_93__["default"]; }); -/* harmony import */ var _getWeekOfMonth_index_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(1042); +/* harmony import */ var _getWeekOfMonth_index_js__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(1039); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getWeekOfMonth", function() { return _getWeekOfMonth_index_js__WEBPACK_IMPORTED_MODULE_94__["default"]; }); -/* harmony import */ var _getWeekYear_index_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(1041); +/* harmony import */ var _getWeekYear_index_js__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(1038); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getWeekYear", function() { return _getWeekYear_index_js__WEBPACK_IMPORTED_MODULE_95__["default"]; }); -/* harmony import */ var _getWeeksInMonth_index_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(1043); +/* harmony import */ var _getWeeksInMonth_index_js__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(1040); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getWeeksInMonth", function() { return _getWeeksInMonth_index_js__WEBPACK_IMPORTED_MODULE_96__["default"]; }); -/* harmony import */ var _getYear_index_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(1045); +/* harmony import */ var _getYear_index_js__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(1042); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "getYear", function() { return _getYear_index_js__WEBPACK_IMPORTED_MODULE_97__["default"]; }); -/* harmony import */ var _hoursToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(1046); +/* harmony import */ var _hoursToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(1043); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hoursToMilliseconds", function() { return _hoursToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_98__["default"]; }); -/* harmony import */ var _hoursToMinutes_index_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(1047); +/* harmony import */ var _hoursToMinutes_index_js__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(1044); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hoursToMinutes", function() { return _hoursToMinutes_index_js__WEBPACK_IMPORTED_MODULE_99__["default"]; }); -/* harmony import */ var _hoursToSeconds_index_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(1048); +/* harmony import */ var _hoursToSeconds_index_js__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(1045); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "hoursToSeconds", function() { return _hoursToSeconds_index_js__WEBPACK_IMPORTED_MODULE_100__["default"]; }); -/* harmony import */ var _intervalToDuration_index_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(1049); +/* harmony import */ var _intervalToDuration_index_js__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(1046); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intervalToDuration", function() { return _intervalToDuration_index_js__WEBPACK_IMPORTED_MODULE_101__["default"]; }); -/* harmony import */ var _intlFormat_index_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(1053); +/* harmony import */ var _intlFormat_index_js__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(1050); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intlFormat", function() { return _intlFormat_index_js__WEBPACK_IMPORTED_MODULE_102__["default"]; }); -/* harmony import */ var _isAfter_index_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(1054); +/* harmony import */ var _isAfter_index_js__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(1051); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isAfter", function() { return _isAfter_index_js__WEBPACK_IMPORTED_MODULE_103__["default"]; }); -/* harmony import */ var _isBefore_index_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(1055); +/* harmony import */ var _isBefore_index_js__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(1052); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isBefore", function() { return _isBefore_index_js__WEBPACK_IMPORTED_MODULE_104__["default"]; }); -/* harmony import */ var _isDate_index_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(931); +/* harmony import */ var _isDate_index_js__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(928); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isDate", function() { return _isDate_index_js__WEBPACK_IMPORTED_MODULE_105__["default"]; }); -/* harmony import */ var _isEqual_index_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(1056); +/* harmony import */ var _isEqual_index_js__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(1053); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isEqual", function() { return _isEqual_index_js__WEBPACK_IMPORTED_MODULE_106__["default"]; }); -/* harmony import */ var _isExists_index_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(1057); +/* harmony import */ var _isExists_index_js__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(1054); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isExists", function() { return _isExists_index_js__WEBPACK_IMPORTED_MODULE_107__["default"]; }); -/* harmony import */ var _isFirstDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(1058); +/* harmony import */ var _isFirstDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(1055); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isFirstDayOfMonth", function() { return _isFirstDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_108__["default"]; }); -/* harmony import */ var _isFriday_index_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(1059); +/* harmony import */ var _isFriday_index_js__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(1056); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isFriday", function() { return _isFriday_index_js__WEBPACK_IMPORTED_MODULE_109__["default"]; }); -/* harmony import */ var _isFuture_index_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(1060); +/* harmony import */ var _isFuture_index_js__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(1057); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isFuture", function() { return _isFuture_index_js__WEBPACK_IMPORTED_MODULE_110__["default"]; }); -/* harmony import */ var _isLastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(948); +/* harmony import */ var _isLastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(945); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isLastDayOfMonth", function() { return _isLastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_111__["default"]; }); -/* harmony import */ var _isLeapYear_index_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(1026); +/* harmony import */ var _isLeapYear_index_js__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(1023); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isLeapYear", function() { return _isLeapYear_index_js__WEBPACK_IMPORTED_MODULE_112__["default"]; }); -/* harmony import */ var _isMatch_index_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(1061); +/* harmony import */ var _isMatch_index_js__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(1058); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isMatch", function() { return _isMatch_index_js__WEBPACK_IMPORTED_MODULE_113__["default"]; }); -/* harmony import */ var _isMonday_index_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(1068); +/* harmony import */ var _isMonday_index_js__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(1065); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isMonday", function() { return _isMonday_index_js__WEBPACK_IMPORTED_MODULE_114__["default"]; }); -/* harmony import */ var _isPast_index_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(1069); +/* harmony import */ var _isPast_index_js__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(1066); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isPast", function() { return _isPast_index_js__WEBPACK_IMPORTED_MODULE_115__["default"]; }); -/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(932); +/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(929); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameDay", function() { return _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_116__["default"]; }); -/* harmony import */ var _isSameHour_index_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(1070); +/* harmony import */ var _isSameHour_index_js__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(1067); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameHour", function() { return _isSameHour_index_js__WEBPACK_IMPORTED_MODULE_117__["default"]; }); -/* harmony import */ var _isSameISOWeek_index_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(1072); +/* harmony import */ var _isSameISOWeek_index_js__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(1069); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameISOWeek", function() { return _isSameISOWeek_index_js__WEBPACK_IMPORTED_MODULE_118__["default"]; }); -/* harmony import */ var _isSameISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(1074); +/* harmony import */ var _isSameISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(1071); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameISOWeekYear", function() { return _isSameISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_119__["default"]; }); -/* harmony import */ var _isSameMinute_index_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(1075); +/* harmony import */ var _isSameMinute_index_js__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(1072); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameMinute", function() { return _isSameMinute_index_js__WEBPACK_IMPORTED_MODULE_120__["default"]; }); -/* harmony import */ var _isSameMonth_index_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(1076); +/* harmony import */ var _isSameMonth_index_js__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(1073); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameMonth", function() { return _isSameMonth_index_js__WEBPACK_IMPORTED_MODULE_121__["default"]; }); -/* harmony import */ var _isSameQuarter_index_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(1077); +/* harmony import */ var _isSameQuarter_index_js__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(1074); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameQuarter", function() { return _isSameQuarter_index_js__WEBPACK_IMPORTED_MODULE_122__["default"]; }); -/* harmony import */ var _isSameSecond_index_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(1078); +/* harmony import */ var _isSameSecond_index_js__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(1075); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameSecond", function() { return _isSameSecond_index_js__WEBPACK_IMPORTED_MODULE_123__["default"]; }); -/* harmony import */ var _isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(1073); +/* harmony import */ var _isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(1070); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameWeek", function() { return _isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_124__["default"]; }); -/* harmony import */ var _isSameYear_index_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(1080); +/* harmony import */ var _isSameYear_index_js__WEBPACK_IMPORTED_MODULE_125__ = __webpack_require__(1077); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSameYear", function() { return _isSameYear_index_js__WEBPACK_IMPORTED_MODULE_125__["default"]; }); -/* harmony import */ var _isSaturday_index_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(902); +/* harmony import */ var _isSaturday_index_js__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(899); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSaturday", function() { return _isSaturday_index_js__WEBPACK_IMPORTED_MODULE_126__["default"]; }); -/* harmony import */ var _isSunday_index_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(901); +/* harmony import */ var _isSunday_index_js__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(898); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isSunday", function() { return _isSunday_index_js__WEBPACK_IMPORTED_MODULE_127__["default"]; }); -/* harmony import */ var _isThisHour_index_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(1081); +/* harmony import */ var _isThisHour_index_js__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(1078); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThisHour", function() { return _isThisHour_index_js__WEBPACK_IMPORTED_MODULE_128__["default"]; }); -/* harmony import */ var _isThisISOWeek_index_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(1082); +/* harmony import */ var _isThisISOWeek_index_js__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(1079); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThisISOWeek", function() { return _isThisISOWeek_index_js__WEBPACK_IMPORTED_MODULE_129__["default"]; }); -/* harmony import */ var _isThisMinute_index_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(1083); +/* harmony import */ var _isThisMinute_index_js__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(1080); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThisMinute", function() { return _isThisMinute_index_js__WEBPACK_IMPORTED_MODULE_130__["default"]; }); -/* harmony import */ var _isThisMonth_index_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(1084); +/* harmony import */ var _isThisMonth_index_js__WEBPACK_IMPORTED_MODULE_131__ = __webpack_require__(1081); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThisMonth", function() { return _isThisMonth_index_js__WEBPACK_IMPORTED_MODULE_131__["default"]; }); -/* harmony import */ var _isThisQuarter_index_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(1085); +/* harmony import */ var _isThisQuarter_index_js__WEBPACK_IMPORTED_MODULE_132__ = __webpack_require__(1082); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThisQuarter", function() { return _isThisQuarter_index_js__WEBPACK_IMPORTED_MODULE_132__["default"]; }); -/* harmony import */ var _isThisSecond_index_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(1086); +/* harmony import */ var _isThisSecond_index_js__WEBPACK_IMPORTED_MODULE_133__ = __webpack_require__(1083); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThisSecond", function() { return _isThisSecond_index_js__WEBPACK_IMPORTED_MODULE_133__["default"]; }); -/* harmony import */ var _isThisWeek_index_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(1087); +/* harmony import */ var _isThisWeek_index_js__WEBPACK_IMPORTED_MODULE_134__ = __webpack_require__(1084); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThisWeek", function() { return _isThisWeek_index_js__WEBPACK_IMPORTED_MODULE_134__["default"]; }); -/* harmony import */ var _isThisYear_index_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(1088); +/* harmony import */ var _isThisYear_index_js__WEBPACK_IMPORTED_MODULE_135__ = __webpack_require__(1085); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThisYear", function() { return _isThisYear_index_js__WEBPACK_IMPORTED_MODULE_135__["default"]; }); -/* harmony import */ var _isThursday_index_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(1089); +/* harmony import */ var _isThursday_index_js__WEBPACK_IMPORTED_MODULE_136__ = __webpack_require__(1086); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isThursday", function() { return _isThursday_index_js__WEBPACK_IMPORTED_MODULE_136__["default"]; }); -/* harmony import */ var _isToday_index_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(1090); +/* harmony import */ var _isToday_index_js__WEBPACK_IMPORTED_MODULE_137__ = __webpack_require__(1087); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isToday", function() { return _isToday_index_js__WEBPACK_IMPORTED_MODULE_137__["default"]; }); -/* harmony import */ var _isTomorrow_index_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(1091); +/* harmony import */ var _isTomorrow_index_js__WEBPACK_IMPORTED_MODULE_138__ = __webpack_require__(1088); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isTomorrow", function() { return _isTomorrow_index_js__WEBPACK_IMPORTED_MODULE_138__["default"]; }); -/* harmony import */ var _isTuesday_index_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(1092); +/* harmony import */ var _isTuesday_index_js__WEBPACK_IMPORTED_MODULE_139__ = __webpack_require__(1089); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isTuesday", function() { return _isTuesday_index_js__WEBPACK_IMPORTED_MODULE_139__["default"]; }); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(930); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_140__ = __webpack_require__(927); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isValid", function() { return _isValid_index_js__WEBPACK_IMPORTED_MODULE_140__["default"]; }); -/* harmony import */ var _isWednesday_index_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(1093); +/* harmony import */ var _isWednesday_index_js__WEBPACK_IMPORTED_MODULE_141__ = __webpack_require__(1090); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWednesday", function() { return _isWednesday_index_js__WEBPACK_IMPORTED_MODULE_141__["default"]; }); -/* harmony import */ var _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(900); +/* harmony import */ var _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_142__ = __webpack_require__(897); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWeekend", function() { return _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_142__["default"]; }); -/* harmony import */ var _isWithinInterval_index_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(1094); +/* harmony import */ var _isWithinInterval_index_js__WEBPACK_IMPORTED_MODULE_143__ = __webpack_require__(1091); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isWithinInterval", function() { return _isWithinInterval_index_js__WEBPACK_IMPORTED_MODULE_143__["default"]; }); -/* harmony import */ var _isYesterday_index_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(1095); +/* harmony import */ var _isYesterday_index_js__WEBPACK_IMPORTED_MODULE_144__ = __webpack_require__(1092); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "isYesterday", function() { return _isYesterday_index_js__WEBPACK_IMPORTED_MODULE_144__["default"]; }); -/* harmony import */ var _lastDayOfDecade_index_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(1096); +/* harmony import */ var _lastDayOfDecade_index_js__WEBPACK_IMPORTED_MODULE_145__ = __webpack_require__(1093); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastDayOfDecade", function() { return _lastDayOfDecade_index_js__WEBPACK_IMPORTED_MODULE_145__["default"]; }); -/* harmony import */ var _lastDayOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(1097); +/* harmony import */ var _lastDayOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_146__ = __webpack_require__(1094); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastDayOfISOWeek", function() { return _lastDayOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_146__["default"]; }); -/* harmony import */ var _lastDayOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(1099); +/* harmony import */ var _lastDayOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_147__ = __webpack_require__(1096); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastDayOfISOWeekYear", function() { return _lastDayOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_147__["default"]; }); -/* harmony import */ var _lastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(1044); +/* harmony import */ var _lastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_148__ = __webpack_require__(1041); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastDayOfMonth", function() { return _lastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_148__["default"]; }); -/* harmony import */ var _lastDayOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(1100); +/* harmony import */ var _lastDayOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_149__ = __webpack_require__(1097); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastDayOfQuarter", function() { return _lastDayOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_149__["default"]; }); -/* harmony import */ var _lastDayOfWeek_index_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(1098); +/* harmony import */ var _lastDayOfWeek_index_js__WEBPACK_IMPORTED_MODULE_150__ = __webpack_require__(1095); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastDayOfWeek", function() { return _lastDayOfWeek_index_js__WEBPACK_IMPORTED_MODULE_150__["default"]; }); -/* harmony import */ var _lastDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(1101); +/* harmony import */ var _lastDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_151__ = __webpack_require__(1098); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lastDayOfYear", function() { return _lastDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_151__["default"]; }); -/* harmony import */ var _lightFormat_index_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(1102); +/* harmony import */ var _lightFormat_index_js__WEBPACK_IMPORTED_MODULE_152__ = __webpack_require__(1099); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lightFormat", function() { return _lightFormat_index_js__WEBPACK_IMPORTED_MODULE_152__["default"]; }); -/* harmony import */ var _max_index_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(921); +/* harmony import */ var _max_index_js__WEBPACK_IMPORTED_MODULE_153__ = __webpack_require__(918); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _max_index_js__WEBPACK_IMPORTED_MODULE_153__["default"]; }); -/* harmony import */ var _milliseconds_index_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(1103); +/* harmony import */ var _milliseconds_index_js__WEBPACK_IMPORTED_MODULE_154__ = __webpack_require__(1100); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "milliseconds", function() { return _milliseconds_index_js__WEBPACK_IMPORTED_MODULE_154__["default"]; }); -/* harmony import */ var _millisecondsToHours_index_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(1104); +/* harmony import */ var _millisecondsToHours_index_js__WEBPACK_IMPORTED_MODULE_155__ = __webpack_require__(1101); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "millisecondsToHours", function() { return _millisecondsToHours_index_js__WEBPACK_IMPORTED_MODULE_155__["default"]; }); -/* harmony import */ var _millisecondsToMinutes_index_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(1105); +/* harmony import */ var _millisecondsToMinutes_index_js__WEBPACK_IMPORTED_MODULE_156__ = __webpack_require__(1102); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "millisecondsToMinutes", function() { return _millisecondsToMinutes_index_js__WEBPACK_IMPORTED_MODULE_156__["default"]; }); -/* harmony import */ var _millisecondsToSeconds_index_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(1106); +/* harmony import */ var _millisecondsToSeconds_index_js__WEBPACK_IMPORTED_MODULE_157__ = __webpack_require__(1103); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "millisecondsToSeconds", function() { return _millisecondsToSeconds_index_js__WEBPACK_IMPORTED_MODULE_157__["default"]; }); -/* harmony import */ var _min_index_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(922); +/* harmony import */ var _min_index_js__WEBPACK_IMPORTED_MODULE_158__ = __webpack_require__(919); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _min_index_js__WEBPACK_IMPORTED_MODULE_158__["default"]; }); -/* harmony import */ var _minutesToHours_index_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(1107); +/* harmony import */ var _minutesToHours_index_js__WEBPACK_IMPORTED_MODULE_159__ = __webpack_require__(1104); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minutesToHours", function() { return _minutesToHours_index_js__WEBPACK_IMPORTED_MODULE_159__["default"]; }); -/* harmony import */ var _minutesToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(1108); +/* harmony import */ var _minutesToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_160__ = __webpack_require__(1105); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minutesToMilliseconds", function() { return _minutesToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_160__["default"]; }); -/* harmony import */ var _minutesToSeconds_index_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(1109); +/* harmony import */ var _minutesToSeconds_index_js__WEBPACK_IMPORTED_MODULE_161__ = __webpack_require__(1106); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minutesToSeconds", function() { return _minutesToSeconds_index_js__WEBPACK_IMPORTED_MODULE_161__["default"]; }); -/* harmony import */ var _monthsToQuarters_index_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(1110); +/* harmony import */ var _monthsToQuarters_index_js__WEBPACK_IMPORTED_MODULE_162__ = __webpack_require__(1107); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "monthsToQuarters", function() { return _monthsToQuarters_index_js__WEBPACK_IMPORTED_MODULE_162__["default"]; }); -/* harmony import */ var _monthsToYears_index_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(1111); +/* harmony import */ var _monthsToYears_index_js__WEBPACK_IMPORTED_MODULE_163__ = __webpack_require__(1108); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "monthsToYears", function() { return _monthsToYears_index_js__WEBPACK_IMPORTED_MODULE_163__["default"]; }); -/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(1112); +/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_164__ = __webpack_require__(1109); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nextDay", function() { return _nextDay_index_js__WEBPACK_IMPORTED_MODULE_164__["default"]; }); -/* harmony import */ var _nextFriday_index_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(1113); +/* harmony import */ var _nextFriday_index_js__WEBPACK_IMPORTED_MODULE_165__ = __webpack_require__(1110); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nextFriday", function() { return _nextFriday_index_js__WEBPACK_IMPORTED_MODULE_165__["default"]; }); -/* harmony import */ var _nextMonday_index_js__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(1114); +/* harmony import */ var _nextMonday_index_js__WEBPACK_IMPORTED_MODULE_166__ = __webpack_require__(1111); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nextMonday", function() { return _nextMonday_index_js__WEBPACK_IMPORTED_MODULE_166__["default"]; }); -/* harmony import */ var _nextSaturday_index_js__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(1115); +/* harmony import */ var _nextSaturday_index_js__WEBPACK_IMPORTED_MODULE_167__ = __webpack_require__(1112); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nextSaturday", function() { return _nextSaturday_index_js__WEBPACK_IMPORTED_MODULE_167__["default"]; }); -/* harmony import */ var _nextSunday_index_js__WEBPACK_IMPORTED_MODULE_168__ = __webpack_require__(1116); +/* harmony import */ var _nextSunday_index_js__WEBPACK_IMPORTED_MODULE_168__ = __webpack_require__(1113); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nextSunday", function() { return _nextSunday_index_js__WEBPACK_IMPORTED_MODULE_168__["default"]; }); -/* harmony import */ var _nextThursday_index_js__WEBPACK_IMPORTED_MODULE_169__ = __webpack_require__(1117); +/* harmony import */ var _nextThursday_index_js__WEBPACK_IMPORTED_MODULE_169__ = __webpack_require__(1114); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nextThursday", function() { return _nextThursday_index_js__WEBPACK_IMPORTED_MODULE_169__["default"]; }); -/* harmony import */ var _nextTuesday_index_js__WEBPACK_IMPORTED_MODULE_170__ = __webpack_require__(1118); +/* harmony import */ var _nextTuesday_index_js__WEBPACK_IMPORTED_MODULE_170__ = __webpack_require__(1115); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nextTuesday", function() { return _nextTuesday_index_js__WEBPACK_IMPORTED_MODULE_170__["default"]; }); -/* harmony import */ var _nextWednesday_index_js__WEBPACK_IMPORTED_MODULE_171__ = __webpack_require__(1119); +/* harmony import */ var _nextWednesday_index_js__WEBPACK_IMPORTED_MODULE_171__ = __webpack_require__(1116); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nextWednesday", function() { return _nextWednesday_index_js__WEBPACK_IMPORTED_MODULE_171__["default"]; }); -/* harmony import */ var _parse_index_js__WEBPACK_IMPORTED_MODULE_172__ = __webpack_require__(1062); +/* harmony import */ var _parse_index_js__WEBPACK_IMPORTED_MODULE_172__ = __webpack_require__(1059); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parse", function() { return _parse_index_js__WEBPACK_IMPORTED_MODULE_172__["default"]; }); -/* harmony import */ var _parseISO_index_js__WEBPACK_IMPORTED_MODULE_173__ = __webpack_require__(1120); +/* harmony import */ var _parseISO_index_js__WEBPACK_IMPORTED_MODULE_173__ = __webpack_require__(1117); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parseISO", function() { return _parseISO_index_js__WEBPACK_IMPORTED_MODULE_173__["default"]; }); -/* harmony import */ var _parseJSON_index_js__WEBPACK_IMPORTED_MODULE_174__ = __webpack_require__(1121); +/* harmony import */ var _parseJSON_index_js__WEBPACK_IMPORTED_MODULE_174__ = __webpack_require__(1118); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parseJSON", function() { return _parseJSON_index_js__WEBPACK_IMPORTED_MODULE_174__["default"]; }); -/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_175__ = __webpack_require__(1122); +/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_175__ = __webpack_require__(1119); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "previousDay", function() { return _previousDay_index_js__WEBPACK_IMPORTED_MODULE_175__["default"]; }); -/* harmony import */ var _previousFriday_index_js__WEBPACK_IMPORTED_MODULE_176__ = __webpack_require__(1123); +/* harmony import */ var _previousFriday_index_js__WEBPACK_IMPORTED_MODULE_176__ = __webpack_require__(1120); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "previousFriday", function() { return _previousFriday_index_js__WEBPACK_IMPORTED_MODULE_176__["default"]; }); -/* harmony import */ var _previousMonday_index_js__WEBPACK_IMPORTED_MODULE_177__ = __webpack_require__(1124); +/* harmony import */ var _previousMonday_index_js__WEBPACK_IMPORTED_MODULE_177__ = __webpack_require__(1121); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "previousMonday", function() { return _previousMonday_index_js__WEBPACK_IMPORTED_MODULE_177__["default"]; }); -/* harmony import */ var _previousSaturday_index_js__WEBPACK_IMPORTED_MODULE_178__ = __webpack_require__(1125); +/* harmony import */ var _previousSaturday_index_js__WEBPACK_IMPORTED_MODULE_178__ = __webpack_require__(1122); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "previousSaturday", function() { return _previousSaturday_index_js__WEBPACK_IMPORTED_MODULE_178__["default"]; }); -/* harmony import */ var _previousSunday_index_js__WEBPACK_IMPORTED_MODULE_179__ = __webpack_require__(1126); +/* harmony import */ var _previousSunday_index_js__WEBPACK_IMPORTED_MODULE_179__ = __webpack_require__(1123); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "previousSunday", function() { return _previousSunday_index_js__WEBPACK_IMPORTED_MODULE_179__["default"]; }); -/* harmony import */ var _previousThursday_index_js__WEBPACK_IMPORTED_MODULE_180__ = __webpack_require__(1127); +/* harmony import */ var _previousThursday_index_js__WEBPACK_IMPORTED_MODULE_180__ = __webpack_require__(1124); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "previousThursday", function() { return _previousThursday_index_js__WEBPACK_IMPORTED_MODULE_180__["default"]; }); -/* harmony import */ var _previousTuesday_index_js__WEBPACK_IMPORTED_MODULE_181__ = __webpack_require__(1128); +/* harmony import */ var _previousTuesday_index_js__WEBPACK_IMPORTED_MODULE_181__ = __webpack_require__(1125); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "previousTuesday", function() { return _previousTuesday_index_js__WEBPACK_IMPORTED_MODULE_181__["default"]; }); -/* harmony import */ var _previousWednesday_index_js__WEBPACK_IMPORTED_MODULE_182__ = __webpack_require__(1129); +/* harmony import */ var _previousWednesday_index_js__WEBPACK_IMPORTED_MODULE_182__ = __webpack_require__(1126); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "previousWednesday", function() { return _previousWednesday_index_js__WEBPACK_IMPORTED_MODULE_182__["default"]; }); -/* harmony import */ var _quartersToMonths_index_js__WEBPACK_IMPORTED_MODULE_183__ = __webpack_require__(1130); +/* harmony import */ var _quartersToMonths_index_js__WEBPACK_IMPORTED_MODULE_183__ = __webpack_require__(1127); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quartersToMonths", function() { return _quartersToMonths_index_js__WEBPACK_IMPORTED_MODULE_183__["default"]; }); -/* harmony import */ var _quartersToYears_index_js__WEBPACK_IMPORTED_MODULE_184__ = __webpack_require__(1131); +/* harmony import */ var _quartersToYears_index_js__WEBPACK_IMPORTED_MODULE_184__ = __webpack_require__(1128); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quartersToYears", function() { return _quartersToYears_index_js__WEBPACK_IMPORTED_MODULE_184__["default"]; }); -/* harmony import */ var _roundToNearestMinutes_index_js__WEBPACK_IMPORTED_MODULE_185__ = __webpack_require__(1132); +/* harmony import */ var _roundToNearestMinutes_index_js__WEBPACK_IMPORTED_MODULE_185__ = __webpack_require__(1129); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "roundToNearestMinutes", function() { return _roundToNearestMinutes_index_js__WEBPACK_IMPORTED_MODULE_185__["default"]; }); -/* harmony import */ var _secondsToHours_index_js__WEBPACK_IMPORTED_MODULE_186__ = __webpack_require__(1133); +/* harmony import */ var _secondsToHours_index_js__WEBPACK_IMPORTED_MODULE_186__ = __webpack_require__(1130); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "secondsToHours", function() { return _secondsToHours_index_js__WEBPACK_IMPORTED_MODULE_186__["default"]; }); -/* harmony import */ var _secondsToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_187__ = __webpack_require__(1134); +/* harmony import */ var _secondsToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_187__ = __webpack_require__(1131); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "secondsToMilliseconds", function() { return _secondsToMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_187__["default"]; }); -/* harmony import */ var _secondsToMinutes_index_js__WEBPACK_IMPORTED_MODULE_188__ = __webpack_require__(1135); +/* harmony import */ var _secondsToMinutes_index_js__WEBPACK_IMPORTED_MODULE_188__ = __webpack_require__(1132); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "secondsToMinutes", function() { return _secondsToMinutes_index_js__WEBPACK_IMPORTED_MODULE_188__["default"]; }); -/* harmony import */ var _set_index_js__WEBPACK_IMPORTED_MODULE_189__ = __webpack_require__(1136); +/* harmony import */ var _set_index_js__WEBPACK_IMPORTED_MODULE_189__ = __webpack_require__(1133); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "set", function() { return _set_index_js__WEBPACK_IMPORTED_MODULE_189__["default"]; }); -/* harmony import */ var _setDate_index_js__WEBPACK_IMPORTED_MODULE_190__ = __webpack_require__(1138); +/* harmony import */ var _setDate_index_js__WEBPACK_IMPORTED_MODULE_190__ = __webpack_require__(1135); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setDate", function() { return _setDate_index_js__WEBPACK_IMPORTED_MODULE_190__["default"]; }); -/* harmony import */ var _setDay_index_js__WEBPACK_IMPORTED_MODULE_191__ = __webpack_require__(1139); +/* harmony import */ var _setDay_index_js__WEBPACK_IMPORTED_MODULE_191__ = __webpack_require__(1136); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setDay", function() { return _setDay_index_js__WEBPACK_IMPORTED_MODULE_191__["default"]; }); -/* harmony import */ var _setDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_192__ = __webpack_require__(1140); +/* harmony import */ var _setDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_192__ = __webpack_require__(1137); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setDayOfYear", function() { return _setDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_192__["default"]; }); -/* harmony import */ var _setHours_index_js__WEBPACK_IMPORTED_MODULE_193__ = __webpack_require__(1141); +/* harmony import */ var _setHours_index_js__WEBPACK_IMPORTED_MODULE_193__ = __webpack_require__(1138); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setHours", function() { return _setHours_index_js__WEBPACK_IMPORTED_MODULE_193__["default"]; }); -/* harmony import */ var _setISODay_index_js__WEBPACK_IMPORTED_MODULE_194__ = __webpack_require__(1142); +/* harmony import */ var _setISODay_index_js__WEBPACK_IMPORTED_MODULE_194__ = __webpack_require__(1139); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setISODay", function() { return _setISODay_index_js__WEBPACK_IMPORTED_MODULE_194__["default"]; }); -/* harmony import */ var _setISOWeek_index_js__WEBPACK_IMPORTED_MODULE_195__ = __webpack_require__(1143); +/* harmony import */ var _setISOWeek_index_js__WEBPACK_IMPORTED_MODULE_195__ = __webpack_require__(1140); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setISOWeek", function() { return _setISOWeek_index_js__WEBPACK_IMPORTED_MODULE_195__["default"]; }); -/* harmony import */ var _setISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_196__ = __webpack_require__(909); +/* harmony import */ var _setISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_196__ = __webpack_require__(906); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setISOWeekYear", function() { return _setISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_196__["default"]; }); -/* harmony import */ var _setMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_197__ = __webpack_require__(1144); +/* harmony import */ var _setMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_197__ = __webpack_require__(1141); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setMilliseconds", function() { return _setMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_197__["default"]; }); -/* harmony import */ var _setMinutes_index_js__WEBPACK_IMPORTED_MODULE_198__ = __webpack_require__(1145); +/* harmony import */ var _setMinutes_index_js__WEBPACK_IMPORTED_MODULE_198__ = __webpack_require__(1142); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setMinutes", function() { return _setMinutes_index_js__WEBPACK_IMPORTED_MODULE_198__["default"]; }); -/* harmony import */ var _setMonth_index_js__WEBPACK_IMPORTED_MODULE_199__ = __webpack_require__(1137); +/* harmony import */ var _setMonth_index_js__WEBPACK_IMPORTED_MODULE_199__ = __webpack_require__(1134); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setMonth", function() { return _setMonth_index_js__WEBPACK_IMPORTED_MODULE_199__["default"]; }); -/* harmony import */ var _setQuarter_index_js__WEBPACK_IMPORTED_MODULE_200__ = __webpack_require__(1146); +/* harmony import */ var _setQuarter_index_js__WEBPACK_IMPORTED_MODULE_200__ = __webpack_require__(1143); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setQuarter", function() { return _setQuarter_index_js__WEBPACK_IMPORTED_MODULE_200__["default"]; }); -/* harmony import */ var _setSeconds_index_js__WEBPACK_IMPORTED_MODULE_201__ = __webpack_require__(1147); +/* harmony import */ var _setSeconds_index_js__WEBPACK_IMPORTED_MODULE_201__ = __webpack_require__(1144); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setSeconds", function() { return _setSeconds_index_js__WEBPACK_IMPORTED_MODULE_201__["default"]; }); -/* harmony import */ var _setWeek_index_js__WEBPACK_IMPORTED_MODULE_202__ = __webpack_require__(1148); +/* harmony import */ var _setWeek_index_js__WEBPACK_IMPORTED_MODULE_202__ = __webpack_require__(1145); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setWeek", function() { return _setWeek_index_js__WEBPACK_IMPORTED_MODULE_202__["default"]; }); -/* harmony import */ var _setWeekYear_index_js__WEBPACK_IMPORTED_MODULE_203__ = __webpack_require__(1149); +/* harmony import */ var _setWeekYear_index_js__WEBPACK_IMPORTED_MODULE_203__ = __webpack_require__(1146); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setWeekYear", function() { return _setWeekYear_index_js__WEBPACK_IMPORTED_MODULE_203__["default"]; }); -/* harmony import */ var _setYear_index_js__WEBPACK_IMPORTED_MODULE_204__ = __webpack_require__(1150); +/* harmony import */ var _setYear_index_js__WEBPACK_IMPORTED_MODULE_204__ = __webpack_require__(1147); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "setYear", function() { return _setYear_index_js__WEBPACK_IMPORTED_MODULE_204__["default"]; }); -/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_205__ = __webpack_require__(913); +/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_205__ = __webpack_require__(910); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfDay", function() { return _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_205__["default"]; }); -/* harmony import */ var _startOfDecade_index_js__WEBPACK_IMPORTED_MODULE_206__ = __webpack_require__(1151); +/* harmony import */ var _startOfDecade_index_js__WEBPACK_IMPORTED_MODULE_206__ = __webpack_require__(1148); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfDecade", function() { return _startOfDecade_index_js__WEBPACK_IMPORTED_MODULE_206__["default"]; }); -/* harmony import */ var _startOfHour_index_js__WEBPACK_IMPORTED_MODULE_207__ = __webpack_require__(1071); +/* harmony import */ var _startOfHour_index_js__WEBPACK_IMPORTED_MODULE_207__ = __webpack_require__(1068); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfHour", function() { return _startOfHour_index_js__WEBPACK_IMPORTED_MODULE_207__["default"]; }); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_208__ = __webpack_require__(907); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_208__ = __webpack_require__(904); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfISOWeek", function() { return _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_208__["default"]; }); -/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_209__ = __webpack_require__(910); +/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_209__ = __webpack_require__(907); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfISOWeekYear", function() { return _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_209__["default"]; }); -/* harmony import */ var _startOfMinute_index_js__WEBPACK_IMPORTED_MODULE_210__ = __webpack_require__(958); +/* harmony import */ var _startOfMinute_index_js__WEBPACK_IMPORTED_MODULE_210__ = __webpack_require__(955); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfMinute", function() { return _startOfMinute_index_js__WEBPACK_IMPORTED_MODULE_210__["default"]; }); -/* harmony import */ var _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_211__ = __webpack_require__(965); +/* harmony import */ var _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_211__ = __webpack_require__(962); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfMonth", function() { return _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_211__["default"]; }); -/* harmony import */ var _startOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_212__ = __webpack_require__(961); +/* harmony import */ var _startOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_212__ = __webpack_require__(958); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfQuarter", function() { return _startOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_212__["default"]; }); -/* harmony import */ var _startOfSecond_index_js__WEBPACK_IMPORTED_MODULE_213__ = __webpack_require__(1079); +/* harmony import */ var _startOfSecond_index_js__WEBPACK_IMPORTED_MODULE_213__ = __webpack_require__(1076); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfSecond", function() { return _startOfSecond_index_js__WEBPACK_IMPORTED_MODULE_213__["default"]; }); -/* harmony import */ var _startOfToday_index_js__WEBPACK_IMPORTED_MODULE_214__ = __webpack_require__(1152); +/* harmony import */ var _startOfToday_index_js__WEBPACK_IMPORTED_MODULE_214__ = __webpack_require__(1149); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfToday", function() { return _startOfToday_index_js__WEBPACK_IMPORTED_MODULE_214__["default"]; }); -/* harmony import */ var _startOfTomorrow_index_js__WEBPACK_IMPORTED_MODULE_215__ = __webpack_require__(1153); +/* harmony import */ var _startOfTomorrow_index_js__WEBPACK_IMPORTED_MODULE_215__ = __webpack_require__(1150); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfTomorrow", function() { return _startOfTomorrow_index_js__WEBPACK_IMPORTED_MODULE_215__["default"]; }); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_216__ = __webpack_require__(908); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_216__ = __webpack_require__(905); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfWeek", function() { return _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_216__["default"]; }); -/* harmony import */ var _startOfWeekYear_index_js__WEBPACK_IMPORTED_MODULE_217__ = __webpack_require__(1040); +/* harmony import */ var _startOfWeekYear_index_js__WEBPACK_IMPORTED_MODULE_217__ = __webpack_require__(1037); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfWeekYear", function() { return _startOfWeekYear_index_js__WEBPACK_IMPORTED_MODULE_217__["default"]; }); -/* harmony import */ var _startOfYear_index_js__WEBPACK_IMPORTED_MODULE_218__ = __webpack_require__(967); +/* harmony import */ var _startOfYear_index_js__WEBPACK_IMPORTED_MODULE_218__ = __webpack_require__(964); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfYear", function() { return _startOfYear_index_js__WEBPACK_IMPORTED_MODULE_218__["default"]; }); -/* harmony import */ var _startOfYesterday_index_js__WEBPACK_IMPORTED_MODULE_219__ = __webpack_require__(1154); +/* harmony import */ var _startOfYesterday_index_js__WEBPACK_IMPORTED_MODULE_219__ = __webpack_require__(1151); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "startOfYesterday", function() { return _startOfYesterday_index_js__WEBPACK_IMPORTED_MODULE_219__["default"]; }); -/* harmony import */ var _sub_index_js__WEBPACK_IMPORTED_MODULE_220__ = __webpack_require__(1050); +/* harmony import */ var _sub_index_js__WEBPACK_IMPORTED_MODULE_220__ = __webpack_require__(1047); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sub", function() { return _sub_index_js__WEBPACK_IMPORTED_MODULE_220__["default"]; }); -/* harmony import */ var _subBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_221__ = __webpack_require__(1155); +/* harmony import */ var _subBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_221__ = __webpack_require__(1152); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subBusinessDays", function() { return _subBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_221__["default"]; }); -/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_222__ = __webpack_require__(1051); +/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_222__ = __webpack_require__(1048); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subDays", function() { return _subDays_index_js__WEBPACK_IMPORTED_MODULE_222__["default"]; }); -/* harmony import */ var _subHours_index_js__WEBPACK_IMPORTED_MODULE_223__ = __webpack_require__(1156); +/* harmony import */ var _subHours_index_js__WEBPACK_IMPORTED_MODULE_223__ = __webpack_require__(1153); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subHours", function() { return _subHours_index_js__WEBPACK_IMPORTED_MODULE_223__["default"]; }); -/* harmony import */ var _subISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_224__ = __webpack_require__(945); +/* harmony import */ var _subISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_224__ = __webpack_require__(942); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subISOWeekYears", function() { return _subISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_224__["default"]; }); -/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_225__ = __webpack_require__(992); +/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_225__ = __webpack_require__(989); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subMilliseconds", function() { return _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_225__["default"]; }); -/* harmony import */ var _subMinutes_index_js__WEBPACK_IMPORTED_MODULE_226__ = __webpack_require__(1157); +/* harmony import */ var _subMinutes_index_js__WEBPACK_IMPORTED_MODULE_226__ = __webpack_require__(1154); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subMinutes", function() { return _subMinutes_index_js__WEBPACK_IMPORTED_MODULE_226__["default"]; }); -/* harmony import */ var _subMonths_index_js__WEBPACK_IMPORTED_MODULE_227__ = __webpack_require__(1052); +/* harmony import */ var _subMonths_index_js__WEBPACK_IMPORTED_MODULE_227__ = __webpack_require__(1049); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subMonths", function() { return _subMonths_index_js__WEBPACK_IMPORTED_MODULE_227__["default"]; }); -/* harmony import */ var _subQuarters_index_js__WEBPACK_IMPORTED_MODULE_228__ = __webpack_require__(1158); +/* harmony import */ var _subQuarters_index_js__WEBPACK_IMPORTED_MODULE_228__ = __webpack_require__(1155); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subQuarters", function() { return _subQuarters_index_js__WEBPACK_IMPORTED_MODULE_228__["default"]; }); -/* harmony import */ var _subSeconds_index_js__WEBPACK_IMPORTED_MODULE_229__ = __webpack_require__(1159); +/* harmony import */ var _subSeconds_index_js__WEBPACK_IMPORTED_MODULE_229__ = __webpack_require__(1156); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subSeconds", function() { return _subSeconds_index_js__WEBPACK_IMPORTED_MODULE_229__["default"]; }); -/* harmony import */ var _subWeeks_index_js__WEBPACK_IMPORTED_MODULE_230__ = __webpack_require__(1160); +/* harmony import */ var _subWeeks_index_js__WEBPACK_IMPORTED_MODULE_230__ = __webpack_require__(1157); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subWeeks", function() { return _subWeeks_index_js__WEBPACK_IMPORTED_MODULE_230__["default"]; }); -/* harmony import */ var _subYears_index_js__WEBPACK_IMPORTED_MODULE_231__ = __webpack_require__(1161); +/* harmony import */ var _subYears_index_js__WEBPACK_IMPORTED_MODULE_231__ = __webpack_require__(1158); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subYears", function() { return _subYears_index_js__WEBPACK_IMPORTED_MODULE_231__["default"]; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_232__ = __webpack_require__(896); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_232__ = __webpack_require__(893); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "toDate", function() { return _toDate_index_js__WEBPACK_IMPORTED_MODULE_232__["default"]; }); -/* harmony import */ var _weeksToDays_index_js__WEBPACK_IMPORTED_MODULE_233__ = __webpack_require__(1162); +/* harmony import */ var _weeksToDays_index_js__WEBPACK_IMPORTED_MODULE_233__ = __webpack_require__(1159); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "weeksToDays", function() { return _weeksToDays_index_js__WEBPACK_IMPORTED_MODULE_233__["default"]; }); -/* harmony import */ var _yearsToMonths_index_js__WEBPACK_IMPORTED_MODULE_234__ = __webpack_require__(1163); +/* harmony import */ var _yearsToMonths_index_js__WEBPACK_IMPORTED_MODULE_234__ = __webpack_require__(1160); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "yearsToMonths", function() { return _yearsToMonths_index_js__WEBPACK_IMPORTED_MODULE_234__["default"]; }); -/* harmony import */ var _yearsToQuarters_index_js__WEBPACK_IMPORTED_MODULE_235__ = __webpack_require__(1164); +/* harmony import */ var _yearsToQuarters_index_js__WEBPACK_IMPORTED_MODULE_235__ = __webpack_require__(1161); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "yearsToQuarters", function() { return _yearsToQuarters_index_js__WEBPACK_IMPORTED_MODULE_235__["default"]; }); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_236__ = __webpack_require__(928); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_236__ = __webpack_require__(925); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "daysInWeek", function() { return _constants_index_js__WEBPACK_IMPORTED_MODULE_236__["daysInWeek"]; }); /* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxTime", function() { return _constants_index_js__WEBPACK_IMPORTED_MODULE_236__["maxTime"]; }); @@ -153259,17 +148296,17 @@ __webpack_require__.r(__webpack_exports__); /***/ }), -/* 893 */ +/* 890 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return add; }); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); -/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(898); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(895); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(891); +/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(892); @@ -153339,15 +148376,15 @@ function add(dirtyDate, duration) { } /***/ }), -/* 894 */ +/* 891 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addDays; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -153393,7 +148430,7 @@ function addDays(dirtyDate, dirtyAmount) { } /***/ }), -/* 895 */ +/* 892 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -153414,13 +148451,13 @@ function toInteger(dirtyNumber) { } /***/ }), -/* 896 */ +/* 893 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return toDate; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); /** * @name toDate @@ -153475,7 +148512,7 @@ function toDate(argument) { } /***/ }), -/* 897 */ +/* 894 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -153488,15 +148525,15 @@ function requiredArgs(required, args) { } /***/ }), -/* 898 */ +/* 895 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addMonths; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -153568,18 +148605,18 @@ function addMonths(dirtyDate, dirtyAmount) { } /***/ }), -/* 899 */ +/* 896 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addBusinessDays; }); -/* harmony import */ var _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(900); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); -/* harmony import */ var _isSunday_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(901); -/* harmony import */ var _isSaturday_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(902); +/* harmony import */ var _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); +/* harmony import */ var _isSunday_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(898); +/* harmony import */ var _isSaturday_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(899); @@ -153639,14 +148676,14 @@ function addBusinessDays(dirtyDate, dirtyAmount) { } /***/ }), -/* 900 */ +/* 897 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isWeekend; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -153679,14 +148716,14 @@ function isWeekend(dirtyDate) { } /***/ }), -/* 901 */ +/* 898 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSunday; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -153717,14 +148754,14 @@ function isSunday(dirtyDate) { } /***/ }), -/* 902 */ +/* 899 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSaturday; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -153755,15 +148792,15 @@ function isSaturday(dirtyDate) { } /***/ }), -/* 903 */ +/* 900 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addHours; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(901); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -153798,15 +148835,15 @@ function addHours(dirtyDate, dirtyAmount) { } /***/ }), -/* 904 */ +/* 901 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addMilliseconds; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -153841,16 +148878,16 @@ function addMilliseconds(dirtyDate, dirtyAmount) { } /***/ }), -/* 905 */ +/* 902 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addISOWeekYears; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(906); -/* harmony import */ var _setISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(909); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(903); +/* harmony import */ var _setISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(906); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -153892,15 +148929,15 @@ function addISOWeekYears(dirtyDate, dirtyAmount) { } /***/ }), -/* 906 */ +/* 903 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getISOWeekYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(907); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -153957,14 +148994,14 @@ function getISOWeekYear(dirtyDate) { } /***/ }), -/* 907 */ +/* 904 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfISOWeek; }); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(908); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(905); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -154000,15 +149037,15 @@ function startOfISOWeek(dirtyDate) { } /***/ }), -/* 908 */ +/* 905 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfWeek; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154065,17 +149102,17 @@ function startOfWeek(dirtyDate, dirtyOptions) { } /***/ }), -/* 909 */ +/* 906 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setISOWeekYear; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(910); -/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(911); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(907); +/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(908); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(894); @@ -154126,15 +149163,15 @@ function setISOWeekYear(dirtyDate, dirtyISOWeekYear) { } /***/ }), -/* 910 */ +/* 907 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfISOWeekYear; }); -/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(906); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(907); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(903); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154175,15 +149212,15 @@ function startOfISOWeekYear(dirtyDate) { } /***/ }), -/* 911 */ +/* 908 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInCalendarDays; }); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(912); -/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(913); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(909); +/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(910); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154236,7 +149273,7 @@ function differenceInCalendarDays(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 912 */ +/* 909 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -154260,14 +149297,14 @@ function getTimezoneOffsetInMilliseconds(date) { } /***/ }), -/* 913 */ +/* 910 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfDay; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -154301,15 +149338,15 @@ function startOfDay(dirtyDate) { } /***/ }), -/* 914 */ +/* 911 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addMinutes; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(901); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154344,15 +149381,15 @@ function addMinutes(dirtyDate, dirtyAmount) { } /***/ }), -/* 915 */ +/* 912 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addQuarters; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(898); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154387,15 +149424,15 @@ function addQuarters(dirtyDate, dirtyAmount) { } /***/ }), -/* 916 */ +/* 913 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addSeconds; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(901); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154429,15 +149466,15 @@ function addSeconds(dirtyDate, dirtyAmount) { } /***/ }), -/* 917 */ +/* 914 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addWeeks; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(891); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154472,15 +149509,15 @@ function addWeeks(dirtyDate, dirtyAmount) { } /***/ }), -/* 918 */ +/* 915 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return addYears; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(898); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154514,14 +149551,14 @@ function addYears(dirtyDate, dirtyAmount) { } /***/ }), -/* 919 */ +/* 916 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return areIntervalsOverlapping; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -154638,15 +149675,15 @@ function areIntervalsOverlapping(dirtyIntervalLeft, dirtyIntervalRight) { } /***/ }), -/* 920 */ +/* 917 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return clamp; }); -/* harmony import */ var _max_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(921); -/* harmony import */ var _min_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(922); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _max_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(918); +/* harmony import */ var _min_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(919); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -154685,14 +149722,14 @@ function clamp(date, _ref) { } /***/ }), -/* 921 */ +/* 918 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return max; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -154760,14 +149797,14 @@ function max(dirtyDatesArray) { } /***/ }), -/* 922 */ +/* 919 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return min; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -154835,14 +149872,14 @@ function min(dirtyDatesArray) { } /***/ }), -/* 923 */ +/* 920 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return closestIndexTo; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -154918,14 +149955,14 @@ function closestIndexTo(dirtyDateToCompare, dirtyDatesArray) { } /***/ }), -/* 924 */ +/* 921 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return closestTo; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -154999,14 +150036,14 @@ function closestTo(dirtyDateToCompare, dirtyDatesArray) { } /***/ }), -/* 925 */ +/* 922 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return compareAsc; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -155062,14 +150099,14 @@ function compareAsc(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 926 */ +/* 923 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return compareDesc; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -155125,14 +150162,14 @@ function compareDesc(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 927 */ +/* 924 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return daysToWeeks; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -155166,7 +150203,7 @@ function daysToWeeks(days) { } /***/ }), -/* 928 */ +/* 925 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -155304,20 +150341,20 @@ var secondsInHour = 3600; var secondsInMinute = 60; /***/ }), -/* 929 */ +/* 926 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInBusinessDays; }); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(930); -/* harmony import */ var _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(900); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); -/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(911); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(894); -/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(932); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(897); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(927); +/* harmony import */ var _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); +/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(908); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(891); +/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(929); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(894); @@ -155373,15 +150410,15 @@ function differenceInBusinessDays(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 930 */ +/* 927 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isValid; }); -/* harmony import */ var _isDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(931); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _isDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -155455,13 +150492,13 @@ function isValid(dirtyDate) { } /***/ }), -/* 931 */ +/* 928 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isDate; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); /** * @name isDate @@ -155506,14 +150543,14 @@ function isDate(value) { } /***/ }), -/* 932 */ +/* 929 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameDay; }); -/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(913); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(910); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -155547,14 +150584,14 @@ function isSameDay(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 933 */ +/* 930 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInCalendarISOWeekYears; }); -/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(906); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(903); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -155596,15 +150633,15 @@ function differenceInCalendarISOWeekYears(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 934 */ +/* 931 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInCalendarISOWeeks; }); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(912); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(907); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(909); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -155650,14 +150687,14 @@ function differenceInCalendarISOWeeks(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 935 */ +/* 932 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInCalendarMonths; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -155696,15 +150733,15 @@ function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 936 */ +/* 933 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInCalendarQuarters; }); -/* harmony import */ var _getQuarter_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(937); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _getQuarter_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(934); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -155744,14 +150781,14 @@ function differenceInCalendarQuarters(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 937 */ +/* 934 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getQuarter; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -155784,15 +150821,15 @@ function getQuarter(dirtyDate) { } /***/ }), -/* 938 */ +/* 935 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInCalendarWeeks; }); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(908); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(912); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(905); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(909); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -155850,14 +150887,14 @@ function differenceInCalendarWeeks(dirtyDateLeft, dirtyDateRight, dirtyOptions) } /***/ }), -/* 939 */ +/* 936 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInCalendarYears; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -155894,15 +150931,15 @@ function differenceInCalendarYears(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 940 */ +/* 937 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInDays; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(911); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(908); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); // Like `compareAsc` but uses local time not UTC, which is needed @@ -155992,16 +151029,16 @@ function differenceInDays(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 941 */ +/* 938 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInHours; }); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928); -/* harmony import */ var _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(942); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); -/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(943); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(925); +/* harmony import */ var _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(939); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); +/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(940); @@ -156041,14 +151078,14 @@ function differenceInHours(dateLeft, dateRight, options) { } /***/ }), -/* 942 */ +/* 939 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInMilliseconds; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -156084,7 +151121,7 @@ function differenceInMilliseconds(dateLeft, dateRight) { } /***/ }), -/* 943 */ +/* 940 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -156105,17 +151142,17 @@ function getRoundingMethod(method) { } /***/ }), -/* 944 */ +/* 941 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInISOWeekYears; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _differenceInCalendarISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(933); -/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(925); -/* harmony import */ var _subISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(945); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _differenceInCalendarISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(930); +/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(922); +/* harmony import */ var _subISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(942); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(894); @@ -156171,15 +151208,15 @@ function differenceInISOWeekYears(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 945 */ +/* 942 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subISOWeekYears; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(905); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addISOWeekYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(902); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -156220,16 +151257,16 @@ function subISOWeekYears(dirtyDate, dirtyAmount) { } /***/ }), -/* 946 */ +/* 943 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInMinutes; }); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(928); -/* harmony import */ var _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(942); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); -/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(943); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(925); +/* harmony import */ var _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(939); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); +/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(940); @@ -156277,17 +151314,17 @@ function differenceInMinutes(dateLeft, dateRight, options) { } /***/ }), -/* 947 */ +/* 944 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInMonths; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _differenceInCalendarMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(935); -/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(925); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); -/* harmony import */ var _isLastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(948); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _differenceInCalendarMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(932); +/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(922); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); +/* harmony import */ var _isLastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(945); @@ -156350,16 +151387,16 @@ function differenceInMonths(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 948 */ +/* 945 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isLastDayOfMonth; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _endOfDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(949); -/* harmony import */ var _endOfMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(950); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _endOfDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(946); +/* harmony import */ var _endOfMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(947); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -156393,14 +151430,14 @@ function isLastDayOfMonth(dirtyDate) { } /***/ }), -/* 949 */ +/* 946 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfDay; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -156434,14 +151471,14 @@ function endOfDay(dirtyDate) { } /***/ }), -/* 950 */ +/* 947 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfMonth; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -156477,15 +151514,15 @@ function endOfMonth(dirtyDate) { } /***/ }), -/* 951 */ +/* 948 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInQuarters; }); -/* harmony import */ var _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(947); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); -/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(943); +/* harmony import */ var _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(944); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); +/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(940); @@ -156521,15 +151558,15 @@ function differenceInQuarters(dateLeft, dateRight, options) { } /***/ }), -/* 952 */ +/* 949 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInSeconds; }); -/* harmony import */ var _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(942); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); -/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(943); +/* harmony import */ var _differenceInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(939); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); +/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(940); @@ -156569,15 +151606,15 @@ function differenceInSeconds(dateLeft, dateRight, options) { } /***/ }), -/* 953 */ +/* 950 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInWeeks; }); -/* harmony import */ var _differenceInDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(940); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); -/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(943); +/* harmony import */ var _differenceInDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(937); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); +/* harmony import */ var _lib_roundingMethods_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(940); @@ -156634,16 +151671,16 @@ function differenceInWeeks(dateLeft, dateRight, options) { } /***/ }), -/* 954 */ +/* 951 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return differenceInYears; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _differenceInCalendarYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(939); -/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(925); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _differenceInCalendarYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(936); +/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(922); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -156690,14 +151727,14 @@ function differenceInYears(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 955 */ +/* 952 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachDayOfInterval; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -156789,15 +151826,15 @@ function eachDayOfInterval(dirtyInterval, options) { } /***/ }), -/* 956 */ +/* 953 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachHourOfInterval; }); -/* harmony import */ var _addHours_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(903); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _addHours_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(900); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -156859,16 +151896,16 @@ function eachHourOfInterval(dirtyInterval, options) { } /***/ }), -/* 957 */ +/* 954 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachMinuteOfInterval; }); -/* harmony import */ var _addMinutes_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(914); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _startOfMinute_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(958); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _addMinutes_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(911); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _startOfMinute_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(955); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -156929,14 +151966,14 @@ function eachMinuteOfInterval(interval, options) { } /***/ }), -/* 958 */ +/* 955 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfMinute; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -156970,14 +152007,14 @@ function startOfMinute(dirtyDate) { } /***/ }), -/* 959 */ +/* 956 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachMonthOfInterval; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157036,16 +152073,16 @@ function eachMonthOfInterval(dirtyInterval) { } /***/ }), -/* 960 */ +/* 957 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachQuarterOfInterval; }); -/* harmony import */ var _addQuarters_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(915); -/* harmony import */ var _startOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(961); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _addQuarters_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(912); +/* harmony import */ var _startOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(958); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -157103,14 +152140,14 @@ function eachQuarterOfInterval(dirtyInterval) { } /***/ }), -/* 961 */ +/* 958 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfQuarter; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157147,16 +152184,16 @@ function startOfQuarter(dirtyDate) { } /***/ }), -/* 962 */ +/* 959 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachWeekOfInterval; }); -/* harmony import */ var _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(917); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(908); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(914); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(905); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -157232,16 +152269,16 @@ function eachWeekOfInterval(dirtyInterval, options) { } /***/ }), -/* 963 */ +/* 960 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachWeekendOfInterval; }); -/* harmony import */ var _eachDayOfInterval_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(955); -/* harmony import */ var _isSunday_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(901); -/* harmony import */ var _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(900); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _eachDayOfInterval_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(952); +/* harmony import */ var _isSunday_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(898); +/* harmony import */ var _isWeekend_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -157293,16 +152330,16 @@ function eachWeekendOfInterval(interval) { } /***/ }), -/* 964 */ +/* 961 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachWeekendOfMonth; }); -/* harmony import */ var _eachWeekendOfInterval_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(963); -/* harmony import */ var _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(965); -/* harmony import */ var _endOfMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(950); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _eachWeekendOfInterval_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(960); +/* harmony import */ var _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(962); +/* harmony import */ var _endOfMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(947); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -157347,14 +152384,14 @@ function eachWeekendOfMonth(dirtyDate) { } /***/ }), -/* 965 */ +/* 962 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfMonth; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157389,16 +152426,16 @@ function startOfMonth(dirtyDate) { } /***/ }), -/* 966 */ +/* 963 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachWeekendOfYear; }); -/* harmony import */ var _eachWeekendOfInterval_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(963); -/* harmony import */ var _startOfYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(967); -/* harmony import */ var _endOfYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(968); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _eachWeekendOfInterval_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(960); +/* harmony import */ var _startOfYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(964); +/* harmony import */ var _endOfYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(965); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -157440,14 +152477,14 @@ function eachWeekendOfYear(dirtyDate) { } /***/ }), -/* 967 */ +/* 964 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157483,14 +152520,14 @@ function startOfYear(dirtyDate) { } /***/ }), -/* 968 */ +/* 965 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157526,14 +152563,14 @@ function endOfYear(dirtyDate) { } /***/ }), -/* 969 */ +/* 966 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return eachYearOfInterval; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157589,14 +152626,14 @@ function eachYearOfInterval(dirtyInterval) { } /***/ }), -/* 970 */ +/* 967 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfDecade; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157635,14 +152672,14 @@ function endOfDecade(dirtyDate) { } /***/ }), -/* 971 */ +/* 968 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfHour; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157676,14 +152713,14 @@ function endOfHour(dirtyDate) { } /***/ }), -/* 972 */ +/* 969 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfISOWeek; }); -/* harmony import */ var _endOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(973); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _endOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(970); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157719,15 +152756,15 @@ function endOfISOWeek(dirtyDate) { } /***/ }), -/* 973 */ +/* 970 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfWeek; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -157784,15 +152821,15 @@ function endOfWeek(dirtyDate, dirtyOptions) { } /***/ }), -/* 974 */ +/* 971 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfISOWeekYear; }); -/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(906); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(907); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(903); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -157839,14 +152876,14 @@ function endOfISOWeekYear(dirtyDate) { } /***/ }), -/* 975 */ +/* 972 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfMinute; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157880,14 +152917,14 @@ function endOfMinute(dirtyDate) { } /***/ }), -/* 976 */ +/* 973 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfQuarter; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157924,14 +152961,14 @@ function endOfQuarter(dirtyDate) { } /***/ }), -/* 977 */ +/* 974 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfSecond; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -157965,13 +153002,13 @@ function endOfSecond(dirtyDate) { } /***/ }), -/* 978 */ +/* 975 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return endOfToday; }); -/* harmony import */ var _endOfDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(949); +/* harmony import */ var _endOfDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(946); /** * @name endOfToday @@ -158002,7 +153039,7 @@ function endOfToday() { } /***/ }), -/* 979 */ +/* 976 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -158043,7 +153080,7 @@ function endOfTomorrow() { } /***/ }), -/* 980 */ +/* 977 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -158084,22 +153121,22 @@ function endOfYesterday() { } /***/ }), -/* 981 */ +/* 978 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return format; }); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(930); -/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(982); -/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(992); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(896); -/* harmony import */ var _lib_format_formatters_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(993); -/* harmony import */ var _lib_format_longFormatters_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1005); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(912); -/* harmony import */ var _lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1006); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(897); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(927); +/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(979); +/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(989); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(893); +/* harmony import */ var _lib_format_formatters_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(990); +/* harmony import */ var _lib_format_longFormatters_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1002); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(909); +/* harmony import */ var _lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(1003); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(894); @@ -158535,16 +153572,16 @@ function cleanEscapedString(input) { } /***/ }), -/* 982 */ +/* 979 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _lib_formatDistance_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(983); -/* harmony import */ var _lib_formatLong_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(984); -/* harmony import */ var _lib_formatRelative_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(986); -/* harmony import */ var _lib_localize_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(987); -/* harmony import */ var _lib_match_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(989); +/* harmony import */ var _lib_formatDistance_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(980); +/* harmony import */ var _lib_formatLong_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(981); +/* harmony import */ var _lib_formatRelative_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(983); +/* harmony import */ var _lib_localize_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(984); +/* harmony import */ var _lib_match_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(986); @@ -158577,7 +153614,7 @@ var locale = { /* harmony default export */ __webpack_exports__["default"] = (locale); /***/ }), -/* 983 */ +/* 980 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -158672,12 +153709,12 @@ var formatDistance = function (token, count, options) { /* harmony default export */ __webpack_exports__["default"] = (formatDistance); /***/ }), -/* 984 */ +/* 981 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _lib_buildFormatLongFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(985); +/* harmony import */ var _lib_buildFormatLongFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(982); var dateFormats = { full: 'EEEE, MMMM do, y', @@ -158714,7 +153751,7 @@ var formatLong = { /* harmony default export */ __webpack_exports__["default"] = (formatLong); /***/ }), -/* 985 */ +/* 982 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -158731,7 +153768,7 @@ function buildFormatLongFn(args) { } /***/ }), -/* 986 */ +/* 983 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -158752,12 +153789,12 @@ var formatRelative = function (token, _date, _baseDate, _options) { /* harmony default export */ __webpack_exports__["default"] = (formatRelative); /***/ }), -/* 987 */ +/* 984 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _lib_buildLocalizeFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(988); +/* harmony import */ var _lib_buildLocalizeFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(985); var eraValues = { narrow: ['B', 'A'], @@ -158906,7 +153943,7 @@ var localize = { /* harmony default export */ __webpack_exports__["default"] = (localize); /***/ }), -/* 988 */ +/* 985 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -158937,13 +153974,13 @@ function buildLocalizeFn(args) { } /***/ }), -/* 989 */ +/* 986 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _lib_buildMatchFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(990); -/* harmony import */ var _lib_buildMatchPatternFn_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(991); +/* harmony import */ var _lib_buildMatchFn_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(987); +/* harmony import */ var _lib_buildMatchPatternFn_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(988); var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i; @@ -159044,7 +154081,7 @@ var match = { /* harmony default export */ __webpack_exports__["default"] = (match); /***/ }), -/* 990 */ +/* 987 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -159100,7 +154137,7 @@ function findIndex(array, predicate) { } /***/ }), -/* 991 */ +/* 988 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -159125,15 +154162,15 @@ function buildMatchPatternFn(args) { } /***/ }), -/* 992 */ +/* 989 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subMilliseconds; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(901); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -159167,18 +154204,18 @@ function subMilliseconds(dirtyDate, dirtyAmount) { } /***/ }), -/* 993 */ +/* 990 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(994); -/* harmony import */ var _lib_getUTCDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(996); -/* harmony import */ var _lib_getUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(997); -/* harmony import */ var _lib_getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1000); -/* harmony import */ var _lib_getUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1001); -/* harmony import */ var _lib_getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1004); -/* harmony import */ var _addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(995); +/* harmony import */ var _lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(991); +/* harmony import */ var _lib_getUTCDayOfYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(993); +/* harmony import */ var _lib_getUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(994); +/* harmony import */ var _lib_getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(997); +/* harmony import */ var _lib_getUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(998); +/* harmony import */ var _lib_getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1001); +/* harmony import */ var _addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(992); @@ -160047,12 +155084,12 @@ function formatTimezone(offset, dirtyDelimiter) { /* harmony default export */ __webpack_exports__["default"] = (formatters); /***/ }), -/* 994 */ +/* 991 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(995); +/* harmony import */ var _addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(992); /* * | | Unit | | Unit | @@ -160139,7 +155176,7 @@ var formatters = { /* harmony default export */ __webpack_exports__["default"] = (formatters); /***/ }), -/* 995 */ +/* 992 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -160157,14 +155194,14 @@ function addLeadingZeros(number, targetLength) { } /***/ }), -/* 996 */ +/* 993 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getUTCDayOfYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); var MILLISECONDS_IN_DAY = 86400000; // This function will be a part of public API when UTC function will be implemented. @@ -160182,16 +155219,16 @@ function getUTCDayOfYear(dirtyDate) { } /***/ }), -/* 997 */ +/* 994 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getUTCISOWeek; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(998); -/* harmony import */ var _startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(999); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(995); +/* harmony import */ var _startOfUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(996); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -160210,14 +155247,14 @@ function getUTCISOWeek(dirtyDate) { } /***/ }), -/* 998 */ +/* 995 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfUTCISOWeek; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); // This function will be a part of public API when UTC function will be implemented. // See issue: https://github.com/date-fns/date-fns/issues/376 @@ -160234,15 +155271,15 @@ function startOfUTCISOWeek(dirtyDate) { } /***/ }), -/* 999 */ +/* 996 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfUTCISOWeekYear; }); -/* harmony import */ var _getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1000); -/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(998); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _getUTCISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(997); +/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(995); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); // This function will be a part of public API when UTC function will be implemented. @@ -160259,15 +155296,15 @@ function startOfUTCISOWeekYear(dirtyDate) { } /***/ }), -/* 1000 */ +/* 997 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getUTCISOWeekYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(998); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(995); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); // This function will be a part of public API when UTC function will be implemented. @@ -160296,16 +155333,16 @@ function getUTCISOWeekYear(dirtyDate) { } /***/ }), -/* 1001 */ +/* 998 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getUTCWeek; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1002); -/* harmony import */ var _startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1003); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(999); +/* harmony import */ var _startOfUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1000); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -160324,15 +155361,15 @@ function getUTCWeek(dirtyDate, options) { } /***/ }), -/* 1002 */ +/* 999 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfUTCWeek; }); -/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); // This function will be a part of public API when UTC function will be implemented. @@ -160359,16 +155396,16 @@ function startOfUTCWeek(dirtyDate, dirtyOptions) { } /***/ }), -/* 1003 */ +/* 1000 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfUTCWeekYear; }); -/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1004); -/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1002); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1001); +/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(999); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -160391,16 +155428,16 @@ function startOfUTCWeekYear(dirtyDate, dirtyOptions) { } /***/ }), -/* 1004 */ +/* 1001 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getUTCWeekYear; }); -/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1002); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(999); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -160440,7 +155477,7 @@ function getUTCWeekYear(dirtyDate, dirtyOptions) { } /***/ }), -/* 1005 */ +/* 1002 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -160543,7 +155580,7 @@ var longFormatters = { /* harmony default export */ __webpack_exports__["default"] = (longFormatters); /***/ }), -/* 1006 */ +/* 1003 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -160572,20 +155609,20 @@ function throwProtectedError(token, format, input) { } /***/ }), -/* 1007 */ +/* 1004 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatDistance; }); -/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(925); -/* harmony import */ var _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(947); -/* harmony import */ var _differenceInSeconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(952); -/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(982); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(896); -/* harmony import */ var _lib_cloneObject_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1008); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(912); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(897); +/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(922); +/* harmony import */ var _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(944); +/* harmony import */ var _differenceInSeconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(949); +/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(979); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(893); +/* harmony import */ var _lib_cloneObject_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1005); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(909); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(894); @@ -160801,20 +155838,20 @@ function formatDistance(dirtyDate, dirtyBaseDate) { } /***/ }), -/* 1008 */ +/* 1005 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cloneObject; }); -/* harmony import */ var _assign_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1009); +/* harmony import */ var _assign_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1006); function cloneObject(dirtyObject) { return Object(_assign_index_js__WEBPACK_IMPORTED_MODULE_0__["default"])({}, dirtyObject); } /***/ }), -/* 1009 */ +/* 1006 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -160837,18 +155874,18 @@ function assign(target, dirtyObject) { } /***/ }), -/* 1010 */ +/* 1007 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatDistanceStrict; }); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(912); -/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); -/* harmony import */ var _lib_cloneObject_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1008); -/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(982); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(897); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(909); +/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(922); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); +/* harmony import */ var _lib_cloneObject_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1005); +/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(979); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(894); @@ -161103,14 +156140,14 @@ function formatDistanceStrict(dirtyDate, dirtyBaseDate) { } /***/ }), -/* 1011 */ +/* 1008 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatDistanceToNow; }); -/* harmony import */ var _formatDistance_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1007); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _formatDistance_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1004); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -161225,14 +156262,14 @@ function formatDistanceToNow(dirtyDate, dirtyOptions) { } /***/ }), -/* 1012 */ +/* 1009 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatDistanceToNowStrict; }); -/* harmony import */ var _formatDistanceStrict_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1010); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _formatDistanceStrict_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1007); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -161316,13 +156353,13 @@ function formatDistanceToNowStrict(dirtyDate, dirtyOptions) { } /***/ }), -/* 1013 */ +/* 1010 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatDuration; }); -/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(982); +/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(979); var defaultFormat = ['years', 'months', 'weeks', 'days', 'hours', 'minutes', 'seconds']; /** @@ -161409,15 +156446,15 @@ function formatDuration(duration, options) { } /***/ }), -/* 1014 */ +/* 1011 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatISO; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(930); -/* harmony import */ var _lib_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(995); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(927); +/* harmony import */ var _lib_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(992); @@ -161527,15 +156564,15 @@ function formatISO(dirtyDate, dirtyOptions) { } /***/ }), -/* 1015 */ +/* 1012 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatISO9075; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(930); -/* harmony import */ var _lib_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(995); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(927); +/* harmony import */ var _lib_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(992); @@ -161628,13 +156665,13 @@ function formatISO9075(dirtyDate, dirtyOptions) { } /***/ }), -/* 1016 */ +/* 1013 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatISODuration; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); /** * @name formatISODuration @@ -161682,16 +156719,16 @@ function formatISODuration(duration) { } /***/ }), -/* 1017 */ +/* 1014 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatRFC3339; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(930); -/* harmony import */ var _lib_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(995); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(895); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(927); +/* harmony import */ var _lib_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(992); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(892); @@ -161780,15 +156817,15 @@ function formatRFC3339(dirtyDate, dirtyOptions) { } /***/ }), -/* 1018 */ +/* 1015 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatRFC7231; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(930); -/* harmony import */ var _lib_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(995); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(927); +/* harmony import */ var _lib_addLeadingZeros_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(992); @@ -161837,19 +156874,19 @@ function formatRFC7231(dirtyDate) { } /***/ }), -/* 1019 */ +/* 1016 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return formatRelative; }); -/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(911); -/* harmony import */ var _format_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(981); -/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(982); -/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(992); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(896); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(912); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(897); +/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(908); +/* harmony import */ var _format_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(978); +/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(979); +/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(989); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(893); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(909); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(894); @@ -161958,15 +156995,15 @@ function formatRelative(dirtyDate, dirtyBaseDate, dirtyOptions) { } /***/ }), -/* 1020 */ +/* 1017 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return fromUnixTime; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -161999,14 +157036,14 @@ function fromUnixTime(dirtyUnixTime) { } /***/ }), -/* 1021 */ +/* 1018 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getDate; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162039,14 +157076,14 @@ function getDate(dirtyDate) { } /***/ }), -/* 1022 */ +/* 1019 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getDay; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162079,16 +157116,16 @@ function getDay(dirtyDate) { } /***/ }), -/* 1023 */ +/* 1020 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getDayOfYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _startOfYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(967); -/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(911); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _startOfYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(964); +/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(908); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -162124,14 +157161,14 @@ function getDayOfYear(dirtyDate) { } /***/ }), -/* 1024 */ +/* 1021 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getDaysInMonth; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162168,15 +157205,15 @@ function getDaysInMonth(dirtyDate) { } /***/ }), -/* 1025 */ +/* 1022 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getDaysInYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _isLeapYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1026); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _isLeapYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1023); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -162214,14 +157251,14 @@ function getDaysInYear(dirtyDate) { } /***/ }), -/* 1026 */ +/* 1023 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isLeapYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162254,14 +157291,14 @@ function isLeapYear(dirtyDate) { } /***/ }), -/* 1027 */ +/* 1024 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getDecade; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162295,14 +157332,14 @@ function getDecade(dirtyDate) { } /***/ }), -/* 1028 */ +/* 1025 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getHours; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162335,14 +157372,14 @@ function getHours(dirtyDate) { } /***/ }), -/* 1029 */ +/* 1026 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getISODay; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162383,16 +157420,16 @@ function getISODay(dirtyDate) { } /***/ }), -/* 1030 */ +/* 1027 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getISOWeek; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(907); -/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(910); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); +/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(907); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -162433,15 +157470,15 @@ function getISOWeek(dirtyDate) { } /***/ }), -/* 1031 */ +/* 1028 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getISOWeeksInYear; }); -/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(910); -/* harmony import */ var _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(917); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(907); +/* harmony import */ var _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(914); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -162482,14 +157519,14 @@ function getISOWeeksInYear(dirtyDate) { } /***/ }), -/* 1032 */ +/* 1029 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getMilliseconds; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162522,14 +157559,14 @@ function getMilliseconds(dirtyDate) { } /***/ }), -/* 1033 */ +/* 1030 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getMinutes; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162562,14 +157599,14 @@ function getMinutes(dirtyDate) { } /***/ }), -/* 1034 */ +/* 1031 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getMonth; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162602,14 +157639,14 @@ function getMonth(dirtyDate) { } /***/ }), -/* 1035 */ +/* 1032 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getOverlappingDaysInIntervals; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); var MILLISECONDS_IN_DAY = 24 * 60 * 60 * 1000; @@ -162705,14 +157742,14 @@ function getOverlappingDaysInIntervals(dirtyIntervalLeft, dirtyIntervalRight) { } /***/ }), -/* 1036 */ +/* 1033 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getSeconds; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162745,14 +157782,14 @@ function getSeconds(dirtyDate) { } /***/ }), -/* 1037 */ +/* 1034 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getTime; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162785,14 +157822,14 @@ function getTime(dirtyDate) { } /***/ }), -/* 1038 */ +/* 1035 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getUnixTime; }); -/* harmony import */ var _getTime_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1037); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _getTime_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1034); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -162823,16 +157860,16 @@ function getUnixTime(dirtyDate) { } /***/ }), -/* 1039 */ +/* 1036 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getWeek; }); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(908); -/* harmony import */ var _startOfWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1040); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(905); +/* harmony import */ var _startOfWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1037); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -162892,16 +157929,16 @@ function getWeek(dirtyDate, options) { } /***/ }), -/* 1040 */ +/* 1037 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfWeekYear; }); -/* harmony import */ var _getWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1041); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(908); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _getWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1038); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(905); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -162966,16 +158003,16 @@ function startOfWeekYear(dirtyDate, dirtyOptions) { } /***/ }), -/* 1041 */ +/* 1038 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getWeekYear; }); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(908); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(905); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -163057,17 +158094,17 @@ function getWeekYear(dirtyDate, options) { } /***/ }), -/* 1042 */ +/* 1039 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getWeekOfMonth; }); -/* harmony import */ var _getDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1021); -/* harmony import */ var _getDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1022); -/* harmony import */ var _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(965); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(897); +/* harmony import */ var _getDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1018); +/* harmony import */ var _getDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1019); +/* harmony import */ var _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(962); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(894); @@ -163137,16 +158174,16 @@ function getWeekOfMonth(date, dirtyOptions) { } /***/ }), -/* 1043 */ +/* 1040 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getWeeksInMonth; }); -/* harmony import */ var _differenceInCalendarWeeks_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(938); -/* harmony import */ var _lastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1044); -/* harmony import */ var _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(965); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _differenceInCalendarWeeks_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(935); +/* harmony import */ var _lastDayOfMonth_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1041); +/* harmony import */ var _startOfMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(962); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -163189,14 +158226,14 @@ function getWeeksInMonth(date, options) { } /***/ }), -/* 1044 */ +/* 1041 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lastDayOfMonth; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -163232,14 +158269,14 @@ function lastDayOfMonth(dirtyDate) { } /***/ }), -/* 1045 */ +/* 1042 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return getYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -163272,14 +158309,14 @@ function getYear(dirtyDate) { } /***/ }), -/* 1046 */ +/* 1043 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hoursToMilliseconds; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -163307,14 +158344,14 @@ function hoursToMilliseconds(hours) { } /***/ }), -/* 1047 */ +/* 1044 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hoursToMinutes; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -163342,14 +158379,14 @@ function hoursToMinutes(hours) { } /***/ }), -/* 1048 */ +/* 1045 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return hoursToSeconds; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -163377,23 +158414,23 @@ function hoursToSeconds(hours) { } /***/ }), -/* 1049 */ +/* 1046 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return intervalToDuration; }); -/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(925); -/* harmony import */ var _differenceInYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(954); -/* harmony import */ var _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(947); -/* harmony import */ var _differenceInDays_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(940); -/* harmony import */ var _differenceInHours_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(941); -/* harmony import */ var _differenceInMinutes_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(946); -/* harmony import */ var _differenceInSeconds_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(952); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(930); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(897); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(896); -/* harmony import */ var _sub_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(1050); +/* harmony import */ var _compareAsc_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(922); +/* harmony import */ var _differenceInYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(951); +/* harmony import */ var _differenceInMonths_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(944); +/* harmony import */ var _differenceInDays_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(937); +/* harmony import */ var _differenceInHours_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(938); +/* harmony import */ var _differenceInMinutes_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(943); +/* harmony import */ var _differenceInSeconds_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(949); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(927); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(894); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(893); +/* harmony import */ var _sub_index_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(1047); @@ -163478,16 +158515,16 @@ function intervalToDuration(_ref) { } /***/ }), -/* 1050 */ +/* 1047 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sub; }); -/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1051); -/* harmony import */ var _subMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1052); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(895); +/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1048); +/* harmony import */ var _subMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1049); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(892); @@ -163555,15 +158592,15 @@ function sub(date, duration) { } /***/ }), -/* 1051 */ +/* 1048 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subDays; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(891); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -163597,15 +158634,15 @@ function subDays(dirtyDate, dirtyAmount) { } /***/ }), -/* 1052 */ +/* 1049 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subMonths; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(898); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addMonths_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -163639,13 +158676,13 @@ function subMonths(dirtyDate, dirtyAmount) { } /***/ }), -/* 1053 */ +/* 1050 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return intlFormat; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); /** @@ -163738,14 +158775,14 @@ function isFormatOptions(opts) { } /***/ }), -/* 1054 */ +/* 1051 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isAfter; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -163779,14 +158816,14 @@ function isAfter(dirtyDate, dirtyDateToCompare) { } /***/ }), -/* 1055 */ +/* 1052 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isBefore; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -163820,14 +158857,14 @@ function isBefore(dirtyDate, dirtyDateToCompare) { } /***/ }), -/* 1056 */ +/* 1053 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isEqual; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -163864,7 +158901,7 @@ function isEqual(dirtyLeftDate, dirtyRightDate) { } /***/ }), -/* 1057 */ +/* 1054 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -163904,14 +158941,14 @@ function isExists(year, month, day) { } /***/ }), -/* 1058 */ +/* 1055 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isFirstDayOfMonth; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -163942,14 +158979,14 @@ function isFirstDayOfMonth(dirtyDate) { } /***/ }), -/* 1059 */ +/* 1056 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isFriday; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -163980,14 +159017,14 @@ function isFriday(dirtyDate) { } /***/ }), -/* 1060 */ +/* 1057 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isFuture; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -164022,15 +159059,15 @@ function isFuture(dirtyDate) { } /***/ }), -/* 1061 */ +/* 1058 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isMatch; }); -/* harmony import */ var _parse_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1062); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(930); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _parse_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1059); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(927); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -164333,22 +159370,22 @@ function isMatch(dateString, formatString, options) { } /***/ }), -/* 1062 */ +/* 1059 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return parse; }); -/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(982); -/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(992); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); -/* harmony import */ var _lib_assign_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1009); -/* harmony import */ var _lib_format_longFormatters_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1005); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(912); -/* harmony import */ var _lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1006); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(895); -/* harmony import */ var _lib_parsers_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1063); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(897); +/* harmony import */ var _locale_en_US_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(979); +/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(989); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); +/* harmony import */ var _lib_assign_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1006); +/* harmony import */ var _lib_format_longFormatters_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1002); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(909); +/* harmony import */ var _lib_protectedTokens_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1003); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(892); +/* harmony import */ var _lib_parsers_index_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(1060); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(894); @@ -164902,18 +159939,18 @@ function cleanEscapedString(input) { } /***/ }), -/* 1063 */ +/* 1060 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); -/* harmony import */ var _lib_getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1004); -/* harmony import */ var _lib_setUTCDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1064); -/* harmony import */ var _lib_setUTCISODay_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1065); -/* harmony import */ var _lib_setUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1066); -/* harmony import */ var _lib_setUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1067); -/* harmony import */ var _lib_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(998); -/* harmony import */ var _lib_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1002); +/* harmony import */ var _lib_getUTCWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1001); +/* harmony import */ var _lib_setUTCDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1061); +/* harmony import */ var _lib_setUTCISODay_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1062); +/* harmony import */ var _lib_setUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1063); +/* harmony import */ var _lib_setUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(1064); +/* harmony import */ var _lib_startOfUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(995); +/* harmony import */ var _lib_startOfUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(999); @@ -166419,15 +161456,15 @@ var parsers = { /* harmony default export */ __webpack_exports__["default"] = (parsers); /***/ }), -/* 1064 */ +/* 1061 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setUTCDay; }); -/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); // This function will be a part of public API when UTC function will be implemented. @@ -166456,15 +161493,15 @@ function setUTCDay(dirtyDate, dirtyDay, dirtyOptions) { } /***/ }), -/* 1065 */ +/* 1062 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setUTCISODay; }); -/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); // This function will be a part of public API when UTC function will be implemented. @@ -166489,16 +161526,16 @@ function setUTCISODay(dirtyDate, dirtyDay) { } /***/ }), -/* 1066 */ +/* 1063 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setUTCISOWeek; }); -/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _getUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(997); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _getUTCISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(994); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -166515,16 +161552,16 @@ function setUTCISOWeek(dirtyDate, dirtyISOWeek) { } /***/ }), -/* 1067 */ +/* 1064 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setUTCWeek; }); -/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _getUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1001); -/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _getUTCWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(998); +/* harmony import */ var _requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -166541,14 +161578,14 @@ function setUTCWeek(dirtyDate, dirtyWeek, options) { } /***/ }), -/* 1068 */ +/* 1065 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isMonday; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166579,14 +161616,14 @@ function isMonday(date) { } /***/ }), -/* 1069 */ +/* 1066 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isPast; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166621,14 +161658,14 @@ function isPast(dirtyDate) { } /***/ }), -/* 1070 */ +/* 1067 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameHour; }); -/* harmony import */ var _startOfHour_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1071); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _startOfHour_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1068); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166662,14 +161699,14 @@ function isSameHour(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 1071 */ +/* 1068 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfHour; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166703,14 +161740,14 @@ function startOfHour(dirtyDate) { } /***/ }), -/* 1072 */ +/* 1069 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameISOWeek; }); -/* harmony import */ var _isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1073); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1070); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166746,14 +161783,14 @@ function isSameISOWeek(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 1073 */ +/* 1070 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameWeek; }); -/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(908); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _startOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(905); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); @@ -166799,14 +161836,14 @@ function isSameWeek(dirtyDateLeft, dirtyDateRight, dirtyOptions) { } /***/ }), -/* 1074 */ +/* 1071 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameISOWeekYear; }); -/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(910); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _startOfISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(907); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166847,14 +161884,14 @@ function isSameISOWeekYear(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 1075 */ +/* 1072 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameMinute; }); -/* harmony import */ var _startOfMinute_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(958); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _startOfMinute_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(955); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166892,14 +161929,14 @@ function isSameMinute(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 1076 */ +/* 1073 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameMonth; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166933,14 +161970,14 @@ function isSameMonth(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 1077 */ +/* 1074 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameQuarter; }); -/* harmony import */ var _startOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(961); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _startOfQuarter_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(958); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -166974,14 +162011,14 @@ function isSameQuarter(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 1078 */ +/* 1075 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameSecond; }); -/* harmony import */ var _startOfSecond_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1079); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _startOfSecond_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1076); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167019,14 +162056,14 @@ function isSameSecond(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 1079 */ +/* 1076 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfSecond; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167060,14 +162097,14 @@ function startOfSecond(dirtyDate) { } /***/ }), -/* 1080 */ +/* 1077 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isSameYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167101,14 +162138,14 @@ function isSameYear(dirtyDateLeft, dirtyDateRight) { } /***/ }), -/* 1081 */ +/* 1078 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThisHour; }); -/* harmony import */ var _isSameHour_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1070); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameHour_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1067); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167144,14 +162181,14 @@ function isThisHour(dirtyDate) { } /***/ }), -/* 1082 */ +/* 1079 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThisISOWeek; }); -/* harmony import */ var _isSameISOWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1072); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameISOWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1069); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167188,14 +162225,14 @@ function isThisISOWeek(dirtyDate) { } /***/ }), -/* 1083 */ +/* 1080 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThisMinute; }); -/* harmony import */ var _isSameMinute_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1075); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameMinute_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1072); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167231,14 +162268,14 @@ function isThisMinute(dirtyDate) { } /***/ }), -/* 1084 */ +/* 1081 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThisMonth; }); -/* harmony import */ var _isSameMonth_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1076); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameMonth_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1073); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167273,14 +162310,14 @@ function isThisMonth(dirtyDate) { } /***/ }), -/* 1085 */ +/* 1082 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThisQuarter; }); -/* harmony import */ var _isSameQuarter_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1077); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameQuarter_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1074); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167315,14 +162352,14 @@ function isThisQuarter(dirtyDate) { } /***/ }), -/* 1086 */ +/* 1083 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThisSecond; }); -/* harmony import */ var _isSameSecond_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1078); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameSecond_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1075); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167358,14 +162395,14 @@ function isThisSecond(dirtyDate) { } /***/ }), -/* 1087 */ +/* 1084 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThisWeek; }); -/* harmony import */ var _isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1073); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1070); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); @@ -167410,14 +162447,14 @@ function isThisWeek(dirtyDate, options) { } /***/ }), -/* 1088 */ +/* 1085 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThisYear; }); -/* harmony import */ var _isSameYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1080); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1077); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167452,14 +162489,14 @@ function isThisYear(dirtyDate) { } /***/ }), -/* 1089 */ +/* 1086 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isThursday; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167490,14 +162527,14 @@ function isThursday(dirtyDate) { } /***/ }), -/* 1090 */ +/* 1087 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isToday; }); -/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(932); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(929); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167532,15 +162569,15 @@ function isToday(dirtyDate) { } /***/ }), -/* 1091 */ +/* 1088 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isTomorrow; }); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); -/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(932); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(891); +/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(929); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -167576,14 +162613,14 @@ function isTomorrow(dirtyDate) { } /***/ }), -/* 1092 */ +/* 1089 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isTuesday; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167614,14 +162651,14 @@ function isTuesday(dirtyDate) { } /***/ }), -/* 1093 */ +/* 1090 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isWednesday; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167652,14 +162689,14 @@ function isWednesday(dirtyDate) { } /***/ }), -/* 1094 */ +/* 1091 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isWithinInterval; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); @@ -167750,15 +162787,15 @@ function isWithinInterval(dirtyDate, interval) { } /***/ }), -/* 1095 */ +/* 1092 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return isYesterday; }); -/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(932); -/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1051); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _isSameDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(929); +/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1048); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -167794,14 +162831,14 @@ function isYesterday(dirtyDate) { } /***/ }), -/* 1096 */ +/* 1093 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lastDayOfDecade; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167837,14 +162874,14 @@ function lastDayOfDecade(dirtyDate) { } /***/ }), -/* 1097 */ +/* 1094 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lastDayOfISOWeek; }); -/* harmony import */ var _lastDayOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1098); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _lastDayOfWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1095); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -167880,15 +162917,15 @@ function lastDayOfISOWeek(dirtyDate) { } /***/ }), -/* 1098 */ +/* 1095 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lastDayOfWeek; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -167945,15 +162982,15 @@ function lastDayOfWeek(dirtyDate, dirtyOptions) { } /***/ }), -/* 1099 */ +/* 1096 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lastDayOfISOWeekYear; }); -/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(906); -/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(907); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _getISOWeekYear_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(903); +/* harmony import */ var _startOfISOWeek_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(904); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -168000,14 +163037,14 @@ function lastDayOfISOWeekYear(dirtyDate) { } /***/ }), -/* 1100 */ +/* 1097 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lastDayOfQuarter; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -168047,14 +163084,14 @@ function lastDayOfQuarter(dirtyDate) { } /***/ }), -/* 1101 */ +/* 1098 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lastDayOfYear; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -168090,18 +163127,18 @@ function lastDayOfYear(dirtyDate) { } /***/ }), -/* 1102 */ +/* 1099 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return lightFormat; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_format_lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(994); -/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(912); -/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(930); -/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(992); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_format_lightFormatters_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(991); +/* harmony import */ var _lib_getTimezoneOffsetInMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(909); +/* harmony import */ var _isValid_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(927); +/* harmony import */ var _subMilliseconds_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(989); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(894); @@ -168231,13 +163268,13 @@ function cleanEscapedString(input) { } /***/ }), -/* 1103 */ +/* 1100 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return milliseconds; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); // Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400. // 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days @@ -168294,14 +163331,14 @@ function milliseconds(_ref) { } /***/ }), -/* 1104 */ +/* 1101 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return millisecondsToHours; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -168335,14 +163372,14 @@ function millisecondsToHours(milliseconds) { } /***/ }), -/* 1105 */ +/* 1102 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return millisecondsToMinutes; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -168376,14 +163413,14 @@ function millisecondsToMinutes(milliseconds) { } /***/ }), -/* 1106 */ +/* 1103 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return millisecondsToSeconds; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -168417,14 +163454,14 @@ function millisecondsToSeconds(milliseconds) { } /***/ }), -/* 1107 */ +/* 1104 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return minutesToHours; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -168458,14 +163495,14 @@ function minutesToHours(minutes) { } /***/ }), -/* 1108 */ +/* 1105 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return minutesToMilliseconds; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -168493,14 +163530,14 @@ function minutesToMilliseconds(minutes) { } /***/ }), -/* 1109 */ +/* 1106 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return minutesToSeconds; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -168528,14 +163565,14 @@ function minutesToSeconds(minutes) { } /***/ }), -/* 1110 */ +/* 1107 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return monthsToQuarters; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -168569,14 +163606,14 @@ function monthsToQuarters(months) { } /***/ }), -/* 1111 */ +/* 1108 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return monthsToYears; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -168609,15 +163646,15 @@ function monthsToYears(months) { } /***/ }), -/* 1112 */ +/* 1109 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nextDay; }); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); -/* harmony import */ var _getDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1022); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(891); +/* harmony import */ var _getDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1019); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -168653,15 +163690,15 @@ function nextDay(date, day) { } /***/ }), -/* 1113 */ +/* 1110 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nextFriday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1112); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1109); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); @@ -168689,15 +163726,15 @@ function nextFriday(date) { } /***/ }), -/* 1114 */ +/* 1111 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nextMonday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1112); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1109); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); @@ -168725,15 +163762,15 @@ function nextMonday(date) { } /***/ }), -/* 1115 */ +/* 1112 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nextSaturday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1112); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1109); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); @@ -168761,15 +163798,15 @@ function nextSaturday(date) { } /***/ }), -/* 1116 */ +/* 1113 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nextSunday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1112); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1109); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); @@ -168797,15 +163834,15 @@ function nextSunday(date) { } /***/ }), -/* 1117 */ +/* 1114 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nextThursday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1112); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1109); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); @@ -168833,15 +163870,15 @@ function nextThursday(date) { } /***/ }), -/* 1118 */ +/* 1115 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nextTuesday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1112); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1109); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); @@ -168869,15 +163906,15 @@ function nextTuesday(date) { } /***/ }), -/* 1119 */ +/* 1116 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nextWednesday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1112); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _nextDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1109); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); @@ -168905,14 +163942,14 @@ function nextWednesday(date) { } /***/ }), -/* 1120 */ +/* 1117 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return parseISO; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); var MILLISECONDS_IN_HOUR = 3600000; @@ -169206,14 +164243,14 @@ function validateTimezone(_hours, minutes) { } /***/ }), -/* 1121 */ +/* 1118 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return parseJSON; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -169269,15 +164306,15 @@ function parseJSON(argument) { } /***/ }), -/* 1122 */ +/* 1119 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return previousDay; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _getDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1022); -/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1051); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _getDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1019); +/* harmony import */ var _subDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1048); @@ -169313,14 +164350,14 @@ function previousDay(date, day) { } /***/ }), -/* 1123 */ +/* 1120 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return previousFriday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1122); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1119); /** @@ -169347,14 +164384,14 @@ function previousFriday(date) { } /***/ }), -/* 1124 */ +/* 1121 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return previousMonday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1122); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1119); /** @@ -169381,14 +164418,14 @@ function previousMonday(date) { } /***/ }), -/* 1125 */ +/* 1122 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return previousSaturday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1122); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1119); /** @@ -169415,14 +164452,14 @@ function previousSaturday(date) { } /***/ }), -/* 1126 */ +/* 1123 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return previousSunday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1122); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1119); /** @@ -169449,14 +164486,14 @@ function previousSunday(date) { } /***/ }), -/* 1127 */ +/* 1124 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return previousThursday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1122); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1119); /** @@ -169483,14 +164520,14 @@ function previousThursday(date) { } /***/ }), -/* 1128 */ +/* 1125 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return previousTuesday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1122); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1119); /** @@ -169517,14 +164554,14 @@ function previousTuesday(date) { } /***/ }), -/* 1129 */ +/* 1126 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return previousWednesday; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1122); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _previousDay_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1119); /** @@ -169551,14 +164588,14 @@ function previousWednesday(date) { } /***/ }), -/* 1130 */ +/* 1127 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quartersToMonths; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -169586,14 +164623,14 @@ function quartersToMonths(quarters) { } /***/ }), -/* 1131 */ +/* 1128 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quartersToYears; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -169627,14 +164664,14 @@ function quartersToYears(quarters) { } /***/ }), -/* 1132 */ +/* 1129 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return roundToNearestMinutes; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(895); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(892); /** @@ -169691,14 +164728,14 @@ function roundToNearestMinutes(dirtyDate, options) { } /***/ }), -/* 1133 */ +/* 1130 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return secondsToHours; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -169732,14 +164769,14 @@ function secondsToHours(seconds) { } /***/ }), -/* 1134 */ +/* 1131 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return secondsToMilliseconds; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -169767,14 +164804,14 @@ function secondsToMilliseconds(seconds) { } /***/ }), -/* 1135 */ +/* 1132 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return secondsToMinutes; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -169808,16 +164845,16 @@ function secondsToMinutes(seconds) { } /***/ }), -/* 1136 */ +/* 1133 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return set; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _setMonth_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1137); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _setMonth_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1134); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -169906,16 +164943,16 @@ function set(dirtyDate, values) { } /***/ }), -/* 1137 */ +/* 1134 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setMonth; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _getDaysInMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1024); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _getDaysInMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1021); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -169960,15 +164997,15 @@ function setMonth(dirtyDate, dirtyMonth) { } /***/ }), -/* 1138 */ +/* 1135 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setDate; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170004,16 +165041,16 @@ function setDate(dirtyDate, dirtyDayOfMonth) { } /***/ }), -/* 1139 */ +/* 1136 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setDay; }); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(891); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -170073,15 +165110,15 @@ function setDay(dirtyDate, dirtyDay, dirtyOptions) { } /***/ }), -/* 1140 */ +/* 1137 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setDayOfYear; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170118,15 +165155,15 @@ function setDayOfYear(dirtyDate, dirtyDayOfYear) { } /***/ }), -/* 1141 */ +/* 1138 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setHours; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170162,17 +165199,17 @@ function setHours(dirtyDate, dirtyHours) { } /***/ }), -/* 1142 */ +/* 1139 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setISODay; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); -/* harmony import */ var _getISODay_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1029); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _addDays_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(891); +/* harmony import */ var _getISODay_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1026); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(894); @@ -170213,16 +165250,16 @@ function setISODay(dirtyDate, dirtyDay) { } /***/ }), -/* 1143 */ +/* 1140 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setISOWeek; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _getISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1030); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _getISOWeek_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1027); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -170262,15 +165299,15 @@ function setISOWeek(dirtyDate, dirtyISOWeek) { } /***/ }), -/* 1144 */ +/* 1141 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setMilliseconds; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170306,15 +165343,15 @@ function setMilliseconds(dirtyDate, dirtyMilliseconds) { } /***/ }), -/* 1145 */ +/* 1142 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setMinutes; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170350,16 +165387,16 @@ function setMinutes(dirtyDate, dirtyMinutes) { } /***/ }), -/* 1146 */ +/* 1143 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setQuarter; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _setMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1137); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _setMonth_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(1134); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -170397,15 +165434,15 @@ function setQuarter(dirtyDate, dirtyQuarter) { } /***/ }), -/* 1147 */ +/* 1144 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setSeconds; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170441,16 +165478,16 @@ function setSeconds(dirtyDate, dirtySeconds) { } /***/ }), -/* 1148 */ +/* 1145 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setWeek; }); -/* harmony import */ var _getWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1039); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(897); +/* harmony import */ var _getWeek_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1036); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(894); @@ -170510,17 +165547,17 @@ function setWeek(dirtyDate, dirtyWeek, options) { } /***/ }), -/* 1149 */ +/* 1146 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setWeekYear; }); -/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(911); -/* harmony import */ var _startOfWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1040); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(896); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(895); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(897); +/* harmony import */ var _differenceInCalendarDays_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(908); +/* harmony import */ var _startOfWeekYear_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1037); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(893); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(892); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(894); @@ -170591,15 +165628,15 @@ function setWeekYear(dirtyDate, dirtyWeekYear) { } /***/ }), -/* 1150 */ +/* 1147 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return setYear; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170640,14 +165677,14 @@ function setYear(dirtyDate, dirtyYear) { } /***/ }), -/* 1151 */ +/* 1148 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfDecade; }); -/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(896); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(897); +/* harmony import */ var _toDate_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(893); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(894); /** @@ -170683,13 +165720,13 @@ function startOfDecade(dirtyDate) { } /***/ }), -/* 1152 */ +/* 1149 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return startOfToday; }); -/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(913); +/* harmony import */ var _startOfDay_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(910); /** * @name startOfToday @@ -170720,7 +165757,7 @@ function startOfToday() { } /***/ }), -/* 1153 */ +/* 1150 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -170761,7 +165798,7 @@ function startOfTomorrow() { } /***/ }), -/* 1154 */ +/* 1151 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -170802,15 +165839,15 @@ function startOfYesterday() { } /***/ }), -/* 1155 */ +/* 1152 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subBusinessDays; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(899); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addBusinessDays_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(896); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170840,15 +165877,15 @@ function subBusinessDays(dirtyDate, dirtyAmount) { } /***/ }), -/* 1156 */ +/* 1153 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subHours; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addHours_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(903); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addHours_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(900); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170882,15 +165919,15 @@ function subHours(dirtyDate, dirtyAmount) { } /***/ }), -/* 1157 */ +/* 1154 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subMinutes; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addMinutes_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(914); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addMinutes_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(911); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170924,15 +165961,15 @@ function subMinutes(dirtyDate, dirtyAmount) { } /***/ }), -/* 1158 */ +/* 1155 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subQuarters; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addQuarters_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(915); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addQuarters_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(912); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -170966,15 +166003,15 @@ function subQuarters(dirtyDate, dirtyAmount) { } /***/ }), -/* 1159 */ +/* 1156 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subSeconds; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addSeconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(916); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addSeconds_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(913); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -171008,15 +166045,15 @@ function subSeconds(dirtyDate, dirtyAmount) { } /***/ }), -/* 1160 */ +/* 1157 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subWeeks; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(917); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addWeeks_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(914); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -171050,15 +166087,15 @@ function subWeeks(dirtyDate, dirtyAmount) { } /***/ }), -/* 1161 */ +/* 1158 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subYears; }); -/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(895); -/* harmony import */ var _addYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(918); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(897); +/* harmony import */ var _lib_toInteger_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(892); +/* harmony import */ var _addYears_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(915); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(894); @@ -171092,14 +166129,14 @@ function subYears(dirtyDate, dirtyAmount) { } /***/ }), -/* 1162 */ +/* 1159 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return weeksToDays; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -171127,14 +166164,14 @@ function weeksToDays(weeks) { } /***/ }), -/* 1163 */ +/* 1160 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return yearsToMonths; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -171162,14 +166199,14 @@ function yearsToMonths(years) { } /***/ }), -/* 1164 */ +/* 1161 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return yearsToQuarters; }); -/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(897); -/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(928); +/* harmony import */ var _lib_requiredArgs_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(894); +/* harmony import */ var _constants_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(925); /** @@ -171197,7 +166234,7 @@ function yearsToQuarters(years) { } /***/ }), -/* 1165 */ +/* 1162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171207,15 +166244,15 @@ function yearsToQuarters(years) { */ const { tokenizer -} = __webpack_require__(1166); +} = __webpack_require__(1163); const { createModel: createGlobalModel -} = __webpack_require__(1167); +} = __webpack_require__(1164); const { createModel: createLocalModel -} = __webpack_require__(1176); +} = __webpack_require__(1173); const logger = __webpack_require__(2); @@ -171312,7 +166349,7 @@ module.exports = { }; /***/ }), -/* 1166 */ +/* 1163 */ /***/ (function(module, exports) { const DATE_TAG = ' tag_date '; @@ -171451,34 +166488,34 @@ module.exports = { }; /***/ }), -/* 1167 */ +/* 1164 */ /***/ (function(module, exports, __webpack_require__) { const { createModel -} = __webpack_require__(1168); +} = __webpack_require__(1165); module.exports = { createModel }; /***/ }), -/* 1168 */ +/* 1165 */ /***/ (function(module, exports, __webpack_require__) { const { fetchParameters -} = __webpack_require__(1169); +} = __webpack_require__(1166); const { createClassifier -} = __webpack_require__(1170); +} = __webpack_require__(1167); const { getLabelWithTags -} = __webpack_require__(1166); +} = __webpack_require__(1163); -const maxBy = __webpack_require__(1173); +const maxBy = __webpack_require__(1170); const logger = __webpack_require__(2); @@ -171519,7 +166556,7 @@ module.exports = { }; /***/ }), -/* 1169 */ +/* 1166 */ /***/ (function(module, exports, __webpack_require__) { const cozyClient = __webpack_require__(485); @@ -171534,10 +166571,10 @@ module.exports = { }; /***/ }), -/* 1170 */ +/* 1167 */ /***/ (function(module, exports, __webpack_require__) { -const bayes = __webpack_require__(1171); +const bayes = __webpack_require__(1168); function createClassifier(parameters, options) { parameters.options = { ...parameters.options, @@ -171552,10 +166589,10 @@ module.exports = { }; /***/ }), -/* 1171 */ +/* 1168 */ /***/ (function(module, exports, __webpack_require__) { -const Decimal = __webpack_require__(1172).default; // handles arbitrary-precision arithmetics. +const Decimal = __webpack_require__(1169).default; // handles arbitrary-precision arithmetics. /* Expose our naive-bayes generator function @@ -171962,7 +166999,7 @@ Naivebayes.prototype.toJson = function() { /***/ }), -/* 1172 */ +/* 1169 */ /***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { "use strict"; @@ -176812,20156 +171849,22378 @@ PI = new Decimal(PI); /***/ }), -/* 1173 */ +/* 1170 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseExtremum = __webpack_require__(1171), + baseGt = __webpack_require__(1172), + baseIteratee = __webpack_require__(413); + +/** + * This method is like `_.max` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the criterion by which + * the value is ranked. The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {*} Returns the maximum value. + * @example + * + * var objects = [{ 'n': 1 }, { 'n': 2 }]; + * + * _.maxBy(objects, function(o) { return o.n; }); + * // => { 'n': 2 } + * + * // The `_.property` iteratee shorthand. + * _.maxBy(objects, 'n'); + * // => { 'n': 2 } + */ +function maxBy(array, iteratee) { + return (array && array.length) + ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt) + : undefined; +} + +module.exports = maxBy; + + +/***/ }), +/* 1171 */ +/***/ (function(module, exports, __webpack_require__) { + +var isSymbol = __webpack_require__(374); + +/** + * The base implementation of methods like `_.max` and `_.min` which accepts a + * `comparator` to determine the extremum value. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The iteratee invoked per iteration. + * @param {Function} comparator The comparator used to compare values. + * @returns {*} Returns the extremum value. + */ +function baseExtremum(array, iteratee, comparator) { + var index = -1, + length = array.length; + + while (++index < length) { + var value = array[index], + current = iteratee(value); + + if (current != null && (computed === undefined + ? (current === current && !isSymbol(current)) + : comparator(current, computed) + )) { + var computed = current, + result = value; + } + } + return result; +} + +module.exports = baseExtremum; + + +/***/ }), +/* 1172 */ +/***/ (function(module, exports) { + +/** + * The base implementation of `_.gt` which doesn't coerce arguments. + * + * @private + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if `value` is greater than `other`, + * else `false`. + */ +function baseGt(value, other) { + return value > other; +} + +module.exports = baseGt; + + +/***/ }), +/* 1173 */ +/***/ (function(module, exports, __webpack_require__) { + +const { + createModel +} = __webpack_require__(1174); + +module.exports = { + createModel +}; + +/***/ }), +/* 1174 */ +/***/ (function(module, exports, __webpack_require__) { + +const { + createClassifier +} = __webpack_require__(1175); + +const { + getLabelWithTags, + tokenizer +} = __webpack_require__(1163); + +const { + pctOfTokensInVoc +} = __webpack_require__(1220); + +const maxBy = __webpack_require__(1170); + +const logger = __webpack_require__(2); + +const { + LOCAL_MODEL_CATEG_FALLBACK, + LOCAL_MODEL_PROBA_FALLBACK, + LOCAL_MODEL_PCT_TOKENS_IN_VOC_THRESHOLD +} = __webpack_require__(1221); + +const log = logger.namespace('categorization/localModel/model'); + +async function createModel(options) { + log('debug', 'Create a new classifier'); + const classifier = await createClassifier(options); + const vocabulary = Object.keys(classifier.vocabulary); + + const categorize = transactions => { + for (const transaction of transactions) { + const label = getLabelWithTags(transaction); + const tokens = tokenizer(transaction.label); + const pctOfThisTokensInVoc = pctOfTokensInVoc(tokens, vocabulary); + let category; + let proba; // First : check if tokens from the transaction's label are in the model + + if (pctOfThisTokensInVoc > LOCAL_MODEL_PCT_TOKENS_IN_VOC_THRESHOLD) { + // If OK : continue + log('debug', `Applying model to ${label}`); + ({ + category, + proba + } = maxBy(classifier.categorize(label).likelihoods, 'proba')); + transaction.localCategoryId = category; + transaction.localCategoryProba = proba; + } else { + // If KO : abort with category '0' and proba 1/nbUniqueCat + log('debug', `Giving up for ${label}`); + category = LOCAL_MODEL_CATEG_FALLBACK; + proba = LOCAL_MODEL_PROBA_FALLBACK; + transaction.localCategoryId = category; + transaction.localCategoryProba = proba; + } + + log('debug', `Results for ${label} :`); + log('debug', `localCategory: ${category}`); + log('debug', `localProba: ${proba}`); + } + }; + + return { + categorize + }; +} + +module.exports = { + createModel +}; + +/***/ }), +/* 1175 */ +/***/ (function(module, exports, __webpack_require__) { + +const { + fetchTransactionsWithManualCat +} = __webpack_require__(1176); + +const { + getUniqueCategories, + getAlphaParameter +} = __webpack_require__(1220); + +const bayes = __webpack_require__(1168); + +const { + getLabelWithTags +} = __webpack_require__(1163); + +const logger = __webpack_require__(2); + +const log = logger.namespace('categorization/localModel/classifier'); +const ALPHA_MIN = 2; +const ALPHA_MAX = 4; +const ALPHA_MAX_SMOOTHING = 12; +const FAKE_TRANSACTION = { + label: 'thisisafaketransaction', + manualCategoryId: '0' +}; +const TOKENS_TO_REWEIGHT = ['tag_neg', 'tag_v_b_expense', 'tag_neg tag_v_b_expense', 'tag_b_expense', 'tag_neg tag_b_expense', 'tag_expense', 'tag_neg tag_expense', 'tag_noise_neg', 'tag_neg tag_noise_neg', 'tag_pos', 'tag_noise_pos', 'tag_pos tag_noise_pos', 'tag_income', 'tag_pos tag_income', 'tag_b_income', 'tag_pos tag_b_income', 'tag_activity_income', 'tag_pos tag_activity_income']; + +const getClassifierOptions = transactionsWithManualCat => { + const uniqueCategories = getUniqueCategories(transactionsWithManualCat); + const nbUniqueCategories = uniqueCategories.length; + log('debug', 'Number of unique categories in transactions with manual categories: ' + nbUniqueCategories); + const alpha = getAlphaParameter(nbUniqueCategories, ALPHA_MIN, ALPHA_MAX, ALPHA_MAX_SMOOTHING); + log('debug', 'Alpha parameter value is ' + alpha); + let addFakeTransaction = false; + + if (nbUniqueCategories === 1) { + log('debug', 'Not enough different categories, adding a fake transaction to balance the weight of the categories'); + addFakeTransaction = true; + } + + return { + initialization: { + alpha, + fitPrior: false + }, + configuration: { + addFakeTransaction + } + }; +}; +/** + * Create a ready to use classifier for the local categorization model + * + * @param {Array} transactionsToLearn - Transactions to learn from + * @param {object} initializationOptions - Options to pass to the classifier initialization + * @param {object} configurationOptions - Options used to configure the classifier + */ + + +const createLocalClassifier = (transactionsToLearn, initializationOptions, configurationOptions) => { + if (transactionsToLearn.length === 0) { + throw new Error('Impossible to instanciate a classifier since there is no manually categorized transactions to learn from'); + } + + const classifier = bayes(initializationOptions); + log('debug', 'Learning from manually categorized transactions'); + + for (const transaction of transactionsToLearn) { + classifier.learn(getLabelWithTags(transaction), transaction.manualCategoryId); + } + + if (configurationOptions.addFakeTransaction) { + classifier.learn(FAKE_TRANSACTION.label, FAKE_TRANSACTION.manualCategoryId); + } + + return classifier; +}; +/** + * Reweights a word in the Naive Bayes parameter in order to mimic the + * behavior of a sublinear TF-IDF vectorizer applied to this word. + * The transformation applied is inspired by the scikit-learn object + * `sklearn.feature_extraction.text.TfidfVectorizer` with `sublinear_tf`. + * The `log(frequencyCount)` smooths the probabilities of a word across the + * possible categories to avoid the probability of the most targeted category + * to explode. + * + * @param {*} classifier - classifier to reweight + * @param {*} category - category in which to reweight a word + * @param {*} word - word to reweight + * @param {*} frequencyCount - observed frequency count of this word in the given category + */ + + +const reweightWord = (classifier, category, word, frequencyCount) => { + const newFrequencyCount = 1 + Math.log(frequencyCount); + const deltaFrequencyCount = frequencyCount - newFrequencyCount; // update the right entries of the classifier's parameters + + classifier.vocabulary[word] -= deltaFrequencyCount; + classifier.wordCount[category] -= deltaFrequencyCount; + classifier.wordFrequencyCount[category][word] = newFrequencyCount; +}; + +const reweightModel = classifier => { + // loop over categories in the wordFrequencyCat attribute + const wordFrequencyCount = classifier.wordFrequencyCount; // for each category + + for (const category of Object.keys(wordFrequencyCount)) { + // extract its word-frequency count `wfc` + const categoryWordsFrequencyCounts = wordFrequencyCount[category]; // and search for tokens to reweight in it + + TOKENS_TO_REWEIGHT.map(wordToReweight => { + if (categoryWordsFrequencyCounts.hasOwnProperty(wordToReweight)) { + // for every tokens to reweight : re-compute frequency count `fc` + const frequencyCount = categoryWordsFrequencyCounts[wordToReweight]; + + if (frequencyCount !== 1) { + reweightWord(classifier, category, wordToReweight, frequencyCount); + } + } + }); + } +}; + +const createClassifier = async options => { + log('debug', 'Fetching manually categorized transactions'); + const transactionsWithManualCat = await fetchTransactionsWithManualCat(); + log('debug', `Fetched ${transactionsWithManualCat.length} manually categorized transactions`); + log('debug', 'Instanciating a new classifier'); + const classifierOptions = getClassifierOptions(transactionsWithManualCat); + const classifier = createLocalClassifier(transactionsWithManualCat, { ...options, + ...classifierOptions.initialization + }, classifierOptions.configuration); + log('debug', 'Reweighting model to lower the impact of amount in the prediction'); + reweightModel(classifier); + log('debug', 'Reweighting model to lower the impact of amount in the prediction'); + reweightModel(classifier); + return classifier; +}; + +module.exports = { + createClassifier +}; + +/***/ }), +/* 1176 */ +/***/ (function(module, exports, __webpack_require__) { + +const { + BankTransaction +} = __webpack_require__(1177); + +async function fetchTransactionsWithManualCat() { + const transactionsWithManualCat = await BankTransaction.queryAll({ + manualCategoryId: { + $exists: true + } + }); + return transactionsWithManualCat; +} + +module.exports = { + fetchTransactionsWithManualCat +}; + +/***/ }), +/* 1177 */ +/***/ (function(module, exports, __webpack_require__) { + +const Account = __webpack_require__(1178) +const AdministrativeProcedure = __webpack_require__(1186) +const Application = __webpack_require__(1196) +const Document = __webpack_require__(1179) +const BalanceHistory = __webpack_require__(1197) +const BankAccount = __webpack_require__(1198) +const BankingReconciliator = __webpack_require__(1203) +const BankTransaction = __webpack_require__(1204) +const BankAccountStats = __webpack_require__(1211) +const Contact = __webpack_require__(1187) +const CozyFile = __webpack_require__(1214) +const CozyFolder = __webpack_require__(1217) +const Group = __webpack_require__(1218) +const Permission = __webpack_require__(1219) + +module.exports = { + Account, + AdministrativeProcedure, + Application, + Document, + BalanceHistory, + BankAccount, + BankingReconciliator, + BankTransaction, + BankAccountStats, + Contact, + CozyFile, + CozyFolder, + Group, + registerClient: Document.registerClient, + Permission +} + + +/***/ }), +/* 1178 */ +/***/ (function(module, exports, __webpack_require__) { + +const Document = __webpack_require__(1179) +const pickBy = __webpack_require__(655) +const get = __webpack_require__(370) + +const ACCOUNTS_DOCTYPE = 'io.cozy.accounts' + +// Order matters +const probableLoginFieldNames = [ + 'login', + 'identifier', + 'new_identifier', + 'email' +] + +class Account extends Document { + static getAccountName(account) { + if (!account) return null + if (account.auth) { + return ( + account.auth.accountName || this.getAccountLogin(account) || account._id + ) + } else { + return account._id + } + } + + static getAccountLogin(account) { + if (account && account.auth) { + for (const fieldName of probableLoginFieldNames) { + if (account.auth[fieldName]) return account.auth[fieldName] + } + } + } + + /** + * Create an account document from a vault cipher + * + * @param {Object} cipher + * @param {Object} [options={}] + * @param {string} [options.identifierProperty=login] - The name of the identifier property to use for this account + * + * @returns {Object} + */ + static fromCipher(cipher, options = {}) { + const opts = { + identifierProperty: 'login', + ...options + } + + const customFields = (get(cipher, 'fields') || []).reduce( + (fields, field) => { + fields[field.name] = field.value + + return fields + }, + {} + ) + + const account = { + auth: pickBy( + { + [opts.identifierProperty]: get(cipher, 'login.username', ''), + password: get(cipher, 'login.password', ''), + ...customFields + }, + value => Boolean(value) + ) + } + + if (cipher) { + account.relationships = { + vaultCipher: { + _id: cipher.id, + _type: 'com.bitwarden.ciphers', + _protocol: 'bitwarden' + } + } + } + + return account + } +} + +Account.schema = { + doctype: ACCOUNTS_DOCTYPE, + attributes: {}, + relationships: { + master: { + type: 'has-one', + doctype: ACCOUNTS_DOCTYPE + } + } +} + +Account.probableLoginFieldNames = probableLoginFieldNames + +module.exports = Account + + +/***/ }), +/* 1179 */ +/***/ (function(module, exports, __webpack_require__) { + +const omit = __webpack_require__(631) +const pick = __webpack_require__(671) +const size = __webpack_require__(783) +const omitBy = __webpack_require__(1180) +const isUndefined = __webpack_require__(76) +const fromPairs = __webpack_require__(557) +const pickBy = __webpack_require__(655) +const flatMap = __webpack_require__(1182) +const groupBy = __webpack_require__(729) +const sortBy = __webpack_require__(826) +const get = __webpack_require__(370) +const { parallelMap } = __webpack_require__(1184) +const CozyClient = __webpack_require__(531).default +const log = __webpack_require__(2).namespace('Document') +const querystring = __webpack_require__(104) + +const DATABASE_DOES_NOT_EXIST = 'Database does not exist.' + +/** + * Tell of two object attributes have any difference + */ +function isDifferent(o1, o2) { + // This is not supposed to happen + if (Object.keys(o1).length === 0) return true + + for (let key in o1) { + if (o1[key] !== o2[key]) { + return true + } + } + return false +} + +const indexes = {} + +// Attributes that will not be updated since the +// user can change them +const userAttributes = ['shortLabel'] + +function sanitizeKey(key) { + if (key.startsWith('\\')) { + return key.slice(1) + } + + return key +} + +function updateCreatedByApp(cozyMetadata, appSlug) { + if (!cozyMetadata.updatedByApps) { + cozyMetadata.updatedByApps = [] + } + const now = new Date() + for (const appInfo of cozyMetadata.updatedByApps) { + if (appInfo.slug === appSlug) { + appInfo.date = now + return + } + } + cozyMetadata.updatedByApps.push({ slug: appSlug, date: now }) +} + +const withoutUndefined = x => omitBy(x, isUndefined) + +const flagForDeletion = x => Object.assign({}, x, { _deleted: true }) + +const getDocumentUpdateDate = doc => { + const d = doc.cozyMetadata && doc.cozyMetadata.updatedAt + return d ? new Date(d) : null +} + +const newestDocumentComparisonFunc = doc => { + const d = getDocumentUpdateDate(doc) + return d ? -d : 0 +} + +class Document { + /** + * Registers a client + * + * @param {Client} client - Cozy client from either cozy-client or cozy-client-js + */ + static registerClient(client) { + if (!this.cozyClient) { + this.cozyClient = client + } else { + // eslint-disable-next-line no-console + console.warn( + 'Document already has been registered, this is not possible to re-register as the client is shared globally between all classes. This is to prevent concurrency bugs.' + ) + throw new Error('Document cannot be re-registered to a client.') + } + } + + /** + * @static copyWithClient - Returns a new class bound to a client + * + * @param {type} client Client instance + * @returns {type} A new class, with the client registered + */ + static copyWithClient(client) { + const BaseClass = this + class ExtendedClass extends BaseClass {} + ExtendedClass.cozyClient = null + ExtendedClass.registerClient(client) + return ExtendedClass + } + + /** + * Returns true if Document uses a CozyClient (from cozy-client package) + * + * @returns {boolean} true if Document uses a CozyClient + **/ + static usesCozyClient() { + return this.cozyClient instanceof CozyClient + } + + static getIndex(doctype, fields) { + if (this.usesCozyClient()) { + throw new Error('This method is not implemented yet with CozyClient') + } + + return this.getIndexViaOldClient(doctype, fields) + } + + static getIndexViaOldClient(doctype, fields) { + const key = `${doctype}:${fields.slice().join(',')}` + const index = indexes[key] + if (!index) { + indexes[key] = this.cozyClient.data + .defineIndex(doctype, fields) + .then(index => { + indexes[key] = index + return index + }) + } + return Promise.resolve(indexes[key]) + } + + static addCozyMetadata(attributes) { + if (!attributes.cozyMetadata) { + attributes.cozyMetadata = {} + } + + attributes.cozyMetadata.updatedAt = new Date() + + if (!attributes.cozyMetadata.createdByApp && this.createdByApp) { + attributes.cozyMetadata.createdByApp = this.createdByApp + } + + if (this.createdByApp) { + updateCreatedByApp(attributes.cozyMetadata, this.createdByApp) + } + + return attributes + } + + /** + * Returns the item that has this id + * + * @param {string} id - The id of an item in the collection + * @returns {object} - The collection's item that has this id + * + */ + static async get(id) { + if (!this.usesCozyClient()) { + throw new Error('This method is not implemented with cozy-client-js') + } + + if (!this.doctype) { + throw new Error('doctype is not defined') + } + + const resp = await this.cozyClient.collection(this.doctype).get(id) + return resp.data + } + + /** + * Creates or updates a document. + * + * Before creating/updating, we try to find an existing document by + * building a selector with the idAttributes. + * + * - If not document is found, document is created + * - If a document is found, it is updated + * - If duplicates are found, it depends on options.handleDuplicates + * + * @param {String|Function} options.handleDuplicates - How duplicates are handled, see Document.duplicateHandlingStrategies + */ + static async createOrUpdate(attributes, options = {}) { + if (this.usesCozyClient()) { + return this.createOrUpdateViaNewClient(attributes, options) + } + + return this.createOrUpdateViaOldClient(attributes, options) + } + + /** + * Update a document with `update` attributes. If the + * `update` does not concern "important" attributes, the original + * document is returned. Otherwise, the update document is + * returned with metadata updated. + * + * @private + */ + static applyUpdateIfDifferent(doc, update) { + // only update if some fields are different + if ( + !this.checkAttributes || + isDifferent( + pick(doc, this.checkAttributes), + pick(update, this.checkAttributes) + ) + ) { + // do not emit a mail for those attribute updates + delete update.dateImport + + const updatedDoc = this.addCozyMetadata({ + ...doc, + ...update + }) + + return updatedDoc + } else { + log( + 'debug', + `[updateIfDifferent] No need to update ${update._id} because its \`checkedAttributes\` (${this.checkAttributes}) didn't change.` + ) + return doc + } + } + + static getHandleDuplicateStrategy(name) { + if (Document.duplicateHandlingStrategies[name]) { + return Document.duplicateHandlingStrategies[name] + } else { + throw new Error( + `${name} is not a know duplication handling strategy. Known strategies are ${Object.keys( + Document.duplicateHandlingStrategies + )}` + ) + } + } + + static async handleDuplicates(strategyNameOrFnArg, duplicates, selector) { + const strategyNameOrFn = + strategyNameOrFnArg || this.defaultDuplicateHandling + const strategyFn = + typeof strategyNameOrFn === 'string' + ? this.getHandleDuplicateStrategy(strategyNameOrFn) + : strategyNameOrFn + + return await strategyFn.call(this, duplicates, selector) + } + + static async createOrUpdateViaNewClient(attributes, options) { + const selector = fromPairs( + this.idAttributes.map(idAttribute => [ + idAttribute, + get(attributes, sanitizeKey(idAttribute)) + ]) + ) + let results = [] + const compactedSelector = withoutUndefined(selector) + if (size(compactedSelector) === this.idAttributes.length) { + results = await this.queryAll(selector) + } + + if (results.length === 0) { + return this.create(this.addCozyMetadata(attributes)) + } else { + results = sortBy(results, newestDocumentComparisonFunc) + if (results.length > 1) { + await this.handleDuplicates(options.handleDuplicates, results, selector) + } + const doc = results[0] + const update = omit(attributes, userAttributes) + const updatedDoc = this.applyUpdateIfDifferent(doc, update) + if (updatedDoc !== doc) { + return this.cozyClient.save(updatedDoc) + } else { + return updatedDoc + } + } + } + + static async createOrUpdateViaOldClient(attributes, options) { + const selector = fromPairs( + this.idAttributes.map(idAttribute => [ + idAttribute, + get(attributes, sanitizeKey(idAttribute)) + ]) + ) + let results = [] + const compactedSelector = withoutUndefined(selector) + if (size(compactedSelector) === this.idAttributes.length) { + const index = await this.getIndex(this.doctype, this.idAttributes) + results = await this.cozyClient.data.query(index, { selector }) + } + + if (results.length === 0) { + return this.cozyClient.data.create( + this.doctype, + this.addCozyMetadata(attributes) + ) + } else { + results = sortBy(results, newestDocumentComparisonFunc) + if (results.length > 1) { + await this.handleDuplicates(options.handleDuplicates, results, selector) + } + + const doc = results[0] + const update = omit(attributes, userAttributes) + const updatedDoc = this.applyUpdateIfDifferent(doc, update) + if (updatedDoc !== doc) { + return this.cozyClient.data.updateAttributes( + this.doctype, + updatedDoc._id, + updatedDoc + ) + } else { + return doc + } + } + } + + static create(attributes) { + if (this.usesCozyClient()) { + return this.createViaNewClient(attributes) + } + + return this.createViaOldClient(attributes) + } + + static createViaNewClient(attributes) { + return this.cozyClient.create(this.doctype, attributes) + } + + static createViaOldClient(attributes) { + return this.cozyClient.data.create(this.doctype, attributes) + } + + /** + * Save many documents concurrently + */ + static bulkSave(documents, optionsOrConcurrency, logProgressOrNothing) { + if (logProgressOrNothing || typeof optionsOrConcurrency !== 'object') { + log( + 'warn', + 'Second argument of bulkSave is now an object, please use bulkSave(documents, { logProgress, concurrency })' + ) + } + + const options = {} + + if (typeof optionsOrConcurrency === 'number') { + options.concurrency = optionsOrConcurrency + } + + if (typeof logProgressOrNothing === 'function') { + options.logProgress = logProgressOrNothing + } + + if (typeof optionsOrConcurrency === 'object') { + Object.assign(options, optionsOrConcurrency) + } + + return this._bulkSave(documents, options) + } + + /** + * @private + * + * Meat of the method bulkSave + */ + static _bulkSave(documents, options = {}) { + const { concurrency = 30, logProgress, ...createOrUpdateOptions } = options + + return parallelMap( + documents, + async doc => { + if (logProgress) { + logProgress(doc) + } + try { + const newDoc = await this.createOrUpdate(doc, createOrUpdateOptions) + return newDoc + } catch (e) { + if (options.onCreateOrUpdateError) { + return options.onCreateOrUpdateError(e, doc) + } else { + throw e + } + } + }, + concurrency + ) + } + + static query(index, options) { + if (this.usesCozyClient()) { + throw new Error('This method is not implemented yet with CozyClient') + } + + return this.queryViaOldClient(index, options) + } + + static queryViaOldClient(index, options) { + return this.cozyClient.data.query(index, options) + } + + static async fetchAll() { + const stackClient = this.usesCozyClient() + ? this.cozyClient.stackClient + : this.cozyClient + + try { + const result = await stackClient.fetchJSON( + 'GET', + `/data/${this.doctype}/_all_docs?include_docs=true` + ) + return result.rows + .filter(x => x.id.indexOf('_design') !== 0 && x.doc) + .map(x => x.doc) + } catch (e) { + if (e && e.response && e.response.status && e.response.status === 404) { + return [] + } else { + return [] + } + } + } + + static async updateAll(docs) { + const stackClient = this.usesCozyClient() + ? this.cozyClient.stackClient + : this.cozyClient + + if (!docs || !docs.length) { + return Promise.resolve([]) + } + try { + const update = await stackClient.fetchJSON( + 'POST', + `/data/${this.doctype}/_bulk_docs`, + { + docs + } + ) + return update + } catch (e) { + if ( + e.reason && + e.reason.reason && + e.reason.reason == DATABASE_DOES_NOT_EXIST + ) { + const firstDoc = await this.create(docs[0]) + const resp = await this.updateAll(docs.slice(1)) + resp.unshift({ ok: true, id: firstDoc._id, rev: firstDoc._rev }) + return resp + } else { + throw e + } + } + } + + static async deleteAll(docs) { + return this.updateAll(docs.map(flagForDeletion)) + } + + /** + * Find duplicates in a list of documents according to the + * idAttributes of the class. Priority is given to the document + * prior in the list. + * + * To introduce the notion of priority, you can sort your input docs + * according to this priorirty. + * + * @param {Array[object]} docs + * @return {Array[object]} Duplicates + */ + static findDuplicates(docs) { + const fieldSeparator = '#$$$$#' + const idAttributes = this.idAttributes + const key = doc => { + return idAttributes + .map(idAttrPath => get(doc, idAttrPath)) + .join(fieldSeparator) + } + const groups = pickBy(groupBy(docs, key), group => group.length > 1) + const duplicates = flatMap(groups, group => group.slice(1)) + return duplicates + } + + /** + * Delete duplicates on the server. Find duplicates according to the + * idAttributes. + * + * @param {Function} Priority (optional). Among duplicates, which one should be prioritized) + * @return {Promise} + * @example + * ``` + * deleteDuplicates(doc => -doc.dateImport) // will duplicate documents so that the oldest document is conserved + * ``` + */ + static async deleteDuplicates(priorityFn) { + let allDocs = await this.fetchAll() + if (priorityFn) { + allDocs = sortBy(allDocs, priorityFn) + } + const duplicates = this.findDuplicates(allDocs) + return this.deleteAll(duplicates) + } + + /** + * Use Couch _changes API + * + * @param {string} since Starting sequence for changes + * @param {[type]} options { includeDesign: false, includeDeleted: false } + */ + static async fetchChanges(since, options = {}) { + const stackClient = this.usesCozyClient() + ? this.cozyClient.stackClient + : this.cozyClient + + const queryParams = { + since, + include_docs: 'true' + } + if (options.params) { + Object.assign(queryParams, options.params) + } + const result = await stackClient.fetchJSON( + 'GET', + `/data/${this.doctype}/_changes?${querystring.stringify(queryParams)}` + ) + + const newLastSeq = result.last_seq + let docs = result.results.map(x => x.doc).filter(Boolean) + + if (!options.includeDesign) { + docs = docs.filter(doc => doc._id.indexOf('_design') !== 0) + } + + if (!options.includeDeleted) { + docs = docs.filter(doc => !doc._deleted) + } + + return { newLastSeq, documents: docs } + } + + /** + * Fetches all documents for a given doctype exceeding the 100 limit. + * It is slower that fetchAll because it fetches the data 100 by 100 but allows to filter the data + * with a selector and an index + * + * Parameters: + * + * * `selector` (object): the mango query selector + * * `index` (object): (optional) the query selector index. If not defined, the function will + * create it's own index with the keys specified in the selector + * + * + * ```javascript + * const documents = await Bills.queryAll({vendor: 'Direct Energie'}) + * ``` + * + */ + static async queryAll(selector, index) { + if (this.usesCozyClient()) { + return this.queryAllViaNewClient(selector) + } + + return this.queryAllViaOldClient(selector, index) + } + + static async queryAllViaNewClient(selector) { + if (!selector) { + return this.fetchAll() + } + + const result = [] + + const query = this.cozyClient.find(this.doctype).where(selector) + let resp = { next: true } + while (resp && resp.next) { + resp = await this.cozyClient.query(query.offset(result.length)) + result.push(...resp.data) + } + + return result + } + + static async queryAllViaOldClient(selector, indexArg) { + if (!selector) { + // fetchAll is faster in this case + return await this.fetchAll() + } + + let index = indexArg + if (!index) { + index = await this.cozyClient.data.defineIndex( + this.doctype, + Object.keys(selector) + ) + } + + const result = [] + let resp = { next: true } + while (resp && resp.next) { + resp = await this.cozyClient.data.query(index, { + selector, + wholeResponse: true, + skip: result.length + }) + result.push(...resp.docs) + } + return result + } + + /** + * Fetch in one request a batch of documents by id. + * @param {String[]} ids - Ids of documents to fetch + * @return {Promise} - Promise resolving to an array of documents, unfound document are filtered + */ + static async getAll(ids) { + const stackClient = this.usesCozyClient() + ? this.cozyClient.stackClient + : this.cozyClient + let resp + try { + resp = await stackClient.fetchJSON( + 'POST', + `/data/${this.doctype}/_all_docs?include_docs=true`, + { + keys: ids + } + ) + } catch (error) { + if (error.message.match(/not_found/)) { + return [] + } + throw error + } + const rows = resp.rows.filter(row => row.doc) + return rows.map(row => row.doc) + } +} + +Document.defaultDuplicateHandling = 'throw' + +Document.duplicateHandlingStrategies = { + throw: function(duplicates, selector) { + throw new Error( + 'Create or update with selectors that returns more than 1 result\n' + + JSON.stringify(selector) + + '\n' + + JSON.stringify(duplicates) + ) + }, + + remove: async function(duplicates) { + const docsToRemove = duplicates.slice(1) + if (docsToRemove.length > 0) { + log( + 'warn', + `Cleaning duplicates for doctype ${this.doctype} (kept: ${ + duplicates[0]._id + }, removed: ${docsToRemove.map(x => x._id)})` + ) + await this.deleteAll(docsToRemove) + } + } +} + +module.exports = Document + + +/***/ }), +/* 1180 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIteratee = __webpack_require__(413), + negate = __webpack_require__(1181), + pickBy = __webpack_require__(655); + +/** + * The opposite of `_.pickBy`; this method creates an object composed of + * the own and inherited enumerable string keyed properties of `object` that + * `predicate` doesn't return truthy for. The predicate is invoked with two + * arguments: (value, key). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Object + * @param {Object} object The source object. + * @param {Function} [predicate=_.identity] The function invoked per property. + * @returns {Object} Returns the new object. + * @example + * + * var object = { 'a': 1, 'b': '2', 'c': 3 }; + * + * _.omitBy(object, _.isNumber); + * // => { 'b': '2' } + */ +function omitBy(object, predicate) { + return pickBy(object, negate(baseIteratee(predicate))); +} + +module.exports = omitBy; + + +/***/ }), +/* 1181 */ +/***/ (function(module, exports) { + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; + +/** + * Creates a function that negates the result of the predicate `func`. The + * `func` predicate is invoked with the `this` binding and arguments of the + * created function. + * + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {Function} predicate The predicate to negate. + * @returns {Function} Returns the new negated function. + * @example + * + * function isEven(n) { + * return n % 2 == 0; + * } + * + * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); + * // => [1, 3, 5] + */ +function negate(predicate) { + if (typeof predicate != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + return function() { + var args = arguments; + switch (args.length) { + case 0: return !predicate.call(this); + case 1: return !predicate.call(this, args[0]); + case 2: return !predicate.call(this, args[0], args[1]); + case 3: return !predicate.call(this, args[0], args[1], args[2]); + } + return !predicate.apply(this, args); + }; +} + +module.exports = negate; + + +/***/ }), +/* 1182 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseFlatten = __webpack_require__(559), + map = __webpack_require__(1183); + +/** + * Creates a flattened array of values by running each element in `collection` + * thru `iteratee` and flattening the mapped results. The iteratee is invoked + * with three arguments: (value, index|key, collection). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new flattened array. + * @example + * + * function duplicate(n) { + * return [n, n]; + * } + * + * _.flatMap([1, 2], duplicate); + * // => [1, 1, 2, 2] + */ +function flatMap(collection, iteratee) { + return baseFlatten(map(collection, iteratee), 1); +} + +module.exports = flatMap; + + +/***/ }), +/* 1183 */ +/***/ (function(module, exports, __webpack_require__) { + +var arrayMap = __webpack_require__(410), + baseIteratee = __webpack_require__(413), + baseMap = __webpack_require__(738), + isArray = __webpack_require__(75); + +/** + * Creates an array of values by running each element in `collection` thru + * `iteratee`. The iteratee is invoked with three arguments: + * (value, index|key, collection). + * + * Many lodash methods are guarded to work as iteratees for methods like + * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * + * The guarded methods are: + * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, + * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, + * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, + * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [iteratee=_.identity] The function invoked per iteration. + * @returns {Array} Returns the new mapped array. + * @example + * + * function square(n) { + * return n * n; + * } + * + * _.map([4, 8], square); + * // => [16, 64] + * + * _.map({ 'a': 4, 'b': 8 }, square); + * // => [16, 64] (iteration order is not guaranteed) + * + * var users = [ + * { 'user': 'barney' }, + * { 'user': 'fred' } + * ]; + * + * // The `_.property` iteratee shorthand. + * _.map(users, 'user'); + * // => ['barney', 'fred'] + */ +function map(collection, iteratee) { + var func = isArray(collection) ? arrayMap : baseMap; + return func(collection, baseIteratee(iteratee, 3)); +} + +module.exports = map; + + +/***/ }), +/* 1184 */ +/***/ (function(module, exports, __webpack_require__) { + +const PromisePool = __webpack_require__(1185) + +/** + * Like a map, executed in parallel via a promise pool + * + * @param {Array} arr Items to process + * @param {Function} fn Promise creator (will be passed each item) + * @param {Number} concurrency How many promise can be in flight at the same time + * @return {Promise} Resolved with the results of the promise, not necessary in order + */ +const parallelMap = (iterable, fn, concurrencyArg) => { + const concurrency = concurrencyArg || 30 + const res = [] + const pool = new PromisePool(function*() { + for (let item of iterable) { + yield fn(item).then(x => res.push(x)) + } + }, concurrency) + return pool.start().then(() => res) +} + +module.exports = { + parallelMap +} + + +/***/ }), +/* 1185 */ +/***/ (function(module, exports, __webpack_require__) { + +var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) { + /* istanbul ignore next */ + if (true) { + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? + (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), + __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) + } else {} +})(this, function () { + 'use strict' + + var EventTarget = function () { + this._listeners = {} + } + + EventTarget.prototype.addEventListener = function (type, listener) { + this._listeners[type] = this._listeners[type] || [] + if (this._listeners[type].indexOf(listener) < 0) { + this._listeners[type].push(listener) + } + } + + EventTarget.prototype.removeEventListener = function (type, listener) { + if (this._listeners[type]) { + var p = this._listeners[type].indexOf(listener) + if (p >= 0) { + this._listeners[type].splice(p, 1) + } + } + } + + EventTarget.prototype.dispatchEvent = function (evt) { + if (this._listeners[evt.type] && this._listeners[evt.type].length) { + var listeners = this._listeners[evt.type].slice() + for (var i = 0, l = listeners.length; i < l; ++i) { + listeners[i].call(this, evt) + } + } + } + + var isGenerator = function (func) { + return (typeof func.constructor === 'function' && + func.constructor.name === 'GeneratorFunction') + } + + var functionToIterator = function (func) { + return { + next: function () { + var promise = func() + return promise ? {value: promise} : {done: true} + } + } + } + + var promiseToIterator = function (promise) { + var called = false + return { + next: function () { + if (called) { + return {done: true} + } + called = true + return {value: promise} + } + } + } + + var toIterator = function (obj, Promise) { + var type = typeof obj + if (type === 'object') { + if (typeof obj.next === 'function') { + return obj + } + /* istanbul ignore else */ + if (typeof obj.then === 'function') { + return promiseToIterator(obj) + } + } + if (type === 'function') { + return isGenerator(obj) ? obj() : functionToIterator(obj) + } + return promiseToIterator(Promise.resolve(obj)) + } + + var PromisePoolEvent = function (target, type, data) { + this.target = target + this.type = type + this.data = data + } + + var PromisePool = function (source, concurrency, options) { + EventTarget.call(this) + if (typeof concurrency !== 'number' || + Math.floor(concurrency) !== concurrency || + concurrency < 1) { + throw new Error('Invalid concurrency') + } + this._concurrency = concurrency + this._options = options || {} + this._options.promise = this._options.promise || Promise + this._iterator = toIterator(source, this._options.promise) + this._done = false + this._size = 0 + this._promise = null + this._callbacks = null + } + PromisePool.prototype = new EventTarget() + PromisePool.prototype.constructor = PromisePool + + PromisePool.prototype.concurrency = function (value) { + if (typeof value !== 'undefined') { + this._concurrency = value + if (this.active()) { + this._proceed() + } + } + return this._concurrency + } + + PromisePool.prototype.size = function () { + return this._size + } + + PromisePool.prototype.active = function () { + return !!this._promise + } + + PromisePool.prototype.promise = function () { + return this._promise + } + + PromisePool.prototype.start = function () { + var that = this + var Promise = this._options.promise + this._promise = new Promise(function (resolve, reject) { + that._callbacks = { + reject: reject, + resolve: resolve + } + that._proceed() + }) + return this._promise + } + + PromisePool.prototype._fireEvent = function (type, data) { + this.dispatchEvent(new PromisePoolEvent(this, type, data)) + } + + PromisePool.prototype._settle = function (error) { + if (error) { + this._callbacks.reject(error) + } else { + this._callbacks.resolve() + } + this._promise = null + this._callbacks = null + } + + PromisePool.prototype._onPooledPromiseFulfilled = function (promise, result) { + this._size-- + if (this.active()) { + this._fireEvent('fulfilled', { + promise: promise, + result: result + }) + this._proceed() + } + } + + PromisePool.prototype._onPooledPromiseRejected = function (promise, error) { + this._size-- + if (this.active()) { + this._fireEvent('rejected', { + promise: promise, + error: error + }) + this._settle(error || new Error('Unknown error')) + } + } + + PromisePool.prototype._trackPromise = function (promise) { + var that = this + promise + .then(function (result) { + that._onPooledPromiseFulfilled(promise, result) + }, function (error) { + that._onPooledPromiseRejected(promise, error) + })['catch'](function (err) { + that._settle(new Error('Promise processing failed: ' + err)) + }) + } + + PromisePool.prototype._proceed = function () { + if (!this._done) { + var result = { done: false } + while (this._size < this._concurrency && + !(result = this._iterator.next()).done) { + this._size++ + this._trackPromise(result.value) + } + this._done = (result === null || !!result.done) + } + if (this._done && this._size === 0) { + this._settle() + } + } + + PromisePool.PromisePoolEvent = PromisePoolEvent + // Legacy API + PromisePool.PromisePool = PromisePool + + return PromisePool +}) + + +/***/ }), +/* 1186 */ +/***/ (function(module, exports, __webpack_require__) { + +const get = __webpack_require__(370) +const flatten = __webpack_require__(558) + +const Contact = __webpack_require__(1187) +const Document = __webpack_require__(1179) + +class AdministrativeProcedure extends Document { + /** + * Returns personal data for the contact + * + * @param {Contact} contact - A contact + * @param {Array} fields - The list of fields to retrieve + * @return {Object} - the personal data + **/ + static getPersonalData(contact, fields) { + const mapping = { + firstname: { + path: 'name.givenName' + }, + lastname: { + path: 'name.familyName' + }, + address: { + getter: Contact.getPrimaryAddress + }, + email: { + getter: Contact.getPrimaryEmail + }, + phone: { + getter: Contact.getPrimaryPhone + } + } + let personalData = {} + fields.forEach(field => { + const contactField = get(mapping, field, field) + let value + if (contactField.getter) { + value = contactField.getter(contact) + } else { + const path = get(contactField, 'path', field) + value = get(contact, path) + } + + if (value !== undefined) { + personalData[field] = value + } + }) + + return personalData + } + /** + * Method to generate a query based on a few rules given by the template + * @param {Object} docRules + * @param {Object} docRules.rules + * @param {int} docRules.count + */ + static async getFilesByRules(docRules) { + const { rules, count } = docRules + const cozyRules = { + trashed: false, + type: 'file', + ...rules + } + // Create an index in order to query and sort + await this.cozyClient + .collection('io.cozy.files') + .createIndex(['metadata.datetime', 'metadata.qualification']) + // Use the index + const files = await this.cozyClient + .collection('io.cozy.files') + .find(cozyRules, { + indexedFields: ['metadata.datetime', 'metadata.qualification'], + sort: [ + { + 'metadata.datetime': 'desc' + }, + { + 'metadata.qualification': 'desc' + } + ], + limit: count ? count : 1 + }) + + return files + } + + /** + * Returns a io.cozy.procedures.administratives object + * + * @param {object} data - The data we need for this type of procedure + * @param {ProcedureTemplate} template - The procedure's template + * @return {AdministrativeProcedure} the administrative procedure + */ + static create(data, template) { + const { documentsData, personalData, procedureData } = data + const files = Object.keys(documentsData).map(identifier => { + return documentsData[identifier].files.map(file => { + // TODO Remove this check. it has to be done before + if (file) + return { + _id: file.id, + _type: 'io.cozy.files', + templateDocumentId: identifier + } + }) + }) + return { + personalData, + procedureData, + submissionDate: new Date(), + templateId: template.type, + templateVersion: template.version, + relationships: { + files: { + data: flatten(files) + } + } + } + } + + /** + * Returns json that represents the administative procedure + * + * @param {AdministrativeProcedure} + * @return {string} - the json that represents this procedure + * + */ + static createJson(administrativeProcedure) { + return JSON.stringify(administrativeProcedure) + } +} + +AdministrativeProcedure.doctype = 'io.cozy.procedures.administratives' + +module.exports = AdministrativeProcedure + + +/***/ }), +/* 1187 */ +/***/ (function(module, exports, __webpack_require__) { + +const PropTypes = __webpack_require__(1188) +const get = __webpack_require__(370) + +const log = __webpack_require__(1195) +const Document = __webpack_require__(1179) + +const getPrimaryOrFirst = property => obj => { + if (!obj[property] || obj[property].length === 0) return '' + return obj[property].find(property => property.primary) || obj[property][0] +} + +const logDeprecated = methodName => + log( + 'warn', + `${methodName} from cozy-doctypes contact is deprecated, use cozy-client/models/contacts/${methodName} instead` + ) + +/** + * Class representing the contact model. + * @extends Document + */ +class Contact extends Document { + /** + * Returns true if candidate is a contact + * + * @param {Object} candidate + * @return {boolean} - whether the candidate is a contact + */ + static isContact(candidate) { + return candidate._type === Contact.doctype + } + + /** + * Returns the initials of the contact. + * + * @param {Contact|string} contact - A contact or a string + * @return {string} - the contact's initials + */ + static getInitials(contact) { + logDeprecated('getInitials') + if (typeof contact === 'string') { + log( + 'warn', + 'Passing a string to Contact.getInitials will be deprecated soon.' + ) + return contact[0].toUpperCase() + } + + if (contact.name) { + return ['givenName', 'familyName'] + .map(part => get(contact, ['name', part, 0], '')) + .join('') + .toUpperCase() + } + + const email = Contact.getPrimaryEmail(contact) + if (email) { + return email[0].toUpperCase() + } + + log('warn', 'Contact has no name and no email.') + return '' + } + + /** + * Returns the contact's main email + * + * @param {Contact} contact - A contact + * @return {string} - The contact's main email + */ + // TODO: sadly we have different versions of contacts' doctype to handle... + // A migration tool on the stack side is needed here + static getPrimaryEmail(contact) { + logDeprecated('getPrimaryEmail') + return Array.isArray(contact.email) + ? getPrimaryOrFirst('email')(contact).address + : contact.email + } + + /** + * Returns the contact's main cozy + * + * @param {Contact} contact - A contact + * @return {string} - The contact's main cozy + */ + static getPrimaryCozy(contact) { + logDeprecated('getPrimaryCozy') + return Array.isArray(contact.cozy) + ? getPrimaryOrFirst('cozy')(contact).url + : contact.url + } + + /** + * Returns the contact's main phone number + * + * @param {Contact} contact - A contact + * @return {string} - The contact's main phone number + */ + static getPrimaryPhone(contact) { + logDeprecated('getPrimaryPhone') + return getPrimaryOrFirst('phone')(contact).number + } + + /** + * Returns the contact's main address + * + * @param {Contact} contact - A contact + * @return {string} - The contact's main address + */ + static getPrimaryAddress(contact) { + logDeprecated('getPrimaryAddress') + return getPrimaryOrFirst('address')(contact).formattedAddress + } + + /** + * Returns the contact's fullname + * + * @param {Contact} contact - A contact + * @return {string} - The contact's fullname + */ + static getFullname(contact) { + logDeprecated('getFullname') + if (contact.fullname) { + return contact.fullname + } else if (contact.name) { + return [ + 'namePrefix', + 'givenName', + 'additionalName', + 'familyName', + 'nameSuffix' + ] + .map(part => contact.name[part]) + .filter(part => part !== undefined) + .join(' ') + .trim() + } + + return undefined + } + + /** + * Returns a display name for the contact + * + * @param {Contact} contact - A contact + * @return {string} - the contact's display name + **/ + static getDisplayName(contact) { + logDeprecated('getDisplayName') + return Contact.getFullname(contact) || Contact.getPrimaryEmail(contact) + } +} + +const ContactShape = PropTypes.shape({ + _id: PropTypes.string.isRequired, + _type: PropTypes.string.isRequired, + fullname: PropTypes.string, + name: PropTypes.shape({ + givenName: PropTypes.string, + familyName: PropTypes.string, + additionalName: PropTypes.string, + namePrefix: PropTypes.string, + nameSuffix: PropTypes.string + }), + birthday: PropTypes.string, + note: PropTypes.string, + email: PropTypes.arrayOf( + PropTypes.shape({ + address: PropTypes.string.isRequired, + label: PropTypes.string, + type: PropTypes.string, + primary: PropTypes.bool + }) + ), + address: PropTypes.arrayOf( + PropTypes.shape({ + street: PropTypes.string, + pobox: PropTypes.string, + city: PropTypes.string, + region: PropTypes.string, + postcode: PropTypes.string, + country: PropTypes.string, + type: PropTypes.string, + primary: PropTypes.bool, + label: PropTypes.string, + formattedAddress: PropTypes.string + }) + ), + phone: PropTypes.arrayOf( + PropTypes.shape({ + number: PropTypes.string.isRequired, + type: PropTypes.string, + label: PropTypes.string, + primary: PropTypes.bool + }) + ), + cozy: PropTypes.arrayOf( + PropTypes.shape({ + url: PropTypes.string.isRequired, + label: PropTypes.string, + primary: PropTypes.bool + }) + ), + company: PropTypes.string, + jobTitle: PropTypes.string, + trashed: PropTypes.bool, + me: PropTypes.bool, + relationships: PropTypes.shape({ + accounts: PropTypes.shape({ + data: PropTypes.arrayOf( + PropTypes.shape({ + _id: PropTypes.string.isRequired, + _type: PropTypes.string.isRequired + }) + ) + }), + groups: PropTypes.shape({ + data: PropTypes.arrayOf( + PropTypes.shape({ + _id: PropTypes.string.isRequired, + _type: PropTypes.string.isRequired + }) + ) + }) + }) +}) + +Contact.doctype = 'io.cozy.contacts' +Contact.propType = ContactShape + +module.exports = Contact + + +/***/ }), +/* 1188 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +if (true) { + var ReactIs = __webpack_require__(1189); + + // By explicitly using `prop-types` you are opting into new development behavior. + // http://fb.me/prop-types-in-prod + var throwOnDirectAccess = true; + module.exports = __webpack_require__(1191)(ReactIs.isElement, throwOnDirectAccess); +} else {} + + +/***/ }), +/* 1189 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +if (false) {} else { + module.exports = __webpack_require__(1190); +} + + +/***/ }), +/* 1190 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** @license React v16.13.1 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + + + +if (true) { + (function() { +'use strict'; + +// The Symbol used to tag the ReactElement-like types. If there is no native Symbol +// nor polyfill, then a plain number is used for performance. +var hasSymbol = typeof Symbol === 'function' && Symbol.for; +var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; +var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; +var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; +var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; +var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; +var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; +var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary +// (unstable) APIs that have been removed. Can we remove the symbols? + +var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; +var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; +var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; +var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; +var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; +var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; +var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; +var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; +var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; +var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; +var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + +function isValidElementType(type) { + return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. + type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); +} + +function typeOf(object) { + if (typeof object === 'object' && object !== null) { + var $$typeof = object.$$typeof; + + switch ($$typeof) { + case REACT_ELEMENT_TYPE: + var type = object.type; + + switch (type) { + case REACT_ASYNC_MODE_TYPE: + case REACT_CONCURRENT_MODE_TYPE: + case REACT_FRAGMENT_TYPE: + case REACT_PROFILER_TYPE: + case REACT_STRICT_MODE_TYPE: + case REACT_SUSPENSE_TYPE: + return type; + + default: + var $$typeofType = type && type.$$typeof; + + switch ($$typeofType) { + case REACT_CONTEXT_TYPE: + case REACT_FORWARD_REF_TYPE: + case REACT_LAZY_TYPE: + case REACT_MEMO_TYPE: + case REACT_PROVIDER_TYPE: + return $$typeofType; + + default: + return $$typeof; + } + + } + + case REACT_PORTAL_TYPE: + return $$typeof; + } + } + + return undefined; +} // AsyncMode is deprecated along with isAsyncMode + +var AsyncMode = REACT_ASYNC_MODE_TYPE; +var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; +var ContextConsumer = REACT_CONTEXT_TYPE; +var ContextProvider = REACT_PROVIDER_TYPE; +var Element = REACT_ELEMENT_TYPE; +var ForwardRef = REACT_FORWARD_REF_TYPE; +var Fragment = REACT_FRAGMENT_TYPE; +var Lazy = REACT_LAZY_TYPE; +var Memo = REACT_MEMO_TYPE; +var Portal = REACT_PORTAL_TYPE; +var Profiler = REACT_PROFILER_TYPE; +var StrictMode = REACT_STRICT_MODE_TYPE; +var Suspense = REACT_SUSPENSE_TYPE; +var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated + +function isAsyncMode(object) { + { + if (!hasWarnedAboutDeprecatedIsAsyncMode) { + hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint + + console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); + } + } + + return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; +} +function isConcurrentMode(object) { + return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; +} +function isContextConsumer(object) { + return typeOf(object) === REACT_CONTEXT_TYPE; +} +function isContextProvider(object) { + return typeOf(object) === REACT_PROVIDER_TYPE; +} +function isElement(object) { + return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; +} +function isForwardRef(object) { + return typeOf(object) === REACT_FORWARD_REF_TYPE; +} +function isFragment(object) { + return typeOf(object) === REACT_FRAGMENT_TYPE; +} +function isLazy(object) { + return typeOf(object) === REACT_LAZY_TYPE; +} +function isMemo(object) { + return typeOf(object) === REACT_MEMO_TYPE; +} +function isPortal(object) { + return typeOf(object) === REACT_PORTAL_TYPE; +} +function isProfiler(object) { + return typeOf(object) === REACT_PROFILER_TYPE; +} +function isStrictMode(object) { + return typeOf(object) === REACT_STRICT_MODE_TYPE; +} +function isSuspense(object) { + return typeOf(object) === REACT_SUSPENSE_TYPE; +} + +exports.AsyncMode = AsyncMode; +exports.ConcurrentMode = ConcurrentMode; +exports.ContextConsumer = ContextConsumer; +exports.ContextProvider = ContextProvider; +exports.Element = Element; +exports.ForwardRef = ForwardRef; +exports.Fragment = Fragment; +exports.Lazy = Lazy; +exports.Memo = Memo; +exports.Portal = Portal; +exports.Profiler = Profiler; +exports.StrictMode = StrictMode; +exports.Suspense = Suspense; +exports.isAsyncMode = isAsyncMode; +exports.isConcurrentMode = isConcurrentMode; +exports.isContextConsumer = isContextConsumer; +exports.isContextProvider = isContextProvider; +exports.isElement = isElement; +exports.isForwardRef = isForwardRef; +exports.isFragment = isFragment; +exports.isLazy = isLazy; +exports.isMemo = isMemo; +exports.isPortal = isPortal; +exports.isProfiler = isProfiler; +exports.isStrictMode = isStrictMode; +exports.isSuspense = isSuspense; +exports.isValidElementType = isValidElementType; +exports.typeOf = typeOf; + })(); +} + + +/***/ }), +/* 1191 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; +/** + * Copyright (c) 2013-present, Facebook, Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + + + +var ReactIs = __webpack_require__(1189); +var assign = __webpack_require__(1192); + +var ReactPropTypesSecret = __webpack_require__(1193); +var checkPropTypes = __webpack_require__(1194); + +var has = Function.call.bind(Object.prototype.hasOwnProperty); +var printWarning = function() {}; + +if (true) { + printWarning = function(text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); + } + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; +} + +function emptyFunctionThatReturnsNull() { + return null; +} + +module.exports = function(isValidElement, throwOnDirectAccess) { + /* global Symbol */ + var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; + var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. + + /** + * Returns the iterator method function contained on the iterable object. + * + * Be sure to invoke the function with the iterable as context: + * + * var iteratorFn = getIteratorFn(myIterable); + * if (iteratorFn) { + * var iterator = iteratorFn.call(myIterable); + * ... + * } + * + * @param {?object} maybeIterable + * @return {?function} + */ + function getIteratorFn(maybeIterable) { + var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); + if (typeof iteratorFn === 'function') { + return iteratorFn; + } + } + + /** + * Collection of methods that allow declaration and validation of props that are + * supplied to React components. Example usage: + * + * var Props = require('ReactPropTypes'); + * var MyArticle = React.createClass({ + * propTypes: { + * // An optional string prop named "description". + * description: Props.string, + * + * // A required enum prop named "category". + * category: Props.oneOf(['News','Photos']).isRequired, + * + * // A prop named "dialog" that requires an instance of Dialog. + * dialog: Props.instanceOf(Dialog).isRequired + * }, + * render: function() { ... } + * }); + * + * A more formal specification of how these methods are used: + * + * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) + * decl := ReactPropTypes.{type}(.isRequired)? + * + * Each and every declaration produces a function with the same signature. This + * allows the creation of custom validation functions. For example: + * + * var MyLink = React.createClass({ + * propTypes: { + * // An optional string or URI prop named "href". + * href: function(props, propName, componentName) { + * var propValue = props[propName]; + * if (propValue != null && typeof propValue !== 'string' && + * !(propValue instanceof URI)) { + * return new Error( + * 'Expected a string or an URI for ' + propName + ' in ' + + * componentName + * ); + * } + * } + * }, + * render: function() {...} + * }); + * + * @internal + */ + + var ANONYMOUS = '<<anonymous>>'; + + // Important! + // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. + var ReactPropTypes = { + array: createPrimitiveTypeChecker('array'), + bool: createPrimitiveTypeChecker('boolean'), + func: createPrimitiveTypeChecker('function'), + number: createPrimitiveTypeChecker('number'), + object: createPrimitiveTypeChecker('object'), + string: createPrimitiveTypeChecker('string'), + symbol: createPrimitiveTypeChecker('symbol'), + + any: createAnyTypeChecker(), + arrayOf: createArrayOfTypeChecker, + element: createElementTypeChecker(), + elementType: createElementTypeTypeChecker(), + instanceOf: createInstanceTypeChecker, + node: createNodeChecker(), + objectOf: createObjectOfTypeChecker, + oneOf: createEnumTypeChecker, + oneOfType: createUnionTypeChecker, + shape: createShapeTypeChecker, + exact: createStrictShapeTypeChecker, + }; + + /** + * inlined Object.is polyfill to avoid requiring consumers ship their own + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is + */ + /*eslint-disable no-self-compare*/ + function is(x, y) { + // SameValue algorithm + if (x === y) { + // Steps 1-5, 7-10 + // Steps 6.b-6.e: +0 != -0 + return x !== 0 || 1 / x === 1 / y; + } else { + // Step 6.a: NaN == NaN + return x !== x && y !== y; + } + } + /*eslint-enable no-self-compare*/ + + /** + * We use an Error-like object for backward compatibility as people may call + * PropTypes directly and inspect their output. However, we don't use real + * Errors anymore. We don't inspect their stack anyway, and creating them + * is prohibitively expensive if they are created too often, such as what + * happens in oneOfType() for any type before the one that matched. + */ + function PropTypeError(message) { + this.message = message; + this.stack = ''; + } + // Make `instanceof Error` still work for returned errors. + PropTypeError.prototype = Error.prototype; + + function createChainableTypeChecker(validate) { + if (true) { + var manualPropTypeCallCache = {}; + var manualPropTypeWarningCount = 0; + } + function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { + componentName = componentName || ANONYMOUS; + propFullName = propFullName || propName; + + if (secret !== ReactPropTypesSecret) { + if (throwOnDirectAccess) { + // New behavior only for users of `prop-types` package + var err = new Error( + 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + + 'Use `PropTypes.checkPropTypes()` to call them. ' + + 'Read more at http://fb.me/use-check-prop-types' + ); + err.name = 'Invariant Violation'; + throw err; + } else if ( true && typeof console !== 'undefined') { + // Old behavior for people using React.PropTypes + var cacheKey = componentName + ':' + propName; + if ( + !manualPropTypeCallCache[cacheKey] && + // Avoid spamming the console because they are often not actionable except for lib authors + manualPropTypeWarningCount < 3 + ) { + printWarning( + 'You are manually calling a React.PropTypes validation ' + + 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + + 'and will throw in the standalone `prop-types` package. ' + + 'You may be seeing this warning due to a third-party PropTypes ' + + 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' + ); + manualPropTypeCallCache[cacheKey] = true; + manualPropTypeWarningCount++; + } + } + } + if (props[propName] == null) { + if (isRequired) { + if (props[propName] === null) { + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); + } + return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); + } + return null; + } else { + return validate(props, propName, componentName, location, propFullName); + } + } + + var chainedCheckType = checkType.bind(null, false); + chainedCheckType.isRequired = checkType.bind(null, true); + + return chainedCheckType; + } + + function createPrimitiveTypeChecker(expectedType) { + function validate(props, propName, componentName, location, propFullName, secret) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== expectedType) { + // `propValue` being instance of, say, date/regexp, pass the 'object' + // check, but we can offer a more precise error message here rather than + // 'of type `object`'. + var preciseType = getPreciseType(propValue); + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createAnyTypeChecker() { + return createChainableTypeChecker(emptyFunctionThatReturnsNull); + } + + function createArrayOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); + } + var propValue = props[propName]; + if (!Array.isArray(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); + } + for (var i = 0; i < propValue.length; i++) { + var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!isValidElement(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createElementTypeTypeChecker() { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + if (!ReactIs.isValidElementType(propValue)) { + var propType = getPropType(propValue); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createInstanceTypeChecker(expectedClass) { + function validate(props, propName, componentName, location, propFullName) { + if (!(props[propName] instanceof expectedClass)) { + var expectedClassName = expectedClass.name || ANONYMOUS; + var actualClassName = getClassName(props[propName]); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createEnumTypeChecker(expectedValues) { + if (!Array.isArray(expectedValues)) { + if (true) { + if (arguments.length > 1) { + printWarning( + 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + + 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' + ); + } else { + printWarning('Invalid argument supplied to oneOf, expected an array.'); + } + } + return emptyFunctionThatReturnsNull; + } + + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + for (var i = 0; i < expectedValues.length; i++) { + if (is(propValue, expectedValues[i])) { + return null; + } + } + + var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { + var type = getPreciseType(value); + if (type === 'symbol') { + return String(value); + } + return value; + }); + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); + } + return createChainableTypeChecker(validate); + } + + function createObjectOfTypeChecker(typeChecker) { + function validate(props, propName, componentName, location, propFullName) { + if (typeof typeChecker !== 'function') { + return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); + } + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); + } + for (var key in propValue) { + if (has(propValue, key)) { + var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error instanceof Error) { + return error; + } + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createUnionTypeChecker(arrayOfTypeCheckers) { + if (!Array.isArray(arrayOfTypeCheckers)) { + true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined; + return emptyFunctionThatReturnsNull; + } + + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (typeof checker !== 'function') { + printWarning( + 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + + 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' + ); + return emptyFunctionThatReturnsNull; + } + } + + function validate(props, propName, componentName, location, propFullName) { + for (var i = 0; i < arrayOfTypeCheckers.length; i++) { + var checker = arrayOfTypeCheckers[i]; + if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { + return null; + } + } + + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + } + return createChainableTypeChecker(validate); + } + + function createNodeChecker() { + function validate(props, propName, componentName, location, propFullName) { + if (!isNode(props[propName])) { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + for (var key in shapeTypes) { + var checker = shapeTypes[key]; + if (!checker) { + continue; + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; + } + return createChainableTypeChecker(validate); + } + + function createStrictShapeTypeChecker(shapeTypes) { + function validate(props, propName, componentName, location, propFullName) { + var propValue = props[propName]; + var propType = getPropType(propValue); + if (propType !== 'object') { + return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); + } + // We need to check all keys in case some are required but missing from + // props. + var allKeys = assign({}, props[propName], shapeTypes); + for (var key in allKeys) { + var checker = shapeTypes[key]; + if (!checker) { + return new PropTypeError( + 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + + '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + + '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') + ); + } + var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); + if (error) { + return error; + } + } + return null; + } + + return createChainableTypeChecker(validate); + } + + function isNode(propValue) { + switch (typeof propValue) { + case 'number': + case 'string': + case 'undefined': + return true; + case 'boolean': + return !propValue; + case 'object': + if (Array.isArray(propValue)) { + return propValue.every(isNode); + } + if (propValue === null || isValidElement(propValue)) { + return true; + } + + var iteratorFn = getIteratorFn(propValue); + if (iteratorFn) { + var iterator = iteratorFn.call(propValue); + var step; + if (iteratorFn !== propValue.entries) { + while (!(step = iterator.next()).done) { + if (!isNode(step.value)) { + return false; + } + } + } else { + // Iterator will provide entry [k,v] tuples rather than values. + while (!(step = iterator.next()).done) { + var entry = step.value; + if (entry) { + if (!isNode(entry[1])) { + return false; + } + } + } + } + } else { + return false; + } + + return true; + default: + return false; + } + } + + function isSymbol(propType, propValue) { + // Native Symbol. + if (propType === 'symbol') { + return true; + } + + // falsy value can't be a Symbol + if (!propValue) { + return false; + } + + // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' + if (propValue['@@toStringTag'] === 'Symbol') { + return true; + } + + // Fallback for non-spec compliant Symbols which are polyfilled. + if (typeof Symbol === 'function' && propValue instanceof Symbol) { + return true; + } + + return false; + } + + // Equivalent of `typeof` but with special handling for array and regexp. + function getPropType(propValue) { + var propType = typeof propValue; + if (Array.isArray(propValue)) { + return 'array'; + } + if (propValue instanceof RegExp) { + // Old webkits (at least until Android 4.0) return 'function' rather than + // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ + // passes PropTypes.object. + return 'object'; + } + if (isSymbol(propType, propValue)) { + return 'symbol'; + } + return propType; + } + + // This handles more types than `getPropType`. Only used for error messages. + // See `createPrimitiveTypeChecker`. + function getPreciseType(propValue) { + if (typeof propValue === 'undefined' || propValue === null) { + return '' + propValue; + } + var propType = getPropType(propValue); + if (propType === 'object') { + if (propValue instanceof Date) { + return 'date'; + } else if (propValue instanceof RegExp) { + return 'regexp'; + } + } + return propType; + } + + // Returns a string that is postfixed to a warning about an invalid type. + // For example, "undefined" or "of type array" + function getPostfixForTypeWarning(value) { + var type = getPreciseType(value); + switch (type) { + case 'array': + case 'object': + return 'an ' + type; + case 'boolean': + case 'date': + case 'regexp': + return 'a ' + type; + default: + return type; + } + } + + // Returns class name of the object, if any. + function getClassName(propValue) { + if (!propValue.constructor || !propValue.constructor.name) { + return ANONYMOUS; + } + return propValue.constructor.name; + } + + ReactPropTypes.checkPropTypes = checkPropTypes; + ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; + ReactPropTypes.PropTypes = ReactPropTypes; + + return ReactPropTypes; +}; + + +/***/ }), +/* 1192 */ /***/ (function(module, exports, __webpack_require__) { -var baseExtremum = __webpack_require__(1174), - baseGt = __webpack_require__(1175), - baseIteratee = __webpack_require__(413); +"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/ + + +/* eslint-disable no-unused-vars */ +var getOwnPropertySymbols = Object.getOwnPropertySymbols; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var propIsEnumerable = Object.prototype.propertyIsEnumerable; + +function toObject(val) { + if (val === null || val === undefined) { + throw new TypeError('Object.assign cannot be called with null or undefined'); + } + + return Object(val); +} + +function shouldUseNative() { + try { + if (!Object.assign) { + return false; + } + // Detect buggy property enumeration order in older V8 versions. + + // https://bugs.chromium.org/p/v8/issues/detail?id=4118 + var test1 = new String('abc'); // eslint-disable-line no-new-wrappers + test1[5] = 'de'; + if (Object.getOwnPropertyNames(test1)[0] === '5') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test2 = {}; + for (var i = 0; i < 10; i++) { + test2['_' + String.fromCharCode(i)] = i; + } + var order2 = Object.getOwnPropertyNames(test2).map(function (n) { + return test2[n]; + }); + if (order2.join('') !== '0123456789') { + return false; + } + + // https://bugs.chromium.org/p/v8/issues/detail?id=3056 + var test3 = {}; + 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { + test3[letter] = letter; + }); + if (Object.keys(Object.assign({}, test3)).join('') !== + 'abcdefghijklmnopqrst') { + return false; + } + + return true; + } catch (err) { + // We don't expect any of the above to throw, but better to be safe. + return false; + } +} + +module.exports = shouldUseNative() ? Object.assign : function (target, source) { + var from; + var to = toObject(target); + var symbols; + + for (var s = 1; s < arguments.length; s++) { + from = Object(arguments[s]); + + for (var key in from) { + if (hasOwnProperty.call(from, key)) { + to[key] = from[key]; + } + } + + if (getOwnPropertySymbols) { + symbols = getOwnPropertySymbols(from); + for (var i = 0; i < symbols.length; i++) { + if (propIsEnumerable.call(from, symbols[i])) { + to[symbols[i]] = from[symbols[i]]; + } + } + } + } + + return to; +}; + + +/***/ }), +/* 1193 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; /** - * This method is like `_.max` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the criterion by which - * the value is ranked. The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {*} Returns the maximum value. - * @example - * - * var objects = [{ 'n': 1 }, { 'n': 2 }]; - * - * _.maxBy(objects, function(o) { return o.n; }); - * // => { 'n': 2 } + * Copyright (c) 2013-present, Facebook, Inc. * - * // The `_.property` iteratee shorthand. - * _.maxBy(objects, 'n'); - * // => { 'n': 2 } + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ -function maxBy(array, iteratee) { - return (array && array.length) - ? baseExtremum(array, baseIteratee(iteratee, 2), baseGt) - : undefined; -} -module.exports = maxBy; + + +var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + +module.exports = ReactPropTypesSecret; /***/ }), -/* 1174 */ +/* 1194 */ /***/ (function(module, exports, __webpack_require__) { -var isSymbol = __webpack_require__(374); - +"use strict"; /** - * The base implementation of methods like `_.max` and `_.min` which accepts a - * `comparator` to determine the extremum value. + * Copyright (c) 2013-present, Facebook, Inc. * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The iteratee invoked per iteration. - * @param {Function} comparator The comparator used to compare values. - * @returns {*} Returns the extremum value. + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. */ -function baseExtremum(array, iteratee, comparator) { - var index = -1, - length = array.length; - while (++index < length) { - var value = array[index], - current = iteratee(value); - if (current != null && (computed === undefined - ? (current === current && !isSymbol(current)) - : comparator(current, computed) - )) { - var computed = current, - result = value; + +var printWarning = function() {}; + +if (true) { + var ReactPropTypesSecret = __webpack_require__(1193); + var loggedTypeFailures = {}; + var has = Function.call.bind(Object.prototype.hasOwnProperty); + + printWarning = function(text) { + var message = 'Warning: ' + text; + if (typeof console !== 'undefined') { + console.error(message); } - } - return result; + try { + // --- Welcome to debugging React --- + // This error was thrown as a convenience so that you can use this stack + // to find the callsite that caused this warning to fire. + throw new Error(message); + } catch (x) {} + }; } -module.exports = baseExtremum; +/** + * Assert that the values match with the type specs. + * Error messages are memorized and will only be shown once. + * + * @param {object} typeSpecs Map of name to a ReactPropType + * @param {object} values Runtime values that need to be type-checked + * @param {string} location e.g. "prop", "context", "child context" + * @param {string} componentName Name of the component for error messages. + * @param {?Function} getStack Returns the component stack. + * @private + */ +function checkPropTypes(typeSpecs, values, location, componentName, getStack) { + if (true) { + for (var typeSpecName in typeSpecs) { + if (has(typeSpecs, typeSpecName)) { + var error; + // Prop type validation may throw. In case they do, we don't want to + // fail the render phase where it didn't fail before. So we log it. + // After these have been cleaned up, we'll let them throw. + try { + // This is intentionally an invariant that gets caught. It's the same + // behavior as without this statement except with a better message. + if (typeof typeSpecs[typeSpecName] !== 'function') { + var err = Error( + (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + ); + err.name = 'Invariant Violation'; + throw err; + } + error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); + } catch (ex) { + error = ex; + } + if (error && !(error instanceof Error)) { + printWarning( + (componentName || 'React class') + ': type specification of ' + + location + ' `' + typeSpecName + '` is invalid; the type checker ' + + 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + + 'You may have forgotten to pass an argument to the type checker ' + + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + + 'shape all require an argument).' + ); + } + if (error instanceof Error && !(error.message in loggedTypeFailures)) { + // Only monitor this failure once because there tends to be a lot of the + // same error. + loggedTypeFailures[error.message] = true; + var stack = getStack ? getStack() : ''; -/***/ }), -/* 1175 */ -/***/ (function(module, exports) { + printWarning( + 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') + ); + } + } + } + } +} /** - * The base implementation of `_.gt` which doesn't coerce arguments. + * Resets warning cache when testing. * * @private - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @returns {boolean} Returns `true` if `value` is greater than `other`, - * else `false`. */ -function baseGt(value, other) { - return value > other; +checkPropTypes.resetWarningCache = function() { + if (true) { + loggedTypeFailures = {}; + } } -module.exports = baseGt; +module.exports = checkPropTypes; /***/ }), -/* 1176 */ +/* 1195 */ /***/ (function(module, exports, __webpack_require__) { -const { - createModel -} = __webpack_require__(1177); +const log = __webpack_require__(2).namespace('doctypes') + +module.exports = log -module.exports = { - createModel -}; /***/ }), -/* 1177 */ +/* 1196 */ /***/ (function(module, exports, __webpack_require__) { -const { - createClassifier -} = __webpack_require__(1178); +const Document = __webpack_require__(1179) -const { - getLabelWithTags, - tokenizer -} = __webpack_require__(1166); +const APP_DOCTYPE = 'io.cozy.apps' +const STORE_SLUG = 'store' -const { - pctOfTokensInVoc -} = __webpack_require__(1223); +class Application extends Document { + /** + * Return Store URL where an app/konnector can be installed / updated + * @param {Array} [appData=[]] Apps data, as returned by endpoint /apps/ or + * /konnectors/ + * @param {Object} [app={}] AppObject + * @return {String} URL as string + */ + static getStoreInstallationURL(appData = [], app = {}) { + if (!app.slug) { + throw new Error('Expected app / konnector with the defined slug') + } -const maxBy = __webpack_require__(1173); + const storeApp = this.isInstalled(appData, { slug: STORE_SLUG }) + if (!storeApp) return null -const logger = __webpack_require__(2); + const storeUrl = storeApp.links && storeApp.links.related -const { - LOCAL_MODEL_CATEG_FALLBACK, - LOCAL_MODEL_PROBA_FALLBACK, - LOCAL_MODEL_PCT_TOKENS_IN_VOC_THRESHOLD -} = __webpack_require__(1224); + if (!storeUrl) return null -const log = logger.namespace('categorization/localModel/model'); + return `${storeUrl}#/discover/${app.slug}/install` + } -async function createModel(options) { - log('debug', 'Create a new classifier'); - const classifier = await createClassifier(options); - const vocabulary = Object.keys(classifier.vocabulary); + /** + * + * @param {Array} apps Array of apps returned by /apps /konnectors + * @param {Object} wantedApp io.cozy.app with at least a slug + * @return {Object} The io.cozy.app is installed or undefined if not + */ + static isInstalled(apps = [], wantedApp = {}) { + return apps.find( + app => app.attributes && app.attributes.slug === wantedApp.slug + ) + } + /** + * + * @param {Object} app io.cozy.app object + * @return {String} url to the app + */ + static getUrl(app) { + return app.links && app.links.related + } +} - const categorize = transactions => { - for (const transaction of transactions) { - const label = getLabelWithTags(transaction); - const tokens = tokenizer(transaction.label); - const pctOfThisTokensInVoc = pctOfTokensInVoc(tokens, vocabulary); - let category; - let proba; // First : check if tokens from the transaction's label are in the model +Application.schema = { + doctype: APP_DOCTYPE, + attributes: {} +} - if (pctOfThisTokensInVoc > LOCAL_MODEL_PCT_TOKENS_IN_VOC_THRESHOLD) { - // If OK : continue - log('debug', `Applying model to ${label}`); - ({ - category, - proba - } = maxBy(classifier.categorize(label).likelihoods, 'proba')); - transaction.localCategoryId = category; - transaction.localCategoryProba = proba; - } else { - // If KO : abort with category '0' and proba 1/nbUniqueCat - log('debug', `Giving up for ${label}`); - category = LOCAL_MODEL_CATEG_FALLBACK; - proba = LOCAL_MODEL_PROBA_FALLBACK; - transaction.localCategoryId = category; - transaction.localCategoryProba = proba; +Application.doctype = APP_DOCTYPE + +module.exports = Application + + +/***/ }), +/* 1197 */ +/***/ (function(module, exports, __webpack_require__) { + +const Document = __webpack_require__(1179) +const BankAccount = __webpack_require__(1198) + +class BalanceHistory extends Document { + static async getByYearAndAccount(year, accountId) { + const index = await Document.getIndex(this.doctype, this.idAttributes) + const options = { + selector: { year, 'relationships.account.data._id': accountId }, + limit: 1 + } + const [balance] = await Document.query(index, options) + + if (balance) { + return balance + } + + return this.getEmptyDocument(year, accountId) + } + + static getEmptyDocument(year, accountId) { + return { + year, + balances: {}, + metadata: { + version: this.version + }, + relationships: { + account: { + data: { + _id: accountId, + _type: BankAccount.doctype + } + } } + } + } +} - log('debug', `Results for ${label} :`); - log('debug', `localCategory: ${category}`); - log('debug', `localProba: ${proba}`); +BalanceHistory.doctype = 'io.cozy.bank.balancehistories' +BalanceHistory.idAttributes = ['year', 'relationships.account.data._id'] +BalanceHistory.version = 1 +BalanceHistory.checkedAttributes = ['balances'] + +module.exports = BalanceHistory + + +/***/ }), +/* 1198 */ +/***/ (function(module, exports, __webpack_require__) { + +const groupBy = __webpack_require__(729) +const get = __webpack_require__(370) +const merge = __webpack_require__(747) +const Document = __webpack_require__(1179) +const matching = __webpack_require__(1199) +const { getSlugFromInstitutionLabel } = __webpack_require__(1201) +const log = __webpack_require__(2).namespace('BankAccount') + +class BankAccount extends Document { + /** + * Adds _id of existing accounts to fetched accounts + */ + static reconciliate(fetchedAccounts, localAccounts) { + const matchings = matching.matchAccounts(fetchedAccounts, localAccounts) + return matchings.map(matching => { + log( + 'info', + matching.match + ? `${matching.account.label} matched with ${matching.match.label} via ${matching.method}` + : `${matching.account.label} did not match with an existing account` + ) + return { + ...matching.account, + relationships: merge( + {}, + matching.match ? matching.match.relationships : null, + matching.account.relationships + ), + _id: matching.match ? matching.match._id : undefined + } + }) + } + + static findDuplicateAccountsWithNoOperations(accounts, operations) { + const opsByAccountId = groupBy(operations, op => op.account) + + const duplicateAccountGroups = Object.entries( + groupBy(accounts, x => x.institutionLabel + ' > ' + x.label) + ) + .map(([, duplicateGroup]) => duplicateGroup) + .filter(duplicateGroup => duplicateGroup.length > 1) + + const res = [] + for (const duplicateAccounts of duplicateAccountGroups) { + for (const account of duplicateAccounts) { + const accountOperations = opsByAccountId[account._id] || [] + if (accountOperations.length === 0) { + res.push(account) + } + } } - }; + return res + } - return { - categorize - }; + static hasIncoherentCreatedByApp(account) { + const predictedSlug = getSlugFromInstitutionLabel(account.institutionLabel) + const createdByApp = + account.cozyMetadata && account.cozyMetadata.createdByApp + return Boolean( + predictedSlug && createdByApp && predictedSlug !== createdByApp + ) + } + + static getUpdatedAt(account) { + const vendorUpdatedAt = get(account, 'metadata.updatedAt') + + if (vendorUpdatedAt) { + return vendorUpdatedAt + } + + const cozyUpdatedAt = get(account, 'cozyMetadata.updatedAt') + + if (cozyUpdatedAt) { + return cozyUpdatedAt + } + + return null + } } -module.exports = { - createModel -}; +BankAccount.normalizeAccountNumber = matching.normalizeAccountNumber +BankAccount.doctype = 'io.cozy.bank.accounts' +BankAccount.idAttributes = ['_id'] +BankAccount.version = 1 +BankAccount.checkedAttributes = null +BankAccount.vendorIdAttr = 'vendorId' + +module.exports = BankAccount + /***/ }), -/* 1178 */ +/* 1199 */ /***/ (function(module, exports, __webpack_require__) { -const { - fetchTransactionsWithManualCat -} = __webpack_require__(1179); +const sortBy = __webpack_require__(826) +const { eitherIncludes } = __webpack_require__(1200) +const { getSlugFromInstitutionLabel } = __webpack_require__(1201) -const { - getUniqueCategories, - getAlphaParameter -} = __webpack_require__(1223); +const findExactMatch = (attr, account, existingAccounts) => { + const sameAttr = existingAccounts.filter( + existingAccount => existingAccount[attr] === account[attr] + ) + if (sameAttr.length === 1) { + return { match: sameAttr[0], method: attr + '-exact' } + } else if (sameAttr.length > 1) { + return { matches: sameAttr, method: attr + '-exact' } + } else { + return null + } +} -const bayes = __webpack_require__(1171); +const untrimmedAccountNumber = /^(?:[A-Za-z]+)?-?([0-9]+)-?(?:[A-Za-z]+)?$/ +const redactedCreditCard = /xxxx xxxx xxxx (\d{4})/ -const { - getLabelWithTags -} = __webpack_require__(1166); +const normalizeAccountNumber = (numberArg, ibanArg) => { + const iban = ibanArg && ibanArg.replace(/\s/g, '') + const number = + numberArg && !numberArg.match(redactedCreditCard) + ? numberArg.replace(/\s/g, '') + : numberArg + let match + if (iban && iban.length == 27) { + return iban.substr(14, 11) + } -const logger = __webpack_require__(2); + if (!number) { + return number + } -const log = logger.namespace('categorization/localModel/classifier'); -const ALPHA_MIN = 2; -const ALPHA_MAX = 4; -const ALPHA_MAX_SMOOTHING = 12; -const FAKE_TRANSACTION = { - label: 'thisisafaketransaction', - manualCategoryId: '0' -}; -const TOKENS_TO_REWEIGHT = ['tag_neg', 'tag_v_b_expense', 'tag_neg tag_v_b_expense', 'tag_b_expense', 'tag_neg tag_b_expense', 'tag_expense', 'tag_neg tag_expense', 'tag_noise_neg', 'tag_neg tag_noise_neg', 'tag_pos', 'tag_noise_pos', 'tag_pos tag_noise_pos', 'tag_income', 'tag_pos tag_income', 'tag_b_income', 'tag_pos tag_b_income', 'tag_activity_income', 'tag_pos tag_activity_income']; + if (number.length == 23) { + // Must be an IBAN without the COUNTRY code + // See support demand #9102 with BI + // We extract the account number from the IBAN + // COUNTRY (4) BANK (5) COUNTER (5) NUMBER (11) KEY (2) + // FRXX 16275 10501 00300060030 00 + return number.substr(10, 11) + } else if (number.length == 16) { + // Linxo sends Bank account number that contains + // the counter number + return number.substr(5, 11) + } else if ( + number.length > 11 && + (match = number.match(untrimmedAccountNumber)) + ) { + // Some account numbers from BI are in the form + // CC-00300060030 (CC for Compte Courant) or + // LEO-00300060030 + return match[1] + } else { + return number + } +} -const getClassifierOptions = transactionsWithManualCat => { - const uniqueCategories = getUniqueCategories(transactionsWithManualCat); - const nbUniqueCategories = uniqueCategories.length; - log('debug', 'Number of unique categories in transactions with manual categories: ' + nbUniqueCategories); - const alpha = getAlphaParameter(nbUniqueCategories, ALPHA_MIN, ALPHA_MAX, ALPHA_MAX_SMOOTHING); - log('debug', 'Alpha parameter value is ' + alpha); - let addFakeTransaction = false; +/** + * If either of the account numbers has length 11 and one is contained + * in the other, it's a match + */ +const approxNumberMatch = (account, existingAccount) => { + return ( + existingAccount.number && + account.number && + (existingAccount.number.length === 11 || account.number.length === 11) && + eitherIncludes(existingAccount.number, account.number) && + Math.min(existingAccount.number.length, account.number.length) >= 4 + ) +} + +/** + * If there is no "number" attribute or null, "id" attribute is used + * in the other, it's not a match + * + * @param account + * @param existingAccount + * @returns {boolean} + */ +const noNumberMatch = (account, existingAccount) => { + const accNumber = account.number || String(account.id) + const existingAccNumber = existingAccount.number || String(existingAccount.id) + if (!account.number || !existingAccount.number) { + return eitherIncludes(accNumber, existingAccNumber) + } + return false +} + +const creditCardMatch = (account, existingAccount) => { + if (account.type !== 'CreditCard' && existingAccount.type !== 'CreditCard') { + return false + } + let ccAccount, lastDigits + for (let acc of [account, existingAccount]) { + const match = acc && acc.number && acc.number.match(redactedCreditCard) + if (match) { + ccAccount = acc + lastDigits = match[1] + } + } + const other = ccAccount === account ? existingAccount : account + if (other && other.number && other.number.slice(-4) === lastDigits) { + return true + } + return false +} + +const slugMatch = (account, existingAccount) => { + const possibleSlug = getSlugFromInstitutionLabel(account.institutionLabel) + const possibleSlugExisting = getSlugFromInstitutionLabel( + existingAccount.institutionLabel + ) + return ( + !possibleSlug || + !possibleSlugExisting || + possibleSlug === possibleSlugExisting + ) +} + +const currencyMatch = (account, existingAccount) => { + if (!account.currency) { + return false + } + return ( + (existingAccount.rawNumber && + existingAccount.rawNumber.includes(account.currency)) || + (existingAccount.label && + existingAccount.label.includes(account.currency)) || + (existingAccount.originalBankLabel && + existingAccount.originalBankLabel.includes(account.currency)) + ) +} + +const sameTypeMatch = (account, existingAccount) => { + return account.type === existingAccount.type +} + +const rules = [ + { rule: slugMatch, bonus: 0, malus: -1000 }, + { rule: approxNumberMatch, bonus: 50, malus: -50, name: 'approx-number' }, + { rule: noNumberMatch, bonus: 10, malus: -10, name: 'no-number-attr' }, + { rule: sameTypeMatch, bonus: 50, malus: 0, name: 'same-type' }, + { rule: creditCardMatch, bonus: 150, malus: 0, name: 'credit-card-number' }, + { rule: currencyMatch, bonus: 50, malus: 0, name: 'currency' } +] + +const score = (account, existingAccount) => { + const methods = [] + const res = { + account: existingAccount, + methods + } - if (nbUniqueCategories === 1) { - log('debug', 'Not enough different categories, adding a fake transaction to balance the weight of the categories'); - addFakeTransaction = true; + let points = 0 + for (let { rule, bonus, malus, name } of rules) { + const ok = rule(account, existingAccount) + if (ok && bonus) { + points += bonus + } + if (!ok && malus) { + points += malus + } + if (name && ok) { + methods.push(name) + } } + res.points = points + return res +} + +const normalizeAccount = account => { + const normalizedAccountNumber = normalizeAccountNumber( + account.number, + account.iban + ) return { - initialization: { - alpha, - fitPrior: false - }, - configuration: { - addFakeTransaction - } - }; -}; -/** - * Create a ready to use classifier for the local categorization model - * - * @param {Array} transactionsToLearn - Transactions to learn from - * @param {object} initializationOptions - Options to pass to the classifier initialization - * @param {object} configurationOptions - Options used to configure the classifier - */ + ...account, + rawNumber: account.number, + number: normalizedAccountNumber + } +} + +const exactMatchAttributes = ['iban', 'number'] +const eqNotUndefined = (attr1, attr2) => { + return attr1 && attr1 === attr2 +} -const createLocalClassifier = (transactionsToLearn, initializationOptions, configurationOptions) => { - if (transactionsToLearn.length === 0) { - throw new Error('Impossible to instanciate a classifier since there is no manually categorized transactions to learn from'); +const findMatch = (account, existingAccounts) => { + // Start with exact attribute matches + for (const exactAttribute of exactMatchAttributes) { + if (account[exactAttribute]) { + const result = findExactMatch(exactAttribute, account, existingAccounts) + if (result && result.match) { + return result + } + } } - const classifier = bayes(initializationOptions); - log('debug', 'Learning from manually categorized transactions'); + const matchOriginalNumber = existingAccounts.find( + otherAccount => + eqNotUndefined(account.originalNumber, otherAccount.number) || + eqNotUndefined(account.number, otherAccount.originalNumber) + ) + if (matchOriginalNumber) { + return { + match: matchOriginalNumber, + method: 'originalNumber-exact' + } + } - for (const transaction of transactionsToLearn) { - classifier.learn(getLabelWithTags(transaction), transaction.manualCategoryId); + const matchRawNumberCurrencyType = existingAccounts.find( + otherAccount => + (eqNotUndefined(account.rawNumber, otherAccount.number) || + eqNotUndefined(account.number, otherAccount.rawNumber)) && + otherAccount.type == account.type && + otherAccount.currency == account.currency + ) + if (matchRawNumberCurrencyType) { + return { + match: matchRawNumberCurrencyType, + method: 'rawNumber-exact-currency-type' + } } - if (configurationOptions.addFakeTransaction) { - classifier.learn(FAKE_TRANSACTION.label, FAKE_TRANSACTION.manualCategoryId); + // Now we get more fuzzy and score accounts + const scored = sortBy( + existingAccounts.map(existingAccount => score(account, existingAccount)), + x => -x.points + ) + const candidates = scored.filter(x => x.points > 0) + if (candidates.length > 0) { + return { + match: candidates[0].account, + method: candidates[0].methods.join('-') + } } +} - return classifier; -}; /** - * Reweights a word in the Naive Bayes parameter in order to mimic the - * behavior of a sublinear TF-IDF vectorizer applied to this word. - * The transformation applied is inspired by the scikit-learn object - * `sklearn.feature_extraction.text.TfidfVectorizer` with `sublinear_tf`. - * The `log(frequencyCount)` smooths the probabilities of a word across the - * possible categories to avoid the probability of the most targeted category - * to explode. + * Matches existing accounts with accounts fetched on a vendor * - * @param {*} classifier - classifier to reweight - * @param {*} category - category in which to reweight a word - * @param {*} word - word to reweight - * @param {*} frequencyCount - observed frequency count of this word in the given category + * @typedef {MatchResult} + * @property {io.cozy.account} account - Account from fetched accounts + * @property {io.cozy.account} match - Existing account that was matched. Null if no match was found. + * @property {string} method - How the two accounts were matched + * + * @param {io.cozy.account} fetchedAccounts - Account that have been fetched + * on the vendor and that will be matched with existing accounts + * @param {io.cozy.accounts} existingAccounts - Will be match against (those + * io.cozy.accounts already have an _id) + * @return {Array<MatchResult>} - Match results (as many results as fetchedAccounts.length) */ +const matchAccounts = (fetchedAccountsArg, existingAccounts) => { + const fetchedAccounts = fetchedAccountsArg.map(normalizeAccount) + const toMatch = [...existingAccounts].map(normalizeAccount) + const results = [] + for (let fetchedAccount of fetchedAccounts) { + const matchResult = findMatch(fetchedAccount, toMatch) + if (matchResult) { + const i = toMatch.indexOf(matchResult.match) + toMatch.splice(i, 1) + results.push({ account: fetchedAccount, ...matchResult }) + } else { + results.push({ account: fetchedAccount }) + } + } + return results +} +module.exports = { + matchAccounts, + normalizeAccountNumber, + score, + creditCardMatch, + approxNumberMatch +} -const reweightWord = (classifier, category, word, frequencyCount) => { - const newFrequencyCount = 1 + Math.log(frequencyCount); - const deltaFrequencyCount = frequencyCount - newFrequencyCount; // update the right entries of the classifier's parameters - - classifier.vocabulary[word] -= deltaFrequencyCount; - classifier.wordCount[category] -= deltaFrequencyCount; - classifier.wordFrequencyCount[category][word] = newFrequencyCount; -}; - -const reweightModel = classifier => { - // loop over categories in the wordFrequencyCat attribute - const wordFrequencyCount = classifier.wordFrequencyCount; // for each category - - for (const category of Object.keys(wordFrequencyCount)) { - // extract its word-frequency count `wfc` - const categoryWordsFrequencyCounts = wordFrequencyCount[category]; // and search for tokens to reweight in it - - TOKENS_TO_REWEIGHT.map(wordToReweight => { - if (categoryWordsFrequencyCounts.hasOwnProperty(wordToReweight)) { - // for every tokens to reweight : re-compute frequency count `fc` - const frequencyCount = categoryWordsFrequencyCounts[wordToReweight]; - if (frequencyCount !== 1) { - reweightWord(classifier, category, wordToReweight, frequencyCount); - } - } - }); - } -}; +/***/ }), +/* 1200 */ +/***/ (function(module, exports) { -const createClassifier = async options => { - log('debug', 'Fetching manually categorized transactions'); - const transactionsWithManualCat = await fetchTransactionsWithManualCat(); - log('debug', `Fetched ${transactionsWithManualCat.length} manually categorized transactions`); - log('debug', 'Instanciating a new classifier'); - const classifierOptions = getClassifierOptions(transactionsWithManualCat); - const classifier = createLocalClassifier(transactionsWithManualCat, { ...options, - ...classifierOptions.initialization - }, classifierOptions.configuration); - log('debug', 'Reweighting model to lower the impact of amount in the prediction'); - reweightModel(classifier); - log('debug', 'Reweighting model to lower the impact of amount in the prediction'); - reweightModel(classifier); - return classifier; -}; +const eitherIncludes = (str1, str2) => { + return Boolean(str1 && str2 && (str1.includes(str2) || str2.includes(str1))) +} module.exports = { - createClassifier -}; + eitherIncludes +} + /***/ }), -/* 1179 */ +/* 1201 */ /***/ (function(module, exports, __webpack_require__) { -const { - BankTransaction -} = __webpack_require__(1180); +const log = __webpack_require__(2).namespace('slug-account') +const labelSlugs = __webpack_require__(1202) -async function fetchTransactionsWithManualCat() { - const transactionsWithManualCat = await BankTransaction.queryAll({ - manualCategoryId: { - $exists: true +const institutionLabelsCompiled = Object.entries(labelSlugs).map( + ([ilabelRx, slug]) => { + if (ilabelRx[0] === '/' && ilabelRx[ilabelRx.length - 1] === '/') { + return [new RegExp(ilabelRx.substr(1, ilabelRx.length - 2), 'i'), slug] + } else { + return [ilabelRx, slug] } - }); - return transactionsWithManualCat; + } +) + +const getSlugFromInstitutionLabel = institutionLabel => { + if (!institutionLabel) { + log('warn', 'No institution label, cannot compute slug') + return + } + for (const [rx, slug] of institutionLabelsCompiled) { + if (rx instanceof RegExp) { + const match = institutionLabel.match(rx) + if (match) { + return slug + } + } else if (rx.toLowerCase() === institutionLabel.toLowerCase()) { + return slug + } + } + log('warn', `Could not compute slug for ${institutionLabel}`) } module.exports = { - fetchTransactionsWithManualCat -}; + getSlugFromInstitutionLabel +} -/***/ }), -/* 1180 */ -/***/ (function(module, exports, __webpack_require__) { -const Account = __webpack_require__(1181) -const AdministrativeProcedure = __webpack_require__(1189) -const Application = __webpack_require__(1199) -const Document = __webpack_require__(1182) -const BalanceHistory = __webpack_require__(1200) -const BankAccount = __webpack_require__(1201) -const BankingReconciliator = __webpack_require__(1206) -const BankTransaction = __webpack_require__(1207) -const BankAccountStats = __webpack_require__(1214) -const Contact = __webpack_require__(1190) -const CozyFile = __webpack_require__(1217) -const CozyFolder = __webpack_require__(1220) -const Group = __webpack_require__(1221) -const Permission = __webpack_require__(1222) +/***/ }), +/* 1202 */ +/***/ (function(module, exports) { module.exports = { - Account, - AdministrativeProcedure, - Application, - Document, - BalanceHistory, - BankAccount, - BankingReconciliator, - BankTransaction, - BankAccountStats, - Contact, - CozyFile, - CozyFolder, - Group, - registerClient: Document.registerClient, - Permission + 'AXA Banque': 'axabanque102', + '/Banque Populaire.*/': 'banquepopulaire', + BforBank: 'bforbank97', + 'BNP Paribas': 'bnpparibas82', + BNPP: 'bnpparibas82', + '/Boursorama.*/': 'boursorama83', + casden: 'casden173', + '/Hello bank!.*/': 'hellobank145', + Bred: 'bred', + CA: 'caatlantica3', + 'Carrefour Banque': 'carrefour159', + "/Caisse d'Épargne.*/": 'caissedepargne1', + 'Compte Nickel': 'comptenickel168', + '/^CIC.*/': 'cic63', + 'Crédit Agricole': 'caatlantica3', + 'Crédit Coopératif': 'creditcooperatif148', + '/Crédit du Nord.*/': 'cdngroup88', + '/Crédit Maritime.*/': 'creditmaritime', + '/Crédit Mutuel.*/': 'cic45', + '/Linxea/': 'linxea', + Fortuneo: 'fortuneo84', + 'Hello bank!': 'hellobank145', + 'HSBC France': 'hsbc119', + HSBC: 'hsbc119', + '/^ING.*/': 'ingdirect95', + '/La Banque Postale.*/': 'labanquepostale44', + '/LCL.*/': 'lcl-linxo', + Milleis: 'barclays136', + Monabanq: 'monabanq96', + 'Société Générale': 'societegenerale', + 'Société marseillaise de crédit': 'cdngroup109' } /***/ }), -/* 1181 */ +/* 1203 */ /***/ (function(module, exports, __webpack_require__) { -const Document = __webpack_require__(1182) -const pickBy = __webpack_require__(656) -const get = __webpack_require__(370) +const fromPairs = __webpack_require__(557) +const log = __webpack_require__(2).namespace('BankingReconciliator') -const ACCOUNTS_DOCTYPE = 'io.cozy.accounts' +class BankingReconciliator { + constructor(options) { + this.options = options + } -// Order matters -const probableLoginFieldNames = [ - 'login', - 'identifier', - 'new_identifier', - 'email' -] + async saveAccounts(fetchedAccounts, options) { + const { BankAccount } = this.options -class Account extends Document { - static getAccountName(account) { - if (!account) return null - if (account.auth) { - return ( - account.auth.accountName || this.getAccountLogin(account) || account._id - ) - } else { - return account._id - } - } + const stackAccounts = await BankAccount.fetchAll() - static getAccountLogin(account) { - if (account && account.auth) { - for (const fieldName of probableLoginFieldNames) { - if (account.auth[fieldName]) return account.auth[fieldName] - } + // Reconciliate + const reconciliatedAccounts = BankAccount.reconciliate( + fetchedAccounts, + stackAccounts + ) + + log('info', 'Saving accounts...') + const savedAccounts = await BankAccount.bulkSave(reconciliatedAccounts, { + handleDuplicates: 'remove' + }) + if (options.onAccountsSaved) { + options.onAccountsSaved(savedAccounts) } + + return { savedAccounts, reconciliatedAccounts } } /** - * Create an account document from a vault cipher + * @typedef ReconciliatorResponse + * @attribute {Array<BankAccount>} accounts + * @attribute {Array<BankTransactions>} transactions + */ + + /** + * @typedef ReconciliatorSaveOptions + * @attribute {Function} logProgress + */ + + /** + * Save new accounts and transactions * - * @param {Object} cipher - * @param {Object} [options={}] - * @param {string} [options.identifierProperty=login] - The name of the identifier property to use for this account + * @param {Array<BankAccount>} fetchedAccounts + * @param {Array<BankTransactions>} fetchedTransactions + * @param {ReconciliatorSaveOptions} options + * @returns {ReconciliatorResponse} * - * @returns {Object} */ - static fromCipher(cipher, options = {}) { - const opts = { - identifierProperty: 'login', - ...options - } - - const customFields = (get(cipher, 'fields') || []).reduce( - (fields, field) => { - fields[field.name] = field.value + async save(fetchedAccounts, fetchedTransactions, options = {}) { + const { BankAccount, BankTransaction } = this.options - return fields - }, - {} + const { reconciliatedAccounts, savedAccounts } = await this.saveAccounts( + fetchedAccounts, + options ) - const account = { - auth: pickBy( - { - [opts.identifierProperty]: get(cipher, 'login.username', ''), - password: get(cipher, 'login.password', ''), - ...customFields - }, - value => Boolean(value) - ) - } + // Bank accounts saved in Cozy, we can now link transactions to accounts + // via their cozy id + const vendorIdToCozyId = fromPairs( + savedAccounts.map(acc => [acc[BankAccount.vendorIdAttr], acc._id]) + ) + log('info', 'Linking transactions to accounts...') + log('info', JSON.stringify(vendorIdToCozyId)) - if (cipher) { - account.relationships = { - vaultCipher: { - _id: cipher.id, - _type: 'com.bitwarden.ciphers', - _protocol: 'bitwarden' - } + fetchedTransactions.forEach(tr => { + tr.account = vendorIdToCozyId[tr[BankTransaction.vendorAccountIdAttr]] + if (tr.account === undefined) { + log( + 'warn', + `Transaction without account, vendorAccountIdAttr: ${BankTransaction.vendorAccountIdAttr}` + ) + log('warn', 'transaction: ' + JSON.stringify(tr)) + throw new Error('Transaction without account.') } - } + }) - return account - } -} + const reconciliatedAccountIds = new Set( + reconciliatedAccounts.filter(acc => acc._id).map(acc => acc._id) + ) -Account.schema = { - doctype: ACCOUNTS_DOCTYPE, - attributes: {}, - relationships: { - master: { - type: 'has-one', - doctype: ACCOUNTS_DOCTYPE + // Pass to transaction reconciliation only transactions that belong + // to one of the reconciliated accounts + const stackTransactions = (await BankTransaction.fetchAll()).filter( + transaction => reconciliatedAccountIds.has(transaction.account) + ) + + const transactions = BankTransaction.reconciliate( + fetchedTransactions, + stackTransactions, + options + ) + + log('info', 'Saving transactions...') + let i = 1 + const logProgressFn = doc => { + log('debug', `[bulkSave] ${i++} Saving ${doc.date} ${doc.label}`) + } + const savedTransactions = await BankTransaction.bulkSave(transactions, { + concurrency: 30, + logProgress: + options.logProgress !== undefined ? options.logProgress : logProgressFn, + handleDuplicates: 'remove' + }) + return { + accounts: savedAccounts, + transactions: savedTransactions } } } -Account.probableLoginFieldNames = probableLoginFieldNames - -module.exports = Account +module.exports = BankingReconciliator /***/ }), -/* 1182 */ +/* 1204 */ /***/ (function(module, exports, __webpack_require__) { -const omit = __webpack_require__(632) -const pick = __webpack_require__(672) -const size = __webpack_require__(784) -const omitBy = __webpack_require__(1183) -const isUndefined = __webpack_require__(76) -const fromPairs = __webpack_require__(558) -const pickBy = __webpack_require__(656) -const flatMap = __webpack_require__(1185) -const groupBy = __webpack_require__(730) -const sortBy = __webpack_require__(828) -const get = __webpack_require__(370) -const { parallelMap } = __webpack_require__(1187) -const CozyClient = __webpack_require__(532).default -const log = __webpack_require__(2).namespace('Document') -const querystring = __webpack_require__(104) +const keyBy = __webpack_require__(704) +const groupBy = __webpack_require__(729) +const maxBy = __webpack_require__(1170) +const addDays = __webpack_require__(1205) +const isAfter = __webpack_require__(1209) +const Document = __webpack_require__(1179) +const log = __webpack_require__(1195) +const BankAccount = __webpack_require__(1198) +const { matchTransactions } = __webpack_require__(1210) +const cloneDeep = __webpack_require__(579) -const DATABASE_DOES_NOT_EXIST = 'Database does not exist.' +const maxValue = (iterable, fn) => { + const res = maxBy(iterable, fn) + return res ? fn(res) : null +} + +const getDate = transaction => { + const date = transaction.realisationDate || transaction.date + return date.slice(0, 10) +} /** - * Tell of two object attributes have any difference + * Get the date of the latest transaction in an array. + * Transactions in the future are ignored. + * + * @param {array} stackTransactions + * @returns {string} The date of the latest transaction (YYYY-MM-DD) */ -function isDifferent(o1, o2) { - // This is not supposed to happen - if (Object.keys(o1).length === 0) return true +const getSplitDate = stackTransactions => { + const now = new Date() + const notFutureTransactions = stackTransactions.filter(transaction => { + const date = getDate(transaction) + return !isAfter(date, now) + }) - for (let key in o1) { - if (o1[key] !== o2[key]) { - return true - } - } - return false + return maxValue(notFutureTransactions, getDate) } -const indexes = {} - -// Attributes that will not be updated since the -// user can change them -const userAttributes = ['shortLabel'] - -function sanitizeKey(key) { - if (key.startsWith('\\')) { - return key.slice(1) +const ensureISOString = date => { + if (date instanceof Date) { + return date.toISOString() + } else { + return date } - - return key } -function updateCreatedByApp(cozyMetadata, appSlug) { - if (!cozyMetadata.updatedByApps) { - cozyMetadata.updatedByApps = [] +class Transaction extends Document { + static getDate(transaction) { + return transaction } - const now = new Date() - for (const appInfo of cozyMetadata.updatedByApps) { - if (appInfo.slug === appSlug) { - appInfo.date = now - return + + isAfter(minDate) { + if (!minDate) { + return true + } else { + const day = ensureISOString(this.date).slice(0, 10) + if (day !== 'NaN') { + return day > minDate + } else { + log( + 'warn', + 'transaction date could not be parsed. transaction: ' + + JSON.stringify(this) + ) + return false + } } } - cozyMetadata.updatedByApps.push({ slug: appSlug, date: now }) -} - -const withoutUndefined = x => omitBy(x, isUndefined) - -const flagForDeletion = x => Object.assign({}, x, { _deleted: true }) - -const getDocumentUpdateDate = doc => { - const d = doc.cozyMetadata && doc.cozyMetadata.updatedAt - return d ? new Date(d) : null -} - -const newestDocumentComparisonFunc = doc => { - const d = getDocumentUpdateDate(doc) - return d ? -d : 0 -} -class Document { - /** - * Registers a client - * - * @param {Client} client - Cozy client from either cozy-client or cozy-client-js - */ - static registerClient(client) { - if (!this.cozyClient) { - this.cozyClient = client + isBeforeOrSame(maxDate) { + if (!maxDate) { + return true } else { - // eslint-disable-next-line no-console - console.warn( - 'Document already has been registered, this is not possible to re-register as the client is shared globally between all classes. This is to prevent concurrency bugs.' - ) - throw new Error('Document cannot be re-registered to a client.') + const day = ensureISOString(this.date).slice(0, 10) + if (day !== 'NaN') { + return day <= maxDate + } else { + log( + 'warn', + 'transaction date could not be parsed. transaction: ' + + JSON.stringify(this) + ) + return false + } } } /** - * @static copyWithClient - Returns a new class bound to a client - * - * @param {type} client Client instance - * @returns {type} A new class, with the client registered + * Get the descriptive (and almost uniq) identifier of a transaction + * @param {object} transaction - The transaction (containing at least amount, originalBankLabel and date) + * @returns {object} */ - static copyWithClient(client) { - const BaseClass = this - class ExtendedClass extends BaseClass {} - ExtendedClass.cozyClient = null - ExtendedClass.registerClient(client) - return ExtendedClass + getIdentifier() { + return `${this.amount}-${this.originalBankLabel}-${this.date}` } /** - * Returns true if Document uses a CozyClient (from cozy-client package) + * Get transactions that should be present in the stack but are not. + * Transactions that are older that 1 week before the oldest existing + * transaction are ignored. * - * @returns {boolean} true if Document uses a CozyClient - **/ - static usesCozyClient() { - return this.cozyClient instanceof CozyClient - } - - static getIndex(doctype, fields) { - if (this.usesCozyClient()) { - throw new Error('This method is not implemented yet with CozyClient') - } + * @param {array} newTransactions + * @param {array} stackTransactions + * @returns {array} + */ + static getMissedTransactions( + newTransactions, + stackTransactions, + options = {} + ) { + const oldestDate = maxValue(stackTransactions, getDate) + const frontierDate = addDays(oldestDate, -7) + const recentNewTransactions = newTransactions.filter(tr => + isAfter(getDate(tr), frontierDate) + ) + const matchingResults = Array.from( + matchTransactions(recentNewTransactions, stackTransactions) + ) - return this.getIndexViaOldClient(doctype, fields) - } + const missedTransactions = matchingResults + .filter(result => !result.match) + .map(result => result.transaction) - static getIndexViaOldClient(doctype, fields) { - const key = `${doctype}:${fields.slice().join(',')}` - const index = indexes[key] - if (!index) { - indexes[key] = this.cozyClient.data - .defineIndex(doctype, fields) - .then(index => { - indexes[key] = index - return index + const trackEvent = options.trackEvent + if (typeof trackEvent === 'function') { + try { + const nbMissed = missedTransactions.length + const nbExisting = stackTransactions.length + trackEvent({ + e_a: 'ReconciliateMissing', + e_n: 'MissedTransactionPct', + e_v: parseFloat((nbMissed / nbExisting).toFixed(2), 10) }) - } - return Promise.resolve(indexes[key]) - } - - static addCozyMetadata(attributes) { - if (!attributes.cozyMetadata) { - attributes.cozyMetadata = {} - } - - attributes.cozyMetadata.updatedAt = new Date() - - if (!attributes.cozyMetadata.createdByApp && this.createdByApp) { - attributes.cozyMetadata.createdByApp = this.createdByApp - } - - if (this.createdByApp) { - updateCreatedByApp(attributes.cozyMetadata, this.createdByApp) + trackEvent({ + e_a: 'ReconciliateMissing', + e_n: 'MissedTransactionAbs', + e_v: nbMissed + }) + } catch (e) { + log('warn', `Could not send MissedTransaction event: ${e.message}`) + } } - return attributes + return missedTransactions } /** - * Returns the item that has this id - * - * @param {string} id - The id of an item in the collection - * @returns {object} - The collection's item that has this id + * Reconcialiate remote transaction with local transaction * + * @param {Array} remoteTransactions + * @param {Array} localTransactions + * @param {Function} options.trackEvent : this callback will be called in case of split date + * @param {Boolean} options.useSplitDate : should look for a split date or not (default true) + * @returns {Array} : reconciliated transactions */ - static async get(id) { - if (!this.usesCozyClient()) { - throw new Error('This method is not implemented with cozy-client-js') + static reconciliate(remoteTransactions, localTransactions, options = {}) { + const localOptions = cloneDeep(options) + if (localOptions.useSplitDate !== false) { + localOptions.useSplitDate = true } + const findByVendorId = transaction => + localTransactions.find(t => t.vendorId === transaction.vendorId) - if (!this.doctype) { - throw new Error('doctype is not defined') - } + const groups = groupBy(remoteTransactions, transaction => + findByVendorId(transaction) ? 'updatedTransactions' : 'newTransactions' + ) - const resp = await this.cozyClient.collection(this.doctype).get(id) - return resp.data - } + let newTransactions = groups.newTransactions || [] + const updatedTransactions = groups.updatedTransactions || [] - /** - * Creates or updates a document. - * - * Before creating/updating, we try to find an existing document by - * building a selector with the idAttributes. - * - * - If not document is found, document is created - * - If a document is found, it is updated - * - If duplicates are found, it depends on options.handleDuplicates - * - * @param {String|Function} options.handleDuplicates - How duplicates are handled, see Document.duplicateHandlingStrategies - */ - static async createOrUpdate(attributes, options = {}) { - if (this.usesCozyClient()) { - return this.createOrUpdateViaNewClient(attributes, options) - } + const splitDate = localOptions.useSplitDate + ? getSplitDate(localTransactions) + : false - return this.createOrUpdateViaOldClient(attributes, options) - } + if (splitDate) { + if (typeof localOptions.trackEvent === 'function') { + localOptions.trackEvent({ + e_a: 'ReconciliateSplitDate' + }) + } - /** - * Update a document with `update` attributes. If the - * `update` does not concern "important" attributes, the original - * document is returned. Otherwise, the update document is - * returned with metadata updated. - * - * @private - */ - static applyUpdateIfDifferent(doc, update) { - // only update if some fields are different - if ( - !this.checkAttributes || - isDifferent( - pick(doc, this.checkAttributes), - pick(update, this.checkAttributes) - ) - ) { - // do not emit a mail for those attribute updates - delete update.dateImport + const isAfterSplit = x => Transaction.prototype.isAfter.call(x, splitDate) + const isBeforeSplit = x => + Transaction.prototype.isBeforeOrSame.call(x, splitDate) - const updatedDoc = this.addCozyMetadata({ - ...doc, - ...update - }) + const transactionsAfterSplit = newTransactions.filter(isAfterSplit) - return updatedDoc - } else { + if (transactionsAfterSplit.length > 0) { + log( + 'info', + `Found ${transactionsAfterSplit.length} transactions after ${splitDate}` + ) + } else { + log('info', `No transaction after ${splitDate}`) + } + + const transactionsBeforeSplit = newTransactions.filter(isBeforeSplit) log( - 'debug', - `[updateIfDifferent] No need to update ${update._id} because its \`checkedAttributes\` (${this.checkAttributes}) didn't change.` + 'info', + `Found ${transactionsBeforeSplit.length} transactions before ${splitDate}` ) - return doc + + const missedTransactions = Transaction.getMissedTransactions( + transactionsBeforeSplit, + localTransactions, + localOptions + ) + + if (missedTransactions.length > 0) { + log( + 'info', + `Found ${missedTransactions.length} missed transactions before ${splitDate}` + ) + } else { + log('info', `No missed transactions before ${splitDate}`) + } + + newTransactions = [...transactionsAfterSplit, ...missedTransactions] + } else { + log('info', "Can't find a split date, saving all new transactions") } + + log( + 'info', + `Transaction reconciliation: new ${newTransactions.length}, updated ${updatedTransactions.length}, split date ${splitDate} ` + ) + return [].concat(newTransactions).concat(updatedTransactions) } - static getHandleDuplicateStrategy(name) { - if (Document.duplicateHandlingStrategies[name]) { - return Document.duplicateHandlingStrategies[name] - } else { - throw new Error( - `${name} is not a know duplication handling strategy. Known strategies are ${Object.keys( - Document.duplicateHandlingStrategies - )}` - ) + static async getMostRecentForAccounts(accountIds) { + try { + log('debug', 'Transaction.getLast') + + const index = await Document.getIndex(this.doctype, ['date', 'account']) + const options = { + selector: { + date: { $gte: null }, + account: { + $in: accountIds + } + }, + sort: [{ date: 'desc' }] + } + const transactions = await Document.query(index, options) + log('info', 'last transactions length: ' + transactions.length) + + return transactions + } catch (e) { + log('error', e) + + return [] } } - static async handleDuplicates(strategyNameOrFnArg, duplicates, selector) { - const strategyNameOrFn = - strategyNameOrFnArg || this.defaultDuplicateHandling - const strategyFn = - typeof strategyNameOrFn === 'string' - ? this.getHandleDuplicateStrategy(strategyNameOrFn) - : strategyNameOrFn + static async deleteOrphans() { + log('info', 'Deleting up orphan operations') + const accounts = keyBy(await BankAccount.fetchAll(), '_id') + const operations = await this.fetchAll() + const orphanOperations = operations.filter(x => !accounts[x.account]) + log('info', `Total number of operations: ${operations.length}`) + log('info', `Total number of orphan operations: ${orphanOperations.length}`) + log('info', `Deleting ${orphanOperations.length} orphan operations...`) + if (orphanOperations.length > 0) { + return this.deleteAll(orphanOperations) + } + } - return await strategyFn.call(this, duplicates, selector) + getVendorAccountId() { + return this[this.constructor.vendorAccountIdAttr] } - static async createOrUpdateViaNewClient(attributes, options) { - const selector = fromPairs( - this.idAttributes.map(idAttribute => [ - idAttribute, - get(attributes, sanitizeKey(idAttribute)) - ]) - ) - let results = [] - const compactedSelector = withoutUndefined(selector) - if (size(compactedSelector) === this.idAttributes.length) { - results = await this.queryAll(selector) + static getCategoryId(transaction, options) { + const opts = { + localModelOverride: false, + localModelUsageThreshold: this.LOCAL_MODEL_USAGE_THRESHOLD, + globalModelUsageThreshold: this.GLOBAL_MODEL_USAGE_THRESHOLD, + ...options } - if (results.length === 0) { - return this.create(this.addCozyMetadata(attributes)) - } else { - results = sortBy(results, newestDocumentComparisonFunc) - if (results.length > 1) { - await this.handleDuplicates(options.handleDuplicates, results, selector) - } - const doc = results[0] - const update = omit(attributes, userAttributes) - const updatedDoc = this.applyUpdateIfDifferent(doc, update) - if (updatedDoc !== doc) { - return this.cozyClient.save(updatedDoc) - } else { - return updatedDoc - } + if (transaction.manualCategoryId) { + return transaction.manualCategoryId } - } - static async createOrUpdateViaOldClient(attributes, options) { - const selector = fromPairs( - this.idAttributes.map(idAttribute => [ - idAttribute, - get(attributes, sanitizeKey(idAttribute)) - ]) - ) - let results = [] - const compactedSelector = withoutUndefined(selector) - if (size(compactedSelector) === this.idAttributes.length) { - const index = await this.getIndex(this.doctype, this.idAttributes) - results = await this.cozyClient.data.query(index, { selector }) + if ( + opts.localModelOverride && + transaction.localCategoryId && + transaction.localCategoryProba && + transaction.localCategoryProba > opts.localModelUsageThreshold + ) { + return transaction.localCategoryId } - if (results.length === 0) { - return this.cozyClient.data.create( - this.doctype, - this.addCozyMetadata(attributes) - ) - } else { - results = sortBy(results, newestDocumentComparisonFunc) - if (results.length > 1) { - await this.handleDuplicates(options.handleDuplicates, results, selector) - } + if ( + transaction.cozyCategoryId && + transaction.cozyCategoryProba && + transaction.cozyCategoryProba > opts.globalModelUsageThreshold + ) { + return transaction.cozyCategoryId + } - const doc = results[0] - const update = omit(attributes, userAttributes) - const updatedDoc = this.applyUpdateIfDifferent(doc, update) - if (updatedDoc !== doc) { - return this.cozyClient.data.updateAttributes( - this.doctype, - updatedDoc._id, - updatedDoc - ) - } else { - return doc - } + // If the cozy categorization models have not been applied, we return null + // so the transaction is considered as « categorization in progress ». + // Otherwize we just use the automatic categorization from the vendor + if (!transaction.localCategoryId && !transaction.cozyCategoryId) { + return null } + + return transaction.automaticCategoryId } +} +Transaction.doctype = 'io.cozy.bank.operations' +Transaction.version = 1 +Transaction.vendorAccountIdAttr = 'vendorAccountId' +Transaction.vendorIdAttr = 'vendorId' +Transaction.idAttributes = ['vendorId'] +Transaction.checkedAttributes = [ + 'label', + 'originalBankLabel', + 'automaticCategoryId', + 'account' +] +Transaction.LOCAL_MODEL_USAGE_THRESHOLD = 0.8 +Transaction.GLOBAL_MODEL_USAGE_THRESHOLD = 0.15 +Transaction.getSplitDate = getSplitDate + +module.exports = Transaction + + +/***/ }), +/* 1205 */ +/***/ (function(module, exports, __webpack_require__) { + +var parse = __webpack_require__(1206) + +/** + * @category Day Helpers + * @summary Add the specified number of days to the given date. + * + * @description + * Add the specified number of days to the given date. + * + * @param {Date|String|Number} date - the date to be changed + * @param {Number} amount - the amount of days to be added + * @returns {Date} the new date with the days added + * + * @example + * // Add 10 days to 1 September 2014: + * var result = addDays(new Date(2014, 8, 1), 10) + * //=> Thu Sep 11 2014 00:00:00 + */ +function addDays (dirtyDate, dirtyAmount) { + var date = parse(dirtyDate) + var amount = Number(dirtyAmount) + date.setDate(date.getDate() + amount) + return date +} + +module.exports = addDays + + +/***/ }), +/* 1206 */ +/***/ (function(module, exports, __webpack_require__) { + +var getTimezoneOffsetInMilliseconds = __webpack_require__(1207) +var isDate = __webpack_require__(1208) + +var MILLISECONDS_IN_HOUR = 3600000 +var MILLISECONDS_IN_MINUTE = 60000 +var DEFAULT_ADDITIONAL_DIGITS = 2 + +var parseTokenDateTimeDelimeter = /[T ]/ +var parseTokenPlainTime = /:/ + +// year tokens +var parseTokenYY = /^(\d{2})$/ +var parseTokensYYY = [ + /^([+-]\d{2})$/, // 0 additional digits + /^([+-]\d{3})$/, // 1 additional digit + /^([+-]\d{4})$/ // 2 additional digits +] + +var parseTokenYYYY = /^(\d{4})/ +var parseTokensYYYYY = [ + /^([+-]\d{4})/, // 0 additional digits + /^([+-]\d{5})/, // 1 additional digit + /^([+-]\d{6})/ // 2 additional digits +] - static create(attributes) { - if (this.usesCozyClient()) { - return this.createViaNewClient(attributes) - } +// date tokens +var parseTokenMM = /^-(\d{2})$/ +var parseTokenDDD = /^-?(\d{3})$/ +var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/ +var parseTokenWww = /^-?W(\d{2})$/ +var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/ - return this.createViaOldClient(attributes) - } +// time tokens +var parseTokenHH = /^(\d{2}([.,]\d*)?)$/ +var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/ +var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/ - static createViaNewClient(attributes) { - return this.cozyClient.create(this.doctype, attributes) +// timezone tokens +var parseTokenTimezone = /([Z+-].*)$/ +var parseTokenTimezoneZ = /^(Z)$/ +var parseTokenTimezoneHH = /^([+-])(\d{2})$/ +var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/ + +/** + * @category Common Helpers + * @summary Convert the given argument to an instance of Date. + * + * @description + * Convert the given argument to an instance of Date. + * + * If the argument is an instance of Date, the function returns its clone. + * + * If the argument is a number, it is treated as a timestamp. + * + * If an argument is a string, the function tries to parse it. + * Function accepts complete ISO 8601 formats as well as partial implementations. + * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 + * + * If all above fails, the function passes the given argument to Date constructor. + * + * @param {Date|String|Number} argument - the value to convert + * @param {Object} [options] - the object with options + * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format + * @returns {Date} the parsed date in the local time zone + * + * @example + * // Convert string '2014-02-11T11:30:30' to date: + * var result = parse('2014-02-11T11:30:30') + * //=> Tue Feb 11 2014 11:30:30 + * + * @example + * // Parse string '+02014101', + * // if the additional number of digits in the extended year format is 1: + * var result = parse('+02014101', {additionalDigits: 1}) + * //=> Fri Apr 11 2014 00:00:00 + */ +function parse (argument, dirtyOptions) { + if (isDate(argument)) { + // Prevent the date to lose the milliseconds when passed to new Date() in IE10 + return new Date(argument.getTime()) + } else if (typeof argument !== 'string') { + return new Date(argument) } - static createViaOldClient(attributes) { - return this.cozyClient.data.create(this.doctype, attributes) + var options = dirtyOptions || {} + var additionalDigits = options.additionalDigits + if (additionalDigits == null) { + additionalDigits = DEFAULT_ADDITIONAL_DIGITS + } else { + additionalDigits = Number(additionalDigits) } - /** - * Save many documents concurrently - */ - static bulkSave(documents, optionsOrConcurrency, logProgressOrNothing) { - if (logProgressOrNothing || typeof optionsOrConcurrency !== 'object') { - log( - 'warn', - 'Second argument of bulkSave is now an object, please use bulkSave(documents, { logProgress, concurrency })' - ) - } + var dateStrings = splitDateString(argument) - const options = {} + var parseYearResult = parseYear(dateStrings.date, additionalDigits) + var year = parseYearResult.year + var restDateString = parseYearResult.restDateString - if (typeof optionsOrConcurrency === 'number') { - options.concurrency = optionsOrConcurrency - } + var date = parseDate(restDateString, year) - if (typeof logProgressOrNothing === 'function') { - options.logProgress = logProgressOrNothing - } + if (date) { + var timestamp = date.getTime() + var time = 0 + var offset - if (typeof optionsOrConcurrency === 'object') { - Object.assign(options, optionsOrConcurrency) + if (dateStrings.time) { + time = parseTime(dateStrings.time) } - return this._bulkSave(documents, options) - } - - /** - * @private - * - * Meat of the method bulkSave - */ - static _bulkSave(documents, options = {}) { - const { concurrency = 30, logProgress, ...createOrUpdateOptions } = options + if (dateStrings.timezone) { + offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE + } else { + var fullTime = timestamp + time + var fullTimeDate = new Date(fullTime) - return parallelMap( - documents, - async doc => { - if (logProgress) { - logProgress(doc) - } - try { - const newDoc = await this.createOrUpdate(doc, createOrUpdateOptions) - return newDoc - } catch (e) { - if (options.onCreateOrUpdateError) { - return options.onCreateOrUpdateError(e, doc) - } else { - throw e - } - } - }, - concurrency - ) - } + offset = getTimezoneOffsetInMilliseconds(fullTimeDate) - static query(index, options) { - if (this.usesCozyClient()) { - throw new Error('This method is not implemented yet with CozyClient') + // Adjust time when it's coming from DST + var fullTimeDateNextDay = new Date(fullTime) + fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1) + var offsetDiff = + getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) - + getTimezoneOffsetInMilliseconds(fullTimeDate) + if (offsetDiff > 0) { + offset += offsetDiff + } } - return this.queryViaOldClient(index, options) + return new Date(timestamp + time + offset) + } else { + return new Date(argument) } +} - static queryViaOldClient(index, options) { - return this.cozyClient.data.query(index, options) - } +function splitDateString (dateString) { + var dateStrings = {} + var array = dateString.split(parseTokenDateTimeDelimeter) + var timeString - static async fetchAll() { - const stackClient = this.usesCozyClient() - ? this.cozyClient.stackClient - : this.cozyClient + if (parseTokenPlainTime.test(array[0])) { + dateStrings.date = null + timeString = array[0] + } else { + dateStrings.date = array[0] + timeString = array[1] + } - try { - const result = await stackClient.fetchJSON( - 'GET', - `/data/${this.doctype}/_all_docs?include_docs=true` - ) - return result.rows - .filter(x => x.id.indexOf('_design') !== 0 && x.doc) - .map(x => x.doc) - } catch (e) { - if (e && e.response && e.response.status && e.response.status === 404) { - return [] - } else { - return [] - } + if (timeString) { + var token = parseTokenTimezone.exec(timeString) + if (token) { + dateStrings.time = timeString.replace(token[1], '') + dateStrings.timezone = token[1] + } else { + dateStrings.time = timeString } } - static async updateAll(docs) { - const stackClient = this.usesCozyClient() - ? this.cozyClient.stackClient - : this.cozyClient + return dateStrings +} - if (!docs || !docs.length) { - return Promise.resolve([]) - } - try { - const update = await stackClient.fetchJSON( - 'POST', - `/data/${this.doctype}/_bulk_docs`, - { - docs - } - ) - return update - } catch (e) { - if ( - e.reason && - e.reason.reason && - e.reason.reason == DATABASE_DOES_NOT_EXIST - ) { - const firstDoc = await this.create(docs[0]) - const resp = await this.updateAll(docs.slice(1)) - resp.unshift({ ok: true, id: firstDoc._id, rev: firstDoc._rev }) - return resp - } else { - throw e - } - } - } +function parseYear (dateString, additionalDigits) { + var parseTokenYYY = parseTokensYYY[additionalDigits] + var parseTokenYYYYY = parseTokensYYYYY[additionalDigits] - static async deleteAll(docs) { - return this.updateAll(docs.map(flagForDeletion)) - } + var token - /** - * Find duplicates in a list of documents according to the - * idAttributes of the class. Priority is given to the document - * prior in the list. - * - * To introduce the notion of priority, you can sort your input docs - * according to this priorirty. - * - * @param {Array[object]} docs - * @return {Array[object]} Duplicates - */ - static findDuplicates(docs) { - const fieldSeparator = '#$$$$#' - const idAttributes = this.idAttributes - const key = doc => { - return idAttributes - .map(idAttrPath => get(doc, idAttrPath)) - .join(fieldSeparator) + // YYYY or ±YYYYY + token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString) + if (token) { + var yearString = token[1] + return { + year: parseInt(yearString, 10), + restDateString: dateString.slice(yearString.length) } - const groups = pickBy(groupBy(docs, key), group => group.length > 1) - const duplicates = flatMap(groups, group => group.slice(1)) - return duplicates } - /** - * Delete duplicates on the server. Find duplicates according to the - * idAttributes. - * - * @param {Function} Priority (optional). Among duplicates, which one should be prioritized) - * @return {Promise} - * @example - * ``` - * deleteDuplicates(doc => -doc.dateImport) // will duplicate documents so that the oldest document is conserved - * ``` - */ - static async deleteDuplicates(priorityFn) { - let allDocs = await this.fetchAll() - if (priorityFn) { - allDocs = sortBy(allDocs, priorityFn) + // YY or ±YYY + token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString) + if (token) { + var centuryString = token[1] + return { + year: parseInt(centuryString, 10) * 100, + restDateString: dateString.slice(centuryString.length) } - const duplicates = this.findDuplicates(allDocs) - return this.deleteAll(duplicates) } - /** - * Use Couch _changes API - * - * @param {string} since Starting sequence for changes - * @param {[type]} options { includeDesign: false, includeDeleted: false } - */ - static async fetchChanges(since, options = {}) { - const stackClient = this.usesCozyClient() - ? this.cozyClient.stackClient - : this.cozyClient + // Invalid ISO-formatted year + return { + year: null + } +} - const queryParams = { - since, - include_docs: 'true' - } - if (options.params) { - Object.assign(queryParams, options.params) - } - const result = await stackClient.fetchJSON( - 'GET', - `/data/${this.doctype}/_changes?${querystring.stringify(queryParams)}` - ) +function parseDate (dateString, year) { + // Invalid ISO-formatted year + if (year === null) { + return null + } - const newLastSeq = result.last_seq - let docs = result.results.map(x => x.doc).filter(Boolean) + var token + var date + var month + var week - if (!options.includeDesign) { - docs = docs.filter(doc => doc._id.indexOf('_design') !== 0) - } + // YYYY + if (dateString.length === 0) { + date = new Date(0) + date.setUTCFullYear(year) + return date + } - if (!options.includeDeleted) { - docs = docs.filter(doc => !doc._deleted) - } + // YYYY-MM + token = parseTokenMM.exec(dateString) + if (token) { + date = new Date(0) + month = parseInt(token[1], 10) - 1 + date.setUTCFullYear(year, month) + return date + } - return { newLastSeq, documents: docs } + // YYYY-DDD or YYYYDDD + token = parseTokenDDD.exec(dateString) + if (token) { + date = new Date(0) + var dayOfYear = parseInt(token[1], 10) + date.setUTCFullYear(year, 0, dayOfYear) + return date } - /** - * Fetches all documents for a given doctype exceeding the 100 limit. - * It is slower that fetchAll because it fetches the data 100 by 100 but allows to filter the data - * with a selector and an index - * - * Parameters: - * - * * `selector` (object): the mango query selector - * * `index` (object): (optional) the query selector index. If not defined, the function will - * create it's own index with the keys specified in the selector - * - * - * ```javascript - * const documents = await Bills.queryAll({vendor: 'Direct Energie'}) - * ``` - * - */ - static async queryAll(selector, index) { - if (this.usesCozyClient()) { - return this.queryAllViaNewClient(selector) - } + // YYYY-MM-DD or YYYYMMDD + token = parseTokenMMDD.exec(dateString) + if (token) { + date = new Date(0) + month = parseInt(token[1], 10) - 1 + var day = parseInt(token[2], 10) + date.setUTCFullYear(year, month, day) + return date + } - return this.queryAllViaOldClient(selector, index) + // YYYY-Www or YYYYWww + token = parseTokenWww.exec(dateString) + if (token) { + week = parseInt(token[1], 10) - 1 + return dayOfISOYear(year, week) } - static async queryAllViaNewClient(selector) { - if (!selector) { - return this.fetchAll() - } + // YYYY-Www-D or YYYYWwwD + token = parseTokenWwwD.exec(dateString) + if (token) { + week = parseInt(token[1], 10) - 1 + var dayOfWeek = parseInt(token[2], 10) - 1 + return dayOfISOYear(year, week, dayOfWeek) + } - const result = [] + // Invalid ISO-formatted date + return null +} - const query = this.cozyClient.find(this.doctype).where(selector) - let resp = { next: true } - while (resp && resp.next) { - resp = await this.cozyClient.query(query.offset(result.length)) - result.push(...resp.data) - } +function parseTime (timeString) { + var token + var hours + var minutes - return result + // hh + token = parseTokenHH.exec(timeString) + if (token) { + hours = parseFloat(token[1].replace(',', '.')) + return (hours % 24) * MILLISECONDS_IN_HOUR } - static async queryAllViaOldClient(selector, indexArg) { - if (!selector) { - // fetchAll is faster in this case - return await this.fetchAll() - } - - let index = indexArg - if (!index) { - index = await this.cozyClient.data.defineIndex( - this.doctype, - Object.keys(selector) - ) - } - - const result = [] - let resp = { next: true } - while (resp && resp.next) { - resp = await this.cozyClient.data.query(index, { - selector, - wholeResponse: true, - skip: result.length - }) - result.push(...resp.docs) - } - return result + // hh:mm or hhmm + token = parseTokenHHMM.exec(timeString) + if (token) { + hours = parseInt(token[1], 10) + minutes = parseFloat(token[2].replace(',', '.')) + return (hours % 24) * MILLISECONDS_IN_HOUR + + minutes * MILLISECONDS_IN_MINUTE } - /** - * Fetch in one request a batch of documents by id. - * @param {String[]} ids - Ids of documents to fetch - * @return {Promise} - Promise resolving to an array of documents, unfound document are filtered - */ - static async getAll(ids) { - const stackClient = this.usesCozyClient() - ? this.cozyClient.stackClient - : this.cozyClient - let resp - try { - resp = await stackClient.fetchJSON( - 'POST', - `/data/${this.doctype}/_all_docs?include_docs=true`, - { - keys: ids - } - ) - } catch (error) { - if (error.message.match(/not_found/)) { - return [] - } - throw error - } - const rows = resp.rows.filter(row => row.doc) - return rows.map(row => row.doc) + // hh:mm:ss or hhmmss + token = parseTokenHHMMSS.exec(timeString) + if (token) { + hours = parseInt(token[1], 10) + minutes = parseInt(token[2], 10) + var seconds = parseFloat(token[3].replace(',', '.')) + return (hours % 24) * MILLISECONDS_IN_HOUR + + minutes * MILLISECONDS_IN_MINUTE + + seconds * 1000 } -} -Document.defaultDuplicateHandling = 'throw' + // Invalid ISO-formatted time + return null +} -Document.duplicateHandlingStrategies = { - throw: function(duplicates, selector) { - throw new Error( - 'Create or update with selectors that returns more than 1 result\n' + - JSON.stringify(selector) + - '\n' + - JSON.stringify(duplicates) - ) - }, +function parseTimezone (timezoneString) { + var token + var absoluteOffset - remove: async function(duplicates) { - const docsToRemove = duplicates.slice(1) - if (docsToRemove.length > 0) { - log( - 'warn', - `Cleaning duplicates for doctype ${this.doctype} (kept: ${ - duplicates[0]._id - }, removed: ${docsToRemove.map(x => x._id)})` - ) - await this.deleteAll(docsToRemove) - } + // Z + token = parseTokenTimezoneZ.exec(timezoneString) + if (token) { + return 0 } -} - -module.exports = Document + // ±hh + token = parseTokenTimezoneHH.exec(timezoneString) + if (token) { + absoluteOffset = parseInt(token[2], 10) * 60 + return (token[1] === '+') ? -absoluteOffset : absoluteOffset + } -/***/ }), -/* 1183 */ -/***/ (function(module, exports, __webpack_require__) { + // ±hh:mm or ±hhmm + token = parseTokenTimezoneHHMM.exec(timezoneString) + if (token) { + absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10) + return (token[1] === '+') ? -absoluteOffset : absoluteOffset + } -var baseIteratee = __webpack_require__(413), - negate = __webpack_require__(1184), - pickBy = __webpack_require__(656); + return 0 +} -/** - * The opposite of `_.pickBy`; this method creates an object composed of - * the own and inherited enumerable string keyed properties of `object` that - * `predicate` doesn't return truthy for. The predicate is invoked with two - * arguments: (value, key). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Object - * @param {Object} object The source object. - * @param {Function} [predicate=_.identity] The function invoked per property. - * @returns {Object} Returns the new object. - * @example - * - * var object = { 'a': 1, 'b': '2', 'c': 3 }; - * - * _.omitBy(object, _.isNumber); - * // => { 'b': '2' } - */ -function omitBy(object, predicate) { - return pickBy(object, negate(baseIteratee(predicate))); +function dayOfISOYear (isoYear, week, day) { + week = week || 0 + day = day || 0 + var date = new Date(0) + date.setUTCFullYear(isoYear, 0, 4) + var fourthOfJanuaryDay = date.getUTCDay() || 7 + var diff = week * 7 + day + 1 - fourthOfJanuaryDay + date.setUTCDate(date.getUTCDate() + diff) + return date } -module.exports = omitBy; +module.exports = parse /***/ }), -/* 1184 */ +/* 1207 */ /***/ (function(module, exports) { -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; +var MILLISECONDS_IN_MINUTE = 60000 /** - * Creates a function that negates the result of the predicate `func`. The - * `func` predicate is invoked with the `this` binding and arguments of the - * created function. - * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {Function} predicate The predicate to negate. - * @returns {Function} Returns the new negated function. - * @example + * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. + * They usually appear for dates that denote time before the timezones were introduced + * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891 + * and GMT+01:00:00 after that date) * - * function isEven(n) { - * return n % 2 == 0; - * } + * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above, + * which would lead to incorrect calculations. * - * _.filter([1, 2, 3, 4, 5, 6], _.negate(isEven)); - * // => [1, 3, 5] + * This function returns the timezone offset in milliseconds that takes seconds in account. */ -function negate(predicate) { - if (typeof predicate != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); - } - return function() { - var args = arguments; - switch (args.length) { - case 0: return !predicate.call(this); - case 1: return !predicate.call(this, args[0]); - case 2: return !predicate.call(this, args[0], args[1]); - case 3: return !predicate.call(this, args[0], args[1], args[2]); - } - return !predicate.apply(this, args); - }; -} +module.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) { + var date = new Date(dirtyDate.getTime()) + var baseTimezoneOffset = date.getTimezoneOffset() + date.setSeconds(0, 0) + var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE -module.exports = negate; + return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset +} /***/ }), -/* 1185 */ -/***/ (function(module, exports, __webpack_require__) { - -var baseFlatten = __webpack_require__(560), - map = __webpack_require__(1186); +/* 1208 */ +/***/ (function(module, exports) { /** - * Creates a flattened array of values by running each element in `collection` - * thru `iteratee` and flattening the mapped results. The iteratee is invoked - * with three arguments: (value, index|key, collection). + * @category Common Helpers + * @summary Is the given argument an instance of Date? * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new flattened array. - * @example + * @description + * Is the given argument an instance of Date? * - * function duplicate(n) { - * return [n, n]; - * } + * @param {*} argument - the argument to check + * @returns {Boolean} the given argument is an instance of Date * - * _.flatMap([1, 2], duplicate); - * // => [1, 1, 2, 2] + * @example + * // Is 'mayonnaise' a Date? + * var result = isDate('mayonnaise') + * //=> false */ -function flatMap(collection, iteratee) { - return baseFlatten(map(collection, iteratee), 1); +function isDate (argument) { + return argument instanceof Date } -module.exports = flatMap; +module.exports = isDate /***/ }), -/* 1186 */ +/* 1209 */ /***/ (function(module, exports, __webpack_require__) { -var arrayMap = __webpack_require__(410), - baseIteratee = __webpack_require__(413), - baseMap = __webpack_require__(739), - isArray = __webpack_require__(75); +var parse = __webpack_require__(1206) /** - * Creates an array of values by running each element in `collection` thru - * `iteratee`. The iteratee is invoked with three arguments: - * (value, index|key, collection). + * @category Common Helpers + * @summary Is the first date after the second one? * - * Many lodash methods are guarded to work as iteratees for methods like - * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`. + * @description + * Is the first date after the second one? * - * The guarded methods are: - * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`, - * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`, - * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`, - * `template`, `trim`, `trimEnd`, `trimStart`, and `words` + * @param {Date|String|Number} date - the date that should be after the other one to return true + * @param {Date|String|Number} dateToCompare - the date to compare with + * @returns {Boolean} the first date is after the second date * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [iteratee=_.identity] The function invoked per iteration. - * @returns {Array} Returns the new mapped array. * @example - * - * function square(n) { - * return n * n; - * } - * - * _.map([4, 8], square); - * // => [16, 64] - * - * _.map({ 'a': 4, 'b': 8 }, square); - * // => [16, 64] (iteration order is not guaranteed) - * - * var users = [ - * { 'user': 'barney' }, - * { 'user': 'fred' } - * ]; - * - * // The `_.property` iteratee shorthand. - * _.map(users, 'user'); - * // => ['barney', 'fred'] + * // Is 10 July 1989 after 11 February 1987? + * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11)) + * //=> true */ -function map(collection, iteratee) { - var func = isArray(collection) ? arrayMap : baseMap; - return func(collection, baseIteratee(iteratee, 3)); +function isAfter (dirtyDate, dirtyDateToCompare) { + var date = parse(dirtyDate) + var dateToCompare = parse(dirtyDateToCompare) + return date.getTime() > dateToCompare.getTime() } -module.exports = map; +module.exports = isAfter /***/ }), -/* 1187 */ +/* 1210 */ /***/ (function(module, exports, __webpack_require__) { -const PromisePool = __webpack_require__(1188) +const groupBy = __webpack_require__(729) +const sortBy = __webpack_require__(826) +const { eitherIncludes } = __webpack_require__(1200) + +const getDateTransaction = op => op.date.substr(0, 10) /** - * Like a map, executed in parallel via a promise pool - * - * @param {Array} arr Items to process - * @param {Function} fn Promise creator (will be passed each item) - * @param {Number} concurrency How many promise can be in flight at the same time - * @return {Promise} Resolved with the results of the promise, not necessary in order + * Groups `iterables` via `grouper` and returns an iterator + * that yields [groupKey, groups] */ -const parallelMap = (iterable, fn, concurrencyArg) => { - const concurrency = concurrencyArg || 30 - const res = [] - const pool = new PromisePool(function*() { - for (let item of iterable) { - yield fn(item).then(x => res.push(x)) - } - }, concurrency) - return pool.start().then(() => res) +const zipGroup = function*(iterables, grouper) { + const grouped = iterables.map(items => groupBy(items, grouper)) + for (const key of Object.keys(grouped[0]).sort()) { + const groups = grouped.map(keyedGroups => keyedGroups[key] || []) + yield [key, groups] + } } -module.exports = { - parallelMap +const squash = (str, char) => { + const rx = new RegExp(String.raw`${char}{2,}`, 'gi') + return str && str.replace(rx, char) } +const redactedNumber = /\b[0-9X]+\b/gi +const dateRx = /\b\d{2}\/\d{2}\/\d{4}\b/g -/***/ }), -/* 1188 */ -/***/ (function(module, exports, __webpack_require__) { - -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (root, factory) { - /* istanbul ignore next */ - if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) - } else {} -})(this, function () { - 'use strict' +const cleanLabel = label => label && label.replace(redactedNumber, '') +const withoutDate = str => str && str.replace(dateRx, '') +const compacted = str => str && str.replace(/\s/g, '').replace(/-/g, '') - var EventTarget = function () { - this._listeners = {} +const scoreLabel = (newTr, existingTr) => { + if ( + squash(existingTr.originalBankLabel, ' ') === + squash(newTr.originalBankLabel, ' ') + ) { + return [200, 'originalBankLabel'] + } else if ( + compacted(existingTr.originalBankLabel) === + compacted(newTr.originalBankLabel) + ) { + return [120, 'originalBankLabelCompacted'] + } else if ( + withoutDate(existingTr.originalBankLabel) === + withoutDate(newTr.originalBankLabel) + ) { + // For some transfers, the date in the originalBankLabel is different between + // BudgetInsight and Linxo + return [150, 'originalBankLabelWithoutDate'] + } else if (existingTr.label === newTr.label) { + return [100, 'label'] + } else if ( + eitherIncludes(existingTr.label.toLowerCase(), newTr.label.toLowerCase()) + ) { + return [70, 'eitherIncludes'] + } else if ( + eitherIncludes( + cleanLabel(existingTr.label.toLowerCase()), + cleanLabel(newTr.label.toLowerCase()) + ) + ) { + return [50, 'fuzzy-eitherIncludes'] + } else { + // Nothing matches, we penalize so that the score is below 0 + return [-1000, 'label-penalty'] } +} - EventTarget.prototype.addEventListener = function (type, listener) { - this._listeners[type] = this._listeners[type] || [] - if (this._listeners[type].indexOf(listener) < 0) { - this._listeners[type].push(listener) - } +const DAY = 1000 * 60 * 60 * 24 + +const getDeltaDate = (newTr, existingTr) => { + const nDate1 = new Date(newTr.date.substr(0, 10)) + const eDate1 = new Date(existingTr.date.substr(0, 10)) + const delta = Math.abs(eDate1 - nDate1) + if (newTr.realisationDate) { + const nDate2 = new Date(newTr.realisationDate.substr(0, 10)) + const delta2 = Math.abs(eDate1 - nDate2) + return Math.min(delta, delta2) + } else { + return delta } +} - EventTarget.prototype.removeEventListener = function (type, listener) { - if (this._listeners[type]) { - var p = this._listeners[type].indexOf(listener) - if (p >= 0) { - this._listeners[type].splice(p, 1) - } - } +const scoreMatching = (newTr, existingTr, options = {}) => { + const methods = [] + const res = { + op: existingTr, + methods } - EventTarget.prototype.dispatchEvent = function (evt) { - if (this._listeners[evt.type] && this._listeners[evt.type].length) { - var listeners = this._listeners[evt.type].slice() - for (var i = 0, l = listeners.length; i < l; ++i) { - listeners[i].call(this, evt) - } + if (options.maxDateDelta) { + const delta = getDeltaDate(newTr, existingTr) + if (delta > options.maxDateDelta) { + // Early exit, transactions are two far off time-wise + res.points = -1000 + return res + } else { + methods.push('approx-date') } } - var isGenerator = function (func) { - return (typeof func.constructor === 'function' && - func.constructor.name === 'GeneratorFunction') - } + const [labelPoints, labelMethod] = scoreLabel(newTr, existingTr) + methods.push(labelMethod) + const amountDiff = Math.abs(existingTr.amount - newTr.amount) + const amountPoints = amountDiff === 0 ? methods.push('amount') && 100 : -1000 - var functionToIterator = function (func) { - return { - next: function () { - var promise = func() - return promise ? {value: promise} : {done: true} - } - } - } + const points = amountPoints + labelPoints + res.points = points + return res +} - var promiseToIterator = function (promise) { - var called = false - return { - next: function () { - if (called) { - return {done: true} - } - called = true - return {value: promise} - } - } +const matchTransaction = (newTr, existingTrs, options = {}) => { + const exactVendorId = existingTrs.find( + existingTr => + existingTr.vendorId && + newTr.vendorId && + existingTr.vendorId === newTr.vendorId + ) + if (exactVendorId) { + return { match: exactVendorId, method: 'vendorId' } } - var toIterator = function (obj, Promise) { - var type = typeof obj - if (type === 'object') { - if (typeof obj.next === 'function') { - return obj + // Now we try to do it based on originalBankLabel, label and amount. + // We score candidates according to their degree of matching + // with the current transaction. + // Candidates with score below 0 will be discarded. + const withPoints = existingTrs.map(existingTr => + scoreMatching(newTr, existingTr, options) + ) + + const candidates = sortBy(withPoints, x => -x.points).filter( + x => x.points > 0 + ) + return candidates.length > 0 + ? { + match: candidates[0].op, + method: candidates[0].methods.join('-') } - /* istanbul ignore else */ - if (typeof obj.then === 'function') { - return promiseToIterator(obj) + : { + candidates } +} + +/** + * Logic to match a transaction and removing it from the transactions to + * match. `matchingFn` is the function used for matching. + */ +const matchTransactionToGroup = function*(newTrs, existingTrs, options = {}) { + const toMatch = Array.isArray(existingTrs) ? [...existingTrs] : [] + for (let newTr of newTrs) { + const res = { + transaction: newTr } - if (type === 'function') { - return isGenerator(obj) ? obj() : functionToIterator(obj) - } - return promiseToIterator(Promise.resolve(obj)) - } - var PromisePoolEvent = function (target, type, data) { - this.target = target - this.type = type - this.data = data + const result = + toMatch.length > 0 ? matchTransaction(newTr, toMatch, options) : null + if (result) { + Object.assign(res, result) + const matchIdx = toMatch.indexOf(result.match) + if (matchIdx > -1) { + toMatch.splice(matchIdx, 1) + } + } + yield res } +} - var PromisePool = function (source, concurrency, options) { - EventTarget.call(this) - if (typeof concurrency !== 'number' || - Math.floor(concurrency) !== concurrency || - concurrency < 1) { - throw new Error('Invalid concurrency') +/** + * Several logics to match transactions. + * + * First group transactions per day and match transactions in + * intra-day mode. + * Then relax the date constraint 1 day per 1 day to reach + * a maximum of 5 days of differences + */ +const matchTransactions = function*(newTrs, existingTrs) { + const unmatchedNew = new Set(newTrs) + const unmatchedExisting = new Set(existingTrs) + // eslint-disable-next-line no-unused-vars + for (let [date, [newGroup, existingGroup]] of zipGroup( + [newTrs, existingTrs], + getDateTransaction + )) { + for (let result of matchTransactionToGroup(newGroup, existingGroup)) { + if (result.match) { + unmatchedExisting.delete(result.match) + unmatchedNew.delete(result.transaction) + yield result + } } - this._concurrency = concurrency - this._options = options || {} - this._options.promise = this._options.promise || Promise - this._iterator = toIterator(source, this._options.promise) - this._done = false - this._size = 0 - this._promise = null - this._callbacks = null } - PromisePool.prototype = new EventTarget() - PromisePool.prototype.constructor = PromisePool - PromisePool.prototype.concurrency = function (value) { - if (typeof value !== 'undefined') { - this._concurrency = value - if (this.active()) { - this._proceed() + const deltas = [3, 4, 5] + for (let delta of deltas) { + for (let result of matchTransactionToGroup( + Array.from(unmatchedNew), + Array.from(unmatchedExisting), + { + maxDateDelta: delta * DAY + } + )) { + if (result.method) { + result.method += `-delta${delta}` + } + if (result.match) { + unmatchedExisting.delete(result.match) + unmatchedNew.delete(result.transaction) + } + if (result.match || delta === deltas[deltas.length - 1]) { + yield result } } - return this._concurrency } +} - PromisePool.prototype.size = function () { - return this._size - } +module.exports = { + matchTransactions, + scoreMatching +} + + +/***/ }), +/* 1211 */ +/***/ (function(module, exports, __webpack_require__) { - PromisePool.prototype.active = function () { - return !!this._promise - } +const Document = __webpack_require__(1179) +const sumBy = __webpack_require__(1212) - PromisePool.prototype.promise = function () { - return this._promise - } +class BankAccountStats extends Document { + static checkCurrencies(accountsStats) { + const currency = accountsStats[0].currency - PromisePool.prototype.start = function () { - var that = this - var Promise = this._options.promise - this._promise = new Promise(function (resolve, reject) { - that._callbacks = { - reject: reject, - resolve: resolve + for (const accountStats of accountsStats) { + if (accountStats.currency !== currency) { + return false } - that._proceed() - }) - return this._promise - } + } - PromisePool.prototype._fireEvent = function (type, data) { - this.dispatchEvent(new PromisePoolEvent(this, type, data)) + return true } - PromisePool.prototype._settle = function (error) { - if (error) { - this._callbacks.reject(error) - } else { - this._callbacks.resolve() + static sum(accountsStats) { + if (accountsStats.length === 0) { + throw new Error('You must give at least one stats object') } - this._promise = null - this._callbacks = null - } - PromisePool.prototype._onPooledPromiseFulfilled = function (promise, result) { - this._size-- - if (this.active()) { - this._fireEvent('fulfilled', { - promise: promise, - result: result - }) - this._proceed() + if (!this.checkCurrencies(accountsStats)) { + throw new Error('Currency of all stats object must be the same.') } - } - PromisePool.prototype._onPooledPromiseRejected = function (promise, error) { - this._size-- - if (this.active()) { - this._fireEvent('rejected', { - promise: promise, - error: error - }) - this._settle(error || new Error('Unknown error')) - } - } + const properties = [ + 'income', + 'additionalIncome', + 'mortgage', + 'loans', + 'fixedCharges' + ] - PromisePool.prototype._trackPromise = function (promise) { - var that = this - promise - .then(function (result) { - that._onPooledPromiseFulfilled(promise, result) - }, function (error) { - that._onPooledPromiseRejected(promise, error) - })['catch'](function (err) { - that._settle(new Error('Promise processing failed: ' + err)) - }) - } + const summedStats = properties.reduce((sums, property) => { + sums[property] = sumBy( + accountsStats, + accountStats => accountStats[property] || 0 + ) - PromisePool.prototype._proceed = function () { - if (!this._done) { - var result = { done: false } - while (this._size < this._concurrency && - !(result = this._iterator.next()).done) { - this._size++ - this._trackPromise(result.value) - } - this._done = (result === null || !!result.done) - } - if (this._done && this._size === 0) { - this._settle() - } + return sums + }, {}) + + summedStats.currency = accountsStats[0].currency + + return summedStats } +} - PromisePool.PromisePoolEvent = PromisePoolEvent - // Legacy API - PromisePool.PromisePool = PromisePool +BankAccountStats.doctype = 'io.cozy.bank.accounts.stats' +BankAccountStats.idAttributes = ['_id'] +BankAccountStats.version = 1 +BankAccountStats.checkedAttributes = null - return PromisePool -}) +module.exports = BankAccountStats /***/ }), -/* 1189 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { -const get = __webpack_require__(370) -const flatten = __webpack_require__(559) +var baseIteratee = __webpack_require__(413), + baseSum = __webpack_require__(1213); -const Contact = __webpack_require__(1190) -const Document = __webpack_require__(1182) +/** + * This method is like `_.sum` except that it accepts `iteratee` which is + * invoked for each element in `array` to generate the value to be summed. + * The iteratee is invoked with one argument: (value). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Math + * @param {Array} array The array to iterate over. + * @param {Function} [iteratee=_.identity] The iteratee invoked per element. + * @returns {number} Returns the sum. + * @example + * + * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; + * + * _.sumBy(objects, function(o) { return o.n; }); + * // => 20 + * + * // The `_.property` iteratee shorthand. + * _.sumBy(objects, 'n'); + * // => 20 + */ +function sumBy(array, iteratee) { + return (array && array.length) + ? baseSum(array, baseIteratee(iteratee, 2)) + : 0; +} -class AdministrativeProcedure extends Document { - /** - * Returns personal data for the contact - * - * @param {Contact} contact - A contact - * @param {Array} fields - The list of fields to retrieve - * @return {Object} - the personal data - **/ - static getPersonalData(contact, fields) { - const mapping = { - firstname: { - path: 'name.givenName' - }, - lastname: { - path: 'name.familyName' - }, - address: { - getter: Contact.getPrimaryAddress - }, - email: { - getter: Contact.getPrimaryEmail - }, - phone: { - getter: Contact.getPrimaryPhone - } - } - let personalData = {} - fields.forEach(field => { - const contactField = get(mapping, field, field) - let value - if (contactField.getter) { - value = contactField.getter(contact) - } else { - const path = get(contactField, 'path', field) - value = get(contact, path) - } +module.exports = sumBy; - if (value !== undefined) { - personalData[field] = value - } - }) - return personalData - } - /** - * Method to generate a query based on a few rules given by the template - * @param {Object} docRules - * @param {Object} docRules.rules - * @param {int} docRules.count - */ - static async getFilesByRules(docRules) { - const { rules, count } = docRules - const cozyRules = { - trashed: false, - type: 'file', - ...rules - } - // Create an index in order to query and sort - await this.cozyClient - .collection('io.cozy.files') - .createIndex(['metadata.datetime', 'metadata.qualification']) - // Use the index - const files = await this.cozyClient - .collection('io.cozy.files') - .find(cozyRules, { - indexedFields: ['metadata.datetime', 'metadata.qualification'], - sort: [ - { - 'metadata.datetime': 'desc' - }, - { - 'metadata.qualification': 'desc' - } - ], - limit: count ? count : 1 - }) +/***/ }), +/* 1213 */ +/***/ (function(module, exports) { - return files - } +/** + * The base implementation of `_.sum` and `_.sumBy` without support for + * iteratee shorthands. + * + * @private + * @param {Array} array The array to iterate over. + * @param {Function} iteratee The function invoked per iteration. + * @returns {number} Returns the sum. + */ +function baseSum(array, iteratee) { + var result, + index = -1, + length = array.length; - /** - * Returns a io.cozy.procedures.administratives object - * - * @param {object} data - The data we need for this type of procedure - * @param {ProcedureTemplate} template - The procedure's template - * @return {AdministrativeProcedure} the administrative procedure - */ - static create(data, template) { - const { documentsData, personalData, procedureData } = data - const files = Object.keys(documentsData).map(identifier => { - return documentsData[identifier].files.map(file => { - // TODO Remove this check. it has to be done before - if (file) - return { - _id: file.id, - _type: 'io.cozy.files', - templateDocumentId: identifier - } - }) - }) - return { - personalData, - procedureData, - submissionDate: new Date(), - templateId: template.type, - templateVersion: template.version, - relationships: { - files: { - data: flatten(files) - } - } + while (++index < length) { + var current = iteratee(array[index]); + if (current !== undefined) { + result = result === undefined ? current : (result + current); } } - - /** - * Returns json that represents the administative procedure - * - * @param {AdministrativeProcedure} - * @return {string} - the json that represents this procedure - * - */ - static createJson(administrativeProcedure) { - return JSON.stringify(administrativeProcedure) - } + return result; } -AdministrativeProcedure.doctype = 'io.cozy.procedures.administratives' - -module.exports = AdministrativeProcedure +module.exports = baseSum; /***/ }), -/* 1190 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { -const PropTypes = __webpack_require__(1191) -const get = __webpack_require__(370) - -const log = __webpack_require__(1198) -const Document = __webpack_require__(1182) - -const getPrimaryOrFirst = property => obj => { - if (!obj[property] || obj[property].length === 0) return '' - return obj[property].find(property => property.primary) || obj[property][0] -} +const trimEnd = __webpack_require__(1215) +const Document = __webpack_require__(1179) -const logDeprecated = methodName => - log( - 'warn', - `${methodName} from cozy-doctypes contact is deprecated, use cozy-client/models/contacts/${methodName} instead` - ) +const FILENAME_WITH_EXTENSION_REGEX = /(.+)(\..*)$/ /** - * Class representing the contact model. + * Class representing the file model. * @extends Document */ -class Contact extends Document { +class CozyFile extends Document { /** - * Returns true if candidate is a contact + * async getFullpath - Gets a file's path * - * @param {Object} candidate - * @return {boolean} - whether the candidate is a contact - */ - static isContact(candidate) { - return candidate._type === Contact.doctype + * @param {string} dirID The id of the parent directory + * @param {string} name The file's name + * @return {string} The full path of the file in the cozy + **/ + static async getFullpath(dirId, name) { + if (!dirId) { + throw new Error('You must provide a dirId') + } + + const parentDir = await this.get(dirId) + const parentDirectoryPath = trimEnd(parentDir.path, '/') + return `${parentDirectoryPath}/${name}` } /** - * Returns the initials of the contact. + * Move file to destination. + * + * @param {string} fileId - The file's id (required) + * @param {object} destination + * @param {string} destination.folderId - The destination folder's id (required) + * @param {string} destination.path - The file's path after the move (optional, used to optimize performance in case of conflict) + * @param {string} force - Whether we should overwrite the destination in case of conflict (defaults to false) + * @returns {Promise} - A promise that returns the move action response and the deleted file id (if any) if resolved or an Error if rejected * - * @param {Contact|string} contact - A contact or a string - * @return {string} - the contact's initials */ - static getInitials(contact) { - logDeprecated('getInitials') - if (typeof contact === 'string') { - log( - 'warn', - 'Passing a string to Contact.getInitials will be deprecated soon.' - ) - return contact[0].toUpperCase() - } + static async move(fileId, destination, force = false) { + const { folderId, path } = destination + const filesCollection = this.cozyClient.collection('io.cozy.files') + try { + const resp = await filesCollection.updateFileMetadata(fileId, { + dir_id: folderId + }) - if (contact.name) { - return ['givenName', 'familyName'] - .map(part => get(contact, ['name', part, 0], '')) - .join('') - .toUpperCase() - } + return { + moved: resp.data, + deleted: null + } + } catch (e) { + if (e.status === 409 && force) { + let destinationPath + if (path) { + destinationPath = path + } else { + const movedFile = await this.get(fileId) + const filename = movedFile.name + destinationPath = await this.getFullpath(folderId, filename) + } + const conflictResp = await filesCollection.statByPath(destinationPath) + await filesCollection.destroy(conflictResp.data) + const resp = await filesCollection.updateFileMetadata(fileId, { + dir_id: folderId + }) - const email = Contact.getPrimaryEmail(contact) - if (email) { - return email[0].toUpperCase() + return { + moved: resp.data, + deleted: conflictResp.data.id + } + } else { + throw e + } } - - log('warn', 'Contact has no name and no email.') - return '' } - /** - * Returns the contact's main email + * Method to split both the filename and the extension * - * @param {Contact} contact - A contact - * @return {string} - The contact's main email + * @param {Object} file An io.cozy.files + * @return {Object} return an object with {filename: , extension: } */ - // TODO: sadly we have different versions of contacts' doctype to handle... - // A migration tool on the stack side is needed here - static getPrimaryEmail(contact) { - logDeprecated('getPrimaryEmail') - return Array.isArray(contact.email) - ? getPrimaryOrFirst('email')(contact).address - : contact.email - } + static splitFilename(file) { + if (!file.name) throw new Error('file should have a name property ') - /** - * Returns the contact's main cozy - * - * @param {Contact} contact - A contact - * @return {string} - The contact's main cozy - */ - static getPrimaryCozy(contact) { - logDeprecated('getPrimaryCozy') - return Array.isArray(contact.cozy) - ? getPrimaryOrFirst('cozy')(contact).url - : contact.url + if (file.type === 'file') { + const match = file.name.match(FILENAME_WITH_EXTENSION_REGEX) + if (match) { + return { filename: match[1], extension: match[2] } + } + } + return { filename: file.name, extension: '' } } - /** - * Returns the contact's main phone number * - * @param {Contact} contact - A contact - * @return {string} - The contact's main phone number + * Method to upload a file even if a file with the same name already exists. + * + * @param {String} path Fullpath for the file ex: path/to/ + * @param {Object} file HTML Object file + * @param {Object} metadata An object containing the wanted metadata to attach */ - static getPrimaryPhone(contact) { - logDeprecated('getPrimaryPhone') - return getPrimaryOrFirst('phone')(contact).number - } + static async overrideFileForPath(pathArg, file, metadata) { + let path = pathArg + if (!path.endsWith('/')) path = path + '/' + + const filesCollection = this.cozyClient.collection('io.cozy.files') + try { + const existingFile = await filesCollection.statByPath(path + file.name) + const { id: fileId, dir_id: dirId } = existingFile.data + const resp = await filesCollection.updateFile(file, { + dirId, + fileId, + metadata + }) + return resp + } catch (error) { + if (/Not Found/.test(error)) { + const dirId = await filesCollection.ensureDirectoryExists(path) + const createdFile = await filesCollection.createFile(file, { + dirId, + metadata + }) + return createdFile + } + throw error + } + } /** - * Returns the contact's main address + * Method to generate a new filename if there is a conflict * - * @param {Contact} contact - A contact - * @return {string} - The contact's main address + * @param {String} filenameWithoutExtension A filename without the extension + * @return {String} A filename with the right suffix */ - static getPrimaryAddress(contact) { - logDeprecated('getPrimaryAddress') - return getPrimaryOrFirst('address')(contact).formattedAddress + static generateNewFileNameOnConflict(filenameWithoutExtension) { + // Check if the string ends by _1 + const regex = new RegExp('(_)([0-9]+)$') + const matches = filenameWithoutExtension.match(regex) + if (matches) { + let versionNumber = parseInt(matches[2]) + // increment versionNumber + versionNumber++ + const newFilenameWithoutExtension = filenameWithoutExtension.replace( + new RegExp('(_)([0-9]+)$'), + `_${versionNumber}` + ) + return newFilenameWithoutExtension + } else { + return `${filenameWithoutExtension}_1` + } } + static generateFileNameForRevision(file, revision, f) { + const { filename, extension } = CozyFile.splitFilename({ + name: file.name, + type: 'file' + }) + return `${filename}_${f( + revision.updated_at, + 'DD MMMM - HH[h]mm' + )}${extension}` + } /** - * Returns the contact's fullname - * - * @param {Contact} contact - A contact - * @return {string} - The contact's fullname + * The goal of this method is to upload a file based on a conflict strategy. + * Be careful: We need to check if the file exists by doing a statByPath query + * before trying to upload the file since if we post and the stack return a + * 409 conflict, we will get a SPDY_ERROR_PROTOCOL on Chrome. This is the only + * viable workaround + * If there is no conflict, then we upload the file. + * If there is a conflict, then we apply the conflict strategy : `erase` or `rename` + * @param {String} name File Name + * @param {ArrayBuffer} file data + * @param {String} dirId dir id where to upload + * @param {String} conflictStrategy Actually only 2 hardcoded strategies 'erase' or 'rename' + * @param {Object} metadata An object containing the metadata to attach + * @param {String} contentType content type of the file */ - static getFullname(contact) { - logDeprecated('getFullname') - if (contact.fullname) { - return contact.fullname - } else if (contact.name) { - return [ - 'namePrefix', - 'givenName', - 'additionalName', - 'familyName', - 'nameSuffix' - ] - .map(part => contact.name[part]) - .filter(part => part !== undefined) - .join(' ') - .trim() - } + static async uploadFileWithConflictStrategy( + name, + file, + dirId, + conflictStrategy, + metadata, + contentType + ) { + const filesCollection = this.cozyClient.collection('io.cozy.files') - return undefined - } + try { + const path = await CozyFile.getFullpath(dirId, name) + const existingFile = await filesCollection.statByPath(path) + const { id: fileId } = existingFile.data + if (conflictStrategy === 'erase') { + // !TODO Bug Fix. Seems we have to pass a name attribute ?! + const resp = await filesCollection.updateFile(file, { + dirId, + fileId, + name, + metadata, + contentType + }) + return resp + } else { + const { filename, extension } = CozyFile.splitFilename({ + name, + type: 'file' + }) + const newFileName = + CozyFile.generateNewFileNameOnConflict(filename) + extension + // recall itself with the newFilename. + return CozyFile.uploadFileWithConflictStrategy( + newFileName, + file, + dirId, + conflictStrategy, + metadata, + contentType + ) + } + } catch (error) { + if (/Not Found/.test(error.message)) { + return await CozyFile.upload(name, file, dirId, metadata, contentType) + } + throw error + } + } /** - * Returns a display name for the contact * - * @param {Contact} contact - A contact - * @return {string} - the contact's display name - **/ - static getDisplayName(contact) { - logDeprecated('getDisplayName') - return Contact.getFullname(contact) || Contact.getPrimaryEmail(contact) + * @param {String} name File's name + * @param {ArrayBuffer} file + * @param {String} dirId + * @param {Object} metadata + * @param {String} contentType + */ + static async upload(name, file, dirId, metadata, contentType = 'image/jpeg') { + return this.cozyClient.collection('io.cozy.files').createFile(file, { + name, + dirId, + contentType, + lastModifiedDate: new Date(), + metadata + }) } } -const ContactShape = PropTypes.shape({ - _id: PropTypes.string.isRequired, - _type: PropTypes.string.isRequired, - fullname: PropTypes.string, - name: PropTypes.shape({ - givenName: PropTypes.string, - familyName: PropTypes.string, - additionalName: PropTypes.string, - namePrefix: PropTypes.string, - nameSuffix: PropTypes.string - }), - birthday: PropTypes.string, - note: PropTypes.string, - email: PropTypes.arrayOf( - PropTypes.shape({ - address: PropTypes.string.isRequired, - label: PropTypes.string, - type: PropTypes.string, - primary: PropTypes.bool - }) - ), - address: PropTypes.arrayOf( - PropTypes.shape({ - street: PropTypes.string, - pobox: PropTypes.string, - city: PropTypes.string, - region: PropTypes.string, - postcode: PropTypes.string, - country: PropTypes.string, - type: PropTypes.string, - primary: PropTypes.bool, - label: PropTypes.string, - formattedAddress: PropTypes.string - }) - ), - phone: PropTypes.arrayOf( - PropTypes.shape({ - number: PropTypes.string.isRequired, - type: PropTypes.string, - label: PropTypes.string, - primary: PropTypes.bool - }) - ), - cozy: PropTypes.arrayOf( - PropTypes.shape({ - url: PropTypes.string.isRequired, - label: PropTypes.string, - primary: PropTypes.bool - }) - ), - company: PropTypes.string, - jobTitle: PropTypes.string, - trashed: PropTypes.bool, - me: PropTypes.bool, - relationships: PropTypes.shape({ - accounts: PropTypes.shape({ - data: PropTypes.arrayOf( - PropTypes.shape({ - _id: PropTypes.string.isRequired, - _type: PropTypes.string.isRequired - }) - ) - }), - groups: PropTypes.shape({ - data: PropTypes.arrayOf( - PropTypes.shape({ - _id: PropTypes.string.isRequired, - _type: PropTypes.string.isRequired - }) - ) - }) - }) -}) - -Contact.doctype = 'io.cozy.contacts' -Contact.propType = ContactShape +CozyFile.doctype = 'io.cozy.files' -module.exports = Contact +module.exports = CozyFile /***/ }), -/* 1191 */ +/* 1215 */ /***/ (function(module, exports, __webpack_require__) { +var baseToString = __webpack_require__(409), + castSlice = __webpack_require__(770), + charsEndIndex = __webpack_require__(1216), + stringToArray = __webpack_require__(772), + toString = __webpack_require__(408), + trimmedEndIndex = __webpack_require__(646); + /** - * Copyright (c) 2013-present, Facebook, Inc. + * Removes trailing whitespace or specified characters from `string`. * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * @static + * @memberOf _ + * @since 4.0.0 + * @category String + * @param {string} [string=''] The string to trim. + * @param {string} [chars=whitespace] The characters to trim. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {string} Returns the trimmed string. + * @example + * + * _.trimEnd(' abc '); + * // => ' abc' + * + * _.trimEnd('-_-abc-_-', '_-'); + * // => '-_-abc' */ +function trimEnd(string, chars, guard) { + string = toString(string); + if (string && (guard || chars === undefined)) { + return string.slice(0, trimmedEndIndex(string) + 1); + } + if (!string || !(chars = baseToString(chars))) { + return string; + } + var strSymbols = stringToArray(string), + end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; -if (true) { - var ReactIs = __webpack_require__(1192); + return castSlice(strSymbols, 0, end).join(''); +} - // By explicitly using `prop-types` you are opting into new development behavior. - // http://fb.me/prop-types-in-prod - var throwOnDirectAccess = true; - module.exports = __webpack_require__(1194)(ReactIs.isElement, throwOnDirectAccess); -} else {} +module.exports = trimEnd; /***/ }), -/* 1192 */ +/* 1216 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var baseIndexOf = __webpack_require__(477); +/** + * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol + * that is not found in the character symbols. + * + * @private + * @param {Array} strSymbols The string symbols to inspect. + * @param {Array} chrSymbols The character symbols to find. + * @returns {number} Returns the index of the last unmatched string symbol. + */ +function charsEndIndex(strSymbols, chrSymbols) { + var index = strSymbols.length; -if (false) {} else { - module.exports = __webpack_require__(1193); + while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} + return index; } +module.exports = charsEndIndex; + /***/ }), -/* 1193 */ +/* 1217 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** @license React v16.13.1 - * react-is.development.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. +const Application = __webpack_require__(1196) +const CozyFile = __webpack_require__(1214) + +/** + * Class representing the folder model. + * @extends CozyFile */ +class CozyFolder extends CozyFile { + /** + * Create a folder with a reference to the given document + * @param {String} path Folder path + * @param {Object} document Document to make reference to. Any doctype. + * @return {Object} Folder document + */ + static async createFolderWithReference(path, document) { + const collection = this.cozyClient.collection(CozyFile.doctype) + const dirId = await collection.ensureDirectoryExists(path) + await collection.addReferencesTo(document, [ + { + _id: dirId + } + ]) + const { data: dirInfos } = await collection.get(dirId) + return dirInfos + } + /** + * Returns a "Magic Folder", given its id + * @param {String} id Magic Folder id. `CozyFolder.magicFolders` contains the + * ids of folders that can be magic folders. + * @param {String} path Default path to use if magic folder does not exist + * @return {Object} Folder document + */ + static async ensureMagicFolder(id, path) { + const magicFolderDocument = { + _type: Application.doctype, + _id: id + } + const folders = await this.getReferencedFolders(magicFolderDocument) + const existingMagicFolder = folders.length ? folders[0] : null + if (existingMagicFolder) return existingMagicFolder -if (true) { - (function() { -'use strict'; + const magicFoldersValues = Object.values(this.magicFolders) + if (!magicFoldersValues.includes(id)) { + throw new Error( + `Cannot create Magic folder with id ${id}. Allowed values are ${magicFoldersValues.join( + ', ' + )}.` + ) + } -// The Symbol used to tag the ReactElement-like types. If there is no native Symbol -// nor polyfill, then a plain number is used for performance. -var hasSymbol = typeof Symbol === 'function' && Symbol.for; -var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7; -var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca; -var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb; -var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc; -var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2; -var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd; -var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary -// (unstable) APIs that have been removed. Can we remove the symbols? + if (!path) { + throw new Error('Magic folder default path must be defined') + } -var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf; -var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf; -var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0; -var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1; -var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8; -var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3; -var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4; -var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9; -var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5; -var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6; -var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7; + return this.createFolderWithReference(path, magicFolderDocument) + } -function isValidElementType(type) { - return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. - type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE); -} + /** + * Returns an array of folder referenced by the given document + * @param {Object} document Document to get references from + * @return {Array} Array of folders referenced with the given + * document + */ + static async getReferencedFolders(document) { + const { included } = await this.cozyClient + .collection(CozyFile.doctype) + .findReferencedBy(document) + return included.filter(folder => !this.isTrashed(folder)) + } -function typeOf(object) { - if (typeof object === 'object' && object !== null) { - var $$typeof = object.$$typeof; + /** + * Returns an unique folder referenced with the given reference. Creates it + * if it does not exist. + * @param {String} path Path used to create folder if the referenced + * folder does not exist. + * @param {Object} document Document to create references from + * @return {Objet} Folder referenced with the give reference + */ + static async ensureFolderWithReference(path, document) { + const existingFolders = await this.getReferencedFolders(document) + if (existingFolders.length) return existingFolders[0] - switch ($$typeof) { - case REACT_ELEMENT_TYPE: - var type = object.type; + const collection = this.cozyClient.collection(CozyFile.doctype) + const dirId = await collection.ensureDirectoryExists(path) + await collection.addReferencesTo(document, [ + { + _id: dirId + } + ]) - switch (type) { - case REACT_ASYNC_MODE_TYPE: - case REACT_CONCURRENT_MODE_TYPE: - case REACT_FRAGMENT_TYPE: - case REACT_PROFILER_TYPE: - case REACT_STRICT_MODE_TYPE: - case REACT_SUSPENSE_TYPE: - return type; + const { data: dirInfos } = await collection.get(dirId) - default: - var $$typeofType = type && type.$$typeof; + return dirInfos + } - switch ($$typeofType) { - case REACT_CONTEXT_TYPE: - case REACT_FORWARD_REF_TYPE: - case REACT_LAZY_TYPE: - case REACT_MEMO_TYPE: - case REACT_PROVIDER_TYPE: - return $$typeofType; + /** + * Indicates if a folder is in trash + * @param {Object} folder `io.cozy.files` document + * @return {Boolean} `true` if the folder is in trash, `false` + * otherwise. + */ + static isTrashed(folder) { + return /^\/\.cozy_trash/.test(folder.attributes.path) + } +} - default: - return $$typeof; - } +/** + * References used by the Cozy platform and apps for specific folders. + */ +CozyFolder.magicFolders = { + ADMINISTRATIVE: `${Application.doctype}/administrative`, + PHOTOS: `${Application.doctype}/photos`, + PHOTOS_BACKUP: `${Application.doctype}/photos/mobile`, + PHOTOS_UPLOAD: `${Application.doctype}/photos/upload`, + NOTES_FOLDER: `${Application.doctype}/notes` +} - } +module.exports = CozyFolder - case REACT_PORTAL_TYPE: - return $$typeof; - } - } - return undefined; -} // AsyncMode is deprecated along with isAsyncMode +/***/ }), +/* 1218 */ +/***/ (function(module, exports, __webpack_require__) { -var AsyncMode = REACT_ASYNC_MODE_TYPE; -var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE; -var ContextConsumer = REACT_CONTEXT_TYPE; -var ContextProvider = REACT_PROVIDER_TYPE; -var Element = REACT_ELEMENT_TYPE; -var ForwardRef = REACT_FORWARD_REF_TYPE; -var Fragment = REACT_FRAGMENT_TYPE; -var Lazy = REACT_LAZY_TYPE; -var Memo = REACT_MEMO_TYPE; -var Portal = REACT_PORTAL_TYPE; -var Profiler = REACT_PROFILER_TYPE; -var StrictMode = REACT_STRICT_MODE_TYPE; -var Suspense = REACT_SUSPENSE_TYPE; -var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated +const PropTypes = __webpack_require__(1188) -function isAsyncMode(object) { - { - if (!hasWarnedAboutDeprecatedIsAsyncMode) { - hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint +const Document = __webpack_require__(1179) - console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.'); - } - } +class Group extends Document {} - return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE; -} -function isConcurrentMode(object) { - return typeOf(object) === REACT_CONCURRENT_MODE_TYPE; -} -function isContextConsumer(object) { - return typeOf(object) === REACT_CONTEXT_TYPE; -} -function isContextProvider(object) { - return typeOf(object) === REACT_PROVIDER_TYPE; -} -function isElement(object) { - return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE; -} -function isForwardRef(object) { - return typeOf(object) === REACT_FORWARD_REF_TYPE; -} -function isFragment(object) { - return typeOf(object) === REACT_FRAGMENT_TYPE; -} -function isLazy(object) { - return typeOf(object) === REACT_LAZY_TYPE; -} -function isMemo(object) { - return typeOf(object) === REACT_MEMO_TYPE; -} -function isPortal(object) { - return typeOf(object) === REACT_PORTAL_TYPE; -} -function isProfiler(object) { - return typeOf(object) === REACT_PROFILER_TYPE; -} -function isStrictMode(object) { - return typeOf(object) === REACT_STRICT_MODE_TYPE; -} -function isSuspense(object) { - return typeOf(object) === REACT_SUSPENSE_TYPE; -} +const GroupShape = PropTypes.shape({ + _id: PropTypes.string.isRequired, + _type: PropTypes.string.isRequired, + name: PropTypes.string.isRequired, + trashed: PropTypes.bool +}) -exports.AsyncMode = AsyncMode; -exports.ConcurrentMode = ConcurrentMode; -exports.ContextConsumer = ContextConsumer; -exports.ContextProvider = ContextProvider; -exports.Element = Element; -exports.ForwardRef = ForwardRef; -exports.Fragment = Fragment; -exports.Lazy = Lazy; -exports.Memo = Memo; -exports.Portal = Portal; -exports.Profiler = Profiler; -exports.StrictMode = StrictMode; -exports.Suspense = Suspense; -exports.isAsyncMode = isAsyncMode; -exports.isConcurrentMode = isConcurrentMode; -exports.isContextConsumer = isContextConsumer; -exports.isContextProvider = isContextProvider; -exports.isElement = isElement; -exports.isForwardRef = isForwardRef; -exports.isFragment = isFragment; -exports.isLazy = isLazy; -exports.isMemo = isMemo; -exports.isPortal = isPortal; -exports.isProfiler = isProfiler; -exports.isStrictMode = isStrictMode; -exports.isSuspense = isSuspense; -exports.isValidElementType = isValidElementType; -exports.typeOf = typeOf; - })(); -} +Group.doctype = 'io.cozy.contacts.groups' +Group.propType = GroupShape + +module.exports = Group /***/ }), -/* 1194 */ +/* 1219 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ +const Document = __webpack_require__(1179) +class Permission extends Document {} +Permission.schema = { + doctype: 'io.cozy.permissions', + attributes: {} +} -var ReactIs = __webpack_require__(1192); -var assign = __webpack_require__(1195); +module.exports = Permission -var ReactPropTypesSecret = __webpack_require__(1196); -var checkPropTypes = __webpack_require__(1197); -var has = Function.call.bind(Object.prototype.hasOwnProperty); -var printWarning = function() {}; +/***/ }), +/* 1220 */ +/***/ (function(module, exports, __webpack_require__) { -if (true) { - printWarning = function(text) { - var message = 'Warning: ' + text; - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; -} +const uniq = __webpack_require__(630); -function emptyFunctionThatReturnsNull() { - return null; -} +const getUniqueCategories = transactions => { + return uniq(transactions.map(t => t.manualCategoryId)); +}; -module.exports = function(isValidElement, throwOnDirectAccess) { - /* global Symbol */ - var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator; - var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec. +const pctOfTokensInVoc = (tokens, vocabularyArray) => { + const n_tokens = tokens.length; + const intersection = tokens.filter(t => -1 !== vocabularyArray.indexOf(t)); + return intersection.length / n_tokens; +}; - /** - * Returns the iterator method function contained on the iterable object. - * - * Be sure to invoke the function with the iterable as context: - * - * var iteratorFn = getIteratorFn(myIterable); - * if (iteratorFn) { - * var iterator = iteratorFn.call(myIterable); - * ... - * } - * - * @param {?object} maybeIterable - * @return {?function} - */ - function getIteratorFn(maybeIterable) { - var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]); - if (typeof iteratorFn === 'function') { - return iteratorFn; - } +const getAlphaParameter = (nbUniqueCategories, min, max, maxSmoothing) => { + if (nbUniqueCategories === 1) { + return 1; + } else { + const alpha = maxSmoothing / (nbUniqueCategories + 1); + return Math.max(min, Math.min(max, alpha)); } +}; - /** - * Collection of methods that allow declaration and validation of props that are - * supplied to React components. Example usage: - * - * var Props = require('ReactPropTypes'); - * var MyArticle = React.createClass({ - * propTypes: { - * // An optional string prop named "description". - * description: Props.string, - * - * // A required enum prop named "category". - * category: Props.oneOf(['News','Photos']).isRequired, - * - * // A prop named "dialog" that requires an instance of Dialog. - * dialog: Props.instanceOf(Dialog).isRequired - * }, - * render: function() { ... } - * }); - * - * A more formal specification of how these methods are used: - * - * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...) - * decl := ReactPropTypes.{type}(.isRequired)? - * - * Each and every declaration produces a function with the same signature. This - * allows the creation of custom validation functions. For example: - * - * var MyLink = React.createClass({ - * propTypes: { - * // An optional string or URI prop named "href". - * href: function(props, propName, componentName) { - * var propValue = props[propName]; - * if (propValue != null && typeof propValue !== 'string' && - * !(propValue instanceof URI)) { - * return new Error( - * 'Expected a string or an URI for ' + propName + ' in ' + - * componentName - * ); - * } - * } - * }, - * render: function() {...} - * }); - * - * @internal - */ +module.exports = { + getUniqueCategories, + pctOfTokensInVoc, + getAlphaParameter +}; - var ANONYMOUS = '<<anonymous>>'; +/***/ }), +/* 1221 */ +/***/ (function(module, exports) { - // Important! - // Keep this list in sync with production version in `./factoryWithThrowingShims.js`. - var ReactPropTypes = { - array: createPrimitiveTypeChecker('array'), - bool: createPrimitiveTypeChecker('boolean'), - func: createPrimitiveTypeChecker('function'), - number: createPrimitiveTypeChecker('number'), - object: createPrimitiveTypeChecker('object'), - string: createPrimitiveTypeChecker('string'), - symbol: createPrimitiveTypeChecker('symbol'), +const LOCAL_MODEL_CATEG_FALLBACK = '0'; +const LOCAL_MODEL_PROBA_FALLBACK = 0.1; +const LOCAL_MODEL_PCT_TOKENS_IN_VOC_THRESHOLD = 0.1; +module.exports = { + LOCAL_MODEL_CATEG_FALLBACK, + LOCAL_MODEL_PROBA_FALLBACK, + LOCAL_MODEL_PCT_TOKENS_IN_VOC_THRESHOLD +}; - any: createAnyTypeChecker(), - arrayOf: createArrayOfTypeChecker, - element: createElementTypeChecker(), - elementType: createElementTypeTypeChecker(), - instanceOf: createInstanceTypeChecker, - node: createNodeChecker(), - objectOf: createObjectOfTypeChecker, - oneOf: createEnumTypeChecker, - oneOfType: createUnionTypeChecker, - shape: createShapeTypeChecker, - exact: createStrictShapeTypeChecker, - }; +/***/ }), +/* 1222 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * inlined Object.is polyfill to avoid requiring consumers ship their own - * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is - */ - /*eslint-disable no-self-compare*/ - function is(x, y) { - // SameValue algorithm - if (x === y) { - // Steps 1-5, 7-10 - // Steps 6.b-6.e: +0 != -0 - return x !== 0 || 1 / x === 1 / y; - } else { - // Step 6.a: NaN == NaN - return x !== x && y !== y; - } - } - /*eslint-enable no-self-compare*/ +const cozy = __webpack_require__(485); - /** - * We use an Error-like object for backward compatibility as people may call - * PropTypes directly and inspect their output. However, we don't use real - * Errors anymore. We don't inspect their stack anyway, and creating them - * is prohibitively expensive if they are created too often, such as what - * happens in oneOfType() for any type before the one that matched. - */ - function PropTypeError(message) { - this.message = message; - this.stack = ''; - } - // Make `instanceof Error` still work for returned errors. - PropTypeError.prototype = Error.prototype; +const log = __webpack_require__(2).namespace('BaseKonnector'); - function createChainableTypeChecker(validate) { - if (true) { - var manualPropTypeCallCache = {}; - var manualPropTypeWarningCount = 0; - } - function checkType(isRequired, props, propName, componentName, location, propFullName, secret) { - componentName = componentName || ANONYMOUS; - propFullName = propFullName || propName; +const { + Secret +} = __webpack_require__(2); - if (secret !== ReactPropTypesSecret) { - if (throwOnDirectAccess) { - // New behavior only for users of `prop-types` package - var err = new Error( - 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' + - 'Use `PropTypes.checkPropTypes()` to call them. ' + - 'Read more at http://fb.me/use-check-prop-types' - ); - err.name = 'Invariant Violation'; - throw err; - } else if ( true && typeof console !== 'undefined') { - // Old behavior for people using React.PropTypes - var cacheKey = componentName + ':' + propName; - if ( - !manualPropTypeCallCache[cacheKey] && - // Avoid spamming the console because they are often not actionable except for lib authors - manualPropTypeWarningCount < 3 - ) { - printWarning( - 'You are manually calling a React.PropTypes validation ' + - 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' + - 'and will throw in the standalone `prop-types` package. ' + - 'You may be seeing this warning due to a third-party PropTypes ' + - 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.' - ); - manualPropTypeCallCache[cacheKey] = true; - manualPropTypeWarningCount++; - } - } - } - if (props[propName] == null) { - if (isRequired) { - if (props[propName] === null) { - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.')); - } - return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.')); - } - return null; - } else { - return validate(props, propName, componentName, location, propFullName); - } - } +const manifest = __webpack_require__(833); - var chainedCheckType = checkType.bind(null, false); - chainedCheckType.isRequired = checkType.bind(null, true); +const saveBills = __webpack_require__(1223); - return chainedCheckType; +const saveFiles = __webpack_require__(1224); + +const signin = __webpack_require__(1262); + +const get = __webpack_require__(370); + +const omit = __webpack_require__(631); + +const updateOrCreate = __webpack_require__(1265); + +const saveIdentity = __webpack_require__(1266); + +const { + wrapIfSentrySetUp, + captureExceptionAndDie +} = __webpack_require__(1267); + +const sleep = __webpack_require__(9).promisify(global.setTimeout); + +const LOG_ERROR_MSG_LIMIT = 32 * 1024 - 1; // to avoid to cut the json long and make it unreadable by the stack + +const once = __webpack_require__(1297); + +const errors = __webpack_require__(1299); + +const findFolderPath = async (cozyFields, account) => { + // folderId will be stored in cozyFields.folder_to_save on first run + if (!cozyFields.folder_to_save) { + log('info', `No folder_to_save available in the trigger`); } - function createPrimitiveTypeChecker(expectedType) { - function validate(props, propName, componentName, location, propFullName, secret) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== expectedType) { - // `propValue` being instance of, say, date/regexp, pass the 'object' - // check, but we can offer a more precise error message here rather than - // 'of type `object`'. - var preciseType = getPreciseType(propValue); + const folderId = cozyFields.folder_to_save || account.folderId; - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.')); - } - return null; + if (folderId) { + try { + const folder = await cozy.files.statById(folderId, false); + return folder.attributes.path; + } catch (err) { + log('error', err.message); + log('error', JSON.stringify(err.stack)); + log('error', `error while getting the folder path of ${folderId}`); + throw new Error('NOT_EXISTING_DIRECTORY'); } - return createChainableTypeChecker(validate); + } else { + log('debug', 'No folder needed'); } +}; - function createAnyTypeChecker() { - return createChainableTypeChecker(emptyFunctionThatReturnsNull); +const checkTOS = err => { + if (err && err.reason && err.reason.length && err.reason[0] && err.reason[0].title === 'TOS Updated') { + throw new Error('TOS_NOT_ACCEPTED'); } +}; +/** + * @class + * The class from which all the connectors must inherit. + * It takes a fetch function in parameter that must return a `Promise`. + * You need at least the `GET` permission on `io.cozy.accounts` in your manifest to allow it to + * fetch account information for your connector. + * + * Its role is twofold : + * + * - Make the link between account data and konnector + * - Handle errors + * + * âš ï¸ A promise should be returned from the `fetch` function otherwise + * the konnector cannot know that asynchronous code has been called. + * @example + * ```javascript + * const { BaseKonnector } = require('cozy-konnector-libs') + * + * module.exports = new BaseKonnector(function fetch () { + * // use this to access the instance of the konnector to + * // store any information that needs to be passed to + * // different stages of the konnector + * return request('http://ameli.fr') + * .then(computeReimbursements) + * .then(saveBills) + * }) + * ``` + */ - function createArrayOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.'); - } - var propValue = props[propName]; - if (!Array.isArray(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.')); - } - for (var i = 0; i < propValue.length; i++) { - var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); - } - function createElementTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!isValidElement(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.')); - } - return null; +class BaseKonnector { + /** + * Constructor + * + * @param {Function} fetch - Function to be run automatically after account data is fetched. + * This function will be binded to the current connector. + * + * If not fetch function is given. The connector will have to handle itself it's own exection and + * error handling + */ + constructor(fetch) { + if (typeof fetch === 'function') { + this.fetch = fetch.bind(this); + return this.run(); } - return createChainableTypeChecker(validate); + + this.deactivateAutoSuccessfulLogin = once(this.deactivateAutoSuccessfulLogin); + errors.attachProcessEventHandlers(); } + /** + * Entrypoint of the konnector + * + * - Initializes connector attributes + * - Awaits this.main + * - Ensures errors are handled via this.fail + * - Calls this.end when the main function succeeded + */ - function createElementTypeTypeChecker() { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - if (!ReactIs.isValidElementType(propValue)) { - var propType = getPropType(propValue); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.')); - } - return null; + + async run() { + try { + log('debug', 'Preparing konnector...'); + await this.initAttributes(); + log('debug', 'Running konnector main...'); + await this.main(this.fields, this.parameters); + await this.end(); + } catch (err) { + log('warn', 'Error from konnector'); + await this.fail(err); } - return createChainableTypeChecker(validate); } + /** + * Main runs after konnector has been initialized. + * Errors thrown will be automatically handled. + * + * @returns {Promise} - The konnector is considered successful when it resolves + */ - function createInstanceTypeChecker(expectedClass) { - function validate(props, propName, componentName, location, propFullName) { - if (!(props[propName] instanceof expectedClass)) { - var expectedClassName = expectedClass.name || ANONYMOUS; - var actualClassName = getClassName(props[propName]); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.')); - } - return null; - } - return createChainableTypeChecker(validate); + + main() { + return this.fetch(this.fields, this.parameters); } + /** + * Hook called when the connector has ended successfully + */ - function createEnumTypeChecker(expectedValues) { - if (!Array.isArray(expectedValues)) { - if (true) { - if (arguments.length > 1) { - printWarning( - 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' + - 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).' - ); - } else { - printWarning('Invalid argument supplied to oneOf, expected an array.'); - } - } - return emptyFunctionThatReturnsNull; - } - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - for (var i = 0; i < expectedValues.length; i++) { - if (is(propValue, expectedValues[i])) { - return null; - } - } + end() { + log('debug', 'The connector has been run'); + } + /** + * Hook called when the connector fails + */ - var valuesString = JSON.stringify(expectedValues, function replacer(key, value) { - var type = getPreciseType(value); - if (type === 'symbol') { - return String(value); - } - return value; - }); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.')); - } - return createChainableTypeChecker(validate); + + fail(err) { + log('debug', 'Error caught by BaseKonnector'); + const error = err.message || err; + this.terminate(error); } - function createObjectOfTypeChecker(typeChecker) { - function validate(props, propName, componentName, location, propFullName) { - if (typeof typeChecker !== 'function') { - return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.'); - } - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.')); - } - for (var key in propValue) { - if (has(propValue, key)) { - var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error instanceof Error) { - return error; - } - } - } - return null; + async getAccount(accountId) { + try { + return await cozy.data.find('io.cozy.accounts', accountId); + } catch (err) { + checkTOS(err); + log('error', err.message); + log('error', `Account ${accountId} does not exist`); + throw new Error('CANNOT_FIND_ACCOUNT'); } - return createChainableTypeChecker(validate); } + /** + * Initializes konnector attributes that will be used during its lifetime + * + * - this._account + * - this.fields + */ - function createUnionTypeChecker(arrayOfTypeCheckers) { - if (!Array.isArray(arrayOfTypeCheckers)) { - true ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : undefined; - return emptyFunctionThatReturnsNull; - } - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (typeof checker !== 'function') { - printWarning( - 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' + - 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.' - ); - return emptyFunctionThatReturnsNull; - } - } + async initAttributes() { + // Parse environment variables + const cozyFields = JSON.parse(process.env.COZY_FIELDS || '{}'); + const cozyParameters = JSON.parse(process.env.COZY_PARAMETERS || '{}'); + this.parameters = cozyParameters; // Set account - function validate(props, propName, componentName, location, propFullName) { - for (var i = 0; i < arrayOfTypeCheckers.length; i++) { - var checker = arrayOfTypeCheckers[i]; - if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) { - return null; - } - } + const account = await this.getAccount(cozyFields.account); - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.')); + if (!account || !account._id) { + log('warn', 'No account was retrieved from getAccount'); } - return createChainableTypeChecker(validate); - } - function createNodeChecker() { - function validate(props, propName, componentName, location, propFullName) { - if (!isNode(props[propName])) { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.')); - } - return null; - } - return createChainableTypeChecker(validate); - } + this.accountId = account._id; + this._account = new Secret(account); // Set folder - function createShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - for (var key in shapeTypes) { - var checker = shapeTypes[key]; - if (!checker) { - continue; - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); + const folderPath = await findFolderPath(cozyFields, account); + cozyFields.folder_to_save = folderPath; + this.fields = Object.assign({}, account.auth, account.oauth, folderPath ? { + folderPath + } : {}); } + /** + * Saves data to the account that is passed to the konnector. + * Use it to persist data that needs to be passed to each + * konnector run. + * + * By default, the data is merged to the remote data, use + * `options.merge = false` to overwrite the data. + * + * The data is saved under the `.data` attribute of the cozy + * account. + * + * Don't forget to modify the manifest.konnector file to give the right to write on the + * `io.cozy.accounts` doctype. The syntax can be : `"permissions": {"accounts": {"type": "io.cozy.accounts"}}` (here we juste removed the verb `GET`) + * + * @param {object} data - Attributes to be merged + * @param {object} options - { merge: true|false } + * @returns {Promise}: resolved with the modified account + */ - function createStrictShapeTypeChecker(shapeTypes) { - function validate(props, propName, componentName, location, propFullName) { - var propValue = props[propName]; - var propType = getPropType(propValue); - if (propType !== 'object') { - return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.')); - } - // We need to check all keys in case some are required but missing from - // props. - var allKeys = assign({}, props[propName], shapeTypes); - for (var key in allKeys) { - var checker = shapeTypes[key]; - if (!checker) { - return new PropTypeError( - 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' + - '\nBad object: ' + JSON.stringify(props[propName], null, ' ') + - '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ') - ); - } - var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret); - if (error) { - return error; - } - } - return null; - } - return createChainableTypeChecker(validate); + saveAccountData(data, options) { + options = options || {}; + options.merge = options.merge === undefined ? true : options.merge; + const start = options.merge ? Object.assign({}, this.getAccountData()) : {}; + const newData = Object.assign({}, start, data); + return this.updateAccountAttributes({ + data: newData + }).then(account => account.data); } + /** + * Get the data saved by saveAccountData + * + * @returns {object} the account data + */ - function isNode(propValue) { - switch (typeof propValue) { - case 'number': - case 'string': - case 'undefined': - return true; - case 'boolean': - return !propValue; - case 'object': - if (Array.isArray(propValue)) { - return propValue.every(isNode); - } - if (propValue === null || isValidElement(propValue)) { - return true; - } - - var iteratorFn = getIteratorFn(propValue); - if (iteratorFn) { - var iterator = iteratorFn.call(propValue); - var step; - if (iteratorFn !== propValue.entries) { - while (!(step = iterator.next()).done) { - if (!isNode(step.value)) { - return false; - } - } - } else { - // Iterator will provide entry [k,v] tuples rather than values. - while (!(step = iterator.next()).done) { - var entry = step.value; - if (entry) { - if (!isNode(entry[1])) { - return false; - } - } - } - } - } else { - return false; - } - return true; - default: - return false; - } + getAccountData() { + return new Secret(this._account.data || {}); } + /** + * Update account attributes and cache the account + */ - function isSymbol(propType, propValue) { - // Native Symbol. - if (propType === 'symbol') { - return true; - } - // falsy value can't be a Symbol - if (!propValue) { - return false; - } + updateAccountAttributes(attributes) { + return cozy.data.updateAttributes('io.cozy.accounts', this.accountId, attributes).then(account => { + this._account = new Secret(account); + return account; + }); + } + /** + * Sets the 2FA state, according to the type passed. + * Doing so resets the twoFACode field + * + * Typically you should not use that directly, prefer to use waitForTwoFaCode since + * the wait for user input will be handled for you. It is useful though for the "app" + * type where no user input (inside Cozy) is needed. + * + * @param {object} options - The list of options + * @param {string} options.type - Used by the front to show the right message (email/sms/app/app_code) + * @param {boolean} options.retry - Is this function call a retry ? This changes the resulting message to the user + */ - // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol' - if (propValue['@@toStringTag'] === 'Symbol') { - return true; - } - // Fallback for non-spec compliant Symbols which are polyfilled. - if (typeof Symbol === 'function' && propValue instanceof Symbol) { - return true; + async setTwoFAState({ + type, + retry = false + } = {}) { + let state = retry ? 'TWOFA_NEEDED_RETRY' : 'TWOFA_NEEDED'; + + if (type === 'email') { + state += '.EMAIL'; + } else if (type === 'sms') { + state += '.SMS'; + } else if (type === 'app_code') { + state += '.APP_CODE'; + } else if (type === 'app') { + state += '.APP'; } - return false; + log('debug', `Setting ${state} state into the current account`); + await this.updateAccountAttributes({ + state, + twoFACode: null + }); } + /** + * Resets 2FA state when not needed anymore + */ - // Equivalent of `typeof` but with special handling for array and regexp. - function getPropType(propValue) { - var propType = typeof propValue; - if (Array.isArray(propValue)) { - return 'array'; - } - if (propValue instanceof RegExp) { - // Old webkits (at least until Android 4.0) return 'function' rather than - // 'object' for typeof a RegExp. We'll normalize this here so that /bla/ - // passes PropTypes.object. - return 'object'; - } - if (isSymbol(propType, propValue)) { - return 'symbol'; - } - return propType; - } - // This handles more types than `getPropType`. Only used for error messages. - // See `createPrimitiveTypeChecker`. - function getPreciseType(propValue) { - if (typeof propValue === 'undefined' || propValue === null) { - return '' + propValue; - } - var propType = getPropType(propValue); - if (propType === 'object') { - if (propValue instanceof Date) { - return 'date'; - } else if (propValue instanceof RegExp) { - return 'regexp'; - } - } - return propType; + async resetTwoFAState() { + await this.updateAccountAttributes({ + state: null, + twoFACode: null + }); } + /** + * Notices that 2FA code is needed and wait for the user to submit it. + * It uses the account to do the communication with the user. + * + * @param {object} options - The list of options + * @param {string} options.type (default: "email") - Type of the expected 2FA code. The message displayed + * to the user will depend on it. Possible values: email, sms + * @param {number} options.timeout (default 3 minutes after now) - After this date, the stop will stop waiting and + * and an error will be shown to the user (deprecated and alias of endTime) + * @param {number} options.endTime (default 3 minutes after now) - After this timestamp, the home will stop waiting and + * and an error will be shown to the user + * @param {number} options.heartBeat (default: 5000) - How many milliseconds between each code check + * @param {boolean} options.retry (default: false) - Is it a retry. If true, an error message will be + * displayed to the user + * @throws Will throw `USER_ACTION_NEEDED.TWOFA_EXPIRED` if the konnector job is not run manually (we assume that + * not run manually means that we do not have a graphic interface to fill the required information) + * @throws Will throw `USER_ACTION_NEEDED.TWOFA_EXPIRED` if 2FA is not filled by the user soon enough + * @returns {Promise} Contains twoFa code entered by user + * @example + * + * ```javascript + * const { BaseKonnector } = require('cozy-konnector-libs') + * + * module.exports = new BaseKonnector(start) + + * async function start() { + * // we detect the need of a 2FA code + * const code = this.waitForTwoFaCode({ + * type: 'email' + * }) + * // send the code to the targeted site + * } + * ``` + */ - // Returns a string that is postfixed to a warning about an invalid type. - // For example, "undefined" or "of type array" - function getPostfixForTypeWarning(value) { - var type = getPreciseType(value); - switch (type) { - case 'array': - case 'object': - return 'an ' + type; - case 'boolean': - case 'date': - case 'regexp': - return 'a ' + type; - default: - return type; - } - } - // Returns class name of the object, if any. - function getClassName(propValue) { - if (!propValue.constructor || !propValue.constructor.name) { - return ANONYMOUS; + async waitForTwoFaCode(options = {}) { + if (process.env.COZY_JOB_MANUAL_EXECUTION !== 'true') { + log('warn', `waitForTwoFaCode: this in not a manual execution. It is not possible to handle 2FA here.`); + throw new Error('USER_ACTION_NEEDED.TWOFA_EXPIRED'); } - return propValue.constructor.name; - } - ReactPropTypes.checkPropTypes = checkPropTypes; - ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache; - ReactPropTypes.PropTypes = ReactPropTypes; + const startTime = Date.now(); + const ms = 1; + const s = 1000 * ms; + const m = 60 * s; + const defaultParams = { + type: 'email', + endTime: startTime + 3 * m, + heartBeat: 5 * s, + retry: false + }; + options = { ...defaultParams, + ...options + }; - return ReactPropTypes; -}; + if (options.timeout) { + log('warn', `The timeout option for waitForTwoFaCode is deprecated. Please use the endTime option now`); + options.endTime = options.timeout; + } + let account = {}; + await this.setTwoFAState({ + type: options.type, + retry: options.retry + }); -/***/ }), -/* 1195 */ -/***/ (function(module, exports, __webpack_require__) { + while (Date.now() < options.endTime && !account.twoFACode) { + await sleep(options.heartBeat); + account = await cozy.data.find('io.cozy.accounts', this.accountId); + log('debug', `current accountState : ${account.state}`); + log('debug', `current twoFACode : ${account.twoFACode}`); + } -"use strict"; -/* -object-assign -(c) Sindre Sorhus -@license MIT -*/ + if (account.twoFACode) { + await this.resetTwoFAState(); + return account.twoFACode; + } + throw new Error('USER_ACTION_NEEDED.TWOFA_EXPIRED'); + } + /** + * Tells Cozy-Home that we have successfully logged in. + * Useful when auto-success has been deactivated. + * See `deactivateAutoSuccess` + */ -/* eslint-disable no-unused-vars */ -var getOwnPropertySymbols = Object.getOwnPropertySymbols; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var propIsEnumerable = Object.prototype.propertyIsEnumerable; -function toObject(val) { - if (val === null || val === undefined) { - throw new TypeError('Object.assign cannot be called with null or undefined'); - } + async notifySuccessfulLogin() { + log('debug', 'Notify Cozy-Home of successful login'); + await this.updateAccountAttributes({ + state: 'LOGIN_SUCCESS' + }); + } + /** + * By default, cozy-home considers that the konnector has successfully logged in + * when the konnector has run for more than 8s. This is problematic for 2FA since + * the konnector can sit idle, just waiting for the 2FA to come back. + * + * When this method is called, cozy-home is notified and will not consider the + * absence of error after 8s to be a success. Afterwards, to notify cozy-home when + * the user has logged in successfully, for example, after the user has entered 2FA + * codes, it is necessary to call `notifySuccessfulLogin`. + * + * Does nothing if called more than once. + */ - return Object(val); -} -function shouldUseNative() { - try { - if (!Object.assign) { - return false; - } + async deactivateAutoSuccessfulLogin() { + log('debug', 'Deactivating auto success for Cozy-Home'); + await this.updateAccountAttributes({ + state: 'HANDLE_LOGIN_SUCCESS' + }); + } + /** + * This is saveBills function from cozy-konnector-libs which automatically adds sourceAccount in + * metadata of each entry + * + * @returns {Promise} resolves with entries hydrated with db data + */ - // Detect buggy property enumeration order in older V8 versions. - // https://bugs.chromium.org/p/v8/issues/detail?id=4118 - var test1 = new String('abc'); // eslint-disable-line no-new-wrappers - test1[5] = 'de'; - if (Object.getOwnPropertyNames(test1)[0] === '5') { - return false; - } + saveBills(entries, fields, options) { + return saveBills(entries, fields, { + sourceAccount: this.accountId, + sourceAccountIdentifier: fields.login, + ...options + }); + } + /** + * This is saveFiles function from cozy-konnector-libs which automatically adds sourceAccount and + * sourceAccountIdentifier cozyMetadatas to files + * + * @returns {Promise} resolves with the list of entries with file objects + */ - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test2 = {}; - for (var i = 0; i < 10; i++) { - test2['_' + String.fromCharCode(i)] = i; - } - var order2 = Object.getOwnPropertyNames(test2).map(function (n) { - return test2[n]; - }); - if (order2.join('') !== '0123456789') { - return false; - } - // https://bugs.chromium.org/p/v8/issues/detail?id=3056 - var test3 = {}; - 'abcdefghijklmnopqrst'.split('').forEach(function (letter) { - test3[letter] = letter; - }); - if (Object.keys(Object.assign({}, test3)).join('') !== - 'abcdefghijklmnopqrst') { - return false; - } + saveFiles(entries, fields, options) { + return saveFiles(entries, fields, { + sourceAccount: this.accountId, + sourceAccountIdentifier: fields.login, + ...options + }); + } + /** + * This is updateOrCreate function from cozy-konnector-libs which automatically adds sourceAccount in + * metadata of each entry + * + * @returns {Promise} resolves to an array of db objects + */ - return true; - } catch (err) { - // We don't expect any of the above to throw, but better to be safe. - return false; - } -} -module.exports = shouldUseNative() ? Object.assign : function (target, source) { - var from; - var to = toObject(target); - var symbols; + updateOrCreate(entries, doctype, matchingAttributes, options) { + return updateOrCreate(entries, doctype, matchingAttributes, { + sourceAccount: this.accountId, + sourceAccountIdentifier: get(options, 'fields.login'), + ...options + }); + } + /** + * This is saveIdentity function from cozy-konnector-libs which automatically adds sourceAccount in + * metadata of each entry + * + * @returns {Promise} empty promise + */ - for (var s = 1; s < arguments.length; s++) { - from = Object(arguments[s]); - for (var key in from) { - if (hasOwnProperty.call(from, key)) { - to[key] = from[key]; - } - } + saveIdentity(contact, accountIdentifier, options = {}) { + return saveIdentity(contact, accountIdentifier, { + sourceAccount: this.accountId, + sourceAccountIdentifier: accountIdentifier, + ...options + }); + } + /** + * This is signin function from cozy-konnector-libs which automatically adds deactivateAutoSuccessfulLogin + * and notifySuccessfulLogin calls + * + * @returns {Promise} resolve with an object containing form data + */ - if (getOwnPropertySymbols) { - symbols = getOwnPropertySymbols(from); - for (var i = 0; i < symbols.length; i++) { - if (propIsEnumerable.call(from, symbols[i])) { - to[symbols[i]] = from[symbols[i]]; - } - } - } - } - return to; -}; + async signin(options = {}) { + await this.deactivateAutoSuccessfulLogin(); + const result = await signin(omit(options, 'notifySuccessfulLogin')); + if (options.notifySuccessfulLogin !== false) { + await this.notifySuccessfulLogin(); + } -/***/ }), -/* 1196 */ -/***/ (function(module, exports, __webpack_require__) { + return result; + } + /** + * Send a special error code which is interpreted by the cozy stack to terminate the execution of the + * connector now + * + * @param {string} err - The error code to be saved as connector result see [docs/ERROR_CODES.md] + * @example + * ```javascript + * this.terminate('LOGIN_FAILED') + * ``` + */ -"use strict"; -/** - * Copyright (c) 2013-present, Facebook, Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ + terminate(err) { + log('critical', String(err).substr(0, LOG_ERROR_MSG_LIMIT)); + captureExceptionAndDie(err); + } + /** + * Get cozyMetaData from the context of the connector + * + * @param {object} data - this data will be merged with cozyMetaData + */ -var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED'; + getCozyMetadata(data) { + Object.assign(data, { + sourceAccount: this.accountId + }); + return manifest.getCozyMetadata(data); + } -module.exports = ReactPropTypesSecret; +} +wrapIfSentrySetUp(BaseKonnector.prototype, 'run'); +BaseKonnector.findFolderPath = findFolderPath; +BaseKonnector.checkTOS = checkTOS; +module.exports = BaseKonnector; /***/ }), -/* 1197 */ +/* 1223 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; /** - * Copyright (c) 2013-present, Facebook, Inc. + * Encapsulates the saving of Bills : saves the files, saves the new data, and associate the files + * to an existing bank operation * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. + * @module saveBills */ +const utils = __webpack_require__(484); +const saveFiles = __webpack_require__(1224); +const hydrateAndFilter = __webpack_require__(369); -var printWarning = function() {}; +const addData = __webpack_require__(1244); -if (true) { - var ReactPropTypesSecret = __webpack_require__(1196); - var loggedTypeFailures = {}; - var has = Function.call.bind(Object.prototype.hasOwnProperty); +const log = __webpack_require__(2).namespace('saveBills'); - printWarning = function(text) { - var message = 'Warning: ' + text; - if (typeof console !== 'undefined') { - console.error(message); - } - try { - // --- Welcome to debugging React --- - // This error was thrown as a convenience so that you can use this stack - // to find the callsite that caused this warning to fire. - throw new Error(message); - } catch (x) {} - }; -} +const linkBankOperations = __webpack_require__(1245); -/** - * Assert that the values match with the type specs. - * Error messages are memorized and will only be shown once. - * - * @param {object} typeSpecs Map of name to a ReactPropType - * @param {object} values Runtime values that need to be type-checked - * @param {string} location e.g. "prop", "context", "child context" - * @param {string} componentName Name of the component for error messages. - * @param {?Function} getStack Returns the component stack. - * @private - */ -function checkPropTypes(typeSpecs, values, location, componentName, getStack) { - if (true) { - for (var typeSpecName in typeSpecs) { - if (has(typeSpecs, typeSpecName)) { - var error; - // Prop type validation may throw. In case they do, we don't want to - // fail the render phase where it didn't fail before. So we log it. - // After these have been cleaned up, we'll let them throw. - try { - // This is intentionally an invariant that gets caught. It's the same - // behavior as without this statement except with a better message. - if (typeof typeSpecs[typeSpecName] !== 'function') { - var err = Error( - (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + - 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' - ); - err.name = 'Invariant Violation'; - throw err; - } - error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret); - } catch (ex) { - error = ex; - } - if (error && !(error instanceof Error)) { - printWarning( - (componentName || 'React class') + ': type specification of ' + - location + ' `' + typeSpecName + '` is invalid; the type checker ' + - 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' + - 'You may have forgotten to pass an argument to the type checker ' + - 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + - 'shape all require an argument).' - ); - } - if (error instanceof Error && !(error.message in loggedTypeFailures)) { - // Only monitor this failure once because there tends to be a lot of the - // same error. - loggedTypeFailures[error.message] = true; +const DOCTYPE = 'io.cozy.bills'; - var stack = getStack ? getStack() : ''; +const _ = __webpack_require__(823); - printWarning( - 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '') - ); - } - } - } - } -} +const manifest = __webpack_require__(833); +const requiredAttributes = { + date: 'isDate', + amount: 'isNumber', + vendor: 'isString' +}; /** - * Resets warning cache when testing. + * Combines the features of `saveFiles`, `hydrateAndFilter`, `addData` and `linkBankOperations` for a + * common case: bills. + * Will create `io.cozy.bills` objects. The default deduplication keys are `['date', 'amount', 'vendor']`. + * You need the full permission on `io.cozy.bills`, full permission on `io.cozy.files` and also + * full permission on `io.cozy.bank.operations` in your manifest, to be able to use this function. * - * @private + * Parameters: + * + * - `documents` is an array of objects with any attributes with some mandatory attributes : + * + `amount` (Number): the amount of the bill used to match bank operations + * + `date` (Date): the date of the bill also used to match bank operations + * + `vendor` (String): the name of the vendor associated to the bill. Ex: 'trainline' + * + `currency` (String) default: EUR: The ISO currency value (not mandatory since there is a + * default value. + * + `contractId` (String): Contract unique identicator used to deduplicate bills + * + `contractLabel`: (String) User label if define, must be used with contractId + * + `matchingCriterias` (Object): criterias that can be used by an external service to match bills + * with bank operations. If not specified but the 'banksTransactionRegExp' attribute is specified in the + * manifest of the connector, this value is automatically added to the bill + * + * You can also pass attributes expected by `saveFiles` : fileurl, filename, requestOptions + * and more + * + * Please take a look at [io.cozy.bills doctype documentation](https://github.com/cozy/cozy-doctypes/blob/master/docs/io.cozy.bills.md) + * - `fields` (object) this is the first parameter given to BaseKonnector's constructor + * - `options` is passed directly to `saveFiles`, `hydrateAndFilter`, `addData` and `linkBankOperations`. + * + * @example + * + * ```javascript + * const { BaseKonnector, saveBills } = require('cozy-konnector-libs') + * + * module.exports = new BaseKonnector(function fetch (fields) { + * const documents = [] + * // some code which fills documents + * return saveBills(documents, fields, { + * identifiers: ['vendor'] + * }) + * }) + * ``` + * @alias module:saveBills */ -checkPropTypes.resetWarningCache = function() { - if (true) { - loggedTypeFailures = {}; - } -} -module.exports = checkPropTypes; +const saveBills = async (inputEntries, fields, inputOptions = {}) => { + // Cloning input arguments since both entries and options are expected + // to be modified by functions called inside saveBills. + const entries = _.cloneDeepWith(inputEntries, value => { + // do not try to clone streams https://github.com/konnectors/libs/issues/682 + if (value && value.readable) { + return value; + } + return undefined; + }); -/***/ }), -/* 1198 */ -/***/ (function(module, exports, __webpack_require__) { + const options = _.cloneDeep(inputOptions); -const log = __webpack_require__(2).namespace('doctypes') + if (!_.isArray(entries) || entries.length === 0) { + log('warn', 'saveBills: no bills to save'); + return Promise.resolve(); + } -module.exports = log + if (!options.sourceAccount) { + log('warn', 'There is no sourceAccount given to saveBills'); + } + if (!options.sourceAccountIdentifier) { + log('warn', 'There is no sourceAccountIdentifier given to saveBills'); + } -/***/ }), -/* 1199 */ -/***/ (function(module, exports, __webpack_require__) { + if (typeof fields === 'string') { + fields = { + folderPath: fields + }; + } // Deduplicate on this keys -const Document = __webpack_require__(1182) -const APP_DOCTYPE = 'io.cozy.apps' -const STORE_SLUG = 'store' + options.keys = options.keys || Object.keys(requiredAttributes); + const originalEntries = entries; -class Application extends Document { - /** - * Return Store URL where an app/konnector can be installed / updated - * @param {Array} [appData=[]] Apps data, as returned by endpoint /apps/ or - * /konnectors/ - * @param {Object} [app={}] AppObject - * @return {String} URL as string - */ - static getStoreInstallationURL(appData = [], app = {}) { - if (!app.slug) { - throw new Error('Expected app / konnector with the defined slug') - } + const defaultShouldUpdate = (entry, dbEntry) => entry.invoice !== dbEntry.invoice || !dbEntry.cozyMetadata || !dbEntry.matchingCriterias; - const storeApp = this.isInstalled(appData, { slug: STORE_SLUG }) - if (!storeApp) return null + if (!options.shouldUpdate) { + options.shouldUpdate = defaultShouldUpdate; + } else { + const fn = options.shouldUpdate; - const storeUrl = storeApp.links && storeApp.links.related + options.shouldUpdate = (entry, dbEntry) => { + return defaultShouldUpdate(entry, dbEntry) || fn(entry, dbEntry); + }; + } - if (!storeUrl) return null + let tempEntries; + tempEntries = manageContractsData(entries, options); + tempEntries = await saveFiles(tempEntries, fields, options); - return `${storeUrl}#/discover/${app.slug}/install` - } + if (options.processPdf) { + let moreEntries = []; - /** - * - * @param {Array} apps Array of apps returned by /apps /konnectors - * @param {Object} wantedApp io.cozy.app with at least a slug - * @return {Object} The io.cozy.app is installed or undefined if not - */ - static isInstalled(apps = [], wantedApp = {}) { - return apps.find( - app => app.attributes && app.attributes.slug === wantedApp.slug - ) - } - /** - * - * @param {Object} app io.cozy.app object - * @return {String} url to the app - */ - static getUrl(app) { - return app.links && app.links.related - } -} + for (let entry of tempEntries) { + if (entry.fileDocument) { + let pdfContent; -Application.schema = { - doctype: APP_DOCTYPE, - attributes: {} -} + try { + pdfContent = await utils.getPdfText(entry.fileDocument._id); // allow to create more entries related to the same file -Application.doctype = APP_DOCTYPE + const result = await options.processPdf(entry, pdfContent.text, pdfContent); + if (result && result.length) moreEntries = [...moreEntries, ...result]; + } catch (err) { + log('warn', `processPdf: Failed to read pdf content in ${_.get(entry, 'fileDocument.attributes.name')}`); + log('warn', err.message); + entry.__ignore = true; + } + } + } -module.exports = Application + if (moreEntries.length) tempEntries = [...tempEntries, ...moreEntries]; + } // try to get transaction regexp from the manifest -/***/ }), -/* 1200 */ -/***/ (function(module, exports, __webpack_require__) { + let defaultTransactionRegexp = null; -const Document = __webpack_require__(1182) -const BankAccount = __webpack_require__(1201) + if (Object.keys(manifest.data).length && manifest.data.banksTransactionRegExp) { + defaultTransactionRegexp = manifest.data.banksTransactionRegExp; + } -class BalanceHistory extends Document { - static async getByYearAndAccount(year, accountId) { - const index = await Document.getIndex(this.doctype, this.idAttributes) - const options = { - selector: { year, 'relationships.account.data._id': accountId }, - limit: 1 - } - const [balance] = await Document.query(index, options) + tempEntries = tempEntries.filter(entry => !entry.__ignore) // we do not save bills without associated file anymore + .filter(entry => entry.fileDocument).map(entry => { + entry.currency = convertCurrency(entry.currency); + entry.invoice = `io.cozy.files:${entry.fileDocument._id}`; + const matchingCriterias = entry.matchingCriterias || {}; - if (balance) { - return balance + if (defaultTransactionRegexp && !matchingCriterias.labelRegex) { + matchingCriterias.labelRegex = defaultTransactionRegexp; + entry.matchingCriterias = matchingCriterias; } - return this.getEmptyDocument(year, accountId) + delete entry.fileDocument; + delete entry.fileAttributes; + return entry; + }); + checkRequiredAttributes(tempEntries); + tempEntries = await hydrateAndFilter(tempEntries, DOCTYPE, options); + tempEntries = await addData(tempEntries, DOCTYPE, options); + + if (options.linkBankOperations !== false) { + tempEntries = await linkBankOperations(originalEntries, DOCTYPE, fields, options); + log('debug', 'after linkbankoperation'); } - static getEmptyDocument(year, accountId) { - return { - year, - balances: {}, - metadata: { - version: this.version - }, - relationships: { - account: { - data: { - _id: accountId, - _type: BankAccount.doctype - } - } - } + return tempEntries; +}; + +function convertCurrency(currency) { + if (currency) { + if (currency.includes('€')) { + return 'EUR'; + } else if (currency.includes('$')) { + return 'USD'; + } else if (currency.includes('£')) { + return 'GBP'; + } else { + return currency; } + } else { + return 'EUR'; } } -BalanceHistory.doctype = 'io.cozy.bank.balancehistories' -BalanceHistory.idAttributes = ['year', 'relationships.account.data._id'] -BalanceHistory.version = 1 -BalanceHistory.checkedAttributes = ['balances'] - -module.exports = BalanceHistory - - -/***/ }), -/* 1201 */ -/***/ (function(module, exports, __webpack_require__) { - -const groupBy = __webpack_require__(730) -const get = __webpack_require__(370) -const merge = __webpack_require__(748) -const Document = __webpack_require__(1182) -const matching = __webpack_require__(1202) -const { getSlugFromInstitutionLabel } = __webpack_require__(1204) -const log = __webpack_require__(2).namespace('BankAccount') - -class BankAccount extends Document { - /** - * Adds _id of existing accounts to fetched accounts - */ - static reconciliate(fetchedAccounts, localAccounts) { - const matchings = matching.matchAccounts(fetchedAccounts, localAccounts) - return matchings.map(matching => { - log( - 'info', - matching.match - ? `${matching.account.label} matched with ${matching.match.label} via ${matching.method}` - : `${matching.account.label} did not match with an existing account` - ) - return { - ...matching.account, - relationships: merge( - {}, - matching.match ? matching.match.relationships : null, - matching.account.relationships - ), - _id: matching.match ? matching.match._id : undefined +function checkRequiredAttributes(entries) { + for (let entry of entries) { + for (let attr in requiredAttributes) { + if (entry[attr] == null) { + throw new Error(`saveBills: an entry is missing the required ${attr} attribute`); } - }) - } - static findDuplicateAccountsWithNoOperations(accounts, operations) { - const opsByAccountId = groupBy(operations, op => op.account) + const checkFunction = requiredAttributes[attr]; - const duplicateAccountGroups = Object.entries( - groupBy(accounts, x => x.institutionLabel + ' > ' + x.label) - ) - .map(([, duplicateGroup]) => duplicateGroup) - .filter(duplicateGroup => duplicateGroup.length > 1) + const isExpectedType = _(entry[attr])[checkFunction](); - const res = [] - for (const duplicateAccounts of duplicateAccountGroups) { - for (const account of duplicateAccounts) { - const accountOperations = opsByAccountId[account._id] || [] - if (accountOperations.length === 0) { - res.push(account) - } + if (isExpectedType === false) { + throw new Error(`saveBills: an entry has a ${attr} which does not respect ${checkFunction}`); } } - return res } +} - static hasIncoherentCreatedByApp(account) { - const predictedSlug = getSlugFromInstitutionLabel(account.institutionLabel) - const createdByApp = - account.cozyMetadata && account.cozyMetadata.createdByApp - return Boolean( - predictedSlug && createdByApp && predictedSlug !== createdByApp - ) +function manageContractsData(tempEntries, options) { + if (options.contractLabel && options.contractId === undefined) { + log('warn', 'contractLabel used without contractId, ignoring it.'); + return tempEntries; } - static getUpdatedAt(account) { - const vendorUpdatedAt = get(account, 'metadata.updatedAt') + let newEntries = tempEntries; // if contractId passed by option - if (vendorUpdatedAt) { - return vendorUpdatedAt - } + if (options.contractId) { + // Define contractlabel from contractId if not set in options + if (!options.contractLabel) { + options.contractLabel = options.contractId; + } // Set saving path from contractLabel - const cozyUpdatedAt = get(account, 'cozyMetadata.updatedAt') - if (cozyUpdatedAt) { - return cozyUpdatedAt - } + options.subPath = options.contractLabel; // Add contractId to deduplication keys - return null - } -} + addContractIdToDeduplication(options); // Add contract data to bills -BankAccount.normalizeAccountNumber = matching.normalizeAccountNumber -BankAccount.doctype = 'io.cozy.bank.accounts' -BankAccount.idAttributes = ['_id'] -BankAccount.version = 1 -BankAccount.checkedAttributes = null -BankAccount.vendorIdAttr = 'vendorId' + newEntries = newEntries.map(entry => addContractsDataToBill(entry, options)); // if contractId passed by bill attribute + } else if (billsHaveContractId(newEntries)) { + // Add contractId to deduplication keys + addContractIdToDeduplication(options); + newEntries = newEntries.map(entry => mergeContractsDataInBill(entry)); // manageContractsDataPassedByAttribute(newEntries, options + } -module.exports = BankAccount + return newEntries; +} +function addContractsDataToBill(entry, options) { + entry.contractLabel = options.contractLabel; + entry.contractId = options.contractId; + return entry; +} -/***/ }), -/* 1202 */ -/***/ (function(module, exports, __webpack_require__) { +function mergeContractsDataInBill(entry) { + // Only treat bill with data + if (entry.contractId) { + // Surcharge label in needed + if (!entry.contractLabel) { + entry.contractLabel = entry.contractId; + } // Edit subpath of each bill according to contractLabel -const sortBy = __webpack_require__(828) -const { eitherIncludes } = __webpack_require__(1203) -const { getSlugFromInstitutionLabel } = __webpack_require__(1204) -const findExactMatch = (attr, account, existingAccounts) => { - const sameAttr = existingAccounts.filter( - existingAccount => existingAccount[attr] === account[attr] - ) - if (sameAttr.length === 1) { - return { match: sameAttr[0], method: attr + '-exact' } - } else if (sameAttr.length > 1) { - return { matches: sameAttr, method: attr + '-exact' } - } else { - return null + entry.subPath = entry.contractLabel; } + + return entry; } +/* This function return true if at least one bill of entries has a contractId + */ -const untrimmedAccountNumber = /^(?:[A-Za-z]+)?-?([0-9]+)-?(?:[A-Za-z]+)?$/ -const redactedCreditCard = /xxxx xxxx xxxx (\d{4})/ -const normalizeAccountNumber = (numberArg, ibanArg) => { - const iban = ibanArg && ibanArg.replace(/\s/g, '') - const number = - numberArg && !numberArg.match(redactedCreditCard) - ? numberArg.replace(/\s/g, '') - : numberArg - let match - if (iban && iban.length == 27) { - return iban.substr(14, 11) +function billsHaveContractId(entries) { + for (const entry of entries) { + if (entry.contractId) { + return true; + } } - if (!number) { - return number - } + return false; +} +/* Add contractId to deduplication keys + */ - if (number.length == 23) { - // Must be an IBAN without the COUNTRY code - // See support demand #9102 with BI - // We extract the account number from the IBAN - // COUNTRY (4) BANK (5) COUNTER (5) NUMBER (11) KEY (2) - // FRXX 16275 10501 00300060030 00 - return number.substr(10, 11) - } else if (number.length == 16) { - // Linxo sends Bank account number that contains - // the counter number - return number.substr(5, 11) - } else if ( - number.length > 11 && - (match = number.match(untrimmedAccountNumber)) - ) { - // Some account numbers from BI are in the form - // CC-00300060030 (CC for Compte Courant) or - // LEO-00300060030 - return match[1] - } else { - return number + +function addContractIdToDeduplication(options) { + if (options.keys) { + options.keys.push('contractId'); } } -/** - * If either of the account numbers has length 11 and one is contained - * in the other, it's a match - */ -const approxNumberMatch = (account, existingAccount) => { - return ( - existingAccount.number && - account.number && - (existingAccount.number.length === 11 || account.number.length === 11) && - eitherIncludes(existingAccount.number, account.number) && - Math.min(existingAccount.number.length, account.number.length) >= 4 - ) -} +module.exports = saveBills; +module.exports.manageContractsData = manageContractsData; + +/***/ }), +/* 1224 */ +/***/ (function(module, exports, __webpack_require__) { /** - * If there is no "number" attribute or null, "id" attribute is used - * in the other, it's not a match + * Saves the given files in the given folder via the Cozy API. * - * @param account - * @param existingAccount - * @returns {boolean} + * @module saveFiles */ -const noNumberMatch = (account, existingAccount) => { - const accNumber = account.number || String(account.id) - const existingAccNumber = existingAccount.number || String(existingAccount.id) - if (!account.number || !existingAccount.number) { - return eitherIncludes(accNumber, existingAccNumber) - } - return false -} +const bluebird = __webpack_require__(25); -const creditCardMatch = (account, existingAccount) => { - if (account.type !== 'CreditCard' && existingAccount.type !== 'CreditCard') { - return false - } - let ccAccount, lastDigits - for (let acc of [account, existingAccount]) { - const match = acc && acc.number && acc.number.match(redactedCreditCard) - if (match) { - ccAccount = acc - lastDigits = match[1] - } - } - const other = ccAccount === account ? existingAccount : account - if (other && other.number && other.number.slice(-4) === lastDigits) { - return true - } - return false -} +const retry = __webpack_require__(1225); -const slugMatch = (account, existingAccount) => { - const possibleSlug = getSlugFromInstitutionLabel(account.institutionLabel) - const possibleSlugExisting = getSlugFromInstitutionLabel( - existingAccount.institutionLabel - ) - return ( - !possibleSlug || - !possibleSlugExisting || - possibleSlug === possibleSlugExisting - ) -} +const mimetypes = __webpack_require__(835); -const currencyMatch = (account, existingAccount) => { - if (!account.currency) { - return false - } - return ( - (existingAccount.rawNumber && - existingAccount.rawNumber.includes(account.currency)) || - (existingAccount.label && - existingAccount.label.includes(account.currency)) || - (existingAccount.originalBankLabel && - existingAccount.originalBankLabel.includes(account.currency)) - ) -} +const path = __webpack_require__(160); -const sameTypeMatch = (account, existingAccount) => { - return account.type === existingAccount.type -} +const requestFactory = __webpack_require__(22); -const rules = [ - { rule: slugMatch, bonus: 0, malus: -1000 }, - { rule: approxNumberMatch, bonus: 50, malus: -50, name: 'approx-number' }, - { rule: noNumberMatch, bonus: 10, malus: -10, name: 'no-number-attr' }, - { rule: sameTypeMatch, bonus: 50, malus: 0, name: 'same-type' }, - { rule: creditCardMatch, bonus: 150, malus: 0, name: 'credit-card-number' }, - { rule: currencyMatch, bonus: 50, malus: 0, name: 'currency' } -] +const omit = __webpack_require__(631); -const score = (account, existingAccount) => { - const methods = [] - const res = { - account: existingAccount, - methods - } +const get = __webpack_require__(370); - let points = 0 - for (let { rule, bonus, malus, name } of rules) { - const ok = rule(account, existingAccount) - if (ok && bonus) { - points += bonus - } - if (!ok && malus) { - points += malus - } - if (name && ok) { - methods.push(name) - } - } +const log = __webpack_require__(2).namespace('saveFiles'); - res.points = points - return res -} +const manifest = __webpack_require__(833); -const normalizeAccount = account => { - const normalizedAccountNumber = normalizeAccountNumber( - account.number, - account.iban - ) - return { - ...account, - rawNumber: account.number, - number: normalizedAccountNumber - } -} +const cozy = __webpack_require__(485); -const exactMatchAttributes = ['iban', 'number'] +const { + queryAll +} = __webpack_require__(484); -const eqNotUndefined = (attr1, attr2) => { - return attr1 && attr1 === attr2 -} +const mkdirp = __webpack_require__(1227); -const findMatch = (account, existingAccounts) => { - // Start with exact attribute matches - for (const exactAttribute of exactMatchAttributes) { - if (account[exactAttribute]) { - const result = findExactMatch(exactAttribute, account, existingAccounts) - if (result && result.match) { - return result - } - } - } +const errors = __webpack_require__(1228); - const matchOriginalNumber = existingAccounts.find( - otherAccount => - eqNotUndefined(account.originalNumber, otherAccount.number) || - eqNotUndefined(account.number, otherAccount.originalNumber) - ) - if (matchOriginalNumber) { - return { - match: matchOriginalNumber, - method: 'originalNumber-exact' - } - } +const stream = __webpack_require__(100); - const matchRawNumberCurrencyType = existingAccounts.find( - otherAccount => - (eqNotUndefined(account.rawNumber, otherAccount.number) || - eqNotUndefined(account.number, otherAccount.rawNumber)) && - otherAccount.type == account.type && - otherAccount.currency == account.currency - ) - if (matchRawNumberCurrencyType) { - return { - match: matchRawNumberCurrencyType, - method: 'rawNumber-exact-currency-type' - } - } +const fileType = __webpack_require__(1229); - // Now we get more fuzzy and score accounts - const scored = sortBy( - existingAccounts.map(existingAccount => score(account, existingAccount)), - x => -x.points - ) - const candidates = scored.filter(x => x.points > 0) - if (candidates.length > 0) { - return { - match: candidates[0].account, - method: candidates[0].methods.join('-') - } - } -} +const ms = 1; +const s = 1000 * ms; +const m = 60 * s; +const DEFAULT_TIMEOUT = Date.now() + 4 * m; // 4 minutes by default since the stack allows 5 minutes + +const DEFAULT_CONCURRENCY = 1; +const DEFAULT_RETRY = 1; // do not retry by default /** - * Matches existing accounts with accounts fetched on a vendor + * Saves the files given in the fileurl attribute of each entries * - * @typedef {MatchResult} - * @property {io.cozy.account} account - Account from fetched accounts - * @property {io.cozy.account} match - Existing account that was matched. Null if no match was found. - * @property {string} method - How the two accounts were matched + * You need the full permission on `io.cozy.files` in your manifest to use this function. * - * @param {io.cozy.account} fetchedAccounts - Account that have been fetched - * on the vendor and that will be matched with existing accounts - * @param {io.cozy.accounts} existingAccounts - Will be match against (those - * io.cozy.accounts already have an _id) - * @return {Array<MatchResult>} - Match results (as many results as fetchedAccounts.length) + * @param {Array} entries - list of object describing files to save + * @param {string} entries.fileurl - The url of the file (can be a function returning the value). Ignored if `filestream` is given + * @param {Function} entries.fetchFile - the connector can give it's own function to fetch the file from the website, which will be run only when necessary (if the corresponding file is missing on the cozy) function returning the stream). This function must return a promise resolved as a stream + * @param {object | string} entries.filestream - the stream which will be directly passed to cozyClient.files.create (can also be function returning the stream) + * @param {object} entries.requestOptions - The options passed to request to fetch fileurl (can be a function returning the value) + * @param {string} entries.filename - The file name of the item written on disk. This attribute is optional and as default value, the file name will be "smartly" guessed by the function. Use this attribute if the guess is not smart enough for you, or if you use `filestream` (can be a function returning the value). + * @param {string} entries.shouldReplaceName - used to migrate filename. If saveFiles finds a file linked to this entry and this file name matches `shouldReplaceName`, the file is renamed to `filename` (can be a function returning the value) + * @param {Function} entries.shouldReplaceFile - use this function to state if the current entry should be forced to be redownloaded and replaced. Usefull if we know the file content can change and we always want the last version. + * @param {object} entries.fileAttributes - ex: `{created_at: new Date()}` sets some additionnal file attributes passed to cozyClient.file.create + * @param {string} entries.subPath - A subpath to save all files, will be created if needed. + * @param {object} fields - is the argument given to the main function of your connector by the BaseKonnector. It especially contains a `folderPath` which is the string path configured by the user in collect/home + * @param {object} options - global options + * @param {number} options.timeout - timestamp which can be used if your connector needs to fetch a lot of files and if the stack does not give enough time to your connector to fetch it all. It could happen that the connector is stopped right in the middle of the download of the file and the file will be broken. With the `timeout` option, the `saveFiles` function will check if the timeout has passed right after downloading each file and then will be sure to be stopped cleanly if the timeout is not too long. And since it is really fast to check that a file has already been downloaded, on the next run of the connector, it will be able to download some more files, and so on. If you want the timeout to be in 10s, do `Date.now() + 10*1000`. You can try it in the previous code. + * @param {number|boolean} options.contentType - ex: 'application/pdf' used to force the contentType of documents when they are badly recognized by cozy. If "true" the content type will be recognized from the file name and forced the same way. + * @param {number} options.concurrency - default: `1` sets the maximum number of concurrent downloads + * @param {Function} options.validateFile - default: do not validate if file is empty or has bad mime type + * @param {boolean|Function} options.validateFileContent - default false. Also check the content of the file to recognize the mime type + * @param {Array} options.fileIdAttributes - array of strings : Describes which attributes of files will be taken as primary key for files to check if they already exist, even if they are moved. If not given, the file path will used for deduplication as before. + * @param {string} options.subPath - A subpath to save this file, will be created if needed. + * @param {Function} options.fetchFile - the connector can give it's own function to fetch the file from the website, which will be run only when necessary (if the corresponding file is missing on the cozy) function returning the stream). This function must return a promise resolved as a stream + * @example + * ```javascript + * await saveFiles([{fileurl: 'https://...', filename: 'bill1.pdf'}], fields, { + * fileIdAttributes: ['fileurl'] + * }) + * ``` + * @alias module:saveFiles */ -const matchAccounts = (fetchedAccountsArg, existingAccounts) => { - const fetchedAccounts = fetchedAccountsArg.map(normalizeAccount) - const toMatch = [...existingAccounts].map(normalizeAccount) - const results = [] - for (let fetchedAccount of fetchedAccounts) { - const matchResult = findMatch(fetchedAccount, toMatch) - if (matchResult) { - const i = toMatch.indexOf(matchResult.match) - toMatch.splice(i, 1) - results.push({ account: fetchedAccount, ...matchResult }) - } else { - results.push({ account: fetchedAccount }) + +const saveFiles = async (entries, fields, options = {}) => { + if (!entries || entries.length === 0) { + log('warn', 'No file to download'); + } + + if (!options.sourceAccount) { + log('warn', 'There is no sourceAccount given to saveFiles'); + } + + if (!options.sourceAccountIdentifier) { + log('warn', 'There is no sourceAccountIdentifier given to saveFIles'); + } + + if (typeof fields !== 'object') { + log('debug', 'Deprecation warning, saveFiles 2nd argument should not be a string'); + fields = { + folderPath: fields + }; + } + + const saveOptions = { + folderPath: fields.folderPath, + fileIdAttributes: options.fileIdAttributes, + timeout: options.timeout || DEFAULT_TIMEOUT, + concurrency: options.concurrency || DEFAULT_CONCURRENCY, + retry: options.retry || DEFAULT_RETRY, + postProcess: options.postProcess, + postProcessFile: options.postProcessFile, + contentType: options.contentType, + requestInstance: options.requestInstance, + shouldReplaceFile: options.shouldReplaceFile, + validateFile: options.validateFile || defaultValidateFile, + subPath: options.subPath, + sourceAccountOptions: { + sourceAccount: options.sourceAccount, + sourceAccountIdentifier: options.sourceAccountIdentifier + } + }; + + if (options.validateFileContent) { + if (options.validateFileContent === true) { + saveOptions.validateFileContent = defaultValidateFileContent; + } else if (typeof options.validateFileContent === 'function') { + saveOptions.validateFileContent = options.validateFileContent; } } - return results -} -module.exports = { - matchAccounts, - normalizeAccountNumber, - score, - creditCardMatch, - approxNumberMatch -} + noMetadataDeduplicationWarning(saveOptions); + const canBeSaved = entry => entry.fetchFile || entry.fileurl || entry.requestOptions || entry.filestream; -/***/ }), -/* 1203 */ -/***/ (function(module, exports) { + let filesArray = undefined; + let savedFiles = 0; + const savedEntries = []; -const eitherIncludes = (str1, str2) => { - return Boolean(str1 && str2 && (str1.includes(str2) || str2.includes(str1))) -} + try { + await bluebird.map(entries, async entry => { + ; + ['fileurl', 'filename', 'shouldReplaceName', 'requestOptions' // 'filestream' + ].forEach(key => { + if (entry[key]) entry[key] = getValOrFnResult(entry[key], entry, options); + }); -module.exports = { - eitherIncludes -} + if (entry.filestream && !entry.filename) { + log('warn', 'Missing filename property for for filestream entry, entry is ignored'); + return; + } + + if (entry.shouldReplaceName) { + // At first encounter of a rename, we set the filenamesList + if (filesArray === undefined) { + log('debug', 'initialize files list for renamming'); + filesArray = await getFiles(fields.folderPath); + } + const fileFound = filesArray.find(f => getAttribute(f, 'name') === entry.shouldReplaceName); -/***/ }), -/* 1204 */ -/***/ (function(module, exports, __webpack_require__) { + if (fileFound) { + await renameFile(fileFound, entry); // we continue because saveFile mays also add fileIdAttributes to the renamed file + } -const log = __webpack_require__(2).namespace('slug-account') -const labelSlugs = __webpack_require__(1205) + delete entry.shouldReplaceName; + } -const institutionLabelsCompiled = Object.entries(labelSlugs).map( - ([ilabelRx, slug]) => { - if (ilabelRx[0] === '/' && ilabelRx[ilabelRx.length - 1] === '/') { - return [new RegExp(ilabelRx.substr(1, ilabelRx.length - 2), 'i'), slug] - } else { - return [ilabelRx, slug] - } - } -) + if (canBeSaved(entry)) { + const folderPath = await getOrCreateDestinationPath(entry, saveOptions); + entry = await saveEntry(entry, { ...saveOptions, + folderPath + }); -const getSlugFromInstitutionLabel = institutionLabel => { - if (!institutionLabel) { - log('warn', 'No institution label, cannot compute slug') - return - } - for (const [rx, slug] of institutionLabelsCompiled) { - if (rx instanceof RegExp) { - const match = institutionLabel.match(rx) - if (match) { - return slug + if (entry && entry._cozy_file_to_create) { + savedFiles++; + delete entry._cozy_file_to_create; + } } - } else if (rx.toLowerCase() === institutionLabel.toLowerCase()) { - return slug + + savedEntries.push(entry); + }, { + concurrency: saveOptions.concurrency + }); + } catch (err) { + if (err.message !== 'TIMEOUT') { + throw err; + } else { + log('warn', `saveFile timeout: still ${entries.length - savedEntries.length} / ${entries.length} to download`); } } - log('warn', `Could not compute slug for ${institutionLabel}`) -} - -module.exports = { - getSlugFromInstitutionLabel -} + log('info', `saveFiles created ${savedFiles} files for ${savedEntries ? savedEntries.length : 'n'} entries`); + return savedEntries; +}; -/***/ }), -/* 1205 */ -/***/ (function(module, exports) { - -module.exports = { - 'AXA Banque': 'axabanque102', - '/Banque Populaire.*/': 'banquepopulaire', - BforBank: 'bforbank97', - 'BNP Paribas': 'bnpparibas82', - BNPP: 'bnpparibas82', - '/Boursorama.*/': 'boursorama83', - casden: 'casden173', - '/Hello bank!.*/': 'hellobank145', - Bred: 'bred', - CA: 'caatlantica3', - 'Carrefour Banque': 'carrefour159', - "/Caisse d'Épargne.*/": 'caissedepargne1', - 'Compte Nickel': 'comptenickel168', - '/^CIC.*/': 'cic63', - 'Crédit Agricole': 'caatlantica3', - 'Crédit Coopératif': 'creditcooperatif148', - '/Crédit du Nord.*/': 'cdngroup88', - '/Crédit Maritime.*/': 'creditmaritime', - '/Crédit Mutuel.*/': 'cic45', - '/Linxea/': 'linxea', - Fortuneo: 'fortuneo84', - 'Hello bank!': 'hellobank145', - 'HSBC France': 'hsbc119', - HSBC: 'hsbc119', - '/^ING.*/': 'ingdirect95', - '/La Banque Postale.*/': 'labanquepostale44', - '/LCL.*/': 'lcl-linxo', - Milleis: 'barclays136', - Monabanq: 'monabanq96', - 'Société Générale': 'societegenerale', - 'Société marseillaise de crédit': 'cdngroup109' -} +const saveEntry = async function (entry, options) { + if (options.timeout && Date.now() > options.timeout) { + const remainingTime = Math.floor((options.timeout - Date.now()) / s); + log('info', `${remainingTime}s timeout finished for ${options.folderPath}`); + throw new Error('TIMEOUT'); + } + let file = await getFileIfExists(entry, options); + let shouldReplace = false; -/***/ }), -/* 1206 */ -/***/ (function(module, exports, __webpack_require__) { + if (file) { + try { + shouldReplace = await shouldReplaceFile(file, entry, options); + } catch (err) { + log('info', `Error in shouldReplaceFile : ${err.message}`); + shouldReplace = true; + } + } -const fromPairs = __webpack_require__(558) -const log = __webpack_require__(2).namespace('BankingReconciliator') + let method = 'create'; -class BankingReconciliator { - constructor(options) { - this.options = options + if (shouldReplace && file) { + method = 'updateById'; + log('debug', `Will replace ${getFilePath({ + options, + file + })}...`); } - async saveAccounts(fetchedAccounts, options) { - const { BankAccount } = this.options - - const stackAccounts = await BankAccount.fetchAll() + try { + if (!file || method === 'updateById') { + log('debug', omit(entry, 'filestream')); + logFileStream(entry.filestream); + log('debug', `File ${getFilePath({ + options, + entry + })} does not exist yet or is not valid`); + entry._cozy_file_to_create = true; + file = await retry(createFile, { + interval: 1000, + throw_original: true, + max_tries: options.retry, + args: [entry, options, method, file ? file._id : undefined] + }).catch(err => { + if (err.message === 'BAD_DOWNLOADED_FILE') { + log('warn', `Could not download file after ${options.retry} tries removing the file`); + } else { + log('warn', 'unknown file download error: ' + err.message); + } + }); + } - // Reconciliate - const reconciliatedAccounts = BankAccount.reconciliate( - fetchedAccounts, - stackAccounts - ) + attachFileToEntry(entry, file); + sanitizeEntry(entry); - log('info', 'Saving accounts...') - const savedAccounts = await BankAccount.bulkSave(reconciliatedAccounts, { - handleDuplicates: 'remove' - }) - if (options.onAccountsSaved) { - options.onAccountsSaved(savedAccounts) + if (options.postProcess) { + await options.postProcess(entry); + } + } catch (err) { + if (getErrorStatus(err) === 413) { + // the cozy quota is full + throw new Error(errors.DISK_QUOTA_EXCEEDED); } - return { savedAccounts, reconciliatedAccounts } + log('warn', errors.SAVE_FILE_FAILED); + log('warn', err.message, `Error caught while trying to save the file ${entry.fileurl ? entry.fileurl : entry.filename}`); } - /** - * @typedef ReconciliatorResponse - * @attribute {Array<BankAccount>} accounts - * @attribute {Array<BankTransactions>} transactions - */ - - /** - * @typedef ReconciliatorSaveOptions - * @attribute {Function} logProgress - */ - - /** - * Save new accounts and transactions - * - * @param {Array<BankAccount>} fetchedAccounts - * @param {Array<BankTransactions>} fetchedTransactions - * @param {ReconciliatorSaveOptions} options - * @returns {ReconciliatorResponse} - * - */ - async save(fetchedAccounts, fetchedTransactions, options = {}) { - const { BankAccount, BankTransaction } = this.options - - const { reconciliatedAccounts, savedAccounts } = await this.saveAccounts( - fetchedAccounts, - options - ) + return entry; +}; - // Bank accounts saved in Cozy, we can now link transactions to accounts - // via their cozy id - const vendorIdToCozyId = fromPairs( - savedAccounts.map(acc => [acc[BankAccount.vendorIdAttr], acc._id]) - ) - log('info', 'Linking transactions to accounts...') - log('info', JSON.stringify(vendorIdToCozyId)) +function noMetadataDeduplicationWarning(options) { + const fileIdAttributes = options.fileIdAttributes; - fetchedTransactions.forEach(tr => { - tr.account = vendorIdToCozyId[tr[BankTransaction.vendorAccountIdAttr]] - if (tr.account === undefined) { - log( - 'warn', - `Transaction without account, vendorAccountIdAttr: ${BankTransaction.vendorAccountIdAttr}` - ) - log('warn', 'transaction: ' + JSON.stringify(tr)) - throw new Error('Transaction without account.') - } - }) + if (!fileIdAttributes) { + log('warn', `saveFiles: no deduplication key is defined, file deduplication will be based on file path`); + } - const reconciliatedAccountIds = new Set( - reconciliatedAccounts.filter(acc => acc._id).map(acc => acc._id) - ) + const slug = manifest.data.slug; - // Pass to transaction reconciliation only transactions that belong - // to one of the reconciliated accounts - const stackTransactions = (await BankTransaction.fetchAll()).filter( - transaction => reconciliatedAccountIds.has(transaction.account) - ) + if (!slug) { + log('warn', `saveFiles: no slug is defined for the current connector, file deduplication will be based on file path`); + } - const transactions = BankTransaction.reconciliate( - fetchedTransactions, - stackTransactions, - options - ) + const sourceAccountIdentifier = get(options, 'sourceAccountOptions.sourceAccountIdentifier'); - log('info', 'Saving transactions...') - let i = 1 - const logProgressFn = doc => { - log('debug', `[bulkSave] ${i++} Saving ${doc.date} ${doc.label}`) - } - const savedTransactions = await BankTransaction.bulkSave(transactions, { - concurrency: 30, - logProgress: - options.logProgress !== undefined ? options.logProgress : logProgressFn, - handleDuplicates: 'remove' - }) - return { - accounts: savedAccounts, - transactions: savedTransactions - } + if (!sourceAccountIdentifier) { + log('warn', `saveFiles: no sourceAccountIdentifier is defined in options, file deduplication will be based on file path`); } } -module.exports = BankingReconciliator - - -/***/ }), -/* 1207 */ -/***/ (function(module, exports, __webpack_require__) { - -const keyBy = __webpack_require__(705) -const groupBy = __webpack_require__(730) -const maxBy = __webpack_require__(1173) -const addDays = __webpack_require__(1208) -const isAfter = __webpack_require__(1212) -const Document = __webpack_require__(1182) -const log = __webpack_require__(1198) -const BankAccount = __webpack_require__(1201) -const { matchTransactions } = __webpack_require__(1213) -const cloneDeep = __webpack_require__(580) +async function getFileIfExists(entry, options) { + const fileIdAttributes = options.fileIdAttributes; + const slug = manifest.data.slug; + const sourceAccountIdentifier = get(options, 'sourceAccountOptions.sourceAccountIdentifier'); + const isReadyForFileMetadata = fileIdAttributes && slug && sourceAccountIdentifier; -const maxValue = (iterable, fn) => { - const res = maxBy(iterable, fn) - return res ? fn(res) : null -} + if (isReadyForFileMetadata) { + const file = await getFileFromMetaData(entry, fileIdAttributes, sourceAccountIdentifier, slug); -const getDate = transaction => { - const date = transaction.realisationDate || transaction.date - return date.slice(0, 10) + if (!file) { + // no file with correct metadata, maybe the corresponding file already exist in the default + // path from a previous version of the connector + return await getFileFromPath(entry, options); + } else return file; + } else { + return await getFileFromPath(entry, options); + } } -/** - * Get the date of the latest transaction in an array. - * Transactions in the future are ignored. - * - * @param {array} stackTransactions - * @returns {string} The date of the latest transaction (YYYY-MM-DD) - */ -const getSplitDate = stackTransactions => { - const now = new Date() - const notFutureTransactions = stackTransactions.filter(transaction => { - const date = getDate(transaction) - return !isAfter(date, now) - }) +async function getFileFromMetaData(entry, fileIdAttributes, sourceAccountIdentifier, slug) { + const index = await cozy.data.defineIndex('io.cozy.files', ['metadata.fileIdAttributes', 'trashed', 'cozyMetadata.sourceAccountIdentifier', 'cozyMetadata.createdByApp']); + log('debug', `Checking existence of ${calculateFileKey(entry, fileIdAttributes)}`); + const files = await queryAll('io.cozy.files', { + metadata: { + fileIdAttributes: calculateFileKey(entry, fileIdAttributes) + }, + trashed: false, + cozyMetadata: { + sourceAccountIdentifier, + createdByApp: slug + } + }, index); - return maxValue(notFutureTransactions, getDate) -} + if (files && files[0]) { + if (files.length > 1) { + log('warn', `Found ${files.length} files corresponding to ${calculateFileKey(entry, fileIdAttributes)}`); + } -const ensureISOString = date => { - if (date instanceof Date) { - return date.toISOString() + return files[0]; } else { - return date + log('debug', 'not found'); + return false; } } -class Transaction extends Document { - static getDate(transaction) { - return transaction +async function getFileFromPath(entry, options) { + try { + log('debug', `Checking existence of ${getFilePath({ + entry, + options + })}`); + const result = await cozy.files.statByPath(getFilePath({ + entry, + options + })); + return result; + } catch (err) { + log('debug', err.message); + return false; } +} - isAfter(minDate) { - if (!minDate) { - return true +async function createFile(entry, options, method, fileId) { + const folder = await cozy.files.statByPath(options.folderPath); + let createFileOptions = { + name: getFileName(entry), + dirID: folder._id + }; + + if (options.contentType) { + if (options.contentType === true && entry.filename) { + createFileOptions.contentType = mimetypes.contentType(entry.filename); } else { - const day = ensureISOString(this.date).slice(0, 10) - if (day !== 'NaN') { - return day > minDate - } else { - log( - 'warn', - 'transaction date could not be parsed. transaction: ' + - JSON.stringify(this) - ) - return false - } + createFileOptions.contentType = options.contentType; } } - isBeforeOrSame(maxDate) { - if (!maxDate) { - return true - } else { - const day = ensureISOString(this.date).slice(0, 10) - if (day !== 'NaN') { - return day <= maxDate - } else { - log( - 'warn', - 'transaction date could not be parsed. transaction: ' + - JSON.stringify(this) - ) - return false + createFileOptions = { ...createFileOptions, + ...entry.fileAttributes, + ...options.sourceAccountOptions + }; + + if (options.fileIdAttributes) { + createFileOptions = { ...createFileOptions, + ...{ + metadata: { ...createFileOptions.metadata, + fileIdAttributes: calculateFileKey(entry, options.fileIdAttributes) + } } - } + }; } - /** - * Get the descriptive (and almost uniq) identifier of a transaction - * @param {object} transaction - The transaction (containing at least amount, originalBankLabel and date) - * @returns {object} - */ - getIdentifier() { - return `${this.amount}-${this.originalBankLabel}-${this.date}` + let toCreate; + + if (entry.filestream) { + toCreate = entry.filestream; + } else if (entry.fetchFile || options.fetchFile) { + toCreate = await (entry.fetchFile || options.fetchFile)(entry); + } else { + toCreate = downloadEntry(entry, { ...options, + simple: false + }); } - /** - * Get transactions that should be present in the stack but are not. - * Transactions that are older that 1 week before the oldest existing - * transaction are ignored. - * - * @param {array} newTransactions - * @param {array} stackTransactions - * @returns {array} - */ - static getMissedTransactions( - newTransactions, - stackTransactions, - options = {} - ) { - const oldestDate = maxValue(stackTransactions, getDate) - const frontierDate = addDays(oldestDate, -7) - const recentNewTransactions = newTransactions.filter(tr => - isAfter(getDate(tr), frontierDate) - ) - const matchingResults = Array.from( - matchTransactions(recentNewTransactions, stackTransactions) - ) + let fileDocument; - const missedTransactions = matchingResults - .filter(result => !result.match) - .map(result => result.transaction) + if (method === 'create') { + fileDocument = await cozy.files.create(toCreate, createFileOptions); + } else if (method === 'updateById') { + log('debug', `replacing file for ${entry.filename}`); + fileDocument = await cozy.files.updateById(fileId, toCreate, createFileOptions); + } - const trackEvent = options.trackEvent - if (typeof trackEvent === 'function') { - try { - const nbMissed = missedTransactions.length - const nbExisting = stackTransactions.length - trackEvent({ - e_a: 'ReconciliateMissing', - e_n: 'MissedTransactionPct', - e_v: parseFloat((nbMissed / nbExisting).toFixed(2), 10) - }) - trackEvent({ - e_a: 'ReconciliateMissing', - e_n: 'MissedTransactionAbs', - e_v: nbMissed - }) - } catch (e) { - log('warn', `Could not send MissedTransaction event: ${e.message}`) - } + if (options.validateFile) { + if ((await options.validateFile(fileDocument)) === false) { + await removeFile(fileDocument); + throw new Error('BAD_DOWNLOADED_FILE'); } - return missedTransactions + if (options.validateFileContent && !(await options.validateFileContent(fileDocument))) { + await removeFile(fileDocument); + throw new Error('BAD_DOWNLOADED_FILE'); + } } - /** - * Reconcialiate remote transaction with local transaction - * - * @param {Array} remoteTransactions - * @param {Array} localTransactions - * @param {Function} options.trackEvent : this callback will be called in case of split date - * @param {Boolean} options.useSplitDate : should look for a split date or not (default true) - * @returns {Array} : reconciliated transactions - */ - static reconciliate(remoteTransactions, localTransactions, options = {}) { - const localOptions = cloneDeep(options) - if (localOptions.useSplitDate !== false) { - localOptions.useSplitDate = true - } - const findByVendorId = transaction => - localTransactions.find(t => t.vendorId === transaction.vendorId) + return fileDocument; +} - const groups = groupBy(remoteTransactions, transaction => - findByVendorId(transaction) ? 'updatedTransactions' : 'newTransactions' - ) +function downloadEntry(entry, options) { + let filePromise = getRequestInstance(entry, options)(getRequestOptions(entry, options)); - let newTransactions = groups.newTransactions || [] - const updatedTransactions = groups.updatedTransactions || [] + if (options.contentType) { + // the developper wants to force the contentType of the document + // we pipe the stream to remove headers with bad contentType from the request + return filePromise.pipe(new stream.PassThrough()); + } // we have to do this since the result of filePromise is not a stream and cannot be taken by + // cozy.files.create - const splitDate = localOptions.useSplitDate - ? getSplitDate(localTransactions) - : false - if (splitDate) { - if (typeof localOptions.trackEvent === 'function') { - localOptions.trackEvent({ - e_a: 'ReconciliateSplitDate' - }) - } + if (options.postProcessFile) { + log('warn', 'Be carefull postProcessFile option is deprecated. You should use the filestream attribute in each entry instead'); + return filePromise.then(data => options.postProcessFile(data)); + } - const isAfterSplit = x => Transaction.prototype.isAfter.call(x, splitDate) - const isBeforeSplit = x => - Transaction.prototype.isBeforeOrSame.call(x, splitDate) + filePromise.catch(err => { + log('warn', `File download error ${err.message}`); + }); + return filePromise; +} - const transactionsAfterSplit = newTransactions.filter(isAfterSplit) +const shouldReplaceFile = async function (file, entry, options) { + const isValid = !options.validateFile || (await options.validateFile(file)); - if (transactionsAfterSplit.length > 0) { - log( - 'info', - `Found ${transactionsAfterSplit.length} transactions after ${splitDate}` - ) - } else { - log('info', `No transaction after ${splitDate}`) - } + if (!isValid) { + log('warn', `${getFileName({ + file, + options + })} is invalid`); + throw new Error('BAD_DOWNLOADED_FILE'); + } - const transactionsBeforeSplit = newTransactions.filter(isBeforeSplit) - log( - 'info', - `Found ${transactionsBeforeSplit.length} transactions before ${splitDate}` - ) + const defaultShouldReplaceFile = (file, entry) => { + const shouldForceMetadataAttr = attr => { + const result = !getAttribute(file, `metadata.${attr}`) && get(entry, `fileAttributes.metadata.${attr}`); + if (result) log('debug', `filereplacement: adding ${attr} metadata`); + return result; + }; // replace all files with meta if there is file metadata to add - const missedTransactions = Transaction.getMissedTransactions( - transactionsBeforeSplit, - localTransactions, - localOptions - ) - if (missedTransactions.length > 0) { - log( - 'info', - `Found ${missedTransactions.length} missed transactions before ${splitDate}` - ) - } else { - log('info', `No missed transactions before ${splitDate}`) - } + const fileHasNoMetadata = !getAttribute(file, 'metadata'); + const fileHasNoId = !getAttribute(file, 'metadata.fileIdAttributes'); + const entryHasMetadata = !!get(entry, 'fileAttributes.metadata'); + const hasSourceAccountIdentifierOption = !!get(options, 'sourceAccountOptions.sourceAccountIdentifier'); + const fileHasSourceAccountIdentifier = !!getAttribute(file, 'cozyMetadata.sourceAccountIdentifier'); + const result = fileHasNoMetadata && entryHasMetadata || fileHasNoId && !!options.fileIdAttributes || hasSourceAccountIdentifierOption && !fileHasSourceAccountIdentifier || shouldForceMetadataAttr('carbonCopy') || shouldForceMetadataAttr('electronicSafe') || shouldForceMetadataAttr('categories'); - newTransactions = [...transactionsAfterSplit, ...missedTransactions] - } else { - log('info', "Can't find a split date, saving all new transactions") + if (result) { + if (fileHasNoMetadata && entryHasMetadata) log('debug', 'filereplacement: metadata to add'); + if (fileHasNoId && !!options.fileIdAttributes) log('debug', 'filereplacement: adding fileIdAttributes'); + if (hasSourceAccountIdentifierOption && !fileHasSourceAccountIdentifier) log('debug', 'filereplacement: adding sourceAccountIdentifier'); } - log( - 'info', - `Transaction reconciliation: new ${newTransactions.length}, updated ${updatedTransactions.length}, split date ${splitDate} ` - ) - return [].concat(newTransactions).concat(updatedTransactions) - } + return result; + }; - static async getMostRecentForAccounts(accountIds) { - try { - log('debug', 'Transaction.getLast') + const shouldReplaceFileFn = entry.shouldReplaceFile || options.shouldReplaceFile || defaultShouldReplaceFile; + return shouldReplaceFileFn(file, entry); +}; - const index = await Document.getIndex(this.doctype, ['date', 'account']) - const options = { - selector: { - date: { $gte: null }, - account: { - $in: accountIds - } - }, - sort: [{ date: 'desc' }] - } - const transactions = await Document.query(index, options) - log('info', 'last transactions length: ' + transactions.length) +const removeFile = async function (file) { + await cozy.files.trashById(file._id); + await cozy.files.destroyById(file._id); +}; - return transactions - } catch (e) { - log('error', e) +module.exports = saveFiles; +module.exports.getFileIfExists = getFileIfExists; - return [] - } - } +function getFileName(entry) { + let filename; - static async deleteOrphans() { - log('info', 'Deleting up orphan operations') - const accounts = keyBy(await BankAccount.fetchAll(), '_id') - const operations = await this.fetchAll() - const orphanOperations = operations.filter(x => !accounts[x.account]) - log('info', `Total number of operations: ${operations.length}`) - log('info', `Total number of orphan operations: ${orphanOperations.length}`) - log('info', `Deleting ${orphanOperations.length} orphan operations...`) - if (orphanOperations.length > 0) { - return this.deleteAll(orphanOperations) - } - } + if (entry.filename) { + filename = entry.filename; + } else if (entry.fileurl) { + // try to get the file name from the url + const parsed = __webpack_require__(83).parse(entry.fileurl); - getVendorAccountId() { - return this[this.constructor.vendorAccountIdAttr] + filename = path.basename(parsed.pathname); + } else { + log('error', 'Could not get a file name for the entry'); + return false; } - static getCategoryId(transaction, options) { - const opts = { - localModelOverride: false, - localModelUsageThreshold: this.LOCAL_MODEL_USAGE_THRESHOLD, - globalModelUsageThreshold: this.GLOBAL_MODEL_USAGE_THRESHOLD, - ...options - } - - if (transaction.manualCategoryId) { - return transaction.manualCategoryId - } - - if ( - opts.localModelOverride && - transaction.localCategoryId && - transaction.localCategoryProba && - transaction.localCategoryProba > opts.localModelUsageThreshold - ) { - return transaction.localCategoryId - } + return sanitizeFileName(filename); +} - if ( - transaction.cozyCategoryId && - transaction.cozyCategoryProba && - transaction.cozyCategoryProba > opts.globalModelUsageThreshold - ) { - return transaction.cozyCategoryId - } +function sanitizeFileName(filename) { + return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, ''); +} - // If the cozy categorization models have not been applied, we return null - // so the transaction is considered as « categorization in progress ». - // Otherwize we just use the automatic categorization from the vendor - if (!transaction.localCategoryId && !transaction.cozyCategoryId) { - return null - } +function checkFileSize(fileobject) { + const size = getAttribute(fileobject, 'size'); + const name = getAttribute(fileobject, 'name'); - return transaction.automaticCategoryId + if (size === 0 || size === '0') { + log('warn', `${name} is empty`); + log('warn', 'BAD_FILE_SIZE'); + return false; } -} -Transaction.doctype = 'io.cozy.bank.operations' -Transaction.version = 1 -Transaction.vendorAccountIdAttr = 'vendorAccountId' -Transaction.vendorIdAttr = 'vendorId' -Transaction.idAttributes = ['vendorId'] -Transaction.checkedAttributes = [ - 'label', - 'originalBankLabel', - 'automaticCategoryId', - 'account' -] -Transaction.LOCAL_MODEL_USAGE_THRESHOLD = 0.8 -Transaction.GLOBAL_MODEL_USAGE_THRESHOLD = 0.15 -Transaction.getSplitDate = getSplitDate - -module.exports = Transaction + return true; +} -/***/ }), -/* 1208 */ -/***/ (function(module, exports, __webpack_require__) { +function checkMimeWithPath(fileDocument) { + const mime = getAttribute(fileDocument, 'mime'); + const name = getAttribute(fileDocument, 'name'); + const extension = path.extname(name).substr(1); -var parse = __webpack_require__(1209) + if (extension && mime && mimetypes.lookup(extension) !== mime) { + log('warn', `${name} and ${mime} do not correspond`); + log('warn', 'BAD_MIME_TYPE'); + return false; + } -/** - * @category Day Helpers - * @summary Add the specified number of days to the given date. - * - * @description - * Add the specified number of days to the given date. - * - * @param {Date|String|Number} date - the date to be changed - * @param {Number} amount - the amount of days to be added - * @returns {Date} the new date with the days added - * - * @example - * // Add 10 days to 1 September 2014: - * var result = addDays(new Date(2014, 8, 1), 10) - * //=> Thu Sep 11 2014 00:00:00 - */ -function addDays (dirtyDate, dirtyAmount) { - var date = parse(dirtyDate) - var amount = Number(dirtyAmount) - date.setDate(date.getDate() + amount) - return date + return true; } -module.exports = addDays +function logFileStream(fileStream) { + if (!fileStream) return; + if (fileStream && fileStream.constructor && fileStream.constructor.name) { + log('debug', `The fileStream attribute is an instance of ${fileStream.constructor.name}`); + } else { + log('debug', `The fileStream attribute is a ${typeof fileStream}`); + } +} -/***/ }), -/* 1209 */ -/***/ (function(module, exports, __webpack_require__) { +async function getFiles(folderPath) { + const dir = await cozy.files.statByPath(folderPath); + const files = await queryAll('io.cozy.files', { + dir_id: dir._id + }); + return files; +} -var getTimezoneOffsetInMilliseconds = __webpack_require__(1210) -var isDate = __webpack_require__(1211) +async function renameFile(file, entry) { + if (!entry.filename) { + throw new Error('shouldReplaceName needs a filename'); + } -var MILLISECONDS_IN_HOUR = 3600000 -var MILLISECONDS_IN_MINUTE = 60000 -var DEFAULT_ADDITIONAL_DIGITS = 2 + log('debug', `Renaming ${getAttribute(file, 'name')} to ${entry.filename}`); -var parseTokenDateTimeDelimeter = /[T ]/ -var parseTokenPlainTime = /:/ + try { + await cozy.files.updateAttributesById(file._id, { + name: entry.filename + }); + } catch (err) { + if (JSON.parse(err.message).errors.shift().status === '409') { + log('warn', `${entry.filename} already exists. Removing ${getAttribute(file, 'name')}`); + await cozy.files.trashById(file._id); + } + } +} -// year tokens -var parseTokenYY = /^(\d{2})$/ -var parseTokensYYY = [ - /^([+-]\d{2})$/, // 0 additional digits - /^([+-]\d{3})$/, // 1 additional digit - /^([+-]\d{4})$/ // 2 additional digits -] +function getErrorStatus(err) { + try { + return Number(JSON.parse(err.message).errors[0].status); + } catch (e) { + return null; + } +} -var parseTokenYYYY = /^(\d{4})/ -var parseTokensYYYYY = [ - /^([+-]\d{4})/, // 0 additional digits - /^([+-]\d{5})/, // 1 additional digit - /^([+-]\d{6})/ // 2 additional digits -] +function getValOrFnResult(val, ...args) { + if (typeof val === 'function') { + return val.apply(val, args); + } else return val; +} -// date tokens -var parseTokenMM = /^-(\d{2})$/ -var parseTokenDDD = /^-?(\d{3})$/ -var parseTokenMMDD = /^-?(\d{2})-?(\d{2})$/ -var parseTokenWww = /^-?W(\d{2})$/ -var parseTokenWwwD = /^-?W(\d{2})-?(\d{1})$/ +function calculateFileKey(entry, fileIdAttributes) { + return fileIdAttributes.sort().map(key => get(entry, key)).join('####'); +} -// time tokens -var parseTokenHH = /^(\d{2}([.,]\d*)?)$/ -var parseTokenHHMM = /^(\d{2}):?(\d{2}([.,]\d*)?)$/ -var parseTokenHHMMSS = /^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/ +function defaultValidateFile(fileDocument) { + return checkFileSize(fileDocument) && checkMimeWithPath(fileDocument); +} -// timezone tokens -var parseTokenTimezone = /([Z+-].*)$/ -var parseTokenTimezoneZ = /^(Z)$/ -var parseTokenTimezoneHH = /^([+-])(\d{2})$/ -var parseTokenTimezoneHHMM = /^([+-])(\d{2}):?(\d{2})$/ +async function defaultValidateFileContent(fileDocument) { + const response = await cozy.files.downloadById(fileDocument._id); + const mime = getAttribute(fileDocument, 'mime'); + const fileTypeFromContent = await fileType.fromBuffer(await response.buffer()); -/** - * @category Common Helpers - * @summary Convert the given argument to an instance of Date. - * - * @description - * Convert the given argument to an instance of Date. - * - * If the argument is an instance of Date, the function returns its clone. - * - * If the argument is a number, it is treated as a timestamp. - * - * If an argument is a string, the function tries to parse it. - * Function accepts complete ISO 8601 formats as well as partial implementations. - * ISO 8601: http://en.wikipedia.org/wiki/ISO_8601 - * - * If all above fails, the function passes the given argument to Date constructor. - * - * @param {Date|String|Number} argument - the value to convert - * @param {Object} [options] - the object with options - * @param {0 | 1 | 2} [options.additionalDigits=2] - the additional number of digits in the extended year format - * @returns {Date} the parsed date in the local time zone - * - * @example - * // Convert string '2014-02-11T11:30:30' to date: - * var result = parse('2014-02-11T11:30:30') - * //=> Tue Feb 11 2014 11:30:30 - * - * @example - * // Parse string '+02014101', - * // if the additional number of digits in the extended year format is 1: - * var result = parse('+02014101', {additionalDigits: 1}) - * //=> Fri Apr 11 2014 00:00:00 - */ -function parse (argument, dirtyOptions) { - if (isDate(argument)) { - // Prevent the date to lose the milliseconds when passed to new Date() in IE10 - return new Date(argument.getTime()) - } else if (typeof argument !== 'string') { - return new Date(argument) + if (!fileTypeFromContent) { + log('warn', `Could not find mime type from file content`); + return false; } - var options = dirtyOptions || {} - var additionalDigits = options.additionalDigits - if (additionalDigits == null) { - additionalDigits = DEFAULT_ADDITIONAL_DIGITS - } else { - additionalDigits = Number(additionalDigits) + if (!defaultValidateFile(fileDocument) || mime !== fileTypeFromContent.mime) { + log('warn', `Wrong file type from content ${JSON.stringify(fileTypeFromContent)}`); + return false; } - var dateStrings = splitDateString(argument) + return true; +} - var parseYearResult = parseYear(dateStrings.date, additionalDigits) - var year = parseYearResult.year - var restDateString = parseYearResult.restDateString +function sanitizeEntry(entry) { + delete entry.fetchFile; + delete entry.requestOptions; + delete entry.filestream; + delete entry.shouldReplaceFile; + return entry; +} - var date = parseDate(restDateString, year) +function getRequestInstance(entry, options) { + return options.requestInstance ? options.requestInstance : requestFactory({ + json: false, + cheerio: false, + userAgent: true, + jar: true + }); +} - if (date) { - var timestamp = date.getTime() - var time = 0 - var offset +function getRequestOptions(entry, options) { + const defaultRequestOptions = { + uri: entry.fileurl, + method: 'GET' + }; - if (dateStrings.time) { - time = parseTime(dateStrings.time) - } + if (!options.requestInstance) { + // if requestInstance is already set, we suppose that the connecteur want to handle the cookie + // jar itself + defaultRequestOptions.jar = true; + } - if (dateStrings.timezone) { - offset = parseTimezone(dateStrings.timezone) * MILLISECONDS_IN_MINUTE - } else { - var fullTime = timestamp + time - var fullTimeDate = new Date(fullTime) + return { ...defaultRequestOptions, + ...entry.requestOptions + }; +} - offset = getTimezoneOffsetInMilliseconds(fullTimeDate) +function attachFileToEntry(entry, fileDocument) { + entry.fileDocument = fileDocument; + return entry; +} - // Adjust time when it's coming from DST - var fullTimeDateNextDay = new Date(fullTime) - fullTimeDateNextDay.setDate(fullTimeDate.getDate() + 1) - var offsetDiff = - getTimezoneOffsetInMilliseconds(fullTimeDateNextDay) - - getTimezoneOffsetInMilliseconds(fullTimeDate) - if (offsetDiff > 0) { - offset += offsetDiff - } - } +function getFilePath({ + file, + entry, + options +}) { + const folderPath = options.folderPath; - return new Date(timestamp + time + offset) - } else { - return new Date(argument) + if (file) { + return path.join(folderPath, getAttribute(file, 'name')); + } else if (entry) { + return path.join(folderPath, getFileName(entry)); } } -function splitDateString (dateString) { - var dateStrings = {} - var array = dateString.split(parseTokenDateTimeDelimeter) - var timeString +function getAttribute(obj, attribute) { + return get(obj, `attributes.${attribute}`, get(obj, attribute)); +} - if (parseTokenPlainTime.test(array[0])) { - dateStrings.date = null - timeString = array[0] - } else { - dateStrings.date = array[0] - timeString = array[1] - } +async function getOrCreateDestinationPath(entry, saveOptions) { + const subPath = entry.subPath || saveOptions.subPath; + let finalPath = saveOptions.folderPath; - if (timeString) { - var token = parseTokenTimezone.exec(timeString) - if (token) { - dateStrings.time = timeString.replace(token[1], '') - dateStrings.timezone = token[1] - } else { - dateStrings.time = timeString - } + if (subPath) { + finalPath += '/' + subPath; + await mkdirp(finalPath); } - return dateStrings + return finalPath; } -function parseYear (dateString, additionalDigits) { - var parseTokenYYY = parseTokensYYY[additionalDigits] - var parseTokenYYYYY = parseTokensYYYYY[additionalDigits] +/***/ }), +/* 1225 */ +/***/ (function(module, exports, __webpack_require__) { - var token - // YYYY or ±YYYYY - token = parseTokenYYYY.exec(dateString) || parseTokenYYYYY.exec(dateString) - if (token) { - var yearString = token[1] - return { - year: parseInt(yearString, 10), - restDateString: dateString.slice(yearString.length) +module.exports = __webpack_require__(1226); + + +/***/ }), +/* 1226 */ +/***/ (function(module, exports, __webpack_require__) { + +var Promise = __webpack_require__(25); + +// Subclass of Error that can be thrown to indicate that retry should stop. +// +// If called with an instance of Error subclass, then the retry promise will be +// rejected with the given error. +// +// Otherwise the cancel error object itself is propagated to the caller. +// +function StopError(err) { + this.name = 'StopError'; + if (err instanceof Error) { + this.err = err + } else { + this.message = err || 'cancelled' } - } +} +StopError.prototype = Object.create(Error.prototype); - // YY or ±YYY - token = parseTokenYY.exec(dateString) || parseTokenYYY.exec(dateString) - if (token) { - var centuryString = token[1] - return { - year: parseInt(centuryString, 10) * 100, - restDateString: dateString.slice(centuryString.length) +retry.StopError = StopError; + + +// Retry `func` until it succeeds. +// +// For each attempt, invokes `func` with `options.args` as arguments and +// `options.context` as `this`. +// +// Waits `options.interval` milliseconds (default 1000) between attempts. +// +// Increases wait by a factor of `options.backoff` each interval, up to +// a limit of `options.max_interval`. +// +// Keeps trying until `options.timeout` milliseconds have elapsed, +// or `options.max_tries` have been attempted, whichever comes first. +// +// If neither is specified, then the default is to make 5 attempts. +// + +function retry(func, options) { + options = options || {}; + + var interval = typeof options.interval === 'number' ? options.interval : 1000; + + var max_tries, giveup_time; + if (typeof(options.max_tries) !== 'undefined') { + max_tries = options.max_tries; } - } - // Invalid ISO-formatted year - return { - year: null - } -} + if (options.timeout) { + giveup_time = new Date().getTime() + options.timeout; + } -function parseDate (dateString, year) { - // Invalid ISO-formatted year - if (year === null) { - return null - } + if (!max_tries && !giveup_time) { + max_tries = 5; + } - var token - var date - var month - var week + var tries = 0; + var start = new Date().getTime(); - // YYYY - if (dateString.length === 0) { - date = new Date(0) - date.setUTCFullYear(year) - return date - } + // If the user didn't supply a predicate function then add one that + // always succeeds. + // + // This is used in bluebird's filtered catch to flag the error types + // that should retry. + var predicate = options.predicate || function(err) { return true; } + var stopped = false; - // YYYY-MM - token = parseTokenMM.exec(dateString) - if (token) { - date = new Date(0) - month = parseInt(token[1], 10) - 1 - date.setUTCFullYear(year, month) - return date - } + function try_once() { + var tryStart = new Date().getTime(); + return Promise.attempt(function() { + return func.apply(options.context, options.args); + }) + .caught(StopError, function(err) { + stopped = true; + if (err.err instanceof Error) { + return Promise.reject(err.err); + } else { + return Promise.reject(err); + } + }) + .caught(predicate, function(err) { + if (stopped) { + return Promise.reject(err); + } + ++tries; + if (tries > 1) { + interval = backoff(interval, options); + } + var now = new Date().getTime(); - // YYYY-DDD or YYYYDDD - token = parseTokenDDD.exec(dateString) - if (token) { - date = new Date(0) - var dayOfYear = parseInt(token[1], 10) - date.setUTCFullYear(year, 0, dayOfYear) - return date - } + if ((max_tries && (tries === max_tries) || + (giveup_time && (now + interval >= giveup_time)))) { - // YYYY-MM-DD or YYYYMMDD - token = parseTokenMMDD.exec(dateString) - if (token) { - date = new Date(0) - month = parseInt(token[1], 10) - 1 - var day = parseInt(token[2], 10) - date.setUTCFullYear(year, month, day) - return date - } + if (! (err instanceof Error)) { + var failure = err; - // YYYY-Www or YYYYWww - token = parseTokenWww.exec(dateString) - if (token) { - week = parseInt(token[1], 10) - 1 - return dayOfISOYear(year, week) - } + if (failure) { + if (typeof failure !== 'string') { + failure = JSON.stringify(failure); + } + } - // YYYY-Www-D or YYYYWwwD - token = parseTokenWwwD.exec(dateString) - if (token) { - week = parseInt(token[1], 10) - 1 - var dayOfWeek = parseInt(token[2], 10) - 1 - return dayOfISOYear(year, week, dayOfWeek) - } + err = new Error('rejected with non-error: ' + failure); + err.failure = failure; + } else if (options.throw_original) { + return Promise.reject(err); + } - // Invalid ISO-formatted date - return null + var timeout = new Error('operation timed out after ' + (now - start) + ' ms, ' + tries + ' tries with error: ' + err.message); + timeout.failure = err; + timeout.code = 'ETIMEDOUT'; + return Promise.reject(timeout); + } else { + var delay = interval - (now - tryStart); + if (delay <= 0) { + return try_once(); + } else { + return Promise.delay(delay).then(try_once); + } + } + }); + } + return try_once(); } -function parseTime (timeString) { - var token - var hours - var minutes +// Return the updated interval after applying the various backoff options +function backoff(interval, options) { + if (options.backoff) { + interval = interval * options.backoff; + } - // hh - token = parseTokenHH.exec(timeString) - if (token) { - hours = parseFloat(token[1].replace(',', '.')) - return (hours % 24) * MILLISECONDS_IN_HOUR - } + if (options.max_interval) { + interval = Math.min(interval, options.max_interval); + } - // hh:mm or hhmm - token = parseTokenHHMM.exec(timeString) - if (token) { - hours = parseInt(token[1], 10) - minutes = parseFloat(token[2].replace(',', '.')) - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE - } + return interval; +} - // hh:mm:ss or hhmmss - token = parseTokenHHMMSS.exec(timeString) - if (token) { - hours = parseInt(token[1], 10) - minutes = parseInt(token[2], 10) - var seconds = parseFloat(token[3].replace(',', '.')) - return (hours % 24) * MILLISECONDS_IN_HOUR + - minutes * MILLISECONDS_IN_MINUTE + - seconds * 1000 - } +module.exports = retry; - // Invalid ISO-formatted time - return null -} -function parseTimezone (timezoneString) { - var token - var absoluteOffset +/***/ }), +/* 1227 */ +/***/ (function(module, exports, __webpack_require__) { - // Z - token = parseTokenTimezoneZ.exec(timezoneString) - if (token) { - return 0 - } +/** + * @module mkdirp + */ +const { + basename, + dirname, + join +} = __webpack_require__(160).posix; - // ±hh - token = parseTokenTimezoneHH.exec(timezoneString) - if (token) { - absoluteOffset = parseInt(token[2], 10) * 60 - return (token[1] === '+') ? -absoluteOffset : absoluteOffset - } +const cozyClient = __webpack_require__(485); +/** + * Creates a directory and its missing ancestors as needed. + * + * Options : + * + * - `...pathComponents`: one or many path components to be joined + * + * ```javascript + * await mkdirp('/foo') // Creates /foo + * await mkdirp('/foo') // Does nothing as /foo already exists + * await mkdirp('/bar/baz') // Creates /bar, then /bar/baz + * await mkdirp('/foo/bar/baz') // Creates /foo/bar, then /foo/bar/baz, not /foo + * await mkdirp('/') // Does nothing + * await mkdirp('/qux', 'qux2/qux3', 'qux4') // Creates /qux, then /qux/qux2, + * // then /qux/qux2/qux3 and + * // finally /qux/qux2/qux3/qux4 + * ``` + * + * The function will automatically add a leading slash when missing: + * + * ```javascript + * await mkdirp('foo', 'bar') // Creates /foo, then /foo/bar + * ``` + * + * @alias module:mkdirp + */ - // ±hh:mm or ±hhmm - token = parseTokenTimezoneHHMM.exec(timezoneString) - if (token) { - absoluteOffset = parseInt(token[2], 10) * 60 + parseInt(token[3], 10) - return (token[1] === '+') ? -absoluteOffset : absoluteOffset - } - return 0 -} +const mkdirp = fromCozy(cozyClient); +module.exports = mkdirp; // `fromCozy()` builds an mkdirp() function for the given Cozy client. +// Useful for testing. -function dayOfISOYear (isoYear, week, day) { - week = week || 0 - day = day || 0 - var date = new Date(0) - date.setUTCFullYear(isoYear, 0, 4) - var fourthOfJanuaryDay = date.getUTCDay() || 7 - var diff = week * 7 + day + 1 - fourthOfJanuaryDay - date.setUTCDate(date.getUTCDate() + diff) - return date -} +mkdirp.fromCozy = fromCozy; -module.exports = parse +function fromCozy(cozy) { + return async function mkdirp(...pathComponents) { + const path = join('/', ...pathComponents); + let doc = null; + + try { + doc = await cozy.files.statByPath(path); + return doc; + } catch (err) { + if (![404, 409].includes(err.status)) throw err; + const name = basename(path); + const parentPath = dirname(path); + const parentDoc = await mkdirp(parentPath); + try { + doc = await cozy.files.createDirectory({ + name, + dirID: parentDoc._id + }); + return doc; + } catch (createErr) { + if (![404, 409].includes(createErr.status)) throw createErr; + return doc; + } + } + }; +} /***/ }), -/* 1210 */ -/***/ (function(module, exports) { +/* 1228 */ +/***/ (function(module, exports, __webpack_require__) { -var MILLISECONDS_IN_MINUTE = 60000 +"use strict"; /** - * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds. - * They usually appear for dates that denote time before the timezones were introduced - * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891 - * and GMT+01:00:00 after that date) + * The konnector could not login * - * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above, - * which would lead to incorrect calculations. + * @type {string} + */ + +const LOGIN_FAILED = 'LOGIN_FAILED'; +/** + * The folder specified as folder_to_save does not exist (checked by BaseKonnector) * - * This function returns the timezone offset in milliseconds that takes seconds in account. + * @type {string} */ -module.exports = function getTimezoneOffsetInMilliseconds (dirtyDate) { - var date = new Date(dirtyDate.getTime()) - var baseTimezoneOffset = date.getTimezoneOffset() - date.setSeconds(0, 0) - var millisecondsPartOfTimezoneOffset = date.getTime() % MILLISECONDS_IN_MINUTE - return baseTimezoneOffset * MILLISECONDS_IN_MINUTE + millisecondsPartOfTimezoneOffset -} +const NOT_EXISTING_DIRECTORY = 'NOT_EXISTING_DIRECTORY'; +/** + * The vendor's website is down + * + * @type {string} + */ +const VENDOR_DOWN = 'VENDOR_DOWN'; +/** + * There was an unexpected error, please take a look at the logs to know what happened + * + * @type {string} + */ -/***/ }), -/* 1211 */ -/***/ (function(module, exports) { +const USER_ACTION_NEEDED = 'USER_ACTION_NEEDED'; +/** + * There was a problem while downloading a file + * + * @type {string} + */ +const FILE_DOWNLOAD_FAILED = 'FILE_DOWNLOAD_FAILED'; /** - * @category Common Helpers - * @summary Is the given argument an instance of Date? + * There was a problem while saving a file * - * @description - * Is the given argument an instance of Date? + * @type {string} + */ + +const SAVE_FILE_FAILED = 'SAVE_FILE_FAILED'; +/** + * Could not save a file to the cozy because of disk quota exceeded * - * @param {*} argument - the argument to check - * @returns {Boolean} the given argument is an instance of Date + * @type {string} + */ + +const DISK_QUOTA_EXCEEDED = 'DISK_QUOTA_EXCEEDED'; +/** + * It seems that the website requires a second authentification factor that we don’t support yet. * - * @example - * // Is 'mayonnaise' a Date? - * var result = isDate('mayonnaise') - * //=> false + * @type {string} */ -function isDate (argument) { - return argument instanceof Date -} -module.exports = isDate +const CHALLENGE_ASKED = 'CHALLENGE_ASKED'; +/** + * Temporarily blocked + * + * @type {string} + */ +const LOGIN_FAILED_TOO_MANY_ATTEMPTS = 'LOGIN_FAILED.TOO_MANY_ATTEMPTS'; +/** + * Access refresh required + * + * @type {string} + */ -/***/ }), -/* 1212 */ -/***/ (function(module, exports, __webpack_require__) { +const USER_ACTION_NEEDED_OAUTH_OUTDATED = 'USER_ACTION_NEEDED.OAUTH_OUTDATED'; +/** + * Unavailable account + * + * @type {string} + */ -var parse = __webpack_require__(1209) +const USER_ACTION_NEEDED_ACCOUNT_REMOVED = 'USER_ACTION_NEEDED.ACCOUNT_REMOVED'; +/** + * Unavailable account + * + * @type {string} + */ +const USER_ACTION_NEEDED_CHANGE_PASSWORD = 'USER_ACTION_NEEDED.CHANGE_PASSWORD'; /** - * @category Common Helpers - * @summary Is the first date after the second one? + * Password update required * - * @description - * Is the first date after the second one? + * @type {string} + */ + +const USER_ACTION_NEEDED_PERMISSIONS_CHANGED = 'USER_ACTION_NEEDED.PERMISSIONS_CHANGED'; +/** + * The user needs to accept a CGU form before accessing the rest of the website * - * @param {Date|String|Number} date - the date that should be after the other one to return true - * @param {Date|String|Number} dateToCompare - the date to compare with - * @returns {Boolean} the first date is after the second date + * @type {string} + */ + +const USER_ACTION_NEEDED_CGU_FORM = 'USER_ACTION_NEEDED.CGU_FORM'; +/** + * solveCaptcha failed to solve the captcha * - * @example - * // Is 10 July 1989 after 11 February 1987? - * var result = isAfter(new Date(1989, 6, 10), new Date(1987, 1, 11)) - * //=> true + * @type {string} */ -function isAfter (dirtyDate, dirtyDateToCompare) { - var date = parse(dirtyDate) - var dateToCompare = parse(dirtyDateToCompare) - return date.getTime() > dateToCompare.getTime() + +const CAPTCHA_RESOLUTION_FAILED = 'CAPTCHA_RESOLUTION_FAILED'; +module.exports = { + LOGIN_FAILED, + NOT_EXISTING_DIRECTORY, + VENDOR_DOWN, + USER_ACTION_NEEDED, + FILE_DOWNLOAD_FAILED, + SAVE_FILE_FAILED, + DISK_QUOTA_EXCEEDED, + CHALLENGE_ASKED, + LOGIN_FAILED_TOO_MANY_ATTEMPTS, + USER_ACTION_NEEDED_OAUTH_OUTDATED, + USER_ACTION_NEEDED_ACCOUNT_REMOVED, + USER_ACTION_NEEDED_CHANGE_PASSWORD, + USER_ACTION_NEEDED_PERMISSIONS_CHANGED, + USER_ACTION_NEEDED_CGU_FORM, + CAPTCHA_RESOLUTION_FAILED +}; + +/***/ }), +/* 1229 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +const strtok3 = __webpack_require__(1230); +const core = __webpack_require__(1239); + +async function fromFile(path) { + const tokenizer = await strtok3.fromFile(path); + try { + return await core.fromTokenizer(tokenizer); + } finally { + await tokenizer.close(); + } } -module.exports = isAfter +const fileType = { + fromFile +}; + +Object.assign(fileType, core); + +Object.defineProperty(fileType, 'extensions', { + get() { + return core.extensions; + } +}); + +Object.defineProperty(fileType, 'mimeTypes', { + get() { + return core.mimeTypes; + } +}); + +module.exports = fileType; /***/ }), -/* 1213 */ +/* 1230 */ /***/ (function(module, exports, __webpack_require__) { -const groupBy = __webpack_require__(730) -const sortBy = __webpack_require__(828) -const { eitherIncludes } = __webpack_require__(1203) - -const getDateTransaction = op => op.date.substr(0, 10) +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromStream = exports.fromBuffer = exports.EndOfStreamError = exports.fromFile = void 0; +const fs = __webpack_require__(1231); +const core = __webpack_require__(1232); +var FileTokenizer_1 = __webpack_require__(1238); +Object.defineProperty(exports, "fromFile", { enumerable: true, get: function () { return FileTokenizer_1.fromFile; } }); +var core_1 = __webpack_require__(1232); +Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return core_1.EndOfStreamError; } }); +Object.defineProperty(exports, "fromBuffer", { enumerable: true, get: function () { return core_1.fromBuffer; } }); /** - * Groups `iterables` via `grouper` and returns an iterator - * that yields [groupKey, groups] + * Construct ReadStreamTokenizer from given Stream. + * Will set fileSize, if provided given Stream has set the .path property. + * @param stream - Node.js Stream.Readable + * @param fileInfo - Pass additional file information to the tokenizer + * @returns Tokenizer */ -const zipGroup = function*(iterables, grouper) { - const grouped = iterables.map(items => groupBy(items, grouper)) - for (const key of Object.keys(grouped[0]).sort()) { - const groups = grouped.map(keyedGroups => keyedGroups[key] || []) - yield [key, groups] - } +async function fromStream(stream, fileInfo) { + fileInfo = fileInfo ? fileInfo : {}; + if (stream.path) { + const stat = await fs.stat(stream.path); + fileInfo.path = stream.path; + fileInfo.size = stat.size; + } + return core.fromStream(stream, fileInfo); } +exports.fromStream = fromStream; -const squash = (str, char) => { - const rx = new RegExp(String.raw`${char}{2,}`, 'gi') - return str && str.replace(rx, char) -} -const redactedNumber = /\b[0-9X]+\b/gi -const dateRx = /\b\d{2}\/\d{2}\/\d{4}\b/g +/***/ }), +/* 1231 */ +/***/ (function(module, exports, __webpack_require__) { -const cleanLabel = label => label && label.replace(redactedNumber, '') -const withoutDate = str => str && str.replace(dateRx, '') -const compacted = str => str && str.replace(/\s/g, '').replace(/-/g, '') +"use strict"; -const scoreLabel = (newTr, existingTr) => { - if ( - squash(existingTr.originalBankLabel, ' ') === - squash(newTr.originalBankLabel, ' ') - ) { - return [200, 'originalBankLabel'] - } else if ( - compacted(existingTr.originalBankLabel) === - compacted(newTr.originalBankLabel) - ) { - return [120, 'originalBankLabelCompacted'] - } else if ( - withoutDate(existingTr.originalBankLabel) === - withoutDate(newTr.originalBankLabel) - ) { - // For some transfers, the date in the originalBankLabel is different between - // BudgetInsight and Linxo - return [150, 'originalBankLabelWithoutDate'] - } else if (existingTr.label === newTr.label) { - return [100, 'label'] - } else if ( - eitherIncludes(existingTr.label.toLowerCase(), newTr.label.toLowerCase()) - ) { - return [70, 'eitherIncludes'] - } else if ( - eitherIncludes( - cleanLabel(existingTr.label.toLowerCase()), - cleanLabel(newTr.label.toLowerCase()) - ) - ) { - return [50, 'fuzzy-eitherIncludes'] - } else { - // Nothing matches, we penalize so that the score is below 0 - return [-1000, 'label-penalty'] - } +/** + * Module convert fs functions to promise based functions + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readFile = exports.writeFileSync = exports.writeFile = exports.read = exports.open = exports.close = exports.stat = exports.createReadStream = exports.pathExists = void 0; +const fs = __webpack_require__(167); +exports.pathExists = fs.existsSync; +exports.createReadStream = fs.createReadStream; +async function stat(path) { + return new Promise((resolve, reject) => { + fs.stat(path, (err, stats) => { + if (err) + reject(err); + else + resolve(stats); + }); + }); +} +exports.stat = stat; +async function close(fd) { + return new Promise((resolve, reject) => { + fs.close(fd, err => { + if (err) + reject(err); + else + resolve(); + }); + }); +} +exports.close = close; +async function open(path, mode) { + return new Promise((resolve, reject) => { + fs.open(path, mode, (err, fd) => { + if (err) + reject(err); + else + resolve(fd); + }); + }); +} +exports.open = open; +async function read(fd, buffer, offset, length, position) { + return new Promise((resolve, reject) => { + fs.read(fd, buffer, offset, length, position, (err, bytesRead, _buffer) => { + if (err) + reject(err); + else + resolve({ bytesRead, buffer: _buffer }); + }); + }); +} +exports.read = read; +async function writeFile(path, data) { + return new Promise((resolve, reject) => { + fs.writeFile(path, data, err => { + if (err) + reject(err); + else + resolve(); + }); + }); +} +exports.writeFile = writeFile; +function writeFileSync(path, data) { + fs.writeFileSync(path, data); +} +exports.writeFileSync = writeFileSync; +async function readFile(path) { + return new Promise((resolve, reject) => { + fs.readFile(path, (err, buffer) => { + if (err) + reject(err); + else + resolve(buffer); + }); + }); } +exports.readFile = readFile; -const DAY = 1000 * 60 * 60 * 24 -const getDeltaDate = (newTr, existingTr) => { - const nDate1 = new Date(newTr.date.substr(0, 10)) - const eDate1 = new Date(existingTr.date.substr(0, 10)) - const delta = Math.abs(eDate1 - nDate1) - if (newTr.realisationDate) { - const nDate2 = new Date(newTr.realisationDate.substr(0, 10)) - const delta2 = Math.abs(eDate1 - nDate2) - return Math.min(delta, delta2) - } else { - return delta - } +/***/ }), +/* 1232 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromBuffer = exports.fromStream = exports.EndOfStreamError = void 0; +const ReadStreamTokenizer_1 = __webpack_require__(1233); +const BufferTokenizer_1 = __webpack_require__(1237); +var peek_readable_1 = __webpack_require__(1235); +Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return peek_readable_1.EndOfStreamError; } }); +/** + * Construct ReadStreamTokenizer from given Stream. + * Will set fileSize, if provided given Stream has set the .path property/ + * @param stream - Read from Node.js Stream.Readable + * @param fileInfo - Pass the file information, like size and MIME-type of the correspnding stream. + * @returns ReadStreamTokenizer + */ +function fromStream(stream, fileInfo) { + fileInfo = fileInfo ? fileInfo : {}; + return new ReadStreamTokenizer_1.ReadStreamTokenizer(stream, fileInfo); +} +exports.fromStream = fromStream; +/** + * Construct ReadStreamTokenizer from given Buffer. + * @param uint8Array - Uint8Array to tokenize + * @param fileInfo - Pass additional file information to the tokenizer + * @returns BufferTokenizer + */ +function fromBuffer(uint8Array, fileInfo) { + return new BufferTokenizer_1.BufferTokenizer(uint8Array, fileInfo); } +exports.fromBuffer = fromBuffer; -const scoreMatching = (newTr, existingTr, options = {}) => { - const methods = [] - const res = { - op: existingTr, - methods - } - if (options.maxDateDelta) { - const delta = getDeltaDate(newTr, existingTr) - if (delta > options.maxDateDelta) { - // Early exit, transactions are two far off time-wise - res.points = -1000 - return res - } else { - methods.push('approx-date') - } - } +/***/ }), +/* 1233 */ +/***/ (function(module, exports, __webpack_require__) { - const [labelPoints, labelMethod] = scoreLabel(newTr, existingTr) - methods.push(labelMethod) - const amountDiff = Math.abs(existingTr.amount - newTr.amount) - const amountPoints = amountDiff === 0 ? methods.push('amount') && 100 : -1000 +"use strict"; - const points = amountPoints + labelPoints - res.points = points - return res +Object.defineProperty(exports, "__esModule", { value: true }); +exports.ReadStreamTokenizer = void 0; +const AbstractTokenizer_1 = __webpack_require__(1234); +const peek_readable_1 = __webpack_require__(1235); +const maxBufferSize = 256000; +class ReadStreamTokenizer extends AbstractTokenizer_1.AbstractTokenizer { + constructor(stream, fileInfo) { + super(fileInfo); + this.streamReader = new peek_readable_1.StreamReader(stream); + } + /** + * Get file information, an HTTP-client may implement this doing a HEAD request + * @return Promise with file information + */ + async getFileInfo() { + return this.fileInfo; + } + /** + * Read buffer from tokenizer + * @param uint8Array - Target Uint8Array to fill with data read from the tokenizer-stream + * @param options - Read behaviour options + * @returns Promise with number of bytes read + */ + async readBuffer(uint8Array, options) { + const normOptions = this.normalizeOptions(uint8Array, options); + const skipBytes = normOptions.position - this.position; + if (skipBytes > 0) { + await this.ignore(skipBytes); + return this.readBuffer(uint8Array, options); + } + else if (skipBytes < 0) { + throw new Error('`options.position` must be equal or greater than `tokenizer.position`'); + } + if (normOptions.length === 0) { + return 0; + } + const bytesRead = await this.streamReader.read(uint8Array, normOptions.offset, normOptions.length); + this.position += bytesRead; + if ((!options || !options.mayBeLess) && bytesRead < normOptions.length) { + throw new peek_readable_1.EndOfStreamError(); + } + return bytesRead; + } + /** + * Peek (read ahead) buffer from tokenizer + * @param uint8Array - Uint8Array (or Buffer) to write data to + * @param options - Read behaviour options + * @returns Promise with number of bytes peeked + */ + async peekBuffer(uint8Array, options) { + const normOptions = this.normalizeOptions(uint8Array, options); + let bytesRead = 0; + if (normOptions.position) { + const skipBytes = normOptions.position - this.position; + if (skipBytes > 0) { + const skipBuffer = new Uint8Array(normOptions.length + skipBytes); + bytesRead = await this.peekBuffer(skipBuffer, { mayBeLess: normOptions.mayBeLess }); + uint8Array.set(skipBuffer.subarray(skipBytes), normOptions.offset); + return bytesRead - skipBytes; + } + else if (skipBytes < 0) { + throw new Error('Cannot peek from a negative offset in a stream'); + } + } + if (normOptions.length > 0) { + try { + bytesRead = await this.streamReader.peek(uint8Array, normOptions.offset, normOptions.length); + } + catch (err) { + if (options && options.mayBeLess && err instanceof peek_readable_1.EndOfStreamError) { + return 0; + } + throw err; + } + if ((!normOptions.mayBeLess) && bytesRead < normOptions.length) { + throw new peek_readable_1.EndOfStreamError(); + } + } + return bytesRead; + } + async ignore(length) { + // debug(`ignore ${this.position}...${this.position + length - 1}`); + const bufSize = Math.min(maxBufferSize, length); + const buf = new Uint8Array(bufSize); + let totBytesRead = 0; + while (totBytesRead < length) { + const remaining = length - totBytesRead; + const bytesRead = await this.readBuffer(buf, { length: Math.min(bufSize, remaining) }); + if (bytesRead < 0) { + return bytesRead; + } + totBytesRead += bytesRead; + } + return totBytesRead; + } } +exports.ReadStreamTokenizer = ReadStreamTokenizer; -const matchTransaction = (newTr, existingTrs, options = {}) => { - const exactVendorId = existingTrs.find( - existingTr => - existingTr.vendorId && - newTr.vendorId && - existingTr.vendorId === newTr.vendorId - ) - if (exactVendorId) { - return { match: exactVendorId, method: 'vendorId' } - } - // Now we try to do it based on originalBankLabel, label and amount. - // We score candidates according to their degree of matching - // with the current transaction. - // Candidates with score below 0 will be discarded. - const withPoints = existingTrs.map(existingTr => - scoreMatching(newTr, existingTr, options) - ) +/***/ }), +/* 1234 */ +/***/ (function(module, exports, __webpack_require__) { - const candidates = sortBy(withPoints, x => -x.points).filter( - x => x.points > 0 - ) - return candidates.length > 0 - ? { - match: candidates[0].op, - method: candidates[0].methods.join('-') - } - : { - candidates - } -} +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AbstractTokenizer = void 0; +const peek_readable_1 = __webpack_require__(1235); /** - * Logic to match a transaction and removing it from the transactions to - * match. `matchingFn` is the function used for matching. + * Core tokenizer */ -const matchTransactionToGroup = function*(newTrs, existingTrs, options = {}) { - const toMatch = Array.isArray(existingTrs) ? [...existingTrs] : [] - for (let newTr of newTrs) { - const res = { - transaction: newTr +class AbstractTokenizer { + constructor(fileInfo) { + /** + * Tokenizer-stream position + */ + this.position = 0; + this.numBuffer = new Uint8Array(8); + this.fileInfo = fileInfo ? fileInfo : {}; } - - const result = - toMatch.length > 0 ? matchTransaction(newTr, toMatch, options) : null - if (result) { - Object.assign(res, result) - const matchIdx = toMatch.indexOf(result.match) - if (matchIdx > -1) { - toMatch.splice(matchIdx, 1) - } + /** + * Read a token from the tokenizer-stream + * @param token - The token to read + * @param position - If provided, the desired position in the tokenizer-stream + * @returns Promise with token data + */ + async readToken(token, position = this.position) { + const uint8Array = Buffer.alloc(token.len); + const len = await this.readBuffer(uint8Array, { position }); + if (len < token.len) + throw new peek_readable_1.EndOfStreamError(); + return token.get(uint8Array, 0); + } + /** + * Peek a token from the tokenizer-stream. + * @param token - Token to peek from the tokenizer-stream. + * @param position - Offset where to begin reading within the file. If position is null, data will be read from the current file position. + * @returns Promise with token data + */ + async peekToken(token, position = this.position) { + const uint8Array = Buffer.alloc(token.len); + const len = await this.peekBuffer(uint8Array, { position }); + if (len < token.len) + throw new peek_readable_1.EndOfStreamError(); + return token.get(uint8Array, 0); + } + /** + * Read a numeric token from the stream + * @param token - Numeric token + * @returns Promise with number + */ + async readNumber(token) { + const len = await this.readBuffer(this.numBuffer, { length: token.len }); + if (len < token.len) + throw new peek_readable_1.EndOfStreamError(); + return token.get(this.numBuffer, 0); + } + /** + * Read a numeric token from the stream + * @param token - Numeric token + * @returns Promise with number + */ + async peekNumber(token) { + const len = await this.peekBuffer(this.numBuffer, { length: token.len }); + if (len < token.len) + throw new peek_readable_1.EndOfStreamError(); + return token.get(this.numBuffer, 0); + } + /** + * Ignore number of bytes, advances the pointer in under tokenizer-stream. + * @param length - Number of bytes to ignore + * @return resolves the number of bytes ignored, equals length if this available, otherwise the number of bytes available + */ + async ignore(length) { + if (this.fileInfo.size !== undefined) { + const bytesLeft = this.fileInfo.size - this.position; + if (length > bytesLeft) { + this.position += bytesLeft; + return bytesLeft; + } + } + this.position += length; + return length; + } + async close() { + // empty + } + normalizeOptions(uint8Array, options) { + if (options && options.position !== undefined && options.position < this.position) { + throw new Error('`options.position` must be equal or greater than `tokenizer.position`'); + } + if (options) { + return { + mayBeLess: options.mayBeLess === true, + offset: options.offset ? options.offset : 0, + length: options.length ? options.length : (uint8Array.length - (options.offset ? options.offset : 0)), + position: options.position ? options.position : this.position + }; + } + return { + mayBeLess: false, + offset: 0, + length: uint8Array.length, + position: this.position + }; } - yield res - } } +exports.AbstractTokenizer = AbstractTokenizer; -/** - * Several logics to match transactions. - * - * First group transactions per day and match transactions in - * intra-day mode. - * Then relax the date constraint 1 day per 1 day to reach - * a maximum of 5 days of differences - */ -const matchTransactions = function*(newTrs, existingTrs) { - const unmatchedNew = new Set(newTrs) - const unmatchedExisting = new Set(existingTrs) - // eslint-disable-next-line no-unused-vars - for (let [date, [newGroup, existingGroup]] of zipGroup( - [newTrs, existingTrs], - getDateTransaction - )) { - for (let result of matchTransactionToGroup(newGroup, existingGroup)) { - if (result.match) { - unmatchedExisting.delete(result.match) - unmatchedNew.delete(result.transaction) - yield result - } - } - } - const deltas = [3, 4, 5] - for (let delta of deltas) { - for (let result of matchTransactionToGroup( - Array.from(unmatchedNew), - Array.from(unmatchedExisting), - { - maxDateDelta: delta * DAY - } - )) { - if (result.method) { - result.method += `-delta${delta}` - } - if (result.match) { - unmatchedExisting.delete(result.match) - unmatchedNew.delete(result.transaction) - } - if (result.match || delta === deltas[deltas.length - 1]) { - yield result - } +/***/ }), +/* 1235 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.StreamReader = exports.EndOfStreamError = void 0; +const EndOfFileStream_1 = __webpack_require__(1236); +var EndOfFileStream_2 = __webpack_require__(1236); +Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return EndOfFileStream_2.EndOfStreamError; } }); +class Deferred { + constructor() { + this.resolve = () => null; + this.reject = () => null; + this.promise = new Promise((resolve, reject) => { + this.reject = reject; + this.resolve = resolve; + }); + } +} +const maxStreamReadSize = 1 * 1024 * 1024; // Maximum request length on read-stream operation +class StreamReader { + constructor(s) { + this.s = s; + /** + * Deferred read request + */ + this.request = null; + this.endOfStream = false; + /** + * Store peeked data + * @type {Array} + */ + this.peekQueue = []; + if (!s.read || !s.once) { + throw new Error('Expected an instance of stream.Readable'); + } + this.s.once('end', () => this.reject(new EndOfFileStream_1.EndOfStreamError())); + this.s.once('error', err => this.reject(err)); + this.s.once('close', () => this.reject(new Error('Stream closed'))); + } + /** + * Read ahead (peek) from stream. Subsequent read or peeks will return the same data + * @param uint8Array - Uint8Array (or Buffer) to store data read from stream in + * @param offset - Offset target + * @param length - Number of bytes to read + * @returns Number of bytes peeked + */ + async peek(uint8Array, offset, length) { + const bytesRead = await this.read(uint8Array, offset, length); + this.peekQueue.push(uint8Array.subarray(offset, offset + bytesRead)); // Put read data back to peek buffer + return bytesRead; + } + /** + * Read chunk from stream + * @param buffer - Target Uint8Array (or Buffer) to store data read from stream in + * @param offset - Offset target + * @param length - Number of bytes to read + * @returns Number of bytes read + */ + async read(buffer, offset, length) { + if (length === 0) { + return 0; + } + if (this.peekQueue.length === 0 && this.endOfStream) { + throw new EndOfFileStream_1.EndOfStreamError(); + } + let remaining = length; + let bytesRead = 0; + // consume peeked data first + while (this.peekQueue.length > 0 && remaining > 0) { + const peekData = this.peekQueue.pop(); // Front of queue + if (!peekData) + throw new Error('peekData should be defined'); + const lenCopy = Math.min(peekData.length, remaining); + buffer.set(peekData.subarray(0, lenCopy), offset + bytesRead); + bytesRead += lenCopy; + remaining -= lenCopy; + if (lenCopy < peekData.length) { + // remainder back to queue + this.peekQueue.push(peekData.subarray(lenCopy)); + } + } + // continue reading from stream if required + while (remaining > 0 && !this.endOfStream) { + const reqLen = Math.min(remaining, maxStreamReadSize); + const chunkLen = await this._read(buffer, offset + bytesRead, reqLen); + bytesRead += chunkLen; + if (chunkLen < reqLen) + break; + remaining -= chunkLen; + } + return bytesRead; + } + /** + * Read chunk from stream + * @param buffer Target Uint8Array (or Buffer) to store data read from stream in + * @param offset Offset target + * @param length Number of bytes to read + * @returns Number of bytes read + */ + async _read(buffer, offset, length) { + if (this.request) + throw new Error('Concurrent read operation?'); + const readBuffer = this.s.read(length); + if (readBuffer) { + buffer.set(readBuffer, offset); + return readBuffer.length; + } + else { + this.request = { + buffer, + offset, + length, + deferred: new Deferred() + }; + this.s.once('readable', () => { + this.tryRead(); + }); + return this.request.deferred.promise; + } + } + tryRead() { + if (!this.request) + throw new Error('this.request should be defined'); + const readBuffer = this.s.read(this.request.length); + if (readBuffer) { + this.request.buffer.set(readBuffer, this.request.offset); + this.request.deferred.resolve(readBuffer.length); + this.request = null; + } + else { + this.s.once('readable', () => { + this.tryRead(); + }); + } + } + reject(err) { + this.endOfStream = true; + if (this.request) { + this.request.deferred.reject(err); + this.request = null; + } } - } } +exports.StreamReader = StreamReader; -module.exports = { - matchTransactions, - scoreMatching + +/***/ }), +/* 1236 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.EndOfStreamError = exports.defaultMessages = void 0; +exports.defaultMessages = 'End-Of-Stream'; +/** + * Thrown on read operation of the end of file or stream has been reached + */ +class EndOfStreamError extends Error { + constructor() { + super(exports.defaultMessages); + } } +exports.EndOfStreamError = EndOfStreamError; /***/ }), -/* 1214 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { -const Document = __webpack_require__(1182) -const sumBy = __webpack_require__(1215) - -class BankAccountStats extends Document { - static checkCurrencies(accountsStats) { - const currency = accountsStats[0].currency +"use strict"; - for (const accountStats of accountsStats) { - if (accountStats.currency !== currency) { - return false - } +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BufferTokenizer = void 0; +const peek_readable_1 = __webpack_require__(1235); +const AbstractTokenizer_1 = __webpack_require__(1234); +class BufferTokenizer extends AbstractTokenizer_1.AbstractTokenizer { + /** + * Construct BufferTokenizer + * @param uint8Array - Uint8Array to tokenize + * @param fileInfo - Pass additional file information to the tokenizer + */ + constructor(uint8Array, fileInfo) { + super(fileInfo); + this.uint8Array = uint8Array; + this.fileInfo.size = this.fileInfo.size ? this.fileInfo.size : uint8Array.length; + } + /** + * Read buffer from tokenizer + * @param uint8Array - Uint8Array to tokenize + * @param options - Read behaviour options + * @returns {Promise<number>} + */ + async readBuffer(uint8Array, options) { + if (options && options.position) { + if (options.position < this.position) { + throw new Error('`options.position` must be equal or greater than `tokenizer.position`'); + } + this.position = options.position; + } + const bytesRead = await this.peekBuffer(uint8Array, options); + this.position += bytesRead; + return bytesRead; + } + /** + * Peek (read ahead) buffer from tokenizer + * @param uint8Array + * @param options - Read behaviour options + * @returns {Promise<number>} + */ + async peekBuffer(uint8Array, options) { + const normOptions = this.normalizeOptions(uint8Array, options); + const bytes2read = Math.min(this.uint8Array.length - normOptions.position, normOptions.length); + if ((!normOptions.mayBeLess) && bytes2read < normOptions.length) { + throw new peek_readable_1.EndOfStreamError(); + } + else { + uint8Array.set(this.uint8Array.subarray(normOptions.position, normOptions.position + bytes2read), normOptions.offset); + return bytes2read; + } + } + async close() { + // empty } +} +exports.BufferTokenizer = BufferTokenizer; - return true - } - static sum(accountsStats) { - if (accountsStats.length === 0) { - throw new Error('You must give at least one stats object') - } +/***/ }), +/* 1238 */ +/***/ (function(module, exports, __webpack_require__) { - if (!this.checkCurrencies(accountsStats)) { - throw new Error('Currency of all stats object must be the same.') +"use strict"; + +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fromFile = exports.FileTokenizer = void 0; +const AbstractTokenizer_1 = __webpack_require__(1234); +const peek_readable_1 = __webpack_require__(1235); +const fs = __webpack_require__(1231); +class FileTokenizer extends AbstractTokenizer_1.AbstractTokenizer { + constructor(fd, fileInfo) { + super(fileInfo); + this.fd = fd; + } + /** + * Read buffer from file + * @param uint8Array - Uint8Array to write result to + * @param options - Read behaviour options + * @returns Promise number of bytes read + */ + async readBuffer(uint8Array, options) { + const normOptions = this.normalizeOptions(uint8Array, options); + this.position = normOptions.position; + const res = await fs.read(this.fd, uint8Array, normOptions.offset, normOptions.length, normOptions.position); + this.position += res.bytesRead; + if (res.bytesRead < normOptions.length && (!options || !options.mayBeLess)) { + throw new peek_readable_1.EndOfStreamError(); + } + return res.bytesRead; + } + /** + * Peek buffer from file + * @param uint8Array - Uint8Array (or Buffer) to write data to + * @param options - Read behaviour options + * @returns Promise number of bytes read + */ + async peekBuffer(uint8Array, options) { + const normOptions = this.normalizeOptions(uint8Array, options); + const res = await fs.read(this.fd, uint8Array, normOptions.offset, normOptions.length, normOptions.position); + if ((!normOptions.mayBeLess) && res.bytesRead < normOptions.length) { + throw new peek_readable_1.EndOfStreamError(); + } + return res.bytesRead; + } + async close() { + return fs.close(this.fd); + } +} +exports.FileTokenizer = FileTokenizer; +async function fromFile(sourceFilePath) { + const stat = await fs.stat(sourceFilePath); + if (!stat.isFile) { + throw new Error(`File not a file: ${sourceFilePath}`); } + const fd = await fs.open(sourceFilePath, 'r'); + return new FileTokenizer(fd, { path: sourceFilePath, size: stat.size }); +} +exports.fromFile = fromFile; - const properties = [ - 'income', - 'additionalIncome', - 'mortgage', - 'loans', - 'fixedCharges' - ] - const summedStats = properties.reduce((sums, property) => { - sums[property] = sumBy( - accountsStats, - accountStats => accountStats[property] || 0 - ) +/***/ }), +/* 1239 */ +/***/ (function(module, exports, __webpack_require__) { - return sums - }, {}) +"use strict"; - summedStats.currency = accountsStats[0].currency +const Token = __webpack_require__(1240); +const strtok3 = __webpack_require__(1232); +const { + stringToBytes, + tarHeaderChecksumMatches, + uint32SyncSafeToken +} = __webpack_require__(1242); +const supported = __webpack_require__(1243); - return summedStats - } +const minimumBytes = 4100; // A fair amount of file-types are detectable within this range + +async function fromStream(stream) { + const tokenizer = await strtok3.fromStream(stream); + try { + return await fromTokenizer(tokenizer); + } finally { + await tokenizer.close(); + } } -BankAccountStats.doctype = 'io.cozy.bank.accounts.stats' -BankAccountStats.idAttributes = ['_id'] -BankAccountStats.version = 1 -BankAccountStats.checkedAttributes = null +async function fromBuffer(input) { + if (!(input instanceof Uint8Array || input instanceof ArrayBuffer || Buffer.isBuffer(input))) { + throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof input}\``); + } -module.exports = BankAccountStats + const buffer = input instanceof Buffer ? input : Buffer.from(input); + if (!(buffer && buffer.length > 1)) { + return; + } -/***/ }), -/* 1215 */ -/***/ (function(module, exports, __webpack_require__) { + const tokenizer = strtok3.fromBuffer(buffer); + return fromTokenizer(tokenizer); +} -var baseIteratee = __webpack_require__(413), - baseSum = __webpack_require__(1216); +function _check(buffer, headers, options) { + options = { + offset: 0, + ...options + }; -/** - * This method is like `_.sum` except that it accepts `iteratee` which is - * invoked for each element in `array` to generate the value to be summed. - * The iteratee is invoked with one argument: (value). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Math - * @param {Array} array The array to iterate over. - * @param {Function} [iteratee=_.identity] The iteratee invoked per element. - * @returns {number} Returns the sum. - * @example - * - * var objects = [{ 'n': 4 }, { 'n': 2 }, { 'n': 8 }, { 'n': 6 }]; - * - * _.sumBy(objects, function(o) { return o.n; }); - * // => 20 - * - * // The `_.property` iteratee shorthand. - * _.sumBy(objects, 'n'); - * // => 20 - */ -function sumBy(array, iteratee) { - return (array && array.length) - ? baseSum(array, baseIteratee(iteratee, 2)) - : 0; + for (const [index, header] of headers.entries()) { + // If a bitmask is set + if (options.mask) { + // If header doesn't equal `buf` with bits masked off + if (header !== (options.mask[index] & buffer[index + options.offset])) { + return false; + } + } else if (header !== buffer[index + options.offset]) { + return false; + } + } + + return true; } -module.exports = sumBy; +async function fromTokenizer(tokenizer) { + try { + return _fromTokenizer(tokenizer); + } catch (error) { + if (!(error instanceof strtok3.EndOfStreamError)) { + throw error; + } + } +} +async function _fromTokenizer(tokenizer) { + let buffer = Buffer.alloc(minimumBytes); + const bytesRead = 12; + const check = (header, options) => _check(buffer, header, options); + const checkString = (header, options) => check(stringToBytes(header), options); -/***/ }), -/* 1216 */ -/***/ (function(module, exports) { + // Keep reading until EOF if the file size is unknown. + if (!tokenizer.fileInfo.size) { + tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER; + } -/** - * The base implementation of `_.sum` and `_.sumBy` without support for - * iteratee shorthands. - * - * @private - * @param {Array} array The array to iterate over. - * @param {Function} iteratee The function invoked per iteration. - * @returns {number} Returns the sum. - */ -function baseSum(array, iteratee) { - var result, - index = -1, - length = array.length; + await tokenizer.peekBuffer(buffer, {length: bytesRead, mayBeLess: true}); - while (++index < length) { - var current = iteratee(array[index]); - if (current !== undefined) { - result = result === undefined ? current : (result + current); - } - } - return result; -} + // -- 2-byte signatures -- -module.exports = baseSum; + if (check([0x42, 0x4D])) { + return { + ext: 'bmp', + mime: 'image/bmp' + }; + } + if (check([0x0B, 0x77])) { + return { + ext: 'ac3', + mime: 'audio/vnd.dolby.dd-raw' + }; + } -/***/ }), -/* 1217 */ -/***/ (function(module, exports, __webpack_require__) { + if (check([0x78, 0x01])) { + return { + ext: 'dmg', + mime: 'application/x-apple-diskimage' + }; + } -const trimEnd = __webpack_require__(1218) -const Document = __webpack_require__(1182) + if (check([0x4D, 0x5A])) { + return { + ext: 'exe', + mime: 'application/x-msdownload' + }; + } -const FILENAME_WITH_EXTENSION_REGEX = /(.+)(\..*)$/ + if (check([0x25, 0x21])) { + await tokenizer.peekBuffer(buffer, {length: 24, mayBeLess: true}); -/** - * Class representing the file model. - * @extends Document - */ -class CozyFile extends Document { - /** - * async getFullpath - Gets a file's path - * - * @param {string} dirID The id of the parent directory - * @param {string} name The file's name - * @return {string} The full path of the file in the cozy - **/ - static async getFullpath(dirId, name) { - if (!dirId) { - throw new Error('You must provide a dirId') - } + if (checkString('PS-Adobe-', {offset: 2}) && + checkString(' EPSF-', {offset: 14})) { + return { + ext: 'eps', + mime: 'application/eps' + }; + } - const parentDir = await this.get(dirId) - const parentDirectoryPath = trimEnd(parentDir.path, '/') - return `${parentDirectoryPath}/${name}` - } + return { + ext: 'ps', + mime: 'application/postscript' + }; + } - /** - * Move file to destination. - * - * @param {string} fileId - The file's id (required) - * @param {object} destination - * @param {string} destination.folderId - The destination folder's id (required) - * @param {string} destination.path - The file's path after the move (optional, used to optimize performance in case of conflict) - * @param {string} force - Whether we should overwrite the destination in case of conflict (defaults to false) - * @returns {Promise} - A promise that returns the move action response and the deleted file id (if any) if resolved or an Error if rejected - * - */ - static async move(fileId, destination, force = false) { - const { folderId, path } = destination - const filesCollection = this.cozyClient.collection('io.cozy.files') - try { - const resp = await filesCollection.updateFileMetadata(fileId, { - dir_id: folderId - }) + if ( + check([0x1F, 0xA0]) || + check([0x1F, 0x9D]) + ) { + return { + ext: 'Z', + mime: 'application/x-compress' + }; + } - return { - moved: resp.data, - deleted: null - } - } catch (e) { - if (e.status === 409 && force) { - let destinationPath - if (path) { - destinationPath = path - } else { - const movedFile = await this.get(fileId) - const filename = movedFile.name - destinationPath = await this.getFullpath(folderId, filename) - } - const conflictResp = await filesCollection.statByPath(destinationPath) - await filesCollection.destroy(conflictResp.data) - const resp = await filesCollection.updateFileMetadata(fileId, { - dir_id: folderId - }) + // -- 3-byte signatures -- - return { - moved: resp.data, - deleted: conflictResp.data.id - } - } else { - throw e - } - } - } - /** - * Method to split both the filename and the extension - * - * @param {Object} file An io.cozy.files - * @return {Object} return an object with {filename: , extension: } - */ - static splitFilename(file) { - if (!file.name) throw new Error('file should have a name property ') + if (check([0xFF, 0xD8, 0xFF])) { + return { + ext: 'jpg', + mime: 'image/jpeg' + }; + } - if (file.type === 'file') { - const match = file.name.match(FILENAME_WITH_EXTENSION_REGEX) - if (match) { - return { filename: match[1], extension: match[2] } - } - } - return { filename: file.name, extension: '' } - } - /** - * - * Method to upload a file even if a file with the same name already exists. - * - * @param {String} path Fullpath for the file ex: path/to/ - * @param {Object} file HTML Object file - * @param {Object} metadata An object containing the wanted metadata to attach - */ - static async overrideFileForPath(pathArg, file, metadata) { - let path = pathArg - if (!path.endsWith('/')) path = path + '/' + if (check([0x49, 0x49, 0xBC])) { + return { + ext: 'jxr', + mime: 'image/vnd.ms-photo' + }; + } - const filesCollection = this.cozyClient.collection('io.cozy.files') - try { - const existingFile = await filesCollection.statByPath(path + file.name) + if (check([0x1F, 0x8B, 0x8])) { + return { + ext: 'gz', + mime: 'application/gzip' + }; + } - const { id: fileId, dir_id: dirId } = existingFile.data - const resp = await filesCollection.updateFile(file, { - dirId, - fileId, - metadata - }) - return resp - } catch (error) { - if (/Not Found/.test(error)) { - const dirId = await filesCollection.ensureDirectoryExists(path) - const createdFile = await filesCollection.createFile(file, { - dirId, - metadata - }) - return createdFile - } - throw error - } - } - /** - * Method to generate a new filename if there is a conflict - * - * @param {String} filenameWithoutExtension A filename without the extension - * @return {String} A filename with the right suffix - */ - static generateNewFileNameOnConflict(filenameWithoutExtension) { - // Check if the string ends by _1 - const regex = new RegExp('(_)([0-9]+)$') - const matches = filenameWithoutExtension.match(regex) - if (matches) { - let versionNumber = parseInt(matches[2]) - // increment versionNumber - versionNumber++ - const newFilenameWithoutExtension = filenameWithoutExtension.replace( - new RegExp('(_)([0-9]+)$'), - `_${versionNumber}` - ) - return newFilenameWithoutExtension - } else { - return `${filenameWithoutExtension}_1` - } - } + if (check([0x42, 0x5A, 0x68])) { + return { + ext: 'bz2', + mime: 'application/x-bzip2' + }; + } - static generateFileNameForRevision(file, revision, f) { - const { filename, extension } = CozyFile.splitFilename({ - name: file.name, - type: 'file' - }) - return `${filename}_${f( - revision.updated_at, - 'DD MMMM - HH[h]mm' - )}${extension}` - } - /** - * The goal of this method is to upload a file based on a conflict strategy. - * Be careful: We need to check if the file exists by doing a statByPath query - * before trying to upload the file since if we post and the stack return a - * 409 conflict, we will get a SPDY_ERROR_PROTOCOL on Chrome. This is the only - * viable workaround - * If there is no conflict, then we upload the file. - * If there is a conflict, then we apply the conflict strategy : `erase` or `rename` - * @param {String} name File Name - * @param {ArrayBuffer} file data - * @param {String} dirId dir id where to upload - * @param {String} conflictStrategy Actually only 2 hardcoded strategies 'erase' or 'rename' - * @param {Object} metadata An object containing the metadata to attach - * @param {String} contentType content type of the file - */ - static async uploadFileWithConflictStrategy( - name, - file, - dirId, - conflictStrategy, - metadata, - contentType - ) { - const filesCollection = this.cozyClient.collection('io.cozy.files') + if (checkString('ID3')) { + await tokenizer.ignore(6); // Skip ID3 header until the header size + const id3HeaderLen = await tokenizer.readToken(uint32SyncSafeToken); + if (tokenizer.position + id3HeaderLen > tokenizer.fileInfo.size) { + // Guess file type based on ID3 header for backward compatibility + return { + ext: 'mp3', + mime: 'audio/mpeg' + }; + } - try { - const path = await CozyFile.getFullpath(dirId, name) + await tokenizer.ignore(id3HeaderLen); + return fromTokenizer(tokenizer); // Skip ID3 header, recursion + } - const existingFile = await filesCollection.statByPath(path) - const { id: fileId } = existingFile.data - if (conflictStrategy === 'erase') { - // !TODO Bug Fix. Seems we have to pass a name attribute ?! - const resp = await filesCollection.updateFile(file, { - dirId, - fileId, - name, - metadata, - contentType - }) - return resp - } else { - const { filename, extension } = CozyFile.splitFilename({ - name, - type: 'file' - }) - const newFileName = - CozyFile.generateNewFileNameOnConflict(filename) + extension - // recall itself with the newFilename. - return CozyFile.uploadFileWithConflictStrategy( - newFileName, - file, - dirId, - conflictStrategy, - metadata, - contentType - ) - } - } catch (error) { - if (/Not Found/.test(error.message)) { - return await CozyFile.upload(name, file, dirId, metadata, contentType) - } - throw error - } - } - /** - * - * @param {String} name File's name - * @param {ArrayBuffer} file - * @param {String} dirId - * @param {Object} metadata - * @param {String} contentType - */ - static async upload(name, file, dirId, metadata, contentType = 'image/jpeg') { - return this.cozyClient.collection('io.cozy.files').createFile(file, { - name, - dirId, - contentType, - lastModifiedDate: new Date(), - metadata - }) - } -} + // Musepack, SV7 + if (checkString('MP+')) { + return { + ext: 'mpc', + mime: 'audio/x-musepack' + }; + } -CozyFile.doctype = 'io.cozy.files' + if ( + (buffer[0] === 0x43 || buffer[0] === 0x46) && + check([0x57, 0x53], {offset: 1}) + ) { + return { + ext: 'swf', + mime: 'application/x-shockwave-flash' + }; + } -module.exports = CozyFile + // -- 4-byte signatures -- + if (check([0x47, 0x49, 0x46])) { + return { + ext: 'gif', + mime: 'image/gif' + }; + } -/***/ }), -/* 1218 */ -/***/ (function(module, exports, __webpack_require__) { + if (checkString('FLIF')) { + return { + ext: 'flif', + mime: 'image/flif' + }; + } -var baseToString = __webpack_require__(409), - castSlice = __webpack_require__(771), - charsEndIndex = __webpack_require__(1219), - stringToArray = __webpack_require__(773), - toString = __webpack_require__(408), - trimmedEndIndex = __webpack_require__(647); + if (checkString('8BPS')) { + return { + ext: 'psd', + mime: 'image/vnd.adobe.photoshop' + }; + } -/** - * Removes trailing whitespace or specified characters from `string`. - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category String - * @param {string} [string=''] The string to trim. - * @param {string} [chars=whitespace] The characters to trim. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {string} Returns the trimmed string. - * @example - * - * _.trimEnd(' abc '); - * // => ' abc' - * - * _.trimEnd('-_-abc-_-', '_-'); - * // => '-_-abc' - */ -function trimEnd(string, chars, guard) { - string = toString(string); - if (string && (guard || chars === undefined)) { - return string.slice(0, trimmedEndIndex(string) + 1); - } - if (!string || !(chars = baseToString(chars))) { - return string; - } - var strSymbols = stringToArray(string), - end = charsEndIndex(strSymbols, stringToArray(chars)) + 1; + if (checkString('WEBP', {offset: 8})) { + return { + ext: 'webp', + mime: 'image/webp' + }; + } - return castSlice(strSymbols, 0, end).join(''); -} + // Musepack, SV8 + if (checkString('MPCK')) { + return { + ext: 'mpc', + mime: 'audio/x-musepack' + }; + } -module.exports = trimEnd; + if (checkString('FORM')) { + return { + ext: 'aif', + mime: 'audio/aiff' + }; + } + if (checkString('icns', {offset: 0})) { + return { + ext: 'icns', + mime: 'image/icns' + }; + } -/***/ }), -/* 1219 */ -/***/ (function(module, exports, __webpack_require__) { + // Zip-based file formats + // Need to be before the `zip` check + if (check([0x50, 0x4B, 0x3, 0x4])) { // Local file header signature + try { + while (tokenizer.position + 30 < tokenizer.fileInfo.size) { + await tokenizer.readBuffer(buffer, {length: 30}); -var baseIndexOf = __webpack_require__(477); + // https://en.wikipedia.org/wiki/Zip_(file_format)#File_headers + const zipHeader = { + compressedSize: buffer.readUInt32LE(18), + uncompressedSize: buffer.readUInt32LE(22), + filenameLength: buffer.readUInt16LE(26), + extraFieldLength: buffer.readUInt16LE(28) + }; -/** - * Used by `_.trim` and `_.trimEnd` to get the index of the last string symbol - * that is not found in the character symbols. - * - * @private - * @param {Array} strSymbols The string symbols to inspect. - * @param {Array} chrSymbols The character symbols to find. - * @returns {number} Returns the index of the last unmatched string symbol. - */ -function charsEndIndex(strSymbols, chrSymbols) { - var index = strSymbols.length; + zipHeader.filename = await tokenizer.readToken(new Token.StringType(zipHeader.filenameLength, 'utf-8')); + await tokenizer.ignore(zipHeader.extraFieldLength); - while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {} - return index; -} + // Assumes signed `.xpi` from addons.mozilla.org + if (zipHeader.filename === 'META-INF/mozilla.rsa') { + return { + ext: 'xpi', + mime: 'application/x-xpinstall' + }; + } -module.exports = charsEndIndex; + if (zipHeader.filename.endsWith('.rels') || zipHeader.filename.endsWith('.xml')) { + const type = zipHeader.filename.split('/')[0]; + switch (type) { + case '_rels': + break; + case 'word': + return { + ext: 'docx', + mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' + }; + case 'ppt': + return { + ext: 'pptx', + mime: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' + }; + case 'xl': + return { + ext: 'xlsx', + mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + }; + default: + break; + } + } + if (zipHeader.filename.startsWith('xl/')) { + return { + ext: 'xlsx', + mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' + }; + } -/***/ }), -/* 1220 */ -/***/ (function(module, exports, __webpack_require__) { + if (zipHeader.filename.startsWith('3D/') && zipHeader.filename.endsWith('.model')) { + return { + ext: '3mf', + mime: 'model/3mf' + }; + } -const Application = __webpack_require__(1199) -const CozyFile = __webpack_require__(1217) + // The docx, xlsx and pptx file types extend the Office Open XML file format: + // https://en.wikipedia.org/wiki/Office_Open_XML_file_formats + // We look for: + // - one entry named '[Content_Types].xml' or '_rels/.rels', + // - one entry indicating specific type of file. + // MS Office, OpenOffice and LibreOffice may put the parts in different order, so the check should not rely on it. + if (zipHeader.filename === 'mimetype' && zipHeader.compressedSize === zipHeader.uncompressedSize) { + const mimeType = await tokenizer.readToken(new Token.StringType(zipHeader.compressedSize, 'utf-8')); -/** - * Class representing the folder model. - * @extends CozyFile - */ -class CozyFolder extends CozyFile { - /** - * Create a folder with a reference to the given document - * @param {String} path Folder path - * @param {Object} document Document to make reference to. Any doctype. - * @return {Object} Folder document - */ - static async createFolderWithReference(path, document) { - const collection = this.cozyClient.collection(CozyFile.doctype) - const dirId = await collection.ensureDirectoryExists(path) - await collection.addReferencesTo(document, [ - { - _id: dirId - } - ]) + switch (mimeType) { + case 'application/epub+zip': + return { + ext: 'epub', + mime: 'application/epub+zip' + }; + case 'application/vnd.oasis.opendocument.text': + return { + ext: 'odt', + mime: 'application/vnd.oasis.opendocument.text' + }; + case 'application/vnd.oasis.opendocument.spreadsheet': + return { + ext: 'ods', + mime: 'application/vnd.oasis.opendocument.spreadsheet' + }; + case 'application/vnd.oasis.opendocument.presentation': + return { + ext: 'odp', + mime: 'application/vnd.oasis.opendocument.presentation' + }; + default: + } + } - const { data: dirInfos } = await collection.get(dirId) + // Try to find next header manually when current one is corrupted + if (zipHeader.compressedSize === 0) { + let nextHeaderIndex = -1; - return dirInfos - } + while (nextHeaderIndex < 0 && (tokenizer.position < tokenizer.fileInfo.size)) { + await tokenizer.peekBuffer(buffer, {mayBeLess: true}); - /** - * Returns a "Magic Folder", given its id - * @param {String} id Magic Folder id. `CozyFolder.magicFolders` contains the - * ids of folders that can be magic folders. - * @param {String} path Default path to use if magic folder does not exist - * @return {Object} Folder document - */ - static async ensureMagicFolder(id, path) { - const magicFolderDocument = { - _type: Application.doctype, - _id: id - } - const folders = await this.getReferencedFolders(magicFolderDocument) - const existingMagicFolder = folders.length ? folders[0] : null + nextHeaderIndex = buffer.indexOf('504B0304', 0, 'hex'); + // Move position to the next header if found, skip the whole buffer otherwise + await tokenizer.ignore(nextHeaderIndex >= 0 ? nextHeaderIndex : buffer.length); + } + } else { + await tokenizer.ignore(zipHeader.compressedSize); + } + } + } catch (error) { + if (!(error instanceof strtok3.EndOfStreamError)) { + throw error; + } + } - if (existingMagicFolder) return existingMagicFolder + return { + ext: 'zip', + mime: 'application/zip' + }; + } - const magicFoldersValues = Object.values(this.magicFolders) - if (!magicFoldersValues.includes(id)) { - throw new Error( - `Cannot create Magic folder with id ${id}. Allowed values are ${magicFoldersValues.join( - ', ' - )}.` - ) - } + if (checkString('OggS')) { + // This is an OGG container + await tokenizer.ignore(28); + const type = Buffer.alloc(8); + await tokenizer.readBuffer(type); - if (!path) { - throw new Error('Magic folder default path must be defined') - } + // Needs to be before `ogg` check + if (_check(type, [0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64])) { + return { + ext: 'opus', + mime: 'audio/opus' + }; + } - return this.createFolderWithReference(path, magicFolderDocument) - } + // If ' theora' in header. + if (_check(type, [0x80, 0x74, 0x68, 0x65, 0x6F, 0x72, 0x61])) { + return { + ext: 'ogv', + mime: 'video/ogg' + }; + } - /** - * Returns an array of folder referenced by the given document - * @param {Object} document Document to get references from - * @return {Array} Array of folders referenced with the given - * document - */ - static async getReferencedFolders(document) { - const { included } = await this.cozyClient - .collection(CozyFile.doctype) - .findReferencedBy(document) - return included.filter(folder => !this.isTrashed(folder)) - } + // If '\x01video' in header. + if (_check(type, [0x01, 0x76, 0x69, 0x64, 0x65, 0x6F, 0x00])) { + return { + ext: 'ogm', + mime: 'video/ogg' + }; + } - /** - * Returns an unique folder referenced with the given reference. Creates it - * if it does not exist. - * @param {String} path Path used to create folder if the referenced - * folder does not exist. - * @param {Object} document Document to create references from - * @return {Objet} Folder referenced with the give reference - */ - static async ensureFolderWithReference(path, document) { - const existingFolders = await this.getReferencedFolders(document) - if (existingFolders.length) return existingFolders[0] + // If ' FLAC' in header https://xiph.org/flac/faq.html + if (_check(type, [0x7F, 0x46, 0x4C, 0x41, 0x43])) { + return { + ext: 'oga', + mime: 'audio/ogg' + }; + } - const collection = this.cozyClient.collection(CozyFile.doctype) - const dirId = await collection.ensureDirectoryExists(path) - await collection.addReferencesTo(document, [ - { - _id: dirId - } - ]) + // 'Speex ' in header https://en.wikipedia.org/wiki/Speex + if (_check(type, [0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20])) { + return { + ext: 'spx', + mime: 'audio/ogg' + }; + } - const { data: dirInfos } = await collection.get(dirId) + // If '\x01vorbis' in header + if (_check(type, [0x01, 0x76, 0x6F, 0x72, 0x62, 0x69, 0x73])) { + return { + ext: 'ogg', + mime: 'audio/ogg' + }; + } - return dirInfos - } + // Default OGG container https://www.iana.org/assignments/media-types/application/ogg + return { + ext: 'ogx', + mime: 'application/ogg' + }; + } + + if ( + check([0x50, 0x4B]) && + (buffer[2] === 0x3 || buffer[2] === 0x5 || buffer[2] === 0x7) && + (buffer[3] === 0x4 || buffer[3] === 0x6 || buffer[3] === 0x8) + ) { + return { + ext: 'zip', + mime: 'application/zip' + }; + } + + // + + // File Type Box (https://en.wikipedia.org/wiki/ISO_base_media_file_format) + // It's not required to be first, but it's recommended to be. Almost all ISO base media files start with `ftyp` box. + // `ftyp` box must contain a brand major identifier, which must consist of ISO 8859-1 printable characters. + // Here we check for 8859-1 printable characters (for simplicity, it's a mask which also catches one non-printable character). + if ( + checkString('ftyp', {offset: 4}) && + (buffer[8] & 0x60) !== 0x00 // Brand major, first character ASCII? + ) { + // They all can have MIME `video/mp4` except `application/mp4` special-case which is hard to detect. + // For some cases, we're specific, everything else falls to `video/mp4` with `mp4` extension. + const brandMajor = buffer.toString('binary', 8, 12).replace('\0', ' ').trim(); + switch (brandMajor) { + case 'avif': + return {ext: 'avif', mime: 'image/avif'}; + case 'mif1': + return {ext: 'heic', mime: 'image/heif'}; + case 'msf1': + return {ext: 'heic', mime: 'image/heif-sequence'}; + case 'heic': + case 'heix': + return {ext: 'heic', mime: 'image/heic'}; + case 'hevc': + case 'hevx': + return {ext: 'heic', mime: 'image/heic-sequence'}; + case 'qt': + return {ext: 'mov', mime: 'video/quicktime'}; + case 'M4V': + case 'M4VH': + case 'M4VP': + return {ext: 'm4v', mime: 'video/x-m4v'}; + case 'M4P': + return {ext: 'm4p', mime: 'video/mp4'}; + case 'M4B': + return {ext: 'm4b', mime: 'audio/mp4'}; + case 'M4A': + return {ext: 'm4a', mime: 'audio/x-m4a'}; + case 'F4V': + return {ext: 'f4v', mime: 'video/mp4'}; + case 'F4P': + return {ext: 'f4p', mime: 'video/mp4'}; + case 'F4A': + return {ext: 'f4a', mime: 'audio/mp4'}; + case 'F4B': + return {ext: 'f4b', mime: 'audio/mp4'}; + case 'crx': + return {ext: 'cr3', mime: 'image/x-canon-cr3'}; + default: + if (brandMajor.startsWith('3g')) { + if (brandMajor.startsWith('3g2')) { + return {ext: '3g2', mime: 'video/3gpp2'}; + } - /** - * Indicates if a folder is in trash - * @param {Object} folder `io.cozy.files` document - * @return {Boolean} `true` if the folder is in trash, `false` - * otherwise. - */ - static isTrashed(folder) { - return /^\/\.cozy_trash/.test(folder.attributes.path) - } -} + return {ext: '3gp', mime: 'video/3gpp'}; + } -/** - * References used by the Cozy platform and apps for specific folders. - */ -CozyFolder.magicFolders = { - ADMINISTRATIVE: `${Application.doctype}/administrative`, - PHOTOS: `${Application.doctype}/photos`, - PHOTOS_BACKUP: `${Application.doctype}/photos/mobile`, - PHOTOS_UPLOAD: `${Application.doctype}/photos/upload`, - NOTES_FOLDER: `${Application.doctype}/notes` -} + return {ext: 'mp4', mime: 'video/mp4'}; + } + } -module.exports = CozyFolder + if (checkString('MThd')) { + return { + ext: 'mid', + mime: 'audio/midi' + }; + } + if ( + checkString('wOFF') && + ( + check([0x00, 0x01, 0x00, 0x00], {offset: 4}) || + checkString('OTTO', {offset: 4}) + ) + ) { + return { + ext: 'woff', + mime: 'font/woff' + }; + } -/***/ }), -/* 1221 */ -/***/ (function(module, exports, __webpack_require__) { + if ( + checkString('wOF2') && + ( + check([0x00, 0x01, 0x00, 0x00], {offset: 4}) || + checkString('OTTO', {offset: 4}) + ) + ) { + return { + ext: 'woff2', + mime: 'font/woff2' + }; + } -const PropTypes = __webpack_require__(1191) + if (check([0xD4, 0xC3, 0xB2, 0xA1]) || check([0xA1, 0xB2, 0xC3, 0xD4])) { + return { + ext: 'pcap', + mime: 'application/vnd.tcpdump.pcap' + }; + } -const Document = __webpack_require__(1182) + // Sony DSD Stream File (DSF) + if (checkString('DSD ')) { + return { + ext: 'dsf', + mime: 'audio/x-dsf' // Non-standard + }; + } -class Group extends Document {} + if (checkString('LZIP')) { + return { + ext: 'lz', + mime: 'application/x-lzip' + }; + } -const GroupShape = PropTypes.shape({ - _id: PropTypes.string.isRequired, - _type: PropTypes.string.isRequired, - name: PropTypes.string.isRequired, - trashed: PropTypes.bool -}) + if (checkString('fLaC')) { + return { + ext: 'flac', + mime: 'audio/x-flac' + }; + } -Group.doctype = 'io.cozy.contacts.groups' -Group.propType = GroupShape + if (check([0x42, 0x50, 0x47, 0xFB])) { + return { + ext: 'bpg', + mime: 'image/bpg' + }; + } -module.exports = Group + if (checkString('wvpk')) { + return { + ext: 'wv', + mime: 'audio/wavpack' + }; + } + if (checkString('%PDF')) { + await tokenizer.ignore(1350); + const maxBufferSize = 10 * 1024 * 1024; + const buffer = Buffer.alloc(Math.min(maxBufferSize, tokenizer.fileInfo.size)); + await tokenizer.readBuffer(buffer, {mayBeLess: true}); -/***/ }), -/* 1222 */ -/***/ (function(module, exports, __webpack_require__) { + // Check if this is an Adobe Illustrator file + if (buffer.includes(Buffer.from('AIPrivateData'))) { + return { + ext: 'ai', + mime: 'application/postscript' + }; + } -const Document = __webpack_require__(1182) + // Assume this is just a normal PDF + return { + ext: 'pdf', + mime: 'application/pdf' + }; + } -class Permission extends Document {} + if (check([0x00, 0x61, 0x73, 0x6D])) { + return { + ext: 'wasm', + mime: 'application/wasm' + }; + } -Permission.schema = { - doctype: 'io.cozy.permissions', - attributes: {} -} + // TIFF, little-endian type + if (check([0x49, 0x49, 0x2A, 0x0])) { + if (checkString('CR', {offset: 8})) { + return { + ext: 'cr2', + mime: 'image/x-canon-cr2' + }; + } -module.exports = Permission + if (check([0x1C, 0x00, 0xFE, 0x00], {offset: 8}) || check([0x1F, 0x00, 0x0B, 0x00], {offset: 8})) { + return { + ext: 'nef', + mime: 'image/x-nikon-nef' + }; + } + if ( + check([0x08, 0x00, 0x00, 0x00], {offset: 4}) && + (check([0x2D, 0x00, 0xFE, 0x00], {offset: 8}) || + check([0x27, 0x00, 0xFE, 0x00], {offset: 8})) + ) { + return { + ext: 'dng', + mime: 'image/x-adobe-dng' + }; + } -/***/ }), -/* 1223 */ -/***/ (function(module, exports, __webpack_require__) { + buffer = Buffer.alloc(24); + await tokenizer.peekBuffer(buffer); + if ( + (check([0x10, 0xFB, 0x86, 0x01], {offset: 4}) || check([0x08, 0x00, 0x00, 0x00], {offset: 4})) && + // This pattern differentiates ARW from other TIFF-ish file types: + check([0x00, 0xFE, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x01], {offset: 9}) + ) { + return { + ext: 'arw', + mime: 'image/x-sony-arw' + }; + } -const uniq = __webpack_require__(631); + return { + ext: 'tif', + mime: 'image/tiff' + }; + } -const getUniqueCategories = transactions => { - return uniq(transactions.map(t => t.manualCategoryId)); -}; + // TIFF, big-endian type + if (check([0x4D, 0x4D, 0x0, 0x2A])) { + return { + ext: 'tif', + mime: 'image/tiff' + }; + } -const pctOfTokensInVoc = (tokens, vocabularyArray) => { - const n_tokens = tokens.length; - const intersection = tokens.filter(t => -1 !== vocabularyArray.indexOf(t)); - return intersection.length / n_tokens; -}; + if (checkString('MAC ')) { + return { + ext: 'ape', + mime: 'audio/ape' + }; + } -const getAlphaParameter = (nbUniqueCategories, min, max, maxSmoothing) => { - if (nbUniqueCategories === 1) { - return 1; - } else { - const alpha = maxSmoothing / (nbUniqueCategories + 1); - return Math.max(min, Math.min(max, alpha)); - } -}; + // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/matroska + if (check([0x1A, 0x45, 0xDF, 0xA3])) { // Root element: EBML + async function readField() { + const msb = await tokenizer.peekNumber(Token.UINT8); + let mask = 0x80; + let ic = 0; // 0 = A, 1 = B, 2 = C, 3 = D -module.exports = { - getUniqueCategories, - pctOfTokensInVoc, - getAlphaParameter -}; + while ((msb & mask) === 0) { + ++ic; + mask >>= 1; + } -/***/ }), -/* 1224 */ -/***/ (function(module, exports) { + const id = Buffer.alloc(ic + 1); + await tokenizer.readBuffer(id); + return id; + } -const LOCAL_MODEL_CATEG_FALLBACK = '0'; -const LOCAL_MODEL_PROBA_FALLBACK = 0.1; -const LOCAL_MODEL_PCT_TOKENS_IN_VOC_THRESHOLD = 0.1; -module.exports = { - LOCAL_MODEL_CATEG_FALLBACK, - LOCAL_MODEL_PROBA_FALLBACK, - LOCAL_MODEL_PCT_TOKENS_IN_VOC_THRESHOLD -}; + async function readElement() { + const id = await readField(); + const lenField = await readField(); + lenField[0] ^= 0x80 >> (lenField.length - 1); + const nrLen = Math.min(6, lenField.length); // JavaScript can max read 6 bytes integer + return { + id: id.readUIntBE(0, id.length), + len: lenField.readUIntBE(lenField.length - nrLen, nrLen) + }; + } -/***/ }), -/* 1225 */ -/***/ (function(module, exports, __webpack_require__) { + async function readChildren(level, children) { + while (children > 0) { + const e = await readElement(); + if (e.id === 0x4282) { + return tokenizer.readToken(new Token.StringType(e.len, 'utf-8')); // Return DocType + } -const cozy = __webpack_require__(485); + await tokenizer.ignore(e.len); // ignore payload + --children; + } + } -const log = __webpack_require__(2).namespace('BaseKonnector'); + const re = await readElement(); + const docType = await readChildren(1, re.len); -const { - Secret -} = __webpack_require__(2); + switch (docType) { + case 'webm': + return { + ext: 'webm', + mime: 'video/webm' + }; -const manifest = __webpack_require__(836); + case 'matroska': + return { + ext: 'mkv', + mime: 'video/x-matroska' + }; -const saveBills = __webpack_require__(1226); + default: + return; + } + } -const saveFiles = __webpack_require__(1227); + // RIFF file format which might be AVI, WAV, QCP, etc + if (check([0x52, 0x49, 0x46, 0x46])) { + if (check([0x41, 0x56, 0x49], {offset: 8})) { + return { + ext: 'avi', + mime: 'video/vnd.avi' + }; + } -const signin = __webpack_require__(1265); + if (check([0x57, 0x41, 0x56, 0x45], {offset: 8})) { + return { + ext: 'wav', + mime: 'audio/vnd.wave' + }; + } -const get = __webpack_require__(370); + // QLCM, QCP file + if (check([0x51, 0x4C, 0x43, 0x4D], {offset: 8})) { + return { + ext: 'qcp', + mime: 'audio/qcelp' + }; + } + } -const omit = __webpack_require__(632); + if (checkString('SQLi')) { + return { + ext: 'sqlite', + mime: 'application/x-sqlite3' + }; + } -const updateOrCreate = __webpack_require__(1268); + if (check([0x4E, 0x45, 0x53, 0x1A])) { + return { + ext: 'nes', + mime: 'application/x-nintendo-nes-rom' + }; + } -const saveIdentity = __webpack_require__(1269); + if (checkString('Cr24')) { + return { + ext: 'crx', + mime: 'application/x-google-chrome-extension' + }; + } -const { - wrapIfSentrySetUp, - captureExceptionAndDie -} = __webpack_require__(1270); + if ( + checkString('MSCF') || + checkString('ISc(') + ) { + return { + ext: 'cab', + mime: 'application/vnd.ms-cab-compressed' + }; + } -const sleep = __webpack_require__(9).promisify(global.setTimeout); + if (check([0xED, 0xAB, 0xEE, 0xDB])) { + return { + ext: 'rpm', + mime: 'application/x-rpm' + }; + } -const LOG_ERROR_MSG_LIMIT = 32 * 1024 - 1; // to avoid to cut the json long and make it unreadable by the stack + if (check([0xC5, 0xD0, 0xD3, 0xC6])) { + return { + ext: 'eps', + mime: 'application/eps' + }; + } -const once = __webpack_require__(1300); + if (check([0x28, 0xB5, 0x2F, 0xFD])) { + return { + ext: 'zst', + mime: 'application/zstd' + }; + } -const errors = __webpack_require__(1302); + // -- 5-byte signatures -- -const findFolderPath = async (cozyFields, account) => { - // folderId will be stored in cozyFields.folder_to_save on first run - if (!cozyFields.folder_to_save) { - log('info', `No folder_to_save available in the trigger`); - } + if (check([0x4F, 0x54, 0x54, 0x4F, 0x00])) { + return { + ext: 'otf', + mime: 'font/otf' + }; + } - const folderId = cozyFields.folder_to_save || account.folderId; + if (checkString('#!AMR')) { + return { + ext: 'amr', + mime: 'audio/amr' + }; + } - if (folderId) { - try { - const folder = await cozy.files.statById(folderId, false); - return folder.attributes.path; - } catch (err) { - log('error', err.message); - log('error', JSON.stringify(err.stack)); - log('error', `error while getting the folder path of ${folderId}`); - throw new Error('NOT_EXISTING_DIRECTORY'); - } - } else { - log('debug', 'No folder needed'); - } -}; + if (checkString('{\\rtf')) { + return { + ext: 'rtf', + mime: 'application/rtf' + }; + } -const checkTOS = err => { - if (err && err.reason && err.reason.length && err.reason[0] && err.reason[0].title === 'TOS Updated') { - throw new Error('TOS_NOT_ACCEPTED'); - } -}; -/** - * @class - * The class from which all the connectors must inherit. - * It takes a fetch function in parameter that must return a `Promise`. - * You need at least the `GET` permission on `io.cozy.accounts` in your manifest to allow it to - * fetch account information for your connector. - * - * Its role is twofold : - * - * - Make the link between account data and konnector - * - Handle errors - * - * âš ï¸ A promise should be returned from the `fetch` function otherwise - * the konnector cannot know that asynchronous code has been called. - * @example - * ```javascript - * const { BaseKonnector } = require('cozy-konnector-libs') - * - * module.exports = new BaseKonnector(function fetch () { - * // use this to access the instance of the konnector to - * // store any information that needs to be passed to - * // different stages of the konnector - * return request('http://ameli.fr') - * .then(computeReimbursements) - * .then(saveBills) - * }) - * ``` - */ + if (check([0x46, 0x4C, 0x56, 0x01])) { + return { + ext: 'flv', + mime: 'video/x-flv' + }; + } + if (checkString('IMPM')) { + return { + ext: 'it', + mime: 'audio/x-it' + }; + } -class BaseKonnector { - /** - * Constructor - * - * @param {Function} fetch - Function to be run automatically after account data is fetched. - * This function will be binded to the current connector. - * - * If not fetch function is given. The connector will have to handle itself it's own exection and - * error handling - */ - constructor(fetch) { - if (typeof fetch === 'function') { - this.fetch = fetch.bind(this); - return this.run(); - } + if ( + checkString('-lh0-', {offset: 2}) || + checkString('-lh1-', {offset: 2}) || + checkString('-lh2-', {offset: 2}) || + checkString('-lh3-', {offset: 2}) || + checkString('-lh4-', {offset: 2}) || + checkString('-lh5-', {offset: 2}) || + checkString('-lh6-', {offset: 2}) || + checkString('-lh7-', {offset: 2}) || + checkString('-lzs-', {offset: 2}) || + checkString('-lz4-', {offset: 2}) || + checkString('-lz5-', {offset: 2}) || + checkString('-lhd-', {offset: 2}) + ) { + return { + ext: 'lzh', + mime: 'application/x-lzh-compressed' + }; + } - this.deactivateAutoSuccessfulLogin = once(this.deactivateAutoSuccessfulLogin); - errors.attachProcessEventHandlers(); - } - /** - * Entrypoint of the konnector - * - * - Initializes connector attributes - * - Awaits this.main - * - Ensures errors are handled via this.fail - * - Calls this.end when the main function succeeded - */ + // MPEG program stream (PS or MPEG-PS) + if (check([0x00, 0x00, 0x01, 0xBA])) { + // MPEG-PS, MPEG-1 Part 1 + if (check([0x21], {offset: 4, mask: [0xF1]})) { + return { + ext: 'mpg', // May also be .ps, .mpeg + mime: 'video/MP1S' + }; + } + // MPEG-PS, MPEG-2 Part 1 + if (check([0x44], {offset: 4, mask: [0xC4]})) { + return { + ext: 'mpg', // May also be .mpg, .m2p, .vob or .sub + mime: 'video/MP2P' + }; + } + } - async run() { - try { - log('debug', 'Preparing konnector...'); - await this.initAttributes(); - log('debug', 'Running konnector main...'); - await this.main(this.fields, this.parameters); - await this.end(); - } catch (err) { - log('warn', 'Error from konnector'); - await this.fail(err); - } - } - /** - * Main runs after konnector has been initialized. - * Errors thrown will be automatically handled. - * - * @returns {Promise} - The konnector is considered successful when it resolves - */ + if (checkString('ITSF')) { + return { + ext: 'chm', + mime: 'application/vnd.ms-htmlhelp' + }; + } + // -- 6-byte signatures -- - main() { - return this.fetch(this.fields, this.parameters); - } - /** - * Hook called when the connector has ended successfully - */ + if (check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) { + return { + ext: 'xz', + mime: 'application/x-xz' + }; + } + if (checkString('<?xml ')) { + return { + ext: 'xml', + mime: 'application/xml' + }; + } - end() { - log('debug', 'The connector has been run'); - } - /** - * Hook called when the connector fails - */ + if (check([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C])) { + return { + ext: '7z', + mime: 'application/x-7z-compressed' + }; + } + if ( + check([0x52, 0x61, 0x72, 0x21, 0x1A, 0x7]) && + (buffer[6] === 0x0 || buffer[6] === 0x1) + ) { + return { + ext: 'rar', + mime: 'application/x-rar-compressed' + }; + } - fail(err) { - log('debug', 'Error caught by BaseKonnector'); - const error = err.message || err; - this.terminate(error); - } + if (checkString('solid ')) { + return { + ext: 'stl', + mime: 'model/stl' + }; + } - async getAccount(accountId) { - try { - return await cozy.data.find('io.cozy.accounts', accountId); - } catch (err) { - checkTOS(err); - log('error', err.message); - log('error', `Account ${accountId} does not exist`); - throw new Error('CANNOT_FIND_ACCOUNT'); - } - } - /** - * Initializes konnector attributes that will be used during its lifetime - * - * - this._account - * - this.fields - */ + // -- 7-byte signatures -- + if (checkString('BLENDER')) { + return { + ext: 'blend', + mime: 'application/x-blender' + }; + } - async initAttributes() { - // Parse environment variables - const cozyFields = JSON.parse(process.env.COZY_FIELDS || '{}'); - const cozyParameters = JSON.parse(process.env.COZY_PARAMETERS || '{}'); - this.parameters = cozyParameters; // Set account + if (checkString('!<arch>')) { + await tokenizer.ignore(8); + const str = await tokenizer.readToken(new Token.StringType(13, 'ascii')); + if (str === 'debian-binary') { + return { + ext: 'deb', + mime: 'application/x-deb' + }; + } - const account = await this.getAccount(cozyFields.account); + return { + ext: 'ar', + mime: 'application/x-unix-archive' + }; + } - if (!account || !account._id) { - log('warn', 'No account was retrieved from getAccount'); - } + // -- 8-byte signatures -- - this.accountId = account._id; - this._account = new Secret(account); // Set folder + if (check([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])) { + // APNG format (https://wiki.mozilla.org/APNG_Specification) + // 1. Find the first IDAT (image data) chunk (49 44 41 54) + // 2. Check if there is an "acTL" chunk before the IDAT one (61 63 54 4C) - const folderPath = await findFolderPath(cozyFields, account); - cozyFields.folder_to_save = folderPath; - this.fields = Object.assign({}, account.auth, account.oauth, folderPath ? { - folderPath - } : {}); - } - /** - * Saves data to the account that is passed to the konnector. - * Use it to persist data that needs to be passed to each - * konnector run. - * - * By default, the data is merged to the remote data, use - * `options.merge = false` to overwrite the data. - * - * The data is saved under the `.data` attribute of the cozy - * account. - * - * Don't forget to modify the manifest.konnector file to give the right to write on the - * `io.cozy.accounts` doctype. The syntax can be : `"permissions": {"accounts": {"type": "io.cozy.accounts"}}` (here we juste removed the verb `GET`) - * - * @param {object} data - Attributes to be merged - * @param {object} options - { merge: true|false } - * @returns {Promise}: resolved with the modified account - */ + // Offset calculated as follows: + // - 8 bytes: PNG signature + // - 4 (length) + 4 (chunk type) + 13 (chunk data) + 4 (CRC): IHDR chunk + await tokenizer.ignore(8); // ignore PNG signature - saveAccountData(data, options) { - options = options || {}; - options.merge = options.merge === undefined ? true : options.merge; - const start = options.merge ? Object.assign({}, this.getAccountData()) : {}; - const newData = Object.assign({}, start, data); - return this.updateAccountAttributes({ - data: newData - }).then(account => account.data); - } - /** - * Get the data saved by saveAccountData - * - * @returns {object} the account data - */ + async function readChunkHeader() { + return { + length: await tokenizer.readToken(Token.INT32_BE), + type: await tokenizer.readToken(new Token.StringType(4, 'binary')) + }; + } + do { + const chunk = await readChunkHeader(); + if (chunk.length < 0) { + return; // Invalid chunk length + } - getAccountData() { - return new Secret(this._account.data || {}); - } - /** - * Update account attributes and cache the account - */ + switch (chunk.type) { + case 'IDAT': + return { + ext: 'png', + mime: 'image/png' + }; + case 'acTL': + return { + ext: 'apng', + mime: 'image/apng' + }; + default: + await tokenizer.ignore(chunk.length + 4); // Ignore chunk-data + CRC + } + } while (tokenizer.position + 8 < tokenizer.fileInfo.size); + return { + ext: 'png', + mime: 'image/png' + }; + } - updateAccountAttributes(attributes) { - return cozy.data.updateAttributes('io.cozy.accounts', this.accountId, attributes).then(account => { - this._account = new Secret(account); - return account; - }); - } - /** - * Sets the 2FA state, according to the type passed. - * Doing so resets the twoFACode field - * - * Typically you should not use that directly, prefer to use waitForTwoFaCode since - * the wait for user input will be handled for you. It is useful though for the "app" - * type where no user input (inside Cozy) is needed. - * - * @param {object} options - The list of options - * @param {string} options.type - Used by the front to show the right message (email/sms/app/app_code) - * @param {boolean} options.retry - Is this function call a retry ? This changes the resulting message to the user - */ + if (check([0x41, 0x52, 0x52, 0x4F, 0x57, 0x31, 0x00, 0x00])) { + return { + ext: 'arrow', + mime: 'application/x-apache-arrow' + }; + } + if (check([0x67, 0x6C, 0x54, 0x46, 0x02, 0x00, 0x00, 0x00])) { + return { + ext: 'glb', + mime: 'model/gltf-binary' + }; + } - async setTwoFAState({ - type, - retry = false - } = {}) { - let state = retry ? 'TWOFA_NEEDED_RETRY' : 'TWOFA_NEEDED'; + // `mov` format variants + if ( + check([0x66, 0x72, 0x65, 0x65], {offset: 4}) || // `free` + check([0x6D, 0x64, 0x61, 0x74], {offset: 4}) || // `mdat` MJPEG + check([0x6D, 0x6F, 0x6F, 0x76], {offset: 4}) || // `moov` + check([0x77, 0x69, 0x64, 0x65], {offset: 4}) // `wide` + ) { + return { + ext: 'mov', + mime: 'video/quicktime' + }; + } - if (type === 'email') { - state += '.EMAIL'; - } else if (type === 'sms') { - state += '.SMS'; - } else if (type === 'app_code') { - state += '.APP_CODE'; - } else if (type === 'app') { - state += '.APP'; - } + // -- 9-byte signatures -- - log('debug', `Setting ${state} state into the current account`); - await this.updateAccountAttributes({ - state, - twoFACode: null - }); - } - /** - * Resets 2FA state when not needed anymore - */ + if (check([0x49, 0x49, 0x52, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x18])) { + return { + ext: 'orf', + mime: 'image/x-olympus-orf' + }; + } + if (checkString('gimp xcf ')) { + return { + ext: 'xcf', + mime: 'image/x-xcf' + }; + } - async resetTwoFAState() { - await this.updateAccountAttributes({ - state: null, - twoFACode: null - }); - } - /** - * Notices that 2FA code is needed and wait for the user to submit it. - * It uses the account to do the communication with the user. - * - * @param {object} options - The list of options - * @param {string} options.type (default: "email") - Type of the expected 2FA code. The message displayed - * to the user will depend on it. Possible values: email, sms - * @param {number} options.timeout (default 3 minutes after now) - After this date, the stop will stop waiting and - * and an error will be shown to the user (deprecated and alias of endTime) - * @param {number} options.endTime (default 3 minutes after now) - After this timestamp, the home will stop waiting and - * and an error will be shown to the user - * @param {number} options.heartBeat (default: 5000) - How many milliseconds between each code check - * @param {boolean} options.retry (default: false) - Is it a retry. If true, an error message will be - * displayed to the user - * @throws Will throw `USER_ACTION_NEEDED.TWOFA_EXPIRED` if the konnector job is not run manually (we assume that - * not run manually means that we do not have a graphic interface to fill the required information) - * @throws Will throw `USER_ACTION_NEEDED.TWOFA_EXPIRED` if 2FA is not filled by the user soon enough - * @returns {Promise} Contains twoFa code entered by user - * @example - * - * ```javascript - * const { BaseKonnector } = require('cozy-konnector-libs') - * - * module.exports = new BaseKonnector(start) - - * async function start() { - * // we detect the need of a 2FA code - * const code = this.waitForTwoFaCode({ - * type: 'email' - * }) - * // send the code to the targeted site - * } - * ``` - */ + // -- 12-byte signatures -- + if (check([0x49, 0x49, 0x55, 0x00, 0x18, 0x00, 0x00, 0x00, 0x88, 0xE7, 0x74, 0xD8])) { + return { + ext: 'rw2', + mime: 'image/x-panasonic-rw2' + }; + } - async waitForTwoFaCode(options = {}) { - if (process.env.COZY_JOB_MANUAL_EXECUTION !== 'true') { - log('warn', `waitForTwoFaCode: this in not a manual execution. It is not possible to handle 2FA here.`); - throw new Error('USER_ACTION_NEEDED.TWOFA_EXPIRED'); - } + // ASF_Header_Object first 80 bytes + if (check([0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9])) { + async function readHeader() { + const guid = Buffer.alloc(16); + await tokenizer.readBuffer(guid); + return { + id: guid, + size: Number(await tokenizer.readToken(Token.UINT64_LE)) + }; + } - const startTime = Date.now(); - const ms = 1; - const s = 1000 * ms; - const m = 60 * s; - const defaultParams = { - type: 'email', - endTime: startTime + 3 * m, - heartBeat: 5 * s, - retry: false - }; - options = { ...defaultParams, - ...options - }; + await tokenizer.ignore(30); + // Search for header should be in first 1KB of file. + while (tokenizer.position + 24 < tokenizer.fileInfo.size) { + const header = await readHeader(); + let payload = header.size - 24; + if (_check(header.id, [0x91, 0x07, 0xDC, 0xB7, 0xB7, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65])) { + // Sync on Stream-Properties-Object (B7DC0791-A9B7-11CF-8EE6-00C00C205365) + const typeId = Buffer.alloc(16); + payload -= await tokenizer.readBuffer(typeId); - if (options.timeout) { - log('warn', `The timeout option for waitForTwoFaCode is deprecated. Please use the endTime option now`); - options.endTime = options.timeout; - } + if (_check(typeId, [0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) { + // Found audio: + return { + ext: 'asf', + mime: 'audio/x-ms-asf' + }; + } - let account = {}; - await this.setTwoFAState({ - type: options.type, - retry: options.retry - }); + if (_check(typeId, [0xC0, 0xEF, 0x19, 0xBC, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) { + // Found video: + return { + ext: 'asf', + mime: 'video/x-ms-asf' + }; + } - while (Date.now() < options.endTime && !account.twoFACode) { - await sleep(options.heartBeat); - account = await cozy.data.find('io.cozy.accounts', this.accountId); - log('debug', `current accountState : ${account.state}`); - log('debug', `current twoFACode : ${account.twoFACode}`); - } + break; + } - if (account.twoFACode) { - await this.resetTwoFAState(); - return account.twoFACode; - } + await tokenizer.ignore(payload); + } - throw new Error('USER_ACTION_NEEDED.TWOFA_EXPIRED'); - } - /** - * Tells Cozy-Home that we have successfully logged in. - * Useful when auto-success has been deactivated. - * See `deactivateAutoSuccess` - */ + // Default to ASF generic extension + return { + ext: 'asf', + mime: 'application/vnd.ms-asf' + }; + } + if (check([0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A])) { + return { + ext: 'ktx', + mime: 'image/ktx' + }; + } - async notifySuccessfulLogin() { - log('debug', 'Notify Cozy-Home of successful login'); - await this.updateAccountAttributes({ - state: 'LOGIN_SUCCESS' - }); - } - /** - * By default, cozy-home considers that the konnector has successfully logged in - * when the konnector has run for more than 8s. This is problematic for 2FA since - * the konnector can sit idle, just waiting for the 2FA to come back. - * - * When this method is called, cozy-home is notified and will not consider the - * absence of error after 8s to be a success. Afterwards, to notify cozy-home when - * the user has logged in successfully, for example, after the user has entered 2FA - * codes, it is necessary to call `notifySuccessfulLogin`. - * - * Does nothing if called more than once. - */ + if ((check([0x7E, 0x10, 0x04]) || check([0x7E, 0x18, 0x04])) && check([0x30, 0x4D, 0x49, 0x45], {offset: 4})) { + return { + ext: 'mie', + mime: 'application/x-mie' + }; + } + if (check([0x27, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], {offset: 2})) { + return { + ext: 'shp', + mime: 'application/x-esri-shape' + }; + } - async deactivateAutoSuccessfulLogin() { - log('debug', 'Deactivating auto success for Cozy-Home'); - await this.updateAccountAttributes({ - state: 'HANDLE_LOGIN_SUCCESS' - }); - } - /** - * This is saveBills function from cozy-konnector-libs which automatically adds sourceAccount in - * metadata of each entry - * - * @returns {Promise} resolves with entries hydrated with db data - */ + if (check([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) { + // JPEG-2000 family + await tokenizer.ignore(20); + const type = await tokenizer.readToken(new Token.StringType(4, 'ascii')); + switch (type) { + case 'jp2 ': + return { + ext: 'jp2', + mime: 'image/jp2' + }; + case 'jpx ': + return { + ext: 'jpx', + mime: 'image/jpx' + }; + case 'jpm ': + return { + ext: 'jpm', + mime: 'image/jpm' + }; + case 'mjp2': + return { + ext: 'mj2', + mime: 'image/mj2' + }; + default: + return; + } + } - saveBills(entries, fields, options) { - return saveBills(entries, fields, { - sourceAccount: this.accountId, - sourceAccountIdentifier: fields.login, - ...options - }); - } - /** - * This is saveFiles function from cozy-konnector-libs which automatically adds sourceAccount and - * sourceAccountIdentifier cozyMetadatas to files - * - * @returns {Promise} resolves with the list of entries with file objects - */ + if ( + check([0xFF, 0x0A]) || + check([0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x4C, 0x20, 0x0D, 0x0A, 0x87, 0x0A]) + ) { + return { + ext: 'jxl', + mime: 'image/jxl' + }; + } + // -- Unsafe signatures -- - saveFiles(entries, fields, options) { - return saveFiles(entries, fields, { - sourceAccount: this.accountId, - sourceAccountIdentifier: fields.login, - ...options - }); - } - /** - * This is updateOrCreate function from cozy-konnector-libs which automatically adds sourceAccount in - * metadata of each entry - * - * @returns {Promise} resolves to an array of db objects - */ + if ( + check([0x0, 0x0, 0x1, 0xBA]) || + check([0x0, 0x0, 0x1, 0xB3]) + ) { + return { + ext: 'mpg', + mime: 'video/mpeg' + }; + } + if (check([0x00, 0x01, 0x00, 0x00, 0x00])) { + return { + ext: 'ttf', + mime: 'font/ttf' + }; + } - updateOrCreate(entries, doctype, matchingAttributes, options) { - return updateOrCreate(entries, doctype, matchingAttributes, { - sourceAccount: this.accountId, - sourceAccountIdentifier: get(options, 'fields.login'), - ...options - }); - } - /** - * This is saveIdentity function from cozy-konnector-libs which automatically adds sourceAccount in - * metadata of each entry - * - * @returns {Promise} empty promise - */ + if (check([0x00, 0x00, 0x01, 0x00])) { + return { + ext: 'ico', + mime: 'image/x-icon' + }; + } + if (check([0x00, 0x00, 0x02, 0x00])) { + return { + ext: 'cur', + mime: 'image/x-icon' + }; + } - saveIdentity(contact, accountIdentifier, options = {}) { - return saveIdentity(contact, accountIdentifier, { - sourceAccount: this.accountId, - sourceAccountIdentifier: accountIdentifier, - ...options - }); - } - /** - * This is signin function from cozy-konnector-libs which automatically adds deactivateAutoSuccessfulLogin - * and notifySuccessfulLogin calls - * - * @returns {Promise} resolve with an object containing form data - */ + if (check([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1])) { + // Detected Microsoft Compound File Binary File (MS-CFB) Format. + return { + ext: 'cfb', + mime: 'application/x-cfb' + }; + } + // Increase sample size from 12 to 256. + await tokenizer.peekBuffer(buffer, {length: Math.min(256, tokenizer.fileInfo.size), mayBeLess: true}); - async signin(options = {}) { - await this.deactivateAutoSuccessfulLogin(); - const result = await signin(omit(options, 'notifySuccessfulLogin')); + // -- 15-byte signatures -- - if (options.notifySuccessfulLogin !== false) { - await this.notifySuccessfulLogin(); - } + if (checkString('BEGIN:')) { + if (checkString('VCARD', {offset: 6})) { + return { + ext: 'vcf', + mime: 'text/vcard' + }; + } - return result; - } - /** - * Send a special error code which is interpreted by the cozy stack to terminate the execution of the - * connector now - * - * @param {string} err - The error code to be saved as connector result see [docs/ERROR_CODES.md] - * @example - * ```javascript - * this.terminate('LOGIN_FAILED') - * ``` - */ + if (checkString('VCALENDAR', {offset: 6})) { + return { + ext: 'ics', + mime: 'text/calendar' + }; + } + } + // `raf` is here just to keep all the raw image detectors together. + if (checkString('FUJIFILMCCD-RAW')) { + return { + ext: 'raf', + mime: 'image/x-fujifilm-raf' + }; + } - terminate(err) { - log('critical', String(err).substr(0, LOG_ERROR_MSG_LIMIT)); - captureExceptionAndDie(err); - } - /** - * Get cozyMetaData from the context of the connector - * - * @param {object} data - this data will be merged with cozyMetaData - */ + if (checkString('Extended Module:')) { + return { + ext: 'xm', + mime: 'audio/x-xm' + }; + } + if (checkString('Creative Voice File')) { + return { + ext: 'voc', + mime: 'audio/x-voc' + }; + } - getCozyMetadata(data) { - Object.assign(data, { - sourceAccount: this.accountId - }); - return manifest.getCozyMetadata(data); - } + if (check([0x04, 0x00, 0x00, 0x00]) && buffer.length >= 16) { // Rough & quick check Pickle/ASAR + const jsonSize = buffer.readUInt32LE(12); + if (jsonSize > 12 && buffer.length >= jsonSize + 16) { + try { + const header = buffer.slice(16, jsonSize + 16).toString(); + const json = JSON.parse(header); + // Check if Pickle is ASAR + if (json.files) { // Final check, assuring Pickle/ASAR format + return { + ext: 'asar', + mime: 'application/x-asar' + }; + } + } catch (_) { + } + } + } -} + if (check([0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02])) { + return { + ext: 'mxf', + mime: 'application/mxf' + }; + } -wrapIfSentrySetUp(BaseKonnector.prototype, 'run'); -BaseKonnector.findFolderPath = findFolderPath; -BaseKonnector.checkTOS = checkTOS; -module.exports = BaseKonnector; + if (checkString('SCRM', {offset: 44})) { + return { + ext: 's3m', + mime: 'audio/x-s3m' + }; + } -/***/ }), -/* 1226 */ -/***/ (function(module, exports, __webpack_require__) { + if (check([0x47], {offset: 4}) && (check([0x47], {offset: 192}) || check([0x47], {offset: 196}))) { + return { + ext: 'mts', + mime: 'video/mp2t' + }; + } -/** - * Encapsulates the saving of Bills : saves the files, saves the new data, and associate the files - * to an existing bank operation - * - * @module saveBills - */ -const utils = __webpack_require__(484); + if (check([0x42, 0x4F, 0x4F, 0x4B, 0x4D, 0x4F, 0x42, 0x49], {offset: 60})) { + return { + ext: 'mobi', + mime: 'application/x-mobipocket-ebook' + }; + } -const saveFiles = __webpack_require__(1227); + if (check([0x44, 0x49, 0x43, 0x4D], {offset: 128})) { + return { + ext: 'dcm', + mime: 'application/dicom' + }; + } -const hydrateAndFilter = __webpack_require__(369); + if (check([0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46])) { + return { + ext: 'lnk', + mime: 'application/x.ms.shortcut' // Invented by us + }; + } -const addData = __webpack_require__(1247); + if (check([0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00])) { + return { + ext: 'alias', + mime: 'application/x.apple.alias' // Invented by us + }; + } -const log = __webpack_require__(2).namespace('saveBills'); + if ( + check([0x4C, 0x50], {offset: 34}) && + ( + check([0x00, 0x00, 0x01], {offset: 8}) || + check([0x01, 0x00, 0x02], {offset: 8}) || + check([0x02, 0x00, 0x02], {offset: 8}) + ) + ) { + return { + ext: 'eot', + mime: 'application/vnd.ms-fontobject' + }; + } -const linkBankOperations = __webpack_require__(1248); + if (check([0x06, 0x06, 0xED, 0xF5, 0xD8, 0x1D, 0x46, 0xE5, 0xBD, 0x31, 0xEF, 0xE7, 0xFE, 0x74, 0xB7, 0x1D])) { + return { + ext: 'indd', + mime: 'application/x-indesign' + }; + } -const DOCTYPE = 'io.cozy.bills'; + // Increase sample size from 256 to 512 + await tokenizer.peekBuffer(buffer, {length: Math.min(512, tokenizer.fileInfo.size), mayBeLess: true}); -const _ = __webpack_require__(825); + // Requires a buffer size of 512 bytes + if (tarHeaderChecksumMatches(buffer)) { + return { + ext: 'tar', + mime: 'application/x-tar' + }; + } -const manifest = __webpack_require__(836); + if (check([0xFF, 0xFE, 0xFF, 0x0E, 0x53, 0x00, 0x6B, 0x00, 0x65, 0x00, 0x74, 0x00, 0x63, 0x00, 0x68, 0x00, 0x55, 0x00, 0x70, 0x00, 0x20, 0x00, 0x4D, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6C, 0x00])) { + return { + ext: 'skp', + mime: 'application/vnd.sketchup.skp' + }; + } -const requiredAttributes = { - date: 'isDate', - amount: 'isNumber', - vendor: 'isString' -}; -/** - * Combines the features of `saveFiles`, `hydrateAndFilter`, `addData` and `linkBankOperations` for a - * common case: bills. - * Will create `io.cozy.bills` objects. The default deduplication keys are `['date', 'amount', 'vendor']`. - * You need the full permission on `io.cozy.bills`, full permission on `io.cozy.files` and also - * full permission on `io.cozy.bank.operations` in your manifest, to be able to use this function. - * - * Parameters: - * - * - `documents` is an array of objects with any attributes with some mandatory attributes : - * + `amount` (Number): the amount of the bill used to match bank operations - * + `date` (Date): the date of the bill also used to match bank operations - * + `vendor` (String): the name of the vendor associated to the bill. Ex: 'trainline' - * + `currency` (String) default: EUR: The ISO currency value (not mandatory since there is a - * default value. - * + `contractId` (String): Contract unique identicator used to deduplicate bills - * + `contractLabel`: (String) User label if define, must be used with contractId - * + `matchingCriterias` (Object): criterias that can be used by an external service to match bills - * with bank operations. If not specified but the 'banksTransactionRegExp' attribute is specified in the - * manifest of the connector, this value is automatically added to the bill - * - * You can also pass attributes expected by `saveFiles` : fileurl, filename, requestOptions - * and more - * - * Please take a look at [io.cozy.bills doctype documentation](https://github.com/cozy/cozy-doctypes/blob/master/docs/io.cozy.bills.md) - * - `fields` (object) this is the first parameter given to BaseKonnector's constructor - * - `options` is passed directly to `saveFiles`, `hydrateAndFilter`, `addData` and `linkBankOperations`. - * - * @example - * - * ```javascript - * const { BaseKonnector, saveBills } = require('cozy-konnector-libs') - * - * module.exports = new BaseKonnector(function fetch (fields) { - * const documents = [] - * // some code which fills documents - * return saveBills(documents, fields, { - * identifiers: ['vendor'] - * }) - * }) - * ``` - * @alias module:saveBills - */ + if (checkString('-----BEGIN PGP MESSAGE-----')) { + return { + ext: 'pgp', + mime: 'application/pgp-encrypted' + }; + } -const saveBills = async (inputEntries, fields, inputOptions = {}) => { - // Cloning input arguments since both entries and options are expected - // to be modified by functions called inside saveBills. - const entries = _.cloneDeepWith(inputEntries, value => { - // do not try to clone streams https://github.com/konnectors/libs/issues/682 - if (value && value.readable) { - return value; - } + // Check MPEG 1 or 2 Layer 3 header, or 'layer 0' for ADTS (MPEG sync-word 0xFFE) + if (buffer.length >= 2 && check([0xFF, 0xE0], {offset: 0, mask: [0xFF, 0xE0]})) { + if (check([0x10], {offset: 1, mask: [0x16]})) { + // Check for (ADTS) MPEG-2 + if (check([0x08], {offset: 1, mask: [0x08]})) { + return { + ext: 'aac', + mime: 'audio/aac' + }; + } - return undefined; - }); + // Must be (ADTS) MPEG-4 + return { + ext: 'aac', + mime: 'audio/aac' + }; + } - const options = _.cloneDeep(inputOptions); + // MPEG 1 or 2 Layer 3 header + // Check for MPEG layer 3 + if (check([0x02], {offset: 1, mask: [0x06]})) { + return { + ext: 'mp3', + mime: 'audio/mpeg' + }; + } - if (!_.isArray(entries) || entries.length === 0) { - log('warn', 'saveBills: no bills to save'); - return Promise.resolve(); - } + // Check for MPEG layer 2 + if (check([0x04], {offset: 1, mask: [0x06]})) { + return { + ext: 'mp2', + mime: 'audio/mpeg' + }; + } - if (!options.sourceAccount) { - log('warn', 'There is no sourceAccount given to saveBills'); - } + // Check for MPEG layer 1 + if (check([0x06], {offset: 1, mask: [0x06]})) { + return { + ext: 'mp1', + mime: 'audio/mpeg' + }; + } + } +} - if (!options.sourceAccountIdentifier) { - log('warn', 'There is no sourceAccountIdentifier given to saveBills'); - } +const stream = readableStream => new Promise((resolve, reject) => { + // Using `eval` to work around issues when bundling with Webpack + const stream = eval('require')('stream'); // eslint-disable-line no-eval - if (typeof fields === 'string') { - fields = { - folderPath: fields - }; - } // Deduplicate on this keys + readableStream.on('error', reject); + readableStream.once('readable', async () => { + // Set up output stream + const pass = new stream.PassThrough(); + let outputStream; + if (stream.pipeline) { + outputStream = stream.pipeline(readableStream, pass, () => { + }); + } else { + outputStream = readableStream.pipe(pass); + } + // Read the input stream and detect the filetype + const chunk = readableStream.read(minimumBytes) || readableStream.read() || Buffer.alloc(0); + try { + const fileType = await fromBuffer(chunk); + pass.fileType = fileType; + } catch (error) { + reject(error); + } - options.keys = options.keys || Object.keys(requiredAttributes); - const originalEntries = entries; + resolve(outputStream); + }); +}); - const defaultShouldUpdate = (entry, dbEntry) => entry.invoice !== dbEntry.invoice || !dbEntry.cozyMetadata || !dbEntry.matchingCriterias; +const fileType = { + fromStream, + fromTokenizer, + fromBuffer, + stream +}; - if (!options.shouldUpdate) { - options.shouldUpdate = defaultShouldUpdate; - } else { - const fn = options.shouldUpdate; +Object.defineProperty(fileType, 'extensions', { + get() { + return new Set(supported.extensions); + } +}); - options.shouldUpdate = (entry, dbEntry) => { - return defaultShouldUpdate(entry, dbEntry) || fn(entry, dbEntry); - }; - } +Object.defineProperty(fileType, 'mimeTypes', { + get() { + return new Set(supported.mimeTypes); + } +}); - let tempEntries; - tempEntries = manageContractsData(entries, options); - tempEntries = await saveFiles(tempEntries, fields, options); +module.exports = fileType; - if (options.processPdf) { - let moreEntries = []; - for (let entry of tempEntries) { - if (entry.fileDocument) { - let pdfContent; +/***/ }), +/* 1240 */ +/***/ (function(module, exports, __webpack_require__) { - try { - pdfContent = await utils.getPdfText(entry.fileDocument._id); // allow to create more entries related to the same file +"use strict"; - const result = await options.processPdf(entry, pdfContent.text, pdfContent); - if (result && result.length) moreEntries = [...moreEntries, ...result]; - } catch (err) { - log('warn', `processPdf: Failed to read pdf content in ${_.get(entry, 'fileDocument.attributes.name')}`); - log('warn', err.message); - entry.__ignore = true; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.AnsiStringType = exports.StringType = exports.BufferType = exports.Uint8ArrayType = exports.IgnoreType = exports.Float80_LE = exports.Float80_BE = exports.Float64_LE = exports.Float64_BE = exports.Float32_LE = exports.Float32_BE = exports.Float16_LE = exports.Float16_BE = exports.INT64_BE = exports.UINT64_BE = exports.INT64_LE = exports.UINT64_LE = exports.INT32_LE = exports.INT32_BE = exports.INT24_BE = exports.INT24_LE = exports.INT16_LE = exports.INT16_BE = exports.INT8 = exports.UINT32_BE = exports.UINT32_LE = exports.UINT24_BE = exports.UINT24_LE = exports.UINT16_BE = exports.UINT16_LE = exports.UINT8 = void 0; +const ieee754 = __webpack_require__(1241); +// Primitive types +function dv(array) { + return new DataView(array.buffer, array.byteOffset); +} +/** + * 8-bit unsigned integer + */ +exports.UINT8 = { + len: 1, + get(array, offset) { + return dv(array).getUint8(offset); + }, + put(array, offset, value) { + dv(array).setUint8(offset, value); + return offset + 1; + } +}; +/** + * 16-bit unsigned integer, Little Endian byte order + */ +exports.UINT16_LE = { + len: 2, + get(array, offset) { + return dv(array).getUint16(offset, true); + }, + put(array, offset, value) { + dv(array).setUint16(offset, value, true); + return offset + 2; + } +}; +/** + * 16-bit unsigned integer, Big Endian byte order + */ +exports.UINT16_BE = { + len: 2, + get(array, offset) { + return dv(array).getUint16(offset); + }, + put(array, offset, value) { + dv(array).setUint16(offset, value); + return offset + 2; + } +}; +/** + * 24-bit unsigned integer, Little Endian byte order + */ +exports.UINT24_LE = { + len: 3, + get(array, offset) { + const dataView = dv(array); + return dataView.getUint8(offset) + (dataView.getUint16(offset + 1, true) << 8); + }, + put(array, offset, value) { + const dataView = dv(array); + dataView.setUint8(offset, value & 0xff); + dataView.setUint16(offset + 1, value >> 8, true); + return offset + 3; + } +}; +/** + * 24-bit unsigned integer, Big Endian byte order + */ +exports.UINT24_BE = { + len: 3, + get(array, offset) { + const dataView = dv(array); + return (dataView.getUint16(offset) << 8) + dataView.getUint8(offset + 2); + }, + put(array, offset, value) { + const dataView = dv(array); + dataView.setUint16(offset, value >> 8); + dataView.setUint8(offset + 2, value & 0xff); + return offset + 3; + } +}; +/** + * 32-bit unsigned integer, Little Endian byte order + */ +exports.UINT32_LE = { + len: 4, + get(array, offset) { + return dv(array).getUint32(offset, true); + }, + put(array, offset, value) { + dv(array).setUint32(offset, value, true); + return offset + 4; + } +}; +/** + * 32-bit unsigned integer, Big Endian byte order + */ +exports.UINT32_BE = { + len: 4, + get(array, offset) { + return dv(array).getUint32(offset); + }, + put(array, offset, value) { + dv(array).setUint32(offset, value); + return offset + 4; + } +}; +/** + * 8-bit signed integer + */ +exports.INT8 = { + len: 1, + get(array, offset) { + return dv(array).getInt8(offset); + }, + put(array, offset, value) { + dv(array).setInt8(offset, value); + return offset + 2; + } +}; +/** + * 16-bit signed integer, Big Endian byte order + */ +exports.INT16_BE = { + len: 2, + get(array, offset) { + return dv(array).getInt16(offset); + }, + put(array, offset, value) { + dv(array).setInt16(offset, value); + return offset + 2; + } +}; +/** + * 16-bit signed integer, Little Endian byte order + */ +exports.INT16_LE = { + len: 2, + get(array, offset) { + return dv(array).getInt16(offset, true); + }, + put(array, offset, value) { + dv(array).setInt16(offset, value, true); + return offset + 2; + } +}; +/** + * 24-bit signed integer, Little Endian byte order + */ +exports.INT24_LE = { + len: 3, + get(array, offset) { + const unsigned = exports.UINT24_LE.get(array, offset); + return unsigned > 0x7fffff ? unsigned - 0x1000000 : unsigned; + }, + put(array, offset, value) { + const dataView = dv(array); + dataView.setUint8(offset, value & 0xff); + dataView.setUint16(offset + 1, value >> 8, true); + return offset + 3; + } +}; +/** + * 24-bit signed integer, Big Endian byte order + */ +exports.INT24_BE = { + len: 3, + get(array, offset) { + const unsigned = exports.UINT24_BE.get(array, offset); + return unsigned > 0x7fffff ? unsigned - 0x1000000 : unsigned; + }, + put(array, offset, value) { + const dataView = dv(array); + dataView.setUint16(offset, value >> 8); + dataView.setUint8(offset + 2, value & 0xff); + return offset + 3; + } +}; +/** + * 32-bit signed integer, Big Endian byte order + */ +exports.INT32_BE = { + len: 4, + get(array, offset) { + return dv(array).getInt32(offset); + }, + put(array, offset, value) { + dv(array).setInt32(offset, value); + return offset + 4; + } +}; +/** + * 32-bit signed integer, Big Endian byte order + */ +exports.INT32_LE = { + len: 4, + get(array, offset) { + return dv(array).getInt32(offset, true); + }, + put(array, offset, value) { + dv(array).setInt32(offset, value, true); + return offset + 4; + } +}; +/** + * 64-bit unsigned integer, Little Endian byte order + */ +exports.UINT64_LE = { + len: 8, + get(array, offset) { + return dv(array).getBigUint64(offset, true); + }, + put(array, offset, value) { + dv(array).setBigUint64(offset, value, true); + return offset + 8; + } +}; +/** + * 64-bit signed integer, Little Endian byte order + */ +exports.INT64_LE = { + len: 8, + get(array, offset) { + return dv(array).getBigInt64(offset, true); + }, + put(array, offset, value) { + dv(array).setBigInt64(offset, value, true); + return offset + 8; + } +}; +/** + * 64-bit unsigned integer, Big Endian byte order + */ +exports.UINT64_BE = { + len: 8, + get(array, offset) { + return dv(array).getBigUint64(offset); + }, + put(array, offset, value) { + dv(array).setBigUint64(offset, value); + return offset + 8; + } +}; +/** + * 64-bit signed integer, Big Endian byte order + */ +exports.INT64_BE = { + len: 8, + get(array, offset) { + return dv(array).getBigInt64(offset); + }, + put(array, offset, value) { + dv(array).setBigInt64(offset, value); + return offset + 8; + } +}; +/** + * IEEE 754 16-bit (half precision) float, big endian + */ +exports.Float16_BE = { + len: 2, + get(dataView, offset) { + return ieee754.read(dataView, offset, false, 10, this.len); + }, + put(dataView, offset, value) { + ieee754.write(dataView, value, offset, false, 10, this.len); + return offset + this.len; + } +}; +/** + * IEEE 754 16-bit (half precision) float, little endian + */ +exports.Float16_LE = { + len: 2, + get(array, offset) { + return ieee754.read(array, offset, true, 10, this.len); + }, + put(array, offset, value) { + ieee754.write(array, value, offset, true, 10, this.len); + return offset + this.len; + } +}; +/** + * IEEE 754 32-bit (single precision) float, big endian + */ +exports.Float32_BE = { + len: 4, + get(array, offset) { + return dv(array).getFloat32(offset); + }, + put(array, offset, value) { + dv(array).setFloat32(offset, value); + return offset + 4; + } +}; +/** + * IEEE 754 32-bit (single precision) float, little endian + */ +exports.Float32_LE = { + len: 4, + get(array, offset) { + return dv(array).getFloat32(offset, true); + }, + put(array, offset, value) { + dv(array).setFloat32(offset, value, true); + return offset + 4; + } +}; +/** + * IEEE 754 64-bit (double precision) float, big endian + */ +exports.Float64_BE = { + len: 8, + get(array, offset) { + return dv(array).getFloat64(offset); + }, + put(array, offset, value) { + dv(array).setFloat64(offset, value); + return offset + 8; + } +}; +/** + * IEEE 754 64-bit (double precision) float, little endian + */ +exports.Float64_LE = { + len: 8, + get(array, offset) { + return dv(array).getFloat64(offset, true); + }, + put(array, offset, value) { + dv(array).setFloat64(offset, value, true); + return offset + 8; + } +}; +/** + * IEEE 754 80-bit (extended precision) float, big endian + */ +exports.Float80_BE = { + len: 10, + get(array, offset) { + return ieee754.read(array, offset, false, 63, this.len); + }, + put(array, offset, value) { + ieee754.write(array, value, offset, false, 63, this.len); + return offset + this.len; + } +}; +/** + * IEEE 754 80-bit (extended precision) float, little endian + */ +exports.Float80_LE = { + len: 10, + get(array, offset) { + return ieee754.read(array, offset, true, 63, this.len); + }, + put(array, offset, value) { + ieee754.write(array, value, offset, true, 63, this.len); + return offset + this.len; + } +}; +/** + * Ignore a given number of bytes + */ +class IgnoreType { + /** + * @param len number of bytes to ignore + */ + constructor(len) { + this.len = len; + } + // ToDo: don't read, but skip data + get(array, off) { + } +} +exports.IgnoreType = IgnoreType; +class Uint8ArrayType { + constructor(len) { + this.len = len; + } + get(array, offset) { + return array.subarray(offset, offset + this.len); + } +} +exports.Uint8ArrayType = Uint8ArrayType; +class BufferType { + constructor(len) { + this.len = len; + } + get(buffer, off) { + return buffer.slice(off, off + this.len); + } +} +exports.BufferType = BufferType; +/** + * Consume a fixed number of bytes from the stream and return a string with a specified encoding. + */ +class StringType { + constructor(len, encoding) { + this.len = len; + this.encoding = encoding; + } + get(uint8Array, offset) { + return Buffer.from(uint8Array).toString(this.encoding, offset, offset + this.len); + } +} +exports.StringType = StringType; +/** + * ANSI Latin 1 String + * Using windows-1252 / ISO 8859-1 decoding + */ +class AnsiStringType { + constructor(len) { + this.len = len; + } + static decode(buffer, offset, until) { + let str = ''; + for (let i = offset; i < until; ++i) { + str += AnsiStringType.codePointToString(AnsiStringType.singleByteDecoder(buffer[i])); } - } + return str; } - - if (moreEntries.length) tempEntries = [...tempEntries, ...moreEntries]; - } // try to get transaction regexp from the manifest + static inRange(a, min, max) { + return min <= a && a <= max; + } + static codePointToString(cp) { + if (cp <= 0xFFFF) { + return String.fromCharCode(cp); + } + else { + cp -= 0x10000; + return String.fromCharCode((cp >> 10) + 0xD800, (cp & 0x3FF) + 0xDC00); + } + } + static singleByteDecoder(bite) { + if (AnsiStringType.inRange(bite, 0x00, 0x7F)) { + return bite; + } + const codePoint = AnsiStringType.windows1252[bite - 0x80]; + if (codePoint === null) { + throw Error('invaliding encoding'); + } + return codePoint; + } + get(buffer, offset = 0) { + return AnsiStringType.decode(buffer, offset, offset + this.len); + } +} +exports.AnsiStringType = AnsiStringType; +AnsiStringType.windows1252 = [8364, 129, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352, + 8249, 338, 141, 381, 143, 144, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, + 8482, 353, 8250, 339, 157, 382, 376, 160, 161, 162, 163, 164, 165, 166, 167, 168, + 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, + 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, + 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, + 248, 249, 250, 251, 252, 253, 254, 255]; - let defaultTransactionRegexp = null; +/***/ }), +/* 1241 */ +/***/ (function(module, exports) { - if (Object.keys(manifest.data).length && manifest.data.banksTransactionRegExp) { - defaultTransactionRegexp = manifest.data.banksTransactionRegExp; - } +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] - tempEntries = tempEntries.filter(entry => !entry.__ignore) // we do not save bills without associated file anymore - .filter(entry => entry.fileDocument).map(entry => { - entry.currency = convertCurrency(entry.currency); - entry.invoice = `io.cozy.files:${entry.fileDocument._id}`; - const matchingCriterias = entry.matchingCriterias || {}; + i += d - if (defaultTransactionRegexp && !matchingCriterias.labelRegex) { - matchingCriterias.labelRegex = defaultTransactionRegexp; - entry.matchingCriterias = matchingCriterias; - } + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} - delete entry.fileDocument; - delete entry.fileAttributes; - return entry; - }); - checkRequiredAttributes(tempEntries); - tempEntries = await hydrateAndFilter(tempEntries, DOCTYPE, options); - tempEntries = await addData(tempEntries, DOCTYPE, options); + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} - if (options.linkBankOperations !== false) { - tempEntries = await linkBankOperations(originalEntries, DOCTYPE, fields, options); - log('debug', 'after linkbankoperation'); + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} - return tempEntries; -}; +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = (nBytes * 8) - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 -function convertCurrency(currency) { - if (currency) { - if (currency.includes('€')) { - return 'EUR'; - } else if (currency.includes('$')) { - return 'USD'; - } else if (currency.includes('£')) { - return 'GBP'; + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = ((value * c) - 1) * Math.pow(2, mLen) + e = e + eBias } else { - return currency; + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 } - } else { - return 'EUR'; } -} - -function checkRequiredAttributes(entries) { - for (let entry of entries) { - for (let attr in requiredAttributes) { - if (entry[attr] == null) { - throw new Error(`saveBills: an entry is missing the required ${attr} attribute`); - } - const checkFunction = requiredAttributes[attr]; + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} - const isExpectedType = _(entry[attr])[checkFunction](); + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} - if (isExpectedType === false) { - throw new Error(`saveBills: an entry has a ${attr} which does not respect ${checkFunction}`); - } - } - } + buffer[offset + i - d] |= s * 128 } -function manageContractsData(tempEntries, options) { - if (options.contractLabel && options.contractId === undefined) { - log('warn', 'contractLabel used without contractId, ignoring it.'); - return tempEntries; - } - - let newEntries = tempEntries; // if contractId passed by option - if (options.contractId) { - // Define contractlabel from contractId if not set in options - if (!options.contractLabel) { - options.contractLabel = options.contractId; - } // Set saving path from contractLabel +/***/ }), +/* 1242 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; - options.subPath = options.contractLabel; // Add contractId to deduplication keys - addContractIdToDeduplication(options); // Add contract data to bills +exports.stringToBytes = string => [...string].map(character => character.charCodeAt(0)); - newEntries = newEntries.map(entry => addContractsDataToBill(entry, options)); // if contractId passed by bill attribute - } else if (billsHaveContractId(newEntries)) { - // Add contractId to deduplication keys - addContractIdToDeduplication(options); - newEntries = newEntries.map(entry => mergeContractsDataInBill(entry)); // manageContractsDataPassedByAttribute(newEntries, options - } +/** +Checks whether the TAR checksum is valid. - return newEntries; -} +@param {Buffer} buffer - The TAR header `[offset ... offset + 512]`. +@param {number} offset - TAR header offset. +@returns {boolean} `true` if the TAR checksum is valid, otherwise `false`. +*/ +exports.tarHeaderChecksumMatches = (buffer, offset = 0) => { + const readSum = parseInt(buffer.toString('utf8', 148, 154).replace(/\0.*$/, '').trim(), 8); // Read sum in header + if (isNaN(readSum)) { + return false; + } -function addContractsDataToBill(entry, options) { - entry.contractLabel = options.contractLabel; - entry.contractId = options.contractId; - return entry; -} + let sum = 8 * 0x20; // Initialize signed bit sum -function mergeContractsDataInBill(entry) { - // Only treat bill with data - if (entry.contractId) { - // Surcharge label in needed - if (!entry.contractLabel) { - entry.contractLabel = entry.contractId; - } // Edit subpath of each bill according to contractLabel + for (let i = offset; i < offset + 148; i++) { + sum += buffer[i]; + } + for (let i = offset + 156; i < offset + 512; i++) { + sum += buffer[i]; + } - entry.subPath = entry.contractLabel; - } + return readSum === sum; +}; - return entry; -} -/* This function return true if at least one bill of entries has a contractId - */ +/** +ID3 UINT32 sync-safe tokenizer token. +28 bits (representing up to 256MB) integer, the msb is 0 to avoid "false syncsignals". +*/ +exports.uint32SyncSafeToken = { + get: (buffer, offset) => { + return (buffer[offset + 3] & 0x7F) | ((buffer[offset + 2]) << 7) | ((buffer[offset + 1]) << 14) | ((buffer[offset]) << 21); + }, + len: 4 +}; -function billsHaveContractId(entries) { - for (const entry of entries) { - if (entry.contractId) { - return true; - } - } +/***/ }), +/* 1243 */ +/***/ (function(module, exports, __webpack_require__) { - return false; -} -/* Add contractId to deduplication keys - */ +"use strict"; -function addContractIdToDeduplication(options) { - if (options.keys) { - options.keys.push('contractId'); - } -} +module.exports = { + extensions: [ + 'jpg', + 'png', + 'apng', + 'gif', + 'webp', + 'flif', + 'xcf', + 'cr2', + 'cr3', + 'orf', + 'arw', + 'dng', + 'nef', + 'rw2', + 'raf', + 'tif', + 'bmp', + 'icns', + 'jxr', + 'psd', + 'indd', + 'zip', + 'tar', + 'rar', + 'gz', + 'bz2', + '7z', + 'dmg', + 'mp4', + 'mid', + 'mkv', + 'webm', + 'mov', + 'avi', + 'mpg', + 'mp2', + 'mp3', + 'm4a', + 'oga', + 'ogg', + 'ogv', + 'opus', + 'flac', + 'wav', + 'spx', + 'amr', + 'pdf', + 'epub', + 'exe', + 'swf', + 'rtf', + 'wasm', + 'woff', + 'woff2', + 'eot', + 'ttf', + 'otf', + 'ico', + 'flv', + 'ps', + 'xz', + 'sqlite', + 'nes', + 'crx', + 'xpi', + 'cab', + 'deb', + 'ar', + 'rpm', + 'Z', + 'lz', + 'cfb', + 'mxf', + 'mts', + 'blend', + 'bpg', + 'docx', + 'pptx', + 'xlsx', + '3gp', + '3g2', + 'jp2', + 'jpm', + 'jpx', + 'mj2', + 'aif', + 'qcp', + 'odt', + 'ods', + 'odp', + 'xml', + 'mobi', + 'heic', + 'cur', + 'ktx', + 'ape', + 'wv', + 'dcm', + 'ics', + 'glb', + 'pcap', + 'dsf', + 'lnk', + 'alias', + 'voc', + 'ac3', + 'm4v', + 'm4p', + 'm4b', + 'f4v', + 'f4p', + 'f4b', + 'f4a', + 'mie', + 'asf', + 'ogm', + 'ogx', + 'mpc', + 'arrow', + 'shp', + 'aac', + 'mp1', + 'it', + 's3m', + 'xm', + 'ai', + 'skp', + 'avif', + 'eps', + 'lzh', + 'pgp', + 'asar', + 'stl', + 'chm', + '3mf', + 'zst', + 'jxl', + 'vcf' + ], + mimeTypes: [ + 'image/jpeg', + 'image/png', + 'image/gif', + 'image/webp', + 'image/flif', + 'image/x-xcf', + 'image/x-canon-cr2', + 'image/x-canon-cr3', + 'image/tiff', + 'image/bmp', + 'image/vnd.ms-photo', + 'image/vnd.adobe.photoshop', + 'application/x-indesign', + 'application/epub+zip', + 'application/x-xpinstall', + 'application/vnd.oasis.opendocument.text', + 'application/vnd.oasis.opendocument.spreadsheet', + 'application/vnd.oasis.opendocument.presentation', + 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', + 'application/vnd.openxmlformats-officedocument.presentationml.presentation', + 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', + 'application/zip', + 'application/x-tar', + 'application/x-rar-compressed', + 'application/gzip', + 'application/x-bzip2', + 'application/x-7z-compressed', + 'application/x-apple-diskimage', + 'application/x-apache-arrow', + 'video/mp4', + 'audio/midi', + 'video/x-matroska', + 'video/webm', + 'video/quicktime', + 'video/vnd.avi', + 'audio/vnd.wave', + 'audio/qcelp', + 'audio/x-ms-asf', + 'video/x-ms-asf', + 'application/vnd.ms-asf', + 'video/mpeg', + 'video/3gpp', + 'audio/mpeg', + 'audio/mp4', // RFC 4337 + 'audio/opus', + 'video/ogg', + 'audio/ogg', + 'application/ogg', + 'audio/x-flac', + 'audio/ape', + 'audio/wavpack', + 'audio/amr', + 'application/pdf', + 'application/x-msdownload', + 'application/x-shockwave-flash', + 'application/rtf', + 'application/wasm', + 'font/woff', + 'font/woff2', + 'application/vnd.ms-fontobject', + 'font/ttf', + 'font/otf', + 'image/x-icon', + 'video/x-flv', + 'application/postscript', + 'application/eps', + 'application/x-xz', + 'application/x-sqlite3', + 'application/x-nintendo-nes-rom', + 'application/x-google-chrome-extension', + 'application/vnd.ms-cab-compressed', + 'application/x-deb', + 'application/x-unix-archive', + 'application/x-rpm', + 'application/x-compress', + 'application/x-lzip', + 'application/x-cfb', + 'application/x-mie', + 'application/mxf', + 'video/mp2t', + 'application/x-blender', + 'image/bpg', + 'image/jp2', + 'image/jpx', + 'image/jpm', + 'image/mj2', + 'audio/aiff', + 'application/xml', + 'application/x-mobipocket-ebook', + 'image/heif', + 'image/heif-sequence', + 'image/heic', + 'image/heic-sequence', + 'image/icns', + 'image/ktx', + 'application/dicom', + 'audio/x-musepack', + 'text/calendar', + 'text/vcard', + 'model/gltf-binary', + 'application/vnd.tcpdump.pcap', + 'audio/x-dsf', // Non-standard + 'application/x.ms.shortcut', // Invented by us + 'application/x.apple.alias', // Invented by us + 'audio/x-voc', + 'audio/vnd.dolby.dd-raw', + 'audio/x-m4a', + 'image/apng', + 'image/x-olympus-orf', + 'image/x-sony-arw', + 'image/x-adobe-dng', + 'image/x-nikon-nef', + 'image/x-panasonic-rw2', + 'image/x-fujifilm-raf', + 'video/x-m4v', + 'video/3gpp2', + 'application/x-esri-shape', + 'audio/aac', + 'audio/x-it', + 'audio/x-s3m', + 'audio/x-xm', + 'video/MP1S', + 'video/MP2P', + 'application/vnd.sketchup.skp', + 'image/avif', + 'application/x-lzh-compressed', + 'application/pgp-encrypted', + 'application/x-asar', + 'model/stl', + 'application/vnd.ms-htmlhelp', + 'model/3mf', + 'image/jxl', + 'application/zstd' + ] +}; -module.exports = saveBills; -module.exports.manageContractsData = manageContractsData; /***/ }), -/* 1227 */ +/* 1244 */ /***/ (function(module, exports, __webpack_require__) { /** - * Saves the given files in the given folder via the Cozy API. + * Saves the data into the cozy blindly without check. * - * @module saveFiles + * @module addData */ const bluebird = __webpack_require__(25); -const retry = __webpack_require__(1228); - -const mimetypes = __webpack_require__(838); - -const path = __webpack_require__(160); - -const requestFactory = __webpack_require__(22); - -const omit = __webpack_require__(632); - -const get = __webpack_require__(370); - -const log = __webpack_require__(2).namespace('saveFiles'); - -const manifest = __webpack_require__(836); +const omit = __webpack_require__(631); -const cozy = __webpack_require__(485); +const log = __webpack_require__(2).namespace('addData'); const { - queryAll -} = __webpack_require__(484); - -const mkdirp = __webpack_require__(1230); - -const errors = __webpack_require__(1231); - -const stream = __webpack_require__(100); - -const fileType = __webpack_require__(1232); - -const ms = 1; -const s = 1000 * ms; -const m = 60 * s; -const DEFAULT_TIMEOUT = Date.now() + 4 * m; // 4 minutes by default since the stack allows 5 minutes - -const DEFAULT_CONCURRENCY = 1; -const DEFAULT_RETRY = 1; // do not retry by default - + getCozyMetadata +} = __webpack_require__(833); /** - * Saves the files given in the fileurl attribute of each entries + * Saves the data into the cozy blindly without check. * - * You need the full permission on `io.cozy.files` in your manifest to use this function. + * You need at least the `POST` permission for the given doctype in your manifest, to be able to + * use this function. + * + * Parameters: + * + * `documents`: an array of objects corresponding to the data you want to save in the cozy + * `doctype` (string): the doctype where you want to save data (ex: 'io.cozy.bills') + * `options` (object): option object + * + `sourceAccount` (String): id of the source account + * + `sourceAccountIdentifier` (String): identifier unique to the account targetted by the connector. It is the login most of the time * - * @param {Array} entries - list of object describing files to save - * @param {string} entries.fileurl - The url of the file (can be a function returning the value). Ignored if `filestream` is given - * @param {Function} entries.fetchFile - the connector can give it's own function to fetch the file from the website, which will be run only when necessary (if the corresponding file is missing on the cozy) function returning the stream). This function must return a promise resolved as a stream - * @param {object | string} entries.filestream - the stream which will be directly passed to cozyClient.files.create (can also be function returning the stream) - * @param {object} entries.requestOptions - The options passed to request to fetch fileurl (can be a function returning the value) - * @param {string} entries.filename - The file name of the item written on disk. This attribute is optional and as default value, the file name will be "smartly" guessed by the function. Use this attribute if the guess is not smart enough for you, or if you use `filestream` (can be a function returning the value). - * @param {string} entries.shouldReplaceName - used to migrate filename. If saveFiles finds a file linked to this entry and this file name matches `shouldReplaceName`, the file is renamed to `filename` (can be a function returning the value) - * @param {Function} entries.shouldReplaceFile - use this function to state if the current entry should be forced to be redownloaded and replaced. Usefull if we know the file content can change and we always want the last version. - * @param {object} entries.fileAttributes - ex: `{created_at: new Date()}` sets some additionnal file attributes passed to cozyClient.file.create - * @param {string} entries.subPath - A subpath to save all files, will be created if needed. - * @param {object} fields - is the argument given to the main function of your connector by the BaseKonnector. It especially contains a `folderPath` which is the string path configured by the user in collect/home - * @param {object} options - global options - * @param {number} options.timeout - timestamp which can be used if your connector needs to fetch a lot of files and if the stack does not give enough time to your connector to fetch it all. It could happen that the connector is stopped right in the middle of the download of the file and the file will be broken. With the `timeout` option, the `saveFiles` function will check if the timeout has passed right after downloading each file and then will be sure to be stopped cleanly if the timeout is not too long. And since it is really fast to check that a file has already been downloaded, on the next run of the connector, it will be able to download some more files, and so on. If you want the timeout to be in 10s, do `Date.now() + 10*1000`. You can try it in the previous code. - * @param {number|boolean} options.contentType - ex: 'application/pdf' used to force the contentType of documents when they are badly recognized by cozy. If "true" the content type will be recognized from the file name and forced the same way. - * @param {number} options.concurrency - default: `1` sets the maximum number of concurrent downloads - * @param {Function} options.validateFile - default: do not validate if file is empty or has bad mime type - * @param {boolean|Function} options.validateFileContent - default false. Also check the content of the file to recognize the mime type - * @param {Array} options.fileIdAttributes - array of strings : Describes which attributes of files will be taken as primary key for files to check if they already exist, even if they are moved. If not given, the file path will used for deduplication as before. - * @param {string} options.subPath - A subpath to save this file, will be created if needed. - * @param {Function} options.fetchFile - the connector can give it's own function to fetch the file from the website, which will be run only when necessary (if the corresponding file is missing on the cozy) function returning the stream). This function must return a promise resolved as a stream - * @example * ```javascript - * await saveFiles([{fileurl: 'https://...', filename: 'bill1.pdf'}], fields, { - * fileIdAttributes: ['fileurl'] - * }) + * const documents = [ + * { + * name: 'toto', + * height: 1.8 + * }, + * { + * name: 'titi', + * height: 1.7 + * } + * ] + * + * return addData(documents, 'io.cozy.height') * ``` - * @alias module:saveFiles + * + * @alias module:addData */ -const saveFiles = async (entries, fields, options = {}) => { - if (!entries || entries.length === 0) { - log('warn', 'No file to download'); - } - - if (!options.sourceAccount) { - log('warn', 'There is no sourceAccount given to saveFiles'); - } - if (!options.sourceAccountIdentifier) { - log('warn', 'There is no sourceAccountIdentifier given to saveFIles'); - } +const addData = (entries, doctype, options = {}) => { + const cozy = __webpack_require__(485); - if (typeof fields !== 'object') { - log('debug', 'Deprecation warning, saveFiles 2nd argument should not be a string'); - fields = { - folderPath: fields + return bluebird.mapSeries(entries, async entry => { + log('debug', entry, 'Adding this entry'); + const metaEntry = { + cozyMetadata: getCozyMetadata({ ...entry.cozyMetadata, + sourceAccount: options.sourceAccount, + sourceAccountIdentifier: options.sourceAccountIdentifier + }), + ...entry }; - } + const dbEntry = await (metaEntry._id ? cozy.data.update(doctype, metaEntry, omit(metaEntry, '_rev')) : cozy.data.create(doctype, metaEntry)); // Also update the original entry _id to allow saveBills' + // linkBankOperation entries to have an id - const saveOptions = { - folderPath: fields.folderPath, - fileIdAttributes: options.fileIdAttributes, - timeout: options.timeout || DEFAULT_TIMEOUT, - concurrency: options.concurrency || DEFAULT_CONCURRENCY, - retry: options.retry || DEFAULT_RETRY, - postProcess: options.postProcess, - postProcessFile: options.postProcessFile, - contentType: options.contentType, - requestInstance: options.requestInstance, - shouldReplaceFile: options.shouldReplaceFile, - validateFile: options.validateFile || defaultValidateFile, - subPath: options.subPath, - sourceAccountOptions: { - sourceAccount: options.sourceAccount, - sourceAccountIdentifier: options.sourceAccountIdentifier - } - }; + metaEntry._id = dbEntry._id; + return dbEntry; + }); +}; - if (options.validateFileContent) { - if (options.validateFileContent === true) { - saveOptions.validateFileContent = defaultValidateFileContent; - } else if (typeof options.validateFileContent === 'function') { - saveOptions.validateFileContent = options.validateFileContent; - } - } +module.exports = addData; - noMetadataDeduplicationWarning(saveOptions); +/***/ }), +/* 1245 */ +/***/ (function(module, exports, __webpack_require__) { - const canBeSaved = entry => entry.fetchFile || entry.fileurl || entry.requestOptions || entry.filestream; +/** + * Finds links between bills and bank operations. + * + * @module linkBankOperations + */ +const bluebird = __webpack_require__(25); - let filesArray = undefined; - let savedFiles = 0; - const savedEntries = []; +const log = __webpack_require__(2).namespace('linkBankOperations'); - try { - await bluebird.map(entries, async entry => { - ; - ['fileurl', 'filename', 'shouldReplaceName', 'requestOptions' // 'filestream' - ].forEach(key => { - if (entry[key]) entry[key] = getValOrFnResult(entry[key], entry, options); - }); +const { + findDebitOperation, + findCreditOperation +} = __webpack_require__(1246); - if (entry.filestream && !entry.filename) { - log('warn', 'Missing filename property for for filestream entry, entry is ignored'); - return; - } +const fs = __webpack_require__(167); - if (entry.shouldReplaceName) { - // At first encounter of a rename, we set the filenamesList - if (filesArray === undefined) { - log('debug', 'initialize files list for renamming'); - filesArray = await getFiles(fields.folderPath); - } +const defaults = __webpack_require__(1255); - const fileFound = filesArray.find(f => getAttribute(f, 'name') === entry.shouldReplaceName); +const groupBy = __webpack_require__(729); - if (fileFound) { - await renameFile(fileFound, entry); // we continue because saveFile mays also add fileIdAttributes to the renamed file - } +const flatten = __webpack_require__(558); - delete entry.shouldReplaceName; - } +const sumBy = __webpack_require__(1212); - if (canBeSaved(entry)) { - const folderPath = await getOrCreateDestinationPath(entry, saveOptions); - entry = await saveEntry(entry, { ...saveOptions, - folderPath - }); +const geco = __webpack_require__(1256); - if (entry && entry._cozy_file_to_create) { - savedFiles++; - delete entry._cozy_file_to_create; - } - } +const { + format +} = __webpack_require__(889); - savedEntries.push(entry); - }, { - concurrency: saveOptions.concurrency - }); - } catch (err) { - if (err.message !== 'TIMEOUT') { - throw err; - } else { - log('warn', `saveFile timeout: still ${entries.length - savedEntries.length} / ${entries.length} to download`); - } - } +const cozyClient = __webpack_require__(485); - log('info', `saveFiles created ${savedFiles} files for ${savedEntries ? savedEntries.length : 'n'} entries`); - return savedEntries; +const DOCTYPE_OPERATIONS = 'io.cozy.bank.operations'; +const DEFAULT_AMOUNT_DELTA = 0.001; +const DEFAULT_PAST_WINDOW = 15; +const DEFAULT_FUTURE_WINDOW = 29; + +const fmtDate = function (x) { + return new Date(x).toISOString().substr(0, 10); }; -const saveEntry = async function (entry, options) { - if (options.timeout && Date.now() > options.timeout) { - const remainingTime = Math.floor((options.timeout - Date.now()) / s); - log('info', `${remainingTime}s timeout finished for ${options.folderPath}`); - throw new Error('TIMEOUT'); +const getBillDate = bill => bill.originalDate || bill.date; + +class Linker { + constructor(cozyClient) { + this.cozyClient = cozyClient; + this.toUpdate = []; + this.groupVendors = ['Numéricable', 'Ameli', 'MGEN', 'Humanis']; } - let file = await getFileIfExists(entry, options); - let shouldReplace = false; + async removeBillsFromOperations(bills, operations) { + log('debug', `Removing ${bills.length} bills from bank operations`); - if (file) { - try { - shouldReplace = await shouldReplaceFile(file, entry, options); - } catch (err) { - log('info', `Error in shouldReplaceFile : ${err.message}`); - shouldReplace = true; - } - } + for (let op of operations) { + let needUpdate = false; + let billsAttribute = op.bills || []; - let method = 'create'; + for (let bill of bills) { + const billLongId = `io.cozy.bills:${bill._id}`; // if bill id found in op bills, do something - if (shouldReplace && file) { - method = 'updateById'; - log('debug', `Will replace ${getFilePath({ - options, - file - })}...`); - } + if (billsAttribute.indexOf(billLongId) >= 0) { + needUpdate = true; + billsAttribute = billsAttribute.filter(billId => billId !== billLongId && billId !== `io.cozy.bills:${bill.original}`); - try { - if (!file || method === 'updateById') { - log('debug', omit(entry, 'filestream')); - logFileStream(entry.filestream); - log('debug', `File ${getFilePath({ - options, - entry - })} does not exist yet or is not valid`); - entry._cozy_file_to_create = true; - file = await retry(createFile, { - interval: 1000, - throw_original: true, - max_tries: options.retry, - args: [entry, options, method, file ? file._id : undefined] - }).catch(err => { - if (err.message === 'BAD_DOWNLOADED_FILE') { - log('warn', `Could not download file after ${options.retry} tries removing the file`); - } else { - log('warn', 'unknown file download error: ' + err.message); + if (bill.original) { + billsAttribute.push(`io.cozy.bills:${bill.original}`); + } } - }); - } + } - attachFileToEntry(entry, file); - sanitizeEntry(entry); + if (needUpdate) { + log('info', `Bank operation ${op._id}: Replacing ${JSON.stringify(op.bills)} by ${JSON.stringify(billsAttribute)}`); + await this.updateAttributes(DOCTYPE_OPERATIONS, op, { + bills: billsAttribute + }); + } + } + } - if (options.postProcess) { - await options.postProcess(entry); + addBillToOperation(bill, operation) { + if (!bill._id) { + log('warn', 'bill has no id, impossible to add it to an operation'); + return Promise.resolve(); } - } catch (err) { - if (getErrorStatus(err) === 413) { - // the cozy quota is full - throw new Error(errors.DISK_QUOTA_EXCEEDED); + + const billId = `io.cozy.bills:${bill._id}`; + + if (operation.bills && operation.bills.indexOf(billId) > -1) { + return Promise.resolve(); } - log('warn', errors.SAVE_FILE_FAILED); - log('warn', err.message, `Error caught while trying to save the file ${entry.fileurl ? entry.fileurl : entry.filename}`); + const billIds = operation.bills || []; + billIds.push(billId); + const attributes = { + bills: billIds + }; + return this.updateAttributes(DOCTYPE_OPERATIONS, operation, attributes); } - return entry; -}; - -function noMetadataDeduplicationWarning(options) { - const fileIdAttributes = options.fileIdAttributes; + addReimbursementToOperation(bill, debitOperation, matchingOperation) { + if (!bill._id) { + log('warn', 'bill has no id, impossible to add it as a reimbursement'); + return Promise.resolve(); + } - if (!fileIdAttributes) { - log('warn', `saveFiles: no deduplication key is defined, file deduplication will be based on file path`); - } + const billId = `io.cozy.bills:${bill._id}`; - const slug = manifest.data.slug; + if (debitOperation.reimbursements && debitOperation.reimbursements.map(b => b.billId).indexOf(billId) > -1) { + return Promise.resolve(); + } - if (!slug) { - log('warn', `saveFiles: no slug is defined for the current connector, file deduplication will be based on file path`); + const reimbursements = debitOperation.reimbursements || []; + reimbursements.push({ + billId, + amount: bill.amount, + operationId: matchingOperation && matchingOperation._id + }); + return this.updateAttributes(DOCTYPE_OPERATIONS, debitOperation, { + reimbursements: reimbursements + }); } + /* Buffer update operations */ - const sourceAccountIdentifier = get(options, 'sourceAccountOptions.sourceAccountIdentifier'); - if (!sourceAccountIdentifier) { - log('warn', `saveFiles: no sourceAccountIdentifier is defined in options, file deduplication will be based on file path`); + updateAttributes(doctype, doc, attrs) { + Object.assign(doc, attrs); + this.toUpdate.push(doc); + return Promise.resolve(); } -} - -async function getFileIfExists(entry, options) { - const fileIdAttributes = options.fileIdAttributes; - const slug = manifest.data.slug; - const sourceAccountIdentifier = get(options, 'sourceAccountOptions.sourceAccountIdentifier'); - const isReadyForFileMetadata = fileIdAttributes && slug && sourceAccountIdentifier; + /* Commit updates */ - if (isReadyForFileMetadata) { - const file = await getFileFromMetaData(entry, fileIdAttributes, sourceAccountIdentifier, slug); - if (!file) { - // no file with correct metadata, maybe the corresponding file already exist in the default - // path from a previous version of the connector - return await getFileFromPath(entry, options); - } else return file; - } else { - return await getFileFromPath(entry, options); + commitChanges() { + log('debug', `linkBankOperations: commiting ${this.toUpdate.length} changes`); + return cozyClient.fetchJSON('POST', `/data/${DOCTYPE_OPERATIONS}/_bulk_docs`, { + docs: this.toUpdate + }); } -} -async function getFileFromMetaData(entry, fileIdAttributes, sourceAccountIdentifier, slug) { - const index = await cozy.data.defineIndex('io.cozy.files', ['metadata.fileIdAttributes', 'trashed', 'cozyMetadata.sourceAccountIdentifier', 'cozyMetadata.createdByApp']); - log('debug', `Checking existence of ${calculateFileKey(entry, fileIdAttributes)}`); - const files = await queryAll('io.cozy.files', { - metadata: { - fileIdAttributes: calculateFileKey(entry, fileIdAttributes) - }, - trashed: false, - cozyMetadata: { - sourceAccountIdentifier, - createdByApp: slug - } - }, index); + getOptions(opts = {}) { + const options = { ...opts + }; - if (files && files[0]) { - if (files.length > 1) { - log('warn', `Found ${files.length} files corresponding to ${calculateFileKey(entry, fileIdAttributes)}`); + if (typeof options.identifiers === 'string') { + options.identifiers = [options.identifiers.toLowerCase()]; + } else if (Array.isArray(options.identifiers)) { + options.identifiers = options.identifiers.map(id => id.toLowerCase()); + } else { + throw new Error('linkBankOperations cannot be called without "identifiers" option'); } - return files[0]; - } else { - log('debug', 'not found'); - return false; - } -} - -async function getFileFromPath(entry, options) { - try { - log('debug', `Checking existence of ${getFilePath({ - entry, - options - })}`); - const result = await cozy.files.statByPath(getFilePath({ - entry, - options - })); - return result; - } catch (err) { - log('debug', err.message); - return false; + defaults(options, { + amountDelta: DEFAULT_AMOUNT_DELTA + }); + defaults(options, { + minAmountDelta: options.amountDelta, + maxAmountDelta: options.amountDelta, + pastWindow: DEFAULT_PAST_WINDOW, + futureWindow: DEFAULT_FUTURE_WINDOW + }); + return options; } -} -async function createFile(entry, options, method, fileId) { - const folder = await cozy.files.statByPath(options.folderPath); - let createFileOptions = { - name: getFileName(entry), - dirID: folder._id - }; + async linkBillToCreditOperation(bill, debitOperation, allOperations, options) { + const creditOperation = await findCreditOperation(this.cozyClient, bill, options, allOperations); + const promises = []; - if (options.contentType) { - if (options.contentType === true && entry.filename) { - createFileOptions.contentType = mimetypes.contentType(entry.filename); - } else { - createFileOptions.contentType = options.contentType; + if (creditOperation) { + promises.push(this.addBillToOperation(bill, creditOperation)); } - } - createFileOptions = { ...createFileOptions, - ...entry.fileAttributes, - ...options.sourceAccountOptions - }; + if (creditOperation && debitOperation) { + log('debug', `reimbursement: Matching bill ${bill.subtype || bill.filename} (${fmtDate(bill.date)}) with credit operation ${creditOperation.label} (${fmtDate(creditOperation.date)})`); + promises.push(this.addReimbursementToOperation(bill, debitOperation, creditOperation)); + } - if (options.fileIdAttributes) { - createFileOptions = { ...createFileOptions, - ...{ - metadata: { ...createFileOptions.metadata, - fileIdAttributes: calculateFileKey(entry, options.fileIdAttributes) - } - } - }; + await Promise.all(promises); + return creditOperation; } - let toCreate; - - if (entry.filestream) { - toCreate = entry.filestream; - } else if (entry.fetchFile || options.fetchFile) { - toCreate = await (entry.fetchFile || options.fetchFile)(entry); - } else { - toCreate = downloadEntry(entry, { ...options, - simple: false + async linkBillToDebitOperation(bill, allOperations, options) { + return findDebitOperation(this.cozyClient, bill, options, allOperations).then(operation => { + if (operation) { + log('debug', `bills: Matching bill ${bill.subtype || bill.filename} (${fmtDate(bill.date)}) with debit operation ${operation.label} (${fmtDate(operation.date)})`); + return this.addBillToOperation(bill, operation).then(() => operation); + } }); } + /** + * Link bills to + * - their matching banking operation (debit) + * - to their reimbursement (credit) + */ - let fileDocument; - - if (method === 'create') { - fileDocument = await cozy.files.create(toCreate, createFileOptions); - } else if (method === 'updateById') { - log('debug', `replacing file for ${entry.filename}`); - fileDocument = await cozy.files.updateById(fileId, toCreate, createFileOptions); - } - - if (options.validateFile) { - if ((await options.validateFile(fileDocument)) === false) { - await removeFile(fileDocument); - throw new Error('BAD_DOWNLOADED_FILE'); - } - if (options.validateFileContent && !(await options.validateFileContent(fileDocument))) { - await removeFile(fileDocument); - throw new Error('BAD_DOWNLOADED_FILE'); - } - } + async linkBillsToOperations(bills, options) { + options = this.getOptions(options); + const result = {}; + const allOperations = await this.cozyClient.data.findAll('io.cozy.bank.operations'); - return fileDocument; -} + if (options.billsToRemove && options.billsToRemove.length) { + this.removeBillsFromOperations(options.billsToRemove, allOperations); + } // when bill comes from a third party payer, + // no transaction is visible on the bank account -function downloadEntry(entry, options) { - let filePromise = getRequestInstance(entry, options)(getRequestOptions(entry, options)); - if (options.contentType) { - // the developper wants to force the contentType of the document - // we pipe the stream to remove headers with bad contentType from the request - return filePromise.pipe(new stream.PassThrough()); - } // we have to do this since the result of filePromise is not a stream and cannot be taken by - // cozy.files.create + bills = bills.filter(bill => !bill.isThirdPartyPayer === true); + await bluebird.each(bills, async bill => { + const res = result[bill._id] = { + bill: bill + }; // the bills combination phase is very time consuming. We can avoid it when we run the + // connector in standalone mode + if (allOperations.length === 0) { + return result; + } - if (options.postProcessFile) { - log('warn', 'Be carefull postProcessFile option is deprecated. You should use the filestream attribute in each entry instead'); - return filePromise.then(data => options.postProcessFile(data)); - } + const debitOperation = await this.linkBillToDebitOperation(bill, allOperations, options); - filePromise.catch(err => { - log('warn', `File download error ${err.message}`); - }); - return filePromise; -} + if (debitOperation) { + res.debitOperation = debitOperation; + } -const shouldReplaceFile = async function (file, entry, options) { - const isValid = !options.validateFile || (await options.validateFile(file)); + if (bill.isRefund) { + const creditOperation = await this.linkBillToCreditOperation(bill, debitOperation, allOperations, options); - if (!isValid) { - log('warn', `${getFileName({ - file, - options - })} is invalid`); - throw new Error('BAD_DOWNLOADED_FILE'); + if (creditOperation) { + res.creditOperation = creditOperation; + } + } + }); + await this.findCombinations(result, options, allOperations); + await this.commitChanges(); + return result; } - const defaultShouldReplaceFile = (file, entry) => { - const shouldForceMetadataAttr = attr => { - const result = !getAttribute(file, `metadata.${attr}`) && get(entry, `fileAttributes.metadata.${attr}`); - if (result) log('debug', `filereplacement: adding ${attr} metadata`); - return result; - }; // replace all files with meta if there is file metadata to add - - - const fileHasNoMetadata = !getAttribute(file, 'metadata'); - const fileHasNoId = !getAttribute(file, 'metadata.fileIdAttributes'); - const entryHasMetadata = !!get(entry, 'fileAttributes.metadata'); - const hasSourceAccountIdentifierOption = !!get(options, 'sourceAccountOptions.sourceAccountIdentifier'); - const fileHasSourceAccountIdentifier = !!getAttribute(file, 'cozyMetadata.sourceAccountIdentifier'); - const result = fileHasNoMetadata && entryHasMetadata || fileHasNoId && !!options.fileIdAttributes || hasSourceAccountIdentifierOption && !fileHasSourceAccountIdentifier || shouldForceMetadataAttr('carbonCopy') || shouldForceMetadataAttr('electronicSafe') || shouldForceMetadataAttr('categories'); + async findCombinations(result, options, allOperations) { + log('debug', 'finding combinations'); + let found; - if (result) { - if (fileHasNoMetadata && entryHasMetadata) log('debug', 'filereplacement: metadata to add'); - if (fileHasNoId && !!options.fileIdAttributes) log('debug', 'filereplacement: adding fileIdAttributes'); - if (hasSourceAccountIdentifierOption && !fileHasSourceAccountIdentifier) log('debug', 'filereplacement: adding sourceAccountIdentifier'); - } + do { + found = false; + const unlinkedBills = this.getUnlinkedBills(result); + log('debug', `findCombinations: There are ${unlinkedBills.length} unlinked bills`); + const billsGroups = this.groupBills(unlinkedBills); + log('debug', `findCombinations: Groups: ${billsGroups.length}`); + const combinations = flatten(billsGroups.map(billsGroup => this.generateBillsCombinations(billsGroup))); + log('debug', `Generated ${combinations.length} bills combinations`); + const combinedBills = combinations.map(combination => this.combineBills(...combination)); - return result; - }; + for (const combinedBill of combinedBills) { + const debitOperation = await findDebitOperation(this.cozyClient, combinedBill, options, allOperations); - const shouldReplaceFileFn = entry.shouldReplaceFile || options.shouldReplaceFile || defaultShouldReplaceFile; - return shouldReplaceFileFn(file, entry); -}; + if (debitOperation) { + found = true; + log('debug', combinedBill, 'Matching bills combination'); + log('debug', debitOperation, 'Matching debit debitOperation'); + combinedBill.originalBills.forEach(async originalBill => { + const res = result[originalBill._id]; + res.debitOperation = debitOperation; -const removeFile = async function (file) { - await cozy.files.trashById(file._id); - await cozy.files.destroyById(file._id); -}; + if (res.creditOperation && res.debitOperation) { + await this.addReimbursementToOperation(originalBill, debitOperation, res.creditOperation); + } + }); + break; + } + } + } while (found); -module.exports = saveFiles; -module.exports.getFileIfExists = getFileIfExists; + return result; + } -function getFileName(entry) { - let filename; + getUnlinkedBills(bills) { + const unlinkedBills = Object.values(bills).filter(bill => !bill.debitOperation).map(bill => bill.bill); + return unlinkedBills; + } - if (entry.filename) { - filename = entry.filename; - } else if (entry.fileurl) { - // try to get the file name from the url - const parsed = __webpack_require__(83).parse(entry.fileurl); + billCanBeGrouped(bill) { + return getBillDate(bill) && (bill.type === 'health_costs' || this.groupVendors.includes(bill.vendor)); + } - filename = path.basename(parsed.pathname); - } else { - log('error', 'Could not get a file name for the entry'); - return false; + groupBills(bills) { + const billsToGroup = bills.filter(bill => this.billCanBeGrouped(bill)); + const groups = groupBy(billsToGroup, bill => { + return [format(new Date(getBillDate(bill)), 'yyyy-MM-dd'), bill.vendor]; + }); + return Object.values(groups); } - return sanitizeFileName(filename); -} + generateBillsCombinations(bills) { + const MIN_ITEMS_IN_COMBINATION = 2; + const combinations = []; -function sanitizeFileName(filename) { - return filename.replace(/^\.+$/, '').replace(/[/?<>\\:*|":]/g, ''); -} + for (let n = MIN_ITEMS_IN_COMBINATION; n <= bills.length; ++n) { + const combinationsN = geco.gen(bills.length, n, bills); + combinations.push(...combinationsN); + } -function checkFileSize(fileobject) { - const size = getAttribute(fileobject, 'size'); - const name = getAttribute(fileobject, 'name'); + return combinations; + } - if (size === 0 || size === '0') { - log('warn', `${name} is empty`); - log('warn', 'BAD_FILE_SIZE'); - return false; + combineBills(...bills) { + return { ...bills[0], + _id: ['combined', ...bills.map(bill => bill._id)].join(':'), + amount: sumBy(bills, bill => bill.amount), + originalAmount: sumBy(bills, bill => bill.originalAmount), + originalBills: bills + }; } - return true; } -function checkMimeWithPath(fileDocument) { - const mime = getAttribute(fileDocument, 'mime'); - const name = getAttribute(fileDocument, 'name'); - const extension = path.extname(name).substr(1); +const jsonTee = filename => res => { + fs.writeFileSync(filename, JSON.stringify(res, null, 2)); + return res; +}; +/** + * Will soon move to a dedicated service. You should not use it. + * + * Finds links between bills and bank operations. + * + * @alias module:linkBankOperations + */ - if (extension && mime && mimetypes.lookup(extension) !== mime) { - log('warn', `${name} and ${mime} do not correspond`); - log('warn', 'BAD_MIME_TYPE'); - return false; + +const linkBankOperations = (bills, doctype, fields, options = {}) => { + // Use the custom bank identifier from user if any + if (fields.bank_identifier && fields.bank_identifier.length) { + options.identifiers = [fields.bank_identifier]; } - return true; -} + const cozyClient = __webpack_require__(485); -function logFileStream(fileStream) { - if (!fileStream) return; + const linker = new Linker(cozyClient); + const prom = linker.linkBillsToOperations(bills, options).catch(err => { + log('warn', err, 'Problem when linking operations'); + }); - if (fileStream && fileStream.constructor && fileStream.constructor.name) { - log('debug', `The fileStream attribute is an instance of ${fileStream.constructor.name}`); - } else { - log('debug', `The fileStream attribute is a ${typeof fileStream}`); + if (process.env.LINK_RESULTS_FILENAME) { + prom.then(jsonTee(process.env.LINK_RESULTS_FILENAME)); } -} -async function getFiles(folderPath) { - const dir = await cozy.files.statByPath(folderPath); - const files = await queryAll('io.cozy.files', { - dir_id: dir._id - }); - return files; -} + return prom; +}; -async function renameFile(file, entry) { - if (!entry.filename) { - throw new Error('shouldReplaceName needs a filename'); - } +module.exports = linkBankOperations; +Object.assign(module.exports, { + Linker +}); - log('debug', `Renaming ${getAttribute(file, 'name')} to ${entry.filename}`); +/***/ }), +/* 1246 */ +/***/ (function(module, exports, __webpack_require__) { - try { - await cozy.files.updateAttributesById(file._id, { - name: entry.filename - }); - } catch (err) { - if (JSON.parse(err.message).errors.shift().status === '409') { - log('warn', `${entry.filename} already exists. Removing ${getAttribute(file, 'name')}`); - await cozy.files.trashById(file._id); - } - } -} +const { + operationsFilters +} = __webpack_require__(1247); -function getErrorStatus(err) { - try { - return Number(JSON.parse(err.message).errors[0].status); - } catch (e) { - return null; - } -} +const { + findNeighboringOperations +} = __webpack_require__(1254); -function getValOrFnResult(val, ...args) { - if (typeof val === 'function') { - return val.apply(val, args); - } else return val; -} +const { + sortedOperations +} = __webpack_require__(1253); -function calculateFileKey(entry, fileIdAttributes) { - return fileIdAttributes.sort().map(key => get(entry, key)).join('####'); -} +const findOperation = (cozyClient, bill, options, allOperations) => { + // By default, a bill is an expense. If it is not, it should be + // declared as a refund: isRefund=true. + if (options.credit && !bill.isRefund) return; + return findNeighboringOperations(cozyClient, bill, options, allOperations).then(operations => { + operations = operationsFilters(bill, operations, options); + operations = sortedOperations(bill, operations); + return operations[0]; + }); +}; -function defaultValidateFile(fileDocument) { - return checkFileSize(fileDocument) && checkMimeWithPath(fileDocument); -} +const findDebitOperation = findOperation; -async function defaultValidateFileContent(fileDocument) { - const response = await cozy.files.downloadById(fileDocument._id); - const mime = getAttribute(fileDocument, 'mime'); - const fileTypeFromContent = await fileType.fromBuffer(await response.buffer()); +const findCreditOperation = (cozyClient, bill, options, allOperations) => { + const creditOptions = Object.assign({}, options, { + credit: true + }); + return findOperation(cozyClient, bill, creditOptions, allOperations); +}; - if (!fileTypeFromContent) { - log('warn', `Could not find mime type from file content`); - return false; - } +module.exports = { + findDebitOperation, + findCreditOperation +}; - if (!defaultValidateFile(fileDocument) || mime !== fileTypeFromContent.mime) { - log('warn', `Wrong file type from content ${JSON.stringify(fileTypeFromContent)}`); - return false; - } +/***/ }), +/* 1247 */ +/***/ (function(module, exports, __webpack_require__) { - return true; -} +const includes = __webpack_require__(1248); -function sanitizeEntry(entry) { - delete entry.fetchFile; - delete entry.requestOptions; - delete entry.filestream; - delete entry.shouldReplaceFile; - return entry; -} +const some = __webpack_require__(1251); -function getRequestInstance(entry, options) { - return options.requestInstance ? options.requestInstance : requestFactory({ - json: false, - cheerio: false, - userAgent: true, - jar: true - }); -} +const sumBy = __webpack_require__(1212); -function getRequestOptions(entry, options) { - const defaultRequestOptions = { - uri: entry.fileurl, - method: 'GET' - }; +const { + isWithinInterval +} = __webpack_require__(889); - if (!options.requestInstance) { - // if requestInstance is already set, we suppose that the connecteur want to handle the cookie - // jar itself - defaultRequestOptions.jar = true; - } +const { + getIdentifiers, + getDateRangeFromBill, + getAmountRangeFromBill +} = __webpack_require__(1253); // constants - return { ...defaultRequestOptions, - ...entry.requestOptions - }; -} -function attachFileToEntry(entry, fileDocument) { - entry.fileDocument = fileDocument; - return entry; -} +const HEALTH_VENDORS = ['Ameli', 'Harmonie', 'Malakoff Mederic', 'MGEN', 'Generali', 'ascoreSante', 'EoviMCD', 'Humanis', 'Alan', 'lamutuellegenerale']; // TODO: to import from each konnector -function getFilePath({ - file, - entry, - options -}) { - const folderPath = options.folderPath; +const HEALTH_EXPENSE_CAT = '400610'; +const HEALTH_INSURANCE_CAT = '400620'; +const UNCATEGORIZED_CAT_ID_OPERATION = '0'; // TODO: import it from cozy-bank +// helpers - if (file) { - return path.join(folderPath, getAttribute(file, 'name')); - } else if (entry) { - return path.join(folderPath, getFileName(entry)); +const getCategoryId = o => { + return o.manualCategoryId || o.automaticCategoryId || UNCATEGORIZED_CAT_ID_OPERATION; +}; + +const isHealthOperation = operation => { + const catId = getCategoryId(operation); + + if (operation.amount < 0) { + return catId === HEALTH_EXPENSE_CAT; + } else { + return catId === HEALTH_EXPENSE_CAT || catId === HEALTH_INSURANCE_CAT; } -} +}; -function getAttribute(obj, attribute) { - return get(obj, `attributes.${attribute}`, get(obj, attribute)); -} +const isUncategorizedOperation = operation => { + const catId = getCategoryId(operation); + return catId == UNCATEGORIZED_CAT_ID_OPERATION; +}; -async function getOrCreateDestinationPath(entry, saveOptions) { - const subPath = entry.subPath || saveOptions.subPath; - let finalPath = saveOptions.folderPath; +const isHealthBill = bill => { + return includes(HEALTH_VENDORS, bill.vendor); +}; // filters - if (subPath) { - finalPath += '/' + subPath; - await mkdirp(finalPath); - } - return finalPath; -} +const filterByIdentifiers = identifiers => { + identifiers = identifiers.map(i => i.toLowerCase()); -/***/ }), -/* 1228 */ -/***/ (function(module, exports, __webpack_require__) { + const identifierFilter = operation => { + const label = operation.label.toLowerCase(); + return some(identifiers, identifier => includes(label, identifier)); + }; + return identifierFilter; +}; -module.exports = __webpack_require__(1229); +const filterByDates = ({ + minDate, + maxDate +}) => { + const dateFilter = operation => { + return isWithinInterval(new Date(operation.date), { + start: new Date(minDate), + end: new Date(maxDate) + }); + }; + return dateFilter; +}; -/***/ }), -/* 1229 */ -/***/ (function(module, exports, __webpack_require__) { +const filterByAmounts = ({ + minAmount, + maxAmount +}) => { + const amountFilter = operation => { + return operation.amount >= minAmount && operation.amount <= maxAmount; + }; -var Promise = __webpack_require__(25); + return amountFilter; +}; -// Subclass of Error that can be thrown to indicate that retry should stop. -// -// If called with an instance of Error subclass, then the retry promise will be -// rejected with the given error. -// -// Otherwise the cancel error object itself is propagated to the caller. -// -function StopError(err) { - this.name = 'StopError'; - if (err instanceof Error) { - this.err = err - } else { - this.message = err || 'cancelled' +const filterByCategory = (bill, options = {}) => { + const isHealth = isHealthBill(bill); + + const categoryFilter = operation => { + if (options.allowUncategorized === true && isUncategorizedOperation(operation)) { + return true; } -} -StopError.prototype = Object.create(Error.prototype); -retry.StopError = StopError; + return isHealth ? isHealthOperation(operation) : !isHealthOperation(operation); + }; + return categoryFilter; +}; +/** + * Check that the sum of the reimbursements + the amount of the bill is not + * greater that the amount of the operation + */ -// Retry `func` until it succeeds. -// -// For each attempt, invokes `func` with `options.args` as arguments and -// `options.context` as `this`. -// -// Waits `options.interval` milliseconds (default 1000) between attempts. -// -// Increases wait by a factor of `options.backoff` each interval, up to -// a limit of `options.max_interval`. -// -// Keeps trying until `options.timeout` milliseconds have elapsed, -// or `options.max_tries` have been attempted, whichever comes first. -// -// If neither is specified, then the default is to make 5 attempts. -// -function retry(func, options) { - options = options || {}; +const filterByReimbursements = bill => { + const reimbursementFilter = operation => { + const sumReimbursements = sumBy(operation.reimbursements, 'amount'); + return sumReimbursements + bill.amount <= -operation.amount; + }; - var interval = typeof options.interval === 'number' ? options.interval : 1000; + return reimbursementFilter; +}; // combine filters - var max_tries, giveup_time; - if (typeof(options.max_tries) !== 'undefined') { - max_tries = options.max_tries; - } - if (options.timeout) { - giveup_time = new Date().getTime() + options.timeout; - } +const operationsFilters = (bill, operations, options) => { + const filterByConditions = filters => op => { + for (let f of filters) { + const res = f(op); - if (!max_tries && !giveup_time) { - max_tries = 5; + if (!res) { + return false; + } } - var tries = 0; - var start = new Date().getTime(); + return true; + }; - // If the user didn't supply a predicate function then add one that - // always succeeds. - // - // This is used in bluebird's filtered catch to flag the error types - // that should retry. - var predicate = options.predicate || function(err) { return true; } - var stopped = false; + const fByDates = filterByDates(getDateRangeFromBill(bill, options)); + const fByAmounts = filterByAmounts(getAmountRangeFromBill(bill, options)); + const fByCategory = filterByCategory(bill, options); + const fByReimbursements = filterByReimbursements(bill, options); + const conditions = [fByDates, fByAmounts, fByCategory]; - function try_once() { - var tryStart = new Date().getTime(); - return Promise.attempt(function() { - return func.apply(options.context, options.args); - }) - .caught(StopError, function(err) { - stopped = true; - if (err.err instanceof Error) { - return Promise.reject(err.err); - } else { - return Promise.reject(err); - } - }) - .caught(predicate, function(err) { - if (stopped) { - return Promise.reject(err); - } - ++tries; - if (tries > 1) { - interval = backoff(interval, options); - } - var now = new Date().getTime(); + if (!options.credit) { + conditions.push(fByReimbursements); + } // We filters with identifiers when + // - we search a credit operation + // - or when is bill is in the health category - if ((max_tries && (tries === max_tries) || - (giveup_time && (now + interval >= giveup_time)))) { - if (! (err instanceof Error)) { - var failure = err; + if (options.credit || !isHealthBill(bill)) { + const fbyIdentifiers = filterByIdentifiers(getIdentifiers(options)); + conditions.push(fbyIdentifiers); + } - if (failure) { - if (typeof failure !== 'string') { - failure = JSON.stringify(failure); - } - } + return operations.filter(filterByConditions(conditions)); +}; - err = new Error('rejected with non-error: ' + failure); - err.failure = failure; - } else if (options.throw_original) { - return Promise.reject(err); - } +module.exports = { + filterByIdentifiers, + filterByDates, + filterByAmounts, + filterByCategory, + filterByReimbursements, + operationsFilters +}; - var timeout = new Error('operation timed out after ' + (now - start) + ' ms, ' + tries + ' tries with error: ' + err.message); - timeout.failure = err; - timeout.code = 'ETIMEDOUT'; - return Promise.reject(timeout); - } else { - var delay = interval - (now - tryStart); - if (delay <= 0) { - return try_once(); - } else { - return Promise.delay(delay).then(try_once); - } - } - }); - } - return try_once(); -} +/***/ }), +/* 1248 */ +/***/ (function(module, exports, __webpack_require__) { -// Return the updated interval after applying the various backoff options -function backoff(interval, options) { - if (options.backoff) { - interval = interval * options.backoff; - } +var baseIndexOf = __webpack_require__(477), + isArrayLike = __webpack_require__(458), + isString = __webpack_require__(74), + toInteger = __webpack_require__(642), + values = __webpack_require__(1249); - if (options.max_interval) { - interval = Math.min(interval, options.max_interval); - } +/* Built-in method references for those with the same name as other `lodash` methods. */ +var nativeMax = Math.max; - return interval; +/** + * Checks if `value` is in `collection`. If `collection` is a string, it's + * checked for a substring of `value`, otherwise + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * is used for equality comparisons. If `fromIndex` is negative, it's used as + * the offset from the end of `collection`. + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object|string} collection The collection to inspect. + * @param {*} value The value to search for. + * @param {number} [fromIndex=0] The index to search from. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. + * @returns {boolean} Returns `true` if `value` is found, else `false`. + * @example + * + * _.includes([1, 2, 3], 1); + * // => true + * + * _.includes([1, 2, 3], 1, 2); + * // => false + * + * _.includes({ 'a': 1, 'b': 2 }, 1); + * // => true + * + * _.includes('abcd', 'bc'); + * // => true + */ +function includes(collection, value, fromIndex, guard) { + collection = isArrayLike(collection) ? collection : values(collection); + fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; + + var length = collection.length; + if (fromIndex < 0) { + fromIndex = nativeMax(length + fromIndex, 0); + } + return isString(collection) + ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) + : (!!length && baseIndexOf(collection, value, fromIndex) > -1); } -module.exports = retry; +module.exports = includes; /***/ }), -/* 1230 */ +/* 1249 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @module mkdirp - */ -const { - basename, - dirname, - join -} = __webpack_require__(160).posix; +var baseValues = __webpack_require__(1250), + keys = __webpack_require__(441); -const cozyClient = __webpack_require__(485); /** - * Creates a directory and its missing ancestors as needed. + * Creates an array of the own enumerable string keyed property values of `object`. * - * Options : + * **Note:** Non-object values are coerced to objects. * - * - `...pathComponents`: one or many path components to be joined + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The object to query. + * @returns {Array} Returns the array of property values. + * @example * - * ```javascript - * await mkdirp('/foo') // Creates /foo - * await mkdirp('/foo') // Does nothing as /foo already exists - * await mkdirp('/bar/baz') // Creates /bar, then /bar/baz - * await mkdirp('/foo/bar/baz') // Creates /foo/bar, then /foo/bar/baz, not /foo - * await mkdirp('/') // Does nothing - * await mkdirp('/qux', 'qux2/qux3', 'qux4') // Creates /qux, then /qux/qux2, - * // then /qux/qux2/qux3 and - * // finally /qux/qux2/qux3/qux4 - * ``` + * function Foo() { + * this.a = 1; + * this.b = 2; + * } * - * The function will automatically add a leading slash when missing: + * Foo.prototype.c = 3; * - * ```javascript - * await mkdirp('foo', 'bar') // Creates /foo, then /foo/bar - * ``` + * _.values(new Foo); + * // => [1, 2] (iteration order is not guaranteed) * - * @alias module:mkdirp + * _.values('hi'); + * // => ['h', 'i'] */ +function values(object) { + return object == null ? [] : baseValues(object, keys(object)); +} +module.exports = values; -const mkdirp = fromCozy(cozyClient); -module.exports = mkdirp; // `fromCozy()` builds an mkdirp() function for the given Cozy client. -// Useful for testing. - -mkdirp.fromCozy = fromCozy; -function fromCozy(cozy) { - return async function mkdirp(...pathComponents) { - const path = join('/', ...pathComponents); - let doc = null; +/***/ }), +/* 1250 */ +/***/ (function(module, exports, __webpack_require__) { - try { - doc = await cozy.files.statByPath(path); - return doc; - } catch (err) { - if (![404, 409].includes(err.status)) throw err; - const name = basename(path); - const parentPath = dirname(path); - const parentDoc = await mkdirp(parentPath); +var arrayMap = __webpack_require__(410); - try { - doc = await cozy.files.createDirectory({ - name, - dirID: parentDoc._id - }); - return doc; - } catch (createErr) { - if (![404, 409].includes(createErr.status)) throw createErr; - return doc; - } - } - }; +/** + * The base implementation of `_.values` and `_.valuesIn` which creates an + * array of `object` property values corresponding to the property names + * of `props`. + * + * @private + * @param {Object} object The object to query. + * @param {Array} props The property names to get values for. + * @returns {Object} Returns the array of property values. + */ +function baseValues(object, props) { + return arrayMap(props, function(key) { + return object[key]; + }); } +module.exports = baseValues; + + /***/ }), -/* 1231 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +var arraySome = __webpack_require__(428), + baseIteratee = __webpack_require__(413), + baseSome = __webpack_require__(1252), + isArray = __webpack_require__(75), + isIterateeCall = __webpack_require__(754); /** - * The konnector could not login + * Checks if `predicate` returns truthy for **any** element of `collection`. + * Iteration is stopped once `predicate` returns truthy. The predicate is + * invoked with three arguments: (value, index|key, collection). * - * @type {string} - */ - -const LOGIN_FAILED = 'LOGIN_FAILED'; -/** - * The folder specified as folder_to_save does not exist (checked by BaseKonnector) + * @static + * @memberOf _ + * @since 0.1.0 + * @category Collection + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} [predicate=_.identity] The function invoked per iteration. + * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. + * @example * - * @type {string} - */ - -const NOT_EXISTING_DIRECTORY = 'NOT_EXISTING_DIRECTORY'; -/** - * The vendor's website is down + * _.some([null, 0, 'yes', false], Boolean); + * // => true * - * @type {string} - */ - -const VENDOR_DOWN = 'VENDOR_DOWN'; -/** - * There was an unexpected error, please take a look at the logs to know what happened + * var users = [ + * { 'user': 'barney', 'active': true }, + * { 'user': 'fred', 'active': false } + * ]; * - * @type {string} - */ - -const USER_ACTION_NEEDED = 'USER_ACTION_NEEDED'; -/** - * There was a problem while downloading a file + * // The `_.matches` iteratee shorthand. + * _.some(users, { 'user': 'barney', 'active': false }); + * // => false * - * @type {string} - */ - -const FILE_DOWNLOAD_FAILED = 'FILE_DOWNLOAD_FAILED'; -/** - * There was a problem while saving a file + * // The `_.matchesProperty` iteratee shorthand. + * _.some(users, ['active', false]); + * // => true * - * @type {string} + * // The `_.property` iteratee shorthand. + * _.some(users, 'active'); + * // => true */ +function some(collection, predicate, guard) { + var func = isArray(collection) ? arraySome : baseSome; + if (guard && isIterateeCall(collection, predicate, guard)) { + predicate = undefined; + } + return func(collection, baseIteratee(predicate, 3)); +} -const SAVE_FILE_FAILED = 'SAVE_FILE_FAILED'; -/** - * Could not save a file to the cozy because of disk quota exceeded - * - * @type {string} - */ +module.exports = some; -const DISK_QUOTA_EXCEEDED = 'DISK_QUOTA_EXCEEDED'; -/** - * It seems that the website requires a second authentification factor that we don’t support yet. - * - * @type {string} - */ -const CHALLENGE_ASKED = 'CHALLENGE_ASKED'; -/** - * Temporarily blocked - * - * @type {string} - */ +/***/ }), +/* 1252 */ +/***/ (function(module, exports, __webpack_require__) { -const LOGIN_FAILED_TOO_MANY_ATTEMPTS = 'LOGIN_FAILED.TOO_MANY_ATTEMPTS'; -/** - * Access refresh required - * - * @type {string} - */ +var baseEach = __webpack_require__(573); -const USER_ACTION_NEEDED_OAUTH_OUTDATED = 'USER_ACTION_NEEDED.OAUTH_OUTDATED'; /** - * Unavailable account + * The base implementation of `_.some` without support for iteratee shorthands. * - * @type {string} + * @private + * @param {Array|Object} collection The collection to iterate over. + * @param {Function} predicate The function invoked per iteration. + * @returns {boolean} Returns `true` if any element passes the predicate check, + * else `false`. */ +function baseSome(collection, predicate) { + var result; -const USER_ACTION_NEEDED_ACCOUNT_REMOVED = 'USER_ACTION_NEEDED.ACCOUNT_REMOVED'; -/** - * Unavailable account - * - * @type {string} - */ + baseEach(collection, function(value, index, collection) { + result = predicate(value, index, collection); + return !result; + }); + return !!result; +} -const USER_ACTION_NEEDED_CHANGE_PASSWORD = 'USER_ACTION_NEEDED.CHANGE_PASSWORD'; -/** - * Password update required - * - * @type {string} - */ +module.exports = baseSome; -const USER_ACTION_NEEDED_PERMISSIONS_CHANGED = 'USER_ACTION_NEEDED.PERMISSIONS_CHANGED'; -/** - * The user needs to accept a CGU form before accessing the rest of the website - * - * @type {string} - */ -const USER_ACTION_NEEDED_CGU_FORM = 'USER_ACTION_NEEDED.CGU_FORM'; -/** - * solveCaptcha failed to solve the captcha - * - * @type {string} - */ +/***/ }), +/* 1253 */ +/***/ (function(module, exports, __webpack_require__) { + +const sortBy = __webpack_require__(826); + +const { + addDays, + subDays, + differenceInDays +} = __webpack_require__(889); + +const getOperationAmountFromBill = (bill, options) => { + const searchingCredit = options && options.credit; + return searchingCredit ? bill.groupAmount || bill.amount : -(bill.originalAmount || bill.amount); +}; + +const getOperationDateFromBill = (bill, options) => { + const isCredit = options && options.credit; + const date = isCredit ? bill.date : bill.originalDate || bill.date; + return date ? new Date(date) : new Date(); +}; + +const getIdentifiers = options => options.identifiers; + +const getDateRangeFromBill = (bill, options) => { + const date = getOperationDateFromBill(bill, options); + return { + minDate: subDays(new Date(date), options.pastWindow), + maxDate: addDays(new Date(date), options.futureWindow) + }; +}; + +const getAmountRangeFromBill = (bill, options) => { + const amount = getOperationAmountFromBill(bill, options); + return { + minAmount: amount - options.minAmountDelta, + maxAmount: amount + options.maxAmountDelta + }; +}; + +const getTotalReimbursements = operation => { + if (!operation.reimbursements) return 0; + return operation.reimbursements.reduce((s, r) => s + r.amount, 0); +}; // when we want to match an invoice with an operation according criteria, +// it is possible that several operations are returned to us. +// So we want to find the bill that comes closest. +// This function will sort this list + + +const sortedOperations = (bill, operations) => { + const buildSortFunction = bill => { + // it's not possible to sort with 2 parameters as the same time + // Date is more important so it have a biggest weight, + // but this value is random. + const dateWeight = 0.7; + const amountWeight = 1 - dateWeight; + const opDate = getOperationDateFromBill(bill); + const opAmount = getOperationAmountFromBill(bill); + return operation => { + const dateDiff = Math.abs(differenceInDays(new Date(opDate), new Date(operation.date))); + const amountDiff = Math.abs(opAmount - operation.amount); + return dateWeight * dateDiff + amountWeight * amountDiff; + }; + }; + + return sortBy(operations, buildSortFunction(bill)); +}; -const CAPTCHA_RESOLUTION_FAILED = 'CAPTCHA_RESOLUTION_FAILED'; module.exports = { - LOGIN_FAILED, - NOT_EXISTING_DIRECTORY, - VENDOR_DOWN, - USER_ACTION_NEEDED, - FILE_DOWNLOAD_FAILED, - SAVE_FILE_FAILED, - DISK_QUOTA_EXCEEDED, - CHALLENGE_ASKED, - LOGIN_FAILED_TOO_MANY_ATTEMPTS, - USER_ACTION_NEEDED_OAUTH_OUTDATED, - USER_ACTION_NEEDED_ACCOUNT_REMOVED, - USER_ACTION_NEEDED_CHANGE_PASSWORD, - USER_ACTION_NEEDED_PERMISSIONS_CHANGED, - USER_ACTION_NEEDED_CGU_FORM, - CAPTCHA_RESOLUTION_FAILED + getOperationAmountFromBill, + getOperationDateFromBill, + getIdentifiers, + getDateRangeFromBill, + getAmountRangeFromBill, + getTotalReimbursements, + sortedOperations }; /***/ }), -/* 1232 */ +/* 1254 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +const { + getDateRangeFromBill, + getAmountRangeFromBill +} = __webpack_require__(1253); // cozy-stack limit to 100 elements max -const strtok3 = __webpack_require__(1233); -const core = __webpack_require__(1242); -async function fromFile(path) { - const tokenizer = await strtok3.fromFile(path); - try { - return await core.fromTokenizer(tokenizer); - } finally { - await tokenizer.close(); - } -} +const COZY_STACK_QUERY_LIMIT = 100; // Get the operations corresponding to the date interval +// around the date of the bill -const fileType = { - fromFile +const createDateSelector = (bill, options) => { + const { + minDate, + maxDate + } = getDateRangeFromBill(bill, options); + return { + $gt: minDate.toISOString(), + $lt: maxDate.toISOString() + }; +}; // Get the operations corresponding to the date interval +// around the amount of the bill + + +const createAmountSelector = (bill, options) => { + const { + minAmount, + maxAmount + } = getAmountRangeFromBill(bill, options); + return { + $gt: minAmount, + $lt: maxAmount + }; }; -Object.assign(fileType, core); +const getQueryOptions = (bill, options, ids) => { + const queryOptions = { + selector: { + date: createDateSelector(bill, options), + amount: createAmountSelector(bill, options) + }, + sort: [{ + date: 'desc' + }, { + amount: 'desc' + }], + COZY_STACK_QUERY_LIMIT + }; -Object.defineProperty(fileType, 'extensions', { - get() { - return core.extensions; - } -}); + if (ids.length > 0) { + queryOptions.skip = ids.length; + } + + return queryOptions; +}; + +const and = conditions => obj => { + for (let c of conditions) { + if (!c(obj)) { + return false; + } + } + + return true; +}; + +const findByMangoQuerySimple = (docs, query) => { + const selector = query.selector; + const filters = Object.keys(selector).map(attr => doc => { + const attrSel = selector[attr]; + const conditions = Object.keys(attrSel).map($operator => doc => { + const val = doc[attr]; + const selValue = attrSel[$operator]; + + if ($operator == '$gt') { + return val > selValue; + } else if ($operator == '$lt') { + return val < selValue; + } else { + throw new Error(`Unknown operator ${$operator}`); + } + }); + return and(conditions)(doc); + }); + return docs.filter(and(filters)); +}; + +const findNeighboringOperations = async (cozyClient, bill, options, allOperations) => { + const queryOptions = getQueryOptions(bill, options, []); + const neighboringOperations = findByMangoQuerySimple(allOperations, queryOptions); + return neighboringOperations; +}; + +module.exports = { + findByMangoQuerySimple, + findNeighboringOperations +}; + +/***/ }), +/* 1255 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseRest = __webpack_require__(562), + eq = __webpack_require__(397), + isIterateeCall = __webpack_require__(754), + keysIn = __webpack_require__(585); + +/** Used for built-in method references. */ +var objectProto = Object.prototype; + +/** Used to check objects for own properties. */ +var hasOwnProperty = objectProto.hasOwnProperty; + +/** + * Assigns own and inherited enumerable string keyed properties of source + * objects to the destination object for all destination properties that + * resolve to `undefined`. Source objects are applied from left to right. + * Once a property is set, additional values of the same property are ignored. + * + * **Note:** This method mutates `object`. + * + * @static + * @since 0.1.0 + * @memberOf _ + * @category Object + * @param {Object} object The destination object. + * @param {...Object} [sources] The source objects. + * @returns {Object} Returns `object`. + * @see _.defaultsDeep + * @example + * + * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); + * // => { 'a': 1, 'b': 2 } + */ +var defaults = baseRest(function(object, sources) { + object = Object(object); + + var index = -1; + var length = sources.length; + var guard = length > 2 ? sources[2] : undefined; + + if (guard && isIterateeCall(sources[0], sources[1], guard)) { + length = 1; + } + + while (++index < length) { + var source = sources[index]; + var props = keysIn(source); + var propsIndex = -1; + var propsLength = props.length; + + while (++propsIndex < propsLength) { + var key = props[propsIndex]; + var value = object[key]; -Object.defineProperty(fileType, 'mimeTypes', { - get() { - return core.mimeTypes; - } + if (value === undefined || + (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { + object[key] = source[key]; + } + } + } + + return object; }); -module.exports = fileType; +module.exports = defaults; /***/ }), -/* 1233 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromStream = exports.fromBuffer = exports.EndOfStreamError = exports.fromFile = void 0; -const fs = __webpack_require__(1234); -const core = __webpack_require__(1235); -var FileTokenizer_1 = __webpack_require__(1241); -Object.defineProperty(exports, "fromFile", { enumerable: true, get: function () { return FileTokenizer_1.fromFile; } }); -var core_1 = __webpack_require__(1235); -Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return core_1.EndOfStreamError; } }); -Object.defineProperty(exports, "fromBuffer", { enumerable: true, get: function () { return core_1.fromBuffer; } }); -/** - * Construct ReadStreamTokenizer from given Stream. - * Will set fileSize, if provided given Stream has set the .path property. - * @param stream - Node.js Stream.Readable - * @param fileInfo - Pass additional file information to the tokenizer - * @returns Tokenizer - */ -async function fromStream(stream, fileInfo) { - fileInfo = fileInfo ? fileInfo : {}; - if (stream.path) { - const stat = await fs.stat(stream.path); - fileInfo.path = stream.path; - fileInfo.size = stat.size; - } - return core.fromStream(stream, fileInfo); -} -exports.fromStream = fromStream; +module.exports = __webpack_require__( 1257 ).Geco; /***/ }), -/* 1234 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -/** - * Module convert fs functions to promise based functions +/* + * Geco, a CAT (Constant Amortized Time) recursive generator* + * for k-combinations, chosen from a given set S of n elements, + * with and without replacement. + * + * https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order + * + * Copyright(c) 2018-present Guglielmo Ferri <44gatti@gmail.com> + * MIT Licensed */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.readFile = exports.writeFileSync = exports.writeFile = exports.read = exports.open = exports.close = exports.stat = exports.createReadStream = exports.pathExists = void 0; -const fs = __webpack_require__(167); -exports.pathExists = fs.existsSync; -exports.createReadStream = fs.createReadStream; -async function stat(path) { - return new Promise((resolve, reject) => { - fs.stat(path, (err, stats) => { - if (err) - reject(err); - else - resolve(stats); - }); - }); -} -exports.stat = stat; -async function close(fd) { - return new Promise((resolve, reject) => { - fs.close(fd, err => { - if (err) - reject(err); - else - resolve(); - }); - }); -} -exports.close = close; -async function open(path, mode) { - return new Promise((resolve, reject) => { - fs.open(path, mode, (err, fd) => { - if (err) - reject(err); - else - resolve(fd); - }); - }); -} -exports.open = open; -async function read(fd, buffer, offset, length, position) { - return new Promise((resolve, reject) => { - fs.read(fd, buffer, offset, length, position, (err, bytesRead, _buffer) => { - if (err) - reject(err); - else - resolve({ bytesRead, buffer: _buffer }); - }); - }); -} -exports.read = read; -async function writeFile(path, data) { - return new Promise((resolve, reject) => { - fs.writeFile(path, data, err => { - if (err) - reject(err); - else - resolve(); - }); - }); -} -exports.writeFile = writeFile; -function writeFileSync(path, data) { - fs.writeFileSync(path, data); -} -exports.writeFileSync = writeFileSync; -async function readFile(path) { - return new Promise((resolve, reject) => { - fs.readFile(path, (err, buffer) => { - if (err) - reject(err); - else - resolve(buffer); - }); - }); -} -exports.readFile = readFile; + +exports.Geco = Object.assign( __webpack_require__( 1258 ), __webpack_require__( 1261 ) ); /***/ }), -/* 1235 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromBuffer = exports.fromStream = exports.EndOfStreamError = void 0; -const ReadStreamTokenizer_1 = __webpack_require__(1236); -const BufferTokenizer_1 = __webpack_require__(1240); -var peek_readable_1 = __webpack_require__(1238); -Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return peek_readable_1.EndOfStreamError; } }); -/** - * Construct ReadStreamTokenizer from given Stream. - * Will set fileSize, if provided given Stream has set the .path property/ - * @param stream - Read from Node.js Stream.Readable - * @param fileInfo - Pass the file information, like size and MIME-type of the correspnding stream. - * @returns ReadStreamTokenizer - */ -function fromStream(stream, fileInfo) { - fileInfo = fileInfo ? fileInfo : {}; - return new ReadStreamTokenizer_1.ReadStreamTokenizer(stream, fileInfo); -} -exports.fromStream = fromStream; -/** - * Construct ReadStreamTokenizer from given Buffer. - * @param uint8Array - Uint8Array to tokenize - * @param fileInfo - Pass additional file information to the tokenizer - * @returns BufferTokenizer +/* + * Geco, a CAT (Constant Amortized Time) recursive generator* + * for k-combinations, chosen from a given set S of n elements, + * with and without replacement. + * + * https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order + * + * Copyright(c) 2018-present Guglielmo Ferri <44gatti@gmail.com> + * MIT Licensed */ -function fromBuffer(uint8Array, fileInfo) { - return new BufferTokenizer_1.BufferTokenizer(uint8Array, fileInfo); -} -exports.fromBuffer = fromBuffer; - - -/***/ }), -/* 1236 */ -/***/ (function(module, exports, __webpack_require__) { -"use strict"; +module.exports = ( function () { -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ReadStreamTokenizer = void 0; -const AbstractTokenizer_1 = __webpack_require__(1237); -const peek_readable_1 = __webpack_require__(1238); -const maxBufferSize = 256000; -class ReadStreamTokenizer extends AbstractTokenizer_1.AbstractTokenizer { - constructor(stream, fileInfo) { - super(fileInfo); - this.streamReader = new peek_readable_1.StreamReader(stream); - } - /** - * Get file information, an HTTP-client may implement this doing a HEAD request - * @return Promise with file information - */ - async getFileInfo() { - return this.fileInfo; - } - /** - * Read buffer from tokenizer - * @param uint8Array - Target Uint8Array to fill with data read from the tokenizer-stream - * @param options - Read behaviour options - * @returns Promise with number of bytes read - */ - async readBuffer(uint8Array, options) { - const normOptions = this.normalizeOptions(uint8Array, options); - const skipBytes = normOptions.position - this.position; - if (skipBytes > 0) { - await this.ignore(skipBytes); - return this.readBuffer(uint8Array, options); - } - else if (skipBytes < 0) { - throw new Error('`options.position` must be equal or greater than `tokenizer.position`'); - } - if (normOptions.length === 0) { - return 0; - } - const bytesRead = await this.streamReader.read(uint8Array, normOptions.offset, normOptions.length); - this.position += bytesRead; - if ((!options || !options.mayBeLess) && bytesRead < normOptions.length) { - throw new peek_readable_1.EndOfStreamError(); + const balloc = Buffer.alloc + , Toni = __webpack_require__( 1259 ) + ; + return { + // CAT generator for combinations without replacement + get : function ( n, k ) { + if ( ! n || ( n < k ) ) + throw new RangeError( 'check input values' ) + ; + // buffer for generating combinations + const buff = balloc( n, 0 ) + // colex recursive generator + , colex_gen = function *( n, k ) { + if ( n === 0 ) yield buff; + else { + if ( k < n ) { + buff[ n - 1 ] = 0; + yield* colex_gen( n - 1, k ); + } + if ( k > 0 ) { + buff[ n - 1 ] = 1; + yield* colex_gen( n - 1, k - 1 ); + } + } + } + // generating colex order for k <= n/2. + , colex_gen_2 = function *( n, k ) { + if ( k === 0 ) yield buff; + else { + if ( k < n ) { + buff[ n - 1 ] = 0; + yield* colex_gen_2( n - 1, k ); + } + buff[ n - 1 ] = 1; + yield* colex_gen_2( n - 1, k - 1); + buff[ n - 1 ] = 0; + } + } + ; + return ( k > n / 2 ) ? + colex_gen( n , k ) : + colex_gen_2( n, k ) + ; } - return bytesRead; - } - /** - * Peek (read ahead) buffer from tokenizer - * @param uint8Array - Uint8Array (or Buffer) to write data to - * @param options - Read behaviour options - * @returns Promise with number of bytes peeked - */ - async peekBuffer(uint8Array, options) { - const normOptions = this.normalizeOptions(uint8Array, options); - let bytesRead = 0; - if (normOptions.position) { - const skipBytes = normOptions.position - this.position; - if (skipBytes > 0) { - const skipBuffer = new Uint8Array(normOptions.length + skipBytes); - bytesRead = await this.peekBuffer(skipBuffer, { mayBeLess: normOptions.mayBeLess }); - uint8Array.set(skipBuffer.subarray(skipBytes), normOptions.offset); - return bytesRead - skipBytes; - } - else if (skipBytes < 0) { - throw new Error('Cannot peek from a negative offset in a stream'); - } + , get_bm : function ( n, k ) { + if ( ! n || ( n < k ) ) + throw new RangeError( 'check input values' ) + ; + // bitmap for generating combinations + const bmap = Toni( n ) + // colex recursive generator + , colex_gen = function *( n, k ) { + if ( n === 0 ) yield bmap; + else { + if ( k < n ) { + bmap.del( n - 1 ); + yield* colex_gen( n - 1, k ); + } + if ( k > 0 ) { + bmap.add( n - 1 ); + yield* colex_gen( n - 1, k - 1 ); + } + } + } + // generating colex order for k <= n/2. + , colex_gen_2 = function *( n, k ) { + if ( k === 0 ) yield bmap; + else { + if ( k < n ) { + bmap.del( n - 1 ); + yield* colex_gen_2( n - 1, k ); + } + bmap.add( n - 1 ); + yield* colex_gen_2( n - 1, k - 1); + bmap.del( n - 1 ); + } + } + ; + return ( k > n / 2 ) ? + colex_gen( n , k ) : + colex_gen_2( n, k ) + ; } - if (normOptions.length > 0) { - try { - bytesRead = await this.streamReader.peek(uint8Array, normOptions.offset, normOptions.length); - } - catch (err) { - if (options && options.mayBeLess && err instanceof peek_readable_1.EndOfStreamError) { - return 0; + , gen : function *( n, k, set, bitmap ) { + // k should be < n + let list = set || 0 + , llen = list.length + , ok = list && llen && n && ( n >= k ) && ( n <= llen ) + , result, comb, c, bm, b + , iter = null + ; + if ( ! ok ) + throw new RangeError( 'check input values' ) + ; + // iterate on current result + if ( bitmap ) { + // use Toni bitmap + iter = this.get_bm( n, k ); + for ( bm of iter ) { + result = []; + b = 0; + for ( ; b < n; ++b ) + if ( bm.chk( b ) ) result.push( list[ b ] ); + yield result; } - throw err; + return; } - if ((!normOptions.mayBeLess) && bytesRead < normOptions.length) { - throw new peek_readable_1.EndOfStreamError(); + // use a Buffer + iter = this.get( n, k ); + for ( comb of iter ) { + result = []; + c = 0; + for ( ; c < n; ++c ) + if ( comb[ c ] ) result.push( list[ c ] ); + yield result; } } - return bytesRead; - } - async ignore(length) { - // debug(`ignore ${this.position}...${this.position + length - 1}`); - const bufSize = Math.min(maxBufferSize, length); - const buf = new Uint8Array(bufSize); - let totBytesRead = 0; - while (totBytesRead < length) { - const remaining = length - totBytesRead; - const bytesRead = await this.readBuffer(buf, { length: Math.min(bufSize, remaining) }); - if (bytesRead < 0) { - return bytesRead; + // get total number of combinations + , cnt : ( n, k ) => { + let p = [ 1, 1 ] + , c = 0 + ; + for ( ; c < k; ++c ) { + p[ 0 ] *= n - c; + p[ 1 ] *= k - c; } - totBytesRead += bytesRead; + return p[ 0 ] / p[ 1 ]; } - return totBytesRead; } -} -exports.ReadStreamTokenizer = ReadStreamTokenizer; + ; + +} )(); /***/ }), -/* 1237 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +module.exports = __webpack_require__( 1260 ).Toni; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AbstractTokenizer = void 0; -const peek_readable_1 = __webpack_require__(1238); -/** - * Core tokenizer +/***/ }), +/* 1260 */ +/***/ (function(module, exports) { + +/* + * Toni, a simple and efficient bitmap implementation for positive integer sets + * (max 32 bits), with no element repetition, using bitwise operations and a Buffer. + * Modifying a single bit instead of an entire byte, obviously saves 87.5% of Buffer + * space, but it also implies a gain greater than 200% in performances, when it was + * used with big integer ranges. + * + * http://en.wikipedia.org/wiki/Bit_array + * + * Copyright(c) 2014-present Guglielmo Ferri <44gatti@gmail.com> + * MIT Licensed */ -class AbstractTokenizer { - constructor(fileInfo) { - /** - * Tokenizer-stream position - */ - this.position = 0; - this.numBuffer = new Uint8Array(8); - this.fileInfo = fileInfo ? fileInfo : {}; - } - /** - * Read a token from the tokenizer-stream - * @param token - The token to read - * @param position - If provided, the desired position in the tokenizer-stream - * @returns Promise with token data - */ - async readToken(token, position = this.position) { - const uint8Array = Buffer.alloc(token.len); - const len = await this.readBuffer(uint8Array, { position }); - if (len < token.len) - throw new peek_readable_1.EndOfStreamError(); - return token.get(uint8Array, 0); - } - /** - * Peek a token from the tokenizer-stream. - * @param token - Token to peek from the tokenizer-stream. - * @param position - Offset where to begin reading within the file. If position is null, data will be read from the current file position. - * @returns Promise with token data - */ - async peekToken(token, position = this.position) { - const uint8Array = Buffer.alloc(token.len); - const len = await this.peekBuffer(uint8Array, { position }); - if (len < token.len) - throw new peek_readable_1.EndOfStreamError(); - return token.get(uint8Array, 0); - } - /** - * Read a numeric token from the stream - * @param token - Numeric token - * @returns Promise with number - */ - async readNumber(token) { - const len = await this.readBuffer(this.numBuffer, { length: token.len }); - if (len < token.len) - throw new peek_readable_1.EndOfStreamError(); - return token.get(this.numBuffer, 0); - } - /** - * Read a numeric token from the stream - * @param token - Numeric token - * @returns Promise with number - */ - async peekNumber(token) { - const len = await this.peekBuffer(this.numBuffer, { length: token.len }); - if (len < token.len) - throw new peek_readable_1.EndOfStreamError(); - return token.get(this.numBuffer, 0); - } - /** - * Ignore number of bytes, advances the pointer in under tokenizer-stream. - * @param length - Number of bytes to ignore - * @return resolves the number of bytes ignored, equals length if this available, otherwise the number of bytes available - */ - async ignore(length) { - if (this.fileInfo.size !== undefined) { - const bytesLeft = this.fileInfo.size - this.position; - if (length > bytesLeft) { - this.position += bytesLeft; - return bytesLeft; - } + +exports.Toni = ( function () { + var log = console.log + , abs = Math.abs + , ceil = Math.ceil + , max = Math.max + , min = Math.min + // table of powers + , bpower = new Buffer( [ 128, 64, 32, 16, 8, 4, 2, 1 ] ) + // count the number of bits set to 1 for every 1-byte number + , cbits = function ( b ) { + // divide et impera method for 8 bits + var v = b - ( ( b >>> 1 ) & 0x55 ); + v = ( v & 0x33 ) + ( ( v >>> 2 ) & 0x33 ); + return v + ( v >>> 4 ) & 0x0f; } - this.position += length; - return length; - } - async close() { - // empty - } - normalizeOptions(uint8Array, options) { - if (options && options.position !== undefined && options.position < this.position) { - throw new Error('`options.position` must be equal or greater than `tokenizer.position`'); + , bctable = ( function () { + var i = 0 + , table = new Buffer( 256 ) + , v = -1 + ; + for ( ; i < 256; ++i ) table[ i ] = cbits( i ); + return table; + } )() + , Toni = function ( range ) { + var me = this + , is = me instanceof Toni + ; + if ( ! is ) return new Toni( range ); + // limit range to 4 bytes, (32 bits numbers) using >>> 0 + var r = ( abs( + range ) >>> 0 ) || 1 + , bytes = max( ceil( r / 8 ), 1 ) + , bitmap = new Buffer( bytes ) + ; + bitmap.fill( 0x00 ); + me.bitmap = bitmap; + // bytes needed + me.bmlen = bytes << 3 >>> 0; + me.items = 0; + me.range = r; + // bit count table for 1 byte + me.bctable = bctable; } - if (options) { - return { - mayBeLess: options.mayBeLess === true, - offset: options.offset ? options.offset : 0, - length: options.length ? options.length : (uint8Array.length - (options.offset ? options.offset : 0)), - position: options.position ? options.position : this.position - }; + , tproto = Toni.prototype + ; + + tproto.clear = function () { + var me = this + ; + me.bitmap.fill( 0x00 ); + me.items = 0; + return me; + }; + + tproto.add = function ( value ) { + var me = this + , v = abs( value ) + , bitmap = me.bitmap + , range = me.range + ; + // check value range + if ( ( v >= me.bmlen ) || ( v >= range ) ) return -1; + /* + * generally, bucket and mask could be calculated respectively as floor( v / 8 ) + * and bpower[ v % 8 ], but seen that values > 2^32 are not allowed, then we can + * speed up things using bitwise shiftings. + */ + var buck = v >>> 3 + , mask = bpower[ v & 7 ] + , up = mask & bitmap[ buck ] + ; + return up ? -1 : ++me.items | ( bitmap[ buck ] |= mask ); + }; + + // get/access the bit at a given index i, b = B[i] + tproto.chk = function ( value ) { + var me = this + , v = abs( value ) + , range = me.range + ; + // check value range + if ( ( me.bmlen <= v ) || ( v >= range ) ) return 0; + // see #add + return bpower[ v & 7 ] & me.bitmap[ v >>> 3 ] ? 1 : 0; + }; + + tproto.del = function ( value ) { + var me = this + , v = value + , range = me.range + , bitmap = me.bitmap + ; + // check value range + if ( ( me.bmlen <= v ) || ( v >= range ) ) return -1; + + var buck = v >>> 3 + , mask = bpower[ v & 7 ] + , up = mask & bitmap[ buck ] + ; + return up ? --me.items | ( bitmap[ buck ] ^= mask ) : -1; + }; + + // it returns the occurrences of bit 1 until index i + tproto.rank = function ( i ) { + var me = this + , bitmap = me.bitmap + , bmlen = me.bmlen + , buck = null + , boff = -1 + , bshift = -1 + , b = 0 + , bcnt = 0 + , index = min( i >>> 0, me.bmlen ) + ; + if ( index > bmlen ) return -1; + // last bucket to count with btable + buck = index >>> 3; + // bits remaining to count + boff = 1 + ( index - ( buck << 3 ) ); + bshift = 8 - boff; + + if ( buck ) { + // log( ' - bytes to count: %d', buck ); + for ( b = 0; b < buck ; ++b ) + bcnt += bctable[ bitmap[ b ] ]; } - return { - mayBeLess: false, - offset: 0, - length: uint8Array.length, - position: this.position - }; - } -} -exports.AbstractTokenizer = AbstractTokenizer; + bcnt += bctable[ bitmap[ b ] >>> bshift ]; + return bcnt; + }; + + // it returns the position of the i-th occurrence of bit 1 + // tproto.select = function ( index ) { + // var me = this + // ; + // return; + // }; + + return Toni; +} )(); /***/ }), -/* 1238 */ -/***/ (function(module, exports, __webpack_require__) { +/* 1261 */ +/***/ (function(module, exports) { -"use strict"; +/* + * Geco, a CAT (Constant Amortized Time) recursive generator* + * for k-combinations, chosen from a given set S of n elements, + * with and without replacement. + * + * https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order + * + * Copyright(c) 2018-present Guglielmo Ferri <44gatti@gmail.com> + * MIT Licensed + */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.StreamReader = exports.EndOfStreamError = void 0; -const EndOfFileStream_1 = __webpack_require__(1239); -var EndOfFileStream_2 = __webpack_require__(1239); -Object.defineProperty(exports, "EndOfStreamError", { enumerable: true, get: function () { return EndOfFileStream_2.EndOfStreamError; } }); -class Deferred { - constructor() { - this.resolve = () => null; - this.reject = () => null; - this.promise = new Promise((resolve, reject) => { - this.reject = reject; - this.resolve = resolve; - }); - } -} -const maxStreamReadSize = 1 * 1024 * 1024; // Maximum request length on read-stream operation -class StreamReader { - constructor(s) { - this.s = s; - /** - * Deferred read request - */ - this.request = null; - this.endOfStream = false; - /** - * Store peeked data - * @type {Array} - */ - this.peekQueue = []; - if (!s.read || !s.once) { - throw new Error('Expected an instance of stream.Readable'); - } - this.s.once('end', () => this.reject(new EndOfFileStream_1.EndOfStreamError())); - this.s.once('error', err => this.reject(err)); - this.s.once('close', () => this.reject(new Error('Stream closed'))); - } - /** - * Read ahead (peek) from stream. Subsequent read or peeks will return the same data - * @param uint8Array - Uint8Array (or Buffer) to store data read from stream in - * @param offset - Offset target - * @param length - Number of bytes to read - * @returns Number of bytes peeked - */ - async peek(uint8Array, offset, length) { - const bytesRead = await this.read(uint8Array, offset, length); - this.peekQueue.push(uint8Array.subarray(offset, offset + bytesRead)); // Put read data back to peek buffer - return bytesRead; - } - /** - * Read chunk from stream - * @param buffer - Target Uint8Array (or Buffer) to store data read from stream in - * @param offset - Offset target - * @param length - Number of bytes to read - * @returns Number of bytes read - */ - async read(buffer, offset, length) { - if (length === 0) { - return 0; - } - if (this.peekQueue.length === 0 && this.endOfStream) { - throw new EndOfFileStream_1.EndOfStreamError(); - } - let remaining = length; - let bytesRead = 0; - // consume peeked data first - while (this.peekQueue.length > 0 && remaining > 0) { - const peekData = this.peekQueue.pop(); // Front of queue - if (!peekData) - throw new Error('peekData should be defined'); - const lenCopy = Math.min(peekData.length, remaining); - buffer.set(peekData.subarray(0, lenCopy), offset + bytesRead); - bytesRead += lenCopy; - remaining -= lenCopy; - if (lenCopy < peekData.length) { - // remainder back to queue - this.peekQueue.push(peekData.subarray(lenCopy)); - } - } - // continue reading from stream if required - while (remaining > 0 && !this.endOfStream) { - const reqLen = Math.min(remaining, maxStreamReadSize); - const chunkLen = await this._read(buffer, offset + bytesRead, reqLen); - bytesRead += chunkLen; - if (chunkLen < reqLen) - break; - remaining -= chunkLen; - } - return bytesRead; - } - /** - * Read chunk from stream - * @param buffer Target Uint8Array (or Buffer) to store data read from stream in - * @param offset Offset target - * @param length Number of bytes to read - * @returns Number of bytes read - */ - async _read(buffer, offset, length) { - if (this.request) - throw new Error('Concurrent read operation?'); - const readBuffer = this.s.read(length); - if (readBuffer) { - buffer.set(readBuffer, offset); - return readBuffer.length; +module.exports = ( function () { + + const balloc = Buffer.alloc + , bfrom = Buffer.from + , isBuffer = Buffer.isBuffer + , isInteger = Number.isInteger + , mgen = function ( k, v, rep ) { + const rlen = rep.length + // get the total number of elements + , total = ( () => { + let [ i, t ] = [ 1, rep[ 0 ] ]; + if ( rlen > 1 ) + for ( ; i < rlen; ++i ) t += rep[ i ]; + return t; + } )() + // choose the correct fn + , up = k > total >> 1 + // init the correct gen buffer ( v === rlen ), for k > n/2, k <= 2 + , buff = up ? bfrom( rep ) : balloc( v, 0 ) + // k <= n/2, TODO k > n/2 + , colex_gen = function *( k, v, tot ) { + if ( k === 0 ) yield buff; + else { + let c = v - 1 + , occ = rep[ c ] + , r = tot - occ + , l = k > r ? k - r : 0 + , m = occ < k ? occ : k + ; + for ( ; l <= m; ++l ) { + buff[ c ] = l; + yield* colex_gen( k - l, c, r ); + buff[ c ] = 0; + } + } + } + ; + // check k range + if ( k >= total ) new RangeError( 'k value should be lesser than total elements' ); + return colex_gen( k, v, total ) + ; } - else { - this.request = { - buffer, - offset, - length, - deferred: new Deferred() - }; - this.s.once('readable', () => { - this.tryRead(); - }); - return this.request.deferred.promise; + ; + return { + mget : function ( k, v, rep ) { + let rlen = -1 + , b = -1 + , read = null + , write = null + // get the total number of elements + , total = -1 + , ok = k && v && rep + ; + if ( ! ok ) return new RangeError( 'missing or wrong input values' ); + // check repetitions type + if ( isBuffer( rep ) && ( rlen = rep.length ) ) { + b = rlen / v; + if ( b === 1 ) return mgen( k, v, rep ); + if ( ( b !== 2 ) && ( b !== 4 ) ) + return new RangeError( 'repetitions buffer length should be a multiple of v' ); + // set the correct read/write fn, only 4, 2, 1 bytes are allowed + [ read, write ] = [ `readUInt${ b << 3 }BE`, `writeUInt${ b << 3 }BE` ]; + // get the total number of elements + total = ( () => { + let [ i, t ] = [ b, rep[ read ]( 0 ) ]; + if ( rlen > b ) + for ( ; i < rlen; i += b ) t += rep[ read ]( i ); + return t; + } )(); + } else if ( isInteger( rep ) ) { + // use rep value as default repetitions for every value, build a buffer accordingly + if ( rep < 257 ) return mgen( k, v, balloc( v, rep ) ); + if ( rep < 65537 ) b = 2; + else if ( rep < 4294967297 ) b = 4; + else return new RangeError( 'repetitions should be < 2^32 + 1' ); + rlen = v << ( b >>> 1 ); + total = v * rep; + // set the correct read/write fn, only 4, 2, 1 bytes are allowed + [ read, write ] = [ `readUInt${ b << 3 }BE`, `writeUInt${ b << 3 }BE` ]; + rep = balloc( rlen ); + // fill the reference buffer of repetitions with v identical values + for ( let i = 0; i < rlen; i += b ) rep[ write ]( v ); + } else return new RangeError( 'repetitions should be represented as: a buffer or an integer' ); + // check k range + if ( k >= total ) new RangeError( 'k should be lesser than the total sum of repetitions' ); + // choose the correct colex fn + let up = k > total >> 1 + // init the correct gen buffer, for k > n/2, k <= 2 + , buff = up ? bfrom( rep ) : balloc( rlen, 0 ) + // k <= n/2, TODO k > n/2 + , colex_gen = function *( k, v, tot ) { + if ( k === 0 ) yield buff; + else { + let c = v - 1 + , occ = rep[ read ]( c * b ) + , r = tot - occ + , l = k > r ? k - r : 0 + , m = occ < k ? occ : k + ; + for ( ; l <= m; ++l ) { + buff[ write ]( l, c * b ); + yield* colex_gen( k - l, c, r ); + buff[ write ]( 0, c * b ); + } + } + } + ; + return colex_gen( k, v, total ) + ; } + } - tryRead() { - if (!this.request) - throw new Error('this.request should be defined'); - const readBuffer = this.s.read(this.request.length); - if (readBuffer) { - this.request.buffer.set(readBuffer, this.request.offset); - this.request.deferred.resolve(readBuffer.length); - this.request = null; - } - else { - this.s.once('readable', () => { - this.tryRead(); - }); - } + ; + +} )(); + + +/***/ }), +/* 1262 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * Provides an handy method to log the user in, + * on HTML form pages. On success, it resolves to a promise with a parsed body. + * + * @module signin + */ +const errors = __webpack_require__(1228); + +const rerrors = __webpack_require__(1263); + +const log = __webpack_require__(2).namespace('cozy-konnector-libs'); + +const requestFactory = __webpack_require__(22); + +const cheerio = __webpack_require__(275); +/** + * Provides an handy method to log the user in, + * on HTML form pages. On success, it resolves to a promise with a parsed body. + * + * Errors: + * + * - LOGIN_FAILED if the validate predicate is false + * - INVALID_FORM if the element matched by `formSelector` is not a form or has + * no `action` attribute + * - UNKNOWN_PARSING_STRATEGY if `parse` is not one of the accepted values: + * `raw`, `cheerio`, `json`. + * - VENDOR_DOWN if a request throws a RequestError, or StatusCodeError + * + * It does not submit values provided through `select` tags, except if populated + * by user with `formData`. + * + * - `url` is the url to access the html form + * + * - `formSelector` is used by cheerio to uniquely identify the form in which to + * log in + * + * - `formData` is an object `{ name: value, … }`. It is used to populate the + * form, in the proper inputs with the same name as the properties of this + * object, before submitting it. It can also be a function that returns this + * object. The page at `url` would be given as argument, right after having + * been parsed through `cheerio`. + * + * - `parse` allow the user to resolve `signin` with a preparsed body. The + * choice of the strategy for the parsing is one of : `raw`, `json` or + * `cheerio`. `cheerio` being the default. + * + * - `validate` is a predicate taking three arguments `statusCode`, `parsedBody` and `fullResponse`. + * If it is false, `LOGIN_FAILED` is thrown, otherwise the + * signin resolves with `parsedBody` value. + * + * - `requestOpts` allows to pass eventual options to the `signin`'s + * `requestFactory`. It could be useful for pages using `latin1` `encoding` + * for instance. + * + * @example + * == basic example : == + * ```javascript + * const $ = signin({ + * url: `http://quotes.toscrape.com/login`, + * formSelector: 'form', + * formData: { username, password } + * }) + * ``` + * If the behavior of the targeted website is not standard. You can pass a validate function which + * will allow you to: + * - detect if the credentials work or not -> LOGIN_FAILED + * - detect if actions from the user are needed -> USER_ACTION_NEEDED + * - detect if the targeted website is out -> VENDOR_DOWN + * @example + * ```javascript + * const $ = signin({ + * url: `http://quotes.toscrape.com/login`, + * formSelector: 'form', + * formData: { username, password }, + * validate: (statusCode, $, fullResponse) { + * if (statusCode !== 200) return false // LOGIN_FAILED + * if ($('.cgu').length) throw new Error('USER_ACTION_NEEDED') + * if (fullResponse.request.uri.href.includes('error')) throw new Error('VENDOR_DOWN') + * } + * }) + * ``` + * + * Do not forget that the use of the signin function is not mandatory in a connector and won't work + * if the signin page does not use html forms. Here, a simple POST request may be a lot more + * simple. + * @alias module:signin + */ + + +function signin({ + url, + formSelector, + formData = {}, + parse = 'cheerio', + validate = defaultValidate, + ...requestOpts +} = {}) { + // Check for mandatory arguments + if (url === undefined) { + throw new Error('signin: `url` must be defined'); + } + + if (formSelector === undefined) { + throw new Error('signin: `formSelector` must be defined'); + } + + const rq = requestOpts.requestInstance || requestFactory({ + jar: true, + json: false, + ...requestOpts + }); + const parseBody = getStrategy(parse); + return rq({ + uri: url, + transform: body => cheerio.load(body) + }).catch(handleRequestErrors).then($ => { + const data = typeof formData === 'function' ? formData($) : formData; + const [action, inputs] = parseForm($, formSelector, url); + + for (let name in data) { + inputs[name] = data[name]; } - reject(err) { - this.endOfStream = true; - if (this.request) { - this.request.deferred.reject(err); - this.request = null; - } + + return submitForm(rq, __webpack_require__(83).resolve(url, action), inputs, parseBody, url); + }).then(([statusCode, parsedBody, fullResponse]) => { + if (!validate(statusCode, parsedBody, fullResponse)) { + throw new Error(errors.LOGIN_FAILED); + } else { + return Promise.resolve(parsedBody); } + }); } -exports.StreamReader = StreamReader; +function defaultValidate(statusCode) { + return statusCode === 200; +} -/***/ }), -/* 1239 */ -/***/ (function(module, exports, __webpack_require__) { +function getStrategy(parseStrategy) { + switch (parseStrategy) { + case 'cheerio': + return cheerio.load; -"use strict"; + case 'json': + return JSON.parse; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EndOfStreamError = exports.defaultMessages = void 0; -exports.defaultMessages = 'End-Of-Stream'; -/** - * Thrown on read operation of the end of file or stream has been reached - */ -class EndOfStreamError extends Error { - constructor() { - super(exports.defaultMessages); - } + case 'raw': + return body => body; + + default: + { + const err = `signin: parsing strategy \`${parseStrategy}\` unknown. `; + const hint = 'Use one of `raw`, `cheerio` or `json`'; + log('error', err + hint); + throw new Error('UNKNOWN_PARSING_STRATEGY'); + } + } } -exports.EndOfStreamError = EndOfStreamError; +function parseForm($, formSelector, currentUrl) { + const form = $(formSelector).first(); + const action = form.attr('action') || currentUrl; -/***/ }), -/* 1240 */ -/***/ (function(module, exports, __webpack_require__) { + if (!form.is('form')) { + const err = 'element matching `' + formSelector + '` is not a `form`'; + log('error', err); + throw new Error('INVALID_FORM'); + } -"use strict"; + const inputs = {}; + const arr = form.serializeArray(); -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BufferTokenizer = void 0; -const peek_readable_1 = __webpack_require__(1238); -const AbstractTokenizer_1 = __webpack_require__(1237); -class BufferTokenizer extends AbstractTokenizer_1.AbstractTokenizer { - /** - * Construct BufferTokenizer - * @param uint8Array - Uint8Array to tokenize - * @param fileInfo - Pass additional file information to the tokenizer - */ - constructor(uint8Array, fileInfo) { - super(fileInfo); - this.uint8Array = uint8Array; - this.fileInfo.size = this.fileInfo.size ? this.fileInfo.size : uint8Array.length; - } - /** - * Read buffer from tokenizer - * @param uint8Array - Uint8Array to tokenize - * @param options - Read behaviour options - * @returns {Promise<number>} - */ - async readBuffer(uint8Array, options) { - if (options && options.position) { - if (options.position < this.position) { - throw new Error('`options.position` must be equal or greater than `tokenizer.position`'); - } - this.position = options.position; - } - const bytesRead = await this.peekBuffer(uint8Array, options); - this.position += bytesRead; - return bytesRead; - } - /** - * Peek (read ahead) buffer from tokenizer - * @param uint8Array - * @param options - Read behaviour options - * @returns {Promise<number>} - */ - async peekBuffer(uint8Array, options) { - const normOptions = this.normalizeOptions(uint8Array, options); - const bytes2read = Math.min(this.uint8Array.length - normOptions.position, normOptions.length); - if ((!normOptions.mayBeLess) && bytes2read < normOptions.length) { - throw new peek_readable_1.EndOfStreamError(); - } - else { - uint8Array.set(this.uint8Array.subarray(normOptions.position, normOptions.position + bytes2read), normOptions.offset); - return bytes2read; - } - } - async close() { - // empty + for (let input of arr) { + inputs[input.name] = input.value; + } + + return [action, inputs]; +} + +function submitForm(rq, uri, inputs, parseBody, referer) { + return rq({ + uri: uri, + method: 'POST', + form: { ...inputs + }, + transform: (body, response) => [response.statusCode, parseBody(body), response], + headers: { + Referer: referer } + }).catch(handleRequestErrors); +} + +function handleRequestErrors(err) { + if (err instanceof rerrors.RequestError || err instanceof rerrors.StatusCodeError) { + log('error', err); + throw new Error(errors.VENDOR_DOWN); + } else { + return Promise.reject(err); + } } -exports.BufferTokenizer = BufferTokenizer; +module.exports = signin; /***/ }), -/* 1241 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.fromFile = exports.FileTokenizer = void 0; -const AbstractTokenizer_1 = __webpack_require__(1237); -const peek_readable_1 = __webpack_require__(1238); -const fs = __webpack_require__(1234); -class FileTokenizer extends AbstractTokenizer_1.AbstractTokenizer { - constructor(fd, fileInfo) { - super(fileInfo); - this.fd = fd; - } - /** - * Read buffer from file - * @param uint8Array - Uint8Array to write result to - * @param options - Read behaviour options - * @returns Promise number of bytes read - */ - async readBuffer(uint8Array, options) { - const normOptions = this.normalizeOptions(uint8Array, options); - this.position = normOptions.position; - const res = await fs.read(this.fd, uint8Array, normOptions.offset, normOptions.length, normOptions.position); - this.position += res.bytesRead; - if (res.bytesRead < normOptions.length && (!options || !options.mayBeLess)) { - throw new peek_readable_1.EndOfStreamError(); - } - return res.bytesRead; - } - /** - * Peek buffer from file - * @param uint8Array - Uint8Array (or Buffer) to write data to - * @param options - Read behaviour options - * @returns Promise number of bytes read - */ - async peekBuffer(uint8Array, options) { - const normOptions = this.normalizeOptions(uint8Array, options); - const res = await fs.read(this.fd, uint8Array, normOptions.offset, normOptions.length, normOptions.position); - if ((!normOptions.mayBeLess) && res.bytesRead < normOptions.length) { - throw new peek_readable_1.EndOfStreamError(); - } - return res.bytesRead; - } - async close() { - return fs.close(this.fd); - } -} -exports.FileTokenizer = FileTokenizer; -async function fromFile(sourceFilePath) { - const stat = await fs.stat(sourceFilePath); - if (!stat.isFile) { - throw new Error(`File not a file: ${sourceFilePath}`); - } - const fd = await fs.open(sourceFilePath, 'r'); - return new FileTokenizer(fd, { path: sourceFilePath, size: stat.size }); -} -exports.fromFile = fromFile; + +module.exports = __webpack_require__(1264); /***/ }), -/* 1242 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const Token = __webpack_require__(1243); -const strtok3 = __webpack_require__(1235); -const { - stringToBytes, - tarHeaderChecksumMatches, - uint32SyncSafeToken -} = __webpack_require__(1245); -const supported = __webpack_require__(1246); - -const minimumBytes = 4100; // A fair amount of file-types are detectable within this range - -async function fromStream(stream) { - const tokenizer = await strtok3.fromStream(stream); - try { - return await fromTokenizer(tokenizer); - } finally { - await tokenizer.close(); - } -} -async function fromBuffer(input) { - if (!(input instanceof Uint8Array || input instanceof ArrayBuffer || Buffer.isBuffer(input))) { - throw new TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`Buffer\` or \`ArrayBuffer\`, got \`${typeof input}\``); - } +module.exports = __webpack_require__(64); - const buffer = input instanceof Buffer ? input : Buffer.from(input); - if (!(buffer && buffer.length > 1)) { - return; - } +/***/ }), +/* 1265 */ +/***/ (function(module, exports, __webpack_require__) { - const tokenizer = strtok3.fromBuffer(buffer); - return fromTokenizer(tokenizer); -} +/** + * Creates or updates the given entries according to if they already + * exist in the cozy or not + * + * @module updateOrCreate + */ +const bluebird = __webpack_require__(25); -function _check(buffer, headers, options) { - options = { - offset: 0, - ...options - }; +const log = __webpack_require__(2).namespace('updateOrCreate'); - for (const [index, header] of headers.entries()) { - // If a bitmask is set - if (options.mask) { - // If header doesn't equal `buf` with bits masked off - if (header !== (options.mask[index] & buffer[index + options.offset])) { - return false; - } - } else if (header !== buffer[index + options.offset]) { - return false; - } - } +const cozy = __webpack_require__(485); - return true; -} +const get = __webpack_require__(370); -async function fromTokenizer(tokenizer) { - try { - return _fromTokenizer(tokenizer); - } catch (error) { - if (!(error instanceof strtok3.EndOfStreamError)) { - throw error; - } - } -} +const { + getCozyMetadata +} = __webpack_require__(833); +/** + * Creates or updates the given entries according to if they already + * exist in the cozy or not + * + * You need the full permission for the given doctype in your manifest, to be able to + * use this function. + * + * `entries` (object array): Documents to save + * `doctype` (string): Doctype of the documents + * `matchingAttributes` (string array): attributes in each entry used to check if an entry already exists in the Cozy + * `options` (object): general option affecting metadata : + * + `sourceAccount` (String): id of the source account + * + `sourceAccountIdentifier` (String): identifier unique to the account targetted by the connector. It is the login most of the time + * + * @alias module:updateOrCreate + */ -async function _fromTokenizer(tokenizer) { - let buffer = Buffer.alloc(minimumBytes); - const bytesRead = 12; - const check = (header, options) => _check(buffer, header, options); - const checkString = (header, options) => check(stringToBytes(header), options); - // Keep reading until EOF if the file size is unknown. - if (!tokenizer.fileInfo.size) { - tokenizer.fileInfo.size = Number.MAX_SAFE_INTEGER; - } +const updateOrCreate = (entries = [], doctype, matchingAttributes = [], options = {}) => { + return cozy.data.findAll(doctype).then(existings => bluebird.mapSeries(entries, entry => { + const metaEntry = { + cozyMetadata: getCozyMetadata({ ...entry.cozyMetadata, + sourceAccount: options.sourceAccount, + sourceAccountIdentifier: options.sourceAccountIdentifier + }), + ...entry + }; // try to find a corresponding existing element - await tokenizer.peekBuffer(buffer, {length: bytesRead, mayBeLess: true}); + const toUpdate = existings.find(doc => matchingAttributes.reduce((isMatching, matchingAttribute) => isMatching && get(doc, matchingAttribute) === get(metaEntry, matchingAttribute), true)); - // -- 2-byte signatures -- + if (toUpdate) { + log('debug', 'updating'); + if (toUpdate.cozyMetadata) metaEntry.cozyMetadata.createdAt = toUpdate.cozyMetadata.createdAt; + return cozy.data.updateAttributes(doctype, toUpdate._id, metaEntry); + } else { + log('debug', 'creating'); + return cozy.data.create(doctype, metaEntry); + } + })); +}; - if (check([0x42, 0x4D])) { - return { - ext: 'bmp', - mime: 'image/bmp' - }; - } +module.exports = updateOrCreate; - if (check([0x0B, 0x77])) { - return { - ext: 'ac3', - mime: 'audio/vnd.dolby.dd-raw' - }; - } +/***/ }), +/* 1266 */ +/***/ (function(module, exports, __webpack_require__) { - if (check([0x78, 0x01])) { - return { - ext: 'dmg', - mime: 'application/x-apple-diskimage' - }; - } +/** + * Helper to set or merge io.cozy.identities + * See https://github.com/cozy/cozy-doctypes/blob/master/docs/io.cozy.identities.md + * + * @module saveIdentity + */ +const log = __webpack_require__(2).namespace('saveIdentity'); - if (check([0x4D, 0x5A])) { - return { - ext: 'exe', - mime: 'application/x-msdownload' - }; - } +const updateOrCreate = __webpack_require__(1265); +/** + * Set or merge a io.cozy.identities + * + * You need full permission for the doctype io.cozy.identities in your + * manifest, to be able to use this function. + * + * Parameters: + * + * `contact` (object): the identity to create/update as an object io.cozy.contacts + * `accountIdentifier` (string): a string that represent the account use, if available fields.login + * `options` (object): options which will be given to updateOrCreate directly : + * + `sourceAccount` (String): id of the source account + * + `sourceAccountIdentifier` (String): identifier unique to the account targetted by the connector. It is the login most of the time + * + * + * ```javascript + * const { saveIdentity } = require('cozy-konnector-libs') + * const identity = + * { + * name: 'toto', + * email: { 'address': 'toto@example.com' } + * } + * + * return saveIdentity(identity, fields.login) + * ``` + * + * @alias module:saveIdentity + */ - if (check([0x25, 0x21])) { - await tokenizer.peekBuffer(buffer, {length: 24, mayBeLess: true}); - if (checkString('PS-Adobe-', {offset: 2}) && - checkString(' EPSF-', {offset: 14})) { - return { - ext: 'eps', - mime: 'application/eps' - }; - } +const saveIdentity = async (contact, accountIdentifier, options = {}) => { + log('debug', 'saving user identity'); - return { - ext: 'ps', - mime: 'application/postscript' - }; - } + if (accountIdentifier == null) { + log('warn', "Can't set identity as no accountIdentifier was provided"); + return; + } - if ( - check([0x1F, 0xA0]) || - check([0x1F, 0x9D]) - ) { - return { - ext: 'Z', - mime: 'application/x-compress' - }; - } + if (contact == null) { + log('warn', "Can't set identity as no contact was provided"); + return; + } // Format contact if needed - // -- 3-byte signatures -- - if (check([0xFF, 0xD8, 0xFF])) { - return { - ext: 'jpg', - mime: 'image/jpeg' - }; - } + if (contact.phone) { + contact.phone = formatPhone(contact.phone); + } - if (check([0x49, 0x49, 0xBC])) { - return { - ext: 'jxr', - mime: 'image/vnd.ms-photo' - }; - } + if (contact.address) { + contact.address = formatAddress(contact.address); + } - if (check([0x1F, 0x8B, 0x8])) { - return { - ext: 'gz', - mime: 'application/gzip' - }; - } + const identity = { + identifier: accountIdentifier, + contact + }; + await updateOrCreate([identity], 'io.cozy.identities', ['identifier', 'cozyMetadata.createdByApp'], { ...options, + sourceAccountIdentifier: accountIdentifier + }); + return; +}; +/* Remove html and cariage return in address + */ - if (check([0x42, 0x5A, 0x68])) { - return { - ext: 'bz2', - mime: 'application/x-bzip2' - }; - } - if (checkString('ID3')) { - await tokenizer.ignore(6); // Skip ID3 header until the header size - const id3HeaderLen = await tokenizer.readToken(uint32SyncSafeToken); - if (tokenizer.position + id3HeaderLen > tokenizer.fileInfo.size) { - // Guess file type based on ID3 header for backward compatibility - return { - ext: 'mp3', - mime: 'audio/mpeg' - }; - } +function formatAddress(address) { + for (const element of address) { + if (element.formattedAddress) { + element.formattedAddress = element.formattedAddress.replace(/<[^>]*>/g, '') // Remove all html Tag + .replace(/\r\n|[\n\r]/g, ' '); // Remove all kind of return character - await tokenizer.ignore(id3HeaderLen); - return fromTokenizer(tokenizer); // Skip ID3 header, recursion - } + address[address.indexOf(element)] = element; + } + } - // Musepack, SV7 - if (checkString('MP+')) { - return { - ext: 'mpc', - mime: 'audio/x-musepack' - }; - } + return address; +} +/* Replace all characters in a phone number except '+' or digits + */ - if ( - (buffer[0] === 0x43 || buffer[0] === 0x46) && - check([0x57, 0x53], {offset: 1}) - ) { - return { - ext: 'swf', - mime: 'application/x-shockwave-flash' - }; - } - // -- 4-byte signatures -- +function formatPhone(phone) { + for (const element of phone) { + if (element.number) { + element.number = element.number.replace(/[^\d.+]/g, ''); + phone[phone.indexOf(element)] = element; + } + } - if (check([0x47, 0x49, 0x46])) { - return { - ext: 'gif', - mime: 'image/gif' - }; - } + return phone; +} - if (checkString('FLIF')) { - return { - ext: 'flif', - mime: 'image/flif' - }; - } +module.exports = saveIdentity; - if (checkString('8BPS')) { - return { - ext: 'psd', - mime: 'image/vnd.adobe.photoshop' - }; - } +/***/ }), +/* 1267 */ +/***/ (function(module, exports, __webpack_require__) { - if (checkString('WEBP', {offset: 8})) { - return { - ext: 'webp', - mime: 'image/webp' - }; - } +/* global __APP_VERSION__ */ +const log = __webpack_require__(2); - // Musepack, SV8 - if (checkString('MPCK')) { - return { - ext: 'mpc', - mime: 'audio/x-musepack' - }; - } +const Raven = __webpack_require__(1268); - if (checkString('FORM')) { - return { - ext: 'aif', - mime: 'audio/aiff' - }; - } +const { + getDomain, + getInstance +} = __webpack_require__(1296); - if (checkString('icns', {offset: 0})) { - return { - ext: 'icns', - mime: 'image/icns' - }; - } +let isRavenConfigured = false; +const ENV_DEV = 'development'; +const ENV_SELF = 'selfhost'; +const ENV_PROD = 'production'; +const domainToEnv = { + 'cozy.tools': ENV_DEV, + 'cozy.works': ENV_DEV, + 'cozy.rocks': ENV_PROD, + 'mycozy.cloud': ENV_PROD +}; - // Zip-based file formats - // Need to be before the `zip` check - if (check([0x50, 0x4B, 0x3, 0x4])) { // Local file header signature - try { - while (tokenizer.position + 30 < tokenizer.fileInfo.size) { - await tokenizer.readBuffer(buffer, {length: 30}); +const getEnvironmentFromDomain = domain => { + return domainToEnv[domain] || ENV_SELF; +}; // Available in Projet > Settings > Client Keys +// Example : https://5f94cb7772deadbeef123456:39e4e34fdeadbeef123456a9ae31caba74c@sentry.cozycloud.cc/12 - // https://en.wikipedia.org/wiki/Zip_(file_format)#File_headers - const zipHeader = { - compressedSize: buffer.readUInt32LE(18), - uncompressedSize: buffer.readUInt32LE(22), - filenameLength: buffer.readUInt16LE(26), - extraFieldLength: buffer.readUInt16LE(28) - }; - zipHeader.filename = await tokenizer.readToken(new Token.StringType(zipHeader.filenameLength, 'utf-8')); - await tokenizer.ignore(zipHeader.extraFieldLength); +const SENTRY_DSN = process.env.SENTRY_DSN; - // Assumes signed `.xpi` from addons.mozilla.org - if (zipHeader.filename === 'META-INF/mozilla.rsa') { - return { - ext: 'xpi', - mime: 'application/x-xpinstall' - }; - } +const afterFatalError = function (_err, sendErr, eventId) { + if (!sendErr) { + log('debug', 'Successfully sent fatal error with eventId ' + eventId + ' to Sentry'); + } - if (zipHeader.filename.endsWith('.rels') || zipHeader.filename.endsWith('.xml')) { - const type = zipHeader.filename.split('/')[0]; - switch (type) { - case '_rels': - break; - case 'word': - return { - ext: 'docx', - mime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' - }; - case 'ppt': - return { - ext: 'pptx', - mime: 'application/vnd.openxmlformats-officedocument.presentationml.presentation' - }; - case 'xl': - return { - ext: 'xlsx', - mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' - }; - default: - break; - } - } + process.exit(1); +}; - if (zipHeader.filename.startsWith('xl/')) { - return { - ext: 'xlsx', - mime: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' - }; - } +const afterCaptureException = function (sendErr, eventId) { + if (!sendErr) { + log('debug', 'Successfully sent exception with eventId ' + eventId + ' to Sentry'); + } - if (zipHeader.filename.startsWith('3D/') && zipHeader.filename.endsWith('.model')) { - return { - ext: '3mf', - mime: 'model/3mf' - }; - } + process.exit(1); +}; - // The docx, xlsx and pptx file types extend the Office Open XML file format: - // https://en.wikipedia.org/wiki/Office_Open_XML_file_formats - // We look for: - // - one entry named '[Content_Types].xml' or '_rels/.rels', - // - one entry indicating specific type of file. - // MS Office, OpenOffice and LibreOffice may put the parts in different order, so the check should not rely on it. - if (zipHeader.filename === 'mimetype' && zipHeader.compressedSize === zipHeader.uncompressedSize) { - const mimeType = await tokenizer.readToken(new Token.StringType(zipHeader.compressedSize, 'utf-8')); +const setupSentry = function () { + try { + log('debug', 'process.env.SENTRY_DSN found, setting up Raven'); + const release = typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : 'dev'; + const domain = getDomain(); + const environment = getEnvironmentFromDomain(domain); + const instance = getInstance(); + Raven.config(SENTRY_DSN, { + release, + environment, + autoBreadcrumbs: { + console: true + } + }).install(afterFatalError); + Raven.mergeContext({ + tags: { + domain, + instance + } + }); + isRavenConfigured = true; + log('debug', 'Raven configured !'); + } catch (e) { + log('warn', 'Could not load Raven, errors will not be sent to Sentry'); + log('warn', e); + } +}; - switch (mimeType) { - case 'application/epub+zip': - return { - ext: 'epub', - mime: 'application/epub+zip' - }; - case 'application/vnd.oasis.opendocument.text': - return { - ext: 'odt', - mime: 'application/vnd.oasis.opendocument.text' - }; - case 'application/vnd.oasis.opendocument.spreadsheet': - return { - ext: 'ods', - mime: 'application/vnd.oasis.opendocument.spreadsheet' - }; - case 'application/vnd.oasis.opendocument.presentation': - return { - ext: 'odp', - mime: 'application/vnd.oasis.opendocument.presentation' - }; - default: - } - } +module.exports.captureExceptionAndDie = function (err) { + log('debug', 'Capture exception and die'); - // Try to find next header manually when current one is corrupted - if (zipHeader.compressedSize === 0) { - let nextHeaderIndex = -1; + if (!isRavenConfigured) { + process.exit(1); + } else { + try { + log('debug', 'Sending exception to Sentry'); + Raven.captureException(err, { + fingerprint: [err.message || err] + }, afterCaptureException); + } catch (e) { + log('warn', 'Could not send error to Sentry, exiting...'); + log('warn', e); + log('warn', err); + process.exit(1); + } + } +}; - while (nextHeaderIndex < 0 && (tokenizer.position < tokenizer.fileInfo.size)) { - await tokenizer.peekBuffer(buffer, {mayBeLess: true}); +module.exports.wrapIfSentrySetUp = function (obj, method) { + if (SENTRY_DSN && SENTRY_DSN !== 'false') { + obj[method] = Raven.wrap(obj[method]); + } +}; - nextHeaderIndex = buffer.indexOf('504B0304', 0, 'hex'); - // Move position to the next header if found, skip the whole buffer otherwise - await tokenizer.ignore(nextHeaderIndex >= 0 ? nextHeaderIndex : buffer.length); - } - } else { - await tokenizer.ignore(zipHeader.compressedSize); - } - } - } catch (error) { - if (!(error instanceof strtok3.EndOfStreamError)) { - throw error; - } - } +if (SENTRY_DSN && SENTRY_DSN !== 'false') { + setupSentry(); +} - return { - ext: 'zip', - mime: 'application/zip' - }; - } +/***/ }), +/* 1268 */ +/***/ (function(module, exports, __webpack_require__) { - if (checkString('OggS')) { - // This is an OGG container - await tokenizer.ignore(28); - const type = Buffer.alloc(8); - await tokenizer.readBuffer(type); +"use strict"; - // Needs to be before `ogg` check - if (_check(type, [0x4F, 0x70, 0x75, 0x73, 0x48, 0x65, 0x61, 0x64])) { - return { - ext: 'opus', - mime: 'audio/opus' - }; - } - // If ' theora' in header. - if (_check(type, [0x80, 0x74, 0x68, 0x65, 0x6F, 0x72, 0x61])) { - return { - ext: 'ogv', - mime: 'video/ogg' - }; - } +module.exports = __webpack_require__(1269); +module.exports.utils = __webpack_require__(1273); - // If '\x01video' in header. - if (_check(type, [0x01, 0x76, 0x69, 0x64, 0x65, 0x6F, 0x00])) { - return { - ext: 'ogm', - mime: 'video/ogg' - }; - } +module.exports.transports = __webpack_require__(1274); +module.exports.parsers = __webpack_require__(1271); - // If ' FLAC' in header https://xiph.org/flac/faq.html - if (_check(type, [0x7F, 0x46, 0x4C, 0x41, 0x43])) { - return { - ext: 'oga', - mime: 'audio/ogg' - }; - } +// To infinity and beyond +Error.stackTraceLimit = Infinity; - // 'Speex ' in header https://en.wikipedia.org/wiki/Speex - if (_check(type, [0x53, 0x70, 0x65, 0x65, 0x78, 0x20, 0x20])) { - return { - ext: 'spx', - mime: 'audio/ogg' - }; - } - // If '\x01vorbis' in header - if (_check(type, [0x01, 0x76, 0x6F, 0x72, 0x62, 0x69, 0x73])) { - return { - ext: 'ogg', - mime: 'audio/ogg' - }; - } +/***/ }), +/* 1269 */ +/***/ (function(module, exports, __webpack_require__) { - // Default OGG container https://www.iana.org/assignments/media-types/application/ogg - return { - ext: 'ogx', - mime: 'application/ogg' - }; - } +"use strict"; - if ( - check([0x50, 0x4B]) && - (buffer[2] === 0x3 || buffer[2] === 0x5 || buffer[2] === 0x7) && - (buffer[3] === 0x4 || buffer[3] === 0x6 || buffer[3] === 0x8) - ) { - return { - ext: 'zip', - mime: 'application/zip' - }; - } - // +var stringify = __webpack_require__(1270); +var parsers = __webpack_require__(1271); +var zlib = __webpack_require__(101); +var utils = __webpack_require__(1273); +var uuid = __webpack_require__(1279); +var transports = __webpack_require__(1274); +var nodeUtil = __webpack_require__(9); // nodeUtil to avoid confusion with "utils" +var events = __webpack_require__(271); +var domain = __webpack_require__(1284); +var md5 = __webpack_require__(1285); - // File Type Box (https://en.wikipedia.org/wiki/ISO_base_media_file_format) - // It's not required to be first, but it's recommended to be. Almost all ISO base media files start with `ftyp` box. - // `ftyp` box must contain a brand major identifier, which must consist of ISO 8859-1 printable characters. - // Here we check for 8859-1 printable characters (for simplicity, it's a mask which also catches one non-printable character). - if ( - checkString('ftyp', {offset: 4}) && - (buffer[8] & 0x60) !== 0x00 // Brand major, first character ASCII? - ) { - // They all can have MIME `video/mp4` except `application/mp4` special-case which is hard to detect. - // For some cases, we're specific, everything else falls to `video/mp4` with `mp4` extension. - const brandMajor = buffer.toString('binary', 8, 12).replace('\0', ' ').trim(); - switch (brandMajor) { - case 'avif': - return {ext: 'avif', mime: 'image/avif'}; - case 'mif1': - return {ext: 'heic', mime: 'image/heif'}; - case 'msf1': - return {ext: 'heic', mime: 'image/heif-sequence'}; - case 'heic': - case 'heix': - return {ext: 'heic', mime: 'image/heic'}; - case 'hevc': - case 'hevx': - return {ext: 'heic', mime: 'image/heic-sequence'}; - case 'qt': - return {ext: 'mov', mime: 'video/quicktime'}; - case 'M4V': - case 'M4VH': - case 'M4VP': - return {ext: 'm4v', mime: 'video/x-m4v'}; - case 'M4P': - return {ext: 'm4p', mime: 'video/mp4'}; - case 'M4B': - return {ext: 'm4b', mime: 'audio/mp4'}; - case 'M4A': - return {ext: 'm4a', mime: 'audio/x-m4a'}; - case 'F4V': - return {ext: 'f4v', mime: 'video/mp4'}; - case 'F4P': - return {ext: 'f4p', mime: 'video/mp4'}; - case 'F4A': - return {ext: 'f4a', mime: 'audio/mp4'}; - case 'F4B': - return {ext: 'f4b', mime: 'audio/mp4'}; - case 'crx': - return {ext: 'cr3', mime: 'image/x-canon-cr3'}; - default: - if (brandMajor.startsWith('3g')) { - if (brandMajor.startsWith('3g2')) { - return {ext: '3g2', mime: 'video/3gpp2'}; - } +var instrumentor = __webpack_require__(1289); - return {ext: '3gp', mime: 'video/3gpp'}; - } +var extend = utils.extend; - return {ext: 'mp4', mime: 'video/mp4'}; - } - } +function Raven() { + this.breadcrumbs = { + record: this.captureBreadcrumb.bind(this) + }; +} - if (checkString('MThd')) { - return { - ext: 'mid', - mime: 'audio/midi' - }; - } +nodeUtil.inherits(Raven, events.EventEmitter); - if ( - checkString('wOFF') && - ( - check([0x00, 0x01, 0x00, 0x00], {offset: 4}) || - checkString('OTTO', {offset: 4}) - ) - ) { - return { - ext: 'woff', - mime: 'font/woff' - }; - } +extend(Raven.prototype, { + config: function config(dsn, options) { + // We get lots of users using raven-node when they want raven-js, hence this warning if it seems like a browser + if ( + typeof window !== 'undefined' && + typeof document !== 'undefined' && + typeof navigator !== 'undefined' + ) { + utils.consoleAlertOnce( + "This looks like a browser environment; are you sure you don't want Raven.js for browser JavaScript? https://sentry.io/for/javascript" + ); + } - if ( - checkString('wOF2') && - ( - check([0x00, 0x01, 0x00, 0x00], {offset: 4}) || - checkString('OTTO', {offset: 4}) - ) - ) { - return { - ext: 'woff2', - mime: 'font/woff2' - }; - } + if (arguments.length === 0) { + // no arguments, use default from environment + dsn = global.process.env.SENTRY_DSN; + options = {}; + } + if (typeof dsn === 'object') { + // They must only be passing through options + options = dsn; + dsn = global.process.env.SENTRY_DSN; + } + options = options || {}; - if (check([0xD4, 0xC3, 0xB2, 0xA1]) || check([0xA1, 0xB2, 0xC3, 0xD4])) { - return { - ext: 'pcap', - mime: 'application/vnd.tcpdump.pcap' - }; - } + this.raw_dsn = dsn; + this.dsn = utils.parseDSN(dsn); + this.name = + options.name || global.process.env.SENTRY_NAME || __webpack_require__(19).hostname(); + this.root = options.root || global.process.cwd(); + this.transport = options.transport || transports[this.dsn.protocol]; + this.sendTimeout = options.sendTimeout || 1; + this.release = options.release || global.process.env.SENTRY_RELEASE; + this.environment = + options.environment || + global.process.env.SENTRY_ENVIRONMENT || + global.process.env.NODE_ENV; - // Sony DSD Stream File (DSF) - if (checkString('DSD ')) { - return { - ext: 'dsf', - mime: 'audio/x-dsf' // Non-standard - }; - } + // autoBreadcrumbs: true enables all, autoBreadcrumbs: false disables all + // autoBreadcrumbs: { http: true } enables a single type + this.autoBreadcrumbs = options.autoBreadcrumbs || false; + // default to 30, don't allow higher than 100 + this.maxBreadcrumbs = Math.max(0, Math.min(options.maxBreadcrumbs || 30, 100)); - if (checkString('LZIP')) { - return { - ext: 'lz', - mime: 'application/x-lzip' - }; - } + this.captureUnhandledRejections = options.captureUnhandledRejections; + this.loggerName = options.logger; + this.dataCallback = options.dataCallback; + this.shouldSendCallback = options.shouldSendCallback; + this.sampleRate = typeof options.sampleRate === 'undefined' ? 1 : options.sampleRate; + this.maxReqQueueCount = options.maxReqQueueCount || 100; + this.parseUser = options.parseUser; + this.stacktrace = options.stacktrace || false; - if (checkString('fLaC')) { - return { - ext: 'flac', - mime: 'audio/x-flac' - }; - } + if (!this.dsn) { + utils.consoleAlert('no DSN provided, error reporting disabled'); + } - if (check([0x42, 0x50, 0x47, 0xFB])) { - return { - ext: 'bpg', - mime: 'image/bpg' - }; - } + if (this.dsn.protocol === 'https') { + // In case we want to provide our own SSL certificates / keys + this.ca = options.ca || null; + } - if (checkString('wvpk')) { - return { - ext: 'wv', - mime: 'audio/wavpack' - }; - } + // enabled if a dsn is set + this._enabled = !!this.dsn; - if (checkString('%PDF')) { - await tokenizer.ignore(1350); - const maxBufferSize = 10 * 1024 * 1024; - const buffer = Buffer.alloc(Math.min(maxBufferSize, tokenizer.fileInfo.size)); - await tokenizer.readBuffer(buffer, {mayBeLess: true}); + var globalContext = (this._globalContext = {}); + if (options.tags) { + globalContext.tags = options.tags; + } + if (options.extra) { + globalContext.extra = options.extra; + } - // Check if this is an Adobe Illustrator file - if (buffer.includes(Buffer.from('AIPrivateData'))) { - return { - ext: 'ai', - mime: 'application/postscript' - }; - } + this.onFatalError = this.defaultOnFatalError = function(err, sendErr, eventId) { + console.error(err && err.stack ? err.stack : err); + global.process.exit(1); + }; + this.uncaughtErrorHandler = this.makeErrorHandler(); - // Assume this is just a normal PDF - return { - ext: 'pdf', - mime: 'application/pdf' - }; - } + this.on('error', function(err) { + utils.consoleAlert('failed to send exception to sentry: ' + err.message); + }); - if (check([0x00, 0x61, 0x73, 0x6D])) { - return { - ext: 'wasm', - mime: 'application/wasm' - }; - } + return this; + }, - // TIFF, little-endian type - if (check([0x49, 0x49, 0x2A, 0x0])) { - if (checkString('CR', {offset: 8})) { - return { - ext: 'cr2', - mime: 'image/x-canon-cr2' - }; - } + install: function install(cb) { + if (this.installed) return this; - if (check([0x1C, 0x00, 0xFE, 0x00], {offset: 8}) || check([0x1F, 0x00, 0x0B, 0x00], {offset: 8})) { - return { - ext: 'nef', - mime: 'image/x-nikon-nef' - }; - } + if (typeof cb === 'function') { + this.onFatalError = cb; + } - if ( - check([0x08, 0x00, 0x00, 0x00], {offset: 4}) && - (check([0x2D, 0x00, 0xFE, 0x00], {offset: 8}) || - check([0x27, 0x00, 0xFE, 0x00], {offset: 8})) - ) { - return { - ext: 'dng', - mime: 'image/x-adobe-dng' - }; - } + global.process.on('uncaughtException', this.uncaughtErrorHandler); - buffer = Buffer.alloc(24); - await tokenizer.peekBuffer(buffer); - if ( - (check([0x10, 0xFB, 0x86, 0x01], {offset: 4}) || check([0x08, 0x00, 0x00, 0x00], {offset: 4})) && - // This pattern differentiates ARW from other TIFF-ish file types: - check([0x00, 0xFE, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x01], {offset: 9}) - ) { - return { - ext: 'arw', - mime: 'image/x-sony-arw' - }; - } + if (this.captureUnhandledRejections) { + var self = this; + global.process.on('unhandledRejection', function(reason, promise) { + var context = (promise.domain && promise.domain.sentryContext) || {}; + context.extra = context.extra || {}; + context.extra.unhandledPromiseRejection = true; + self.captureException(reason, context, function(sendErr, eventId) { + if (!sendErr) { + var reasonMessage = (reason && reason.message) || reason; + utils.consoleAlert( + 'unhandledRejection captured\n' + + 'Event ID: ' + + eventId + + '\n' + + 'Reason: ' + + reasonMessage + ); + } + }); + }); + } - return { - ext: 'tif', - mime: 'image/tiff' - }; - } + instrumentor.instrument(this, this.autoBreadcrumbs); - // TIFF, big-endian type - if (check([0x4D, 0x4D, 0x0, 0x2A])) { - return { - ext: 'tif', - mime: 'image/tiff' - }; - } + this.installed = true; - if (checkString('MAC ')) { - return { - ext: 'ape', - mime: 'audio/ape' - }; - } + return this; + }, - // https://github.com/threatstack/libmagic/blob/master/magic/Magdir/matroska - if (check([0x1A, 0x45, 0xDF, 0xA3])) { // Root element: EBML - async function readField() { - const msb = await tokenizer.peekNumber(Token.UINT8); - let mask = 0x80; - let ic = 0; // 0 = A, 1 = B, 2 = C, 3 = D + uninstall: function uninstall() { + if (!this.installed) return this; - while ((msb & mask) === 0) { - ++ic; - mask >>= 1; - } + instrumentor.deinstrument(this); - const id = Buffer.alloc(ic + 1); - await tokenizer.readBuffer(id); - return id; - } + // todo: this works for tests for now, but isn't what we ultimately want to be doing + global.process.removeAllListeners('uncaughtException'); + global.process.removeAllListeners('unhandledRejection'); - async function readElement() { - const id = await readField(); - const lenField = await readField(); - lenField[0] ^= 0x80 >> (lenField.length - 1); - const nrLen = Math.min(6, lenField.length); // JavaScript can max read 6 bytes integer - return { - id: id.readUIntBE(0, id.length), - len: lenField.readUIntBE(lenField.length - nrLen, nrLen) - }; - } + this.installed = false; - async function readChildren(level, children) { - while (children > 0) { - const e = await readElement(); - if (e.id === 0x4282) { - return tokenizer.readToken(new Token.StringType(e.len, 'utf-8')); // Return DocType - } + return this; + }, - await tokenizer.ignore(e.len); // ignore payload - --children; - } - } + makeErrorHandler: function() { + var self = this; + var caughtFirstError = false; + var caughtSecondError = false; + var calledFatalError = false; + var firstError; + return function(err) { + if (!caughtFirstError) { + // this is the first uncaught error and the ultimate reason for shutting down + // we want to do absolutely everything possible to ensure it gets captured + // also we want to make sure we don't go recursion crazy if more errors happen after this one + firstError = err; + caughtFirstError = true; + self.captureException(err, {level: 'fatal'}, function(sendErr, eventId) { + if (!calledFatalError) { + calledFatalError = true; + self.onFatalError(err, sendErr, eventId); + } + }); + } else if (calledFatalError) { + // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down + utils.consoleAlert( + 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown' + ); + self.defaultOnFatalError(err); + } else if (!caughtSecondError) { + // two cases for how we can hit this branch: + // - capturing of first error blew up and we just caught the exception from that + // - quit trying to capture, proceed with shutdown + // - a second independent error happened while waiting for first error to capture + // - want to avoid causing premature shutdown before first error capture finishes + // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff + // so let's instead just delay a bit before we proceed with our action here + // in case 1, we just wait a bit unnecessarily but ultimately do the same thing + // in case 2, the delay hopefully made us wait long enough for the capture to finish + // two potential nonideal outcomes: + // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError + // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error + // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError) + // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish + caughtSecondError = true; + setTimeout(function() { + if (!calledFatalError) { + // it was probably case 1, let's treat err as the sendErr and call onFatalError + calledFatalError = true; + self.onFatalError(firstError, err); + } else { + // it was probably case 2, our first error finished capturing while we waited, cool, do nothing + } + }, (self.sendTimeout + 1) * 1000); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc + } + }; + }, - const re = await readElement(); - const docType = await readChildren(1, re.len); + generateEventId: function generateEventId() { + return uuid().replace(/-/g, ''); + }, - switch (docType) { - case 'webm': - return { - ext: 'webm', - mime: 'video/webm' - }; + process: function process(eventId, kwargs, cb) { + // prod codepaths shouldn't hit this branch, for testing + if (typeof eventId === 'object') { + cb = kwargs; + kwargs = eventId; + eventId = this.generateEventId(); + } - case 'matroska': - return { - ext: 'mkv', - mime: 'video/x-matroska' - }; + var domainContext = (domain.active && domain.active.sentryContext) || {}; + var globalContext = this._globalContext || {}; + kwargs.user = extend({}, globalContext.user, domainContext.user, kwargs.user); + kwargs.tags = extend({}, globalContext.tags, domainContext.tags, kwargs.tags); + kwargs.extra = extend({}, globalContext.extra, domainContext.extra, kwargs.extra); + // Perform a shallow copy of breadcrums to not send one that we'll capture below through as well + kwargs.breadcrumbs = { + values: + (domainContext.breadcrumbs && domainContext.breadcrumbs.slice()) || + (globalContext.breadcrumbs && globalContext.breadcrumbs.slice()) || + [] + }; - default: - return; - } - } + /* + `request` is our specified property name for the http interface: https://docs.sentry.io/clientdev/interfaces/http/ + `req` is the conventional name for a request object in node/express/etc + we want to enable someone to pass a `request` property to kwargs according to http interface + but also want to provide convenience for passing a req object and having us parse it out + so we only parse a `req` property if the `request` property is absent/empty (and hence we won't clobber) + parseUser returns a partial kwargs object with a `request` property and possibly a `user` property + */ + var request = this._createRequestObject( + globalContext.request, + domainContext.request, + kwargs.request + ); + delete kwargs.request; - // RIFF file format which might be AVI, WAV, QCP, etc - if (check([0x52, 0x49, 0x46, 0x46])) { - if (check([0x41, 0x56, 0x49], {offset: 8})) { - return { - ext: 'avi', - mime: 'video/vnd.avi' - }; - } + if (Object.keys(request).length === 0) { + request = this._createRequestObject( + globalContext.req, + domainContext.req, + kwargs.req + ); + delete kwargs.req; + } - if (check([0x57, 0x41, 0x56, 0x45], {offset: 8})) { - return { - ext: 'wav', - mime: 'audio/vnd.wave' - }; - } + if (Object.keys(request).length > 0) { + var parseUser = Object.keys(kwargs.user).length === 0 ? this.parseUser : false; + extend(kwargs, parsers.parseRequest(request, parseUser)); + } else { + kwargs.request = {}; + } - // QLCM, QCP file - if (check([0x51, 0x4C, 0x43, 0x4D], {offset: 8})) { - return { - ext: 'qcp', - mime: 'audio/qcelp' - }; - } - } + kwargs.modules = utils.getModules(); + kwargs.server_name = kwargs.server_name || this.name; - if (checkString('SQLi')) { - return { - ext: 'sqlite', - mime: 'application/x-sqlite3' - }; - } + if (typeof global.process.version !== 'undefined') { + kwargs.extra.node = global.process.version; + } - if (check([0x4E, 0x45, 0x53, 0x1A])) { - return { - ext: 'nes', - mime: 'application/x-nintendo-nes-rom' - }; - } + kwargs.environment = kwargs.environment || this.environment; + kwargs.logger = kwargs.logger || this.loggerName; + kwargs.event_id = eventId; + kwargs.timestamp = new Date().toISOString().split('.')[0]; + kwargs.project = this.dsn && this.dsn.project_id; + kwargs.platform = 'node'; + kwargs.release = this.release; - if (checkString('Cr24')) { - return { - ext: 'crx', - mime: 'application/x-google-chrome-extension' - }; - } + // Cleanup empty properties before sending them to the server + Object.keys(kwargs).forEach(function(key) { + if (kwargs[key] == null || kwargs[key] === '') { + delete kwargs[key]; + } + }); - if ( - checkString('MSCF') || - checkString('ISc(') - ) { - return { - ext: 'cab', - mime: 'application/vnd.ms-cab-compressed' - }; - } + if (this.dataCallback) { + kwargs = this.dataCallback(kwargs); + } - if (check([0xED, 0xAB, 0xEE, 0xDB])) { - return { - ext: 'rpm', - mime: 'application/x-rpm' - }; - } + // Capture breadcrumb before sending it, as we also want to have it even when + // it was dropped due to sampleRate or shouldSendCallback + this.captureBreadcrumb({ + category: 'sentry', + message: kwargs.message, + event_id: kwargs.event_id, + level: kwargs.level || 'error' // presume error unless specified + }); - if (check([0xC5, 0xD0, 0xD3, 0xC6])) { - return { - ext: 'eps', - mime: 'application/eps' - }; - } + var shouldSend = true; + if (!this._enabled) shouldSend = false; + if (this.shouldSendCallback && !this.shouldSendCallback(kwargs)) shouldSend = false; + if (Math.random() >= this.sampleRate) shouldSend = false; - if (check([0x28, 0xB5, 0x2F, 0xFD])) { - return { - ext: 'zst', - mime: 'application/zstd' - }; - } + if (shouldSend) { + this.send(kwargs, cb); + } else { + // wish there was a good way to communicate to cb why we didn't send; worth considering cb api change? + // could be shouldSendCallback, could be disabled, could be sample rate + // avoiding setImmediate here because node 0.8 + cb && + setTimeout(function() { + cb(null, eventId); + }, 0); + } + }, - // -- 5-byte signatures -- + send: function send(kwargs, cb) { + var self = this; + var skwargs = stringify(kwargs); + var eventId = kwargs.event_id; - if (check([0x4F, 0x54, 0x54, 0x4F, 0x00])) { - return { - ext: 'otf', - mime: 'font/otf' - }; - } + zlib.deflate(skwargs, function(err, buff) { + var message = buff.toString('base64'), + timestamp = new Date().getTime(), + headers = { + 'X-Sentry-Auth': utils.getAuthHeader( + timestamp, + self.dsn.public_key, + self.dsn.private_key + ), + 'Content-Type': 'application/octet-stream', + 'Content-Length': message.length + }; - if (checkString('#!AMR')) { - return { - ext: 'amr', - mime: 'audio/amr' - }; - } + self.transport.send(self, message, headers, eventId, cb); + }); + }, - if (checkString('{\\rtf')) { - return { - ext: 'rtf', - mime: 'application/rtf' - }; - } + captureMessage: function captureMessage(message, kwargs, cb) { + if (!cb && typeof kwargs === 'function') { + cb = kwargs; + kwargs = {}; + } else { + kwargs = utils.isPlainObject(kwargs) ? extend({}, kwargs) : {}; + } - if (check([0x46, 0x4C, 0x56, 0x01])) { - return { - ext: 'flv', - mime: 'video/x-flv' - }; - } + var eventId = this.generateEventId(); - if (checkString('IMPM')) { - return { - ext: 'it', - mime: 'audio/x-it' - }; - } + if (this.stacktrace) { + var ex = new Error(message); - if ( - checkString('-lh0-', {offset: 2}) || - checkString('-lh1-', {offset: 2}) || - checkString('-lh2-', {offset: 2}) || - checkString('-lh3-', {offset: 2}) || - checkString('-lh4-', {offset: 2}) || - checkString('-lh5-', {offset: 2}) || - checkString('-lh6-', {offset: 2}) || - checkString('-lh7-', {offset: 2}) || - checkString('-lzs-', {offset: 2}) || - checkString('-lz4-', {offset: 2}) || - checkString('-lz5-', {offset: 2}) || - checkString('-lhd-', {offset: 2}) - ) { - return { - ext: 'lzh', - mime: 'application/x-lzh-compressed' - }; - } + console.log(ex); - // MPEG program stream (PS or MPEG-PS) - if (check([0x00, 0x00, 0x01, 0xBA])) { - // MPEG-PS, MPEG-1 Part 1 - if (check([0x21], {offset: 4, mask: [0xF1]})) { - return { - ext: 'mpg', // May also be .ps, .mpeg - mime: 'video/MP1S' - }; - } + utils.parseStack( + ex, + function(frames) { + // We trim last frame, as it's our `new Error(message)` statement itself, which is redundant + kwargs.stacktrace = { + frames: frames.slice(0, -1) + }; + this.process(eventId, parsers.parseText(message, kwargs), cb); + }.bind(this) + ); + } else { + this.process(eventId, parsers.parseText(message, kwargs), cb); + } - // MPEG-PS, MPEG-2 Part 1 - if (check([0x44], {offset: 4, mask: [0xC4]})) { - return { - ext: 'mpg', // May also be .mpg, .m2p, .vob or .sub - mime: 'video/MP2P' - }; - } - } + return eventId; + }, - if (checkString('ITSF')) { - return { - ext: 'chm', - mime: 'application/vnd.ms-htmlhelp' - }; - } + captureException: function captureException(err, kwargs, cb) { + if (!cb && typeof kwargs === 'function') { + cb = kwargs; + kwargs = {}; + } else { + kwargs = utils.isPlainObject(kwargs) ? extend({}, kwargs) : {}; + } - // -- 6-byte signatures -- + if (!utils.isError(err)) { + if (utils.isPlainObject(err)) { + // This will allow us to group events based on top-level keys + // which is much better than creating new group when any key/value change + var keys = Object.keys(err).sort(); + var message = + 'Non-Error exception captured with keys: ' + + utils.serializeKeysForMessage(keys); + kwargs = extend(kwargs, { + message: message, + fingerprint: [md5(keys)], + extra: kwargs.extra || {} + }); + kwargs.extra.__serialized__ = utils.serializeException(err); - if (check([0xFD, 0x37, 0x7A, 0x58, 0x5A, 0x00])) { - return { - ext: 'xz', - mime: 'application/x-xz' - }; - } + err = new Error(message); + } else { + // This handles when someone does: + // throw "something awesome"; + // We synthesize an Error here so we can extract a (rough) stack trace. + err = new Error(err); + } + } - if (checkString('<?xml ')) { - return { - ext: 'xml', - mime: 'application/xml' - }; - } + var self = this; + var eventId = this.generateEventId(); + parsers.parseError(err, kwargs, function(kw) { + self.process(eventId, kw, cb); + }); - if (check([0x37, 0x7A, 0xBC, 0xAF, 0x27, 0x1C])) { - return { - ext: '7z', - mime: 'application/x-7z-compressed' - }; - } + return eventId; + }, - if ( - check([0x52, 0x61, 0x72, 0x21, 0x1A, 0x7]) && - (buffer[6] === 0x0 || buffer[6] === 0x1) - ) { - return { - ext: 'rar', - mime: 'application/x-rar-compressed' - }; - } + context: function(ctx, func) { + if (!func && typeof ctx === 'function') { + func = ctx; + ctx = {}; + } - if (checkString('solid ')) { - return { - ext: 'stl', - mime: 'model/stl' - }; - } + // todo/note: raven-js takes an args param to do apply(this, args) + // i don't think it's correct/necessary to bind this to the wrap call + // and i don't know if we need to support the args param; it's undocumented + return this.wrap(ctx, func).apply(null); + }, - // -- 7-byte signatures -- + wrap: function(options, func) { + if (!this.installed) { + utils.consoleAlertOnce( + 'Raven has not been installed, therefore no breadcrumbs will be captured. Call `Raven.config(...).install()` to fix this.' + ); + } + if (!func && typeof options === 'function') { + func = options; + options = {}; + } - if (checkString('BLENDER')) { - return { - ext: 'blend', - mime: 'application/x-blender' - }; - } + var wrapDomain = domain.create(); + // todo: better property name than sentryContext, maybe __raven__ or sth? + wrapDomain.sentryContext = options; - if (checkString('!<arch>')) { - await tokenizer.ignore(8); - const str = await tokenizer.readToken(new Token.StringType(13, 'ascii')); - if (str === 'debian-binary') { - return { - ext: 'deb', - mime: 'application/x-deb' - }; - } + wrapDomain.on('error', this.uncaughtErrorHandler); + var wrapped = wrapDomain.bind(func); - return { - ext: 'ar', - mime: 'application/x-unix-archive' - }; - } + for (var property in func) { + if ({}.hasOwnProperty.call(func, property)) { + wrapped[property] = func[property]; + } + } + wrapped.prototype = func.prototype; + wrapped.__raven__ = true; + wrapped.__inner__ = func; + // note: domain.bind sets wrapped.domain, but it's not documented, unsure if we should rely on that + wrapped.__domain__ = wrapDomain; - // -- 8-byte signatures -- + return wrapped; + }, - if (check([0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A])) { - // APNG format (https://wiki.mozilla.org/APNG_Specification) - // 1. Find the first IDAT (image data) chunk (49 44 41 54) - // 2. Check if there is an "acTL" chunk before the IDAT one (61 63 54 4C) + interceptErr: function(options, func) { + if (!func && typeof options === 'function') { + func = options; + options = {}; + } + var self = this; + var wrapped = function() { + var err = arguments[0]; + if (utils.isError(err)) { + self.captureException(err, options); + } else { + func.apply(null, arguments); + } + }; - // Offset calculated as follows: - // - 8 bytes: PNG signature - // - 4 (length) + 4 (chunk type) + 13 (chunk data) + 4 (CRC): IHDR chunk + // repetitive with wrap + for (var property in func) { + if ({}.hasOwnProperty.call(func, property)) { + wrapped[property] = func[property]; + } + } + wrapped.prototype = func.prototype; + wrapped.__raven__ = true; + wrapped.__inner__ = func; - await tokenizer.ignore(8); // ignore PNG signature + return wrapped; + }, - async function readChunkHeader() { - return { - length: await tokenizer.readToken(Token.INT32_BE), - type: await tokenizer.readToken(new Token.StringType(4, 'binary')) - }; - } + setContext: function setContext(ctx) { + if (domain.active) { + domain.active.sentryContext = ctx; + } else { + this._globalContext = ctx; + } + return this; + }, - do { - const chunk = await readChunkHeader(); - if (chunk.length < 0) { - return; // Invalid chunk length - } + mergeContext: function mergeContext(ctx) { + extend(this.getContext(), ctx); + return this; + }, - switch (chunk.type) { - case 'IDAT': - return { - ext: 'png', - mime: 'image/png' - }; - case 'acTL': - return { - ext: 'apng', - mime: 'image/apng' - }; - default: - await tokenizer.ignore(chunk.length + 4); // Ignore chunk-data + CRC - } - } while (tokenizer.position + 8 < tokenizer.fileInfo.size); + getContext: function getContext() { + if (domain.active) { + if (!domain.active.sentryContext) { + domain.active.sentryContext = {}; + utils.consoleAlert('sentry context not found on active domain'); + } + return domain.active.sentryContext; + } + return this._globalContext; + }, - return { - ext: 'png', - mime: 'image/png' - }; - } + setCallbackHelper: function(propertyName, callback) { + var original = this[propertyName]; + if (typeof callback === 'function') { + this[propertyName] = function(data) { + return callback(data, original); + }; + } else { + this[propertyName] = callback; + } - if (check([0x41, 0x52, 0x52, 0x4F, 0x57, 0x31, 0x00, 0x00])) { - return { - ext: 'arrow', - mime: 'application/x-apache-arrow' - }; - } + return this; + }, - if (check([0x67, 0x6C, 0x54, 0x46, 0x02, 0x00, 0x00, 0x00])) { - return { - ext: 'glb', - mime: 'model/gltf-binary' - }; - } + /* + * Set the dataCallback option + * + * @param {function} callback The callback to run which allows the + * data blob to be mutated before sending + * @return {Raven} + */ + setDataCallback: function(callback) { + return this.setCallbackHelper('dataCallback', callback); + }, - // `mov` format variants - if ( - check([0x66, 0x72, 0x65, 0x65], {offset: 4}) || // `free` - check([0x6D, 0x64, 0x61, 0x74], {offset: 4}) || // `mdat` MJPEG - check([0x6D, 0x6F, 0x6F, 0x76], {offset: 4}) || // `moov` - check([0x77, 0x69, 0x64, 0x65], {offset: 4}) // `wide` - ) { - return { - ext: 'mov', - mime: 'video/quicktime' - }; - } + /* + * Set the shouldSendCallback option + * + * @param {function} callback The callback to run which allows + * introspecting the blob before sending + * @return {Raven} + */ + setShouldSendCallback: function(callback) { + return this.setCallbackHelper('shouldSendCallback', callback); + }, - // -- 9-byte signatures -- + requestHandler: function() { + var self = this; + return function ravenRequestMiddleware(req, res, next) { + self.context({req: req}, function() { + domain.active.add(req); + domain.active.add(res); + next(); + }); + }; + }, - if (check([0x49, 0x49, 0x52, 0x4F, 0x08, 0x00, 0x00, 0x00, 0x18])) { - return { - ext: 'orf', - mime: 'image/x-olympus-orf' - }; - } + errorHandler: function() { + var self = this; + return function ravenErrorMiddleware(err, req, res, next) { + var status = + err.status || + err.statusCode || + err.status_code || + (err.output && err.output.statusCode) || + 500; - if (checkString('gimp xcf ')) { - return { - ext: 'xcf', - mime: 'image/x-xcf' - }; - } + // skip anything not marked as an internal server error + if (status < 500) return next(err); - // -- 12-byte signatures -- + var eventId = self.captureException(err, {req: req}); + res.sentry = eventId; + return next(err); + }; + }, - if (check([0x49, 0x49, 0x55, 0x00, 0x18, 0x00, 0x00, 0x00, 0x88, 0xE7, 0x74, 0xD8])) { - return { - ext: 'rw2', - mime: 'image/x-panasonic-rw2' - }; - } + captureBreadcrumb: function(breadcrumb) { + // Avoid capturing global-scoped breadcrumbs before instrumentation finishes + if (!this.installed) return; - // ASF_Header_Object first 80 bytes - if (check([0x30, 0x26, 0xB2, 0x75, 0x8E, 0x66, 0xCF, 0x11, 0xA6, 0xD9])) { - async function readHeader() { - const guid = Buffer.alloc(16); - await tokenizer.readBuffer(guid); - return { - id: guid, - size: Number(await tokenizer.readToken(Token.UINT64_LE)) - }; - } + breadcrumb = extend( + { + timestamp: +new Date() / 1000 + }, + breadcrumb + ); + var currCtx = this.getContext(); + if (!currCtx.breadcrumbs) currCtx.breadcrumbs = []; + currCtx.breadcrumbs.push(breadcrumb); + if (currCtx.breadcrumbs.length > this.maxBreadcrumbs) { + currCtx.breadcrumbs.shift(); + } + this.setContext(currCtx); + }, - await tokenizer.ignore(30); - // Search for header should be in first 1KB of file. - while (tokenizer.position + 24 < tokenizer.fileInfo.size) { - const header = await readHeader(); - let payload = header.size - 24; - if (_check(header.id, [0x91, 0x07, 0xDC, 0xB7, 0xB7, 0xA9, 0xCF, 0x11, 0x8E, 0xE6, 0x00, 0xC0, 0x0C, 0x20, 0x53, 0x65])) { - // Sync on Stream-Properties-Object (B7DC0791-A9B7-11CF-8EE6-00C00C205365) - const typeId = Buffer.alloc(16); - payload -= await tokenizer.readBuffer(typeId); + _createRequestObject: function() { + /** + * When using proxy, some of the attributes of req/request objects are non-enumerable. + * To make sure, that they are still available to us after we consolidate our sources + * (eg. globalContext.request + domainContext.request + kwargs.request), + * we manually pull them out from original objects. + * + * Same scenario happens when some frameworks (eg. Koa) decide to use request within + * request. eg `this.request.req`, which adds aliases to the main `request` object. + * By manually reassigning them here, we don't need to add additional checks + * like `req.method || (req.req && req.req.method)` + * + * We don't use Object.assign/extend as it's only merging over objects own properties, + * and we don't want to go through all of the properties as well, as we simply don't + * need all of them. + **/ + var sources = Array.from(arguments).filter(function(source) { + return Object.prototype.toString.call(source) === '[object Object]'; + }); + sources = [{}].concat(sources); + var request = extend.apply(null, sources); + var nonEnumerables = [ + 'headers', + 'hostname', + 'ip', + 'method', + 'protocol', + 'query', + 'secure', + 'url' + ]; - if (_check(typeId, [0x40, 0x9E, 0x69, 0xF8, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) { - // Found audio: - return { - ext: 'asf', - mime: 'audio/x-ms-asf' - }; - } + nonEnumerables.forEach(function(key) { + sources.forEach(function(source) { + if (source[key]) request[key] = source[key]; + }); + }); - if (_check(typeId, [0xC0, 0xEF, 0x19, 0xBC, 0x4D, 0x5B, 0xCF, 0x11, 0xA8, 0xFD, 0x00, 0x80, 0x5F, 0x5C, 0x44, 0x2B])) { - // Found video: - return { - ext: 'asf', - mime: 'video/x-ms-asf' - }; - } + /** + * Check for 'host' *only* after we checked for 'hostname' first. + * This way we can avoid the noise coming from Express deprecation warning + * https://github.com/expressjs/express/blob/b97faff6e2aa4d34d79485fe4331cb0eec13ad57/lib/request.js#L450-L452 + * REF: https://github.com/getsentry/raven-node/issues/96#issuecomment-354748884 + **/ + if (!request.hasOwnProperty('hostname')) { + sources.forEach(function(source) { + if (source.host) request.host = source.host; + }); + } - break; - } + return request; + } +}); - await tokenizer.ignore(payload); - } +// Maintain old API compat, need to make sure arguments length is preserved +function Client(dsn, options) { + if (dsn instanceof Client) return dsn; + var ravenInstance = new Raven(); + return ravenInstance.config.apply(ravenInstance, arguments); +} +nodeUtil.inherits(Client, Raven); - // Default to ASF generic extension - return { - ext: 'asf', - mime: 'application/vnd.ms-asf' - }; - } +// Singleton-by-default but not strictly enforced +// todo these extra export props are sort of an adhoc mess, better way to manage? +var defaultInstance = new Raven(); +defaultInstance.Client = Client; +defaultInstance.version = __webpack_require__(1278).version; +defaultInstance.disableConsoleAlerts = utils.disableConsoleAlerts; - if (check([0xAB, 0x4B, 0x54, 0x58, 0x20, 0x31, 0x31, 0xBB, 0x0D, 0x0A, 0x1A, 0x0A])) { - return { - ext: 'ktx', - mime: 'image/ktx' - }; - } +module.exports = defaultInstance; - if ((check([0x7E, 0x10, 0x04]) || check([0x7E, 0x18, 0x04])) && check([0x30, 0x4D, 0x49, 0x45], {offset: 4})) { - return { - ext: 'mie', - mime: 'application/x-mie' - }; - } - if (check([0x27, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00], {offset: 2})) { - return { - ext: 'shp', - mime: 'application/x-esri-shape' - }; - } +/***/ }), +/* 1270 */ +/***/ (function(module, exports, __webpack_require__) { - if (check([0x00, 0x00, 0x00, 0x0C, 0x6A, 0x50, 0x20, 0x20, 0x0D, 0x0A, 0x87, 0x0A])) { - // JPEG-2000 family +"use strict"; - await tokenizer.ignore(20); - const type = await tokenizer.readToken(new Token.StringType(4, 'ascii')); - switch (type) { - case 'jp2 ': - return { - ext: 'jp2', - mime: 'image/jp2' - }; - case 'jpx ': - return { - ext: 'jpx', - mime: 'image/jpx' - }; - case 'jpm ': - return { - ext: 'jpm', - mime: 'image/jpm' - }; - case 'mjp2': - return { - ext: 'mj2', - mime: 'image/mj2' - }; - default: - return; - } - } - if ( - check([0xFF, 0x0A]) || - check([0x00, 0x00, 0x00, 0x0C, 0x4A, 0x58, 0x4C, 0x20, 0x0D, 0x0A, 0x87, 0x0A]) - ) { - return { - ext: 'jxl', - mime: 'image/jxl' - }; - } +/* + json-stringify-safe + Like JSON.stringify, but doesn't throw on circular references. - // -- Unsafe signatures -- + Originally forked from https://github.com/isaacs/json-stringify-safe + version 5.0.1 on 2017-09-21 and modified to handle Errors serialization. + Tests for this are in test/vendor. - if ( - check([0x0, 0x0, 0x1, 0xBA]) || - check([0x0, 0x0, 0x1, 0xB3]) - ) { - return { - ext: 'mpg', - mime: 'video/mpeg' - }; - } + ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE + */ - if (check([0x00, 0x01, 0x00, 0x00, 0x00])) { - return { - ext: 'ttf', - mime: 'font/ttf' - }; - } +exports = module.exports = stringify; +exports.getSerialize = serializer; + +function stringify(obj, replacer, spaces, cycleReplacer) { + return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces); +} - if (check([0x00, 0x00, 0x01, 0x00])) { - return { - ext: 'ico', - mime: 'image/x-icon' - }; - } +// https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106 +function stringifyError(value) { + var err = { + // These properties are implemented as magical getters and don't show up in for in + stack: value.stack, + message: value.message, + name: value.name + }; - if (check([0x00, 0x00, 0x02, 0x00])) { - return { - ext: 'cur', - mime: 'image/x-icon' - }; - } + for (var i in value) { + if (Object.prototype.hasOwnProperty.call(value, i)) { + err[i] = value[i]; + } + } - if (check([0xD0, 0xCF, 0x11, 0xE0, 0xA1, 0xB1, 0x1A, 0xE1])) { - // Detected Microsoft Compound File Binary File (MS-CFB) Format. - return { - ext: 'cfb', - mime: 'application/x-cfb' - }; - } + return err; +} - // Increase sample size from 12 to 256. - await tokenizer.peekBuffer(buffer, {length: Math.min(256, tokenizer.fileInfo.size), mayBeLess: true}); +function serializer(replacer, cycleReplacer) { + var stack = []; + var keys = []; - // -- 15-byte signatures -- + if (cycleReplacer == null) { + cycleReplacer = function(key, value) { + if (stack[0] === value) { + return '[Circular ~]'; + } + return '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']'; + }; + } - if (checkString('BEGIN:')) { - if (checkString('VCARD', {offset: 6})) { - return { - ext: 'vcf', - mime: 'text/vcard' - }; - } + return function(key, value) { + if (stack.length > 0) { + var thisPos = stack.indexOf(this); + ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); + ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); - if (checkString('VCALENDAR', {offset: 6})) { - return { - ext: 'ics', - mime: 'text/calendar' - }; - } - } + if (~stack.indexOf(value)) { + value = cycleReplacer.call(this, key, value); + } + } else { + stack.push(value); + } - // `raf` is here just to keep all the raw image detectors together. - if (checkString('FUJIFILMCCD-RAW')) { - return { - ext: 'raf', - mime: 'image/x-fujifilm-raf' - }; - } + return replacer == null + ? value instanceof Error ? stringifyError(value) : value + : replacer.call(this, key, value); + }; +} - if (checkString('Extended Module:')) { - return { - ext: 'xm', - mime: 'audio/x-xm' - }; - } - if (checkString('Creative Voice File')) { - return { - ext: 'voc', - mime: 'audio/x-voc' - }; - } +/***/ }), +/* 1271 */ +/***/ (function(module, exports, __webpack_require__) { - if (check([0x04, 0x00, 0x00, 0x00]) && buffer.length >= 16) { // Rough & quick check Pickle/ASAR - const jsonSize = buffer.readUInt32LE(12); - if (jsonSize > 12 && buffer.length >= jsonSize + 16) { - try { - const header = buffer.slice(16, jsonSize + 16).toString(); - const json = JSON.parse(header); - // Check if Pickle is ASAR - if (json.files) { // Final check, assuring Pickle/ASAR format - return { - ext: 'asar', - mime: 'application/x-asar' - }; - } - } catch (_) { - } - } - } +"use strict"; - if (check([0x06, 0x0E, 0x2B, 0x34, 0x02, 0x05, 0x01, 0x01, 0x0D, 0x01, 0x02, 0x01, 0x01, 0x02])) { - return { - ext: 'mxf', - mime: 'application/mxf' - }; - } - if (checkString('SCRM', {offset: 44})) { - return { - ext: 's3m', - mime: 'audio/x-s3m' - }; - } +var cookie = __webpack_require__(1272); +var urlParser = __webpack_require__(83); +var stringify = __webpack_require__(1270); - if (check([0x47], {offset: 4}) && (check([0x47], {offset: 192}) || check([0x47], {offset: 196}))) { - return { - ext: 'mts', - mime: 'video/mp2t' - }; - } +var utils = __webpack_require__(1273); - if (check([0x42, 0x4F, 0x4F, 0x4B, 0x4D, 0x4F, 0x42, 0x49], {offset: 60})) { - return { - ext: 'mobi', - mime: 'application/x-mobipocket-ebook' - }; - } +module.exports.parseText = function parseText(message, kwargs) { + kwargs = kwargs || {}; + kwargs.message = message; - if (check([0x44, 0x49, 0x43, 0x4D], {offset: 128})) { - return { - ext: 'dcm', - mime: 'application/dicom' - }; - } + return kwargs; +}; - if (check([0x4C, 0x00, 0x00, 0x00, 0x01, 0x14, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46])) { - return { - ext: 'lnk', - mime: 'application/x.ms.shortcut' // Invented by us - }; - } +module.exports.parseError = function parseError(err, kwargs, cb) { + utils.parseStack(err, function(frames) { + var name = + ({}.hasOwnProperty.call(err, 'name') ? err.name : err.constructor.name) + ''; + if (typeof kwargs.message === 'undefined') { + kwargs.message = name + ': ' + (err.message || '<no message>'); + } + kwargs.exception = [ + { + type: name, + value: err.message, + stacktrace: { + frames: frames + } + } + ]; - if (check([0x62, 0x6F, 0x6F, 0x6B, 0x00, 0x00, 0x00, 0x00, 0x6D, 0x61, 0x72, 0x6B, 0x00, 0x00, 0x00, 0x00])) { - return { - ext: 'alias', - mime: 'application/x.apple.alias' // Invented by us - }; - } + // Save additional error properties to `extra` under the error type (e.g. `extra.AttributeError`) + var extraErrorProps; + for (var key in err) { + if (err.hasOwnProperty(key)) { + if (key !== 'name' && key !== 'message' && key !== 'stack' && key !== 'domain') { + extraErrorProps = extraErrorProps || {}; + extraErrorProps[key] = err[key]; + } + } + } + if (extraErrorProps) { + kwargs.extra = kwargs.extra || {}; + kwargs.extra[name] = extraErrorProps; + } - if ( - check([0x4C, 0x50], {offset: 34}) && - ( - check([0x00, 0x00, 0x01], {offset: 8}) || - check([0x01, 0x00, 0x02], {offset: 8}) || - check([0x02, 0x00, 0x02], {offset: 8}) - ) - ) { - return { - ext: 'eot', - mime: 'application/vnd.ms-fontobject' - }; - } + if (!kwargs.transaction && !kwargs.culprit) { + for (var n = frames.length - 1; n >= 0; n--) { + if (frames[n].in_app) { + kwargs.transaction = utils.getTransaction(frames[n]); + break; + } + } + } - if (check([0x06, 0x06, 0xED, 0xF5, 0xD8, 0x1D, 0x46, 0xE5, 0xBD, 0x31, 0xEF, 0xE7, 0xFE, 0x74, 0xB7, 0x1D])) { - return { - ext: 'indd', - mime: 'application/x-indesign' - }; - } + cb(kwargs); + }); +}; - // Increase sample size from 256 to 512 - await tokenizer.peekBuffer(buffer, {length: Math.min(512, tokenizer.fileInfo.size), mayBeLess: true}); +module.exports.parseRequest = function parseRequest(req, parseUser) { + var kwargs = {}; - // Requires a buffer size of 512 bytes - if (tarHeaderChecksumMatches(buffer)) { - return { - ext: 'tar', - mime: 'application/x-tar' - }; - } + // headers: + // node, express: req.headers + // koa: req.header + var headers = req.headers || req.header || {}; - if (check([0xFF, 0xFE, 0xFF, 0x0E, 0x53, 0x00, 0x6B, 0x00, 0x65, 0x00, 0x74, 0x00, 0x63, 0x00, 0x68, 0x00, 0x55, 0x00, 0x70, 0x00, 0x20, 0x00, 0x4D, 0x00, 0x6F, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6C, 0x00])) { - return { - ext: 'skp', - mime: 'application/vnd.sketchup.skp' - }; - } + // method: + // node, express, koa: req.method + var method = req.method; - if (checkString('-----BEGIN PGP MESSAGE-----')) { - return { - ext: 'pgp', - mime: 'application/pgp-encrypted' - }; - } + // host: + // express: req.hostname in > 4 and req.host in < 4 + // koa: req.host + // node: req.headers.host + var host = req.hostname || req.host || headers.host || '<no host>'; - // Check MPEG 1 or 2 Layer 3 header, or 'layer 0' for ADTS (MPEG sync-word 0xFFE) - if (buffer.length >= 2 && check([0xFF, 0xE0], {offset: 0, mask: [0xFF, 0xE0]})) { - if (check([0x10], {offset: 1, mask: [0x16]})) { - // Check for (ADTS) MPEG-2 - if (check([0x08], {offset: 1, mask: [0x08]})) { - return { - ext: 'aac', - mime: 'audio/aac' - }; - } + // protocol: + // node: <n/a> + // express, koa: req.protocol + var protocol = + req.protocol === 'https' || req.secure || (req.socket || {}).encrypted + ? 'https' + : 'http'; - // Must be (ADTS) MPEG-4 - return { - ext: 'aac', - mime: 'audio/aac' - }; - } + // url (including path and query string): + // node, express: req.originalUrl + // koa: req.url + var originalUrl = req.originalUrl || req.url; - // MPEG 1 or 2 Layer 3 header - // Check for MPEG layer 3 - if (check([0x02], {offset: 1, mask: [0x06]})) { - return { - ext: 'mp3', - mime: 'audio/mpeg' - }; - } + // absolute url + var absoluteUrl = protocol + '://' + host + originalUrl; - // Check for MPEG layer 2 - if (check([0x04], {offset: 1, mask: [0x06]})) { - return { - ext: 'mp2', - mime: 'audio/mpeg' - }; - } + // query string: + // node: req.url (raw) + // express, koa: req.query + var query = req.query || urlParser.parse(originalUrl || '', true).query; - // Check for MPEG layer 1 - if (check([0x06], {offset: 1, mask: [0x06]})) { - return { - ext: 'mp1', - mime: 'audio/mpeg' - }; - } - } -} + // cookies: + // node, express, koa: req.headers.cookie + var cookies = cookie.parse(headers.cookie || ''); -const stream = readableStream => new Promise((resolve, reject) => { - // Using `eval` to work around issues when bundling with Webpack - const stream = eval('require')('stream'); // eslint-disable-line no-eval + // body data: + // node, express, koa: req.body + var data = req.body; + if (['GET', 'HEAD'].indexOf(method) === -1) { + if (typeof data === 'undefined') { + data = '<unavailable>'; + } + } - readableStream.on('error', reject); - readableStream.once('readable', async () => { - // Set up output stream - const pass = new stream.PassThrough(); - let outputStream; - if (stream.pipeline) { - outputStream = stream.pipeline(readableStream, pass, () => { - }); - } else { - outputStream = readableStream.pipe(pass); - } + if (data && typeof data !== 'string' && {}.toString.call(data) !== '[object String]') { + // Make sure the request body is a string + data = stringify(data); + } - // Read the input stream and detect the filetype - const chunk = readableStream.read(minimumBytes) || readableStream.read() || Buffer.alloc(0); - try { - const fileType = await fromBuffer(chunk); - pass.fileType = fileType; - } catch (error) { - reject(error); - } + // http interface + var http = { + method: method, + query_string: query, + headers: headers, + cookies: cookies, + data: data, + url: absoluteUrl + }; - resolve(outputStream); - }); -}); + // expose http interface + kwargs.request = http; -const fileType = { - fromStream, - fromTokenizer, - fromBuffer, - stream -}; + // user: typically found on req.user in express/passport patterns + // five cases for parseUser value: + // absent: grab only id, username, email from req.user + // false: capture nothing + // true: capture all keys from req.user + // array: provided whitelisted keys to grab from req.user + // function :: req -> user: custom parsing function + if (parseUser == null) parseUser = ['id', 'username', 'email']; + if (parseUser) { + var user = {}; + if (typeof parseUser === 'function') { + user = parseUser(req); + } else if (req.user) { + if (parseUser === true) { + for (var key in req.user) { + if ({}.hasOwnProperty.call(req.user, key)) { + user[key] = req.user[key]; + } + } + } else { + parseUser.forEach(function(fieldName) { + if ({}.hasOwnProperty.call(req.user, fieldName)) { + user[fieldName] = req.user[fieldName]; + } + }); + } + } -Object.defineProperty(fileType, 'extensions', { - get() { - return new Set(supported.extensions); - } -}); + // client ip: + // node: req.connection.remoteAddress + // express, koa: req.ip + var ip = req.ip || (req.connection && req.connection.remoteAddress); + if (ip) { + user.ip_address = ip; + } -Object.defineProperty(fileType, 'mimeTypes', { - get() { - return new Set(supported.mimeTypes); - } -}); + kwargs.user = user; + } -module.exports = fileType; + return kwargs; +}; /***/ }), -/* 1243 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; - -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AnsiStringType = exports.StringType = exports.BufferType = exports.Uint8ArrayType = exports.IgnoreType = exports.Float80_LE = exports.Float80_BE = exports.Float64_LE = exports.Float64_BE = exports.Float32_LE = exports.Float32_BE = exports.Float16_LE = exports.Float16_BE = exports.INT64_BE = exports.UINT64_BE = exports.INT64_LE = exports.UINT64_LE = exports.INT32_LE = exports.INT32_BE = exports.INT24_BE = exports.INT24_LE = exports.INT16_LE = exports.INT16_BE = exports.INT8 = exports.UINT32_BE = exports.UINT32_LE = exports.UINT24_BE = exports.UINT24_LE = exports.UINT16_BE = exports.UINT16_LE = exports.UINT8 = void 0; -const ieee754 = __webpack_require__(1244); -// Primitive types -function dv(array) { - return new DataView(array.buffer, array.byteOffset); -} -/** - * 8-bit unsigned integer - */ -exports.UINT8 = { - len: 1, - get(array, offset) { - return dv(array).getUint8(offset); - }, - put(array, offset, value) { - dv(array).setUint8(offset, value); - return offset + 1; - } -}; -/** - * 16-bit unsigned integer, Little Endian byte order - */ -exports.UINT16_LE = { - len: 2, - get(array, offset) { - return dv(array).getUint16(offset, true); - }, - put(array, offset, value) { - dv(array).setUint16(offset, value, true); - return offset + 2; - } -}; -/** - * 16-bit unsigned integer, Big Endian byte order - */ -exports.UINT16_BE = { - len: 2, - get(array, offset) { - return dv(array).getUint16(offset); - }, - put(array, offset, value) { - dv(array).setUint16(offset, value); - return offset + 2; - } -}; -/** - * 24-bit unsigned integer, Little Endian byte order - */ -exports.UINT24_LE = { - len: 3, - get(array, offset) { - const dataView = dv(array); - return dataView.getUint8(offset) + (dataView.getUint16(offset + 1, true) << 8); - }, - put(array, offset, value) { - const dataView = dv(array); - dataView.setUint8(offset, value & 0xff); - dataView.setUint16(offset + 1, value >> 8, true); - return offset + 3; - } -}; -/** - * 24-bit unsigned integer, Big Endian byte order - */ -exports.UINT24_BE = { - len: 3, - get(array, offset) { - const dataView = dv(array); - return (dataView.getUint16(offset) << 8) + dataView.getUint8(offset + 2); - }, - put(array, offset, value) { - const dataView = dv(array); - dataView.setUint16(offset, value >> 8); - dataView.setUint8(offset + 2, value & 0xff); - return offset + 3; - } -}; -/** - * 32-bit unsigned integer, Little Endian byte order - */ -exports.UINT32_LE = { - len: 4, - get(array, offset) { - return dv(array).getUint32(offset, true); - }, - put(array, offset, value) { - dv(array).setUint32(offset, value, true); - return offset + 4; - } -}; -/** - * 32-bit unsigned integer, Big Endian byte order - */ -exports.UINT32_BE = { - len: 4, - get(array, offset) { - return dv(array).getUint32(offset); - }, - put(array, offset, value) { - dv(array).setUint32(offset, value); - return offset + 4; - } -}; -/** - * 8-bit signed integer - */ -exports.INT8 = { - len: 1, - get(array, offset) { - return dv(array).getInt8(offset); - }, - put(array, offset, value) { - dv(array).setInt8(offset, value); - return offset + 2; - } -}; -/** - * 16-bit signed integer, Big Endian byte order - */ -exports.INT16_BE = { - len: 2, - get(array, offset) { - return dv(array).getInt16(offset); - }, - put(array, offset, value) { - dv(array).setInt16(offset, value); - return offset + 2; - } -}; -/** - * 16-bit signed integer, Little Endian byte order - */ -exports.INT16_LE = { - len: 2, - get(array, offset) { - return dv(array).getInt16(offset, true); - }, - put(array, offset, value) { - dv(array).setInt16(offset, value, true); - return offset + 2; - } -}; -/** - * 24-bit signed integer, Little Endian byte order - */ -exports.INT24_LE = { - len: 3, - get(array, offset) { - const unsigned = exports.UINT24_LE.get(array, offset); - return unsigned > 0x7fffff ? unsigned - 0x1000000 : unsigned; - }, - put(array, offset, value) { - const dataView = dv(array); - dataView.setUint8(offset, value & 0xff); - dataView.setUint16(offset + 1, value >> 8, true); - return offset + 3; - } -}; -/** - * 24-bit signed integer, Big Endian byte order - */ -exports.INT24_BE = { - len: 3, - get(array, offset) { - const unsigned = exports.UINT24_BE.get(array, offset); - return unsigned > 0x7fffff ? unsigned - 0x1000000 : unsigned; - }, - put(array, offset, value) { - const dataView = dv(array); - dataView.setUint16(offset, value >> 8); - dataView.setUint8(offset + 2, value & 0xff); - return offset + 3; - } -}; -/** - * 32-bit signed integer, Big Endian byte order - */ -exports.INT32_BE = { - len: 4, - get(array, offset) { - return dv(array).getInt32(offset); - }, - put(array, offset, value) { - dv(array).setInt32(offset, value); - return offset + 4; - } -}; -/** - * 32-bit signed integer, Big Endian byte order - */ -exports.INT32_LE = { - len: 4, - get(array, offset) { - return dv(array).getInt32(offset, true); - }, - put(array, offset, value) { - dv(array).setInt32(offset, value, true); - return offset + 4; - } -}; -/** - * 64-bit unsigned integer, Little Endian byte order - */ -exports.UINT64_LE = { - len: 8, - get(array, offset) { - return dv(array).getBigUint64(offset, true); - }, - put(array, offset, value) { - dv(array).setBigUint64(offset, value, true); - return offset + 8; - } -}; -/** - * 64-bit signed integer, Little Endian byte order - */ -exports.INT64_LE = { - len: 8, - get(array, offset) { - return dv(array).getBigInt64(offset, true); - }, - put(array, offset, value) { - dv(array).setBigInt64(offset, value, true); - return offset + 8; - } -}; -/** - * 64-bit unsigned integer, Big Endian byte order - */ -exports.UINT64_BE = { - len: 8, - get(array, offset) { - return dv(array).getBigUint64(offset); - }, - put(array, offset, value) { - dv(array).setBigUint64(offset, value); - return offset + 8; - } -}; -/** - * 64-bit signed integer, Big Endian byte order - */ -exports.INT64_BE = { - len: 8, - get(array, offset) { - return dv(array).getBigInt64(offset); - }, - put(array, offset, value) { - dv(array).setBigInt64(offset, value); - return offset + 8; - } -}; -/** - * IEEE 754 16-bit (half precision) float, big endian - */ -exports.Float16_BE = { - len: 2, - get(dataView, offset) { - return ieee754.read(dataView, offset, false, 10, this.len); - }, - put(dataView, offset, value) { - ieee754.write(dataView, value, offset, false, 10, this.len); - return offset + this.len; - } -}; -/** - * IEEE 754 16-bit (half precision) float, little endian - */ -exports.Float16_LE = { - len: 2, - get(array, offset) { - return ieee754.read(array, offset, true, 10, this.len); - }, - put(array, offset, value) { - ieee754.write(array, value, offset, true, 10, this.len); - return offset + this.len; - } -}; -/** - * IEEE 754 32-bit (single precision) float, big endian - */ -exports.Float32_BE = { - len: 4, - get(array, offset) { - return dv(array).getFloat32(offset); - }, - put(array, offset, value) { - dv(array).setFloat32(offset, value); - return offset + 4; - } -}; -/** - * IEEE 754 32-bit (single precision) float, little endian - */ -exports.Float32_LE = { - len: 4, - get(array, offset) { - return dv(array).getFloat32(offset, true); - }, - put(array, offset, value) { - dv(array).setFloat32(offset, value, true); - return offset + 4; - } -}; -/** - * IEEE 754 64-bit (double precision) float, big endian - */ -exports.Float64_BE = { - len: 8, - get(array, offset) { - return dv(array).getFloat64(offset); - }, - put(array, offset, value) { - dv(array).setFloat64(offset, value); - return offset + 8; - } -}; -/** - * IEEE 754 64-bit (double precision) float, little endian - */ -exports.Float64_LE = { - len: 8, - get(array, offset) { - return dv(array).getFloat64(offset, true); - }, - put(array, offset, value) { - dv(array).setFloat64(offset, value, true); - return offset + 8; - } -}; -/** - * IEEE 754 80-bit (extended precision) float, big endian +/*! + * cookie + * Copyright(c) 2012-2014 Roman Shtylman + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed */ -exports.Float80_BE = { - len: 10, - get(array, offset) { - return ieee754.read(array, offset, false, 63, this.len); - }, - put(array, offset, value) { - ieee754.write(array, value, offset, false, 63, this.len); - return offset + this.len; - } -}; + + + /** - * IEEE 754 80-bit (extended precision) float, little endian + * Module exports. + * @public */ -exports.Float80_LE = { - len: 10, - get(array, offset) { - return ieee754.read(array, offset, true, 63, this.len); - }, - put(array, offset, value) { - ieee754.write(array, value, offset, true, 63, this.len); - return offset + this.len; - } -}; + +exports.parse = parse; +exports.serialize = serialize; + /** - * Ignore a given number of bytes + * Module variables. + * @private */ -class IgnoreType { - /** - * @param len number of bytes to ignore - */ - constructor(len) { - this.len = len; - } - // ToDo: don't read, but skip data - get(array, off) { - } -} -exports.IgnoreType = IgnoreType; -class Uint8ArrayType { - constructor(len) { - this.len = len; - } - get(array, offset) { - return array.subarray(offset, offset + this.len); - } -} -exports.Uint8ArrayType = Uint8ArrayType; -class BufferType { - constructor(len) { - this.len = len; - } - get(buffer, off) { - return buffer.slice(off, off + this.len); - } -} -exports.BufferType = BufferType; + +var decode = decodeURIComponent; +var encode = encodeURIComponent; +var pairSplitRegExp = /; */; + /** - * Consume a fixed number of bytes from the stream and return a string with a specified encoding. + * RegExp to match field-content in RFC 7230 sec 3.2 + * + * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] + * field-vchar = VCHAR / obs-text + * obs-text = %x80-FF */ -class StringType { - constructor(len, encoding) { - this.len = len; - this.encoding = encoding; - } - get(uint8Array, offset) { - return Buffer.from(uint8Array).toString(this.encoding, offset, offset + this.len); - } -} -exports.StringType = StringType; + +var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; + /** - * ANSI Latin 1 String - * Using windows-1252 / ISO 8859-1 decoding + * Parse a cookie header. + * + * Parse the given cookie header string into an object + * The object has the various cookies as keys(names) => values + * + * @param {string} str + * @param {object} [options] + * @return {object} + * @public */ -class AnsiStringType { - constructor(len) { - this.len = len; - } - static decode(buffer, offset, until) { - let str = ''; - for (let i = offset; i < until; ++i) { - str += AnsiStringType.codePointToString(AnsiStringType.singleByteDecoder(buffer[i])); - } - return str; - } - static inRange(a, min, max) { - return min <= a && a <= max; - } - static codePointToString(cp) { - if (cp <= 0xFFFF) { - return String.fromCharCode(cp); - } - else { - cp -= 0x10000; - return String.fromCharCode((cp >> 10) + 0xD800, (cp & 0x3FF) + 0xDC00); - } - } - static singleByteDecoder(bite) { - if (AnsiStringType.inRange(bite, 0x00, 0x7F)) { - return bite; - } - const codePoint = AnsiStringType.windows1252[bite - 0x80]; - if (codePoint === null) { - throw Error('invaliding encoding'); - } - return codePoint; - } - get(buffer, offset = 0) { - return AnsiStringType.decode(buffer, offset, offset + this.len); - } -} -exports.AnsiStringType = AnsiStringType; -AnsiStringType.windows1252 = [8364, 129, 8218, 402, 8222, 8230, 8224, 8225, 710, 8240, 352, - 8249, 338, 141, 381, 143, 144, 8216, 8217, 8220, 8221, 8226, 8211, 8212, 732, - 8482, 353, 8250, 339, 157, 382, 376, 160, 161, 162, 163, 164, 165, 166, 167, 168, - 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, - 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, 213, 214, 215, 216, - 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 253, 254, 255]; +function parse(str, options) { + if (typeof str !== 'string') { + throw new TypeError('argument str must be a string'); + } -/***/ }), -/* 1244 */ -/***/ (function(module, exports) { + var obj = {} + var opt = options || {}; + var pairs = str.split(pairSplitRegExp); + var dec = opt.decode || decode; -/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ -exports.read = function (buffer, offset, isLE, mLen, nBytes) { - var e, m - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var nBits = -7 - var i = isLE ? (nBytes - 1) : 0 - var d = isLE ? -1 : 1 - var s = buffer[offset + i] + for (var i = 0; i < pairs.length; i++) { + var pair = pairs[i]; + var eq_idx = pair.indexOf('='); - i += d + // skip things that don't look like key=value + if (eq_idx < 0) { + continue; + } - e = s & ((1 << (-nBits)) - 1) - s >>= (-nBits) - nBits += eLen - for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + var key = pair.substr(0, eq_idx).trim() + var val = pair.substr(++eq_idx, pair.length).trim(); - m = e & ((1 << (-nBits)) - 1) - e >>= (-nBits) - nBits += mLen - for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + // quoted values + if ('"' == val[0]) { + val = val.slice(1, -1); + } - if (e === 0) { - e = 1 - eBias - } else if (e === eMax) { - return m ? NaN : ((s ? -1 : 1) * Infinity) - } else { - m = m + Math.pow(2, mLen) - e = e - eBias + // only assign once + if (undefined == obj[key]) { + obj[key] = tryDecode(val, dec); + } } - return (s ? -1 : 1) * m * Math.pow(2, e - mLen) -} - -exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { - var e, m, c - var eLen = (nBytes * 8) - mLen - 1 - var eMax = (1 << eLen) - 1 - var eBias = eMax >> 1 - var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) - var i = isLE ? 0 : (nBytes - 1) - var d = isLE ? 1 : -1 - var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 - value = Math.abs(value) + return obj; +} - if (isNaN(value) || value === Infinity) { - m = isNaN(value) ? 1 : 0 - e = eMax - } else { - e = Math.floor(Math.log(value) / Math.LN2) - if (value * (c = Math.pow(2, -e)) < 1) { - e-- - c *= 2 - } - if (e + eBias >= 1) { - value += rt / c - } else { - value += rt * Math.pow(2, 1 - eBias) - } - if (value * c >= 2) { - e++ - c /= 2 - } +/** + * Serialize data into a cookie header. + * + * Serialize the a name value pair into a cookie string suitable for + * http headers. An optional options object specified cookie parameters. + * + * serialize('foo', 'bar', { httpOnly: true }) + * => "foo=bar; httpOnly" + * + * @param {string} name + * @param {string} val + * @param {object} [options] + * @return {string} + * @public + */ - if (e + eBias >= eMax) { - m = 0 - e = eMax - } else if (e + eBias >= 1) { - m = ((value * c) - 1) * Math.pow(2, mLen) - e = e + eBias - } else { - m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) - e = 0 - } +function serialize(name, val, options) { + var opt = options || {}; + var enc = opt.encode || encode; + + if (typeof enc !== 'function') { + throw new TypeError('option encode is invalid'); } - for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + if (!fieldContentRegExp.test(name)) { + throw new TypeError('argument name is invalid'); + } - e = (e << mLen) | m - eLen += mLen - for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + var value = enc(val); - buffer[offset + i - d] |= s * 128 -} + if (value && !fieldContentRegExp.test(value)) { + throw new TypeError('argument val is invalid'); + } + var str = name + '=' + value; -/***/ }), -/* 1245 */ -/***/ (function(module, exports, __webpack_require__) { + if (null != opt.maxAge) { + var maxAge = opt.maxAge - 0; + if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); + str += '; Max-Age=' + Math.floor(maxAge); + } -"use strict"; + if (opt.domain) { + if (!fieldContentRegExp.test(opt.domain)) { + throw new TypeError('option domain is invalid'); + } + str += '; Domain=' + opt.domain; + } -exports.stringToBytes = string => [...string].map(character => character.charCodeAt(0)); + if (opt.path) { + if (!fieldContentRegExp.test(opt.path)) { + throw new TypeError('option path is invalid'); + } -/** -Checks whether the TAR checksum is valid. + str += '; Path=' + opt.path; + } -@param {Buffer} buffer - The TAR header `[offset ... offset + 512]`. -@param {number} offset - TAR header offset. -@returns {boolean} `true` if the TAR checksum is valid, otherwise `false`. -*/ -exports.tarHeaderChecksumMatches = (buffer, offset = 0) => { - const readSum = parseInt(buffer.toString('utf8', 148, 154).replace(/\0.*$/, '').trim(), 8); // Read sum in header - if (isNaN(readSum)) { - return false; - } + if (opt.expires) { + if (typeof opt.expires.toUTCString !== 'function') { + throw new TypeError('option expires is invalid'); + } - let sum = 8 * 0x20; // Initialize signed bit sum + str += '; Expires=' + opt.expires.toUTCString(); + } - for (let i = offset; i < offset + 148; i++) { - sum += buffer[i]; - } + if (opt.httpOnly) { + str += '; HttpOnly'; + } - for (let i = offset + 156; i < offset + 512; i++) { - sum += buffer[i]; - } + if (opt.secure) { + str += '; Secure'; + } - return readSum === sum; -}; + if (opt.sameSite) { + var sameSite = typeof opt.sameSite === 'string' + ? opt.sameSite.toLowerCase() : opt.sameSite; + + switch (sameSite) { + case true: + str += '; SameSite=Strict'; + break; + case 'lax': + str += '; SameSite=Lax'; + break; + case 'strict': + str += '; SameSite=Strict'; + break; + default: + throw new TypeError('option sameSite is invalid'); + } + } + + return str; +} /** -ID3 UINT32 sync-safe tokenizer token. -28 bits (representing up to 256MB) integer, the msb is 0 to avoid "false syncsignals". -*/ -exports.uint32SyncSafeToken = { - get: (buffer, offset) => { - return (buffer[offset + 3] & 0x7F) | ((buffer[offset + 2]) << 7) | ((buffer[offset + 1]) << 14) | ((buffer[offset]) << 21); - }, - len: 4 -}; + * Try decoding a string using a decoding function. + * + * @param {string} str + * @param {function} decode + * @private + */ + +function tryDecode(str, decode) { + try { + return decode(str); + } catch (e) { + return str; + } +} /***/ }), -/* 1246 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -module.exports = { - extensions: [ - 'jpg', - 'png', - 'apng', - 'gif', - 'webp', - 'flif', - 'xcf', - 'cr2', - 'cr3', - 'orf', - 'arw', - 'dng', - 'nef', - 'rw2', - 'raf', - 'tif', - 'bmp', - 'icns', - 'jxr', - 'psd', - 'indd', - 'zip', - 'tar', - 'rar', - 'gz', - 'bz2', - '7z', - 'dmg', - 'mp4', - 'mid', - 'mkv', - 'webm', - 'mov', - 'avi', - 'mpg', - 'mp2', - 'mp3', - 'm4a', - 'oga', - 'ogg', - 'ogv', - 'opus', - 'flac', - 'wav', - 'spx', - 'amr', - 'pdf', - 'epub', - 'exe', - 'swf', - 'rtf', - 'wasm', - 'woff', - 'woff2', - 'eot', - 'ttf', - 'otf', - 'ico', - 'flv', - 'ps', - 'xz', - 'sqlite', - 'nes', - 'crx', - 'xpi', - 'cab', - 'deb', - 'ar', - 'rpm', - 'Z', - 'lz', - 'cfb', - 'mxf', - 'mts', - 'blend', - 'bpg', - 'docx', - 'pptx', - 'xlsx', - '3gp', - '3g2', - 'jp2', - 'jpm', - 'jpx', - 'mj2', - 'aif', - 'qcp', - 'odt', - 'ods', - 'odp', - 'xml', - 'mobi', - 'heic', - 'cur', - 'ktx', - 'ape', - 'wv', - 'dcm', - 'ics', - 'glb', - 'pcap', - 'dsf', - 'lnk', - 'alias', - 'voc', - 'ac3', - 'm4v', - 'm4p', - 'm4b', - 'f4v', - 'f4p', - 'f4b', - 'f4a', - 'mie', - 'asf', - 'ogm', - 'ogx', - 'mpc', - 'arrow', - 'shp', - 'aac', - 'mp1', - 'it', - 's3m', - 'xm', - 'ai', - 'skp', - 'avif', - 'eps', - 'lzh', - 'pgp', - 'asar', - 'stl', - 'chm', - '3mf', - 'zst', - 'jxl', - 'vcf' - ], - mimeTypes: [ - 'image/jpeg', - 'image/png', - 'image/gif', - 'image/webp', - 'image/flif', - 'image/x-xcf', - 'image/x-canon-cr2', - 'image/x-canon-cr3', - 'image/tiff', - 'image/bmp', - 'image/vnd.ms-photo', - 'image/vnd.adobe.photoshop', - 'application/x-indesign', - 'application/epub+zip', - 'application/x-xpinstall', - 'application/vnd.oasis.opendocument.text', - 'application/vnd.oasis.opendocument.spreadsheet', - 'application/vnd.oasis.opendocument.presentation', - 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', - 'application/vnd.openxmlformats-officedocument.presentationml.presentation', - 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', - 'application/zip', - 'application/x-tar', - 'application/x-rar-compressed', - 'application/gzip', - 'application/x-bzip2', - 'application/x-7z-compressed', - 'application/x-apple-diskimage', - 'application/x-apache-arrow', - 'video/mp4', - 'audio/midi', - 'video/x-matroska', - 'video/webm', - 'video/quicktime', - 'video/vnd.avi', - 'audio/vnd.wave', - 'audio/qcelp', - 'audio/x-ms-asf', - 'video/x-ms-asf', - 'application/vnd.ms-asf', - 'video/mpeg', - 'video/3gpp', - 'audio/mpeg', - 'audio/mp4', // RFC 4337 - 'audio/opus', - 'video/ogg', - 'audio/ogg', - 'application/ogg', - 'audio/x-flac', - 'audio/ape', - 'audio/wavpack', - 'audio/amr', - 'application/pdf', - 'application/x-msdownload', - 'application/x-shockwave-flash', - 'application/rtf', - 'application/wasm', - 'font/woff', - 'font/woff2', - 'application/vnd.ms-fontobject', - 'font/ttf', - 'font/otf', - 'image/x-icon', - 'video/x-flv', - 'application/postscript', - 'application/eps', - 'application/x-xz', - 'application/x-sqlite3', - 'application/x-nintendo-nes-rom', - 'application/x-google-chrome-extension', - 'application/vnd.ms-cab-compressed', - 'application/x-deb', - 'application/x-unix-archive', - 'application/x-rpm', - 'application/x-compress', - 'application/x-lzip', - 'application/x-cfb', - 'application/x-mie', - 'application/mxf', - 'video/mp2t', - 'application/x-blender', - 'image/bpg', - 'image/jp2', - 'image/jpx', - 'image/jpm', - 'image/mj2', - 'audio/aiff', - 'application/xml', - 'application/x-mobipocket-ebook', - 'image/heif', - 'image/heif-sequence', - 'image/heic', - 'image/heic-sequence', - 'image/icns', - 'image/ktx', - 'application/dicom', - 'audio/x-musepack', - 'text/calendar', - 'text/vcard', - 'model/gltf-binary', - 'application/vnd.tcpdump.pcap', - 'audio/x-dsf', // Non-standard - 'application/x.ms.shortcut', // Invented by us - 'application/x.apple.alias', // Invented by us - 'audio/x-voc', - 'audio/vnd.dolby.dd-raw', - 'audio/x-m4a', - 'image/apng', - 'image/x-olympus-orf', - 'image/x-sony-arw', - 'image/x-adobe-dng', - 'image/x-nikon-nef', - 'image/x-panasonic-rw2', - 'image/x-fujifilm-raf', - 'video/x-m4v', - 'video/3gpp2', - 'application/x-esri-shape', - 'audio/aac', - 'audio/x-it', - 'audio/x-s3m', - 'audio/x-xm', - 'video/MP1S', - 'video/MP2P', - 'application/vnd.sketchup.skp', - 'image/avif', - 'application/x-lzh-compressed', - 'application/pgp-encrypted', - 'application/x-asar', - 'model/stl', - 'application/vnd.ms-htmlhelp', - 'model/3mf', - 'image/jxl', - 'application/zstd' - ] -}; +var fs = __webpack_require__(167); +var url = __webpack_require__(83); +var transports = __webpack_require__(1274); +var path = __webpack_require__(160); +var lsmod = __webpack_require__(1276); +var stacktrace = __webpack_require__(1277); +var stringify = __webpack_require__(1270); +var ravenVersion = __webpack_require__(1278).version; -/***/ }), -/* 1247 */ -/***/ (function(module, exports, __webpack_require__) { +var protocolMap = { + http: 80, + https: 443 +}; -/** - * Saves the data into the cozy blindly without check. - * - * @module addData - */ -const bluebird = __webpack_require__(25); +var consoleAlerts = new Set(); -const omit = __webpack_require__(632); +// Default Node.js REPL depth +var MAX_SERIALIZE_EXCEPTION_DEPTH = 3; +// 50kB, as 100kB is max payload size, so half sounds reasonable +var MAX_SERIALIZE_EXCEPTION_SIZE = 50 * 1024; +var MAX_SERIALIZE_KEYS_LENGTH = 40; -const log = __webpack_require__(2).namespace('addData'); +function utf8Length(value) { + return ~-encodeURI(value).split(/%..|./).length; +} -const { - getCozyMetadata -} = __webpack_require__(836); -/** - * Saves the data into the cozy blindly without check. - * - * You need at least the `POST` permission for the given doctype in your manifest, to be able to - * use this function. - * - * Parameters: - * - * `documents`: an array of objects corresponding to the data you want to save in the cozy - * `doctype` (string): the doctype where you want to save data (ex: 'io.cozy.bills') - * `options` (object): option object - * + `sourceAccount` (String): id of the source account - * + `sourceAccountIdentifier` (String): identifier unique to the account targetted by the connector. It is the login most of the time - * - * ```javascript - * const documents = [ - * { - * name: 'toto', - * height: 1.8 - * }, - * { - * name: 'titi', - * height: 1.7 - * } - * ] - * - * return addData(documents, 'io.cozy.height') - * ``` - * - * @alias module:addData - */ +function jsonSize(value) { + return utf8Length(JSON.stringify(value)); +} +function isError(what) { + return ( + Object.prototype.toString.call(what) === '[object Error]' || what instanceof Error + ); +} -const addData = (entries, doctype, options = {}) => { - const cozy = __webpack_require__(485); +module.exports.isError = isError; - return bluebird.mapSeries(entries, async entry => { - log('debug', entry, 'Adding this entry'); - const metaEntry = { - cozyMetadata: getCozyMetadata({ ...entry.cozyMetadata, - sourceAccount: options.sourceAccount, - sourceAccountIdentifier: options.sourceAccountIdentifier - }), - ...entry - }; - const dbEntry = await (metaEntry._id ? cozy.data.update(doctype, metaEntry, omit(metaEntry, '_rev')) : cozy.data.create(doctype, metaEntry)); // Also update the original entry _id to allow saveBills' - // linkBankOperation entries to have an id +function isPlainObject(what) { + return Object.prototype.toString.call(what) === '[object Object]'; +} - metaEntry._id = dbEntry._id; - return dbEntry; - }); -}; +module.exports.isPlainObject = isPlainObject; -module.exports = addData; +function serializeValue(value) { + var maxLength = 40; -/***/ }), -/* 1248 */ -/***/ (function(module, exports, __webpack_require__) { + if (typeof value === 'string') { + return value.length <= maxLength ? value : value.substr(0, maxLength - 1) + '\u2026'; + } else if ( + typeof value === 'number' || + typeof value === 'boolean' || + typeof value === 'undefined' + ) { + return value; + } -/** - * Finds links between bills and bank operations. - * - * @module linkBankOperations - */ -const bluebird = __webpack_require__(25); + var type = Object.prototype.toString.call(value); -const log = __webpack_require__(2).namespace('linkBankOperations'); + // Node.js REPL notation + if (type === '[object Object]') return '[Object]'; + if (type === '[object Array]') return '[Array]'; + if (type === '[object Function]') + return value.name ? '[Function: ' + value.name + ']' : '[Function]'; -const { - findDebitOperation, - findCreditOperation -} = __webpack_require__(1249); + return value; +} -const fs = __webpack_require__(167); +function serializeObject(value, depth) { + if (depth === 0) return serializeValue(value); -const defaults = __webpack_require__(1258); + if (isPlainObject(value)) { + return Object.keys(value).reduce(function(acc, key) { + acc[key] = serializeObject(value[key], depth - 1); + return acc; + }, {}); + } else if (Array.isArray(value)) { + return value.map(function(val) { + return serializeObject(val, depth - 1); + }); + } -const groupBy = __webpack_require__(730); + return serializeValue(value); +} -const flatten = __webpack_require__(559); +function serializeException(ex, depth, maxSize) { + if (!isPlainObject(ex)) return ex; -const sumBy = __webpack_require__(1215); + depth = typeof depth !== 'number' ? MAX_SERIALIZE_EXCEPTION_DEPTH : depth; + maxSize = typeof depth !== 'number' ? MAX_SERIALIZE_EXCEPTION_SIZE : maxSize; -const geco = __webpack_require__(1259); + var serialized = serializeObject(ex, depth); -const { - format -} = __webpack_require__(892); + if (jsonSize(stringify(serialized)) > maxSize) { + return serializeException(ex, depth - 1); + } -const cozyClient = __webpack_require__(485); + return serialized; +} -const DOCTYPE_OPERATIONS = 'io.cozy.bank.operations'; -const DEFAULT_AMOUNT_DELTA = 0.001; -const DEFAULT_PAST_WINDOW = 15; -const DEFAULT_FUTURE_WINDOW = 29; +module.exports.serializeException = serializeException; -const fmtDate = function (x) { - return new Date(x).toISOString().substr(0, 10); -}; +function serializeKeysForMessage(keys, maxLength) { + if (typeof keys === 'number' || typeof keys === 'string') return keys.toString(); + if (!Array.isArray(keys)) return ''; -const getBillDate = bill => bill.originalDate || bill.date; + keys = keys.filter(function(key) { + return typeof key === 'string'; + }); + if (keys.length === 0) return '[object has no keys]'; -class Linker { - constructor(cozyClient) { - this.cozyClient = cozyClient; - this.toUpdate = []; - this.groupVendors = ['Numéricable', 'Ameli', 'MGEN', 'Humanis']; + maxLength = typeof maxLength !== 'number' ? MAX_SERIALIZE_KEYS_LENGTH : maxLength; + if (keys[0].length >= maxLength) return keys[0]; + + for (var usedKeys = keys.length; usedKeys > 0; usedKeys--) { + var serialized = keys.slice(0, usedKeys).join(', '); + if (serialized.length > maxLength) continue; + if (usedKeys === keys.length) return serialized; + return serialized + '\u2026'; } - async removeBillsFromOperations(bills, operations) { - log('debug', `Removing ${bills.length} bills from bank operations`); + return ''; +} - for (let op of operations) { - let needUpdate = false; - let billsAttribute = op.bills || []; +module.exports.serializeKeysForMessage = serializeKeysForMessage; - for (let bill of bills) { - const billLongId = `io.cozy.bills:${bill._id}`; // if bill id found in op bills, do something +module.exports.disableConsoleAlerts = function disableConsoleAlerts() { + consoleAlerts = false; +}; - if (billsAttribute.indexOf(billLongId) >= 0) { - needUpdate = true; - billsAttribute = billsAttribute.filter(billId => billId !== billLongId && billId !== `io.cozy.bills:${bill.original}`); +module.exports.enableConsoleAlerts = function enableConsoleAlerts() { + consoleAlerts = new Set(); +}; - if (bill.original) { - billsAttribute.push(`io.cozy.bills:${bill.original}`); - } - } - } +module.exports.consoleAlert = function consoleAlert(msg) { + if (consoleAlerts) { + console.warn('raven@' + ravenVersion + ' alert: ' + msg); + } +}; - if (needUpdate) { - log('info', `Bank operation ${op._id}: Replacing ${JSON.stringify(op.bills)} by ${JSON.stringify(billsAttribute)}`); - await this.updateAttributes(DOCTYPE_OPERATIONS, op, { - bills: billsAttribute - }); - } - } +module.exports.consoleAlertOnce = function consoleAlertOnce(msg) { + if (consoleAlerts && !consoleAlerts.has(msg)) { + consoleAlerts.add(msg); + console.warn('raven@' + ravenVersion + ' alert: ' + msg); } +}; - addBillToOperation(bill, operation) { - if (!bill._id) { - log('warn', 'bill has no id, impossible to add it to an operation'); - return Promise.resolve(); +module.exports.extend = + Object.assign || + function(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (Object.prototype.hasOwnProperty.call(source, key)) { + target[key] = source[key]; + } + } } + return target; + }; - const billId = `io.cozy.bills:${bill._id}`; - - if (operation.bills && operation.bills.indexOf(billId) > -1) { - return Promise.resolve(); - } +module.exports.getAuthHeader = function getAuthHeader(timestamp, apiKey, apiSecret) { + var header = ['Sentry sentry_version=5']; + header.push('sentry_timestamp=' + timestamp); + header.push('sentry_client=raven-node/' + ravenVersion); + header.push('sentry_key=' + apiKey); + if (apiSecret) header.push('sentry_secret=' + apiSecret); + return header.join(', '); +}; - const billIds = operation.bills || []; - billIds.push(billId); - const attributes = { - bills: billIds - }; - return this.updateAttributes(DOCTYPE_OPERATIONS, operation, attributes); +module.exports.parseDSN = function parseDSN(dsn) { + if (!dsn) { + // Let a falsey value return false explicitly + return false; } + try { + var parsed = url.parse(dsn), + response = { + protocol: parsed.protocol.slice(0, -1), + public_key: parsed.auth.split(':')[0], + host: parsed.host.split(':')[0] + }; - addReimbursementToOperation(bill, debitOperation, matchingOperation) { - if (!bill._id) { - log('warn', 'bill has no id, impossible to add it as a reimbursement'); - return Promise.resolve(); + if (parsed.auth.split(':')[1]) { + response.private_key = parsed.auth.split(':')[1]; } - const billId = `io.cozy.bills:${bill._id}`; + if (~response.protocol.indexOf('+')) { + response.protocol = response.protocol.split('+')[1]; + } - if (debitOperation.reimbursements && debitOperation.reimbursements.map(b => b.billId).indexOf(billId) > -1) { - return Promise.resolve(); + if (!transports.hasOwnProperty(response.protocol)) { + throw new Error('Invalid transport'); } - const reimbursements = debitOperation.reimbursements || []; - reimbursements.push({ - billId, - amount: bill.amount, - operationId: matchingOperation && matchingOperation._id - }); - return this.updateAttributes(DOCTYPE_OPERATIONS, debitOperation, { - reimbursements: reimbursements - }); + var index = parsed.pathname.lastIndexOf('/'); + response.path = parsed.pathname.substr(0, index + 1); + response.project_id = parsed.pathname.substr(index + 1); + response.port = ~~parsed.port || protocolMap[response.protocol] || 443; + return response; + } catch (e) { + throw new Error('Invalid Sentry DSN: ' + dsn); } - /* Buffer update operations */ +}; +module.exports.getTransaction = function getTransaction(frame) { + if (frame.module || frame.function) { + return (frame.module || '?') + ' at ' + (frame.function || '?'); + } + return '<unknown>'; +}; - updateAttributes(doctype, doc, attrs) { - Object.assign(doc, attrs); - this.toUpdate.push(doc); - return Promise.resolve(); +var moduleCache; +module.exports.getModules = function getModules() { + if (!moduleCache) { + moduleCache = lsmod(); } - /* Commit updates */ + return moduleCache; +}; +module.exports.fill = function(obj, name, replacement, track) { + var orig = obj[name]; + obj[name] = replacement(orig); + if (track) { + track.push([obj, name, orig]); + } +}; - commitChanges() { - log('debug', `linkBankOperations: commiting ${this.toUpdate.length} changes`); - return cozyClient.fetchJSON('POST', `/data/${DOCTYPE_OPERATIONS}/_bulk_docs`, { - docs: this.toUpdate - }); +var LINES_OF_CONTEXT = 7; + +function getFunction(line) { + try { + return ( + line.getFunctionName() || + line.getTypeName() + '.' + (line.getMethodName() || '<anonymous>') + ); + } catch (e) { + // This seems to happen sometimes when using 'use strict', + // stemming from `getTypeName`. + // [TypeError: Cannot read property 'constructor' of undefined] + return '<anonymous>'; } +} - getOptions(opts = {}) { - const options = { ...opts - }; +var mainModule = + ((__webpack_require__.c[__webpack_require__.s] && __webpack_require__.c[__webpack_require__.s].filename && path.dirname(__webpack_require__.c[__webpack_require__.s].filename)) || + global.process.cwd()) + '/'; - if (typeof options.identifiers === 'string') { - options.identifiers = [options.identifiers.toLowerCase()]; - } else if (Array.isArray(options.identifiers)) { - options.identifiers = options.identifiers.map(id => id.toLowerCase()); - } else { - throw new Error('linkBankOperations cannot be called without "identifiers" option'); - } +function getModule(filename, base) { + if (!base) base = mainModule; - defaults(options, { - amountDelta: DEFAULT_AMOUNT_DELTA - }); - defaults(options, { - minAmountDelta: options.amountDelta, - maxAmountDelta: options.amountDelta, - pastWindow: DEFAULT_PAST_WINDOW, - futureWindow: DEFAULT_FUTURE_WINDOW - }); - return options; + // It's specifically a module + var file = path.basename(filename, '.js'); + filename = path.dirname(filename); + var n = filename.lastIndexOf('/node_modules/'); + if (n > -1) { + // /node_modules/ is 14 chars + return filename.substr(n + 14).replace(/\//g, '.') + ':' + file; + } + // Let's see if it's a part of the main module + // To be a part of main module, it has to share the same base + n = (filename + '/').lastIndexOf(base, 0); + if (n === 0) { + var module = filename.substr(base.length).replace(/\//g, '.'); + if (module) module += ':'; + module += file; + return module; } + return file; +} - async linkBillToCreditOperation(bill, debitOperation, allOperations, options) { - const creditOperation = await findCreditOperation(this.cozyClient, bill, options, allOperations); - const promises = []; +function readSourceFiles(filenames, cb) { + // we're relying on filenames being de-duped already + if (filenames.length === 0) return setTimeout(cb, 0, {}); - if (creditOperation) { - promises.push(this.addBillToOperation(bill, creditOperation)); - } + var sourceFiles = {}; + var numFilesToRead = filenames.length; + return filenames.forEach(function(filename) { + fs.readFile(filename, function(readErr, file) { + if (!readErr) sourceFiles[filename] = file.toString().split('\n'); + if (--numFilesToRead === 0) cb(sourceFiles); + }); + }); +} - if (creditOperation && debitOperation) { - log('debug', `reimbursement: Matching bill ${bill.subtype || bill.filename} (${fmtDate(bill.date)}) with credit operation ${creditOperation.label} (${fmtDate(creditOperation.date)})`); - promises.push(this.addReimbursementToOperation(bill, debitOperation, creditOperation)); - } +// This is basically just `trim_line` from https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 +function snipLine(line, colno) { + var ll = line.length; + if (ll <= 150) return line; + if (colno > ll) colno = ll; - await Promise.all(promises); - return creditOperation; - } + var start = Math.max(colno - 60, 0); + if (start < 5) start = 0; - async linkBillToDebitOperation(bill, allOperations, options) { - return findDebitOperation(this.cozyClient, bill, options, allOperations).then(operation => { - if (operation) { - log('debug', `bills: Matching bill ${bill.subtype || bill.filename} (${fmtDate(bill.date)}) with debit operation ${operation.label} (${fmtDate(operation.date)})`); - return this.addBillToOperation(bill, operation).then(() => operation); - } - }); - } - /** - * Link bills to - * - their matching banking operation (debit) - * - to their reimbursement (credit) - */ + var end = Math.min(start + 140, ll); + if (end > ll - 5) end = ll; + if (end === ll) start = Math.max(end - 140, 0); + line = line.slice(start, end); + if (start > 0) line = '{snip} ' + line; + if (end < ll) line += ' {snip}'; - async linkBillsToOperations(bills, options) { - options = this.getOptions(options); - const result = {}; - const allOperations = await this.cozyClient.data.findAll('io.cozy.bank.operations'); + return line; +} - if (options.billsToRemove && options.billsToRemove.length) { - this.removeBillsFromOperations(options.billsToRemove, allOperations); - } // when bill comes from a third party payer, - // no transaction is visible on the bank account +function snipLine0(line) { + return snipLine(line, 0); +} +function parseStack(err, cb) { + if (!err) return cb([]); - bills = bills.filter(bill => !bill.isThirdPartyPayer === true); - await bluebird.each(bills, async bill => { - const res = result[bill._id] = { - bill: bill - }; // the bills combination phase is very time consuming. We can avoid it when we run the - // connector in standalone mode + var stack = stacktrace.parse(err); + if (!stack || !Array.isArray(stack) || !stack.length || !stack[0].getFileName) { + // the stack is not the useful thing we were expecting :/ + return cb([]); + } - if (allOperations.length === 0) { - return result; - } + // Sentry expects the stack trace to be oldest -> newest, v8 provides newest -> oldest + stack.reverse(); - const debitOperation = await this.linkBillToDebitOperation(bill, allOperations, options); + var frames = []; + var filesToRead = {}; + stack.forEach(function(line) { + var frame = { + filename: line.getFileName() || '', + lineno: line.getLineNumber(), + colno: line.getColumnNumber(), + function: getFunction(line) + }; - if (debitOperation) { - res.debitOperation = debitOperation; - } + var isInternal = + line.isNative() || + (frame.filename[0] !== '/' && + frame.filename[0] !== '.' && + frame.filename.indexOf(':\\') !== 1); - if (bill.isRefund) { - const creditOperation = await this.linkBillToCreditOperation(bill, debitOperation, allOperations, options); + // in_app is all that's not an internal Node function or a module within node_modules + // note that isNative appears to return true even for node core libraries + // see https://github.com/getsentry/raven-node/issues/176 + frame.in_app = !isInternal && frame.filename.indexOf('node_modules/') === -1; - if (creditOperation) { - res.creditOperation = creditOperation; + // Extract a module name based on the filename + if (frame.filename) { + frame.module = getModule(frame.filename); + if (!isInternal) filesToRead[frame.filename] = true; + } + + frames.push(frame); + }); + + return readSourceFiles(Object.keys(filesToRead), function(sourceFiles) { + frames.forEach(function(frame) { + if (frame.filename && sourceFiles[frame.filename]) { + var lines = sourceFiles[frame.filename]; + try { + frame.pre_context = lines + .slice(Math.max(0, frame.lineno - (LINES_OF_CONTEXT + 1)), frame.lineno - 1) + .map(snipLine0); + frame.context_line = snipLine(lines[frame.lineno - 1], frame.colno); + frame.post_context = lines + .slice(frame.lineno, frame.lineno + LINES_OF_CONTEXT) + .map(snipLine0); + } catch (e) { + // anomaly, being defensive in case + // unlikely to ever happen in practice but can definitely happen in theory } } }); - await this.findCombinations(result, options, allOperations); - await this.commitChanges(); - return result; - } - async findCombinations(result, options, allOperations) { - log('debug', 'finding combinations'); - let found; + cb(frames); + }); +} - do { - found = false; - const unlinkedBills = this.getUnlinkedBills(result); - log('debug', `findCombinations: There are ${unlinkedBills.length} unlinked bills`); - const billsGroups = this.groupBills(unlinkedBills); - log('debug', `findCombinations: Groups: ${billsGroups.length}`); - const combinations = flatten(billsGroups.map(billsGroup => this.generateBillsCombinations(billsGroup))); - log('debug', `Generated ${combinations.length} bills combinations`); - const combinedBills = combinations.map(combination => this.combineBills(...combination)); +// expose basically for testing because I don't know what I'm doing +module.exports.parseStack = parseStack; +module.exports.getModule = getModule; - for (const combinedBill of combinedBills) { - const debitOperation = await findDebitOperation(this.cozyClient, combinedBill, options, allOperations); - if (debitOperation) { - found = true; - log('debug', combinedBill, 'Matching bills combination'); - log('debug', debitOperation, 'Matching debit debitOperation'); - combinedBill.originalBills.forEach(async originalBill => { - const res = result[originalBill._id]; - res.debitOperation = debitOperation; +/***/ }), +/* 1274 */ +/***/ (function(module, exports, __webpack_require__) { - if (res.creditOperation && res.debitOperation) { - await this.addReimbursementToOperation(originalBill, debitOperation, res.creditOperation); - } - }); - break; - } - } - } while (found); +"use strict"; - return result; - } - getUnlinkedBills(bills) { - const unlinkedBills = Object.values(bills).filter(bill => !bill.debitOperation).map(bill => bill.bill); - return unlinkedBills; - } +var events = __webpack_require__(271); +var util = __webpack_require__(9); +var timeoutReq = __webpack_require__(1275); - billCanBeGrouped(bill) { - return getBillDate(bill) && (bill.type === 'health_costs' || this.groupVendors.includes(bill.vendor)); - } +var http = __webpack_require__(98); +var https = __webpack_require__(99); - groupBills(bills) { - const billsToGroup = bills.filter(bill => this.billCanBeGrouped(bill)); - const groups = groupBy(billsToGroup, bill => { - return [format(new Date(getBillDate(bill)), 'yyyy-MM-dd'), bill.vendor]; - }); - return Object.values(groups); +var agentOptions = {keepAlive: true, maxSockets: 100}; +var httpAgent = new http.Agent(agentOptions); +var httpsAgent = new https.Agent(agentOptions); + +function Transport() {} +util.inherits(Transport, events.EventEmitter); + +function HTTPTransport(options) { + this.defaultPort = 80; + this.transport = http; + this.options = options || {}; + this.agent = httpAgent; +} +util.inherits(HTTPTransport, Transport); +HTTPTransport.prototype.send = function(client, message, headers, eventId, cb) { + var options = { + hostname: client.dsn.host, + path: client.dsn.path + 'api/' + client.dsn.project_id + '/store/', + headers: headers, + method: 'POST', + port: client.dsn.port || this.defaultPort, + ca: client.ca, + agent: this.agent + }; + for (var key in this.options) { + if (this.options.hasOwnProperty(key)) { + options[key] = this.options[key]; + } } - generateBillsCombinations(bills) { - const MIN_ITEMS_IN_COMBINATION = 2; - const combinations = []; + // prevent off heap memory explosion + var _name = this.agent.getName({host: client.dsn.host, port: client.dsn.port}); + var _requests = this.agent.requests[_name]; + if (_requests && Object.keys(_requests).length > client.maxReqQueueCount) { + // other feedback strategy + client.emit('error', new Error('client req queue is full..')); + return; + } - for (let n = MIN_ITEMS_IN_COMBINATION; n <= bills.length; ++n) { - const combinationsN = geco.gen(bills.length, n, bills); - combinations.push(...combinationsN); + var req = this.transport.request(options, function(res) { + res.setEncoding('utf8'); + if (res.statusCode >= 200 && res.statusCode < 300) { + client.emit('logged', eventId); + cb && cb(null, eventId); + } else { + var reason = res.headers['x-sentry-error']; + var e = new Error('HTTP Error (' + res.statusCode + '): ' + reason); + e.response = res; + e.statusCode = res.statusCode; + e.reason = reason; + e.sendMessage = message; + e.requestHeaders = headers; + e.eventId = eventId; + client.emit('error', e); + cb && cb(e); } - return combinations; - } - - combineBills(...bills) { - return { ...bills[0], - _id: ['combined', ...bills.map(bill => bill._id)].join(':'), - amount: sumBy(bills, bill => bill.amount), - originalAmount: sumBy(bills, bill => bill.originalAmount), - originalBills: bills - }; - } + // force the socket to drain + var noop = function() {}; + res.on('data', noop); + res.on('end', noop); + }); -} + timeoutReq(req, client.sendTimeout * 1000); -const jsonTee = filename => res => { - fs.writeFileSync(filename, JSON.stringify(res, null, 2)); - return res; + var cbFired = false; + req.on('error', function(e) { + client.emit('error', e); + if (!cbFired) { + cb && cb(e); + cbFired = true; + } + }); + req.end(message); }; -/** - * Will soon move to a dedicated service. You should not use it. - * - * Finds links between bills and bank operations. - * - * @alias module:linkBankOperations - */ +function HTTPSTransport(options) { + this.defaultPort = 443; + this.transport = https; + this.options = options || {}; + this.agent = httpsAgent; +} +util.inherits(HTTPSTransport, HTTPTransport); -const linkBankOperations = (bills, doctype, fields, options = {}) => { - // Use the custom bank identifier from user if any - if (fields.bank_identifier && fields.bank_identifier.length) { - options.identifiers = [fields.bank_identifier]; - } +module.exports.http = new HTTPTransport(); +module.exports.https = new HTTPSTransport(); +module.exports.Transport = Transport; +module.exports.HTTPTransport = HTTPTransport; +module.exports.HTTPSTransport = HTTPSTransport; - const cozyClient = __webpack_require__(485); - const linker = new Linker(cozyClient); - const prom = linker.linkBillsToOperations(bills, options).catch(err => { - log('warn', err, 'Problem when linking operations'); - }); +/***/ }), +/* 1275 */ +/***/ (function(module, exports, __webpack_require__) { - if (process.env.LINK_RESULTS_FILENAME) { - prom.then(jsonTee(process.env.LINK_RESULTS_FILENAME)); - } +"use strict"; - return prom; -}; -module.exports = linkBankOperations; -Object.assign(module.exports, { - Linker -}); +module.exports = function (req, time) { + if (req.timeoutTimer) { + return req; + } -/***/ }), -/* 1249 */ -/***/ (function(module, exports, __webpack_require__) { + var delays = isNaN(time) ? time : {socket: time, connect: time}; + var host = req._headers ? (' to ' + req._headers.host) : ''; -const { - operationsFilters -} = __webpack_require__(1250); + if (delays.connect !== undefined) { + req.timeoutTimer = setTimeout(function timeoutHandler() { + req.abort(); + var e = new Error('Connection timed out on request' + host); + e.code = 'ETIMEDOUT'; + req.emit('error', e); + }, delays.connect); + } -const { - findNeighboringOperations -} = __webpack_require__(1257); + // Clear the connection timeout timer once a socket is assigned to the + // request and is connected. + req.on('socket', function assign(socket) { + // Socket may come from Agent pool and may be already connected. + if (!(socket.connecting || socket._connecting)) { + connect(); + return; + } -const { - sortedOperations -} = __webpack_require__(1256); + socket.once('connect', connect); + }); -const findOperation = (cozyClient, bill, options, allOperations) => { - // By default, a bill is an expense. If it is not, it should be - // declared as a refund: isRefund=true. - if (options.credit && !bill.isRefund) return; - return findNeighboringOperations(cozyClient, bill, options, allOperations).then(operations => { - operations = operationsFilters(bill, operations, options); - operations = sortedOperations(bill, operations); - return operations[0]; - }); -}; + function clear() { + if (req.timeoutTimer) { + clearTimeout(req.timeoutTimer); + req.timeoutTimer = null; + } + } -const findDebitOperation = findOperation; + function connect() { + clear(); -const findCreditOperation = (cozyClient, bill, options, allOperations) => { - const creditOptions = Object.assign({}, options, { - credit: true - }); - return findOperation(cozyClient, bill, creditOptions, allOperations); -}; + if (delays.socket !== undefined) { + // Abort the request if there is no activity on the socket for more + // than `delays.socket` milliseconds. + req.setTimeout(delays.socket, function socketTimeoutHandler() { + req.abort(); + var e = new Error('Socket timed out on request' + host); + e.code = 'ESOCKETTIMEDOUT'; + req.emit('error', e); + }); + } + } -module.exports = { - findDebitOperation, - findCreditOperation + return req.on('error', clear); }; + /***/ }), -/* 1250 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { -const includes = __webpack_require__(1251); +"use strict"; -const some = __webpack_require__(1254); -const sumBy = __webpack_require__(1215); +// Original repository: https://github.com/defunctzombie/node-lsmod/ +// +// [2018-02-09] @kamilogorek - Handle scoped packages structure -const { - isWithinInterval -} = __webpack_require__(892); +// builtin +var fs = __webpack_require__(167); +var path = __webpack_require__(160); -const { - getIdentifiers, - getDateRangeFromBill, - getAmountRangeFromBill -} = __webpack_require__(1256); // constants +// node 0.6 support +fs.existsSync = fs.existsSync || path.existsSync; +// mainPaths are the paths where our mainprog will be able to load from +// we store these to avoid grabbing the modules that were loaded as a result +// of a dependency module loading its dependencies, we only care about deps our +// mainprog loads +var mainPaths = (__webpack_require__.c[__webpack_require__.s] && __webpack_require__.c[__webpack_require__.s].paths) || []; -const HEALTH_VENDORS = ['Ameli', 'Harmonie', 'Malakoff Mederic', 'MGEN', 'Generali', 'ascoreSante', 'EoviMCD', 'Humanis', 'Alan', 'lamutuellegenerale']; // TODO: to import from each konnector +module.exports = function() { + var paths = Object.keys(__webpack_require__.c || []); -const HEALTH_EXPENSE_CAT = '400610'; -const HEALTH_INSURANCE_CAT = '400620'; -const UNCATEGORIZED_CAT_ID_OPERATION = '0'; // TODO: import it from cozy-bank -// helpers + // module information + var infos = {}; -const getCategoryId = o => { - return o.manualCategoryId || o.automaticCategoryId || UNCATEGORIZED_CAT_ID_OPERATION; -}; + // paths we have already inspected to avoid traversing again + var seen = {}; -const isHealthOperation = operation => { - const catId = getCategoryId(operation); + paths.forEach(function(p) { + /* eslint-disable consistent-return */ - if (operation.amount < 0) { - return catId === HEALTH_EXPENSE_CAT; - } else { - return catId === HEALTH_EXPENSE_CAT || catId === HEALTH_INSURANCE_CAT; - } -}; + var dir = p; -const isUncategorizedOperation = operation => { - const catId = getCategoryId(operation); - return catId == UNCATEGORIZED_CAT_ID_OPERATION; -}; + (function updir() { + var orig = dir; + dir = path.dirname(orig); -const isHealthBill = bill => { - return includes(HEALTH_VENDORS, bill.vendor); -}; // filters + if (/@[^/]+$/.test(dir)) { + dir = path.dirname(dir); + } + if (!dir || orig === dir || seen[orig]) { + return; + } else if (mainPaths.indexOf(dir) < 0) { + return updir(); + } -const filterByIdentifiers = identifiers => { - identifiers = identifiers.map(i => i.toLowerCase()); + var pkgfile = path.join(orig, 'package.json'); + var exists = fs.existsSync(pkgfile); - const identifierFilter = operation => { - const label = operation.label.toLowerCase(); - return some(identifiers, identifier => includes(label, identifier)); - }; + seen[orig] = true; - return identifierFilter; -}; + // travel up the tree if no package.json here + if (!exists) { + return updir(); + } -const filterByDates = ({ - minDate, - maxDate -}) => { - const dateFilter = operation => { - return isWithinInterval(new Date(operation.date), { - start: new Date(minDate), - end: new Date(maxDate) - }); - }; + try { + var info = JSON.parse(fs.readFileSync(pkgfile, 'utf8')); + infos[info.name] = info.version; + } catch (e) {} + })(); - return dateFilter; + /* eslint-enable consistent-return */ + }); + + return infos; }; -const filterByAmounts = ({ - minAmount, - maxAmount -}) => { - const amountFilter = operation => { - return operation.amount >= minAmount && operation.amount <= maxAmount; - }; - return amountFilter; -}; +/***/ }), +/* 1277 */ +/***/ (function(module, exports) { -const filterByCategory = (bill, options = {}) => { - const isHealth = isHealthBill(bill); +exports.get = function(belowFn) { + var oldLimit = Error.stackTraceLimit; + Error.stackTraceLimit = Infinity; - const categoryFilter = operation => { - if (options.allowUncategorized === true && isUncategorizedOperation(operation)) { - return true; - } + var dummyObject = {}; - return isHealth ? isHealthOperation(operation) : !isHealthOperation(operation); + var v8Handler = Error.prepareStackTrace; + Error.prepareStackTrace = function(dummyObject, v8StackTrace) { + return v8StackTrace; }; + Error.captureStackTrace(dummyObject, belowFn || exports.get); - return categoryFilter; + var v8StackTrace = dummyObject.stack; + Error.prepareStackTrace = v8Handler; + Error.stackTraceLimit = oldLimit; + + return v8StackTrace; }; -/** - * Check that the sum of the reimbursements + the amount of the bill is not - * greater that the amount of the operation - */ +exports.parse = function(err) { + if (!err.stack) { + return []; + } -const filterByReimbursements = bill => { - const reimbursementFilter = operation => { - const sumReimbursements = sumBy(operation.reimbursements, 'amount'); - return sumReimbursements + bill.amount <= -operation.amount; - }; + var self = this; + var lines = err.stack.split('\n').slice(1); - return reimbursementFilter; -}; // combine filters + return lines + .map(function(line) { + if (line.match(/^\s*[-]{4,}$/)) { + return self._createParsedCallSite({ + fileName: line, + lineNumber: null, + functionName: null, + typeName: null, + methodName: null, + columnNumber: null, + 'native': null, + }); + } + + var lineMatch = line.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/); + if (!lineMatch) { + return; + } + var object = null; + var method = null; + var functionName = null; + var typeName = null; + var methodName = null; + var isNative = (lineMatch[5] === 'native'); -const operationsFilters = (bill, operations, options) => { - const filterByConditions = filters => op => { - for (let f of filters) { - const res = f(op); + if (lineMatch[1]) { + functionName = lineMatch[1]; + var methodStart = functionName.lastIndexOf('.'); + if (functionName[methodStart-1] == '.') + methodStart--; + if (methodStart > 0) { + object = functionName.substr(0, methodStart); + method = functionName.substr(methodStart + 1); + var objectEnd = object.indexOf('.Module'); + if (objectEnd > 0) { + functionName = functionName.substr(objectEnd + 1); + object = object.substr(0, objectEnd); + } + } + typeName = null; + } - if (!res) { - return false; + if (method) { + typeName = object; + methodName = method; } - } - return true; - }; + if (method === '<anonymous>') { + methodName = null; + functionName = null; + } - const fByDates = filterByDates(getDateRangeFromBill(bill, options)); - const fByAmounts = filterByAmounts(getAmountRangeFromBill(bill, options)); - const fByCategory = filterByCategory(bill, options); - const fByReimbursements = filterByReimbursements(bill, options); - const conditions = [fByDates, fByAmounts, fByCategory]; + var properties = { + fileName: lineMatch[2] || null, + lineNumber: parseInt(lineMatch[3], 10) || null, + functionName: functionName, + typeName: typeName, + methodName: methodName, + columnNumber: parseInt(lineMatch[4], 10) || null, + 'native': isNative, + }; - if (!options.credit) { - conditions.push(fByReimbursements); - } // We filters with identifiers when - // - we search a credit operation - // - or when is bill is in the health category + return self._createParsedCallSite(properties); + }) + .filter(function(callSite) { + return !!callSite; + }); +}; +function CallSite(properties) { + for (var property in properties) { + this[property] = properties[property]; + } +} - if (options.credit || !isHealthBill(bill)) { - const fbyIdentifiers = filterByIdentifiers(getIdentifiers(options)); - conditions.push(fbyIdentifiers); +var strProperties = [ + 'this', + 'typeName', + 'functionName', + 'methodName', + 'fileName', + 'lineNumber', + 'columnNumber', + 'function', + 'evalOrigin' +]; +var boolProperties = [ + 'topLevel', + 'eval', + 'native', + 'constructor' +]; +strProperties.forEach(function (property) { + CallSite.prototype[property] = null; + CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () { + return this[property]; + } +}); +boolProperties.forEach(function (property) { + CallSite.prototype[property] = false; + CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () { + return this[property]; } +}); - return operations.filter(filterByConditions(conditions)); +exports._createParsedCallSite = function(properties) { + return new CallSite(properties); }; -module.exports = { - filterByIdentifiers, - filterByDates, - filterByAmounts, - filterByCategory, - filterByReimbursements, - operationsFilters -}; /***/ }), -/* 1251 */ -/***/ (function(module, exports, __webpack_require__) { +/* 1278 */ +/***/ (function(module) { -var baseIndexOf = __webpack_require__(477), - isArrayLike = __webpack_require__(458), - isString = __webpack_require__(74), - toInteger = __webpack_require__(643), - values = __webpack_require__(1252); +module.exports = JSON.parse("{\"name\":\"raven\",\"description\":\"A standalone (Node.js) client for Sentry\",\"keywords\":[\"debugging\",\"errors\",\"exceptions\",\"logging\",\"raven\",\"sentry\"],\"version\":\"2.6.4\",\"repository\":\"git://github.com/getsentry/raven-js.git\",\"license\":\"BSD-2-Clause\",\"homepage\":\"https://github.com/getsentry/raven-js\",\"author\":\"Matt Robenolt <matt@ydekproductions.com>\",\"main\":\"index.js\",\"bin\":{\"raven\":\"./bin/raven\"},\"scripts\":{\"lint\":\"eslint .\",\"test\":\"NODE_ENV=test istanbul cover _mocha -- --reporter dot && NODE_ENV=test coffee ./test/run.coffee\",\"test-mocha\":\"NODE_ENV=test mocha\",\"test-full\":\"npm run test && cd test/instrumentation && ./run.sh\"},\"engines\":{\"node\":\">= 4.0.0\"},\"dependencies\":{\"cookie\":\"0.3.1\",\"md5\":\"^2.2.1\",\"stack-trace\":\"0.0.10\",\"timed-out\":\"4.0.1\",\"uuid\":\"3.3.2\"},\"devDependencies\":{\"coffee-script\":\"~1.10.0\",\"connect\":\"*\",\"eslint\":\"^4.5.0\",\"eslint-config-prettier\":\"^2.3.0\",\"express\":\"*\",\"glob\":\"~3.1.13\",\"istanbul\":\"^0.4.3\",\"mocha\":\"~3.1.2\",\"nock\":\"~9.0.0\",\"prettier\":\"^1.6.1\",\"should\":\"11.2.0\",\"sinon\":\"^3.3.0\"},\"prettier\":{\"singleQuote\":true,\"bracketSpacing\":false,\"printWidth\":90}}"); -/* Built-in method references for those with the same name as other `lodash` methods. */ -var nativeMax = Math.max; +/***/ }), +/* 1279 */ +/***/ (function(module, exports, __webpack_require__) { -/** - * Checks if `value` is in `collection`. If `collection` is a string, it's - * checked for a substring of `value`, otherwise - * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) - * is used for equality comparisons. If `fromIndex` is negative, it's used as - * the offset from the end of `collection`. - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object|string} collection The collection to inspect. - * @param {*} value The value to search for. - * @param {number} [fromIndex=0] The index to search from. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`. - * @returns {boolean} Returns `true` if `value` is found, else `false`. - * @example - * - * _.includes([1, 2, 3], 1); - * // => true - * - * _.includes([1, 2, 3], 1, 2); - * // => false - * - * _.includes({ 'a': 1, 'b': 2 }, 1); - * // => true - * - * _.includes('abcd', 'bc'); - * // => true - */ -function includes(collection, value, fromIndex, guard) { - collection = isArrayLike(collection) ? collection : values(collection); - fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0; +var v1 = __webpack_require__(1280); +var v4 = __webpack_require__(1283); - var length = collection.length; - if (fromIndex < 0) { - fromIndex = nativeMax(length + fromIndex, 0); - } - return isString(collection) - ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1) - : (!!length && baseIndexOf(collection, value, fromIndex) > -1); -} +var uuid = v4; +uuid.v1 = v1; +uuid.v4 = v4; -module.exports = includes; +module.exports = uuid; /***/ }), -/* 1252 */ +/* 1280 */ /***/ (function(module, exports, __webpack_require__) { -var baseValues = __webpack_require__(1253), - keys = __webpack_require__(441); +var rng = __webpack_require__(1281); +var bytesToUuid = __webpack_require__(1282); -/** - * Creates an array of the own enumerable string keyed property values of `object`. - * - * **Note:** Non-object values are coerced to objects. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The object to query. - * @returns {Array} Returns the array of property values. - * @example - * - * function Foo() { - * this.a = 1; - * this.b = 2; - * } - * - * Foo.prototype.c = 3; - * - * _.values(new Foo); - * // => [1, 2] (iteration order is not guaranteed) - * - * _.values('hi'); - * // => ['h', 'i'] - */ -function values(object) { - return object == null ? [] : baseValues(object, keys(object)); -} +// **`v1()` - Generate time-based UUID** +// +// Inspired by https://github.com/LiosK/UUID.js +// and http://docs.python.org/library/uuid.html -module.exports = values; +var _nodeId; +var _clockseq; +// Previous uuid creation time +var _lastMSecs = 0; +var _lastNSecs = 0; -/***/ }), -/* 1253 */ -/***/ (function(module, exports, __webpack_require__) { +// See https://github.com/broofa/node-uuid for API details +function v1(options, buf, offset) { + var i = buf && offset || 0; + var b = buf || []; -var arrayMap = __webpack_require__(410); + options = options || {}; + var node = options.node || _nodeId; + var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; -/** - * The base implementation of `_.values` and `_.valuesIn` which creates an - * array of `object` property values corresponding to the property names - * of `props`. - * - * @private - * @param {Object} object The object to query. - * @param {Array} props The property names to get values for. - * @returns {Object} Returns the array of property values. - */ -function baseValues(object, props) { - return arrayMap(props, function(key) { - return object[key]; - }); -} + // node and clockseq need to be initialized to random values if they're not + // specified. We do this lazily to minimize issues related to insufficient + // system entropy. See #189 + if (node == null || clockseq == null) { + var seedBytes = rng(); + if (node == null) { + // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) + node = _nodeId = [ + seedBytes[0] | 0x01, + seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] + ]; + } + if (clockseq == null) { + // Per 4.2.2, randomize (14 bit) clockseq + clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + } + } -module.exports = baseValues; + // UUID timestamps are 100 nano-second units since the Gregorian epoch, + // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so + // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' + // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. + var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + // Per 4.2.1.2, use count of uuid's generated during the current clock + // cycle to simulate higher resolution clock + var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; -/***/ }), -/* 1254 */ -/***/ (function(module, exports, __webpack_require__) { + // Time since last uuid creation (in msecs) + var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; -var arraySome = __webpack_require__(428), - baseIteratee = __webpack_require__(413), - baseSome = __webpack_require__(1255), - isArray = __webpack_require__(75), - isIterateeCall = __webpack_require__(755); + // Per 4.2.1.2, Bump clockseq on clock regression + if (dt < 0 && options.clockseq === undefined) { + clockseq = clockseq + 1 & 0x3fff; + } -/** - * Checks if `predicate` returns truthy for **any** element of `collection`. - * Iteration is stopped once `predicate` returns truthy. The predicate is - * invoked with three arguments: (value, index|key, collection). - * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Collection - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} [predicate=_.identity] The function invoked per iteration. - * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var users = [ - * { 'user': 'barney', 'active': true }, - * { 'user': 'fred', 'active': false } - * ]; - * - * // The `_.matches` iteratee shorthand. - * _.some(users, { 'user': 'barney', 'active': false }); - * // => false - * - * // The `_.matchesProperty` iteratee shorthand. - * _.some(users, ['active', false]); - * // => true - * - * // The `_.property` iteratee shorthand. - * _.some(users, 'active'); - * // => true - */ -function some(collection, predicate, guard) { - var func = isArray(collection) ? arraySome : baseSome; - if (guard && isIterateeCall(collection, predicate, guard)) { - predicate = undefined; + // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new + // time interval + if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { + nsecs = 0; } - return func(collection, baseIteratee(predicate, 3)); -} -module.exports = some; + // Per 4.2.1.2 Throw error if too many uuids are requested + if (nsecs >= 10000) { + throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); + } + _lastMSecs = msecs; + _lastNSecs = nsecs; + _clockseq = clockseq; -/***/ }), -/* 1255 */ -/***/ (function(module, exports, __webpack_require__) { + // Per 4.1.4 - Convert from unix epoch to Gregorian epoch + msecs += 12219292800000; -var baseEach = __webpack_require__(574); + // `time_low` + var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; + b[i++] = tl >>> 24 & 0xff; + b[i++] = tl >>> 16 & 0xff; + b[i++] = tl >>> 8 & 0xff; + b[i++] = tl & 0xff; -/** - * The base implementation of `_.some` without support for iteratee shorthands. - * - * @private - * @param {Array|Object} collection The collection to iterate over. - * @param {Function} predicate The function invoked per iteration. - * @returns {boolean} Returns `true` if any element passes the predicate check, - * else `false`. - */ -function baseSome(collection, predicate) { - var result; + // `time_mid` + var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; + b[i++] = tmh >>> 8 & 0xff; + b[i++] = tmh & 0xff; - baseEach(collection, function(value, index, collection) { - result = predicate(value, index, collection); - return !result; - }); - return !!result; + // `time_high_and_version` + b[i++] = tmh >>> 24 & 0xf | 0x10; // include version + b[i++] = tmh >>> 16 & 0xff; + + // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) + b[i++] = clockseq >>> 8 | 0x80; + + // `clock_seq_low` + b[i++] = clockseq & 0xff; + + // `node` + for (var n = 0; n < 6; ++n) { + b[i + n] = node[n]; + } + + return buf ? buf : bytesToUuid(b); } -module.exports = baseSome; +module.exports = v1; /***/ }), -/* 1256 */ +/* 1281 */ /***/ (function(module, exports, __webpack_require__) { -const sortBy = __webpack_require__(828); +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. -const { - addDays, - subDays, - differenceInDays -} = __webpack_require__(892); +var crypto = __webpack_require__(94); -const getOperationAmountFromBill = (bill, options) => { - const searchingCredit = options && options.credit; - return searchingCredit ? bill.groupAmount || bill.amount : -(bill.originalAmount || bill.amount); +module.exports = function nodeRNG() { + return crypto.randomBytes(16); }; -const getOperationDateFromBill = (bill, options) => { - const isCredit = options && options.credit; - const date = isCredit ? bill.date : bill.originalDate || bill.date; - return date ? new Date(date) : new Date(); -}; -const getIdentifiers = options => options.identifiers; +/***/ }), +/* 1282 */ +/***/ (function(module, exports) { -const getDateRangeFromBill = (bill, options) => { - const date = getOperationDateFromBill(bill, options); - return { - minDate: subDays(new Date(date), options.pastWindow), - maxDate: addDays(new Date(date), options.futureWindow) - }; -}; +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); +} -const getAmountRangeFromBill = (bill, options) => { - const amount = getOperationAmountFromBill(bill, options); - return { - minAmount: amount - options.minAmountDelta, - maxAmount: amount + options.maxAmountDelta - }; -}; +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]]]).join(''); +} -const getTotalReimbursements = operation => { - if (!operation.reimbursements) return 0; - return operation.reimbursements.reduce((s, r) => s + r.amount, 0); -}; // when we want to match an invoice with an operation according criteria, -// it is possible that several operations are returned to us. -// So we want to find the bill that comes closest. -// This function will sort this list +module.exports = bytesToUuid; -const sortedOperations = (bill, operations) => { - const buildSortFunction = bill => { - // it's not possible to sort with 2 parameters as the same time - // Date is more important so it have a biggest weight, - // but this value is random. - const dateWeight = 0.7; - const amountWeight = 1 - dateWeight; - const opDate = getOperationDateFromBill(bill); - const opAmount = getOperationAmountFromBill(bill); - return operation => { - const dateDiff = Math.abs(differenceInDays(new Date(opDate), new Date(operation.date))); - const amountDiff = Math.abs(opAmount - operation.amount); - return dateWeight * dateDiff + amountWeight * amountDiff; - }; - }; +/***/ }), +/* 1283 */ +/***/ (function(module, exports, __webpack_require__) { - return sortBy(operations, buildSortFunction(bill)); -}; +var rng = __webpack_require__(1281); +var bytesToUuid = __webpack_require__(1282); -module.exports = { - getOperationAmountFromBill, - getOperationDateFromBill, - getIdentifiers, - getDateRangeFromBill, - getAmountRangeFromBill, - getTotalReimbursements, - sortedOperations -}; +function v4(options, buf, offset) { + var i = buf && offset || 0; -/***/ }), -/* 1257 */ -/***/ (function(module, exports, __webpack_require__) { + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; -const { - getDateRangeFromBill, - getAmountRangeFromBill -} = __webpack_require__(1256); // cozy-stack limit to 100 elements max + var rnds = options.random || (options.rng || rng)(); + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; -const COZY_STACK_QUERY_LIMIT = 100; // Get the operations corresponding to the date interval -// around the date of the bill + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } + } -const createDateSelector = (bill, options) => { - const { - minDate, - maxDate - } = getDateRangeFromBill(bill, options); - return { - $gt: minDate.toISOString(), - $lt: maxDate.toISOString() - }; -}; // Get the operations corresponding to the date interval -// around the amount of the bill + return buf || bytesToUuid(rnds); +} +module.exports = v4; -const createAmountSelector = (bill, options) => { - const { - minAmount, - maxAmount - } = getAmountRangeFromBill(bill, options); - return { - $gt: minAmount, - $lt: maxAmount - }; -}; -const getQueryOptions = (bill, options, ids) => { - const queryOptions = { - selector: { - date: createDateSelector(bill, options), - amount: createAmountSelector(bill, options) - }, - sort: [{ - date: 'desc' - }, { - amount: 'desc' - }], - COZY_STACK_QUERY_LIMIT - }; +/***/ }), +/* 1284 */ +/***/ (function(module, exports) { - if (ids.length > 0) { - queryOptions.skip = ids.length; - } +module.exports = require("domain"); - return queryOptions; -}; +/***/ }), +/* 1285 */ +/***/ (function(module, exports, __webpack_require__) { -const and = conditions => obj => { - for (let c of conditions) { - if (!c(obj)) { - return false; - } - } +(function(){ + var crypt = __webpack_require__(1286), + utf8 = __webpack_require__(1287).utf8, + isBuffer = __webpack_require__(1288), + bin = __webpack_require__(1287).bin, + + // The core + md5 = function (message, options) { + // Convert to byte array + if (message.constructor == String) + if (options && options.encoding === 'binary') + message = bin.stringToBytes(message); + else + message = utf8.stringToBytes(message); + else if (isBuffer(message)) + message = Array.prototype.slice.call(message, 0); + else if (!Array.isArray(message) && message.constructor !== Uint8Array) + message = message.toString(); + // else, assume byte array already + + var m = crypt.bytesToWords(message), + l = message.length * 8, + a = 1732584193, + b = -271733879, + c = -1732584194, + d = 271733878; + + // Swap endian + for (var i = 0; i < m.length; i++) { + m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF | + ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00; + } + + // Padding + m[l >>> 5] |= 0x80 << (l % 32); + m[(((l + 64) >>> 9) << 4) + 14] = l; + + // Method shortcuts + var FF = md5._ff, + GG = md5._gg, + HH = md5._hh, + II = md5._ii; + + for (var i = 0; i < m.length; i += 16) { + + var aa = a, + bb = b, + cc = c, + dd = d; + + a = FF(a, b, c, d, m[i+ 0], 7, -680876936); + d = FF(d, a, b, c, m[i+ 1], 12, -389564586); + c = FF(c, d, a, b, m[i+ 2], 17, 606105819); + b = FF(b, c, d, a, m[i+ 3], 22, -1044525330); + a = FF(a, b, c, d, m[i+ 4], 7, -176418897); + d = FF(d, a, b, c, m[i+ 5], 12, 1200080426); + c = FF(c, d, a, b, m[i+ 6], 17, -1473231341); + b = FF(b, c, d, a, m[i+ 7], 22, -45705983); + a = FF(a, b, c, d, m[i+ 8], 7, 1770035416); + d = FF(d, a, b, c, m[i+ 9], 12, -1958414417); + c = FF(c, d, a, b, m[i+10], 17, -42063); + b = FF(b, c, d, a, m[i+11], 22, -1990404162); + a = FF(a, b, c, d, m[i+12], 7, 1804603682); + d = FF(d, a, b, c, m[i+13], 12, -40341101); + c = FF(c, d, a, b, m[i+14], 17, -1502002290); + b = FF(b, c, d, a, m[i+15], 22, 1236535329); + + a = GG(a, b, c, d, m[i+ 1], 5, -165796510); + d = GG(d, a, b, c, m[i+ 6], 9, -1069501632); + c = GG(c, d, a, b, m[i+11], 14, 643717713); + b = GG(b, c, d, a, m[i+ 0], 20, -373897302); + a = GG(a, b, c, d, m[i+ 5], 5, -701558691); + d = GG(d, a, b, c, m[i+10], 9, 38016083); + c = GG(c, d, a, b, m[i+15], 14, -660478335); + b = GG(b, c, d, a, m[i+ 4], 20, -405537848); + a = GG(a, b, c, d, m[i+ 9], 5, 568446438); + d = GG(d, a, b, c, m[i+14], 9, -1019803690); + c = GG(c, d, a, b, m[i+ 3], 14, -187363961); + b = GG(b, c, d, a, m[i+ 8], 20, 1163531501); + a = GG(a, b, c, d, m[i+13], 5, -1444681467); + d = GG(d, a, b, c, m[i+ 2], 9, -51403784); + c = GG(c, d, a, b, m[i+ 7], 14, 1735328473); + b = GG(b, c, d, a, m[i+12], 20, -1926607734); + + a = HH(a, b, c, d, m[i+ 5], 4, -378558); + d = HH(d, a, b, c, m[i+ 8], 11, -2022574463); + c = HH(c, d, a, b, m[i+11], 16, 1839030562); + b = HH(b, c, d, a, m[i+14], 23, -35309556); + a = HH(a, b, c, d, m[i+ 1], 4, -1530992060); + d = HH(d, a, b, c, m[i+ 4], 11, 1272893353); + c = HH(c, d, a, b, m[i+ 7], 16, -155497632); + b = HH(b, c, d, a, m[i+10], 23, -1094730640); + a = HH(a, b, c, d, m[i+13], 4, 681279174); + d = HH(d, a, b, c, m[i+ 0], 11, -358537222); + c = HH(c, d, a, b, m[i+ 3], 16, -722521979); + b = HH(b, c, d, a, m[i+ 6], 23, 76029189); + a = HH(a, b, c, d, m[i+ 9], 4, -640364487); + d = HH(d, a, b, c, m[i+12], 11, -421815835); + c = HH(c, d, a, b, m[i+15], 16, 530742520); + b = HH(b, c, d, a, m[i+ 2], 23, -995338651); + + a = II(a, b, c, d, m[i+ 0], 6, -198630844); + d = II(d, a, b, c, m[i+ 7], 10, 1126891415); + c = II(c, d, a, b, m[i+14], 15, -1416354905); + b = II(b, c, d, a, m[i+ 5], 21, -57434055); + a = II(a, b, c, d, m[i+12], 6, 1700485571); + d = II(d, a, b, c, m[i+ 3], 10, -1894986606); + c = II(c, d, a, b, m[i+10], 15, -1051523); + b = II(b, c, d, a, m[i+ 1], 21, -2054922799); + a = II(a, b, c, d, m[i+ 8], 6, 1873313359); + d = II(d, a, b, c, m[i+15], 10, -30611744); + c = II(c, d, a, b, m[i+ 6], 15, -1560198380); + b = II(b, c, d, a, m[i+13], 21, 1309151649); + a = II(a, b, c, d, m[i+ 4], 6, -145523070); + d = II(d, a, b, c, m[i+11], 10, -1120210379); + c = II(c, d, a, b, m[i+ 2], 15, 718787259); + b = II(b, c, d, a, m[i+ 9], 21, -343485551); + + a = (a + aa) >>> 0; + b = (b + bb) >>> 0; + c = (c + cc) >>> 0; + d = (d + dd) >>> 0; + } + + return crypt.endian([a, b, c, d]); + }; + + // Auxiliary functions + md5._ff = function (a, b, c, d, x, s, t) { + var n = a + (b & c | ~b & d) + (x >>> 0) + t; + return ((n << s) | (n >>> (32 - s))) + b; + }; + md5._gg = function (a, b, c, d, x, s, t) { + var n = a + (b & d | c & ~d) + (x >>> 0) + t; + return ((n << s) | (n >>> (32 - s))) + b; + }; + md5._hh = function (a, b, c, d, x, s, t) { + var n = a + (b ^ c ^ d) + (x >>> 0) + t; + return ((n << s) | (n >>> (32 - s))) + b; + }; + md5._ii = function (a, b, c, d, x, s, t) { + var n = a + (c ^ (b | ~d)) + (x >>> 0) + t; + return ((n << s) | (n >>> (32 - s))) + b; + }; + + // Package private blocksize + md5._blocksize = 16; + md5._digestsize = 16; + + module.exports = function (message, options) { + if (message === undefined || message === null) + throw new Error('Illegal argument ' + message); + + var digestbytes = crypt.wordsToBytes(md5(message, options)); + return options && options.asBytes ? digestbytes : + options && options.asString ? bin.bytesToString(digestbytes) : + crypt.bytesToHex(digestbytes); + }; + +})(); - return true; -}; -const findByMangoQuerySimple = (docs, query) => { - const selector = query.selector; - const filters = Object.keys(selector).map(attr => doc => { - const attrSel = selector[attr]; - const conditions = Object.keys(attrSel).map($operator => doc => { - const val = doc[attr]; - const selValue = attrSel[$operator]; +/***/ }), +/* 1286 */ +/***/ (function(module, exports) { - if ($operator == '$gt') { - return val > selValue; - } else if ($operator == '$lt') { - return val < selValue; - } else { - throw new Error(`Unknown operator ${$operator}`); - } - }); - return and(conditions)(doc); - }); - return docs.filter(and(filters)); -}; +(function() { + var base64map + = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', -const findNeighboringOperations = async (cozyClient, bill, options, allOperations) => { - const queryOptions = getQueryOptions(bill, options, []); - const neighboringOperations = findByMangoQuerySimple(allOperations, queryOptions); - return neighboringOperations; -}; + crypt = { + // Bit-wise rotation left + rotl: function(n, b) { + return (n << b) | (n >>> (32 - b)); + }, -module.exports = { - findByMangoQuerySimple, - findNeighboringOperations -}; + // Bit-wise rotation right + rotr: function(n, b) { + return (n << (32 - b)) | (n >>> b); + }, -/***/ }), -/* 1258 */ -/***/ (function(module, exports, __webpack_require__) { + // Swap big-endian to little-endian and vice versa + endian: function(n) { + // If number given, swap endian + if (n.constructor == Number) { + return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00; + } -var baseRest = __webpack_require__(563), - eq = __webpack_require__(397), - isIterateeCall = __webpack_require__(755), - keysIn = __webpack_require__(586); + // Else, assume array and swap all items + for (var i = 0; i < n.length; i++) + n[i] = crypt.endian(n[i]); + return n; + }, -/** Used for built-in method references. */ -var objectProto = Object.prototype; + // Generate an array of any length of random bytes + randomBytes: function(n) { + for (var bytes = []; n > 0; n--) + bytes.push(Math.floor(Math.random() * 256)); + return bytes; + }, -/** Used to check objects for own properties. */ -var hasOwnProperty = objectProto.hasOwnProperty; + // Convert a byte array to big-endian 32-bit words + bytesToWords: function(bytes) { + for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) + words[b >>> 5] |= bytes[i] << (24 - b % 32); + return words; + }, -/** - * Assigns own and inherited enumerable string keyed properties of source - * objects to the destination object for all destination properties that - * resolve to `undefined`. Source objects are applied from left to right. - * Once a property is set, additional values of the same property are ignored. - * - * **Note:** This method mutates `object`. - * - * @static - * @since 0.1.0 - * @memberOf _ - * @category Object - * @param {Object} object The destination object. - * @param {...Object} [sources] The source objects. - * @returns {Object} Returns `object`. - * @see _.defaultsDeep - * @example - * - * _.defaults({ 'a': 1 }, { 'b': 2 }, { 'a': 3 }); - * // => { 'a': 1, 'b': 2 } - */ -var defaults = baseRest(function(object, sources) { - object = Object(object); + // Convert big-endian 32-bit words to a byte array + wordsToBytes: function(words) { + for (var bytes = [], b = 0; b < words.length * 32; b += 8) + bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF); + return bytes; + }, - var index = -1; - var length = sources.length; - var guard = length > 2 ? sources[2] : undefined; + // Convert a byte array to a hex string + bytesToHex: function(bytes) { + for (var hex = [], i = 0; i < bytes.length; i++) { + hex.push((bytes[i] >>> 4).toString(16)); + hex.push((bytes[i] & 0xF).toString(16)); + } + return hex.join(''); + }, - if (guard && isIterateeCall(sources[0], sources[1], guard)) { - length = 1; - } + // Convert a hex string to a byte array + hexToBytes: function(hex) { + for (var bytes = [], c = 0; c < hex.length; c += 2) + bytes.push(parseInt(hex.substr(c, 2), 16)); + return bytes; + }, - while (++index < length) { - var source = sources[index]; - var props = keysIn(source); - var propsIndex = -1; - var propsLength = props.length; + // Convert a byte array to a base-64 string + bytesToBase64: function(bytes) { + for (var base64 = [], i = 0; i < bytes.length; i += 3) { + var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; + for (var j = 0; j < 4; j++) + if (i * 8 + j * 6 <= bytes.length * 8) + base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F)); + else + base64.push('='); + } + return base64.join(''); + }, - while (++propsIndex < propsLength) { - var key = props[propsIndex]; - var value = object[key]; + // Convert a base-64 string to a byte array + base64ToBytes: function(base64) { + // Remove non-base-64 characters + base64 = base64.replace(/[^A-Z0-9+\/]/ig, ''); - if (value === undefined || - (eq(value, objectProto[key]) && !hasOwnProperty.call(object, key))) { - object[key] = source[key]; + for (var bytes = [], i = 0, imod4 = 0; i < base64.length; + imod4 = ++i % 4) { + if (imod4 == 0) continue; + bytes.push(((base64map.indexOf(base64.charAt(i - 1)) + & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) + | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2))); } + return bytes; } - } - - return object; -}); + }; -module.exports = defaults; + module.exports = crypt; +})(); /***/ }), -/* 1259 */ -/***/ (function(module, exports, __webpack_require__) { +/* 1287 */ +/***/ (function(module, exports) { -module.exports = __webpack_require__( 1260 ).Geco; +var charenc = { + // UTF-8 encoding + utf8: { + // Convert a string to a byte array + stringToBytes: function(str) { + return charenc.bin.stringToBytes(unescape(encodeURIComponent(str))); + }, + // Convert a byte array to a string + bytesToString: function(bytes) { + return decodeURIComponent(escape(charenc.bin.bytesToString(bytes))); + } + }, -/***/ }), -/* 1260 */ -/***/ (function(module, exports, __webpack_require__) { + // Binary encoding + bin: { + // Convert a string to a byte array + stringToBytes: function(str) { + for (var bytes = [], i = 0; i < str.length; i++) + bytes.push(str.charCodeAt(i) & 0xFF); + return bytes; + }, -/* - * Geco, a CAT (Constant Amortized Time) recursive generator* - * for k-combinations, chosen from a given set S of n elements, - * with and without replacement. - * - * https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order - * - * Copyright(c) 2018-present Guglielmo Ferri <44gatti@gmail.com> - * MIT Licensed - */ + // Convert a byte array to a string + bytesToString: function(bytes) { + for (var str = [], i = 0; i < bytes.length; i++) + str.push(String.fromCharCode(bytes[i])); + return str.join(''); + } + } +}; -exports.Geco = Object.assign( __webpack_require__( 1261 ), __webpack_require__( 1264 ) ); +module.exports = charenc; /***/ }), -/* 1261 */ -/***/ (function(module, exports, __webpack_require__) { +/* 1288 */ +/***/ (function(module, exports) { -/* - * Geco, a CAT (Constant Amortized Time) recursive generator* - * for k-combinations, chosen from a given set S of n elements, - * with and without replacement. - * - * https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order +/*! + * Determine if an object is a Buffer * - * Copyright(c) 2018-present Guglielmo Ferri <44gatti@gmail.com> - * MIT Licensed + * @author Feross Aboukhadijeh <https://feross.org> + * @license MIT */ -module.exports = ( function () { +// The _isBuffer check is for Safari 5-7 support, because it's missing +// Object.prototype.constructor. Remove this eventually +module.exports = function (obj) { + return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) +} - const balloc = Buffer.alloc - , Toni = __webpack_require__( 1262 ) - ; - return { - // CAT generator for combinations without replacement - get : function ( n, k ) { - if ( ! n || ( n < k ) ) - throw new RangeError( 'check input values' ) - ; - // buffer for generating combinations - const buff = balloc( n, 0 ) - // colex recursive generator - , colex_gen = function *( n, k ) { - if ( n === 0 ) yield buff; - else { - if ( k < n ) { - buff[ n - 1 ] = 0; - yield* colex_gen( n - 1, k ); - } - if ( k > 0 ) { - buff[ n - 1 ] = 1; - yield* colex_gen( n - 1, k - 1 ); - } - } - } - // generating colex order for k <= n/2. - , colex_gen_2 = function *( n, k ) { - if ( k === 0 ) yield buff; - else { - if ( k < n ) { - buff[ n - 1 ] = 0; - yield* colex_gen_2( n - 1, k ); - } - buff[ n - 1 ] = 1; - yield* colex_gen_2( n - 1, k - 1); - buff[ n - 1 ] = 0; - } - } - ; - return ( k > n / 2 ) ? - colex_gen( n , k ) : - colex_gen_2( n, k ) - ; - } - , get_bm : function ( n, k ) { - if ( ! n || ( n < k ) ) - throw new RangeError( 'check input values' ) - ; - // bitmap for generating combinations - const bmap = Toni( n ) - // colex recursive generator - , colex_gen = function *( n, k ) { - if ( n === 0 ) yield bmap; - else { - if ( k < n ) { - bmap.del( n - 1 ); - yield* colex_gen( n - 1, k ); - } - if ( k > 0 ) { - bmap.add( n - 1 ); - yield* colex_gen( n - 1, k - 1 ); - } - } - } - // generating colex order for k <= n/2. - , colex_gen_2 = function *( n, k ) { - if ( k === 0 ) yield bmap; - else { - if ( k < n ) { - bmap.del( n - 1 ); - yield* colex_gen_2( n - 1, k ); - } - bmap.add( n - 1 ); - yield* colex_gen_2( n - 1, k - 1); - bmap.del( n - 1 ); - } - } - ; - return ( k > n / 2 ) ? - colex_gen( n , k ) : - colex_gen_2( n, k ) - ; - } - , gen : function *( n, k, set, bitmap ) { - // k should be < n - let list = set || 0 - , llen = list.length - , ok = list && llen && n && ( n >= k ) && ( n <= llen ) - , result, comb, c, bm, b - , iter = null - ; - if ( ! ok ) - throw new RangeError( 'check input values' ) - ; - // iterate on current result - if ( bitmap ) { - // use Toni bitmap - iter = this.get_bm( n, k ); - for ( bm of iter ) { - result = []; - b = 0; - for ( ; b < n; ++b ) - if ( bm.chk( b ) ) result.push( list[ b ] ); - yield result; - } - return; - } - // use a Buffer - iter = this.get( n, k ); - for ( comb of iter ) { - result = []; - c = 0; - for ( ; c < n; ++c ) - if ( comb[ c ] ) result.push( list[ c ] ); - yield result; - } - } - // get total number of combinations - , cnt : ( n, k ) => { - let p = [ 1, 1 ] - , c = 0 - ; - for ( ; c < k; ++c ) { - p[ 0 ] *= n - c; - p[ 1 ] *= k - c; - } - return p[ 0 ] / p[ 1 ]; - } - } - ; +function isBuffer (obj) { + return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) +} -} )(); +// For Node v0.10 support. Remove this eventually. +function isSlowBuffer (obj) { + return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) +} /***/ }), -/* 1262 */ +/* 1289 */ /***/ (function(module, exports, __webpack_require__) { -module.exports = __webpack_require__( 1263 ).Toni; - -/***/ }), -/* 1263 */ -/***/ (function(module, exports) { +"use strict"; -/* - * Toni, a simple and efficient bitmap implementation for positive integer sets - * (max 32 bits), with no element repetition, using bitwise operations and a Buffer. - * Modifying a single bit instead of an entire byte, obviously saves 87.5% of Buffer - * space, but it also implies a gain greater than 200% in performances, when it was - * used with big integer ranges. - * - * http://en.wikipedia.org/wiki/Bit_array - * - * Copyright(c) 2014-present Guglielmo Ferri <44gatti@gmail.com> - * MIT Licensed - */ -exports.Toni = ( function () { - var log = console.log - , abs = Math.abs - , ceil = Math.ceil - , max = Math.max - , min = Math.min - // table of powers - , bpower = new Buffer( [ 128, 64, 32, 16, 8, 4, 2, 1 ] ) - // count the number of bits set to 1 for every 1-byte number - , cbits = function ( b ) { - // divide et impera method for 8 bits - var v = b - ( ( b >>> 1 ) & 0x55 ); - v = ( v & 0x33 ) + ( ( v >>> 2 ) & 0x33 ); - return v + ( v >>> 4 ) & 0x0f; - } - , bctable = ( function () { - var i = 0 - , table = new Buffer( 256 ) - , v = -1 - ; - for ( ; i < 256; ++i ) table[ i ] = cbits( i ); - return table; - } )() - , Toni = function ( range ) { - var me = this - , is = me instanceof Toni - ; - if ( ! is ) return new Toni( range ); - // limit range to 4 bytes, (32 bits numbers) using >>> 0 - var r = ( abs( + range ) >>> 0 ) || 1 - , bytes = max( ceil( r / 8 ), 1 ) - , bitmap = new Buffer( bytes ) - ; - bitmap.fill( 0x00 ); - me.bitmap = bitmap; - // bytes needed - me.bmlen = bytes << 3 >>> 0; - me.items = 0; - me.range = r; - // bit count table for 1 byte - me.bctable = bctable; - } - , tproto = Toni.prototype - ; +var utils = __webpack_require__(1273); - tproto.clear = function () { - var me = this - ; - me.bitmap.fill( 0x00 ); - me.items = 0; - return me; - }; +var defaultOnConfig = { + console: true, + http: true +}; - tproto.add = function ( value ) { - var me = this - , v = abs( value ) - , bitmap = me.bitmap - , range = me.range - ; - // check value range - if ( ( v >= me.bmlen ) || ( v >= range ) ) return -1; - /* - * generally, bucket and mask could be calculated respectively as floor( v / 8 ) - * and bpower[ v % 8 ], but seen that values > 2^32 are not allowed, then we can - * speed up things using bitwise shiftings. - */ - var buck = v >>> 3 - , mask = bpower[ v & 7 ] - , up = mask & bitmap[ buck ] - ; - return up ? -1 : ++me.items | ( bitmap[ buck ] |= mask ); - }; +var defaultConfig = { + console: false, + http: false, + pg: false +}; - // get/access the bit at a given index i, b = B[i] - tproto.chk = function ( value ) { - var me = this - , v = abs( value ) - , range = me.range - ; - // check value range - if ( ( me.bmlen <= v ) || ( v >= range ) ) return 0; - // see #add - return bpower[ v & 7 ] & me.bitmap[ v >>> 3 ] ? 1 : 0; - }; +function instrument(Raven, config) { + if (config === false) { + return; + } else if (config === true) { + config = defaultOnConfig; + } else { + config = utils.extend({}, defaultConfig, config); + } - tproto.del = function ( value ) { - var me = this - , v = value - , range = me.range - , bitmap = me.bitmap - ; - // check value range - if ( ( me.bmlen <= v ) || ( v >= range ) ) return -1; + Raven.instrumentedOriginals = []; + Raven.instrumentedModules = []; - var buck = v >>> 3 - , mask = bpower[ v & 7 ] - , up = mask & bitmap[ buck ] - ; - return up ? --me.items | ( bitmap[ buck ] ^= mask ) : -1; - }; + var Module = __webpack_require__(1290); + utils.fill( + Module, + '_load', + function(origLoad) { + return function(moduleId, parent, isMain) { + var origModule = origLoad.apply(this, arguments); + if (config[moduleId] && Raven.instrumentedModules.indexOf(moduleId) === -1) { + Raven.instrumentedModules.push(moduleId); + return __webpack_require__(1291)("./" + moduleId)(Raven, origModule, Raven.instrumentedOriginals); + } + return origModule; + }; + }, + Raven.instrumentedOriginals + ); - // it returns the occurrences of bit 1 until index i - tproto.rank = function ( i ) { - var me = this - , bitmap = me.bitmap - , bmlen = me.bmlen - , buck = null - , boff = -1 - , bshift = -1 - , b = 0 - , bcnt = 0 - , index = min( i >>> 0, me.bmlen ) - ; - if ( index > bmlen ) return -1; - // last bucket to count with btable - buck = index >>> 3; - // bits remaining to count - boff = 1 + ( index - ( buck << 3 ) ); - bshift = 8 - boff; + // special case: since console is built-in and app-level code won't require() it, do that here + if (config.console) { + __webpack_require__(1295); + } - if ( buck ) { - // log( ' - bytes to count: %d', buck ); - for ( b = 0; b < buck ; ++b ) - bcnt += bctable[ bitmap[ b ] ]; - } - bcnt += bctable[ bitmap[ b ] >>> bshift ]; - return bcnt; - }; + // observation: when the https module does its own require('http'), it *does not* hit our hooked require to instrument http on the fly + // but if we've previously instrumented http, https *does* get our already-instrumented version + // this is because raven's transports are required before this instrumentation takes place, which loads https (and http) + // so module cache will have uninstrumented http; proactively loading it here ensures instrumented version is in module cache + // alternatively we could refactor to load our transports later, but this is easier and doesn't have much drawback + if (config.http) { + __webpack_require__(98); + } +} - // it returns the position of the i-th occurrence of bit 1 - // tproto.select = function ( index ) { - // var me = this - // ; - // return; - // }; +function deinstrument(Raven) { + if (!Raven.instrumentedOriginals) return; + var original; + // eslint-disable-next-line no-cond-assign + while ((original = Raven.instrumentedOriginals.shift())) { + var obj = original[0]; + var name = original[1]; + var orig = original[2]; + obj[name] = orig; + } +} - return Toni; +module.exports = { + instrument: instrument, + deinstrument: deinstrument +}; -} )(); /***/ }), -/* 1264 */ +/* 1290 */ /***/ (function(module, exports) { -/* - * Geco, a CAT (Constant Amortized Time) recursive generator* - * for k-combinations, chosen from a given set S of n elements, - * with and without replacement. - * - * https://en.wikipedia.org/wiki/Lexicographical_order#Colexicographic_order - * - * Copyright(c) 2018-present Guglielmo Ferri <44gatti@gmail.com> - * MIT Licensed - */ +module.exports = require("module"); -module.exports = ( function () { +/***/ }), +/* 1291 */ +/***/ (function(module, exports, __webpack_require__) { - const balloc = Buffer.alloc - , bfrom = Buffer.from - , isBuffer = Buffer.isBuffer - , isInteger = Number.isInteger - , mgen = function ( k, v, rep ) { - const rlen = rep.length - // get the total number of elements - , total = ( () => { - let [ i, t ] = [ 1, rep[ 0 ] ]; - if ( rlen > 1 ) - for ( ; i < rlen; ++i ) t += rep[ i ]; - return t; - } )() - // choose the correct fn - , up = k > total >> 1 - // init the correct gen buffer ( v === rlen ), for k > n/2, k <= 2 - , buff = up ? bfrom( rep ) : balloc( v, 0 ) - // k <= n/2, TODO k > n/2 - , colex_gen = function *( k, v, tot ) { - if ( k === 0 ) yield buff; - else { - let c = v - 1 - , occ = rep[ c ] - , r = tot - occ - , l = k > r ? k - r : 0 - , m = occ < k ? occ : k - ; - for ( ; l <= m; ++l ) { - buff[ c ] = l; - yield* colex_gen( k - l, c, r ); - buff[ c ] = 0; - } - } - } - ; - // check k range - if ( k >= total ) new RangeError( 'k value should be lesser than total elements' ); - return colex_gen( k, v, total ) - ; - } - ; - return { - mget : function ( k, v, rep ) { - let rlen = -1 - , b = -1 - , read = null - , write = null - // get the total number of elements - , total = -1 - , ok = k && v && rep - ; - if ( ! ok ) return new RangeError( 'missing or wrong input values' ); - // check repetitions type - if ( isBuffer( rep ) && ( rlen = rep.length ) ) { - b = rlen / v; - if ( b === 1 ) return mgen( k, v, rep ); - if ( ( b !== 2 ) && ( b !== 4 ) ) - return new RangeError( 'repetitions buffer length should be a multiple of v' ); - // set the correct read/write fn, only 4, 2, 1 bytes are allowed - [ read, write ] = [ `readUInt${ b << 3 }BE`, `writeUInt${ b << 3 }BE` ]; - // get the total number of elements - total = ( () => { - let [ i, t ] = [ b, rep[ read ]( 0 ) ]; - if ( rlen > b ) - for ( ; i < rlen; i += b ) t += rep[ read ]( i ); - return t; - } )(); - } else if ( isInteger( rep ) ) { - // use rep value as default repetitions for every value, build a buffer accordingly - if ( rep < 257 ) return mgen( k, v, balloc( v, rep ) ); - if ( rep < 65537 ) b = 2; - else if ( rep < 4294967297 ) b = 4; - else return new RangeError( 'repetitions should be < 2^32 + 1' ); - rlen = v << ( b >>> 1 ); - total = v * rep; - // set the correct read/write fn, only 4, 2, 1 bytes are allowed - [ read, write ] = [ `readUInt${ b << 3 }BE`, `writeUInt${ b << 3 }BE` ]; - rep = balloc( rlen ); - // fill the reference buffer of repetitions with v identical values - for ( let i = 0; i < rlen; i += b ) rep[ write ]( v ); - } else return new RangeError( 'repetitions should be represented as: a buffer or an integer' ); - // check k range - if ( k >= total ) new RangeError( 'k should be lesser than the total sum of repetitions' ); - // choose the correct colex fn - let up = k > total >> 1 - // init the correct gen buffer, for k > n/2, k <= 2 - , buff = up ? bfrom( rep ) : balloc( rlen, 0 ) - // k <= n/2, TODO k > n/2 - , colex_gen = function *( k, v, tot ) { - if ( k === 0 ) yield buff; - else { - let c = v - 1 - , occ = rep[ read ]( c * b ) - , r = tot - occ - , l = k > r ? k - r : 0 - , m = occ < k ? occ : k - ; - for ( ; l <= m; ++l ) { - buff[ write ]( l, c * b ); - yield* colex_gen( k - l, c, r ); - buff[ write ]( 0, c * b ); - } - } - } - ; - return colex_gen( k, v, total ) - ; - } - - } - ; +var map = { + "./console": 1292, + "./console.js": 1292, + "./http": 1293, + "./http.js": 1293, + "./instrumentor": 1289, + "./instrumentor.js": 1289, + "./pg": 1294, + "./pg.js": 1294 +}; -} )(); +function webpackContext(req) { + var id = webpackContextResolve(req); + return __webpack_require__(id); +} +function webpackContextResolve(req) { + if(!__webpack_require__.o(map, req)) { + var e = new Error("Cannot find module '" + req + "'"); + e.code = 'MODULE_NOT_FOUND'; + throw e; + } + return map[req]; +} +webpackContext.keys = function webpackContextKeys() { + return Object.keys(map); +}; +webpackContext.resolve = webpackContextResolve; +module.exports = webpackContext; +webpackContext.id = 1291; /***/ }), -/* 1265 */ +/* 1292 */ /***/ (function(module, exports, __webpack_require__) { -/** - * Provides an handy method to log the user in, - * on HTML form pages. On success, it resolves to a promise with a parsed body. - * - * @module signin - */ -const errors = __webpack_require__(1231); - -const rerrors = __webpack_require__(1266); - -const log = __webpack_require__(2).namespace('cozy-konnector-libs'); +"use strict"; -const requestFactory = __webpack_require__(22); -const cheerio = __webpack_require__(275); -/** - * Provides an handy method to log the user in, - * on HTML form pages. On success, it resolves to a promise with a parsed body. - * - * Errors: - * - * - LOGIN_FAILED if the validate predicate is false - * - INVALID_FORM if the element matched by `formSelector` is not a form or has - * no `action` attribute - * - UNKNOWN_PARSING_STRATEGY if `parse` is not one of the accepted values: - * `raw`, `cheerio`, `json`. - * - VENDOR_DOWN if a request throws a RequestError, or StatusCodeError - * - * It does not submit values provided through `select` tags, except if populated - * by user with `formData`. - * - * - `url` is the url to access the html form - * - * - `formSelector` is used by cheerio to uniquely identify the form in which to - * log in - * - * - `formData` is an object `{ name: value, … }`. It is used to populate the - * form, in the proper inputs with the same name as the properties of this - * object, before submitting it. It can also be a function that returns this - * object. The page at `url` would be given as argument, right after having - * been parsed through `cheerio`. - * - * - `parse` allow the user to resolve `signin` with a preparsed body. The - * choice of the strategy for the parsing is one of : `raw`, `json` or - * `cheerio`. `cheerio` being the default. - * - * - `validate` is a predicate taking three arguments `statusCode`, `parsedBody` and `fullResponse`. - * If it is false, `LOGIN_FAILED` is thrown, otherwise the - * signin resolves with `parsedBody` value. - * - * - `requestOpts` allows to pass eventual options to the `signin`'s - * `requestFactory`. It could be useful for pages using `latin1` `encoding` - * for instance. - * - * @example - * == basic example : == - * ```javascript - * const $ = signin({ - * url: `http://quotes.toscrape.com/login`, - * formSelector: 'form', - * formData: { username, password } - * }) - * ``` - * If the behavior of the targeted website is not standard. You can pass a validate function which - * will allow you to: - * - detect if the credentials work or not -> LOGIN_FAILED - * - detect if actions from the user are needed -> USER_ACTION_NEEDED - * - detect if the targeted website is out -> VENDOR_DOWN - * @example - * ```javascript - * const $ = signin({ - * url: `http://quotes.toscrape.com/login`, - * formSelector: 'form', - * formData: { username, password }, - * validate: (statusCode, $, fullResponse) { - * if (statusCode !== 200) return false // LOGIN_FAILED - * if ($('.cgu').length) throw new Error('USER_ACTION_NEEDED') - * if (fullResponse.request.uri.href.includes('error')) throw new Error('VENDOR_DOWN') - * } - * }) - * ``` - * - * Do not forget that the use of the signin function is not mandatory in a connector and won't work - * if the signin page does not use html forms. Here, a simple POST request may be a lot more - * simple. - * @alias module:signin - */ +var util = __webpack_require__(9); +var utils = __webpack_require__(1273); +module.exports = function(Raven, console, originals) { + var wrapConsoleMethod = function(level) { + if (!(level in console)) { + return; + } -function signin({ - url, - formSelector, - formData = {}, - parse = 'cheerio', - validate = defaultValidate, - ...requestOpts -} = {}) { - // Check for mandatory arguments - if (url === undefined) { - throw new Error('signin: `url` must be defined'); - } + utils.fill( + console, + level, + function(originalConsoleLevel) { + var sentryLevel = level === 'warn' ? 'warning' : level; - if (formSelector === undefined) { - throw new Error('signin: `formSelector` must be defined'); - } + return function() { + var args = [].slice.call(arguments); - const rq = requestOpts.requestInstance || requestFactory({ - jar: true, - json: false, - ...requestOpts - }); - const parseBody = getStrategy(parse); - return rq({ - uri: url, - transform: body => cheerio.load(body) - }).catch(handleRequestErrors).then($ => { - const data = typeof formData === 'function' ? formData($) : formData; - const [action, inputs] = parseForm($, formSelector, url); + Raven.captureBreadcrumb({ + message: util.format.apply(null, args), + level: sentryLevel, + category: 'console' + }); - for (let name in data) { - inputs[name] = data[name]; - } + originalConsoleLevel.apply(console, args); + }; + }, + originals + ); + }; - return submitForm(rq, __webpack_require__(83).resolve(url, action), inputs, parseBody, url); - }).then(([statusCode, parsedBody, fullResponse]) => { - if (!validate(statusCode, parsedBody, fullResponse)) { - throw new Error(errors.LOGIN_FAILED); - } else { - return Promise.resolve(parsedBody); - } - }); -} + ['debug', 'info', 'warn', 'error', 'log'].forEach(wrapConsoleMethod); -function defaultValidate(statusCode) { - return statusCode === 200; -} + return console; +}; -function getStrategy(parseStrategy) { - switch (parseStrategy) { - case 'cheerio': - return cheerio.load; - case 'json': - return JSON.parse; +/***/ }), +/* 1293 */ +/***/ (function(module, exports, __webpack_require__) { - case 'raw': - return body => body; +"use strict"; - default: - { - const err = `signin: parsing strategy \`${parseStrategy}\` unknown. `; - const hint = 'Use one of `raw`, `cheerio` or `json`'; - log('error', err + hint); - throw new Error('UNKNOWN_PARSING_STRATEGY'); - } - } -} +var util = __webpack_require__(9); +var utils = __webpack_require__(1273); -function parseForm($, formSelector, currentUrl) { - const form = $(formSelector).first(); - const action = form.attr('action') || currentUrl; +module.exports = function(Raven, http, originals) { + var OrigClientRequest = http.ClientRequest; + var ClientRequest = function(options, cb) { + // Note: this won't capture a breadcrumb if a response never comes + // It would be useful to know if that was the case, though, so + // todo: revisit to see if we can capture sth indicating response never came + // possibility: capture one breadcrumb for "req sent" and one for "res recvd" + // seems excessive but solves the problem and *is* strictly more information + // could be useful for weird response sequencing bug scenarios + OrigClientRequest.call(this, options, cb); - if (!form.is('form')) { - const err = 'element matching `' + formSelector + '` is not a `form`'; - log('error', err); - throw new Error('INVALID_FORM'); - } + // We could just always reconstruct this from this.agent, this._headers, this.path, etc + // but certain other http-instrumenting libraries (like nock, which we use for tests) fail to + // maintain the guarantee that after calling OrigClientRequest, those fields will be populated + if (typeof options === 'string') { + this.__ravenBreadcrumbUrl = options; + } else { + var protocol = options.protocol || ''; + var hostname = options.hostname || options.host || ''; + // Don't log standard :80 (http) and :443 (https) ports to reduce the noise + var port = + !options.port || options.port === 80 || options.port === 443 + ? '' + : ':' + options.port; + var path = options.path || '/'; - const inputs = {}; - const arr = form.serializeArray(); + this.__ravenBreadcrumbUrl = protocol + '//' + hostname + port + path; + } + }; + util.inherits(ClientRequest, OrigClientRequest); - for (let input of arr) { - inputs[input.name] = input.value; - } + utils.fill(ClientRequest.prototype, 'emit', function(origEmit) { + return function(evt, maybeResp) { + if (evt === 'response' && this.__ravenBreadcrumbUrl) { + if (!Raven.dsn || this.__ravenBreadcrumbUrl.indexOf(Raven.dsn.host) === -1) { + Raven.captureBreadcrumb({ + type: 'http', + category: 'http', + data: { + method: this.method, + url: this.__ravenBreadcrumbUrl, + status_code: maybeResp.statusCode + } + }); + } + } + return origEmit.apply(this, arguments); + }; + }); - return [action, inputs]; -} + utils.fill( + http, + 'ClientRequest', + function() { + return ClientRequest; + }, + originals + ); -function submitForm(rq, uri, inputs, parseBody, referer) { - return rq({ - uri: uri, - method: 'POST', - form: { ...inputs + // http.request orig refs module-internal ClientRequest, not exported one, so + // it still points at orig ClientRequest after our monkeypatch; these reimpls + // just get that reference updated to use our new ClientRequest + utils.fill( + http, + 'request', + function() { + return function(options, cb) { + return new http.ClientRequest(options, cb); + }; }, - transform: (body, response) => [response.statusCode, parseBody(body), response], - headers: { - Referer: referer - } - }).catch(handleRequestErrors); -} + originals + ); -function handleRequestErrors(err) { - if (err instanceof rerrors.RequestError || err instanceof rerrors.StatusCodeError) { - log('error', err); - throw new Error(errors.VENDOR_DOWN); - } else { - return Promise.reject(err); - } -} + utils.fill( + http, + 'get', + function() { + return function(options, cb) { + var req = http.request(options, cb); + req.end(); + return req; + }; + }, + originals + ); + + return http; +}; -module.exports = signin; /***/ }), -/* 1266 */ +/* 1294 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +module.exports = function(Raven, pg, originals) { + // Using fill helper here is hard because of `this` binding + var origQuery = pg.Connection.prototype.query; + pg.Connection.prototype.query = function(text) { + Raven.captureBreadcrumb({ + category: 'postgres', + message: text + }); + origQuery.call(this, text); + }; + // todo thread this through + // originals.push([pg.Connection.prototype, 'query', origQuery]); +}; + -module.exports = __webpack_require__(1267); +/***/ }), +/* 1295 */ +/***/ (function(module, exports) { +module.exports = require("console"); /***/ }), -/* 1267 */ -/***/ (function(module, exports, __webpack_require__) { +/* 1296 */ +/***/ (function(module, exports) { -"use strict"; +const DOMAIN_REGEXP = /^https?:\/\/([a-zA-Z0-9-.]+)(?::\d{2,5})?\/?$/; +const getDomain = cozyUrl => { + cozyUrl = cozyUrl || process.env.COZY_URL; + return cozyUrl.match(DOMAIN_REGEXP)[1].split('.').slice(-2).join('.'); +}; -module.exports = __webpack_require__(64); +const getInstance = cozyUrl => { + cozyUrl = cozyUrl || process.env.COZY_URL; + return cozyUrl.match(DOMAIN_REGEXP)[1].split('.').slice(-3).join('.'); +}; +module.exports = { + getDomain, + getInstance +}; /***/ }), -/* 1268 */ +/* 1297 */ /***/ (function(module, exports, __webpack_require__) { +var before = __webpack_require__(1298); + /** - * Creates or updates the given entries according to if they already - * exist in the cozy or not + * Creates a function that is restricted to invoking `func` once. Repeat calls + * to the function return the value of the first invocation. The `func` is + * invoked with the `this` binding and arguments of the created function. * - * @module updateOrCreate + * @static + * @memberOf _ + * @since 0.1.0 + * @category Function + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example + * + * var initialize = _.once(createApplication); + * initialize(); + * initialize(); + * // => `createApplication` is invoked once */ -const bluebird = __webpack_require__(25); +function once(func) { + return before(2, func); +} -const log = __webpack_require__(2).namespace('updateOrCreate'); +module.exports = once; -const cozy = __webpack_require__(485); -const get = __webpack_require__(370); +/***/ }), +/* 1298 */ +/***/ (function(module, exports, __webpack_require__) { + +var toInteger = __webpack_require__(642); + +/** Error message constants. */ +var FUNC_ERROR_TEXT = 'Expected a function'; -const { - getCozyMetadata -} = __webpack_require__(836); /** - * Creates or updates the given entries according to if they already - * exist in the cozy or not - * - * You need the full permission for the given doctype in your manifest, to be able to - * use this function. + * Creates a function that invokes `func`, with the `this` binding and arguments + * of the created function, while it's called less than `n` times. Subsequent + * calls to the created function return the result of the last `func` invocation. * - * `entries` (object array): Documents to save - * `doctype` (string): Doctype of the documents - * `matchingAttributes` (string array): attributes in each entry used to check if an entry already exists in the Cozy - * `options` (object): general option affecting metadata : - * + `sourceAccount` (String): id of the source account - * + `sourceAccountIdentifier` (String): identifier unique to the account targetted by the connector. It is the login most of the time + * @static + * @memberOf _ + * @since 3.0.0 + * @category Function + * @param {number} n The number of calls at which `func` is no longer invoked. + * @param {Function} func The function to restrict. + * @returns {Function} Returns the new restricted function. + * @example * - * @alias module:updateOrCreate + * jQuery(element).on('click', _.before(5, addContactToList)); + * // => Allows adding up to 4 contacts to the list. */ +function before(n, func) { + var result; + if (typeof func != 'function') { + throw new TypeError(FUNC_ERROR_TEXT); + } + n = toInteger(n); + return function() { + if (--n > 0) { + result = func.apply(this, arguments); + } + if (n <= 1) { + func = undefined; + } + return result; + }; +} +module.exports = before; -const updateOrCreate = (entries = [], doctype, matchingAttributes = [], options = {}) => { - return cozy.data.findAll(doctype).then(existings => bluebird.mapSeries(entries, entry => { - const metaEntry = { - cozyMetadata: getCozyMetadata({ ...entry.cozyMetadata, - sourceAccount: options.sourceAccount, - sourceAccountIdentifier: options.sourceAccountIdentifier - }), - ...entry - }; // try to find a corresponding existing element - const toUpdate = existings.find(doc => matchingAttributes.reduce((isMatching, matchingAttribute) => isMatching && get(doc, matchingAttribute) === get(metaEntry, matchingAttribute), true)); +/***/ }), +/* 1299 */ +/***/ (function(module, exports, __webpack_require__) { - if (toUpdate) { - log('debug', 'updating'); - if (toUpdate.cozyMetadata) metaEntry.cozyMetadata.createdAt = toUpdate.cozyMetadata.createdAt; - return cozy.data.updateAttributes(doctype, toUpdate._id, metaEntry); - } else { - log('debug', 'creating'); - return cozy.data.create(doctype, metaEntry); - } - })); +const log = __webpack_require__(2).namespace('Error Interception'); + +const handleUncaughtException = err => { + log('critical', err.message, 'uncaught exception'); + process.exit(1); }; -module.exports = updateOrCreate; +const handleUnhandledRejection = err => { + log('critical', err.message, 'unhandled exception'); + process.exit(1); +}; -/***/ }), -/* 1269 */ -/***/ (function(module, exports, __webpack_require__) { +const handleSigterm = () => { + log('critical', 'The konnector got a SIGTERM'); + process.exit(128 + 15); +}; + +const handleSigint = () => { + log('critical', 'The konnector got a SIGINT'); + process.exit(128 + 2); +}; +let attached = false; /** - * Helper to set or merge io.cozy.identities - * See https://github.com/cozy/cozy-doctypes/blob/master/docs/io.cozy.identities.md + * Attach event handlers to catch uncaught exceptions/rejections and signals. + * Log them as critical and exit the process accordingly. + * If the cleanup function has not been called, calling again the function + * is a no-op. * - * @module saveIdentity + * @param {object} prcs - Process object, default to current process + * @returns {Function} When called, removes the signal handlers */ -const log = __webpack_require__(2).namespace('saveIdentity'); -const updateOrCreate = __webpack_require__(1268); +const attachProcessEventHandlers = (prcs = process) => { + if (attached) { + return; + } + + attached = true; + prcs.on('uncaughtException', handleUncaughtException); + prcs.on('unhandledRejection', handleUnhandledRejection); + prcs.on('SIGTERM', handleSigterm); + prcs.on('SIGINT', handleSigint); + return () => { + attached = false; + prcs.removeEventListener('uncaughtException', handleUncaughtException); + prcs.removeEventListener('unhandledRejection', handleUnhandledRejection); + prcs.removeEventListener('SIGTERM', handleSigterm); + prcs.removeEventListener('SIGINT', handleSigint); + }; +}; + +module.exports = { + attachProcessEventHandlers +}; + +/***/ }), +/* 1300 */ +/***/ (function(module, exports, __webpack_require__) { + +const log = __webpack_require__(2).namespace('CookieKonnector'); + +const BaseKonnector = __webpack_require__(1222); + +const requestFactory = __webpack_require__(22); + +const { + CookieJar +} = __webpack_require__(81); + +const JAR_ACCOUNT_KEY = 'session'; /** - * Set or merge a io.cozy.identities - * - * You need full permission for the doctype io.cozy.identities in your - * manifest, to be able to use this function. - * - * Parameters: - * - * `contact` (object): the identity to create/update as an object io.cozy.contacts - * `accountIdentifier` (string): a string that represent the account use, if available fields.login - * `options` (object): options which will be given to updateOrCreate directly : - * + `sourceAccount` (String): id of the source account - * + `sourceAccountIdentifier` (String): identifier unique to the account targetted by the connector. It is the login most of the time - * - * + * @class + * Connector base class extending BaseKonnector which handles cookie session in a central way + * It also handles saving cookie session in the account and automatically restore it for the next + * connector run. + * All cozy-konnector-libs tools using request are proposed as methods of this class to force them + * to use the central cookie which can be saved/restored. + * You need at least the `GET` and `PUT` permissions on `io.cozy.accounts` in your manifest to allow + * it to save/restore cookies + * @example * ```javascript - * const { saveIdentity } = require('cozy-konnector-libs') - * const identity = - * { - * name: 'toto', - * email: { 'address': 'toto@example.com' } + * const { CookieKonnector } = require('cozy-konnector-libs') + * class MyConnector extends CookieKonnector { + * async fetch(fields) { + * // the code of your connector + * await this.request('https://...') * } - * - * return saveIdentity(identity, fields.login) + * async testSession() { + * const $ = await this.request('https://...') + * return $('') + * } + * } + * const connector = new MyKonnector({ + * cheerio: true, + * json: false + * }) + * connector.run() * ``` - * - * @alias module:saveIdentity */ +class CookieKonnector extends BaseKonnector { + /** + * Constructor + * + * @param {Function} requestFactoryOptions - Option object passed to requestFactory to + * initialize this.request. It is still possible to change this.request doing : + * + * ```javascript + * this.request = this.requestFactory(...) + * ``` + * + * Please not you have to run the connector yourself doing : + * + * ```javascript + * connector.run() + * ``` + */ + constructor(requestFactoryOptions) { + super(); -const saveIdentity = async (contact, accountIdentifier, options = {}) => { - log('debug', 'saving user identity'); + if (!this.testSession) { + throw new Error('Could not find a testSession method. CookieKonnector needs it to test if a session is valid. Please implement it'); + } - if (accountIdentifier == null) { - log('warn', "Can't set identity as no accountIdentifier was provided"); - return; + this._jar = requestFactory().jar(); + this.request = this.requestFactory(requestFactoryOptions); } + /** + * Initializes the current connector with data coming from the associated account + * and also the session + * + * @returns {Promise} with the fields as an object + */ - if (contact == null) { - log('warn', "Can't set identity as no contact was provided"); - return; - } // Format contact if needed + + async initAttributes(cozyFields, account) { + await super.initAttributes(cozyFields, account); + await this.initSession(); + } + /** + * Hook called when the connector is ended + */ - if (contact.phone) { - contact.phone = formatPhone(contact.phone); + async end() { + await this.saveSession(); + return super.end(); + } + /** + * Calls cozy-konnector-libs requestFactory forcing this._jar as the cookie + * + * @param {object} options - requestFactory option + * @returns {object} - The resulting request object + */ + + + requestFactory(options) { + this._jar = this._jar || requestFactory().jar(); + return requestFactory({ ...options, + jar: this._jar + }); } + /** + * Reset cookie session with a new empty session and save it to the associated account + * + * @returns {Promise} empty promise + */ - if (contact.address) { - contact.address = formatAddress(contact.address); + + async resetSession() { + log('debug', 'Reset cookie session...'); + this._jar = requestFactory().jar(); + return this.saveSession(); } + /** + * Get the cookie session from the account if any + * + * @returns {Promise} true or false if the session in the account exists or not + */ - const identity = { - identifier: accountIdentifier, - contact - }; - await updateOrCreate([identity], 'io.cozy.identities', ['identifier', 'cozyMetadata.createdByApp'], { ...options, - sourceAccountIdentifier: accountIdentifier - }); - return; -}; -/* Remove html and cariage return in address - */ + async initSession() { + const accountData = this.getAccountData(); -function formatAddress(address) { - for (const element of address) { - if (element.formattedAddress) { - element.formattedAddress = element.formattedAddress.replace(/<[^>]*>/g, '') // Remove all html Tag - .replace(/\r\n|[\n\r]/g, ' '); // Remove all kind of return character + try { + if (this._account.state === 'RESET_SESSION') { + log('debug', 'RESET_SESSION state found'); + await this.resetSession(); + await this.updateAccountAttributes({ + state: null + }); + } + } catch (err) { + log('warn', 'Could not reset the session'); + log('warn', err.message); + } - address[address.indexOf(element)] = element; + try { + let jar = null; + + if (accountData && accountData.auth) { + jar = JSON.parse(accountData.auth[JAR_ACCOUNT_KEY]); + } + + if (jar) { + log('debug', 'found saved session, using it...'); + this._jar._jar = CookieJar.fromJSON(jar, this._jar._jar.store); + return true; + } + } catch (err) { + log('debug', 'Could not parse session'); } + + log('debug', 'Found no session'); + return false; } + /** + * Saves the current cookie session to the account + * + * @returns {Promise} empty promise + */ - return address; -} -/* Replace all characters in a phone number except '+' or digits - */ + async saveSession(obj) { + const accountData = { ...this._account.data, + auth: {} + }; -function formatPhone(phone) { - for (const element of phone) { - if (element.number) { - element.number = element.number.replace(/[^\d.+]/g, ''); - phone[phone.indexOf(element)] = element; + if (obj && obj.getCookieJar) { + this._jar._jar = obj.getCookieJar(); } + + accountData.auth[JAR_ACCOUNT_KEY] = JSON.stringify(this._jar._jar.toJSON()); + await this.saveAccountData(accountData); + log('debug', 'saved the session'); } + /** + * This is signin function from cozy-konnector-libs which is forced to use the current cookies + * and current request from CookieKonnector. It also automatically saves the session after + * signin if it is a success. + * + * @returns {Promise} resolve with an object containing form data + */ - return phone; -} -module.exports = saveIdentity; + async signin(options) { + const result = await super.signin({ ...options, + requestInstance: this.request + }); + await this.saveSession(); + return result; + } + /** + * This is saveFiles function from cozy-konnector-libs which is forced to use the current cookies + * and current request from CookieKonnector. + * + * @returns {Promise} resolves with the list of entries with file objects + */ -/***/ }), -/* 1270 */ -/***/ (function(module, exports, __webpack_require__) { -/* global __APP_VERSION__ */ -const log = __webpack_require__(2); + saveFiles(entries, fields, options) { + return super.saveFiles(entries, fields, { ...options, + requestInstance: this.request + }); + } + /** + * This is saveBills function from cozy-konnector-libs which is forced to use the current cookies + * and current request from CookieKonnector. + * + * @returns {Promise} resolves with entries hydrated with db data + */ -const Raven = __webpack_require__(1271); -const { - getDomain, - getInstance -} = __webpack_require__(1299); + saveBills(entries, fields, options) { + return super.saveBills(entries, fields, { ...options, + requestInstance: this.request + }); + } -let isRavenConfigured = false; -const ENV_DEV = 'development'; -const ENV_SELF = 'selfhost'; -const ENV_PROD = 'production'; -const domainToEnv = { - 'cozy.tools': ENV_DEV, - 'cozy.works': ENV_DEV, - 'cozy.rocks': ENV_PROD, - 'mycozy.cloud': ENV_PROD -}; +} -const getEnvironmentFromDomain = domain => { - return domainToEnv[domain] || ENV_SELF; -}; // Available in Projet > Settings > Client Keys -// Example : https://5f94cb7772deadbeef123456:39e4e34fdeadbeef123456a9ae31caba74c@sentry.cozycloud.cc/12 +module.exports = CookieKonnector; +/***/ }), +/* 1301 */ +/***/ (function(module, exports, __webpack_require__) { -const SENTRY_DSN = process.env.SENTRY_DSN; +const { + URL +} = __webpack_require__(83); -const afterFatalError = function (_err, sendErr, eventId) { - if (!sendErr) { - log('debug', 'Successfully sent fatal error with eventId ' + eventId + ' to Sentry'); +const computeWidth = $table => { + let out = 0; + const tds = $table.find('tr').first().find('td,th'); + + for (var i = 0; i < tds.length; i++) { + out += parseInt(tds.eq(i).attr('colspan')) || 1; } - process.exit(1); + return out; }; -const afterCaptureException = function (sendErr, eventId) { - if (!sendErr) { - log('debug', 'Successfully sent exception with eventId ' + eventId + ' to Sentry'); - } - - process.exit(1); +const makeLinkOpts = ($el, opts) => { + if ($el.attr('href') === undefined) return undefined; + if ($el.attr('href').indexOf('javascript:') === 0) return undefined; + if ($el.attr('href').indexOf('#') === 0) return undefined; + return { + link: new URL($el.attr('href'), opts.baseURL).toString(), + color: '0x0000FF' + }; }; -const setupSentry = function () { +function htmlToPDF($, frag, $parent, opts) { + let pdf, helveticaBold, helveticaEm; // pdfjs is an optional dependency, this is why the requires are done in + // a try/catch. webpack detects this and does not crash when building + // if requires are done in a try/catch. + try { - log('debug', 'process.env.SENTRY_DSN found, setting up Raven'); - const release = typeof __APP_VERSION__ !== 'undefined' ? __APP_VERSION__ : 'dev'; - const domain = getDomain(); - const environment = getEnvironmentFromDomain(domain); - const instance = getInstance(); - Raven.config(SENTRY_DSN, { - release, - environment, - autoBreadcrumbs: { - console: true - } - }).install(afterFatalError); - Raven.mergeContext({ - tags: { - domain, - instance - } - }); - isRavenConfigured = true; - log('debug', 'Raven configured !'); - } catch (e) { - log('warn', 'Could not load Raven, errors will not be sent to Sentry'); - log('warn', e); + pdf = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); + helveticaBold = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs/font/Helvetica-Bold'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); + helveticaEm = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs/font/Helvetica-Oblique'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); + } catch (err) { + throw new Error('pdfjs dependency is missing. Please add it in your package.json'); } -}; -module.exports.captureExceptionAndDie = function (err) { - log('debug', 'Capture exception and die'); + opts = Object.assign({ + baseURL: '', + filter: () => true, + txtOpts: {} + }, opts); + const children = $parent.contents(); + let text = opts.text; + let parentDL = null; - if (!isRavenConfigured) { - process.exit(1); - } else { - try { - log('debug', 'Sending exception to Sentry'); - Raven.captureException(err, { - fingerprint: [err.message || err] - }, afterCaptureException); - } catch (e) { - log('warn', 'Could not send error to Sentry, exiting...'); - log('warn', e); - log('warn', err); - process.exit(1); - } - } -}; + const getText = () => { + if (!text) text = frag.text('', opts.txtOpts); + return text; + }; -module.exports.wrapIfSentrySetUp = function (obj, method) { - if (SENTRY_DSN && SENTRY_DSN !== 'false') { - obj[method] = Raven.wrap(obj[method]); - } -}; + children.each((i, el) => { + if (el.nodeType === 3 && el.data.trim() !== '') { + getText().add(el.data); + } else if (el.nodeType === 1) { + const $el = $(el); + if (!opts.filter($el)) return; -if (SENTRY_DSN && SENTRY_DSN !== 'false') { - setupSentry(); -} + switch (el.tagName) { + case 'a': + getText().add($el.text(), makeLinkOpts($el, opts)); + break; -/***/ }), -/* 1271 */ -/***/ (function(module, exports, __webpack_require__) { + case 'strong': + case 'b': + getText().add($el.text(), { + font: helveticaBold + }); + break; -"use strict"; + case 'em': + getText().add($el.text(), { + font: helveticaEm + }); + break; + case 'span': + htmlToPDF($, frag, $el, Object.assign({}, opts, { + text: text + })); + break; -module.exports = __webpack_require__(1272); -module.exports.utils = __webpack_require__(1276); + case 'br': + getText().br(); + break; -module.exports.transports = __webpack_require__(1277); -module.exports.parsers = __webpack_require__(1274); + case 'i': + case 'select': + case 'input': + case 'label': + case 'form': + case 'fieldset': + case 'textarea': + case 'button': + case 'img': + case 'script': + case 'caption': + // ignore + break; -// To infinity and beyond -Error.stackTraceLimit = Infinity; + case 'table': + { + text = null; + let width = computeWidth($el); + let tableState = { + tableWidth: width + }; + htmlToPDF($, frag.table({ + widths: Array.from(Array(width), () => '*'), + borderWidth: 1 + }), $el, Object.assign({}, opts, { + tableState + })); + break; + } + case 'tr': + { + text = null; + opts.tableState.colRemaining = opts.tableState.tableWidth; + let row = frag.row(); + htmlToPDF($, row, $el, opts); -/***/ }), -/* 1272 */ -/***/ (function(module, exports, __webpack_require__) { + if (opts.tableState.colRemaining > 0) { + row.cell({ + colspan: opts.tableState.colRemaining + }); + } -"use strict"; + break; + } + case 'dl': + text = null; + htmlToPDF($, frag.table({ + widths: [5 * pdf.cm, null], + borderWidth: 1 + }), $el, { ...opts, + tableState: { + tableWidth: 2, + colRemaining: 2 + } + }); + parentDL = null; + break; -var stringify = __webpack_require__(1273); -var parsers = __webpack_require__(1274); -var zlib = __webpack_require__(101); -var utils = __webpack_require__(1276); -var uuid = __webpack_require__(1282); -var transports = __webpack_require__(1277); -var nodeUtil = __webpack_require__(9); // nodeUtil to avoid confusion with "utils" -var events = __webpack_require__(271); -var domain = __webpack_require__(1287); -var md5 = __webpack_require__(1288); + case 'dt': + if (!parentDL) { + parentDL = frag; + } else { + frag = parentDL; + } -var instrumentor = __webpack_require__(1292); + frag = frag.row(); + // fall through the rest of the procedure -var extend = utils.extend; + case 'dd': + case 'th': + case 'td': + { + text = null; + const colspan = Math.min(opts.tableState.tableWidth, parseInt($el.attr('colspan')) || 1); + opts.tableState.colRemaining -= colspan; + htmlToPDF($, frag.cell({ + padding: 5, + colspan: colspan + }), $el, opts); + break; + } -function Raven() { - this.breadcrumbs = { - record: this.captureBreadcrumb.bind(this) - }; -} + case 'h1': + case 'h2': + case 'h3': + case 'h4': + case 'h5': + text = null; + htmlToPDF($, frag, // .cell({ paddingTop: 1 * pdf.cm }), + $el, Object.assign({}, opts, { + txtOpts: { + fontSize: 30 - parseInt(el.tagName.replace('h', '')) * 2 + } + })); + break; -nodeUtil.inherits(Raven, events.EventEmitter); + case 'div': + case 'p': + case 'ul': + text = null; + htmlToPDF($, frag.cell(), $el, opts); + break; -extend(Raven.prototype, { - config: function config(dsn, options) { - // We get lots of users using raven-node when they want raven-js, hence this warning if it seems like a browser - if ( - typeof window !== 'undefined' && - typeof document !== 'undefined' && - typeof navigator !== 'undefined' - ) { - utils.consoleAlertOnce( - "This looks like a browser environment; are you sure you don't want Raven.js for browser JavaScript? https://sentry.io/for/javascript" - ); - } + case 'thead': + case 'tfoot': + case 'tbody': + case 'small': + case 'li': + text = null; + htmlToPDF($, frag, $el, opts); + break; - if (arguments.length === 0) { - // no arguments, use default from environment - dsn = global.process.env.SENTRY_DSN; - options = {}; - } - if (typeof dsn === 'object') { - // They must only be passing through options - options = dsn; - dsn = global.process.env.SENTRY_DSN; + default: + text = null; + htmlToPDF($, frag, $el, opts); + } } - options = options || {}; + }); +} - this.raw_dsn = dsn; - this.dsn = utils.parseDSN(dsn); - this.name = - options.name || global.process.env.SENTRY_NAME || __webpack_require__(19).hostname(); - this.root = options.root || global.process.cwd(); - this.transport = options.transport || transports[this.dsn.protocol]; - this.sendTimeout = options.sendTimeout || 1; - this.release = options.release || global.process.env.SENTRY_RELEASE; - this.environment = - options.environment || - global.process.env.SENTRY_ENVIRONMENT || - global.process.env.NODE_ENV; +function createCozyPDFDocument(headline, url) { + let pdf, helveticaBold; // pdfjs is an optional dependency, this is why the requires are done in + // a try/catch. webpack detects this and does not crash when building + // if requires are done in a try/catch. - // autoBreadcrumbs: true enables all, autoBreadcrumbs: false disables all - // autoBreadcrumbs: { http: true } enables a single type - this.autoBreadcrumbs = options.autoBreadcrumbs || false; - // default to 30, don't allow higher than 100 - this.maxBreadcrumbs = Math.max(0, Math.min(options.maxBreadcrumbs || 30, 100)); + try { + pdf = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); + helveticaBold = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs/font/Helvetica-Bold'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); + } catch (err) { + throw new Error('pdfjs dependency is missing. Please add it in your package.json'); + } - this.captureUnhandledRejections = options.captureUnhandledRejections; - this.loggerName = options.logger; - this.dataCallback = options.dataCallback; - this.shouldSendCallback = options.shouldSendCallback; - this.sampleRate = typeof options.sampleRate === 'undefined' ? 1 : options.sampleRate; - this.maxReqQueueCount = options.maxReqQueueCount || 100; - this.parseUser = options.parseUser; - this.stacktrace = options.stacktrace || false; + var doc = new pdf.Document(); + const cell = doc.cell({ + paddingBottom: 0.5 * pdf.cm + }).text(); + cell.add(headline, { + font: helveticaBold, + fontSize: 14 + }); + cell.add(url, { + link: url, + color: '0x0000FF' + }); + return doc; +} - if (!this.dsn) { - utils.consoleAlert('no DSN provided, error reporting disabled'); - } +module.exports = { + htmlToPDF, + createCozyPDFDocument +}; - if (this.dsn.protocol === 'https') { - // In case we want to provide our own SSL certificates / keys - this.ca = options.ca || null; - } +/***/ }), +/* 1302 */ +/***/ (function(module, exports, __webpack_require__) { - // enabled if a dsn is set - this._enabled = !!this.dsn; +const isEqualWith = __webpack_require__(1303); - var globalContext = (this._globalContext = {}); - if (options.tags) { - globalContext.tags = options.tags; - } - if (options.extra) { - globalContext.extra = options.extra; - } +const omit = __webpack_require__(631); - this.onFatalError = this.defaultOnFatalError = function(err, sendErr, eventId) { - console.error(err && err.stack ? err.stack : err); - global.process.exit(1); - }; - this.uncaughtErrorHandler = this.makeErrorHandler(); +const maybeToISO = date => { + try { + return date.toISOString ? date.toISOString() : date; + } catch (e) { + return date; + } +}; - this.on('error', function(err) { - utils.consoleAlert('failed to send exception to sentry: ' + err.message); +const looseDates = (val, otherVal) => { + // Loose equality for dates since when coming from Couch, they + // are ISO strings whereas just after scraping they are `Date`s. + if (val instanceof Date) { + return maybeToISO(val) === maybeToISO(otherVal); + } +}; +/** + * Simple Model for Documents. Allows to specify + * `shouldSave`, `shouldUpdate` as methods. + * + * Has useful `isEqual` method + * + */ + + +class Document { + constructor(attrs) { + if (this.validate) { + this.validate(attrs); + } + + Object.assign(this, attrs, { + metadata: { + version: attrs.metadata && attrs.metadata.version || this.constructor.version + } }); + } + toJSON() { return this; - }, + } + /** + * Compares to another document deeply. + * + * `_id` and `_rev` are by default ignored in the comparison. + * + * By default, will compare dates loosely since you often + * compare existing documents (dates in ISO string) with documents + * that just have been scraped where dates are `Date`s. + */ - install: function install(cb) { - if (this.installed) return this; - if (typeof cb === 'function') { - this.onFatalError = cb; - } + isEqual(other, ignoreAttrs = ['_id', '_rev'], strict = false) { + return isEqualWith(omit(this, ignoreAttrs), omit(other, ignoreAttrs), !strict && looseDates); + } - global.process.on('uncaughtException', this.uncaughtErrorHandler); +} - if (this.captureUnhandledRejections) { - var self = this; - global.process.on('unhandledRejection', function(reason, promise) { - var context = (promise.domain && promise.domain.sentryContext) || {}; - context.extra = context.extra || {}; - context.extra.unhandledPromiseRejection = true; - self.captureException(reason, context, function(sendErr, eventId) { - if (!sendErr) { - var reasonMessage = (reason && reason.message) || reason; - utils.consoleAlert( - 'unhandledRejection captured\n' + - 'Event ID: ' + - eventId + - '\n' + - 'Reason: ' + - reasonMessage - ); - } - }); - }); - } +module.exports = Document; + +/***/ }), +/* 1303 */ +/***/ (function(module, exports, __webpack_require__) { + +var baseIsEqual = __webpack_require__(422); + +/** + * This method is like `_.isEqual` except that it accepts `customizer` which + * is invoked to compare values. If `customizer` returns `undefined`, comparisons + * are handled by the method instead. The `customizer` is invoked with up to + * six arguments: (objValue, othValue [, index|key, object, other, stack]). + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @param {Function} [customizer] The function to customize comparisons. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * function isGreeting(value) { + * return /^h(?:i|ello)$/.test(value); + * } + * + * function customizer(objValue, othValue) { + * if (isGreeting(objValue) && isGreeting(othValue)) { + * return true; + * } + * } + * + * var array = ['hello', 'goodbye']; + * var other = ['hi', 'goodbye']; + * + * _.isEqualWith(array, other, customizer); + * // => true + */ +function isEqualWith(value, other, customizer) { + customizer = typeof customizer == 'function' ? customizer : undefined; + var result = customizer ? customizer(value, other) : undefined; + return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; +} + +module.exports = isEqualWith; + + +/***/ }), +/* 1304 */ +/***/ (function(module, exports, __webpack_require__) { + +const log = __webpack_require__(2).namespace('scrape'); +/** + * Declarative scraping. + * + * Describe your items attributes and where to find/parse them + * instead of imperatively building them. + * + * Heavily inspired by [artoo] scraping method. + * + * [artoo]: https://medialab.github.io/artoo/ + */ + + +const mkSpec = function (spec) { + if (typeof spec === 'string') { + return { + sel: spec + }; + } else { + return spec; + } +}; +/** + * Scrape a cheerio object for properties + * + * @param {object} $ - Cheerio node which will be scraped + * @param {object|string} specs - Options object describing what you want to scrape + * @param {string} [childSelector] - If passed, scrape will return an array of items + * @returns {object|Array} - Item(s) scraped + * @example + * + * `scrape` can be used to declaratively extract data : + * + * - For one object : + * + * ``` + * const item = scrape($('#item'), { + * title: '.title', + * content: '.content' + * }) + * ``` + * + * - For a list of objects : + * + * ``` + * const items = scrape($('#content'), { + * title: '.title', + * content: '.content' + * }, '.item') + * ``` + * + * For more power, you can use `object`s for each retriever : + * + * ``` + * const items = scrape($('#content'), { + * title: '.title', + * content: '.content', + * link: { + * sel: 'a', + * attr: 'href' + * }, + * }, '.item') + * ``` + * + * Here the `href` attribute of the `a` inside `.item`s would have been + * put into the `link` attribute of the items returned by `scrape`. + * + * Available options : + * + * - `sel`: the CSS selector used to target the HTML node from which data will be scraped + * - `attr`: the HTML attribute from which to extract data + * - `parse`: function applied to the value extracted (`{ sel: '.price', parse: parseAmount }`) + * - `fn`: if you need something more complicated than `attr`, you can use this function, it receives + * the complete DOM node. `{ sel: '.person', fn: $node => $node.attr('data-name') + $node.attr('data-firstname') }` + */ - instrumentor.instrument(this, this.autoBreadcrumbs); - this.installed = true; +const scrape = ($, specs, childSelector) => { + // Only one value shorthand + if (typeof specs === 'string' || specs.sel && typeof specs.sel === 'string') { + const { + val + } = scrape($, { + val: specs + }); + return val; + } // Several items shorthand - return this; - }, - uninstall: function uninstall() { - if (!this.installed) return this; + if (childSelector !== undefined) { + return Array.from(($.find || $)(childSelector)).map(e => scrape($(e), specs)); + } // Several properties "normal" case - instrumentor.deinstrument(this); - // todo: this works for tests for now, but isn't what we ultimately want to be doing - global.process.removeAllListeners('uncaughtException'); - global.process.removeAllListeners('unhandledRejection'); + const res = {}; + Object.keys(specs).forEach(specName => { + try { + const spec = mkSpec(specs[specName]); + let data = spec.sel ? $.find(spec.sel) : $; - this.installed = false; + if (spec.index) { + data = data.get(spec.index); + } - return this; - }, + let val; - makeErrorHandler: function() { - var self = this; - var caughtFirstError = false; - var caughtSecondError = false; - var calledFatalError = false; - var firstError; - return function(err) { - if (!caughtFirstError) { - // this is the first uncaught error and the ultimate reason for shutting down - // we want to do absolutely everything possible to ensure it gets captured - // also we want to make sure we don't go recursion crazy if more errors happen after this one - firstError = err; - caughtFirstError = true; - self.captureException(err, {level: 'fatal'}, function(sendErr, eventId) { - if (!calledFatalError) { - calledFatalError = true; - self.onFatalError(err, sendErr, eventId); - } - }); - } else if (calledFatalError) { - // we hit an error *after* calling onFatalError - pretty boned at this point, just shut it down - utils.consoleAlert( - 'uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown' - ); - self.defaultOnFatalError(err); - } else if (!caughtSecondError) { - // two cases for how we can hit this branch: - // - capturing of first error blew up and we just caught the exception from that - // - quit trying to capture, proceed with shutdown - // - a second independent error happened while waiting for first error to capture - // - want to avoid causing premature shutdown before first error capture finishes - // it's hard to immediately tell case 1 from case 2 without doing some fancy/questionable domain stuff - // so let's instead just delay a bit before we proceed with our action here - // in case 1, we just wait a bit unnecessarily but ultimately do the same thing - // in case 2, the delay hopefully made us wait long enough for the capture to finish - // two potential nonideal outcomes: - // nonideal case 1: capturing fails fast, we sit around for a few seconds unnecessarily before proceeding correctly by calling onFatalError - // nonideal case 2: case 2 happens, 1st error is captured but slowly, timeout completes before capture and we treat second error as the sendErr of (nonexistent) failure from trying to capture first error - // note that after hitting this branch, we might catch more errors where (caughtSecondError && !calledFatalError) - // we ignore them - they don't matter to us, we're just waiting for the second error timeout to finish - caughtSecondError = true; - setTimeout(function() { - if (!calledFatalError) { - // it was probably case 1, let's treat err as the sendErr and call onFatalError - calledFatalError = true; - self.onFatalError(firstError, err); - } else { - // it was probably case 2, our first error finished capturing while we waited, cool, do nothing - } - }, (self.sendTimeout + 1) * 1000); // capturing could take at least sendTimeout to fail, plus an arbitrary second for how long it takes to collect surrounding source etc + if (spec.fn) { + val = spec.fn(data); + } else if (spec.attr) { + val = data.attr(spec.attr); + } else { + val = data; + val = val && val.text(); + val = val && val.trim(); } - }; - }, - generateEventId: function generateEventId() { - return uuid().replace(/-/g, ''); - }, + if (spec.parse) { + val = spec.parse(val); + } - process: function process(eventId, kwargs, cb) { - // prod codepaths shouldn't hit this branch, for testing - if (typeof eventId === 'object') { - cb = kwargs; - kwargs = eventId; - eventId = this.generateEventId(); + res[specName] = val; + } catch (e) { + log('warn', 'Could not parse for', specName); + log('warn', e); } + }); + return res; +}; - var domainContext = (domain.active && domain.active.sentryContext) || {}; - var globalContext = this._globalContext || {}; - kwargs.user = extend({}, globalContext.user, domainContext.user, kwargs.user); - kwargs.tags = extend({}, globalContext.tags, domainContext.tags, kwargs.tags); - kwargs.extra = extend({}, globalContext.extra, domainContext.extra, kwargs.extra); - // Perform a shallow copy of breadcrums to not send one that we'll capture below through as well - kwargs.breadcrumbs = { - values: - (domainContext.breadcrumbs && domainContext.breadcrumbs.slice()) || - (globalContext.breadcrumbs && globalContext.breadcrumbs.slice()) || - [] - }; +module.exports = scrape; - /* - `request` is our specified property name for the http interface: https://docs.sentry.io/clientdev/interfaces/http/ - `req` is the conventional name for a request object in node/express/etc - we want to enable someone to pass a `request` property to kwargs according to http interface - but also want to provide convenience for passing a req object and having us parse it out - so we only parse a `req` property if the `request` property is absent/empty (and hence we won't clobber) - parseUser returns a partial kwargs object with a `request` property and possibly a `user` property - */ - var request = this._createRequestObject( - globalContext.request, - domainContext.request, - kwargs.request - ); - delete kwargs.request; +/***/ }), +/* 1305 */ +/***/ (function(module, exports) { - if (Object.keys(request).length === 0) { - request = this._createRequestObject( - globalContext.req, - domainContext.req, - kwargs.req - ); - delete kwargs.req; - } +/** + * Returns the given name, replacing characters that could be an issue when + * used in a filename with spaces. + * + * @module normalizeFilename + */ +const normalizableCharsRegExp = /[<>:"/\\|?*\0\s]+/g; +/** + * Returns the given name, replacing characters that could be an issue when + * used in a filename with spaces. + * + * Replaced characters include: + * + * - Those forbidden on one or many popular OS or filesystem: `<>:"/\|?*` + * - Those forbidden by the cozy-stack `\0`, `\r` and `\n` + * - Multiple spaces and/or tabs are replaced with a single space + * - Leading & trailing spaces and/or tabs are removed + * + * An exception will be thrown in case there is not any filename-compatible + * character in the given name. + * + * Parameters: + * + * - `basename` is whatever string you want to generate the filename from + * - `ext` is an optional file extension, with or without leading dot + * + * ```javascript + * const { normalizeFilename } = require('cozy-konnector-libs') + * + * const filename = normalizeFilename('*foo/bar: <baz> \\"qux"\t???', '.txt') + * // `filename` === `foo bar baz qux.txt` + * ``` + * + * @alias module:normalizeFilename + */ - if (Object.keys(request).length > 0) { - var parseUser = Object.keys(kwargs.user).length === 0 ? this.parseUser : false; - extend(kwargs, parsers.parseRequest(request, parseUser)); - } else { - kwargs.request = {}; - } +const normalizeFilename = (basename, ext) => { + const filename = basename.replace(normalizableCharsRegExp, ' ').trim(); - kwargs.modules = utils.getModules(); - kwargs.server_name = kwargs.server_name || this.name; + if (filename === '') { + throw new Error('Cannot find any filename-compatible character in ' + JSON.stringify(filename) + '!'); + } - if (typeof global.process.version !== 'undefined') { - kwargs.extra.node = global.process.version; - } + if (ext == null) ext = '';else if (!ext.startsWith('.')) ext = '.' + ext; + return filename + ext; +}; - kwargs.environment = kwargs.environment || this.environment; - kwargs.logger = kwargs.logger || this.loggerName; - kwargs.event_id = eventId; - kwargs.timestamp = new Date().toISOString().split('.')[0]; - kwargs.project = this.dsn && this.dsn.project_id; - kwargs.platform = 'node'; - kwargs.release = this.release; +module.exports = normalizeFilename; - // Cleanup empty properties before sending them to the server - Object.keys(kwargs).forEach(function(key) { - if (kwargs[key] == null || kwargs[key] === '') { - delete kwargs[key]; - } - }); +/***/ }), +/* 1306 */ +/***/ (function(module, exports, __webpack_require__) { - if (this.dataCallback) { - kwargs = this.dataCallback(kwargs); - } +/** + * Use every possible means to solve a captcha. At the moment, Anticaptcha web service is used if + * any related secret key is found in COZY_PARAMETERS environment variable. + * + * @module solveCaptcha + */ +const log = __webpack_require__(2).namespace('solveCaptcha'); - // Capture breadcrumb before sending it, as we also want to have it even when - // it was dropped due to sampleRate or shouldSendCallback - this.captureBreadcrumb({ - category: 'sentry', - message: kwargs.message, - event_id: kwargs.event_id, - level: kwargs.level || 'error' // presume error unless specified - }); +const errors = __webpack_require__(1228); - var shouldSend = true; - if (!this._enabled) shouldSend = false; - if (this.shouldSendCallback && !this.shouldSendCallback(kwargs)) shouldSend = false; - if (Math.random() >= this.sampleRate) shouldSend = false; +const request = __webpack_require__(24); - if (shouldSend) { - this.send(kwargs, cb); - } else { - // wish there was a good way to communicate to cb why we didn't send; worth considering cb api change? - // could be shouldSendCallback, could be disabled, could be sample rate - // avoiding setImmediate here because node 0.8 - cb && - setTimeout(function() { - cb(null, eventId); - }, 0); - } - }, +const sleep = __webpack_require__(9).promisify(global.setTimeout); - send: function send(kwargs, cb) { - var self = this; - var skwargs = stringify(kwargs); - var eventId = kwargs.event_id; +const connectorStartTime = Date.now(); +const ms = 1; +const s = 1000 * ms; +const m = 60 * s; +const DEFAULT_TIMEOUT = connectorStartTime + 3 * m; // 3 minutes by default to let 1 min to the connector to fetch files - zlib.deflate(skwargs, function(err, buff) { - var message = buff.toString('base64'), - timestamp = new Date().getTime(), - headers = { - 'X-Sentry-Auth': utils.getAuthHeader( - timestamp, - self.dsn.public_key, - self.dsn.private_key - ), - 'Content-Type': 'application/octet-stream', - 'Content-Length': message.length - }; +/** + * Use every possible means to solve a captcha. At the moment, Anticaptcha web service is used if + * any related secret key is found in COZY_PARAMETERS environment variable. + * If you do not want to solve the captcha each time the connector is run, please also use + * CookieKonnector which will help you save the session. + * + * Parameters: + * + * - `params` is an array of objects with any attributes with some mandatory attributes : + * + `type` (String): (default recaptcha) type of captcha to solve. can be "recaptcha" or "image" at the moment + * + `timeout` (Number): (default 3 minutes after now) time when the solver should stop trying to + * solve the captcha + * + `websiteKey` (String): the key you can find on the targeted website (for recaptcha) + * + `websiteURL` (String): The URL of the page showing the captcha (for recaptcha) + * + `body` (String): The base64 encoded image (for image captcha) + * Returns: Promise with the solved captcha response as a string + * + * @example + * + * ```javascript + * const { solveCaptcha } = require('cozy-konnector-libs') + * + * const solvedKey = await solveCaptcha({ + * websiteKey: 'the key in the webpage', + * websiteURL: 'http://quotes.toscrape.com/login', + * }) + * // now use the solveKey to submit your form + * ``` + * @alias module:solveCaptcha + */ - self.transport.send(self, message, headers, eventId, cb); - }); - }, +const solveCaptcha = async (params = {}) => { + const defaultParams = { + type: 'recaptcha', + timeout: DEFAULT_TIMEOUT + }; + params = { ...defaultParams, + ...params + }; + const secrets = JSON.parse(process.env.COZY_PARAMETERS || '{}').secret; - captureMessage: function captureMessage(message, kwargs, cb) { - if (!cb && typeof kwargs === 'function') { - cb = kwargs; - kwargs = {}; - } else { - kwargs = utils.isPlainObject(kwargs) ? extend({}, kwargs) : {}; - } + if (params.type === 'recaptcha') { + checkMandatoryParams(params, ['websiteKey', 'websiteURL']); + const { + websiteKey, + websiteURL + } = params; + return solveWithAntiCaptcha({ + websiteKey, + websiteURL, + type: 'NoCaptchaTaskProxyless' + }, params.timeout, secrets, 'gRecaptchaResponse'); + } else if (params.type === 'recaptchav3') { + checkMandatoryParams(params, ['websiteKey', 'websiteURL', 'pageAction', 'minScore']); + const { + websiteKey, + websiteURL, + pageAction, + minScore + } = params; + return solveWithAntiCaptcha({ + websiteKey, + websiteURL, + pageAction, + minScore, + type: 'RecaptchaV3TaskProxyless' + }, params.timeout, secrets, 'gRecaptchaResponse'); + } else if (params.type === 'hcaptcha') { + checkMandatoryParams(params, ['websiteKey', 'websiteURL']); + const { + websiteKey, + websiteURL + } = params; + return solveWithAntiCaptcha({ + websiteKey, + websiteURL, + type: 'HCaptchaTaskProxyless' + }, params.timeout, secrets, 'gRecaptchaResponse'); + } else if (params.type === 'image') { + checkMandatoryParams(params, ['body']); + return solveWithAntiCaptcha({ + body: params.body, + type: 'ImageToTextTask' + }, params.timeout, secrets, 'text'); + } +}; - var eventId = this.generateEventId(); +function checkMandatoryParams(params = {}, mandatoryParams = []) { + const keys = Object.keys(params); + const missingKeys = mandatoryParams.filter(key => !keys.includes(key)); - if (this.stacktrace) { - var ex = new Error(message); + if (missingKeys.length) { + throw new Error(`${missingKeys.join(', ')} are mandatory to solve the captcha`); + } +} - console.log(ex); +async function solveWithAntiCaptcha(taskParams, timeout = DEFAULT_TIMEOUT, secrets, resultAttribute = 'gRecaptchaResponse') { + const antiCaptchaApiUrl = 'https://api.anti-captcha.com'; + let gRecaptchaResponse = null; + const startTime = Date.now(); // we try to solve the captcha with anticaptcha - utils.parseStack( - ex, - function(frames) { - // We trim last frame, as it's our `new Error(message)` statement itself, which is redundant - kwargs.stacktrace = { - frames: frames.slice(0, -1) - }; - this.process(eventId, parsers.parseText(message, kwargs), cb); - }.bind(this) - ); - } else { - this.process(eventId, parsers.parseText(message, kwargs), cb); - } + const clientKey = secrets.antiCaptchaClientKey; - return eventId; - }, + if (clientKey) { + log('debug', ' Creating captcha resolution task...'); + const task = await request.post(`${antiCaptchaApiUrl}/createTask`, { + body: { + clientKey, + task: taskParams + }, + json: true + }); - captureException: function captureException(err, kwargs, cb) { - if (!cb && typeof kwargs === 'function') { - cb = kwargs; - kwargs = {}; - } else { - kwargs = utils.isPlainObject(kwargs) ? extend({}, kwargs) : {}; - } + if (task && task.taskId) { + log('debug', ` Task id : ${task.taskId}`); - if (!utils.isError(err)) { - if (utils.isPlainObject(err)) { - // This will allow us to group events based on top-level keys - // which is much better than creating new group when any key/value change - var keys = Object.keys(err).sort(); - var message = - 'Non-Error exception captured with keys: ' + - utils.serializeKeysForMessage(keys); - kwargs = extend(kwargs, { - message: message, - fingerprint: [md5(keys)], - extra: kwargs.extra || {} + while (!gRecaptchaResponse) { + const resp = await request.post(`${antiCaptchaApiUrl}/getTaskResult`, { + body: { + clientKey, + taskId: task.taskId + }, + json: true }); - kwargs.extra.__serialized__ = utils.serializeException(err); - err = new Error(message); - } else { - // This handles when someone does: - // throw "something awesome"; - // We synthesize an Error here so we can extract a (rough) stack trace. - err = new Error(err); - } - } + if (resp.status === 'ready') { + if (resp.errorId) { + log('error', `Anticaptcha error: ${JSON.stringify(resp)}`); + throw new Error(errors.CAPTCHA_RESOLUTION_FAILED); + } - var self = this; - var eventId = this.generateEventId(); - parsers.parseError(err, kwargs, function(kw) { - self.process(eventId, kw, cb); - }); + log('info', ` Found Recaptcha response : ${JSON.stringify(resp)}`); + return resp.solution[resultAttribute]; + } else { + log('debug', ` ${Math.round((Date.now() - startTime) / 1000)}s...`); - return eventId; - }, + if (Date.now() > timeout) { + log('warn', ` Captcha resolution timeout`); + throw new Error(errors.CAPTCHA_RESOLUTION_FAILED + '.TIMEOUT'); + } - context: function(ctx, func) { - if (!func && typeof ctx === 'function') { - func = ctx; - ctx = {}; + await sleep(10000); + } + } + } else { + log('warn', 'Could not create anticaptcha task'); + log('warn', JSON.stringify(task)); } + } else { + log('warn', 'Could not find any anticaptcha secret key'); + } - // todo/note: raven-js takes an args param to do apply(this, args) - // i don't think it's correct/necessary to bind this to the wrap call - // and i don't know if we need to support the args param; it's undocumented - return this.wrap(ctx, func).apply(null); - }, + throw new Error(errors.CAPTCHA_RESOLUTION_FAILED); +} - wrap: function(options, func) { - if (!this.installed) { - utils.consoleAlertOnce( - 'Raven has not been installed, therefore no breadcrumbs will be captured. Call `Raven.config(...).install()` to fix this.' - ); - } - if (!func && typeof options === 'function') { - func = options; - options = {}; - } +module.exports = solveCaptcha; - var wrapDomain = domain.create(); - // todo: better property name than sentryContext, maybe __raven__ or sth? - wrapDomain.sentryContext = options; +/***/ }), +/* 1307 */ +/***/ (function(module, exports, __webpack_require__) { - wrapDomain.on('error', this.uncaughtErrorHandler); - var wrapped = wrapDomain.bind(func); +"use strict"; +/* WEBPACK VAR INJECTION */(function(module) { - for (var property in func) { - if ({}.hasOwnProperty.call(func, property)) { - wrapped[property] = func[property]; - } - } - wrapped.prototype = func.prototype; - wrapped.__raven__ = true; - wrapped.__inner__ = func; - // note: domain.bind sets wrapped.domain, but it's not documented, unsure if we should rely on that - wrapped.__domain__ = wrapDomain; +var Bluebird = __webpack_require__(25).getNewLibraryCopy(), + configure = __webpack_require__(1308), + stealthyRequire = __webpack_require__(77); - return wrapped; - }, +try { - interceptErr: function(options, func) { - if (!func && typeof options === 'function') { - func = options; - options = {}; - } - var self = this; - var wrapped = function() { - var err = arguments[0]; - if (utils.isError(err)) { - self.captureException(err, options); - } else { - func.apply(null, arguments); - } - }; + // Load Request freshly - so that users can require an unaltered request instance! + var request = stealthyRequire(__webpack_require__.c, function () { + return __webpack_require__(1311); + }, + function () { + __webpack_require__(81); + }, module); - // repetitive with wrap - for (var property in func) { - if ({}.hasOwnProperty.call(func, property)) { - wrapped[property] = func[property]; - } - } - wrapped.prototype = func.prototype; - wrapped.__raven__ = true; - wrapped.__inner__ = func; +} catch (err) { + /* istanbul ignore next */ + var EOL = __webpack_require__(19).EOL; + /* istanbul ignore next */ + console.error(EOL + '###' + EOL + '### The "request" library is not installed automatically anymore.' + EOL + '### But is a dependency of "request-promise".' + EOL + '### Please install it with:' + EOL + '### npm install request --save' + EOL + '###' + EOL); + /* istanbul ignore next */ + throw err; +} - return wrapped; - }, +Bluebird.config({cancellation: true}); - setContext: function setContext(ctx) { - if (domain.active) { - domain.active.sentryContext = ctx; - } else { - this._globalContext = ctx; +configure({ + request: request, + PromiseImpl: Bluebird, + expose: [ + 'then', + 'catch', + 'finally', + 'cancel', + 'promise' + // Would you like to expose more Bluebird methods? Try e.g. `rp(...).promise().tap(...)` first. `.promise()` returns the full-fledged Bluebird promise. + ], + constructorMixin: function (resolve, reject, onCancel) { + var self = this; + onCancel(function () { + self.abort(); + }); } - return this; - }, +}); - mergeContext: function mergeContext(ctx) { - extend(this.getContext(), ctx); - return this; - }, +request.bindCLS = function RP$bindCLS() { + throw new Error('CLS support was dropped. To get it back read: https://github.com/request/request-promise/wiki/Getting-Back-Support-for-Continuation-Local-Storage'); +}; - getContext: function getContext() { - if (domain.active) { - if (!domain.active.sentryContext) { - domain.active.sentryContext = {}; - utils.consoleAlert('sentry context not found on active domain'); - } - return domain.active.sentryContext; - } - return this._globalContext; - }, - setCallbackHelper: function(propertyName, callback) { - var original = this[propertyName]; - if (typeof callback === 'function') { - this[propertyName] = function(data) { - return callback(data, original); - }; - } else { - this[propertyName] = callback; - } +module.exports = request; - return this; - }, +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(13)(module))) - /* - * Set the dataCallback option - * - * @param {function} callback The callback to run which allows the - * data blob to be mutated before sending - * @return {Raven} - */ - setDataCallback: function(callback) { - return this.setCallbackHelper('dataCallback', callback); - }, +/***/ }), +/* 1308 */ +/***/ (function(module, exports, __webpack_require__) { - /* - * Set the shouldSendCallback option - * - * @param {function} callback The callback to run which allows - * introspecting the blob before sending - * @return {Raven} - */ - setShouldSendCallback: function(callback) { - return this.setCallbackHelper('shouldSendCallback', callback); - }, +"use strict"; - requestHandler: function() { - var self = this; - return function ravenRequestMiddleware(req, res, next) { - self.context({req: req}, function() { - domain.active.add(req); - domain.active.add(res); - next(); - }); - }; - }, - errorHandler: function() { - var self = this; - return function ravenErrorMiddleware(err, req, res, next) { - var status = - err.status || - err.statusCode || - err.status_code || - (err.output && err.output.statusCode) || - 500; +var core = __webpack_require__(1309), + isArray = __webpack_require__(75), + isFunction = __webpack_require__(65), + isObjectLike = __webpack_require__(73); - // skip anything not marked as an internal server error - if (status < 500) return next(err); - var eventId = self.captureException(err, {req: req}); - res.sentry = eventId; - return next(err); - }; - }, +module.exports = function (options) { - captureBreadcrumb: function(breadcrumb) { - // Avoid capturing global-scoped breadcrumbs before instrumentation finishes - if (!this.installed) return; + var errorText = 'Please verify options'; // For better minification because this string is repeating - breadcrumb = extend( - { - timestamp: +new Date() / 1000 - }, - breadcrumb - ); - var currCtx = this.getContext(); - if (!currCtx.breadcrumbs) currCtx.breadcrumbs = []; - currCtx.breadcrumbs.push(breadcrumb); - if (currCtx.breadcrumbs.length > this.maxBreadcrumbs) { - currCtx.breadcrumbs.shift(); + if (!isObjectLike(options)) { + throw new TypeError(errorText); } - this.setContext(currCtx); - }, - - _createRequestObject: function() { - /** - * When using proxy, some of the attributes of req/request objects are non-enumerable. - * To make sure, that they are still available to us after we consolidate our sources - * (eg. globalContext.request + domainContext.request + kwargs.request), - * we manually pull them out from original objects. - * - * Same scenario happens when some frameworks (eg. Koa) decide to use request within - * request. eg `this.request.req`, which adds aliases to the main `request` object. - * By manually reassigning them here, we don't need to add additional checks - * like `req.method || (req.req && req.req.method)` - * - * We don't use Object.assign/extend as it's only merging over objects own properties, - * and we don't want to go through all of the properties as well, as we simply don't - * need all of them. - **/ - var sources = Array.from(arguments).filter(function(source) { - return Object.prototype.toString.call(source) === '[object Object]'; - }); - sources = [{}].concat(sources); - var request = extend.apply(null, sources); - var nonEnumerables = [ - 'headers', - 'hostname', - 'ip', - 'method', - 'protocol', - 'query', - 'secure', - 'url' - ]; - - nonEnumerables.forEach(function(key) { - sources.forEach(function(source) { - if (source[key]) request[key] = source[key]; - }); - }); - /** - * Check for 'host' *only* after we checked for 'hostname' first. - * This way we can avoid the noise coming from Express deprecation warning - * https://github.com/expressjs/express/blob/b97faff6e2aa4d34d79485fe4331cb0eec13ad57/lib/request.js#L450-L452 - * REF: https://github.com/getsentry/raven-node/issues/96#issuecomment-354748884 - **/ - if (!request.hasOwnProperty('hostname')) { - sources.forEach(function(source) { - if (source.host) request.host = source.host; - }); + if (!isFunction(options.request)) { + throw new TypeError(errorText + '.request'); } - return request; - } -}); + if (!isArray(options.expose) || options.expose.length === 0) { + throw new TypeError(errorText + '.expose'); + } -// Maintain old API compat, need to make sure arguments length is preserved -function Client(dsn, options) { - if (dsn instanceof Client) return dsn; - var ravenInstance = new Raven(); - return ravenInstance.config.apply(ravenInstance, arguments); -} -nodeUtil.inherits(Client, Raven); -// Singleton-by-default but not strictly enforced -// todo these extra export props are sort of an adhoc mess, better way to manage? -var defaultInstance = new Raven(); -defaultInstance.Client = Client; -defaultInstance.version = __webpack_require__(1281).version; -defaultInstance.disableConsoleAlerts = utils.disableConsoleAlerts; + var plumbing = core({ + PromiseImpl: options.PromiseImpl, + constructorMixin: options.constructorMixin + }); -module.exports = defaultInstance; + // Intercepting Request's init method -/***/ }), -/* 1273 */ -/***/ (function(module, exports, __webpack_require__) { + var originalInit = options.request.Request.prototype.init; -"use strict"; + options.request.Request.prototype.init = function RP$initInterceptor(requestOptions) { + // Init may be called again - currently in case of redirects + if (isObjectLike(requestOptions) && !this._callback && !this._rp_promise) { -/* - json-stringify-safe - Like JSON.stringify, but doesn't throw on circular references. + plumbing.init.call(this, requestOptions); - Originally forked from https://github.com/isaacs/json-stringify-safe - version 5.0.1 on 2017-09-21 and modified to handle Errors serialization. - Tests for this are in test/vendor. + } - ISC license: https://github.com/isaacs/json-stringify-safe/blob/master/LICENSE - */ + return originalInit.apply(this, arguments); -exports = module.exports = stringify; -exports.getSerialize = serializer; + }; -function stringify(obj, replacer, spaces, cycleReplacer) { - return JSON.stringify(obj, serializer(replacer, cycleReplacer), spaces); -} -// https://github.com/ftlabs/js-abbreviate/blob/fa709e5f139e7770a71827b1893f22418097fbda/index.js#L95-L106 -function stringifyError(value) { - var err = { - // These properties are implemented as magical getters and don't show up in for in - stack: value.stack, - message: value.message, - name: value.name - }; + // Exposing the Promise capabilities - for (var i in value) { - if (Object.prototype.hasOwnProperty.call(value, i)) { - err[i] = value[i]; - } - } + var thenExposed = false; + for ( var i = 0; i < options.expose.length; i+=1 ) { - return err; -} + var method = options.expose[i]; -function serializer(replacer, cycleReplacer) { - var stack = []; - var keys = []; + plumbing[ method === 'promise' ? 'exposePromise' : 'exposePromiseMethod' ]( + options.request.Request.prototype, + null, + '_rp_promise', + method + ); - if (cycleReplacer == null) { - cycleReplacer = function(key, value) { - if (stack[0] === value) { - return '[Circular ~]'; - } - return '[Circular ~.' + keys.slice(0, stack.indexOf(value)).join('.') + ']'; - }; - } + if (method === 'then') { + thenExposed = true; + } - return function(key, value) { - if (stack.length > 0) { - var thisPos = stack.indexOf(this); - ~thisPos ? stack.splice(thisPos + 1) : stack.push(this); - ~thisPos ? keys.splice(thisPos, Infinity, key) : keys.push(key); + } - if (~stack.indexOf(value)) { - value = cycleReplacer.call(this, key, value); - } - } else { - stack.push(value); + if (!thenExposed) { + throw new Error('Please expose "then"'); } - return replacer == null - ? value instanceof Error ? stringifyError(value) : value - : replacer.call(this, key, value); - }; -} +}; /***/ }), -/* 1274 */ +/* 1309 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var cookie = __webpack_require__(1275); -var urlParser = __webpack_require__(83); -var stringify = __webpack_require__(1273); +var errors = __webpack_require__(1310), + isFunction = __webpack_require__(65), + isObjectLike = __webpack_require__(73), + isString = __webpack_require__(74), + isUndefined = __webpack_require__(76); -var utils = __webpack_require__(1276); -module.exports.parseText = function parseText(message, kwargs) { - kwargs = kwargs || {}; - kwargs.message = message; +module.exports = function (options) { - return kwargs; -}; + var errorText = 'Please verify options'; // For better minification because this string is repeating -module.exports.parseError = function parseError(err, kwargs, cb) { - utils.parseStack(err, function(frames) { - var name = - ({}.hasOwnProperty.call(err, 'name') ? err.name : err.constructor.name) + ''; - if (typeof kwargs.message === 'undefined') { - kwargs.message = name + ': ' + (err.message || '<no message>'); + if (!isObjectLike(options)) { + throw new TypeError(errorText); } - kwargs.exception = [ - { - type: name, - value: err.message, - stacktrace: { - frames: frames - } - } - ]; - // Save additional error properties to `extra` under the error type (e.g. `extra.AttributeError`) - var extraErrorProps; - for (var key in err) { - if (err.hasOwnProperty(key)) { - if (key !== 'name' && key !== 'message' && key !== 'stack' && key !== 'domain') { - extraErrorProps = extraErrorProps || {}; - extraErrorProps[key] = err[key]; - } - } - } - if (extraErrorProps) { - kwargs.extra = kwargs.extra || {}; - kwargs.extra[name] = extraErrorProps; + if (!isFunction(options.PromiseImpl)) { + throw new TypeError(errorText + '.PromiseImpl'); } - if (!kwargs.transaction && !kwargs.culprit) { - for (var n = frames.length - 1; n >= 0; n--) { - if (frames[n].in_app) { - kwargs.transaction = utils.getTransaction(frames[n]); - break; - } - } + if (!isUndefined(options.constructorMixin) && !isFunction(options.constructorMixin)) { + throw new TypeError(errorText + '.PromiseImpl'); } - cb(kwargs); - }); -}; + var PromiseImpl = options.PromiseImpl; + var constructorMixin = options.constructorMixin; -module.exports.parseRequest = function parseRequest(req, parseUser) { - var kwargs = {}; - // headers: - // node, express: req.headers - // koa: req.header - var headers = req.headers || req.header || {}; + var plumbing = {}; - // method: - // node, express, koa: req.method - var method = req.method; + plumbing.init = function (requestOptions) { - // host: - // express: req.hostname in > 4 and req.host in < 4 - // koa: req.host - // node: req.headers.host - var host = req.hostname || req.host || headers.host || '<no host>'; + var self = this; - // protocol: - // node: <n/a> - // express, koa: req.protocol - var protocol = - req.protocol === 'https' || req.secure || (req.socket || {}).encrypted - ? 'https' - : 'http'; + self._rp_promise = new PromiseImpl(function (resolve, reject) { + self._rp_resolve = resolve; + self._rp_reject = reject; + if (constructorMixin) { + constructorMixin.apply(self, arguments); // Using arguments since specific Promise libraries may pass additional parameters + } + }); - // url (including path and query string): - // node, express: req.originalUrl - // koa: req.url - var originalUrl = req.originalUrl || req.url; + self._rp_callbackOrig = requestOptions.callback; + requestOptions.callback = self.callback = function RP$callback(err, response, body) { + plumbing.callback.call(self, err, response, body); + }; - // absolute url - var absoluteUrl = protocol + '://' + host + originalUrl; + if (isString(requestOptions.method)) { + requestOptions.method = requestOptions.method.toUpperCase(); + } - // query string: - // node: req.url (raw) - // express, koa: req.query - var query = req.query || urlParser.parse(originalUrl || '', true).query; + requestOptions.transform = requestOptions.transform || plumbing.defaultTransformations[requestOptions.method]; - // cookies: - // node, express, koa: req.headers.cookie - var cookies = cookie.parse(headers.cookie || ''); + self._rp_options = requestOptions; + self._rp_options.simple = requestOptions.simple !== false; + self._rp_options.resolveWithFullResponse = requestOptions.resolveWithFullResponse === true; + self._rp_options.transform2xxOnly = requestOptions.transform2xxOnly === true; - // body data: - // node, express, koa: req.body - var data = req.body; - if (['GET', 'HEAD'].indexOf(method) === -1) { - if (typeof data === 'undefined') { - data = '<unavailable>'; - } - } + }; - if (data && typeof data !== 'string' && {}.toString.call(data) !== '[object String]') { - // Make sure the request body is a string - data = stringify(data); - } + plumbing.defaultTransformations = { + HEAD: function (body, response, resolveWithFullResponse) { + return resolveWithFullResponse ? response : response.headers; + } + }; - // http interface - var http = { - method: method, - query_string: query, - headers: headers, - cookies: cookies, - data: data, - url: absoluteUrl - }; + plumbing.callback = function (err, response, body) { - // expose http interface - kwargs.request = http; + var self = this; + + var origCallbackThrewException = false, thrownException = null; - // user: typically found on req.user in express/passport patterns - // five cases for parseUser value: - // absent: grab only id, username, email from req.user - // false: capture nothing - // true: capture all keys from req.user - // array: provided whitelisted keys to grab from req.user - // function :: req -> user: custom parsing function - if (parseUser == null) parseUser = ['id', 'username', 'email']; - if (parseUser) { - var user = {}; - if (typeof parseUser === 'function') { - user = parseUser(req); - } else if (req.user) { - if (parseUser === true) { - for (var key in req.user) { - if ({}.hasOwnProperty.call(req.user, key)) { - user[key] = req.user[key]; - } + if (isFunction(self._rp_callbackOrig)) { + try { + self._rp_callbackOrig.apply(self, arguments); // TODO: Apply to self mimics behavior of request@2. Is that also right for request@next? + } catch (e) { + origCallbackThrewException = true; + thrownException = e; + } } - } else { - parseUser.forEach(function(fieldName) { - if ({}.hasOwnProperty.call(req.user, fieldName)) { - user[fieldName] = req.user[fieldName]; - } - }); - } - } - // client ip: - // node: req.connection.remoteAddress - // express, koa: req.ip - var ip = req.ip || (req.connection && req.connection.remoteAddress); - if (ip) { - user.ip_address = ip; - } + var is2xx = !err && /^2/.test('' + response.statusCode); - kwargs.user = user; - } + if (err) { - return kwargs; -}; + self._rp_reject(new errors.RequestError(err, self._rp_options, response)); + } else if (self._rp_options.simple && !is2xx) { -/***/ }), -/* 1275 */ -/***/ (function(module, exports, __webpack_require__) { + if (isFunction(self._rp_options.transform) && self._rp_options.transform2xxOnly === false) { -"use strict"; -/*! - * cookie - * Copyright(c) 2012-2014 Roman Shtylman - * Copyright(c) 2015 Douglas Christopher Wilson - * MIT Licensed - */ + (new PromiseImpl(function (resolve) { + resolve(self._rp_options.transform(body, response, self._rp_options.resolveWithFullResponse)); // transform may return a Promise + })) + .then(function (transformedResponse) { + self._rp_reject(new errors.StatusCodeError(response.statusCode, body, self._rp_options, transformedResponse)); + }) + .catch(function (transformErr) { + self._rp_reject(new errors.TransformError(transformErr, self._rp_options, response)); + }); + } else { + self._rp_reject(new errors.StatusCodeError(response.statusCode, body, self._rp_options, response)); + } + } else { -/** - * Module exports. - * @public - */ + if (isFunction(self._rp_options.transform) && (is2xx || self._rp_options.transform2xxOnly === false)) { -exports.parse = parse; -exports.serialize = serialize; + (new PromiseImpl(function (resolve) { + resolve(self._rp_options.transform(body, response, self._rp_options.resolveWithFullResponse)); // transform may return a Promise + })) + .then(function (transformedResponse) { + self._rp_resolve(transformedResponse); + }) + .catch(function (transformErr) { + self._rp_reject(new errors.TransformError(transformErr, self._rp_options, response)); + }); -/** - * Module variables. - * @private - */ + } else if (self._rp_options.resolveWithFullResponse) { + self._rp_resolve(response); + } else { + self._rp_resolve(body); + } -var decode = decodeURIComponent; -var encode = encodeURIComponent; -var pairSplitRegExp = /; */; + } -/** - * RegExp to match field-content in RFC 7230 sec 3.2 - * - * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ] - * field-vchar = VCHAR / obs-text - * obs-text = %x80-FF - */ + if (origCallbackThrewException) { + throw thrownException; + } -var fieldContentRegExp = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/; + }; -/** - * Parse a cookie header. - * - * Parse the given cookie header string into an object - * The object has the various cookies as keys(names) => values - * - * @param {string} str - * @param {object} [options] - * @return {object} - * @public - */ + plumbing.exposePromiseMethod = function (exposeTo, bindTo, promisePropertyKey, methodToExpose, exposeAs) { -function parse(str, options) { - if (typeof str !== 'string') { - throw new TypeError('argument str must be a string'); - } + exposeAs = exposeAs || methodToExpose; - var obj = {} - var opt = options || {}; - var pairs = str.split(pairSplitRegExp); - var dec = opt.decode || decode; + if (exposeAs in exposeTo) { + throw new Error('Unable to expose method "' + exposeAs + '"'); + } - for (var i = 0; i < pairs.length; i++) { - var pair = pairs[i]; - var eq_idx = pair.indexOf('='); + exposeTo[exposeAs] = function RP$exposed() { + var self = bindTo || this; + return self[promisePropertyKey][methodToExpose].apply(self[promisePropertyKey], arguments); + }; - // skip things that don't look like key=value - if (eq_idx < 0) { - continue; - } + }; - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); + plumbing.exposePromise = function (exposeTo, bindTo, promisePropertyKey, exposeAs) { - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } + exposeAs = exposeAs || 'promise'; - // only assign once - if (undefined == obj[key]) { - obj[key] = tryDecode(val, dec); - } - } + if (exposeAs in exposeTo) { + throw new Error('Unable to expose method "' + exposeAs + '"'); + } - return obj; -} + exposeTo[exposeAs] = function RP$promise() { + var self = bindTo || this; + return self[promisePropertyKey]; + }; -/** - * Serialize data into a cookie header. - * - * Serialize the a name value pair into a cookie string suitable for - * http headers. An optional options object specified cookie parameters. - * - * serialize('foo', 'bar', { httpOnly: true }) - * => "foo=bar; httpOnly" - * - * @param {string} name - * @param {string} val - * @param {object} [options] - * @return {string} - * @public - */ + }; -function serialize(name, val, options) { - var opt = options || {}; - var enc = opt.encode || encode; + return plumbing; - if (typeof enc !== 'function') { - throw new TypeError('option encode is invalid'); - } +}; - if (!fieldContentRegExp.test(name)) { - throw new TypeError('argument name is invalid'); - } - var value = enc(val); +/***/ }), +/* 1310 */ +/***/ (function(module, exports, __webpack_require__) { - if (value && !fieldContentRegExp.test(value)) { - throw new TypeError('argument val is invalid'); - } +"use strict"; - var str = name + '=' + value; - if (null != opt.maxAge) { - var maxAge = opt.maxAge - 0; - if (isNaN(maxAge)) throw new Error('maxAge should be a Number'); - str += '; Max-Age=' + Math.floor(maxAge); - } - if (opt.domain) { - if (!fieldContentRegExp.test(opt.domain)) { - throw new TypeError('option domain is invalid'); - } +function RequestError(cause, options, response) { - str += '; Domain=' + opt.domain; - } + this.name = 'RequestError'; + this.message = String(cause); + this.cause = cause; + this.error = cause; // legacy attribute + this.options = options; + this.response = response; - if (opt.path) { - if (!fieldContentRegExp.test(opt.path)) { - throw new TypeError('option path is invalid'); + if (Error.captureStackTrace) { // required for non-V8 environments + Error.captureStackTrace(this); } - str += '; Path=' + opt.path; - } +} +RequestError.prototype = Object.create(Error.prototype); +RequestError.prototype.constructor = RequestError; - if (opt.expires) { - if (typeof opt.expires.toUTCString !== 'function') { - throw new TypeError('option expires is invalid'); + +function StatusCodeError(statusCode, body, options, response) { + + this.name = 'StatusCodeError'; + this.statusCode = statusCode; + this.message = statusCode + ' - ' + (JSON && JSON.stringify ? JSON.stringify(body) : body); + this.error = body; // legacy attribute + this.options = options; + this.response = response; + + if (Error.captureStackTrace) { // required for non-V8 environments + Error.captureStackTrace(this); } - str += '; Expires=' + opt.expires.toUTCString(); - } +} +StatusCodeError.prototype = Object.create(Error.prototype); +StatusCodeError.prototype.constructor = StatusCodeError; - if (opt.httpOnly) { - str += '; HttpOnly'; - } - if (opt.secure) { - str += '; Secure'; - } +function TransformError(cause, options, response) { - if (opt.sameSite) { - var sameSite = typeof opt.sameSite === 'string' - ? opt.sameSite.toLowerCase() : opt.sameSite; + this.name = 'TransformError'; + this.message = String(cause); + this.cause = cause; + this.error = cause; // legacy attribute + this.options = options; + this.response = response; - switch (sameSite) { - case true: - str += '; SameSite=Strict'; - break; - case 'lax': - str += '; SameSite=Lax'; - break; - case 'strict': - str += '; SameSite=Strict'; - break; - default: - throw new TypeError('option sameSite is invalid'); + if (Error.captureStackTrace) { // required for non-V8 environments + Error.captureStackTrace(this); } - } - return str; } +TransformError.prototype = Object.create(Error.prototype); +TransformError.prototype.constructor = TransformError; -/** - * Try decoding a string using a decoding function. - * - * @param {string} str - * @param {function} decode - * @private - */ -function tryDecode(str, decode) { - try { - return decode(str); - } catch (e) { - return str; - } -} +module.exports = { + RequestError: RequestError, + StatusCodeError: StatusCodeError, + TransformError: TransformError +}; /***/ }), -/* 1276 */ +/* 1311 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +// Copyright 2010-2012 Mikeal Rogers +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. -var fs = __webpack_require__(167); -var url = __webpack_require__(83); -var transports = __webpack_require__(1277); -var path = __webpack_require__(160); -var lsmod = __webpack_require__(1279); -var stacktrace = __webpack_require__(1280); -var stringify = __webpack_require__(1273); -var ravenVersion = __webpack_require__(1281).version; +var extend = __webpack_require__(79) +var cookies = __webpack_require__(1312) +var helpers = __webpack_require__(1320) -var protocolMap = { - http: 80, - https: 443 -}; +var paramsHaveRequestBody = helpers.paramsHaveRequestBody -var consoleAlerts = new Set(); +// organize params for patch, post, put, head, del +function initParams (uri, options, callback) { + if (typeof options === 'function') { + callback = options + } -// Default Node.js REPL depth -var MAX_SERIALIZE_EXCEPTION_DEPTH = 3; -// 50kB, as 100kB is max payload size, so half sounds reasonable -var MAX_SERIALIZE_EXCEPTION_SIZE = 50 * 1024; -var MAX_SERIALIZE_KEYS_LENGTH = 40; + var params = {} + if (typeof options === 'object') { + extend(params, options, {uri: uri}) + } else if (typeof uri === 'string') { + extend(params, {uri: uri}) + } else { + extend(params, uri) + } -function utf8Length(value) { - return ~-encodeURI(value).split(/%..|./).length; + params.callback = callback || params.callback + return params } -function jsonSize(value) { - return utf8Length(JSON.stringify(value)); -} +function request (uri, options, callback) { + if (typeof uri === 'undefined') { + throw new Error('undefined is not a valid uri or options object.') + } -function isError(what) { - return ( - Object.prototype.toString.call(what) === '[object Error]' || what instanceof Error - ); -} + var params = initParams(uri, options, callback) -module.exports.isError = isError; + if (params.method === 'HEAD' && paramsHaveRequestBody(params)) { + throw new Error('HTTP HEAD requests MUST NOT include a request body.') + } -function isPlainObject(what) { - return Object.prototype.toString.call(what) === '[object Object]'; + return new request.Request(params) } -module.exports.isPlainObject = isPlainObject; - -function serializeValue(value) { - var maxLength = 40; - - if (typeof value === 'string') { - return value.length <= maxLength ? value : value.substr(0, maxLength - 1) + '\u2026'; - } else if ( - typeof value === 'number' || - typeof value === 'boolean' || - typeof value === 'undefined' - ) { - return value; +function verbFunc (verb) { + var method = verb.toUpperCase() + return function (uri, options, callback) { + var params = initParams(uri, options, callback) + params.method = method + return request(params, params.callback) } +} - var type = Object.prototype.toString.call(value); - - // Node.js REPL notation - if (type === '[object Object]') return '[Object]'; - if (type === '[object Array]') return '[Array]'; - if (type === '[object Function]') - return value.name ? '[Function: ' + value.name + ']' : '[Function]'; +// define like this to please codeintel/intellisense IDEs +request.get = verbFunc('get') +request.head = verbFunc('head') +request.options = verbFunc('options') +request.post = verbFunc('post') +request.put = verbFunc('put') +request.patch = verbFunc('patch') +request.del = verbFunc('delete') +request['delete'] = verbFunc('delete') - return value; +request.jar = function (store) { + return cookies.jar(store) } -function serializeObject(value, depth) { - if (depth === 0) return serializeValue(value); +request.cookie = function (str) { + return cookies.parse(str) +} - if (isPlainObject(value)) { - return Object.keys(value).reduce(function(acc, key) { - acc[key] = serializeObject(value[key], depth - 1); - return acc; - }, {}); - } else if (Array.isArray(value)) { - return value.map(function(val) { - return serializeObject(val, depth - 1); - }); - } +function wrapRequestMethod (method, options, requester, verb) { + return function (uri, opts, callback) { + var params = initParams(uri, opts, callback) - return serializeValue(value); -} + var target = {} + extend(true, target, options, params) -function serializeException(ex, depth, maxSize) { - if (!isPlainObject(ex)) return ex; + target.pool = params.pool || options.pool - depth = typeof depth !== 'number' ? MAX_SERIALIZE_EXCEPTION_DEPTH : depth; - maxSize = typeof depth !== 'number' ? MAX_SERIALIZE_EXCEPTION_SIZE : maxSize; + if (verb) { + target.method = verb.toUpperCase() + } - var serialized = serializeObject(ex, depth); + if (typeof requester === 'function') { + method = requester + } - if (jsonSize(stringify(serialized)) > maxSize) { - return serializeException(ex, depth - 1); + return method(target, target.callback) } - - return serialized; } -module.exports.serializeException = serializeException; - -function serializeKeysForMessage(keys, maxLength) { - if (typeof keys === 'number' || typeof keys === 'string') return keys.toString(); - if (!Array.isArray(keys)) return ''; - - keys = keys.filter(function(key) { - return typeof key === 'string'; - }); - if (keys.length === 0) return '[object has no keys]'; +request.defaults = function (options, requester) { + var self = this - maxLength = typeof maxLength !== 'number' ? MAX_SERIALIZE_KEYS_LENGTH : maxLength; - if (keys[0].length >= maxLength) return keys[0]; + options = options || {} - for (var usedKeys = keys.length; usedKeys > 0; usedKeys--) { - var serialized = keys.slice(0, usedKeys).join(', '); - if (serialized.length > maxLength) continue; - if (usedKeys === keys.length) return serialized; - return serialized + '\u2026'; + if (typeof options === 'function') { + requester = options + options = {} } - return ''; -} - -module.exports.serializeKeysForMessage = serializeKeysForMessage; + var defaults = wrapRequestMethod(self, options, requester) -module.exports.disableConsoleAlerts = function disableConsoleAlerts() { - consoleAlerts = false; -}; + var verbs = ['get', 'head', 'post', 'put', 'patch', 'del', 'delete'] + verbs.forEach(function (verb) { + defaults[verb] = wrapRequestMethod(self[verb], options, requester, verb) + }) -module.exports.enableConsoleAlerts = function enableConsoleAlerts() { - consoleAlerts = new Set(); -}; + defaults.cookie = wrapRequestMethod(self.cookie, options, requester) + defaults.jar = self.jar + defaults.defaults = self.defaults + return defaults +} -module.exports.consoleAlert = function consoleAlert(msg) { - if (consoleAlerts) { - console.warn('raven@' + ravenVersion + ' alert: ' + msg); +request.forever = function (agentOptions, optionsArg) { + var options = {} + if (optionsArg) { + extend(options, optionsArg) } -}; - -module.exports.consoleAlertOnce = function consoleAlertOnce(msg) { - if (consoleAlerts && !consoleAlerts.has(msg)) { - consoleAlerts.add(msg); - console.warn('raven@' + ravenVersion + ' alert: ' + msg); + if (agentOptions) { + options.agentOptions = agentOptions } -}; -module.exports.extend = - Object.assign || - function(target) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - for (var key in source) { - if (Object.prototype.hasOwnProperty.call(source, key)) { - target[key] = source[key]; - } - } - } - return target; - }; + options.forever = true + return request.defaults(options) +} -module.exports.getAuthHeader = function getAuthHeader(timestamp, apiKey, apiSecret) { - var header = ['Sentry sentry_version=5']; - header.push('sentry_timestamp=' + timestamp); - header.push('sentry_client=raven-node/' + ravenVersion); - header.push('sentry_key=' + apiKey); - if (apiSecret) header.push('sentry_secret=' + apiSecret); - return header.join(', '); -}; +// Exports -module.exports.parseDSN = function parseDSN(dsn) { - if (!dsn) { - // Let a falsey value return false explicitly - return false; +module.exports = request +request.Request = __webpack_require__(1321) +request.initParams = initParams + +// Backwards compatibility for request.debug +Object.defineProperty(request, 'debug', { + enumerable: true, + get: function () { + return request.Request.debug + }, + set: function (debug) { + request.Request.debug = debug } - try { - var parsed = url.parse(dsn), - response = { - protocol: parsed.protocol.slice(0, -1), - public_key: parsed.auth.split(':')[0], - host: parsed.host.split(':')[0] - }; +}) - if (parsed.auth.split(':')[1]) { - response.private_key = parsed.auth.split(':')[1]; - } - if (~response.protocol.indexOf('+')) { - response.protocol = response.protocol.split('+')[1]; - } +/***/ }), +/* 1312 */ +/***/ (function(module, exports, __webpack_require__) { - if (!transports.hasOwnProperty(response.protocol)) { - throw new Error('Invalid transport'); - } +"use strict"; - var index = parsed.pathname.lastIndexOf('/'); - response.path = parsed.pathname.substr(0, index + 1); - response.project_id = parsed.pathname.substr(index + 1); - response.port = ~~parsed.port || protocolMap[response.protocol] || 443; - return response; - } catch (e) { - throw new Error('Invalid Sentry DSN: ' + dsn); - } -}; -module.exports.getTransaction = function getTransaction(frame) { - if (frame.module || frame.function) { - return (frame.module || '?') + ' at ' + (frame.function || '?'); - } - return '<unknown>'; -}; +var tough = __webpack_require__(1313) -var moduleCache; -module.exports.getModules = function getModules() { - if (!moduleCache) { - moduleCache = lsmod(); - } - return moduleCache; -}; +var Cookie = tough.Cookie +var CookieJar = tough.CookieJar -module.exports.fill = function(obj, name, replacement, track) { - var orig = obj[name]; - obj[name] = replacement(orig); - if (track) { - track.push([obj, name, orig]); +exports.parse = function (str) { + if (str && str.uri) { + str = str.uri } -}; + if (typeof str !== 'string') { + throw new Error('The cookie function only accepts STRING as param') + } + return Cookie.parse(str, {loose: true}) +} -var LINES_OF_CONTEXT = 7; +// Adapt the sometimes-Async api of tough.CookieJar to our requirements +function RequestJar (store) { + var self = this + self._jar = new CookieJar(store, {looseMode: true}) +} +RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) { + var self = this + return self._jar.setCookieSync(cookieOrStr, uri, options || {}) +} +RequestJar.prototype.getCookieString = function (uri) { + var self = this + return self._jar.getCookieStringSync(uri) +} +RequestJar.prototype.getCookies = function (uri) { + var self = this + return self._jar.getCookiesSync(uri) +} -function getFunction(line) { - try { - return ( - line.getFunctionName() || - line.getTypeName() + '.' + (line.getMethodName() || '<anonymous>') - ); - } catch (e) { - // This seems to happen sometimes when using 'use strict', - // stemming from `getTypeName`. - // [TypeError: Cannot read property 'constructor' of undefined] - return '<anonymous>'; - } +exports.jar = function (store) { + return new RequestJar(store) } -var mainModule = - ((__webpack_require__.c[__webpack_require__.s] && __webpack_require__.c[__webpack_require__.s].filename && path.dirname(__webpack_require__.c[__webpack_require__.s].filename)) || - global.process.cwd()) + '/'; -function getModule(filename, base) { - if (!base) base = mainModule; +/***/ }), +/* 1313 */ +/***/ (function(module, exports, __webpack_require__) { - // It's specifically a module - var file = path.basename(filename, '.js'); - filename = path.dirname(filename); - var n = filename.lastIndexOf('/node_modules/'); - if (n > -1) { - // /node_modules/ is 14 chars - return filename.substr(n + 14).replace(/\//g, '.') + ':' + file; - } - // Let's see if it's a part of the main module - // To be a part of main module, it has to share the same base - n = (filename + '/').lastIndexOf(base, 0); - if (n === 0) { - var module = filename.substr(base.length).replace(/\//g, '.'); - if (module) module += ':'; - module += file; - return module; - } - return file; -} +"use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ -function readSourceFiles(filenames, cb) { - // we're relying on filenames being de-duped already - if (filenames.length === 0) return setTimeout(cb, 0, {}); +var net = __webpack_require__(82); +var urlParse = __webpack_require__(83).parse; +var util = __webpack_require__(9); +var pubsuffix = __webpack_require__(1314); +var Store = __webpack_require__(1315).Store; +var MemoryCookieStore = __webpack_require__(1316).MemoryCookieStore; +var pathMatch = __webpack_require__(1318).pathMatch; +var VERSION = __webpack_require__(1319).version; - var sourceFiles = {}; - var numFilesToRead = filenames.length; - return filenames.forEach(function(filename) { - fs.readFile(filename, function(readErr, file) { - if (!readErr) sourceFiles[filename] = file.toString().split('\n'); - if (--numFilesToRead === 0) cb(sourceFiles); - }); - }); +var punycode; +try { + punycode = __webpack_require__(86); +} catch(e) { + console.warn("tough-cookie: can't load punycode; won't use punycode for domain normalization"); } -// This is basically just `trim_line` from https://github.com/getsentry/sentry/blob/master/src/sentry/lang/javascript/processor.py#L67 -function snipLine(line, colno) { - var ll = line.length; - if (ll <= 150) return line; - if (colno > ll) colno = ll; +// From RFC6265 S4.1.1 +// note that it excludes \x3B ";" +var COOKIE_OCTETS = /^[\x21\x23-\x2B\x2D-\x3A\x3C-\x5B\x5D-\x7E]+$/; - var start = Math.max(colno - 60, 0); - if (start < 5) start = 0; +var CONTROL_CHARS = /[\x00-\x1F]/; - var end = Math.min(start + 140, ll); - if (end > ll - 5) end = ll; - if (end === ll) start = Math.max(end - 140, 0); +// From Chromium // '\r', '\n' and '\0' should be treated as a terminator in +// the "relaxed" mode, see: +// https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/parsed_cookie.cc#L60 +var TERMINATORS = ['\n', '\r', '\0']; - line = line.slice(start, end); - if (start > 0) line = '{snip} ' + line; - if (end < ll) line += ' {snip}'; +// RFC6265 S4.1.1 defines path value as 'any CHAR except CTLs or ";"' +// Note ';' is \x3B +var PATH_VALUE = /[\x20-\x3A\x3C-\x7E]+/; - return line; -} +// date-time parsing constants (RFC6265 S5.1.1) -function snipLine0(line) { - return snipLine(line, 0); -} +var DATE_DELIM = /[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]/; -function parseStack(err, cb) { - if (!err) return cb([]); +var MONTH_TO_NUM = { + jan:0, feb:1, mar:2, apr:3, may:4, jun:5, + jul:6, aug:7, sep:8, oct:9, nov:10, dec:11 +}; +var NUM_TO_MONTH = [ + 'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec' +]; +var NUM_TO_DAY = [ + 'Sun','Mon','Tue','Wed','Thu','Fri','Sat' +]; - var stack = stacktrace.parse(err); - if (!stack || !Array.isArray(stack) || !stack.length || !stack[0].getFileName) { - // the stack is not the useful thing we were expecting :/ - return cb([]); +var MAX_TIME = 2147483647000; // 31-bit max +var MIN_TIME = 0; // 31-bit min + +/* + * Parses a Natural number (i.e., non-negative integer) with either the + * <min>*<max>DIGIT ( non-digit *OCTET ) + * or + * <min>*<max>DIGIT + * grammar (RFC6265 S5.1.1). + * + * The "trailingOK" boolean controls if the grammar accepts a + * "( non-digit *OCTET )" trailer. + */ +function parseDigits(token, minDigits, maxDigits, trailingOK) { + var count = 0; + while (count < token.length) { + var c = token.charCodeAt(count); + // "non-digit = %x00-2F / %x3A-FF" + if (c <= 0x2F || c >= 0x3A) { + break; + } + count++; } - // Sentry expects the stack trace to be oldest -> newest, v8 provides newest -> oldest - stack.reverse(); + // constrain to a minimum and maximum number of digits. + if (count < minDigits || count > maxDigits) { + return null; + } - var frames = []; - var filesToRead = {}; - stack.forEach(function(line) { - var frame = { - filename: line.getFileName() || '', - lineno: line.getLineNumber(), - colno: line.getColumnNumber(), - function: getFunction(line) - }; + if (!trailingOK && count != token.length) { + return null; + } - var isInternal = - line.isNative() || - (frame.filename[0] !== '/' && - frame.filename[0] !== '.' && - frame.filename.indexOf(':\\') !== 1); + return parseInt(token.substr(0,count), 10); +} - // in_app is all that's not an internal Node function or a module within node_modules - // note that isNative appears to return true even for node core libraries - // see https://github.com/getsentry/raven-node/issues/176 - frame.in_app = !isInternal && frame.filename.indexOf('node_modules/') === -1; +function parseTime(token) { + var parts = token.split(':'); + var result = [0,0,0]; - // Extract a module name based on the filename - if (frame.filename) { - frame.module = getModule(frame.filename); - if (!isInternal) filesToRead[frame.filename] = true; - } + /* RF6256 S5.1.1: + * time = hms-time ( non-digit *OCTET ) + * hms-time = time-field ":" time-field ":" time-field + * time-field = 1*2DIGIT + */ - frames.push(frame); - }); + if (parts.length !== 3) { + return null; + } - return readSourceFiles(Object.keys(filesToRead), function(sourceFiles) { - frames.forEach(function(frame) { - if (frame.filename && sourceFiles[frame.filename]) { - var lines = sourceFiles[frame.filename]; - try { - frame.pre_context = lines - .slice(Math.max(0, frame.lineno - (LINES_OF_CONTEXT + 1)), frame.lineno - 1) - .map(snipLine0); - frame.context_line = snipLine(lines[frame.lineno - 1], frame.colno); - frame.post_context = lines - .slice(frame.lineno, frame.lineno + LINES_OF_CONTEXT) - .map(snipLine0); - } catch (e) { - // anomaly, being defensive in case - // unlikely to ever happen in practice but can definitely happen in theory - } - } - }); + for (var i = 0; i < 3; i++) { + // "time-field" must be strictly "1*2DIGIT", HOWEVER, "hms-time" can be + // followed by "( non-digit *OCTET )" so therefore the last time-field can + // have a trailer + var trailingOK = (i == 2); + var num = parseDigits(parts[i], 1, 2, trailingOK); + if (num === null) { + return null; + } + result[i] = num; + } - cb(frames); - }); + return result; } -// expose basically for testing because I don't know what I'm doing -module.exports.parseStack = parseStack; -module.exports.getModule = getModule; +function parseMonth(token) { + token = String(token).substr(0,3).toLowerCase(); + var num = MONTH_TO_NUM[token]; + return num >= 0 ? num : null; +} +/* + * RFC6265 S5.1.1 date parser (see RFC for full grammar) + */ +function parseDate(str) { + if (!str) { + return; + } -/***/ }), -/* 1277 */ -/***/ (function(module, exports, __webpack_require__) { + /* RFC6265 S5.1.1: + * 2. Process each date-token sequentially in the order the date-tokens + * appear in the cookie-date + */ + var tokens = str.split(DATE_DELIM); + if (!tokens) { + return; + } -"use strict"; + var hour = null; + var minute = null; + var second = null; + var dayOfMonth = null; + var month = null; + var year = null; + for (var i=0; i<tokens.length; i++) { + var token = tokens[i].trim(); + if (!token.length) { + continue; + } -var events = __webpack_require__(271); -var util = __webpack_require__(9); -var timeoutReq = __webpack_require__(1278); + var result; -var http = __webpack_require__(98); -var https = __webpack_require__(99); + /* 2.1. If the found-time flag is not set and the token matches the time + * production, set the found-time flag and set the hour- value, + * minute-value, and second-value to the numbers denoted by the digits in + * the date-token, respectively. Skip the remaining sub-steps and continue + * to the next date-token. + */ + if (second === null) { + result = parseTime(token); + if (result) { + hour = result[0]; + minute = result[1]; + second = result[2]; + continue; + } + } -var agentOptions = {keepAlive: true, maxSockets: 100}; -var httpAgent = new http.Agent(agentOptions); -var httpsAgent = new https.Agent(agentOptions); + /* 2.2. If the found-day-of-month flag is not set and the date-token matches + * the day-of-month production, set the found-day-of- month flag and set + * the day-of-month-value to the number denoted by the date-token. Skip + * the remaining sub-steps and continue to the next date-token. + */ + if (dayOfMonth === null) { + // "day-of-month = 1*2DIGIT ( non-digit *OCTET )" + result = parseDigits(token, 1, 2, true); + if (result !== null) { + dayOfMonth = result; + continue; + } + } -function Transport() {} -util.inherits(Transport, events.EventEmitter); + /* 2.3. If the found-month flag is not set and the date-token matches the + * month production, set the found-month flag and set the month-value to + * the month denoted by the date-token. Skip the remaining sub-steps and + * continue to the next date-token. + */ + if (month === null) { + result = parseMonth(token); + if (result !== null) { + month = result; + continue; + } + } -function HTTPTransport(options) { - this.defaultPort = 80; - this.transport = http; - this.options = options || {}; - this.agent = httpAgent; -} -util.inherits(HTTPTransport, Transport); -HTTPTransport.prototype.send = function(client, message, headers, eventId, cb) { - var options = { - hostname: client.dsn.host, - path: client.dsn.path + 'api/' + client.dsn.project_id + '/store/', - headers: headers, - method: 'POST', - port: client.dsn.port || this.defaultPort, - ca: client.ca, - agent: this.agent - }; - for (var key in this.options) { - if (this.options.hasOwnProperty(key)) { - options[key] = this.options[key]; + /* 2.4. If the found-year flag is not set and the date-token matches the + * year production, set the found-year flag and set the year-value to the + * number denoted by the date-token. Skip the remaining sub-steps and + * continue to the next date-token. + */ + if (year === null) { + // "year = 2*4DIGIT ( non-digit *OCTET )" + result = parseDigits(token, 2, 4, true); + if (result !== null) { + year = result; + /* From S5.1.1: + * 3. If the year-value is greater than or equal to 70 and less + * than or equal to 99, increment the year-value by 1900. + * 4. If the year-value is greater than or equal to 0 and less + * than or equal to 69, increment the year-value by 2000. + */ + if (year >= 70 && year <= 99) { + year += 1900; + } else if (year >= 0 && year <= 69) { + year += 2000; + } + } } } - // prevent off heap memory explosion - var _name = this.agent.getName({host: client.dsn.host, port: client.dsn.port}); - var _requests = this.agent.requests[_name]; - if (_requests && Object.keys(_requests).length > client.maxReqQueueCount) { - // other feedback strategy - client.emit('error', new Error('client req queue is full..')); + /* RFC 6265 S5.1.1 + * "5. Abort these steps and fail to parse the cookie-date if: + * * at least one of the found-day-of-month, found-month, found- + * year, or found-time flags is not set, + * * the day-of-month-value is less than 1 or greater than 31, + * * the year-value is less than 1601, + * * the hour-value is greater than 23, + * * the minute-value is greater than 59, or + * * the second-value is greater than 59. + * (Note that leap seconds cannot be represented in this syntax.)" + * + * So, in order as above: + */ + if ( + dayOfMonth === null || month === null || year === null || second === null || + dayOfMonth < 1 || dayOfMonth > 31 || + year < 1601 || + hour > 23 || + minute > 59 || + second > 59 + ) { return; } - var req = this.transport.request(options, function(res) { - res.setEncoding('utf8'); - if (res.statusCode >= 200 && res.statusCode < 300) { - client.emit('logged', eventId); - cb && cb(null, eventId); - } else { - var reason = res.headers['x-sentry-error']; - var e = new Error('HTTP Error (' + res.statusCode + '): ' + reason); - e.response = res; - e.statusCode = res.statusCode; - e.reason = reason; - e.sendMessage = message; - e.requestHeaders = headers; - e.eventId = eventId; - client.emit('error', e); - cb && cb(e); - } + return new Date(Date.UTC(year, month, dayOfMonth, hour, minute, second)); +} - // force the socket to drain - var noop = function() {}; - res.on('data', noop); - res.on('end', noop); - }); +function formatDate(date) { + var d = date.getUTCDate(); d = d >= 10 ? d : '0'+d; + var h = date.getUTCHours(); h = h >= 10 ? h : '0'+h; + var m = date.getUTCMinutes(); m = m >= 10 ? m : '0'+m; + var s = date.getUTCSeconds(); s = s >= 10 ? s : '0'+s; + return NUM_TO_DAY[date.getUTCDay()] + ', ' + + d+' '+ NUM_TO_MONTH[date.getUTCMonth()] +' '+ date.getUTCFullYear() +' '+ + h+':'+m+':'+s+' GMT'; +} - timeoutReq(req, client.sendTimeout * 1000); +// S5.1.2 Canonicalized Host Names +function canonicalDomain(str) { + if (str == null) { + return null; + } + str = str.trim().replace(/^\./,''); // S4.1.2.3 & S5.2.3: ignore leading . - var cbFired = false; - req.on('error', function(e) { - client.emit('error', e); - if (!cbFired) { - cb && cb(e); - cbFired = true; - } - }); - req.end(message); -}; + // convert to IDN if any non-ASCII characters + if (punycode && /[^\u0001-\u007f]/.test(str)) { + str = punycode.toASCII(str); + } -function HTTPSTransport(options) { - this.defaultPort = 443; - this.transport = https; - this.options = options || {}; - this.agent = httpsAgent; + return str.toLowerCase(); } -util.inherits(HTTPSTransport, HTTPTransport); - -module.exports.http = new HTTPTransport(); -module.exports.https = new HTTPSTransport(); -module.exports.Transport = Transport; -module.exports.HTTPTransport = HTTPTransport; -module.exports.HTTPSTransport = HTTPSTransport; - -/***/ }), -/* 1278 */ -/***/ (function(module, exports, __webpack_require__) { +// S5.1.3 Domain Matching +function domainMatch(str, domStr, canonicalize) { + if (str == null || domStr == null) { + return null; + } + if (canonicalize !== false) { + str = canonicalDomain(str); + domStr = canonicalDomain(domStr); + } -"use strict"; + /* + * "The domain string and the string are identical. (Note that both the + * domain string and the string will have been canonicalized to lower case at + * this point)" + */ + if (str == domStr) { + return true; + } + /* "All of the following [three] conditions hold:" (order adjusted from the RFC) */ -module.exports = function (req, time) { - if (req.timeoutTimer) { - return req; - } + /* "* The string is a host name (i.e., not an IP address)." */ + if (net.isIP(str)) { + return false; + } - var delays = isNaN(time) ? time : {socket: time, connect: time}; - var host = req._headers ? (' to ' + req._headers.host) : ''; + /* "* The domain string is a suffix of the string" */ + var idx = str.indexOf(domStr); + if (idx <= 0) { + return false; // it's a non-match (-1) or prefix (0) + } - if (delays.connect !== undefined) { - req.timeoutTimer = setTimeout(function timeoutHandler() { - req.abort(); - var e = new Error('Connection timed out on request' + host); - e.code = 'ETIMEDOUT'; - req.emit('error', e); - }, delays.connect); - } + // e.g "a.b.c".indexOf("b.c") === 2 + // 5 === 3+2 + if (str.length !== domStr.length + idx) { // it's not a suffix + return false; + } - // Clear the connection timeout timer once a socket is assigned to the - // request and is connected. - req.on('socket', function assign(socket) { - // Socket may come from Agent pool and may be already connected. - if (!(socket.connecting || socket._connecting)) { - connect(); - return; - } + /* "* The last character of the string that is not included in the domain + * string is a %x2E (".") character." */ + if (str.substr(idx-1,1) !== '.') { + return false; + } - socket.once('connect', connect); - }); + return true; +} - function clear() { - if (req.timeoutTimer) { - clearTimeout(req.timeoutTimer); - req.timeoutTimer = null; - } - } - function connect() { - clear(); +// RFC6265 S5.1.4 Paths and Path-Match - if (delays.socket !== undefined) { - // Abort the request if there is no activity on the socket for more - // than `delays.socket` milliseconds. - req.setTimeout(delays.socket, function socketTimeoutHandler() { - req.abort(); - var e = new Error('Socket timed out on request' + host); - e.code = 'ESOCKETTIMEDOUT'; - req.emit('error', e); - }); - } - } +/* + * "The user agent MUST use an algorithm equivalent to the following algorithm + * to compute the default-path of a cookie:" + * + * Assumption: the path (and not query part or absolute uri) is passed in. + */ +function defaultPath(path) { + // "2. If the uri-path is empty or if the first character of the uri-path is not + // a %x2F ("/") character, output %x2F ("/") and skip the remaining steps. + if (!path || path.substr(0,1) !== "/") { + return "/"; + } - return req.on('error', clear); -}; + // "3. If the uri-path contains no more than one %x2F ("/") character, output + // %x2F ("/") and skip the remaining step." + if (path === "/") { + return path; + } + var rightSlash = path.lastIndexOf("/"); + if (rightSlash === 0) { + return "/"; + } -/***/ }), -/* 1279 */ -/***/ (function(module, exports, __webpack_require__) { + // "4. Output the characters of the uri-path from the first character up to, + // but not including, the right-most %x2F ("/")." + return path.slice(0, rightSlash); +} -"use strict"; +function trimTerminator(str) { + for (var t = 0; t < TERMINATORS.length; t++) { + var terminatorIdx = str.indexOf(TERMINATORS[t]); + if (terminatorIdx !== -1) { + str = str.substr(0,terminatorIdx); + } + } + return str; +} -// Original repository: https://github.com/defunctzombie/node-lsmod/ -// -// [2018-02-09] @kamilogorek - Handle scoped packages structure +function parseCookiePair(cookiePair, looseMode) { + cookiePair = trimTerminator(cookiePair); -// builtin -var fs = __webpack_require__(167); -var path = __webpack_require__(160); + var firstEq = cookiePair.indexOf('='); + if (looseMode) { + if (firstEq === 0) { // '=' is immediately at start + cookiePair = cookiePair.substr(1); + firstEq = cookiePair.indexOf('='); // might still need to split on '=' + } + } else { // non-loose mode + if (firstEq <= 0) { // no '=' or is at start + return; // needs to have non-empty "cookie-name" + } + } -// node 0.6 support -fs.existsSync = fs.existsSync || path.existsSync; + var cookieName, cookieValue; + if (firstEq <= 0) { + cookieName = ""; + cookieValue = cookiePair.trim(); + } else { + cookieName = cookiePair.substr(0, firstEq).trim(); + cookieValue = cookiePair.substr(firstEq+1).trim(); + } -// mainPaths are the paths where our mainprog will be able to load from -// we store these to avoid grabbing the modules that were loaded as a result -// of a dependency module loading its dependencies, we only care about deps our -// mainprog loads -var mainPaths = (__webpack_require__.c[__webpack_require__.s] && __webpack_require__.c[__webpack_require__.s].paths) || []; + if (CONTROL_CHARS.test(cookieName) || CONTROL_CHARS.test(cookieValue)) { + return; + } -module.exports = function() { - var paths = Object.keys(__webpack_require__.c || []); + var c = new Cookie(); + c.key = cookieName; + c.value = cookieValue; + return c; +} - // module information - var infos = {}; +function parse(str, options) { + if (!options || typeof options !== 'object') { + options = {}; + } + str = str.trim(); - // paths we have already inspected to avoid traversing again - var seen = {}; + // We use a regex to parse the "name-value-pair" part of S5.2 + var firstSemi = str.indexOf(';'); // S5.2 step 1 + var cookiePair = (firstSemi === -1) ? str : str.substr(0, firstSemi); + var c = parseCookiePair(cookiePair, !!options.loose); + if (!c) { + return; + } - paths.forEach(function(p) { - /* eslint-disable consistent-return */ + if (firstSemi === -1) { + return c; + } - var dir = p; + // S5.2.3 "unparsed-attributes consist of the remainder of the set-cookie-string + // (including the %x3B (";") in question)." plus later on in the same section + // "discard the first ";" and trim". + var unparsed = str.slice(firstSemi + 1).trim(); - (function updir() { - var orig = dir; - dir = path.dirname(orig); + // "If the unparsed-attributes string is empty, skip the rest of these + // steps." + if (unparsed.length === 0) { + return c; + } - if (/@[^/]+$/.test(dir)) { - dir = path.dirname(dir); - } + /* + * S5.2 says that when looping over the items "[p]rocess the attribute-name + * and attribute-value according to the requirements in the following + * subsections" for every item. Plus, for many of the individual attributes + * in S5.3 it says to use the "attribute-value of the last attribute in the + * cookie-attribute-list". Therefore, in this implementation, we overwrite + * the previous value. + */ + var cookie_avs = unparsed.split(';'); + while (cookie_avs.length) { + var av = cookie_avs.shift().trim(); + if (av.length === 0) { // happens if ";;" appears + continue; + } + var av_sep = av.indexOf('='); + var av_key, av_value; - if (!dir || orig === dir || seen[orig]) { - return; - } else if (mainPaths.indexOf(dir) < 0) { - return updir(); - } + if (av_sep === -1) { + av_key = av; + av_value = null; + } else { + av_key = av.substr(0,av_sep); + av_value = av.substr(av_sep+1); + } - var pkgfile = path.join(orig, 'package.json'); - var exists = fs.existsSync(pkgfile); + av_key = av_key.trim().toLowerCase(); - seen[orig] = true; + if (av_value) { + av_value = av_value.trim(); + } - // travel up the tree if no package.json here - if (!exists) { - return updir(); + switch(av_key) { + case 'expires': // S5.2.1 + if (av_value) { + var exp = parseDate(av_value); + // "If the attribute-value failed to parse as a cookie date, ignore the + // cookie-av." + if (exp) { + // over and underflow not realistically a concern: V8's getTime() seems to + // store something larger than a 32-bit time_t (even with 32-bit node) + c.expires = exp; + } } + break; - try { - var info = JSON.parse(fs.readFileSync(pkgfile, 'utf8')); - infos[info.name] = info.version; - } catch (e) {} - })(); - - /* eslint-enable consistent-return */ - }); + case 'max-age': // S5.2.2 + if (av_value) { + // "If the first character of the attribute-value is not a DIGIT or a "-" + // character ...[or]... If the remainder of attribute-value contains a + // non-DIGIT character, ignore the cookie-av." + if (/^-?[0-9]+$/.test(av_value)) { + var delta = parseInt(av_value, 10); + // "If delta-seconds is less than or equal to zero (0), let expiry-time + // be the earliest representable date and time." + c.setMaxAge(delta); + } + } + break; - return infos; -}; + case 'domain': // S5.2.3 + // "If the attribute-value is empty, the behavior is undefined. However, + // the user agent SHOULD ignore the cookie-av entirely." + if (av_value) { + // S5.2.3 "Let cookie-domain be the attribute-value without the leading %x2E + // (".") character." + var domain = av_value.trim().replace(/^\./, ''); + if (domain) { + // "Convert the cookie-domain to lower case." + c.domain = domain.toLowerCase(); + } + } + break; + case 'path': // S5.2.4 + /* + * "If the attribute-value is empty or if the first character of the + * attribute-value is not %x2F ("/"): + * Let cookie-path be the default-path. + * Otherwise: + * Let cookie-path be the attribute-value." + * + * We'll represent the default-path as null since it depends on the + * context of the parsing. + */ + c.path = av_value && av_value[0] === "/" ? av_value : null; + break; -/***/ }), -/* 1280 */ -/***/ (function(module, exports) { + case 'secure': // S5.2.5 + /* + * "If the attribute-name case-insensitively matches the string "Secure", + * the user agent MUST append an attribute to the cookie-attribute-list + * with an attribute-name of Secure and an empty attribute-value." + */ + c.secure = true; + break; -exports.get = function(belowFn) { - var oldLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Infinity; + case 'httponly': // S5.2.6 -- effectively the same as 'secure' + c.httpOnly = true; + break; - var dummyObject = {}; + default: + c.extensions = c.extensions || []; + c.extensions.push(av); + break; + } + } - var v8Handler = Error.prepareStackTrace; - Error.prepareStackTrace = function(dummyObject, v8StackTrace) { - return v8StackTrace; - }; - Error.captureStackTrace(dummyObject, belowFn || exports.get); + return c; +} - var v8StackTrace = dummyObject.stack; - Error.prepareStackTrace = v8Handler; - Error.stackTraceLimit = oldLimit; +// avoid the V8 deoptimization monster! +function jsonParse(str) { + var obj; + try { + obj = JSON.parse(str); + } catch (e) { + return e; + } + return obj; +} - return v8StackTrace; -}; +function fromJSON(str) { + if (!str) { + return null; + } -exports.parse = function(err) { - if (!err.stack) { - return []; + var obj; + if (typeof str === 'string') { + obj = jsonParse(str); + if (obj instanceof Error) { + return null; + } + } else { + // assume it's an Object + obj = str; } - var self = this; - var lines = err.stack.split('\n').slice(1); + var c = new Cookie(); + for (var i=0; i<Cookie.serializableProperties.length; i++) { + var prop = Cookie.serializableProperties[i]; + if (obj[prop] === undefined || + obj[prop] === Cookie.prototype[prop]) + { + continue; // leave as prototype default + } - return lines - .map(function(line) { - if (line.match(/^\s*[-]{4,}$/)) { - return self._createParsedCallSite({ - fileName: line, - lineNumber: null, - functionName: null, - typeName: null, - methodName: null, - columnNumber: null, - 'native': null, - }); + if (prop === 'expires' || + prop === 'creation' || + prop === 'lastAccessed') + { + if (obj[prop] === null) { + c[prop] = null; + } else { + c[prop] = obj[prop] == "Infinity" ? + "Infinity" : new Date(obj[prop]); } + } else { + c[prop] = obj[prop]; + } + } - var lineMatch = line.match(/at (?:(.+)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/); - if (!lineMatch) { - return; - } + return c; +} - var object = null; - var method = null; - var functionName = null; - var typeName = null; - var methodName = null; - var isNative = (lineMatch[5] === 'native'); +/* Section 5.4 part 2: + * "* Cookies with longer paths are listed before cookies with + * shorter paths. + * + * * Among cookies that have equal-length path fields, cookies with + * earlier creation-times are listed before cookies with later + * creation-times." + */ - if (lineMatch[1]) { - functionName = lineMatch[1]; - var methodStart = functionName.lastIndexOf('.'); - if (functionName[methodStart-1] == '.') - methodStart--; - if (methodStart > 0) { - object = functionName.substr(0, methodStart); - method = functionName.substr(methodStart + 1); - var objectEnd = object.indexOf('.Module'); - if (objectEnd > 0) { - functionName = functionName.substr(objectEnd + 1); - object = object.substr(0, objectEnd); - } - } - typeName = null; - } +function cookieCompare(a,b) { + var cmp = 0; - if (method) { - typeName = object; - methodName = method; - } + // descending for length: b CMP a + var aPathLen = a.path ? a.path.length : 0; + var bPathLen = b.path ? b.path.length : 0; + cmp = bPathLen - aPathLen; + if (cmp !== 0) { + return cmp; + } - if (method === '<anonymous>') { - methodName = null; - functionName = null; - } + // ascending for time: a CMP b + var aTime = a.creation ? a.creation.getTime() : MAX_TIME; + var bTime = b.creation ? b.creation.getTime() : MAX_TIME; + cmp = aTime - bTime; + if (cmp !== 0) { + return cmp; + } - var properties = { - fileName: lineMatch[2] || null, - lineNumber: parseInt(lineMatch[3], 10) || null, - functionName: functionName, - typeName: typeName, - methodName: methodName, - columnNumber: parseInt(lineMatch[4], 10) || null, - 'native': isNative, - }; + // break ties for the same millisecond (precision of JavaScript's clock) + cmp = a.creationIndex - b.creationIndex; - return self._createParsedCallSite(properties); - }) - .filter(function(callSite) { - return !!callSite; - }); -}; + return cmp; +} -function CallSite(properties) { - for (var property in properties) { - this[property] = properties[property]; +// Gives the permutation of all possible pathMatch()es of a given path. The +// array is in longest-to-shortest order. Handy for indexing. +function permutePath(path) { + if (path === '/') { + return ['/']; + } + if (path.lastIndexOf('/') === path.length-1) { + path = path.substr(0,path.length-1); + } + var permutations = [path]; + while (path.length > 1) { + var lindex = path.lastIndexOf('/'); + if (lindex === 0) { + break; + } + path = path.substr(0,lindex); + permutations.push(path); } + permutations.push('/'); + return permutations; } -var strProperties = [ - 'this', - 'typeName', - 'functionName', - 'methodName', - 'fileName', - 'lineNumber', - 'columnNumber', - 'function', - 'evalOrigin' -]; -var boolProperties = [ - 'topLevel', - 'eval', - 'native', - 'constructor' -]; -strProperties.forEach(function (property) { - CallSite.prototype[property] = null; - CallSite.prototype['get' + property[0].toUpperCase() + property.substr(1)] = function () { - return this[property]; +function getCookieContext(url) { + if (url instanceof Object) { + return url; } -}); -boolProperties.forEach(function (property) { - CallSite.prototype[property] = false; - CallSite.prototype['is' + property[0].toUpperCase() + property.substr(1)] = function () { - return this[property]; + // NOTE: decodeURI will throw on malformed URIs (see GH-32). + // Therefore, we will just skip decoding for such URIs. + try { + url = decodeURI(url); + } + catch(err) { + // Silently swallow error } -}); - -exports._createParsedCallSite = function(properties) { - return new CallSite(properties); -}; - -/***/ }), -/* 1281 */ -/***/ (function(module) { + return urlParse(url); +} -module.exports = JSON.parse("{\"name\":\"raven\",\"description\":\"A standalone (Node.js) client for Sentry\",\"keywords\":[\"debugging\",\"errors\",\"exceptions\",\"logging\",\"raven\",\"sentry\"],\"version\":\"2.6.4\",\"repository\":\"git://github.com/getsentry/raven-js.git\",\"license\":\"BSD-2-Clause\",\"homepage\":\"https://github.com/getsentry/raven-js\",\"author\":\"Matt Robenolt <matt@ydekproductions.com>\",\"main\":\"index.js\",\"bin\":{\"raven\":\"./bin/raven\"},\"scripts\":{\"lint\":\"eslint .\",\"test\":\"NODE_ENV=test istanbul cover _mocha -- --reporter dot && NODE_ENV=test coffee ./test/run.coffee\",\"test-mocha\":\"NODE_ENV=test mocha\",\"test-full\":\"npm run test && cd test/instrumentation && ./run.sh\"},\"engines\":{\"node\":\">= 4.0.0\"},\"dependencies\":{\"cookie\":\"0.3.1\",\"md5\":\"^2.2.1\",\"stack-trace\":\"0.0.10\",\"timed-out\":\"4.0.1\",\"uuid\":\"3.3.2\"},\"devDependencies\":{\"coffee-script\":\"~1.10.0\",\"connect\":\"*\",\"eslint\":\"^4.5.0\",\"eslint-config-prettier\":\"^2.3.0\",\"express\":\"*\",\"glob\":\"~3.1.13\",\"istanbul\":\"^0.4.3\",\"mocha\":\"~3.1.2\",\"nock\":\"~9.0.0\",\"prettier\":\"^1.6.1\",\"should\":\"11.2.0\",\"sinon\":\"^3.3.0\"},\"prettier\":{\"singleQuote\":true,\"bracketSpacing\":false,\"printWidth\":90}}"); +function Cookie(options) { + options = options || {}; -/***/ }), -/* 1282 */ -/***/ (function(module, exports, __webpack_require__) { + Object.keys(options).forEach(function(prop) { + if (Cookie.prototype.hasOwnProperty(prop) && + Cookie.prototype[prop] !== options[prop] && + prop.substr(0,1) !== '_') + { + this[prop] = options[prop]; + } + }, this); -var v1 = __webpack_require__(1283); -var v4 = __webpack_require__(1286); + this.creation = this.creation || new Date(); -var uuid = v4; -uuid.v1 = v1; -uuid.v4 = v4; + // used to break creation ties in cookieCompare(): + Object.defineProperty(this, 'creationIndex', { + configurable: false, + enumerable: false, // important for assert.deepEqual checks + writable: true, + value: ++Cookie.cookiesCreated + }); +} -module.exports = uuid; +Cookie.cookiesCreated = 0; // incremented each time a cookie is created +Cookie.parse = parse; +Cookie.fromJSON = fromJSON; -/***/ }), -/* 1283 */ -/***/ (function(module, exports, __webpack_require__) { +Cookie.prototype.key = ""; +Cookie.prototype.value = ""; -var rng = __webpack_require__(1284); -var bytesToUuid = __webpack_require__(1285); +// the order in which the RFC has them: +Cookie.prototype.expires = "Infinity"; // coerces to literal Infinity +Cookie.prototype.maxAge = null; // takes precedence over expires for TTL +Cookie.prototype.domain = null; +Cookie.prototype.path = null; +Cookie.prototype.secure = false; +Cookie.prototype.httpOnly = false; +Cookie.prototype.extensions = null; -// **`v1()` - Generate time-based UUID** -// -// Inspired by https://github.com/LiosK/UUID.js -// and http://docs.python.org/library/uuid.html +// set by the CookieJar: +Cookie.prototype.hostOnly = null; // boolean when set +Cookie.prototype.pathIsDefault = null; // boolean when set +Cookie.prototype.creation = null; // Date when set; defaulted by Cookie.parse +Cookie.prototype.lastAccessed = null; // Date when set +Object.defineProperty(Cookie.prototype, 'creationIndex', { + configurable: true, + enumerable: false, + writable: true, + value: 0 +}); -var _nodeId; -var _clockseq; +Cookie.serializableProperties = Object.keys(Cookie.prototype) + .filter(function(prop) { + return !( + Cookie.prototype[prop] instanceof Function || + prop === 'creationIndex' || + prop.substr(0,1) === '_' + ); + }); -// Previous uuid creation time -var _lastMSecs = 0; -var _lastNSecs = 0; +Cookie.prototype.inspect = function inspect() { + var now = Date.now(); + return 'Cookie="'+this.toString() + + '; hostOnly='+(this.hostOnly != null ? this.hostOnly : '?') + + '; aAge='+(this.lastAccessed ? (now-this.lastAccessed.getTime())+'ms' : '?') + + '; cAge='+(this.creation ? (now-this.creation.getTime())+'ms' : '?') + + '"'; +}; -// See https://github.com/broofa/node-uuid for API details -function v1(options, buf, offset) { - var i = buf && offset || 0; - var b = buf || []; +// Use the new custom inspection symbol to add the custom inspect function if +// available. +if (util.inspect.custom) { + Cookie.prototype[util.inspect.custom] = Cookie.prototype.inspect; +} - options = options || {}; - var node = options.node || _nodeId; - var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; +Cookie.prototype.toJSON = function() { + var obj = {}; - // node and clockseq need to be initialized to random values if they're not - // specified. We do this lazily to minimize issues related to insufficient - // system entropy. See #189 - if (node == null || clockseq == null) { - var seedBytes = rng(); - if (node == null) { - // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1) - node = _nodeId = [ - seedBytes[0] | 0x01, - seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5] - ]; + var props = Cookie.serializableProperties; + for (var i=0; i<props.length; i++) { + var prop = props[i]; + if (this[prop] === Cookie.prototype[prop]) { + continue; // leave as prototype default } - if (clockseq == null) { - // Per 4.2.2, randomize (14 bit) clockseq - clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff; + + if (prop === 'expires' || + prop === 'creation' || + prop === 'lastAccessed') + { + if (this[prop] === null) { + obj[prop] = null; + } else { + obj[prop] = this[prop] == "Infinity" ? // intentionally not === + "Infinity" : this[prop].toISOString(); + } + } else if (prop === 'maxAge') { + if (this[prop] !== null) { + // again, intentionally not === + obj[prop] = (this[prop] == Infinity || this[prop] == -Infinity) ? + this[prop].toString() : this[prop]; + } + } else { + if (this[prop] !== Cookie.prototype[prop]) { + obj[prop] = this[prop]; + } } } - // UUID timestamps are 100 nano-second units since the Gregorian epoch, - // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so - // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs' - // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00. - var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime(); + return obj; +}; - // Per 4.2.1.2, use count of uuid's generated during the current clock - // cycle to simulate higher resolution clock - var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; +Cookie.prototype.clone = function() { + return fromJSON(this.toJSON()); +}; - // Time since last uuid creation (in msecs) - var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000; +Cookie.prototype.validate = function validate() { + if (!COOKIE_OCTETS.test(this.value)) { + return false; + } + if (this.expires != Infinity && !(this.expires instanceof Date) && !parseDate(this.expires)) { + return false; + } + if (this.maxAge != null && this.maxAge <= 0) { + return false; // "Max-Age=" non-zero-digit *DIGIT + } + if (this.path != null && !PATH_VALUE.test(this.path)) { + return false; + } - // Per 4.2.1.2, Bump clockseq on clock regression - if (dt < 0 && options.clockseq === undefined) { - clockseq = clockseq + 1 & 0x3fff; + var cdomain = this.cdomain(); + if (cdomain) { + if (cdomain.match(/\.$/)) { + return false; // S4.1.2.3 suggests that this is bad. domainMatch() tests confirm this + } + var suffix = pubsuffix.getPublicSuffix(cdomain); + if (suffix == null) { // it's a public suffix + return false; + } } + return true; +}; - // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new - // time interval - if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) { - nsecs = 0; +Cookie.prototype.setExpires = function setExpires(exp) { + if (exp instanceof Date) { + this.expires = exp; + } else { + this.expires = parseDate(exp) || "Infinity"; } +}; - // Per 4.2.1.2 Throw error if too many uuids are requested - if (nsecs >= 10000) { - throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec'); +Cookie.prototype.setMaxAge = function setMaxAge(age) { + if (age === Infinity || age === -Infinity) { + this.maxAge = age.toString(); // so JSON.stringify() works + } else { + this.maxAge = age; } +}; - _lastMSecs = msecs; - _lastNSecs = nsecs; - _clockseq = clockseq; +// gives Cookie header format +Cookie.prototype.cookieString = function cookieString() { + var val = this.value; + if (val == null) { + val = ''; + } + if (this.key === '') { + return val; + } + return this.key+'='+val; +}; - // Per 4.1.4 - Convert from unix epoch to Gregorian epoch - msecs += 12219292800000; +// gives Set-Cookie header format +Cookie.prototype.toString = function toString() { + var str = this.cookieString(); - // `time_low` - var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000; - b[i++] = tl >>> 24 & 0xff; - b[i++] = tl >>> 16 & 0xff; - b[i++] = tl >>> 8 & 0xff; - b[i++] = tl & 0xff; + if (this.expires != Infinity) { + if (this.expires instanceof Date) { + str += '; Expires='+formatDate(this.expires); + } else { + str += '; Expires='+this.expires; + } + } - // `time_mid` - var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff; - b[i++] = tmh >>> 8 & 0xff; - b[i++] = tmh & 0xff; + if (this.maxAge != null && this.maxAge != Infinity) { + str += '; Max-Age='+this.maxAge; + } - // `time_high_and_version` - b[i++] = tmh >>> 24 & 0xf | 0x10; // include version - b[i++] = tmh >>> 16 & 0xff; + if (this.domain && !this.hostOnly) { + str += '; Domain='+this.domain; + } + if (this.path) { + str += '; Path='+this.path; + } - // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant) - b[i++] = clockseq >>> 8 | 0x80; + if (this.secure) { + str += '; Secure'; + } + if (this.httpOnly) { + str += '; HttpOnly'; + } + if (this.extensions) { + this.extensions.forEach(function(ext) { + str += '; '+ext; + }); + } - // `clock_seq_low` - b[i++] = clockseq & 0xff; + return str; +}; - // `node` - for (var n = 0; n < 6; ++n) { - b[i + n] = node[n]; +// TTL() partially replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere) +// S5.3 says to give the "latest representable date" for which we use Infinity +// For "expired" we use 0 +Cookie.prototype.TTL = function TTL(now) { + /* RFC6265 S4.1.2.2 If a cookie has both the Max-Age and the Expires + * attribute, the Max-Age attribute has precedence and controls the + * expiration date of the cookie. + * (Concurs with S5.3 step 3) + */ + if (this.maxAge != null) { + return this.maxAge<=0 ? 0 : this.maxAge*1000; } - return buf ? buf : bytesToUuid(b); -} + var expires = this.expires; + if (expires != Infinity) { + if (!(expires instanceof Date)) { + expires = parseDate(expires) || Infinity; + } -module.exports = v1; + if (expires == Infinity) { + return Infinity; + } + return expires.getTime() - (now || Date.now()); + } -/***/ }), -/* 1284 */ -/***/ (function(module, exports, __webpack_require__) { + return Infinity; +}; -// Unique ID creation requires a high quality random # generator. In node.js -// this is pretty straight-forward - we use the crypto API. +// expiryTime() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere) +Cookie.prototype.expiryTime = function expiryTime(now) { + if (this.maxAge != null) { + var relativeTo = now || this.creation || new Date(); + var age = (this.maxAge <= 0) ? -Infinity : this.maxAge*1000; + return relativeTo.getTime() + age; + } -var crypto = __webpack_require__(94); + if (this.expires == Infinity) { + return Infinity; + } + return this.expires.getTime(); +}; -module.exports = function nodeRNG() { - return crypto.randomBytes(16); +// expiryDate() replaces the "expiry-time" parts of S5.3 step 3 (setCookie() +// elsewhere), except it returns a Date +Cookie.prototype.expiryDate = function expiryDate(now) { + var millisec = this.expiryTime(now); + if (millisec == Infinity) { + return new Date(MAX_TIME); + } else if (millisec == -Infinity) { + return new Date(MIN_TIME); + } else { + return new Date(millisec); + } }; +// This replaces the "persistent-flag" parts of S5.3 step 3 +Cookie.prototype.isPersistent = function isPersistent() { + return (this.maxAge != null || this.expires != Infinity); +}; -/***/ }), -/* 1285 */ -/***/ (function(module, exports) { +// Mostly S5.1.2 and S5.2.3: +Cookie.prototype.cdomain = +Cookie.prototype.canonicalizedDomain = function canonicalizedDomain() { + if (this.domain == null) { + return null; + } + return canonicalDomain(this.domain); +}; -/** - * Convert array of 16 byte values to UUID string format of the form: - * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX - */ -var byteToHex = []; -for (var i = 0; i < 256; ++i) { - byteToHex[i] = (i + 0x100).toString(16).substr(1); -} +function CookieJar(store, options) { + if (typeof options === "boolean") { + options = {rejectPublicSuffixes: options}; + } else if (options == null) { + options = {}; + } + if (options.rejectPublicSuffixes != null) { + this.rejectPublicSuffixes = options.rejectPublicSuffixes; + } + if (options.looseMode != null) { + this.enableLooseMode = options.looseMode; + } -function bytesToUuid(buf, offset) { - var i = offset || 0; - var bth = byteToHex; - // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 - return ([bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], '-', - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]], - bth[buf[i++]], bth[buf[i++]]]).join(''); + if (!store) { + store = new MemoryCookieStore(); + } + this.store = store; } +CookieJar.prototype.store = null; +CookieJar.prototype.rejectPublicSuffixes = true; +CookieJar.prototype.enableLooseMode = false; +var CAN_BE_SYNC = []; -module.exports = bytesToUuid; +CAN_BE_SYNC.push('setCookie'); +CookieJar.prototype.setCookie = function(cookie, url, options, cb) { + var err; + var context = getCookieContext(url); + if (options instanceof Function) { + cb = options; + options = {}; + } + + var host = canonicalDomain(context.hostname); + var loose = this.enableLooseMode; + if (options.loose != null) { + loose = options.loose; + } + + // S5.3 step 1 + if (!(cookie instanceof Cookie)) { + cookie = Cookie.parse(cookie, { loose: loose }); + } + if (!cookie) { + err = new Error("Cookie failed to parse"); + return cb(options.ignoreError ? null : err); + } + + // S5.3 step 2 + var now = options.now || new Date(); // will assign later to save effort in the face of errors + + // S5.3 step 3: NOOP; persistent-flag and expiry-time is handled by getCookie() + // S5.3 step 4: NOOP; domain is null by default -/***/ }), -/* 1286 */ -/***/ (function(module, exports, __webpack_require__) { + // S5.3 step 5: public suffixes + if (this.rejectPublicSuffixes && cookie.domain) { + var suffix = pubsuffix.getPublicSuffix(cookie.cdomain()); + if (suffix == null) { // e.g. "com" + err = new Error("Cookie has domain set to a public suffix"); + return cb(options.ignoreError ? null : err); + } + } -var rng = __webpack_require__(1284); -var bytesToUuid = __webpack_require__(1285); + // S5.3 step 6: + if (cookie.domain) { + if (!domainMatch(host, cookie.cdomain(), false)) { + err = new Error("Cookie not in this host's domain. Cookie:"+cookie.cdomain()+" Request:"+host); + return cb(options.ignoreError ? null : err); + } -function v4(options, buf, offset) { - var i = buf && offset || 0; + if (cookie.hostOnly == null) { // don't reset if already set + cookie.hostOnly = false; + } - if (typeof(options) == 'string') { - buf = options === 'binary' ? new Array(16) : null; - options = null; + } else { + cookie.hostOnly = true; + cookie.domain = host; } - options = options || {}; - var rnds = options.random || (options.rng || rng)(); + //S5.2.4 If the attribute-value is empty or if the first character of the + //attribute-value is not %x2F ("/"): + //Let cookie-path be the default-path. + if (!cookie.path || cookie.path[0] !== '/') { + cookie.path = defaultPath(context.pathname); + cookie.pathIsDefault = true; + } - // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` - rnds[6] = (rnds[6] & 0x0f) | 0x40; - rnds[8] = (rnds[8] & 0x3f) | 0x80; + // S5.3 step 8: NOOP; secure attribute + // S5.3 step 9: NOOP; httpOnly attribute - // Copy bytes to buffer, if provided - if (buf) { - for (var ii = 0; ii < 16; ++ii) { - buf[i + ii] = rnds[ii]; - } + // S5.3 step 10 + if (options.http === false && cookie.httpOnly) { + err = new Error("Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); } - return buf || bytesToUuid(rnds); -} + var store = this.store; -module.exports = v4; + if (!store.updateCookie) { + store.updateCookie = function(oldCookie, newCookie, cb) { + this.putCookie(newCookie, cb); + }; + } + function withCookie(err, oldCookie) { + if (err) { + return cb(err); + } -/***/ }), -/* 1287 */ -/***/ (function(module, exports) { + var next = function(err) { + if (err) { + return cb(err); + } else { + cb(null, cookie); + } + }; -module.exports = require("domain"); + if (oldCookie) { + // S5.3 step 11 - "If the cookie store contains a cookie with the same name, + // domain, and path as the newly created cookie:" + if (options.http === false && oldCookie.httpOnly) { // step 11.2 + err = new Error("old Cookie is HttpOnly and this isn't an HTTP API"); + return cb(options.ignoreError ? null : err); + } + cookie.creation = oldCookie.creation; // step 11.3 + cookie.creationIndex = oldCookie.creationIndex; // preserve tie-breaker + cookie.lastAccessed = now; + // Step 11.4 (delete cookie) is implied by just setting the new one: + store.updateCookie(oldCookie, cookie, next); // step 12 -/***/ }), -/* 1288 */ -/***/ (function(module, exports, __webpack_require__) { + } else { + cookie.creation = cookie.lastAccessed = now; + store.putCookie(cookie, next); // step 12 + } + } -(function(){ - var crypt = __webpack_require__(1289), - utf8 = __webpack_require__(1290).utf8, - isBuffer = __webpack_require__(1291), - bin = __webpack_require__(1290).bin, - - // The core - md5 = function (message, options) { - // Convert to byte array - if (message.constructor == String) - if (options && options.encoding === 'binary') - message = bin.stringToBytes(message); - else - message = utf8.stringToBytes(message); - else if (isBuffer(message)) - message = Array.prototype.slice.call(message, 0); - else if (!Array.isArray(message) && message.constructor !== Uint8Array) - message = message.toString(); - // else, assume byte array already - - var m = crypt.bytesToWords(message), - l = message.length * 8, - a = 1732584193, - b = -271733879, - c = -1732584194, - d = 271733878; - - // Swap endian - for (var i = 0; i < m.length; i++) { - m[i] = ((m[i] << 8) | (m[i] >>> 24)) & 0x00FF00FF | - ((m[i] << 24) | (m[i] >>> 8)) & 0xFF00FF00; - } - - // Padding - m[l >>> 5] |= 0x80 << (l % 32); - m[(((l + 64) >>> 9) << 4) + 14] = l; - - // Method shortcuts - var FF = md5._ff, - GG = md5._gg, - HH = md5._hh, - II = md5._ii; - - for (var i = 0; i < m.length; i += 16) { - - var aa = a, - bb = b, - cc = c, - dd = d; - - a = FF(a, b, c, d, m[i+ 0], 7, -680876936); - d = FF(d, a, b, c, m[i+ 1], 12, -389564586); - c = FF(c, d, a, b, m[i+ 2], 17, 606105819); - b = FF(b, c, d, a, m[i+ 3], 22, -1044525330); - a = FF(a, b, c, d, m[i+ 4], 7, -176418897); - d = FF(d, a, b, c, m[i+ 5], 12, 1200080426); - c = FF(c, d, a, b, m[i+ 6], 17, -1473231341); - b = FF(b, c, d, a, m[i+ 7], 22, -45705983); - a = FF(a, b, c, d, m[i+ 8], 7, 1770035416); - d = FF(d, a, b, c, m[i+ 9], 12, -1958414417); - c = FF(c, d, a, b, m[i+10], 17, -42063); - b = FF(b, c, d, a, m[i+11], 22, -1990404162); - a = FF(a, b, c, d, m[i+12], 7, 1804603682); - d = FF(d, a, b, c, m[i+13], 12, -40341101); - c = FF(c, d, a, b, m[i+14], 17, -1502002290); - b = FF(b, c, d, a, m[i+15], 22, 1236535329); - - a = GG(a, b, c, d, m[i+ 1], 5, -165796510); - d = GG(d, a, b, c, m[i+ 6], 9, -1069501632); - c = GG(c, d, a, b, m[i+11], 14, 643717713); - b = GG(b, c, d, a, m[i+ 0], 20, -373897302); - a = GG(a, b, c, d, m[i+ 5], 5, -701558691); - d = GG(d, a, b, c, m[i+10], 9, 38016083); - c = GG(c, d, a, b, m[i+15], 14, -660478335); - b = GG(b, c, d, a, m[i+ 4], 20, -405537848); - a = GG(a, b, c, d, m[i+ 9], 5, 568446438); - d = GG(d, a, b, c, m[i+14], 9, -1019803690); - c = GG(c, d, a, b, m[i+ 3], 14, -187363961); - b = GG(b, c, d, a, m[i+ 8], 20, 1163531501); - a = GG(a, b, c, d, m[i+13], 5, -1444681467); - d = GG(d, a, b, c, m[i+ 2], 9, -51403784); - c = GG(c, d, a, b, m[i+ 7], 14, 1735328473); - b = GG(b, c, d, a, m[i+12], 20, -1926607734); - - a = HH(a, b, c, d, m[i+ 5], 4, -378558); - d = HH(d, a, b, c, m[i+ 8], 11, -2022574463); - c = HH(c, d, a, b, m[i+11], 16, 1839030562); - b = HH(b, c, d, a, m[i+14], 23, -35309556); - a = HH(a, b, c, d, m[i+ 1], 4, -1530992060); - d = HH(d, a, b, c, m[i+ 4], 11, 1272893353); - c = HH(c, d, a, b, m[i+ 7], 16, -155497632); - b = HH(b, c, d, a, m[i+10], 23, -1094730640); - a = HH(a, b, c, d, m[i+13], 4, 681279174); - d = HH(d, a, b, c, m[i+ 0], 11, -358537222); - c = HH(c, d, a, b, m[i+ 3], 16, -722521979); - b = HH(b, c, d, a, m[i+ 6], 23, 76029189); - a = HH(a, b, c, d, m[i+ 9], 4, -640364487); - d = HH(d, a, b, c, m[i+12], 11, -421815835); - c = HH(c, d, a, b, m[i+15], 16, 530742520); - b = HH(b, c, d, a, m[i+ 2], 23, -995338651); - - a = II(a, b, c, d, m[i+ 0], 6, -198630844); - d = II(d, a, b, c, m[i+ 7], 10, 1126891415); - c = II(c, d, a, b, m[i+14], 15, -1416354905); - b = II(b, c, d, a, m[i+ 5], 21, -57434055); - a = II(a, b, c, d, m[i+12], 6, 1700485571); - d = II(d, a, b, c, m[i+ 3], 10, -1894986606); - c = II(c, d, a, b, m[i+10], 15, -1051523); - b = II(b, c, d, a, m[i+ 1], 21, -2054922799); - a = II(a, b, c, d, m[i+ 8], 6, 1873313359); - d = II(d, a, b, c, m[i+15], 10, -30611744); - c = II(c, d, a, b, m[i+ 6], 15, -1560198380); - b = II(b, c, d, a, m[i+13], 21, 1309151649); - a = II(a, b, c, d, m[i+ 4], 6, -145523070); - d = II(d, a, b, c, m[i+11], 10, -1120210379); - c = II(c, d, a, b, m[i+ 2], 15, 718787259); - b = II(b, c, d, a, m[i+ 9], 21, -343485551); - - a = (a + aa) >>> 0; - b = (b + bb) >>> 0; - c = (c + cc) >>> 0; - d = (d + dd) >>> 0; - } - - return crypt.endian([a, b, c, d]); - }; - - // Auxiliary functions - md5._ff = function (a, b, c, d, x, s, t) { - var n = a + (b & c | ~b & d) + (x >>> 0) + t; - return ((n << s) | (n >>> (32 - s))) + b; - }; - md5._gg = function (a, b, c, d, x, s, t) { - var n = a + (b & d | c & ~d) + (x >>> 0) + t; - return ((n << s) | (n >>> (32 - s))) + b; - }; - md5._hh = function (a, b, c, d, x, s, t) { - var n = a + (b ^ c ^ d) + (x >>> 0) + t; - return ((n << s) | (n >>> (32 - s))) + b; - }; - md5._ii = function (a, b, c, d, x, s, t) { - var n = a + (c ^ (b | ~d)) + (x >>> 0) + t; - return ((n << s) | (n >>> (32 - s))) + b; - }; - - // Package private blocksize - md5._blocksize = 16; - md5._digestsize = 16; - - module.exports = function (message, options) { - if (message === undefined || message === null) - throw new Error('Illegal argument ' + message); - - var digestbytes = crypt.wordsToBytes(md5(message, options)); - return options && options.asBytes ? digestbytes : - options && options.asString ? bin.bytesToString(digestbytes) : - crypt.bytesToHex(digestbytes); - }; - -})(); + store.findCookie(cookie.domain, cookie.path, cookie.key, withCookie); +}; +// RFC6365 S5.4 +CAN_BE_SYNC.push('getCookies'); +CookieJar.prototype.getCookies = function(url, options, cb) { + var context = getCookieContext(url); + if (options instanceof Function) { + cb = options; + options = {}; + } -/***/ }), -/* 1289 */ -/***/ (function(module, exports) { + var host = canonicalDomain(context.hostname); + var path = context.pathname || '/'; -(function() { - var base64map - = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/', + var secure = options.secure; + if (secure == null && context.protocol && + (context.protocol == 'https:' || context.protocol == 'wss:')) + { + secure = true; + } - crypt = { - // Bit-wise rotation left - rotl: function(n, b) { - return (n << b) | (n >>> (32 - b)); - }, + var http = options.http; + if (http == null) { + http = true; + } - // Bit-wise rotation right - rotr: function(n, b) { - return (n << (32 - b)) | (n >>> b); - }, + var now = options.now || Date.now(); + var expireCheck = options.expire !== false; + var allPaths = !!options.allPaths; + var store = this.store; - // Swap big-endian to little-endian and vice versa - endian: function(n) { - // If number given, swap endian - if (n.constructor == Number) { - return crypt.rotl(n, 8) & 0x00FF00FF | crypt.rotl(n, 24) & 0xFF00FF00; + function matchingCookie(c) { + // "Either: + // The cookie's host-only-flag is true and the canonicalized + // request-host is identical to the cookie's domain. + // Or: + // The cookie's host-only-flag is false and the canonicalized + // request-host domain-matches the cookie's domain." + if (c.hostOnly) { + if (c.domain != host) { + return false; + } + } else { + if (!domainMatch(host, c.domain, false)) { + return false; } + } - // Else, assume array and swap all items - for (var i = 0; i < n.length; i++) - n[i] = crypt.endian(n[i]); - return n; - }, + // "The request-uri's path path-matches the cookie's path." + if (!allPaths && !pathMatch(path, c.path)) { + return false; + } - // Generate an array of any length of random bytes - randomBytes: function(n) { - for (var bytes = []; n > 0; n--) - bytes.push(Math.floor(Math.random() * 256)); - return bytes; - }, + // "If the cookie's secure-only-flag is true, then the request-uri's + // scheme must denote a "secure" protocol" + if (c.secure && !secure) { + return false; + } - // Convert a byte array to big-endian 32-bit words - bytesToWords: function(bytes) { - for (var words = [], i = 0, b = 0; i < bytes.length; i++, b += 8) - words[b >>> 5] |= bytes[i] << (24 - b % 32); - return words; - }, + // "If the cookie's http-only-flag is true, then exclude the cookie if the + // cookie-string is being generated for a "non-HTTP" API" + if (c.httpOnly && !http) { + return false; + } - // Convert big-endian 32-bit words to a byte array - wordsToBytes: function(words) { - for (var bytes = [], b = 0; b < words.length * 32; b += 8) - bytes.push((words[b >>> 5] >>> (24 - b % 32)) & 0xFF); - return bytes; - }, + // deferred from S5.3 + // non-RFC: allow retention of expired cookies by choice + if (expireCheck && c.expiryTime() <= now) { + store.removeCookie(c.domain, c.path, c.key, function(){}); // result ignored + return false; + } - // Convert a byte array to a hex string - bytesToHex: function(bytes) { - for (var hex = [], i = 0; i < bytes.length; i++) { - hex.push((bytes[i] >>> 4).toString(16)); - hex.push((bytes[i] & 0xF).toString(16)); - } - return hex.join(''); - }, + return true; + } - // Convert a hex string to a byte array - hexToBytes: function(hex) { - for (var bytes = [], c = 0; c < hex.length; c += 2) - bytes.push(parseInt(hex.substr(c, 2), 16)); - return bytes; - }, + store.findCookies(host, allPaths ? null : path, function(err,cookies) { + if (err) { + return cb(err); + } - // Convert a byte array to a base-64 string - bytesToBase64: function(bytes) { - for (var base64 = [], i = 0; i < bytes.length; i += 3) { - var triplet = (bytes[i] << 16) | (bytes[i + 1] << 8) | bytes[i + 2]; - for (var j = 0; j < 4; j++) - if (i * 8 + j * 6 <= bytes.length * 8) - base64.push(base64map.charAt((triplet >>> 6 * (3 - j)) & 0x3F)); - else - base64.push('='); - } - return base64.join(''); - }, + cookies = cookies.filter(matchingCookie); - // Convert a base-64 string to a byte array - base64ToBytes: function(base64) { - // Remove non-base-64 characters - base64 = base64.replace(/[^A-Z0-9+\/]/ig, ''); + // sorting of S5.4 part 2 + if (options.sort !== false) { + cookies = cookies.sort(cookieCompare); + } - for (var bytes = [], i = 0, imod4 = 0; i < base64.length; - imod4 = ++i % 4) { - if (imod4 == 0) continue; - bytes.push(((base64map.indexOf(base64.charAt(i - 1)) - & (Math.pow(2, -2 * imod4 + 8) - 1)) << (imod4 * 2)) - | (base64map.indexOf(base64.charAt(i)) >>> (6 - imod4 * 2))); - } - return bytes; + // S5.4 part 3 + var now = new Date(); + cookies.forEach(function(c) { + c.lastAccessed = now; + }); + // TODO persist lastAccessed + + cb(null,cookies); + }); +}; + +CAN_BE_SYNC.push('getCookieString'); +CookieJar.prototype.getCookieString = function(/*..., cb*/) { + var args = Array.prototype.slice.call(arguments,0); + var cb = args.pop(); + var next = function(err,cookies) { + if (err) { + cb(err); + } else { + cb(null, cookies + .sort(cookieCompare) + .map(function(c){ + return c.cookieString(); + }) + .join('; ')); } }; + args.push(next); + this.getCookies.apply(this,args); +}; - module.exports = crypt; -})(); +CAN_BE_SYNC.push('getSetCookieStrings'); +CookieJar.prototype.getSetCookieStrings = function(/*..., cb*/) { + var args = Array.prototype.slice.call(arguments,0); + var cb = args.pop(); + var next = function(err,cookies) { + if (err) { + cb(err); + } else { + cb(null, cookies.map(function(c){ + return c.toString(); + })); + } + }; + args.push(next); + this.getCookies.apply(this,args); +}; +CAN_BE_SYNC.push('serialize'); +CookieJar.prototype.serialize = function(cb) { + var type = this.store.constructor.name; + if (type === 'Object') { + type = null; + } -/***/ }), -/* 1290 */ -/***/ (function(module, exports) { + // update README.md "Serialization Format" if you change this, please! + var serialized = { + // The version of tough-cookie that serialized this jar. Generally a good + // practice since future versions can make data import decisions based on + // known past behavior. When/if this matters, use `semver`. + version: 'tough-cookie@'+VERSION, -var charenc = { - // UTF-8 encoding - utf8: { - // Convert a string to a byte array - stringToBytes: function(str) { - return charenc.bin.stringToBytes(unescape(encodeURIComponent(str))); - }, + // add the store type, to make humans happy: + storeType: type, - // Convert a byte array to a string - bytesToString: function(bytes) { - return decodeURIComponent(escape(charenc.bin.bytesToString(bytes))); - } - }, + // CookieJar configuration: + rejectPublicSuffixes: !!this.rejectPublicSuffixes, - // Binary encoding - bin: { - // Convert a string to a byte array - stringToBytes: function(str) { - for (var bytes = [], i = 0; i < str.length; i++) - bytes.push(str.charCodeAt(i) & 0xFF); - return bytes; - }, + // this gets filled from getAllCookies: + cookies: [] + }; - // Convert a byte array to a string - bytesToString: function(bytes) { - for (var str = [], i = 0; i < bytes.length; i++) - str.push(String.fromCharCode(bytes[i])); - return str.join(''); - } + if (!(this.store.getAllCookies && + typeof this.store.getAllCookies === 'function')) + { + return cb(new Error('store does not support getAllCookies and cannot be serialized')); } -}; -module.exports = charenc; + this.store.getAllCookies(function(err,cookies) { + if (err) { + return cb(err); + } + serialized.cookies = cookies.map(function(cookie) { + // convert to serialized 'raw' cookies + cookie = (cookie instanceof Cookie) ? cookie.toJSON() : cookie; -/***/ }), -/* 1291 */ -/***/ (function(module, exports) { + // Remove the index so new ones get assigned during deserialization + delete cookie.creationIndex; -/*! - * Determine if an object is a Buffer - * - * @author Feross Aboukhadijeh <https://feross.org> - * @license MIT - */ + return cookie; + }); -// The _isBuffer check is for Safari 5-7 support, because it's missing -// Object.prototype.constructor. Remove this eventually -module.exports = function (obj) { - return obj != null && (isBuffer(obj) || isSlowBuffer(obj) || !!obj._isBuffer) -} + return cb(null, serialized); + }); +}; -function isBuffer (obj) { - return !!obj.constructor && typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj) -} +// well-known name that JSON.stringify calls +CookieJar.prototype.toJSON = function() { + return this.serializeSync(); +}; -// For Node v0.10 support. Remove this eventually. -function isSlowBuffer (obj) { - return typeof obj.readFloatLE === 'function' && typeof obj.slice === 'function' && isBuffer(obj.slice(0, 0)) -} +// use the class method CookieJar.deserialize instead of calling this directly +CAN_BE_SYNC.push('_importCookies'); +CookieJar.prototype._importCookies = function(serialized, cb) { + var jar = this; + var cookies = serialized.cookies; + if (!cookies || !Array.isArray(cookies)) { + return cb(new Error('serialized jar has no cookies array')); + } + cookies = cookies.slice(); // do not modify the original + function putNext(err) { + if (err) { + return cb(err); + } -/***/ }), -/* 1292 */ -/***/ (function(module, exports, __webpack_require__) { + if (!cookies.length) { + return cb(err, jar); + } -"use strict"; + var cookie; + try { + cookie = fromJSON(cookies.shift()); + } catch (e) { + return cb(e); + } + if (cookie === null) { + return putNext(null); // skip this cookie + } -var utils = __webpack_require__(1276); + jar.store.putCookie(cookie, putNext); + } -var defaultOnConfig = { - console: true, - http: true + putNext(); }; -var defaultConfig = { - console: false, - http: false, - pg: false -}; +CookieJar.deserialize = function(strOrObj, store, cb) { + if (arguments.length !== 3) { + // store is optional + cb = store; + store = null; + } -function instrument(Raven, config) { - if (config === false) { - return; - } else if (config === true) { - config = defaultOnConfig; + var serialized; + if (typeof strOrObj === 'string') { + serialized = jsonParse(strOrObj); + if (serialized instanceof Error) { + return cb(serialized); + } } else { - config = utils.extend({}, defaultConfig, config); + serialized = strOrObj; } - Raven.instrumentedOriginals = []; - Raven.instrumentedModules = []; + var jar = new CookieJar(store, serialized.rejectPublicSuffixes); + jar._importCookies(serialized, function(err) { + if (err) { + return cb(err); + } + cb(null, jar); + }); +}; - var Module = __webpack_require__(1293); - utils.fill( - Module, - '_load', - function(origLoad) { - return function(moduleId, parent, isMain) { - var origModule = origLoad.apply(this, arguments); - if (config[moduleId] && Raven.instrumentedModules.indexOf(moduleId) === -1) { - Raven.instrumentedModules.push(moduleId); - return __webpack_require__(1294)("./" + moduleId)(Raven, origModule, Raven.instrumentedOriginals); - } - return origModule; - }; - }, - Raven.instrumentedOriginals - ); +CookieJar.deserializeSync = function(strOrObj, store) { + var serialized = typeof strOrObj === 'string' ? + JSON.parse(strOrObj) : strOrObj; + var jar = new CookieJar(store, serialized.rejectPublicSuffixes); - // special case: since console is built-in and app-level code won't require() it, do that here - if (config.console) { - __webpack_require__(1298); + // catch this mistake early: + if (!jar.store.synchronous) { + throw new Error('CookieJar store is not synchronous; use async API instead.'); } - // observation: when the https module does its own require('http'), it *does not* hit our hooked require to instrument http on the fly - // but if we've previously instrumented http, https *does* get our already-instrumented version - // this is because raven's transports are required before this instrumentation takes place, which loads https (and http) - // so module cache will have uninstrumented http; proactively loading it here ensures instrumented version is in module cache - // alternatively we could refactor to load our transports later, but this is easier and doesn't have much drawback - if (config.http) { - __webpack_require__(98); - } -} + jar._importCookiesSync(serialized); + return jar; +}; +CookieJar.fromJSON = CookieJar.deserializeSync; -function deinstrument(Raven) { - if (!Raven.instrumentedOriginals) return; - var original; - // eslint-disable-next-line no-cond-assign - while ((original = Raven.instrumentedOriginals.shift())) { - var obj = original[0]; - var name = original[1]; - var orig = original[2]; - obj[name] = orig; +CAN_BE_SYNC.push('clone'); +CookieJar.prototype.clone = function(newStore, cb) { + if (arguments.length === 1) { + cb = newStore; + newStore = null; } -} -module.exports = { - instrument: instrument, - deinstrument: deinstrument + this.serialize(function(err,serialized) { + if (err) { + return cb(err); + } + CookieJar.deserialize(newStore, serialized, cb); + }); }; +// Use a closure to provide a true imperative API for synchronous stores. +function syncWrap(method) { + return function() { + if (!this.store.synchronous) { + throw new Error('CookieJar store is not synchronous; use async API instead.'); + } -/***/ }), -/* 1293 */ -/***/ (function(module, exports) { + var args = Array.prototype.slice.call(arguments); + var syncErr, syncResult; + args.push(function syncCb(err, result) { + syncErr = err; + syncResult = result; + }); + this[method].apply(this, args); + + if (syncErr) { + throw syncErr; + } + return syncResult; + }; +} + +// wrap all declared CAN_BE_SYNC methods in the sync wrapper +CAN_BE_SYNC.forEach(function(method) { + CookieJar.prototype[method+'Sync'] = syncWrap(method); +}); + +exports.CookieJar = CookieJar; +exports.Cookie = Cookie; +exports.Store = Store; +exports.MemoryCookieStore = MemoryCookieStore; +exports.parseDate = parseDate; +exports.formatDate = formatDate; +exports.parse = parse; +exports.fromJSON = fromJSON; +exports.domainMatch = domainMatch; +exports.defaultPath = defaultPath; +exports.pathMatch = pathMatch; +exports.getPublicSuffix = pubsuffix.getPublicSuffix; +exports.cookieCompare = cookieCompare; +exports.permuteDomain = __webpack_require__(1317).permuteDomain; +exports.permutePath = permutePath; +exports.canonicalDomain = canonicalDomain; -module.exports = require("module"); /***/ }), -/* 1294 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { -var map = { - "./console": 1295, - "./console.js": 1295, - "./http": 1296, - "./http.js": 1296, - "./instrumentor": 1292, - "./instrumentor.js": 1292, - "./pg": 1297, - "./pg.js": 1297 -}; +"use strict"; +/*! + * Copyright (c) 2018, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +var psl = __webpack_require__(85); -function webpackContext(req) { - var id = webpackContextResolve(req); - return __webpack_require__(id); -} -function webpackContextResolve(req) { - if(!__webpack_require__.o(map, req)) { - var e = new Error("Cannot find module '" + req + "'"); - e.code = 'MODULE_NOT_FOUND'; - throw e; - } - return map[req]; +function getPublicSuffix(domain) { + return psl.get(domain); } -webpackContext.keys = function webpackContextKeys() { - return Object.keys(map); -}; -webpackContext.resolve = webpackContextResolve; -module.exports = webpackContext; -webpackContext.id = 1294; + +exports.getPublicSuffix = getPublicSuffix; + /***/ }), -/* 1295 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +/*jshint unused:false */ -var util = __webpack_require__(9); -var utils = __webpack_require__(1276); +function Store() { +} +exports.Store = Store; -module.exports = function(Raven, console, originals) { - var wrapConsoleMethod = function(level) { - if (!(level in console)) { - return; - } +// Stores may be synchronous, but are still required to use a +// Continuation-Passing Style API. The CookieJar itself will expose a "*Sync" +// API that converts from synchronous-callbacks to imperative style. +Store.prototype.synchronous = false; - utils.fill( - console, - level, - function(originalConsoleLevel) { - var sentryLevel = level === 'warn' ? 'warning' : level; +Store.prototype.findCookie = function(domain, path, key, cb) { + throw new Error('findCookie is not implemented'); +}; - return function() { - var args = [].slice.call(arguments); +Store.prototype.findCookies = function(domain, path, cb) { + throw new Error('findCookies is not implemented'); +}; - Raven.captureBreadcrumb({ - message: util.format.apply(null, args), - level: sentryLevel, - category: 'console' - }); +Store.prototype.putCookie = function(cookie, cb) { + throw new Error('putCookie is not implemented'); +}; - originalConsoleLevel.apply(console, args); - }; - }, - originals - ); - }; +Store.prototype.updateCookie = function(oldCookie, newCookie, cb) { + // recommended default implementation: + // return this.putCookie(newCookie, cb); + throw new Error('updateCookie is not implemented'); +}; - ['debug', 'info', 'warn', 'error', 'log'].forEach(wrapConsoleMethod); +Store.prototype.removeCookie = function(domain, path, key, cb) { + throw new Error('removeCookie is not implemented'); +}; - return console; +Store.prototype.removeCookies = function(domain, path, cb) { + throw new Error('removeCookies is not implemented'); +}; + +Store.prototype.getAllCookies = function(cb) { + throw new Error('getAllCookies is not implemented (therefore jar cannot be serialized)'); }; /***/ }), -/* 1296 */ +/* 1316 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ +var Store = __webpack_require__(1315).Store; +var permuteDomain = __webpack_require__(1317).permuteDomain; +var pathMatch = __webpack_require__(1318).pathMatch; var util = __webpack_require__(9); -var utils = __webpack_require__(1276); -module.exports = function(Raven, http, originals) { - var OrigClientRequest = http.ClientRequest; - var ClientRequest = function(options, cb) { - // Note: this won't capture a breadcrumb if a response never comes - // It would be useful to know if that was the case, though, so - // todo: revisit to see if we can capture sth indicating response never came - // possibility: capture one breadcrumb for "req sent" and one for "res recvd" - // seems excessive but solves the problem and *is* strictly more information - // could be useful for weird response sequencing bug scenarios - OrigClientRequest.call(this, options, cb); +function MemoryCookieStore() { + Store.call(this); + this.idx = {}; +} +util.inherits(MemoryCookieStore, Store); +exports.MemoryCookieStore = MemoryCookieStore; +MemoryCookieStore.prototype.idx = null; - // We could just always reconstruct this from this.agent, this._headers, this.path, etc - // but certain other http-instrumenting libraries (like nock, which we use for tests) fail to - // maintain the guarantee that after calling OrigClientRequest, those fields will be populated - if (typeof options === 'string') { - this.__ravenBreadcrumbUrl = options; - } else { - var protocol = options.protocol || ''; - var hostname = options.hostname || options.host || ''; - // Don't log standard :80 (http) and :443 (https) ports to reduce the noise - var port = - !options.port || options.port === 80 || options.port === 443 - ? '' - : ':' + options.port; - var path = options.path || '/'; +// Since it's just a struct in RAM, this Store is synchronous +MemoryCookieStore.prototype.synchronous = true; - this.__ravenBreadcrumbUrl = protocol + '//' + hostname + port + path; - } - }; - util.inherits(ClientRequest, OrigClientRequest); +// force a default depth: +MemoryCookieStore.prototype.inspect = function() { + return "{ idx: "+util.inspect(this.idx, false, 2)+' }'; +}; - utils.fill(ClientRequest.prototype, 'emit', function(origEmit) { - return function(evt, maybeResp) { - if (evt === 'response' && this.__ravenBreadcrumbUrl) { - if (!Raven.dsn || this.__ravenBreadcrumbUrl.indexOf(Raven.dsn.host) === -1) { - Raven.captureBreadcrumb({ - type: 'http', - category: 'http', - data: { - method: this.method, - url: this.__ravenBreadcrumbUrl, - status_code: maybeResp.statusCode - } - }); - } - } - return origEmit.apply(this, arguments); - }; - }); +// Use the new custom inspection symbol to add the custom inspect function if +// available. +if (util.inspect.custom) { + MemoryCookieStore.prototype[util.inspect.custom] = MemoryCookieStore.prototype.inspect; +} - utils.fill( - http, - 'ClientRequest', - function() { - return ClientRequest; - }, - originals - ); +MemoryCookieStore.prototype.findCookie = function(domain, path, key, cb) { + if (!this.idx[domain]) { + return cb(null,undefined); + } + if (!this.idx[domain][path]) { + return cb(null,undefined); + } + return cb(null,this.idx[domain][path][key]||null); +}; - // http.request orig refs module-internal ClientRequest, not exported one, so - // it still points at orig ClientRequest after our monkeypatch; these reimpls - // just get that reference updated to use our new ClientRequest - utils.fill( - http, - 'request', - function() { - return function(options, cb) { - return new http.ClientRequest(options, cb); - }; - }, - originals - ); +MemoryCookieStore.prototype.findCookies = function(domain, path, cb) { + var results = []; + if (!domain) { + return cb(null,[]); + } - utils.fill( - http, - 'get', - function() { - return function(options, cb) { - var req = http.request(options, cb); - req.end(); - return req; - }; - }, - originals - ); + var pathMatcher; + if (!path) { + // null means "all paths" + pathMatcher = function matchAll(domainIndex) { + for (var curPath in domainIndex) { + var pathIndex = domainIndex[curPath]; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }; - return http; -}; + } else { + pathMatcher = function matchRFC(domainIndex) { + //NOTE: we should use path-match algorithm from S5.1.4 here + //(see : https://github.com/ChromiumWebApps/chromium/blob/b3d3b4da8bb94c1b2e061600df106d590fda3620/net/cookies/canonical_cookie.cc#L299) + Object.keys(domainIndex).forEach(function (cookiePath) { + if (pathMatch(path, cookiePath)) { + var pathIndex = domainIndex[cookiePath]; + for (var key in pathIndex) { + results.push(pathIndex[key]); + } + } + }); + }; + } -/***/ }), -/* 1297 */ -/***/ (function(module, exports, __webpack_require__) { + var domains = permuteDomain(domain) || [domain]; + var idx = this.idx; + domains.forEach(function(curDomain) { + var domainIndex = idx[curDomain]; + if (!domainIndex) { + return; + } + pathMatcher(domainIndex); + }); -"use strict"; + cb(null,results); +}; -module.exports = function(Raven, pg, originals) { - // Using fill helper here is hard because of `this` binding - var origQuery = pg.Connection.prototype.query; - pg.Connection.prototype.query = function(text) { - Raven.captureBreadcrumb({ - category: 'postgres', - message: text - }); - origQuery.call(this, text); - }; - // todo thread this through - // originals.push([pg.Connection.prototype, 'query', origQuery]); +MemoryCookieStore.prototype.putCookie = function(cookie, cb) { + if (!this.idx[cookie.domain]) { + this.idx[cookie.domain] = {}; + } + if (!this.idx[cookie.domain][cookie.path]) { + this.idx[cookie.domain][cookie.path] = {}; + } + this.idx[cookie.domain][cookie.path][cookie.key] = cookie; + cb(null); }; +MemoryCookieStore.prototype.updateCookie = function(oldCookie, newCookie, cb) { + // updateCookie() may avoid updating cookies that are identical. For example, + // lastAccessed may not be important to some stores and an equality + // comparison could exclude that field. + this.putCookie(newCookie,cb); +}; -/***/ }), -/* 1298 */ -/***/ (function(module, exports) { +MemoryCookieStore.prototype.removeCookie = function(domain, path, key, cb) { + if (this.idx[domain] && this.idx[domain][path] && this.idx[domain][path][key]) { + delete this.idx[domain][path][key]; + } + cb(null); +}; -module.exports = require("console"); +MemoryCookieStore.prototype.removeCookies = function(domain, path, cb) { + if (this.idx[domain]) { + if (path) { + delete this.idx[domain][path]; + } else { + delete this.idx[domain]; + } + } + return cb(null); +}; -/***/ }), -/* 1299 */ -/***/ (function(module, exports) { +MemoryCookieStore.prototype.getAllCookies = function(cb) { + var cookies = []; + var idx = this.idx; -const DOMAIN_REGEXP = /^https?:\/\/([a-zA-Z0-9-.]+)(?::\d{2,5})?\/?$/; + var domains = Object.keys(idx); + domains.forEach(function(domain) { + var paths = Object.keys(idx[domain]); + paths.forEach(function(path) { + var keys = Object.keys(idx[domain][path]); + keys.forEach(function(key) { + if (key !== null) { + cookies.push(idx[domain][path][key]); + } + }); + }); + }); -const getDomain = cozyUrl => { - cozyUrl = cozyUrl || process.env.COZY_URL; - return cozyUrl.match(DOMAIN_REGEXP)[1].split('.').slice(-2).join('.'); -}; + // Sort by creationIndex so deserializing retains the creation order. + // When implementing your own store, this SHOULD retain the order too + cookies.sort(function(a,b) { + return (a.creationIndex||0) - (b.creationIndex||0); + }); -const getInstance = cozyUrl => { - cozyUrl = cozyUrl || process.env.COZY_URL; - return cozyUrl.match(DOMAIN_REGEXP)[1].split('.').slice(-3).join('.'); + cb(null, cookies); }; -module.exports = { - getDomain, - getInstance -}; /***/ }), -/* 1300 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { -var before = __webpack_require__(1301); - -/** - * Creates a function that is restricted to invoking `func` once. Repeat calls - * to the function return the value of the first invocation. The `func` is - * invoked with the `this` binding and arguments of the created function. +"use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. * - * @static - * @memberOf _ - * @since 0.1.0 - * @category Function - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // => `createApplication` is invoked once + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ -function once(func) { - return before(2, func); + +var pubsuffix = __webpack_require__(1314); + +// Gives the permutation of all possible domainMatch()es of a given domain. The +// array is in shortest-to-longest order. Handy for indexing. +function permuteDomain (domain) { + var pubSuf = pubsuffix.getPublicSuffix(domain); + if (!pubSuf) { + return null; + } + if (pubSuf == domain) { + return [domain]; + } + + var prefix = domain.slice(0, -(pubSuf.length + 1)); // ".example.com" + var parts = prefix.split('.').reverse(); + var cur = pubSuf; + var permutations = [cur]; + while (parts.length) { + cur = parts.shift() + '.' + cur; + permutations.push(cur); + } + return permutations; } -module.exports = once; +exports.permuteDomain = permuteDomain; /***/ }), -/* 1301 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { -var toInteger = __webpack_require__(643); - -/** Error message constants. */ -var FUNC_ERROR_TEXT = 'Expected a function'; - -/** - * Creates a function that invokes `func`, with the `this` binding and arguments - * of the created function, while it's called less than `n` times. Subsequent - * calls to the created function return the result of the last `func` invocation. +"use strict"; +/*! + * Copyright (c) 2015, Salesforce.com, Inc. + * All rights reserved. * - * @static - * @memberOf _ - * @since 3.0.0 - * @category Function - * @param {number} n The number of calls at which `func` is no longer invoked. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: * - * jQuery(element).on('click', _.before(5, addContactToList)); - * // => Allows adding up to 4 contacts to the list. + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * + * 3. Neither the name of Salesforce.com nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. */ -function before(n, func) { - var result; - if (typeof func != 'function') { - throw new TypeError(FUNC_ERROR_TEXT); + +/* + * "A request-path path-matches a given cookie-path if at least one of the + * following conditions holds:" + */ +function pathMatch (reqPath, cookiePath) { + // "o The cookie-path and the request-path are identical." + if (cookiePath === reqPath) { + return true; } - n = toInteger(n); - return function() { - if (--n > 0) { - result = func.apply(this, arguments); + + var idx = reqPath.indexOf(cookiePath); + if (idx === 0) { + // "o The cookie-path is a prefix of the request-path, and the last + // character of the cookie-path is %x2F ("/")." + if (cookiePath.substr(-1) === "/") { + return true; } - if (n <= 1) { - func = undefined; + + // " o The cookie-path is a prefix of the request-path, and the first + // character of the request-path that is not included in the cookie- path + // is a %x2F ("/") character." + if (reqPath.substr(cookiePath.length, 1) === "/") { + return true; } - return result; - }; + } + + return false; } -module.exports = before; +exports.pathMatch = pathMatch; /***/ }), -/* 1302 */ +/* 1319 */ +/***/ (function(module) { + +module.exports = JSON.parse("{\"author\":{\"name\":\"Jeremy Stashewsky\",\"email\":\"jstash@gmail.com\",\"website\":\"https://github.com/stash\"},\"contributors\":[{\"name\":\"Alexander Savin\",\"website\":\"https://github.com/apsavin\"},{\"name\":\"Ian Livingstone\",\"website\":\"https://github.com/ianlivingstone\"},{\"name\":\"Ivan Nikulin\",\"website\":\"https://github.com/inikulin\"},{\"name\":\"Lalit Kapoor\",\"website\":\"https://github.com/lalitkapoor\"},{\"name\":\"Sam Thompson\",\"website\":\"https://github.com/sambthompson\"},{\"name\":\"Sebastian Mayr\",\"website\":\"https://github.com/Sebmaster\"}],\"license\":\"BSD-3-Clause\",\"name\":\"tough-cookie\",\"description\":\"RFC6265 Cookies and Cookie Jar for node.js\",\"keywords\":[\"HTTP\",\"cookie\",\"cookies\",\"set-cookie\",\"cookiejar\",\"jar\",\"RFC6265\",\"RFC2965\"],\"version\":\"2.4.3\",\"homepage\":\"https://github.com/salesforce/tough-cookie\",\"repository\":{\"type\":\"git\",\"url\":\"git://github.com/salesforce/tough-cookie.git\"},\"bugs\":{\"url\":\"https://github.com/salesforce/tough-cookie/issues\"},\"main\":\"./lib/cookie\",\"files\":[\"lib\"],\"scripts\":{\"test\":\"vows test/*_test.js\",\"cover\":\"nyc --reporter=lcov --reporter=html vows test/*_test.js\"},\"engines\":{\"node\":\">=0.8\"},\"devDependencies\":{\"async\":\"^1.4.2\",\"nyc\":\"^11.6.0\",\"string.prototype.repeat\":\"^0.2.0\",\"vows\":\"^0.8.1\"},\"dependencies\":{\"psl\":\"^1.1.24\",\"punycode\":\"^1.4.1\"}}"); + +/***/ }), +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { -const log = __webpack_require__(2).namespace('Error Interception'); +"use strict"; -const handleUncaughtException = err => { - log('critical', err.message, 'uncaught exception'); - process.exit(1); -}; -const handleUnhandledRejection = err => { - log('critical', err.message, 'unhandled exception'); - process.exit(1); -}; +var jsonSafeStringify = __webpack_require__(7) +var crypto = __webpack_require__(94) +var Buffer = __webpack_require__(95).Buffer -const handleSigterm = () => { - log('critical', 'The konnector got a SIGTERM'); - process.exit(128 + 15); -}; +var defer = typeof setImmediate === 'undefined' + ? process.nextTick + : setImmediate -const handleSigint = () => { - log('critical', 'The konnector got a SIGINT'); - process.exit(128 + 2); -}; +function paramsHaveRequestBody (params) { + return ( + params.body || + params.requestBodyStream || + (params.json && typeof params.json !== 'boolean') || + params.multipart + ) +} -let attached = false; -/** - * Attach event handlers to catch uncaught exceptions/rejections and signals. - * Log them as critical and exit the process accordingly. - * If the cleanup function has not been called, calling again the function - * is a no-op. - * - * @param {object} prcs - Process object, default to current process - * @returns {Function} When called, removes the signal handlers - */ +function safeStringify (obj, replacer) { + var ret + try { + ret = JSON.stringify(obj, replacer) + } catch (e) { + ret = jsonSafeStringify(obj, replacer) + } + return ret +} -const attachProcessEventHandlers = (prcs = process) => { - if (attached) { - return; +function md5 (str) { + return crypto.createHash('md5').update(str).digest('hex') +} + +function isReadStream (rs) { + return rs.readable && rs.path && rs.mode +} + +function toBase64 (str) { + return Buffer.from(str || '', 'utf8').toString('base64') +} + +function copy (obj) { + var o = {} + Object.keys(obj).forEach(function (i) { + o[i] = obj[i] + }) + return o +} + +function version () { + var numbers = process.version.replace('v', '').split('.') + return { + major: parseInt(numbers[0], 10), + minor: parseInt(numbers[1], 10), + patch: parseInt(numbers[2], 10) } +} - attached = true; - prcs.on('uncaughtException', handleUncaughtException); - prcs.on('unhandledRejection', handleUnhandledRejection); - prcs.on('SIGTERM', handleSigterm); - prcs.on('SIGINT', handleSigint); - return () => { - attached = false; - prcs.removeEventListener('uncaughtException', handleUncaughtException); - prcs.removeEventListener('unhandledRejection', handleUnhandledRejection); - prcs.removeEventListener('SIGTERM', handleSigterm); - prcs.removeEventListener('SIGINT', handleSigint); - }; -}; +exports.paramsHaveRequestBody = paramsHaveRequestBody +exports.safeStringify = safeStringify +exports.md5 = md5 +exports.isReadStream = isReadStream +exports.toBase64 = toBase64 +exports.copy = copy +exports.version = version +exports.defer = defer -module.exports = { - attachProcessEventHandlers -}; /***/ }), -/* 1303 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { -const log = __webpack_require__(2).namespace('CookieKonnector'); +"use strict"; -const BaseKonnector = __webpack_require__(1225); -const requestFactory = __webpack_require__(22); +var http = __webpack_require__(98) +var https = __webpack_require__(99) +var url = __webpack_require__(83) +var util = __webpack_require__(9) +var stream = __webpack_require__(100) +var zlib = __webpack_require__(101) +var aws2 = __webpack_require__(102) +var aws4 = __webpack_require__(103) +var httpSignature = __webpack_require__(106) +var mime = __webpack_require__(168) +var caseless = __webpack_require__(161) +var ForeverAgent = __webpack_require__(162) +var FormData = __webpack_require__(164) +var extend = __webpack_require__(79) +var isstream = __webpack_require__(182) +var isTypedArray = __webpack_require__(183).strict +var helpers = __webpack_require__(1320) +var cookies = __webpack_require__(1312) +var getProxyFromURI = __webpack_require__(1322) +var Querystring = __webpack_require__(1323).Querystring +var Har = __webpack_require__(1329).Har +var Auth = __webpack_require__(1330).Auth +var OAuth = __webpack_require__(1334).OAuth +var hawk = __webpack_require__(1335) +var Multipart = __webpack_require__(1336).Multipart +var Redirect = __webpack_require__(1337).Redirect +var Tunnel = __webpack_require__(1338).Tunnel +var now = __webpack_require__(272) +var Buffer = __webpack_require__(95).Buffer -const { - CookieJar -} = __webpack_require__(81); +var safeStringify = helpers.safeStringify +var isReadStream = helpers.isReadStream +var toBase64 = helpers.toBase64 +var defer = helpers.defer +var copy = helpers.copy +var version = helpers.version +var globalCookieJar = cookies.jar() -const JAR_ACCOUNT_KEY = 'session'; -/** - * @class - * Connector base class extending BaseKonnector which handles cookie session in a central way - * It also handles saving cookie session in the account and automatically restore it for the next - * connector run. - * All cozy-konnector-libs tools using request are proposed as methods of this class to force them - * to use the central cookie which can be saved/restored. - * You need at least the `GET` and `PUT` permissions on `io.cozy.accounts` in your manifest to allow - * it to save/restore cookies - * @example - * ```javascript - * const { CookieKonnector } = require('cozy-konnector-libs') - * class MyConnector extends CookieKonnector { - * async fetch(fields) { - * // the code of your connector - * await this.request('https://...') - * } - * async testSession() { - * const $ = await this.request('https://...') - * return $('') - * } - * } - * const connector = new MyKonnector({ - * cheerio: true, - * json: false - * }) - * connector.run() - * ``` - */ +var globalPool = {} -class CookieKonnector extends BaseKonnector { - /** - * Constructor - * - * @param {Function} requestFactoryOptions - Option object passed to requestFactory to - * initialize this.request. It is still possible to change this.request doing : - * - * ```javascript - * this.request = this.requestFactory(...) - * ``` - * - * Please not you have to run the connector yourself doing : - * - * ```javascript - * connector.run() - * ``` - */ - constructor(requestFactoryOptions) { - super(); +function filterForNonReserved (reserved, options) { + // Filter out properties that are not reserved. + // Reserved values are passed in at call site. - if (!this.testSession) { - throw new Error('Could not find a testSession method. CookieKonnector needs it to test if a session is valid. Please implement it'); + var object = {} + for (var i in options) { + var notReserved = (reserved.indexOf(i) === -1) + if (notReserved) { + object[i] = options[i] } + } + return object +} - this._jar = requestFactory().jar(); - this.request = this.requestFactory(requestFactoryOptions); +function filterOutReservedFunctions (reserved, options) { + // Filter out properties that are functions and are reserved. + // Reserved values are passed in at call site. + + var object = {} + for (var i in options) { + var isReserved = !(reserved.indexOf(i) === -1) + var isFunction = (typeof options[i] === 'function') + if (!(isReserved && isFunction)) { + object[i] = options[i] + } } - /** - * Initializes the current connector with data coming from the associated account - * and also the session - * - * @returns {Promise} with the fields as an object - */ + return object +} +// Return a simpler request object to allow serialization +function requestToJSON () { + var self = this + return { + uri: self.uri, + method: self.method, + headers: self.headers + } +} - async initAttributes(cozyFields, account) { - await super.initAttributes(cozyFields, account); - await this.initSession(); +// Return a simpler response object to allow serialization +function responseToJSON () { + var self = this + return { + statusCode: self.statusCode, + body: self.body, + headers: self.headers, + request: requestToJSON.call(self.request) } - /** - * Hook called when the connector is ended - */ +} + +function Request (options) { + // if given the method property in options, set property explicitMethod to true + // extend the Request instance with any non-reserved properties + // remove any reserved functions from the options object + // set Request instance to be readable and writable + // call init - async end() { - await this.saveSession(); - return super.end(); + var self = this + + // start with HAR, then override with additional options + if (options.har) { + self._har = new Har(self) + options = self._har.options(options) } - /** - * Calls cozy-konnector-libs requestFactory forcing this._jar as the cookie - * - * @param {object} options - requestFactory option - * @returns {object} - The resulting request object - */ + stream.Stream.call(self) + var reserved = Object.keys(Request.prototype) + var nonReserved = filterForNonReserved(reserved, options) - requestFactory(options) { - this._jar = this._jar || requestFactory().jar(); - return requestFactory({ ...options, - jar: this._jar - }); + extend(self, nonReserved) + options = filterOutReservedFunctions(reserved, options) + + self.readable = true + self.writable = true + if (options.method) { + self.explicitMethod = true } - /** - * Reset cookie session with a new empty session and save it to the associated account - * - * @returns {Promise} empty promise - */ + self._qs = new Querystring(self) + self._auth = new Auth(self) + self._oauth = new OAuth(self) + self._multipart = new Multipart(self) + self._redirect = new Redirect(self) + self._tunnel = new Tunnel(self) + self.init(options) +} +util.inherits(Request, stream.Stream) - async resetSession() { - log('debug', 'Reset cookie session...'); - this._jar = requestFactory().jar(); - return this.saveSession(); +// Debugging +Request.debug = process.env.NODE_DEBUG && /\brequest\b/.test(process.env.NODE_DEBUG) +function debug () { + if (Request.debug) { + console.error('REQUEST %s', util.format.apply(util, arguments)) } - /** - * Get the cookie session from the account if any - * - * @returns {Promise} true or false if the session in the account exists or not - */ +} +Request.prototype.debug = debug +Request.prototype.init = function (options) { + // init() contains all the code to setup the request object. + // the actual outgoing request is not started until start() is called + // this function is called from both the constructor and on redirect. + var self = this + if (!options) { + options = {} + } + self.headers = self.headers ? copy(self.headers) : {} - async initSession() { - const accountData = this.getAccountData(); + // Delete headers with value undefined since they break + // ClientRequest.OutgoingMessage.setHeader in node 0.12 + for (var headerName in self.headers) { + if (typeof self.headers[headerName] === 'undefined') { + delete self.headers[headerName] + } + } - try { - if (this._account.state === 'RESET_SESSION') { - log('debug', 'RESET_SESSION state found'); - await this.resetSession(); - await this.updateAccountAttributes({ - state: null - }); + caseless.httpify(self, self.headers) + + if (!self.method) { + self.method = options.method || 'GET' + } + if (!self.localAddress) { + self.localAddress = options.localAddress + } + + self._qs.init(options) + + debug(options) + if (!self.pool && self.pool !== false) { + self.pool = globalPool + } + self.dests = self.dests || [] + self.__isRequestRequest = true + + // Protect against double callback + if (!self._callback && self.callback) { + self._callback = self.callback + self.callback = function () { + if (self._callbackCalled) { + return // Print a warning maybe? } - } catch (err) { - log('warn', 'Could not reset the session'); - log('warn', err.message); + self._callbackCalled = true + self._callback.apply(self, arguments) + } + self.on('error', self.callback.bind()) + self.on('complete', self.callback.bind(self, null)) + } + + // People use this property instead all the time, so support it + if (!self.uri && self.url) { + self.uri = self.url + delete self.url + } + + // If there's a baseUrl, then use it as the base URL (i.e. uri must be + // specified as a relative path and is appended to baseUrl). + if (self.baseUrl) { + if (typeof self.baseUrl !== 'string') { + return self.emit('error', new Error('options.baseUrl must be a string')) } - try { - let jar = null; + if (typeof self.uri !== 'string') { + return self.emit('error', new Error('options.uri must be a string when using options.baseUrl')) + } - if (accountData && accountData.auth) { - jar = JSON.parse(accountData.auth[JAR_ACCOUNT_KEY]); - } + if (self.uri.indexOf('//') === 0 || self.uri.indexOf('://') !== -1) { + return self.emit('error', new Error('options.uri must be a path when using options.baseUrl')) + } - if (jar) { - log('debug', 'found saved session, using it...'); - this._jar._jar = CookieJar.fromJSON(jar, this._jar._jar.store); - return true; - } - } catch (err) { - log('debug', 'Could not parse session'); + // Handle all cases to make sure that there's only one slash between + // baseUrl and uri. + var baseUrlEndsWithSlash = self.baseUrl.lastIndexOf('/') === self.baseUrl.length - 1 + var uriStartsWithSlash = self.uri.indexOf('/') === 0 + + if (baseUrlEndsWithSlash && uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri.slice(1) + } else if (baseUrlEndsWithSlash || uriStartsWithSlash) { + self.uri = self.baseUrl + self.uri + } else if (self.uri === '') { + self.uri = self.baseUrl + } else { + self.uri = self.baseUrl + '/' + self.uri } + delete self.baseUrl + } - log('debug', 'Found no session'); - return false; + // A URI is needed by this point, emit error if we haven't been able to get one + if (!self.uri) { + return self.emit('error', new Error('options.uri is a required argument')) } - /** - * Saves the current cookie session to the account - * - * @returns {Promise} empty promise - */ + // If a string URI/URL was given, parse it into a URL object + if (typeof self.uri === 'string') { + self.uri = url.parse(self.uri) + } - async saveSession(obj) { - const accountData = { ...this._account.data, - auth: {} - }; + // Some URL objects are not from a URL parsed string and need href added + if (!self.uri.href) { + self.uri.href = url.format(self.uri) + } - if (obj && obj.getCookieJar) { - this._jar._jar = obj.getCookieJar(); + // DEPRECATED: Warning for users of the old Unix Sockets URL Scheme + if (self.uri.protocol === 'unix:') { + return self.emit('error', new Error('`unix://` URL scheme is no longer supported. Please use the format `http://unix:SOCKET:PATH`')) + } + + // Support Unix Sockets + if (self.uri.host === 'unix') { + self.enableUnixSocket() + } + + if (self.strictSSL === false) { + self.rejectUnauthorized = false + } + + if (!self.uri.pathname) { self.uri.pathname = '/' } + + if (!(self.uri.host || (self.uri.hostname && self.uri.port)) && !self.uri.isUnix) { + // Invalid URI: it may generate lot of bad errors, like 'TypeError: Cannot call method `indexOf` of undefined' in CookieJar + // Detect and reject it as soon as possible + var faultyUri = url.format(self.uri) + var message = 'Invalid URI "' + faultyUri + '"' + if (Object.keys(options).length === 0) { + // No option ? This can be the sign of a redirect + // As this is a case where the user cannot do anything (they didn't call request directly with this URL) + // they should be warned that it can be caused by a redirection (can save some hair) + message += '. This can be caused by a crappy redirection.' } + // This error was fatal + self.abort() + return self.emit('error', new Error(message)) + } - accountData.auth[JAR_ACCOUNT_KEY] = JSON.stringify(this._jar._jar.toJSON()); - await this.saveAccountData(accountData); - log('debug', 'saved the session'); + if (!self.hasOwnProperty('proxy')) { + self.proxy = getProxyFromURI(self.uri) } - /** - * This is signin function from cozy-konnector-libs which is forced to use the current cookies - * and current request from CookieKonnector. It also automatically saves the session after - * signin if it is a success. - * - * @returns {Promise} resolve with an object containing form data - */ + self.tunnel = self._tunnel.isEnabled() + if (self.proxy) { + self._tunnel.setup(options) + } - async signin(options) { - const result = await super.signin({ ...options, - requestInstance: this.request - }); - await this.saveSession(); - return result; + self._redirect.onRequest(options) + + self.setHost = false + if (!self.hasHeader('host')) { + var hostHeaderName = self.originalHostHeaderName || 'host' + self.setHeader(hostHeaderName, self.uri.host) + // Drop :port suffix from Host header if known protocol. + if (self.uri.port) { + if ((self.uri.port === '80' && self.uri.protocol === 'http:') || + (self.uri.port === '443' && self.uri.protocol === 'https:')) { + self.setHeader(hostHeaderName, self.uri.hostname) + } + } + self.setHost = true } - /** - * This is saveFiles function from cozy-konnector-libs which is forced to use the current cookies - * and current request from CookieKonnector. - * - * @returns {Promise} resolves with the list of entries with file objects - */ + self.jar(self._jar || options.jar) - saveFiles(entries, fields, options) { - return super.saveFiles(entries, fields, { ...options, - requestInstance: this.request - }); + if (!self.uri.port) { + if (self.uri.protocol === 'http:') { self.uri.port = 80 } else if (self.uri.protocol === 'https:') { self.uri.port = 443 } } - /** - * This is saveBills function from cozy-konnector-libs which is forced to use the current cookies - * and current request from CookieKonnector. - * - * @returns {Promise} resolves with entries hydrated with db data - */ + if (self.proxy && !self.tunnel) { + self.port = self.proxy.port + self.host = self.proxy.hostname + } else { + self.port = self.uri.port + self.host = self.uri.hostname + } - saveBills(entries, fields, options) { - return super.saveBills(entries, fields, { ...options, - requestInstance: this.request - }); + if (options.form) { + self.form(options.form) } -} + if (options.formData) { + var formData = options.formData + var requestForm = self.form() + var appendFormValue = function (key, value) { + if (value && value.hasOwnProperty('value') && value.hasOwnProperty('options')) { + requestForm.append(key, value.value, value.options) + } else { + requestForm.append(key, value) + } + } + for (var formKey in formData) { + if (formData.hasOwnProperty(formKey)) { + var formValue = formData[formKey] + if (formValue instanceof Array) { + for (var j = 0; j < formValue.length; j++) { + appendFormValue(formKey, formValue[j]) + } + } else { + appendFormValue(formKey, formValue) + } + } + } + } -module.exports = CookieKonnector; + if (options.qs) { + self.qs(options.qs) + } -/***/ }), -/* 1304 */ -/***/ (function(module, exports, __webpack_require__) { + if (self.uri.path) { + self.path = self.uri.path + } else { + self.path = self.uri.pathname + (self.uri.search || '') + } -const { - URL -} = __webpack_require__(83); + if (self.path.length === 0) { + self.path = '/' + } -const computeWidth = $table => { - let out = 0; - const tds = $table.find('tr').first().find('td,th'); + // Auth must happen last in case signing is dependent on other headers + if (options.aws) { + self.aws(options.aws) + } - for (var i = 0; i < tds.length; i++) { - out += parseInt(tds.eq(i).attr('colspan')) || 1; + if (options.hawk) { + self.hawk(options.hawk) } - return out; -}; + if (options.httpSignature) { + self.httpSignature(options.httpSignature) + } -const makeLinkOpts = ($el, opts) => { - if ($el.attr('href') === undefined) return undefined; - if ($el.attr('href').indexOf('javascript:') === 0) return undefined; - if ($el.attr('href').indexOf('#') === 0) return undefined; - return { - link: new URL($el.attr('href'), opts.baseURL).toString(), - color: '0x0000FF' - }; -}; + if (options.auth) { + if (Object.prototype.hasOwnProperty.call(options.auth, 'username')) { + options.auth.user = options.auth.username + } + if (Object.prototype.hasOwnProperty.call(options.auth, 'password')) { + options.auth.pass = options.auth.password + } -function htmlToPDF($, frag, $parent, opts) { - let pdf, helveticaBold, helveticaEm; // pdfjs is an optional dependency, this is why the requires are done in - // a try/catch. webpack detects this and does not crash when building - // if requires are done in a try/catch. + self.auth( + options.auth.user, + options.auth.pass, + options.auth.sendImmediately, + options.auth.bearer + ) + } - try { - pdf = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); - helveticaBold = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs/font/Helvetica-Bold'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); - helveticaEm = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs/font/Helvetica-Oblique'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); - } catch (err) { - throw new Error('pdfjs dependency is missing. Please add it in your package.json'); + if (self.gzip && !self.hasHeader('accept-encoding')) { + self.setHeader('accept-encoding', 'gzip, deflate') } - opts = Object.assign({ - baseURL: '', - filter: () => true, - txtOpts: {} - }, opts); - const children = $parent.contents(); - let text = opts.text; - let parentDL = null; + if (self.uri.auth && !self.hasHeader('authorization')) { + var uriAuthPieces = self.uri.auth.split(':').map(function (item) { return self._qs.unescape(item) }) + self.auth(uriAuthPieces[0], uriAuthPieces.slice(1).join(':'), true) + } - const getText = () => { - if (!text) text = frag.text('', opts.txtOpts); - return text; - }; + if (!self.tunnel && self.proxy && self.proxy.auth && !self.hasHeader('proxy-authorization')) { + var proxyAuthPieces = self.proxy.auth.split(':').map(function (item) { return self._qs.unescape(item) }) + var authHeader = 'Basic ' + toBase64(proxyAuthPieces.join(':')) + self.setHeader('proxy-authorization', authHeader) + } - children.each((i, el) => { - if (el.nodeType === 3 && el.data.trim() !== '') { - getText().add(el.data); - } else if (el.nodeType === 1) { - const $el = $(el); - if (!opts.filter($el)) return; + if (self.proxy && !self.tunnel) { + self.path = (self.uri.protocol + '//' + self.uri.host + self.path) + } - switch (el.tagName) { - case 'a': - getText().add($el.text(), makeLinkOpts($el, opts)); - break; + if (options.json) { + self.json(options.json) + } + if (options.multipart) { + self.multipart(options.multipart) + } - case 'strong': - case 'b': - getText().add($el.text(), { - font: helveticaBold - }); - break; + if (options.time) { + self.timing = true - case 'em': - getText().add($el.text(), { - font: helveticaEm - }); - break; + // NOTE: elapsedTime is deprecated in favor of .timings + self.elapsedTime = self.elapsedTime || 0 + } - case 'span': - htmlToPDF($, frag, $el, Object.assign({}, opts, { - text: text - })); - break; + function setContentLength () { + if (isTypedArray(self.body)) { + self.body = Buffer.from(self.body) + } - case 'br': - getText().br(); - break; + if (!self.hasHeader('content-length')) { + var length + if (typeof self.body === 'string') { + length = Buffer.byteLength(self.body) + } else if (Array.isArray(self.body)) { + length = self.body.reduce(function (a, b) { return a + b.length }, 0) + } else { + length = self.body.length + } - case 'i': - case 'select': - case 'input': - case 'label': - case 'form': - case 'fieldset': - case 'textarea': - case 'button': - case 'img': - case 'script': - case 'caption': - // ignore - break; + if (length) { + self.setHeader('content-length', length) + } else { + self.emit('error', new Error('Argument error, options.body.')) + } + } + } + if (self.body && !isstream(self.body)) { + setContentLength() + } - case 'table': - { - text = null; - let width = computeWidth($el); - let tableState = { - tableWidth: width - }; - htmlToPDF($, frag.table({ - widths: Array.from(Array(width), () => '*'), - borderWidth: 1 - }), $el, Object.assign({}, opts, { - tableState - })); - break; - } + if (options.oauth) { + self.oauth(options.oauth) + } else if (self._oauth.params && self.hasHeader('authorization')) { + self.oauth(self._oauth.params) + } + + var protocol = self.proxy && !self.tunnel ? self.proxy.protocol : self.uri.protocol + var defaultModules = {'http:': http, 'https:': https} + var httpModules = self.httpModules || {} - case 'tr': - { - text = null; - opts.tableState.colRemaining = opts.tableState.tableWidth; - let row = frag.row(); - htmlToPDF($, row, $el, opts); + self.httpModule = httpModules[protocol] || defaultModules[protocol] - if (opts.tableState.colRemaining > 0) { - row.cell({ - colspan: opts.tableState.colRemaining - }); - } + if (!self.httpModule) { + return self.emit('error', new Error('Invalid protocol: ' + protocol)) + } - break; - } + if (options.ca) { + self.ca = options.ca + } - case 'dl': - text = null; - htmlToPDF($, frag.table({ - widths: [5 * pdf.cm, null], - borderWidth: 1 - }), $el, { ...opts, - tableState: { - tableWidth: 2, - colRemaining: 2 - } - }); - parentDL = null; - break; + if (!self.agent) { + if (options.agentOptions) { + self.agentOptions = options.agentOptions + } - case 'dt': - if (!parentDL) { - parentDL = frag; - } else { - frag = parentDL; - } + if (options.agentClass) { + self.agentClass = options.agentClass + } else if (options.forever) { + var v = version() + // use ForeverAgent in node 0.10- only + if (v.major === 0 && v.minor <= 10) { + self.agentClass = protocol === 'http:' ? ForeverAgent : ForeverAgent.SSL + } else { + self.agentClass = self.httpModule.Agent + self.agentOptions = self.agentOptions || {} + self.agentOptions.keepAlive = true + } + } else { + self.agentClass = self.httpModule.Agent + } + } - frag = frag.row(); - // fall through the rest of the procedure + if (self.pool === false) { + self.agent = false + } else { + self.agent = self.agent || self.getNewAgent() + } - case 'dd': - case 'th': - case 'td': - { - text = null; - const colspan = Math.min(opts.tableState.tableWidth, parseInt($el.attr('colspan')) || 1); - opts.tableState.colRemaining -= colspan; - htmlToPDF($, frag.cell({ - padding: 5, - colspan: colspan - }), $el, opts); - break; + self.on('pipe', function (src) { + if (self.ntick && self._started) { + self.emit('error', new Error('You cannot pipe to this stream after the outbound request has started.')) + } + self.src = src + if (isReadStream(src)) { + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', mime.lookup(src.path)) + } + } else { + if (src.headers) { + for (var i in src.headers) { + if (!self.hasHeader(i)) { + self.setHeader(i, src.headers[i]) } + } + } + if (self._json && !self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + if (src.method && !self.explicitMethod) { + self.method = src.method + } + } - case 'h1': - case 'h2': - case 'h3': - case 'h4': - case 'h5': - text = null; - htmlToPDF($, frag, // .cell({ paddingTop: 1 * pdf.cm }), - $el, Object.assign({}, opts, { - txtOpts: { - fontSize: 30 - parseInt(el.tagName.replace('h', '')) * 2 - } - })); - break; - - case 'div': - case 'p': - case 'ul': - text = null; - htmlToPDF($, frag.cell(), $el, opts); - break; + // self.on('pipe', function () { + // console.error('You have already piped to this stream. Pipeing twice is likely to break the request.') + // }) + }) - case 'thead': - case 'tfoot': - case 'tbody': - case 'small': - case 'li': - text = null; - htmlToPDF($, frag, $el, opts); - break; + defer(function () { + if (self._aborted) { + return + } - default: - text = null; - htmlToPDF($, frag, $el, opts); + var end = function () { + if (self._form) { + if (!self._auth.hasAuth) { + self._form.pipe(self) + } else if (self._auth.hasAuth && self._auth.sentAuth) { + self._form.pipe(self) + } + } + if (self._multipart && self._multipart.chunked) { + self._multipart.body.pipe(self) + } + if (self.body) { + if (isstream(self.body)) { + self.body.pipe(self) + } else { + setContentLength() + if (Array.isArray(self.body)) { + self.body.forEach(function (part) { + self.write(part) + }) + } else { + self.write(self.body) + } + self.end() + } + } else if (self.requestBodyStream) { + console.warn('options.requestBodyStream is deprecated, please pass the request object to stream.pipe.') + self.requestBodyStream.pipe(self) + } else if (!self.src) { + if (self._auth.hasAuth && !self._auth.sentAuth) { + self.end() + return + } + if (self.method !== 'GET' && typeof self.method !== 'undefined') { + self.setHeader('content-length', 0) + } + self.end() } } - }); -} - -function createCozyPDFDocument(headline, url) { - let pdf, helveticaBold; // pdfjs is an optional dependency, this is why the requires are done in - // a try/catch. webpack detects this and does not crash when building - // if requires are done in a try/catch. - try { - pdf = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); - helveticaBold = __webpack_require__(!(function webpackMissingModule() { var e = new Error("Cannot find module 'pdfjs/font/Helvetica-Bold'"); e.code = 'MODULE_NOT_FOUND'; throw e; }())); - } catch (err) { - throw new Error('pdfjs dependency is missing. Please add it in your package.json'); - } + if (self._form && !self.hasHeader('content-length')) { + // Before ending the request, we had to compute the length of the whole form, asyncly + self.setHeader(self._form.getHeaders(), true) + self._form.getLength(function (err, length) { + if (!err && !isNaN(length)) { + self.setHeader('content-length', length) + } + end() + }) + } else { + end() + } - var doc = new pdf.Document(); - const cell = doc.cell({ - paddingBottom: 0.5 * pdf.cm - }).text(); - cell.add(headline, { - font: helveticaBold, - fontSize: 14 - }); - cell.add(url, { - link: url, - color: '0x0000FF' - }); - return doc; + self.ntick = true + }) } -module.exports = { - htmlToPDF, - createCozyPDFDocument -}; +Request.prototype.getNewAgent = function () { + var self = this + var Agent = self.agentClass + var options = {} + if (self.agentOptions) { + for (var i in self.agentOptions) { + options[i] = self.agentOptions[i] + } + } + if (self.ca) { + options.ca = self.ca + } + if (self.ciphers) { + options.ciphers = self.ciphers + } + if (self.secureProtocol) { + options.secureProtocol = self.secureProtocol + } + if (self.secureOptions) { + options.secureOptions = self.secureOptions + } + if (typeof self.rejectUnauthorized !== 'undefined') { + options.rejectUnauthorized = self.rejectUnauthorized + } -/***/ }), -/* 1305 */ -/***/ (function(module, exports, __webpack_require__) { + if (self.cert && self.key) { + options.key = self.key + options.cert = self.cert + } + + if (self.pfx) { + options.pfx = self.pfx + } -const isEqualWith = __webpack_require__(1306); + if (self.passphrase) { + options.passphrase = self.passphrase + } -const omit = __webpack_require__(632); + var poolKey = '' -const maybeToISO = date => { - try { - return date.toISOString ? date.toISOString() : date; - } catch (e) { - return date; + // different types of agents are in different pools + if (Agent !== self.httpModule.Agent) { + poolKey += Agent.name } -}; -const looseDates = (val, otherVal) => { - // Loose equality for dates since when coming from Couch, they - // are ISO strings whereas just after scraping they are `Date`s. - if (val instanceof Date) { - return maybeToISO(val) === maybeToISO(otherVal); + // ca option is only relevant if proxy or destination are https + var proxy = self.proxy + if (typeof proxy === 'string') { + proxy = url.parse(proxy) } -}; -/** - * Simple Model for Documents. Allows to specify - * `shouldSave`, `shouldUpdate` as methods. - * - * Has useful `isEqual` method - * - */ + var isHttps = (proxy && proxy.protocol === 'https:') || this.uri.protocol === 'https:' + if (isHttps) { + if (options.ca) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ca + } -class Document { - constructor(attrs) { - if (this.validate) { - this.validate(attrs); + if (typeof options.rejectUnauthorized !== 'undefined') { + if (poolKey) { + poolKey += ':' + } + poolKey += options.rejectUnauthorized } - Object.assign(this, attrs, { - metadata: { - version: attrs.metadata && attrs.metadata.version || this.constructor.version + if (options.cert) { + if (poolKey) { + poolKey += ':' } - }); + poolKey += options.cert.toString('ascii') + options.key.toString('ascii') + } + + if (options.pfx) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.pfx.toString('ascii') + } + + if (options.ciphers) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.ciphers + } + + if (options.secureProtocol) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureProtocol + } + + if (options.secureOptions) { + if (poolKey) { + poolKey += ':' + } + poolKey += options.secureOptions + } } - toJSON() { - return this; + if (self.pool === globalPool && !poolKey && Object.keys(options).length === 0 && self.httpModule.globalAgent) { + // not doing anything special. Use the globalAgent + return self.httpModule.globalAgent } - /** - * Compares to another document deeply. - * - * `_id` and `_rev` are by default ignored in the comparison. - * - * By default, will compare dates loosely since you often - * compare existing documents (dates in ISO string) with documents - * that just have been scraped where dates are `Date`s. - */ + // we're using a stored agent. Make sure it's protocol-specific + poolKey = self.uri.protocol + poolKey - isEqual(other, ignoreAttrs = ['_id', '_rev'], strict = false) { - return isEqualWith(omit(this, ignoreAttrs), omit(other, ignoreAttrs), !strict && looseDates); + // generate a new agent for this setting if none yet exists + if (!self.pool[poolKey]) { + self.pool[poolKey] = new Agent(options) + // properly set maxSockets on new agents + if (self.pool.maxSockets) { + self.pool[poolKey].maxSockets = self.pool.maxSockets + } } + return self.pool[poolKey] } -module.exports = Document; - -/***/ }), -/* 1306 */ -/***/ (function(module, exports, __webpack_require__) { +Request.prototype.start = function () { + // start() is called once we are ready to send the outgoing HTTP request. + // this is usually called on the first write(), end() or on nextTick() + var self = this -var baseIsEqual = __webpack_require__(422); + if (self.timing) { + // All timings will be relative to this request's startTime. In order to do this, + // we need to capture the wall-clock start time (via Date), immediately followed + // by the high-resolution timer (via now()). While these two won't be set + // at the _exact_ same time, they should be close enough to be able to calculate + // high-resolution, monotonically non-decreasing timestamps relative to startTime. + var startTime = new Date().getTime() + var startTimeNow = now() + } -/** - * This method is like `_.isEqual` except that it accepts `customizer` which - * is invoked to compare values. If `customizer` returns `undefined`, comparisons - * are handled by the method instead. The `customizer` is invoked with up to - * six arguments: (objValue, othValue [, index|key, object, other, stack]). - * - * @static - * @memberOf _ - * @since 4.0.0 - * @category Lang - * @param {*} value The value to compare. - * @param {*} other The other value to compare. - * @param {Function} [customizer] The function to customize comparisons. - * @returns {boolean} Returns `true` if the values are equivalent, else `false`. - * @example - * - * function isGreeting(value) { - * return /^h(?:i|ello)$/.test(value); - * } - * - * function customizer(objValue, othValue) { - * if (isGreeting(objValue) && isGreeting(othValue)) { - * return true; - * } - * } - * - * var array = ['hello', 'goodbye']; - * var other = ['hi', 'goodbye']; - * - * _.isEqualWith(array, other, customizer); - * // => true - */ -function isEqualWith(value, other, customizer) { - customizer = typeof customizer == 'function' ? customizer : undefined; - var result = customizer ? customizer(value, other) : undefined; - return result === undefined ? baseIsEqual(value, other, undefined, customizer) : !!result; -} + if (self._aborted) { + return + } -module.exports = isEqualWith; + self._started = true + self.method = self.method || 'GET' + self.href = self.uri.href + if (self.src && self.src.stat && self.src.stat.size && !self.hasHeader('content-length')) { + self.setHeader('content-length', self.src.stat.size) + } + if (self._aws) { + self.aws(self._aws, true) + } -/***/ }), -/* 1307 */ -/***/ (function(module, exports, __webpack_require__) { + // We have a method named auth, which is completely different from the http.request + // auth option. If we don't remove it, we're gonna have a bad time. + var reqOptions = copy(self) + delete reqOptions.auth -const log = __webpack_require__(2).namespace('scrape'); -/** - * Declarative scraping. - * - * Describe your items attributes and where to find/parse them - * instead of imperatively building them. - * - * Heavily inspired by [artoo] scraping method. - * - * [artoo]: https://medialab.github.io/artoo/ - */ + debug('make request', self.uri.href) + // node v6.8.0 now supports a `timeout` value in `http.request()`, but we + // should delete it for now since we handle timeouts manually for better + // consistency with node versions before v6.8.0 + delete reqOptions.timeout -const mkSpec = function (spec) { - if (typeof spec === 'string') { - return { - sel: spec - }; - } else { - return spec; + try { + self.req = self.httpModule.request(reqOptions) + } catch (err) { + self.emit('error', err) + return } -}; -/** - * Scrape a cheerio object for properties - * - * @param {object} $ - Cheerio node which will be scraped - * @param {object|string} specs - Options object describing what you want to scrape - * @param {string} [childSelector] - If passed, scrape will return an array of items - * @returns {object|Array} - Item(s) scraped - * @example - * - * `scrape` can be used to declaratively extract data : - * - * - For one object : - * - * ``` - * const item = scrape($('#item'), { - * title: '.title', - * content: '.content' - * }) - * ``` - * - * - For a list of objects : - * - * ``` - * const items = scrape($('#content'), { - * title: '.title', - * content: '.content' - * }, '.item') - * ``` - * - * For more power, you can use `object`s for each retriever : - * - * ``` - * const items = scrape($('#content'), { - * title: '.title', - * content: '.content', - * link: { - * sel: 'a', - * attr: 'href' - * }, - * }, '.item') - * ``` - * - * Here the `href` attribute of the `a` inside `.item`s would have been - * put into the `link` attribute of the items returned by `scrape`. - * - * Available options : - * - * - `sel`: the CSS selector used to target the HTML node from which data will be scraped - * - `attr`: the HTML attribute from which to extract data - * - `parse`: function applied to the value extracted (`{ sel: '.price', parse: parseAmount }`) - * - `fn`: if you need something more complicated than `attr`, you can use this function, it receives - * the complete DOM node. `{ sel: '.person', fn: $node => $node.attr('data-name') + $node.attr('data-firstname') }` - */ - -const scrape = ($, specs, childSelector) => { - // Only one value shorthand - if (typeof specs === 'string' || specs.sel && typeof specs.sel === 'string') { - const { - val - } = scrape($, { - val: specs - }); - return val; - } // Several items shorthand + if (self.timing) { + self.startTime = startTime + self.startTimeNow = startTimeNow + // Timing values will all be relative to startTime (by comparing to startTimeNow + // so we have an accurate clock) + self.timings = {} + } - if (childSelector !== undefined) { - return Array.from(($.find || $)(childSelector)).map(e => scrape($(e), specs)); - } // Several properties "normal" case + var timeout + if (self.timeout && !self.timeoutTimer) { + if (self.timeout < 0) { + timeout = 0 + } else if (typeof self.timeout === 'number' && isFinite(self.timeout)) { + timeout = self.timeout + } + } + self.req.on('response', self.onRequestResponse.bind(self)) + self.req.on('error', self.onRequestError.bind(self)) + self.req.on('drain', function () { + self.emit('drain') + }) - const res = {}; - Object.keys(specs).forEach(specName => { - try { - const spec = mkSpec(specs[specName]); - let data = spec.sel ? $.find(spec.sel) : $; + self.req.on('socket', function (socket) { + // `._connecting` was the old property which was made public in node v6.1.0 + var isConnecting = socket._connecting || socket.connecting + if (self.timing) { + self.timings.socket = now() - self.startTimeNow - if (spec.index) { - data = data.get(spec.index); - } + if (isConnecting) { + var onLookupTiming = function () { + self.timings.lookup = now() - self.startTimeNow + } - let val; + var onConnectTiming = function () { + self.timings.connect = now() - self.startTimeNow + } - if (spec.fn) { - val = spec.fn(data); - } else if (spec.attr) { - val = data.attr(spec.attr); - } else { - val = data; - val = val && val.text(); - val = val && val.trim(); - } + socket.once('lookup', onLookupTiming) + socket.once('connect', onConnectTiming) - if (spec.parse) { - val = spec.parse(val); + // clean up timing event listeners if needed on error + self.req.once('error', function () { + socket.removeListener('lookup', onLookupTiming) + socket.removeListener('connect', onConnectTiming) + }) } + } - res[specName] = val; - } catch (e) { - log('warn', 'Could not parse for', specName); - log('warn', e); + var setReqTimeout = function () { + // This timeout sets the amount of time to wait *between* bytes sent + // from the server once connected. + // + // In particular, it's useful for erroring if the server fails to send + // data halfway through streaming a response. + self.req.setTimeout(timeout, function () { + if (self.req) { + self.abort() + var e = new Error('ESOCKETTIMEDOUT') + e.code = 'ESOCKETTIMEDOUT' + e.connect = false + self.emit('error', e) + } + }) } - }); - return res; -}; + if (timeout !== undefined) { + // Only start the connection timer if we're actually connecting a new + // socket, otherwise if we're already connected (because this is a + // keep-alive connection) do not bother. This is important since we won't + // get a 'connect' event for an already connected socket. + if (isConnecting) { + var onReqSockConnect = function () { + socket.removeListener('connect', onReqSockConnect) + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + setReqTimeout() + } -module.exports = scrape; + socket.on('connect', onReqSockConnect) -/***/ }), -/* 1308 */ -/***/ (function(module, exports) { + self.req.on('error', function (err) { // eslint-disable-line handle-callback-err + socket.removeListener('connect', onReqSockConnect) + }) -/** - * Returns the given name, replacing characters that could be an issue when - * used in a filename with spaces. - * - * @module normalizeFilename - */ -const normalizableCharsRegExp = /[<>:"/\\|?*\0\s]+/g; -/** - * Returns the given name, replacing characters that could be an issue when - * used in a filename with spaces. - * - * Replaced characters include: - * - * - Those forbidden on one or many popular OS or filesystem: `<>:"/\|?*` - * - Those forbidden by the cozy-stack `\0`, `\r` and `\n` - * - Multiple spaces and/or tabs are replaced with a single space - * - Leading & trailing spaces and/or tabs are removed - * - * An exception will be thrown in case there is not any filename-compatible - * character in the given name. - * - * Parameters: - * - * - `basename` is whatever string you want to generate the filename from - * - `ext` is an optional file extension, with or without leading dot - * - * ```javascript - * const { normalizeFilename } = require('cozy-konnector-libs') - * - * const filename = normalizeFilename('*foo/bar: <baz> \\"qux"\t???', '.txt') - * // `filename` === `foo bar baz qux.txt` - * ``` - * - * @alias module:normalizeFilename - */ + // Set a timeout in memory - this block will throw if the server takes more + // than `timeout` to write the HTTP status and headers (corresponding to + // the on('response') event on the client). NB: this measures wall-clock + // time, not the time between bytes sent by the server. + self.timeoutTimer = setTimeout(function () { + socket.removeListener('connect', onReqSockConnect) + self.abort() + var e = new Error('ETIMEDOUT') + e.code = 'ETIMEDOUT' + e.connect = true + self.emit('error', e) + }, timeout) + } else { + // We're already connected + setReqTimeout() + } + } + self.emit('socket', socket) + }) -const normalizeFilename = (basename, ext) => { - const filename = basename.replace(normalizableCharsRegExp, ' ').trim(); + self.emit('request', self.req) +} - if (filename === '') { - throw new Error('Cannot find any filename-compatible character in ' + JSON.stringify(filename) + '!'); +Request.prototype.onRequestError = function (error) { + var self = this + if (self._aborted) { + return } + if (self.req && self.req._reusedSocket && error.code === 'ECONNRESET' && + self.agent.addRequestNoreuse) { + self.agent = { addRequest: self.agent.addRequestNoreuse.bind(self.agent) } + self.start() + self.req.end() + return + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } + self.emit('error', error) +} - if (ext == null) ext = '';else if (!ext.startsWith('.')) ext = '.' + ext; - return filename + ext; -}; - -module.exports = normalizeFilename; +Request.prototype.onRequestResponse = function (response) { + var self = this -/***/ }), -/* 1309 */ -/***/ (function(module, exports, __webpack_require__) { + if (self.timing) { + self.timings.response = now() - self.startTimeNow + } -/** - * Use every possible means to solve a captcha. At the moment, Anticaptcha web service is used if - * any related secret key is found in COZY_PARAMETERS environment variable. - * - * @module solveCaptcha - */ -const log = __webpack_require__(2).namespace('solveCaptcha'); + debug('onRequestResponse', self.uri.href, response.statusCode, response.headers) + response.on('end', function () { + if (self.timing) { + self.timings.end = now() - self.startTimeNow + response.timingStart = self.startTime -const errors = __webpack_require__(1231); + // fill in the blanks for any periods that didn't trigger, such as + // no lookup or connect due to keep alive + if (!self.timings.socket) { + self.timings.socket = 0 + } + if (!self.timings.lookup) { + self.timings.lookup = self.timings.socket + } + if (!self.timings.connect) { + self.timings.connect = self.timings.lookup + } + if (!self.timings.response) { + self.timings.response = self.timings.connect + } -const request = __webpack_require__(24); + debug('elapsed time', self.timings.end) -const sleep = __webpack_require__(9).promisify(global.setTimeout); + // elapsedTime includes all redirects + self.elapsedTime += Math.round(self.timings.end) -const connectorStartTime = Date.now(); -const ms = 1; -const s = 1000 * ms; -const m = 60 * s; -const DEFAULT_TIMEOUT = connectorStartTime + 3 * m; // 3 minutes by default to let 1 min to the connector to fetch files + // NOTE: elapsedTime is deprecated in favor of .timings + response.elapsedTime = self.elapsedTime -/** - * Use every possible means to solve a captcha. At the moment, Anticaptcha web service is used if - * any related secret key is found in COZY_PARAMETERS environment variable. - * If you do not want to solve the captcha each time the connector is run, please also use - * CookieKonnector which will help you save the session. - * - * Parameters: - * - * - `params` is an array of objects with any attributes with some mandatory attributes : - * + `type` (String): (default recaptcha) type of captcha to solve. can be "recaptcha" or "image" at the moment - * + `timeout` (Number): (default 3 minutes after now) time when the solver should stop trying to - * solve the captcha - * + `websiteKey` (String): the key you can find on the targeted website (for recaptcha) - * + `websiteURL` (String): The URL of the page showing the captcha (for recaptcha) - * + `body` (String): The base64 encoded image (for image captcha) - * Returns: Promise with the solved captcha response as a string - * - * @example - * - * ```javascript - * const { solveCaptcha } = require('cozy-konnector-libs') - * - * const solvedKey = await solveCaptcha({ - * websiteKey: 'the key in the webpage', - * websiteURL: 'http://quotes.toscrape.com/login', - * }) - * // now use the solveKey to submit your form - * ``` - * @alias module:solveCaptcha - */ + // timings is just for the final fetch + response.timings = self.timings -const solveCaptcha = async (params = {}) => { - const defaultParams = { - type: 'recaptcha', - timeout: DEFAULT_TIMEOUT - }; - params = { ...defaultParams, - ...params - }; - const secrets = JSON.parse(process.env.COZY_PARAMETERS || '{}').secret; + // pre-calculate phase timings as well + response.timingPhases = { + wait: self.timings.socket, + dns: self.timings.lookup - self.timings.socket, + tcp: self.timings.connect - self.timings.lookup, + firstByte: self.timings.response - self.timings.connect, + download: self.timings.end - self.timings.response, + total: self.timings.end + } + } + debug('response end', self.uri.href, response.statusCode, response.headers) + }) - if (params.type === 'recaptcha') { - checkMandatoryParams(params, ['websiteKey', 'websiteURL']); - const { - websiteKey, - websiteURL - } = params; - return solveWithAntiCaptcha({ - websiteKey, - websiteURL, - type: 'NoCaptchaTaskProxyless' - }, params.timeout, secrets, 'gRecaptchaResponse'); - } else if (params.type === 'recaptchav3') { - checkMandatoryParams(params, ['websiteKey', 'websiteURL', 'pageAction', 'minScore']); - const { - websiteKey, - websiteURL, - pageAction, - minScore - } = params; - return solveWithAntiCaptcha({ - websiteKey, - websiteURL, - pageAction, - minScore, - type: 'RecaptchaV3TaskProxyless' - }, params.timeout, secrets, 'gRecaptchaResponse'); - } else if (params.type === 'hcaptcha') { - checkMandatoryParams(params, ['websiteKey', 'websiteURL']); - const { - websiteKey, - websiteURL - } = params; - return solveWithAntiCaptcha({ - websiteKey, - websiteURL, - type: 'HCaptchaTaskProxyless' - }, params.timeout, secrets, 'gRecaptchaResponse'); - } else if (params.type === 'image') { - checkMandatoryParams(params, ['body']); - return solveWithAntiCaptcha({ - body: params.body, - type: 'ImageToTextTask' - }, params.timeout, secrets, 'text'); + if (self._aborted) { + debug('aborted', self.uri.href) + response.resume() + return } -}; -function checkMandatoryParams(params = {}, mandatoryParams = []) { - const keys = Object.keys(params); - const missingKeys = mandatoryParams.filter(key => !keys.includes(key)); + self.response = response + response.request = self + response.toJSON = responseToJSON - if (missingKeys.length) { - throw new Error(`${missingKeys.join(', ')} are mandatory to solve the captcha`); + // XXX This is different on 0.10, because SSL is strict by default + if (self.httpModule === https && + self.strictSSL && (!response.hasOwnProperty('socket') || + !response.socket.authorized)) { + debug('strict ssl error', self.uri.href) + var sslErr = response.hasOwnProperty('socket') ? response.socket.authorizationError : self.uri.href + ' does not support SSL' + self.emit('error', new Error('SSL Error: ' + sslErr)) + return } -} - -async function solveWithAntiCaptcha(taskParams, timeout = DEFAULT_TIMEOUT, secrets, resultAttribute = 'gRecaptchaResponse') { - const antiCaptchaApiUrl = 'https://api.anti-captcha.com'; - let gRecaptchaResponse = null; - const startTime = Date.now(); // we try to solve the captcha with anticaptcha - - const clientKey = secrets.antiCaptchaClientKey; - - if (clientKey) { - log('debug', ' Creating captcha resolution task...'); - const task = await request.post(`${antiCaptchaApiUrl}/createTask`, { - body: { - clientKey, - task: taskParams - }, - json: true - }); - - if (task && task.taskId) { - log('debug', ` Task id : ${task.taskId}`); - - while (!gRecaptchaResponse) { - const resp = await request.post(`${antiCaptchaApiUrl}/getTaskResult`, { - body: { - clientKey, - taskId: task.taskId - }, - json: true - }); - if (resp.status === 'ready') { - if (resp.errorId) { - log('error', `Anticaptcha error: ${JSON.stringify(resp)}`); - throw new Error(errors.CAPTCHA_RESOLUTION_FAILED); - } + // Save the original host before any redirect (if it changes, we need to + // remove any authorization headers). Also remember the case of the header + // name because lots of broken servers expect Host instead of host and we + // want the caller to be able to specify this. + self.originalHost = self.getHeader('host') + if (!self.originalHostHeaderName) { + self.originalHostHeaderName = self.hasHeader('host') + } + if (self.setHost) { + self.removeHeader('host') + } + if (self.timeout && self.timeoutTimer) { + clearTimeout(self.timeoutTimer) + self.timeoutTimer = null + } - log('info', ` Found Recaptcha response : ${JSON.stringify(resp)}`); - return resp.solution[resultAttribute]; - } else { - log('debug', ` ${Math.round((Date.now() - startTime) / 1000)}s...`); + var targetCookieJar = (self._jar && self._jar.setCookie) ? self._jar : globalCookieJar + var addCookie = function (cookie) { + // set the cookie if it's domain in the href's domain. + try { + targetCookieJar.setCookie(cookie, self.uri.href, {ignoreError: true}) + } catch (e) { + self.emit('error', e) + } + } - if (Date.now() > timeout) { - log('warn', ` Captcha resolution timeout`); - throw new Error(errors.CAPTCHA_RESOLUTION_FAILED + '.TIMEOUT'); - } + response.caseless = caseless(response.headers) - await sleep(10000); - } - } + if (response.caseless.has('set-cookie') && (!self._disableCookies)) { + var headerName = response.caseless.has('set-cookie') + if (Array.isArray(response.headers[headerName])) { + response.headers[headerName].forEach(addCookie) } else { - log('warn', 'Could not create anticaptcha task'); - log('warn', JSON.stringify(task)); + addCookie(response.headers[headerName]) } - } else { - log('warn', 'Could not find any anticaptcha secret key'); } - throw new Error(errors.CAPTCHA_RESOLUTION_FAILED); -} + if (self._redirect.onResponse(response)) { + return // Ignore the rest of the response + } else { + // Be a good stream and emit end when the response is finished. + // Hack to emit end on close because of a core bug that never fires end + response.on('close', function () { + if (!self._ended) { + self.response.emit('end') + } + }) -module.exports = solveCaptcha; + response.once('end', function () { + self._ended = true + }) -/***/ }), -/* 1310 */ -/***/ (function(__webpack_module__, __webpack_exports__, __webpack_require__) { + var noBody = function (code) { + return ( + self.method === 'HEAD' || + // Informational + (code >= 100 && code < 200) || + // No Content + code === 204 || + // Not Modified + code === 304 + ) + } -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Headers", function() { return Headers; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Request", function() { return Request; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Response", function() { return Response; }); -/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "FetchError", function() { return FetchError; }); -/* harmony import */ var stream__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(100); -/* harmony import */ var http__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98); -/* harmony import */ var url__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83); -/* harmony import */ var whatwg_url__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(1311); -/* harmony import */ var https__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99); -/* harmony import */ var zlib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(101); + var responseContent + if (self.gzip && !noBody(response.statusCode)) { + var contentEncoding = response.headers['content-encoding'] || 'identity' + contentEncoding = contentEncoding.trim().toLowerCase() + + // Be more lenient with decoding compressed responses, since (very rarely) + // servers send slightly invalid gzip responses that are still accepted + // by common browsers. + // Always using Z_SYNC_FLUSH is what cURL does. + var zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + } + + if (contentEncoding === 'gzip') { + responseContent = zlib.createGunzip(zlibOptions) + response.pipe(responseContent) + } else if (contentEncoding === 'deflate') { + responseContent = zlib.createInflate(zlibOptions) + response.pipe(responseContent) + } else { + // Since previous versions didn't check for Content-Encoding header, + // ignore any invalid values to preserve backwards-compatibility + if (contentEncoding !== 'identity') { + debug('ignoring unrecognized Content-Encoding ' + contentEncoding) + } + responseContent = response + } + } else { + responseContent = response + } + if (self.encoding) { + if (self.dests.length !== 0) { + console.error('Ignoring encoding parameter as this stream is being piped to another stream which makes the encoding option invalid.') + } else { + responseContent.setEncoding(self.encoding) + } + } + if (self._paused) { + responseContent.pause() + } + self.responseContent = responseContent + self.emit('response', response) + self.dests.forEach(function (dest) { + self.pipeDest(dest) + }) + responseContent.on('data', function (chunk) { + if (self.timing && !self.responseStarted) { + self.responseStartTime = (new Date()).getTime() -// Based on https://github.com/tmpvar/jsdom/blob/aa85b2abf07766ff7bf5c1f6daafb3726f2f2db5/lib/jsdom/living/blob.js + // NOTE: responseStartTime is deprecated in favor of .timings + response.responseStartTime = self.responseStartTime + } + self._destdata = true + self.emit('data', chunk) + }) + responseContent.once('end', function (chunk) { + self.emit('end', chunk) + }) + responseContent.on('error', function (error) { + self.emit('error', error) + }) + responseContent.on('close', function () { self.emit('close') }) -// fix for "Readable" isn't a named export issue -const Readable = stream__WEBPACK_IMPORTED_MODULE_0__.Readable; + if (self.callback) { + self.readResponseBody(response) + } else { // if no callback + self.on('end', function () { + if (self._aborted) { + debug('aborted', self.uri.href) + return + } + self.emit('complete', response) + }) + } + } + debug('finish init function', self.uri.href) +} -const BUFFER = Symbol('buffer'); -const TYPE = Symbol('type'); +Request.prototype.readResponseBody = function (response) { + var self = this + debug("reading response's body") + var buffers = [] + var bufferLength = 0 + var strings = [] -class Blob { - constructor() { - this[TYPE] = ''; + self.on('data', function (chunk) { + if (!Buffer.isBuffer(chunk)) { + strings.push(chunk) + } else if (chunk.length) { + bufferLength += chunk.length + buffers.push(chunk) + } + }) + self.on('end', function () { + debug('end event', self.uri.href) + if (self._aborted) { + debug('aborted', self.uri.href) + // `buffer` is defined in the parent scope and used in a closure it exists for the life of the request. + // This can lead to leaky behavior if the user retains a reference to the request object. + buffers = [] + bufferLength = 0 + return + } - const blobParts = arguments[0]; - const options = arguments[1]; + if (bufferLength) { + debug('has body', self.uri.href, bufferLength) + response.body = Buffer.concat(buffers, bufferLength) + if (self.encoding !== null) { + response.body = response.body.toString(self.encoding) + } + // `buffer` is defined in the parent scope and used in a closure it exists for the life of the Request. + // This can lead to leaky behavior if the user retains a reference to the request object. + buffers = [] + bufferLength = 0 + } else if (strings.length) { + // The UTF8 BOM [0xEF,0xBB,0xBF] is converted to [0xFE,0xFF] in the JS UTC16/UCS2 representation. + // Strip this value out when the encoding is set to 'utf8', as upstream consumers won't expect it and it breaks JSON.parse(). + if (self.encoding === 'utf8' && strings[0].length > 0 && strings[0][0] === '\uFEFF') { + strings[0] = strings[0].substring(1) + } + response.body = strings.join('') + } - const buffers = []; - let size = 0; + if (self._json) { + try { + response.body = JSON.parse(response.body, self._jsonReviver) + } catch (e) { + debug('invalid JSON received', self.uri.href) + } + } + debug('emitting complete', self.uri.href) + if (typeof response.body === 'undefined' && !self._json) { + response.body = self.encoding === null ? Buffer.alloc(0) : '' + } + self.emit('complete', response, response.body) + }) +} - if (blobParts) { - const a = blobParts; - const length = Number(a.length); - for (let i = 0; i < length; i++) { - const element = a[i]; - let buffer; - if (element instanceof Buffer) { - buffer = element; - } else if (ArrayBuffer.isView(element)) { - buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); - } else if (element instanceof ArrayBuffer) { - buffer = Buffer.from(element); - } else if (element instanceof Blob) { - buffer = element[BUFFER]; - } else { - buffer = Buffer.from(typeof element === 'string' ? element : String(element)); - } - size += buffer.length; - buffers.push(buffer); - } - } +Request.prototype.abort = function () { + var self = this + self._aborted = true - this[BUFFER] = Buffer.concat(buffers); + if (self.req) { + self.req.abort() + } else if (self.response) { + self.response.destroy() + } - let type = options && options.type !== undefined && String(options.type).toLowerCase(); - if (type && !/[^\u0020-\u007E]/.test(type)) { - this[TYPE] = type; - } - } - get size() { - return this[BUFFER].length; - } - get type() { - return this[TYPE]; - } - text() { - return Promise.resolve(this[BUFFER].toString()); - } - arrayBuffer() { - const buf = this[BUFFER]; - const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - return Promise.resolve(ab); - } - stream() { - const readable = new Readable(); - readable._read = function () {}; - readable.push(this[BUFFER]); - readable.push(null); - return readable; - } - toString() { - return '[object Blob]'; - } - slice() { - const size = this.size; + self.emit('abort') +} - const start = arguments[0]; - const end = arguments[1]; - let relativeStart, relativeEnd; - if (start === undefined) { - relativeStart = 0; - } else if (start < 0) { - relativeStart = Math.max(size + start, 0); - } else { - relativeStart = Math.min(start, size); - } - if (end === undefined) { - relativeEnd = size; - } else if (end < 0) { - relativeEnd = Math.max(size + end, 0); - } else { - relativeEnd = Math.min(end, size); - } - const span = Math.max(relativeEnd - relativeStart, 0); +Request.prototype.pipeDest = function (dest) { + var self = this + var response = self.response + // Called after the response is received + if (dest.headers && !dest.headersSent) { + if (response.caseless.has('content-type')) { + var ctname = response.caseless.has('content-type') + if (dest.setHeader) { + dest.setHeader(ctname, response.headers[ctname]) + } else { + dest.headers[ctname] = response.headers[ctname] + } + } - const buffer = this[BUFFER]; - const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); - const blob = new Blob([], { type: arguments[2] }); - blob[BUFFER] = slicedBuffer; - return blob; - } + if (response.caseless.has('content-length')) { + var clname = response.caseless.has('content-length') + if (dest.setHeader) { + dest.setHeader(clname, response.headers[clname]) + } else { + dest.headers[clname] = response.headers[clname] + } + } + } + if (dest.setHeader && !dest.headersSent) { + for (var i in response.headers) { + // If the response content is being decoded, the Content-Encoding header + // of the response doesn't represent the piped content, so don't pass it. + if (!self.gzip || i !== 'content-encoding') { + dest.setHeader(i, response.headers[i]) + } + } + dest.statusCode = response.statusCode + } + if (self.pipefilter) { + self.pipefilter(response, dest) + } } -Object.defineProperties(Blob.prototype, { - size: { enumerable: true }, - type: { enumerable: true }, - slice: { enumerable: true } -}); +Request.prototype.qs = function (q, clobber) { + var self = this + var base + if (!clobber && self.uri.query) { + base = self._qs.parse(self.uri.query) + } else { + base = {} + } -Object.defineProperty(Blob.prototype, Symbol.toStringTag, { - value: 'Blob', - writable: false, - enumerable: false, - configurable: true -}); + for (var i in q) { + base[i] = q[i] + } -/** - * fetch-error.js - * - * FetchError interface for operational errors - */ + var qs = self._qs.stringify(base) -/** - * Create FetchError instance - * - * @param String message Error message for human - * @param String type Error type for machine - * @param String systemError For Node.js system error - * @return FetchError - */ -function FetchError(message, type, systemError) { - Error.call(this, message); + if (qs === '') { + return self + } - this.message = message; - this.type = type; + self.uri = url.parse(self.uri.href.split('?')[0] + '?' + qs) + self.url = self.uri + self.path = self.uri.path - // when err.type is `system`, err.code contains system error code - if (systemError) { - this.code = this.errno = systemError.code; + if (self.uri.host === 'unix') { + self.enableUnixSocket() } - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); + return self } +Request.prototype.form = function (form) { + var self = this + if (form) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.setHeader('content-type', 'application/x-www-form-urlencoded') + } + self.body = (typeof form === 'string') + ? self._qs.rfc3986(form.toString('utf8')) + : self._qs.stringify(form).toString('utf8') + return self + } + // create form-data object + self._form = new FormData() + self._form.on('error', function (err) { + err.message = 'form-data: ' + err.message + self.emit('error', err) + self.abort() + }) + return self._form +} +Request.prototype.multipart = function (multipart) { + var self = this -FetchError.prototype = Object.create(Error.prototype); -FetchError.prototype.constructor = FetchError; -FetchError.prototype.name = 'FetchError'; - -let convert; -try { - convert = require('encoding').convert; -} catch (e) {} - -const INTERNALS = Symbol('Body internals'); - -// fix an issue where "PassThrough" isn't a named export for node <10 -const PassThrough = stream__WEBPACK_IMPORTED_MODULE_0__.PassThrough; - -/** - * Body mixin - * - * Ref: https://fetch.spec.whatwg.org/#body - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -function Body(body) { - var _this = this; - - var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, - _ref$size = _ref.size; - - let size = _ref$size === undefined ? 0 : _ref$size; - var _ref$timeout = _ref.timeout; - let timeout = _ref$timeout === undefined ? 0 : _ref$timeout; + self._multipart.onRequest(multipart) - if (body == null) { - // body is undefined or null - body = null; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - body = Buffer.from(body.toString()); - } else if (isBlob(body)) ; else if (Buffer.isBuffer(body)) ; else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - body = Buffer.from(body); - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); - } else if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) ; else { - // none of the above - // coerce to string then buffer - body = Buffer.from(String(body)); - } - this[INTERNALS] = { - body, - disturbed: false, - error: null - }; - this.size = size; - this.timeout = timeout; + if (!self._multipart.chunked) { + self.body = self._multipart.body + } - if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) { - body.on('error', function (err) { - const error = err.name === 'AbortError' ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, 'system', err); - _this[INTERNALS].error = error; - }); - } + return self } +Request.prototype.json = function (val) { + var self = this -Body.prototype = { - get body() { - return this[INTERNALS].body; - }, + if (!self.hasHeader('accept')) { + self.setHeader('accept', 'application/json') + } - get bodyUsed() { - return this[INTERNALS].disturbed; - }, + if (typeof self.jsonReplacer === 'function') { + self._jsonReplacer = self.jsonReplacer + } - /** - * Decode response as ArrayBuffer - * - * @return Promise - */ - arrayBuffer() { - return consumeBody.call(this).then(function (buf) { - return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); - }); - }, + self._json = true + if (typeof val === 'boolean') { + if (self.body !== undefined) { + if (!/^application\/x-www-form-urlencoded\b/.test(self.getHeader('content-type'))) { + self.body = safeStringify(self.body, self._jsonReplacer) + } else { + self.body = self._qs.rfc3986(self.body) + } + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } + } else { + self.body = safeStringify(val, self._jsonReplacer) + if (!self.hasHeader('content-type')) { + self.setHeader('content-type', 'application/json') + } + } - /** - * Return raw response as Blob - * - * @return Promise - */ - blob() { - let ct = this.headers && this.headers.get('content-type') || ''; - return consumeBody.call(this).then(function (buf) { - return Object.assign( - // Prevent copying - new Blob([], { - type: ct.toLowerCase() - }), { - [BUFFER]: buf - }); - }); - }, + if (typeof self.jsonReviver === 'function') { + self._jsonReviver = self.jsonReviver + } - /** - * Decode response as json - * - * @return Promise - */ - json() { - var _this2 = this; + return self +} +Request.prototype.getHeader = function (name, headers) { + var self = this + var result, re, match + if (!headers) { + headers = self.headers + } + Object.keys(headers).forEach(function (key) { + if (key.length !== name.length) { + return + } + re = new RegExp(name, 'i') + match = key.match(re) + if (match) { + result = headers[key] + } + }) + return result +} +Request.prototype.enableUnixSocket = function () { + // Get the socket & request paths from the URL + var unixParts = this.uri.path.split(':') + var host = unixParts[0] + var path = unixParts[1] + // Apply unix properties to request + this.socketPath = host + this.uri.pathname = path + this.uri.path = path + this.uri.host = host + this.uri.hostname = host + this.uri.isUnix = true +} - return consumeBody.call(this).then(function (buffer) { - try { - return JSON.parse(buffer.toString()); - } catch (err) { - return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, 'invalid-json')); - } - }); - }, +Request.prototype.auth = function (user, pass, sendImmediately, bearer) { + var self = this - /** - * Decode response as text - * - * @return Promise - */ - text() { - return consumeBody.call(this).then(function (buffer) { - return buffer.toString(); - }); - }, + self._auth.onRequest(user, pass, sendImmediately, bearer) - /** - * Decode response as buffer (non-spec api) - * - * @return Promise - */ - buffer() { - return consumeBody.call(this); - }, + return self +} +Request.prototype.aws = function (opts, now) { + var self = this - /** - * Decode response as text, while automatically detecting the encoding and - * trying to decode to UTF-8 (non-spec api) - * - * @return Promise - */ - textConverted() { - var _this3 = this; + if (!now) { + self._aws = opts + return self + } - return consumeBody.call(this).then(function (buffer) { - return convertBody(buffer, _this3.headers); - }); - } -}; + if (opts.sign_version === 4 || opts.sign_version === '4') { + // use aws4 + var options = { + host: self.uri.host, + path: self.uri.path, + method: self.method, + headers: self.headers, + body: self.body + } + if (opts.service) { + options.service = opts.service + } + var signRes = aws4.sign(options, { + accessKeyId: opts.key, + secretAccessKey: opts.secret, + sessionToken: opts.session + }) + self.setHeader('authorization', signRes.headers.Authorization) + self.setHeader('x-amz-date', signRes.headers['X-Amz-Date']) + if (signRes.headers['X-Amz-Security-Token']) { + self.setHeader('x-amz-security-token', signRes.headers['X-Amz-Security-Token']) + } + } else { + // default: use aws-sign2 + var date = new Date() + self.setHeader('date', date.toUTCString()) + var auth = { + key: opts.key, + secret: opts.secret, + verb: self.method.toUpperCase(), + date: date, + contentType: self.getHeader('content-type') || '', + md5: self.getHeader('content-md5') || '', + amazonHeaders: aws2.canonicalizeHeaders(self.headers) + } + var path = self.uri.path + if (opts.bucket && path) { + auth.resource = '/' + opts.bucket + path + } else if (opts.bucket && !path) { + auth.resource = '/' + opts.bucket + } else if (!opts.bucket && path) { + auth.resource = path + } else if (!opts.bucket && !path) { + auth.resource = '/' + } + auth.resource = aws2.canonicalizeResource(auth.resource) + self.setHeader('authorization', aws2.authorization(auth)) + } -// In browsers, all properties are enumerable. -Object.defineProperties(Body.prototype, { - body: { enumerable: true }, - bodyUsed: { enumerable: true }, - arrayBuffer: { enumerable: true }, - blob: { enumerable: true }, - json: { enumerable: true }, - text: { enumerable: true } -}); + return self +} +Request.prototype.httpSignature = function (opts) { + var self = this + httpSignature.signRequest({ + getHeader: function (header) { + return self.getHeader(header, self.headers) + }, + setHeader: function (header, value) { + self.setHeader(header, value) + }, + method: self.method, + path: self.path + }, opts) + debug('httpSignature authorization', self.getHeader('authorization')) -Body.mixIn = function (proto) { - for (const name of Object.getOwnPropertyNames(Body.prototype)) { - // istanbul ignore else: future proof - if (!(name in proto)) { - const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); - Object.defineProperty(proto, name, desc); - } - } -}; + return self +} +Request.prototype.hawk = function (opts) { + var self = this + self.setHeader('Authorization', hawk.header(self.uri, self.method, opts)) +} +Request.prototype.oauth = function (_oauth) { + var self = this -/** - * Consume and convert an entire Body to a Buffer. - * - * Ref: https://fetch.spec.whatwg.org/#concept-body-consume-body - * - * @return Promise - */ -function consumeBody() { - var _this4 = this; + self._oauth.onRequest(_oauth) - if (this[INTERNALS].disturbed) { - return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); - } + return self +} - this[INTERNALS].disturbed = true; +Request.prototype.jar = function (jar) { + var self = this + var cookies - if (this[INTERNALS].error) { - return Body.Promise.reject(this[INTERNALS].error); - } + if (self._redirect.redirectsFollowed === 0) { + self.originalCookieHeader = self.getHeader('cookie') + } - let body = this.body; + if (!jar) { + // disable cookies + cookies = false + self._disableCookies = true + } else { + var targetCookieJar = (jar && jar.getCookieString) ? jar : globalCookieJar + var urihref = self.uri.href + // fetch cookie in the Specified host + if (targetCookieJar) { + cookies = targetCookieJar.getCookieString(urihref) + } + } - // body is null - if (body === null) { - return Body.Promise.resolve(Buffer.alloc(0)); - } + // if need cookie and cookie is not empty + if (cookies && cookies.length) { + if (self.originalCookieHeader) { + // Don't overwrite existing Cookie header + self.setHeader('cookie', self.originalCookieHeader + '; ' + cookies) + } else { + self.setHeader('cookie', cookies) + } + } + self._jar = jar + return self +} - // body is blob - if (isBlob(body)) { - body = body.stream(); - } +// Stream API +Request.prototype.pipe = function (dest, opts) { + var self = this - // body is buffer - if (Buffer.isBuffer(body)) { - return Body.Promise.resolve(body); - } + if (self.response) { + if (self._destdata) { + self.emit('error', new Error('You cannot pipe after data has been emitted from the response.')) + } else if (self._ended) { + self.emit('error', new Error('You cannot pipe after the response has been ended.')) + } else { + stream.Stream.prototype.pipe.call(self, dest, opts) + self.pipeDest(dest) + return dest + } + } else { + self.dests.push(dest) + stream.Stream.prototype.pipe.call(self, dest, opts) + return dest + } +} +Request.prototype.write = function () { + var self = this + if (self._aborted) { return } - // istanbul ignore if: should never happen - if (!(body instanceof stream__WEBPACK_IMPORTED_MODULE_0__)) { - return Body.Promise.resolve(Buffer.alloc(0)); - } + if (!self._started) { + self.start() + } + if (self.req) { + return self.req.write.apply(self.req, arguments) + } +} +Request.prototype.end = function (chunk) { + var self = this + if (self._aborted) { return } - // body is stream - // get ready to actually consume the body - let accum = []; - let accumBytes = 0; - let abort = false; + if (chunk) { + self.write(chunk) + } + if (!self._started) { + self.start() + } + if (self.req) { + self.req.end() + } +} +Request.prototype.pause = function () { + var self = this + if (!self.responseContent) { + self._paused = true + } else { + self.responseContent.pause.apply(self.responseContent, arguments) + } +} +Request.prototype.resume = function () { + var self = this + if (!self.responseContent) { + self._paused = false + } else { + self.responseContent.resume.apply(self.responseContent, arguments) + } +} +Request.prototype.destroy = function () { + var self = this + if (!self._ended) { + self.end() + } else if (self.response) { + self.response.destroy() + } +} - return new Body.Promise(function (resolve, reject) { - let resTimeout; +Request.defaultProxyHeaderWhiteList = + Tunnel.defaultProxyHeaderWhiteList.slice() - // allow timeout on slow response body - if (_this4.timeout) { - resTimeout = setTimeout(function () { - abort = true; - reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, 'body-timeout')); - }, _this4.timeout); - } +Request.defaultProxyHeaderExclusiveList = + Tunnel.defaultProxyHeaderExclusiveList.slice() - // handle stream errors - body.on('error', function (err) { - if (err.name === 'AbortError') { - // if the request was aborted, reject with this Error - abort = true; - reject(err); - } else { - // other errors, such as incorrect content-encoding - reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, 'system', err)); - } - }); +// Exports - body.on('data', function (chunk) { - if (abort || chunk === null) { - return; - } +Request.prototype.toJSON = requestToJSON +module.exports = Request - if (_this4.size && accumBytes + chunk.length > _this4.size) { - abort = true; - reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, 'max-size')); - return; - } - accumBytes += chunk.length; - accum.push(chunk); - }); +/***/ }), +/* 1322 */ +/***/ (function(module, exports, __webpack_require__) { - body.on('end', function () { - if (abort) { - return; - } +"use strict"; - clearTimeout(resTimeout); - try { - resolve(Buffer.concat(accum, accumBytes)); - } catch (err) { - // handle streams that have accumulated too much data (issue #414) - reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, 'system', err)); - } - }); - }); +function formatHostname (hostname) { + // canonicalize the hostname, so that 'oogle.com' won't match 'google.com' + return hostname.replace(/^\.*/, '.').toLowerCase() } -/** - * Detect buffer encoding and convert to target encoding - * ref: http://www.w3.org/TR/2011/WD-html5-20110113/parsing.html#determining-the-character-encoding - * - * @param Buffer buffer Incoming buffer - * @param String encoding Target encoding - * @return String - */ -function convertBody(buffer, headers) { - if (typeof convert !== 'function') { - throw new Error('The package `encoding` must be installed to use the textConverted() function'); - } - - const ct = headers.get('content-type'); - let charset = 'utf-8'; - let res, str; - - // header - if (ct) { - res = /charset=([^;]*)/i.exec(ct); - } - - // no charset in content type, peek at response body for at most 1024 bytes - str = buffer.slice(0, 1024).toString(); - - // html5 - if (!res && str) { - res = /<meta.+?charset=(['"])(.+?)\1/i.exec(str); - } +function parseNoProxyZone (zone) { + zone = zone.trim().toLowerCase() - // html4 - if (!res && str) { - res = /<meta[\s]+?http-equiv=(['"])content-type\1[\s]+?content=(['"])(.+?)\2/i.exec(str); - if (!res) { - res = /<meta[\s]+?content=(['"])(.+?)\1[\s]+?http-equiv=(['"])content-type\3/i.exec(str); - if (res) { - res.pop(); // drop last quote - } - } + var zoneParts = zone.split(':', 2) + var zoneHost = formatHostname(zoneParts[0]) + var zonePort = zoneParts[1] + var hasPort = zone.indexOf(':') > -1 - if (res) { - res = /charset=(.*)/i.exec(res.pop()); - } - } + return {hostname: zoneHost, port: zonePort, hasPort: hasPort} +} - // xml - if (!res && str) { - res = /<\?xml.+?encoding=(['"])(.+?)\1/i.exec(str); - } +function uriInNoProxy (uri, noProxy) { + var port = uri.port || (uri.protocol === 'https:' ? '443' : '80') + var hostname = formatHostname(uri.hostname) + var noProxyList = noProxy.split(',') - // found charset - if (res) { - charset = res.pop(); + // iterate through the noProxyList until it finds a match. + return noProxyList.map(parseNoProxyZone).some(function (noProxyZone) { + var isMatchedAt = hostname.indexOf(noProxyZone.hostname) + var hostnameMatched = ( + isMatchedAt > -1 && + (isMatchedAt === hostname.length - noProxyZone.hostname.length) + ) - // prevent decode issues when sites use incorrect encoding - // ref: https://hsivonen.fi/encoding-menu/ - if (charset === 'gb2312' || charset === 'gbk') { - charset = 'gb18030'; - } - } + if (noProxyZone.hasPort) { + return (port === noProxyZone.port) && hostnameMatched + } - // turn raw buffers into a single utf-8 buffer - return convert(buffer, 'UTF-8', charset).toString(); + return hostnameMatched + }) } -/** - * Detect a URLSearchParams object - * ref: https://github.com/bitinn/node-fetch/issues/296#issuecomment-307598143 - * - * @param Object obj Object to detect by type or brand - * @return String - */ -function isURLSearchParams(obj) { - // Duck-typing as a necessary condition. - if (typeof obj !== 'object' || typeof obj.append !== 'function' || typeof obj.delete !== 'function' || typeof obj.get !== 'function' || typeof obj.getAll !== 'function' || typeof obj.has !== 'function' || typeof obj.set !== 'function') { - return false; - } +function getProxyFromURI (uri) { + // Decide the proper request proxy to use based on the request URI object and the + // environmental variables (NO_PROXY, HTTP_PROXY, etc.) + // respect NO_PROXY environment variables (see: http://lynx.isc.org/current/breakout/lynx_help/keystrokes/environments.html) - // Brand-checking and more duck-typing as optional condition. - return obj.constructor.name === 'URLSearchParams' || Object.prototype.toString.call(obj) === '[object URLSearchParams]' || typeof obj.sort === 'function'; -} + var noProxy = process.env.NO_PROXY || process.env.no_proxy || '' -/** - * Check if `obj` is a W3C `Blob` object (which `File` inherits from) - * @param {*} obj - * @return {boolean} - */ -function isBlob(obj) { - return typeof obj === 'object' && typeof obj.arrayBuffer === 'function' && typeof obj.type === 'string' && typeof obj.stream === 'function' && typeof obj.constructor === 'function' && typeof obj.constructor.name === 'string' && /^(Blob|File)$/.test(obj.constructor.name) && /^(Blob|File)$/.test(obj[Symbol.toStringTag]); -} + // if the noProxy is a wildcard then return null -/** - * Clone body given Res/Req instance - * - * @param Mixed instance Response or Request instance - * @return Mixed - */ -function clone(instance) { - let p1, p2; - let body = instance.body; + if (noProxy === '*') { + return null + } - // don't allow cloning a used body - if (instance.bodyUsed) { - throw new Error('cannot clone body after it is used'); - } + // if the noProxy is not empty and the uri is found return null - // check that body is a stream and not form-data object - // note: we can't clone the form-data object without having it as a dependency - if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__ && typeof body.getBoundary !== 'function') { - // tee instance body - p1 = new PassThrough(); - p2 = new PassThrough(); - body.pipe(p1); - body.pipe(p2); - // set instance body to teed body and return the other teed body - instance[INTERNALS].body = p1; - body = p2; - } + if (noProxy !== '' && uriInNoProxy(uri, noProxy)) { + return null + } - return body; -} + // Check for HTTP or HTTPS Proxy in environment Else default to null -/** - * Performs the operation "extract a `Content-Type` value from |object|" as - * specified in the specification: - * https://fetch.spec.whatwg.org/#concept-bodyinit-extract - * - * This function assumes that instance.body is present. - * - * @param Mixed instance Any options.body input - */ -function extractContentType(body) { - if (body === null) { - // body is null - return null; - } else if (typeof body === 'string') { - // body is string - return 'text/plain;charset=UTF-8'; - } else if (isURLSearchParams(body)) { - // body is a URLSearchParams - return 'application/x-www-form-urlencoded;charset=UTF-8'; - } else if (isBlob(body)) { - // body is blob - return body.type || null; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return null; - } else if (Object.prototype.toString.call(body) === '[object ArrayBuffer]') { - // body is ArrayBuffer - return null; - } else if (ArrayBuffer.isView(body)) { - // body is ArrayBufferView - return null; - } else if (typeof body.getBoundary === 'function') { - // detect form data input from form-data module - return `multipart/form-data;boundary=${body.getBoundary()}`; - } else if (body instanceof stream__WEBPACK_IMPORTED_MODULE_0__) { - // body is stream - // can't really do much about this - return null; - } else { - // Body constructor defaults other things to string - return 'text/plain;charset=UTF-8'; - } -} + if (uri.protocol === 'http:') { + return process.env.HTTP_PROXY || + process.env.http_proxy || null + } -/** - * The Fetch Standard treats this as if "total bytes" is a property on the body. - * For us, we have to explicitly get it with a function. - * - * ref: https://fetch.spec.whatwg.org/#concept-body-total-bytes - * - * @param Body instance Instance of Body - * @return Number? Number of bytes, or null if not possible - */ -function getTotalBytes(instance) { - const body = instance.body; + if (uri.protocol === 'https:') { + return process.env.HTTPS_PROXY || + process.env.https_proxy || + process.env.HTTP_PROXY || + process.env.http_proxy || null + } + // if none of that works, return null + // (What uri protocol are you using then?) - if (body === null) { - // body is null - return 0; - } else if (isBlob(body)) { - return body.size; - } else if (Buffer.isBuffer(body)) { - // body is buffer - return body.length; - } else if (body && typeof body.getLengthSync === 'function') { - // detect form data input from form-data module - if (body._lengthRetrievers && body._lengthRetrievers.length == 0 || // 1.x - body.hasKnownLength && body.hasKnownLength()) { - // 2.x - return body.getLengthSync(); - } - return null; - } else { - // body is stream - return null; - } + return null } -/** - * Write a Body to a Node.js WritableStream (e.g. http.Request) object. - * - * @param Body instance Instance of Body - * @return Void - */ -function writeToStream(dest, instance) { - const body = instance.body; +module.exports = getProxyFromURI - if (body === null) { - // body is null - dest.end(); - } else if (isBlob(body)) { - body.stream().pipe(dest); - } else if (Buffer.isBuffer(body)) { - // body is buffer - dest.write(body); - dest.end(); - } else { - // body is stream - body.pipe(dest); - } +/***/ }), +/* 1323 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var qs = __webpack_require__(1324) +var querystring = __webpack_require__(104) + +function Querystring (request) { + this.request = request + this.lib = null + this.useQuerystring = null + this.parseOptions = null + this.stringifyOptions = null } -// expose Promise -Body.Promise = global.Promise; +Querystring.prototype.init = function (options) { + if (this.lib) { return } -/** - * headers.js - * - * Headers class offers convenient helpers - */ + this.useQuerystring = options.useQuerystring + this.lib = (this.useQuerystring ? querystring : qs) -const invalidTokenRegex = /[^\^_`a-zA-Z\-0-9!#$%&'*+.|~]/; -const invalidHeaderCharRegex = /[^\t\x20-\x7e\x80-\xff]/; + this.parseOptions = options.qsParseOptions || {} + this.stringifyOptions = options.qsStringifyOptions || {} +} -function validateName(name) { - name = `${name}`; - if (invalidTokenRegex.test(name) || name === '') { - throw new TypeError(`${name} is not a legal HTTP header name`); - } +Querystring.prototype.stringify = function (obj) { + return (this.useQuerystring) + ? this.rfc3986(this.lib.stringify(obj, + this.stringifyOptions.sep || null, + this.stringifyOptions.eq || null, + this.stringifyOptions)) + : this.lib.stringify(obj, this.stringifyOptions) } -function validateValue(value) { - value = `${value}`; - if (invalidHeaderCharRegex.test(value)) { - throw new TypeError(`${value} is not a legal HTTP header value`); - } +Querystring.prototype.parse = function (str) { + return (this.useQuerystring) + ? this.lib.parse(str, + this.parseOptions.sep || null, + this.parseOptions.eq || null, + this.parseOptions) + : this.lib.parse(str, this.parseOptions) } -/** - * Find the key in the map object given a header name. - * - * Returns undefined if not found. - * - * @param String name Header name - * @return String|Undefined - */ -function find(map, name) { - name = name.toLowerCase(); - for (const key in map) { - if (key.toLowerCase() === name) { - return key; - } - } - return undefined; +Querystring.prototype.rfc3986 = function (str) { + return str.replace(/[!'()*]/g, function (c) { + return '%' + c.charCodeAt(0).toString(16).toUpperCase() + }) } -const MAP = Symbol('map'); -class Headers { - /** - * Headers class - * - * @param Object headers Response headers - * @return Void - */ - constructor() { - let init = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : undefined; +Querystring.prototype.unescape = querystring.unescape - this[MAP] = Object.create(null); +exports.Querystring = Querystring - if (init instanceof Headers) { - const rawHeaders = init.raw(); - const headerNames = Object.keys(rawHeaders); - for (const headerName of headerNames) { - for (const value of rawHeaders[headerName]) { - this.append(headerName, value); - } - } +/***/ }), +/* 1324 */ +/***/ (function(module, exports, __webpack_require__) { - return; - } +"use strict"; - // We don't worry about converting prop to ByteString here as append() - // will handle it. - if (init == null) ; else if (typeof init === 'object') { - const method = init[Symbol.iterator]; - if (method != null) { - if (typeof method !== 'function') { - throw new TypeError('Header pairs must be iterable'); - } - // sequence<sequence<ByteString>> - // Note: per spec we have to first exhaust the lists then process them - const pairs = []; - for (const pair of init) { - if (typeof pair !== 'object' || typeof pair[Symbol.iterator] !== 'function') { - throw new TypeError('Each header pair must be iterable'); - } - pairs.push(Array.from(pair)); - } +var stringify = __webpack_require__(1325); +var parse = __webpack_require__(1328); +var formats = __webpack_require__(1327); - for (const pair of pairs) { - if (pair.length !== 2) { - throw new TypeError('Each header pair must be a name/value tuple'); - } - this.append(pair[0], pair[1]); - } - } else { - // record<ByteString, ByteString> - for (const key of Object.keys(init)) { - const value = init[key]; - this.append(key, value); - } - } - } else { - throw new TypeError('Provided initializer must be an object'); - } - } +module.exports = { + formats: formats, + parse: parse, + stringify: stringify +}; - /** - * Return combined header value given name - * - * @param String name Header name - * @return Mixed - */ - get(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key === undefined) { - return null; - } - return this[MAP][key].join(', '); - } +/***/ }), +/* 1325 */ +/***/ (function(module, exports, __webpack_require__) { - /** - * Iterate over all headers - * - * @param Function callback Executed for each item with parameters (value, name, thisArg) - * @param Boolean thisArg `this` context for callback function - * @return Void - */ - forEach(callback) { - let thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined; +"use strict"; - let pairs = getHeaders(this); - let i = 0; - while (i < pairs.length) { - var _pairs$i = pairs[i]; - const name = _pairs$i[0], - value = _pairs$i[1]; - callback.call(thisArg, value, name, this); - pairs = getHeaders(this); - i++; - } - } +var utils = __webpack_require__(1326); +var formats = __webpack_require__(1327); - /** - * Overwrite header values given name - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - set(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - this[MAP][key !== undefined ? key : name] = [value]; - } +var arrayPrefixGenerators = { + brackets: function brackets(prefix) { // eslint-disable-line func-name-matching + return prefix + '[]'; + }, + indices: function indices(prefix, key) { // eslint-disable-line func-name-matching + return prefix + '[' + key + ']'; + }, + repeat: function repeat(prefix) { // eslint-disable-line func-name-matching + return prefix; + } +}; - /** - * Append a value onto existing header - * - * @param String name Header name - * @param String value Header value - * @return Void - */ - append(name, value) { - name = `${name}`; - value = `${value}`; - validateName(name); - validateValue(value); - const key = find(this[MAP], name); - if (key !== undefined) { - this[MAP][key].push(value); - } else { - this[MAP][name] = [value]; - } - } +var toISO = Date.prototype.toISOString; - /** - * Check for header name existence - * - * @param String name Header name - * @return Boolean - */ - has(name) { - name = `${name}`; - validateName(name); - return find(this[MAP], name) !== undefined; - } +var defaults = { + delimiter: '&', + encode: true, + encoder: utils.encode, + encodeValuesOnly: false, + serializeDate: function serializeDate(date) { // eslint-disable-line func-name-matching + return toISO.call(date); + }, + skipNulls: false, + strictNullHandling: false +}; - /** - * Delete all header values given name - * - * @param String name Header name - * @return Void - */ - delete(name) { - name = `${name}`; - validateName(name); - const key = find(this[MAP], name); - if (key !== undefined) { - delete this[MAP][key]; - } - } +var stringify = function stringify( // eslint-disable-line func-name-matching + object, + prefix, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly +) { + var obj = object; + if (typeof filter === 'function') { + obj = filter(prefix, obj); + } else if (obj instanceof Date) { + obj = serializeDate(obj); + } else if (obj === null) { + if (strictNullHandling) { + return encoder && !encodeValuesOnly ? encoder(prefix, defaults.encoder) : prefix; + } - /** - * Return raw headers (non-spec api) - * - * @return Object - */ - raw() { - return this[MAP]; - } + obj = ''; + } - /** - * Get an iterator on keys. - * - * @return Iterator - */ - keys() { - return createHeadersIterator(this, 'key'); - } + if (typeof obj === 'string' || typeof obj === 'number' || typeof obj === 'boolean' || utils.isBuffer(obj)) { + if (encoder) { + var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults.encoder); + return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder))]; + } + return [formatter(prefix) + '=' + formatter(String(obj))]; + } - /** - * Get an iterator on values. - * - * @return Iterator - */ - values() { - return createHeadersIterator(this, 'value'); - } + var values = []; - /** - * Get an iterator on entries. - * - * This is the default iterator of the Headers object. - * - * @return Iterator - */ - [Symbol.iterator]() { - return createHeadersIterator(this, 'key+value'); - } -} -Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + if (typeof obj === 'undefined') { + return values; + } -Object.defineProperty(Headers.prototype, Symbol.toStringTag, { - value: 'Headers', - writable: false, - enumerable: false, - configurable: true -}); + var objKeys; + if (Array.isArray(filter)) { + objKeys = filter; + } else { + var keys = Object.keys(obj); + objKeys = sort ? keys.sort(sort) : keys; + } -Object.defineProperties(Headers.prototype, { - get: { enumerable: true }, - forEach: { enumerable: true }, - set: { enumerable: true }, - append: { enumerable: true }, - has: { enumerable: true }, - delete: { enumerable: true }, - keys: { enumerable: true }, - values: { enumerable: true }, - entries: { enumerable: true } -}); + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; -function getHeaders(headers) { - let kind = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'key+value'; + if (skipNulls && obj[key] === null) { + continue; + } - const keys = Object.keys(headers[MAP]).sort(); - return keys.map(kind === 'key' ? function (k) { - return k.toLowerCase(); - } : kind === 'value' ? function (k) { - return headers[MAP][k].join(', '); - } : function (k) { - return [k.toLowerCase(), headers[MAP][k].join(', ')]; - }); -} + if (Array.isArray(obj)) { + values = values.concat(stringify( + obj[key], + generateArrayPrefix(prefix, key), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } else { + values = values.concat(stringify( + obj[key], + prefix + (allowDots ? '.' + key : '[' + key + ']'), + generateArrayPrefix, + strictNullHandling, + skipNulls, + encoder, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } + } -const INTERNAL = Symbol('internal'); + return values; +}; -function createHeadersIterator(target, kind) { - const iterator = Object.create(HeadersIteratorPrototype); - iterator[INTERNAL] = { - target, - kind, - index: 0 - }; - return iterator; -} +module.exports = function (object, opts) { + var obj = object; + var options = opts ? utils.assign({}, opts) : {}; -const HeadersIteratorPrototype = Object.setPrototypeOf({ - next() { - // istanbul ignore if - if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { - throw new TypeError('Value of `this` is not a HeadersIterator'); - } + if (options.encoder !== null && options.encoder !== undefined && typeof options.encoder !== 'function') { + throw new TypeError('Encoder has to be a function.'); + } - var _INTERNAL = this[INTERNAL]; - const target = _INTERNAL.target, - kind = _INTERNAL.kind, - index = _INTERNAL.index; + var delimiter = typeof options.delimiter === 'undefined' ? defaults.delimiter : options.delimiter; + var strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; + var skipNulls = typeof options.skipNulls === 'boolean' ? options.skipNulls : defaults.skipNulls; + var encode = typeof options.encode === 'boolean' ? options.encode : defaults.encode; + var encoder = typeof options.encoder === 'function' ? options.encoder : defaults.encoder; + var sort = typeof options.sort === 'function' ? options.sort : null; + var allowDots = typeof options.allowDots === 'undefined' ? false : options.allowDots; + var serializeDate = typeof options.serializeDate === 'function' ? options.serializeDate : defaults.serializeDate; + var encodeValuesOnly = typeof options.encodeValuesOnly === 'boolean' ? options.encodeValuesOnly : defaults.encodeValuesOnly; + if (typeof options.format === 'undefined') { + options.format = formats['default']; + } else if (!Object.prototype.hasOwnProperty.call(formats.formatters, options.format)) { + throw new TypeError('Unknown format option provided.'); + } + var formatter = formats.formatters[options.format]; + var objKeys; + var filter; - const values = getHeaders(target, kind); - const len = values.length; - if (index >= len) { - return { - value: undefined, - done: true - }; - } + if (typeof options.filter === 'function') { + filter = options.filter; + obj = filter('', obj); + } else if (Array.isArray(options.filter)) { + filter = options.filter; + objKeys = filter; + } - this[INTERNAL].index = index + 1; + var keys = []; - return { - value: values[index], - done: false - }; - } -}, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + if (typeof obj !== 'object' || obj === null) { + return ''; + } -Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { - value: 'HeadersIterator', - writable: false, - enumerable: false, - configurable: true -}); + var arrayFormat; + if (options.arrayFormat in arrayPrefixGenerators) { + arrayFormat = options.arrayFormat; + } else if ('indices' in options) { + arrayFormat = options.indices ? 'indices' : 'repeat'; + } else { + arrayFormat = 'indices'; + } -/** - * Export the Headers object in a form that Node.js can consume. - * - * @param Headers headers - * @return Object - */ -function exportNodeCompatibleHeaders(headers) { - const obj = Object.assign({ __proto__: null }, headers[MAP]); + var generateArrayPrefix = arrayPrefixGenerators[arrayFormat]; - // http.request() only supports string as Host header. This hack makes - // specifying custom Host header possible. - const hostHeaderKey = find(headers[MAP], 'Host'); - if (hostHeaderKey !== undefined) { - obj[hostHeaderKey] = obj[hostHeaderKey][0]; - } + if (!objKeys) { + objKeys = Object.keys(obj); + } - return obj; -} + if (sort) { + objKeys.sort(sort); + } -/** - * Create a Headers object from an object of headers, ignoring those that do - * not conform to HTTP grammar productions. - * - * @param Object obj Object of headers - * @return Headers - */ -function createHeadersLenient(obj) { - const headers = new Headers(); - for (const name of Object.keys(obj)) { - if (invalidTokenRegex.test(name)) { - continue; - } - if (Array.isArray(obj[name])) { - for (const val of obj[name]) { - if (invalidHeaderCharRegex.test(val)) { - continue; - } - if (headers[MAP][name] === undefined) { - headers[MAP][name] = [val]; - } else { - headers[MAP][name].push(val); - } - } - } else if (!invalidHeaderCharRegex.test(obj[name])) { - headers[MAP][name] = [obj[name]]; - } - } - return headers; -} + for (var i = 0; i < objKeys.length; ++i) { + var key = objKeys[i]; -const INTERNALS$1 = Symbol('Response internals'); + if (skipNulls && obj[key] === null) { + continue; + } -// fix an issue where "STATUS_CODES" aren't a named export for node <10 -const STATUS_CODES = http__WEBPACK_IMPORTED_MODULE_1__.STATUS_CODES; + keys = keys.concat(stringify( + obj[key], + key, + generateArrayPrefix, + strictNullHandling, + skipNulls, + encode ? encoder : null, + filter, + sort, + allowDots, + serializeDate, + formatter, + encodeValuesOnly + )); + } -/** - * Response class - * - * @param Stream body Readable stream - * @param Object opts Response options - * @return Void - */ -class Response { - constructor() { - let body = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null; - let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var joined = keys.join(delimiter); + var prefix = options.addQueryPrefix === true ? '?' : ''; - Body.call(this, body, opts); + return joined.length > 0 ? prefix + joined : ''; +}; - const status = opts.status || 200; - const headers = new Headers(opts.headers); - if (body != null && !headers.has('Content-Type')) { - const contentType = extractContentType(body); - if (contentType) { - headers.append('Content-Type', contentType); - } - } +/***/ }), +/* 1326 */ +/***/ (function(module, exports, __webpack_require__) { - this[INTERNALS$1] = { - url: opts.url, - status, - statusText: opts.statusText || STATUS_CODES[status], - headers, - counter: opts.counter - }; - } +"use strict"; - get url() { - return this[INTERNALS$1].url || ''; - } - get status() { - return this[INTERNALS$1].status; - } +var has = Object.prototype.hasOwnProperty; - /** - * Convenience property representing if the request ended normally - */ - get ok() { - return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; - } +var hexTable = (function () { + var array = []; + for (var i = 0; i < 256; ++i) { + array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase()); + } - get redirected() { - return this[INTERNALS$1].counter > 0; - } + return array; +}()); - get statusText() { - return this[INTERNALS$1].statusText; - } +var compactQueue = function compactQueue(queue) { + var obj; - get headers() { - return this[INTERNALS$1].headers; - } + while (queue.length) { + var item = queue.pop(); + obj = item.obj[item.prop]; - /** - * Clone this response - * - * @return Response - */ - clone() { - return new Response(clone(this), { - url: this.url, - status: this.status, - statusText: this.statusText, - headers: this.headers, - ok: this.ok, - redirected: this.redirected - }); - } -} + if (Array.isArray(obj)) { + var compacted = []; -Body.mixIn(Response.prototype); + for (var j = 0; j < obj.length; ++j) { + if (typeof obj[j] !== 'undefined') { + compacted.push(obj[j]); + } + } -Object.defineProperties(Response.prototype, { - url: { enumerable: true }, - status: { enumerable: true }, - ok: { enumerable: true }, - redirected: { enumerable: true }, - statusText: { enumerable: true }, - headers: { enumerable: true }, - clone: { enumerable: true } -}); + item.obj[item.prop] = compacted; + } + } -Object.defineProperty(Response.prototype, Symbol.toStringTag, { - value: 'Response', - writable: false, - enumerable: false, - configurable: true -}); + return obj; +}; -const INTERNALS$2 = Symbol('Request internals'); -const URL = url__WEBPACK_IMPORTED_MODULE_2__.URL || whatwg_url__WEBPACK_IMPORTED_MODULE_3__.URL; +var arrayToObject = function arrayToObject(source, options) { + var obj = options && options.plainObjects ? Object.create(null) : {}; + for (var i = 0; i < source.length; ++i) { + if (typeof source[i] !== 'undefined') { + obj[i] = source[i]; + } + } -// fix an issue where "format", "parse" aren't a named export for node <10 -const parse_url = url__WEBPACK_IMPORTED_MODULE_2__.parse; -const format_url = url__WEBPACK_IMPORTED_MODULE_2__.format; + return obj; +}; -/** - * Wrapper around `new URL` to handle arbitrary URLs - * - * @param {string} urlStr - * @return {void} - */ -function parseURL(urlStr) { - /* - Check whether the URL is absolute or not - Scheme: https://tools.ietf.org/html/rfc3986#section-3.1 - Absolute URL: https://tools.ietf.org/html/rfc3986#section-4.3 - */ - if (/^[a-zA-Z][a-zA-Z\d+\-.]*:/.exec(urlStr)) { - urlStr = new URL(urlStr).toString(); - } +var merge = function merge(target, source, options) { + if (!source) { + return target; + } - // Fallback to old implementation for arbitrary URLs - return parse_url(urlStr); -} + if (typeof source !== 'object') { + if (Array.isArray(target)) { + target.push(source); + } else if (typeof target === 'object') { + if (options.plainObjects || options.allowPrototypes || !has.call(Object.prototype, source)) { + target[source] = true; + } + } else { + return [target, source]; + } -const streamDestructionSupported = 'destroy' in stream__WEBPACK_IMPORTED_MODULE_0__.Readable.prototype; + return target; + } -/** - * Check if a value is an instance of Request. - * - * @param Mixed input - * @return Boolean - */ -function isRequest(input) { - return typeof input === 'object' && typeof input[INTERNALS$2] === 'object'; -} + if (typeof target !== 'object') { + return [target].concat(source); + } -function isAbortSignal(signal) { - const proto = signal && typeof signal === 'object' && Object.getPrototypeOf(signal); - return !!(proto && proto.constructor.name === 'AbortSignal'); -} + var mergeTarget = target; + if (Array.isArray(target) && !Array.isArray(source)) { + mergeTarget = arrayToObject(target, options); + } -/** - * Request class - * - * @param Mixed input Url or Request instance - * @param Object init Custom options - * @return Void - */ -class Request { - constructor(input) { - let init = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + if (Array.isArray(target) && Array.isArray(source)) { + source.forEach(function (item, i) { + if (has.call(target, i)) { + if (target[i] && typeof target[i] === 'object') { + target[i] = merge(target[i], item, options); + } else { + target.push(item); + } + } else { + target[i] = item; + } + }); + return target; + } - let parsedURL; + return Object.keys(source).reduce(function (acc, key) { + var value = source[key]; - // normalize input - if (!isRequest(input)) { - if (input && input.href) { - // in order to support Node.js' Url objects; though WHATWG's URL objects - // will fall into this branch also (since their `toString()` will return - // `href` property anyway) - parsedURL = parseURL(input.href); - } else { - // coerce input to a string before attempting to parse - parsedURL = parseURL(`${input}`); - } - input = {}; - } else { - parsedURL = parseURL(input.url); - } + if (has.call(acc, key)) { + acc[key] = merge(acc[key], value, options); + } else { + acc[key] = value; + } + return acc; + }, mergeTarget); +}; - let method = init.method || input.method || 'GET'; - method = method.toUpperCase(); +var assign = function assignSingleSource(target, source) { + return Object.keys(source).reduce(function (acc, key) { + acc[key] = source[key]; + return acc; + }, target); +}; - if ((init.body != null || isRequest(input) && input.body !== null) && (method === 'GET' || method === 'HEAD')) { - throw new TypeError('Request with GET/HEAD method cannot have body'); - } +var decode = function (str) { + try { + return decodeURIComponent(str.replace(/\+/g, ' ')); + } catch (e) { + return str; + } +}; - let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; +var encode = function encode(str) { + // This code was originally written by Brian White (mscdex) for the io.js core querystring library. + // It has been adapted here for stricter adherence to RFC 3986 + if (str.length === 0) { + return str; + } - Body.call(this, inputBody, { - timeout: init.timeout || input.timeout || 0, - size: init.size || input.size || 0 - }); + var string = typeof str === 'string' ? str : String(str); - const headers = new Headers(init.headers || input.headers || {}); + var out = ''; + for (var i = 0; i < string.length; ++i) { + var c = string.charCodeAt(i); - if (inputBody != null && !headers.has('Content-Type')) { - const contentType = extractContentType(inputBody); - if (contentType) { - headers.append('Content-Type', contentType); - } - } + if ( + c === 0x2D // - + || c === 0x2E // . + || c === 0x5F // _ + || c === 0x7E // ~ + || (c >= 0x30 && c <= 0x39) // 0-9 + || (c >= 0x41 && c <= 0x5A) // a-z + || (c >= 0x61 && c <= 0x7A) // A-Z + ) { + out += string.charAt(i); + continue; + } - let signal = isRequest(input) ? input.signal : null; - if ('signal' in init) signal = init.signal; + if (c < 0x80) { + out = out + hexTable[c]; + continue; + } - if (signal != null && !isAbortSignal(signal)) { - throw new TypeError('Expected signal to be an instanceof AbortSignal'); - } + if (c < 0x800) { + out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } - this[INTERNALS$2] = { - method, - redirect: init.redirect || input.redirect || 'follow', - headers, - parsedURL, - signal - }; + if (c < 0xD800 || c >= 0xE000) { + out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]); + continue; + } - // node-fetch-only options - this.follow = init.follow !== undefined ? init.follow : input.follow !== undefined ? input.follow : 20; - this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true; - this.counter = init.counter || input.counter || 0; - this.agent = init.agent || input.agent; - } + i += 1; + c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF)); + out += hexTable[0xF0 | (c >> 18)] + + hexTable[0x80 | ((c >> 12) & 0x3F)] + + hexTable[0x80 | ((c >> 6) & 0x3F)] + + hexTable[0x80 | (c & 0x3F)]; + } + + return out; +}; + +var compact = function compact(value) { + var queue = [{ obj: { o: value }, prop: 'o' }]; + var refs = []; + + for (var i = 0; i < queue.length; ++i) { + var item = queue[i]; + var obj = item.obj[item.prop]; + + var keys = Object.keys(obj); + for (var j = 0; j < keys.length; ++j) { + var key = keys[j]; + var val = obj[key]; + if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) { + queue.push({ obj: obj, prop: key }); + refs.push(val); + } + } + } + + return compactQueue(queue); +}; + +var isRegExp = function isRegExp(obj) { + return Object.prototype.toString.call(obj) === '[object RegExp]'; +}; + +var isBuffer = function isBuffer(obj) { + if (obj === null || typeof obj === 'undefined') { + return false; + } + + return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj)); +}; + +module.exports = { + arrayToObject: arrayToObject, + assign: assign, + compact: compact, + decode: decode, + encode: encode, + isBuffer: isBuffer, + isRegExp: isRegExp, + merge: merge +}; + + +/***/ }), +/* 1327 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var replace = String.prototype.replace; +var percentTwenties = /%20/g; + +module.exports = { + 'default': 'RFC3986', + formatters: { + RFC1738: function (value) { + return replace.call(value, percentTwenties, '+'); + }, + RFC3986: function (value) { + return value; + } + }, + RFC1738: 'RFC1738', + RFC3986: 'RFC3986' +}; + + +/***/ }), +/* 1328 */ +/***/ (function(module, exports, __webpack_require__) { + +"use strict"; + + +var utils = __webpack_require__(1326); + +var has = Object.prototype.hasOwnProperty; + +var defaults = { + allowDots: false, + allowPrototypes: false, + arrayLimit: 20, + decoder: utils.decode, + delimiter: '&', + depth: 5, + parameterLimit: 1000, + plainObjects: false, + strictNullHandling: false +}; + +var parseValues = function parseQueryStringValues(str, options) { + var obj = {}; + var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str; + var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit; + var parts = cleanStr.split(options.delimiter, limit); - get method() { - return this[INTERNALS$2].method; - } + for (var i = 0; i < parts.length; ++i) { + var part = parts[i]; - get url() { - return format_url(this[INTERNALS$2].parsedURL); - } + var bracketEqualsPos = part.indexOf(']='); + var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1; - get headers() { - return this[INTERNALS$2].headers; - } + var key, val; + if (pos === -1) { + key = options.decoder(part, defaults.decoder); + val = options.strictNullHandling ? null : ''; + } else { + key = options.decoder(part.slice(0, pos), defaults.decoder); + val = options.decoder(part.slice(pos + 1), defaults.decoder); + } + if (has.call(obj, key)) { + obj[key] = [].concat(obj[key]).concat(val); + } else { + obj[key] = val; + } + } - get redirect() { - return this[INTERNALS$2].redirect; - } + return obj; +}; - get signal() { - return this[INTERNALS$2].signal; - } +var parseObject = function (chain, val, options) { + var leaf = val; - /** - * Clone this request - * - * @return Request - */ - clone() { - return new Request(this); - } -} + for (var i = chain.length - 1; i >= 0; --i) { + var obj; + var root = chain[i]; -Body.mixIn(Request.prototype); + if (root === '[]') { + obj = []; + obj = obj.concat(leaf); + } else { + obj = options.plainObjects ? Object.create(null) : {}; + var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root; + var index = parseInt(cleanRoot, 10); + if ( + !isNaN(index) + && root !== cleanRoot + && String(index) === cleanRoot + && index >= 0 + && (options.parseArrays && index <= options.arrayLimit) + ) { + obj = []; + obj[index] = leaf; + } else { + obj[cleanRoot] = leaf; + } + } -Object.defineProperty(Request.prototype, Symbol.toStringTag, { - value: 'Request', - writable: false, - enumerable: false, - configurable: true -}); + leaf = obj; + } -Object.defineProperties(Request.prototype, { - method: { enumerable: true }, - url: { enumerable: true }, - headers: { enumerable: true }, - redirect: { enumerable: true }, - clone: { enumerable: true }, - signal: { enumerable: true } -}); + return leaf; +}; -/** - * Convert a Request to Node.js http request options. - * - * @param Request A Request instance - * @return Object The options object to be passed to http.request - */ -function getNodeRequestOptions(request) { - const parsedURL = request[INTERNALS$2].parsedURL; - const headers = new Headers(request[INTERNALS$2].headers); +var parseKeys = function parseQueryStringKeys(givenKey, val, options) { + if (!givenKey) { + return; + } - // fetch step 1.3 - if (!headers.has('Accept')) { - headers.set('Accept', '*/*'); - } + // Transform dot notation to bracket notation + var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey; - // Basic fetch - if (!parsedURL.protocol || !parsedURL.hostname) { - throw new TypeError('Only absolute URLs are supported'); - } + // The regex chunks - if (!/^https?:$/.test(parsedURL.protocol)) { - throw new TypeError('Only HTTP(S) protocols are supported'); - } + var brackets = /(\[[^[\]]*])/; + var child = /(\[[^[\]]*])/g; - if (request.signal && request.body instanceof stream__WEBPACK_IMPORTED_MODULE_0__.Readable && !streamDestructionSupported) { - throw new Error('Cancellation of streamed requests with AbortSignal is not supported in node < 8'); - } + // Get the parent - // HTTP-network-or-cache fetch steps 2.4-2.7 - let contentLengthValue = null; - if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { - contentLengthValue = '0'; - } - if (request.body != null) { - const totalBytes = getTotalBytes(request); - if (typeof totalBytes === 'number') { - contentLengthValue = String(totalBytes); - } - } - if (contentLengthValue) { - headers.set('Content-Length', contentLengthValue); - } + var segment = brackets.exec(key); + var parent = segment ? key.slice(0, segment.index) : key; - // HTTP-network-or-cache fetch step 2.11 - if (!headers.has('User-Agent')) { - headers.set('User-Agent', 'node-fetch/1.0 (+https://github.com/bitinn/node-fetch)'); - } + // Stash the parent if it exists - // HTTP-network-or-cache fetch step 2.15 - if (request.compress && !headers.has('Accept-Encoding')) { - headers.set('Accept-Encoding', 'gzip,deflate'); - } + var keys = []; + if (parent) { + // If we aren't using plain objects, optionally prefix keys + // that would overwrite object prototype properties + if (!options.plainObjects && has.call(Object.prototype, parent)) { + if (!options.allowPrototypes) { + return; + } + } - let agent = request.agent; - if (typeof agent === 'function') { - agent = agent(parsedURL); - } + keys.push(parent); + } - if (!headers.has('Connection') && !agent) { - headers.set('Connection', 'close'); - } + // Loop through children appending to the array until we hit depth - // HTTP-network fetch step 4.2 - // chunked encoding is handled by Node.js + var i = 0; + while ((segment = child.exec(key)) !== null && i < options.depth) { + i += 1; + if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) { + if (!options.allowPrototypes) { + return; + } + } + keys.push(segment[1]); + } - return Object.assign({}, parsedURL, { - method: request.method, - headers: exportNodeCompatibleHeaders(headers), - agent - }); -} + // If there's a remainder, just add whatever is left -/** - * abort-error.js - * - * AbortError interface for cancelled requests - */ + if (segment) { + keys.push('[' + key.slice(segment.index) + ']'); + } -/** - * Create AbortError instance - * - * @param String message Error message for human - * @return AbortError - */ -function AbortError(message) { - Error.call(this, message); + return parseObject(keys, val, options); +}; - this.type = 'aborted'; - this.message = message; +module.exports = function (str, opts) { + var options = opts ? utils.assign({}, opts) : {}; - // hide custom error implementation details from end-users - Error.captureStackTrace(this, this.constructor); -} + if (options.decoder !== null && options.decoder !== undefined && typeof options.decoder !== 'function') { + throw new TypeError('Decoder has to be a function.'); + } -AbortError.prototype = Object.create(Error.prototype); -AbortError.prototype.constructor = AbortError; -AbortError.prototype.name = 'AbortError'; + options.ignoreQueryPrefix = options.ignoreQueryPrefix === true; + options.delimiter = typeof options.delimiter === 'string' || utils.isRegExp(options.delimiter) ? options.delimiter : defaults.delimiter; + options.depth = typeof options.depth === 'number' ? options.depth : defaults.depth; + options.arrayLimit = typeof options.arrayLimit === 'number' ? options.arrayLimit : defaults.arrayLimit; + options.parseArrays = options.parseArrays !== false; + options.decoder = typeof options.decoder === 'function' ? options.decoder : defaults.decoder; + options.allowDots = typeof options.allowDots === 'boolean' ? options.allowDots : defaults.allowDots; + options.plainObjects = typeof options.plainObjects === 'boolean' ? options.plainObjects : defaults.plainObjects; + options.allowPrototypes = typeof options.allowPrototypes === 'boolean' ? options.allowPrototypes : defaults.allowPrototypes; + options.parameterLimit = typeof options.parameterLimit === 'number' ? options.parameterLimit : defaults.parameterLimit; + options.strictNullHandling = typeof options.strictNullHandling === 'boolean' ? options.strictNullHandling : defaults.strictNullHandling; -const URL$1 = url__WEBPACK_IMPORTED_MODULE_2__.URL || whatwg_url__WEBPACK_IMPORTED_MODULE_3__.URL; + if (str === '' || str === null || typeof str === 'undefined') { + return options.plainObjects ? Object.create(null) : {}; + } -// fix an issue where "PassThrough", "resolve" aren't a named export for node <10 -const PassThrough$1 = stream__WEBPACK_IMPORTED_MODULE_0__.PassThrough; + var tempObj = typeof str === 'string' ? parseValues(str, options) : str; + var obj = options.plainObjects ? Object.create(null) : {}; + + // Iterate over the keys and setup the new object -const isDomainOrSubdomain = function isDomainOrSubdomain(destination, original) { - const orig = new URL$1(original).hostname; - const dest = new URL$1(destination).hostname; + var keys = Object.keys(tempObj); + for (var i = 0; i < keys.length; ++i) { + var key = keys[i]; + var newObj = parseKeys(key, tempObj[key], options); + obj = utils.merge(obj, newObj, options); + } - return orig === dest || orig[orig.length - dest.length - 1] === '.' && orig.endsWith(dest); + return utils.compact(obj); }; -/** - * Fetch function - * - * @param Mixed url Absolute url or Request instance - * @param Object opts Fetch options - * @return Promise - */ -function fetch(url, opts) { - // allow custom promise - if (!fetch.Promise) { - throw new Error('native promise missing, set fetch.Promise to your favorite alternative'); - } +/***/ }), +/* 1329 */ +/***/ (function(module, exports, __webpack_require__) { - Body.Promise = fetch.Promise; +"use strict"; - // wrap http.request into fetch - return new fetch.Promise(function (resolve, reject) { - // build request object - const request = new Request(url, opts); - const options = getNodeRequestOptions(request); - const send = (options.protocol === 'https:' ? https__WEBPACK_IMPORTED_MODULE_4__ : http__WEBPACK_IMPORTED_MODULE_1__).request; - const signal = request.signal; +var fs = __webpack_require__(167) +var qs = __webpack_require__(104) +var validate = __webpack_require__(192) +var extend = __webpack_require__(79) - let response = null; +function Har (request) { + this.request = request +} - const abort = function abort() { - let error = new AbortError('The user aborted a request.'); - reject(error); - if (request.body && request.body instanceof stream__WEBPACK_IMPORTED_MODULE_0__.Readable) { - request.body.destroy(error); - } - if (!response || !response.body) return; - response.body.emit('error', error); - }; +Har.prototype.reducer = function (obj, pair) { + // new property ? + if (obj[pair.name] === undefined) { + obj[pair.name] = pair.value + return obj + } - if (signal && signal.aborted) { - abort(); - return; - } + // existing? convert to array + var arr = [ + obj[pair.name], + pair.value + ] - const abortAndFinalize = function abortAndFinalize() { - abort(); - finalize(); - }; + obj[pair.name] = arr - // send request - const req = send(options); - let reqTimeout; + return obj +} - if (signal) { - signal.addEventListener('abort', abortAndFinalize); - } +Har.prototype.prep = function (data) { + // construct utility properties + data.queryObj = {} + data.headersObj = {} + data.postData.jsonObj = false + data.postData.paramsObj = false - function finalize() { - req.abort(); - if (signal) signal.removeEventListener('abort', abortAndFinalize); - clearTimeout(reqTimeout); - } + // construct query objects + if (data.queryString && data.queryString.length) { + data.queryObj = data.queryString.reduce(this.reducer, {}) + } - if (request.timeout) { - req.once('socket', function (socket) { - reqTimeout = setTimeout(function () { - reject(new FetchError(`network timeout at: ${request.url}`, 'request-timeout')); - finalize(); - }, request.timeout); - }); - } + // construct headers objects + if (data.headers && data.headers.length) { + // loweCase header keys + data.headersObj = data.headers.reduceRight(function (headers, header) { + headers[header.name] = header.value + return headers + }, {}) + } - req.on('error', function (err) { - reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, 'system', err)); - finalize(); - }); + // construct Cookie header + if (data.cookies && data.cookies.length) { + var cookies = data.cookies.map(function (cookie) { + return cookie.name + '=' + cookie.value + }) - req.on('response', function (res) { - clearTimeout(reqTimeout); + if (cookies.length) { + data.headersObj.cookie = cookies.join('; ') + } + } - const headers = createHeadersLenient(res.headers); + // prep body + function some (arr) { + return arr.some(function (type) { + return data.postData.mimeType.indexOf(type) === 0 + }) + } - // HTTP fetch step 5 - if (fetch.isRedirect(res.statusCode)) { - // HTTP fetch step 5.2 - const location = headers.get('Location'); + if (some([ + 'multipart/mixed', + 'multipart/related', + 'multipart/form-data', + 'multipart/alternative'])) { + // reset values + data.postData.mimeType = 'multipart/form-data' + } else if (some([ + 'application/x-www-form-urlencoded'])) { + if (!data.postData.params) { + data.postData.text = '' + } else { + data.postData.paramsObj = data.postData.params.reduce(this.reducer, {}) - // HTTP fetch step 5.3 - let locationURL = null; - try { - locationURL = location === null ? null : new URL$1(location, request.url).toString(); - } catch (err) { - // error here can only be invalid URL in Location: header - // do not throw when options.redirect == manual - // let the user extract the errorneous redirect URL - if (request.redirect !== 'manual') { - reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect')); - finalize(); - return; - } - } + // always overwrite + data.postData.text = qs.stringify(data.postData.paramsObj) + } + } else if (some([ + 'text/json', + 'text/x-json', + 'application/json', + 'application/x-json'])) { + data.postData.mimeType = 'application/json' - // HTTP fetch step 5.5 - switch (request.redirect) { - case 'error': - reject(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${request.url}`, 'no-redirect')); - finalize(); - return; - case 'manual': - // node-fetch-specific step: make manual redirect a bit easier to use by setting the Location header value to the resolved URL. - if (locationURL !== null) { - // handle corrupted header - try { - headers.set('Location', locationURL); - } catch (err) { - // istanbul ignore next: nodejs server prevent invalid response headers, we can't test this through normal request - reject(err); - } - } - break; - case 'follow': - // HTTP-redirect fetch step 2 - if (locationURL === null) { - break; - } + if (data.postData.text) { + try { + data.postData.jsonObj = JSON.parse(data.postData.text) + } catch (e) { + this.request.debug(e) - // HTTP-redirect fetch step 5 - if (request.counter >= request.follow) { - reject(new FetchError(`maximum redirect reached at: ${request.url}`, 'max-redirect')); - finalize(); - return; - } + // force back to text/plain + data.postData.mimeType = 'text/plain' + } + } + } - // HTTP-redirect fetch step 6 (counter increment) - // Create a new Request object. - const requestOpts = { - headers: new Headers(request.headers), - follow: request.follow, - counter: request.counter + 1, - agent: request.agent, - compress: request.compress, - method: request.method, - body: request.body, - signal: request.signal, - timeout: request.timeout, - size: request.size - }; + return data +} - if (!isDomainOrSubdomain(request.url, locationURL)) { - for (const name of ['authorization', 'www-authenticate', 'cookie', 'cookie2']) { - requestOpts.headers.delete(name); - } - } +Har.prototype.options = function (options) { + // skip if no har property defined + if (!options.har) { + return options + } - // HTTP-redirect fetch step 9 - if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { - reject(new FetchError('Cannot follow redirect with body being a readable stream', 'unsupported-redirect')); - finalize(); - return; - } + var har = {} + extend(har, options.har) - // HTTP-redirect fetch step 11 - if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === 'POST') { - requestOpts.method = 'GET'; - requestOpts.body = undefined; - requestOpts.headers.delete('content-length'); - } + // only process the first entry + if (har.log && har.log.entries) { + har = har.log.entries[0] + } - // HTTP-redirect fetch step 15 - resolve(fetch(new Request(locationURL, requestOpts))); - finalize(); - return; - } - } + // add optional properties to make validation successful + har.url = har.url || options.url || options.uri || options.baseUrl || '/' + har.httpVersion = har.httpVersion || 'HTTP/1.1' + har.queryString = har.queryString || [] + har.headers = har.headers || [] + har.cookies = har.cookies || [] + har.postData = har.postData || {} + har.postData.mimeType = har.postData.mimeType || 'application/octet-stream' - // prepare response - res.once('end', function () { - if (signal) signal.removeEventListener('abort', abortAndFinalize); - }); - let body = res.pipe(new PassThrough$1()); + har.bodySize = 0 + har.headersSize = 0 + har.postData.size = 0 - const response_options = { - url: request.url, - status: res.statusCode, - statusText: res.statusMessage, - headers: headers, - size: request.size, - timeout: request.timeout, - counter: request.counter - }; + if (!validate.request(har)) { + return options + } - // HTTP-network fetch step 12.1.1.3 - const codings = headers.get('Content-Encoding'); + // clean up and get some utility properties + var req = this.prep(har) - // HTTP-network fetch step 12.1.1.4: handle content codings + // construct new options + if (req.url) { + options.url = req.url + } - // in following scenarios we ignore compression support - // 1. compression support is disabled - // 2. HEAD request - // 3. no Content-Encoding header - // 4. no content response (204) - // 5. content not modified response (304) - if (!request.compress || request.method === 'HEAD' || codings === null || res.statusCode === 204 || res.statusCode === 304) { - response = new Response(body, response_options); - resolve(response); - return; - } + if (req.method) { + options.method = req.method + } - // For Node v6+ - // Be less strict when decoding compressed responses, since sometimes - // servers send slightly invalid responses that are still accepted - // by common browsers. - // Always using Z_SYNC_FLUSH is what cURL does. - const zlibOptions = { - flush: zlib__WEBPACK_IMPORTED_MODULE_5__.Z_SYNC_FLUSH, - finishFlush: zlib__WEBPACK_IMPORTED_MODULE_5__.Z_SYNC_FLUSH - }; + if (Object.keys(req.queryObj).length) { + options.qs = req.queryObj + } - // for gzip - if (codings == 'gzip' || codings == 'x-gzip') { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_5__.createGunzip(zlibOptions)); - response = new Response(body, response_options); - resolve(response); - return; - } + if (Object.keys(req.headersObj).length) { + options.headers = req.headersObj + } - // for deflate - if (codings == 'deflate' || codings == 'x-deflate') { - // handle the infamous raw deflate response from old servers - // a hack for old IIS and Apache servers - const raw = res.pipe(new PassThrough$1()); - raw.once('data', function (chunk) { - // see http://stackoverflow.com/questions/37519828 - if ((chunk[0] & 0x0F) === 0x08) { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_5__.createInflate()); - } else { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_5__.createInflateRaw()); - } - response = new Response(body, response_options); - resolve(response); - }); - return; - } + function test (type) { + return req.postData.mimeType.indexOf(type) === 0 + } + if (test('application/x-www-form-urlencoded')) { + options.form = req.postData.paramsObj + } else if (test('application/json')) { + if (req.postData.jsonObj) { + options.body = req.postData.jsonObj + options.json = true + } + } else if (test('multipart/form-data')) { + options.formData = {} - // for br - if (codings == 'br' && typeof zlib__WEBPACK_IMPORTED_MODULE_5__.createBrotliDecompress === 'function') { - body = body.pipe(zlib__WEBPACK_IMPORTED_MODULE_5__.createBrotliDecompress()); - response = new Response(body, response_options); - resolve(response); - return; - } + req.postData.params.forEach(function (param) { + var attachment = {} - // otherwise, use response as-is - response = new Response(body, response_options); - resolve(response); - }); + if (!param.fileName && !param.fileName && !param.contentType) { + options.formData[param.name] = param.value + return + } - writeToStream(req, request); - }); -} -/** - * Redirect code matching - * - * @param Number code Status code - * @return Boolean - */ -fetch.isRedirect = function (code) { - return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; -}; + // attempt to read from disk! + if (param.fileName && !param.value) { + attachment.value = fs.createReadStream(param.fileName) + } else if (param.value) { + attachment.value = param.value + } -// expose Promise -fetch.Promise = global.Promise; + if (param.fileName) { + attachment.options = { + filename: param.fileName, + contentType: param.contentType ? param.contentType : null + } + } -/* harmony default export */ __webpack_exports__["default"] = (fetch); + options.formData[param.name] = attachment + }) + } else { + if (req.postData.text) { + options.body = req.postData.text + } + } + + return options +} +exports.Har = Har /***/ }), -/* 1311 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -exports.URL = __webpack_require__(1312).interface; -exports.serializeURL = __webpack_require__(1316).serializeURL; -exports.serializeURLOrigin = __webpack_require__(1316).serializeURLOrigin; -exports.basicURLParse = __webpack_require__(1316).basicURLParse; -exports.setTheUsername = __webpack_require__(1316).setTheUsername; -exports.setThePassword = __webpack_require__(1316).setThePassword; -exports.serializeHost = __webpack_require__(1316).serializeHost; -exports.serializeInteger = __webpack_require__(1316).serializeInteger; -exports.parseURL = __webpack_require__(1316).parseURL; +var caseless = __webpack_require__(161) +var uuid = __webpack_require__(1331) +var helpers = __webpack_require__(1320) +var md5 = helpers.md5 +var toBase64 = helpers.toBase64 -/***/ }), -/* 1312 */ -/***/ (function(module, exports, __webpack_require__) { +function Auth (request) { + // define all public properties here + this.request = request + this.hasAuth = false + this.sentAuth = false + this.bearerToken = null + this.user = null + this.pass = null +} -"use strict"; +Auth.prototype.basic = function (user, pass, sendImmediately) { + var self = this + if (typeof user !== 'string' || (pass !== undefined && typeof pass !== 'string')) { + self.request.emit('error', new Error('auth() received invalid user or password')) + } + self.user = user + self.pass = pass + self.hasAuth = true + var header = user + ':' + (pass || '') + if (sendImmediately || typeof sendImmediately === 'undefined') { + var authHeader = 'Basic ' + toBase64(header) + self.sentAuth = true + return authHeader + } +} +Auth.prototype.bearer = function (bearer, sendImmediately) { + var self = this + self.bearerToken = bearer + self.hasAuth = true + if (sendImmediately || typeof sendImmediately === 'undefined') { + if (typeof bearer === 'function') { + bearer = bearer() + } + var authHeader = 'Bearer ' + (bearer || '') + self.sentAuth = true + return authHeader + } +} -const conversions = __webpack_require__(1313); -const utils = __webpack_require__(1314); -const Impl = __webpack_require__(1315); +Auth.prototype.digest = function (method, path, authHeader) { + // TODO: More complete implementation of RFC 2617. + // - handle challenge.domain + // - support qop="auth-int" only + // - handle Authentication-Info (not necessarily?) + // - check challenge.stale (not necessarily?) + // - increase nc (not necessarily?) + // For reference: + // http://tools.ietf.org/html/rfc2617#section-3 + // https://github.com/bagder/curl/blob/master/lib/http_digest.c -const impl = utils.implSymbol; + var self = this -function URL(url) { - if (!this || this[impl] || !(this instanceof URL)) { - throw new TypeError("Failed to construct 'URL': Please use the 'new' operator, this DOM object constructor cannot be called as a function."); - } - if (arguments.length < 1) { - throw new TypeError("Failed to construct 'URL': 1 argument required, but only " + arguments.length + " present."); + var challenge = {} + var re = /([a-z0-9_-]+)=(?:"([^"]+)"|([a-z0-9_-]+))/gi + for (;;) { + var match = re.exec(authHeader) + if (!match) { + break + } + challenge[match[1]] = match[2] || match[3] } - const args = []; - for (let i = 0; i < arguments.length && i < 2; ++i) { - args[i] = arguments[i]; + + /** + * RFC 2617: handle both MD5 and MD5-sess algorithms. + * + * If the algorithm directive's value is "MD5" or unspecified, then HA1 is + * HA1=MD5(username:realm:password) + * If the algorithm directive's value is "MD5-sess", then HA1 is + * HA1=MD5(MD5(username:realm:password):nonce:cnonce) + */ + var ha1Compute = function (algorithm, user, realm, pass, nonce, cnonce) { + var ha1 = md5(user + ':' + realm + ':' + pass) + if (algorithm && algorithm.toLowerCase() === 'md5-sess') { + return md5(ha1 + ':' + nonce + ':' + cnonce) + } else { + return ha1 + } } - args[0] = conversions["USVString"](args[0]); - if (args[1] !== undefined) { - args[1] = conversions["USVString"](args[1]); + + var qop = /(^|,)\s*auth\s*($|,)/.test(challenge.qop) && 'auth' + var nc = qop && '00000001' + var cnonce = qop && uuid().replace(/-/g, '') + var ha1 = ha1Compute(challenge.algorithm, self.user, challenge.realm, self.pass, challenge.nonce, cnonce) + var ha2 = md5(method + ':' + path) + var digestResponse = qop + ? md5(ha1 + ':' + challenge.nonce + ':' + nc + ':' + cnonce + ':' + qop + ':' + ha2) + : md5(ha1 + ':' + challenge.nonce + ':' + ha2) + var authValues = { + username: self.user, + realm: challenge.realm, + nonce: challenge.nonce, + uri: path, + qop: qop, + response: digestResponse, + nc: nc, + cnonce: cnonce, + algorithm: challenge.algorithm, + opaque: challenge.opaque } - module.exports.setup(this, args); + authHeader = [] + for (var k in authValues) { + if (authValues[k]) { + if (k === 'qop' || k === 'nc' || k === 'algorithm') { + authHeader.push(k + '=' + authValues[k]) + } else { + authHeader.push(k + '="' + authValues[k] + '"') + } + } + } + authHeader = 'Digest ' + authHeader.join(', ') + self.sentAuth = true + return authHeader } -URL.prototype.toJSON = function toJSON() { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); +Auth.prototype.onRequest = function (user, pass, sendImmediately, bearer) { + var self = this + var request = self.request + + var authHeader + if (bearer === undefined && user === undefined) { + self.request.emit('error', new Error('no auth mechanism defined')) + } else if (bearer !== undefined) { + authHeader = self.bearer(bearer, sendImmediately) + } else { + authHeader = self.basic(user, pass, sendImmediately) } - const args = []; - for (let i = 0; i < arguments.length && i < 0; ++i) { - args[i] = arguments[i]; + if (authHeader) { + request.setHeader('authorization', authHeader) } - return this[impl].toJSON.apply(this[impl], args); -}; -Object.defineProperty(URL.prototype, "href", { - get() { - return this[impl].href; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].href = V; - }, - enumerable: true, - configurable: true -}); +} -URL.prototype.toString = function () { - if (!this || !module.exports.is(this)) { - throw new TypeError("Illegal invocation"); - } - return this.href; -}; +Auth.prototype.onResponse = function (response) { + var self = this + var request = self.request -Object.defineProperty(URL.prototype, "origin", { - get() { - return this[impl].origin; - }, - enumerable: true, - configurable: true -}); + if (!self.hasAuth || self.sentAuth) { return null } -Object.defineProperty(URL.prototype, "protocol", { - get() { - return this[impl].protocol; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].protocol = V; - }, - enumerable: true, - configurable: true -}); + var c = caseless(response.headers) -Object.defineProperty(URL.prototype, "username", { - get() { - return this[impl].username; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].username = V; - }, - enumerable: true, - configurable: true -}); + var authHeader = c.get('www-authenticate') + var authVerb = authHeader && authHeader.split(' ')[0].toLowerCase() + request.debug('reauth', authVerb) -Object.defineProperty(URL.prototype, "password", { - get() { - return this[impl].password; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].password = V; - }, - enumerable: true, - configurable: true -}); + switch (authVerb) { + case 'basic': + return self.basic(self.user, self.pass, true) -Object.defineProperty(URL.prototype, "host", { - get() { - return this[impl].host; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].host = V; - }, - enumerable: true, - configurable: true -}); + case 'bearer': + return self.bearer(self.bearerToken, true) -Object.defineProperty(URL.prototype, "hostname", { - get() { - return this[impl].hostname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hostname = V; - }, - enumerable: true, - configurable: true -}); + case 'digest': + return self.digest(request.method, request.path, authHeader) + } +} -Object.defineProperty(URL.prototype, "port", { - get() { - return this[impl].port; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].port = V; - }, - enumerable: true, - configurable: true -}); +exports.Auth = Auth -Object.defineProperty(URL.prototype, "pathname", { - get() { - return this[impl].pathname; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].pathname = V; - }, - enumerable: true, - configurable: true -}); -Object.defineProperty(URL.prototype, "search", { - get() { - return this[impl].search; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].search = V; - }, - enumerable: true, - configurable: true -}); +/***/ }), +/* 1331 */ +/***/ (function(module, exports, __webpack_require__) { -Object.defineProperty(URL.prototype, "hash", { - get() { - return this[impl].hash; - }, - set(V) { - V = conversions["USVString"](V); - this[impl].hash = V; - }, - enumerable: true, - configurable: true -}); +var rng = __webpack_require__(1332); +var bytesToUuid = __webpack_require__(1333); +function v4(options, buf, offset) { + var i = buf && offset || 0; -module.exports = { - is(obj) { - return !!obj && obj[impl] instanceof Impl.implementation; - }, - create(constructorArgs, privateData) { - let obj = Object.create(URL.prototype); - this.setup(obj, constructorArgs, privateData); - return obj; - }, - setup(obj, constructorArgs, privateData) { - if (!privateData) privateData = {}; - privateData.wrapper = obj; + if (typeof(options) == 'string') { + buf = options === 'binary' ? new Array(16) : null; + options = null; + } + options = options || {}; - obj[impl] = new Impl.implementation(constructorArgs, privateData); - obj[impl][utils.wrapperSymbol] = obj; - }, - interface: URL, - expose: { - Window: { URL: URL }, - Worker: { URL: URL } + var rnds = options.random || (options.rng || rng)(); + + // Per 4.4, set bits for version and `clock_seq_hi_and_reserved` + rnds[6] = (rnds[6] & 0x0f) | 0x40; + rnds[8] = (rnds[8] & 0x3f) | 0x80; + + // Copy bytes to buffer, if provided + if (buf) { + for (var ii = 0; ii < 16; ++ii) { + buf[i + ii] = rnds[ii]; + } } -}; + return buf || bytesToUuid(rnds); +} + +module.exports = v4; /***/ }), -/* 1313 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { -"use strict"; +// Unique ID creation requires a high quality random # generator. In node.js +// this is pretty straight-forward - we use the crypto API. + +var crypto = __webpack_require__(94); + +module.exports = function nodeRNG() { + return crypto.randomBytes(16); +}; -var conversions = {}; -module.exports = conversions; +/***/ }), +/* 1333 */ +/***/ (function(module, exports) { -function sign(x) { - return x < 0 ? -1 : 1; +/** + * Convert array of 16 byte values to UUID string format of the form: + * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX + */ +var byteToHex = []; +for (var i = 0; i < 256; ++i) { + byteToHex[i] = (i + 0x100).toString(16).substr(1); } -function evenRound(x) { - // Round x to the nearest integer, choosing the even integer if it lies halfway between two. - if ((x % 1) === 0.5 && (x & 1) === 0) { // [even number].5; round down (i.e. floor) - return Math.floor(x); - } else { - return Math.round(x); - } +function bytesToUuid(buf, offset) { + var i = offset || 0; + var bth = byteToHex; + // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4 + return ([ + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], '-', + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]], + bth[buf[i++]], bth[buf[i++]] + ]).join(''); } -function createNumberConversion(bitLength, typeOpts) { - if (!typeOpts.unsigned) { - --bitLength; - } - const lowerBound = typeOpts.unsigned ? 0 : -Math.pow(2, bitLength); - const upperBound = Math.pow(2, bitLength) - 1; +module.exports = bytesToUuid; + + +/***/ }), +/* 1334 */ +/***/ (function(module, exports, __webpack_require__) { - const moduloVal = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength) : Math.pow(2, bitLength); - const moduloBound = typeOpts.moduloBitLength ? Math.pow(2, typeOpts.moduloBitLength - 1) : Math.pow(2, bitLength - 1); +"use strict"; - return function(V, opts) { - if (!opts) opts = {}; - let x = +V; +var url = __webpack_require__(83) +var qs = __webpack_require__(1324) +var caseless = __webpack_require__(161) +var uuid = __webpack_require__(1331) +var oauth = __webpack_require__(265) +var crypto = __webpack_require__(94) +var Buffer = __webpack_require__(95).Buffer - if (opts.enforceRange) { - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite number"); - } +function OAuth (request) { + this.request = request + this.params = null +} - x = sign(x) * Math.floor(Math.abs(x)); - if (x < lowerBound || x > upperBound) { - throw new TypeError("Argument is not in byte range"); - } +OAuth.prototype.buildParams = function (_oauth, uri, method, query, form, qsLib) { + var oa = {} + for (var i in _oauth) { + oa['oauth_' + i] = _oauth[i] + } + if (!oa.oauth_version) { + oa.oauth_version = '1.0' + } + if (!oa.oauth_timestamp) { + oa.oauth_timestamp = Math.floor(Date.now() / 1000).toString() + } + if (!oa.oauth_nonce) { + oa.oauth_nonce = uuid().replace(/-/g, '') + } + if (!oa.oauth_signature_method) { + oa.oauth_signature_method = 'HMAC-SHA1' + } - return x; - } + var consumer_secret_or_private_key = oa.oauth_consumer_secret || oa.oauth_private_key // eslint-disable-line camelcase + delete oa.oauth_consumer_secret + delete oa.oauth_private_key - if (!isNaN(x) && opts.clamp) { - x = evenRound(x); + var token_secret = oa.oauth_token_secret // eslint-disable-line camelcase + delete oa.oauth_token_secret - if (x < lowerBound) x = lowerBound; - if (x > upperBound) x = upperBound; - return x; - } + var realm = oa.oauth_realm + delete oa.oauth_realm + delete oa.oauth_transport_method - if (!Number.isFinite(x) || x === 0) { - return 0; - } + var baseurl = uri.protocol + '//' + uri.host + uri.pathname + var params = qsLib.parse([].concat(query, form, qsLib.stringify(oa)).join('&')) - x = sign(x) * Math.floor(Math.abs(x)); - x = x % moduloVal; + oa.oauth_signature = oauth.sign( + oa.oauth_signature_method, + method, + baseurl, + params, + consumer_secret_or_private_key, // eslint-disable-line camelcase + token_secret // eslint-disable-line camelcase + ) - if (!typeOpts.unsigned && x >= moduloBound) { - return x - moduloVal; - } else if (typeOpts.unsigned) { - if (x < 0) { - x += moduloVal; - } else if (x === -0) { // don't return negative zero - return 0; - } - } + if (realm) { + oa.realm = realm + } - return x; - } + return oa } -conversions["void"] = function () { - return undefined; -}; +OAuth.prototype.buildBodyHash = function (_oauth, body) { + if (['HMAC-SHA1', 'RSA-SHA1'].indexOf(_oauth.signature_method || 'HMAC-SHA1') < 0) { + this.request.emit('error', new Error('oauth: ' + _oauth.signature_method + + ' signature_method not supported with body_hash signing.')) + } -conversions["boolean"] = function (val) { - return !!val; -}; + var shasum = crypto.createHash('sha1') + shasum.update(body || '') + var sha1 = shasum.digest('hex') -conversions["byte"] = createNumberConversion(8, { unsigned: false }); -conversions["octet"] = createNumberConversion(8, { unsigned: true }); + return Buffer.from(sha1, 'hex').toString('base64') +} -conversions["short"] = createNumberConversion(16, { unsigned: false }); -conversions["unsigned short"] = createNumberConversion(16, { unsigned: true }); +OAuth.prototype.concatParams = function (oa, sep, wrap) { + wrap = wrap || '' -conversions["long"] = createNumberConversion(32, { unsigned: false }); -conversions["unsigned long"] = createNumberConversion(32, { unsigned: true }); + var params = Object.keys(oa).filter(function (i) { + return i !== 'realm' && i !== 'oauth_signature' + }).sort() -conversions["long long"] = createNumberConversion(32, { unsigned: false, moduloBitLength: 64 }); -conversions["unsigned long long"] = createNumberConversion(32, { unsigned: true, moduloBitLength: 64 }); + if (oa.realm) { + params.splice(0, 0, 'realm') + } + params.push('oauth_signature') -conversions["double"] = function (V) { - const x = +V; + return params.map(function (i) { + return i + '=' + wrap + oauth.rfc3986(oa[i]) + wrap + }).join(sep) +} - if (!Number.isFinite(x)) { - throw new TypeError("Argument is not a finite floating-point value"); - } +OAuth.prototype.onRequest = function (_oauth) { + var self = this + self.params = _oauth - return x; -}; + var uri = self.request.uri || {} + var method = self.request.method || '' + var headers = caseless(self.request.headers) + var body = self.request.body || '' + var qsLib = self.request.qsLib || qs + + var form + var query + var contentType = headers.get('content-type') || '' + var formContentType = 'application/x-www-form-urlencoded' + var transport = _oauth.transport_method || 'header' + + if (contentType.slice(0, formContentType.length) === formContentType) { + contentType = formContentType + form = body + } + if (uri.query) { + query = uri.query + } + if (transport === 'body' && (method !== 'POST' || contentType !== formContentType)) { + self.request.emit('error', new Error('oauth: transport_method of body requires POST ' + + 'and content-type ' + formContentType)) + } + + if (!form && typeof _oauth.body_hash === 'boolean') { + _oauth.body_hash = self.buildBodyHash(_oauth, self.request.body.toString()) + } -conversions["unrestricted double"] = function (V) { - const x = +V; + var oa = self.buildParams(_oauth, uri, method, query, form, qsLib) + + switch (transport) { + case 'header': + self.request.setHeader('Authorization', 'OAuth ' + self.concatParams(oa, ',', '"')) + break + + case 'query': + var href = self.request.uri.href += (query ? '&' : '?') + self.concatParams(oa, '&') + self.request.uri = url.parse(href) + self.request.path = self.request.uri.path + break - if (isNaN(x)) { - throw new TypeError("Argument is NaN"); - } + case 'body': + self.request.body = (form ? form + '&' : '') + self.concatParams(oa, '&') + break - return x; -}; + default: + self.request.emit('error', new Error('oauth: transport_method invalid')) + } +} -// not quite valid, but good enough for JS -conversions["float"] = conversions["double"]; -conversions["unrestricted float"] = conversions["unrestricted double"]; +exports.OAuth = OAuth -conversions["DOMString"] = function (V, opts) { - if (!opts) opts = {}; - if (opts.treatNullAsEmptyString && V === null) { - return ""; - } +/***/ }), +/* 1335 */ +/***/ (function(module, exports, __webpack_require__) { - return String(V); -}; +"use strict"; -conversions["ByteString"] = function (V, opts) { - const x = String(V); - let c = undefined; - for (let i = 0; (c = x.codePointAt(i)) !== undefined; ++i) { - if (c > 255) { - throw new TypeError("Argument is not a valid bytestring"); - } - } - return x; -}; +var crypto = __webpack_require__(94) -conversions["USVString"] = function (V) { - const S = String(V); - const n = S.length; - const U = []; - for (let i = 0; i < n; ++i) { - const c = S.charCodeAt(i); - if (c < 0xD800 || c > 0xDFFF) { - U.push(String.fromCodePoint(c)); - } else if (0xDC00 <= c && c <= 0xDFFF) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - if (i === n - 1) { - U.push(String.fromCodePoint(0xFFFD)); - } else { - const d = S.charCodeAt(i + 1); - if (0xDC00 <= d && d <= 0xDFFF) { - const a = c & 0x3FF; - const b = d & 0x3FF; - U.push(String.fromCodePoint((2 << 15) + (2 << 9) * a + b)); - ++i; - } else { - U.push(String.fromCodePoint(0xFFFD)); - } - } - } - } +function randomString (size) { + var bits = (size + 1) * 6 + var buffer = crypto.randomBytes(Math.ceil(bits / 8)) + var string = buffer.toString('base64').replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '') + return string.slice(0, size) +} - return U.join(''); -}; +function calculatePayloadHash (payload, algorithm, contentType) { + var hash = crypto.createHash(algorithm) + hash.update('hawk.1.payload\n') + hash.update((contentType ? contentType.split(';')[0].trim().toLowerCase() : '') + '\n') + hash.update(payload || '') + hash.update('\n') + return hash.digest('base64') +} -conversions["Date"] = function (V, opts) { - if (!(V instanceof Date)) { - throw new TypeError("Argument is not a Date object"); - } - if (isNaN(V)) { - return undefined; - } +exports.calculateMac = function (credentials, opts) { + var normalized = 'hawk.1.header\n' + + opts.ts + '\n' + + opts.nonce + '\n' + + (opts.method || '').toUpperCase() + '\n' + + opts.resource + '\n' + + opts.host.toLowerCase() + '\n' + + opts.port + '\n' + + (opts.hash || '') + '\n' - return V; -}; + if (opts.ext) { + normalized = normalized + opts.ext.replace('\\', '\\\\').replace('\n', '\\n') + } -conversions["RegExp"] = function (V, opts) { - if (!(V instanceof RegExp)) { - V = new RegExp(V); - } + normalized = normalized + '\n' - return V; -}; + if (opts.app) { + normalized = normalized + opts.app + '\n' + (opts.dlg || '') + '\n' + } + var hmac = crypto.createHmac(credentials.algorithm, credentials.key).update(normalized) + var digest = hmac.digest('base64') + return digest +} -/***/ }), -/* 1314 */ -/***/ (function(module, exports, __webpack_require__) { +exports.header = function (uri, method, opts) { + var timestamp = opts.timestamp || Math.floor((Date.now() + (opts.localtimeOffsetMsec || 0)) / 1000) + var credentials = opts.credentials + if (!credentials || !credentials.id || !credentials.key || !credentials.algorithm) { + return '' + } -"use strict"; + if (['sha1', 'sha256'].indexOf(credentials.algorithm) === -1) { + return '' + } + var artifacts = { + ts: timestamp, + nonce: opts.nonce || randomString(6), + method: method, + resource: uri.pathname + (uri.search || ''), + host: uri.hostname, + port: uri.port || (uri.protocol === 'http:' ? 80 : 443), + hash: opts.hash, + ext: opts.ext, + app: opts.app, + dlg: opts.dlg + } -module.exports.mixin = function mixin(target, source) { - const keys = Object.getOwnPropertyNames(source); - for (let i = 0; i < keys.length; ++i) { - Object.defineProperty(target, keys[i], Object.getOwnPropertyDescriptor(source, keys[i])); + if (!artifacts.hash && (opts.payload || opts.payload === '')) { + artifacts.hash = calculatePayloadHash(opts.payload, credentials.algorithm, opts.contentType) } -}; -module.exports.wrapperSymbol = Symbol("wrapper"); -module.exports.implSymbol = Symbol("impl"); + var mac = exports.calculateMac(credentials, artifacts) -module.exports.wrapperForImpl = function (impl) { - return impl[module.exports.wrapperSymbol]; -}; + var hasExt = artifacts.ext !== null && artifacts.ext !== undefined && artifacts.ext !== '' + var header = 'Hawk id="' + credentials.id + + '", ts="' + artifacts.ts + + '", nonce="' + artifacts.nonce + + (artifacts.hash ? '", hash="' + artifacts.hash : '') + + (hasExt ? '", ext="' + artifacts.ext.replace(/\\/g, '\\\\').replace(/"/g, '\\"') : '') + + '", mac="' + mac + '"' -module.exports.implForWrapper = function (wrapper) { - return wrapper[module.exports.implSymbol]; -}; + if (artifacts.app) { + header = header + ', app="' + artifacts.app + (artifacts.dlg ? '", dlg="' + artifacts.dlg : '') + '"' + } + return header +} /***/ }), -/* 1315 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -const usm = __webpack_require__(1316); -exports.implementation = class URLImpl { - constructor(constructorArgs) { - const url = constructorArgs[0]; - const base = constructorArgs[1]; - - let parsedBase = null; - if (base !== undefined) { - parsedBase = usm.basicURLParse(base); - if (parsedBase === "failure") { - throw new TypeError("Invalid base URL"); - } - } +var uuid = __webpack_require__(1331) +var CombinedStream = __webpack_require__(165) +var isstream = __webpack_require__(182) +var Buffer = __webpack_require__(95).Buffer - const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase }); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); - } +function Multipart (request) { + this.request = request + this.boundary = uuid() + this.chunked = false + this.body = null +} - this._url = parsedURL; +Multipart.prototype.isChunked = function (options) { + var self = this + var chunked = false + var parts = options.data || options - // TODO: query stuff + if (!parts.forEach) { + self.request.emit('error', new Error('Argument error, options.multipart.')) } - get href() { - return usm.serializeURL(this._url); + if (options.chunked !== undefined) { + chunked = options.chunked } - set href(v) { - const parsedURL = usm.basicURLParse(v); - if (parsedURL === "failure") { - throw new TypeError("Invalid URL"); - } - - this._url = parsedURL; + if (self.request.getHeader('transfer-encoding') === 'chunked') { + chunked = true } - get origin() { - return usm.serializeURLOrigin(this._url); + if (!chunked) { + parts.forEach(function (part) { + if (typeof part.body === 'undefined') { + self.request.emit('error', new Error('Body attribute missing in multipart.')) + } + if (isstream(part.body)) { + chunked = true + } + }) } - get protocol() { - return this._url.scheme + ":"; - } + return chunked +} - set protocol(v) { - usm.basicURLParse(v + ":", { url: this._url, stateOverride: "scheme start" }); - } +Multipart.prototype.setHeaders = function (chunked) { + var self = this - get username() { - return this._url.username; + if (chunked && !self.request.hasHeader('transfer-encoding')) { + self.request.setHeader('transfer-encoding', 'chunked') } - set username(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; + var header = self.request.getHeader('content-type') + + if (!header || header.indexOf('multipart') === -1) { + self.request.setHeader('content-type', 'multipart/related; boundary=' + self.boundary) + } else { + if (header.indexOf('boundary') !== -1) { + self.boundary = header.replace(/.*boundary=([^\s;]+).*/, '$1') + } else { + self.request.setHeader('content-type', header + '; boundary=' + self.boundary) } + } +} + +Multipart.prototype.build = function (parts, chunked) { + var self = this + var body = chunked ? new CombinedStream() : [] - usm.setTheUsername(this._url, v); + function add (part) { + if (typeof part === 'number') { + part = part.toString() + } + return chunked ? body.append(part) : body.push(Buffer.from(part)) } - get password() { - return this._url.password; + if (self.request.preambleCRLF) { + add('\r\n') } - set password(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; - } + parts.forEach(function (part) { + var preamble = '--' + self.boundary + '\r\n' + Object.keys(part).forEach(function (key) { + if (key === 'body') { return } + preamble += key + ': ' + part[key] + '\r\n' + }) + preamble += '\r\n' + add(preamble) + add(part.body) + add('\r\n') + }) + add('--' + self.boundary + '--') - usm.setThePassword(this._url, v); + if (self.request.postambleCRLF) { + add('\r\n') } - get host() { - const url = this._url; + return body +} - if (url.host === null) { - return ""; - } +Multipart.prototype.onRequest = function (options) { + var self = this - if (url.port === null) { - return usm.serializeHost(url.host); - } + var chunked = self.isChunked(options) + var parts = options.data || options - return usm.serializeHost(url.host) + ":" + usm.serializeInteger(url.port); - } + self.setHeaders(chunked) + self.chunked = chunked + self.body = self.build(parts, chunked) +} - set host(v) { - if (this._url.cannotBeABaseURL) { - return; - } +exports.Multipart = Multipart - usm.basicURLParse(v, { url: this._url, stateOverride: "host" }); - } - get hostname() { - if (this._url.host === null) { - return ""; - } +/***/ }), +/* 1337 */ +/***/ (function(module, exports, __webpack_require__) { - return usm.serializeHost(this._url.host); - } +"use strict"; - set hostname(v) { - if (this._url.cannotBeABaseURL) { - return; - } - usm.basicURLParse(v, { url: this._url, stateOverride: "hostname" }); - } +var url = __webpack_require__(83) +var isUrl = /^https?:/ - get port() { - if (this._url.port === null) { - return ""; - } +function Redirect (request) { + this.request = request + this.followRedirect = true + this.followRedirects = true + this.followAllRedirects = false + this.followOriginalHttpMethod = false + this.allowRedirect = function () { return true } + this.maxRedirects = 10 + this.redirects = [] + this.redirectsFollowed = 0 + this.removeRefererHeader = false +} + +Redirect.prototype.onRequest = function (options) { + var self = this - return usm.serializeInteger(this._url.port); + if (options.maxRedirects !== undefined) { + self.maxRedirects = options.maxRedirects + } + if (typeof options.followRedirect === 'function') { + self.allowRedirect = options.followRedirect + } + if (options.followRedirect !== undefined) { + self.followRedirects = !!options.followRedirect + } + if (options.followAllRedirects !== undefined) { + self.followAllRedirects = options.followAllRedirects } + if (self.followRedirects || self.followAllRedirects) { + self.redirects = self.redirects || [] + } + if (options.removeRefererHeader !== undefined) { + self.removeRefererHeader = options.removeRefererHeader + } + if (options.followOriginalHttpMethod !== undefined) { + self.followOriginalHttpMethod = options.followOriginalHttpMethod + } +} - set port(v) { - if (usm.cannotHaveAUsernamePasswordPort(this._url)) { - return; - } +Redirect.prototype.redirectTo = function (response) { + var self = this + var request = self.request - if (v === "") { - this._url.port = null; - } else { - usm.basicURLParse(v, { url: this._url, stateOverride: "port" }); - } - } + var redirectTo = null + if (response.statusCode >= 300 && response.statusCode < 400 && response.caseless.has('location')) { + var location = response.caseless.get('location') + request.debug('redirect', location) - get pathname() { - if (this._url.cannotBeABaseURL) { - return this._url.path[0]; + if (self.followAllRedirects) { + redirectTo = location + } else if (self.followRedirects) { + switch (request.method) { + case 'PATCH': + case 'PUT': + case 'POST': + case 'DELETE': + // Do not follow redirects + break + default: + redirectTo = location + break + } } - - if (this._url.path.length === 0) { - return ""; + } else if (response.statusCode === 401) { + var authHeader = request._auth.onResponse(response) + if (authHeader) { + request.setHeader('authorization', authHeader) + redirectTo = request.uri } - - return "/" + this._url.path.join("/"); } + return redirectTo +} - set pathname(v) { - if (this._url.cannotBeABaseURL) { - return; - } +Redirect.prototype.onResponse = function (response) { + var self = this + var request = self.request - this._url.path = []; - usm.basicURLParse(v, { url: this._url, stateOverride: "path start" }); + var redirectTo = self.redirectTo(response) + if (!redirectTo || !self.allowRedirect.call(request, response)) { + return false } - get search() { - if (this._url.query === null || this._url.query === "") { - return ""; - } + request.debug('redirect to', redirectTo) - return "?" + this._url.query; + // ignore any potential response body. it cannot possibly be useful + // to us at this point. + // response.resume should be defined, but check anyway before calling. Workaround for browserify. + if (response.resume) { + response.resume() } - set search(v) { - // TODO: query stuff + if (self.redirectsFollowed >= self.maxRedirects) { + request.emit('error', new Error('Exceeded maxRedirects. Probably stuck in a redirect loop ' + request.uri.href)) + return false + } + self.redirectsFollowed += 1 - const url = this._url; + if (!isUrl.test(redirectTo)) { + redirectTo = url.resolve(request.uri.href, redirectTo) + } - if (v === "") { - url.query = null; - return; - } + var uriPrev = request.uri + request.uri = url.parse(redirectTo) - const input = v[0] === "?" ? v.substring(1) : v; - url.query = ""; - usm.basicURLParse(input, { url, stateOverride: "query" }); + // handle the case where we change protocol from https to http or vice versa + if (request.uri.protocol !== uriPrev.protocol) { + delete request.agent } - get hash() { - if (this._url.fragment === null || this._url.fragment === "") { - return ""; - } + self.redirects.push({ statusCode: response.statusCode, redirectUri: redirectTo }) - return "#" + this._url.fragment; + if (self.followAllRedirects && request.method !== 'HEAD' && + response.statusCode !== 401 && response.statusCode !== 307) { + request.method = self.followOriginalHttpMethod ? request.method : 'GET' } - - set hash(v) { - if (v === "") { - this._url.fragment = null; - return; + // request.method = 'GET' // Force all redirects to use GET || commented out fixes #215 + delete request.src + delete request.req + delete request._started + if (response.statusCode !== 401 && response.statusCode !== 307) { + // Remove parameters from the previous response, unless this is the second request + // for a server that requires digest authentication. + delete request.body + delete request._form + if (request.headers) { + request.removeHeader('host') + request.removeHeader('content-type') + request.removeHeader('content-length') + if (request.uri.hostname !== request.originalHost.split(':')[0]) { + // Remove authorization if changing hostnames (but not if just + // changing ports or protocols). This matches the behavior of curl: + // https://github.com/bagder/curl/blob/6beb0eee/lib/http.c#L710 + request.removeHeader('authorization') + } } - - const input = v[0] === "#" ? v.substring(1) : v; - this._url.fragment = ""; - usm.basicURLParse(input, { url: this._url, stateOverride: "fragment" }); } - toJSON() { - return this.href; + if (!self.removeRefererHeader) { + request.setHeader('referer', uriPrev.href) } -}; + request.emit('redirect') -/***/ }), -/* 1316 */ -/***/ (function(module, exports, __webpack_require__) { + request.init() -"use strict"; - -const punycode = __webpack_require__(86); -const tr46 = __webpack_require__(1317); - -const specialSchemes = { - ftp: 21, - file: null, - gopher: 70, - http: 80, - https: 443, - ws: 80, - wss: 443 -}; - -const failure = Symbol("failure"); - -function countSymbols(str) { - return punycode.ucs2.decode(str).length; -} - -function at(input, idx) { - const c = input[idx]; - return isNaN(c) ? undefined : String.fromCodePoint(c); -} - -function isASCIIDigit(c) { - return c >= 0x30 && c <= 0x39; -} - -function isASCIIAlpha(c) { - return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A); -} - -function isASCIIAlphanumeric(c) { - return isASCIIAlpha(c) || isASCIIDigit(c); -} - -function isASCIIHex(c) { - return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66); -} - -function isSingleDot(buffer) { - return buffer === "." || buffer.toLowerCase() === "%2e"; -} - -function isDoubleDot(buffer) { - buffer = buffer.toLowerCase(); - return buffer === ".." || buffer === "%2e." || buffer === ".%2e" || buffer === "%2e%2e"; -} - -function isWindowsDriveLetterCodePoints(cp1, cp2) { - return isASCIIAlpha(cp1) && (cp2 === 58 || cp2 === 124); -} - -function isWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && (string[1] === ":" || string[1] === "|"); -} - -function isNormalizedWindowsDriveLetterString(string) { - return string.length === 2 && isASCIIAlpha(string.codePointAt(0)) && string[1] === ":"; -} - -function containsForbiddenHostCodePoint(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|%|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function containsForbiddenHostCodePointExcludingPercent(string) { - return string.search(/\u0000|\u0009|\u000A|\u000D|\u0020|#|\/|:|\?|@|\[|\\|\]/) !== -1; -} - -function isSpecialScheme(scheme) { - return specialSchemes[scheme] !== undefined; -} - -function isSpecial(url) { - return isSpecialScheme(url.scheme); -} - -function defaultPort(scheme) { - return specialSchemes[scheme]; -} - -function percentEncode(c) { - let hex = c.toString(16).toUpperCase(); - if (hex.length === 1) { - hex = "0" + hex; - } - - return "%" + hex; -} - -function utf8PercentEncode(c) { - const buf = new Buffer(c); - - let str = ""; - - for (let i = 0; i < buf.length; ++i) { - str += percentEncode(buf[i]); - } - - return str; -} - -function utf8PercentDecode(str) { - const input = new Buffer(str); - const output = []; - for (let i = 0; i < input.length; ++i) { - if (input[i] !== 37) { - output.push(input[i]); - } else if (input[i] === 37 && isASCIIHex(input[i + 1]) && isASCIIHex(input[i + 2])) { - output.push(parseInt(input.slice(i + 1, i + 3).toString(), 16)); - i += 2; - } else { - output.push(input[i]); - } - } - return new Buffer(output).toString(); -} - -function isC0ControlPercentEncode(c) { - return c <= 0x1F || c > 0x7E; -} - -const extraPathPercentEncodeSet = new Set([32, 34, 35, 60, 62, 63, 96, 123, 125]); -function isPathPercentEncode(c) { - return isC0ControlPercentEncode(c) || extraPathPercentEncodeSet.has(c); -} - -const extraUserinfoPercentEncodeSet = - new Set([47, 58, 59, 61, 64, 91, 92, 93, 94, 124]); -function isUserinfoPercentEncode(c) { - return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c); -} - -function percentEncodeChar(c, encodeSetPredicate) { - const cStr = String.fromCodePoint(c); - - if (encodeSetPredicate(c)) { - return utf8PercentEncode(cStr); - } - - return cStr; -} - -function parseIPv4Number(input) { - let R = 10; - - if (input.length >= 2 && input.charAt(0) === "0" && input.charAt(1).toLowerCase() === "x") { - input = input.substring(2); - R = 16; - } else if (input.length >= 2 && input.charAt(0) === "0") { - input = input.substring(1); - R = 8; - } - - if (input === "") { - return 0; - } - - const regex = R === 10 ? /[^0-9]/ : (R === 16 ? /[^0-9A-Fa-f]/ : /[^0-7]/); - if (regex.test(input)) { - return failure; - } - - return parseInt(input, R); -} - -function parseIPv4(input) { - const parts = input.split("."); - if (parts[parts.length - 1] === "") { - if (parts.length > 1) { - parts.pop(); - } - } - - if (parts.length > 4) { - return input; - } - - const numbers = []; - for (const part of parts) { - if (part === "") { - return input; - } - const n = parseIPv4Number(part); - if (n === failure) { - return input; - } - - numbers.push(n); - } - - for (let i = 0; i < numbers.length - 1; ++i) { - if (numbers[i] > 255) { - return failure; - } - } - if (numbers[numbers.length - 1] >= Math.pow(256, 5 - numbers.length)) { - return failure; - } - - let ipv4 = numbers.pop(); - let counter = 0; - - for (const n of numbers) { - ipv4 += n * Math.pow(256, 3 - counter); - ++counter; - } - - return ipv4; -} - -function serializeIPv4(address) { - let output = ""; - let n = address; - - for (let i = 1; i <= 4; ++i) { - output = String(n % 256) + output; - if (i !== 4) { - output = "." + output; - } - n = Math.floor(n / 256); - } - - return output; -} - -function parseIPv6(input) { - const address = [0, 0, 0, 0, 0, 0, 0, 0]; - let pieceIndex = 0; - let compress = null; - let pointer = 0; - - input = punycode.ucs2.decode(input); - - if (input[pointer] === 58) { - if (input[pointer + 1] !== 58) { - return failure; - } - - pointer += 2; - ++pieceIndex; - compress = pieceIndex; - } - - while (pointer < input.length) { - if (pieceIndex === 8) { - return failure; - } - - if (input[pointer] === 58) { - if (compress !== null) { - return failure; - } - ++pointer; - ++pieceIndex; - compress = pieceIndex; - continue; - } - - let value = 0; - let length = 0; - - while (length < 4 && isASCIIHex(input[pointer])) { - value = value * 0x10 + parseInt(at(input, pointer), 16); - ++pointer; - ++length; - } - - if (input[pointer] === 46) { - if (length === 0) { - return failure; - } - - pointer -= length; - - if (pieceIndex > 6) { - return failure; - } - - let numbersSeen = 0; - - while (input[pointer] !== undefined) { - let ipv4Piece = null; - - if (numbersSeen > 0) { - if (input[pointer] === 46 && numbersSeen < 4) { - ++pointer; - } else { - return failure; - } - } - - if (!isASCIIDigit(input[pointer])) { - return failure; - } - - while (isASCIIDigit(input[pointer])) { - const number = parseInt(at(input, pointer)); - if (ipv4Piece === null) { - ipv4Piece = number; - } else if (ipv4Piece === 0) { - return failure; - } else { - ipv4Piece = ipv4Piece * 10 + number; - } - if (ipv4Piece > 255) { - return failure; - } - ++pointer; - } - - address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece; - - ++numbersSeen; - - if (numbersSeen === 2 || numbersSeen === 4) { - ++pieceIndex; - } - } - - if (numbersSeen !== 4) { - return failure; - } - - break; - } else if (input[pointer] === 58) { - ++pointer; - if (input[pointer] === undefined) { - return failure; - } - } else if (input[pointer] !== undefined) { - return failure; - } - - address[pieceIndex] = value; - ++pieceIndex; - } - - if (compress !== null) { - let swaps = pieceIndex - compress; - pieceIndex = 7; - while (pieceIndex !== 0 && swaps > 0) { - const temp = address[compress + swaps - 1]; - address[compress + swaps - 1] = address[pieceIndex]; - address[pieceIndex] = temp; - --pieceIndex; - --swaps; - } - } else if (compress === null && pieceIndex !== 8) { - return failure; - } - - return address; -} - -function serializeIPv6(address) { - let output = ""; - const seqResult = findLongestZeroSequence(address); - const compress = seqResult.idx; - let ignore0 = false; - - for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { - if (ignore0 && address[pieceIndex] === 0) { - continue; - } else if (ignore0) { - ignore0 = false; - } - - if (compress === pieceIndex) { - const separator = pieceIndex === 0 ? "::" : ":"; - output += separator; - ignore0 = true; - continue; - } - - output += address[pieceIndex].toString(16); - - if (pieceIndex !== 7) { - output += ":"; - } - } - - return output; -} - -function parseHost(input, isSpecialArg) { - if (input[0] === "[") { - if (input[input.length - 1] !== "]") { - return failure; - } - - return parseIPv6(input.substring(1, input.length - 1)); - } - - if (!isSpecialArg) { - return parseOpaqueHost(input); - } - - const domain = utf8PercentDecode(input); - const asciiDomain = tr46.toASCII(domain, false, tr46.PROCESSING_OPTIONS.NONTRANSITIONAL, false); - if (asciiDomain === null) { - return failure; - } - - if (containsForbiddenHostCodePoint(asciiDomain)) { - return failure; - } - - const ipv4Host = parseIPv4(asciiDomain); - if (typeof ipv4Host === "number" || ipv4Host === failure) { - return ipv4Host; - } - - return asciiDomain; -} - -function parseOpaqueHost(input) { - if (containsForbiddenHostCodePointExcludingPercent(input)) { - return failure; - } - - let output = ""; - const decoded = punycode.ucs2.decode(input); - for (let i = 0; i < decoded.length; ++i) { - output += percentEncodeChar(decoded[i], isC0ControlPercentEncode); - } - return output; -} - -function findLongestZeroSequence(arr) { - let maxIdx = null; - let maxLen = 1; // only find elements > 1 - let currStart = null; - let currLen = 0; - - for (let i = 0; i < arr.length; ++i) { - if (arr[i] !== 0) { - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - currStart = null; - currLen = 0; - } else { - if (currStart === null) { - currStart = i; - } - ++currLen; - } - } - - // if trailing zeros - if (currLen > maxLen) { - maxIdx = currStart; - maxLen = currLen; - } - - return { - idx: maxIdx, - len: maxLen - }; -} - -function serializeHost(host) { - if (typeof host === "number") { - return serializeIPv4(host); - } - - // IPv6 serializer - if (host instanceof Array) { - return "[" + serializeIPv6(host) + "]"; - } - - return host; -} - -function trimControlChars(url) { - return url.replace(/^[\u0000-\u001F\u0020]+|[\u0000-\u001F\u0020]+$/g, ""); -} - -function trimTabAndNewline(url) { - return url.replace(/\u0009|\u000A|\u000D/g, ""); -} - -function shortenPath(url) { - const path = url.path; - if (path.length === 0) { - return; - } - if (url.scheme === "file" && path.length === 1 && isNormalizedWindowsDriveLetter(path[0])) { - return; - } - - path.pop(); -} - -function includesCredentials(url) { - return url.username !== "" || url.password !== ""; -} - -function cannotHaveAUsernamePasswordPort(url) { - return url.host === null || url.host === "" || url.cannotBeABaseURL || url.scheme === "file"; -} - -function isNormalizedWindowsDriveLetter(string) { - return /^[A-Za-z]:$/.test(string); -} - -function URLStateMachine(input, base, encodingOverride, url, stateOverride) { - this.pointer = 0; - this.input = input; - this.base = base || null; - this.encodingOverride = encodingOverride || "utf-8"; - this.stateOverride = stateOverride; - this.url = url; - this.failure = false; - this.parseError = false; - - if (!this.url) { - this.url = { - scheme: "", - username: "", - password: "", - host: null, - port: null, - path: [], - query: null, - fragment: null, - - cannotBeABaseURL: false - }; - - const res = trimControlChars(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - } - - const res = trimTabAndNewline(this.input); - if (res !== this.input) { - this.parseError = true; - } - this.input = res; - - this.state = stateOverride || "scheme start"; - - this.buffer = ""; - this.atFlag = false; - this.arrFlag = false; - this.passwordTokenSeenFlag = false; - - this.input = punycode.ucs2.decode(this.input); - - for (; this.pointer <= this.input.length; ++this.pointer) { - const c = this.input[this.pointer]; - const cStr = isNaN(c) ? undefined : String.fromCodePoint(c); - - // exec state machine - const ret = this["parse " + this.state](c, cStr); - if (!ret) { - break; // terminate algorithm - } else if (ret === failure) { - this.failure = true; - break; - } - } -} - -URLStateMachine.prototype["parse scheme start"] = function parseSchemeStart(c, cStr) { - if (isASCIIAlpha(c)) { - this.buffer += cStr.toLowerCase(); - this.state = "scheme"; - } else if (!this.stateOverride) { - this.state = "no scheme"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse scheme"] = function parseScheme(c, cStr) { - if (isASCIIAlphanumeric(c) || c === 43 || c === 45 || c === 46) { - this.buffer += cStr.toLowerCase(); - } else if (c === 58) { - if (this.stateOverride) { - if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) { - return false; - } - - if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) { - return false; - } - - if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === "file") { - return false; - } - - if (this.url.scheme === "file" && (this.url.host === "" || this.url.host === null)) { - return false; - } - } - this.url.scheme = this.buffer; - this.buffer = ""; - if (this.stateOverride) { - return false; - } - if (this.url.scheme === "file") { - if (this.input[this.pointer + 1] !== 47 || this.input[this.pointer + 2] !== 47) { - this.parseError = true; - } - this.state = "file"; - } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) { - this.state = "special relative or authority"; - } else if (isSpecial(this.url)) { - this.state = "special authority slashes"; - } else if (this.input[this.pointer + 1] === 47) { - this.state = "path or authority"; - ++this.pointer; - } else { - this.url.cannotBeABaseURL = true; - this.url.path.push(""); - this.state = "cannot-be-a-base-URL path"; - } - } else if (!this.stateOverride) { - this.buffer = ""; - this.state = "no scheme"; - this.pointer = -1; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -URLStateMachine.prototype["parse no scheme"] = function parseNoScheme(c) { - if (this.base === null || (this.base.cannotBeABaseURL && c !== 35)) { - return failure; - } else if (this.base.cannotBeABaseURL && c === 35) { - this.url.scheme = this.base.scheme; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.url.cannotBeABaseURL = true; - this.state = "fragment"; - } else if (this.base.scheme === "file") { - this.state = "file"; - --this.pointer; - } else { - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special relative or authority"] = function parseSpecialRelativeOrAuthority(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "relative"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse path or authority"] = function parsePathOrAuthority(c) { - if (c === 47) { - this.state = "authority"; - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative"] = function parseRelative(c) { - this.url.scheme = this.base.scheme; - if (isNaN(c)) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 47) { - this.state = "relative slash"; - } else if (c === 63) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else if (isSpecial(this.url) && c === 92) { - this.parseError = true; - this.state = "relative slash"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.url.path = this.base.path.slice(0, this.base.path.length - 1); - - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse relative slash"] = function parseRelativeSlash(c) { - if (isSpecial(this.url) && (c === 47 || c === 92)) { - if (c === 92) { - this.parseError = true; - } - this.state = "special authority ignore slashes"; - } else if (c === 47) { - this.state = "authority"; - } else { - this.url.username = this.base.username; - this.url.password = this.base.password; - this.url.host = this.base.host; - this.url.port = this.base.port; - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority slashes"] = function parseSpecialAuthoritySlashes(c) { - if (c === 47 && this.input[this.pointer + 1] === 47) { - this.state = "special authority ignore slashes"; - ++this.pointer; - } else { - this.parseError = true; - this.state = "special authority ignore slashes"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse special authority ignore slashes"] = function parseSpecialAuthorityIgnoreSlashes(c) { - if (c !== 47 && c !== 92) { - this.state = "authority"; - --this.pointer; - } else { - this.parseError = true; - } - - return true; -}; - -URLStateMachine.prototype["parse authority"] = function parseAuthority(c, cStr) { - if (c === 64) { - this.parseError = true; - if (this.atFlag) { - this.buffer = "%40" + this.buffer; - } - this.atFlag = true; - - // careful, this is based on buffer and has its own pointer (this.pointer != pointer) and inner chars - const len = countSymbols(this.buffer); - for (let pointer = 0; pointer < len; ++pointer) { - const codePoint = this.buffer.codePointAt(pointer); - - if (codePoint === 58 && !this.passwordTokenSeenFlag) { - this.passwordTokenSeenFlag = true; - continue; - } - const encodedCodePoints = percentEncodeChar(codePoint, isUserinfoPercentEncode); - if (this.passwordTokenSeenFlag) { - this.url.password += encodedCodePoints; - } else { - this.url.username += encodedCodePoints; - } - } - this.buffer = ""; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - if (this.atFlag && this.buffer === "") { - this.parseError = true; - return failure; - } - this.pointer -= countSymbols(this.buffer) + 1; - this.buffer = ""; - this.state = "host"; - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse hostname"] = -URLStateMachine.prototype["parse host"] = function parseHostName(c, cStr) { - if (this.stateOverride && this.url.scheme === "file") { - --this.pointer; - this.state = "file host"; - } else if (c === 58 && !this.arrFlag) { - if (this.buffer === "") { - this.parseError = true; - return failure; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "port"; - if (this.stateOverride === "hostname") { - return false; - } - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92)) { - --this.pointer; - if (isSpecial(this.url) && this.buffer === "") { - this.parseError = true; - return failure; - } else if (this.stateOverride && this.buffer === "" && - (includesCredentials(this.url) || this.url.port !== null)) { - this.parseError = true; - return false; - } - - const host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - - this.url.host = host; - this.buffer = ""; - this.state = "path start"; - if (this.stateOverride) { - return false; - } - } else { - if (c === 91) { - this.arrFlag = true; - } else if (c === 93) { - this.arrFlag = false; - } - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse port"] = function parsePort(c, cStr) { - if (isASCIIDigit(c)) { - this.buffer += cStr; - } else if (isNaN(c) || c === 47 || c === 63 || c === 35 || - (isSpecial(this.url) && c === 92) || - this.stateOverride) { - if (this.buffer !== "") { - const port = parseInt(this.buffer); - if (port > Math.pow(2, 16) - 1) { - this.parseError = true; - return failure; - } - this.url.port = port === defaultPort(this.url.scheme) ? null : port; - this.buffer = ""; - } - if (this.stateOverride) { - return false; - } - this.state = "path start"; - --this.pointer; - } else { - this.parseError = true; - return failure; - } - - return true; -}; - -const fileOtherwiseCodePoints = new Set([47, 92, 63, 35]); - -URLStateMachine.prototype["parse file"] = function parseFile(c) { - this.url.scheme = "file"; - - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file slash"; - } else if (this.base !== null && this.base.scheme === "file") { - if (isNaN(c)) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - } else if (c === 63) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - this.url.query = this.base.query; - this.url.fragment = ""; - this.state = "fragment"; - } else { - if (this.input.length - this.pointer - 1 === 0 || // remaining consists of 0 code points - !isWindowsDriveLetterCodePoints(c, this.input[this.pointer + 1]) || - (this.input.length - this.pointer - 1 >= 2 && // remaining has at least 2 code points - !fileOtherwiseCodePoints.has(this.input[this.pointer + 2]))) { - this.url.host = this.base.host; - this.url.path = this.base.path.slice(); - shortenPath(this.url); - } else { - this.parseError = true; - } - - this.state = "path"; - --this.pointer; - } - } else { - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file slash"] = function parseFileSlash(c) { - if (c === 47 || c === 92) { - if (c === 92) { - this.parseError = true; - } - this.state = "file host"; - } else { - if (this.base !== null && this.base.scheme === "file") { - if (isNormalizedWindowsDriveLetterString(this.base.path[0])) { - this.url.path.push(this.base.path[0]); - } else { - this.url.host = this.base.host; - } - } - this.state = "path"; - --this.pointer; - } - - return true; -}; - -URLStateMachine.prototype["parse file host"] = function parseFileHost(c, cStr) { - if (isNaN(c) || c === 47 || c === 92 || c === 63 || c === 35) { - --this.pointer; - if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) { - this.parseError = true; - this.state = "path"; - } else if (this.buffer === "") { - this.url.host = ""; - if (this.stateOverride) { - return false; - } - this.state = "path start"; - } else { - let host = parseHost(this.buffer, isSpecial(this.url)); - if (host === failure) { - return failure; - } - if (host === "localhost") { - host = ""; - } - this.url.host = host; - - if (this.stateOverride) { - return false; - } - - this.buffer = ""; - this.state = "path start"; - } - } else { - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse path start"] = function parsePathStart(c) { - if (isSpecial(this.url)) { - if (c === 92) { - this.parseError = true; - } - this.state = "path"; - - if (c !== 47 && c !== 92) { - --this.pointer; - } - } else if (!this.stateOverride && c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (!this.stateOverride && c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else if (c !== undefined) { - this.state = "path"; - if (c !== 47) { - --this.pointer; - } - } - - return true; -}; - -URLStateMachine.prototype["parse path"] = function parsePath(c) { - if (isNaN(c) || c === 47 || (isSpecial(this.url) && c === 92) || - (!this.stateOverride && (c === 63 || c === 35))) { - if (isSpecial(this.url) && c === 92) { - this.parseError = true; - } - - if (isDoubleDot(this.buffer)) { - shortenPath(this.url); - if (c !== 47 && !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } - } else if (isSingleDot(this.buffer) && c !== 47 && - !(isSpecial(this.url) && c === 92)) { - this.url.path.push(""); - } else if (!isSingleDot(this.buffer)) { - if (this.url.scheme === "file" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) { - if (this.url.host !== "" && this.url.host !== null) { - this.parseError = true; - this.url.host = ""; - } - this.buffer = this.buffer[0] + ":"; - } - this.url.path.push(this.buffer); - } - this.buffer = ""; - if (this.url.scheme === "file" && (c === undefined || c === 63 || c === 35)) { - while (this.url.path.length > 1 && this.url.path[0] === "") { - this.parseError = true; - this.url.path.shift(); - } - } - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += percentEncodeChar(c, isPathPercentEncode); - } - - return true; -}; - -URLStateMachine.prototype["parse cannot-be-a-base-URL path"] = function parseCannotBeABaseURLPath(c) { - if (c === 63) { - this.url.query = ""; - this.state = "query"; - } else if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } else { - // TODO: Add: not a URL code point - if (!isNaN(c) && c !== 37) { - this.parseError = true; - } - - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - if (!isNaN(c)) { - this.url.path[0] = this.url.path[0] + percentEncodeChar(c, isC0ControlPercentEncode); - } - } - - return true; -}; - -URLStateMachine.prototype["parse query"] = function parseQuery(c, cStr) { - if (isNaN(c) || (!this.stateOverride && c === 35)) { - if (!isSpecial(this.url) || this.url.scheme === "ws" || this.url.scheme === "wss") { - this.encodingOverride = "utf-8"; - } - - const buffer = new Buffer(this.buffer); // TODO: Use encoding override instead - for (let i = 0; i < buffer.length; ++i) { - if (buffer[i] < 0x21 || buffer[i] > 0x7E || buffer[i] === 0x22 || buffer[i] === 0x23 || - buffer[i] === 0x3C || buffer[i] === 0x3E) { - this.url.query += percentEncode(buffer[i]); - } else { - this.url.query += String.fromCodePoint(buffer[i]); - } - } - - this.buffer = ""; - if (c === 35) { - this.url.fragment = ""; - this.state = "fragment"; - } - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.buffer += cStr; - } - - return true; -}; - -URLStateMachine.prototype["parse fragment"] = function parseFragment(c) { - if (isNaN(c)) { // do nothing - } else if (c === 0x0) { - this.parseError = true; - } else { - // TODO: If c is not a URL code point and not "%", parse error. - if (c === 37 && - (!isASCIIHex(this.input[this.pointer + 1]) || - !isASCIIHex(this.input[this.pointer + 2]))) { - this.parseError = true; - } - - this.url.fragment += percentEncodeChar(c, isC0ControlPercentEncode); - } - - return true; -}; - -function serializeURL(url, excludeFragment) { - let output = url.scheme + ":"; - if (url.host !== null) { - output += "//"; - - if (url.username !== "" || url.password !== "") { - output += url.username; - if (url.password !== "") { - output += ":" + url.password; - } - output += "@"; - } - - output += serializeHost(url.host); - - if (url.port !== null) { - output += ":" + url.port; - } - } else if (url.host === null && url.scheme === "file") { - output += "//"; - } - - if (url.cannotBeABaseURL) { - output += url.path[0]; - } else { - for (const string of url.path) { - output += "/" + string; - } - } - - if (url.query !== null) { - output += "?" + url.query; - } - - if (!excludeFragment && url.fragment !== null) { - output += "#" + url.fragment; - } - - return output; -} - -function serializeOrigin(tuple) { - let result = tuple.scheme + "://"; - result += serializeHost(tuple.host); - - if (tuple.port !== null) { - result += ":" + tuple.port; - } - - return result; -} - -module.exports.serializeURL = serializeURL; - -module.exports.serializeURLOrigin = function (url) { - // https://url.spec.whatwg.org/#concept-url-origin - switch (url.scheme) { - case "blob": - try { - return module.exports.serializeURLOrigin(module.exports.parseURL(url.path[0])); - } catch (e) { - // serializing an opaque origin returns "null" - return "null"; - } - case "ftp": - case "gopher": - case "http": - case "https": - case "ws": - case "wss": - return serializeOrigin({ - scheme: url.scheme, - host: url.host, - port: url.port - }); - case "file": - // spec says "exercise to the reader", chrome says "file://" - return "file://"; - default: - // serializing an opaque origin returns "null" - return "null"; - } -}; - -module.exports.basicURLParse = function (input, options) { - if (options === undefined) { - options = {}; - } - - const usm = new URLStateMachine(input, options.baseURL, options.encodingOverride, options.url, options.stateOverride); - if (usm.failure) { - return "failure"; - } - - return usm.url; -}; - -module.exports.setTheUsername = function (url, username) { - url.username = ""; - const decoded = punycode.ucs2.decode(username); - for (let i = 0; i < decoded.length; ++i) { - url.username += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.setThePassword = function (url, password) { - url.password = ""; - const decoded = punycode.ucs2.decode(password); - for (let i = 0; i < decoded.length; ++i) { - url.password += percentEncodeChar(decoded[i], isUserinfoPercentEncode); - } -}; - -module.exports.serializeHost = serializeHost; - -module.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort; - -module.exports.serializeInteger = function (integer) { - return String(integer); -}; - -module.exports.parseURL = function (input, options) { - if (options === undefined) { - options = {}; - } - - // We don't handle blobs, so this just delegates: - return module.exports.basicURLParse(input, { baseURL: options.baseURL, encodingOverride: options.encodingOverride }); -}; + return true +} + +exports.Redirect = Redirect /***/ }), -/* 1317 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var punycode = __webpack_require__(86); -var mappingTable = __webpack_require__(1318); - -var PROCESSING_OPTIONS = { - TRANSITIONAL: 0, - NONTRANSITIONAL: 1 -}; +var url = __webpack_require__(83) +var tunnel = __webpack_require__(270) -function normalize(str) { // fix bug in v8 - return str.split('\u0000').map(function (s) { return s.normalize('NFC'); }).join('\u0000'); -} +var defaultProxyHeaderWhiteList = [ + 'accept', + 'accept-charset', + 'accept-encoding', + 'accept-language', + 'accept-ranges', + 'cache-control', + 'content-encoding', + 'content-language', + 'content-location', + 'content-md5', + 'content-range', + 'content-type', + 'connection', + 'date', + 'expect', + 'max-forwards', + 'pragma', + 'referer', + 'te', + 'user-agent', + 'via' +] -function findStatus(val) { - var start = 0; - var end = mappingTable.length - 1; +var defaultProxyHeaderExclusiveList = [ + 'proxy-authorization' +] - while (start <= end) { - var mid = Math.floor((start + end) / 2); +function constructProxyHost (uriObject) { + var port = uriObject.port + var protocol = uriObject.protocol + var proxyHost = uriObject.hostname + ':' - var target = mappingTable[mid]; - if (target[0][0] <= val && target[0][1] >= val) { - return target; - } else if (target[0][0] > val) { - end = mid - 1; - } else { - start = mid + 1; - } + if (port) { + proxyHost += port + } else if (protocol === 'https:') { + proxyHost += '443' + } else { + proxyHost += '80' } - return null; + return proxyHost } -var regexAstralSymbols = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g; +function constructProxyHeaderWhiteList (headers, proxyHeaderWhiteList) { + var whiteList = proxyHeaderWhiteList + .reduce(function (set, header) { + set[header.toLowerCase()] = true + return set + }, {}) -function countSymbols(string) { - return string - // replace every surrogate pair with a BMP symbol - .replace(regexAstralSymbols, '_') - // then get the length - .length; + return Object.keys(headers) + .filter(function (header) { + return whiteList[header.toLowerCase()] + }) + .reduce(function (set, header) { + set[header] = headers[header] + return set + }, {}) } -function mapChars(domain_name, useSTD3, processing_option) { - var hasError = false; - var processed = ""; - - var len = countSymbols(domain_name); - for (var i = 0; i < len; ++i) { - var codePoint = domain_name.codePointAt(i); - var status = findStatus(codePoint); - - switch (status[1]) { - case "disallowed": - hasError = true; - processed += String.fromCodePoint(codePoint); - break; - case "ignored": - break; - case "mapped": - processed += String.fromCodePoint.apply(String, status[2]); - break; - case "deviation": - if (processing_option === PROCESSING_OPTIONS.TRANSITIONAL) { - processed += String.fromCodePoint.apply(String, status[2]); - } else { - processed += String.fromCodePoint(codePoint); - } - break; - case "valid": - processed += String.fromCodePoint(codePoint); - break; - case "disallowed_STD3_mapped": - if (useSTD3) { - hasError = true; - processed += String.fromCodePoint(codePoint); - } else { - processed += String.fromCodePoint.apply(String, status[2]); - } - break; - case "disallowed_STD3_valid": - if (useSTD3) { - hasError = true; - } +function constructTunnelOptions (request, proxyHeaders) { + var proxy = request.proxy - processed += String.fromCodePoint(codePoint); - break; - } + var tunnelOptions = { + proxy: { + host: proxy.hostname, + port: +proxy.port, + proxyAuth: proxy.auth, + headers: proxyHeaders + }, + headers: request.headers, + ca: request.ca, + cert: request.cert, + key: request.key, + passphrase: request.passphrase, + pfx: request.pfx, + ciphers: request.ciphers, + rejectUnauthorized: request.rejectUnauthorized, + secureOptions: request.secureOptions, + secureProtocol: request.secureProtocol } - return { - string: processed, - error: hasError - }; + return tunnelOptions +} + +function constructTunnelFnName (uri, proxy) { + var uriProtocol = (uri.protocol === 'https:' ? 'https' : 'http') + var proxyProtocol = (proxy.protocol === 'https:' ? 'Https' : 'Http') + return [uriProtocol, proxyProtocol].join('Over') } -var combiningMarksRegex = /[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08E4-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C03\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D01-\u0D03\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u18A9\u1920-\u192B\u1930-\u193B\u19B0-\u19C0\u19C8\u19C9\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF8\u1CF9\u1DC0-\u1DF5\u1DFC-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C4\uA8E0-\uA8F1\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2D]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC7F-\uDC82\uDCB0-\uDCBA\uDD00-\uDD02\uDD27-\uDD34\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDE2C-\uDE37\uDEDF-\uDEEA\uDF01-\uDF03\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDE30-\uDE40\uDEAB-\uDEB7]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF51-\uDF7E\uDF8F-\uDF92]|\uD82F[\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD83A[\uDCD0-\uDCD6]|\uDB40[\uDD00-\uDDEF]/; +function getTunnelFn (request) { + var uri = request.uri + var proxy = request.proxy + var tunnelFnName = constructTunnelFnName(uri, proxy) + return tunnel[tunnelFnName] +} -function validateLabel(label, processing_option) { - if (label.substr(0, 4) === "xn--") { - label = punycode.toUnicode(label); - processing_option = PROCESSING_OPTIONS.NONTRANSITIONAL; +function Tunnel (request) { + this.request = request + this.proxyHeaderWhiteList = defaultProxyHeaderWhiteList + this.proxyHeaderExclusiveList = [] + if (typeof request.tunnel !== 'undefined') { + this.tunnelOverride = request.tunnel } +} - var error = false; +Tunnel.prototype.isEnabled = function () { + var self = this + var request = self.request + // Tunnel HTTPS by default. Allow the user to override this setting. - if (normalize(label) !== label || - (label[3] === "-" && label[4] === "-") || - label[0] === "-" || label[label.length - 1] === "-" || - label.indexOf(".") !== -1 || - label.search(combiningMarksRegex) === 0) { - error = true; + // If self.tunnelOverride is set (the user specified a value), use it. + if (typeof self.tunnelOverride !== 'undefined') { + return self.tunnelOverride } - var len = countSymbols(label); - for (var i = 0; i < len; ++i) { - var status = findStatus(label.codePointAt(i)); - if ((processing === PROCESSING_OPTIONS.TRANSITIONAL && status[1] !== "valid") || - (processing === PROCESSING_OPTIONS.NONTRANSITIONAL && - status[1] !== "valid" && status[1] !== "deviation")) { - error = true; - break; - } + // If the destination is HTTPS, tunnel. + if (request.uri.protocol === 'https:') { + return true } - return { - label: label, - error: error - }; + // Otherwise, do not use tunnel. + return false } -function processing(domain_name, useSTD3, processing_option) { - var result = mapChars(domain_name, useSTD3, processing_option); - result.string = normalize(result.string); - - var labels = result.string.split("."); - for (var i = 0; i < labels.length; ++i) { - try { - var validation = validateLabel(labels[i]); - labels[i] = validation.label; - result.error = result.error || validation.error; - } catch(e) { - result.error = true; - } - } +Tunnel.prototype.setup = function (options) { + var self = this + var request = self.request - return { - string: labels.join("."), - error: result.error - }; -} + options = options || {} -module.exports.toASCII = function(domain_name, useSTD3, processing_option, verifyDnsLength) { - var result = processing(domain_name, useSTD3, processing_option); - var labels = result.string.split("."); - labels = labels.map(function(l) { - try { - return punycode.toASCII(l); - } catch(e) { - result.error = true; - return l; - } - }); + if (typeof request.proxy === 'string') { + request.proxy = url.parse(request.proxy) + } - if (verifyDnsLength) { - var total = labels.slice(0, labels.length - 1).join(".").length; - if (total.length > 253 || total.length === 0) { - result.error = true; - } + if (!request.proxy || !request.tunnel) { + return false + } - for (var i=0; i < labels.length; ++i) { - if (labels.length > 63 || labels.length === 0) { - result.error = true; - break; - } - } + // Setup Proxy Header Exclusive List and White List + if (options.proxyHeaderWhiteList) { + self.proxyHeaderWhiteList = options.proxyHeaderWhiteList + } + if (options.proxyHeaderExclusiveList) { + self.proxyHeaderExclusiveList = options.proxyHeaderExclusiveList } - if (result.error) return null; - return labels.join("."); -}; + var proxyHeaderExclusiveList = self.proxyHeaderExclusiveList.concat(defaultProxyHeaderExclusiveList) + var proxyHeaderWhiteList = self.proxyHeaderWhiteList.concat(proxyHeaderExclusiveList) -module.exports.toUnicode = function(domain_name, useSTD3) { - var result = processing(domain_name, useSTD3, PROCESSING_OPTIONS.NONTRANSITIONAL); + // Setup Proxy Headers and Proxy Headers Host + // Only send the Proxy White Listed Header names + var proxyHeaders = constructProxyHeaderWhiteList(request.headers, proxyHeaderWhiteList) + proxyHeaders.host = constructProxyHost(request.uri) - return { - domain: result.string, - error: result.error - }; -}; + proxyHeaderExclusiveList.forEach(request.removeHeader, request) -module.exports.PROCESSING_OPTIONS = PROCESSING_OPTIONS; + // Set Agent from Tunnel Data + var tunnelFn = getTunnelFn(request) + var tunnelOptions = constructTunnelOptions(request, proxyHeaders) + request.agent = tunnelFn(tunnelOptions) + return true +} -/***/ }), -/* 1318 */ -/***/ (function(module) { +Tunnel.defaultProxyHeaderWhiteList = defaultProxyHeaderWhiteList +Tunnel.defaultProxyHeaderExclusiveList = defaultProxyHeaderExclusiveList +exports.Tunnel = Tunnel -module.exports = JSON.parse("[[[0,44],\"disallowed_STD3_valid\"],[[45,46],\"valid\"],[[47,47],\"disallowed_STD3_valid\"],[[48,57],\"valid\"],[[58,64],\"disallowed_STD3_valid\"],[[65,65],\"mapped\",[97]],[[66,66],\"mapped\",[98]],[[67,67],\"mapped\",[99]],[[68,68],\"mapped\",[100]],[[69,69],\"mapped\",[101]],[[70,70],\"mapped\",[102]],[[71,71],\"mapped\",[103]],[[72,72],\"mapped\",[104]],[[73,73],\"mapped\",[105]],[[74,74],\"mapped\",[106]],[[75,75],\"mapped\",[107]],[[76,76],\"mapped\",[108]],[[77,77],\"mapped\",[109]],[[78,78],\"mapped\",[110]],[[79,79],\"mapped\",[111]],[[80,80],\"mapped\",[112]],[[81,81],\"mapped\",[113]],[[82,82],\"mapped\",[114]],[[83,83],\"mapped\",[115]],[[84,84],\"mapped\",[116]],[[85,85],\"mapped\",[117]],[[86,86],\"mapped\",[118]],[[87,87],\"mapped\",[119]],[[88,88],\"mapped\",[120]],[[89,89],\"mapped\",[121]],[[90,90],\"mapped\",[122]],[[91,96],\"disallowed_STD3_valid\"],[[97,122],\"valid\"],[[123,127],\"disallowed_STD3_valid\"],[[128,159],\"disallowed\"],[[160,160],\"disallowed_STD3_mapped\",[32]],[[161,167],\"valid\",[],\"NV8\"],[[168,168],\"disallowed_STD3_mapped\",[32,776]],[[169,169],\"valid\",[],\"NV8\"],[[170,170],\"mapped\",[97]],[[171,172],\"valid\",[],\"NV8\"],[[173,173],\"ignored\"],[[174,174],\"valid\",[],\"NV8\"],[[175,175],\"disallowed_STD3_mapped\",[32,772]],[[176,177],\"valid\",[],\"NV8\"],[[178,178],\"mapped\",[50]],[[179,179],\"mapped\",[51]],[[180,180],\"disallowed_STD3_mapped\",[32,769]],[[181,181],\"mapped\",[956]],[[182,182],\"valid\",[],\"NV8\"],[[183,183],\"valid\"],[[184,184],\"disallowed_STD3_mapped\",[32,807]],[[185,185],\"mapped\",[49]],[[186,186],\"mapped\",[111]],[[187,187],\"valid\",[],\"NV8\"],[[188,188],\"mapped\",[49,8260,52]],[[189,189],\"mapped\",[49,8260,50]],[[190,190],\"mapped\",[51,8260,52]],[[191,191],\"valid\",[],\"NV8\"],[[192,192],\"mapped\",[224]],[[193,193],\"mapped\",[225]],[[194,194],\"mapped\",[226]],[[195,195],\"mapped\",[227]],[[196,196],\"mapped\",[228]],[[197,197],\"mapped\",[229]],[[198,198],\"mapped\",[230]],[[199,199],\"mapped\",[231]],[[200,200],\"mapped\",[232]],[[201,201],\"mapped\",[233]],[[202,202],\"mapped\",[234]],[[203,203],\"mapped\",[235]],[[204,204],\"mapped\",[236]],[[205,205],\"mapped\",[237]],[[206,206],\"mapped\",[238]],[[207,207],\"mapped\",[239]],[[208,208],\"mapped\",[240]],[[209,209],\"mapped\",[241]],[[210,210],\"mapped\",[242]],[[211,211],\"mapped\",[243]],[[212,212],\"mapped\",[244]],[[213,213],\"mapped\",[245]],[[214,214],\"mapped\",[246]],[[215,215],\"valid\",[],\"NV8\"],[[216,216],\"mapped\",[248]],[[217,217],\"mapped\",[249]],[[218,218],\"mapped\",[250]],[[219,219],\"mapped\",[251]],[[220,220],\"mapped\",[252]],[[221,221],\"mapped\",[253]],[[222,222],\"mapped\",[254]],[[223,223],\"deviation\",[115,115]],[[224,246],\"valid\"],[[247,247],\"valid\",[],\"NV8\"],[[248,255],\"valid\"],[[256,256],\"mapped\",[257]],[[257,257],\"valid\"],[[258,258],\"mapped\",[259]],[[259,259],\"valid\"],[[260,260],\"mapped\",[261]],[[261,261],\"valid\"],[[262,262],\"mapped\",[263]],[[263,263],\"valid\"],[[264,264],\"mapped\",[265]],[[265,265],\"valid\"],[[266,266],\"mapped\",[267]],[[267,267],\"valid\"],[[268,268],\"mapped\",[269]],[[269,269],\"valid\"],[[270,270],\"mapped\",[271]],[[271,271],\"valid\"],[[272,272],\"mapped\",[273]],[[273,273],\"valid\"],[[274,274],\"mapped\",[275]],[[275,275],\"valid\"],[[276,276],\"mapped\",[277]],[[277,277],\"valid\"],[[278,278],\"mapped\",[279]],[[279,279],\"valid\"],[[280,280],\"mapped\",[281]],[[281,281],\"valid\"],[[282,282],\"mapped\",[283]],[[283,283],\"valid\"],[[284,284],\"mapped\",[285]],[[285,285],\"valid\"],[[286,286],\"mapped\",[287]],[[287,287],\"valid\"],[[288,288],\"mapped\",[289]],[[289,289],\"valid\"],[[290,290],\"mapped\",[291]],[[291,291],\"valid\"],[[292,292],\"mapped\",[293]],[[293,293],\"valid\"],[[294,294],\"mapped\",[295]],[[295,295],\"valid\"],[[296,296],\"mapped\",[297]],[[297,297],\"valid\"],[[298,298],\"mapped\",[299]],[[299,299],\"valid\"],[[300,300],\"mapped\",[301]],[[301,301],\"valid\"],[[302,302],\"mapped\",[303]],[[303,303],\"valid\"],[[304,304],\"mapped\",[105,775]],[[305,305],\"valid\"],[[306,307],\"mapped\",[105,106]],[[308,308],\"mapped\",[309]],[[309,309],\"valid\"],[[310,310],\"mapped\",[311]],[[311,312],\"valid\"],[[313,313],\"mapped\",[314]],[[314,314],\"valid\"],[[315,315],\"mapped\",[316]],[[316,316],\"valid\"],[[317,317],\"mapped\",[318]],[[318,318],\"valid\"],[[319,320],\"mapped\",[108,183]],[[321,321],\"mapped\",[322]],[[322,322],\"valid\"],[[323,323],\"mapped\",[324]],[[324,324],\"valid\"],[[325,325],\"mapped\",[326]],[[326,326],\"valid\"],[[327,327],\"mapped\",[328]],[[328,328],\"valid\"],[[329,329],\"mapped\",[700,110]],[[330,330],\"mapped\",[331]],[[331,331],\"valid\"],[[332,332],\"mapped\",[333]],[[333,333],\"valid\"],[[334,334],\"mapped\",[335]],[[335,335],\"valid\"],[[336,336],\"mapped\",[337]],[[337,337],\"valid\"],[[338,338],\"mapped\",[339]],[[339,339],\"valid\"],[[340,340],\"mapped\",[341]],[[341,341],\"valid\"],[[342,342],\"mapped\",[343]],[[343,343],\"valid\"],[[344,344],\"mapped\",[345]],[[345,345],\"valid\"],[[346,346],\"mapped\",[347]],[[347,347],\"valid\"],[[348,348],\"mapped\",[349]],[[349,349],\"valid\"],[[350,350],\"mapped\",[351]],[[351,351],\"valid\"],[[352,352],\"mapped\",[353]],[[353,353],\"valid\"],[[354,354],\"mapped\",[355]],[[355,355],\"valid\"],[[356,356],\"mapped\",[357]],[[357,357],\"valid\"],[[358,358],\"mapped\",[359]],[[359,359],\"valid\"],[[360,360],\"mapped\",[361]],[[361,361],\"valid\"],[[362,362],\"mapped\",[363]],[[363,363],\"valid\"],[[364,364],\"mapped\",[365]],[[365,365],\"valid\"],[[366,366],\"mapped\",[367]],[[367,367],\"valid\"],[[368,368],\"mapped\",[369]],[[369,369],\"valid\"],[[370,370],\"mapped\",[371]],[[371,371],\"valid\"],[[372,372],\"mapped\",[373]],[[373,373],\"valid\"],[[374,374],\"mapped\",[375]],[[375,375],\"valid\"],[[376,376],\"mapped\",[255]],[[377,377],\"mapped\",[378]],[[378,378],\"valid\"],[[379,379],\"mapped\",[380]],[[380,380],\"valid\"],[[381,381],\"mapped\",[382]],[[382,382],\"valid\"],[[383,383],\"mapped\",[115]],[[384,384],\"valid\"],[[385,385],\"mapped\",[595]],[[386,386],\"mapped\",[387]],[[387,387],\"valid\"],[[388,388],\"mapped\",[389]],[[389,389],\"valid\"],[[390,390],\"mapped\",[596]],[[391,391],\"mapped\",[392]],[[392,392],\"valid\"],[[393,393],\"mapped\",[598]],[[394,394],\"mapped\",[599]],[[395,395],\"mapped\",[396]],[[396,397],\"valid\"],[[398,398],\"mapped\",[477]],[[399,399],\"mapped\",[601]],[[400,400],\"mapped\",[603]],[[401,401],\"mapped\",[402]],[[402,402],\"valid\"],[[403,403],\"mapped\",[608]],[[404,404],\"mapped\",[611]],[[405,405],\"valid\"],[[406,406],\"mapped\",[617]],[[407,407],\"mapped\",[616]],[[408,408],\"mapped\",[409]],[[409,411],\"valid\"],[[412,412],\"mapped\",[623]],[[413,413],\"mapped\",[626]],[[414,414],\"valid\"],[[415,415],\"mapped\",[629]],[[416,416],\"mapped\",[417]],[[417,417],\"valid\"],[[418,418],\"mapped\",[419]],[[419,419],\"valid\"],[[420,420],\"mapped\",[421]],[[421,421],\"valid\"],[[422,422],\"mapped\",[640]],[[423,423],\"mapped\",[424]],[[424,424],\"valid\"],[[425,425],\"mapped\",[643]],[[426,427],\"valid\"],[[428,428],\"mapped\",[429]],[[429,429],\"valid\"],[[430,430],\"mapped\",[648]],[[431,431],\"mapped\",[432]],[[432,432],\"valid\"],[[433,433],\"mapped\",[650]],[[434,434],\"mapped\",[651]],[[435,435],\"mapped\",[436]],[[436,436],\"valid\"],[[437,437],\"mapped\",[438]],[[438,438],\"valid\"],[[439,439],\"mapped\",[658]],[[440,440],\"mapped\",[441]],[[441,443],\"valid\"],[[444,444],\"mapped\",[445]],[[445,451],\"valid\"],[[452,454],\"mapped\",[100,382]],[[455,457],\"mapped\",[108,106]],[[458,460],\"mapped\",[110,106]],[[461,461],\"mapped\",[462]],[[462,462],\"valid\"],[[463,463],\"mapped\",[464]],[[464,464],\"valid\"],[[465,465],\"mapped\",[466]],[[466,466],\"valid\"],[[467,467],\"mapped\",[468]],[[468,468],\"valid\"],[[469,469],\"mapped\",[470]],[[470,470],\"valid\"],[[471,471],\"mapped\",[472]],[[472,472],\"valid\"],[[473,473],\"mapped\",[474]],[[474,474],\"valid\"],[[475,475],\"mapped\",[476]],[[476,477],\"valid\"],[[478,478],\"mapped\",[479]],[[479,479],\"valid\"],[[480,480],\"mapped\",[481]],[[481,481],\"valid\"],[[482,482],\"mapped\",[483]],[[483,483],\"valid\"],[[484,484],\"mapped\",[485]],[[485,485],\"valid\"],[[486,486],\"mapped\",[487]],[[487,487],\"valid\"],[[488,488],\"mapped\",[489]],[[489,489],\"valid\"],[[490,490],\"mapped\",[491]],[[491,491],\"valid\"],[[492,492],\"mapped\",[493]],[[493,493],\"valid\"],[[494,494],\"mapped\",[495]],[[495,496],\"valid\"],[[497,499],\"mapped\",[100,122]],[[500,500],\"mapped\",[501]],[[501,501],\"valid\"],[[502,502],\"mapped\",[405]],[[503,503],\"mapped\",[447]],[[504,504],\"mapped\",[505]],[[505,505],\"valid\"],[[506,506],\"mapped\",[507]],[[507,507],\"valid\"],[[508,508],\"mapped\",[509]],[[509,509],\"valid\"],[[510,510],\"mapped\",[511]],[[511,511],\"valid\"],[[512,512],\"mapped\",[513]],[[513,513],\"valid\"],[[514,514],\"mapped\",[515]],[[515,515],\"valid\"],[[516,516],\"mapped\",[517]],[[517,517],\"valid\"],[[518,518],\"mapped\",[519]],[[519,519],\"valid\"],[[520,520],\"mapped\",[521]],[[521,521],\"valid\"],[[522,522],\"mapped\",[523]],[[523,523],\"valid\"],[[524,524],\"mapped\",[525]],[[525,525],\"valid\"],[[526,526],\"mapped\",[527]],[[527,527],\"valid\"],[[528,528],\"mapped\",[529]],[[529,529],\"valid\"],[[530,530],\"mapped\",[531]],[[531,531],\"valid\"],[[532,532],\"mapped\",[533]],[[533,533],\"valid\"],[[534,534],\"mapped\",[535]],[[535,535],\"valid\"],[[536,536],\"mapped\",[537]],[[537,537],\"valid\"],[[538,538],\"mapped\",[539]],[[539,539],\"valid\"],[[540,540],\"mapped\",[541]],[[541,541],\"valid\"],[[542,542],\"mapped\",[543]],[[543,543],\"valid\"],[[544,544],\"mapped\",[414]],[[545,545],\"valid\"],[[546,546],\"mapped\",[547]],[[547,547],\"valid\"],[[548,548],\"mapped\",[549]],[[549,549],\"valid\"],[[550,550],\"mapped\",[551]],[[551,551],\"valid\"],[[552,552],\"mapped\",[553]],[[553,553],\"valid\"],[[554,554],\"mapped\",[555]],[[555,555],\"valid\"],[[556,556],\"mapped\",[557]],[[557,557],\"valid\"],[[558,558],\"mapped\",[559]],[[559,559],\"valid\"],[[560,560],\"mapped\",[561]],[[561,561],\"valid\"],[[562,562],\"mapped\",[563]],[[563,563],\"valid\"],[[564,566],\"valid\"],[[567,569],\"valid\"],[[570,570],\"mapped\",[11365]],[[571,571],\"mapped\",[572]],[[572,572],\"valid\"],[[573,573],\"mapped\",[410]],[[574,574],\"mapped\",[11366]],[[575,576],\"valid\"],[[577,577],\"mapped\",[578]],[[578,578],\"valid\"],[[579,579],\"mapped\",[384]],[[580,580],\"mapped\",[649]],[[581,581],\"mapped\",[652]],[[582,582],\"mapped\",[583]],[[583,583],\"valid\"],[[584,584],\"mapped\",[585]],[[585,585],\"valid\"],[[586,586],\"mapped\",[587]],[[587,587],\"valid\"],[[588,588],\"mapped\",[589]],[[589,589],\"valid\"],[[590,590],\"mapped\",[591]],[[591,591],\"valid\"],[[592,680],\"valid\"],[[681,685],\"valid\"],[[686,687],\"valid\"],[[688,688],\"mapped\",[104]],[[689,689],\"mapped\",[614]],[[690,690],\"mapped\",[106]],[[691,691],\"mapped\",[114]],[[692,692],\"mapped\",[633]],[[693,693],\"mapped\",[635]],[[694,694],\"mapped\",[641]],[[695,695],\"mapped\",[119]],[[696,696],\"mapped\",[121]],[[697,705],\"valid\"],[[706,709],\"valid\",[],\"NV8\"],[[710,721],\"valid\"],[[722,727],\"valid\",[],\"NV8\"],[[728,728],\"disallowed_STD3_mapped\",[32,774]],[[729,729],\"disallowed_STD3_mapped\",[32,775]],[[730,730],\"disallowed_STD3_mapped\",[32,778]],[[731,731],\"disallowed_STD3_mapped\",[32,808]],[[732,732],\"disallowed_STD3_mapped\",[32,771]],[[733,733],\"disallowed_STD3_mapped\",[32,779]],[[734,734],\"valid\",[],\"NV8\"],[[735,735],\"valid\",[],\"NV8\"],[[736,736],\"mapped\",[611]],[[737,737],\"mapped\",[108]],[[738,738],\"mapped\",[115]],[[739,739],\"mapped\",[120]],[[740,740],\"mapped\",[661]],[[741,745],\"valid\",[],\"NV8\"],[[746,747],\"valid\",[],\"NV8\"],[[748,748],\"valid\"],[[749,749],\"valid\",[],\"NV8\"],[[750,750],\"valid\"],[[751,767],\"valid\",[],\"NV8\"],[[768,831],\"valid\"],[[832,832],\"mapped\",[768]],[[833,833],\"mapped\",[769]],[[834,834],\"valid\"],[[835,835],\"mapped\",[787]],[[836,836],\"mapped\",[776,769]],[[837,837],\"mapped\",[953]],[[838,846],\"valid\"],[[847,847],\"ignored\"],[[848,855],\"valid\"],[[856,860],\"valid\"],[[861,863],\"valid\"],[[864,865],\"valid\"],[[866,866],\"valid\"],[[867,879],\"valid\"],[[880,880],\"mapped\",[881]],[[881,881],\"valid\"],[[882,882],\"mapped\",[883]],[[883,883],\"valid\"],[[884,884],\"mapped\",[697]],[[885,885],\"valid\"],[[886,886],\"mapped\",[887]],[[887,887],\"valid\"],[[888,889],\"disallowed\"],[[890,890],\"disallowed_STD3_mapped\",[32,953]],[[891,893],\"valid\"],[[894,894],\"disallowed_STD3_mapped\",[59]],[[895,895],\"mapped\",[1011]],[[896,899],\"disallowed\"],[[900,900],\"disallowed_STD3_mapped\",[32,769]],[[901,901],\"disallowed_STD3_mapped\",[32,776,769]],[[902,902],\"mapped\",[940]],[[903,903],\"mapped\",[183]],[[904,904],\"mapped\",[941]],[[905,905],\"mapped\",[942]],[[906,906],\"mapped\",[943]],[[907,907],\"disallowed\"],[[908,908],\"mapped\",[972]],[[909,909],\"disallowed\"],[[910,910],\"mapped\",[973]],[[911,911],\"mapped\",[974]],[[912,912],\"valid\"],[[913,913],\"mapped\",[945]],[[914,914],\"mapped\",[946]],[[915,915],\"mapped\",[947]],[[916,916],\"mapped\",[948]],[[917,917],\"mapped\",[949]],[[918,918],\"mapped\",[950]],[[919,919],\"mapped\",[951]],[[920,920],\"mapped\",[952]],[[921,921],\"mapped\",[953]],[[922,922],\"mapped\",[954]],[[923,923],\"mapped\",[955]],[[924,924],\"mapped\",[956]],[[925,925],\"mapped\",[957]],[[926,926],\"mapped\",[958]],[[927,927],\"mapped\",[959]],[[928,928],\"mapped\",[960]],[[929,929],\"mapped\",[961]],[[930,930],\"disallowed\"],[[931,931],\"mapped\",[963]],[[932,932],\"mapped\",[964]],[[933,933],\"mapped\",[965]],[[934,934],\"mapped\",[966]],[[935,935],\"mapped\",[967]],[[936,936],\"mapped\",[968]],[[937,937],\"mapped\",[969]],[[938,938],\"mapped\",[970]],[[939,939],\"mapped\",[971]],[[940,961],\"valid\"],[[962,962],\"deviation\",[963]],[[963,974],\"valid\"],[[975,975],\"mapped\",[983]],[[976,976],\"mapped\",[946]],[[977,977],\"mapped\",[952]],[[978,978],\"mapped\",[965]],[[979,979],\"mapped\",[973]],[[980,980],\"mapped\",[971]],[[981,981],\"mapped\",[966]],[[982,982],\"mapped\",[960]],[[983,983],\"valid\"],[[984,984],\"mapped\",[985]],[[985,985],\"valid\"],[[986,986],\"mapped\",[987]],[[987,987],\"valid\"],[[988,988],\"mapped\",[989]],[[989,989],\"valid\"],[[990,990],\"mapped\",[991]],[[991,991],\"valid\"],[[992,992],\"mapped\",[993]],[[993,993],\"valid\"],[[994,994],\"mapped\",[995]],[[995,995],\"valid\"],[[996,996],\"mapped\",[997]],[[997,997],\"valid\"],[[998,998],\"mapped\",[999]],[[999,999],\"valid\"],[[1000,1000],\"mapped\",[1001]],[[1001,1001],\"valid\"],[[1002,1002],\"mapped\",[1003]],[[1003,1003],\"valid\"],[[1004,1004],\"mapped\",[1005]],[[1005,1005],\"valid\"],[[1006,1006],\"mapped\",[1007]],[[1007,1007],\"valid\"],[[1008,1008],\"mapped\",[954]],[[1009,1009],\"mapped\",[961]],[[1010,1010],\"mapped\",[963]],[[1011,1011],\"valid\"],[[1012,1012],\"mapped\",[952]],[[1013,1013],\"mapped\",[949]],[[1014,1014],\"valid\",[],\"NV8\"],[[1015,1015],\"mapped\",[1016]],[[1016,1016],\"valid\"],[[1017,1017],\"mapped\",[963]],[[1018,1018],\"mapped\",[1019]],[[1019,1019],\"valid\"],[[1020,1020],\"valid\"],[[1021,1021],\"mapped\",[891]],[[1022,1022],\"mapped\",[892]],[[1023,1023],\"mapped\",[893]],[[1024,1024],\"mapped\",[1104]],[[1025,1025],\"mapped\",[1105]],[[1026,1026],\"mapped\",[1106]],[[1027,1027],\"mapped\",[1107]],[[1028,1028],\"mapped\",[1108]],[[1029,1029],\"mapped\",[1109]],[[1030,1030],\"mapped\",[1110]],[[1031,1031],\"mapped\",[1111]],[[1032,1032],\"mapped\",[1112]],[[1033,1033],\"mapped\",[1113]],[[1034,1034],\"mapped\",[1114]],[[1035,1035],\"mapped\",[1115]],[[1036,1036],\"mapped\",[1116]],[[1037,1037],\"mapped\",[1117]],[[1038,1038],\"mapped\",[1118]],[[1039,1039],\"mapped\",[1119]],[[1040,1040],\"mapped\",[1072]],[[1041,1041],\"mapped\",[1073]],[[1042,1042],\"mapped\",[1074]],[[1043,1043],\"mapped\",[1075]],[[1044,1044],\"mapped\",[1076]],[[1045,1045],\"mapped\",[1077]],[[1046,1046],\"mapped\",[1078]],[[1047,1047],\"mapped\",[1079]],[[1048,1048],\"mapped\",[1080]],[[1049,1049],\"mapped\",[1081]],[[1050,1050],\"mapped\",[1082]],[[1051,1051],\"mapped\",[1083]],[[1052,1052],\"mapped\",[1084]],[[1053,1053],\"mapped\",[1085]],[[1054,1054],\"mapped\",[1086]],[[1055,1055],\"mapped\",[1087]],[[1056,1056],\"mapped\",[1088]],[[1057,1057],\"mapped\",[1089]],[[1058,1058],\"mapped\",[1090]],[[1059,1059],\"mapped\",[1091]],[[1060,1060],\"mapped\",[1092]],[[1061,1061],\"mapped\",[1093]],[[1062,1062],\"mapped\",[1094]],[[1063,1063],\"mapped\",[1095]],[[1064,1064],\"mapped\",[1096]],[[1065,1065],\"mapped\",[1097]],[[1066,1066],\"mapped\",[1098]],[[1067,1067],\"mapped\",[1099]],[[1068,1068],\"mapped\",[1100]],[[1069,1069],\"mapped\",[1101]],[[1070,1070],\"mapped\",[1102]],[[1071,1071],\"mapped\",[1103]],[[1072,1103],\"valid\"],[[1104,1104],\"valid\"],[[1105,1116],\"valid\"],[[1117,1117],\"valid\"],[[1118,1119],\"valid\"],[[1120,1120],\"mapped\",[1121]],[[1121,1121],\"valid\"],[[1122,1122],\"mapped\",[1123]],[[1123,1123],\"valid\"],[[1124,1124],\"mapped\",[1125]],[[1125,1125],\"valid\"],[[1126,1126],\"mapped\",[1127]],[[1127,1127],\"valid\"],[[1128,1128],\"mapped\",[1129]],[[1129,1129],\"valid\"],[[1130,1130],\"mapped\",[1131]],[[1131,1131],\"valid\"],[[1132,1132],\"mapped\",[1133]],[[1133,1133],\"valid\"],[[1134,1134],\"mapped\",[1135]],[[1135,1135],\"valid\"],[[1136,1136],\"mapped\",[1137]],[[1137,1137],\"valid\"],[[1138,1138],\"mapped\",[1139]],[[1139,1139],\"valid\"],[[1140,1140],\"mapped\",[1141]],[[1141,1141],\"valid\"],[[1142,1142],\"mapped\",[1143]],[[1143,1143],\"valid\"],[[1144,1144],\"mapped\",[1145]],[[1145,1145],\"valid\"],[[1146,1146],\"mapped\",[1147]],[[1147,1147],\"valid\"],[[1148,1148],\"mapped\",[1149]],[[1149,1149],\"valid\"],[[1150,1150],\"mapped\",[1151]],[[1151,1151],\"valid\"],[[1152,1152],\"mapped\",[1153]],[[1153,1153],\"valid\"],[[1154,1154],\"valid\",[],\"NV8\"],[[1155,1158],\"valid\"],[[1159,1159],\"valid\"],[[1160,1161],\"valid\",[],\"NV8\"],[[1162,1162],\"mapped\",[1163]],[[1163,1163],\"valid\"],[[1164,1164],\"mapped\",[1165]],[[1165,1165],\"valid\"],[[1166,1166],\"mapped\",[1167]],[[1167,1167],\"valid\"],[[1168,1168],\"mapped\",[1169]],[[1169,1169],\"valid\"],[[1170,1170],\"mapped\",[1171]],[[1171,1171],\"valid\"],[[1172,1172],\"mapped\",[1173]],[[1173,1173],\"valid\"],[[1174,1174],\"mapped\",[1175]],[[1175,1175],\"valid\"],[[1176,1176],\"mapped\",[1177]],[[1177,1177],\"valid\"],[[1178,1178],\"mapped\",[1179]],[[1179,1179],\"valid\"],[[1180,1180],\"mapped\",[1181]],[[1181,1181],\"valid\"],[[1182,1182],\"mapped\",[1183]],[[1183,1183],\"valid\"],[[1184,1184],\"mapped\",[1185]],[[1185,1185],\"valid\"],[[1186,1186],\"mapped\",[1187]],[[1187,1187],\"valid\"],[[1188,1188],\"mapped\",[1189]],[[1189,1189],\"valid\"],[[1190,1190],\"mapped\",[1191]],[[1191,1191],\"valid\"],[[1192,1192],\"mapped\",[1193]],[[1193,1193],\"valid\"],[[1194,1194],\"mapped\",[1195]],[[1195,1195],\"valid\"],[[1196,1196],\"mapped\",[1197]],[[1197,1197],\"valid\"],[[1198,1198],\"mapped\",[1199]],[[1199,1199],\"valid\"],[[1200,1200],\"mapped\",[1201]],[[1201,1201],\"valid\"],[[1202,1202],\"mapped\",[1203]],[[1203,1203],\"valid\"],[[1204,1204],\"mapped\",[1205]],[[1205,1205],\"valid\"],[[1206,1206],\"mapped\",[1207]],[[1207,1207],\"valid\"],[[1208,1208],\"mapped\",[1209]],[[1209,1209],\"valid\"],[[1210,1210],\"mapped\",[1211]],[[1211,1211],\"valid\"],[[1212,1212],\"mapped\",[1213]],[[1213,1213],\"valid\"],[[1214,1214],\"mapped\",[1215]],[[1215,1215],\"valid\"],[[1216,1216],\"disallowed\"],[[1217,1217],\"mapped\",[1218]],[[1218,1218],\"valid\"],[[1219,1219],\"mapped\",[1220]],[[1220,1220],\"valid\"],[[1221,1221],\"mapped\",[1222]],[[1222,1222],\"valid\"],[[1223,1223],\"mapped\",[1224]],[[1224,1224],\"valid\"],[[1225,1225],\"mapped\",[1226]],[[1226,1226],\"valid\"],[[1227,1227],\"mapped\",[1228]],[[1228,1228],\"valid\"],[[1229,1229],\"mapped\",[1230]],[[1230,1230],\"valid\"],[[1231,1231],\"valid\"],[[1232,1232],\"mapped\",[1233]],[[1233,1233],\"valid\"],[[1234,1234],\"mapped\",[1235]],[[1235,1235],\"valid\"],[[1236,1236],\"mapped\",[1237]],[[1237,1237],\"valid\"],[[1238,1238],\"mapped\",[1239]],[[1239,1239],\"valid\"],[[1240,1240],\"mapped\",[1241]],[[1241,1241],\"valid\"],[[1242,1242],\"mapped\",[1243]],[[1243,1243],\"valid\"],[[1244,1244],\"mapped\",[1245]],[[1245,1245],\"valid\"],[[1246,1246],\"mapped\",[1247]],[[1247,1247],\"valid\"],[[1248,1248],\"mapped\",[1249]],[[1249,1249],\"valid\"],[[1250,1250],\"mapped\",[1251]],[[1251,1251],\"valid\"],[[1252,1252],\"mapped\",[1253]],[[1253,1253],\"valid\"],[[1254,1254],\"mapped\",[1255]],[[1255,1255],\"valid\"],[[1256,1256],\"mapped\",[1257]],[[1257,1257],\"valid\"],[[1258,1258],\"mapped\",[1259]],[[1259,1259],\"valid\"],[[1260,1260],\"mapped\",[1261]],[[1261,1261],\"valid\"],[[1262,1262],\"mapped\",[1263]],[[1263,1263],\"valid\"],[[1264,1264],\"mapped\",[1265]],[[1265,1265],\"valid\"],[[1266,1266],\"mapped\",[1267]],[[1267,1267],\"valid\"],[[1268,1268],\"mapped\",[1269]],[[1269,1269],\"valid\"],[[1270,1270],\"mapped\",[1271]],[[1271,1271],\"valid\"],[[1272,1272],\"mapped\",[1273]],[[1273,1273],\"valid\"],[[1274,1274],\"mapped\",[1275]],[[1275,1275],\"valid\"],[[1276,1276],\"mapped\",[1277]],[[1277,1277],\"valid\"],[[1278,1278],\"mapped\",[1279]],[[1279,1279],\"valid\"],[[1280,1280],\"mapped\",[1281]],[[1281,1281],\"valid\"],[[1282,1282],\"mapped\",[1283]],[[1283,1283],\"valid\"],[[1284,1284],\"mapped\",[1285]],[[1285,1285],\"valid\"],[[1286,1286],\"mapped\",[1287]],[[1287,1287],\"valid\"],[[1288,1288],\"mapped\",[1289]],[[1289,1289],\"valid\"],[[1290,1290],\"mapped\",[1291]],[[1291,1291],\"valid\"],[[1292,1292],\"mapped\",[1293]],[[1293,1293],\"valid\"],[[1294,1294],\"mapped\",[1295]],[[1295,1295],\"valid\"],[[1296,1296],\"mapped\",[1297]],[[1297,1297],\"valid\"],[[1298,1298],\"mapped\",[1299]],[[1299,1299],\"valid\"],[[1300,1300],\"mapped\",[1301]],[[1301,1301],\"valid\"],[[1302,1302],\"mapped\",[1303]],[[1303,1303],\"valid\"],[[1304,1304],\"mapped\",[1305]],[[1305,1305],\"valid\"],[[1306,1306],\"mapped\",[1307]],[[1307,1307],\"valid\"],[[1308,1308],\"mapped\",[1309]],[[1309,1309],\"valid\"],[[1310,1310],\"mapped\",[1311]],[[1311,1311],\"valid\"],[[1312,1312],\"mapped\",[1313]],[[1313,1313],\"valid\"],[[1314,1314],\"mapped\",[1315]],[[1315,1315],\"valid\"],[[1316,1316],\"mapped\",[1317]],[[1317,1317],\"valid\"],[[1318,1318],\"mapped\",[1319]],[[1319,1319],\"valid\"],[[1320,1320],\"mapped\",[1321]],[[1321,1321],\"valid\"],[[1322,1322],\"mapped\",[1323]],[[1323,1323],\"valid\"],[[1324,1324],\"mapped\",[1325]],[[1325,1325],\"valid\"],[[1326,1326],\"mapped\",[1327]],[[1327,1327],\"valid\"],[[1328,1328],\"disallowed\"],[[1329,1329],\"mapped\",[1377]],[[1330,1330],\"mapped\",[1378]],[[1331,1331],\"mapped\",[1379]],[[1332,1332],\"mapped\",[1380]],[[1333,1333],\"mapped\",[1381]],[[1334,1334],\"mapped\",[1382]],[[1335,1335],\"mapped\",[1383]],[[1336,1336],\"mapped\",[1384]],[[1337,1337],\"mapped\",[1385]],[[1338,1338],\"mapped\",[1386]],[[1339,1339],\"mapped\",[1387]],[[1340,1340],\"mapped\",[1388]],[[1341,1341],\"mapped\",[1389]],[[1342,1342],\"mapped\",[1390]],[[1343,1343],\"mapped\",[1391]],[[1344,1344],\"mapped\",[1392]],[[1345,1345],\"mapped\",[1393]],[[1346,1346],\"mapped\",[1394]],[[1347,1347],\"mapped\",[1395]],[[1348,1348],\"mapped\",[1396]],[[1349,1349],\"mapped\",[1397]],[[1350,1350],\"mapped\",[1398]],[[1351,1351],\"mapped\",[1399]],[[1352,1352],\"mapped\",[1400]],[[1353,1353],\"mapped\",[1401]],[[1354,1354],\"mapped\",[1402]],[[1355,1355],\"mapped\",[1403]],[[1356,1356],\"mapped\",[1404]],[[1357,1357],\"mapped\",[1405]],[[1358,1358],\"mapped\",[1406]],[[1359,1359],\"mapped\",[1407]],[[1360,1360],\"mapped\",[1408]],[[1361,1361],\"mapped\",[1409]],[[1362,1362],\"mapped\",[1410]],[[1363,1363],\"mapped\",[1411]],[[1364,1364],\"mapped\",[1412]],[[1365,1365],\"mapped\",[1413]],[[1366,1366],\"mapped\",[1414]],[[1367,1368],\"disallowed\"],[[1369,1369],\"valid\"],[[1370,1375],\"valid\",[],\"NV8\"],[[1376,1376],\"disallowed\"],[[1377,1414],\"valid\"],[[1415,1415],\"mapped\",[1381,1410]],[[1416,1416],\"disallowed\"],[[1417,1417],\"valid\",[],\"NV8\"],[[1418,1418],\"valid\",[],\"NV8\"],[[1419,1420],\"disallowed\"],[[1421,1422],\"valid\",[],\"NV8\"],[[1423,1423],\"valid\",[],\"NV8\"],[[1424,1424],\"disallowed\"],[[1425,1441],\"valid\"],[[1442,1442],\"valid\"],[[1443,1455],\"valid\"],[[1456,1465],\"valid\"],[[1466,1466],\"valid\"],[[1467,1469],\"valid\"],[[1470,1470],\"valid\",[],\"NV8\"],[[1471,1471],\"valid\"],[[1472,1472],\"valid\",[],\"NV8\"],[[1473,1474],\"valid\"],[[1475,1475],\"valid\",[],\"NV8\"],[[1476,1476],\"valid\"],[[1477,1477],\"valid\"],[[1478,1478],\"valid\",[],\"NV8\"],[[1479,1479],\"valid\"],[[1480,1487],\"disallowed\"],[[1488,1514],\"valid\"],[[1515,1519],\"disallowed\"],[[1520,1524],\"valid\"],[[1525,1535],\"disallowed\"],[[1536,1539],\"disallowed\"],[[1540,1540],\"disallowed\"],[[1541,1541],\"disallowed\"],[[1542,1546],\"valid\",[],\"NV8\"],[[1547,1547],\"valid\",[],\"NV8\"],[[1548,1548],\"valid\",[],\"NV8\"],[[1549,1551],\"valid\",[],\"NV8\"],[[1552,1557],\"valid\"],[[1558,1562],\"valid\"],[[1563,1563],\"valid\",[],\"NV8\"],[[1564,1564],\"disallowed\"],[[1565,1565],\"disallowed\"],[[1566,1566],\"valid\",[],\"NV8\"],[[1567,1567],\"valid\",[],\"NV8\"],[[1568,1568],\"valid\"],[[1569,1594],\"valid\"],[[1595,1599],\"valid\"],[[1600,1600],\"valid\",[],\"NV8\"],[[1601,1618],\"valid\"],[[1619,1621],\"valid\"],[[1622,1624],\"valid\"],[[1625,1630],\"valid\"],[[1631,1631],\"valid\"],[[1632,1641],\"valid\"],[[1642,1645],\"valid\",[],\"NV8\"],[[1646,1647],\"valid\"],[[1648,1652],\"valid\"],[[1653,1653],\"mapped\",[1575,1652]],[[1654,1654],\"mapped\",[1608,1652]],[[1655,1655],\"mapped\",[1735,1652]],[[1656,1656],\"mapped\",[1610,1652]],[[1657,1719],\"valid\"],[[1720,1721],\"valid\"],[[1722,1726],\"valid\"],[[1727,1727],\"valid\"],[[1728,1742],\"valid\"],[[1743,1743],\"valid\"],[[1744,1747],\"valid\"],[[1748,1748],\"valid\",[],\"NV8\"],[[1749,1756],\"valid\"],[[1757,1757],\"disallowed\"],[[1758,1758],\"valid\",[],\"NV8\"],[[1759,1768],\"valid\"],[[1769,1769],\"valid\",[],\"NV8\"],[[1770,1773],\"valid\"],[[1774,1775],\"valid\"],[[1776,1785],\"valid\"],[[1786,1790],\"valid\"],[[1791,1791],\"valid\"],[[1792,1805],\"valid\",[],\"NV8\"],[[1806,1806],\"disallowed\"],[[1807,1807],\"disallowed\"],[[1808,1836],\"valid\"],[[1837,1839],\"valid\"],[[1840,1866],\"valid\"],[[1867,1868],\"disallowed\"],[[1869,1871],\"valid\"],[[1872,1901],\"valid\"],[[1902,1919],\"valid\"],[[1920,1968],\"valid\"],[[1969,1969],\"valid\"],[[1970,1983],\"disallowed\"],[[1984,2037],\"valid\"],[[2038,2042],\"valid\",[],\"NV8\"],[[2043,2047],\"disallowed\"],[[2048,2093],\"valid\"],[[2094,2095],\"disallowed\"],[[2096,2110],\"valid\",[],\"NV8\"],[[2111,2111],\"disallowed\"],[[2112,2139],\"valid\"],[[2140,2141],\"disallowed\"],[[2142,2142],\"valid\",[],\"NV8\"],[[2143,2207],\"disallowed\"],[[2208,2208],\"valid\"],[[2209,2209],\"valid\"],[[2210,2220],\"valid\"],[[2221,2226],\"valid\"],[[2227,2228],\"valid\"],[[2229,2274],\"disallowed\"],[[2275,2275],\"valid\"],[[2276,2302],\"valid\"],[[2303,2303],\"valid\"],[[2304,2304],\"valid\"],[[2305,2307],\"valid\"],[[2308,2308],\"valid\"],[[2309,2361],\"valid\"],[[2362,2363],\"valid\"],[[2364,2381],\"valid\"],[[2382,2382],\"valid\"],[[2383,2383],\"valid\"],[[2384,2388],\"valid\"],[[2389,2389],\"valid\"],[[2390,2391],\"valid\"],[[2392,2392],\"mapped\",[2325,2364]],[[2393,2393],\"mapped\",[2326,2364]],[[2394,2394],\"mapped\",[2327,2364]],[[2395,2395],\"mapped\",[2332,2364]],[[2396,2396],\"mapped\",[2337,2364]],[[2397,2397],\"mapped\",[2338,2364]],[[2398,2398],\"mapped\",[2347,2364]],[[2399,2399],\"mapped\",[2351,2364]],[[2400,2403],\"valid\"],[[2404,2405],\"valid\",[],\"NV8\"],[[2406,2415],\"valid\"],[[2416,2416],\"valid\",[],\"NV8\"],[[2417,2418],\"valid\"],[[2419,2423],\"valid\"],[[2424,2424],\"valid\"],[[2425,2426],\"valid\"],[[2427,2428],\"valid\"],[[2429,2429],\"valid\"],[[2430,2431],\"valid\"],[[2432,2432],\"valid\"],[[2433,2435],\"valid\"],[[2436,2436],\"disallowed\"],[[2437,2444],\"valid\"],[[2445,2446],\"disallowed\"],[[2447,2448],\"valid\"],[[2449,2450],\"disallowed\"],[[2451,2472],\"valid\"],[[2473,2473],\"disallowed\"],[[2474,2480],\"valid\"],[[2481,2481],\"disallowed\"],[[2482,2482],\"valid\"],[[2483,2485],\"disallowed\"],[[2486,2489],\"valid\"],[[2490,2491],\"disallowed\"],[[2492,2492],\"valid\"],[[2493,2493],\"valid\"],[[2494,2500],\"valid\"],[[2501,2502],\"disallowed\"],[[2503,2504],\"valid\"],[[2505,2506],\"disallowed\"],[[2507,2509],\"valid\"],[[2510,2510],\"valid\"],[[2511,2518],\"disallowed\"],[[2519,2519],\"valid\"],[[2520,2523],\"disallowed\"],[[2524,2524],\"mapped\",[2465,2492]],[[2525,2525],\"mapped\",[2466,2492]],[[2526,2526],\"disallowed\"],[[2527,2527],\"mapped\",[2479,2492]],[[2528,2531],\"valid\"],[[2532,2533],\"disallowed\"],[[2534,2545],\"valid\"],[[2546,2554],\"valid\",[],\"NV8\"],[[2555,2555],\"valid\",[],\"NV8\"],[[2556,2560],\"disallowed\"],[[2561,2561],\"valid\"],[[2562,2562],\"valid\"],[[2563,2563],\"valid\"],[[2564,2564],\"disallowed\"],[[2565,2570],\"valid\"],[[2571,2574],\"disallowed\"],[[2575,2576],\"valid\"],[[2577,2578],\"disallowed\"],[[2579,2600],\"valid\"],[[2601,2601],\"disallowed\"],[[2602,2608],\"valid\"],[[2609,2609],\"disallowed\"],[[2610,2610],\"valid\"],[[2611,2611],\"mapped\",[2610,2620]],[[2612,2612],\"disallowed\"],[[2613,2613],\"valid\"],[[2614,2614],\"mapped\",[2616,2620]],[[2615,2615],\"disallowed\"],[[2616,2617],\"valid\"],[[2618,2619],\"disallowed\"],[[2620,2620],\"valid\"],[[2621,2621],\"disallowed\"],[[2622,2626],\"valid\"],[[2627,2630],\"disallowed\"],[[2631,2632],\"valid\"],[[2633,2634],\"disallowed\"],[[2635,2637],\"valid\"],[[2638,2640],\"disallowed\"],[[2641,2641],\"valid\"],[[2642,2648],\"disallowed\"],[[2649,2649],\"mapped\",[2582,2620]],[[2650,2650],\"mapped\",[2583,2620]],[[2651,2651],\"mapped\",[2588,2620]],[[2652,2652],\"valid\"],[[2653,2653],\"disallowed\"],[[2654,2654],\"mapped\",[2603,2620]],[[2655,2661],\"disallowed\"],[[2662,2676],\"valid\"],[[2677,2677],\"valid\"],[[2678,2688],\"disallowed\"],[[2689,2691],\"valid\"],[[2692,2692],\"disallowed\"],[[2693,2699],\"valid\"],[[2700,2700],\"valid\"],[[2701,2701],\"valid\"],[[2702,2702],\"disallowed\"],[[2703,2705],\"valid\"],[[2706,2706],\"disallowed\"],[[2707,2728],\"valid\"],[[2729,2729],\"disallowed\"],[[2730,2736],\"valid\"],[[2737,2737],\"disallowed\"],[[2738,2739],\"valid\"],[[2740,2740],\"disallowed\"],[[2741,2745],\"valid\"],[[2746,2747],\"disallowed\"],[[2748,2757],\"valid\"],[[2758,2758],\"disallowed\"],[[2759,2761],\"valid\"],[[2762,2762],\"disallowed\"],[[2763,2765],\"valid\"],[[2766,2767],\"disallowed\"],[[2768,2768],\"valid\"],[[2769,2783],\"disallowed\"],[[2784,2784],\"valid\"],[[2785,2787],\"valid\"],[[2788,2789],\"disallowed\"],[[2790,2799],\"valid\"],[[2800,2800],\"valid\",[],\"NV8\"],[[2801,2801],\"valid\",[],\"NV8\"],[[2802,2808],\"disallowed\"],[[2809,2809],\"valid\"],[[2810,2816],\"disallowed\"],[[2817,2819],\"valid\"],[[2820,2820],\"disallowed\"],[[2821,2828],\"valid\"],[[2829,2830],\"disallowed\"],[[2831,2832],\"valid\"],[[2833,2834],\"disallowed\"],[[2835,2856],\"valid\"],[[2857,2857],\"disallowed\"],[[2858,2864],\"valid\"],[[2865,2865],\"disallowed\"],[[2866,2867],\"valid\"],[[2868,2868],\"disallowed\"],[[2869,2869],\"valid\"],[[2870,2873],\"valid\"],[[2874,2875],\"disallowed\"],[[2876,2883],\"valid\"],[[2884,2884],\"valid\"],[[2885,2886],\"disallowed\"],[[2887,2888],\"valid\"],[[2889,2890],\"disallowed\"],[[2891,2893],\"valid\"],[[2894,2901],\"disallowed\"],[[2902,2903],\"valid\"],[[2904,2907],\"disallowed\"],[[2908,2908],\"mapped\",[2849,2876]],[[2909,2909],\"mapped\",[2850,2876]],[[2910,2910],\"disallowed\"],[[2911,2913],\"valid\"],[[2914,2915],\"valid\"],[[2916,2917],\"disallowed\"],[[2918,2927],\"valid\"],[[2928,2928],\"valid\",[],\"NV8\"],[[2929,2929],\"valid\"],[[2930,2935],\"valid\",[],\"NV8\"],[[2936,2945],\"disallowed\"],[[2946,2947],\"valid\"],[[2948,2948],\"disallowed\"],[[2949,2954],\"valid\"],[[2955,2957],\"disallowed\"],[[2958,2960],\"valid\"],[[2961,2961],\"disallowed\"],[[2962,2965],\"valid\"],[[2966,2968],\"disallowed\"],[[2969,2970],\"valid\"],[[2971,2971],\"disallowed\"],[[2972,2972],\"valid\"],[[2973,2973],\"disallowed\"],[[2974,2975],\"valid\"],[[2976,2978],\"disallowed\"],[[2979,2980],\"valid\"],[[2981,2983],\"disallowed\"],[[2984,2986],\"valid\"],[[2987,2989],\"disallowed\"],[[2990,2997],\"valid\"],[[2998,2998],\"valid\"],[[2999,3001],\"valid\"],[[3002,3005],\"disallowed\"],[[3006,3010],\"valid\"],[[3011,3013],\"disallowed\"],[[3014,3016],\"valid\"],[[3017,3017],\"disallowed\"],[[3018,3021],\"valid\"],[[3022,3023],\"disallowed\"],[[3024,3024],\"valid\"],[[3025,3030],\"disallowed\"],[[3031,3031],\"valid\"],[[3032,3045],\"disallowed\"],[[3046,3046],\"valid\"],[[3047,3055],\"valid\"],[[3056,3058],\"valid\",[],\"NV8\"],[[3059,3066],\"valid\",[],\"NV8\"],[[3067,3071],\"disallowed\"],[[3072,3072],\"valid\"],[[3073,3075],\"valid\"],[[3076,3076],\"disallowed\"],[[3077,3084],\"valid\"],[[3085,3085],\"disallowed\"],[[3086,3088],\"valid\"],[[3089,3089],\"disallowed\"],[[3090,3112],\"valid\"],[[3113,3113],\"disallowed\"],[[3114,3123],\"valid\"],[[3124,3124],\"valid\"],[[3125,3129],\"valid\"],[[3130,3132],\"disallowed\"],[[3133,3133],\"valid\"],[[3134,3140],\"valid\"],[[3141,3141],\"disallowed\"],[[3142,3144],\"valid\"],[[3145,3145],\"disallowed\"],[[3146,3149],\"valid\"],[[3150,3156],\"disallowed\"],[[3157,3158],\"valid\"],[[3159,3159],\"disallowed\"],[[3160,3161],\"valid\"],[[3162,3162],\"valid\"],[[3163,3167],\"disallowed\"],[[3168,3169],\"valid\"],[[3170,3171],\"valid\"],[[3172,3173],\"disallowed\"],[[3174,3183],\"valid\"],[[3184,3191],\"disallowed\"],[[3192,3199],\"valid\",[],\"NV8\"],[[3200,3200],\"disallowed\"],[[3201,3201],\"valid\"],[[3202,3203],\"valid\"],[[3204,3204],\"disallowed\"],[[3205,3212],\"valid\"],[[3213,3213],\"disallowed\"],[[3214,3216],\"valid\"],[[3217,3217],\"disallowed\"],[[3218,3240],\"valid\"],[[3241,3241],\"disallowed\"],[[3242,3251],\"valid\"],[[3252,3252],\"disallowed\"],[[3253,3257],\"valid\"],[[3258,3259],\"disallowed\"],[[3260,3261],\"valid\"],[[3262,3268],\"valid\"],[[3269,3269],\"disallowed\"],[[3270,3272],\"valid\"],[[3273,3273],\"disallowed\"],[[3274,3277],\"valid\"],[[3278,3284],\"disallowed\"],[[3285,3286],\"valid\"],[[3287,3293],\"disallowed\"],[[3294,3294],\"valid\"],[[3295,3295],\"disallowed\"],[[3296,3297],\"valid\"],[[3298,3299],\"valid\"],[[3300,3301],\"disallowed\"],[[3302,3311],\"valid\"],[[3312,3312],\"disallowed\"],[[3313,3314],\"valid\"],[[3315,3328],\"disallowed\"],[[3329,3329],\"valid\"],[[3330,3331],\"valid\"],[[3332,3332],\"disallowed\"],[[3333,3340],\"valid\"],[[3341,3341],\"disallowed\"],[[3342,3344],\"valid\"],[[3345,3345],\"disallowed\"],[[3346,3368],\"valid\"],[[3369,3369],\"valid\"],[[3370,3385],\"valid\"],[[3386,3386],\"valid\"],[[3387,3388],\"disallowed\"],[[3389,3389],\"valid\"],[[3390,3395],\"valid\"],[[3396,3396],\"valid\"],[[3397,3397],\"disallowed\"],[[3398,3400],\"valid\"],[[3401,3401],\"disallowed\"],[[3402,3405],\"valid\"],[[3406,3406],\"valid\"],[[3407,3414],\"disallowed\"],[[3415,3415],\"valid\"],[[3416,3422],\"disallowed\"],[[3423,3423],\"valid\"],[[3424,3425],\"valid\"],[[3426,3427],\"valid\"],[[3428,3429],\"disallowed\"],[[3430,3439],\"valid\"],[[3440,3445],\"valid\",[],\"NV8\"],[[3446,3448],\"disallowed\"],[[3449,3449],\"valid\",[],\"NV8\"],[[3450,3455],\"valid\"],[[3456,3457],\"disallowed\"],[[3458,3459],\"valid\"],[[3460,3460],\"disallowed\"],[[3461,3478],\"valid\"],[[3479,3481],\"disallowed\"],[[3482,3505],\"valid\"],[[3506,3506],\"disallowed\"],[[3507,3515],\"valid\"],[[3516,3516],\"disallowed\"],[[3517,3517],\"valid\"],[[3518,3519],\"disallowed\"],[[3520,3526],\"valid\"],[[3527,3529],\"disallowed\"],[[3530,3530],\"valid\"],[[3531,3534],\"disallowed\"],[[3535,3540],\"valid\"],[[3541,3541],\"disallowed\"],[[3542,3542],\"valid\"],[[3543,3543],\"disallowed\"],[[3544,3551],\"valid\"],[[3552,3557],\"disallowed\"],[[3558,3567],\"valid\"],[[3568,3569],\"disallowed\"],[[3570,3571],\"valid\"],[[3572,3572],\"valid\",[],\"NV8\"],[[3573,3584],\"disallowed\"],[[3585,3634],\"valid\"],[[3635,3635],\"mapped\",[3661,3634]],[[3636,3642],\"valid\"],[[3643,3646],\"disallowed\"],[[3647,3647],\"valid\",[],\"NV8\"],[[3648,3662],\"valid\"],[[3663,3663],\"valid\",[],\"NV8\"],[[3664,3673],\"valid\"],[[3674,3675],\"valid\",[],\"NV8\"],[[3676,3712],\"disallowed\"],[[3713,3714],\"valid\"],[[3715,3715],\"disallowed\"],[[3716,3716],\"valid\"],[[3717,3718],\"disallowed\"],[[3719,3720],\"valid\"],[[3721,3721],\"disallowed\"],[[3722,3722],\"valid\"],[[3723,3724],\"disallowed\"],[[3725,3725],\"valid\"],[[3726,3731],\"disallowed\"],[[3732,3735],\"valid\"],[[3736,3736],\"disallowed\"],[[3737,3743],\"valid\"],[[3744,3744],\"disallowed\"],[[3745,3747],\"valid\"],[[3748,3748],\"disallowed\"],[[3749,3749],\"valid\"],[[3750,3750],\"disallowed\"],[[3751,3751],\"valid\"],[[3752,3753],\"disallowed\"],[[3754,3755],\"valid\"],[[3756,3756],\"disallowed\"],[[3757,3762],\"valid\"],[[3763,3763],\"mapped\",[3789,3762]],[[3764,3769],\"valid\"],[[3770,3770],\"disallowed\"],[[3771,3773],\"valid\"],[[3774,3775],\"disallowed\"],[[3776,3780],\"valid\"],[[3781,3781],\"disallowed\"],[[3782,3782],\"valid\"],[[3783,3783],\"disallowed\"],[[3784,3789],\"valid\"],[[3790,3791],\"disallowed\"],[[3792,3801],\"valid\"],[[3802,3803],\"disallowed\"],[[3804,3804],\"mapped\",[3755,3737]],[[3805,3805],\"mapped\",[3755,3745]],[[3806,3807],\"valid\"],[[3808,3839],\"disallowed\"],[[3840,3840],\"valid\"],[[3841,3850],\"valid\",[],\"NV8\"],[[3851,3851],\"valid\"],[[3852,3852],\"mapped\",[3851]],[[3853,3863],\"valid\",[],\"NV8\"],[[3864,3865],\"valid\"],[[3866,3871],\"valid\",[],\"NV8\"],[[3872,3881],\"valid\"],[[3882,3892],\"valid\",[],\"NV8\"],[[3893,3893],\"valid\"],[[3894,3894],\"valid\",[],\"NV8\"],[[3895,3895],\"valid\"],[[3896,3896],\"valid\",[],\"NV8\"],[[3897,3897],\"valid\"],[[3898,3901],\"valid\",[],\"NV8\"],[[3902,3906],\"valid\"],[[3907,3907],\"mapped\",[3906,4023]],[[3908,3911],\"valid\"],[[3912,3912],\"disallowed\"],[[3913,3916],\"valid\"],[[3917,3917],\"mapped\",[3916,4023]],[[3918,3921],\"valid\"],[[3922,3922],\"mapped\",[3921,4023]],[[3923,3926],\"valid\"],[[3927,3927],\"mapped\",[3926,4023]],[[3928,3931],\"valid\"],[[3932,3932],\"mapped\",[3931,4023]],[[3933,3944],\"valid\"],[[3945,3945],\"mapped\",[3904,4021]],[[3946,3946],\"valid\"],[[3947,3948],\"valid\"],[[3949,3952],\"disallowed\"],[[3953,3954],\"valid\"],[[3955,3955],\"mapped\",[3953,3954]],[[3956,3956],\"valid\"],[[3957,3957],\"mapped\",[3953,3956]],[[3958,3958],\"mapped\",[4018,3968]],[[3959,3959],\"mapped\",[4018,3953,3968]],[[3960,3960],\"mapped\",[4019,3968]],[[3961,3961],\"mapped\",[4019,3953,3968]],[[3962,3968],\"valid\"],[[3969,3969],\"mapped\",[3953,3968]],[[3970,3972],\"valid\"],[[3973,3973],\"valid\",[],\"NV8\"],[[3974,3979],\"valid\"],[[3980,3983],\"valid\"],[[3984,3986],\"valid\"],[[3987,3987],\"mapped\",[3986,4023]],[[3988,3989],\"valid\"],[[3990,3990],\"valid\"],[[3991,3991],\"valid\"],[[3992,3992],\"disallowed\"],[[3993,3996],\"valid\"],[[3997,3997],\"mapped\",[3996,4023]],[[3998,4001],\"valid\"],[[4002,4002],\"mapped\",[4001,4023]],[[4003,4006],\"valid\"],[[4007,4007],\"mapped\",[4006,4023]],[[4008,4011],\"valid\"],[[4012,4012],\"mapped\",[4011,4023]],[[4013,4013],\"valid\"],[[4014,4016],\"valid\"],[[4017,4023],\"valid\"],[[4024,4024],\"valid\"],[[4025,4025],\"mapped\",[3984,4021]],[[4026,4028],\"valid\"],[[4029,4029],\"disallowed\"],[[4030,4037],\"valid\",[],\"NV8\"],[[4038,4038],\"valid\"],[[4039,4044],\"valid\",[],\"NV8\"],[[4045,4045],\"disallowed\"],[[4046,4046],\"valid\",[],\"NV8\"],[[4047,4047],\"valid\",[],\"NV8\"],[[4048,4049],\"valid\",[],\"NV8\"],[[4050,4052],\"valid\",[],\"NV8\"],[[4053,4056],\"valid\",[],\"NV8\"],[[4057,4058],\"valid\",[],\"NV8\"],[[4059,4095],\"disallowed\"],[[4096,4129],\"valid\"],[[4130,4130],\"valid\"],[[4131,4135],\"valid\"],[[4136,4136],\"valid\"],[[4137,4138],\"valid\"],[[4139,4139],\"valid\"],[[4140,4146],\"valid\"],[[4147,4149],\"valid\"],[[4150,4153],\"valid\"],[[4154,4159],\"valid\"],[[4160,4169],\"valid\"],[[4170,4175],\"valid\",[],\"NV8\"],[[4176,4185],\"valid\"],[[4186,4249],\"valid\"],[[4250,4253],\"valid\"],[[4254,4255],\"valid\",[],\"NV8\"],[[4256,4293],\"disallowed\"],[[4294,4294],\"disallowed\"],[[4295,4295],\"mapped\",[11559]],[[4296,4300],\"disallowed\"],[[4301,4301],\"mapped\",[11565]],[[4302,4303],\"disallowed\"],[[4304,4342],\"valid\"],[[4343,4344],\"valid\"],[[4345,4346],\"valid\"],[[4347,4347],\"valid\",[],\"NV8\"],[[4348,4348],\"mapped\",[4316]],[[4349,4351],\"valid\"],[[4352,4441],\"valid\",[],\"NV8\"],[[4442,4446],\"valid\",[],\"NV8\"],[[4447,4448],\"disallowed\"],[[4449,4514],\"valid\",[],\"NV8\"],[[4515,4519],\"valid\",[],\"NV8\"],[[4520,4601],\"valid\",[],\"NV8\"],[[4602,4607],\"valid\",[],\"NV8\"],[[4608,4614],\"valid\"],[[4615,4615],\"valid\"],[[4616,4678],\"valid\"],[[4679,4679],\"valid\"],[[4680,4680],\"valid\"],[[4681,4681],\"disallowed\"],[[4682,4685],\"valid\"],[[4686,4687],\"disallowed\"],[[4688,4694],\"valid\"],[[4695,4695],\"disallowed\"],[[4696,4696],\"valid\"],[[4697,4697],\"disallowed\"],[[4698,4701],\"valid\"],[[4702,4703],\"disallowed\"],[[4704,4742],\"valid\"],[[4743,4743],\"valid\"],[[4744,4744],\"valid\"],[[4745,4745],\"disallowed\"],[[4746,4749],\"valid\"],[[4750,4751],\"disallowed\"],[[4752,4782],\"valid\"],[[4783,4783],\"valid\"],[[4784,4784],\"valid\"],[[4785,4785],\"disallowed\"],[[4786,4789],\"valid\"],[[4790,4791],\"disallowed\"],[[4792,4798],\"valid\"],[[4799,4799],\"disallowed\"],[[4800,4800],\"valid\"],[[4801,4801],\"disallowed\"],[[4802,4805],\"valid\"],[[4806,4807],\"disallowed\"],[[4808,4814],\"valid\"],[[4815,4815],\"valid\"],[[4816,4822],\"valid\"],[[4823,4823],\"disallowed\"],[[4824,4846],\"valid\"],[[4847,4847],\"valid\"],[[4848,4878],\"valid\"],[[4879,4879],\"valid\"],[[4880,4880],\"valid\"],[[4881,4881],\"disallowed\"],[[4882,4885],\"valid\"],[[4886,4887],\"disallowed\"],[[4888,4894],\"valid\"],[[4895,4895],\"valid\"],[[4896,4934],\"valid\"],[[4935,4935],\"valid\"],[[4936,4954],\"valid\"],[[4955,4956],\"disallowed\"],[[4957,4958],\"valid\"],[[4959,4959],\"valid\"],[[4960,4960],\"valid\",[],\"NV8\"],[[4961,4988],\"valid\",[],\"NV8\"],[[4989,4991],\"disallowed\"],[[4992,5007],\"valid\"],[[5008,5017],\"valid\",[],\"NV8\"],[[5018,5023],\"disallowed\"],[[5024,5108],\"valid\"],[[5109,5109],\"valid\"],[[5110,5111],\"disallowed\"],[[5112,5112],\"mapped\",[5104]],[[5113,5113],\"mapped\",[5105]],[[5114,5114],\"mapped\",[5106]],[[5115,5115],\"mapped\",[5107]],[[5116,5116],\"mapped\",[5108]],[[5117,5117],\"mapped\",[5109]],[[5118,5119],\"disallowed\"],[[5120,5120],\"valid\",[],\"NV8\"],[[5121,5740],\"valid\"],[[5741,5742],\"valid\",[],\"NV8\"],[[5743,5750],\"valid\"],[[5751,5759],\"valid\"],[[5760,5760],\"disallowed\"],[[5761,5786],\"valid\"],[[5787,5788],\"valid\",[],\"NV8\"],[[5789,5791],\"disallowed\"],[[5792,5866],\"valid\"],[[5867,5872],\"valid\",[],\"NV8\"],[[5873,5880],\"valid\"],[[5881,5887],\"disallowed\"],[[5888,5900],\"valid\"],[[5901,5901],\"disallowed\"],[[5902,5908],\"valid\"],[[5909,5919],\"disallowed\"],[[5920,5940],\"valid\"],[[5941,5942],\"valid\",[],\"NV8\"],[[5943,5951],\"disallowed\"],[[5952,5971],\"valid\"],[[5972,5983],\"disallowed\"],[[5984,5996],\"valid\"],[[5997,5997],\"disallowed\"],[[5998,6000],\"valid\"],[[6001,6001],\"disallowed\"],[[6002,6003],\"valid\"],[[6004,6015],\"disallowed\"],[[6016,6067],\"valid\"],[[6068,6069],\"disallowed\"],[[6070,6099],\"valid\"],[[6100,6102],\"valid\",[],\"NV8\"],[[6103,6103],\"valid\"],[[6104,6107],\"valid\",[],\"NV8\"],[[6108,6108],\"valid\"],[[6109,6109],\"valid\"],[[6110,6111],\"disallowed\"],[[6112,6121],\"valid\"],[[6122,6127],\"disallowed\"],[[6128,6137],\"valid\",[],\"NV8\"],[[6138,6143],\"disallowed\"],[[6144,6149],\"valid\",[],\"NV8\"],[[6150,6150],\"disallowed\"],[[6151,6154],\"valid\",[],\"NV8\"],[[6155,6157],\"ignored\"],[[6158,6158],\"disallowed\"],[[6159,6159],\"disallowed\"],[[6160,6169],\"valid\"],[[6170,6175],\"disallowed\"],[[6176,6263],\"valid\"],[[6264,6271],\"disallowed\"],[[6272,6313],\"valid\"],[[6314,6314],\"valid\"],[[6315,6319],\"disallowed\"],[[6320,6389],\"valid\"],[[6390,6399],\"disallowed\"],[[6400,6428],\"valid\"],[[6429,6430],\"valid\"],[[6431,6431],\"disallowed\"],[[6432,6443],\"valid\"],[[6444,6447],\"disallowed\"],[[6448,6459],\"valid\"],[[6460,6463],\"disallowed\"],[[6464,6464],\"valid\",[],\"NV8\"],[[6465,6467],\"disallowed\"],[[6468,6469],\"valid\",[],\"NV8\"],[[6470,6509],\"valid\"],[[6510,6511],\"disallowed\"],[[6512,6516],\"valid\"],[[6517,6527],\"disallowed\"],[[6528,6569],\"valid\"],[[6570,6571],\"valid\"],[[6572,6575],\"disallowed\"],[[6576,6601],\"valid\"],[[6602,6607],\"disallowed\"],[[6608,6617],\"valid\"],[[6618,6618],\"valid\",[],\"XV8\"],[[6619,6621],\"disallowed\"],[[6622,6623],\"valid\",[],\"NV8\"],[[6624,6655],\"valid\",[],\"NV8\"],[[6656,6683],\"valid\"],[[6684,6685],\"disallowed\"],[[6686,6687],\"valid\",[],\"NV8\"],[[6688,6750],\"valid\"],[[6751,6751],\"disallowed\"],[[6752,6780],\"valid\"],[[6781,6782],\"disallowed\"],[[6783,6793],\"valid\"],[[6794,6799],\"disallowed\"],[[6800,6809],\"valid\"],[[6810,6815],\"disallowed\"],[[6816,6822],\"valid\",[],\"NV8\"],[[6823,6823],\"valid\"],[[6824,6829],\"valid\",[],\"NV8\"],[[6830,6831],\"disallowed\"],[[6832,6845],\"valid\"],[[6846,6846],\"valid\",[],\"NV8\"],[[6847,6911],\"disallowed\"],[[6912,6987],\"valid\"],[[6988,6991],\"disallowed\"],[[6992,7001],\"valid\"],[[7002,7018],\"valid\",[],\"NV8\"],[[7019,7027],\"valid\"],[[7028,7036],\"valid\",[],\"NV8\"],[[7037,7039],\"disallowed\"],[[7040,7082],\"valid\"],[[7083,7085],\"valid\"],[[7086,7097],\"valid\"],[[7098,7103],\"valid\"],[[7104,7155],\"valid\"],[[7156,7163],\"disallowed\"],[[7164,7167],\"valid\",[],\"NV8\"],[[7168,7223],\"valid\"],[[7224,7226],\"disallowed\"],[[7227,7231],\"valid\",[],\"NV8\"],[[7232,7241],\"valid\"],[[7242,7244],\"disallowed\"],[[7245,7293],\"valid\"],[[7294,7295],\"valid\",[],\"NV8\"],[[7296,7359],\"disallowed\"],[[7360,7367],\"valid\",[],\"NV8\"],[[7368,7375],\"disallowed\"],[[7376,7378],\"valid\"],[[7379,7379],\"valid\",[],\"NV8\"],[[7380,7410],\"valid\"],[[7411,7414],\"valid\"],[[7415,7415],\"disallowed\"],[[7416,7417],\"valid\"],[[7418,7423],\"disallowed\"],[[7424,7467],\"valid\"],[[7468,7468],\"mapped\",[97]],[[7469,7469],\"mapped\",[230]],[[7470,7470],\"mapped\",[98]],[[7471,7471],\"valid\"],[[7472,7472],\"mapped\",[100]],[[7473,7473],\"mapped\",[101]],[[7474,7474],\"mapped\",[477]],[[7475,7475],\"mapped\",[103]],[[7476,7476],\"mapped\",[104]],[[7477,7477],\"mapped\",[105]],[[7478,7478],\"mapped\",[106]],[[7479,7479],\"mapped\",[107]],[[7480,7480],\"mapped\",[108]],[[7481,7481],\"mapped\",[109]],[[7482,7482],\"mapped\",[110]],[[7483,7483],\"valid\"],[[7484,7484],\"mapped\",[111]],[[7485,7485],\"mapped\",[547]],[[7486,7486],\"mapped\",[112]],[[7487,7487],\"mapped\",[114]],[[7488,7488],\"mapped\",[116]],[[7489,7489],\"mapped\",[117]],[[7490,7490],\"mapped\",[119]],[[7491,7491],\"mapped\",[97]],[[7492,7492],\"mapped\",[592]],[[7493,7493],\"mapped\",[593]],[[7494,7494],\"mapped\",[7426]],[[7495,7495],\"mapped\",[98]],[[7496,7496],\"mapped\",[100]],[[7497,7497],\"mapped\",[101]],[[7498,7498],\"mapped\",[601]],[[7499,7499],\"mapped\",[603]],[[7500,7500],\"mapped\",[604]],[[7501,7501],\"mapped\",[103]],[[7502,7502],\"valid\"],[[7503,7503],\"mapped\",[107]],[[7504,7504],\"mapped\",[109]],[[7505,7505],\"mapped\",[331]],[[7506,7506],\"mapped\",[111]],[[7507,7507],\"mapped\",[596]],[[7508,7508],\"mapped\",[7446]],[[7509,7509],\"mapped\",[7447]],[[7510,7510],\"mapped\",[112]],[[7511,7511],\"mapped\",[116]],[[7512,7512],\"mapped\",[117]],[[7513,7513],\"mapped\",[7453]],[[7514,7514],\"mapped\",[623]],[[7515,7515],\"mapped\",[118]],[[7516,7516],\"mapped\",[7461]],[[7517,7517],\"mapped\",[946]],[[7518,7518],\"mapped\",[947]],[[7519,7519],\"mapped\",[948]],[[7520,7520],\"mapped\",[966]],[[7521,7521],\"mapped\",[967]],[[7522,7522],\"mapped\",[105]],[[7523,7523],\"mapped\",[114]],[[7524,7524],\"mapped\",[117]],[[7525,7525],\"mapped\",[118]],[[7526,7526],\"mapped\",[946]],[[7527,7527],\"mapped\",[947]],[[7528,7528],\"mapped\",[961]],[[7529,7529],\"mapped\",[966]],[[7530,7530],\"mapped\",[967]],[[7531,7531],\"valid\"],[[7532,7543],\"valid\"],[[7544,7544],\"mapped\",[1085]],[[7545,7578],\"valid\"],[[7579,7579],\"mapped\",[594]],[[7580,7580],\"mapped\",[99]],[[7581,7581],\"mapped\",[597]],[[7582,7582],\"mapped\",[240]],[[7583,7583],\"mapped\",[604]],[[7584,7584],\"mapped\",[102]],[[7585,7585],\"mapped\",[607]],[[7586,7586],\"mapped\",[609]],[[7587,7587],\"mapped\",[613]],[[7588,7588],\"mapped\",[616]],[[7589,7589],\"mapped\",[617]],[[7590,7590],\"mapped\",[618]],[[7591,7591],\"mapped\",[7547]],[[7592,7592],\"mapped\",[669]],[[7593,7593],\"mapped\",[621]],[[7594,7594],\"mapped\",[7557]],[[7595,7595],\"mapped\",[671]],[[7596,7596],\"mapped\",[625]],[[7597,7597],\"mapped\",[624]],[[7598,7598],\"mapped\",[626]],[[7599,7599],\"mapped\",[627]],[[7600,7600],\"mapped\",[628]],[[7601,7601],\"mapped\",[629]],[[7602,7602],\"mapped\",[632]],[[7603,7603],\"mapped\",[642]],[[7604,7604],\"mapped\",[643]],[[7605,7605],\"mapped\",[427]],[[7606,7606],\"mapped\",[649]],[[7607,7607],\"mapped\",[650]],[[7608,7608],\"mapped\",[7452]],[[7609,7609],\"mapped\",[651]],[[7610,7610],\"mapped\",[652]],[[7611,7611],\"mapped\",[122]],[[7612,7612],\"mapped\",[656]],[[7613,7613],\"mapped\",[657]],[[7614,7614],\"mapped\",[658]],[[7615,7615],\"mapped\",[952]],[[7616,7619],\"valid\"],[[7620,7626],\"valid\"],[[7627,7654],\"valid\"],[[7655,7669],\"valid\"],[[7670,7675],\"disallowed\"],[[7676,7676],\"valid\"],[[7677,7677],\"valid\"],[[7678,7679],\"valid\"],[[7680,7680],\"mapped\",[7681]],[[7681,7681],\"valid\"],[[7682,7682],\"mapped\",[7683]],[[7683,7683],\"valid\"],[[7684,7684],\"mapped\",[7685]],[[7685,7685],\"valid\"],[[7686,7686],\"mapped\",[7687]],[[7687,7687],\"valid\"],[[7688,7688],\"mapped\",[7689]],[[7689,7689],\"valid\"],[[7690,7690],\"mapped\",[7691]],[[7691,7691],\"valid\"],[[7692,7692],\"mapped\",[7693]],[[7693,7693],\"valid\"],[[7694,7694],\"mapped\",[7695]],[[7695,7695],\"valid\"],[[7696,7696],\"mapped\",[7697]],[[7697,7697],\"valid\"],[[7698,7698],\"mapped\",[7699]],[[7699,7699],\"valid\"],[[7700,7700],\"mapped\",[7701]],[[7701,7701],\"valid\"],[[7702,7702],\"mapped\",[7703]],[[7703,7703],\"valid\"],[[7704,7704],\"mapped\",[7705]],[[7705,7705],\"valid\"],[[7706,7706],\"mapped\",[7707]],[[7707,7707],\"valid\"],[[7708,7708],\"mapped\",[7709]],[[7709,7709],\"valid\"],[[7710,7710],\"mapped\",[7711]],[[7711,7711],\"valid\"],[[7712,7712],\"mapped\",[7713]],[[7713,7713],\"valid\"],[[7714,7714],\"mapped\",[7715]],[[7715,7715],\"valid\"],[[7716,7716],\"mapped\",[7717]],[[7717,7717],\"valid\"],[[7718,7718],\"mapped\",[7719]],[[7719,7719],\"valid\"],[[7720,7720],\"mapped\",[7721]],[[7721,7721],\"valid\"],[[7722,7722],\"mapped\",[7723]],[[7723,7723],\"valid\"],[[7724,7724],\"mapped\",[7725]],[[7725,7725],\"valid\"],[[7726,7726],\"mapped\",[7727]],[[7727,7727],\"valid\"],[[7728,7728],\"mapped\",[7729]],[[7729,7729],\"valid\"],[[7730,7730],\"mapped\",[7731]],[[7731,7731],\"valid\"],[[7732,7732],\"mapped\",[7733]],[[7733,7733],\"valid\"],[[7734,7734],\"mapped\",[7735]],[[7735,7735],\"valid\"],[[7736,7736],\"mapped\",[7737]],[[7737,7737],\"valid\"],[[7738,7738],\"mapped\",[7739]],[[7739,7739],\"valid\"],[[7740,7740],\"mapped\",[7741]],[[7741,7741],\"valid\"],[[7742,7742],\"mapped\",[7743]],[[7743,7743],\"valid\"],[[7744,7744],\"mapped\",[7745]],[[7745,7745],\"valid\"],[[7746,7746],\"mapped\",[7747]],[[7747,7747],\"valid\"],[[7748,7748],\"mapped\",[7749]],[[7749,7749],\"valid\"],[[7750,7750],\"mapped\",[7751]],[[7751,7751],\"valid\"],[[7752,7752],\"mapped\",[7753]],[[7753,7753],\"valid\"],[[7754,7754],\"mapped\",[7755]],[[7755,7755],\"valid\"],[[7756,7756],\"mapped\",[7757]],[[7757,7757],\"valid\"],[[7758,7758],\"mapped\",[7759]],[[7759,7759],\"valid\"],[[7760,7760],\"mapped\",[7761]],[[7761,7761],\"valid\"],[[7762,7762],\"mapped\",[7763]],[[7763,7763],\"valid\"],[[7764,7764],\"mapped\",[7765]],[[7765,7765],\"valid\"],[[7766,7766],\"mapped\",[7767]],[[7767,7767],\"valid\"],[[7768,7768],\"mapped\",[7769]],[[7769,7769],\"valid\"],[[7770,7770],\"mapped\",[7771]],[[7771,7771],\"valid\"],[[7772,7772],\"mapped\",[7773]],[[7773,7773],\"valid\"],[[7774,7774],\"mapped\",[7775]],[[7775,7775],\"valid\"],[[7776,7776],\"mapped\",[7777]],[[7777,7777],\"valid\"],[[7778,7778],\"mapped\",[7779]],[[7779,7779],\"valid\"],[[7780,7780],\"mapped\",[7781]],[[7781,7781],\"valid\"],[[7782,7782],\"mapped\",[7783]],[[7783,7783],\"valid\"],[[7784,7784],\"mapped\",[7785]],[[7785,7785],\"valid\"],[[7786,7786],\"mapped\",[7787]],[[7787,7787],\"valid\"],[[7788,7788],\"mapped\",[7789]],[[7789,7789],\"valid\"],[[7790,7790],\"mapped\",[7791]],[[7791,7791],\"valid\"],[[7792,7792],\"mapped\",[7793]],[[7793,7793],\"valid\"],[[7794,7794],\"mapped\",[7795]],[[7795,7795],\"valid\"],[[7796,7796],\"mapped\",[7797]],[[7797,7797],\"valid\"],[[7798,7798],\"mapped\",[7799]],[[7799,7799],\"valid\"],[[7800,7800],\"mapped\",[7801]],[[7801,7801],\"valid\"],[[7802,7802],\"mapped\",[7803]],[[7803,7803],\"valid\"],[[7804,7804],\"mapped\",[7805]],[[7805,7805],\"valid\"],[[7806,7806],\"mapped\",[7807]],[[7807,7807],\"valid\"],[[7808,7808],\"mapped\",[7809]],[[7809,7809],\"valid\"],[[7810,7810],\"mapped\",[7811]],[[7811,7811],\"valid\"],[[7812,7812],\"mapped\",[7813]],[[7813,7813],\"valid\"],[[7814,7814],\"mapped\",[7815]],[[7815,7815],\"valid\"],[[7816,7816],\"mapped\",[7817]],[[7817,7817],\"valid\"],[[7818,7818],\"mapped\",[7819]],[[7819,7819],\"valid\"],[[7820,7820],\"mapped\",[7821]],[[7821,7821],\"valid\"],[[7822,7822],\"mapped\",[7823]],[[7823,7823],\"valid\"],[[7824,7824],\"mapped\",[7825]],[[7825,7825],\"valid\"],[[7826,7826],\"mapped\",[7827]],[[7827,7827],\"valid\"],[[7828,7828],\"mapped\",[7829]],[[7829,7833],\"valid\"],[[7834,7834],\"mapped\",[97,702]],[[7835,7835],\"mapped\",[7777]],[[7836,7837],\"valid\"],[[7838,7838],\"mapped\",[115,115]],[[7839,7839],\"valid\"],[[7840,7840],\"mapped\",[7841]],[[7841,7841],\"valid\"],[[7842,7842],\"mapped\",[7843]],[[7843,7843],\"valid\"],[[7844,7844],\"mapped\",[7845]],[[7845,7845],\"valid\"],[[7846,7846],\"mapped\",[7847]],[[7847,7847],\"valid\"],[[7848,7848],\"mapped\",[7849]],[[7849,7849],\"valid\"],[[7850,7850],\"mapped\",[7851]],[[7851,7851],\"valid\"],[[7852,7852],\"mapped\",[7853]],[[7853,7853],\"valid\"],[[7854,7854],\"mapped\",[7855]],[[7855,7855],\"valid\"],[[7856,7856],\"mapped\",[7857]],[[7857,7857],\"valid\"],[[7858,7858],\"mapped\",[7859]],[[7859,7859],\"valid\"],[[7860,7860],\"mapped\",[7861]],[[7861,7861],\"valid\"],[[7862,7862],\"mapped\",[7863]],[[7863,7863],\"valid\"],[[7864,7864],\"mapped\",[7865]],[[7865,7865],\"valid\"],[[7866,7866],\"mapped\",[7867]],[[7867,7867],\"valid\"],[[7868,7868],\"mapped\",[7869]],[[7869,7869],\"valid\"],[[7870,7870],\"mapped\",[7871]],[[7871,7871],\"valid\"],[[7872,7872],\"mapped\",[7873]],[[7873,7873],\"valid\"],[[7874,7874],\"mapped\",[7875]],[[7875,7875],\"valid\"],[[7876,7876],\"mapped\",[7877]],[[7877,7877],\"valid\"],[[7878,7878],\"mapped\",[7879]],[[7879,7879],\"valid\"],[[7880,7880],\"mapped\",[7881]],[[7881,7881],\"valid\"],[[7882,7882],\"mapped\",[7883]],[[7883,7883],\"valid\"],[[7884,7884],\"mapped\",[7885]],[[7885,7885],\"valid\"],[[7886,7886],\"mapped\",[7887]],[[7887,7887],\"valid\"],[[7888,7888],\"mapped\",[7889]],[[7889,7889],\"valid\"],[[7890,7890],\"mapped\",[7891]],[[7891,7891],\"valid\"],[[7892,7892],\"mapped\",[7893]],[[7893,7893],\"valid\"],[[7894,7894],\"mapped\",[7895]],[[7895,7895],\"valid\"],[[7896,7896],\"mapped\",[7897]],[[7897,7897],\"valid\"],[[7898,7898],\"mapped\",[7899]],[[7899,7899],\"valid\"],[[7900,7900],\"mapped\",[7901]],[[7901,7901],\"valid\"],[[7902,7902],\"mapped\",[7903]],[[7903,7903],\"valid\"],[[7904,7904],\"mapped\",[7905]],[[7905,7905],\"valid\"],[[7906,7906],\"mapped\",[7907]],[[7907,7907],\"valid\"],[[7908,7908],\"mapped\",[7909]],[[7909,7909],\"valid\"],[[7910,7910],\"mapped\",[7911]],[[7911,7911],\"valid\"],[[7912,7912],\"mapped\",[7913]],[[7913,7913],\"valid\"],[[7914,7914],\"mapped\",[7915]],[[7915,7915],\"valid\"],[[7916,7916],\"mapped\",[7917]],[[7917,7917],\"valid\"],[[7918,7918],\"mapped\",[7919]],[[7919,7919],\"valid\"],[[7920,7920],\"mapped\",[7921]],[[7921,7921],\"valid\"],[[7922,7922],\"mapped\",[7923]],[[7923,7923],\"valid\"],[[7924,7924],\"mapped\",[7925]],[[7925,7925],\"valid\"],[[7926,7926],\"mapped\",[7927]],[[7927,7927],\"valid\"],[[7928,7928],\"mapped\",[7929]],[[7929,7929],\"valid\"],[[7930,7930],\"mapped\",[7931]],[[7931,7931],\"valid\"],[[7932,7932],\"mapped\",[7933]],[[7933,7933],\"valid\"],[[7934,7934],\"mapped\",[7935]],[[7935,7935],\"valid\"],[[7936,7943],\"valid\"],[[7944,7944],\"mapped\",[7936]],[[7945,7945],\"mapped\",[7937]],[[7946,7946],\"mapped\",[7938]],[[7947,7947],\"mapped\",[7939]],[[7948,7948],\"mapped\",[7940]],[[7949,7949],\"mapped\",[7941]],[[7950,7950],\"mapped\",[7942]],[[7951,7951],\"mapped\",[7943]],[[7952,7957],\"valid\"],[[7958,7959],\"disallowed\"],[[7960,7960],\"mapped\",[7952]],[[7961,7961],\"mapped\",[7953]],[[7962,7962],\"mapped\",[7954]],[[7963,7963],\"mapped\",[7955]],[[7964,7964],\"mapped\",[7956]],[[7965,7965],\"mapped\",[7957]],[[7966,7967],\"disallowed\"],[[7968,7975],\"valid\"],[[7976,7976],\"mapped\",[7968]],[[7977,7977],\"mapped\",[7969]],[[7978,7978],\"mapped\",[7970]],[[7979,7979],\"mapped\",[7971]],[[7980,7980],\"mapped\",[7972]],[[7981,7981],\"mapped\",[7973]],[[7982,7982],\"mapped\",[7974]],[[7983,7983],\"mapped\",[7975]],[[7984,7991],\"valid\"],[[7992,7992],\"mapped\",[7984]],[[7993,7993],\"mapped\",[7985]],[[7994,7994],\"mapped\",[7986]],[[7995,7995],\"mapped\",[7987]],[[7996,7996],\"mapped\",[7988]],[[7997,7997],\"mapped\",[7989]],[[7998,7998],\"mapped\",[7990]],[[7999,7999],\"mapped\",[7991]],[[8000,8005],\"valid\"],[[8006,8007],\"disallowed\"],[[8008,8008],\"mapped\",[8000]],[[8009,8009],\"mapped\",[8001]],[[8010,8010],\"mapped\",[8002]],[[8011,8011],\"mapped\",[8003]],[[8012,8012],\"mapped\",[8004]],[[8013,8013],\"mapped\",[8005]],[[8014,8015],\"disallowed\"],[[8016,8023],\"valid\"],[[8024,8024],\"disallowed\"],[[8025,8025],\"mapped\",[8017]],[[8026,8026],\"disallowed\"],[[8027,8027],\"mapped\",[8019]],[[8028,8028],\"disallowed\"],[[8029,8029],\"mapped\",[8021]],[[8030,8030],\"disallowed\"],[[8031,8031],\"mapped\",[8023]],[[8032,8039],\"valid\"],[[8040,8040],\"mapped\",[8032]],[[8041,8041],\"mapped\",[8033]],[[8042,8042],\"mapped\",[8034]],[[8043,8043],\"mapped\",[8035]],[[8044,8044],\"mapped\",[8036]],[[8045,8045],\"mapped\",[8037]],[[8046,8046],\"mapped\",[8038]],[[8047,8047],\"mapped\",[8039]],[[8048,8048],\"valid\"],[[8049,8049],\"mapped\",[940]],[[8050,8050],\"valid\"],[[8051,8051],\"mapped\",[941]],[[8052,8052],\"valid\"],[[8053,8053],\"mapped\",[942]],[[8054,8054],\"valid\"],[[8055,8055],\"mapped\",[943]],[[8056,8056],\"valid\"],[[8057,8057],\"mapped\",[972]],[[8058,8058],\"valid\"],[[8059,8059],\"mapped\",[973]],[[8060,8060],\"valid\"],[[8061,8061],\"mapped\",[974]],[[8062,8063],\"disallowed\"],[[8064,8064],\"mapped\",[7936,953]],[[8065,8065],\"mapped\",[7937,953]],[[8066,8066],\"mapped\",[7938,953]],[[8067,8067],\"mapped\",[7939,953]],[[8068,8068],\"mapped\",[7940,953]],[[8069,8069],\"mapped\",[7941,953]],[[8070,8070],\"mapped\",[7942,953]],[[8071,8071],\"mapped\",[7943,953]],[[8072,8072],\"mapped\",[7936,953]],[[8073,8073],\"mapped\",[7937,953]],[[8074,8074],\"mapped\",[7938,953]],[[8075,8075],\"mapped\",[7939,953]],[[8076,8076],\"mapped\",[7940,953]],[[8077,8077],\"mapped\",[7941,953]],[[8078,8078],\"mapped\",[7942,953]],[[8079,8079],\"mapped\",[7943,953]],[[8080,8080],\"mapped\",[7968,953]],[[8081,8081],\"mapped\",[7969,953]],[[8082,8082],\"mapped\",[7970,953]],[[8083,8083],\"mapped\",[7971,953]],[[8084,8084],\"mapped\",[7972,953]],[[8085,8085],\"mapped\",[7973,953]],[[8086,8086],\"mapped\",[7974,953]],[[8087,8087],\"mapped\",[7975,953]],[[8088,8088],\"mapped\",[7968,953]],[[8089,8089],\"mapped\",[7969,953]],[[8090,8090],\"mapped\",[7970,953]],[[8091,8091],\"mapped\",[7971,953]],[[8092,8092],\"mapped\",[7972,953]],[[8093,8093],\"mapped\",[7973,953]],[[8094,8094],\"mapped\",[7974,953]],[[8095,8095],\"mapped\",[7975,953]],[[8096,8096],\"mapped\",[8032,953]],[[8097,8097],\"mapped\",[8033,953]],[[8098,8098],\"mapped\",[8034,953]],[[8099,8099],\"mapped\",[8035,953]],[[8100,8100],\"mapped\",[8036,953]],[[8101,8101],\"mapped\",[8037,953]],[[8102,8102],\"mapped\",[8038,953]],[[8103,8103],\"mapped\",[8039,953]],[[8104,8104],\"mapped\",[8032,953]],[[8105,8105],\"mapped\",[8033,953]],[[8106,8106],\"mapped\",[8034,953]],[[8107,8107],\"mapped\",[8035,953]],[[8108,8108],\"mapped\",[8036,953]],[[8109,8109],\"mapped\",[8037,953]],[[8110,8110],\"mapped\",[8038,953]],[[8111,8111],\"mapped\",[8039,953]],[[8112,8113],\"valid\"],[[8114,8114],\"mapped\",[8048,953]],[[8115,8115],\"mapped\",[945,953]],[[8116,8116],\"mapped\",[940,953]],[[8117,8117],\"disallowed\"],[[8118,8118],\"valid\"],[[8119,8119],\"mapped\",[8118,953]],[[8120,8120],\"mapped\",[8112]],[[8121,8121],\"mapped\",[8113]],[[8122,8122],\"mapped\",[8048]],[[8123,8123],\"mapped\",[940]],[[8124,8124],\"mapped\",[945,953]],[[8125,8125],\"disallowed_STD3_mapped\",[32,787]],[[8126,8126],\"mapped\",[953]],[[8127,8127],\"disallowed_STD3_mapped\",[32,787]],[[8128,8128],\"disallowed_STD3_mapped\",[32,834]],[[8129,8129],\"disallowed_STD3_mapped\",[32,776,834]],[[8130,8130],\"mapped\",[8052,953]],[[8131,8131],\"mapped\",[951,953]],[[8132,8132],\"mapped\",[942,953]],[[8133,8133],\"disallowed\"],[[8134,8134],\"valid\"],[[8135,8135],\"mapped\",[8134,953]],[[8136,8136],\"mapped\",[8050]],[[8137,8137],\"mapped\",[941]],[[8138,8138],\"mapped\",[8052]],[[8139,8139],\"mapped\",[942]],[[8140,8140],\"mapped\",[951,953]],[[8141,8141],\"disallowed_STD3_mapped\",[32,787,768]],[[8142,8142],\"disallowed_STD3_mapped\",[32,787,769]],[[8143,8143],\"disallowed_STD3_mapped\",[32,787,834]],[[8144,8146],\"valid\"],[[8147,8147],\"mapped\",[912]],[[8148,8149],\"disallowed\"],[[8150,8151],\"valid\"],[[8152,8152],\"mapped\",[8144]],[[8153,8153],\"mapped\",[8145]],[[8154,8154],\"mapped\",[8054]],[[8155,8155],\"mapped\",[943]],[[8156,8156],\"disallowed\"],[[8157,8157],\"disallowed_STD3_mapped\",[32,788,768]],[[8158,8158],\"disallowed_STD3_mapped\",[32,788,769]],[[8159,8159],\"disallowed_STD3_mapped\",[32,788,834]],[[8160,8162],\"valid\"],[[8163,8163],\"mapped\",[944]],[[8164,8167],\"valid\"],[[8168,8168],\"mapped\",[8160]],[[8169,8169],\"mapped\",[8161]],[[8170,8170],\"mapped\",[8058]],[[8171,8171],\"mapped\",[973]],[[8172,8172],\"mapped\",[8165]],[[8173,8173],\"disallowed_STD3_mapped\",[32,776,768]],[[8174,8174],\"disallowed_STD3_mapped\",[32,776,769]],[[8175,8175],\"disallowed_STD3_mapped\",[96]],[[8176,8177],\"disallowed\"],[[8178,8178],\"mapped\",[8060,953]],[[8179,8179],\"mapped\",[969,953]],[[8180,8180],\"mapped\",[974,953]],[[8181,8181],\"disallowed\"],[[8182,8182],\"valid\"],[[8183,8183],\"mapped\",[8182,953]],[[8184,8184],\"mapped\",[8056]],[[8185,8185],\"mapped\",[972]],[[8186,8186],\"mapped\",[8060]],[[8187,8187],\"mapped\",[974]],[[8188,8188],\"mapped\",[969,953]],[[8189,8189],\"disallowed_STD3_mapped\",[32,769]],[[8190,8190],\"disallowed_STD3_mapped\",[32,788]],[[8191,8191],\"disallowed\"],[[8192,8202],\"disallowed_STD3_mapped\",[32]],[[8203,8203],\"ignored\"],[[8204,8205],\"deviation\",[]],[[8206,8207],\"disallowed\"],[[8208,8208],\"valid\",[],\"NV8\"],[[8209,8209],\"mapped\",[8208]],[[8210,8214],\"valid\",[],\"NV8\"],[[8215,8215],\"disallowed_STD3_mapped\",[32,819]],[[8216,8227],\"valid\",[],\"NV8\"],[[8228,8230],\"disallowed\"],[[8231,8231],\"valid\",[],\"NV8\"],[[8232,8238],\"disallowed\"],[[8239,8239],\"disallowed_STD3_mapped\",[32]],[[8240,8242],\"valid\",[],\"NV8\"],[[8243,8243],\"mapped\",[8242,8242]],[[8244,8244],\"mapped\",[8242,8242,8242]],[[8245,8245],\"valid\",[],\"NV8\"],[[8246,8246],\"mapped\",[8245,8245]],[[8247,8247],\"mapped\",[8245,8245,8245]],[[8248,8251],\"valid\",[],\"NV8\"],[[8252,8252],\"disallowed_STD3_mapped\",[33,33]],[[8253,8253],\"valid\",[],\"NV8\"],[[8254,8254],\"disallowed_STD3_mapped\",[32,773]],[[8255,8262],\"valid\",[],\"NV8\"],[[8263,8263],\"disallowed_STD3_mapped\",[63,63]],[[8264,8264],\"disallowed_STD3_mapped\",[63,33]],[[8265,8265],\"disallowed_STD3_mapped\",[33,63]],[[8266,8269],\"valid\",[],\"NV8\"],[[8270,8274],\"valid\",[],\"NV8\"],[[8275,8276],\"valid\",[],\"NV8\"],[[8277,8278],\"valid\",[],\"NV8\"],[[8279,8279],\"mapped\",[8242,8242,8242,8242]],[[8280,8286],\"valid\",[],\"NV8\"],[[8287,8287],\"disallowed_STD3_mapped\",[32]],[[8288,8288],\"ignored\"],[[8289,8291],\"disallowed\"],[[8292,8292],\"ignored\"],[[8293,8293],\"disallowed\"],[[8294,8297],\"disallowed\"],[[8298,8303],\"disallowed\"],[[8304,8304],\"mapped\",[48]],[[8305,8305],\"mapped\",[105]],[[8306,8307],\"disallowed\"],[[8308,8308],\"mapped\",[52]],[[8309,8309],\"mapped\",[53]],[[8310,8310],\"mapped\",[54]],[[8311,8311],\"mapped\",[55]],[[8312,8312],\"mapped\",[56]],[[8313,8313],\"mapped\",[57]],[[8314,8314],\"disallowed_STD3_mapped\",[43]],[[8315,8315],\"mapped\",[8722]],[[8316,8316],\"disallowed_STD3_mapped\",[61]],[[8317,8317],\"disallowed_STD3_mapped\",[40]],[[8318,8318],\"disallowed_STD3_mapped\",[41]],[[8319,8319],\"mapped\",[110]],[[8320,8320],\"mapped\",[48]],[[8321,8321],\"mapped\",[49]],[[8322,8322],\"mapped\",[50]],[[8323,8323],\"mapped\",[51]],[[8324,8324],\"mapped\",[52]],[[8325,8325],\"mapped\",[53]],[[8326,8326],\"mapped\",[54]],[[8327,8327],\"mapped\",[55]],[[8328,8328],\"mapped\",[56]],[[8329,8329],\"mapped\",[57]],[[8330,8330],\"disallowed_STD3_mapped\",[43]],[[8331,8331],\"mapped\",[8722]],[[8332,8332],\"disallowed_STD3_mapped\",[61]],[[8333,8333],\"disallowed_STD3_mapped\",[40]],[[8334,8334],\"disallowed_STD3_mapped\",[41]],[[8335,8335],\"disallowed\"],[[8336,8336],\"mapped\",[97]],[[8337,8337],\"mapped\",[101]],[[8338,8338],\"mapped\",[111]],[[8339,8339],\"mapped\",[120]],[[8340,8340],\"mapped\",[601]],[[8341,8341],\"mapped\",[104]],[[8342,8342],\"mapped\",[107]],[[8343,8343],\"mapped\",[108]],[[8344,8344],\"mapped\",[109]],[[8345,8345],\"mapped\",[110]],[[8346,8346],\"mapped\",[112]],[[8347,8347],\"mapped\",[115]],[[8348,8348],\"mapped\",[116]],[[8349,8351],\"disallowed\"],[[8352,8359],\"valid\",[],\"NV8\"],[[8360,8360],\"mapped\",[114,115]],[[8361,8362],\"valid\",[],\"NV8\"],[[8363,8363],\"valid\",[],\"NV8\"],[[8364,8364],\"valid\",[],\"NV8\"],[[8365,8367],\"valid\",[],\"NV8\"],[[8368,8369],\"valid\",[],\"NV8\"],[[8370,8373],\"valid\",[],\"NV8\"],[[8374,8376],\"valid\",[],\"NV8\"],[[8377,8377],\"valid\",[],\"NV8\"],[[8378,8378],\"valid\",[],\"NV8\"],[[8379,8381],\"valid\",[],\"NV8\"],[[8382,8382],\"valid\",[],\"NV8\"],[[8383,8399],\"disallowed\"],[[8400,8417],\"valid\",[],\"NV8\"],[[8418,8419],\"valid\",[],\"NV8\"],[[8420,8426],\"valid\",[],\"NV8\"],[[8427,8427],\"valid\",[],\"NV8\"],[[8428,8431],\"valid\",[],\"NV8\"],[[8432,8432],\"valid\",[],\"NV8\"],[[8433,8447],\"disallowed\"],[[8448,8448],\"disallowed_STD3_mapped\",[97,47,99]],[[8449,8449],\"disallowed_STD3_mapped\",[97,47,115]],[[8450,8450],\"mapped\",[99]],[[8451,8451],\"mapped\",[176,99]],[[8452,8452],\"valid\",[],\"NV8\"],[[8453,8453],\"disallowed_STD3_mapped\",[99,47,111]],[[8454,8454],\"disallowed_STD3_mapped\",[99,47,117]],[[8455,8455],\"mapped\",[603]],[[8456,8456],\"valid\",[],\"NV8\"],[[8457,8457],\"mapped\",[176,102]],[[8458,8458],\"mapped\",[103]],[[8459,8462],\"mapped\",[104]],[[8463,8463],\"mapped\",[295]],[[8464,8465],\"mapped\",[105]],[[8466,8467],\"mapped\",[108]],[[8468,8468],\"valid\",[],\"NV8\"],[[8469,8469],\"mapped\",[110]],[[8470,8470],\"mapped\",[110,111]],[[8471,8472],\"valid\",[],\"NV8\"],[[8473,8473],\"mapped\",[112]],[[8474,8474],\"mapped\",[113]],[[8475,8477],\"mapped\",[114]],[[8478,8479],\"valid\",[],\"NV8\"],[[8480,8480],\"mapped\",[115,109]],[[8481,8481],\"mapped\",[116,101,108]],[[8482,8482],\"mapped\",[116,109]],[[8483,8483],\"valid\",[],\"NV8\"],[[8484,8484],\"mapped\",[122]],[[8485,8485],\"valid\",[],\"NV8\"],[[8486,8486],\"mapped\",[969]],[[8487,8487],\"valid\",[],\"NV8\"],[[8488,8488],\"mapped\",[122]],[[8489,8489],\"valid\",[],\"NV8\"],[[8490,8490],\"mapped\",[107]],[[8491,8491],\"mapped\",[229]],[[8492,8492],\"mapped\",[98]],[[8493,8493],\"mapped\",[99]],[[8494,8494],\"valid\",[],\"NV8\"],[[8495,8496],\"mapped\",[101]],[[8497,8497],\"mapped\",[102]],[[8498,8498],\"disallowed\"],[[8499,8499],\"mapped\",[109]],[[8500,8500],\"mapped\",[111]],[[8501,8501],\"mapped\",[1488]],[[8502,8502],\"mapped\",[1489]],[[8503,8503],\"mapped\",[1490]],[[8504,8504],\"mapped\",[1491]],[[8505,8505],\"mapped\",[105]],[[8506,8506],\"valid\",[],\"NV8\"],[[8507,8507],\"mapped\",[102,97,120]],[[8508,8508],\"mapped\",[960]],[[8509,8510],\"mapped\",[947]],[[8511,8511],\"mapped\",[960]],[[8512,8512],\"mapped\",[8721]],[[8513,8516],\"valid\",[],\"NV8\"],[[8517,8518],\"mapped\",[100]],[[8519,8519],\"mapped\",[101]],[[8520,8520],\"mapped\",[105]],[[8521,8521],\"mapped\",[106]],[[8522,8523],\"valid\",[],\"NV8\"],[[8524,8524],\"valid\",[],\"NV8\"],[[8525,8525],\"valid\",[],\"NV8\"],[[8526,8526],\"valid\"],[[8527,8527],\"valid\",[],\"NV8\"],[[8528,8528],\"mapped\",[49,8260,55]],[[8529,8529],\"mapped\",[49,8260,57]],[[8530,8530],\"mapped\",[49,8260,49,48]],[[8531,8531],\"mapped\",[49,8260,51]],[[8532,8532],\"mapped\",[50,8260,51]],[[8533,8533],\"mapped\",[49,8260,53]],[[8534,8534],\"mapped\",[50,8260,53]],[[8535,8535],\"mapped\",[51,8260,53]],[[8536,8536],\"mapped\",[52,8260,53]],[[8537,8537],\"mapped\",[49,8260,54]],[[8538,8538],\"mapped\",[53,8260,54]],[[8539,8539],\"mapped\",[49,8260,56]],[[8540,8540],\"mapped\",[51,8260,56]],[[8541,8541],\"mapped\",[53,8260,56]],[[8542,8542],\"mapped\",[55,8260,56]],[[8543,8543],\"mapped\",[49,8260]],[[8544,8544],\"mapped\",[105]],[[8545,8545],\"mapped\",[105,105]],[[8546,8546],\"mapped\",[105,105,105]],[[8547,8547],\"mapped\",[105,118]],[[8548,8548],\"mapped\",[118]],[[8549,8549],\"mapped\",[118,105]],[[8550,8550],\"mapped\",[118,105,105]],[[8551,8551],\"mapped\",[118,105,105,105]],[[8552,8552],\"mapped\",[105,120]],[[8553,8553],\"mapped\",[120]],[[8554,8554],\"mapped\",[120,105]],[[8555,8555],\"mapped\",[120,105,105]],[[8556,8556],\"mapped\",[108]],[[8557,8557],\"mapped\",[99]],[[8558,8558],\"mapped\",[100]],[[8559,8559],\"mapped\",[109]],[[8560,8560],\"mapped\",[105]],[[8561,8561],\"mapped\",[105,105]],[[8562,8562],\"mapped\",[105,105,105]],[[8563,8563],\"mapped\",[105,118]],[[8564,8564],\"mapped\",[118]],[[8565,8565],\"mapped\",[118,105]],[[8566,8566],\"mapped\",[118,105,105]],[[8567,8567],\"mapped\",[118,105,105,105]],[[8568,8568],\"mapped\",[105,120]],[[8569,8569],\"mapped\",[120]],[[8570,8570],\"mapped\",[120,105]],[[8571,8571],\"mapped\",[120,105,105]],[[8572,8572],\"mapped\",[108]],[[8573,8573],\"mapped\",[99]],[[8574,8574],\"mapped\",[100]],[[8575,8575],\"mapped\",[109]],[[8576,8578],\"valid\",[],\"NV8\"],[[8579,8579],\"disallowed\"],[[8580,8580],\"valid\"],[[8581,8584],\"valid\",[],\"NV8\"],[[8585,8585],\"mapped\",[48,8260,51]],[[8586,8587],\"valid\",[],\"NV8\"],[[8588,8591],\"disallowed\"],[[8592,8682],\"valid\",[],\"NV8\"],[[8683,8691],\"valid\",[],\"NV8\"],[[8692,8703],\"valid\",[],\"NV8\"],[[8704,8747],\"valid\",[],\"NV8\"],[[8748,8748],\"mapped\",[8747,8747]],[[8749,8749],\"mapped\",[8747,8747,8747]],[[8750,8750],\"valid\",[],\"NV8\"],[[8751,8751],\"mapped\",[8750,8750]],[[8752,8752],\"mapped\",[8750,8750,8750]],[[8753,8799],\"valid\",[],\"NV8\"],[[8800,8800],\"disallowed_STD3_valid\"],[[8801,8813],\"valid\",[],\"NV8\"],[[8814,8815],\"disallowed_STD3_valid\"],[[8816,8945],\"valid\",[],\"NV8\"],[[8946,8959],\"valid\",[],\"NV8\"],[[8960,8960],\"valid\",[],\"NV8\"],[[8961,8961],\"valid\",[],\"NV8\"],[[8962,9000],\"valid\",[],\"NV8\"],[[9001,9001],\"mapped\",[12296]],[[9002,9002],\"mapped\",[12297]],[[9003,9082],\"valid\",[],\"NV8\"],[[9083,9083],\"valid\",[],\"NV8\"],[[9084,9084],\"valid\",[],\"NV8\"],[[9085,9114],\"valid\",[],\"NV8\"],[[9115,9166],\"valid\",[],\"NV8\"],[[9167,9168],\"valid\",[],\"NV8\"],[[9169,9179],\"valid\",[],\"NV8\"],[[9180,9191],\"valid\",[],\"NV8\"],[[9192,9192],\"valid\",[],\"NV8\"],[[9193,9203],\"valid\",[],\"NV8\"],[[9204,9210],\"valid\",[],\"NV8\"],[[9211,9215],\"disallowed\"],[[9216,9252],\"valid\",[],\"NV8\"],[[9253,9254],\"valid\",[],\"NV8\"],[[9255,9279],\"disallowed\"],[[9280,9290],\"valid\",[],\"NV8\"],[[9291,9311],\"disallowed\"],[[9312,9312],\"mapped\",[49]],[[9313,9313],\"mapped\",[50]],[[9314,9314],\"mapped\",[51]],[[9315,9315],\"mapped\",[52]],[[9316,9316],\"mapped\",[53]],[[9317,9317],\"mapped\",[54]],[[9318,9318],\"mapped\",[55]],[[9319,9319],\"mapped\",[56]],[[9320,9320],\"mapped\",[57]],[[9321,9321],\"mapped\",[49,48]],[[9322,9322],\"mapped\",[49,49]],[[9323,9323],\"mapped\",[49,50]],[[9324,9324],\"mapped\",[49,51]],[[9325,9325],\"mapped\",[49,52]],[[9326,9326],\"mapped\",[49,53]],[[9327,9327],\"mapped\",[49,54]],[[9328,9328],\"mapped\",[49,55]],[[9329,9329],\"mapped\",[49,56]],[[9330,9330],\"mapped\",[49,57]],[[9331,9331],\"mapped\",[50,48]],[[9332,9332],\"disallowed_STD3_mapped\",[40,49,41]],[[9333,9333],\"disallowed_STD3_mapped\",[40,50,41]],[[9334,9334],\"disallowed_STD3_mapped\",[40,51,41]],[[9335,9335],\"disallowed_STD3_mapped\",[40,52,41]],[[9336,9336],\"disallowed_STD3_mapped\",[40,53,41]],[[9337,9337],\"disallowed_STD3_mapped\",[40,54,41]],[[9338,9338],\"disallowed_STD3_mapped\",[40,55,41]],[[9339,9339],\"disallowed_STD3_mapped\",[40,56,41]],[[9340,9340],\"disallowed_STD3_mapped\",[40,57,41]],[[9341,9341],\"disallowed_STD3_mapped\",[40,49,48,41]],[[9342,9342],\"disallowed_STD3_mapped\",[40,49,49,41]],[[9343,9343],\"disallowed_STD3_mapped\",[40,49,50,41]],[[9344,9344],\"disallowed_STD3_mapped\",[40,49,51,41]],[[9345,9345],\"disallowed_STD3_mapped\",[40,49,52,41]],[[9346,9346],\"disallowed_STD3_mapped\",[40,49,53,41]],[[9347,9347],\"disallowed_STD3_mapped\",[40,49,54,41]],[[9348,9348],\"disallowed_STD3_mapped\",[40,49,55,41]],[[9349,9349],\"disallowed_STD3_mapped\",[40,49,56,41]],[[9350,9350],\"disallowed_STD3_mapped\",[40,49,57,41]],[[9351,9351],\"disallowed_STD3_mapped\",[40,50,48,41]],[[9352,9371],\"disallowed\"],[[9372,9372],\"disallowed_STD3_mapped\",[40,97,41]],[[9373,9373],\"disallowed_STD3_mapped\",[40,98,41]],[[9374,9374],\"disallowed_STD3_mapped\",[40,99,41]],[[9375,9375],\"disallowed_STD3_mapped\",[40,100,41]],[[9376,9376],\"disallowed_STD3_mapped\",[40,101,41]],[[9377,9377],\"disallowed_STD3_mapped\",[40,102,41]],[[9378,9378],\"disallowed_STD3_mapped\",[40,103,41]],[[9379,9379],\"disallowed_STD3_mapped\",[40,104,41]],[[9380,9380],\"disallowed_STD3_mapped\",[40,105,41]],[[9381,9381],\"disallowed_STD3_mapped\",[40,106,41]],[[9382,9382],\"disallowed_STD3_mapped\",[40,107,41]],[[9383,9383],\"disallowed_STD3_mapped\",[40,108,41]],[[9384,9384],\"disallowed_STD3_mapped\",[40,109,41]],[[9385,9385],\"disallowed_STD3_mapped\",[40,110,41]],[[9386,9386],\"disallowed_STD3_mapped\",[40,111,41]],[[9387,9387],\"disallowed_STD3_mapped\",[40,112,41]],[[9388,9388],\"disallowed_STD3_mapped\",[40,113,41]],[[9389,9389],\"disallowed_STD3_mapped\",[40,114,41]],[[9390,9390],\"disallowed_STD3_mapped\",[40,115,41]],[[9391,9391],\"disallowed_STD3_mapped\",[40,116,41]],[[9392,9392],\"disallowed_STD3_mapped\",[40,117,41]],[[9393,9393],\"disallowed_STD3_mapped\",[40,118,41]],[[9394,9394],\"disallowed_STD3_mapped\",[40,119,41]],[[9395,9395],\"disallowed_STD3_mapped\",[40,120,41]],[[9396,9396],\"disallowed_STD3_mapped\",[40,121,41]],[[9397,9397],\"disallowed_STD3_mapped\",[40,122,41]],[[9398,9398],\"mapped\",[97]],[[9399,9399],\"mapped\",[98]],[[9400,9400],\"mapped\",[99]],[[9401,9401],\"mapped\",[100]],[[9402,9402],\"mapped\",[101]],[[9403,9403],\"mapped\",[102]],[[9404,9404],\"mapped\",[103]],[[9405,9405],\"mapped\",[104]],[[9406,9406],\"mapped\",[105]],[[9407,9407],\"mapped\",[106]],[[9408,9408],\"mapped\",[107]],[[9409,9409],\"mapped\",[108]],[[9410,9410],\"mapped\",[109]],[[9411,9411],\"mapped\",[110]],[[9412,9412],\"mapped\",[111]],[[9413,9413],\"mapped\",[112]],[[9414,9414],\"mapped\",[113]],[[9415,9415],\"mapped\",[114]],[[9416,9416],\"mapped\",[115]],[[9417,9417],\"mapped\",[116]],[[9418,9418],\"mapped\",[117]],[[9419,9419],\"mapped\",[118]],[[9420,9420],\"mapped\",[119]],[[9421,9421],\"mapped\",[120]],[[9422,9422],\"mapped\",[121]],[[9423,9423],\"mapped\",[122]],[[9424,9424],\"mapped\",[97]],[[9425,9425],\"mapped\",[98]],[[9426,9426],\"mapped\",[99]],[[9427,9427],\"mapped\",[100]],[[9428,9428],\"mapped\",[101]],[[9429,9429],\"mapped\",[102]],[[9430,9430],\"mapped\",[103]],[[9431,9431],\"mapped\",[104]],[[9432,9432],\"mapped\",[105]],[[9433,9433],\"mapped\",[106]],[[9434,9434],\"mapped\",[107]],[[9435,9435],\"mapped\",[108]],[[9436,9436],\"mapped\",[109]],[[9437,9437],\"mapped\",[110]],[[9438,9438],\"mapped\",[111]],[[9439,9439],\"mapped\",[112]],[[9440,9440],\"mapped\",[113]],[[9441,9441],\"mapped\",[114]],[[9442,9442],\"mapped\",[115]],[[9443,9443],\"mapped\",[116]],[[9444,9444],\"mapped\",[117]],[[9445,9445],\"mapped\",[118]],[[9446,9446],\"mapped\",[119]],[[9447,9447],\"mapped\",[120]],[[9448,9448],\"mapped\",[121]],[[9449,9449],\"mapped\",[122]],[[9450,9450],\"mapped\",[48]],[[9451,9470],\"valid\",[],\"NV8\"],[[9471,9471],\"valid\",[],\"NV8\"],[[9472,9621],\"valid\",[],\"NV8\"],[[9622,9631],\"valid\",[],\"NV8\"],[[9632,9711],\"valid\",[],\"NV8\"],[[9712,9719],\"valid\",[],\"NV8\"],[[9720,9727],\"valid\",[],\"NV8\"],[[9728,9747],\"valid\",[],\"NV8\"],[[9748,9749],\"valid\",[],\"NV8\"],[[9750,9751],\"valid\",[],\"NV8\"],[[9752,9752],\"valid\",[],\"NV8\"],[[9753,9753],\"valid\",[],\"NV8\"],[[9754,9839],\"valid\",[],\"NV8\"],[[9840,9841],\"valid\",[],\"NV8\"],[[9842,9853],\"valid\",[],\"NV8\"],[[9854,9855],\"valid\",[],\"NV8\"],[[9856,9865],\"valid\",[],\"NV8\"],[[9866,9873],\"valid\",[],\"NV8\"],[[9874,9884],\"valid\",[],\"NV8\"],[[9885,9885],\"valid\",[],\"NV8\"],[[9886,9887],\"valid\",[],\"NV8\"],[[9888,9889],\"valid\",[],\"NV8\"],[[9890,9905],\"valid\",[],\"NV8\"],[[9906,9906],\"valid\",[],\"NV8\"],[[9907,9916],\"valid\",[],\"NV8\"],[[9917,9919],\"valid\",[],\"NV8\"],[[9920,9923],\"valid\",[],\"NV8\"],[[9924,9933],\"valid\",[],\"NV8\"],[[9934,9934],\"valid\",[],\"NV8\"],[[9935,9953],\"valid\",[],\"NV8\"],[[9954,9954],\"valid\",[],\"NV8\"],[[9955,9955],\"valid\",[],\"NV8\"],[[9956,9959],\"valid\",[],\"NV8\"],[[9960,9983],\"valid\",[],\"NV8\"],[[9984,9984],\"valid\",[],\"NV8\"],[[9985,9988],\"valid\",[],\"NV8\"],[[9989,9989],\"valid\",[],\"NV8\"],[[9990,9993],\"valid\",[],\"NV8\"],[[9994,9995],\"valid\",[],\"NV8\"],[[9996,10023],\"valid\",[],\"NV8\"],[[10024,10024],\"valid\",[],\"NV8\"],[[10025,10059],\"valid\",[],\"NV8\"],[[10060,10060],\"valid\",[],\"NV8\"],[[10061,10061],\"valid\",[],\"NV8\"],[[10062,10062],\"valid\",[],\"NV8\"],[[10063,10066],\"valid\",[],\"NV8\"],[[10067,10069],\"valid\",[],\"NV8\"],[[10070,10070],\"valid\",[],\"NV8\"],[[10071,10071],\"valid\",[],\"NV8\"],[[10072,10078],\"valid\",[],\"NV8\"],[[10079,10080],\"valid\",[],\"NV8\"],[[10081,10087],\"valid\",[],\"NV8\"],[[10088,10101],\"valid\",[],\"NV8\"],[[10102,10132],\"valid\",[],\"NV8\"],[[10133,10135],\"valid\",[],\"NV8\"],[[10136,10159],\"valid\",[],\"NV8\"],[[10160,10160],\"valid\",[],\"NV8\"],[[10161,10174],\"valid\",[],\"NV8\"],[[10175,10175],\"valid\",[],\"NV8\"],[[10176,10182],\"valid\",[],\"NV8\"],[[10183,10186],\"valid\",[],\"NV8\"],[[10187,10187],\"valid\",[],\"NV8\"],[[10188,10188],\"valid\",[],\"NV8\"],[[10189,10189],\"valid\",[],\"NV8\"],[[10190,10191],\"valid\",[],\"NV8\"],[[10192,10219],\"valid\",[],\"NV8\"],[[10220,10223],\"valid\",[],\"NV8\"],[[10224,10239],\"valid\",[],\"NV8\"],[[10240,10495],\"valid\",[],\"NV8\"],[[10496,10763],\"valid\",[],\"NV8\"],[[10764,10764],\"mapped\",[8747,8747,8747,8747]],[[10765,10867],\"valid\",[],\"NV8\"],[[10868,10868],\"disallowed_STD3_mapped\",[58,58,61]],[[10869,10869],\"disallowed_STD3_mapped\",[61,61]],[[10870,10870],\"disallowed_STD3_mapped\",[61,61,61]],[[10871,10971],\"valid\",[],\"NV8\"],[[10972,10972],\"mapped\",[10973,824]],[[10973,11007],\"valid\",[],\"NV8\"],[[11008,11021],\"valid\",[],\"NV8\"],[[11022,11027],\"valid\",[],\"NV8\"],[[11028,11034],\"valid\",[],\"NV8\"],[[11035,11039],\"valid\",[],\"NV8\"],[[11040,11043],\"valid\",[],\"NV8\"],[[11044,11084],\"valid\",[],\"NV8\"],[[11085,11087],\"valid\",[],\"NV8\"],[[11088,11092],\"valid\",[],\"NV8\"],[[11093,11097],\"valid\",[],\"NV8\"],[[11098,11123],\"valid\",[],\"NV8\"],[[11124,11125],\"disallowed\"],[[11126,11157],\"valid\",[],\"NV8\"],[[11158,11159],\"disallowed\"],[[11160,11193],\"valid\",[],\"NV8\"],[[11194,11196],\"disallowed\"],[[11197,11208],\"valid\",[],\"NV8\"],[[11209,11209],\"disallowed\"],[[11210,11217],\"valid\",[],\"NV8\"],[[11218,11243],\"disallowed\"],[[11244,11247],\"valid\",[],\"NV8\"],[[11248,11263],\"disallowed\"],[[11264,11264],\"mapped\",[11312]],[[11265,11265],\"mapped\",[11313]],[[11266,11266],\"mapped\",[11314]],[[11267,11267],\"mapped\",[11315]],[[11268,11268],\"mapped\",[11316]],[[11269,11269],\"mapped\",[11317]],[[11270,11270],\"mapped\",[11318]],[[11271,11271],\"mapped\",[11319]],[[11272,11272],\"mapped\",[11320]],[[11273,11273],\"mapped\",[11321]],[[11274,11274],\"mapped\",[11322]],[[11275,11275],\"mapped\",[11323]],[[11276,11276],\"mapped\",[11324]],[[11277,11277],\"mapped\",[11325]],[[11278,11278],\"mapped\",[11326]],[[11279,11279],\"mapped\",[11327]],[[11280,11280],\"mapped\",[11328]],[[11281,11281],\"mapped\",[11329]],[[11282,11282],\"mapped\",[11330]],[[11283,11283],\"mapped\",[11331]],[[11284,11284],\"mapped\",[11332]],[[11285,11285],\"mapped\",[11333]],[[11286,11286],\"mapped\",[11334]],[[11287,11287],\"mapped\",[11335]],[[11288,11288],\"mapped\",[11336]],[[11289,11289],\"mapped\",[11337]],[[11290,11290],\"mapped\",[11338]],[[11291,11291],\"mapped\",[11339]],[[11292,11292],\"mapped\",[11340]],[[11293,11293],\"mapped\",[11341]],[[11294,11294],\"mapped\",[11342]],[[11295,11295],\"mapped\",[11343]],[[11296,11296],\"mapped\",[11344]],[[11297,11297],\"mapped\",[11345]],[[11298,11298],\"mapped\",[11346]],[[11299,11299],\"mapped\",[11347]],[[11300,11300],\"mapped\",[11348]],[[11301,11301],\"mapped\",[11349]],[[11302,11302],\"mapped\",[11350]],[[11303,11303],\"mapped\",[11351]],[[11304,11304],\"mapped\",[11352]],[[11305,11305],\"mapped\",[11353]],[[11306,11306],\"mapped\",[11354]],[[11307,11307],\"mapped\",[11355]],[[11308,11308],\"mapped\",[11356]],[[11309,11309],\"mapped\",[11357]],[[11310,11310],\"mapped\",[11358]],[[11311,11311],\"disallowed\"],[[11312,11358],\"valid\"],[[11359,11359],\"disallowed\"],[[11360,11360],\"mapped\",[11361]],[[11361,11361],\"valid\"],[[11362,11362],\"mapped\",[619]],[[11363,11363],\"mapped\",[7549]],[[11364,11364],\"mapped\",[637]],[[11365,11366],\"valid\"],[[11367,11367],\"mapped\",[11368]],[[11368,11368],\"valid\"],[[11369,11369],\"mapped\",[11370]],[[11370,11370],\"valid\"],[[11371,11371],\"mapped\",[11372]],[[11372,11372],\"valid\"],[[11373,11373],\"mapped\",[593]],[[11374,11374],\"mapped\",[625]],[[11375,11375],\"mapped\",[592]],[[11376,11376],\"mapped\",[594]],[[11377,11377],\"valid\"],[[11378,11378],\"mapped\",[11379]],[[11379,11379],\"valid\"],[[11380,11380],\"valid\"],[[11381,11381],\"mapped\",[11382]],[[11382,11383],\"valid\"],[[11384,11387],\"valid\"],[[11388,11388],\"mapped\",[106]],[[11389,11389],\"mapped\",[118]],[[11390,11390],\"mapped\",[575]],[[11391,11391],\"mapped\",[576]],[[11392,11392],\"mapped\",[11393]],[[11393,11393],\"valid\"],[[11394,11394],\"mapped\",[11395]],[[11395,11395],\"valid\"],[[11396,11396],\"mapped\",[11397]],[[11397,11397],\"valid\"],[[11398,11398],\"mapped\",[11399]],[[11399,11399],\"valid\"],[[11400,11400],\"mapped\",[11401]],[[11401,11401],\"valid\"],[[11402,11402],\"mapped\",[11403]],[[11403,11403],\"valid\"],[[11404,11404],\"mapped\",[11405]],[[11405,11405],\"valid\"],[[11406,11406],\"mapped\",[11407]],[[11407,11407],\"valid\"],[[11408,11408],\"mapped\",[11409]],[[11409,11409],\"valid\"],[[11410,11410],\"mapped\",[11411]],[[11411,11411],\"valid\"],[[11412,11412],\"mapped\",[11413]],[[11413,11413],\"valid\"],[[11414,11414],\"mapped\",[11415]],[[11415,11415],\"valid\"],[[11416,11416],\"mapped\",[11417]],[[11417,11417],\"valid\"],[[11418,11418],\"mapped\",[11419]],[[11419,11419],\"valid\"],[[11420,11420],\"mapped\",[11421]],[[11421,11421],\"valid\"],[[11422,11422],\"mapped\",[11423]],[[11423,11423],\"valid\"],[[11424,11424],\"mapped\",[11425]],[[11425,11425],\"valid\"],[[11426,11426],\"mapped\",[11427]],[[11427,11427],\"valid\"],[[11428,11428],\"mapped\",[11429]],[[11429,11429],\"valid\"],[[11430,11430],\"mapped\",[11431]],[[11431,11431],\"valid\"],[[11432,11432],\"mapped\",[11433]],[[11433,11433],\"valid\"],[[11434,11434],\"mapped\",[11435]],[[11435,11435],\"valid\"],[[11436,11436],\"mapped\",[11437]],[[11437,11437],\"valid\"],[[11438,11438],\"mapped\",[11439]],[[11439,11439],\"valid\"],[[11440,11440],\"mapped\",[11441]],[[11441,11441],\"valid\"],[[11442,11442],\"mapped\",[11443]],[[11443,11443],\"valid\"],[[11444,11444],\"mapped\",[11445]],[[11445,11445],\"valid\"],[[11446,11446],\"mapped\",[11447]],[[11447,11447],\"valid\"],[[11448,11448],\"mapped\",[11449]],[[11449,11449],\"valid\"],[[11450,11450],\"mapped\",[11451]],[[11451,11451],\"valid\"],[[11452,11452],\"mapped\",[11453]],[[11453,11453],\"valid\"],[[11454,11454],\"mapped\",[11455]],[[11455,11455],\"valid\"],[[11456,11456],\"mapped\",[11457]],[[11457,11457],\"valid\"],[[11458,11458],\"mapped\",[11459]],[[11459,11459],\"valid\"],[[11460,11460],\"mapped\",[11461]],[[11461,11461],\"valid\"],[[11462,11462],\"mapped\",[11463]],[[11463,11463],\"valid\"],[[11464,11464],\"mapped\",[11465]],[[11465,11465],\"valid\"],[[11466,11466],\"mapped\",[11467]],[[11467,11467],\"valid\"],[[11468,11468],\"mapped\",[11469]],[[11469,11469],\"valid\"],[[11470,11470],\"mapped\",[11471]],[[11471,11471],\"valid\"],[[11472,11472],\"mapped\",[11473]],[[11473,11473],\"valid\"],[[11474,11474],\"mapped\",[11475]],[[11475,11475],\"valid\"],[[11476,11476],\"mapped\",[11477]],[[11477,11477],\"valid\"],[[11478,11478],\"mapped\",[11479]],[[11479,11479],\"valid\"],[[11480,11480],\"mapped\",[11481]],[[11481,11481],\"valid\"],[[11482,11482],\"mapped\",[11483]],[[11483,11483],\"valid\"],[[11484,11484],\"mapped\",[11485]],[[11485,11485],\"valid\"],[[11486,11486],\"mapped\",[11487]],[[11487,11487],\"valid\"],[[11488,11488],\"mapped\",[11489]],[[11489,11489],\"valid\"],[[11490,11490],\"mapped\",[11491]],[[11491,11492],\"valid\"],[[11493,11498],\"valid\",[],\"NV8\"],[[11499,11499],\"mapped\",[11500]],[[11500,11500],\"valid\"],[[11501,11501],\"mapped\",[11502]],[[11502,11505],\"valid\"],[[11506,11506],\"mapped\",[11507]],[[11507,11507],\"valid\"],[[11508,11512],\"disallowed\"],[[11513,11519],\"valid\",[],\"NV8\"],[[11520,11557],\"valid\"],[[11558,11558],\"disallowed\"],[[11559,11559],\"valid\"],[[11560,11564],\"disallowed\"],[[11565,11565],\"valid\"],[[11566,11567],\"disallowed\"],[[11568,11621],\"valid\"],[[11622,11623],\"valid\"],[[11624,11630],\"disallowed\"],[[11631,11631],\"mapped\",[11617]],[[11632,11632],\"valid\",[],\"NV8\"],[[11633,11646],\"disallowed\"],[[11647,11647],\"valid\"],[[11648,11670],\"valid\"],[[11671,11679],\"disallowed\"],[[11680,11686],\"valid\"],[[11687,11687],\"disallowed\"],[[11688,11694],\"valid\"],[[11695,11695],\"disallowed\"],[[11696,11702],\"valid\"],[[11703,11703],\"disallowed\"],[[11704,11710],\"valid\"],[[11711,11711],\"disallowed\"],[[11712,11718],\"valid\"],[[11719,11719],\"disallowed\"],[[11720,11726],\"valid\"],[[11727,11727],\"disallowed\"],[[11728,11734],\"valid\"],[[11735,11735],\"disallowed\"],[[11736,11742],\"valid\"],[[11743,11743],\"disallowed\"],[[11744,11775],\"valid\"],[[11776,11799],\"valid\",[],\"NV8\"],[[11800,11803],\"valid\",[],\"NV8\"],[[11804,11805],\"valid\",[],\"NV8\"],[[11806,11822],\"valid\",[],\"NV8\"],[[11823,11823],\"valid\"],[[11824,11824],\"valid\",[],\"NV8\"],[[11825,11825],\"valid\",[],\"NV8\"],[[11826,11835],\"valid\",[],\"NV8\"],[[11836,11842],\"valid\",[],\"NV8\"],[[11843,11903],\"disallowed\"],[[11904,11929],\"valid\",[],\"NV8\"],[[11930,11930],\"disallowed\"],[[11931,11934],\"valid\",[],\"NV8\"],[[11935,11935],\"mapped\",[27597]],[[11936,12018],\"valid\",[],\"NV8\"],[[12019,12019],\"mapped\",[40863]],[[12020,12031],\"disallowed\"],[[12032,12032],\"mapped\",[19968]],[[12033,12033],\"mapped\",[20008]],[[12034,12034],\"mapped\",[20022]],[[12035,12035],\"mapped\",[20031]],[[12036,12036],\"mapped\",[20057]],[[12037,12037],\"mapped\",[20101]],[[12038,12038],\"mapped\",[20108]],[[12039,12039],\"mapped\",[20128]],[[12040,12040],\"mapped\",[20154]],[[12041,12041],\"mapped\",[20799]],[[12042,12042],\"mapped\",[20837]],[[12043,12043],\"mapped\",[20843]],[[12044,12044],\"mapped\",[20866]],[[12045,12045],\"mapped\",[20886]],[[12046,12046],\"mapped\",[20907]],[[12047,12047],\"mapped\",[20960]],[[12048,12048],\"mapped\",[20981]],[[12049,12049],\"mapped\",[20992]],[[12050,12050],\"mapped\",[21147]],[[12051,12051],\"mapped\",[21241]],[[12052,12052],\"mapped\",[21269]],[[12053,12053],\"mapped\",[21274]],[[12054,12054],\"mapped\",[21304]],[[12055,12055],\"mapped\",[21313]],[[12056,12056],\"mapped\",[21340]],[[12057,12057],\"mapped\",[21353]],[[12058,12058],\"mapped\",[21378]],[[12059,12059],\"mapped\",[21430]],[[12060,12060],\"mapped\",[21448]],[[12061,12061],\"mapped\",[21475]],[[12062,12062],\"mapped\",[22231]],[[12063,12063],\"mapped\",[22303]],[[12064,12064],\"mapped\",[22763]],[[12065,12065],\"mapped\",[22786]],[[12066,12066],\"mapped\",[22794]],[[12067,12067],\"mapped\",[22805]],[[12068,12068],\"mapped\",[22823]],[[12069,12069],\"mapped\",[22899]],[[12070,12070],\"mapped\",[23376]],[[12071,12071],\"mapped\",[23424]],[[12072,12072],\"mapped\",[23544]],[[12073,12073],\"mapped\",[23567]],[[12074,12074],\"mapped\",[23586]],[[12075,12075],\"mapped\",[23608]],[[12076,12076],\"mapped\",[23662]],[[12077,12077],\"mapped\",[23665]],[[12078,12078],\"mapped\",[24027]],[[12079,12079],\"mapped\",[24037]],[[12080,12080],\"mapped\",[24049]],[[12081,12081],\"mapped\",[24062]],[[12082,12082],\"mapped\",[24178]],[[12083,12083],\"mapped\",[24186]],[[12084,12084],\"mapped\",[24191]],[[12085,12085],\"mapped\",[24308]],[[12086,12086],\"mapped\",[24318]],[[12087,12087],\"mapped\",[24331]],[[12088,12088],\"mapped\",[24339]],[[12089,12089],\"mapped\",[24400]],[[12090,12090],\"mapped\",[24417]],[[12091,12091],\"mapped\",[24435]],[[12092,12092],\"mapped\",[24515]],[[12093,12093],\"mapped\",[25096]],[[12094,12094],\"mapped\",[25142]],[[12095,12095],\"mapped\",[25163]],[[12096,12096],\"mapped\",[25903]],[[12097,12097],\"mapped\",[25908]],[[12098,12098],\"mapped\",[25991]],[[12099,12099],\"mapped\",[26007]],[[12100,12100],\"mapped\",[26020]],[[12101,12101],\"mapped\",[26041]],[[12102,12102],\"mapped\",[26080]],[[12103,12103],\"mapped\",[26085]],[[12104,12104],\"mapped\",[26352]],[[12105,12105],\"mapped\",[26376]],[[12106,12106],\"mapped\",[26408]],[[12107,12107],\"mapped\",[27424]],[[12108,12108],\"mapped\",[27490]],[[12109,12109],\"mapped\",[27513]],[[12110,12110],\"mapped\",[27571]],[[12111,12111],\"mapped\",[27595]],[[12112,12112],\"mapped\",[27604]],[[12113,12113],\"mapped\",[27611]],[[12114,12114],\"mapped\",[27663]],[[12115,12115],\"mapped\",[27668]],[[12116,12116],\"mapped\",[27700]],[[12117,12117],\"mapped\",[28779]],[[12118,12118],\"mapped\",[29226]],[[12119,12119],\"mapped\",[29238]],[[12120,12120],\"mapped\",[29243]],[[12121,12121],\"mapped\",[29247]],[[12122,12122],\"mapped\",[29255]],[[12123,12123],\"mapped\",[29273]],[[12124,12124],\"mapped\",[29275]],[[12125,12125],\"mapped\",[29356]],[[12126,12126],\"mapped\",[29572]],[[12127,12127],\"mapped\",[29577]],[[12128,12128],\"mapped\",[29916]],[[12129,12129],\"mapped\",[29926]],[[12130,12130],\"mapped\",[29976]],[[12131,12131],\"mapped\",[29983]],[[12132,12132],\"mapped\",[29992]],[[12133,12133],\"mapped\",[30000]],[[12134,12134],\"mapped\",[30091]],[[12135,12135],\"mapped\",[30098]],[[12136,12136],\"mapped\",[30326]],[[12137,12137],\"mapped\",[30333]],[[12138,12138],\"mapped\",[30382]],[[12139,12139],\"mapped\",[30399]],[[12140,12140],\"mapped\",[30446]],[[12141,12141],\"mapped\",[30683]],[[12142,12142],\"mapped\",[30690]],[[12143,12143],\"mapped\",[30707]],[[12144,12144],\"mapped\",[31034]],[[12145,12145],\"mapped\",[31160]],[[12146,12146],\"mapped\",[31166]],[[12147,12147],\"mapped\",[31348]],[[12148,12148],\"mapped\",[31435]],[[12149,12149],\"mapped\",[31481]],[[12150,12150],\"mapped\",[31859]],[[12151,12151],\"mapped\",[31992]],[[12152,12152],\"mapped\",[32566]],[[12153,12153],\"mapped\",[32593]],[[12154,12154],\"mapped\",[32650]],[[12155,12155],\"mapped\",[32701]],[[12156,12156],\"mapped\",[32769]],[[12157,12157],\"mapped\",[32780]],[[12158,12158],\"mapped\",[32786]],[[12159,12159],\"mapped\",[32819]],[[12160,12160],\"mapped\",[32895]],[[12161,12161],\"mapped\",[32905]],[[12162,12162],\"mapped\",[33251]],[[12163,12163],\"mapped\",[33258]],[[12164,12164],\"mapped\",[33267]],[[12165,12165],\"mapped\",[33276]],[[12166,12166],\"mapped\",[33292]],[[12167,12167],\"mapped\",[33307]],[[12168,12168],\"mapped\",[33311]],[[12169,12169],\"mapped\",[33390]],[[12170,12170],\"mapped\",[33394]],[[12171,12171],\"mapped\",[33400]],[[12172,12172],\"mapped\",[34381]],[[12173,12173],\"mapped\",[34411]],[[12174,12174],\"mapped\",[34880]],[[12175,12175],\"mapped\",[34892]],[[12176,12176],\"mapped\",[34915]],[[12177,12177],\"mapped\",[35198]],[[12178,12178],\"mapped\",[35211]],[[12179,12179],\"mapped\",[35282]],[[12180,12180],\"mapped\",[35328]],[[12181,12181],\"mapped\",[35895]],[[12182,12182],\"mapped\",[35910]],[[12183,12183],\"mapped\",[35925]],[[12184,12184],\"mapped\",[35960]],[[12185,12185],\"mapped\",[35997]],[[12186,12186],\"mapped\",[36196]],[[12187,12187],\"mapped\",[36208]],[[12188,12188],\"mapped\",[36275]],[[12189,12189],\"mapped\",[36523]],[[12190,12190],\"mapped\",[36554]],[[12191,12191],\"mapped\",[36763]],[[12192,12192],\"mapped\",[36784]],[[12193,12193],\"mapped\",[36789]],[[12194,12194],\"mapped\",[37009]],[[12195,12195],\"mapped\",[37193]],[[12196,12196],\"mapped\",[37318]],[[12197,12197],\"mapped\",[37324]],[[12198,12198],\"mapped\",[37329]],[[12199,12199],\"mapped\",[38263]],[[12200,12200],\"mapped\",[38272]],[[12201,12201],\"mapped\",[38428]],[[12202,12202],\"mapped\",[38582]],[[12203,12203],\"mapped\",[38585]],[[12204,12204],\"mapped\",[38632]],[[12205,12205],\"mapped\",[38737]],[[12206,12206],\"mapped\",[38750]],[[12207,12207],\"mapped\",[38754]],[[12208,12208],\"mapped\",[38761]],[[12209,12209],\"mapped\",[38859]],[[12210,12210],\"mapped\",[38893]],[[12211,12211],\"mapped\",[38899]],[[12212,12212],\"mapped\",[38913]],[[12213,12213],\"mapped\",[39080]],[[12214,12214],\"mapped\",[39131]],[[12215,12215],\"mapped\",[39135]],[[12216,12216],\"mapped\",[39318]],[[12217,12217],\"mapped\",[39321]],[[12218,12218],\"mapped\",[39340]],[[12219,12219],\"mapped\",[39592]],[[12220,12220],\"mapped\",[39640]],[[12221,12221],\"mapped\",[39647]],[[12222,12222],\"mapped\",[39717]],[[12223,12223],\"mapped\",[39727]],[[12224,12224],\"mapped\",[39730]],[[12225,12225],\"mapped\",[39740]],[[12226,12226],\"mapped\",[39770]],[[12227,12227],\"mapped\",[40165]],[[12228,12228],\"mapped\",[40565]],[[12229,12229],\"mapped\",[40575]],[[12230,12230],\"mapped\",[40613]],[[12231,12231],\"mapped\",[40635]],[[12232,12232],\"mapped\",[40643]],[[12233,12233],\"mapped\",[40653]],[[12234,12234],\"mapped\",[40657]],[[12235,12235],\"mapped\",[40697]],[[12236,12236],\"mapped\",[40701]],[[12237,12237],\"mapped\",[40718]],[[12238,12238],\"mapped\",[40723]],[[12239,12239],\"mapped\",[40736]],[[12240,12240],\"mapped\",[40763]],[[12241,12241],\"mapped\",[40778]],[[12242,12242],\"mapped\",[40786]],[[12243,12243],\"mapped\",[40845]],[[12244,12244],\"mapped\",[40860]],[[12245,12245],\"mapped\",[40864]],[[12246,12271],\"disallowed\"],[[12272,12283],\"disallowed\"],[[12284,12287],\"disallowed\"],[[12288,12288],\"disallowed_STD3_mapped\",[32]],[[12289,12289],\"valid\",[],\"NV8\"],[[12290,12290],\"mapped\",[46]],[[12291,12292],\"valid\",[],\"NV8\"],[[12293,12295],\"valid\"],[[12296,12329],\"valid\",[],\"NV8\"],[[12330,12333],\"valid\"],[[12334,12341],\"valid\",[],\"NV8\"],[[12342,12342],\"mapped\",[12306]],[[12343,12343],\"valid\",[],\"NV8\"],[[12344,12344],\"mapped\",[21313]],[[12345,12345],\"mapped\",[21316]],[[12346,12346],\"mapped\",[21317]],[[12347,12347],\"valid\",[],\"NV8\"],[[12348,12348],\"valid\"],[[12349,12349],\"valid\",[],\"NV8\"],[[12350,12350],\"valid\",[],\"NV8\"],[[12351,12351],\"valid\",[],\"NV8\"],[[12352,12352],\"disallowed\"],[[12353,12436],\"valid\"],[[12437,12438],\"valid\"],[[12439,12440],\"disallowed\"],[[12441,12442],\"valid\"],[[12443,12443],\"disallowed_STD3_mapped\",[32,12441]],[[12444,12444],\"disallowed_STD3_mapped\",[32,12442]],[[12445,12446],\"valid\"],[[12447,12447],\"mapped\",[12424,12426]],[[12448,12448],\"valid\",[],\"NV8\"],[[12449,12542],\"valid\"],[[12543,12543],\"mapped\",[12467,12488]],[[12544,12548],\"disallowed\"],[[12549,12588],\"valid\"],[[12589,12589],\"valid\"],[[12590,12592],\"disallowed\"],[[12593,12593],\"mapped\",[4352]],[[12594,12594],\"mapped\",[4353]],[[12595,12595],\"mapped\",[4522]],[[12596,12596],\"mapped\",[4354]],[[12597,12597],\"mapped\",[4524]],[[12598,12598],\"mapped\",[4525]],[[12599,12599],\"mapped\",[4355]],[[12600,12600],\"mapped\",[4356]],[[12601,12601],\"mapped\",[4357]],[[12602,12602],\"mapped\",[4528]],[[12603,12603],\"mapped\",[4529]],[[12604,12604],\"mapped\",[4530]],[[12605,12605],\"mapped\",[4531]],[[12606,12606],\"mapped\",[4532]],[[12607,12607],\"mapped\",[4533]],[[12608,12608],\"mapped\",[4378]],[[12609,12609],\"mapped\",[4358]],[[12610,12610],\"mapped\",[4359]],[[12611,12611],\"mapped\",[4360]],[[12612,12612],\"mapped\",[4385]],[[12613,12613],\"mapped\",[4361]],[[12614,12614],\"mapped\",[4362]],[[12615,12615],\"mapped\",[4363]],[[12616,12616],\"mapped\",[4364]],[[12617,12617],\"mapped\",[4365]],[[12618,12618],\"mapped\",[4366]],[[12619,12619],\"mapped\",[4367]],[[12620,12620],\"mapped\",[4368]],[[12621,12621],\"mapped\",[4369]],[[12622,12622],\"mapped\",[4370]],[[12623,12623],\"mapped\",[4449]],[[12624,12624],\"mapped\",[4450]],[[12625,12625],\"mapped\",[4451]],[[12626,12626],\"mapped\",[4452]],[[12627,12627],\"mapped\",[4453]],[[12628,12628],\"mapped\",[4454]],[[12629,12629],\"mapped\",[4455]],[[12630,12630],\"mapped\",[4456]],[[12631,12631],\"mapped\",[4457]],[[12632,12632],\"mapped\",[4458]],[[12633,12633],\"mapped\",[4459]],[[12634,12634],\"mapped\",[4460]],[[12635,12635],\"mapped\",[4461]],[[12636,12636],\"mapped\",[4462]],[[12637,12637],\"mapped\",[4463]],[[12638,12638],\"mapped\",[4464]],[[12639,12639],\"mapped\",[4465]],[[12640,12640],\"mapped\",[4466]],[[12641,12641],\"mapped\",[4467]],[[12642,12642],\"mapped\",[4468]],[[12643,12643],\"mapped\",[4469]],[[12644,12644],\"disallowed\"],[[12645,12645],\"mapped\",[4372]],[[12646,12646],\"mapped\",[4373]],[[12647,12647],\"mapped\",[4551]],[[12648,12648],\"mapped\",[4552]],[[12649,12649],\"mapped\",[4556]],[[12650,12650],\"mapped\",[4558]],[[12651,12651],\"mapped\",[4563]],[[12652,12652],\"mapped\",[4567]],[[12653,12653],\"mapped\",[4569]],[[12654,12654],\"mapped\",[4380]],[[12655,12655],\"mapped\",[4573]],[[12656,12656],\"mapped\",[4575]],[[12657,12657],\"mapped\",[4381]],[[12658,12658],\"mapped\",[4382]],[[12659,12659],\"mapped\",[4384]],[[12660,12660],\"mapped\",[4386]],[[12661,12661],\"mapped\",[4387]],[[12662,12662],\"mapped\",[4391]],[[12663,12663],\"mapped\",[4393]],[[12664,12664],\"mapped\",[4395]],[[12665,12665],\"mapped\",[4396]],[[12666,12666],\"mapped\",[4397]],[[12667,12667],\"mapped\",[4398]],[[12668,12668],\"mapped\",[4399]],[[12669,12669],\"mapped\",[4402]],[[12670,12670],\"mapped\",[4406]],[[12671,12671],\"mapped\",[4416]],[[12672,12672],\"mapped\",[4423]],[[12673,12673],\"mapped\",[4428]],[[12674,12674],\"mapped\",[4593]],[[12675,12675],\"mapped\",[4594]],[[12676,12676],\"mapped\",[4439]],[[12677,12677],\"mapped\",[4440]],[[12678,12678],\"mapped\",[4441]],[[12679,12679],\"mapped\",[4484]],[[12680,12680],\"mapped\",[4485]],[[12681,12681],\"mapped\",[4488]],[[12682,12682],\"mapped\",[4497]],[[12683,12683],\"mapped\",[4498]],[[12684,12684],\"mapped\",[4500]],[[12685,12685],\"mapped\",[4510]],[[12686,12686],\"mapped\",[4513]],[[12687,12687],\"disallowed\"],[[12688,12689],\"valid\",[],\"NV8\"],[[12690,12690],\"mapped\",[19968]],[[12691,12691],\"mapped\",[20108]],[[12692,12692],\"mapped\",[19977]],[[12693,12693],\"mapped\",[22235]],[[12694,12694],\"mapped\",[19978]],[[12695,12695],\"mapped\",[20013]],[[12696,12696],\"mapped\",[19979]],[[12697,12697],\"mapped\",[30002]],[[12698,12698],\"mapped\",[20057]],[[12699,12699],\"mapped\",[19993]],[[12700,12700],\"mapped\",[19969]],[[12701,12701],\"mapped\",[22825]],[[12702,12702],\"mapped\",[22320]],[[12703,12703],\"mapped\",[20154]],[[12704,12727],\"valid\"],[[12728,12730],\"valid\"],[[12731,12735],\"disallowed\"],[[12736,12751],\"valid\",[],\"NV8\"],[[12752,12771],\"valid\",[],\"NV8\"],[[12772,12783],\"disallowed\"],[[12784,12799],\"valid\"],[[12800,12800],\"disallowed_STD3_mapped\",[40,4352,41]],[[12801,12801],\"disallowed_STD3_mapped\",[40,4354,41]],[[12802,12802],\"disallowed_STD3_mapped\",[40,4355,41]],[[12803,12803],\"disallowed_STD3_mapped\",[40,4357,41]],[[12804,12804],\"disallowed_STD3_mapped\",[40,4358,41]],[[12805,12805],\"disallowed_STD3_mapped\",[40,4359,41]],[[12806,12806],\"disallowed_STD3_mapped\",[40,4361,41]],[[12807,12807],\"disallowed_STD3_mapped\",[40,4363,41]],[[12808,12808],\"disallowed_STD3_mapped\",[40,4364,41]],[[12809,12809],\"disallowed_STD3_mapped\",[40,4366,41]],[[12810,12810],\"disallowed_STD3_mapped\",[40,4367,41]],[[12811,12811],\"disallowed_STD3_mapped\",[40,4368,41]],[[12812,12812],\"disallowed_STD3_mapped\",[40,4369,41]],[[12813,12813],\"disallowed_STD3_mapped\",[40,4370,41]],[[12814,12814],\"disallowed_STD3_mapped\",[40,44032,41]],[[12815,12815],\"disallowed_STD3_mapped\",[40,45208,41]],[[12816,12816],\"disallowed_STD3_mapped\",[40,45796,41]],[[12817,12817],\"disallowed_STD3_mapped\",[40,46972,41]],[[12818,12818],\"disallowed_STD3_mapped\",[40,47560,41]],[[12819,12819],\"disallowed_STD3_mapped\",[40,48148,41]],[[12820,12820],\"disallowed_STD3_mapped\",[40,49324,41]],[[12821,12821],\"disallowed_STD3_mapped\",[40,50500,41]],[[12822,12822],\"disallowed_STD3_mapped\",[40,51088,41]],[[12823,12823],\"disallowed_STD3_mapped\",[40,52264,41]],[[12824,12824],\"disallowed_STD3_mapped\",[40,52852,41]],[[12825,12825],\"disallowed_STD3_mapped\",[40,53440,41]],[[12826,12826],\"disallowed_STD3_mapped\",[40,54028,41]],[[12827,12827],\"disallowed_STD3_mapped\",[40,54616,41]],[[12828,12828],\"disallowed_STD3_mapped\",[40,51452,41]],[[12829,12829],\"disallowed_STD3_mapped\",[40,50724,51204,41]],[[12830,12830],\"disallowed_STD3_mapped\",[40,50724,54980,41]],[[12831,12831],\"disallowed\"],[[12832,12832],\"disallowed_STD3_mapped\",[40,19968,41]],[[12833,12833],\"disallowed_STD3_mapped\",[40,20108,41]],[[12834,12834],\"disallowed_STD3_mapped\",[40,19977,41]],[[12835,12835],\"disallowed_STD3_mapped\",[40,22235,41]],[[12836,12836],\"disallowed_STD3_mapped\",[40,20116,41]],[[12837,12837],\"disallowed_STD3_mapped\",[40,20845,41]],[[12838,12838],\"disallowed_STD3_mapped\",[40,19971,41]],[[12839,12839],\"disallowed_STD3_mapped\",[40,20843,41]],[[12840,12840],\"disallowed_STD3_mapped\",[40,20061,41]],[[12841,12841],\"disallowed_STD3_mapped\",[40,21313,41]],[[12842,12842],\"disallowed_STD3_mapped\",[40,26376,41]],[[12843,12843],\"disallowed_STD3_mapped\",[40,28779,41]],[[12844,12844],\"disallowed_STD3_mapped\",[40,27700,41]],[[12845,12845],\"disallowed_STD3_mapped\",[40,26408,41]],[[12846,12846],\"disallowed_STD3_mapped\",[40,37329,41]],[[12847,12847],\"disallowed_STD3_mapped\",[40,22303,41]],[[12848,12848],\"disallowed_STD3_mapped\",[40,26085,41]],[[12849,12849],\"disallowed_STD3_mapped\",[40,26666,41]],[[12850,12850],\"disallowed_STD3_mapped\",[40,26377,41]],[[12851,12851],\"disallowed_STD3_mapped\",[40,31038,41]],[[12852,12852],\"disallowed_STD3_mapped\",[40,21517,41]],[[12853,12853],\"disallowed_STD3_mapped\",[40,29305,41]],[[12854,12854],\"disallowed_STD3_mapped\",[40,36001,41]],[[12855,12855],\"disallowed_STD3_mapped\",[40,31069,41]],[[12856,12856],\"disallowed_STD3_mapped\",[40,21172,41]],[[12857,12857],\"disallowed_STD3_mapped\",[40,20195,41]],[[12858,12858],\"disallowed_STD3_mapped\",[40,21628,41]],[[12859,12859],\"disallowed_STD3_mapped\",[40,23398,41]],[[12860,12860],\"disallowed_STD3_mapped\",[40,30435,41]],[[12861,12861],\"disallowed_STD3_mapped\",[40,20225,41]],[[12862,12862],\"disallowed_STD3_mapped\",[40,36039,41]],[[12863,12863],\"disallowed_STD3_mapped\",[40,21332,41]],[[12864,12864],\"disallowed_STD3_mapped\",[40,31085,41]],[[12865,12865],\"disallowed_STD3_mapped\",[40,20241,41]],[[12866,12866],\"disallowed_STD3_mapped\",[40,33258,41]],[[12867,12867],\"disallowed_STD3_mapped\",[40,33267,41]],[[12868,12868],\"mapped\",[21839]],[[12869,12869],\"mapped\",[24188]],[[12870,12870],\"mapped\",[25991]],[[12871,12871],\"mapped\",[31631]],[[12872,12879],\"valid\",[],\"NV8\"],[[12880,12880],\"mapped\",[112,116,101]],[[12881,12881],\"mapped\",[50,49]],[[12882,12882],\"mapped\",[50,50]],[[12883,12883],\"mapped\",[50,51]],[[12884,12884],\"mapped\",[50,52]],[[12885,12885],\"mapped\",[50,53]],[[12886,12886],\"mapped\",[50,54]],[[12887,12887],\"mapped\",[50,55]],[[12888,12888],\"mapped\",[50,56]],[[12889,12889],\"mapped\",[50,57]],[[12890,12890],\"mapped\",[51,48]],[[12891,12891],\"mapped\",[51,49]],[[12892,12892],\"mapped\",[51,50]],[[12893,12893],\"mapped\",[51,51]],[[12894,12894],\"mapped\",[51,52]],[[12895,12895],\"mapped\",[51,53]],[[12896,12896],\"mapped\",[4352]],[[12897,12897],\"mapped\",[4354]],[[12898,12898],\"mapped\",[4355]],[[12899,12899],\"mapped\",[4357]],[[12900,12900],\"mapped\",[4358]],[[12901,12901],\"mapped\",[4359]],[[12902,12902],\"mapped\",[4361]],[[12903,12903],\"mapped\",[4363]],[[12904,12904],\"mapped\",[4364]],[[12905,12905],\"mapped\",[4366]],[[12906,12906],\"mapped\",[4367]],[[12907,12907],\"mapped\",[4368]],[[12908,12908],\"mapped\",[4369]],[[12909,12909],\"mapped\",[4370]],[[12910,12910],\"mapped\",[44032]],[[12911,12911],\"mapped\",[45208]],[[12912,12912],\"mapped\",[45796]],[[12913,12913],\"mapped\",[46972]],[[12914,12914],\"mapped\",[47560]],[[12915,12915],\"mapped\",[48148]],[[12916,12916],\"mapped\",[49324]],[[12917,12917],\"mapped\",[50500]],[[12918,12918],\"mapped\",[51088]],[[12919,12919],\"mapped\",[52264]],[[12920,12920],\"mapped\",[52852]],[[12921,12921],\"mapped\",[53440]],[[12922,12922],\"mapped\",[54028]],[[12923,12923],\"mapped\",[54616]],[[12924,12924],\"mapped\",[52280,44256]],[[12925,12925],\"mapped\",[51452,51032]],[[12926,12926],\"mapped\",[50864]],[[12927,12927],\"valid\",[],\"NV8\"],[[12928,12928],\"mapped\",[19968]],[[12929,12929],\"mapped\",[20108]],[[12930,12930],\"mapped\",[19977]],[[12931,12931],\"mapped\",[22235]],[[12932,12932],\"mapped\",[20116]],[[12933,12933],\"mapped\",[20845]],[[12934,12934],\"mapped\",[19971]],[[12935,12935],\"mapped\",[20843]],[[12936,12936],\"mapped\",[20061]],[[12937,12937],\"mapped\",[21313]],[[12938,12938],\"mapped\",[26376]],[[12939,12939],\"mapped\",[28779]],[[12940,12940],\"mapped\",[27700]],[[12941,12941],\"mapped\",[26408]],[[12942,12942],\"mapped\",[37329]],[[12943,12943],\"mapped\",[22303]],[[12944,12944],\"mapped\",[26085]],[[12945,12945],\"mapped\",[26666]],[[12946,12946],\"mapped\",[26377]],[[12947,12947],\"mapped\",[31038]],[[12948,12948],\"mapped\",[21517]],[[12949,12949],\"mapped\",[29305]],[[12950,12950],\"mapped\",[36001]],[[12951,12951],\"mapped\",[31069]],[[12952,12952],\"mapped\",[21172]],[[12953,12953],\"mapped\",[31192]],[[12954,12954],\"mapped\",[30007]],[[12955,12955],\"mapped\",[22899]],[[12956,12956],\"mapped\",[36969]],[[12957,12957],\"mapped\",[20778]],[[12958,12958],\"mapped\",[21360]],[[12959,12959],\"mapped\",[27880]],[[12960,12960],\"mapped\",[38917]],[[12961,12961],\"mapped\",[20241]],[[12962,12962],\"mapped\",[20889]],[[12963,12963],\"mapped\",[27491]],[[12964,12964],\"mapped\",[19978]],[[12965,12965],\"mapped\",[20013]],[[12966,12966],\"mapped\",[19979]],[[12967,12967],\"mapped\",[24038]],[[12968,12968],\"mapped\",[21491]],[[12969,12969],\"mapped\",[21307]],[[12970,12970],\"mapped\",[23447]],[[12971,12971],\"mapped\",[23398]],[[12972,12972],\"mapped\",[30435]],[[12973,12973],\"mapped\",[20225]],[[12974,12974],\"mapped\",[36039]],[[12975,12975],\"mapped\",[21332]],[[12976,12976],\"mapped\",[22812]],[[12977,12977],\"mapped\",[51,54]],[[12978,12978],\"mapped\",[51,55]],[[12979,12979],\"mapped\",[51,56]],[[12980,12980],\"mapped\",[51,57]],[[12981,12981],\"mapped\",[52,48]],[[12982,12982],\"mapped\",[52,49]],[[12983,12983],\"mapped\",[52,50]],[[12984,12984],\"mapped\",[52,51]],[[12985,12985],\"mapped\",[52,52]],[[12986,12986],\"mapped\",[52,53]],[[12987,12987],\"mapped\",[52,54]],[[12988,12988],\"mapped\",[52,55]],[[12989,12989],\"mapped\",[52,56]],[[12990,12990],\"mapped\",[52,57]],[[12991,12991],\"mapped\",[53,48]],[[12992,12992],\"mapped\",[49,26376]],[[12993,12993],\"mapped\",[50,26376]],[[12994,12994],\"mapped\",[51,26376]],[[12995,12995],\"mapped\",[52,26376]],[[12996,12996],\"mapped\",[53,26376]],[[12997,12997],\"mapped\",[54,26376]],[[12998,12998],\"mapped\",[55,26376]],[[12999,12999],\"mapped\",[56,26376]],[[13000,13000],\"mapped\",[57,26376]],[[13001,13001],\"mapped\",[49,48,26376]],[[13002,13002],\"mapped\",[49,49,26376]],[[13003,13003],\"mapped\",[49,50,26376]],[[13004,13004],\"mapped\",[104,103]],[[13005,13005],\"mapped\",[101,114,103]],[[13006,13006],\"mapped\",[101,118]],[[13007,13007],\"mapped\",[108,116,100]],[[13008,13008],\"mapped\",[12450]],[[13009,13009],\"mapped\",[12452]],[[13010,13010],\"mapped\",[12454]],[[13011,13011],\"mapped\",[12456]],[[13012,13012],\"mapped\",[12458]],[[13013,13013],\"mapped\",[12459]],[[13014,13014],\"mapped\",[12461]],[[13015,13015],\"mapped\",[12463]],[[13016,13016],\"mapped\",[12465]],[[13017,13017],\"mapped\",[12467]],[[13018,13018],\"mapped\",[12469]],[[13019,13019],\"mapped\",[12471]],[[13020,13020],\"mapped\",[12473]],[[13021,13021],\"mapped\",[12475]],[[13022,13022],\"mapped\",[12477]],[[13023,13023],\"mapped\",[12479]],[[13024,13024],\"mapped\",[12481]],[[13025,13025],\"mapped\",[12484]],[[13026,13026],\"mapped\",[12486]],[[13027,13027],\"mapped\",[12488]],[[13028,13028],\"mapped\",[12490]],[[13029,13029],\"mapped\",[12491]],[[13030,13030],\"mapped\",[12492]],[[13031,13031],\"mapped\",[12493]],[[13032,13032],\"mapped\",[12494]],[[13033,13033],\"mapped\",[12495]],[[13034,13034],\"mapped\",[12498]],[[13035,13035],\"mapped\",[12501]],[[13036,13036],\"mapped\",[12504]],[[13037,13037],\"mapped\",[12507]],[[13038,13038],\"mapped\",[12510]],[[13039,13039],\"mapped\",[12511]],[[13040,13040],\"mapped\",[12512]],[[13041,13041],\"mapped\",[12513]],[[13042,13042],\"mapped\",[12514]],[[13043,13043],\"mapped\",[12516]],[[13044,13044],\"mapped\",[12518]],[[13045,13045],\"mapped\",[12520]],[[13046,13046],\"mapped\",[12521]],[[13047,13047],\"mapped\",[12522]],[[13048,13048],\"mapped\",[12523]],[[13049,13049],\"mapped\",[12524]],[[13050,13050],\"mapped\",[12525]],[[13051,13051],\"mapped\",[12527]],[[13052,13052],\"mapped\",[12528]],[[13053,13053],\"mapped\",[12529]],[[13054,13054],\"mapped\",[12530]],[[13055,13055],\"disallowed\"],[[13056,13056],\"mapped\",[12450,12497,12540,12488]],[[13057,13057],\"mapped\",[12450,12523,12501,12449]],[[13058,13058],\"mapped\",[12450,12531,12506,12450]],[[13059,13059],\"mapped\",[12450,12540,12523]],[[13060,13060],\"mapped\",[12452,12491,12531,12464]],[[13061,13061],\"mapped\",[12452,12531,12481]],[[13062,13062],\"mapped\",[12454,12457,12531]],[[13063,13063],\"mapped\",[12456,12473,12463,12540,12489]],[[13064,13064],\"mapped\",[12456,12540,12459,12540]],[[13065,13065],\"mapped\",[12458,12531,12473]],[[13066,13066],\"mapped\",[12458,12540,12512]],[[13067,13067],\"mapped\",[12459,12452,12522]],[[13068,13068],\"mapped\",[12459,12521,12483,12488]],[[13069,13069],\"mapped\",[12459,12525,12522,12540]],[[13070,13070],\"mapped\",[12460,12525,12531]],[[13071,13071],\"mapped\",[12460,12531,12510]],[[13072,13072],\"mapped\",[12462,12460]],[[13073,13073],\"mapped\",[12462,12491,12540]],[[13074,13074],\"mapped\",[12461,12517,12522,12540]],[[13075,13075],\"mapped\",[12462,12523,12480,12540]],[[13076,13076],\"mapped\",[12461,12525]],[[13077,13077],\"mapped\",[12461,12525,12464,12521,12512]],[[13078,13078],\"mapped\",[12461,12525,12513,12540,12488,12523]],[[13079,13079],\"mapped\",[12461,12525,12527,12483,12488]],[[13080,13080],\"mapped\",[12464,12521,12512]],[[13081,13081],\"mapped\",[12464,12521,12512,12488,12531]],[[13082,13082],\"mapped\",[12463,12523,12476,12452,12525]],[[13083,13083],\"mapped\",[12463,12525,12540,12493]],[[13084,13084],\"mapped\",[12465,12540,12473]],[[13085,13085],\"mapped\",[12467,12523,12490]],[[13086,13086],\"mapped\",[12467,12540,12509]],[[13087,13087],\"mapped\",[12469,12452,12463,12523]],[[13088,13088],\"mapped\",[12469,12531,12481,12540,12512]],[[13089,13089],\"mapped\",[12471,12522,12531,12464]],[[13090,13090],\"mapped\",[12475,12531,12481]],[[13091,13091],\"mapped\",[12475,12531,12488]],[[13092,13092],\"mapped\",[12480,12540,12473]],[[13093,13093],\"mapped\",[12487,12471]],[[13094,13094],\"mapped\",[12489,12523]],[[13095,13095],\"mapped\",[12488,12531]],[[13096,13096],\"mapped\",[12490,12494]],[[13097,13097],\"mapped\",[12494,12483,12488]],[[13098,13098],\"mapped\",[12495,12452,12484]],[[13099,13099],\"mapped\",[12497,12540,12475,12531,12488]],[[13100,13100],\"mapped\",[12497,12540,12484]],[[13101,13101],\"mapped\",[12496,12540,12524,12523]],[[13102,13102],\"mapped\",[12500,12450,12473,12488,12523]],[[13103,13103],\"mapped\",[12500,12463,12523]],[[13104,13104],\"mapped\",[12500,12467]],[[13105,13105],\"mapped\",[12499,12523]],[[13106,13106],\"mapped\",[12501,12449,12521,12483,12489]],[[13107,13107],\"mapped\",[12501,12451,12540,12488]],[[13108,13108],\"mapped\",[12502,12483,12471,12455,12523]],[[13109,13109],\"mapped\",[12501,12521,12531]],[[13110,13110],\"mapped\",[12504,12463,12479,12540,12523]],[[13111,13111],\"mapped\",[12506,12477]],[[13112,13112],\"mapped\",[12506,12491,12498]],[[13113,13113],\"mapped\",[12504,12523,12484]],[[13114,13114],\"mapped\",[12506,12531,12473]],[[13115,13115],\"mapped\",[12506,12540,12472]],[[13116,13116],\"mapped\",[12505,12540,12479]],[[13117,13117],\"mapped\",[12509,12452,12531,12488]],[[13118,13118],\"mapped\",[12508,12523,12488]],[[13119,13119],\"mapped\",[12507,12531]],[[13120,13120],\"mapped\",[12509,12531,12489]],[[13121,13121],\"mapped\",[12507,12540,12523]],[[13122,13122],\"mapped\",[12507,12540,12531]],[[13123,13123],\"mapped\",[12510,12452,12463,12525]],[[13124,13124],\"mapped\",[12510,12452,12523]],[[13125,13125],\"mapped\",[12510,12483,12495]],[[13126,13126],\"mapped\",[12510,12523,12463]],[[13127,13127],\"mapped\",[12510,12531,12471,12519,12531]],[[13128,13128],\"mapped\",[12511,12463,12525,12531]],[[13129,13129],\"mapped\",[12511,12522]],[[13130,13130],\"mapped\",[12511,12522,12496,12540,12523]],[[13131,13131],\"mapped\",[12513,12460]],[[13132,13132],\"mapped\",[12513,12460,12488,12531]],[[13133,13133],\"mapped\",[12513,12540,12488,12523]],[[13134,13134],\"mapped\",[12516,12540,12489]],[[13135,13135],\"mapped\",[12516,12540,12523]],[[13136,13136],\"mapped\",[12518,12450,12531]],[[13137,13137],\"mapped\",[12522,12483,12488,12523]],[[13138,13138],\"mapped\",[12522,12521]],[[13139,13139],\"mapped\",[12523,12500,12540]],[[13140,13140],\"mapped\",[12523,12540,12502,12523]],[[13141,13141],\"mapped\",[12524,12512]],[[13142,13142],\"mapped\",[12524,12531,12488,12466,12531]],[[13143,13143],\"mapped\",[12527,12483,12488]],[[13144,13144],\"mapped\",[48,28857]],[[13145,13145],\"mapped\",[49,28857]],[[13146,13146],\"mapped\",[50,28857]],[[13147,13147],\"mapped\",[51,28857]],[[13148,13148],\"mapped\",[52,28857]],[[13149,13149],\"mapped\",[53,28857]],[[13150,13150],\"mapped\",[54,28857]],[[13151,13151],\"mapped\",[55,28857]],[[13152,13152],\"mapped\",[56,28857]],[[13153,13153],\"mapped\",[57,28857]],[[13154,13154],\"mapped\",[49,48,28857]],[[13155,13155],\"mapped\",[49,49,28857]],[[13156,13156],\"mapped\",[49,50,28857]],[[13157,13157],\"mapped\",[49,51,28857]],[[13158,13158],\"mapped\",[49,52,28857]],[[13159,13159],\"mapped\",[49,53,28857]],[[13160,13160],\"mapped\",[49,54,28857]],[[13161,13161],\"mapped\",[49,55,28857]],[[13162,13162],\"mapped\",[49,56,28857]],[[13163,13163],\"mapped\",[49,57,28857]],[[13164,13164],\"mapped\",[50,48,28857]],[[13165,13165],\"mapped\",[50,49,28857]],[[13166,13166],\"mapped\",[50,50,28857]],[[13167,13167],\"mapped\",[50,51,28857]],[[13168,13168],\"mapped\",[50,52,28857]],[[13169,13169],\"mapped\",[104,112,97]],[[13170,13170],\"mapped\",[100,97]],[[13171,13171],\"mapped\",[97,117]],[[13172,13172],\"mapped\",[98,97,114]],[[13173,13173],\"mapped\",[111,118]],[[13174,13174],\"mapped\",[112,99]],[[13175,13175],\"mapped\",[100,109]],[[13176,13176],\"mapped\",[100,109,50]],[[13177,13177],\"mapped\",[100,109,51]],[[13178,13178],\"mapped\",[105,117]],[[13179,13179],\"mapped\",[24179,25104]],[[13180,13180],\"mapped\",[26157,21644]],[[13181,13181],\"mapped\",[22823,27491]],[[13182,13182],\"mapped\",[26126,27835]],[[13183,13183],\"mapped\",[26666,24335,20250,31038]],[[13184,13184],\"mapped\",[112,97]],[[13185,13185],\"mapped\",[110,97]],[[13186,13186],\"mapped\",[956,97]],[[13187,13187],\"mapped\",[109,97]],[[13188,13188],\"mapped\",[107,97]],[[13189,13189],\"mapped\",[107,98]],[[13190,13190],\"mapped\",[109,98]],[[13191,13191],\"mapped\",[103,98]],[[13192,13192],\"mapped\",[99,97,108]],[[13193,13193],\"mapped\",[107,99,97,108]],[[13194,13194],\"mapped\",[112,102]],[[13195,13195],\"mapped\",[110,102]],[[13196,13196],\"mapped\",[956,102]],[[13197,13197],\"mapped\",[956,103]],[[13198,13198],\"mapped\",[109,103]],[[13199,13199],\"mapped\",[107,103]],[[13200,13200],\"mapped\",[104,122]],[[13201,13201],\"mapped\",[107,104,122]],[[13202,13202],\"mapped\",[109,104,122]],[[13203,13203],\"mapped\",[103,104,122]],[[13204,13204],\"mapped\",[116,104,122]],[[13205,13205],\"mapped\",[956,108]],[[13206,13206],\"mapped\",[109,108]],[[13207,13207],\"mapped\",[100,108]],[[13208,13208],\"mapped\",[107,108]],[[13209,13209],\"mapped\",[102,109]],[[13210,13210],\"mapped\",[110,109]],[[13211,13211],\"mapped\",[956,109]],[[13212,13212],\"mapped\",[109,109]],[[13213,13213],\"mapped\",[99,109]],[[13214,13214],\"mapped\",[107,109]],[[13215,13215],\"mapped\",[109,109,50]],[[13216,13216],\"mapped\",[99,109,50]],[[13217,13217],\"mapped\",[109,50]],[[13218,13218],\"mapped\",[107,109,50]],[[13219,13219],\"mapped\",[109,109,51]],[[13220,13220],\"mapped\",[99,109,51]],[[13221,13221],\"mapped\",[109,51]],[[13222,13222],\"mapped\",[107,109,51]],[[13223,13223],\"mapped\",[109,8725,115]],[[13224,13224],\"mapped\",[109,8725,115,50]],[[13225,13225],\"mapped\",[112,97]],[[13226,13226],\"mapped\",[107,112,97]],[[13227,13227],\"mapped\",[109,112,97]],[[13228,13228],\"mapped\",[103,112,97]],[[13229,13229],\"mapped\",[114,97,100]],[[13230,13230],\"mapped\",[114,97,100,8725,115]],[[13231,13231],\"mapped\",[114,97,100,8725,115,50]],[[13232,13232],\"mapped\",[112,115]],[[13233,13233],\"mapped\",[110,115]],[[13234,13234],\"mapped\",[956,115]],[[13235,13235],\"mapped\",[109,115]],[[13236,13236],\"mapped\",[112,118]],[[13237,13237],\"mapped\",[110,118]],[[13238,13238],\"mapped\",[956,118]],[[13239,13239],\"mapped\",[109,118]],[[13240,13240],\"mapped\",[107,118]],[[13241,13241],\"mapped\",[109,118]],[[13242,13242],\"mapped\",[112,119]],[[13243,13243],\"mapped\",[110,119]],[[13244,13244],\"mapped\",[956,119]],[[13245,13245],\"mapped\",[109,119]],[[13246,13246],\"mapped\",[107,119]],[[13247,13247],\"mapped\",[109,119]],[[13248,13248],\"mapped\",[107,969]],[[13249,13249],\"mapped\",[109,969]],[[13250,13250],\"disallowed\"],[[13251,13251],\"mapped\",[98,113]],[[13252,13252],\"mapped\",[99,99]],[[13253,13253],\"mapped\",[99,100]],[[13254,13254],\"mapped\",[99,8725,107,103]],[[13255,13255],\"disallowed\"],[[13256,13256],\"mapped\",[100,98]],[[13257,13257],\"mapped\",[103,121]],[[13258,13258],\"mapped\",[104,97]],[[13259,13259],\"mapped\",[104,112]],[[13260,13260],\"mapped\",[105,110]],[[13261,13261],\"mapped\",[107,107]],[[13262,13262],\"mapped\",[107,109]],[[13263,13263],\"mapped\",[107,116]],[[13264,13264],\"mapped\",[108,109]],[[13265,13265],\"mapped\",[108,110]],[[13266,13266],\"mapped\",[108,111,103]],[[13267,13267],\"mapped\",[108,120]],[[13268,13268],\"mapped\",[109,98]],[[13269,13269],\"mapped\",[109,105,108]],[[13270,13270],\"mapped\",[109,111,108]],[[13271,13271],\"mapped\",[112,104]],[[13272,13272],\"disallowed\"],[[13273,13273],\"mapped\",[112,112,109]],[[13274,13274],\"mapped\",[112,114]],[[13275,13275],\"mapped\",[115,114]],[[13276,13276],\"mapped\",[115,118]],[[13277,13277],\"mapped\",[119,98]],[[13278,13278],\"mapped\",[118,8725,109]],[[13279,13279],\"mapped\",[97,8725,109]],[[13280,13280],\"mapped\",[49,26085]],[[13281,13281],\"mapped\",[50,26085]],[[13282,13282],\"mapped\",[51,26085]],[[13283,13283],\"mapped\",[52,26085]],[[13284,13284],\"mapped\",[53,26085]],[[13285,13285],\"mapped\",[54,26085]],[[13286,13286],\"mapped\",[55,26085]],[[13287,13287],\"mapped\",[56,26085]],[[13288,13288],\"mapped\",[57,26085]],[[13289,13289],\"mapped\",[49,48,26085]],[[13290,13290],\"mapped\",[49,49,26085]],[[13291,13291],\"mapped\",[49,50,26085]],[[13292,13292],\"mapped\",[49,51,26085]],[[13293,13293],\"mapped\",[49,52,26085]],[[13294,13294],\"mapped\",[49,53,26085]],[[13295,13295],\"mapped\",[49,54,26085]],[[13296,13296],\"mapped\",[49,55,26085]],[[13297,13297],\"mapped\",[49,56,26085]],[[13298,13298],\"mapped\",[49,57,26085]],[[13299,13299],\"mapped\",[50,48,26085]],[[13300,13300],\"mapped\",[50,49,26085]],[[13301,13301],\"mapped\",[50,50,26085]],[[13302,13302],\"mapped\",[50,51,26085]],[[13303,13303],\"mapped\",[50,52,26085]],[[13304,13304],\"mapped\",[50,53,26085]],[[13305,13305],\"mapped\",[50,54,26085]],[[13306,13306],\"mapped\",[50,55,26085]],[[13307,13307],\"mapped\",[50,56,26085]],[[13308,13308],\"mapped\",[50,57,26085]],[[13309,13309],\"mapped\",[51,48,26085]],[[13310,13310],\"mapped\",[51,49,26085]],[[13311,13311],\"mapped\",[103,97,108]],[[13312,19893],\"valid\"],[[19894,19903],\"disallowed\"],[[19904,19967],\"valid\",[],\"NV8\"],[[19968,40869],\"valid\"],[[40870,40891],\"valid\"],[[40892,40899],\"valid\"],[[40900,40907],\"valid\"],[[40908,40908],\"valid\"],[[40909,40917],\"valid\"],[[40918,40959],\"disallowed\"],[[40960,42124],\"valid\"],[[42125,42127],\"disallowed\"],[[42128,42145],\"valid\",[],\"NV8\"],[[42146,42147],\"valid\",[],\"NV8\"],[[42148,42163],\"valid\",[],\"NV8\"],[[42164,42164],\"valid\",[],\"NV8\"],[[42165,42176],\"valid\",[],\"NV8\"],[[42177,42177],\"valid\",[],\"NV8\"],[[42178,42180],\"valid\",[],\"NV8\"],[[42181,42181],\"valid\",[],\"NV8\"],[[42182,42182],\"valid\",[],\"NV8\"],[[42183,42191],\"disallowed\"],[[42192,42237],\"valid\"],[[42238,42239],\"valid\",[],\"NV8\"],[[42240,42508],\"valid\"],[[42509,42511],\"valid\",[],\"NV8\"],[[42512,42539],\"valid\"],[[42540,42559],\"disallowed\"],[[42560,42560],\"mapped\",[42561]],[[42561,42561],\"valid\"],[[42562,42562],\"mapped\",[42563]],[[42563,42563],\"valid\"],[[42564,42564],\"mapped\",[42565]],[[42565,42565],\"valid\"],[[42566,42566],\"mapped\",[42567]],[[42567,42567],\"valid\"],[[42568,42568],\"mapped\",[42569]],[[42569,42569],\"valid\"],[[42570,42570],\"mapped\",[42571]],[[42571,42571],\"valid\"],[[42572,42572],\"mapped\",[42573]],[[42573,42573],\"valid\"],[[42574,42574],\"mapped\",[42575]],[[42575,42575],\"valid\"],[[42576,42576],\"mapped\",[42577]],[[42577,42577],\"valid\"],[[42578,42578],\"mapped\",[42579]],[[42579,42579],\"valid\"],[[42580,42580],\"mapped\",[42581]],[[42581,42581],\"valid\"],[[42582,42582],\"mapped\",[42583]],[[42583,42583],\"valid\"],[[42584,42584],\"mapped\",[42585]],[[42585,42585],\"valid\"],[[42586,42586],\"mapped\",[42587]],[[42587,42587],\"valid\"],[[42588,42588],\"mapped\",[42589]],[[42589,42589],\"valid\"],[[42590,42590],\"mapped\",[42591]],[[42591,42591],\"valid\"],[[42592,42592],\"mapped\",[42593]],[[42593,42593],\"valid\"],[[42594,42594],\"mapped\",[42595]],[[42595,42595],\"valid\"],[[42596,42596],\"mapped\",[42597]],[[42597,42597],\"valid\"],[[42598,42598],\"mapped\",[42599]],[[42599,42599],\"valid\"],[[42600,42600],\"mapped\",[42601]],[[42601,42601],\"valid\"],[[42602,42602],\"mapped\",[42603]],[[42603,42603],\"valid\"],[[42604,42604],\"mapped\",[42605]],[[42605,42607],\"valid\"],[[42608,42611],\"valid\",[],\"NV8\"],[[42612,42619],\"valid\"],[[42620,42621],\"valid\"],[[42622,42622],\"valid\",[],\"NV8\"],[[42623,42623],\"valid\"],[[42624,42624],\"mapped\",[42625]],[[42625,42625],\"valid\"],[[42626,42626],\"mapped\",[42627]],[[42627,42627],\"valid\"],[[42628,42628],\"mapped\",[42629]],[[42629,42629],\"valid\"],[[42630,42630],\"mapped\",[42631]],[[42631,42631],\"valid\"],[[42632,42632],\"mapped\",[42633]],[[42633,42633],\"valid\"],[[42634,42634],\"mapped\",[42635]],[[42635,42635],\"valid\"],[[42636,42636],\"mapped\",[42637]],[[42637,42637],\"valid\"],[[42638,42638],\"mapped\",[42639]],[[42639,42639],\"valid\"],[[42640,42640],\"mapped\",[42641]],[[42641,42641],\"valid\"],[[42642,42642],\"mapped\",[42643]],[[42643,42643],\"valid\"],[[42644,42644],\"mapped\",[42645]],[[42645,42645],\"valid\"],[[42646,42646],\"mapped\",[42647]],[[42647,42647],\"valid\"],[[42648,42648],\"mapped\",[42649]],[[42649,42649],\"valid\"],[[42650,42650],\"mapped\",[42651]],[[42651,42651],\"valid\"],[[42652,42652],\"mapped\",[1098]],[[42653,42653],\"mapped\",[1100]],[[42654,42654],\"valid\"],[[42655,42655],\"valid\"],[[42656,42725],\"valid\"],[[42726,42735],\"valid\",[],\"NV8\"],[[42736,42737],\"valid\"],[[42738,42743],\"valid\",[],\"NV8\"],[[42744,42751],\"disallowed\"],[[42752,42774],\"valid\",[],\"NV8\"],[[42775,42778],\"valid\"],[[42779,42783],\"valid\"],[[42784,42785],\"valid\",[],\"NV8\"],[[42786,42786],\"mapped\",[42787]],[[42787,42787],\"valid\"],[[42788,42788],\"mapped\",[42789]],[[42789,42789],\"valid\"],[[42790,42790],\"mapped\",[42791]],[[42791,42791],\"valid\"],[[42792,42792],\"mapped\",[42793]],[[42793,42793],\"valid\"],[[42794,42794],\"mapped\",[42795]],[[42795,42795],\"valid\"],[[42796,42796],\"mapped\",[42797]],[[42797,42797],\"valid\"],[[42798,42798],\"mapped\",[42799]],[[42799,42801],\"valid\"],[[42802,42802],\"mapped\",[42803]],[[42803,42803],\"valid\"],[[42804,42804],\"mapped\",[42805]],[[42805,42805],\"valid\"],[[42806,42806],\"mapped\",[42807]],[[42807,42807],\"valid\"],[[42808,42808],\"mapped\",[42809]],[[42809,42809],\"valid\"],[[42810,42810],\"mapped\",[42811]],[[42811,42811],\"valid\"],[[42812,42812],\"mapped\",[42813]],[[42813,42813],\"valid\"],[[42814,42814],\"mapped\",[42815]],[[42815,42815],\"valid\"],[[42816,42816],\"mapped\",[42817]],[[42817,42817],\"valid\"],[[42818,42818],\"mapped\",[42819]],[[42819,42819],\"valid\"],[[42820,42820],\"mapped\",[42821]],[[42821,42821],\"valid\"],[[42822,42822],\"mapped\",[42823]],[[42823,42823],\"valid\"],[[42824,42824],\"mapped\",[42825]],[[42825,42825],\"valid\"],[[42826,42826],\"mapped\",[42827]],[[42827,42827],\"valid\"],[[42828,42828],\"mapped\",[42829]],[[42829,42829],\"valid\"],[[42830,42830],\"mapped\",[42831]],[[42831,42831],\"valid\"],[[42832,42832],\"mapped\",[42833]],[[42833,42833],\"valid\"],[[42834,42834],\"mapped\",[42835]],[[42835,42835],\"valid\"],[[42836,42836],\"mapped\",[42837]],[[42837,42837],\"valid\"],[[42838,42838],\"mapped\",[42839]],[[42839,42839],\"valid\"],[[42840,42840],\"mapped\",[42841]],[[42841,42841],\"valid\"],[[42842,42842],\"mapped\",[42843]],[[42843,42843],\"valid\"],[[42844,42844],\"mapped\",[42845]],[[42845,42845],\"valid\"],[[42846,42846],\"mapped\",[42847]],[[42847,42847],\"valid\"],[[42848,42848],\"mapped\",[42849]],[[42849,42849],\"valid\"],[[42850,42850],\"mapped\",[42851]],[[42851,42851],\"valid\"],[[42852,42852],\"mapped\",[42853]],[[42853,42853],\"valid\"],[[42854,42854],\"mapped\",[42855]],[[42855,42855],\"valid\"],[[42856,42856],\"mapped\",[42857]],[[42857,42857],\"valid\"],[[42858,42858],\"mapped\",[42859]],[[42859,42859],\"valid\"],[[42860,42860],\"mapped\",[42861]],[[42861,42861],\"valid\"],[[42862,42862],\"mapped\",[42863]],[[42863,42863],\"valid\"],[[42864,42864],\"mapped\",[42863]],[[42865,42872],\"valid\"],[[42873,42873],\"mapped\",[42874]],[[42874,42874],\"valid\"],[[42875,42875],\"mapped\",[42876]],[[42876,42876],\"valid\"],[[42877,42877],\"mapped\",[7545]],[[42878,42878],\"mapped\",[42879]],[[42879,42879],\"valid\"],[[42880,42880],\"mapped\",[42881]],[[42881,42881],\"valid\"],[[42882,42882],\"mapped\",[42883]],[[42883,42883],\"valid\"],[[42884,42884],\"mapped\",[42885]],[[42885,42885],\"valid\"],[[42886,42886],\"mapped\",[42887]],[[42887,42888],\"valid\"],[[42889,42890],\"valid\",[],\"NV8\"],[[42891,42891],\"mapped\",[42892]],[[42892,42892],\"valid\"],[[42893,42893],\"mapped\",[613]],[[42894,42894],\"valid\"],[[42895,42895],\"valid\"],[[42896,42896],\"mapped\",[42897]],[[42897,42897],\"valid\"],[[42898,42898],\"mapped\",[42899]],[[42899,42899],\"valid\"],[[42900,42901],\"valid\"],[[42902,42902],\"mapped\",[42903]],[[42903,42903],\"valid\"],[[42904,42904],\"mapped\",[42905]],[[42905,42905],\"valid\"],[[42906,42906],\"mapped\",[42907]],[[42907,42907],\"valid\"],[[42908,42908],\"mapped\",[42909]],[[42909,42909],\"valid\"],[[42910,42910],\"mapped\",[42911]],[[42911,42911],\"valid\"],[[42912,42912],\"mapped\",[42913]],[[42913,42913],\"valid\"],[[42914,42914],\"mapped\",[42915]],[[42915,42915],\"valid\"],[[42916,42916],\"mapped\",[42917]],[[42917,42917],\"valid\"],[[42918,42918],\"mapped\",[42919]],[[42919,42919],\"valid\"],[[42920,42920],\"mapped\",[42921]],[[42921,42921],\"valid\"],[[42922,42922],\"mapped\",[614]],[[42923,42923],\"mapped\",[604]],[[42924,42924],\"mapped\",[609]],[[42925,42925],\"mapped\",[620]],[[42926,42927],\"disallowed\"],[[42928,42928],\"mapped\",[670]],[[42929,42929],\"mapped\",[647]],[[42930,42930],\"mapped\",[669]],[[42931,42931],\"mapped\",[43859]],[[42932,42932],\"mapped\",[42933]],[[42933,42933],\"valid\"],[[42934,42934],\"mapped\",[42935]],[[42935,42935],\"valid\"],[[42936,42998],\"disallowed\"],[[42999,42999],\"valid\"],[[43000,43000],\"mapped\",[295]],[[43001,43001],\"mapped\",[339]],[[43002,43002],\"valid\"],[[43003,43007],\"valid\"],[[43008,43047],\"valid\"],[[43048,43051],\"valid\",[],\"NV8\"],[[43052,43055],\"disallowed\"],[[43056,43065],\"valid\",[],\"NV8\"],[[43066,43071],\"disallowed\"],[[43072,43123],\"valid\"],[[43124,43127],\"valid\",[],\"NV8\"],[[43128,43135],\"disallowed\"],[[43136,43204],\"valid\"],[[43205,43213],\"disallowed\"],[[43214,43215],\"valid\",[],\"NV8\"],[[43216,43225],\"valid\"],[[43226,43231],\"disallowed\"],[[43232,43255],\"valid\"],[[43256,43258],\"valid\",[],\"NV8\"],[[43259,43259],\"valid\"],[[43260,43260],\"valid\",[],\"NV8\"],[[43261,43261],\"valid\"],[[43262,43263],\"disallowed\"],[[43264,43309],\"valid\"],[[43310,43311],\"valid\",[],\"NV8\"],[[43312,43347],\"valid\"],[[43348,43358],\"disallowed\"],[[43359,43359],\"valid\",[],\"NV8\"],[[43360,43388],\"valid\",[],\"NV8\"],[[43389,43391],\"disallowed\"],[[43392,43456],\"valid\"],[[43457,43469],\"valid\",[],\"NV8\"],[[43470,43470],\"disallowed\"],[[43471,43481],\"valid\"],[[43482,43485],\"disallowed\"],[[43486,43487],\"valid\",[],\"NV8\"],[[43488,43518],\"valid\"],[[43519,43519],\"disallowed\"],[[43520,43574],\"valid\"],[[43575,43583],\"disallowed\"],[[43584,43597],\"valid\"],[[43598,43599],\"disallowed\"],[[43600,43609],\"valid\"],[[43610,43611],\"disallowed\"],[[43612,43615],\"valid\",[],\"NV8\"],[[43616,43638],\"valid\"],[[43639,43641],\"valid\",[],\"NV8\"],[[43642,43643],\"valid\"],[[43644,43647],\"valid\"],[[43648,43714],\"valid\"],[[43715,43738],\"disallowed\"],[[43739,43741],\"valid\"],[[43742,43743],\"valid\",[],\"NV8\"],[[43744,43759],\"valid\"],[[43760,43761],\"valid\",[],\"NV8\"],[[43762,43766],\"valid\"],[[43767,43776],\"disallowed\"],[[43777,43782],\"valid\"],[[43783,43784],\"disallowed\"],[[43785,43790],\"valid\"],[[43791,43792],\"disallowed\"],[[43793,43798],\"valid\"],[[43799,43807],\"disallowed\"],[[43808,43814],\"valid\"],[[43815,43815],\"disallowed\"],[[43816,43822],\"valid\"],[[43823,43823],\"disallowed\"],[[43824,43866],\"valid\"],[[43867,43867],\"valid\",[],\"NV8\"],[[43868,43868],\"mapped\",[42791]],[[43869,43869],\"mapped\",[43831]],[[43870,43870],\"mapped\",[619]],[[43871,43871],\"mapped\",[43858]],[[43872,43875],\"valid\"],[[43876,43877],\"valid\"],[[43878,43887],\"disallowed\"],[[43888,43888],\"mapped\",[5024]],[[43889,43889],\"mapped\",[5025]],[[43890,43890],\"mapped\",[5026]],[[43891,43891],\"mapped\",[5027]],[[43892,43892],\"mapped\",[5028]],[[43893,43893],\"mapped\",[5029]],[[43894,43894],\"mapped\",[5030]],[[43895,43895],\"mapped\",[5031]],[[43896,43896],\"mapped\",[5032]],[[43897,43897],\"mapped\",[5033]],[[43898,43898],\"mapped\",[5034]],[[43899,43899],\"mapped\",[5035]],[[43900,43900],\"mapped\",[5036]],[[43901,43901],\"mapped\",[5037]],[[43902,43902],\"mapped\",[5038]],[[43903,43903],\"mapped\",[5039]],[[43904,43904],\"mapped\",[5040]],[[43905,43905],\"mapped\",[5041]],[[43906,43906],\"mapped\",[5042]],[[43907,43907],\"mapped\",[5043]],[[43908,43908],\"mapped\",[5044]],[[43909,43909],\"mapped\",[5045]],[[43910,43910],\"mapped\",[5046]],[[43911,43911],\"mapped\",[5047]],[[43912,43912],\"mapped\",[5048]],[[43913,43913],\"mapped\",[5049]],[[43914,43914],\"mapped\",[5050]],[[43915,43915],\"mapped\",[5051]],[[43916,43916],\"mapped\",[5052]],[[43917,43917],\"mapped\",[5053]],[[43918,43918],\"mapped\",[5054]],[[43919,43919],\"mapped\",[5055]],[[43920,43920],\"mapped\",[5056]],[[43921,43921],\"mapped\",[5057]],[[43922,43922],\"mapped\",[5058]],[[43923,43923],\"mapped\",[5059]],[[43924,43924],\"mapped\",[5060]],[[43925,43925],\"mapped\",[5061]],[[43926,43926],\"mapped\",[5062]],[[43927,43927],\"mapped\",[5063]],[[43928,43928],\"mapped\",[5064]],[[43929,43929],\"mapped\",[5065]],[[43930,43930],\"mapped\",[5066]],[[43931,43931],\"mapped\",[5067]],[[43932,43932],\"mapped\",[5068]],[[43933,43933],\"mapped\",[5069]],[[43934,43934],\"mapped\",[5070]],[[43935,43935],\"mapped\",[5071]],[[43936,43936],\"mapped\",[5072]],[[43937,43937],\"mapped\",[5073]],[[43938,43938],\"mapped\",[5074]],[[43939,43939],\"mapped\",[5075]],[[43940,43940],\"mapped\",[5076]],[[43941,43941],\"mapped\",[5077]],[[43942,43942],\"mapped\",[5078]],[[43943,43943],\"mapped\",[5079]],[[43944,43944],\"mapped\",[5080]],[[43945,43945],\"mapped\",[5081]],[[43946,43946],\"mapped\",[5082]],[[43947,43947],\"mapped\",[5083]],[[43948,43948],\"mapped\",[5084]],[[43949,43949],\"mapped\",[5085]],[[43950,43950],\"mapped\",[5086]],[[43951,43951],\"mapped\",[5087]],[[43952,43952],\"mapped\",[5088]],[[43953,43953],\"mapped\",[5089]],[[43954,43954],\"mapped\",[5090]],[[43955,43955],\"mapped\",[5091]],[[43956,43956],\"mapped\",[5092]],[[43957,43957],\"mapped\",[5093]],[[43958,43958],\"mapped\",[5094]],[[43959,43959],\"mapped\",[5095]],[[43960,43960],\"mapped\",[5096]],[[43961,43961],\"mapped\",[5097]],[[43962,43962],\"mapped\",[5098]],[[43963,43963],\"mapped\",[5099]],[[43964,43964],\"mapped\",[5100]],[[43965,43965],\"mapped\",[5101]],[[43966,43966],\"mapped\",[5102]],[[43967,43967],\"mapped\",[5103]],[[43968,44010],\"valid\"],[[44011,44011],\"valid\",[],\"NV8\"],[[44012,44013],\"valid\"],[[44014,44015],\"disallowed\"],[[44016,44025],\"valid\"],[[44026,44031],\"disallowed\"],[[44032,55203],\"valid\"],[[55204,55215],\"disallowed\"],[[55216,55238],\"valid\",[],\"NV8\"],[[55239,55242],\"disallowed\"],[[55243,55291],\"valid\",[],\"NV8\"],[[55292,55295],\"disallowed\"],[[55296,57343],\"disallowed\"],[[57344,63743],\"disallowed\"],[[63744,63744],\"mapped\",[35912]],[[63745,63745],\"mapped\",[26356]],[[63746,63746],\"mapped\",[36554]],[[63747,63747],\"mapped\",[36040]],[[63748,63748],\"mapped\",[28369]],[[63749,63749],\"mapped\",[20018]],[[63750,63750],\"mapped\",[21477]],[[63751,63752],\"mapped\",[40860]],[[63753,63753],\"mapped\",[22865]],[[63754,63754],\"mapped\",[37329]],[[63755,63755],\"mapped\",[21895]],[[63756,63756],\"mapped\",[22856]],[[63757,63757],\"mapped\",[25078]],[[63758,63758],\"mapped\",[30313]],[[63759,63759],\"mapped\",[32645]],[[63760,63760],\"mapped\",[34367]],[[63761,63761],\"mapped\",[34746]],[[63762,63762],\"mapped\",[35064]],[[63763,63763],\"mapped\",[37007]],[[63764,63764],\"mapped\",[27138]],[[63765,63765],\"mapped\",[27931]],[[63766,63766],\"mapped\",[28889]],[[63767,63767],\"mapped\",[29662]],[[63768,63768],\"mapped\",[33853]],[[63769,63769],\"mapped\",[37226]],[[63770,63770],\"mapped\",[39409]],[[63771,63771],\"mapped\",[20098]],[[63772,63772],\"mapped\",[21365]],[[63773,63773],\"mapped\",[27396]],[[63774,63774],\"mapped\",[29211]],[[63775,63775],\"mapped\",[34349]],[[63776,63776],\"mapped\",[40478]],[[63777,63777],\"mapped\",[23888]],[[63778,63778],\"mapped\",[28651]],[[63779,63779],\"mapped\",[34253]],[[63780,63780],\"mapped\",[35172]],[[63781,63781],\"mapped\",[25289]],[[63782,63782],\"mapped\",[33240]],[[63783,63783],\"mapped\",[34847]],[[63784,63784],\"mapped\",[24266]],[[63785,63785],\"mapped\",[26391]],[[63786,63786],\"mapped\",[28010]],[[63787,63787],\"mapped\",[29436]],[[63788,63788],\"mapped\",[37070]],[[63789,63789],\"mapped\",[20358]],[[63790,63790],\"mapped\",[20919]],[[63791,63791],\"mapped\",[21214]],[[63792,63792],\"mapped\",[25796]],[[63793,63793],\"mapped\",[27347]],[[63794,63794],\"mapped\",[29200]],[[63795,63795],\"mapped\",[30439]],[[63796,63796],\"mapped\",[32769]],[[63797,63797],\"mapped\",[34310]],[[63798,63798],\"mapped\",[34396]],[[63799,63799],\"mapped\",[36335]],[[63800,63800],\"mapped\",[38706]],[[63801,63801],\"mapped\",[39791]],[[63802,63802],\"mapped\",[40442]],[[63803,63803],\"mapped\",[30860]],[[63804,63804],\"mapped\",[31103]],[[63805,63805],\"mapped\",[32160]],[[63806,63806],\"mapped\",[33737]],[[63807,63807],\"mapped\",[37636]],[[63808,63808],\"mapped\",[40575]],[[63809,63809],\"mapped\",[35542]],[[63810,63810],\"mapped\",[22751]],[[63811,63811],\"mapped\",[24324]],[[63812,63812],\"mapped\",[31840]],[[63813,63813],\"mapped\",[32894]],[[63814,63814],\"mapped\",[29282]],[[63815,63815],\"mapped\",[30922]],[[63816,63816],\"mapped\",[36034]],[[63817,63817],\"mapped\",[38647]],[[63818,63818],\"mapped\",[22744]],[[63819,63819],\"mapped\",[23650]],[[63820,63820],\"mapped\",[27155]],[[63821,63821],\"mapped\",[28122]],[[63822,63822],\"mapped\",[28431]],[[63823,63823],\"mapped\",[32047]],[[63824,63824],\"mapped\",[32311]],[[63825,63825],\"mapped\",[38475]],[[63826,63826],\"mapped\",[21202]],[[63827,63827],\"mapped\",[32907]],[[63828,63828],\"mapped\",[20956]],[[63829,63829],\"mapped\",[20940]],[[63830,63830],\"mapped\",[31260]],[[63831,63831],\"mapped\",[32190]],[[63832,63832],\"mapped\",[33777]],[[63833,63833],\"mapped\",[38517]],[[63834,63834],\"mapped\",[35712]],[[63835,63835],\"mapped\",[25295]],[[63836,63836],\"mapped\",[27138]],[[63837,63837],\"mapped\",[35582]],[[63838,63838],\"mapped\",[20025]],[[63839,63839],\"mapped\",[23527]],[[63840,63840],\"mapped\",[24594]],[[63841,63841],\"mapped\",[29575]],[[63842,63842],\"mapped\",[30064]],[[63843,63843],\"mapped\",[21271]],[[63844,63844],\"mapped\",[30971]],[[63845,63845],\"mapped\",[20415]],[[63846,63846],\"mapped\",[24489]],[[63847,63847],\"mapped\",[19981]],[[63848,63848],\"mapped\",[27852]],[[63849,63849],\"mapped\",[25976]],[[63850,63850],\"mapped\",[32034]],[[63851,63851],\"mapped\",[21443]],[[63852,63852],\"mapped\",[22622]],[[63853,63853],\"mapped\",[30465]],[[63854,63854],\"mapped\",[33865]],[[63855,63855],\"mapped\",[35498]],[[63856,63856],\"mapped\",[27578]],[[63857,63857],\"mapped\",[36784]],[[63858,63858],\"mapped\",[27784]],[[63859,63859],\"mapped\",[25342]],[[63860,63860],\"mapped\",[33509]],[[63861,63861],\"mapped\",[25504]],[[63862,63862],\"mapped\",[30053]],[[63863,63863],\"mapped\",[20142]],[[63864,63864],\"mapped\",[20841]],[[63865,63865],\"mapped\",[20937]],[[63866,63866],\"mapped\",[26753]],[[63867,63867],\"mapped\",[31975]],[[63868,63868],\"mapped\",[33391]],[[63869,63869],\"mapped\",[35538]],[[63870,63870],\"mapped\",[37327]],[[63871,63871],\"mapped\",[21237]],[[63872,63872],\"mapped\",[21570]],[[63873,63873],\"mapped\",[22899]],[[63874,63874],\"mapped\",[24300]],[[63875,63875],\"mapped\",[26053]],[[63876,63876],\"mapped\",[28670]],[[63877,63877],\"mapped\",[31018]],[[63878,63878],\"mapped\",[38317]],[[63879,63879],\"mapped\",[39530]],[[63880,63880],\"mapped\",[40599]],[[63881,63881],\"mapped\",[40654]],[[63882,63882],\"mapped\",[21147]],[[63883,63883],\"mapped\",[26310]],[[63884,63884],\"mapped\",[27511]],[[63885,63885],\"mapped\",[36706]],[[63886,63886],\"mapped\",[24180]],[[63887,63887],\"mapped\",[24976]],[[63888,63888],\"mapped\",[25088]],[[63889,63889],\"mapped\",[25754]],[[63890,63890],\"mapped\",[28451]],[[63891,63891],\"mapped\",[29001]],[[63892,63892],\"mapped\",[29833]],[[63893,63893],\"mapped\",[31178]],[[63894,63894],\"mapped\",[32244]],[[63895,63895],\"mapped\",[32879]],[[63896,63896],\"mapped\",[36646]],[[63897,63897],\"mapped\",[34030]],[[63898,63898],\"mapped\",[36899]],[[63899,63899],\"mapped\",[37706]],[[63900,63900],\"mapped\",[21015]],[[63901,63901],\"mapped\",[21155]],[[63902,63902],\"mapped\",[21693]],[[63903,63903],\"mapped\",[28872]],[[63904,63904],\"mapped\",[35010]],[[63905,63905],\"mapped\",[35498]],[[63906,63906],\"mapped\",[24265]],[[63907,63907],\"mapped\",[24565]],[[63908,63908],\"mapped\",[25467]],[[63909,63909],\"mapped\",[27566]],[[63910,63910],\"mapped\",[31806]],[[63911,63911],\"mapped\",[29557]],[[63912,63912],\"mapped\",[20196]],[[63913,63913],\"mapped\",[22265]],[[63914,63914],\"mapped\",[23527]],[[63915,63915],\"mapped\",[23994]],[[63916,63916],\"mapped\",[24604]],[[63917,63917],\"mapped\",[29618]],[[63918,63918],\"mapped\",[29801]],[[63919,63919],\"mapped\",[32666]],[[63920,63920],\"mapped\",[32838]],[[63921,63921],\"mapped\",[37428]],[[63922,63922],\"mapped\",[38646]],[[63923,63923],\"mapped\",[38728]],[[63924,63924],\"mapped\",[38936]],[[63925,63925],\"mapped\",[20363]],[[63926,63926],\"mapped\",[31150]],[[63927,63927],\"mapped\",[37300]],[[63928,63928],\"mapped\",[38584]],[[63929,63929],\"mapped\",[24801]],[[63930,63930],\"mapped\",[20102]],[[63931,63931],\"mapped\",[20698]],[[63932,63932],\"mapped\",[23534]],[[63933,63933],\"mapped\",[23615]],[[63934,63934],\"mapped\",[26009]],[[63935,63935],\"mapped\",[27138]],[[63936,63936],\"mapped\",[29134]],[[63937,63937],\"mapped\",[30274]],[[63938,63938],\"mapped\",[34044]],[[63939,63939],\"mapped\",[36988]],[[63940,63940],\"mapped\",[40845]],[[63941,63941],\"mapped\",[26248]],[[63942,63942],\"mapped\",[38446]],[[63943,63943],\"mapped\",[21129]],[[63944,63944],\"mapped\",[26491]],[[63945,63945],\"mapped\",[26611]],[[63946,63946],\"mapped\",[27969]],[[63947,63947],\"mapped\",[28316]],[[63948,63948],\"mapped\",[29705]],[[63949,63949],\"mapped\",[30041]],[[63950,63950],\"mapped\",[30827]],[[63951,63951],\"mapped\",[32016]],[[63952,63952],\"mapped\",[39006]],[[63953,63953],\"mapped\",[20845]],[[63954,63954],\"mapped\",[25134]],[[63955,63955],\"mapped\",[38520]],[[63956,63956],\"mapped\",[20523]],[[63957,63957],\"mapped\",[23833]],[[63958,63958],\"mapped\",[28138]],[[63959,63959],\"mapped\",[36650]],[[63960,63960],\"mapped\",[24459]],[[63961,63961],\"mapped\",[24900]],[[63962,63962],\"mapped\",[26647]],[[63963,63963],\"mapped\",[29575]],[[63964,63964],\"mapped\",[38534]],[[63965,63965],\"mapped\",[21033]],[[63966,63966],\"mapped\",[21519]],[[63967,63967],\"mapped\",[23653]],[[63968,63968],\"mapped\",[26131]],[[63969,63969],\"mapped\",[26446]],[[63970,63970],\"mapped\",[26792]],[[63971,63971],\"mapped\",[27877]],[[63972,63972],\"mapped\",[29702]],[[63973,63973],\"mapped\",[30178]],[[63974,63974],\"mapped\",[32633]],[[63975,63975],\"mapped\",[35023]],[[63976,63976],\"mapped\",[35041]],[[63977,63977],\"mapped\",[37324]],[[63978,63978],\"mapped\",[38626]],[[63979,63979],\"mapped\",[21311]],[[63980,63980],\"mapped\",[28346]],[[63981,63981],\"mapped\",[21533]],[[63982,63982],\"mapped\",[29136]],[[63983,63983],\"mapped\",[29848]],[[63984,63984],\"mapped\",[34298]],[[63985,63985],\"mapped\",[38563]],[[63986,63986],\"mapped\",[40023]],[[63987,63987],\"mapped\",[40607]],[[63988,63988],\"mapped\",[26519]],[[63989,63989],\"mapped\",[28107]],[[63990,63990],\"mapped\",[33256]],[[63991,63991],\"mapped\",[31435]],[[63992,63992],\"mapped\",[31520]],[[63993,63993],\"mapped\",[31890]],[[63994,63994],\"mapped\",[29376]],[[63995,63995],\"mapped\",[28825]],[[63996,63996],\"mapped\",[35672]],[[63997,63997],\"mapped\",[20160]],[[63998,63998],\"mapped\",[33590]],[[63999,63999],\"mapped\",[21050]],[[64000,64000],\"mapped\",[20999]],[[64001,64001],\"mapped\",[24230]],[[64002,64002],\"mapped\",[25299]],[[64003,64003],\"mapped\",[31958]],[[64004,64004],\"mapped\",[23429]],[[64005,64005],\"mapped\",[27934]],[[64006,64006],\"mapped\",[26292]],[[64007,64007],\"mapped\",[36667]],[[64008,64008],\"mapped\",[34892]],[[64009,64009],\"mapped\",[38477]],[[64010,64010],\"mapped\",[35211]],[[64011,64011],\"mapped\",[24275]],[[64012,64012],\"mapped\",[20800]],[[64013,64013],\"mapped\",[21952]],[[64014,64015],\"valid\"],[[64016,64016],\"mapped\",[22618]],[[64017,64017],\"valid\"],[[64018,64018],\"mapped\",[26228]],[[64019,64020],\"valid\"],[[64021,64021],\"mapped\",[20958]],[[64022,64022],\"mapped\",[29482]],[[64023,64023],\"mapped\",[30410]],[[64024,64024],\"mapped\",[31036]],[[64025,64025],\"mapped\",[31070]],[[64026,64026],\"mapped\",[31077]],[[64027,64027],\"mapped\",[31119]],[[64028,64028],\"mapped\",[38742]],[[64029,64029],\"mapped\",[31934]],[[64030,64030],\"mapped\",[32701]],[[64031,64031],\"valid\"],[[64032,64032],\"mapped\",[34322]],[[64033,64033],\"valid\"],[[64034,64034],\"mapped\",[35576]],[[64035,64036],\"valid\"],[[64037,64037],\"mapped\",[36920]],[[64038,64038],\"mapped\",[37117]],[[64039,64041],\"valid\"],[[64042,64042],\"mapped\",[39151]],[[64043,64043],\"mapped\",[39164]],[[64044,64044],\"mapped\",[39208]],[[64045,64045],\"mapped\",[40372]],[[64046,64046],\"mapped\",[37086]],[[64047,64047],\"mapped\",[38583]],[[64048,64048],\"mapped\",[20398]],[[64049,64049],\"mapped\",[20711]],[[64050,64050],\"mapped\",[20813]],[[64051,64051],\"mapped\",[21193]],[[64052,64052],\"mapped\",[21220]],[[64053,64053],\"mapped\",[21329]],[[64054,64054],\"mapped\",[21917]],[[64055,64055],\"mapped\",[22022]],[[64056,64056],\"mapped\",[22120]],[[64057,64057],\"mapped\",[22592]],[[64058,64058],\"mapped\",[22696]],[[64059,64059],\"mapped\",[23652]],[[64060,64060],\"mapped\",[23662]],[[64061,64061],\"mapped\",[24724]],[[64062,64062],\"mapped\",[24936]],[[64063,64063],\"mapped\",[24974]],[[64064,64064],\"mapped\",[25074]],[[64065,64065],\"mapped\",[25935]],[[64066,64066],\"mapped\",[26082]],[[64067,64067],\"mapped\",[26257]],[[64068,64068],\"mapped\",[26757]],[[64069,64069],\"mapped\",[28023]],[[64070,64070],\"mapped\",[28186]],[[64071,64071],\"mapped\",[28450]],[[64072,64072],\"mapped\",[29038]],[[64073,64073],\"mapped\",[29227]],[[64074,64074],\"mapped\",[29730]],[[64075,64075],\"mapped\",[30865]],[[64076,64076],\"mapped\",[31038]],[[64077,64077],\"mapped\",[31049]],[[64078,64078],\"mapped\",[31048]],[[64079,64079],\"mapped\",[31056]],[[64080,64080],\"mapped\",[31062]],[[64081,64081],\"mapped\",[31069]],[[64082,64082],\"mapped\",[31117]],[[64083,64083],\"mapped\",[31118]],[[64084,64084],\"mapped\",[31296]],[[64085,64085],\"mapped\",[31361]],[[64086,64086],\"mapped\",[31680]],[[64087,64087],\"mapped\",[32244]],[[64088,64088],\"mapped\",[32265]],[[64089,64089],\"mapped\",[32321]],[[64090,64090],\"mapped\",[32626]],[[64091,64091],\"mapped\",[32773]],[[64092,64092],\"mapped\",[33261]],[[64093,64094],\"mapped\",[33401]],[[64095,64095],\"mapped\",[33879]],[[64096,64096],\"mapped\",[35088]],[[64097,64097],\"mapped\",[35222]],[[64098,64098],\"mapped\",[35585]],[[64099,64099],\"mapped\",[35641]],[[64100,64100],\"mapped\",[36051]],[[64101,64101],\"mapped\",[36104]],[[64102,64102],\"mapped\",[36790]],[[64103,64103],\"mapped\",[36920]],[[64104,64104],\"mapped\",[38627]],[[64105,64105],\"mapped\",[38911]],[[64106,64106],\"mapped\",[38971]],[[64107,64107],\"mapped\",[24693]],[[64108,64108],\"mapped\",[148206]],[[64109,64109],\"mapped\",[33304]],[[64110,64111],\"disallowed\"],[[64112,64112],\"mapped\",[20006]],[[64113,64113],\"mapped\",[20917]],[[64114,64114],\"mapped\",[20840]],[[64115,64115],\"mapped\",[20352]],[[64116,64116],\"mapped\",[20805]],[[64117,64117],\"mapped\",[20864]],[[64118,64118],\"mapped\",[21191]],[[64119,64119],\"mapped\",[21242]],[[64120,64120],\"mapped\",[21917]],[[64121,64121],\"mapped\",[21845]],[[64122,64122],\"mapped\",[21913]],[[64123,64123],\"mapped\",[21986]],[[64124,64124],\"mapped\",[22618]],[[64125,64125],\"mapped\",[22707]],[[64126,64126],\"mapped\",[22852]],[[64127,64127],\"mapped\",[22868]],[[64128,64128],\"mapped\",[23138]],[[64129,64129],\"mapped\",[23336]],[[64130,64130],\"mapped\",[24274]],[[64131,64131],\"mapped\",[24281]],[[64132,64132],\"mapped\",[24425]],[[64133,64133],\"mapped\",[24493]],[[64134,64134],\"mapped\",[24792]],[[64135,64135],\"mapped\",[24910]],[[64136,64136],\"mapped\",[24840]],[[64137,64137],\"mapped\",[24974]],[[64138,64138],\"mapped\",[24928]],[[64139,64139],\"mapped\",[25074]],[[64140,64140],\"mapped\",[25140]],[[64141,64141],\"mapped\",[25540]],[[64142,64142],\"mapped\",[25628]],[[64143,64143],\"mapped\",[25682]],[[64144,64144],\"mapped\",[25942]],[[64145,64145],\"mapped\",[26228]],[[64146,64146],\"mapped\",[26391]],[[64147,64147],\"mapped\",[26395]],[[64148,64148],\"mapped\",[26454]],[[64149,64149],\"mapped\",[27513]],[[64150,64150],\"mapped\",[27578]],[[64151,64151],\"mapped\",[27969]],[[64152,64152],\"mapped\",[28379]],[[64153,64153],\"mapped\",[28363]],[[64154,64154],\"mapped\",[28450]],[[64155,64155],\"mapped\",[28702]],[[64156,64156],\"mapped\",[29038]],[[64157,64157],\"mapped\",[30631]],[[64158,64158],\"mapped\",[29237]],[[64159,64159],\"mapped\",[29359]],[[64160,64160],\"mapped\",[29482]],[[64161,64161],\"mapped\",[29809]],[[64162,64162],\"mapped\",[29958]],[[64163,64163],\"mapped\",[30011]],[[64164,64164],\"mapped\",[30237]],[[64165,64165],\"mapped\",[30239]],[[64166,64166],\"mapped\",[30410]],[[64167,64167],\"mapped\",[30427]],[[64168,64168],\"mapped\",[30452]],[[64169,64169],\"mapped\",[30538]],[[64170,64170],\"mapped\",[30528]],[[64171,64171],\"mapped\",[30924]],[[64172,64172],\"mapped\",[31409]],[[64173,64173],\"mapped\",[31680]],[[64174,64174],\"mapped\",[31867]],[[64175,64175],\"mapped\",[32091]],[[64176,64176],\"mapped\",[32244]],[[64177,64177],\"mapped\",[32574]],[[64178,64178],\"mapped\",[32773]],[[64179,64179],\"mapped\",[33618]],[[64180,64180],\"mapped\",[33775]],[[64181,64181],\"mapped\",[34681]],[[64182,64182],\"mapped\",[35137]],[[64183,64183],\"mapped\",[35206]],[[64184,64184],\"mapped\",[35222]],[[64185,64185],\"mapped\",[35519]],[[64186,64186],\"mapped\",[35576]],[[64187,64187],\"mapped\",[35531]],[[64188,64188],\"mapped\",[35585]],[[64189,64189],\"mapped\",[35582]],[[64190,64190],\"mapped\",[35565]],[[64191,64191],\"mapped\",[35641]],[[64192,64192],\"mapped\",[35722]],[[64193,64193],\"mapped\",[36104]],[[64194,64194],\"mapped\",[36664]],[[64195,64195],\"mapped\",[36978]],[[64196,64196],\"mapped\",[37273]],[[64197,64197],\"mapped\",[37494]],[[64198,64198],\"mapped\",[38524]],[[64199,64199],\"mapped\",[38627]],[[64200,64200],\"mapped\",[38742]],[[64201,64201],\"mapped\",[38875]],[[64202,64202],\"mapped\",[38911]],[[64203,64203],\"mapped\",[38923]],[[64204,64204],\"mapped\",[38971]],[[64205,64205],\"mapped\",[39698]],[[64206,64206],\"mapped\",[40860]],[[64207,64207],\"mapped\",[141386]],[[64208,64208],\"mapped\",[141380]],[[64209,64209],\"mapped\",[144341]],[[64210,64210],\"mapped\",[15261]],[[64211,64211],\"mapped\",[16408]],[[64212,64212],\"mapped\",[16441]],[[64213,64213],\"mapped\",[152137]],[[64214,64214],\"mapped\",[154832]],[[64215,64215],\"mapped\",[163539]],[[64216,64216],\"mapped\",[40771]],[[64217,64217],\"mapped\",[40846]],[[64218,64255],\"disallowed\"],[[64256,64256],\"mapped\",[102,102]],[[64257,64257],\"mapped\",[102,105]],[[64258,64258],\"mapped\",[102,108]],[[64259,64259],\"mapped\",[102,102,105]],[[64260,64260],\"mapped\",[102,102,108]],[[64261,64262],\"mapped\",[115,116]],[[64263,64274],\"disallowed\"],[[64275,64275],\"mapped\",[1396,1398]],[[64276,64276],\"mapped\",[1396,1381]],[[64277,64277],\"mapped\",[1396,1387]],[[64278,64278],\"mapped\",[1406,1398]],[[64279,64279],\"mapped\",[1396,1389]],[[64280,64284],\"disallowed\"],[[64285,64285],\"mapped\",[1497,1460]],[[64286,64286],\"valid\"],[[64287,64287],\"mapped\",[1522,1463]],[[64288,64288],\"mapped\",[1506]],[[64289,64289],\"mapped\",[1488]],[[64290,64290],\"mapped\",[1491]],[[64291,64291],\"mapped\",[1492]],[[64292,64292],\"mapped\",[1499]],[[64293,64293],\"mapped\",[1500]],[[64294,64294],\"mapped\",[1501]],[[64295,64295],\"mapped\",[1512]],[[64296,64296],\"mapped\",[1514]],[[64297,64297],\"disallowed_STD3_mapped\",[43]],[[64298,64298],\"mapped\",[1513,1473]],[[64299,64299],\"mapped\",[1513,1474]],[[64300,64300],\"mapped\",[1513,1468,1473]],[[64301,64301],\"mapped\",[1513,1468,1474]],[[64302,64302],\"mapped\",[1488,1463]],[[64303,64303],\"mapped\",[1488,1464]],[[64304,64304],\"mapped\",[1488,1468]],[[64305,64305],\"mapped\",[1489,1468]],[[64306,64306],\"mapped\",[1490,1468]],[[64307,64307],\"mapped\",[1491,1468]],[[64308,64308],\"mapped\",[1492,1468]],[[64309,64309],\"mapped\",[1493,1468]],[[64310,64310],\"mapped\",[1494,1468]],[[64311,64311],\"disallowed\"],[[64312,64312],\"mapped\",[1496,1468]],[[64313,64313],\"mapped\",[1497,1468]],[[64314,64314],\"mapped\",[1498,1468]],[[64315,64315],\"mapped\",[1499,1468]],[[64316,64316],\"mapped\",[1500,1468]],[[64317,64317],\"disallowed\"],[[64318,64318],\"mapped\",[1502,1468]],[[64319,64319],\"disallowed\"],[[64320,64320],\"mapped\",[1504,1468]],[[64321,64321],\"mapped\",[1505,1468]],[[64322,64322],\"disallowed\"],[[64323,64323],\"mapped\",[1507,1468]],[[64324,64324],\"mapped\",[1508,1468]],[[64325,64325],\"disallowed\"],[[64326,64326],\"mapped\",[1510,1468]],[[64327,64327],\"mapped\",[1511,1468]],[[64328,64328],\"mapped\",[1512,1468]],[[64329,64329],\"mapped\",[1513,1468]],[[64330,64330],\"mapped\",[1514,1468]],[[64331,64331],\"mapped\",[1493,1465]],[[64332,64332],\"mapped\",[1489,1471]],[[64333,64333],\"mapped\",[1499,1471]],[[64334,64334],\"mapped\",[1508,1471]],[[64335,64335],\"mapped\",[1488,1500]],[[64336,64337],\"mapped\",[1649]],[[64338,64341],\"mapped\",[1659]],[[64342,64345],\"mapped\",[1662]],[[64346,64349],\"mapped\",[1664]],[[64350,64353],\"mapped\",[1658]],[[64354,64357],\"mapped\",[1663]],[[64358,64361],\"mapped\",[1657]],[[64362,64365],\"mapped\",[1700]],[[64366,64369],\"mapped\",[1702]],[[64370,64373],\"mapped\",[1668]],[[64374,64377],\"mapped\",[1667]],[[64378,64381],\"mapped\",[1670]],[[64382,64385],\"mapped\",[1671]],[[64386,64387],\"mapped\",[1677]],[[64388,64389],\"mapped\",[1676]],[[64390,64391],\"mapped\",[1678]],[[64392,64393],\"mapped\",[1672]],[[64394,64395],\"mapped\",[1688]],[[64396,64397],\"mapped\",[1681]],[[64398,64401],\"mapped\",[1705]],[[64402,64405],\"mapped\",[1711]],[[64406,64409],\"mapped\",[1715]],[[64410,64413],\"mapped\",[1713]],[[64414,64415],\"mapped\",[1722]],[[64416,64419],\"mapped\",[1723]],[[64420,64421],\"mapped\",[1728]],[[64422,64425],\"mapped\",[1729]],[[64426,64429],\"mapped\",[1726]],[[64430,64431],\"mapped\",[1746]],[[64432,64433],\"mapped\",[1747]],[[64434,64449],\"valid\",[],\"NV8\"],[[64450,64466],\"disallowed\"],[[64467,64470],\"mapped\",[1709]],[[64471,64472],\"mapped\",[1735]],[[64473,64474],\"mapped\",[1734]],[[64475,64476],\"mapped\",[1736]],[[64477,64477],\"mapped\",[1735,1652]],[[64478,64479],\"mapped\",[1739]],[[64480,64481],\"mapped\",[1733]],[[64482,64483],\"mapped\",[1737]],[[64484,64487],\"mapped\",[1744]],[[64488,64489],\"mapped\",[1609]],[[64490,64491],\"mapped\",[1574,1575]],[[64492,64493],\"mapped\",[1574,1749]],[[64494,64495],\"mapped\",[1574,1608]],[[64496,64497],\"mapped\",[1574,1735]],[[64498,64499],\"mapped\",[1574,1734]],[[64500,64501],\"mapped\",[1574,1736]],[[64502,64504],\"mapped\",[1574,1744]],[[64505,64507],\"mapped\",[1574,1609]],[[64508,64511],\"mapped\",[1740]],[[64512,64512],\"mapped\",[1574,1580]],[[64513,64513],\"mapped\",[1574,1581]],[[64514,64514],\"mapped\",[1574,1605]],[[64515,64515],\"mapped\",[1574,1609]],[[64516,64516],\"mapped\",[1574,1610]],[[64517,64517],\"mapped\",[1576,1580]],[[64518,64518],\"mapped\",[1576,1581]],[[64519,64519],\"mapped\",[1576,1582]],[[64520,64520],\"mapped\",[1576,1605]],[[64521,64521],\"mapped\",[1576,1609]],[[64522,64522],\"mapped\",[1576,1610]],[[64523,64523],\"mapped\",[1578,1580]],[[64524,64524],\"mapped\",[1578,1581]],[[64525,64525],\"mapped\",[1578,1582]],[[64526,64526],\"mapped\",[1578,1605]],[[64527,64527],\"mapped\",[1578,1609]],[[64528,64528],\"mapped\",[1578,1610]],[[64529,64529],\"mapped\",[1579,1580]],[[64530,64530],\"mapped\",[1579,1605]],[[64531,64531],\"mapped\",[1579,1609]],[[64532,64532],\"mapped\",[1579,1610]],[[64533,64533],\"mapped\",[1580,1581]],[[64534,64534],\"mapped\",[1580,1605]],[[64535,64535],\"mapped\",[1581,1580]],[[64536,64536],\"mapped\",[1581,1605]],[[64537,64537],\"mapped\",[1582,1580]],[[64538,64538],\"mapped\",[1582,1581]],[[64539,64539],\"mapped\",[1582,1605]],[[64540,64540],\"mapped\",[1587,1580]],[[64541,64541],\"mapped\",[1587,1581]],[[64542,64542],\"mapped\",[1587,1582]],[[64543,64543],\"mapped\",[1587,1605]],[[64544,64544],\"mapped\",[1589,1581]],[[64545,64545],\"mapped\",[1589,1605]],[[64546,64546],\"mapped\",[1590,1580]],[[64547,64547],\"mapped\",[1590,1581]],[[64548,64548],\"mapped\",[1590,1582]],[[64549,64549],\"mapped\",[1590,1605]],[[64550,64550],\"mapped\",[1591,1581]],[[64551,64551],\"mapped\",[1591,1605]],[[64552,64552],\"mapped\",[1592,1605]],[[64553,64553],\"mapped\",[1593,1580]],[[64554,64554],\"mapped\",[1593,1605]],[[64555,64555],\"mapped\",[1594,1580]],[[64556,64556],\"mapped\",[1594,1605]],[[64557,64557],\"mapped\",[1601,1580]],[[64558,64558],\"mapped\",[1601,1581]],[[64559,64559],\"mapped\",[1601,1582]],[[64560,64560],\"mapped\",[1601,1605]],[[64561,64561],\"mapped\",[1601,1609]],[[64562,64562],\"mapped\",[1601,1610]],[[64563,64563],\"mapped\",[1602,1581]],[[64564,64564],\"mapped\",[1602,1605]],[[64565,64565],\"mapped\",[1602,1609]],[[64566,64566],\"mapped\",[1602,1610]],[[64567,64567],\"mapped\",[1603,1575]],[[64568,64568],\"mapped\",[1603,1580]],[[64569,64569],\"mapped\",[1603,1581]],[[64570,64570],\"mapped\",[1603,1582]],[[64571,64571],\"mapped\",[1603,1604]],[[64572,64572],\"mapped\",[1603,1605]],[[64573,64573],\"mapped\",[1603,1609]],[[64574,64574],\"mapped\",[1603,1610]],[[64575,64575],\"mapped\",[1604,1580]],[[64576,64576],\"mapped\",[1604,1581]],[[64577,64577],\"mapped\",[1604,1582]],[[64578,64578],\"mapped\",[1604,1605]],[[64579,64579],\"mapped\",[1604,1609]],[[64580,64580],\"mapped\",[1604,1610]],[[64581,64581],\"mapped\",[1605,1580]],[[64582,64582],\"mapped\",[1605,1581]],[[64583,64583],\"mapped\",[1605,1582]],[[64584,64584],\"mapped\",[1605,1605]],[[64585,64585],\"mapped\",[1605,1609]],[[64586,64586],\"mapped\",[1605,1610]],[[64587,64587],\"mapped\",[1606,1580]],[[64588,64588],\"mapped\",[1606,1581]],[[64589,64589],\"mapped\",[1606,1582]],[[64590,64590],\"mapped\",[1606,1605]],[[64591,64591],\"mapped\",[1606,1609]],[[64592,64592],\"mapped\",[1606,1610]],[[64593,64593],\"mapped\",[1607,1580]],[[64594,64594],\"mapped\",[1607,1605]],[[64595,64595],\"mapped\",[1607,1609]],[[64596,64596],\"mapped\",[1607,1610]],[[64597,64597],\"mapped\",[1610,1580]],[[64598,64598],\"mapped\",[1610,1581]],[[64599,64599],\"mapped\",[1610,1582]],[[64600,64600],\"mapped\",[1610,1605]],[[64601,64601],\"mapped\",[1610,1609]],[[64602,64602],\"mapped\",[1610,1610]],[[64603,64603],\"mapped\",[1584,1648]],[[64604,64604],\"mapped\",[1585,1648]],[[64605,64605],\"mapped\",[1609,1648]],[[64606,64606],\"disallowed_STD3_mapped\",[32,1612,1617]],[[64607,64607],\"disallowed_STD3_mapped\",[32,1613,1617]],[[64608,64608],\"disallowed_STD3_mapped\",[32,1614,1617]],[[64609,64609],\"disallowed_STD3_mapped\",[32,1615,1617]],[[64610,64610],\"disallowed_STD3_mapped\",[32,1616,1617]],[[64611,64611],\"disallowed_STD3_mapped\",[32,1617,1648]],[[64612,64612],\"mapped\",[1574,1585]],[[64613,64613],\"mapped\",[1574,1586]],[[64614,64614],\"mapped\",[1574,1605]],[[64615,64615],\"mapped\",[1574,1606]],[[64616,64616],\"mapped\",[1574,1609]],[[64617,64617],\"mapped\",[1574,1610]],[[64618,64618],\"mapped\",[1576,1585]],[[64619,64619],\"mapped\",[1576,1586]],[[64620,64620],\"mapped\",[1576,1605]],[[64621,64621],\"mapped\",[1576,1606]],[[64622,64622],\"mapped\",[1576,1609]],[[64623,64623],\"mapped\",[1576,1610]],[[64624,64624],\"mapped\",[1578,1585]],[[64625,64625],\"mapped\",[1578,1586]],[[64626,64626],\"mapped\",[1578,1605]],[[64627,64627],\"mapped\",[1578,1606]],[[64628,64628],\"mapped\",[1578,1609]],[[64629,64629],\"mapped\",[1578,1610]],[[64630,64630],\"mapped\",[1579,1585]],[[64631,64631],\"mapped\",[1579,1586]],[[64632,64632],\"mapped\",[1579,1605]],[[64633,64633],\"mapped\",[1579,1606]],[[64634,64634],\"mapped\",[1579,1609]],[[64635,64635],\"mapped\",[1579,1610]],[[64636,64636],\"mapped\",[1601,1609]],[[64637,64637],\"mapped\",[1601,1610]],[[64638,64638],\"mapped\",[1602,1609]],[[64639,64639],\"mapped\",[1602,1610]],[[64640,64640],\"mapped\",[1603,1575]],[[64641,64641],\"mapped\",[1603,1604]],[[64642,64642],\"mapped\",[1603,1605]],[[64643,64643],\"mapped\",[1603,1609]],[[64644,64644],\"mapped\",[1603,1610]],[[64645,64645],\"mapped\",[1604,1605]],[[64646,64646],\"mapped\",[1604,1609]],[[64647,64647],\"mapped\",[1604,1610]],[[64648,64648],\"mapped\",[1605,1575]],[[64649,64649],\"mapped\",[1605,1605]],[[64650,64650],\"mapped\",[1606,1585]],[[64651,64651],\"mapped\",[1606,1586]],[[64652,64652],\"mapped\",[1606,1605]],[[64653,64653],\"mapped\",[1606,1606]],[[64654,64654],\"mapped\",[1606,1609]],[[64655,64655],\"mapped\",[1606,1610]],[[64656,64656],\"mapped\",[1609,1648]],[[64657,64657],\"mapped\",[1610,1585]],[[64658,64658],\"mapped\",[1610,1586]],[[64659,64659],\"mapped\",[1610,1605]],[[64660,64660],\"mapped\",[1610,1606]],[[64661,64661],\"mapped\",[1610,1609]],[[64662,64662],\"mapped\",[1610,1610]],[[64663,64663],\"mapped\",[1574,1580]],[[64664,64664],\"mapped\",[1574,1581]],[[64665,64665],\"mapped\",[1574,1582]],[[64666,64666],\"mapped\",[1574,1605]],[[64667,64667],\"mapped\",[1574,1607]],[[64668,64668],\"mapped\",[1576,1580]],[[64669,64669],\"mapped\",[1576,1581]],[[64670,64670],\"mapped\",[1576,1582]],[[64671,64671],\"mapped\",[1576,1605]],[[64672,64672],\"mapped\",[1576,1607]],[[64673,64673],\"mapped\",[1578,1580]],[[64674,64674],\"mapped\",[1578,1581]],[[64675,64675],\"mapped\",[1578,1582]],[[64676,64676],\"mapped\",[1578,1605]],[[64677,64677],\"mapped\",[1578,1607]],[[64678,64678],\"mapped\",[1579,1605]],[[64679,64679],\"mapped\",[1580,1581]],[[64680,64680],\"mapped\",[1580,1605]],[[64681,64681],\"mapped\",[1581,1580]],[[64682,64682],\"mapped\",[1581,1605]],[[64683,64683],\"mapped\",[1582,1580]],[[64684,64684],\"mapped\",[1582,1605]],[[64685,64685],\"mapped\",[1587,1580]],[[64686,64686],\"mapped\",[1587,1581]],[[64687,64687],\"mapped\",[1587,1582]],[[64688,64688],\"mapped\",[1587,1605]],[[64689,64689],\"mapped\",[1589,1581]],[[64690,64690],\"mapped\",[1589,1582]],[[64691,64691],\"mapped\",[1589,1605]],[[64692,64692],\"mapped\",[1590,1580]],[[64693,64693],\"mapped\",[1590,1581]],[[64694,64694],\"mapped\",[1590,1582]],[[64695,64695],\"mapped\",[1590,1605]],[[64696,64696],\"mapped\",[1591,1581]],[[64697,64697],\"mapped\",[1592,1605]],[[64698,64698],\"mapped\",[1593,1580]],[[64699,64699],\"mapped\",[1593,1605]],[[64700,64700],\"mapped\",[1594,1580]],[[64701,64701],\"mapped\",[1594,1605]],[[64702,64702],\"mapped\",[1601,1580]],[[64703,64703],\"mapped\",[1601,1581]],[[64704,64704],\"mapped\",[1601,1582]],[[64705,64705],\"mapped\",[1601,1605]],[[64706,64706],\"mapped\",[1602,1581]],[[64707,64707],\"mapped\",[1602,1605]],[[64708,64708],\"mapped\",[1603,1580]],[[64709,64709],\"mapped\",[1603,1581]],[[64710,64710],\"mapped\",[1603,1582]],[[64711,64711],\"mapped\",[1603,1604]],[[64712,64712],\"mapped\",[1603,1605]],[[64713,64713],\"mapped\",[1604,1580]],[[64714,64714],\"mapped\",[1604,1581]],[[64715,64715],\"mapped\",[1604,1582]],[[64716,64716],\"mapped\",[1604,1605]],[[64717,64717],\"mapped\",[1604,1607]],[[64718,64718],\"mapped\",[1605,1580]],[[64719,64719],\"mapped\",[1605,1581]],[[64720,64720],\"mapped\",[1605,1582]],[[64721,64721],\"mapped\",[1605,1605]],[[64722,64722],\"mapped\",[1606,1580]],[[64723,64723],\"mapped\",[1606,1581]],[[64724,64724],\"mapped\",[1606,1582]],[[64725,64725],\"mapped\",[1606,1605]],[[64726,64726],\"mapped\",[1606,1607]],[[64727,64727],\"mapped\",[1607,1580]],[[64728,64728],\"mapped\",[1607,1605]],[[64729,64729],\"mapped\",[1607,1648]],[[64730,64730],\"mapped\",[1610,1580]],[[64731,64731],\"mapped\",[1610,1581]],[[64732,64732],\"mapped\",[1610,1582]],[[64733,64733],\"mapped\",[1610,1605]],[[64734,64734],\"mapped\",[1610,1607]],[[64735,64735],\"mapped\",[1574,1605]],[[64736,64736],\"mapped\",[1574,1607]],[[64737,64737],\"mapped\",[1576,1605]],[[64738,64738],\"mapped\",[1576,1607]],[[64739,64739],\"mapped\",[1578,1605]],[[64740,64740],\"mapped\",[1578,1607]],[[64741,64741],\"mapped\",[1579,1605]],[[64742,64742],\"mapped\",[1579,1607]],[[64743,64743],\"mapped\",[1587,1605]],[[64744,64744],\"mapped\",[1587,1607]],[[64745,64745],\"mapped\",[1588,1605]],[[64746,64746],\"mapped\",[1588,1607]],[[64747,64747],\"mapped\",[1603,1604]],[[64748,64748],\"mapped\",[1603,1605]],[[64749,64749],\"mapped\",[1604,1605]],[[64750,64750],\"mapped\",[1606,1605]],[[64751,64751],\"mapped\",[1606,1607]],[[64752,64752],\"mapped\",[1610,1605]],[[64753,64753],\"mapped\",[1610,1607]],[[64754,64754],\"mapped\",[1600,1614,1617]],[[64755,64755],\"mapped\",[1600,1615,1617]],[[64756,64756],\"mapped\",[1600,1616,1617]],[[64757,64757],\"mapped\",[1591,1609]],[[64758,64758],\"mapped\",[1591,1610]],[[64759,64759],\"mapped\",[1593,1609]],[[64760,64760],\"mapped\",[1593,1610]],[[64761,64761],\"mapped\",[1594,1609]],[[64762,64762],\"mapped\",[1594,1610]],[[64763,64763],\"mapped\",[1587,1609]],[[64764,64764],\"mapped\",[1587,1610]],[[64765,64765],\"mapped\",[1588,1609]],[[64766,64766],\"mapped\",[1588,1610]],[[64767,64767],\"mapped\",[1581,1609]],[[64768,64768],\"mapped\",[1581,1610]],[[64769,64769],\"mapped\",[1580,1609]],[[64770,64770],\"mapped\",[1580,1610]],[[64771,64771],\"mapped\",[1582,1609]],[[64772,64772],\"mapped\",[1582,1610]],[[64773,64773],\"mapped\",[1589,1609]],[[64774,64774],\"mapped\",[1589,1610]],[[64775,64775],\"mapped\",[1590,1609]],[[64776,64776],\"mapped\",[1590,1610]],[[64777,64777],\"mapped\",[1588,1580]],[[64778,64778],\"mapped\",[1588,1581]],[[64779,64779],\"mapped\",[1588,1582]],[[64780,64780],\"mapped\",[1588,1605]],[[64781,64781],\"mapped\",[1588,1585]],[[64782,64782],\"mapped\",[1587,1585]],[[64783,64783],\"mapped\",[1589,1585]],[[64784,64784],\"mapped\",[1590,1585]],[[64785,64785],\"mapped\",[1591,1609]],[[64786,64786],\"mapped\",[1591,1610]],[[64787,64787],\"mapped\",[1593,1609]],[[64788,64788],\"mapped\",[1593,1610]],[[64789,64789],\"mapped\",[1594,1609]],[[64790,64790],\"mapped\",[1594,1610]],[[64791,64791],\"mapped\",[1587,1609]],[[64792,64792],\"mapped\",[1587,1610]],[[64793,64793],\"mapped\",[1588,1609]],[[64794,64794],\"mapped\",[1588,1610]],[[64795,64795],\"mapped\",[1581,1609]],[[64796,64796],\"mapped\",[1581,1610]],[[64797,64797],\"mapped\",[1580,1609]],[[64798,64798],\"mapped\",[1580,1610]],[[64799,64799],\"mapped\",[1582,1609]],[[64800,64800],\"mapped\",[1582,1610]],[[64801,64801],\"mapped\",[1589,1609]],[[64802,64802],\"mapped\",[1589,1610]],[[64803,64803],\"mapped\",[1590,1609]],[[64804,64804],\"mapped\",[1590,1610]],[[64805,64805],\"mapped\",[1588,1580]],[[64806,64806],\"mapped\",[1588,1581]],[[64807,64807],\"mapped\",[1588,1582]],[[64808,64808],\"mapped\",[1588,1605]],[[64809,64809],\"mapped\",[1588,1585]],[[64810,64810],\"mapped\",[1587,1585]],[[64811,64811],\"mapped\",[1589,1585]],[[64812,64812],\"mapped\",[1590,1585]],[[64813,64813],\"mapped\",[1588,1580]],[[64814,64814],\"mapped\",[1588,1581]],[[64815,64815],\"mapped\",[1588,1582]],[[64816,64816],\"mapped\",[1588,1605]],[[64817,64817],\"mapped\",[1587,1607]],[[64818,64818],\"mapped\",[1588,1607]],[[64819,64819],\"mapped\",[1591,1605]],[[64820,64820],\"mapped\",[1587,1580]],[[64821,64821],\"mapped\",[1587,1581]],[[64822,64822],\"mapped\",[1587,1582]],[[64823,64823],\"mapped\",[1588,1580]],[[64824,64824],\"mapped\",[1588,1581]],[[64825,64825],\"mapped\",[1588,1582]],[[64826,64826],\"mapped\",[1591,1605]],[[64827,64827],\"mapped\",[1592,1605]],[[64828,64829],\"mapped\",[1575,1611]],[[64830,64831],\"valid\",[],\"NV8\"],[[64832,64847],\"disallowed\"],[[64848,64848],\"mapped\",[1578,1580,1605]],[[64849,64850],\"mapped\",[1578,1581,1580]],[[64851,64851],\"mapped\",[1578,1581,1605]],[[64852,64852],\"mapped\",[1578,1582,1605]],[[64853,64853],\"mapped\",[1578,1605,1580]],[[64854,64854],\"mapped\",[1578,1605,1581]],[[64855,64855],\"mapped\",[1578,1605,1582]],[[64856,64857],\"mapped\",[1580,1605,1581]],[[64858,64858],\"mapped\",[1581,1605,1610]],[[64859,64859],\"mapped\",[1581,1605,1609]],[[64860,64860],\"mapped\",[1587,1581,1580]],[[64861,64861],\"mapped\",[1587,1580,1581]],[[64862,64862],\"mapped\",[1587,1580,1609]],[[64863,64864],\"mapped\",[1587,1605,1581]],[[64865,64865],\"mapped\",[1587,1605,1580]],[[64866,64867],\"mapped\",[1587,1605,1605]],[[64868,64869],\"mapped\",[1589,1581,1581]],[[64870,64870],\"mapped\",[1589,1605,1605]],[[64871,64872],\"mapped\",[1588,1581,1605]],[[64873,64873],\"mapped\",[1588,1580,1610]],[[64874,64875],\"mapped\",[1588,1605,1582]],[[64876,64877],\"mapped\",[1588,1605,1605]],[[64878,64878],\"mapped\",[1590,1581,1609]],[[64879,64880],\"mapped\",[1590,1582,1605]],[[64881,64882],\"mapped\",[1591,1605,1581]],[[64883,64883],\"mapped\",[1591,1605,1605]],[[64884,64884],\"mapped\",[1591,1605,1610]],[[64885,64885],\"mapped\",[1593,1580,1605]],[[64886,64887],\"mapped\",[1593,1605,1605]],[[64888,64888],\"mapped\",[1593,1605,1609]],[[64889,64889],\"mapped\",[1594,1605,1605]],[[64890,64890],\"mapped\",[1594,1605,1610]],[[64891,64891],\"mapped\",[1594,1605,1609]],[[64892,64893],\"mapped\",[1601,1582,1605]],[[64894,64894],\"mapped\",[1602,1605,1581]],[[64895,64895],\"mapped\",[1602,1605,1605]],[[64896,64896],\"mapped\",[1604,1581,1605]],[[64897,64897],\"mapped\",[1604,1581,1610]],[[64898,64898],\"mapped\",[1604,1581,1609]],[[64899,64900],\"mapped\",[1604,1580,1580]],[[64901,64902],\"mapped\",[1604,1582,1605]],[[64903,64904],\"mapped\",[1604,1605,1581]],[[64905,64905],\"mapped\",[1605,1581,1580]],[[64906,64906],\"mapped\",[1605,1581,1605]],[[64907,64907],\"mapped\",[1605,1581,1610]],[[64908,64908],\"mapped\",[1605,1580,1581]],[[64909,64909],\"mapped\",[1605,1580,1605]],[[64910,64910],\"mapped\",[1605,1582,1580]],[[64911,64911],\"mapped\",[1605,1582,1605]],[[64912,64913],\"disallowed\"],[[64914,64914],\"mapped\",[1605,1580,1582]],[[64915,64915],\"mapped\",[1607,1605,1580]],[[64916,64916],\"mapped\",[1607,1605,1605]],[[64917,64917],\"mapped\",[1606,1581,1605]],[[64918,64918],\"mapped\",[1606,1581,1609]],[[64919,64920],\"mapped\",[1606,1580,1605]],[[64921,64921],\"mapped\",[1606,1580,1609]],[[64922,64922],\"mapped\",[1606,1605,1610]],[[64923,64923],\"mapped\",[1606,1605,1609]],[[64924,64925],\"mapped\",[1610,1605,1605]],[[64926,64926],\"mapped\",[1576,1582,1610]],[[64927,64927],\"mapped\",[1578,1580,1610]],[[64928,64928],\"mapped\",[1578,1580,1609]],[[64929,64929],\"mapped\",[1578,1582,1610]],[[64930,64930],\"mapped\",[1578,1582,1609]],[[64931,64931],\"mapped\",[1578,1605,1610]],[[64932,64932],\"mapped\",[1578,1605,1609]],[[64933,64933],\"mapped\",[1580,1605,1610]],[[64934,64934],\"mapped\",[1580,1581,1609]],[[64935,64935],\"mapped\",[1580,1605,1609]],[[64936,64936],\"mapped\",[1587,1582,1609]],[[64937,64937],\"mapped\",[1589,1581,1610]],[[64938,64938],\"mapped\",[1588,1581,1610]],[[64939,64939],\"mapped\",[1590,1581,1610]],[[64940,64940],\"mapped\",[1604,1580,1610]],[[64941,64941],\"mapped\",[1604,1605,1610]],[[64942,64942],\"mapped\",[1610,1581,1610]],[[64943,64943],\"mapped\",[1610,1580,1610]],[[64944,64944],\"mapped\",[1610,1605,1610]],[[64945,64945],\"mapped\",[1605,1605,1610]],[[64946,64946],\"mapped\",[1602,1605,1610]],[[64947,64947],\"mapped\",[1606,1581,1610]],[[64948,64948],\"mapped\",[1602,1605,1581]],[[64949,64949],\"mapped\",[1604,1581,1605]],[[64950,64950],\"mapped\",[1593,1605,1610]],[[64951,64951],\"mapped\",[1603,1605,1610]],[[64952,64952],\"mapped\",[1606,1580,1581]],[[64953,64953],\"mapped\",[1605,1582,1610]],[[64954,64954],\"mapped\",[1604,1580,1605]],[[64955,64955],\"mapped\",[1603,1605,1605]],[[64956,64956],\"mapped\",[1604,1580,1605]],[[64957,64957],\"mapped\",[1606,1580,1581]],[[64958,64958],\"mapped\",[1580,1581,1610]],[[64959,64959],\"mapped\",[1581,1580,1610]],[[64960,64960],\"mapped\",[1605,1580,1610]],[[64961,64961],\"mapped\",[1601,1605,1610]],[[64962,64962],\"mapped\",[1576,1581,1610]],[[64963,64963],\"mapped\",[1603,1605,1605]],[[64964,64964],\"mapped\",[1593,1580,1605]],[[64965,64965],\"mapped\",[1589,1605,1605]],[[64966,64966],\"mapped\",[1587,1582,1610]],[[64967,64967],\"mapped\",[1606,1580,1610]],[[64968,64975],\"disallowed\"],[[64976,65007],\"disallowed\"],[[65008,65008],\"mapped\",[1589,1604,1746]],[[65009,65009],\"mapped\",[1602,1604,1746]],[[65010,65010],\"mapped\",[1575,1604,1604,1607]],[[65011,65011],\"mapped\",[1575,1603,1576,1585]],[[65012,65012],\"mapped\",[1605,1581,1605,1583]],[[65013,65013],\"mapped\",[1589,1604,1593,1605]],[[65014,65014],\"mapped\",[1585,1587,1608,1604]],[[65015,65015],\"mapped\",[1593,1604,1610,1607]],[[65016,65016],\"mapped\",[1608,1587,1604,1605]],[[65017,65017],\"mapped\",[1589,1604,1609]],[[65018,65018],\"disallowed_STD3_mapped\",[1589,1604,1609,32,1575,1604,1604,1607,32,1593,1604,1610,1607,32,1608,1587,1604,1605]],[[65019,65019],\"disallowed_STD3_mapped\",[1580,1604,32,1580,1604,1575,1604,1607]],[[65020,65020],\"mapped\",[1585,1740,1575,1604]],[[65021,65021],\"valid\",[],\"NV8\"],[[65022,65023],\"disallowed\"],[[65024,65039],\"ignored\"],[[65040,65040],\"disallowed_STD3_mapped\",[44]],[[65041,65041],\"mapped\",[12289]],[[65042,65042],\"disallowed\"],[[65043,65043],\"disallowed_STD3_mapped\",[58]],[[65044,65044],\"disallowed_STD3_mapped\",[59]],[[65045,65045],\"disallowed_STD3_mapped\",[33]],[[65046,65046],\"disallowed_STD3_mapped\",[63]],[[65047,65047],\"mapped\",[12310]],[[65048,65048],\"mapped\",[12311]],[[65049,65049],\"disallowed\"],[[65050,65055],\"disallowed\"],[[65056,65059],\"valid\"],[[65060,65062],\"valid\"],[[65063,65069],\"valid\"],[[65070,65071],\"valid\"],[[65072,65072],\"disallowed\"],[[65073,65073],\"mapped\",[8212]],[[65074,65074],\"mapped\",[8211]],[[65075,65076],\"disallowed_STD3_mapped\",[95]],[[65077,65077],\"disallowed_STD3_mapped\",[40]],[[65078,65078],\"disallowed_STD3_mapped\",[41]],[[65079,65079],\"disallowed_STD3_mapped\",[123]],[[65080,65080],\"disallowed_STD3_mapped\",[125]],[[65081,65081],\"mapped\",[12308]],[[65082,65082],\"mapped\",[12309]],[[65083,65083],\"mapped\",[12304]],[[65084,65084],\"mapped\",[12305]],[[65085,65085],\"mapped\",[12298]],[[65086,65086],\"mapped\",[12299]],[[65087,65087],\"mapped\",[12296]],[[65088,65088],\"mapped\",[12297]],[[65089,65089],\"mapped\",[12300]],[[65090,65090],\"mapped\",[12301]],[[65091,65091],\"mapped\",[12302]],[[65092,65092],\"mapped\",[12303]],[[65093,65094],\"valid\",[],\"NV8\"],[[65095,65095],\"disallowed_STD3_mapped\",[91]],[[65096,65096],\"disallowed_STD3_mapped\",[93]],[[65097,65100],\"disallowed_STD3_mapped\",[32,773]],[[65101,65103],\"disallowed_STD3_mapped\",[95]],[[65104,65104],\"disallowed_STD3_mapped\",[44]],[[65105,65105],\"mapped\",[12289]],[[65106,65106],\"disallowed\"],[[65107,65107],\"disallowed\"],[[65108,65108],\"disallowed_STD3_mapped\",[59]],[[65109,65109],\"disallowed_STD3_mapped\",[58]],[[65110,65110],\"disallowed_STD3_mapped\",[63]],[[65111,65111],\"disallowed_STD3_mapped\",[33]],[[65112,65112],\"mapped\",[8212]],[[65113,65113],\"disallowed_STD3_mapped\",[40]],[[65114,65114],\"disallowed_STD3_mapped\",[41]],[[65115,65115],\"disallowed_STD3_mapped\",[123]],[[65116,65116],\"disallowed_STD3_mapped\",[125]],[[65117,65117],\"mapped\",[12308]],[[65118,65118],\"mapped\",[12309]],[[65119,65119],\"disallowed_STD3_mapped\",[35]],[[65120,65120],\"disallowed_STD3_mapped\",[38]],[[65121,65121],\"disallowed_STD3_mapped\",[42]],[[65122,65122],\"disallowed_STD3_mapped\",[43]],[[65123,65123],\"mapped\",[45]],[[65124,65124],\"disallowed_STD3_mapped\",[60]],[[65125,65125],\"disallowed_STD3_mapped\",[62]],[[65126,65126],\"disallowed_STD3_mapped\",[61]],[[65127,65127],\"disallowed\"],[[65128,65128],\"disallowed_STD3_mapped\",[92]],[[65129,65129],\"disallowed_STD3_mapped\",[36]],[[65130,65130],\"disallowed_STD3_mapped\",[37]],[[65131,65131],\"disallowed_STD3_mapped\",[64]],[[65132,65135],\"disallowed\"],[[65136,65136],\"disallowed_STD3_mapped\",[32,1611]],[[65137,65137],\"mapped\",[1600,1611]],[[65138,65138],\"disallowed_STD3_mapped\",[32,1612]],[[65139,65139],\"valid\"],[[65140,65140],\"disallowed_STD3_mapped\",[32,1613]],[[65141,65141],\"disallowed\"],[[65142,65142],\"disallowed_STD3_mapped\",[32,1614]],[[65143,65143],\"mapped\",[1600,1614]],[[65144,65144],\"disallowed_STD3_mapped\",[32,1615]],[[65145,65145],\"mapped\",[1600,1615]],[[65146,65146],\"disallowed_STD3_mapped\",[32,1616]],[[65147,65147],\"mapped\",[1600,1616]],[[65148,65148],\"disallowed_STD3_mapped\",[32,1617]],[[65149,65149],\"mapped\",[1600,1617]],[[65150,65150],\"disallowed_STD3_mapped\",[32,1618]],[[65151,65151],\"mapped\",[1600,1618]],[[65152,65152],\"mapped\",[1569]],[[65153,65154],\"mapped\",[1570]],[[65155,65156],\"mapped\",[1571]],[[65157,65158],\"mapped\",[1572]],[[65159,65160],\"mapped\",[1573]],[[65161,65164],\"mapped\",[1574]],[[65165,65166],\"mapped\",[1575]],[[65167,65170],\"mapped\",[1576]],[[65171,65172],\"mapped\",[1577]],[[65173,65176],\"mapped\",[1578]],[[65177,65180],\"mapped\",[1579]],[[65181,65184],\"mapped\",[1580]],[[65185,65188],\"mapped\",[1581]],[[65189,65192],\"mapped\",[1582]],[[65193,65194],\"mapped\",[1583]],[[65195,65196],\"mapped\",[1584]],[[65197,65198],\"mapped\",[1585]],[[65199,65200],\"mapped\",[1586]],[[65201,65204],\"mapped\",[1587]],[[65205,65208],\"mapped\",[1588]],[[65209,65212],\"mapped\",[1589]],[[65213,65216],\"mapped\",[1590]],[[65217,65220],\"mapped\",[1591]],[[65221,65224],\"mapped\",[1592]],[[65225,65228],\"mapped\",[1593]],[[65229,65232],\"mapped\",[1594]],[[65233,65236],\"mapped\",[1601]],[[65237,65240],\"mapped\",[1602]],[[65241,65244],\"mapped\",[1603]],[[65245,65248],\"mapped\",[1604]],[[65249,65252],\"mapped\",[1605]],[[65253,65256],\"mapped\",[1606]],[[65257,65260],\"mapped\",[1607]],[[65261,65262],\"mapped\",[1608]],[[65263,65264],\"mapped\",[1609]],[[65265,65268],\"mapped\",[1610]],[[65269,65270],\"mapped\",[1604,1570]],[[65271,65272],\"mapped\",[1604,1571]],[[65273,65274],\"mapped\",[1604,1573]],[[65275,65276],\"mapped\",[1604,1575]],[[65277,65278],\"disallowed\"],[[65279,65279],\"ignored\"],[[65280,65280],\"disallowed\"],[[65281,65281],\"disallowed_STD3_mapped\",[33]],[[65282,65282],\"disallowed_STD3_mapped\",[34]],[[65283,65283],\"disallowed_STD3_mapped\",[35]],[[65284,65284],\"disallowed_STD3_mapped\",[36]],[[65285,65285],\"disallowed_STD3_mapped\",[37]],[[65286,65286],\"disallowed_STD3_mapped\",[38]],[[65287,65287],\"disallowed_STD3_mapped\",[39]],[[65288,65288],\"disallowed_STD3_mapped\",[40]],[[65289,65289],\"disallowed_STD3_mapped\",[41]],[[65290,65290],\"disallowed_STD3_mapped\",[42]],[[65291,65291],\"disallowed_STD3_mapped\",[43]],[[65292,65292],\"disallowed_STD3_mapped\",[44]],[[65293,65293],\"mapped\",[45]],[[65294,65294],\"mapped\",[46]],[[65295,65295],\"disallowed_STD3_mapped\",[47]],[[65296,65296],\"mapped\",[48]],[[65297,65297],\"mapped\",[49]],[[65298,65298],\"mapped\",[50]],[[65299,65299],\"mapped\",[51]],[[65300,65300],\"mapped\",[52]],[[65301,65301],\"mapped\",[53]],[[65302,65302],\"mapped\",[54]],[[65303,65303],\"mapped\",[55]],[[65304,65304],\"mapped\",[56]],[[65305,65305],\"mapped\",[57]],[[65306,65306],\"disallowed_STD3_mapped\",[58]],[[65307,65307],\"disallowed_STD3_mapped\",[59]],[[65308,65308],\"disallowed_STD3_mapped\",[60]],[[65309,65309],\"disallowed_STD3_mapped\",[61]],[[65310,65310],\"disallowed_STD3_mapped\",[62]],[[65311,65311],\"disallowed_STD3_mapped\",[63]],[[65312,65312],\"disallowed_STD3_mapped\",[64]],[[65313,65313],\"mapped\",[97]],[[65314,65314],\"mapped\",[98]],[[65315,65315],\"mapped\",[99]],[[65316,65316],\"mapped\",[100]],[[65317,65317],\"mapped\",[101]],[[65318,65318],\"mapped\",[102]],[[65319,65319],\"mapped\",[103]],[[65320,65320],\"mapped\",[104]],[[65321,65321],\"mapped\",[105]],[[65322,65322],\"mapped\",[106]],[[65323,65323],\"mapped\",[107]],[[65324,65324],\"mapped\",[108]],[[65325,65325],\"mapped\",[109]],[[65326,65326],\"mapped\",[110]],[[65327,65327],\"mapped\",[111]],[[65328,65328],\"mapped\",[112]],[[65329,65329],\"mapped\",[113]],[[65330,65330],\"mapped\",[114]],[[65331,65331],\"mapped\",[115]],[[65332,65332],\"mapped\",[116]],[[65333,65333],\"mapped\",[117]],[[65334,65334],\"mapped\",[118]],[[65335,65335],\"mapped\",[119]],[[65336,65336],\"mapped\",[120]],[[65337,65337],\"mapped\",[121]],[[65338,65338],\"mapped\",[122]],[[65339,65339],\"disallowed_STD3_mapped\",[91]],[[65340,65340],\"disallowed_STD3_mapped\",[92]],[[65341,65341],\"disallowed_STD3_mapped\",[93]],[[65342,65342],\"disallowed_STD3_mapped\",[94]],[[65343,65343],\"disallowed_STD3_mapped\",[95]],[[65344,65344],\"disallowed_STD3_mapped\",[96]],[[65345,65345],\"mapped\",[97]],[[65346,65346],\"mapped\",[98]],[[65347,65347],\"mapped\",[99]],[[65348,65348],\"mapped\",[100]],[[65349,65349],\"mapped\",[101]],[[65350,65350],\"mapped\",[102]],[[65351,65351],\"mapped\",[103]],[[65352,65352],\"mapped\",[104]],[[65353,65353],\"mapped\",[105]],[[65354,65354],\"mapped\",[106]],[[65355,65355],\"mapped\",[107]],[[65356,65356],\"mapped\",[108]],[[65357,65357],\"mapped\",[109]],[[65358,65358],\"mapped\",[110]],[[65359,65359],\"mapped\",[111]],[[65360,65360],\"mapped\",[112]],[[65361,65361],\"mapped\",[113]],[[65362,65362],\"mapped\",[114]],[[65363,65363],\"mapped\",[115]],[[65364,65364],\"mapped\",[116]],[[65365,65365],\"mapped\",[117]],[[65366,65366],\"mapped\",[118]],[[65367,65367],\"mapped\",[119]],[[65368,65368],\"mapped\",[120]],[[65369,65369],\"mapped\",[121]],[[65370,65370],\"mapped\",[122]],[[65371,65371],\"disallowed_STD3_mapped\",[123]],[[65372,65372],\"disallowed_STD3_mapped\",[124]],[[65373,65373],\"disallowed_STD3_mapped\",[125]],[[65374,65374],\"disallowed_STD3_mapped\",[126]],[[65375,65375],\"mapped\",[10629]],[[65376,65376],\"mapped\",[10630]],[[65377,65377],\"mapped\",[46]],[[65378,65378],\"mapped\",[12300]],[[65379,65379],\"mapped\",[12301]],[[65380,65380],\"mapped\",[12289]],[[65381,65381],\"mapped\",[12539]],[[65382,65382],\"mapped\",[12530]],[[65383,65383],\"mapped\",[12449]],[[65384,65384],\"mapped\",[12451]],[[65385,65385],\"mapped\",[12453]],[[65386,65386],\"mapped\",[12455]],[[65387,65387],\"mapped\",[12457]],[[65388,65388],\"mapped\",[12515]],[[65389,65389],\"mapped\",[12517]],[[65390,65390],\"mapped\",[12519]],[[65391,65391],\"mapped\",[12483]],[[65392,65392],\"mapped\",[12540]],[[65393,65393],\"mapped\",[12450]],[[65394,65394],\"mapped\",[12452]],[[65395,65395],\"mapped\",[12454]],[[65396,65396],\"mapped\",[12456]],[[65397,65397],\"mapped\",[12458]],[[65398,65398],\"mapped\",[12459]],[[65399,65399],\"mapped\",[12461]],[[65400,65400],\"mapped\",[12463]],[[65401,65401],\"mapped\",[12465]],[[65402,65402],\"mapped\",[12467]],[[65403,65403],\"mapped\",[12469]],[[65404,65404],\"mapped\",[12471]],[[65405,65405],\"mapped\",[12473]],[[65406,65406],\"mapped\",[12475]],[[65407,65407],\"mapped\",[12477]],[[65408,65408],\"mapped\",[12479]],[[65409,65409],\"mapped\",[12481]],[[65410,65410],\"mapped\",[12484]],[[65411,65411],\"mapped\",[12486]],[[65412,65412],\"mapped\",[12488]],[[65413,65413],\"mapped\",[12490]],[[65414,65414],\"mapped\",[12491]],[[65415,65415],\"mapped\",[12492]],[[65416,65416],\"mapped\",[12493]],[[65417,65417],\"mapped\",[12494]],[[65418,65418],\"mapped\",[12495]],[[65419,65419],\"mapped\",[12498]],[[65420,65420],\"mapped\",[12501]],[[65421,65421],\"mapped\",[12504]],[[65422,65422],\"mapped\",[12507]],[[65423,65423],\"mapped\",[12510]],[[65424,65424],\"mapped\",[12511]],[[65425,65425],\"mapped\",[12512]],[[65426,65426],\"mapped\",[12513]],[[65427,65427],\"mapped\",[12514]],[[65428,65428],\"mapped\",[12516]],[[65429,65429],\"mapped\",[12518]],[[65430,65430],\"mapped\",[12520]],[[65431,65431],\"mapped\",[12521]],[[65432,65432],\"mapped\",[12522]],[[65433,65433],\"mapped\",[12523]],[[65434,65434],\"mapped\",[12524]],[[65435,65435],\"mapped\",[12525]],[[65436,65436],\"mapped\",[12527]],[[65437,65437],\"mapped\",[12531]],[[65438,65438],\"mapped\",[12441]],[[65439,65439],\"mapped\",[12442]],[[65440,65440],\"disallowed\"],[[65441,65441],\"mapped\",[4352]],[[65442,65442],\"mapped\",[4353]],[[65443,65443],\"mapped\",[4522]],[[65444,65444],\"mapped\",[4354]],[[65445,65445],\"mapped\",[4524]],[[65446,65446],\"mapped\",[4525]],[[65447,65447],\"mapped\",[4355]],[[65448,65448],\"mapped\",[4356]],[[65449,65449],\"mapped\",[4357]],[[65450,65450],\"mapped\",[4528]],[[65451,65451],\"mapped\",[4529]],[[65452,65452],\"mapped\",[4530]],[[65453,65453],\"mapped\",[4531]],[[65454,65454],\"mapped\",[4532]],[[65455,65455],\"mapped\",[4533]],[[65456,65456],\"mapped\",[4378]],[[65457,65457],\"mapped\",[4358]],[[65458,65458],\"mapped\",[4359]],[[65459,65459],\"mapped\",[4360]],[[65460,65460],\"mapped\",[4385]],[[65461,65461],\"mapped\",[4361]],[[65462,65462],\"mapped\",[4362]],[[65463,65463],\"mapped\",[4363]],[[65464,65464],\"mapped\",[4364]],[[65465,65465],\"mapped\",[4365]],[[65466,65466],\"mapped\",[4366]],[[65467,65467],\"mapped\",[4367]],[[65468,65468],\"mapped\",[4368]],[[65469,65469],\"mapped\",[4369]],[[65470,65470],\"mapped\",[4370]],[[65471,65473],\"disallowed\"],[[65474,65474],\"mapped\",[4449]],[[65475,65475],\"mapped\",[4450]],[[65476,65476],\"mapped\",[4451]],[[65477,65477],\"mapped\",[4452]],[[65478,65478],\"mapped\",[4453]],[[65479,65479],\"mapped\",[4454]],[[65480,65481],\"disallowed\"],[[65482,65482],\"mapped\",[4455]],[[65483,65483],\"mapped\",[4456]],[[65484,65484],\"mapped\",[4457]],[[65485,65485],\"mapped\",[4458]],[[65486,65486],\"mapped\",[4459]],[[65487,65487],\"mapped\",[4460]],[[65488,65489],\"disallowed\"],[[65490,65490],\"mapped\",[4461]],[[65491,65491],\"mapped\",[4462]],[[65492,65492],\"mapped\",[4463]],[[65493,65493],\"mapped\",[4464]],[[65494,65494],\"mapped\",[4465]],[[65495,65495],\"mapped\",[4466]],[[65496,65497],\"disallowed\"],[[65498,65498],\"mapped\",[4467]],[[65499,65499],\"mapped\",[4468]],[[65500,65500],\"mapped\",[4469]],[[65501,65503],\"disallowed\"],[[65504,65504],\"mapped\",[162]],[[65505,65505],\"mapped\",[163]],[[65506,65506],\"mapped\",[172]],[[65507,65507],\"disallowed_STD3_mapped\",[32,772]],[[65508,65508],\"mapped\",[166]],[[65509,65509],\"mapped\",[165]],[[65510,65510],\"mapped\",[8361]],[[65511,65511],\"disallowed\"],[[65512,65512],\"mapped\",[9474]],[[65513,65513],\"mapped\",[8592]],[[65514,65514],\"mapped\",[8593]],[[65515,65515],\"mapped\",[8594]],[[65516,65516],\"mapped\",[8595]],[[65517,65517],\"mapped\",[9632]],[[65518,65518],\"mapped\",[9675]],[[65519,65528],\"disallowed\"],[[65529,65531],\"disallowed\"],[[65532,65532],\"disallowed\"],[[65533,65533],\"disallowed\"],[[65534,65535],\"disallowed\"],[[65536,65547],\"valid\"],[[65548,65548],\"disallowed\"],[[65549,65574],\"valid\"],[[65575,65575],\"disallowed\"],[[65576,65594],\"valid\"],[[65595,65595],\"disallowed\"],[[65596,65597],\"valid\"],[[65598,65598],\"disallowed\"],[[65599,65613],\"valid\"],[[65614,65615],\"disallowed\"],[[65616,65629],\"valid\"],[[65630,65663],\"disallowed\"],[[65664,65786],\"valid\"],[[65787,65791],\"disallowed\"],[[65792,65794],\"valid\",[],\"NV8\"],[[65795,65798],\"disallowed\"],[[65799,65843],\"valid\",[],\"NV8\"],[[65844,65846],\"disallowed\"],[[65847,65855],\"valid\",[],\"NV8\"],[[65856,65930],\"valid\",[],\"NV8\"],[[65931,65932],\"valid\",[],\"NV8\"],[[65933,65935],\"disallowed\"],[[65936,65947],\"valid\",[],\"NV8\"],[[65948,65951],\"disallowed\"],[[65952,65952],\"valid\",[],\"NV8\"],[[65953,65999],\"disallowed\"],[[66000,66044],\"valid\",[],\"NV8\"],[[66045,66045],\"valid\"],[[66046,66175],\"disallowed\"],[[66176,66204],\"valid\"],[[66205,66207],\"disallowed\"],[[66208,66256],\"valid\"],[[66257,66271],\"disallowed\"],[[66272,66272],\"valid\"],[[66273,66299],\"valid\",[],\"NV8\"],[[66300,66303],\"disallowed\"],[[66304,66334],\"valid\"],[[66335,66335],\"valid\"],[[66336,66339],\"valid\",[],\"NV8\"],[[66340,66351],\"disallowed\"],[[66352,66368],\"valid\"],[[66369,66369],\"valid\",[],\"NV8\"],[[66370,66377],\"valid\"],[[66378,66378],\"valid\",[],\"NV8\"],[[66379,66383],\"disallowed\"],[[66384,66426],\"valid\"],[[66427,66431],\"disallowed\"],[[66432,66461],\"valid\"],[[66462,66462],\"disallowed\"],[[66463,66463],\"valid\",[],\"NV8\"],[[66464,66499],\"valid\"],[[66500,66503],\"disallowed\"],[[66504,66511],\"valid\"],[[66512,66517],\"valid\",[],\"NV8\"],[[66518,66559],\"disallowed\"],[[66560,66560],\"mapped\",[66600]],[[66561,66561],\"mapped\",[66601]],[[66562,66562],\"mapped\",[66602]],[[66563,66563],\"mapped\",[66603]],[[66564,66564],\"mapped\",[66604]],[[66565,66565],\"mapped\",[66605]],[[66566,66566],\"mapped\",[66606]],[[66567,66567],\"mapped\",[66607]],[[66568,66568],\"mapped\",[66608]],[[66569,66569],\"mapped\",[66609]],[[66570,66570],\"mapped\",[66610]],[[66571,66571],\"mapped\",[66611]],[[66572,66572],\"mapped\",[66612]],[[66573,66573],\"mapped\",[66613]],[[66574,66574],\"mapped\",[66614]],[[66575,66575],\"mapped\",[66615]],[[66576,66576],\"mapped\",[66616]],[[66577,66577],\"mapped\",[66617]],[[66578,66578],\"mapped\",[66618]],[[66579,66579],\"mapped\",[66619]],[[66580,66580],\"mapped\",[66620]],[[66581,66581],\"mapped\",[66621]],[[66582,66582],\"mapped\",[66622]],[[66583,66583],\"mapped\",[66623]],[[66584,66584],\"mapped\",[66624]],[[66585,66585],\"mapped\",[66625]],[[66586,66586],\"mapped\",[66626]],[[66587,66587],\"mapped\",[66627]],[[66588,66588],\"mapped\",[66628]],[[66589,66589],\"mapped\",[66629]],[[66590,66590],\"mapped\",[66630]],[[66591,66591],\"mapped\",[66631]],[[66592,66592],\"mapped\",[66632]],[[66593,66593],\"mapped\",[66633]],[[66594,66594],\"mapped\",[66634]],[[66595,66595],\"mapped\",[66635]],[[66596,66596],\"mapped\",[66636]],[[66597,66597],\"mapped\",[66637]],[[66598,66598],\"mapped\",[66638]],[[66599,66599],\"mapped\",[66639]],[[66600,66637],\"valid\"],[[66638,66717],\"valid\"],[[66718,66719],\"disallowed\"],[[66720,66729],\"valid\"],[[66730,66815],\"disallowed\"],[[66816,66855],\"valid\"],[[66856,66863],\"disallowed\"],[[66864,66915],\"valid\"],[[66916,66926],\"disallowed\"],[[66927,66927],\"valid\",[],\"NV8\"],[[66928,67071],\"disallowed\"],[[67072,67382],\"valid\"],[[67383,67391],\"disallowed\"],[[67392,67413],\"valid\"],[[67414,67423],\"disallowed\"],[[67424,67431],\"valid\"],[[67432,67583],\"disallowed\"],[[67584,67589],\"valid\"],[[67590,67591],\"disallowed\"],[[67592,67592],\"valid\"],[[67593,67593],\"disallowed\"],[[67594,67637],\"valid\"],[[67638,67638],\"disallowed\"],[[67639,67640],\"valid\"],[[67641,67643],\"disallowed\"],[[67644,67644],\"valid\"],[[67645,67646],\"disallowed\"],[[67647,67647],\"valid\"],[[67648,67669],\"valid\"],[[67670,67670],\"disallowed\"],[[67671,67679],\"valid\",[],\"NV8\"],[[67680,67702],\"valid\"],[[67703,67711],\"valid\",[],\"NV8\"],[[67712,67742],\"valid\"],[[67743,67750],\"disallowed\"],[[67751,67759],\"valid\",[],\"NV8\"],[[67760,67807],\"disallowed\"],[[67808,67826],\"valid\"],[[67827,67827],\"disallowed\"],[[67828,67829],\"valid\"],[[67830,67834],\"disallowed\"],[[67835,67839],\"valid\",[],\"NV8\"],[[67840,67861],\"valid\"],[[67862,67865],\"valid\",[],\"NV8\"],[[67866,67867],\"valid\",[],\"NV8\"],[[67868,67870],\"disallowed\"],[[67871,67871],\"valid\",[],\"NV8\"],[[67872,67897],\"valid\"],[[67898,67902],\"disallowed\"],[[67903,67903],\"valid\",[],\"NV8\"],[[67904,67967],\"disallowed\"],[[67968,68023],\"valid\"],[[68024,68027],\"disallowed\"],[[68028,68029],\"valid\",[],\"NV8\"],[[68030,68031],\"valid\"],[[68032,68047],\"valid\",[],\"NV8\"],[[68048,68049],\"disallowed\"],[[68050,68095],\"valid\",[],\"NV8\"],[[68096,68099],\"valid\"],[[68100,68100],\"disallowed\"],[[68101,68102],\"valid\"],[[68103,68107],\"disallowed\"],[[68108,68115],\"valid\"],[[68116,68116],\"disallowed\"],[[68117,68119],\"valid\"],[[68120,68120],\"disallowed\"],[[68121,68147],\"valid\"],[[68148,68151],\"disallowed\"],[[68152,68154],\"valid\"],[[68155,68158],\"disallowed\"],[[68159,68159],\"valid\"],[[68160,68167],\"valid\",[],\"NV8\"],[[68168,68175],\"disallowed\"],[[68176,68184],\"valid\",[],\"NV8\"],[[68185,68191],\"disallowed\"],[[68192,68220],\"valid\"],[[68221,68223],\"valid\",[],\"NV8\"],[[68224,68252],\"valid\"],[[68253,68255],\"valid\",[],\"NV8\"],[[68256,68287],\"disallowed\"],[[68288,68295],\"valid\"],[[68296,68296],\"valid\",[],\"NV8\"],[[68297,68326],\"valid\"],[[68327,68330],\"disallowed\"],[[68331,68342],\"valid\",[],\"NV8\"],[[68343,68351],\"disallowed\"],[[68352,68405],\"valid\"],[[68406,68408],\"disallowed\"],[[68409,68415],\"valid\",[],\"NV8\"],[[68416,68437],\"valid\"],[[68438,68439],\"disallowed\"],[[68440,68447],\"valid\",[],\"NV8\"],[[68448,68466],\"valid\"],[[68467,68471],\"disallowed\"],[[68472,68479],\"valid\",[],\"NV8\"],[[68480,68497],\"valid\"],[[68498,68504],\"disallowed\"],[[68505,68508],\"valid\",[],\"NV8\"],[[68509,68520],\"disallowed\"],[[68521,68527],\"valid\",[],\"NV8\"],[[68528,68607],\"disallowed\"],[[68608,68680],\"valid\"],[[68681,68735],\"disallowed\"],[[68736,68736],\"mapped\",[68800]],[[68737,68737],\"mapped\",[68801]],[[68738,68738],\"mapped\",[68802]],[[68739,68739],\"mapped\",[68803]],[[68740,68740],\"mapped\",[68804]],[[68741,68741],\"mapped\",[68805]],[[68742,68742],\"mapped\",[68806]],[[68743,68743],\"mapped\",[68807]],[[68744,68744],\"mapped\",[68808]],[[68745,68745],\"mapped\",[68809]],[[68746,68746],\"mapped\",[68810]],[[68747,68747],\"mapped\",[68811]],[[68748,68748],\"mapped\",[68812]],[[68749,68749],\"mapped\",[68813]],[[68750,68750],\"mapped\",[68814]],[[68751,68751],\"mapped\",[68815]],[[68752,68752],\"mapped\",[68816]],[[68753,68753],\"mapped\",[68817]],[[68754,68754],\"mapped\",[68818]],[[68755,68755],\"mapped\",[68819]],[[68756,68756],\"mapped\",[68820]],[[68757,68757],\"mapped\",[68821]],[[68758,68758],\"mapped\",[68822]],[[68759,68759],\"mapped\",[68823]],[[68760,68760],\"mapped\",[68824]],[[68761,68761],\"mapped\",[68825]],[[68762,68762],\"mapped\",[68826]],[[68763,68763],\"mapped\",[68827]],[[68764,68764],\"mapped\",[68828]],[[68765,68765],\"mapped\",[68829]],[[68766,68766],\"mapped\",[68830]],[[68767,68767],\"mapped\",[68831]],[[68768,68768],\"mapped\",[68832]],[[68769,68769],\"mapped\",[68833]],[[68770,68770],\"mapped\",[68834]],[[68771,68771],\"mapped\",[68835]],[[68772,68772],\"mapped\",[68836]],[[68773,68773],\"mapped\",[68837]],[[68774,68774],\"mapped\",[68838]],[[68775,68775],\"mapped\",[68839]],[[68776,68776],\"mapped\",[68840]],[[68777,68777],\"mapped\",[68841]],[[68778,68778],\"mapped\",[68842]],[[68779,68779],\"mapped\",[68843]],[[68780,68780],\"mapped\",[68844]],[[68781,68781],\"mapped\",[68845]],[[68782,68782],\"mapped\",[68846]],[[68783,68783],\"mapped\",[68847]],[[68784,68784],\"mapped\",[68848]],[[68785,68785],\"mapped\",[68849]],[[68786,68786],\"mapped\",[68850]],[[68787,68799],\"disallowed\"],[[68800,68850],\"valid\"],[[68851,68857],\"disallowed\"],[[68858,68863],\"valid\",[],\"NV8\"],[[68864,69215],\"disallowed\"],[[69216,69246],\"valid\",[],\"NV8\"],[[69247,69631],\"disallowed\"],[[69632,69702],\"valid\"],[[69703,69709],\"valid\",[],\"NV8\"],[[69710,69713],\"disallowed\"],[[69714,69733],\"valid\",[],\"NV8\"],[[69734,69743],\"valid\"],[[69744,69758],\"disallowed\"],[[69759,69759],\"valid\"],[[69760,69818],\"valid\"],[[69819,69820],\"valid\",[],\"NV8\"],[[69821,69821],\"disallowed\"],[[69822,69825],\"valid\",[],\"NV8\"],[[69826,69839],\"disallowed\"],[[69840,69864],\"valid\"],[[69865,69871],\"disallowed\"],[[69872,69881],\"valid\"],[[69882,69887],\"disallowed\"],[[69888,69940],\"valid\"],[[69941,69941],\"disallowed\"],[[69942,69951],\"valid\"],[[69952,69955],\"valid\",[],\"NV8\"],[[69956,69967],\"disallowed\"],[[69968,70003],\"valid\"],[[70004,70005],\"valid\",[],\"NV8\"],[[70006,70006],\"valid\"],[[70007,70015],\"disallowed\"],[[70016,70084],\"valid\"],[[70085,70088],\"valid\",[],\"NV8\"],[[70089,70089],\"valid\",[],\"NV8\"],[[70090,70092],\"valid\"],[[70093,70093],\"valid\",[],\"NV8\"],[[70094,70095],\"disallowed\"],[[70096,70105],\"valid\"],[[70106,70106],\"valid\"],[[70107,70107],\"valid\",[],\"NV8\"],[[70108,70108],\"valid\"],[[70109,70111],\"valid\",[],\"NV8\"],[[70112,70112],\"disallowed\"],[[70113,70132],\"valid\",[],\"NV8\"],[[70133,70143],\"disallowed\"],[[70144,70161],\"valid\"],[[70162,70162],\"disallowed\"],[[70163,70199],\"valid\"],[[70200,70205],\"valid\",[],\"NV8\"],[[70206,70271],\"disallowed\"],[[70272,70278],\"valid\"],[[70279,70279],\"disallowed\"],[[70280,70280],\"valid\"],[[70281,70281],\"disallowed\"],[[70282,70285],\"valid\"],[[70286,70286],\"disallowed\"],[[70287,70301],\"valid\"],[[70302,70302],\"disallowed\"],[[70303,70312],\"valid\"],[[70313,70313],\"valid\",[],\"NV8\"],[[70314,70319],\"disallowed\"],[[70320,70378],\"valid\"],[[70379,70383],\"disallowed\"],[[70384,70393],\"valid\"],[[70394,70399],\"disallowed\"],[[70400,70400],\"valid\"],[[70401,70403],\"valid\"],[[70404,70404],\"disallowed\"],[[70405,70412],\"valid\"],[[70413,70414],\"disallowed\"],[[70415,70416],\"valid\"],[[70417,70418],\"disallowed\"],[[70419,70440],\"valid\"],[[70441,70441],\"disallowed\"],[[70442,70448],\"valid\"],[[70449,70449],\"disallowed\"],[[70450,70451],\"valid\"],[[70452,70452],\"disallowed\"],[[70453,70457],\"valid\"],[[70458,70459],\"disallowed\"],[[70460,70468],\"valid\"],[[70469,70470],\"disallowed\"],[[70471,70472],\"valid\"],[[70473,70474],\"disallowed\"],[[70475,70477],\"valid\"],[[70478,70479],\"disallowed\"],[[70480,70480],\"valid\"],[[70481,70486],\"disallowed\"],[[70487,70487],\"valid\"],[[70488,70492],\"disallowed\"],[[70493,70499],\"valid\"],[[70500,70501],\"disallowed\"],[[70502,70508],\"valid\"],[[70509,70511],\"disallowed\"],[[70512,70516],\"valid\"],[[70517,70783],\"disallowed\"],[[70784,70853],\"valid\"],[[70854,70854],\"valid\",[],\"NV8\"],[[70855,70855],\"valid\"],[[70856,70863],\"disallowed\"],[[70864,70873],\"valid\"],[[70874,71039],\"disallowed\"],[[71040,71093],\"valid\"],[[71094,71095],\"disallowed\"],[[71096,71104],\"valid\"],[[71105,71113],\"valid\",[],\"NV8\"],[[71114,71127],\"valid\",[],\"NV8\"],[[71128,71133],\"valid\"],[[71134,71167],\"disallowed\"],[[71168,71232],\"valid\"],[[71233,71235],\"valid\",[],\"NV8\"],[[71236,71236],\"valid\"],[[71237,71247],\"disallowed\"],[[71248,71257],\"valid\"],[[71258,71295],\"disallowed\"],[[71296,71351],\"valid\"],[[71352,71359],\"disallowed\"],[[71360,71369],\"valid\"],[[71370,71423],\"disallowed\"],[[71424,71449],\"valid\"],[[71450,71452],\"disallowed\"],[[71453,71467],\"valid\"],[[71468,71471],\"disallowed\"],[[71472,71481],\"valid\"],[[71482,71487],\"valid\",[],\"NV8\"],[[71488,71839],\"disallowed\"],[[71840,71840],\"mapped\",[71872]],[[71841,71841],\"mapped\",[71873]],[[71842,71842],\"mapped\",[71874]],[[71843,71843],\"mapped\",[71875]],[[71844,71844],\"mapped\",[71876]],[[71845,71845],\"mapped\",[71877]],[[71846,71846],\"mapped\",[71878]],[[71847,71847],\"mapped\",[71879]],[[71848,71848],\"mapped\",[71880]],[[71849,71849],\"mapped\",[71881]],[[71850,71850],\"mapped\",[71882]],[[71851,71851],\"mapped\",[71883]],[[71852,71852],\"mapped\",[71884]],[[71853,71853],\"mapped\",[71885]],[[71854,71854],\"mapped\",[71886]],[[71855,71855],\"mapped\",[71887]],[[71856,71856],\"mapped\",[71888]],[[71857,71857],\"mapped\",[71889]],[[71858,71858],\"mapped\",[71890]],[[71859,71859],\"mapped\",[71891]],[[71860,71860],\"mapped\",[71892]],[[71861,71861],\"mapped\",[71893]],[[71862,71862],\"mapped\",[71894]],[[71863,71863],\"mapped\",[71895]],[[71864,71864],\"mapped\",[71896]],[[71865,71865],\"mapped\",[71897]],[[71866,71866],\"mapped\",[71898]],[[71867,71867],\"mapped\",[71899]],[[71868,71868],\"mapped\",[71900]],[[71869,71869],\"mapped\",[71901]],[[71870,71870],\"mapped\",[71902]],[[71871,71871],\"mapped\",[71903]],[[71872,71913],\"valid\"],[[71914,71922],\"valid\",[],\"NV8\"],[[71923,71934],\"disallowed\"],[[71935,71935],\"valid\"],[[71936,72383],\"disallowed\"],[[72384,72440],\"valid\"],[[72441,73727],\"disallowed\"],[[73728,74606],\"valid\"],[[74607,74648],\"valid\"],[[74649,74649],\"valid\"],[[74650,74751],\"disallowed\"],[[74752,74850],\"valid\",[],\"NV8\"],[[74851,74862],\"valid\",[],\"NV8\"],[[74863,74863],\"disallowed\"],[[74864,74867],\"valid\",[],\"NV8\"],[[74868,74868],\"valid\",[],\"NV8\"],[[74869,74879],\"disallowed\"],[[74880,75075],\"valid\"],[[75076,77823],\"disallowed\"],[[77824,78894],\"valid\"],[[78895,82943],\"disallowed\"],[[82944,83526],\"valid\"],[[83527,92159],\"disallowed\"],[[92160,92728],\"valid\"],[[92729,92735],\"disallowed\"],[[92736,92766],\"valid\"],[[92767,92767],\"disallowed\"],[[92768,92777],\"valid\"],[[92778,92781],\"disallowed\"],[[92782,92783],\"valid\",[],\"NV8\"],[[92784,92879],\"disallowed\"],[[92880,92909],\"valid\"],[[92910,92911],\"disallowed\"],[[92912,92916],\"valid\"],[[92917,92917],\"valid\",[],\"NV8\"],[[92918,92927],\"disallowed\"],[[92928,92982],\"valid\"],[[92983,92991],\"valid\",[],\"NV8\"],[[92992,92995],\"valid\"],[[92996,92997],\"valid\",[],\"NV8\"],[[92998,93007],\"disallowed\"],[[93008,93017],\"valid\"],[[93018,93018],\"disallowed\"],[[93019,93025],\"valid\",[],\"NV8\"],[[93026,93026],\"disallowed\"],[[93027,93047],\"valid\"],[[93048,93052],\"disallowed\"],[[93053,93071],\"valid\"],[[93072,93951],\"disallowed\"],[[93952,94020],\"valid\"],[[94021,94031],\"disallowed\"],[[94032,94078],\"valid\"],[[94079,94094],\"disallowed\"],[[94095,94111],\"valid\"],[[94112,110591],\"disallowed\"],[[110592,110593],\"valid\"],[[110594,113663],\"disallowed\"],[[113664,113770],\"valid\"],[[113771,113775],\"disallowed\"],[[113776,113788],\"valid\"],[[113789,113791],\"disallowed\"],[[113792,113800],\"valid\"],[[113801,113807],\"disallowed\"],[[113808,113817],\"valid\"],[[113818,113819],\"disallowed\"],[[113820,113820],\"valid\",[],\"NV8\"],[[113821,113822],\"valid\"],[[113823,113823],\"valid\",[],\"NV8\"],[[113824,113827],\"ignored\"],[[113828,118783],\"disallowed\"],[[118784,119029],\"valid\",[],\"NV8\"],[[119030,119039],\"disallowed\"],[[119040,119078],\"valid\",[],\"NV8\"],[[119079,119080],\"disallowed\"],[[119081,119081],\"valid\",[],\"NV8\"],[[119082,119133],\"valid\",[],\"NV8\"],[[119134,119134],\"mapped\",[119127,119141]],[[119135,119135],\"mapped\",[119128,119141]],[[119136,119136],\"mapped\",[119128,119141,119150]],[[119137,119137],\"mapped\",[119128,119141,119151]],[[119138,119138],\"mapped\",[119128,119141,119152]],[[119139,119139],\"mapped\",[119128,119141,119153]],[[119140,119140],\"mapped\",[119128,119141,119154]],[[119141,119154],\"valid\",[],\"NV8\"],[[119155,119162],\"disallowed\"],[[119163,119226],\"valid\",[],\"NV8\"],[[119227,119227],\"mapped\",[119225,119141]],[[119228,119228],\"mapped\",[119226,119141]],[[119229,119229],\"mapped\",[119225,119141,119150]],[[119230,119230],\"mapped\",[119226,119141,119150]],[[119231,119231],\"mapped\",[119225,119141,119151]],[[119232,119232],\"mapped\",[119226,119141,119151]],[[119233,119261],\"valid\",[],\"NV8\"],[[119262,119272],\"valid\",[],\"NV8\"],[[119273,119295],\"disallowed\"],[[119296,119365],\"valid\",[],\"NV8\"],[[119366,119551],\"disallowed\"],[[119552,119638],\"valid\",[],\"NV8\"],[[119639,119647],\"disallowed\"],[[119648,119665],\"valid\",[],\"NV8\"],[[119666,119807],\"disallowed\"],[[119808,119808],\"mapped\",[97]],[[119809,119809],\"mapped\",[98]],[[119810,119810],\"mapped\",[99]],[[119811,119811],\"mapped\",[100]],[[119812,119812],\"mapped\",[101]],[[119813,119813],\"mapped\",[102]],[[119814,119814],\"mapped\",[103]],[[119815,119815],\"mapped\",[104]],[[119816,119816],\"mapped\",[105]],[[119817,119817],\"mapped\",[106]],[[119818,119818],\"mapped\",[107]],[[119819,119819],\"mapped\",[108]],[[119820,119820],\"mapped\",[109]],[[119821,119821],\"mapped\",[110]],[[119822,119822],\"mapped\",[111]],[[119823,119823],\"mapped\",[112]],[[119824,119824],\"mapped\",[113]],[[119825,119825],\"mapped\",[114]],[[119826,119826],\"mapped\",[115]],[[119827,119827],\"mapped\",[116]],[[119828,119828],\"mapped\",[117]],[[119829,119829],\"mapped\",[118]],[[119830,119830],\"mapped\",[119]],[[119831,119831],\"mapped\",[120]],[[119832,119832],\"mapped\",[121]],[[119833,119833],\"mapped\",[122]],[[119834,119834],\"mapped\",[97]],[[119835,119835],\"mapped\",[98]],[[119836,119836],\"mapped\",[99]],[[119837,119837],\"mapped\",[100]],[[119838,119838],\"mapped\",[101]],[[119839,119839],\"mapped\",[102]],[[119840,119840],\"mapped\",[103]],[[119841,119841],\"mapped\",[104]],[[119842,119842],\"mapped\",[105]],[[119843,119843],\"mapped\",[106]],[[119844,119844],\"mapped\",[107]],[[119845,119845],\"mapped\",[108]],[[119846,119846],\"mapped\",[109]],[[119847,119847],\"mapped\",[110]],[[119848,119848],\"mapped\",[111]],[[119849,119849],\"mapped\",[112]],[[119850,119850],\"mapped\",[113]],[[119851,119851],\"mapped\",[114]],[[119852,119852],\"mapped\",[115]],[[119853,119853],\"mapped\",[116]],[[119854,119854],\"mapped\",[117]],[[119855,119855],\"mapped\",[118]],[[119856,119856],\"mapped\",[119]],[[119857,119857],\"mapped\",[120]],[[119858,119858],\"mapped\",[121]],[[119859,119859],\"mapped\",[122]],[[119860,119860],\"mapped\",[97]],[[119861,119861],\"mapped\",[98]],[[119862,119862],\"mapped\",[99]],[[119863,119863],\"mapped\",[100]],[[119864,119864],\"mapped\",[101]],[[119865,119865],\"mapped\",[102]],[[119866,119866],\"mapped\",[103]],[[119867,119867],\"mapped\",[104]],[[119868,119868],\"mapped\",[105]],[[119869,119869],\"mapped\",[106]],[[119870,119870],\"mapped\",[107]],[[119871,119871],\"mapped\",[108]],[[119872,119872],\"mapped\",[109]],[[119873,119873],\"mapped\",[110]],[[119874,119874],\"mapped\",[111]],[[119875,119875],\"mapped\",[112]],[[119876,119876],\"mapped\",[113]],[[119877,119877],\"mapped\",[114]],[[119878,119878],\"mapped\",[115]],[[119879,119879],\"mapped\",[116]],[[119880,119880],\"mapped\",[117]],[[119881,119881],\"mapped\",[118]],[[119882,119882],\"mapped\",[119]],[[119883,119883],\"mapped\",[120]],[[119884,119884],\"mapped\",[121]],[[119885,119885],\"mapped\",[122]],[[119886,119886],\"mapped\",[97]],[[119887,119887],\"mapped\",[98]],[[119888,119888],\"mapped\",[99]],[[119889,119889],\"mapped\",[100]],[[119890,119890],\"mapped\",[101]],[[119891,119891],\"mapped\",[102]],[[119892,119892],\"mapped\",[103]],[[119893,119893],\"disallowed\"],[[119894,119894],\"mapped\",[105]],[[119895,119895],\"mapped\",[106]],[[119896,119896],\"mapped\",[107]],[[119897,119897],\"mapped\",[108]],[[119898,119898],\"mapped\",[109]],[[119899,119899],\"mapped\",[110]],[[119900,119900],\"mapped\",[111]],[[119901,119901],\"mapped\",[112]],[[119902,119902],\"mapped\",[113]],[[119903,119903],\"mapped\",[114]],[[119904,119904],\"mapped\",[115]],[[119905,119905],\"mapped\",[116]],[[119906,119906],\"mapped\",[117]],[[119907,119907],\"mapped\",[118]],[[119908,119908],\"mapped\",[119]],[[119909,119909],\"mapped\",[120]],[[119910,119910],\"mapped\",[121]],[[119911,119911],\"mapped\",[122]],[[119912,119912],\"mapped\",[97]],[[119913,119913],\"mapped\",[98]],[[119914,119914],\"mapped\",[99]],[[119915,119915],\"mapped\",[100]],[[119916,119916],\"mapped\",[101]],[[119917,119917],\"mapped\",[102]],[[119918,119918],\"mapped\",[103]],[[119919,119919],\"mapped\",[104]],[[119920,119920],\"mapped\",[105]],[[119921,119921],\"mapped\",[106]],[[119922,119922],\"mapped\",[107]],[[119923,119923],\"mapped\",[108]],[[119924,119924],\"mapped\",[109]],[[119925,119925],\"mapped\",[110]],[[119926,119926],\"mapped\",[111]],[[119927,119927],\"mapped\",[112]],[[119928,119928],\"mapped\",[113]],[[119929,119929],\"mapped\",[114]],[[119930,119930],\"mapped\",[115]],[[119931,119931],\"mapped\",[116]],[[119932,119932],\"mapped\",[117]],[[119933,119933],\"mapped\",[118]],[[119934,119934],\"mapped\",[119]],[[119935,119935],\"mapped\",[120]],[[119936,119936],\"mapped\",[121]],[[119937,119937],\"mapped\",[122]],[[119938,119938],\"mapped\",[97]],[[119939,119939],\"mapped\",[98]],[[119940,119940],\"mapped\",[99]],[[119941,119941],\"mapped\",[100]],[[119942,119942],\"mapped\",[101]],[[119943,119943],\"mapped\",[102]],[[119944,119944],\"mapped\",[103]],[[119945,119945],\"mapped\",[104]],[[119946,119946],\"mapped\",[105]],[[119947,119947],\"mapped\",[106]],[[119948,119948],\"mapped\",[107]],[[119949,119949],\"mapped\",[108]],[[119950,119950],\"mapped\",[109]],[[119951,119951],\"mapped\",[110]],[[119952,119952],\"mapped\",[111]],[[119953,119953],\"mapped\",[112]],[[119954,119954],\"mapped\",[113]],[[119955,119955],\"mapped\",[114]],[[119956,119956],\"mapped\",[115]],[[119957,119957],\"mapped\",[116]],[[119958,119958],\"mapped\",[117]],[[119959,119959],\"mapped\",[118]],[[119960,119960],\"mapped\",[119]],[[119961,119961],\"mapped\",[120]],[[119962,119962],\"mapped\",[121]],[[119963,119963],\"mapped\",[122]],[[119964,119964],\"mapped\",[97]],[[119965,119965],\"disallowed\"],[[119966,119966],\"mapped\",[99]],[[119967,119967],\"mapped\",[100]],[[119968,119969],\"disallowed\"],[[119970,119970],\"mapped\",[103]],[[119971,119972],\"disallowed\"],[[119973,119973],\"mapped\",[106]],[[119974,119974],\"mapped\",[107]],[[119975,119976],\"disallowed\"],[[119977,119977],\"mapped\",[110]],[[119978,119978],\"mapped\",[111]],[[119979,119979],\"mapped\",[112]],[[119980,119980],\"mapped\",[113]],[[119981,119981],\"disallowed\"],[[119982,119982],\"mapped\",[115]],[[119983,119983],\"mapped\",[116]],[[119984,119984],\"mapped\",[117]],[[119985,119985],\"mapped\",[118]],[[119986,119986],\"mapped\",[119]],[[119987,119987],\"mapped\",[120]],[[119988,119988],\"mapped\",[121]],[[119989,119989],\"mapped\",[122]],[[119990,119990],\"mapped\",[97]],[[119991,119991],\"mapped\",[98]],[[119992,119992],\"mapped\",[99]],[[119993,119993],\"mapped\",[100]],[[119994,119994],\"disallowed\"],[[119995,119995],\"mapped\",[102]],[[119996,119996],\"disallowed\"],[[119997,119997],\"mapped\",[104]],[[119998,119998],\"mapped\",[105]],[[119999,119999],\"mapped\",[106]],[[120000,120000],\"mapped\",[107]],[[120001,120001],\"mapped\",[108]],[[120002,120002],\"mapped\",[109]],[[120003,120003],\"mapped\",[110]],[[120004,120004],\"disallowed\"],[[120005,120005],\"mapped\",[112]],[[120006,120006],\"mapped\",[113]],[[120007,120007],\"mapped\",[114]],[[120008,120008],\"mapped\",[115]],[[120009,120009],\"mapped\",[116]],[[120010,120010],\"mapped\",[117]],[[120011,120011],\"mapped\",[118]],[[120012,120012],\"mapped\",[119]],[[120013,120013],\"mapped\",[120]],[[120014,120014],\"mapped\",[121]],[[120015,120015],\"mapped\",[122]],[[120016,120016],\"mapped\",[97]],[[120017,120017],\"mapped\",[98]],[[120018,120018],\"mapped\",[99]],[[120019,120019],\"mapped\",[100]],[[120020,120020],\"mapped\",[101]],[[120021,120021],\"mapped\",[102]],[[120022,120022],\"mapped\",[103]],[[120023,120023],\"mapped\",[104]],[[120024,120024],\"mapped\",[105]],[[120025,120025],\"mapped\",[106]],[[120026,120026],\"mapped\",[107]],[[120027,120027],\"mapped\",[108]],[[120028,120028],\"mapped\",[109]],[[120029,120029],\"mapped\",[110]],[[120030,120030],\"mapped\",[111]],[[120031,120031],\"mapped\",[112]],[[120032,120032],\"mapped\",[113]],[[120033,120033],\"mapped\",[114]],[[120034,120034],\"mapped\",[115]],[[120035,120035],\"mapped\",[116]],[[120036,120036],\"mapped\",[117]],[[120037,120037],\"mapped\",[118]],[[120038,120038],\"mapped\",[119]],[[120039,120039],\"mapped\",[120]],[[120040,120040],\"mapped\",[121]],[[120041,120041],\"mapped\",[122]],[[120042,120042],\"mapped\",[97]],[[120043,120043],\"mapped\",[98]],[[120044,120044],\"mapped\",[99]],[[120045,120045],\"mapped\",[100]],[[120046,120046],\"mapped\",[101]],[[120047,120047],\"mapped\",[102]],[[120048,120048],\"mapped\",[103]],[[120049,120049],\"mapped\",[104]],[[120050,120050],\"mapped\",[105]],[[120051,120051],\"mapped\",[106]],[[120052,120052],\"mapped\",[107]],[[120053,120053],\"mapped\",[108]],[[120054,120054],\"mapped\",[109]],[[120055,120055],\"mapped\",[110]],[[120056,120056],\"mapped\",[111]],[[120057,120057],\"mapped\",[112]],[[120058,120058],\"mapped\",[113]],[[120059,120059],\"mapped\",[114]],[[120060,120060],\"mapped\",[115]],[[120061,120061],\"mapped\",[116]],[[120062,120062],\"mapped\",[117]],[[120063,120063],\"mapped\",[118]],[[120064,120064],\"mapped\",[119]],[[120065,120065],\"mapped\",[120]],[[120066,120066],\"mapped\",[121]],[[120067,120067],\"mapped\",[122]],[[120068,120068],\"mapped\",[97]],[[120069,120069],\"mapped\",[98]],[[120070,120070],\"disallowed\"],[[120071,120071],\"mapped\",[100]],[[120072,120072],\"mapped\",[101]],[[120073,120073],\"mapped\",[102]],[[120074,120074],\"mapped\",[103]],[[120075,120076],\"disallowed\"],[[120077,120077],\"mapped\",[106]],[[120078,120078],\"mapped\",[107]],[[120079,120079],\"mapped\",[108]],[[120080,120080],\"mapped\",[109]],[[120081,120081],\"mapped\",[110]],[[120082,120082],\"mapped\",[111]],[[120083,120083],\"mapped\",[112]],[[120084,120084],\"mapped\",[113]],[[120085,120085],\"disallowed\"],[[120086,120086],\"mapped\",[115]],[[120087,120087],\"mapped\",[116]],[[120088,120088],\"mapped\",[117]],[[120089,120089],\"mapped\",[118]],[[120090,120090],\"mapped\",[119]],[[120091,120091],\"mapped\",[120]],[[120092,120092],\"mapped\",[121]],[[120093,120093],\"disallowed\"],[[120094,120094],\"mapped\",[97]],[[120095,120095],\"mapped\",[98]],[[120096,120096],\"mapped\",[99]],[[120097,120097],\"mapped\",[100]],[[120098,120098],\"mapped\",[101]],[[120099,120099],\"mapped\",[102]],[[120100,120100],\"mapped\",[103]],[[120101,120101],\"mapped\",[104]],[[120102,120102],\"mapped\",[105]],[[120103,120103],\"mapped\",[106]],[[120104,120104],\"mapped\",[107]],[[120105,120105],\"mapped\",[108]],[[120106,120106],\"mapped\",[109]],[[120107,120107],\"mapped\",[110]],[[120108,120108],\"mapped\",[111]],[[120109,120109],\"mapped\",[112]],[[120110,120110],\"mapped\",[113]],[[120111,120111],\"mapped\",[114]],[[120112,120112],\"mapped\",[115]],[[120113,120113],\"mapped\",[116]],[[120114,120114],\"mapped\",[117]],[[120115,120115],\"mapped\",[118]],[[120116,120116],\"mapped\",[119]],[[120117,120117],\"mapped\",[120]],[[120118,120118],\"mapped\",[121]],[[120119,120119],\"mapped\",[122]],[[120120,120120],\"mapped\",[97]],[[120121,120121],\"mapped\",[98]],[[120122,120122],\"disallowed\"],[[120123,120123],\"mapped\",[100]],[[120124,120124],\"mapped\",[101]],[[120125,120125],\"mapped\",[102]],[[120126,120126],\"mapped\",[103]],[[120127,120127],\"disallowed\"],[[120128,120128],\"mapped\",[105]],[[120129,120129],\"mapped\",[106]],[[120130,120130],\"mapped\",[107]],[[120131,120131],\"mapped\",[108]],[[120132,120132],\"mapped\",[109]],[[120133,120133],\"disallowed\"],[[120134,120134],\"mapped\",[111]],[[120135,120137],\"disallowed\"],[[120138,120138],\"mapped\",[115]],[[120139,120139],\"mapped\",[116]],[[120140,120140],\"mapped\",[117]],[[120141,120141],\"mapped\",[118]],[[120142,120142],\"mapped\",[119]],[[120143,120143],\"mapped\",[120]],[[120144,120144],\"mapped\",[121]],[[120145,120145],\"disallowed\"],[[120146,120146],\"mapped\",[97]],[[120147,120147],\"mapped\",[98]],[[120148,120148],\"mapped\",[99]],[[120149,120149],\"mapped\",[100]],[[120150,120150],\"mapped\",[101]],[[120151,120151],\"mapped\",[102]],[[120152,120152],\"mapped\",[103]],[[120153,120153],\"mapped\",[104]],[[120154,120154],\"mapped\",[105]],[[120155,120155],\"mapped\",[106]],[[120156,120156],\"mapped\",[107]],[[120157,120157],\"mapped\",[108]],[[120158,120158],\"mapped\",[109]],[[120159,120159],\"mapped\",[110]],[[120160,120160],\"mapped\",[111]],[[120161,120161],\"mapped\",[112]],[[120162,120162],\"mapped\",[113]],[[120163,120163],\"mapped\",[114]],[[120164,120164],\"mapped\",[115]],[[120165,120165],\"mapped\",[116]],[[120166,120166],\"mapped\",[117]],[[120167,120167],\"mapped\",[118]],[[120168,120168],\"mapped\",[119]],[[120169,120169],\"mapped\",[120]],[[120170,120170],\"mapped\",[121]],[[120171,120171],\"mapped\",[122]],[[120172,120172],\"mapped\",[97]],[[120173,120173],\"mapped\",[98]],[[120174,120174],\"mapped\",[99]],[[120175,120175],\"mapped\",[100]],[[120176,120176],\"mapped\",[101]],[[120177,120177],\"mapped\",[102]],[[120178,120178],\"mapped\",[103]],[[120179,120179],\"mapped\",[104]],[[120180,120180],\"mapped\",[105]],[[120181,120181],\"mapped\",[106]],[[120182,120182],\"mapped\",[107]],[[120183,120183],\"mapped\",[108]],[[120184,120184],\"mapped\",[109]],[[120185,120185],\"mapped\",[110]],[[120186,120186],\"mapped\",[111]],[[120187,120187],\"mapped\",[112]],[[120188,120188],\"mapped\",[113]],[[120189,120189],\"mapped\",[114]],[[120190,120190],\"mapped\",[115]],[[120191,120191],\"mapped\",[116]],[[120192,120192],\"mapped\",[117]],[[120193,120193],\"mapped\",[118]],[[120194,120194],\"mapped\",[119]],[[120195,120195],\"mapped\",[120]],[[120196,120196],\"mapped\",[121]],[[120197,120197],\"mapped\",[122]],[[120198,120198],\"mapped\",[97]],[[120199,120199],\"mapped\",[98]],[[120200,120200],\"mapped\",[99]],[[120201,120201],\"mapped\",[100]],[[120202,120202],\"mapped\",[101]],[[120203,120203],\"mapped\",[102]],[[120204,120204],\"mapped\",[103]],[[120205,120205],\"mapped\",[104]],[[120206,120206],\"mapped\",[105]],[[120207,120207],\"mapped\",[106]],[[120208,120208],\"mapped\",[107]],[[120209,120209],\"mapped\",[108]],[[120210,120210],\"mapped\",[109]],[[120211,120211],\"mapped\",[110]],[[120212,120212],\"mapped\",[111]],[[120213,120213],\"mapped\",[112]],[[120214,120214],\"mapped\",[113]],[[120215,120215],\"mapped\",[114]],[[120216,120216],\"mapped\",[115]],[[120217,120217],\"mapped\",[116]],[[120218,120218],\"mapped\",[117]],[[120219,120219],\"mapped\",[118]],[[120220,120220],\"mapped\",[119]],[[120221,120221],\"mapped\",[120]],[[120222,120222],\"mapped\",[121]],[[120223,120223],\"mapped\",[122]],[[120224,120224],\"mapped\",[97]],[[120225,120225],\"mapped\",[98]],[[120226,120226],\"mapped\",[99]],[[120227,120227],\"mapped\",[100]],[[120228,120228],\"mapped\",[101]],[[120229,120229],\"mapped\",[102]],[[120230,120230],\"mapped\",[103]],[[120231,120231],\"mapped\",[104]],[[120232,120232],\"mapped\",[105]],[[120233,120233],\"mapped\",[106]],[[120234,120234],\"mapped\",[107]],[[120235,120235],\"mapped\",[108]],[[120236,120236],\"mapped\",[109]],[[120237,120237],\"mapped\",[110]],[[120238,120238],\"mapped\",[111]],[[120239,120239],\"mapped\",[112]],[[120240,120240],\"mapped\",[113]],[[120241,120241],\"mapped\",[114]],[[120242,120242],\"mapped\",[115]],[[120243,120243],\"mapped\",[116]],[[120244,120244],\"mapped\",[117]],[[120245,120245],\"mapped\",[118]],[[120246,120246],\"mapped\",[119]],[[120247,120247],\"mapped\",[120]],[[120248,120248],\"mapped\",[121]],[[120249,120249],\"mapped\",[122]],[[120250,120250],\"mapped\",[97]],[[120251,120251],\"mapped\",[98]],[[120252,120252],\"mapped\",[99]],[[120253,120253],\"mapped\",[100]],[[120254,120254],\"mapped\",[101]],[[120255,120255],\"mapped\",[102]],[[120256,120256],\"mapped\",[103]],[[120257,120257],\"mapped\",[104]],[[120258,120258],\"mapped\",[105]],[[120259,120259],\"mapped\",[106]],[[120260,120260],\"mapped\",[107]],[[120261,120261],\"mapped\",[108]],[[120262,120262],\"mapped\",[109]],[[120263,120263],\"mapped\",[110]],[[120264,120264],\"mapped\",[111]],[[120265,120265],\"mapped\",[112]],[[120266,120266],\"mapped\",[113]],[[120267,120267],\"mapped\",[114]],[[120268,120268],\"mapped\",[115]],[[120269,120269],\"mapped\",[116]],[[120270,120270],\"mapped\",[117]],[[120271,120271],\"mapped\",[118]],[[120272,120272],\"mapped\",[119]],[[120273,120273],\"mapped\",[120]],[[120274,120274],\"mapped\",[121]],[[120275,120275],\"mapped\",[122]],[[120276,120276],\"mapped\",[97]],[[120277,120277],\"mapped\",[98]],[[120278,120278],\"mapped\",[99]],[[120279,120279],\"mapped\",[100]],[[120280,120280],\"mapped\",[101]],[[120281,120281],\"mapped\",[102]],[[120282,120282],\"mapped\",[103]],[[120283,120283],\"mapped\",[104]],[[120284,120284],\"mapped\",[105]],[[120285,120285],\"mapped\",[106]],[[120286,120286],\"mapped\",[107]],[[120287,120287],\"mapped\",[108]],[[120288,120288],\"mapped\",[109]],[[120289,120289],\"mapped\",[110]],[[120290,120290],\"mapped\",[111]],[[120291,120291],\"mapped\",[112]],[[120292,120292],\"mapped\",[113]],[[120293,120293],\"mapped\",[114]],[[120294,120294],\"mapped\",[115]],[[120295,120295],\"mapped\",[116]],[[120296,120296],\"mapped\",[117]],[[120297,120297],\"mapped\",[118]],[[120298,120298],\"mapped\",[119]],[[120299,120299],\"mapped\",[120]],[[120300,120300],\"mapped\",[121]],[[120301,120301],\"mapped\",[122]],[[120302,120302],\"mapped\",[97]],[[120303,120303],\"mapped\",[98]],[[120304,120304],\"mapped\",[99]],[[120305,120305],\"mapped\",[100]],[[120306,120306],\"mapped\",[101]],[[120307,120307],\"mapped\",[102]],[[120308,120308],\"mapped\",[103]],[[120309,120309],\"mapped\",[104]],[[120310,120310],\"mapped\",[105]],[[120311,120311],\"mapped\",[106]],[[120312,120312],\"mapped\",[107]],[[120313,120313],\"mapped\",[108]],[[120314,120314],\"mapped\",[109]],[[120315,120315],\"mapped\",[110]],[[120316,120316],\"mapped\",[111]],[[120317,120317],\"mapped\",[112]],[[120318,120318],\"mapped\",[113]],[[120319,120319],\"mapped\",[114]],[[120320,120320],\"mapped\",[115]],[[120321,120321],\"mapped\",[116]],[[120322,120322],\"mapped\",[117]],[[120323,120323],\"mapped\",[118]],[[120324,120324],\"mapped\",[119]],[[120325,120325],\"mapped\",[120]],[[120326,120326],\"mapped\",[121]],[[120327,120327],\"mapped\",[122]],[[120328,120328],\"mapped\",[97]],[[120329,120329],\"mapped\",[98]],[[120330,120330],\"mapped\",[99]],[[120331,120331],\"mapped\",[100]],[[120332,120332],\"mapped\",[101]],[[120333,120333],\"mapped\",[102]],[[120334,120334],\"mapped\",[103]],[[120335,120335],\"mapped\",[104]],[[120336,120336],\"mapped\",[105]],[[120337,120337],\"mapped\",[106]],[[120338,120338],\"mapped\",[107]],[[120339,120339],\"mapped\",[108]],[[120340,120340],\"mapped\",[109]],[[120341,120341],\"mapped\",[110]],[[120342,120342],\"mapped\",[111]],[[120343,120343],\"mapped\",[112]],[[120344,120344],\"mapped\",[113]],[[120345,120345],\"mapped\",[114]],[[120346,120346],\"mapped\",[115]],[[120347,120347],\"mapped\",[116]],[[120348,120348],\"mapped\",[117]],[[120349,120349],\"mapped\",[118]],[[120350,120350],\"mapped\",[119]],[[120351,120351],\"mapped\",[120]],[[120352,120352],\"mapped\",[121]],[[120353,120353],\"mapped\",[122]],[[120354,120354],\"mapped\",[97]],[[120355,120355],\"mapped\",[98]],[[120356,120356],\"mapped\",[99]],[[120357,120357],\"mapped\",[100]],[[120358,120358],\"mapped\",[101]],[[120359,120359],\"mapped\",[102]],[[120360,120360],\"mapped\",[103]],[[120361,120361],\"mapped\",[104]],[[120362,120362],\"mapped\",[105]],[[120363,120363],\"mapped\",[106]],[[120364,120364],\"mapped\",[107]],[[120365,120365],\"mapped\",[108]],[[120366,120366],\"mapped\",[109]],[[120367,120367],\"mapped\",[110]],[[120368,120368],\"mapped\",[111]],[[120369,120369],\"mapped\",[112]],[[120370,120370],\"mapped\",[113]],[[120371,120371],\"mapped\",[114]],[[120372,120372],\"mapped\",[115]],[[120373,120373],\"mapped\",[116]],[[120374,120374],\"mapped\",[117]],[[120375,120375],\"mapped\",[118]],[[120376,120376],\"mapped\",[119]],[[120377,120377],\"mapped\",[120]],[[120378,120378],\"mapped\",[121]],[[120379,120379],\"mapped\",[122]],[[120380,120380],\"mapped\",[97]],[[120381,120381],\"mapped\",[98]],[[120382,120382],\"mapped\",[99]],[[120383,120383],\"mapped\",[100]],[[120384,120384],\"mapped\",[101]],[[120385,120385],\"mapped\",[102]],[[120386,120386],\"mapped\",[103]],[[120387,120387],\"mapped\",[104]],[[120388,120388],\"mapped\",[105]],[[120389,120389],\"mapped\",[106]],[[120390,120390],\"mapped\",[107]],[[120391,120391],\"mapped\",[108]],[[120392,120392],\"mapped\",[109]],[[120393,120393],\"mapped\",[110]],[[120394,120394],\"mapped\",[111]],[[120395,120395],\"mapped\",[112]],[[120396,120396],\"mapped\",[113]],[[120397,120397],\"mapped\",[114]],[[120398,120398],\"mapped\",[115]],[[120399,120399],\"mapped\",[116]],[[120400,120400],\"mapped\",[117]],[[120401,120401],\"mapped\",[118]],[[120402,120402],\"mapped\",[119]],[[120403,120403],\"mapped\",[120]],[[120404,120404],\"mapped\",[121]],[[120405,120405],\"mapped\",[122]],[[120406,120406],\"mapped\",[97]],[[120407,120407],\"mapped\",[98]],[[120408,120408],\"mapped\",[99]],[[120409,120409],\"mapped\",[100]],[[120410,120410],\"mapped\",[101]],[[120411,120411],\"mapped\",[102]],[[120412,120412],\"mapped\",[103]],[[120413,120413],\"mapped\",[104]],[[120414,120414],\"mapped\",[105]],[[120415,120415],\"mapped\",[106]],[[120416,120416],\"mapped\",[107]],[[120417,120417],\"mapped\",[108]],[[120418,120418],\"mapped\",[109]],[[120419,120419],\"mapped\",[110]],[[120420,120420],\"mapped\",[111]],[[120421,120421],\"mapped\",[112]],[[120422,120422],\"mapped\",[113]],[[120423,120423],\"mapped\",[114]],[[120424,120424],\"mapped\",[115]],[[120425,120425],\"mapped\",[116]],[[120426,120426],\"mapped\",[117]],[[120427,120427],\"mapped\",[118]],[[120428,120428],\"mapped\",[119]],[[120429,120429],\"mapped\",[120]],[[120430,120430],\"mapped\",[121]],[[120431,120431],\"mapped\",[122]],[[120432,120432],\"mapped\",[97]],[[120433,120433],\"mapped\",[98]],[[120434,120434],\"mapped\",[99]],[[120435,120435],\"mapped\",[100]],[[120436,120436],\"mapped\",[101]],[[120437,120437],\"mapped\",[102]],[[120438,120438],\"mapped\",[103]],[[120439,120439],\"mapped\",[104]],[[120440,120440],\"mapped\",[105]],[[120441,120441],\"mapped\",[106]],[[120442,120442],\"mapped\",[107]],[[120443,120443],\"mapped\",[108]],[[120444,120444],\"mapped\",[109]],[[120445,120445],\"mapped\",[110]],[[120446,120446],\"mapped\",[111]],[[120447,120447],\"mapped\",[112]],[[120448,120448],\"mapped\",[113]],[[120449,120449],\"mapped\",[114]],[[120450,120450],\"mapped\",[115]],[[120451,120451],\"mapped\",[116]],[[120452,120452],\"mapped\",[117]],[[120453,120453],\"mapped\",[118]],[[120454,120454],\"mapped\",[119]],[[120455,120455],\"mapped\",[120]],[[120456,120456],\"mapped\",[121]],[[120457,120457],\"mapped\",[122]],[[120458,120458],\"mapped\",[97]],[[120459,120459],\"mapped\",[98]],[[120460,120460],\"mapped\",[99]],[[120461,120461],\"mapped\",[100]],[[120462,120462],\"mapped\",[101]],[[120463,120463],\"mapped\",[102]],[[120464,120464],\"mapped\",[103]],[[120465,120465],\"mapped\",[104]],[[120466,120466],\"mapped\",[105]],[[120467,120467],\"mapped\",[106]],[[120468,120468],\"mapped\",[107]],[[120469,120469],\"mapped\",[108]],[[120470,120470],\"mapped\",[109]],[[120471,120471],\"mapped\",[110]],[[120472,120472],\"mapped\",[111]],[[120473,120473],\"mapped\",[112]],[[120474,120474],\"mapped\",[113]],[[120475,120475],\"mapped\",[114]],[[120476,120476],\"mapped\",[115]],[[120477,120477],\"mapped\",[116]],[[120478,120478],\"mapped\",[117]],[[120479,120479],\"mapped\",[118]],[[120480,120480],\"mapped\",[119]],[[120481,120481],\"mapped\",[120]],[[120482,120482],\"mapped\",[121]],[[120483,120483],\"mapped\",[122]],[[120484,120484],\"mapped\",[305]],[[120485,120485],\"mapped\",[567]],[[120486,120487],\"disallowed\"],[[120488,120488],\"mapped\",[945]],[[120489,120489],\"mapped\",[946]],[[120490,120490],\"mapped\",[947]],[[120491,120491],\"mapped\",[948]],[[120492,120492],\"mapped\",[949]],[[120493,120493],\"mapped\",[950]],[[120494,120494],\"mapped\",[951]],[[120495,120495],\"mapped\",[952]],[[120496,120496],\"mapped\",[953]],[[120497,120497],\"mapped\",[954]],[[120498,120498],\"mapped\",[955]],[[120499,120499],\"mapped\",[956]],[[120500,120500],\"mapped\",[957]],[[120501,120501],\"mapped\",[958]],[[120502,120502],\"mapped\",[959]],[[120503,120503],\"mapped\",[960]],[[120504,120504],\"mapped\",[961]],[[120505,120505],\"mapped\",[952]],[[120506,120506],\"mapped\",[963]],[[120507,120507],\"mapped\",[964]],[[120508,120508],\"mapped\",[965]],[[120509,120509],\"mapped\",[966]],[[120510,120510],\"mapped\",[967]],[[120511,120511],\"mapped\",[968]],[[120512,120512],\"mapped\",[969]],[[120513,120513],\"mapped\",[8711]],[[120514,120514],\"mapped\",[945]],[[120515,120515],\"mapped\",[946]],[[120516,120516],\"mapped\",[947]],[[120517,120517],\"mapped\",[948]],[[120518,120518],\"mapped\",[949]],[[120519,120519],\"mapped\",[950]],[[120520,120520],\"mapped\",[951]],[[120521,120521],\"mapped\",[952]],[[120522,120522],\"mapped\",[953]],[[120523,120523],\"mapped\",[954]],[[120524,120524],\"mapped\",[955]],[[120525,120525],\"mapped\",[956]],[[120526,120526],\"mapped\",[957]],[[120527,120527],\"mapped\",[958]],[[120528,120528],\"mapped\",[959]],[[120529,120529],\"mapped\",[960]],[[120530,120530],\"mapped\",[961]],[[120531,120532],\"mapped\",[963]],[[120533,120533],\"mapped\",[964]],[[120534,120534],\"mapped\",[965]],[[120535,120535],\"mapped\",[966]],[[120536,120536],\"mapped\",[967]],[[120537,120537],\"mapped\",[968]],[[120538,120538],\"mapped\",[969]],[[120539,120539],\"mapped\",[8706]],[[120540,120540],\"mapped\",[949]],[[120541,120541],\"mapped\",[952]],[[120542,120542],\"mapped\",[954]],[[120543,120543],\"mapped\",[966]],[[120544,120544],\"mapped\",[961]],[[120545,120545],\"mapped\",[960]],[[120546,120546],\"mapped\",[945]],[[120547,120547],\"mapped\",[946]],[[120548,120548],\"mapped\",[947]],[[120549,120549],\"mapped\",[948]],[[120550,120550],\"mapped\",[949]],[[120551,120551],\"mapped\",[950]],[[120552,120552],\"mapped\",[951]],[[120553,120553],\"mapped\",[952]],[[120554,120554],\"mapped\",[953]],[[120555,120555],\"mapped\",[954]],[[120556,120556],\"mapped\",[955]],[[120557,120557],\"mapped\",[956]],[[120558,120558],\"mapped\",[957]],[[120559,120559],\"mapped\",[958]],[[120560,120560],\"mapped\",[959]],[[120561,120561],\"mapped\",[960]],[[120562,120562],\"mapped\",[961]],[[120563,120563],\"mapped\",[952]],[[120564,120564],\"mapped\",[963]],[[120565,120565],\"mapped\",[964]],[[120566,120566],\"mapped\",[965]],[[120567,120567],\"mapped\",[966]],[[120568,120568],\"mapped\",[967]],[[120569,120569],\"mapped\",[968]],[[120570,120570],\"mapped\",[969]],[[120571,120571],\"mapped\",[8711]],[[120572,120572],\"mapped\",[945]],[[120573,120573],\"mapped\",[946]],[[120574,120574],\"mapped\",[947]],[[120575,120575],\"mapped\",[948]],[[120576,120576],\"mapped\",[949]],[[120577,120577],\"mapped\",[950]],[[120578,120578],\"mapped\",[951]],[[120579,120579],\"mapped\",[952]],[[120580,120580],\"mapped\",[953]],[[120581,120581],\"mapped\",[954]],[[120582,120582],\"mapped\",[955]],[[120583,120583],\"mapped\",[956]],[[120584,120584],\"mapped\",[957]],[[120585,120585],\"mapped\",[958]],[[120586,120586],\"mapped\",[959]],[[120587,120587],\"mapped\",[960]],[[120588,120588],\"mapped\",[961]],[[120589,120590],\"mapped\",[963]],[[120591,120591],\"mapped\",[964]],[[120592,120592],\"mapped\",[965]],[[120593,120593],\"mapped\",[966]],[[120594,120594],\"mapped\",[967]],[[120595,120595],\"mapped\",[968]],[[120596,120596],\"mapped\",[969]],[[120597,120597],\"mapped\",[8706]],[[120598,120598],\"mapped\",[949]],[[120599,120599],\"mapped\",[952]],[[120600,120600],\"mapped\",[954]],[[120601,120601],\"mapped\",[966]],[[120602,120602],\"mapped\",[961]],[[120603,120603],\"mapped\",[960]],[[120604,120604],\"mapped\",[945]],[[120605,120605],\"mapped\",[946]],[[120606,120606],\"mapped\",[947]],[[120607,120607],\"mapped\",[948]],[[120608,120608],\"mapped\",[949]],[[120609,120609],\"mapped\",[950]],[[120610,120610],\"mapped\",[951]],[[120611,120611],\"mapped\",[952]],[[120612,120612],\"mapped\",[953]],[[120613,120613],\"mapped\",[954]],[[120614,120614],\"mapped\",[955]],[[120615,120615],\"mapped\",[956]],[[120616,120616],\"mapped\",[957]],[[120617,120617],\"mapped\",[958]],[[120618,120618],\"mapped\",[959]],[[120619,120619],\"mapped\",[960]],[[120620,120620],\"mapped\",[961]],[[120621,120621],\"mapped\",[952]],[[120622,120622],\"mapped\",[963]],[[120623,120623],\"mapped\",[964]],[[120624,120624],\"mapped\",[965]],[[120625,120625],\"mapped\",[966]],[[120626,120626],\"mapped\",[967]],[[120627,120627],\"mapped\",[968]],[[120628,120628],\"mapped\",[969]],[[120629,120629],\"mapped\",[8711]],[[120630,120630],\"mapped\",[945]],[[120631,120631],\"mapped\",[946]],[[120632,120632],\"mapped\",[947]],[[120633,120633],\"mapped\",[948]],[[120634,120634],\"mapped\",[949]],[[120635,120635],\"mapped\",[950]],[[120636,120636],\"mapped\",[951]],[[120637,120637],\"mapped\",[952]],[[120638,120638],\"mapped\",[953]],[[120639,120639],\"mapped\",[954]],[[120640,120640],\"mapped\",[955]],[[120641,120641],\"mapped\",[956]],[[120642,120642],\"mapped\",[957]],[[120643,120643],\"mapped\",[958]],[[120644,120644],\"mapped\",[959]],[[120645,120645],\"mapped\",[960]],[[120646,120646],\"mapped\",[961]],[[120647,120648],\"mapped\",[963]],[[120649,120649],\"mapped\",[964]],[[120650,120650],\"mapped\",[965]],[[120651,120651],\"mapped\",[966]],[[120652,120652],\"mapped\",[967]],[[120653,120653],\"mapped\",[968]],[[120654,120654],\"mapped\",[969]],[[120655,120655],\"mapped\",[8706]],[[120656,120656],\"mapped\",[949]],[[120657,120657],\"mapped\",[952]],[[120658,120658],\"mapped\",[954]],[[120659,120659],\"mapped\",[966]],[[120660,120660],\"mapped\",[961]],[[120661,120661],\"mapped\",[960]],[[120662,120662],\"mapped\",[945]],[[120663,120663],\"mapped\",[946]],[[120664,120664],\"mapped\",[947]],[[120665,120665],\"mapped\",[948]],[[120666,120666],\"mapped\",[949]],[[120667,120667],\"mapped\",[950]],[[120668,120668],\"mapped\",[951]],[[120669,120669],\"mapped\",[952]],[[120670,120670],\"mapped\",[953]],[[120671,120671],\"mapped\",[954]],[[120672,120672],\"mapped\",[955]],[[120673,120673],\"mapped\",[956]],[[120674,120674],\"mapped\",[957]],[[120675,120675],\"mapped\",[958]],[[120676,120676],\"mapped\",[959]],[[120677,120677],\"mapped\",[960]],[[120678,120678],\"mapped\",[961]],[[120679,120679],\"mapped\",[952]],[[120680,120680],\"mapped\",[963]],[[120681,120681],\"mapped\",[964]],[[120682,120682],\"mapped\",[965]],[[120683,120683],\"mapped\",[966]],[[120684,120684],\"mapped\",[967]],[[120685,120685],\"mapped\",[968]],[[120686,120686],\"mapped\",[969]],[[120687,120687],\"mapped\",[8711]],[[120688,120688],\"mapped\",[945]],[[120689,120689],\"mapped\",[946]],[[120690,120690],\"mapped\",[947]],[[120691,120691],\"mapped\",[948]],[[120692,120692],\"mapped\",[949]],[[120693,120693],\"mapped\",[950]],[[120694,120694],\"mapped\",[951]],[[120695,120695],\"mapped\",[952]],[[120696,120696],\"mapped\",[953]],[[120697,120697],\"mapped\",[954]],[[120698,120698],\"mapped\",[955]],[[120699,120699],\"mapped\",[956]],[[120700,120700],\"mapped\",[957]],[[120701,120701],\"mapped\",[958]],[[120702,120702],\"mapped\",[959]],[[120703,120703],\"mapped\",[960]],[[120704,120704],\"mapped\",[961]],[[120705,120706],\"mapped\",[963]],[[120707,120707],\"mapped\",[964]],[[120708,120708],\"mapped\",[965]],[[120709,120709],\"mapped\",[966]],[[120710,120710],\"mapped\",[967]],[[120711,120711],\"mapped\",[968]],[[120712,120712],\"mapped\",[969]],[[120713,120713],\"mapped\",[8706]],[[120714,120714],\"mapped\",[949]],[[120715,120715],\"mapped\",[952]],[[120716,120716],\"mapped\",[954]],[[120717,120717],\"mapped\",[966]],[[120718,120718],\"mapped\",[961]],[[120719,120719],\"mapped\",[960]],[[120720,120720],\"mapped\",[945]],[[120721,120721],\"mapped\",[946]],[[120722,120722],\"mapped\",[947]],[[120723,120723],\"mapped\",[948]],[[120724,120724],\"mapped\",[949]],[[120725,120725],\"mapped\",[950]],[[120726,120726],\"mapped\",[951]],[[120727,120727],\"mapped\",[952]],[[120728,120728],\"mapped\",[953]],[[120729,120729],\"mapped\",[954]],[[120730,120730],\"mapped\",[955]],[[120731,120731],\"mapped\",[956]],[[120732,120732],\"mapped\",[957]],[[120733,120733],\"mapped\",[958]],[[120734,120734],\"mapped\",[959]],[[120735,120735],\"mapped\",[960]],[[120736,120736],\"mapped\",[961]],[[120737,120737],\"mapped\",[952]],[[120738,120738],\"mapped\",[963]],[[120739,120739],\"mapped\",[964]],[[120740,120740],\"mapped\",[965]],[[120741,120741],\"mapped\",[966]],[[120742,120742],\"mapped\",[967]],[[120743,120743],\"mapped\",[968]],[[120744,120744],\"mapped\",[969]],[[120745,120745],\"mapped\",[8711]],[[120746,120746],\"mapped\",[945]],[[120747,120747],\"mapped\",[946]],[[120748,120748],\"mapped\",[947]],[[120749,120749],\"mapped\",[948]],[[120750,120750],\"mapped\",[949]],[[120751,120751],\"mapped\",[950]],[[120752,120752],\"mapped\",[951]],[[120753,120753],\"mapped\",[952]],[[120754,120754],\"mapped\",[953]],[[120755,120755],\"mapped\",[954]],[[120756,120756],\"mapped\",[955]],[[120757,120757],\"mapped\",[956]],[[120758,120758],\"mapped\",[957]],[[120759,120759],\"mapped\",[958]],[[120760,120760],\"mapped\",[959]],[[120761,120761],\"mapped\",[960]],[[120762,120762],\"mapped\",[961]],[[120763,120764],\"mapped\",[963]],[[120765,120765],\"mapped\",[964]],[[120766,120766],\"mapped\",[965]],[[120767,120767],\"mapped\",[966]],[[120768,120768],\"mapped\",[967]],[[120769,120769],\"mapped\",[968]],[[120770,120770],\"mapped\",[969]],[[120771,120771],\"mapped\",[8706]],[[120772,120772],\"mapped\",[949]],[[120773,120773],\"mapped\",[952]],[[120774,120774],\"mapped\",[954]],[[120775,120775],\"mapped\",[966]],[[120776,120776],\"mapped\",[961]],[[120777,120777],\"mapped\",[960]],[[120778,120779],\"mapped\",[989]],[[120780,120781],\"disallowed\"],[[120782,120782],\"mapped\",[48]],[[120783,120783],\"mapped\",[49]],[[120784,120784],\"mapped\",[50]],[[120785,120785],\"mapped\",[51]],[[120786,120786],\"mapped\",[52]],[[120787,120787],\"mapped\",[53]],[[120788,120788],\"mapped\",[54]],[[120789,120789],\"mapped\",[55]],[[120790,120790],\"mapped\",[56]],[[120791,120791],\"mapped\",[57]],[[120792,120792],\"mapped\",[48]],[[120793,120793],\"mapped\",[49]],[[120794,120794],\"mapped\",[50]],[[120795,120795],\"mapped\",[51]],[[120796,120796],\"mapped\",[52]],[[120797,120797],\"mapped\",[53]],[[120798,120798],\"mapped\",[54]],[[120799,120799],\"mapped\",[55]],[[120800,120800],\"mapped\",[56]],[[120801,120801],\"mapped\",[57]],[[120802,120802],\"mapped\",[48]],[[120803,120803],\"mapped\",[49]],[[120804,120804],\"mapped\",[50]],[[120805,120805],\"mapped\",[51]],[[120806,120806],\"mapped\",[52]],[[120807,120807],\"mapped\",[53]],[[120808,120808],\"mapped\",[54]],[[120809,120809],\"mapped\",[55]],[[120810,120810],\"mapped\",[56]],[[120811,120811],\"mapped\",[57]],[[120812,120812],\"mapped\",[48]],[[120813,120813],\"mapped\",[49]],[[120814,120814],\"mapped\",[50]],[[120815,120815],\"mapped\",[51]],[[120816,120816],\"mapped\",[52]],[[120817,120817],\"mapped\",[53]],[[120818,120818],\"mapped\",[54]],[[120819,120819],\"mapped\",[55]],[[120820,120820],\"mapped\",[56]],[[120821,120821],\"mapped\",[57]],[[120822,120822],\"mapped\",[48]],[[120823,120823],\"mapped\",[49]],[[120824,120824],\"mapped\",[50]],[[120825,120825],\"mapped\",[51]],[[120826,120826],\"mapped\",[52]],[[120827,120827],\"mapped\",[53]],[[120828,120828],\"mapped\",[54]],[[120829,120829],\"mapped\",[55]],[[120830,120830],\"mapped\",[56]],[[120831,120831],\"mapped\",[57]],[[120832,121343],\"valid\",[],\"NV8\"],[[121344,121398],\"valid\"],[[121399,121402],\"valid\",[],\"NV8\"],[[121403,121452],\"valid\"],[[121453,121460],\"valid\",[],\"NV8\"],[[121461,121461],\"valid\"],[[121462,121475],\"valid\",[],\"NV8\"],[[121476,121476],\"valid\"],[[121477,121483],\"valid\",[],\"NV8\"],[[121484,121498],\"disallowed\"],[[121499,121503],\"valid\"],[[121504,121504],\"disallowed\"],[[121505,121519],\"valid\"],[[121520,124927],\"disallowed\"],[[124928,125124],\"valid\"],[[125125,125126],\"disallowed\"],[[125127,125135],\"valid\",[],\"NV8\"],[[125136,125142],\"valid\"],[[125143,126463],\"disallowed\"],[[126464,126464],\"mapped\",[1575]],[[126465,126465],\"mapped\",[1576]],[[126466,126466],\"mapped\",[1580]],[[126467,126467],\"mapped\",[1583]],[[126468,126468],\"disallowed\"],[[126469,126469],\"mapped\",[1608]],[[126470,126470],\"mapped\",[1586]],[[126471,126471],\"mapped\",[1581]],[[126472,126472],\"mapped\",[1591]],[[126473,126473],\"mapped\",[1610]],[[126474,126474],\"mapped\",[1603]],[[126475,126475],\"mapped\",[1604]],[[126476,126476],\"mapped\",[1605]],[[126477,126477],\"mapped\",[1606]],[[126478,126478],\"mapped\",[1587]],[[126479,126479],\"mapped\",[1593]],[[126480,126480],\"mapped\",[1601]],[[126481,126481],\"mapped\",[1589]],[[126482,126482],\"mapped\",[1602]],[[126483,126483],\"mapped\",[1585]],[[126484,126484],\"mapped\",[1588]],[[126485,126485],\"mapped\",[1578]],[[126486,126486],\"mapped\",[1579]],[[126487,126487],\"mapped\",[1582]],[[126488,126488],\"mapped\",[1584]],[[126489,126489],\"mapped\",[1590]],[[126490,126490],\"mapped\",[1592]],[[126491,126491],\"mapped\",[1594]],[[126492,126492],\"mapped\",[1646]],[[126493,126493],\"mapped\",[1722]],[[126494,126494],\"mapped\",[1697]],[[126495,126495],\"mapped\",[1647]],[[126496,126496],\"disallowed\"],[[126497,126497],\"mapped\",[1576]],[[126498,126498],\"mapped\",[1580]],[[126499,126499],\"disallowed\"],[[126500,126500],\"mapped\",[1607]],[[126501,126502],\"disallowed\"],[[126503,126503],\"mapped\",[1581]],[[126504,126504],\"disallowed\"],[[126505,126505],\"mapped\",[1610]],[[126506,126506],\"mapped\",[1603]],[[126507,126507],\"mapped\",[1604]],[[126508,126508],\"mapped\",[1605]],[[126509,126509],\"mapped\",[1606]],[[126510,126510],\"mapped\",[1587]],[[126511,126511],\"mapped\",[1593]],[[126512,126512],\"mapped\",[1601]],[[126513,126513],\"mapped\",[1589]],[[126514,126514],\"mapped\",[1602]],[[126515,126515],\"disallowed\"],[[126516,126516],\"mapped\",[1588]],[[126517,126517],\"mapped\",[1578]],[[126518,126518],\"mapped\",[1579]],[[126519,126519],\"mapped\",[1582]],[[126520,126520],\"disallowed\"],[[126521,126521],\"mapped\",[1590]],[[126522,126522],\"disallowed\"],[[126523,126523],\"mapped\",[1594]],[[126524,126529],\"disallowed\"],[[126530,126530],\"mapped\",[1580]],[[126531,126534],\"disallowed\"],[[126535,126535],\"mapped\",[1581]],[[126536,126536],\"disallowed\"],[[126537,126537],\"mapped\",[1610]],[[126538,126538],\"disallowed\"],[[126539,126539],\"mapped\",[1604]],[[126540,126540],\"disallowed\"],[[126541,126541],\"mapped\",[1606]],[[126542,126542],\"mapped\",[1587]],[[126543,126543],\"mapped\",[1593]],[[126544,126544],\"disallowed\"],[[126545,126545],\"mapped\",[1589]],[[126546,126546],\"mapped\",[1602]],[[126547,126547],\"disallowed\"],[[126548,126548],\"mapped\",[1588]],[[126549,126550],\"disallowed\"],[[126551,126551],\"mapped\",[1582]],[[126552,126552],\"disallowed\"],[[126553,126553],\"mapped\",[1590]],[[126554,126554],\"disallowed\"],[[126555,126555],\"mapped\",[1594]],[[126556,126556],\"disallowed\"],[[126557,126557],\"mapped\",[1722]],[[126558,126558],\"disallowed\"],[[126559,126559],\"mapped\",[1647]],[[126560,126560],\"disallowed\"],[[126561,126561],\"mapped\",[1576]],[[126562,126562],\"mapped\",[1580]],[[126563,126563],\"disallowed\"],[[126564,126564],\"mapped\",[1607]],[[126565,126566],\"disallowed\"],[[126567,126567],\"mapped\",[1581]],[[126568,126568],\"mapped\",[1591]],[[126569,126569],\"mapped\",[1610]],[[126570,126570],\"mapped\",[1603]],[[126571,126571],\"disallowed\"],[[126572,126572],\"mapped\",[1605]],[[126573,126573],\"mapped\",[1606]],[[126574,126574],\"mapped\",[1587]],[[126575,126575],\"mapped\",[1593]],[[126576,126576],\"mapped\",[1601]],[[126577,126577],\"mapped\",[1589]],[[126578,126578],\"mapped\",[1602]],[[126579,126579],\"disallowed\"],[[126580,126580],\"mapped\",[1588]],[[126581,126581],\"mapped\",[1578]],[[126582,126582],\"mapped\",[1579]],[[126583,126583],\"mapped\",[1582]],[[126584,126584],\"disallowed\"],[[126585,126585],\"mapped\",[1590]],[[126586,126586],\"mapped\",[1592]],[[126587,126587],\"mapped\",[1594]],[[126588,126588],\"mapped\",[1646]],[[126589,126589],\"disallowed\"],[[126590,126590],\"mapped\",[1697]],[[126591,126591],\"disallowed\"],[[126592,126592],\"mapped\",[1575]],[[126593,126593],\"mapped\",[1576]],[[126594,126594],\"mapped\",[1580]],[[126595,126595],\"mapped\",[1583]],[[126596,126596],\"mapped\",[1607]],[[126597,126597],\"mapped\",[1608]],[[126598,126598],\"mapped\",[1586]],[[126599,126599],\"mapped\",[1581]],[[126600,126600],\"mapped\",[1591]],[[126601,126601],\"mapped\",[1610]],[[126602,126602],\"disallowed\"],[[126603,126603],\"mapped\",[1604]],[[126604,126604],\"mapped\",[1605]],[[126605,126605],\"mapped\",[1606]],[[126606,126606],\"mapped\",[1587]],[[126607,126607],\"mapped\",[1593]],[[126608,126608],\"mapped\",[1601]],[[126609,126609],\"mapped\",[1589]],[[126610,126610],\"mapped\",[1602]],[[126611,126611],\"mapped\",[1585]],[[126612,126612],\"mapped\",[1588]],[[126613,126613],\"mapped\",[1578]],[[126614,126614],\"mapped\",[1579]],[[126615,126615],\"mapped\",[1582]],[[126616,126616],\"mapped\",[1584]],[[126617,126617],\"mapped\",[1590]],[[126618,126618],\"mapped\",[1592]],[[126619,126619],\"mapped\",[1594]],[[126620,126624],\"disallowed\"],[[126625,126625],\"mapped\",[1576]],[[126626,126626],\"mapped\",[1580]],[[126627,126627],\"mapped\",[1583]],[[126628,126628],\"disallowed\"],[[126629,126629],\"mapped\",[1608]],[[126630,126630],\"mapped\",[1586]],[[126631,126631],\"mapped\",[1581]],[[126632,126632],\"mapped\",[1591]],[[126633,126633],\"mapped\",[1610]],[[126634,126634],\"disallowed\"],[[126635,126635],\"mapped\",[1604]],[[126636,126636],\"mapped\",[1605]],[[126637,126637],\"mapped\",[1606]],[[126638,126638],\"mapped\",[1587]],[[126639,126639],\"mapped\",[1593]],[[126640,126640],\"mapped\",[1601]],[[126641,126641],\"mapped\",[1589]],[[126642,126642],\"mapped\",[1602]],[[126643,126643],\"mapped\",[1585]],[[126644,126644],\"mapped\",[1588]],[[126645,126645],\"mapped\",[1578]],[[126646,126646],\"mapped\",[1579]],[[126647,126647],\"mapped\",[1582]],[[126648,126648],\"mapped\",[1584]],[[126649,126649],\"mapped\",[1590]],[[126650,126650],\"mapped\",[1592]],[[126651,126651],\"mapped\",[1594]],[[126652,126703],\"disallowed\"],[[126704,126705],\"valid\",[],\"NV8\"],[[126706,126975],\"disallowed\"],[[126976,127019],\"valid\",[],\"NV8\"],[[127020,127023],\"disallowed\"],[[127024,127123],\"valid\",[],\"NV8\"],[[127124,127135],\"disallowed\"],[[127136,127150],\"valid\",[],\"NV8\"],[[127151,127152],\"disallowed\"],[[127153,127166],\"valid\",[],\"NV8\"],[[127167,127167],\"valid\",[],\"NV8\"],[[127168,127168],\"disallowed\"],[[127169,127183],\"valid\",[],\"NV8\"],[[127184,127184],\"disallowed\"],[[127185,127199],\"valid\",[],\"NV8\"],[[127200,127221],\"valid\",[],\"NV8\"],[[127222,127231],\"disallowed\"],[[127232,127232],\"disallowed\"],[[127233,127233],\"disallowed_STD3_mapped\",[48,44]],[[127234,127234],\"disallowed_STD3_mapped\",[49,44]],[[127235,127235],\"disallowed_STD3_mapped\",[50,44]],[[127236,127236],\"disallowed_STD3_mapped\",[51,44]],[[127237,127237],\"disallowed_STD3_mapped\",[52,44]],[[127238,127238],\"disallowed_STD3_mapped\",[53,44]],[[127239,127239],\"disallowed_STD3_mapped\",[54,44]],[[127240,127240],\"disallowed_STD3_mapped\",[55,44]],[[127241,127241],\"disallowed_STD3_mapped\",[56,44]],[[127242,127242],\"disallowed_STD3_mapped\",[57,44]],[[127243,127244],\"valid\",[],\"NV8\"],[[127245,127247],\"disallowed\"],[[127248,127248],\"disallowed_STD3_mapped\",[40,97,41]],[[127249,127249],\"disallowed_STD3_mapped\",[40,98,41]],[[127250,127250],\"disallowed_STD3_mapped\",[40,99,41]],[[127251,127251],\"disallowed_STD3_mapped\",[40,100,41]],[[127252,127252],\"disallowed_STD3_mapped\",[40,101,41]],[[127253,127253],\"disallowed_STD3_mapped\",[40,102,41]],[[127254,127254],\"disallowed_STD3_mapped\",[40,103,41]],[[127255,127255],\"disallowed_STD3_mapped\",[40,104,41]],[[127256,127256],\"disallowed_STD3_mapped\",[40,105,41]],[[127257,127257],\"disallowed_STD3_mapped\",[40,106,41]],[[127258,127258],\"disallowed_STD3_mapped\",[40,107,41]],[[127259,127259],\"disallowed_STD3_mapped\",[40,108,41]],[[127260,127260],\"disallowed_STD3_mapped\",[40,109,41]],[[127261,127261],\"disallowed_STD3_mapped\",[40,110,41]],[[127262,127262],\"disallowed_STD3_mapped\",[40,111,41]],[[127263,127263],\"disallowed_STD3_mapped\",[40,112,41]],[[127264,127264],\"disallowed_STD3_mapped\",[40,113,41]],[[127265,127265],\"disallowed_STD3_mapped\",[40,114,41]],[[127266,127266],\"disallowed_STD3_mapped\",[40,115,41]],[[127267,127267],\"disallowed_STD3_mapped\",[40,116,41]],[[127268,127268],\"disallowed_STD3_mapped\",[40,117,41]],[[127269,127269],\"disallowed_STD3_mapped\",[40,118,41]],[[127270,127270],\"disallowed_STD3_mapped\",[40,119,41]],[[127271,127271],\"disallowed_STD3_mapped\",[40,120,41]],[[127272,127272],\"disallowed_STD3_mapped\",[40,121,41]],[[127273,127273],\"disallowed_STD3_mapped\",[40,122,41]],[[127274,127274],\"mapped\",[12308,115,12309]],[[127275,127275],\"mapped\",[99]],[[127276,127276],\"mapped\",[114]],[[127277,127277],\"mapped\",[99,100]],[[127278,127278],\"mapped\",[119,122]],[[127279,127279],\"disallowed\"],[[127280,127280],\"mapped\",[97]],[[127281,127281],\"mapped\",[98]],[[127282,127282],\"mapped\",[99]],[[127283,127283],\"mapped\",[100]],[[127284,127284],\"mapped\",[101]],[[127285,127285],\"mapped\",[102]],[[127286,127286],\"mapped\",[103]],[[127287,127287],\"mapped\",[104]],[[127288,127288],\"mapped\",[105]],[[127289,127289],\"mapped\",[106]],[[127290,127290],\"mapped\",[107]],[[127291,127291],\"mapped\",[108]],[[127292,127292],\"mapped\",[109]],[[127293,127293],\"mapped\",[110]],[[127294,127294],\"mapped\",[111]],[[127295,127295],\"mapped\",[112]],[[127296,127296],\"mapped\",[113]],[[127297,127297],\"mapped\",[114]],[[127298,127298],\"mapped\",[115]],[[127299,127299],\"mapped\",[116]],[[127300,127300],\"mapped\",[117]],[[127301,127301],\"mapped\",[118]],[[127302,127302],\"mapped\",[119]],[[127303,127303],\"mapped\",[120]],[[127304,127304],\"mapped\",[121]],[[127305,127305],\"mapped\",[122]],[[127306,127306],\"mapped\",[104,118]],[[127307,127307],\"mapped\",[109,118]],[[127308,127308],\"mapped\",[115,100]],[[127309,127309],\"mapped\",[115,115]],[[127310,127310],\"mapped\",[112,112,118]],[[127311,127311],\"mapped\",[119,99]],[[127312,127318],\"valid\",[],\"NV8\"],[[127319,127319],\"valid\",[],\"NV8\"],[[127320,127326],\"valid\",[],\"NV8\"],[[127327,127327],\"valid\",[],\"NV8\"],[[127328,127337],\"valid\",[],\"NV8\"],[[127338,127338],\"mapped\",[109,99]],[[127339,127339],\"mapped\",[109,100]],[[127340,127343],\"disallowed\"],[[127344,127352],\"valid\",[],\"NV8\"],[[127353,127353],\"valid\",[],\"NV8\"],[[127354,127354],\"valid\",[],\"NV8\"],[[127355,127356],\"valid\",[],\"NV8\"],[[127357,127358],\"valid\",[],\"NV8\"],[[127359,127359],\"valid\",[],\"NV8\"],[[127360,127369],\"valid\",[],\"NV8\"],[[127370,127373],\"valid\",[],\"NV8\"],[[127374,127375],\"valid\",[],\"NV8\"],[[127376,127376],\"mapped\",[100,106]],[[127377,127386],\"valid\",[],\"NV8\"],[[127387,127461],\"disallowed\"],[[127462,127487],\"valid\",[],\"NV8\"],[[127488,127488],\"mapped\",[12411,12363]],[[127489,127489],\"mapped\",[12467,12467]],[[127490,127490],\"mapped\",[12469]],[[127491,127503],\"disallowed\"],[[127504,127504],\"mapped\",[25163]],[[127505,127505],\"mapped\",[23383]],[[127506,127506],\"mapped\",[21452]],[[127507,127507],\"mapped\",[12487]],[[127508,127508],\"mapped\",[20108]],[[127509,127509],\"mapped\",[22810]],[[127510,127510],\"mapped\",[35299]],[[127511,127511],\"mapped\",[22825]],[[127512,127512],\"mapped\",[20132]],[[127513,127513],\"mapped\",[26144]],[[127514,127514],\"mapped\",[28961]],[[127515,127515],\"mapped\",[26009]],[[127516,127516],\"mapped\",[21069]],[[127517,127517],\"mapped\",[24460]],[[127518,127518],\"mapped\",[20877]],[[127519,127519],\"mapped\",[26032]],[[127520,127520],\"mapped\",[21021]],[[127521,127521],\"mapped\",[32066]],[[127522,127522],\"mapped\",[29983]],[[127523,127523],\"mapped\",[36009]],[[127524,127524],\"mapped\",[22768]],[[127525,127525],\"mapped\",[21561]],[[127526,127526],\"mapped\",[28436]],[[127527,127527],\"mapped\",[25237]],[[127528,127528],\"mapped\",[25429]],[[127529,127529],\"mapped\",[19968]],[[127530,127530],\"mapped\",[19977]],[[127531,127531],\"mapped\",[36938]],[[127532,127532],\"mapped\",[24038]],[[127533,127533],\"mapped\",[20013]],[[127534,127534],\"mapped\",[21491]],[[127535,127535],\"mapped\",[25351]],[[127536,127536],\"mapped\",[36208]],[[127537,127537],\"mapped\",[25171]],[[127538,127538],\"mapped\",[31105]],[[127539,127539],\"mapped\",[31354]],[[127540,127540],\"mapped\",[21512]],[[127541,127541],\"mapped\",[28288]],[[127542,127542],\"mapped\",[26377]],[[127543,127543],\"mapped\",[26376]],[[127544,127544],\"mapped\",[30003]],[[127545,127545],\"mapped\",[21106]],[[127546,127546],\"mapped\",[21942]],[[127547,127551],\"disallowed\"],[[127552,127552],\"mapped\",[12308,26412,12309]],[[127553,127553],\"mapped\",[12308,19977,12309]],[[127554,127554],\"mapped\",[12308,20108,12309]],[[127555,127555],\"mapped\",[12308,23433,12309]],[[127556,127556],\"mapped\",[12308,28857,12309]],[[127557,127557],\"mapped\",[12308,25171,12309]],[[127558,127558],\"mapped\",[12308,30423,12309]],[[127559,127559],\"mapped\",[12308,21213,12309]],[[127560,127560],\"mapped\",[12308,25943,12309]],[[127561,127567],\"disallowed\"],[[127568,127568],\"mapped\",[24471]],[[127569,127569],\"mapped\",[21487]],[[127570,127743],\"disallowed\"],[[127744,127776],\"valid\",[],\"NV8\"],[[127777,127788],\"valid\",[],\"NV8\"],[[127789,127791],\"valid\",[],\"NV8\"],[[127792,127797],\"valid\",[],\"NV8\"],[[127798,127798],\"valid\",[],\"NV8\"],[[127799,127868],\"valid\",[],\"NV8\"],[[127869,127869],\"valid\",[],\"NV8\"],[[127870,127871],\"valid\",[],\"NV8\"],[[127872,127891],\"valid\",[],\"NV8\"],[[127892,127903],\"valid\",[],\"NV8\"],[[127904,127940],\"valid\",[],\"NV8\"],[[127941,127941],\"valid\",[],\"NV8\"],[[127942,127946],\"valid\",[],\"NV8\"],[[127947,127950],\"valid\",[],\"NV8\"],[[127951,127955],\"valid\",[],\"NV8\"],[[127956,127967],\"valid\",[],\"NV8\"],[[127968,127984],\"valid\",[],\"NV8\"],[[127985,127991],\"valid\",[],\"NV8\"],[[127992,127999],\"valid\",[],\"NV8\"],[[128000,128062],\"valid\",[],\"NV8\"],[[128063,128063],\"valid\",[],\"NV8\"],[[128064,128064],\"valid\",[],\"NV8\"],[[128065,128065],\"valid\",[],\"NV8\"],[[128066,128247],\"valid\",[],\"NV8\"],[[128248,128248],\"valid\",[],\"NV8\"],[[128249,128252],\"valid\",[],\"NV8\"],[[128253,128254],\"valid\",[],\"NV8\"],[[128255,128255],\"valid\",[],\"NV8\"],[[128256,128317],\"valid\",[],\"NV8\"],[[128318,128319],\"valid\",[],\"NV8\"],[[128320,128323],\"valid\",[],\"NV8\"],[[128324,128330],\"valid\",[],\"NV8\"],[[128331,128335],\"valid\",[],\"NV8\"],[[128336,128359],\"valid\",[],\"NV8\"],[[128360,128377],\"valid\",[],\"NV8\"],[[128378,128378],\"disallowed\"],[[128379,128419],\"valid\",[],\"NV8\"],[[128420,128420],\"disallowed\"],[[128421,128506],\"valid\",[],\"NV8\"],[[128507,128511],\"valid\",[],\"NV8\"],[[128512,128512],\"valid\",[],\"NV8\"],[[128513,128528],\"valid\",[],\"NV8\"],[[128529,128529],\"valid\",[],\"NV8\"],[[128530,128532],\"valid\",[],\"NV8\"],[[128533,128533],\"valid\",[],\"NV8\"],[[128534,128534],\"valid\",[],\"NV8\"],[[128535,128535],\"valid\",[],\"NV8\"],[[128536,128536],\"valid\",[],\"NV8\"],[[128537,128537],\"valid\",[],\"NV8\"],[[128538,128538],\"valid\",[],\"NV8\"],[[128539,128539],\"valid\",[],\"NV8\"],[[128540,128542],\"valid\",[],\"NV8\"],[[128543,128543],\"valid\",[],\"NV8\"],[[128544,128549],\"valid\",[],\"NV8\"],[[128550,128551],\"valid\",[],\"NV8\"],[[128552,128555],\"valid\",[],\"NV8\"],[[128556,128556],\"valid\",[],\"NV8\"],[[128557,128557],\"valid\",[],\"NV8\"],[[128558,128559],\"valid\",[],\"NV8\"],[[128560,128563],\"valid\",[],\"NV8\"],[[128564,128564],\"valid\",[],\"NV8\"],[[128565,128576],\"valid\",[],\"NV8\"],[[128577,128578],\"valid\",[],\"NV8\"],[[128579,128580],\"valid\",[],\"NV8\"],[[128581,128591],\"valid\",[],\"NV8\"],[[128592,128639],\"valid\",[],\"NV8\"],[[128640,128709],\"valid\",[],\"NV8\"],[[128710,128719],\"valid\",[],\"NV8\"],[[128720,128720],\"valid\",[],\"NV8\"],[[128721,128735],\"disallowed\"],[[128736,128748],\"valid\",[],\"NV8\"],[[128749,128751],\"disallowed\"],[[128752,128755],\"valid\",[],\"NV8\"],[[128756,128767],\"disallowed\"],[[128768,128883],\"valid\",[],\"NV8\"],[[128884,128895],\"disallowed\"],[[128896,128980],\"valid\",[],\"NV8\"],[[128981,129023],\"disallowed\"],[[129024,129035],\"valid\",[],\"NV8\"],[[129036,129039],\"disallowed\"],[[129040,129095],\"valid\",[],\"NV8\"],[[129096,129103],\"disallowed\"],[[129104,129113],\"valid\",[],\"NV8\"],[[129114,129119],\"disallowed\"],[[129120,129159],\"valid\",[],\"NV8\"],[[129160,129167],\"disallowed\"],[[129168,129197],\"valid\",[],\"NV8\"],[[129198,129295],\"disallowed\"],[[129296,129304],\"valid\",[],\"NV8\"],[[129305,129407],\"disallowed\"],[[129408,129412],\"valid\",[],\"NV8\"],[[129413,129471],\"disallowed\"],[[129472,129472],\"valid\",[],\"NV8\"],[[129473,131069],\"disallowed\"],[[131070,131071],\"disallowed\"],[[131072,173782],\"valid\"],[[173783,173823],\"disallowed\"],[[173824,177972],\"valid\"],[[177973,177983],\"disallowed\"],[[177984,178205],\"valid\"],[[178206,178207],\"disallowed\"],[[178208,183969],\"valid\"],[[183970,194559],\"disallowed\"],[[194560,194560],\"mapped\",[20029]],[[194561,194561],\"mapped\",[20024]],[[194562,194562],\"mapped\",[20033]],[[194563,194563],\"mapped\",[131362]],[[194564,194564],\"mapped\",[20320]],[[194565,194565],\"mapped\",[20398]],[[194566,194566],\"mapped\",[20411]],[[194567,194567],\"mapped\",[20482]],[[194568,194568],\"mapped\",[20602]],[[194569,194569],\"mapped\",[20633]],[[194570,194570],\"mapped\",[20711]],[[194571,194571],\"mapped\",[20687]],[[194572,194572],\"mapped\",[13470]],[[194573,194573],\"mapped\",[132666]],[[194574,194574],\"mapped\",[20813]],[[194575,194575],\"mapped\",[20820]],[[194576,194576],\"mapped\",[20836]],[[194577,194577],\"mapped\",[20855]],[[194578,194578],\"mapped\",[132380]],[[194579,194579],\"mapped\",[13497]],[[194580,194580],\"mapped\",[20839]],[[194581,194581],\"mapped\",[20877]],[[194582,194582],\"mapped\",[132427]],[[194583,194583],\"mapped\",[20887]],[[194584,194584],\"mapped\",[20900]],[[194585,194585],\"mapped\",[20172]],[[194586,194586],\"mapped\",[20908]],[[194587,194587],\"mapped\",[20917]],[[194588,194588],\"mapped\",[168415]],[[194589,194589],\"mapped\",[20981]],[[194590,194590],\"mapped\",[20995]],[[194591,194591],\"mapped\",[13535]],[[194592,194592],\"mapped\",[21051]],[[194593,194593],\"mapped\",[21062]],[[194594,194594],\"mapped\",[21106]],[[194595,194595],\"mapped\",[21111]],[[194596,194596],\"mapped\",[13589]],[[194597,194597],\"mapped\",[21191]],[[194598,194598],\"mapped\",[21193]],[[194599,194599],\"mapped\",[21220]],[[194600,194600],\"mapped\",[21242]],[[194601,194601],\"mapped\",[21253]],[[194602,194602],\"mapped\",[21254]],[[194603,194603],\"mapped\",[21271]],[[194604,194604],\"mapped\",[21321]],[[194605,194605],\"mapped\",[21329]],[[194606,194606],\"mapped\",[21338]],[[194607,194607],\"mapped\",[21363]],[[194608,194608],\"mapped\",[21373]],[[194609,194611],\"mapped\",[21375]],[[194612,194612],\"mapped\",[133676]],[[194613,194613],\"mapped\",[28784]],[[194614,194614],\"mapped\",[21450]],[[194615,194615],\"mapped\",[21471]],[[194616,194616],\"mapped\",[133987]],[[194617,194617],\"mapped\",[21483]],[[194618,194618],\"mapped\",[21489]],[[194619,194619],\"mapped\",[21510]],[[194620,194620],\"mapped\",[21662]],[[194621,194621],\"mapped\",[21560]],[[194622,194622],\"mapped\",[21576]],[[194623,194623],\"mapped\",[21608]],[[194624,194624],\"mapped\",[21666]],[[194625,194625],\"mapped\",[21750]],[[194626,194626],\"mapped\",[21776]],[[194627,194627],\"mapped\",[21843]],[[194628,194628],\"mapped\",[21859]],[[194629,194630],\"mapped\",[21892]],[[194631,194631],\"mapped\",[21913]],[[194632,194632],\"mapped\",[21931]],[[194633,194633],\"mapped\",[21939]],[[194634,194634],\"mapped\",[21954]],[[194635,194635],\"mapped\",[22294]],[[194636,194636],\"mapped\",[22022]],[[194637,194637],\"mapped\",[22295]],[[194638,194638],\"mapped\",[22097]],[[194639,194639],\"mapped\",[22132]],[[194640,194640],\"mapped\",[20999]],[[194641,194641],\"mapped\",[22766]],[[194642,194642],\"mapped\",[22478]],[[194643,194643],\"mapped\",[22516]],[[194644,194644],\"mapped\",[22541]],[[194645,194645],\"mapped\",[22411]],[[194646,194646],\"mapped\",[22578]],[[194647,194647],\"mapped\",[22577]],[[194648,194648],\"mapped\",[22700]],[[194649,194649],\"mapped\",[136420]],[[194650,194650],\"mapped\",[22770]],[[194651,194651],\"mapped\",[22775]],[[194652,194652],\"mapped\",[22790]],[[194653,194653],\"mapped\",[22810]],[[194654,194654],\"mapped\",[22818]],[[194655,194655],\"mapped\",[22882]],[[194656,194656],\"mapped\",[136872]],[[194657,194657],\"mapped\",[136938]],[[194658,194658],\"mapped\",[23020]],[[194659,194659],\"mapped\",[23067]],[[194660,194660],\"mapped\",[23079]],[[194661,194661],\"mapped\",[23000]],[[194662,194662],\"mapped\",[23142]],[[194663,194663],\"mapped\",[14062]],[[194664,194664],\"disallowed\"],[[194665,194665],\"mapped\",[23304]],[[194666,194667],\"mapped\",[23358]],[[194668,194668],\"mapped\",[137672]],[[194669,194669],\"mapped\",[23491]],[[194670,194670],\"mapped\",[23512]],[[194671,194671],\"mapped\",[23527]],[[194672,194672],\"mapped\",[23539]],[[194673,194673],\"mapped\",[138008]],[[194674,194674],\"mapped\",[23551]],[[194675,194675],\"mapped\",[23558]],[[194676,194676],\"disallowed\"],[[194677,194677],\"mapped\",[23586]],[[194678,194678],\"mapped\",[14209]],[[194679,194679],\"mapped\",[23648]],[[194680,194680],\"mapped\",[23662]],[[194681,194681],\"mapped\",[23744]],[[194682,194682],\"mapped\",[23693]],[[194683,194683],\"mapped\",[138724]],[[194684,194684],\"mapped\",[23875]],[[194685,194685],\"mapped\",[138726]],[[194686,194686],\"mapped\",[23918]],[[194687,194687],\"mapped\",[23915]],[[194688,194688],\"mapped\",[23932]],[[194689,194689],\"mapped\",[24033]],[[194690,194690],\"mapped\",[24034]],[[194691,194691],\"mapped\",[14383]],[[194692,194692],\"mapped\",[24061]],[[194693,194693],\"mapped\",[24104]],[[194694,194694],\"mapped\",[24125]],[[194695,194695],\"mapped\",[24169]],[[194696,194696],\"mapped\",[14434]],[[194697,194697],\"mapped\",[139651]],[[194698,194698],\"mapped\",[14460]],[[194699,194699],\"mapped\",[24240]],[[194700,194700],\"mapped\",[24243]],[[194701,194701],\"mapped\",[24246]],[[194702,194702],\"mapped\",[24266]],[[194703,194703],\"mapped\",[172946]],[[194704,194704],\"mapped\",[24318]],[[194705,194706],\"mapped\",[140081]],[[194707,194707],\"mapped\",[33281]],[[194708,194709],\"mapped\",[24354]],[[194710,194710],\"mapped\",[14535]],[[194711,194711],\"mapped\",[144056]],[[194712,194712],\"mapped\",[156122]],[[194713,194713],\"mapped\",[24418]],[[194714,194714],\"mapped\",[24427]],[[194715,194715],\"mapped\",[14563]],[[194716,194716],\"mapped\",[24474]],[[194717,194717],\"mapped\",[24525]],[[194718,194718],\"mapped\",[24535]],[[194719,194719],\"mapped\",[24569]],[[194720,194720],\"mapped\",[24705]],[[194721,194721],\"mapped\",[14650]],[[194722,194722],\"mapped\",[14620]],[[194723,194723],\"mapped\",[24724]],[[194724,194724],\"mapped\",[141012]],[[194725,194725],\"mapped\",[24775]],[[194726,194726],\"mapped\",[24904]],[[194727,194727],\"mapped\",[24908]],[[194728,194728],\"mapped\",[24910]],[[194729,194729],\"mapped\",[24908]],[[194730,194730],\"mapped\",[24954]],[[194731,194731],\"mapped\",[24974]],[[194732,194732],\"mapped\",[25010]],[[194733,194733],\"mapped\",[24996]],[[194734,194734],\"mapped\",[25007]],[[194735,194735],\"mapped\",[25054]],[[194736,194736],\"mapped\",[25074]],[[194737,194737],\"mapped\",[25078]],[[194738,194738],\"mapped\",[25104]],[[194739,194739],\"mapped\",[25115]],[[194740,194740],\"mapped\",[25181]],[[194741,194741],\"mapped\",[25265]],[[194742,194742],\"mapped\",[25300]],[[194743,194743],\"mapped\",[25424]],[[194744,194744],\"mapped\",[142092]],[[194745,194745],\"mapped\",[25405]],[[194746,194746],\"mapped\",[25340]],[[194747,194747],\"mapped\",[25448]],[[194748,194748],\"mapped\",[25475]],[[194749,194749],\"mapped\",[25572]],[[194750,194750],\"mapped\",[142321]],[[194751,194751],\"mapped\",[25634]],[[194752,194752],\"mapped\",[25541]],[[194753,194753],\"mapped\",[25513]],[[194754,194754],\"mapped\",[14894]],[[194755,194755],\"mapped\",[25705]],[[194756,194756],\"mapped\",[25726]],[[194757,194757],\"mapped\",[25757]],[[194758,194758],\"mapped\",[25719]],[[194759,194759],\"mapped\",[14956]],[[194760,194760],\"mapped\",[25935]],[[194761,194761],\"mapped\",[25964]],[[194762,194762],\"mapped\",[143370]],[[194763,194763],\"mapped\",[26083]],[[194764,194764],\"mapped\",[26360]],[[194765,194765],\"mapped\",[26185]],[[194766,194766],\"mapped\",[15129]],[[194767,194767],\"mapped\",[26257]],[[194768,194768],\"mapped\",[15112]],[[194769,194769],\"mapped\",[15076]],[[194770,194770],\"mapped\",[20882]],[[194771,194771],\"mapped\",[20885]],[[194772,194772],\"mapped\",[26368]],[[194773,194773],\"mapped\",[26268]],[[194774,194774],\"mapped\",[32941]],[[194775,194775],\"mapped\",[17369]],[[194776,194776],\"mapped\",[26391]],[[194777,194777],\"mapped\",[26395]],[[194778,194778],\"mapped\",[26401]],[[194779,194779],\"mapped\",[26462]],[[194780,194780],\"mapped\",[26451]],[[194781,194781],\"mapped\",[144323]],[[194782,194782],\"mapped\",[15177]],[[194783,194783],\"mapped\",[26618]],[[194784,194784],\"mapped\",[26501]],[[194785,194785],\"mapped\",[26706]],[[194786,194786],\"mapped\",[26757]],[[194787,194787],\"mapped\",[144493]],[[194788,194788],\"mapped\",[26766]],[[194789,194789],\"mapped\",[26655]],[[194790,194790],\"mapped\",[26900]],[[194791,194791],\"mapped\",[15261]],[[194792,194792],\"mapped\",[26946]],[[194793,194793],\"mapped\",[27043]],[[194794,194794],\"mapped\",[27114]],[[194795,194795],\"mapped\",[27304]],[[194796,194796],\"mapped\",[145059]],[[194797,194797],\"mapped\",[27355]],[[194798,194798],\"mapped\",[15384]],[[194799,194799],\"mapped\",[27425]],[[194800,194800],\"mapped\",[145575]],[[194801,194801],\"mapped\",[27476]],[[194802,194802],\"mapped\",[15438]],[[194803,194803],\"mapped\",[27506]],[[194804,194804],\"mapped\",[27551]],[[194805,194805],\"mapped\",[27578]],[[194806,194806],\"mapped\",[27579]],[[194807,194807],\"mapped\",[146061]],[[194808,194808],\"mapped\",[138507]],[[194809,194809],\"mapped\",[146170]],[[194810,194810],\"mapped\",[27726]],[[194811,194811],\"mapped\",[146620]],[[194812,194812],\"mapped\",[27839]],[[194813,194813],\"mapped\",[27853]],[[194814,194814],\"mapped\",[27751]],[[194815,194815],\"mapped\",[27926]],[[194816,194816],\"mapped\",[27966]],[[194817,194817],\"mapped\",[28023]],[[194818,194818],\"mapped\",[27969]],[[194819,194819],\"mapped\",[28009]],[[194820,194820],\"mapped\",[28024]],[[194821,194821],\"mapped\",[28037]],[[194822,194822],\"mapped\",[146718]],[[194823,194823],\"mapped\",[27956]],[[194824,194824],\"mapped\",[28207]],[[194825,194825],\"mapped\",[28270]],[[194826,194826],\"mapped\",[15667]],[[194827,194827],\"mapped\",[28363]],[[194828,194828],\"mapped\",[28359]],[[194829,194829],\"mapped\",[147153]],[[194830,194830],\"mapped\",[28153]],[[194831,194831],\"mapped\",[28526]],[[194832,194832],\"mapped\",[147294]],[[194833,194833],\"mapped\",[147342]],[[194834,194834],\"mapped\",[28614]],[[194835,194835],\"mapped\",[28729]],[[194836,194836],\"mapped\",[28702]],[[194837,194837],\"mapped\",[28699]],[[194838,194838],\"mapped\",[15766]],[[194839,194839],\"mapped\",[28746]],[[194840,194840],\"mapped\",[28797]],[[194841,194841],\"mapped\",[28791]],[[194842,194842],\"mapped\",[28845]],[[194843,194843],\"mapped\",[132389]],[[194844,194844],\"mapped\",[28997]],[[194845,194845],\"mapped\",[148067]],[[194846,194846],\"mapped\",[29084]],[[194847,194847],\"disallowed\"],[[194848,194848],\"mapped\",[29224]],[[194849,194849],\"mapped\",[29237]],[[194850,194850],\"mapped\",[29264]],[[194851,194851],\"mapped\",[149000]],[[194852,194852],\"mapped\",[29312]],[[194853,194853],\"mapped\",[29333]],[[194854,194854],\"mapped\",[149301]],[[194855,194855],\"mapped\",[149524]],[[194856,194856],\"mapped\",[29562]],[[194857,194857],\"mapped\",[29579]],[[194858,194858],\"mapped\",[16044]],[[194859,194859],\"mapped\",[29605]],[[194860,194861],\"mapped\",[16056]],[[194862,194862],\"mapped\",[29767]],[[194863,194863],\"mapped\",[29788]],[[194864,194864],\"mapped\",[29809]],[[194865,194865],\"mapped\",[29829]],[[194866,194866],\"mapped\",[29898]],[[194867,194867],\"mapped\",[16155]],[[194868,194868],\"mapped\",[29988]],[[194869,194869],\"mapped\",[150582]],[[194870,194870],\"mapped\",[30014]],[[194871,194871],\"mapped\",[150674]],[[194872,194872],\"mapped\",[30064]],[[194873,194873],\"mapped\",[139679]],[[194874,194874],\"mapped\",[30224]],[[194875,194875],\"mapped\",[151457]],[[194876,194876],\"mapped\",[151480]],[[194877,194877],\"mapped\",[151620]],[[194878,194878],\"mapped\",[16380]],[[194879,194879],\"mapped\",[16392]],[[194880,194880],\"mapped\",[30452]],[[194881,194881],\"mapped\",[151795]],[[194882,194882],\"mapped\",[151794]],[[194883,194883],\"mapped\",[151833]],[[194884,194884],\"mapped\",[151859]],[[194885,194885],\"mapped\",[30494]],[[194886,194887],\"mapped\",[30495]],[[194888,194888],\"mapped\",[30538]],[[194889,194889],\"mapped\",[16441]],[[194890,194890],\"mapped\",[30603]],[[194891,194891],\"mapped\",[16454]],[[194892,194892],\"mapped\",[16534]],[[194893,194893],\"mapped\",[152605]],[[194894,194894],\"mapped\",[30798]],[[194895,194895],\"mapped\",[30860]],[[194896,194896],\"mapped\",[30924]],[[194897,194897],\"mapped\",[16611]],[[194898,194898],\"mapped\",[153126]],[[194899,194899],\"mapped\",[31062]],[[194900,194900],\"mapped\",[153242]],[[194901,194901],\"mapped\",[153285]],[[194902,194902],\"mapped\",[31119]],[[194903,194903],\"mapped\",[31211]],[[194904,194904],\"mapped\",[16687]],[[194905,194905],\"mapped\",[31296]],[[194906,194906],\"mapped\",[31306]],[[194907,194907],\"mapped\",[31311]],[[194908,194908],\"mapped\",[153980]],[[194909,194910],\"mapped\",[154279]],[[194911,194911],\"disallowed\"],[[194912,194912],\"mapped\",[16898]],[[194913,194913],\"mapped\",[154539]],[[194914,194914],\"mapped\",[31686]],[[194915,194915],\"mapped\",[31689]],[[194916,194916],\"mapped\",[16935]],[[194917,194917],\"mapped\",[154752]],[[194918,194918],\"mapped\",[31954]],[[194919,194919],\"mapped\",[17056]],[[194920,194920],\"mapped\",[31976]],[[194921,194921],\"mapped\",[31971]],[[194922,194922],\"mapped\",[32000]],[[194923,194923],\"mapped\",[155526]],[[194924,194924],\"mapped\",[32099]],[[194925,194925],\"mapped\",[17153]],[[194926,194926],\"mapped\",[32199]],[[194927,194927],\"mapped\",[32258]],[[194928,194928],\"mapped\",[32325]],[[194929,194929],\"mapped\",[17204]],[[194930,194930],\"mapped\",[156200]],[[194931,194931],\"mapped\",[156231]],[[194932,194932],\"mapped\",[17241]],[[194933,194933],\"mapped\",[156377]],[[194934,194934],\"mapped\",[32634]],[[194935,194935],\"mapped\",[156478]],[[194936,194936],\"mapped\",[32661]],[[194937,194937],\"mapped\",[32762]],[[194938,194938],\"mapped\",[32773]],[[194939,194939],\"mapped\",[156890]],[[194940,194940],\"mapped\",[156963]],[[194941,194941],\"mapped\",[32864]],[[194942,194942],\"mapped\",[157096]],[[194943,194943],\"mapped\",[32880]],[[194944,194944],\"mapped\",[144223]],[[194945,194945],\"mapped\",[17365]],[[194946,194946],\"mapped\",[32946]],[[194947,194947],\"mapped\",[33027]],[[194948,194948],\"mapped\",[17419]],[[194949,194949],\"mapped\",[33086]],[[194950,194950],\"mapped\",[23221]],[[194951,194951],\"mapped\",[157607]],[[194952,194952],\"mapped\",[157621]],[[194953,194953],\"mapped\",[144275]],[[194954,194954],\"mapped\",[144284]],[[194955,194955],\"mapped\",[33281]],[[194956,194956],\"mapped\",[33284]],[[194957,194957],\"mapped\",[36766]],[[194958,194958],\"mapped\",[17515]],[[194959,194959],\"mapped\",[33425]],[[194960,194960],\"mapped\",[33419]],[[194961,194961],\"mapped\",[33437]],[[194962,194962],\"mapped\",[21171]],[[194963,194963],\"mapped\",[33457]],[[194964,194964],\"mapped\",[33459]],[[194965,194965],\"mapped\",[33469]],[[194966,194966],\"mapped\",[33510]],[[194967,194967],\"mapped\",[158524]],[[194968,194968],\"mapped\",[33509]],[[194969,194969],\"mapped\",[33565]],[[194970,194970],\"mapped\",[33635]],[[194971,194971],\"mapped\",[33709]],[[194972,194972],\"mapped\",[33571]],[[194973,194973],\"mapped\",[33725]],[[194974,194974],\"mapped\",[33767]],[[194975,194975],\"mapped\",[33879]],[[194976,194976],\"mapped\",[33619]],[[194977,194977],\"mapped\",[33738]],[[194978,194978],\"mapped\",[33740]],[[194979,194979],\"mapped\",[33756]],[[194980,194980],\"mapped\",[158774]],[[194981,194981],\"mapped\",[159083]],[[194982,194982],\"mapped\",[158933]],[[194983,194983],\"mapped\",[17707]],[[194984,194984],\"mapped\",[34033]],[[194985,194985],\"mapped\",[34035]],[[194986,194986],\"mapped\",[34070]],[[194987,194987],\"mapped\",[160714]],[[194988,194988],\"mapped\",[34148]],[[194989,194989],\"mapped\",[159532]],[[194990,194990],\"mapped\",[17757]],[[194991,194991],\"mapped\",[17761]],[[194992,194992],\"mapped\",[159665]],[[194993,194993],\"mapped\",[159954]],[[194994,194994],\"mapped\",[17771]],[[194995,194995],\"mapped\",[34384]],[[194996,194996],\"mapped\",[34396]],[[194997,194997],\"mapped\",[34407]],[[194998,194998],\"mapped\",[34409]],[[194999,194999],\"mapped\",[34473]],[[195000,195000],\"mapped\",[34440]],[[195001,195001],\"mapped\",[34574]],[[195002,195002],\"mapped\",[34530]],[[195003,195003],\"mapped\",[34681]],[[195004,195004],\"mapped\",[34600]],[[195005,195005],\"mapped\",[34667]],[[195006,195006],\"mapped\",[34694]],[[195007,195007],\"disallowed\"],[[195008,195008],\"mapped\",[34785]],[[195009,195009],\"mapped\",[34817]],[[195010,195010],\"mapped\",[17913]],[[195011,195011],\"mapped\",[34912]],[[195012,195012],\"mapped\",[34915]],[[195013,195013],\"mapped\",[161383]],[[195014,195014],\"mapped\",[35031]],[[195015,195015],\"mapped\",[35038]],[[195016,195016],\"mapped\",[17973]],[[195017,195017],\"mapped\",[35066]],[[195018,195018],\"mapped\",[13499]],[[195019,195019],\"mapped\",[161966]],[[195020,195020],\"mapped\",[162150]],[[195021,195021],\"mapped\",[18110]],[[195022,195022],\"mapped\",[18119]],[[195023,195023],\"mapped\",[35488]],[[195024,195024],\"mapped\",[35565]],[[195025,195025],\"mapped\",[35722]],[[195026,195026],\"mapped\",[35925]],[[195027,195027],\"mapped\",[162984]],[[195028,195028],\"mapped\",[36011]],[[195029,195029],\"mapped\",[36033]],[[195030,195030],\"mapped\",[36123]],[[195031,195031],\"mapped\",[36215]],[[195032,195032],\"mapped\",[163631]],[[195033,195033],\"mapped\",[133124]],[[195034,195034],\"mapped\",[36299]],[[195035,195035],\"mapped\",[36284]],[[195036,195036],\"mapped\",[36336]],[[195037,195037],\"mapped\",[133342]],[[195038,195038],\"mapped\",[36564]],[[195039,195039],\"mapped\",[36664]],[[195040,195040],\"mapped\",[165330]],[[195041,195041],\"mapped\",[165357]],[[195042,195042],\"mapped\",[37012]],[[195043,195043],\"mapped\",[37105]],[[195044,195044],\"mapped\",[37137]],[[195045,195045],\"mapped\",[165678]],[[195046,195046],\"mapped\",[37147]],[[195047,195047],\"mapped\",[37432]],[[195048,195048],\"mapped\",[37591]],[[195049,195049],\"mapped\",[37592]],[[195050,195050],\"mapped\",[37500]],[[195051,195051],\"mapped\",[37881]],[[195052,195052],\"mapped\",[37909]],[[195053,195053],\"mapped\",[166906]],[[195054,195054],\"mapped\",[38283]],[[195055,195055],\"mapped\",[18837]],[[195056,195056],\"mapped\",[38327]],[[195057,195057],\"mapped\",[167287]],[[195058,195058],\"mapped\",[18918]],[[195059,195059],\"mapped\",[38595]],[[195060,195060],\"mapped\",[23986]],[[195061,195061],\"mapped\",[38691]],[[195062,195062],\"mapped\",[168261]],[[195063,195063],\"mapped\",[168474]],[[195064,195064],\"mapped\",[19054]],[[195065,195065],\"mapped\",[19062]],[[195066,195066],\"mapped\",[38880]],[[195067,195067],\"mapped\",[168970]],[[195068,195068],\"mapped\",[19122]],[[195069,195069],\"mapped\",[169110]],[[195070,195071],\"mapped\",[38923]],[[195072,195072],\"mapped\",[38953]],[[195073,195073],\"mapped\",[169398]],[[195074,195074],\"mapped\",[39138]],[[195075,195075],\"mapped\",[19251]],[[195076,195076],\"mapped\",[39209]],[[195077,195077],\"mapped\",[39335]],[[195078,195078],\"mapped\",[39362]],[[195079,195079],\"mapped\",[39422]],[[195080,195080],\"mapped\",[19406]],[[195081,195081],\"mapped\",[170800]],[[195082,195082],\"mapped\",[39698]],[[195083,195083],\"mapped\",[40000]],[[195084,195084],\"mapped\",[40189]],[[195085,195085],\"mapped\",[19662]],[[195086,195086],\"mapped\",[19693]],[[195087,195087],\"mapped\",[40295]],[[195088,195088],\"mapped\",[172238]],[[195089,195089],\"mapped\",[19704]],[[195090,195090],\"mapped\",[172293]],[[195091,195091],\"mapped\",[172558]],[[195092,195092],\"mapped\",[172689]],[[195093,195093],\"mapped\",[40635]],[[195094,195094],\"mapped\",[19798]],[[195095,195095],\"mapped\",[40697]],[[195096,195096],\"mapped\",[40702]],[[195097,195097],\"mapped\",[40709]],[[195098,195098],\"mapped\",[40719]],[[195099,195099],\"mapped\",[40726]],[[195100,195100],\"mapped\",[40763]],[[195101,195101],\"mapped\",[173568]],[[195102,196605],\"disallowed\"],[[196606,196607],\"disallowed\"],[[196608,262141],\"disallowed\"],[[262142,262143],\"disallowed\"],[[262144,327677],\"disallowed\"],[[327678,327679],\"disallowed\"],[[327680,393213],\"disallowed\"],[[393214,393215],\"disallowed\"],[[393216,458749],\"disallowed\"],[[458750,458751],\"disallowed\"],[[458752,524285],\"disallowed\"],[[524286,524287],\"disallowed\"],[[524288,589821],\"disallowed\"],[[589822,589823],\"disallowed\"],[[589824,655357],\"disallowed\"],[[655358,655359],\"disallowed\"],[[655360,720893],\"disallowed\"],[[720894,720895],\"disallowed\"],[[720896,786429],\"disallowed\"],[[786430,786431],\"disallowed\"],[[786432,851965],\"disallowed\"],[[851966,851967],\"disallowed\"],[[851968,917501],\"disallowed\"],[[917502,917503],\"disallowed\"],[[917504,917504],\"disallowed\"],[[917505,917505],\"disallowed\"],[[917506,917535],\"disallowed\"],[[917536,917631],\"disallowed\"],[[917632,917759],\"disallowed\"],[[917760,917999],\"ignored\"],[[918000,983037],\"disallowed\"],[[983038,983039],\"disallowed\"],[[983040,1048573],\"disallowed\"],[[1048574,1048575],\"disallowed\"],[[1048576,1114109],\"disallowed\"],[[1114110,1114111],\"disallowed\"]]"); /***/ }), -/* 1319 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(module) {var require;//! moment.js @@ -199054,7 +196313,7 @@ module.exports = JSON.parse("[[[0,44],\"disallowed_STD3_valid\"],[[45,46],\"vali try { oldLocale = globalLocale._abbr; aliasedRequire = require; - __webpack_require__(1320)("./" + name); + __webpack_require__(1340)("./" + name); getSetGlobalLocale(oldLocale); } catch (e) { // mark as not found to avoid repeating expensive file require call causing high CPU @@ -202637,280 +199896,280 @@ module.exports = JSON.parse("[[[0,44],\"disallowed_STD3_valid\"],[[45,46],\"vali /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(13)(module))) /***/ }), -/* 1320 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { var map = { - "./af": 1321, - "./af.js": 1321, - "./ar": 1322, - "./ar-dz": 1323, - "./ar-dz.js": 1323, - "./ar-kw": 1324, - "./ar-kw.js": 1324, - "./ar-ly": 1325, - "./ar-ly.js": 1325, - "./ar-ma": 1326, - "./ar-ma.js": 1326, - "./ar-sa": 1327, - "./ar-sa.js": 1327, - "./ar-tn": 1328, - "./ar-tn.js": 1328, - "./ar.js": 1322, - "./az": 1329, - "./az.js": 1329, - "./be": 1330, - "./be.js": 1330, - "./bg": 1331, - "./bg.js": 1331, - "./bm": 1332, - "./bm.js": 1332, - "./bn": 1333, - "./bn-bd": 1334, - "./bn-bd.js": 1334, - "./bn.js": 1333, - "./bo": 1335, - "./bo.js": 1335, - "./br": 1336, - "./br.js": 1336, - "./bs": 1337, - "./bs.js": 1337, - "./ca": 1338, - "./ca.js": 1338, - "./cs": 1339, - "./cs.js": 1339, - "./cv": 1340, - "./cv.js": 1340, - "./cy": 1341, - "./cy.js": 1341, - "./da": 1342, - "./da.js": 1342, - "./de": 1343, - "./de-at": 1344, - "./de-at.js": 1344, - "./de-ch": 1345, - "./de-ch.js": 1345, - "./de.js": 1343, - "./dv": 1346, - "./dv.js": 1346, - "./el": 1347, - "./el.js": 1347, - "./en-au": 1348, - "./en-au.js": 1348, - "./en-ca": 1349, - "./en-ca.js": 1349, - "./en-gb": 1350, - "./en-gb.js": 1350, - "./en-ie": 1351, - "./en-ie.js": 1351, - "./en-il": 1352, - "./en-il.js": 1352, - "./en-in": 1353, - "./en-in.js": 1353, - "./en-nz": 1354, - "./en-nz.js": 1354, - "./en-sg": 1355, - "./en-sg.js": 1355, - "./eo": 1356, - "./eo.js": 1356, - "./es": 1357, - "./es-do": 1358, - "./es-do.js": 1358, - "./es-mx": 1359, - "./es-mx.js": 1359, - "./es-us": 1360, - "./es-us.js": 1360, - "./es.js": 1357, - "./et": 1361, - "./et.js": 1361, - "./eu": 1362, - "./eu.js": 1362, - "./fa": 1363, - "./fa.js": 1363, - "./fi": 1364, - "./fi.js": 1364, - "./fil": 1365, - "./fil.js": 1365, - "./fo": 1366, - "./fo.js": 1366, - "./fr": 1367, - "./fr-ca": 1368, - "./fr-ca.js": 1368, - "./fr-ch": 1369, - "./fr-ch.js": 1369, - "./fr.js": 1367, - "./fy": 1370, - "./fy.js": 1370, - "./ga": 1371, - "./ga.js": 1371, - "./gd": 1372, - "./gd.js": 1372, - "./gl": 1373, - "./gl.js": 1373, - "./gom-deva": 1374, - "./gom-deva.js": 1374, - "./gom-latn": 1375, - "./gom-latn.js": 1375, - "./gu": 1376, - "./gu.js": 1376, - "./he": 1377, - "./he.js": 1377, - "./hi": 1378, - "./hi.js": 1378, - "./hr": 1379, - "./hr.js": 1379, - "./hu": 1380, - "./hu.js": 1380, - "./hy-am": 1381, - "./hy-am.js": 1381, - "./id": 1382, - "./id.js": 1382, - "./is": 1383, - "./is.js": 1383, - "./it": 1384, - "./it-ch": 1385, - "./it-ch.js": 1385, - "./it.js": 1384, - "./ja": 1386, - "./ja.js": 1386, - "./jv": 1387, - "./jv.js": 1387, - "./ka": 1388, - "./ka.js": 1388, - "./kk": 1389, - "./kk.js": 1389, - "./km": 1390, - "./km.js": 1390, - "./kn": 1391, - "./kn.js": 1391, - "./ko": 1392, - "./ko.js": 1392, - "./ku": 1393, - "./ku.js": 1393, - "./ky": 1394, - "./ky.js": 1394, - "./lb": 1395, - "./lb.js": 1395, - "./lo": 1396, - "./lo.js": 1396, - "./lt": 1397, - "./lt.js": 1397, - "./lv": 1398, - "./lv.js": 1398, - "./me": 1399, - "./me.js": 1399, - "./mi": 1400, - "./mi.js": 1400, - "./mk": 1401, - "./mk.js": 1401, - "./ml": 1402, - "./ml.js": 1402, - "./mn": 1403, - "./mn.js": 1403, - "./mr": 1404, - "./mr.js": 1404, - "./ms": 1405, - "./ms-my": 1406, - "./ms-my.js": 1406, - "./ms.js": 1405, - "./mt": 1407, - "./mt.js": 1407, - "./my": 1408, - "./my.js": 1408, - "./nb": 1409, - "./nb.js": 1409, - "./ne": 1410, - "./ne.js": 1410, - "./nl": 1411, - "./nl-be": 1412, - "./nl-be.js": 1412, - "./nl.js": 1411, - "./nn": 1413, - "./nn.js": 1413, - "./oc-lnc": 1414, - "./oc-lnc.js": 1414, - "./pa-in": 1415, - "./pa-in.js": 1415, - "./pl": 1416, - "./pl.js": 1416, - "./pt": 1417, - "./pt-br": 1418, - "./pt-br.js": 1418, - "./pt.js": 1417, - "./ro": 1419, - "./ro.js": 1419, - "./ru": 1420, - "./ru.js": 1420, - "./sd": 1421, - "./sd.js": 1421, - "./se": 1422, - "./se.js": 1422, - "./si": 1423, - "./si.js": 1423, - "./sk": 1424, - "./sk.js": 1424, - "./sl": 1425, - "./sl.js": 1425, - "./sq": 1426, - "./sq.js": 1426, - "./sr": 1427, - "./sr-cyrl": 1428, - "./sr-cyrl.js": 1428, - "./sr.js": 1427, - "./ss": 1429, - "./ss.js": 1429, - "./sv": 1430, - "./sv.js": 1430, - "./sw": 1431, - "./sw.js": 1431, - "./ta": 1432, - "./ta.js": 1432, - "./te": 1433, - "./te.js": 1433, - "./tet": 1434, - "./tet.js": 1434, - "./tg": 1435, - "./tg.js": 1435, - "./th": 1436, - "./th.js": 1436, - "./tk": 1437, - "./tk.js": 1437, - "./tl-ph": 1438, - "./tl-ph.js": 1438, - "./tlh": 1439, - "./tlh.js": 1439, - "./tr": 1440, - "./tr.js": 1440, - "./tzl": 1441, - "./tzl.js": 1441, - "./tzm": 1442, - "./tzm-latn": 1443, - "./tzm-latn.js": 1443, - "./tzm.js": 1442, - "./ug-cn": 1444, - "./ug-cn.js": 1444, - "./uk": 1445, - "./uk.js": 1445, - "./ur": 1446, - "./ur.js": 1446, - "./uz": 1447, - "./uz-latn": 1448, - "./uz-latn.js": 1448, - "./uz.js": 1447, - "./vi": 1449, - "./vi.js": 1449, - "./x-pseudo": 1450, - "./x-pseudo.js": 1450, - "./yo": 1451, - "./yo.js": 1451, - "./zh-cn": 1452, - "./zh-cn.js": 1452, - "./zh-hk": 1453, - "./zh-hk.js": 1453, - "./zh-mo": 1454, - "./zh-mo.js": 1454, - "./zh-tw": 1455, - "./zh-tw.js": 1455 + "./af": 1341, + "./af.js": 1341, + "./ar": 1342, + "./ar-dz": 1343, + "./ar-dz.js": 1343, + "./ar-kw": 1344, + "./ar-kw.js": 1344, + "./ar-ly": 1345, + "./ar-ly.js": 1345, + "./ar-ma": 1346, + "./ar-ma.js": 1346, + "./ar-sa": 1347, + "./ar-sa.js": 1347, + "./ar-tn": 1348, + "./ar-tn.js": 1348, + "./ar.js": 1342, + "./az": 1349, + "./az.js": 1349, + "./be": 1350, + "./be.js": 1350, + "./bg": 1351, + "./bg.js": 1351, + "./bm": 1352, + "./bm.js": 1352, + "./bn": 1353, + "./bn-bd": 1354, + "./bn-bd.js": 1354, + "./bn.js": 1353, + "./bo": 1355, + "./bo.js": 1355, + "./br": 1356, + "./br.js": 1356, + "./bs": 1357, + "./bs.js": 1357, + "./ca": 1358, + "./ca.js": 1358, + "./cs": 1359, + "./cs.js": 1359, + "./cv": 1360, + "./cv.js": 1360, + "./cy": 1361, + "./cy.js": 1361, + "./da": 1362, + "./da.js": 1362, + "./de": 1363, + "./de-at": 1364, + "./de-at.js": 1364, + "./de-ch": 1365, + "./de-ch.js": 1365, + "./de.js": 1363, + "./dv": 1366, + "./dv.js": 1366, + "./el": 1367, + "./el.js": 1367, + "./en-au": 1368, + "./en-au.js": 1368, + "./en-ca": 1369, + "./en-ca.js": 1369, + "./en-gb": 1370, + "./en-gb.js": 1370, + "./en-ie": 1371, + "./en-ie.js": 1371, + "./en-il": 1372, + "./en-il.js": 1372, + "./en-in": 1373, + "./en-in.js": 1373, + "./en-nz": 1374, + "./en-nz.js": 1374, + "./en-sg": 1375, + "./en-sg.js": 1375, + "./eo": 1376, + "./eo.js": 1376, + "./es": 1377, + "./es-do": 1378, + "./es-do.js": 1378, + "./es-mx": 1379, + "./es-mx.js": 1379, + "./es-us": 1380, + "./es-us.js": 1380, + "./es.js": 1377, + "./et": 1381, + "./et.js": 1381, + "./eu": 1382, + "./eu.js": 1382, + "./fa": 1383, + "./fa.js": 1383, + "./fi": 1384, + "./fi.js": 1384, + "./fil": 1385, + "./fil.js": 1385, + "./fo": 1386, + "./fo.js": 1386, + "./fr": 1387, + "./fr-ca": 1388, + "./fr-ca.js": 1388, + "./fr-ch": 1389, + "./fr-ch.js": 1389, + "./fr.js": 1387, + "./fy": 1390, + "./fy.js": 1390, + "./ga": 1391, + "./ga.js": 1391, + "./gd": 1392, + "./gd.js": 1392, + "./gl": 1393, + "./gl.js": 1393, + "./gom-deva": 1394, + "./gom-deva.js": 1394, + "./gom-latn": 1395, + "./gom-latn.js": 1395, + "./gu": 1396, + "./gu.js": 1396, + "./he": 1397, + "./he.js": 1397, + "./hi": 1398, + "./hi.js": 1398, + "./hr": 1399, + "./hr.js": 1399, + "./hu": 1400, + "./hu.js": 1400, + "./hy-am": 1401, + "./hy-am.js": 1401, + "./id": 1402, + "./id.js": 1402, + "./is": 1403, + "./is.js": 1403, + "./it": 1404, + "./it-ch": 1405, + "./it-ch.js": 1405, + "./it.js": 1404, + "./ja": 1406, + "./ja.js": 1406, + "./jv": 1407, + "./jv.js": 1407, + "./ka": 1408, + "./ka.js": 1408, + "./kk": 1409, + "./kk.js": 1409, + "./km": 1410, + "./km.js": 1410, + "./kn": 1411, + "./kn.js": 1411, + "./ko": 1412, + "./ko.js": 1412, + "./ku": 1413, + "./ku.js": 1413, + "./ky": 1414, + "./ky.js": 1414, + "./lb": 1415, + "./lb.js": 1415, + "./lo": 1416, + "./lo.js": 1416, + "./lt": 1417, + "./lt.js": 1417, + "./lv": 1418, + "./lv.js": 1418, + "./me": 1419, + "./me.js": 1419, + "./mi": 1420, + "./mi.js": 1420, + "./mk": 1421, + "./mk.js": 1421, + "./ml": 1422, + "./ml.js": 1422, + "./mn": 1423, + "./mn.js": 1423, + "./mr": 1424, + "./mr.js": 1424, + "./ms": 1425, + "./ms-my": 1426, + "./ms-my.js": 1426, + "./ms.js": 1425, + "./mt": 1427, + "./mt.js": 1427, + "./my": 1428, + "./my.js": 1428, + "./nb": 1429, + "./nb.js": 1429, + "./ne": 1430, + "./ne.js": 1430, + "./nl": 1431, + "./nl-be": 1432, + "./nl-be.js": 1432, + "./nl.js": 1431, + "./nn": 1433, + "./nn.js": 1433, + "./oc-lnc": 1434, + "./oc-lnc.js": 1434, + "./pa-in": 1435, + "./pa-in.js": 1435, + "./pl": 1436, + "./pl.js": 1436, + "./pt": 1437, + "./pt-br": 1438, + "./pt-br.js": 1438, + "./pt.js": 1437, + "./ro": 1439, + "./ro.js": 1439, + "./ru": 1440, + "./ru.js": 1440, + "./sd": 1441, + "./sd.js": 1441, + "./se": 1442, + "./se.js": 1442, + "./si": 1443, + "./si.js": 1443, + "./sk": 1444, + "./sk.js": 1444, + "./sl": 1445, + "./sl.js": 1445, + "./sq": 1446, + "./sq.js": 1446, + "./sr": 1447, + "./sr-cyrl": 1448, + "./sr-cyrl.js": 1448, + "./sr.js": 1447, + "./ss": 1449, + "./ss.js": 1449, + "./sv": 1450, + "./sv.js": 1450, + "./sw": 1451, + "./sw.js": 1451, + "./ta": 1452, + "./ta.js": 1452, + "./te": 1453, + "./te.js": 1453, + "./tet": 1454, + "./tet.js": 1454, + "./tg": 1455, + "./tg.js": 1455, + "./th": 1456, + "./th.js": 1456, + "./tk": 1457, + "./tk.js": 1457, + "./tl-ph": 1458, + "./tl-ph.js": 1458, + "./tlh": 1459, + "./tlh.js": 1459, + "./tr": 1460, + "./tr.js": 1460, + "./tzl": 1461, + "./tzl.js": 1461, + "./tzm": 1462, + "./tzm-latn": 1463, + "./tzm-latn.js": 1463, + "./tzm.js": 1462, + "./ug-cn": 1464, + "./ug-cn.js": 1464, + "./uk": 1465, + "./uk.js": 1465, + "./ur": 1466, + "./ur.js": 1466, + "./uz": 1467, + "./uz-latn": 1468, + "./uz-latn.js": 1468, + "./uz.js": 1467, + "./vi": 1469, + "./vi.js": 1469, + "./x-pseudo": 1470, + "./x-pseudo.js": 1470, + "./yo": 1471, + "./yo.js": 1471, + "./zh-cn": 1472, + "./zh-cn.js": 1472, + "./zh-hk": 1473, + "./zh-hk.js": 1473, + "./zh-mo": 1474, + "./zh-mo.js": 1474, + "./zh-tw": 1475, + "./zh-tw.js": 1475 }; @@ -202931,10 +200190,10 @@ webpackContext.keys = function webpackContextKeys() { }; webpackContext.resolve = webpackContextResolve; module.exports = webpackContext; -webpackContext.id = 1320; +webpackContext.id = 1340; /***/ }), -/* 1321 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -202942,7 +200201,7 @@ webpackContext.id = 1320; //! author : Werner Mollentze : https://github.com/wernerm ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -203020,7 +200279,7 @@ webpackContext.id = 1320; /***/ }), -/* 1322 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -203030,7 +200289,7 @@ webpackContext.id = 1320; //! author : forabi https://github.com/forabi ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -203224,7 +200483,7 @@ webpackContext.id = 1320; /***/ }), -/* 1323 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -203236,7 +200495,7 @@ webpackContext.id = 1320; //! author : Noureddine LOUAHEDJ : https://github.com/noureddinem ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -203395,7 +200654,7 @@ webpackContext.id = 1320; /***/ }), -/* 1324 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -203403,7 +200662,7 @@ webpackContext.id = 1320; //! author : Nusret Parlak: https://github.com/nusretparlak ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -203464,7 +200723,7 @@ webpackContext.id = 1320; /***/ }), -/* 1325 */ +/* 1345 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -203472,7 +200731,7 @@ webpackContext.id = 1320; //! author : Ali Hmer: https://github.com/kikoanis ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -203650,7 +200909,7 @@ webpackContext.id = 1320; /***/ }), -/* 1326 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -203659,7 +200918,7 @@ webpackContext.id = 1320; //! author : Abdel Said : https://github.com/abdelsaid ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -203720,7 +200979,7 @@ webpackContext.id = 1320; /***/ }), -/* 1327 */ +/* 1347 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -203728,7 +200987,7 @@ webpackContext.id = 1320; //! author : Suhail Alkowaileet : https://github.com/xsoh ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -203839,7 +201098,7 @@ webpackContext.id = 1320; /***/ }), -/* 1328 */ +/* 1348 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -203847,7 +201106,7 @@ webpackContext.id = 1320; //! author : Nader Toukabri : https://github.com/naderio ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -203908,7 +201167,7 @@ webpackContext.id = 1320; /***/ }), -/* 1329 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -203916,7 +201175,7 @@ webpackContext.id = 1320; //! author : topchiyev : https://github.com/topchiyev ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -204024,7 +201283,7 @@ webpackContext.id = 1320; /***/ }), -/* 1330 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -204034,7 +201293,7 @@ webpackContext.id = 1320; //! Author : Menelion Elensúle : https://github.com/Oire ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -204180,7 +201439,7 @@ webpackContext.id = 1320; /***/ }), -/* 1331 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -204188,7 +201447,7 @@ webpackContext.id = 1320; //! author : Krasen Borisov : https://github.com/kraz ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -204282,7 +201541,7 @@ webpackContext.id = 1320; /***/ }), -/* 1332 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -204290,7 +201549,7 @@ webpackContext.id = 1320; //! author : Estelle Comment : https://github.com/estellecomment ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -204348,7 +201607,7 @@ webpackContext.id = 1320; /***/ }), -/* 1333 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -204356,7 +201615,7 @@ webpackContext.id = 1320; //! author : Kaushik Gandhi : https://github.com/kaushikgandhi ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -204481,7 +201740,7 @@ webpackContext.id = 1320; /***/ }), -/* 1334 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -204489,7 +201748,7 @@ webpackContext.id = 1320; //! author : Asraf Hossain Patoary : https://github.com/ashwoolford ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -204624,7 +201883,7 @@ webpackContext.id = 1320; /***/ }), -/* 1335 */ +/* 1355 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -204632,7 +201891,7 @@ webpackContext.id = 1320; //! author : Thupten N. Chakrishar : https://github.com/vajradog ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -204761,7 +202020,7 @@ webpackContext.id = 1320; /***/ }), -/* 1336 */ +/* 1356 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -204769,7 +202028,7 @@ webpackContext.id = 1320; //! author : Jean-Baptiste Le Duigou : https://github.com/jbleduigou ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -204941,7 +202200,7 @@ webpackContext.id = 1320; /***/ }), -/* 1337 */ +/* 1357 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -204950,7 +202209,7 @@ webpackContext.id = 1320; //! based on (hr) translation by Bojan Marković ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205105,7 +202364,7 @@ webpackContext.id = 1320; /***/ }), -/* 1338 */ +/* 1358 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205113,7 +202372,7 @@ webpackContext.id = 1320; //! author : Juan G. Hurtado : https://github.com/juanghurtado ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205217,7 +202476,7 @@ webpackContext.id = 1320; /***/ }), -/* 1339 */ +/* 1359 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205225,7 +202484,7 @@ webpackContext.id = 1320; //! author : petrbela : https://github.com/petrbela ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205403,7 +202662,7 @@ webpackContext.id = 1320; /***/ }), -/* 1340 */ +/* 1360 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205411,7 +202670,7 @@ webpackContext.id = 1320; //! author : Anatoly Mironov : https://github.com/mirontoli ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205480,7 +202739,7 @@ webpackContext.id = 1320; /***/ }), -/* 1341 */ +/* 1361 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205489,7 +202748,7 @@ webpackContext.id = 1320; //! author : https://github.com/ryangreaves ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205592,7 +202851,7 @@ webpackContext.id = 1320; /***/ }), -/* 1342 */ +/* 1362 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205600,7 +202859,7 @@ webpackContext.id = 1320; //! author : Ulrik Nielsen : https://github.com/mrbase ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205660,7 +202919,7 @@ webpackContext.id = 1320; /***/ }), -/* 1343 */ +/* 1363 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205670,7 +202929,7 @@ webpackContext.id = 1320; //! author : Mikolaj Dadela : https://github.com/mik01aj ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205753,7 +203012,7 @@ webpackContext.id = 1320; /***/ }), -/* 1344 */ +/* 1364 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205764,7 +203023,7 @@ webpackContext.id = 1320; //! author : Mikolaj Dadela : https://github.com/mik01aj ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205847,7 +203106,7 @@ webpackContext.id = 1320; /***/ }), -/* 1345 */ +/* 1365 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205855,7 +203114,7 @@ webpackContext.id = 1320; //! author : sschueller : https://github.com/sschueller ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -205938,7 +203197,7 @@ webpackContext.id = 1320; /***/ }), -/* 1346 */ +/* 1366 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -205946,7 +203205,7 @@ webpackContext.id = 1320; //! author : Jawish Hameed : https://github.com/jawish ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206043,7 +203302,7 @@ webpackContext.id = 1320; /***/ }), -/* 1347 */ +/* 1367 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206051,7 +203310,7 @@ webpackContext.id = 1320; //! author : Aggelos Karalias : https://github.com/mehiel ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206162,7 +203421,7 @@ webpackContext.id = 1320; /***/ }), -/* 1348 */ +/* 1368 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206170,7 +203429,7 @@ webpackContext.id = 1320; //! author : Jared Morse : https://github.com/jarcoal ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206245,7 +203504,7 @@ webpackContext.id = 1320; /***/ }), -/* 1349 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206253,7 +203512,7 @@ webpackContext.id = 1320; //! author : Jonathan Abourbih : https://github.com/jonbca ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206324,7 +203583,7 @@ webpackContext.id = 1320; /***/ }), -/* 1350 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206332,7 +203591,7 @@ webpackContext.id = 1320; //! author : Chris Gedrim : https://github.com/chrisgedrim ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206407,7 +203666,7 @@ webpackContext.id = 1320; /***/ }), -/* 1351 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206415,7 +203674,7 @@ webpackContext.id = 1320; //! author : Chris Cartlidge : https://github.com/chriscartlidge ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206490,7 +203749,7 @@ webpackContext.id = 1320; /***/ }), -/* 1352 */ +/* 1372 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206498,7 +203757,7 @@ webpackContext.id = 1320; //! author : Chris Gedrim : https://github.com/chrisgedrim ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206569,7 +203828,7 @@ webpackContext.id = 1320; /***/ }), -/* 1353 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206577,7 +203836,7 @@ webpackContext.id = 1320; //! author : Jatin Agrawal : https://github.com/jatinag22 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206652,7 +203911,7 @@ webpackContext.id = 1320; /***/ }), -/* 1354 */ +/* 1374 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206660,7 +203919,7 @@ webpackContext.id = 1320; //! author : Luke McGregor : https://github.com/lukemcgregor ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206735,7 +203994,7 @@ webpackContext.id = 1320; /***/ }), -/* 1355 */ +/* 1375 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206743,7 +204002,7 @@ webpackContext.id = 1320; //! author : Matthew Castrillon-Madrigal : https://github.com/techdimension ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206818,7 +204077,7 @@ webpackContext.id = 1320; /***/ }), -/* 1356 */ +/* 1376 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206829,7 +204088,7 @@ webpackContext.id = 1320; //! comment : Vivakvo corrected the translation by colindean and miestasmia ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -206901,7 +204160,7 @@ webpackContext.id = 1320; /***/ }), -/* 1357 */ +/* 1377 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -206909,7 +204168,7 @@ webpackContext.id = 1320; //! author : Julio Napurà : https://github.com/julionc ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207022,14 +204281,14 @@ webpackContext.id = 1320; /***/ }), -/* 1358 */ +/* 1378 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration //! locale : Spanish (Dominican Republic) [es-do] ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207141,7 +204400,7 @@ webpackContext.id = 1320; /***/ }), -/* 1359 */ +/* 1379 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207149,7 +204408,7 @@ webpackContext.id = 1320; //! author : JC Franco : https://github.com/jcfranco ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207262,7 +204521,7 @@ webpackContext.id = 1320; /***/ }), -/* 1360 */ +/* 1380 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207271,7 +204530,7 @@ webpackContext.id = 1320; //! author : chrisrodz : https://github.com/chrisrodz ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207383,7 +204642,7 @@ webpackContext.id = 1320; /***/ }), -/* 1361 */ +/* 1381 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207392,7 +204651,7 @@ webpackContext.id = 1320; //! improvements : Illimar Tambek : https://github.com/ragulka ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207476,7 +204735,7 @@ webpackContext.id = 1320; /***/ }), -/* 1362 */ +/* 1382 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207484,7 +204743,7 @@ webpackContext.id = 1320; //! author : Eneko Illarramendi : https://github.com/eillarra ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207554,7 +204813,7 @@ webpackContext.id = 1320; /***/ }), -/* 1363 */ +/* 1383 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207562,7 +204821,7 @@ webpackContext.id = 1320; //! author : Ebrahim Byagowi : https://github.com/ebraminio ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207679,7 +204938,7 @@ webpackContext.id = 1320; /***/ }), -/* 1364 */ +/* 1384 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207687,7 +204946,7 @@ webpackContext.id = 1320; //! author : Tarmo Aidantausta : https://github.com/bleadof ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207815,7 +205074,7 @@ webpackContext.id = 1320; /***/ }), -/* 1365 */ +/* 1385 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207824,7 +205083,7 @@ webpackContext.id = 1320; //! author : Matthew Co : https://github.com/matthewdeeco ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207888,7 +205147,7 @@ webpackContext.id = 1320; /***/ }), -/* 1366 */ +/* 1386 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207897,7 +205156,7 @@ webpackContext.id = 1320; //! author : Kristian Sakarisson : https://github.com/sakarisson ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -207959,7 +205218,7 @@ webpackContext.id = 1320; /***/ }), -/* 1367 */ +/* 1387 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -207967,7 +205226,7 @@ webpackContext.id = 1320; //! author : John Fischer : https://github.com/jfroffice ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208078,7 +205337,7 @@ webpackContext.id = 1320; /***/ }), -/* 1368 */ +/* 1388 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208086,7 +205345,7 @@ webpackContext.id = 1320; //! author : Jonathan Abourbih : https://github.com/jonbca ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208162,7 +205421,7 @@ webpackContext.id = 1320; /***/ }), -/* 1369 */ +/* 1389 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208170,7 +205429,7 @@ webpackContext.id = 1320; //! author : Gaspard Bucher : https://github.com/gaspard ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208250,7 +205509,7 @@ webpackContext.id = 1320; /***/ }), -/* 1370 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208258,7 +205517,7 @@ webpackContext.id = 1320; //! author : Robin van der Vliet : https://github.com/robin0van0der0v ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208342,7 +205601,7 @@ webpackContext.id = 1320; /***/ }), -/* 1371 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208350,7 +205609,7 @@ webpackContext.id = 1320; //! author : André Silva : https://github.com/askpt ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208452,7 +205711,7 @@ webpackContext.id = 1320; /***/ }), -/* 1372 */ +/* 1392 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208460,7 +205719,7 @@ webpackContext.id = 1320; //! author : Jon Ashdown : https://github.com/jonashdown ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208562,7 +205821,7 @@ webpackContext.id = 1320; /***/ }), -/* 1373 */ +/* 1393 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208570,7 +205829,7 @@ webpackContext.id = 1320; //! author : Juan G. Hurtado : https://github.com/juanghurtado ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208651,7 +205910,7 @@ webpackContext.id = 1320; /***/ }), -/* 1374 */ +/* 1394 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208659,7 +205918,7 @@ webpackContext.id = 1320; //! author : The Discoverer : https://github.com/WikiDiscoverer ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208790,7 +206049,7 @@ webpackContext.id = 1320; /***/ }), -/* 1375 */ +/* 1395 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208798,7 +206057,7 @@ webpackContext.id = 1320; //! author : The Discoverer : https://github.com/WikiDiscoverer ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -208929,7 +206188,7 @@ webpackContext.id = 1320; /***/ }), -/* 1376 */ +/* 1396 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -208937,7 +206196,7 @@ webpackContext.id = 1320; //! author : Kaushik Thanki : https://github.com/Kaushik1987 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -209065,7 +206324,7 @@ webpackContext.id = 1320; /***/ }), -/* 1377 */ +/* 1397 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -209075,7 +206334,7 @@ webpackContext.id = 1320; //! author : Tal Ater : https://github.com/TalAter ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -209174,7 +206433,7 @@ webpackContext.id = 1320; /***/ }), -/* 1378 */ +/* 1398 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -209182,7 +206441,7 @@ webpackContext.id = 1320; //! author : Mayank Singhal : https://github.com/mayanksinghal ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -209353,7 +206612,7 @@ webpackContext.id = 1320; /***/ }), -/* 1379 */ +/* 1399 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -209361,7 +206620,7 @@ webpackContext.id = 1320; //! author : Bojan Marković : https://github.com/bmarkovic ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -209522,7 +206781,7 @@ webpackContext.id = 1320; /***/ }), -/* 1380 */ +/* 1400 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -209531,7 +206790,7 @@ webpackContext.id = 1320; //! author : Peter Viszt : https://github.com/passatgt ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -209655,7 +206914,7 @@ webpackContext.id = 1320; /***/ }), -/* 1381 */ +/* 1401 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -209663,7 +206922,7 @@ webpackContext.id = 1320; //! author : Armendarabyan : https://github.com/armendarabyan ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -209762,7 +207021,7 @@ webpackContext.id = 1320; /***/ }), -/* 1382 */ +/* 1402 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -209771,7 +207030,7 @@ webpackContext.id = 1320; //! reference: http://id.wikisource.org/wiki/Pedoman_Umum_Ejaan_Bahasa_Indonesia_yang_Disempurnakan ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -209853,7 +207112,7 @@ webpackContext.id = 1320; /***/ }), -/* 1383 */ +/* 1403 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -209861,7 +207120,7 @@ webpackContext.id = 1320; //! author : Hinrik Örn Sigurðsson : https://github.com/hinrik ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210007,7 +207266,7 @@ webpackContext.id = 1320; /***/ }), -/* 1384 */ +/* 1404 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210017,7 +207276,7 @@ webpackContext.id = 1320; //! author: Marco : https://github.com/Manfre98 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210128,7 +207387,7 @@ webpackContext.id = 1320; /***/ }), -/* 1385 */ +/* 1405 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210136,7 +207395,7 @@ webpackContext.id = 1320; //! author : xfh : https://github.com/xfh ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210207,7 +207466,7 @@ webpackContext.id = 1320; /***/ }), -/* 1386 */ +/* 1406 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210215,7 +207474,7 @@ webpackContext.id = 1320; //! author : LI Long : https://github.com/baryon ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210370,7 +207629,7 @@ webpackContext.id = 1320; /***/ }), -/* 1387 */ +/* 1407 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210379,7 +207638,7 @@ webpackContext.id = 1320; //! reference: http://jv.wikipedia.org/wiki/Basa_Jawa ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210461,7 +207720,7 @@ webpackContext.id = 1320; /***/ }), -/* 1388 */ +/* 1408 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210469,7 +207728,7 @@ webpackContext.id = 1320; //! author : Irakli Janiashvili : https://github.com/IrakliJani ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210568,7 +207827,7 @@ webpackContext.id = 1320; /***/ }), -/* 1389 */ +/* 1409 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210576,7 +207835,7 @@ webpackContext.id = 1320; //! authors : Nurlan Rakhimzhanov : https://github.com/nurlan ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210665,7 +207924,7 @@ webpackContext.id = 1320; /***/ }), -/* 1390 */ +/* 1410 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210673,7 +207932,7 @@ webpackContext.id = 1320; //! author : Kruy Vanna : https://github.com/kruyvanna ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210782,7 +208041,7 @@ webpackContext.id = 1320; /***/ }), -/* 1391 */ +/* 1411 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210790,7 +208049,7 @@ webpackContext.id = 1320; //! author : Rajeev Naik : https://github.com/rajeevnaikte ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -210920,7 +208179,7 @@ webpackContext.id = 1320; /***/ }), -/* 1392 */ +/* 1412 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -210929,7 +208188,7 @@ webpackContext.id = 1320; //! author : Jeeeyul Lee <jeeeyul@gmail.com> ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211010,7 +208269,7 @@ webpackContext.id = 1320; /***/ }), -/* 1393 */ +/* 1413 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211018,7 +208277,7 @@ webpackContext.id = 1320; //! author : Shahram Mebashar : https://github.com/ShahramMebashar ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211143,7 +208402,7 @@ webpackContext.id = 1320; /***/ }), -/* 1394 */ +/* 1414 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211151,7 +208410,7 @@ webpackContext.id = 1320; //! author : Chyngyz Arystan uulu : https://github.com/chyngyz ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211242,7 +208501,7 @@ webpackContext.id = 1320; /***/ }), -/* 1395 */ +/* 1415 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211251,7 +208510,7 @@ webpackContext.id = 1320; //! author : David Raison : https://github.com/kwisatz ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211392,7 +208651,7 @@ webpackContext.id = 1320; /***/ }), -/* 1396 */ +/* 1416 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211400,7 +208659,7 @@ webpackContext.id = 1320; //! author : Ryan Hart : https://github.com/ryanhart2 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211472,7 +208731,7 @@ webpackContext.id = 1320; /***/ }), -/* 1397 */ +/* 1417 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211480,7 +208739,7 @@ webpackContext.id = 1320; //! author : Mindaugas MozÅ«ras : https://github.com/mmozuras ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211610,7 +208869,7 @@ webpackContext.id = 1320; /***/ }), -/* 1398 */ +/* 1418 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211619,7 +208878,7 @@ webpackContext.id = 1320; //! author : JÄnis Elmeris : https://github.com/JanisE ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211718,7 +208977,7 @@ webpackContext.id = 1320; /***/ }), -/* 1399 */ +/* 1419 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211726,7 +208985,7 @@ webpackContext.id = 1320; //! author : Miodrag NikaÄ <miodrag@restartit.me> : https://github.com/miodragnikac ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211851,7 +209110,7 @@ webpackContext.id = 1320; /***/ }), -/* 1400 */ +/* 1420 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211859,7 +209118,7 @@ webpackContext.id = 1320; //! author : John Corrigan <robbiecloset@gmail.com> : https://github.com/johnideal ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -211925,7 +209184,7 @@ webpackContext.id = 1320; /***/ }), -/* 1401 */ +/* 1421 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -211934,7 +209193,7 @@ webpackContext.id = 1320; //! author : Sashko Todorov : https://github.com/bkyceh ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212026,7 +209285,7 @@ webpackContext.id = 1320; /***/ }), -/* 1402 */ +/* 1422 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212034,7 +209293,7 @@ webpackContext.id = 1320; //! author : Floyd Pink : https://github.com/floydpink ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212121,7 +209380,7 @@ webpackContext.id = 1320; /***/ }), -/* 1403 */ +/* 1423 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212129,7 +209388,7 @@ webpackContext.id = 1320; //! author : Javkhlantugs Nyamdorj : https://github.com/javkhaanj7 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212235,7 +209494,7 @@ webpackContext.id = 1320; /***/ }), -/* 1404 */ +/* 1424 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212244,7 +209503,7 @@ webpackContext.id = 1320; //! author : Vivek Athalye : https://github.com/vnathalye ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212452,7 +209711,7 @@ webpackContext.id = 1320; /***/ }), -/* 1405 */ +/* 1425 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212460,7 +209719,7 @@ webpackContext.id = 1320; //! author : Weldan Jamili : https://github.com/weldan ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212542,7 +209801,7 @@ webpackContext.id = 1320; /***/ }), -/* 1406 */ +/* 1426 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212551,7 +209810,7 @@ webpackContext.id = 1320; //! author : Weldan Jamili : https://github.com/weldan ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212633,7 +209892,7 @@ webpackContext.id = 1320; /***/ }), -/* 1407 */ +/* 1427 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212641,7 +209900,7 @@ webpackContext.id = 1320; //! author : Alessandro Maruccia : https://github.com/alesma ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212703,7 +209962,7 @@ webpackContext.id = 1320; /***/ }), -/* 1408 */ +/* 1428 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212713,7 +209972,7 @@ webpackContext.id = 1320; //! author : Tin Aung Lin : https://github.com/thanyawzinmin ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212809,7 +210068,7 @@ webpackContext.id = 1320; /***/ }), -/* 1409 */ +/* 1429 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212819,7 +210078,7 @@ webpackContext.id = 1320; //! Stephen Ramthun : https://github.com/stephenramthun ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -212885,7 +210144,7 @@ webpackContext.id = 1320; /***/ }), -/* 1410 */ +/* 1430 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -212893,7 +210152,7 @@ webpackContext.id = 1320; //! author : suvash : https://github.com/suvash ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213020,7 +210279,7 @@ webpackContext.id = 1320; /***/ }), -/* 1411 */ +/* 1431 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213029,7 +210288,7 @@ webpackContext.id = 1320; //! author : Jacob Middag : https://github.com/middagj ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213139,7 +210398,7 @@ webpackContext.id = 1320; /***/ }), -/* 1412 */ +/* 1432 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213148,7 +210407,7 @@ webpackContext.id = 1320; //! author : Jacob Middag : https://github.com/middagj ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213256,7 +210515,7 @@ webpackContext.id = 1320; /***/ }), -/* 1413 */ +/* 1433 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213265,7 +210524,7 @@ webpackContext.id = 1320; //! Stephen Ramthun : https://github.com/stephenramthun ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213331,7 +210590,7 @@ webpackContext.id = 1320; /***/ }), -/* 1414 */ +/* 1434 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213339,7 +210598,7 @@ webpackContext.id = 1320; //! author : Quentin PAGÈS : https://github.com/Quenty31 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213429,7 +210688,7 @@ webpackContext.id = 1320; /***/ }), -/* 1415 */ +/* 1435 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213437,7 +210696,7 @@ webpackContext.id = 1320; //! author : Harpreet Singh : https://github.com/harpreetkhalsagtbit ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213565,7 +210824,7 @@ webpackContext.id = 1320; /***/ }), -/* 1416 */ +/* 1436 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213573,7 +210832,7 @@ webpackContext.id = 1320; //! author : Rafal Hirsz : https://github.com/evoL ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213719,7 +210978,7 @@ webpackContext.id = 1320; /***/ }), -/* 1417 */ +/* 1437 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213727,7 +210986,7 @@ webpackContext.id = 1320; //! author : Jefferson : https://github.com/jalex79 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213796,7 +211055,7 @@ webpackContext.id = 1320; /***/ }), -/* 1418 */ +/* 1438 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213804,7 +211063,7 @@ webpackContext.id = 1320; //! author : Caio Ribeiro Pereira : https://github.com/caio-ribeiro-pereira ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213868,7 +211127,7 @@ webpackContext.id = 1320; /***/ }), -/* 1419 */ +/* 1439 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213878,7 +211137,7 @@ webpackContext.id = 1320; //! author : Emanuel Cepoi : https://github.com/cepem ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -213958,7 +211217,7 @@ webpackContext.id = 1320; /***/ }), -/* 1420 */ +/* 1440 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -213968,7 +211227,7 @@ webpackContext.id = 1320; //! author : Коренберг Марк : https://github.com/socketpair ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -214179,7 +211438,7 @@ webpackContext.id = 1320; /***/ }), -/* 1421 */ +/* 1441 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -214187,7 +211446,7 @@ webpackContext.id = 1320; //! author : Narain Sagar : https://github.com/narainsagar ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -214275,7 +211534,7 @@ webpackContext.id = 1320; /***/ }), -/* 1422 */ +/* 1442 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -214283,7 +211542,7 @@ webpackContext.id = 1320; //! authors : BÃ¥rd Rolstad Henriksen : https://github.com/karamell ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -214347,7 +211606,7 @@ webpackContext.id = 1320; /***/ }), -/* 1423 */ +/* 1443 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -214355,7 +211614,7 @@ webpackContext.id = 1320; //! author : Sampath Sitinamaluwa : https://github.com/sampathsris ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -214430,7 +211689,7 @@ webpackContext.id = 1320; /***/ }), -/* 1424 */ +/* 1444 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -214439,7 +211698,7 @@ webpackContext.id = 1320; //! based on work of petrbela : https://github.com/petrbela ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -214589,7 +211848,7 @@ webpackContext.id = 1320; /***/ }), -/* 1425 */ +/* 1445 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -214597,7 +211856,7 @@ webpackContext.id = 1320; //! author : Robert SedovÅ¡ek : https://github.com/sedovsek ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -214774,7 +212033,7 @@ webpackContext.id = 1320; /***/ }), -/* 1426 */ +/* 1446 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -214784,7 +212043,7 @@ webpackContext.id = 1320; //! author : Oerd Cukalla : https://github.com/oerd ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -214854,7 +212113,7 @@ webpackContext.id = 1320; /***/ }), -/* 1427 */ +/* 1447 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -214863,7 +212122,7 @@ webpackContext.id = 1320; //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -214987,7 +212246,7 @@ webpackContext.id = 1320; /***/ }), -/* 1428 */ +/* 1448 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -214996,7 +212255,7 @@ webpackContext.id = 1320; //! author : Stefan Crnjaković <stefan@hotmail.rs> : https://github.com/crnjakovic ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215118,7 +212377,7 @@ webpackContext.id = 1320; /***/ }), -/* 1429 */ +/* 1449 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215126,7 +212385,7 @@ webpackContext.id = 1320; //! author : Nicolai Davies<mail@nicolai.io> : https://github.com/nicolaidavies ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215216,7 +212475,7 @@ webpackContext.id = 1320; /***/ }), -/* 1430 */ +/* 1450 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215224,7 +212483,7 @@ webpackContext.id = 1320; //! author : Jens Alm : https://github.com/ulmus ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215299,7 +212558,7 @@ webpackContext.id = 1320; /***/ }), -/* 1431 */ +/* 1451 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215307,7 +212566,7 @@ webpackContext.id = 1320; //! author : Fahad Kassim : https://github.com/fadsel ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215368,7 +212627,7 @@ webpackContext.id = 1320; /***/ }), -/* 1432 */ +/* 1452 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215376,7 +212635,7 @@ webpackContext.id = 1320; //! author : Arjunkumar Krishnamoorthy : https://github.com/tk120404 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215512,7 +212771,7 @@ webpackContext.id = 1320; /***/ }), -/* 1433 */ +/* 1453 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215520,7 +212779,7 @@ webpackContext.id = 1320; //! author : Krishna Chaitanya Thota : https://github.com/kcthota ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215613,7 +212872,7 @@ webpackContext.id = 1320; /***/ }), -/* 1434 */ +/* 1454 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215623,7 +212882,7 @@ webpackContext.id = 1320; //! author : Sonia Simoes : https://github.com/soniasimoes ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215696,7 +212955,7 @@ webpackContext.id = 1320; /***/ }), -/* 1435 */ +/* 1455 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215704,7 +212963,7 @@ webpackContext.id = 1320; //! author : Orif N. Jr. : https://github.com/orif-jr ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215827,7 +213086,7 @@ webpackContext.id = 1320; /***/ }), -/* 1436 */ +/* 1456 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215835,7 +213094,7 @@ webpackContext.id = 1320; //! author : Kridsada Thanabulpong : https://github.com/sirn ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -215906,7 +213165,7 @@ webpackContext.id = 1320; /***/ }), -/* 1437 */ +/* 1457 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -215914,7 +213173,7 @@ webpackContext.id = 1320; //! author : Atamyrat Abdyrahmanov : https://github.com/atamyratabdy ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216012,7 +213271,7 @@ webpackContext.id = 1320; /***/ }), -/* 1438 */ +/* 1458 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216020,7 +213279,7 @@ webpackContext.id = 1320; //! author : Dan Hagman : https://github.com/hagmandan ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216084,7 +213343,7 @@ webpackContext.id = 1320; /***/ }), -/* 1439 */ +/* 1459 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216092,7 +213351,7 @@ webpackContext.id = 1320; //! author : Dominika Kruk : https://github.com/amaranthrose ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216224,7 +213483,7 @@ webpackContext.id = 1320; /***/ }), -/* 1440 */ +/* 1460 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216233,7 +213492,7 @@ webpackContext.id = 1320; //! Burak YiÄŸit Kaya: https://github.com/BYK ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216345,7 +213604,7 @@ webpackContext.id = 1320; /***/ }), -/* 1441 */ +/* 1461 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216354,7 +213613,7 @@ webpackContext.id = 1320; //! author : Iustì Canun ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216449,7 +213708,7 @@ webpackContext.id = 1320; /***/ }), -/* 1442 */ +/* 1462 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216457,7 +213716,7 @@ webpackContext.id = 1320; //! author : Abdel Said : https://github.com/abdelsaid ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216517,7 +213776,7 @@ webpackContext.id = 1320; /***/ }), -/* 1443 */ +/* 1463 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216525,7 +213784,7 @@ webpackContext.id = 1320; //! author : Abdel Said : https://github.com/abdelsaid ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216585,7 +213844,7 @@ webpackContext.id = 1320; /***/ }), -/* 1444 */ +/* 1464 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216593,7 +213852,7 @@ webpackContext.id = 1320; //! author: boyaq : https://github.com/boyaq ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216710,7 +213969,7 @@ webpackContext.id = 1320; /***/ }), -/* 1445 */ +/* 1465 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216719,7 +213978,7 @@ webpackContext.id = 1320; //! Author : Menelion Elensúle : https://github.com/Oire ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216888,7 +214147,7 @@ webpackContext.id = 1320; /***/ }), -/* 1446 */ +/* 1466 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216897,7 +214156,7 @@ webpackContext.id = 1320; //! author : Zack : https://github.com/ZackVision ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -216985,7 +214244,7 @@ webpackContext.id = 1320; /***/ }), -/* 1447 */ +/* 1467 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -216993,7 +214252,7 @@ webpackContext.id = 1320; //! author : Sardor Muminov : https://github.com/muminoff ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217051,7 +214310,7 @@ webpackContext.id = 1320; /***/ }), -/* 1448 */ +/* 1468 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -217059,7 +214318,7 @@ webpackContext.id = 1320; //! author : Rasulbek Mirzayev : github.com/Rasulbeeek ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217119,7 +214378,7 @@ webpackContext.id = 1320; /***/ }), -/* 1449 */ +/* 1469 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -217128,7 +214387,7 @@ webpackContext.id = 1320; //! author : Chien Kira : https://github.com/chienkira ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217213,7 +214472,7 @@ webpackContext.id = 1320; /***/ }), -/* 1450 */ +/* 1470 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -217221,7 +214480,7 @@ webpackContext.id = 1320; //! author : Andrew Hood : https://github.com/andrewhood125 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217299,7 +214558,7 @@ webpackContext.id = 1320; /***/ }), -/* 1451 */ +/* 1471 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -217307,7 +214566,7 @@ webpackContext.id = 1320; //! author : Atolagbe Abisoye : https://github.com/andela-batolagbe ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217367,7 +214626,7 @@ webpackContext.id = 1320; /***/ }), -/* 1452 */ +/* 1472 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -217377,7 +214636,7 @@ webpackContext.id = 1320; //! author : uu109 : https://github.com/uu109 ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217502,7 +214761,7 @@ webpackContext.id = 1320; /***/ }), -/* 1453 */ +/* 1473 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -217513,7 +214772,7 @@ webpackContext.id = 1320; //! author : Anthony : https://github.com/anthonylau ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217618,7 +214877,7 @@ webpackContext.id = 1320; /***/ }), -/* 1454 */ +/* 1474 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -217628,7 +214887,7 @@ webpackContext.id = 1320; //! author : Tan Yuanhong : https://github.com/le0tan ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217733,7 +214992,7 @@ webpackContext.id = 1320; /***/ }), -/* 1455 */ +/* 1475 */ /***/ (function(module, exports, __webpack_require__) { //! moment.js locale configuration @@ -217742,7 +215001,7 @@ webpackContext.id = 1320; //! author : Chris Lam : https://github.com/hehachris ;(function (global, factory) { - true ? factory(__webpack_require__(1319)) : + true ? factory(__webpack_require__(1339)) : undefined }(this, (function (moment) { 'use strict'; @@ -217847,15 +215106,15 @@ webpackContext.id = 1320; /***/ }), -/* 1456 */ +/* 1476 */ /***/ (function(module, exports, __webpack_require__) { -var moment = module.exports = __webpack_require__(1457); -moment.tz.load(__webpack_require__(1458)); +var moment = module.exports = __webpack_require__(1477); +moment.tz.load(__webpack_require__(1478)); /***/ }), -/* 1457 */ +/* 1477 */ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;//! moment-timezone.js @@ -217869,9 +215128,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /*global define*/ if ( true && module.exports) { - module.exports = factory(__webpack_require__(1319)); // Node + module.exports = factory(__webpack_require__(1339)); // Node } else if (true) { - !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1319)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), + !(__WEBPACK_AMD_DEFINE_ARRAY__ = [__webpack_require__(1339)], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); // AMD @@ -218558,7 +215817,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_ /***/ }), -/* 1458 */ +/* 1478 */ /***/ (function(module) { module.exports = JSON.parse("{\"version\":\"2021a\",\"zones\":[\"Africa/Abidjan|LMT GMT|g.8 0|01|-2ldXH.Q|48e5\",\"Africa/Accra|LMT GMT +0020 +0030|.Q 0 -k -u|01212121212121212121212121212121212121212121212131313131313131|-2bRzX.8 9RbX.8 fdE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE 1BAk MLE 1Bck MLE 1Bck MLE 1Bck MLE Mok 1BXE M0k 1BXE fak 9vbu bjCu MLu 1Bcu MLu 1BAu MLu 1Bcu MLu 1Bcu MLu 1Bcu MLu|41e5\",\"Africa/Nairobi|LMT +0230 EAT +0245|-2r.g -2u -30 -2J|012132|-2ua2r.g N6nV.g 3Fbu h1cu dzbJ|47e5\",\"Africa/Algiers|PMT WET WEST CET CEST|-9.l 0 -10 -10 -20|0121212121212121343431312123431213|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 DA0 Imo0 rd0 De0 9Xz0 1fb0 1ap0 16K0 2yo0 mEp0 hwL0 jxA0 11A0 dDd0 17b0 11B0 1cN0 2Dy0 1cN0 1fB0 1cL0|26e5\",\"Africa/Lagos|LMT GMT +0030 WAT|-d.z 0 -u -10|01023|-2B40d.z 7iod.z dnXK.p dLzH.z|17e6\",\"Africa/Bissau|LMT -01 GMT|12.k 10 0|012|-2ldX0 2xoo0|39e4\",\"Africa/Maputo|LMT CAT|-2a.k -20|01|-2GJea.k|26e5\",\"Africa/Cairo|EET EEST|-20 -30|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1bIO0 vb0 1ip0 11z0 1iN0 1nz0 12p0 1pz0 10N0 1pz0 16p0 1jz0 s3d0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1WL0 rd0 1Rz0 wp0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1qL0 Xd0 1oL0 11d0 1oL0 11d0 1pb0 11d0 1oL0 11d0 1oL0 11d0 1ny0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 WL0 1qN0 Rb0 1wp0 On0 1zd0 Lz0 1EN0 Fb0 c10 8n0 8Nd0 gL0 e10 mn0|15e6\",\"Africa/Casablanca|LMT +00 +01|u.k 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-2gMnt.E 130Lt.E rb0 Dd0 dVb0 b6p0 TX0 EoB0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4mn0 SyN0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0|32e5\",\"Africa/Ceuta|WET WEST CET CEST|0 -10 -10 -20|010101010101010101010232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-25KN0 11z0 drd0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1y7o0 LL0 gnd0 rz0 43d0 AL0 1Nd0 XX0 1Cp0 pz0 dEp0 4VB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|85e3\",\"Africa/El_Aaiun|LMT -01 +00 +01|Q.M 10 0 -10|012323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1rDz7.c 1GVA7.c 6L0 AL0 1Nd0 XX0 1Cp0 pz0 1cBB0 AL0 1Nd0 wn0 1FB0 Db0 1zd0 Lz0 1Nf0 wM0 co0 go0 1o00 s00 dA0 vc0 11A0 A00 e00 y00 11A0 uM0 e00 Dc0 11A0 s00 e00 IM0 WM0 mo0 gM0 LA0 WM0 jA0 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 28M0 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0 2600 e00 2600 gM0 2600 gM0 2600 e00 2600 gM0|20e4\",\"Africa/Johannesburg|SAST SAST SAST|-1u -20 -30|012121|-2GJdu 1Ajdu 1cL0 1cN0 1cL0|84e5\",\"Africa/Juba|LMT CAT CAST EAT|-26.s -20 -30 -30|012121212121212121212121212121212131|-1yW26.s 1zK06.s 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 PeX0|\",\"Africa/Khartoum|LMT CAT CAST EAT|-2a.8 -20 -30 -30|012121212121212121212121212121212131|-1yW2a.8 1zK0a.8 16L0 1iN0 17b0 1jd0 17b0 1ip0 17z0 1i10 17X0 1hB0 18n0 1hd0 19b0 1gp0 19z0 1iN0 17b0 1ip0 17z0 1i10 18n0 1hd0 18L0 1gN0 19b0 1gp0 19z0 1iN0 17z0 1i10 17X0 yGd0 HjL0|51e5\",\"Africa/Monrovia|MMT MMT GMT|H.8 I.u 0|012|-23Lzg.Q 28G01.m|11e5\",\"Africa/Ndjamena|LMT WAT WAST|-10.c -10 -20|0121|-2le10.c 2J3c0.c Wn0|13e5\",\"Africa/Sao_Tome|LMT GMT WAT|A.J 0 -10|0121|-2le00 4i6N0 2q00|\",\"Africa/Tripoli|LMT CET CEST EET|-Q.I -10 -20 -20|012121213121212121212121213123123|-21JcQ.I 1hnBQ.I vx0 4iP0 xx0 4eN0 Bb0 7ip0 U0n0 A10 1db0 1cN0 1db0 1dd0 1db0 1eN0 1bb0 1e10 1cL0 1c10 1db0 1dd0 1db0 1cN0 1db0 1q10 fAn0 1ep0 1db0 AKq0 TA0 1o00|11e5\",\"Africa/Tunis|PMT CET CEST|-9.l -10 -20|0121212121212121212121212121212121|-2nco9.l 18pa9.l 1qM0 DA0 3Tc0 11B0 1ze0 WM0 7z0 3d0 14L0 1cN0 1f90 1ar0 16J0 1gXB0 WM0 1rA0 11c0 nwo0 Ko0 1cM0 1cM0 1rA0 10M0 zuM0 10N0 1aN0 1qM0 WM0 1qM0 11A0 1o00|20e5\",\"Africa/Windhoek|+0130 SAST SAST CAT WAT|-1u -20 -30 -20 -10|01213434343434343434343434343434343434343434343434343|-2GJdu 1Ajdu 1cL0 1SqL0 9Io0 16P0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0|32e4\",\"America/Adak|NST NWT NPT BST BDT AHST HST HDT|b0 a0 a0 b0 a0 a0 a0 90|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|326\",\"America/Anchorage|AST AWT APT AHST AHDT YST AKST AKDT|a0 90 90 a0 90 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T00 8wX0 iA0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cm0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|30e4\",\"America/Port_of_Spain|LMT AST|46.4 40|01|-2kNvR.U|43e3\",\"America/Araguaina|LMT -03 -02|3c.M 30 20|0121212121212121212121212121212121212121212121212121|-2glwL.c HdKL.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 ny10 Lz0|14e4\",\"America/Argentina/Buenos_Aires|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 A4p0 uL0 1qN0 WL0|\",\"America/Argentina/Catamarca|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 7B0 8zb0 uL0|\",\"America/Argentina/Cordoba|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323132323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0 1qN0 WL0|\",\"America/Argentina/Jujuy|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1ze0 TX0 1ld0 WK0 1wp0 TX0 A4p0 uL0|\",\"America/Argentina/La_Rioja|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|\",\"America/Argentina/Mendoza|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232312121321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1u20 SL0 1vd0 Tb0 1wp0 TW0 ri10 Op0 7TX0 uL0|\",\"America/Argentina/Rio_Gallegos|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rlB0 7B0 8zb0 uL0|\",\"America/Argentina/Salta|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231323232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 A4p0 uL0|\",\"America/Argentina/San_Juan|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323231232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Qn0 qO0 16n0 Rb0 1wp0 TX0 rld0 m10 8lb0 uL0|\",\"America/Argentina/San_Luis|CMT -04 -03 -02|4g.M 40 30 20|012121212121212121212121212121212121212121232323121212321212|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 XX0 1q20 SL0 AN0 vDb0 m10 8lb0 8L0 jd0 1qN0 WL0 1qN0|\",\"America/Argentina/Tucuman|CMT -04 -03 -02|4g.M 40 30 20|0121212121212121212121212121212121212121212323232313232123232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wq0 Ra0 1wp0 TX0 rlB0 4N0 8BX0 uL0 1qN0 WL0|\",\"America/Argentina/Ushuaia|CMT -04 -03 -02|4g.M 40 30 20|01212121212121212121212121212121212121212123232323232321232|-20UHH.c pKnH.c Mn0 1iN0 Tb0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 1C10 LX0 1C10 LX0 1C10 LX0 1C10 Mn0 MN0 2jz0 MN0 4lX0 u10 5Lb0 1pB0 Fnz0 u10 uL0 1vd0 SL0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 zvd0 Bz0 1tB0 TX0 1wp0 Rb0 1wp0 Rb0 1wp0 TX0 rkN0 8p0 8zb0 uL0|\",\"America/Curacao|LMT -0430 AST|4z.L 4u 40|012|-2kV7o.d 28KLS.d|15e4\",\"America/Asuncion|AMT -04 -03|3O.E 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-1x589.k 1DKM9.k 3CL0 3Dd0 10L0 1pB0 10n0 1pB0 10n0 1pB0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1dd0 1cL0 1dd0 1cL0 1dd0 1db0 1dd0 1cL0 1lB0 14n0 1dd0 1cL0 1fd0 WL0 1rd0 1aL0 1dB0 Xz0 1qp0 Xb0 1qN0 10L0 1rB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 WN0 1qL0 11B0 1nX0 1ip0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 TX0 1tB0 19X0 1a10 1fz0 1a10 1fz0 1cN0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1ip0 17b0 1ip0 17b0 1ip0|28e5\",\"America/Atikokan|CST CDT CWT CPT EST|60 50 50 50 50|0101234|-25TQ0 1in0 Rnb0 3je0 8x30 iw0|28e2\",\"America/Bahia_Banderas|LMT MST CST PST MDT CDT|71 70 60 80 60 50|0121212131414141414141414141414141414152525252525252525252525252525252525252525252525252525252|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nW0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|84e3\",\"America/Bahia|LMT -03 -02|2y.4 30 20|01212121212121212121212121212121212121212121212121212121212121|-2glxp.U HdLp.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 l5B0 Rb0|27e5\",\"America/Barbados|LMT BMT AST ADT|3W.t 3W.t 40 30|01232323232|-1Q0I1.v jsM0 1ODC1.v IL0 1ip0 17b0 1ip0 17b0 1ld0 13b0|28e4\",\"America/Belem|LMT -03 -02|3d.U 30 20|012121212121212121212121212121|-2glwK.4 HdKK.4 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|20e5\",\"America/Belize|LMT CST -0530 CWT CPT CDT|5Q.M 60 5u 50 50 50|012121212121212121212121212121212121212121212121213412121212121212121212121212121212121212121215151|-2kBu7.c fPA7.c Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu Rcu 7Bt0 Ni0 4nd0 Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1wou Rbu 1wou Rbu 1zcu Onu e9Au qn0 lxB0 mn0|57e3\",\"America/Blanc-Sablon|AST ADT AWT APT|40 30 30 30|010230|-25TS0 1in0 UGp0 8x50 iu0|11e2\",\"America/Boa_Vista|LMT -04 -03|42.E 40 30|0121212121212121212121212121212121|-2glvV.k HdKV.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 smp0 WL0 1tB0 2L0|62e2\",\"America/Bogota|BMT -05 -04|4U.g 50 40|0121|-2eb73.I 38yo3.I 2en0|90e5\",\"America/Boise|PST PDT MST MWT MPT MDT|80 70 70 60 60 60|0101023425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-261q0 1nX0 11B0 1nX0 8C10 JCL0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 Dd0 1Kn0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e4\",\"America/Cambridge_Bay|-00 MST MWT MPT MDDT MDT CST CDT EST|0 70 60 60 50 60 60 50 50|0123141515151515151515151515151515151515151515678651515151515151515151515151515151515151515151515151515151515151515151515151|-21Jc0 RO90 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11A0 1nX0 2K0 WQ0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e2\",\"America/Campo_Grande|LMT -04 -03|3C.s 40 30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwl.w HdLl.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|77e4\",\"America/Cancun|LMT CST EST EDT CDT|5L.4 60 50 40 50|0123232341414141414141414141414141414141412|-1UQG0 2q2o0 yLB0 1lb0 14p0 1lb0 14p0 Lz0 xB0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 Dd0|63e4\",\"America/Caracas|CMT -0430 -04|4r.E 4u 40|01212|-2kV7w.k 28KM2.k 1IwOu kqo0|29e5\",\"America/Cayenne|LMT -04 -03|3t.k 40 30|012|-2mrwu.E 2gWou.E|58e3\",\"America/Panama|CMT EST|5j.A 50|01|-2uduE.o|15e5\",\"America/Chicago|CST CDT EST CWT CPT|60 50 50 50 50|01010101010101010101010101010101010102010101010103401010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 1wp0 TX0 WN0 1qL0 1cN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 11B0 1Hz0 14p0 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|92e5\",\"America/Chihuahua|LMT MST CST CDT MDT|74.k 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|81e4\",\"America/Costa_Rica|SJMT CST CDT|5A.d 60 50|0121212121|-1Xd6n.L 2lu0n.L Db0 1Kp0 Db0 pRB0 15b0 1kp0 mL0|12e5\",\"America/Creston|MST PST|70 80|010|-29DR0 43B0|53e2\",\"America/Cuiaba|LMT -04 -03|3I.k 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwf.E HdLf.E 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 4a10 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|54e4\",\"America/Danmarkshavn|LMT -03 -02 GMT|1e.E 30 20 0|01212121212121212121212121212121213|-2a5WJ.k 2z5fJ.k 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 DC0|8\",\"America/Dawson_Creek|PST PDT PWT PPT MST|80 70 70 70 70|0102301010101010101010101010101010101010101010101010101014|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 ML0|12e3\",\"America/Dawson|YST YDT YWT YPT YDDT PST PDT MST|90 80 80 80 70 80 70 70|010102304056565656565656565656565656565656565656565656565656565656565656565656565656565656567|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 jrA0 fNd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|13e2\",\"America/Denver|MST MDT MWT MPT|70 60 60 60|01010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 11B0 1qL0 WN0 mn0 Ord0 8x20 ix0 LCN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e5\",\"America/Detroit|LMT CST EST EWT EPT EDT|5w.b 60 50 40 40 40|0123425252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2Cgir.N peqr.N 156L0 8x40 iv0 6fd0 11z0 JxX1 SMX 1cN0 1cL0 aW10 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e5\",\"America/Edmonton|LMT MST MDT MWT MPT|7x.Q 70 60 60 60|0121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2yd4q.8 shdq.8 1in0 17d0 hz0 2dB0 1fz0 1a10 11z0 1qN0 WL0 1qN0 11z0 IGN0 8x20 ix0 3NB0 11z0 XQp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|10e5\",\"America/Eirunepe|LMT -05 -04|4D.s 50 40|0121212121212121212121212121212121|-2glvk.w HdLk.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0 yTd0 d5X0|31e3\",\"America/El_Salvador|LMT CST CDT|5U.M 60 50|012121|-1XiG3.c 2Fvc3.c WL0 1qN0 WL0|11e5\",\"America/Tijuana|LMT MST PST PDT PWT PPT|7M.4 70 80 70 70 70|012123245232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQE0 4PX0 8mM0 8lc0 SN0 1cL0 pHB0 83r0 zI0 5O10 1Rz0 cOO0 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 BUp0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|20e5\",\"America/Fort_Nelson|PST PDT PWT PPT MST|80 70 70 70 70|01023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010104|-25TO0 1in0 UGp0 8x10 iy0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0|39e2\",\"America/Fort_Wayne|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010101023010101010101010101040454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 QI10 Db0 RB0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 5Tz0 1o10 qLb0 1cL0 1cN0 1cL0 1qhd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Fortaleza|LMT -03 -02|2y 30 20|0121212121212121212121212121212121212121|-2glxq HdLq 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 5z0 2mN0 On0|34e5\",\"America/Glace_Bay|LMT AST ADT AWT APT|3X.M 40 30 30 30|012134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsI0.c CwO0.c 1in0 UGp0 8x50 iu0 iq10 11z0 Jg10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3\",\"America/Godthab|LMT -03 -02|3q.U 30 20|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5Ux.4 2z5dx.4 19U0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e3\",\"America/Goose_Bay|NST NDT NST NDT NWT NPT AST ADT ADDT|3u.Q 2u.Q 3u 2u 2u 2u 40 30 20|010232323232323245232323232323232323232323232323232323232326767676767676767676767676767676767676767676768676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-25TSt.8 1in0 DXb0 2HbX.8 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 S10 g0u 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|76e2\",\"America/Grand_Turk|KMT EST EDT AST|57.a 50 40 40|0121212121212121212121212121212121212121212121212121212121212121212121212132121212121212121212121212121212121212121|-2l1uQ.O 2HHBQ.O 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 7jA0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|37e2\",\"America/Guatemala|LMT CST CDT|62.4 60 50|0121212121|-24KhV.U 2efXV.U An0 mtd0 Nz0 ifB0 17b0 zDB0 11z0|13e5\",\"America/Guayaquil|QMT -05 -04|5e 50 40|0121|-1yVSK 2uILK rz0|27e5\",\"America/Guyana|LMT -0345 -03 -04|3Q.E 3J 30 40|0123|-2dvU7.k 2r6LQ.k Bxbf|80e4\",\"America/Halifax|LMT AST ADT AWT APT|4e.o 40 30 30 30|0121212121212121212121212121212121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsHJ.A xzzJ.A 1db0 3I30 1in0 3HX0 IL0 1E10 ML0 1yN0 Pb0 1Bd0 Mn0 1Bd0 Rz0 1w10 Xb0 1w10 LX0 1w10 Xb0 1w10 Lz0 1C10 Jz0 1E10 OL0 1yN0 Un0 1qp0 Xb0 1qp0 11X0 1w10 Lz0 1HB0 LX0 1C10 FX0 1w10 Xb0 1qp0 Xb0 1BB0 LX0 1td0 Xb0 1qp0 Xb0 Rf0 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 3Qp0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 6i10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|39e4\",\"America/Havana|HMT CST CDT|5t.A 50 40|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Meuu.o 72zu.o ML0 sld0 An0 1Nd0 Db0 1Nd0 An0 6Ep0 An0 1Nd0 An0 JDd0 Mn0 1Ap0 On0 1fd0 11X0 1qN0 WL0 1wp0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 14n0 1ld0 14L0 1kN0 15b0 1kp0 1cL0 1cN0 1fz0 1a10 1fz0 1fB0 11z0 14p0 1nX0 11B0 1nX0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 1a10 1in0 1a10 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 17c0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 11A0 6i00 Rc0 1wo0 U00 1tA0 Rc0 1wo0 U00 1wo0 U00 1zc0 U00 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0|21e5\",\"America/Hermosillo|LMT MST CST PST MDT|7n.Q 70 60 80 60|0121212131414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0|64e4\",\"America/Indiana/Knox|CST CDT CWT CPT EST|60 50 50 50 50|0101023010101010101010101010101010101040101010101010101010101010101010101010101010101010141010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 3NB0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 3Cn0 8wp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 z8o0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Indiana/Marengo|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010104545454545414545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 dyN0 11z0 6fd0 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1e6p0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Indiana/Petersburg|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010104010101010101010101010141014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 3Fb0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 19co0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Indiana/Tell_City|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010401054541010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 njX0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 8wn0 1cN0 1cL0 1cN0 1cK0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Indiana/Vevay|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|010102304545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 kPB0 Awn0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1lnd0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Indiana/Vincennes|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010454541014545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 g0p0 11z0 1o10 11z0 1qL0 WN0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 caL0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Indiana/Winamac|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|01010230101010101010101010101010101010454541054545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 jrz0 1cL0 1cN0 1cL0 1qhd0 1o00 Rd0 1za0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Inuvik|-00 PST PDDT MST MDT|0 80 60 70 60|0121343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-FnA0 tWU0 1fA0 wPe0 2pz0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|35e2\",\"America/Iqaluit|-00 EWT EPT EST EDDT EDT CST CDT|0 40 40 50 30 40 60 50|01234353535353535353535353535353535353535353567353535353535353535353535353535353535353535353535353535353535353535353535353|-16K00 7nX0 iv0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|67e2\",\"America/Jamaica|KMT EST EDT|57.a 50 40|0121212121212121212121|-2l1uQ.O 2uM1Q.O 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0|94e4\",\"America/Juneau|PST PWT PPT PDT YDT YST AKST AKDT|80 70 70 70 80 90 90 80|01203030303030303030303030403030356767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cM0 1cM0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|33e3\",\"America/Kentucky/Louisville|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101010102301010101010101010101010101454545454545414545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 3Fd0 Nb0 LPd0 11z0 RB0 8x30 iw0 1nX1 e0X 9vd0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 xz0 gso0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1VA0 LA0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Kentucky/Monticello|CST CDT CWT CPT EST EDT|60 50 50 50 50 40|0101023010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454545454|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 SWp0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/La_Paz|CMT BST -04|4w.A 3w.A 40|012|-1x37r.o 13b0|19e5\",\"America/Lima|LMT -05 -04|58.A 50 40|0121212121212121|-2tyGP.o 1bDzP.o zX0 1aN0 1cL0 1cN0 1cL0 1PrB0 zX0 1O10 zX0 6Gp0 zX0 98p0 zX0|11e6\",\"America/Los_Angeles|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 5Wp1 1VaX 3dA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|15e6\",\"America/Maceio|LMT -03 -02|2m.Q 30 20|012121212121212121212121212121212121212121|-2glxB.8 HdLB.8 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 dMN0 Lz0 8Q10 WL0 1tB0 5z0 2mN0 On0|93e4\",\"America/Managua|MMT CST EST CDT|5J.c 60 50 50|0121313121213131|-1quie.M 1yAMe.M 4mn0 9Up0 Dz0 1K10 Dz0 s3F0 1KH0 DB0 9In0 k8p0 19X0 1o30 11y0|22e5\",\"America/Manaus|LMT -04 -03|40.4 40 30|01212121212121212121212121212121|-2glvX.U HdKX.U 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 dPB0 On0|19e5\",\"America/Martinique|FFMT AST ADT|44.k 40 30|0121|-2mPTT.E 2LPbT.E 19X0|39e4\",\"America/Matamoros|LMT CST CDT|6E 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|45e4\",\"America/Mazatlan|LMT MST CST PST MDT|75.E 70 60 80 60|0121212131414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 otX0 gmN0 P2N0 13Vd0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|44e4\",\"America/Menominee|CST CDT CWT CPT EST|60 50 50 50 50|01010230101041010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 1o10 11z0 LCN0 1fz0 6410 9Jb0 1cM0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|85e2\",\"America/Merida|LMT CST EST CDT|5W.s 60 50 50|0121313131313131313131313131313131313131313131313131313131313131313131313131313131313131|-1UQG0 2q2o0 2hz0 wu30 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|11e5\",\"America/Metlakatla|PST PWT PPT PDT AKST AKDT|80 70 70 70 90 80|01203030303030303030303030303030304545450454545454545454545454545454545454545454|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1hU10 Rd0 1zb0 Op0 1zb0 Op0 1zb0 uM0 jB0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2\",\"America/Mexico_City|LMT MST CST CDT CWT|6A.A 70 60 50 50|012121232324232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 gEn0 TX0 3xd0 Jb0 6zB0 SL0 e5d0 17b0 1Pff0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|20e6\",\"America/Miquelon|LMT AST -03 -02|3I.E 40 30 20|012323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2mKkf.k 2LTAf.k gQ10 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|61e2\",\"America/Moncton|EST AST ADT AWT APT|50 40 30 30 30|012121212121212121212134121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2IsH0 CwN0 1in0 zAo0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1Nd0 An0 1K10 Lz0 1zB0 NX0 1u10 Wn0 S20 8x50 iu0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14n1 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 ReX 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|64e3\",\"America/Monterrey|LMT CST CDT|6F.g 60 50|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1UQG0 2FjC0 1nX0 i6p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0|41e5\",\"America/Montevideo|LMT MMT -04 -03 -0330 -0230 -02 -0130|3I.P 3I.P 40 30 3u 2u 20 1u|012343434343434343434343435353636353636375363636363636363636363636363636363636363636363|-2tRUf.9 sVc0 8jcf.9 1db0 1dcu 1cLu 1dcu 1cLu ircu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu WLu 1fAu 1cLu 1o0u 11zu NAu 3jXu zXu Dq0u 19Xu pcu jz0 cm10 19X0 6tB0 1fbu 3o0u jX0 4vB0 xz0 3Cp0 mmu 1a10 IMu Db0 4c10 uL0 1Nd0 An0 1SN0 uL0 mp0 28L0 iPB0 un0 1SN0 xz0 1zd0 Lz0 1zd0 Rb0 1zd0 On0 1wp0 Rb0 s8p0 1fB0 1ip0 11z0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 14n0 1ld0 14n0 1ld0 14n0 1o10 11z0 1o10 11z0 1o10 11z0|17e5\",\"America/Toronto|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101012301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 11Wu 1nzu 1fD0 WJ0 1wr0 Nb0 1Ap0 On0 1zd0 On0 1wp0 TX0 1tB0 TX0 1tB0 TX0 1tB0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 4kM0 8x40 iv0 1o10 11z0 1nX0 11z0 1o10 11z0 1o10 1qL0 11D0 1nX0 11B0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e5\",\"America/Nassau|LMT EST EWT EPT EDT|59.u 50 40 40 40|01212314141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2kNuO.u 1drbO.u 6tX0 cp0 1hS0 pF0 J630 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|24e4\",\"America/New_York|EST EDT EWT EPT|50 40 40 40|01010101010101010101010101010101010101010101010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 11B0 1qL0 1a10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 RB0 8x40 iv0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|21e6\",\"America/Nipigon|EST EDT EWT EPT|50 40 40 40|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TR0 1in0 Rnb0 3je0 8x40 iv0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|16e2\",\"America/Nome|NST NWT NPT BST BDT YST AKST AKDT|b0 a0 a0 b0 a0 90 90 80|012034343434343434343434343434343456767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676767676|-17SX0 8wW0 iB0 Qlb0 52O0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cl0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|38e2\",\"America/Noronha|LMT -02 -01|29.E 20 10|0121212121212121212121212121212121212121|-2glxO.k HdKO.k 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|30e2\",\"America/North_Dakota/Beulah|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Oo0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/North_Dakota/Center|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101014545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/North_Dakota/New_Salem|MST MDT MWT MPT CST CDT|70 60 60 60 60 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101454545454545454545454545454545454545454545454545454545454545454545454|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14o0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"America/Ojinaga|LMT MST CST CDT MDT|6V.E 70 60 50 60|0121212323241414141414141414141414141414141414141414141414141414141414141414141414141414141|-1UQF0 deL0 8lc0 17c0 10M0 1dd0 2zQN0 1lb0 14p0 1lb0 14q0 1lb0 14p0 1nX0 11B0 1nX0 1fB0 WL0 1fB0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 U10 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e3\",\"America/Pangnirtung|-00 AST AWT APT ADDT ADT EDT EST CST CDT|0 40 30 30 20 30 40 50 60 50|012314151515151515151515151515151515167676767689767676767676767676767676767676767676767676767676767676767676767676767676767|-1XiM0 PnG0 8x50 iu0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1o00 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11C0 1nX0 11A0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|14e2\",\"America/Paramaribo|LMT PMT PMT -0330 -03|3E.E 3E.Q 3E.A 3u 30|01234|-2nDUj.k Wqo0.c qanX.I 1yVXN.o|24e4\",\"America/Phoenix|MST MDT MWT|70 60 60|01010202010|-261r0 1nX0 11B0 1nX0 SgN0 4Al1 Ap0 1db0 SWqX 1cL0|42e5\",\"America/Port-au-Prince|PPMT EST EDT|4N 50 40|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-28RHb 2FnMb 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14q0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 i6n0 1nX0 11B0 1nX0 d430 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 3iN0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5\",\"America/Rio_Branco|LMT -05 -04|4v.c 50 40|01212121212121212121212121212121|-2glvs.M HdLs.M 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0 d5X0|31e4\",\"America/Porto_Velho|LMT -04 -03|4f.A 40 30|012121212121212121212121212121|-2glvI.o HdKI.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0|37e4\",\"America/Puerto_Rico|AST AWT APT|40 30 30|0120|-17lU0 7XT0 iu0|24e5\",\"America/Punta_Arenas|SMT -05 -04 -03|4G.K 50 40 30|0102021212121212121232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 blz0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|\",\"America/Rainy_River|CST CDT CWT CPT|60 50 50 50|010123010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TQ0 1in0 Rnb0 3je0 8x30 iw0 19yN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|842\",\"America/Rankin_Inlet|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313131313131313131313131313131313131313131313131313131313131313131|-vDc0 keu0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|26e2\",\"America/Recife|LMT -03 -02|2j.A 30 20|0121212121212121212121212121212121212121|-2glxE.o HdLE.o 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 nsp0 WL0 1tB0 2L0 2pB0 On0|33e5\",\"America/Regina|LMT MST MDT MWT MPT CST|6W.A 70 60 60 60 60|012121212121212121212121341212121212121212121212121215|-2AD51.o uHe1.o 1in0 s2L0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 66N0 1cL0 1cN0 19X0 1fB0 1cL0 1fB0 1cL0 1cN0 1cL0 M30 8x20 ix0 1ip0 1cL0 1ip0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 3NB0 1cL0 1cN0|19e4\",\"America/Resolute|-00 CST CDDT CDT EST|0 60 40 50 50|012131313131313131313131313131313131313131313431313131313431313131313131313131313131313131313131313131313131313131313131|-SnA0 GWS0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|229\",\"America/Santarem|LMT -04 -03|3C.M 40 30|0121212121212121212121212121212|-2glwl.c HdLl.c 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 qe10 xb0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 NBd0|21e4\",\"America/Santiago|SMT -05 -04 -03|4G.K 50 40 30|010202121212121212321232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-2q2jh.e fJAh.e 5knG.K 1Vzh.e jRAG.K 1pbh.e 11d0 1oL0 11d0 1oL0 11d0 1oL0 11d0 1pb0 11d0 nHX0 op0 9Bz0 jb0 1oN0 ko0 Qeo0 WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|62e5\",\"America/Santo_Domingo|SDMT EST EDT -0430 AST|4E 50 40 4u 40|01213131313131414|-1ttjk 1lJMk Mn0 6sp0 Lbu 1Cou yLu 1RAu wLu 1QMu xzu 1Q0u xXu 1PAu 13jB0 e00|29e5\",\"America/Sao_Paulo|LMT -03 -02|36.s 30 20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glwR.w HdKR.w 1cc0 1e10 1bX0 Ezd0 So0 1vA0 Mn0 1BB0 ML0 1BB0 zX0 pTd0 PX0 2ep0 nz0 1C10 zX0 1C10 LX0 1C10 Mn0 H210 Rb0 1tB0 IL0 1Fd0 FX0 1EN0 FX0 1HB0 Lz0 1EN0 Lz0 1C10 IL0 1HB0 Db0 1HB0 On0 1zd0 On0 1zd0 Lz0 1zd0 Rb0 1wN0 Wn0 1tB0 Rb0 1tB0 WL0 1tB0 Rb0 1zd0 On0 1HB0 FX0 1C10 Lz0 1Ip0 HX0 1zd0 On0 1HB0 IL0 1wp0 On0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 Rb0 1zd0 Lz0 1C10 Lz0 1C10 On0 1zd0 On0 1zd0 On0 1zd0 On0 1HB0 FX0|20e6\",\"America/Scoresbysund|LMT -02 -01 +00|1r.Q 20 10 0|0121323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2a5Ww.8 2z5ew.8 1a00 1cK0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|452\",\"America/Sitka|PST PWT PPT PDT YST AKST AKDT|80 70 70 70 90 90 80|01203030303030303030303030303030345656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565|-17T20 8x10 iy0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 co0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|90e2\",\"America/St_Johns|NST NDT NST NDT NWT NPT NDDT|3u.Q 2u.Q 3u 2u 2u 2u 1u|01010101010101010101010101010101010102323232323232324523232323232323232323232323232323232323232323232323232323232323232323232323232323232326232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28oit.8 14L0 1nB0 1in0 1gm0 Dz0 1JB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 19X0 1fB0 1cL0 1fB0 19X0 1fB0 19X0 10O0 eKX.8 19X0 1iq0 WL0 1qN0 WL0 1qN0 WL0 1tB0 TX0 1tB0 WL0 1qN0 WL0 1qN0 7UHu itu 1tB0 WL0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1tB0 WL0 1ld0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14n1 1lb0 14p0 1nW0 11C0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zcX Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4\",\"America/Swift_Current|LMT MST MDT MWT MPT CST|7b.k 70 60 60 60 60|012134121212121212121215|-2AD4M.E uHdM.E 1in0 UGp0 8x20 ix0 1o10 17b0 1ip0 11z0 1o10 11z0 1o10 11z0 isN0 1cL0 3Cp0 1cL0 1cN0 11z0 1qN0 WL0 pMp0|16e3\",\"America/Tegucigalpa|LMT CST CDT|5M.Q 60 50|01212121|-1WGGb.8 2ETcb.8 WL0 1qN0 WL0 GRd0 AL0|11e5\",\"America/Thule|LMT AST ADT|4z.8 40 30|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a5To.Q 31NBo.Q 1cL0 1cN0 1cL0 1fB0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|656\",\"America/Thunder_Bay|CST EST EWT EPT EDT|60 50 40 40 40|0123141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141414141|-2q5S0 1iaN0 8x40 iv0 XNB0 1cL0 1cN0 1fz0 1cN0 1cL0 3Cp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|11e4\",\"America/Vancouver|PST PDT PWT PPT|80 70 70 70|0102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-25TO0 1in0 UGp0 8x10 iy0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|23e5\",\"America/Whitehorse|YST YDT YWT YPT YDDT PST PDT MST|90 80 80 80 70 80 70 70|010102304056565656565656565656565656565656565656565656565656565656565656565656565656565656567|-25TN0 1in0 1o10 13V0 Ser0 8x00 iz0 LCL0 1fA0 3NA0 vrd0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1z90|23e3\",\"America/Winnipeg|CST CDT CWT CPT|60 50 50 50|010101023010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aIi0 WL0 3ND0 1in0 Jap0 Rb0 aCN0 8x30 iw0 1tB0 11z0 1ip0 11z0 1o10 11z0 1o10 11z0 1rd0 10L0 1op0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 1cL0 1cN0 11z0 6i10 WL0 6i10 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1a00 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1o00 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1o00 11A0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|66e4\",\"America/Yakutat|YST YWT YPT YDT AKST AKDT|90 80 80 80 90 80|01203030303030303030303030303030304545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-17T10 8x00 iz0 Vo10 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 cn0 10q0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|642\",\"America/Yellowknife|-00 MST MWT MPT MDDT MDT|0 70 60 60 50 60|012314151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151515151|-1pdA0 hix0 8x20 ix0 LCL0 1fA0 zgO0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|19e3\",\"Antarctica/Casey|-00 +08 +11|0 -80 -b0|0121212121212|-2q00 1DjS0 T90 40P0 KL0 blz0 3m10 1o30 14k0 1kr0 12l0 1o01|10\",\"Antarctica/Davis|-00 +07 +05|0 -70 -50|01012121|-vyo0 iXt0 alj0 1D7v0 VB0 3Wn0 KN0|70\",\"Antarctica/DumontDUrville|-00 +10|0 -a0|0101|-U0o0 cfq0 bFm0|80\",\"Antarctica/Macquarie|AEST AEDT -00|-a0 -b0 0|010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 1a00 4SK0 1ayy0 Lvs0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 3Co0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|1\",\"Antarctica/Mawson|-00 +06 +05|0 -60 -50|012|-CEo0 2fyk0|60\",\"Pacific/Auckland|NZMT NZST NZST NZDT|-bu -cu -c0 -d0|01020202020202020202020202023232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1GCVu Lz0 1tB0 11zu 1o0u 11zu 1o0u 11zu 1o0u 14nu 1lcu 14nu 1lcu 1lbu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1nXu 11Au 1qLu WMu 1qLu 11Au 1n1bu IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|14e5\",\"Antarctica/Palmer|-00 -03 -04 -02|0 30 40 20|0121212121213121212121212121212121212121212121212121212121212121212121212121212121|-cao0 nD0 1vd0 SL0 1vd0 17z0 1cN0 1fz0 1cN0 1cL0 1cN0 asn0 Db0 jsN0 14N0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0|40\",\"Antarctica/Rothera|-00 -03|0 30|01|gOo0|130\",\"Antarctica/Syowa|-00 +03|0 -30|01|-vs00|20\",\"Antarctica/Troll|-00 +00 +02|0 0 -20|01212121212121212121212121212121212121212121212121212121212121212121|1puo0 hd0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|40\",\"Antarctica/Vostok|-00 +06|0 -60|01|-tjA0|25\",\"Europe/Oslo|CET CEST|-10 -20|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2awM0 Qm0 W6o0 5pf0 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 wJc0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1qM0 WM0 zpc0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e4\",\"Asia/Riyadh|LMT +03|-36.Q -30|01|-TvD6.Q|57e5\",\"Asia/Almaty|LMT +05 +06 +07|-57.M -50 -60 -70|012323232323232323232321232323232323232323232323232|-1Pc57.M eUo7.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|15e5\",\"Asia/Amman|LMT EET EEST|-2n.I -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1yW2n.I 1HiMn.I KL0 1oN0 11b0 1oN0 11b0 1pd0 1dz0 1cp0 11b0 1op0 11b0 fO10 1db0 1e10 1cL0 1cN0 1cL0 1cN0 1fz0 1pd0 10n0 1ld0 14n0 1hB0 15b0 1ip0 19X0 1cN0 1cL0 1cN0 17b0 1ld0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1So0 y00 1fc0 1dc0 1co0 1dc0 1cM0 1cM0 1cM0 1o00 11A0 1lc0 17c0 1cM0 1cM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 4bX0 Dd0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|25e5\",\"Asia/Anadyr|LMT +12 +13 +14 +11|-bN.U -c0 -d0 -e0 -b0|01232121212121212121214121212121212121212121212121212121212141|-1PcbN.U eUnN.U 23CL0 1db0 2q10 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|13e3\",\"Asia/Aqtau|LMT +04 +05 +06|-3l.4 -40 -50 -60|012323232323232323232123232312121212121212121212|-1Pc3l.4 eUnl.4 24PX0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|15e4\",\"Asia/Aqtobe|LMT +04 +05 +06|-3M.E -40 -50 -60|0123232323232323232321232323232323232323232323232|-1Pc3M.E eUnM.E 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0|27e4\",\"Asia/Ashgabat|LMT +04 +05 +06|-3R.w -40 -50 -60|0123232323232323232323212|-1Pc3R.w eUnR.w 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0|41e4\",\"Asia/Atyrau|LMT +03 +05 +06 +04|-3r.I -30 -50 -60 -40|01232323232323232323242323232323232324242424242|-1Pc3r.I eUor.I 24PW0 2pX0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 2sp0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|\",\"Asia/Baghdad|BMT +03 +04|-2V.A -30 -40|012121212121212121212121212121212121212121212121212121|-26BeV.A 2ACnV.A 11b0 1cp0 1dz0 1dd0 1db0 1cN0 1cp0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1de0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0 1dc0 1dc0 1cM0 1dc0 1cM0 1dc0 1cM0 1dc0|66e5\",\"Asia/Qatar|LMT +04 +03|-3q.8 -40 -30|012|-21Jfq.8 27BXq.8|96e4\",\"Asia/Baku|LMT +03 +04 +05|-3j.o -30 -40 -50|01232323232323232323232123232323232323232323232323232323232323232|-1Pc3j.o 1jUoj.o WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 9Je0 1o00 11z0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00|27e5\",\"Asia/Bangkok|BMT +07|-6G.4 -70|01|-218SG.4|15e6\",\"Asia/Barnaul|LMT +06 +07 +08|-5z -60 -70 -80|0123232323232323232323212323232321212121212121212121212121212121212|-21S5z pCnz 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 p90 LE0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|\",\"Asia/Beirut|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-21aq0 1on0 1410 1db0 19B0 1in0 1ip0 WL0 1lQp0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 q6N0 En0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1op0 11b0 dA10 17b0 1iN0 17b0 1iN0 17b0 1iN0 17b0 1vB0 SL0 1mp0 13z0 1iN0 17b0 1iN0 17b0 1jd0 12n0 1a10 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0|22e5\",\"Asia/Bishkek|LMT +05 +06 +07|-4W.o -50 -60 -70|012323232323232323232321212121212121212121212121212|-1Pc4W.o eUnW.o 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2e00 1tX0 17b0 1ip0 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1cPu 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0|87e4\",\"Asia/Brunei|LMT +0730 +08|-7D.E -7u -80|012|-1KITD.E gDc9.E|42e4\",\"Asia/Kolkata|MMT IST +0630|-5l.a -5u -6u|012121|-2zOtl.a 1r2LP.a 1un0 HB0 7zX0|15e6\",\"Asia/Chita|LMT +08 +09 +10|-7x.Q -80 -90 -a0|012323232323232323232321232323232323232323232323232323232323232312|-21Q7x.Q pAnx.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3re0|33e4\",\"Asia/Choibalsan|LMT +07 +08 +10 +09|-7C -70 -80 -a0 -90|0123434343434343434343434343434343434343434343424242|-2APHC 2UkoC cKn0 1da0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 3Db0 h1f0 1cJ0 1cP0 1cJ0|38e3\",\"Asia/Shanghai|CST CDT|-80 -90|01010101010101010101010101010|-23uw0 18n0 OjB0 Rz0 11d0 1wL0 A10 8HX0 1G10 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 aL0 1tU30 Rb0 1o10 11z0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0|23e6\",\"Asia/Colombo|MMT +0530 +06 +0630|-5j.w -5u -60 -6u|01231321|-2zOtj.w 1rFbN.w 1zzu 7Apu 23dz0 11zu n3cu|22e5\",\"Asia/Dhaka|HMT +0630 +0530 +06 +07|-5R.k -6u -5u -60 -70|0121343|-18LFR.k 1unn.k HB0 m6n0 2kxbu 1i00|16e6\",\"Asia/Damascus|LMT EET EEST|-2p.c -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-21Jep.c Hep.c 17b0 1ip0 17b0 1ip0 17b0 1ip0 19X0 1xRB0 11X0 1oN0 10L0 1pB0 11b0 1oN0 10L0 1mp0 13X0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 1pd0 11b0 1oN0 Nb0 1AN0 Nb0 bcp0 19X0 1gp0 19X0 3ld0 1xX0 Vd0 1Bz0 Sp0 1vX0 10p0 1dz0 1cN0 1cL0 1db0 1db0 1g10 1an0 1ap0 1db0 1fd0 1db0 1cN0 1db0 1dd0 1db0 1cp0 1dz0 1c10 1dX0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1db0 1cN0 1db0 1cN0 19z0 1fB0 1qL0 11B0 1on0 Wp0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0|26e5\",\"Asia/Dili|LMT +08 +09|-8m.k -80 -90|01212|-2le8m.k 1dnXm.k 1nfA0 Xld0|19e4\",\"Asia/Dubai|LMT +04|-3F.c -40|01|-21JfF.c|39e5\",\"Asia/Dushanbe|LMT +05 +06 +07|-4z.c -50 -60 -70|012323232323232323232321|-1Pc4z.c eUnz.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2hB0|76e4\",\"Asia/Famagusta|LMT EET EEST +03|-2f.M -20 -30 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212312121212121212121212121212121212121212121|-1Vc2f.M 2a3cf.M 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 15U0 2Ks0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|\",\"Asia/Gaza|EET EEST IST IDT|-20 -30 -20 -30|010101010101010101010101010101010123232323232323232323232323232320101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2o0 MM0 iM0 4JA0 10o0 1pA0 10M0 1pA0 16o0 1jA0 16o0 1jA0 pBa0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 11z0 1o10 14o0 1lA1 SKX 1xd1 MKX 1AN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|18e5\",\"Asia/Hebron|EET EEST IST IDT|-20 -30 -20 -30|01010101010101010101010101010101012323232323232323232323232323232010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-1c2o0 MM0 iM0 4JA0 10o0 1pA0 10M0 1pA0 16o0 1jA0 16o0 1jA0 pBa0 Vz0 1oN0 11b0 1oO0 10N0 1pz0 10N0 1pb0 10N0 1pb0 10N0 1pb0 10N0 1pz0 10N0 1pb0 10N0 1pb0 11d0 1oL0 dW0 hfB0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 M10 C00 17c0 1io0 17c0 1io0 17c0 1o00 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 17c0 1io0 18N0 1bz0 19z0 1gp0 1610 1iL0 12L0 1mN0 14o0 1lc0 Tb0 1xd1 MKX bB0 cn0 1cN0 1a00 1fA0 1cL0 1cN0 1nX0 1210 1nA0 1210 1qL0 WN0 1qL0 WN0 1qL0 11c0 1on0 11B0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4\",\"Asia/Ho_Chi_Minh|LMT PLMT +07 +08 +09|-76.E -76.u -70 -80 -90|0123423232|-2yC76.E bK00.a 1h7b6.u 5lz0 18o0 3Oq0 k5b0 aW00 BAM0|90e5\",\"Asia/Hong_Kong|LMT HKT HKST HKWT JST|-7A.G -80 -90 -8u -90|0123412121212121212121212121212121212121212121212121212121212121212121|-2CFH0 1taO0 Hc0 xUu 9tBu 11z0 1tDu Rc0 1wo0 11A0 1cM0 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1nX0 U10 1tz0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|73e5\",\"Asia/Hovd|LMT +06 +07 +08|-66.A -60 -70 -80|012323232323232323232323232323232323232323232323232|-2APG6.A 2Uko6.A cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|81e3\",\"Asia/Irkutsk|IMT +07 +08 +09|-6V.5 -70 -80 -90|01232323232323232323232123232323232323232323232323232323232323232|-21zGV.5 pjXV.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4\",\"Europe/Istanbul|IMT EET EEST +03 +04|-1U.U -20 -30 -30 -40|0121212121212121212121212121212121212121212121234312121212121212121212121212121212121212121212121212121212121212123|-2ogNU.U dzzU.U 11b0 8tB0 1on0 1410 1db0 19B0 1in0 3Rd0 Un0 1oN0 11b0 zSN0 CL0 mp0 1Vz0 1gN0 8yn0 1yp0 ML0 1kp0 17b0 1ip0 17b0 1fB0 19X0 1ip0 19X0 1ip0 17b0 qdB0 38L0 1jd0 Tz0 l6O0 11A0 WN0 1qL0 TB0 1tX0 U10 1tz0 11B0 1in0 17d0 z90 cne0 pb0 2Cp0 1800 14o0 1dc0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1a00 1fA0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WO0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 Xc0 1qo0 WM0 1qM0 11A0 1o00 1200 1nA0 11A0 1tA0 U00 15w0|13e6\",\"Asia/Jakarta|BMT +0720 +0730 +09 +08 WIB|-77.c -7k -7u -90 -80 -70|01232425|-1Q0Tk luM0 mPzO 8vWu 6kpu 4PXu xhcu|31e6\",\"Asia/Jayapura|LMT +09 +0930 WIT|-9m.M -90 -9u -90|0123|-1uu9m.M sMMm.M L4nu|26e4\",\"Asia/Jerusalem|JMT IST IDT IDDT|-2k.E -20 -30 -40|01212121212121321212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-26Bek.E SyOk.E MM0 iM0 4JA0 10o0 1pA0 10M0 1pA0 16o0 1jA0 16o0 1jA0 3LA0 Eo0 oo0 1co0 1dA0 16o0 10M0 1jc0 1tA0 14o0 1cM0 1a00 11A0 1Nc0 Ao0 1Nc0 Ao0 1Ko0 LA0 1o00 WM0 EQK0 Db0 1fB0 Rb0 bXB0 gM0 8Q00 IM0 1wo0 TX0 1HB0 IL0 1s10 10n0 1o10 WL0 1zd0 On0 1ld0 11z0 1o10 14n0 1o10 14n0 1nd0 12n0 1nd0 Xz0 1q10 12n0 1hB0 1dX0 1ep0 1aL0 1eN0 17X0 1nf0 11z0 1tB0 19W0 1e10 17b0 1ep0 1gL0 18N0 1fz0 1eN0 17b0 1gq0 1gn0 19d0 1dz0 1c10 17X0 1hB0 1gn0 19d0 1dz0 1c10 17X0 1kp0 1dz0 1c10 1aL0 1eN0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0 10N0 1rz0 W10 1rz0 W10 1rz0 W10 1rz0 10N0 1oL0 10N0 1oL0|81e4\",\"Asia/Kabul|+04 +0430|-40 -4u|01|-10Qs0|46e5\",\"Asia/Kamchatka|LMT +11 +12 +13|-ay.A -b0 -c0 -d0|012323232323232323232321232323232323232323232323232323232323212|-1SLKy.A ivXy.A 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|18e4\",\"Asia/Karachi|LMT +0530 +0630 +05 PKT PKST|-4s.c -5u -6u -50 -50 -60|012134545454|-2xoss.c 1qOKW.c 7zX0 eup0 LqMu 1fy00 1cL0 dK10 11b0 1610 1jX0|24e6\",\"Asia/Urumqi|LMT +06|-5O.k -60|01|-1GgtO.k|32e5\",\"Asia/Kathmandu|LMT +0530 +0545|-5F.g -5u -5J|012|-21JhF.g 2EGMb.g|12e5\",\"Asia/Khandyga|LMT +08 +09 +10 +11|-92.d -80 -90 -a0 -b0|0123232323232323232323212323232323232323232323232343434343434343432|-21Q92.d pAp2.d 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 qK0 yN0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|66e2\",\"Asia/Krasnoyarsk|LMT +06 +07 +08|-6b.q -60 -70 -80|01232323232323232323232123232323232323232323232323232323232323232|-21Hib.q prAb.q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|10e5\",\"Asia/Kuala_Lumpur|SMT +07 +0720 +0730 +09 +08|-6T.p -70 -7k -7u -90 -80|0123435|-2Bg6T.p 17anT.p l5XE 17bO 8Fyu 1so1u|71e5\",\"Asia/Kuching|LMT +0730 +08 +0820 +09|-7l.k -7u -80 -8k -90|0123232323232323242|-1KITl.k gDbP.k 6ynu AnE 1O0k AnE 1NAk AnE 1NAk AnE 1NAk AnE 1O0k AnE 1NAk AnE pAk 8Fz0|13e4\",\"Asia/Macau|LMT CST +09 +10 CDT|-7y.a -80 -90 -a0 -90|012323214141414141414141414141414141414141414141414141414141414141414141|-2CFHy.a 1uqKy.a PX0 1kn0 15B0 11b0 4Qq0 1oM0 11c0 1ko0 1u00 11A0 1cM0 11c0 1o00 11A0 1o00 11A0 1oo0 1400 1o00 11A0 1o00 U00 1tA0 U00 1wo0 Rc0 1wru U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 Rd0 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 17d0 1cK0 1cO0 1cK0 1cO0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 s10 1Vz0 1cN0 1cL0 1cN0 1cL0 6fd0 14n0|57e4\",\"Asia/Magadan|LMT +10 +11 +12|-a3.c -a0 -b0 -c0|012323232323232323232321232323232323232323232323232323232323232312|-1Pca3.c eUo3.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Cq0|95e3\",\"Asia/Makassar|LMT MMT +08 +09 WITA|-7V.A -7V.A -80 -90 -80|01234|-21JjV.A vfc0 myLV.A 8ML0|15e5\",\"Asia/Manila|PST PDT JST|-80 -90 -90|010201010|-1kJI0 AL0 cK10 65X0 mXB0 vX0 VK10 1db0|24e6\",\"Asia/Nicosia|LMT EET EEST|-2d.s -20 -30|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1Vc2d.s 2a3cd.s 1cL0 1qp0 Xz0 19B0 19X0 1fB0 1db0 1cp0 1cL0 1fB0 19X0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1o30 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|32e4\",\"Asia/Novokuznetsk|LMT +06 +07 +08|-5M.M -60 -70 -80|012323232323232323232321232323232323232323232323232323232323212|-1PctM.M eULM.M 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|55e4\",\"Asia/Novosibirsk|LMT +06 +07 +08|-5v.E -60 -70 -80|0123232323232323232323212323212121212121212121212121212121212121212|-21Qnv.E pAFv.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 ml0 Os0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 4eN0|15e5\",\"Asia/Omsk|LMT +05 +06 +07|-4R.u -50 -60 -70|01232323232323232323232123232323232323232323232323232323232323232|-224sR.u pMLR.u 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|12e5\",\"Asia/Oral|LMT +03 +05 +06 +04|-3p.o -30 -50 -60 -40|01232323232323232424242424242424242424242424242|-1Pc3p.o eUop.o 23CK0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 1cM0 IM0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|27e4\",\"Asia/Pontianak|LMT PMT +0730 +09 +08 WITA WIB|-7h.k -7h.k -7u -90 -80 -80 -70|012324256|-2ua7h.k XE00 munL.k 8Rau 6kpu 4PXu xhcu Wqnu|23e4\",\"Asia/Pyongyang|LMT KST JST KST|-8n -8u -90 -90|012313|-2um8n 97XR 1lTzu 2Onc0 6BA0|29e5\",\"Asia/Qostanay|LMT +04 +05 +06|-4e.s -40 -50 -60|012323232323232323232123232323232323232323232323|-1Pc4e.s eUoe.s 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0|\",\"Asia/Qyzylorda|LMT +04 +05 +06|-4l.Q -40 -50 -60|01232323232323232323232323232323232323232323232|-1Pc4l.Q eUol.Q 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 3ao0 1EM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 zQl0|73e4\",\"Asia/Rangoon|RMT +0630 +09|-6o.L -6u -90|0121|-21Jio.L SmnS.L 7j9u|48e5\",\"Asia/Sakhalin|LMT +09 +11 +12 +10|-9u.M -90 -b0 -c0 -a0|01232323232323232323232423232323232424242424242424242424242424242|-2AGVu.M 1BoMu.M 1qFa0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 2pB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|58e4\",\"Asia/Samarkand|LMT +04 +05 +06|-4r.R -40 -50 -60|01232323232323232323232|-1Pc4r.R eUor.R 23CL0 3Db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0|36e4\",\"Asia/Seoul|LMT KST JST KST KDT KDT|-8r.Q -8u -90 -90 -a0 -9u|012343434343151515151515134343|-2um8r.Q 97XV.Q 1m1zu 6CM0 Fz0 1kN0 14n0 1kN0 14L0 1zd0 On0 69B0 2I0u OL0 1FB0 Rb0 1qN0 TX0 1tB0 TX0 1tB0 TX0 1tB0 TX0 2ap0 12FBu 11A0 1o00 11A0|23e6\",\"Asia/Srednekolymsk|LMT +10 +11 +12|-ae.Q -a0 -b0 -c0|01232323232323232323232123232323232323232323232323232323232323232|-1Pcae.Q eUoe.Q 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|35e2\",\"Asia/Taipei|CST JST CDT|-80 -90 -90|01020202020202020202020202020202020202020|-1iw80 joM0 1yo0 Tz0 1ip0 1jX0 1cN0 11b0 1oN0 11b0 1oN0 11b0 1oN0 11b0 10N0 1BX0 10p0 1pz0 10p0 1pz0 10p0 1db0 1dd0 1db0 1cN0 1db0 1cN0 1db0 1cN0 1db0 1BB0 ML0 1Bd0 ML0 uq10 1db0 1cN0 1db0 97B0 AL0|74e5\",\"Asia/Tashkent|LMT +05 +06 +07|-4B.b -50 -60 -70|012323232323232323232321|-1Pc4B.b eUnB.b 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0|23e5\",\"Asia/Tbilisi|TBMT +03 +04 +05|-2X.b -30 -40 -50|0123232323232323232323212121232323232323232323212|-1Pc2X.b 1jUnX.b WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cK0 1cL0 1cN0 1cL0 1cN0 2pz0 1cL0 1fB0 3Nz0 11B0 1nX0 11B0 1qL0 WN0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 An0 Os0 WM0|11e5\",\"Asia/Tehran|LMT TMT +0330 +04 +05 +0430|-3p.I -3p.I -3u -40 -50 -4u|01234325252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252|-2btDp.I 1d3c0 1huLT.I TXu 1pz0 sN0 vAu 1cL0 1dB0 1en0 pNB0 UL0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 64p0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0 1cN0 1dz0 1cp0 1dz0 1cp0 1dz0 1cp0 1dz0|14e6\",\"Asia/Thimphu|LMT +0530 +06|-5W.A -5u -60|012|-Su5W.A 1BGMs.A|79e3\",\"Asia/Tokyo|JST JDT|-90 -a0|010101010|-QJJ0 Rc0 1lc0 14o0 1zc0 Oo0 1zc0 Oo0|38e6\",\"Asia/Tomsk|LMT +06 +07 +08|-5D.P -60 -70 -80|0123232323232323232323212323232323232323232323212121212121212121212|-21NhD.P pxzD.P 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 co0 1bB0 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3Qp0|10e5\",\"Asia/Ulaanbaatar|LMT +07 +08 +09|-77.w -70 -80 -90|012323232323232323232323232323232323232323232323232|-2APH7.w 2Uko7.w cKn0 1db0 1dd0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 6hD0 11z0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 kEp0 1cJ0 1cP0 1cJ0|12e5\",\"Asia/Ust-Nera|LMT +08 +09 +12 +11 +10|-9w.S -80 -90 -c0 -b0 -a0|012343434343434343434345434343434343434343434343434343434343434345|-21Q9w.S pApw.S 23CL0 1d90 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 17V0 7zD0|65e2\",\"Asia/Vladivostok|LMT +09 +10 +11|-8L.v -90 -a0 -b0|01232323232323232323232123232323232323232323232323232323232323232|-1SJIL.v itXL.v 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|60e4\",\"Asia/Yakutsk|LMT +08 +09 +10|-8C.W -80 -90 -a0|01232323232323232323232123232323232323232323232323232323232323232|-21Q8C.W pAoC.W 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|28e4\",\"Asia/Yekaterinburg|LMT PMT +04 +05 +06|-42.x -3J.5 -40 -50 -60|012343434343434343434343234343434343434343434343434343434343434343|-2ag42.x 7mQh.s qBvJ.5 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|14e5\",\"Asia/Yerevan|LMT +03 +04 +05|-2W -30 -40 -50|0123232323232323232323212121212323232323232323232323232323232|-1Pc2W 1jUnW WCL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 2pB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 4RX0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0|13e5\",\"Atlantic/Azores|HMT -02 -01 +00 WET|1S.w 20 10 0 0|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121232323232323232323232323232323234323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-2ldW0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cL0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|25e4\",\"Atlantic/Bermuda|BMT BST AST ADT|4j.i 3j.i 40 30|010102323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-28p7E.G 1bb0 1i10 11X0 ru30 thbE.G 1PX0 11B0 1tz0 Rd0 1zb0 Op0 1zb0 3I10 Lz0 1EN0 FX0 1HB0 FX0 1Kp0 Db0 1Kp0 Db0 1Kp0 FX0 93d0 11z0 GAp0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|65e3\",\"Atlantic/Canary|LMT -01 WET WEST|11.A 10 0 -10|01232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-1UtaW.o XPAW.o 1lAK0 1a10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4\",\"Atlantic/Cape_Verde|LMT -02 -01|1y.4 20 10|01212|-2ldW0 1eEo0 7zX0 1djf0|50e4\",\"Atlantic/Faroe|LMT WET WEST|r.4 0 -10|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2uSnw.U 2Wgow.U 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|49e3\",\"Atlantic/Madeira|FMT -01 +00 +01 WET WEST|17.A 10 0 -10 0 -10|01212121212121212121212121212121212121212121232123212321232121212121212121212121212121212121212121454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2ldX0 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 qIl0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e4\",\"Atlantic/Reykjavik|LMT -01 +00 GMT|1s 10 0 0|012121212121212121212121212121212121212121212121212121212121212121213|-2uWmw mfaw 1Bd0 ML0 1LB0 Cn0 1LB0 3fX0 C10 HrX0 1cO0 LB0 1EL0 LA0 1C00 Oo0 1wo0 Rc0 1wo0 Rc0 1wo0 Rc0 1zc0 Oo0 1zc0 14o0 1lc0 14o0 1lc0 14o0 1o00 11A0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1lc0 14o0 1o00 14o0|12e4\",\"Atlantic/South_Georgia|-02|20|0||30\",\"Atlantic/Stanley|SMT -04 -03 -02|3P.o 40 30 20|012121212121212323212121212121212121212121212121212121212121212121212|-2kJw8.A 12bA8.A 19X0 1fB0 19X0 1ip0 19X0 1fB0 19X0 1fB0 19X0 1fB0 Cn0 1Cc10 WL0 1qL0 U10 1tz0 2mN0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 U10 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1tz0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qL0 WN0 1qN0 U10 1wn0 Rd0 1wn0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1tz0 U10 1wn0 U10 1tz0 U10 1tz0 U10|21e2\",\"Australia/Sydney|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293k0 xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|40e5\",\"Australia/Adelaide|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293ju xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 WM0 1qM0 Rc0 1zc0 U00 1tA0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|11e5\",\"Australia/Brisbane|AEST AEDT|-a0 -b0|01010101010101010|-293k0 xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0|20e5\",\"Australia/Broken_Hill|ACST ACDT|-9u -au|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293ju xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 14o0 1o00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1tA0 WM0 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|18e3\",\"Australia/Hobart|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-29E80 1a00 1qM0 Oo0 1zc0 Oo0 TAo0 yM0 1cM0 1cM0 1fA0 1a00 VfA0 1cM0 1o00 Rc0 1wo0 Rc0 1wo0 U00 1wo0 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 11A0 1qM0 WM0 1qM0 Oo0 1zc0 Oo0 1zc0 Oo0 1wo0 WM0 1tA0 WM0 1tA0 U00 1tA0 U00 1tA0 11A0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 11A0 1o00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|21e4\",\"Australia/Darwin|ACST ACDT|-9u -au|010101010|-293ju xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00|12e4\",\"Australia/Eucla|+0845 +0945|-8J -9J|0101010101010101010|-293iJ xc0 10jc0 yM0 1cM0 1cM0 1gSo0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|368\",\"Australia/Lord_Howe|AEST +1030 +1130 +11|-a0 -au -bu -b0|0121212121313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313|raC0 1zdu Rb0 1zd0 On0 1zd0 On0 1zd0 On0 1zd0 TXu 1qMu WLu 1tAu WLu 1tAu TXu 1tAu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu 11zu 1o0u 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 11Au 1nXu 1qMu 11zu 1o0u 11zu 1o0u 11zu 1qMu WLu 1qMu 11zu 1o0u WLu 1qMu 14nu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1fzu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1cMu 1cLu 1fAu 1cLu 1cMu 1cLu 1cMu|347\",\"Australia/Lindeman|AEST AEDT|-a0 -b0|010101010101010101010|-293k0 xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 H1A0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0|10\",\"Australia/Melbourne|AEST AEDT|-a0 -b0|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101|-293k0 xc0 10jc0 yM0 1cM0 1cM0 1fA0 1a00 17c00 LA0 1C00 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 U00 1qM0 WM0 1qM0 11A0 1tA0 U00 1tA0 U00 1tA0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 11A0 1o00 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 14o0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|39e5\",\"Australia/Perth|AWST AWDT|-80 -90|0101010101010101010|-293i0 xc0 10jc0 yM0 1cM0 1cM0 1gSo0 Oo0 l5A0 Oo0 iJA0 G00 zU00 IM0 1qM0 11A0 1o00 11A0|18e5\",\"CET|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|\",\"Pacific/Easter|EMT -07 -06 -05|7h.s 70 60 50|012121212121212121212121212123232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323|-1uSgG.w 1s4IG.w WL0 1zd0 On0 1ip0 11z0 1o10 11z0 1qN0 WL0 1ld0 14n0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 2pA0 11z0 1o10 11z0 1qN0 WL0 1qN0 WL0 1qN0 1cL0 1cN0 11z0 1o10 11z0 1qN0 WL0 1fB0 19X0 1qN0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1ip0 1fz0 1fB0 11z0 1qN0 WL0 1qN0 WL0 1qN0 WL0 1qN0 11z0 1o10 11z0 1o10 11z0 1qN0 WL0 1qN0 17b0 1ip0 11z0 1o10 19X0 1fB0 1nX0 G10 1EL0 Op0 1zb0 Rd0 1wn0 Rd0 46n0 Ap0 1Nb0 Ap0 1Nb0 Ap0 1zb0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1nX0 11B0 1qL0 WN0 1qL0 11B0 1nX0 11B0|30e2\",\"CST6CDT|CST CDT CWT CPT|60 50 50 50|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261s0 1nX0 11B0 1nX0 SgN0 8x30 iw0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"EET|EET EEST|-20 -30|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|\",\"Europe/Dublin|DMT IST GMT BST IST|p.l -y.D 0 -10 -10|01232323232324242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242424242|-2ax9y.D Rc0 1fzy.D 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 g600 14o0 1wo0 17c0 1io0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5\",\"EST|EST|50|0||\",\"EST5EDT|EST EDT EWT EPT|50 40 40 40|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261t0 1nX0 11B0 1nX0 SgN0 8x40 iv0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"Etc/GMT-0|GMT|0|0||\",\"Etc/GMT-1|+01|-10|0||\",\"Pacific/Port_Moresby|+10|-a0|0||25e4\",\"Etc/GMT-11|+11|-b0|0||\",\"Pacific/Tarawa|+12|-c0|0||29e3\",\"Etc/GMT-13|+13|-d0|0||\",\"Etc/GMT-14|+14|-e0|0||\",\"Etc/GMT-2|+02|-20|0||\",\"Etc/GMT-3|+03|-30|0||\",\"Etc/GMT-4|+04|-40|0||\",\"Etc/GMT-5|+05|-50|0||\",\"Etc/GMT-6|+06|-60|0||\",\"Indian/Christmas|+07|-70|0||21e2\",\"Etc/GMT-8|+08|-80|0||\",\"Pacific/Palau|+09|-90|0||21e3\",\"Etc/GMT+1|-01|10|0||\",\"Etc/GMT+10|-10|a0|0||\",\"Etc/GMT+11|-11|b0|0||\",\"Etc/GMT+12|-12|c0|0||\",\"Etc/GMT+3|-03|30|0||\",\"Etc/GMT+4|-04|40|0||\",\"Etc/GMT+5|-05|50|0||\",\"Etc/GMT+6|-06|60|0||\",\"Etc/GMT+7|-07|70|0||\",\"Etc/GMT+8|-08|80|0||\",\"Etc/GMT+9|-09|90|0||\",\"Etc/UTC|UTC|0|0||\",\"Europe/Amsterdam|AMT NST +0120 +0020 CEST CET|-j.w -1j.w -1k -k -20 -10|010101010101010101010101010101010101010101012323234545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545|-2aFcj.w 11b0 1iP0 11A0 1io0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1co0 1io0 1yo0 Pc0 1a00 1fA0 1Bc0 Mo0 1tc0 Uo0 1tA0 U00 1uo0 W00 1s00 VA0 1so0 Vc0 1sM0 UM0 1wo0 Rc0 1u00 Wo0 1rA0 W00 1s00 VA0 1sM0 UM0 1w00 fV0 BCX.w 1tA0 U00 1u00 Wo0 1sm0 601k WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|16e5\",\"Europe/Andorra|WET CET CEST|0 -10 -20|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-UBA0 1xIN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|79e3\",\"Europe/Astrakhan|LMT +03 +04 +05|-3c.c -30 -40 -50|012323232323232323212121212121212121212121212121212121212121212|-1Pcrc.c eUMc.c 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|10e5\",\"Europe/Athens|AMT EET EEST CEST CET|-1y.Q -20 -30 -20 -10|012123434121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2a61x.Q CNbx.Q mn0 kU10 9b0 3Es0 Xa0 1fb0 1dd0 k3X0 Nz0 SCp0 1vc0 SO0 1cM0 1a00 1ao0 1fc0 1a10 1fG0 1cg0 1dX0 1bX0 1cQ0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|35e5\",\"Europe/London|GMT BST BDST|0 -10 -20|0101010101010101010101010101010101010101010101010121212121210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1a00 1qM0 WM0 1qM0 11A0 1o00 WM0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1tA0 IM0 90o0 U00 1tA0 U00 1tA0 U00 1tA0 U00 1tA0 WM0 1qM0 WM0 1qM0 WM0 1tA0 U00 1tA0 U00 1tA0 11z0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1o00 14o0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|10e6\",\"Europe/Belgrade|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19RC0 3IP0 WM0 1fA0 1cM0 1cM0 1rc0 Qo0 1vmo0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5\",\"Europe/Berlin|CET CEST CEMT|-10 -20 -30|01010101010101210101210101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 kL0 Nc0 m10 WM0 1ao0 1cp0 dX0 jz0 Dd0 1io0 17c0 1fA0 1a00 1ehA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e5\",\"Europe/Prague|CET CEST GMT|-10 -20 0|01010101010101010201010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 1cM0 1qM0 11c0 mp0 xA0 mn0 17c0 1io0 17c0 1fc0 1ao0 1bNc0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|13e5\",\"Europe/Brussels|WET CET CEST WEST|0 -10 -20 -10|0121212103030303030303030303030303030303030303030303212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ehc0 3zX0 11c0 1iO0 11A0 1o00 11A0 my0 Ic0 1qM0 Rc0 1EM0 UM0 1u00 10o0 1io0 1io0 17c0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a30 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 y00 5Wn0 WM0 1fA0 1cM0 16M0 1iM0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|21e5\",\"Europe/Bucharest|BMT EET EEST|-1I.o -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1xApI.o 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Axc0 On0 1fA0 1a10 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|19e5\",\"Europe/Budapest|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 1oo0 11c0 1lc0 17c0 O1V0 3Nf0 WM0 1fA0 1cM0 1cM0 1oJ0 1dd0 1020 1fX0 1cp0 1cM0 1cM0 1cM0 1fA0 1a00 bhy0 Rb0 1wr0 Rc0 1C00 LA0 1C00 LA0 SNW0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cO0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5\",\"Europe/Zurich|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-19Lc0 11A0 1o00 11A0 1xG10 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e4\",\"Europe/Chisinau|CMT BMT EET EEST CEST CET MSK MSD|-1T -1I.o -20 -30 -20 -10 -30 -40|012323232323232323234545467676767676767676767323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232323232|-26jdT wGMa.A 20LI.o RA0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 27A0 2en0 39g0 WM0 1fA0 1cM0 V90 1t7z0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 gL0 WO0 1cM0 1cM0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11D0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|67e4\",\"Europe/Copenhagen|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 Tz0 VuO0 60q0 WM0 1fA0 1cM0 1cM0 1cM0 S00 1HA0 Nc0 1C00 Dc0 1Nc0 Ao0 1h5A0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5\",\"Europe/Gibraltar|GMT BST BDST CET CEST|0 -10 -20 -10 -20|010101010101010101010101010101010101010101010101012121212121010121010101010101010101034343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-2axa0 Rc0 1fA0 14M0 1fc0 1g00 1co0 1dc0 1co0 1oo0 1400 1dc0 19A0 1io0 1io0 WM0 1o00 14o0 1o00 17c0 1io0 17c0 1fA0 1a00 1lc0 17c0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1cM0 1io0 17c0 1fA0 1a00 1io0 17c0 1io0 17c0 1fA0 1a00 1io0 1qM0 Dc0 2Rz0 Dc0 1zc0 Oo0 1zc0 Rc0 1wo0 17c0 1iM0 FA0 xB0 1fA0 1a00 14o0 bb0 LA0 xB0 Rc0 1wo0 11A0 1o00 17c0 1fA0 1a00 1fA0 1cM0 1fA0 1a00 17c0 1fA0 1a00 1io0 17c0 1lc0 17c0 1fA0 10Jz0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|30e3\",\"Europe/Helsinki|HMT EET EEST|-1D.N -20 -30|0121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-1WuND.N OULD.N 1dA0 1xGq0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5\",\"Europe/Kaliningrad|CET CEST EET EEST MSK MSD +03|-10 -20 -20 -30 -30 -40 -30|01010101010101232454545454545454543232323232323232323232323232323232323232323262|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 390 7A0 1en0 12N0 1pbb0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|44e4\",\"Europe/Kiev|KMT EET MSK CEST CET MSD EEST|-22.4 -20 -30 -20 -10 -40 -30|0123434252525252525252525256161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc22.4 eUo2.4 rnz0 2Hg0 WM0 1fA0 da0 1v4m0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 Db0 3220 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|34e5\",\"Europe/Kirov|LMT +03 +04 +05|-3i.M -30 -40 -50|01232323232323232321212121212121212121212121212121212121212121|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|48e4\",\"Europe/Lisbon|LMT WET WEST WEMT CET CEST|A.J 0 -10 -20 -10 -20|012121212121212121212121212121212121212121212321232123212321212121212121212121212121212121212121214121212121212121212121212121212124545454212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2le00 aPX0 Sp0 LX0 1vc0 Tc0 1uM0 SM0 1vc0 Tc0 1vc0 SM0 1vc0 6600 1co0 3E00 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 3I00 17c0 1cM0 1cM0 3Fc0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 1tA0 1cM0 1dc0 1400 gL0 IM0 s10 U00 dX0 Rc0 pd0 Rc0 gL0 Oo0 pd0 Rc0 gL0 Oo0 pd0 14o0 1cM0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 3Co0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 pvy0 1cM0 1cM0 1fA0 1cM0 1cM0 1cN0 1cL0 1cN0 1cM0 1cM0 1cM0 1cM0 1cN0 1cL0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|27e5\",\"Europe/Luxembourg|LMT CET CEST WET WEST WEST WET|-o.A -10 -20 0 -10 -20 -10|0121212134343434343434343434343434343434343434343434565651212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2DG0o.A t6mo.A TB0 1nX0 Up0 1o20 11A0 rW0 CM0 1qP0 R90 1EO0 UK0 1u20 10m0 1ip0 1in0 17e0 19W0 1fB0 1db0 1cp0 1in0 17d0 1fz0 1a10 1in0 1a10 1in0 17f0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Dc0 vA0 60L0 WM0 1fA0 1cM0 17c0 1io0 16M0 1C00 Uo0 1eeo0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4\",\"Europe/Madrid|WET WEST WEMT CET CEST|0 -10 -20 -10 -20|010101010101010101210343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343|-25Td0 19B0 1cL0 1dd0 b1z0 18p0 3HX0 17d0 1fz0 1a10 1io0 1a00 1in0 17d0 iIn0 Hd0 1cL0 bb0 1200 2s20 14n0 5aL0 Mp0 1vz0 17d0 1in0 17d0 1in0 17d0 1in0 17d0 6hX0 11B0 XHX0 1a10 1fz0 1a10 19X0 1cN0 1fz0 1a10 1fC0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|62e5\",\"Europe/Malta|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1co0 17c0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1co0 1cM0 1lA0 Xc0 1qq0 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1o10 11z0 1iN0 19z0 1fB0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4\",\"Europe/Minsk|MMT EET MSK CEST CET MSD EEST +03|-1O -20 -30 -20 -10 -40 -30 -30|01234343252525252525252525261616161616161616161616161616161616161617|-1Pc1O eUnO qNX0 3gQ0 WM0 1fA0 1cM0 Al0 1tsn0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 3Fc0 1cN0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0|19e5\",\"Europe/Monaco|PMT WET WEST WEMT CET CEST|-9.l 0 -10 -20 -10 -20|01212121212121212121212121212121212121212121212121232323232345454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-2n5c9.l cFX9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 2RV0 11z0 11B0 1ze0 WM0 1fA0 1cM0 1fa0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|38e3\",\"Europe/Moscow|MMT MMT MST MDST MSD MSK +05 EET EEST MSK|-2u.h -2v.j -3v.j -4v.j -40 -30 -50 -20 -30 -40|012132345464575454545454545454545458754545454545454545454545454545454545454595|-2ag2u.h 2pyW.W 1bA0 11X0 GN0 1Hb0 c4v.j ik0 3DA0 dz0 15A0 c10 2q10 iM10 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0|16e6\",\"Europe/Paris|PMT WET WEST CEST CET WEMT|-9.l 0 -10 -20 -10 -20|0121212121212121212121212121212121212121212121212123434352543434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434343434|-2nco9.l cNb9.l HA0 19A0 1iM0 11c0 1oo0 Wo0 1rc0 QM0 1EM0 UM0 1u00 10o0 1io0 1wo0 Rc0 1a00 1fA0 1cM0 1cM0 1io0 17c0 1fA0 1a00 1io0 1a00 1io0 17c0 1fA0 1a00 1io0 17c0 1cM0 1cM0 1a00 1io0 1cM0 1cM0 1a00 1fA0 1io0 17c0 1cM0 1cM0 1a00 1fA0 1io0 1qM0 Df0 Ik0 5M30 WM0 1fA0 1cM0 Vx0 hB0 1aq0 16M0 1ekn0 1cL0 1fC0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e6\",\"Europe/Riga|RMT LST EET MSK CEST CET MSD EEST|-1A.y -2A.y -20 -30 -20 -10 -40 -30|010102345454536363636363636363727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272|-25TzA.y 11A0 1iM0 ko0 gWm0 yDXA.y 2bX0 3fE0 WM0 1fA0 1cM0 1cM0 4m0 1sLy0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cN0 1o00 11A0 1o00 11A0 1qM0 3oo0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|64e4\",\"Europe/Rome|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2arB0 Lz0 1cN0 1db0 1410 1on0 Wp0 1qL0 17d0 1cL0 M3B0 5M20 WM0 1fA0 1cM0 16M0 1iM0 16m0 1de0 1lc0 14m0 1lc0 WO0 1qM0 GTW0 On0 1C10 LA0 1C00 LA0 1EM0 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1C00 LA0 1zc0 Oo0 1C00 LA0 1C00 LA0 1zc0 Oo0 1C00 Oo0 1zc0 Oo0 1fC0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|39e5\",\"Europe/Samara|LMT +03 +04 +05|-3k.k -30 -40 -50|0123232323232323232121232323232323232323232323232323232323212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2y10 14m0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 2sp0 WM0|12e5\",\"Europe/Saratov|LMT +03 +04 +05|-34.i -30 -40 -50|012323232323232321212121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 5810|\",\"Europe/Simferopol|SMT EET MSK CEST CET MSD EEST MSK|-2g -20 -30 -20 -10 -40 -30 -40|012343432525252525252525252161616525252616161616161616161616161616161616172|-1Pc2g eUog rEn0 2qs0 WM0 1fA0 1cM0 3V0 1u0L0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 4eL0 1cL0 1cN0 1cL0 1cN0 dX0 WL0 1cN0 1cL0 1fB0 1o30 11B0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11z0 1nW0|33e4\",\"Europe/Sofia|EET CET CEST EEST|-20 -10 -20 -30|01212103030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030303030|-168L0 WM0 1fA0 1cM0 1cM0 1cN0 1mKH0 1dd0 1fb0 1ap0 1fb0 1a20 1fy0 1a30 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cK0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 1nX0 11E0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|12e5\",\"Europe/Stockholm|CET CEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2azC0 TB0 2yDe0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|15e5\",\"Europe/Tallinn|TMT CET CEST EET MSK MSD EEST|-1D -10 -20 -20 -30 -40 -30|012103421212454545454545454546363636363636363636363636363636363636363636363636363636363636363636363636363636363636363636363|-26oND teD 11A0 1Ta0 4rXl KSLD 2FX0 2Jg0 WM0 1fA0 1cM0 18J0 1sTX0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o10 11A0 1qM0 5QM0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|41e4\",\"Europe/Tirane|LMT CET CEST|-1j.k -10 -20|01212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2glBj.k 14pcj.k 5LC0 WM0 4M0 1fCK0 10n0 1op0 11z0 1pd0 11z0 1qN0 WL0 1qp0 Xb0 1qp0 Xb0 1qp0 11z0 1lB0 11z0 1qN0 11z0 1iN0 16n0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|42e4\",\"Europe/Ulyanovsk|LMT +03 +04 +05 +02|-3d.A -30 -40 -50 -20|01232323232323232321214121212121212121212121212121212121212121212|-22WM0 qH90 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1fA0 2pB0 IM0 rX0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 3rd0|13e5\",\"Europe/Uzhgorod|CET CEST MSK MSD EET EEST|-10 -20 -30 -40 -20 -30|010101023232323232323232320454545454545454545454545454545454545454545454545454545454545454545454545454545454545454545454|-1cqL0 6i00 WM0 1fA0 1cM0 1ml0 1Cp0 1r3W0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1Q00 1Nf0 2pw0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|11e4\",\"Europe/Vienna|CET CEST|-10 -20|0101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 3KM0 14o0 LA00 6i00 WM0 1fA0 1cM0 1cM0 1cM0 400 2qM0 1ao0 1co0 1cM0 1io0 17c0 1gHa0 19X0 1cP0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|18e5\",\"Europe/Vilnius|WMT KMT CET EET MSK CEST MSD EEST|-1o -1z.A -10 -20 -30 -20 -40 -30|012324525254646464646464646473737373737373737352537373737373737373737373737373737373737373737373737373737373737373737373|-293do 6ILM.o 1Ooz.A zz0 Mfd0 29W0 3is0 WM0 1fA0 1cM0 LV0 1tgL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11B0 1o00 11A0 1qM0 8io0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|54e4\",\"Europe/Volgograd|LMT +03 +04 +05|-2V.E -30 -40 -50|0123232323232323212121212121212121212121212121212121212121212121|-21IqV.E psLV.E 23CL0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 2pB0 1cM0 1cM0 1cM0 1fA0 1cM0 3Co0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 8Hz0 9Jd0 5gn0|10e5\",\"Europe/Warsaw|WMT CET CEST EET EEST|-1o -10 -20 -20 -30|012121234312121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121|-2ctdo 1LXo 11d0 1iO0 11A0 1o00 11A0 1on0 11A0 6zy0 HWP0 5IM0 WM0 1fA0 1cM0 1dz0 1mL0 1en0 15B0 1aq0 1nA0 11A0 1io0 17c0 1fA0 1a00 iDX0 LA0 1cM0 1cM0 1C00 Oo0 1cM0 1cM0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1C00 LA0 uso0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cN0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|17e5\",\"Europe/Zaporozhye|+0220 EET MSK CEST CET MSD EEST|-2k -20 -30 -20 -10 -40 -30|01234342525252525252525252526161616161616161616161616161616161616161616161616161616161616161616161616161616161616161616161|-1Pc2k eUok rdb0 2RE0 WM0 1fA0 8m0 1v9a0 1db0 1cN0 1db0 1cN0 1db0 1dd0 1cO0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cK0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cQ0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|77e4\",\"HST|HST|a0|0||\",\"Indian/Chagos|LMT +05 +06|-4N.E -50 -60|012|-2xosN.E 3AGLN.E|30e2\",\"Indian/Cocos|+0630|-6u|0||596\",\"Indian/Kerguelen|-00 +05|0 -50|01|-MG00|130\",\"Indian/Mahe|LMT +04|-3F.M -40|01|-2xorF.M|79e3\",\"Indian/Maldives|MMT +05|-4S -50|01|-olgS|35e4\",\"Indian/Mauritius|LMT +04 +05|-3O -40 -50|012121|-2xorO 34unO 14L0 12kr0 11z0|15e4\",\"Indian/Reunion|LMT +04|-3F.Q -40|01|-2mDDF.Q|84e4\",\"Pacific/Kwajalein|+11 +10 +09 -12 +12|-b0 -a0 -90 c0 -c0|012034|-1kln0 akp0 6Up0 12ry0 Wan0|14e3\",\"MET|MET MEST|-10 -20|01010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-2aFe0 11d0 1iO0 11A0 1o00 11A0 Qrc0 6i00 WM0 1fA0 1cM0 1cM0 1cM0 16M0 1gMM0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|\",\"MST|MST|70|0||\",\"MST7MDT|MST MDT MWT MPT|70 60 60 60|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261r0 1nX0 11B0 1nX0 SgN0 8x20 ix0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"Pacific/Chatham|+1215 +1245 +1345|-cf -cJ -dJ|012121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212121212|-WqAf 1adef IM0 1C00 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Oo0 1zc0 Rc0 1zc0 Oo0 1qM0 14o0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1lc0 14o0 1lc0 14o0 1lc0 17c0 1io0 17c0 1io0 17c0 1io0 17c0 1io0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|600\",\"Pacific/Apia|LMT -1130 -11 -10 +14 +13|bq.U bu b0 a0 -e0 -d0|01232345454545454545454545454545454545454545454545454545454|-2nDMx.4 1yW03.4 2rRbu 1ff0 1a00 CI0 AQ0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1io0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1a00 1fA0 1cM0 1fA0 1a00 1fA0 1a00|37e3\",\"Pacific/Bougainville|+10 +09 +11|-a0 -90 -b0|0102|-16Wy0 7CN0 2MQp0|18e4\",\"Pacific/Chuuk|+10 +09|-a0 -90|01010|-2ewy0 axB0 RVX0 axd0|49e3\",\"Pacific/Efate|LMT +11 +12|-bd.g -b0 -c0|012121212121212121212121|-2l9nd.g 2uNXd.g Dc0 n610 1cL0 1cN0 1cL0 1fB0 19X0 1fB0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1fB0 Lz0 1Nd0 An0|66e3\",\"Pacific/Enderbury|-12 -11 +13|c0 b0 -d0|012|nIc0 B7X0|1\",\"Pacific/Fakaofo|-11 +13|b0 -d0|01|1Gfn0|483\",\"Pacific/Fiji|LMT +12 +13|-bT.I -c0 -d0|0121212121212121212121212121212121212121212121212121212121212121|-2bUzT.I 3m8NT.I LA0 1EM0 IM0 nJc0 LA0 1o00 Rc0 1wo0 Ao0 1Nc0 Ao0 1Q00 xz0 1SN0 uM0 1SM0 uM0 1VA0 s00 1VA0 s00 1VA0 s00 20o0 pc0 2hc0 bc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0 s00 1VA0 s00 20o0 pc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0 s00 20o0 pc0 20o0 pc0 20o0 pc0 20o0 pc0 20o0 s00 1VA0 s00|88e4\",\"Pacific/Galapagos|LMT -05 -06|5W.o 50 60|01212|-1yVS1.A 2dTz1.A gNd0 rz0|25e3\",\"Pacific/Gambier|LMT -09|8X.M 90|01|-2jof0.c|125\",\"Pacific/Guadalcanal|LMT +11|-aD.M -b0|01|-2joyD.M|11e4\",\"Pacific/Guam|GST +09 GDT ChST|-a0 -90 -b0 -a0|01020202020202020203|-18jK0 6pB0 AhB0 3QL0 g2p0 3p91 WOX rX0 1zd0 Rb0 1wp0 Rb0 5xd0 rX0 5sN0 zb1 1C0X On0 ULb0|17e4\",\"Pacific/Honolulu|HST HDT HWT HPT HST|au 9u 9u 9u a0|0102304|-1thLu 8x0 lef0 8wWu iAu 46p0|37e4\",\"Pacific/Kiritimati|-1040 -10 +14|aE a0 -e0|012|nIaE B7Xk|51e2\",\"Pacific/Kosrae|+11 +09 +10 +12|-b0 -90 -a0 -c0|01021030|-2ewz0 axC0 HBy0 akp0 axd0 WOK0 1bdz0|66e2\",\"Pacific/Majuro|+11 +09 +10 +12|-b0 -90 -a0 -c0|0102103|-2ewz0 axC0 HBy0 akp0 6RB0 12um0|28e3\",\"Pacific/Marquesas|LMT -0930|9i 9u|01|-2joeG|86e2\",\"Pacific/Pago_Pago|LMT SST|bm.M b0|01|-2nDMB.c|37e2\",\"Pacific/Nauru|LMT +1130 +09 +12|-b7.E -bu -90 -c0|01213|-1Xdn7.E QCnB.E 7mqu 1lnbu|10e3\",\"Pacific/Niue|-1120 -1130 -11|bk bu b0|012|-KfME 17y0a|12e2\",\"Pacific/Norfolk|+1112 +1130 +1230 +11 +12|-bc -bu -cu -b0 -c0|012134343434343434343434343434343434343434|-Kgbc W01G Oo0 1COo0 9Jcu 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0|25e4\",\"Pacific/Noumea|LMT +11 +12|-b5.M -b0 -c0|01212121|-2l9n5.M 2EqM5.M xX0 1PB0 yn0 HeP0 Ao0|98e3\",\"Pacific/Pitcairn|-0830 -08|8u 80|01|18Vku|56\",\"Pacific/Pohnpei|+11 +09 +10|-b0 -90 -a0|010210|-2ewz0 axC0 HBy0 akp0 axd0|34e3\",\"Pacific/Rarotonga|-1030 -0930 -10|au 9u a0|012121212121212121212121212|lyWu IL0 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Onu 1zcu Rbu 1zcu Onu 1zcu Onu 1zcu Onu|13e3\",\"Pacific/Tahiti|LMT -10|9W.g a0|01|-2joe1.I|18e4\",\"Pacific/Tongatapu|+1220 +13 +14|-ck -d0 -e0|0121212121|-1aB0k 2n5dk 15A0 1wo0 xz0 1Q10 xz0 zWN0 s00|75e3\",\"PST8PDT|PST PDT PWT PPT|80 70 70 70|010102301010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|-261q0 1nX0 11B0 1nX0 SgN0 8x10 iy0 QwN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1cN0 1cL0 1cN0 1cL0 s10 1Vz0 LB0 1BX0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 1cN0 1fz0 1a10 1fz0 1cN0 1cL0 1cN0 1cL0 1cN0 1cL0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 14p0 1lb0 14p0 1lb0 14p0 1nX0 11B0 1nX0 11B0 1nX0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Rd0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0 Op0 1zb0|\",\"WET|WET WEST|0 -10|010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010101010|hDB0 1a00 1fA0 1cM0 1cM0 1cM0 1fA0 1a00 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1cM0 1fA0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00 11A0 1qM0 WM0 1qM0 WM0 1qM0 WM0 1qM0 11A0 1o00 11A0 1o00|\"],\"links\":[\"Africa/Abidjan|Africa/Bamako\",\"Africa/Abidjan|Africa/Banjul\",\"Africa/Abidjan|Africa/Conakry\",\"Africa/Abidjan|Africa/Dakar\",\"Africa/Abidjan|Africa/Freetown\",\"Africa/Abidjan|Africa/Lome\",\"Africa/Abidjan|Africa/Nouakchott\",\"Africa/Abidjan|Africa/Ouagadougou\",\"Africa/Abidjan|Africa/Timbuktu\",\"Africa/Abidjan|Atlantic/St_Helena\",\"Africa/Cairo|Egypt\",\"Africa/Johannesburg|Africa/Maseru\",\"Africa/Johannesburg|Africa/Mbabane\",\"Africa/Lagos|Africa/Bangui\",\"Africa/Lagos|Africa/Brazzaville\",\"Africa/Lagos|Africa/Douala\",\"Africa/Lagos|Africa/Kinshasa\",\"Africa/Lagos|Africa/Libreville\",\"Africa/Lagos|Africa/Luanda\",\"Africa/Lagos|Africa/Malabo\",\"Africa/Lagos|Africa/Niamey\",\"Africa/Lagos|Africa/Porto-Novo\",\"Africa/Maputo|Africa/Blantyre\",\"Africa/Maputo|Africa/Bujumbura\",\"Africa/Maputo|Africa/Gaborone\",\"Africa/Maputo|Africa/Harare\",\"Africa/Maputo|Africa/Kigali\",\"Africa/Maputo|Africa/Lubumbashi\",\"Africa/Maputo|Africa/Lusaka\",\"Africa/Nairobi|Africa/Addis_Ababa\",\"Africa/Nairobi|Africa/Asmara\",\"Africa/Nairobi|Africa/Asmera\",\"Africa/Nairobi|Africa/Dar_es_Salaam\",\"Africa/Nairobi|Africa/Djibouti\",\"Africa/Nairobi|Africa/Kampala\",\"Africa/Nairobi|Africa/Mogadishu\",\"Africa/Nairobi|Indian/Antananarivo\",\"Africa/Nairobi|Indian/Comoro\",\"Africa/Nairobi|Indian/Mayotte\",\"Africa/Tripoli|Libya\",\"America/Adak|America/Atka\",\"America/Adak|US/Aleutian\",\"America/Anchorage|US/Alaska\",\"America/Argentina/Buenos_Aires|America/Buenos_Aires\",\"America/Argentina/Catamarca|America/Argentina/ComodRivadavia\",\"America/Argentina/Catamarca|America/Catamarca\",\"America/Argentina/Cordoba|America/Cordoba\",\"America/Argentina/Cordoba|America/Rosario\",\"America/Argentina/Jujuy|America/Jujuy\",\"America/Argentina/Mendoza|America/Mendoza\",\"America/Atikokan|America/Coral_Harbour\",\"America/Chicago|US/Central\",\"America/Curacao|America/Aruba\",\"America/Curacao|America/Kralendijk\",\"America/Curacao|America/Lower_Princes\",\"America/Denver|America/Shiprock\",\"America/Denver|Navajo\",\"America/Denver|US/Mountain\",\"America/Detroit|US/Michigan\",\"America/Edmonton|Canada/Mountain\",\"America/Fort_Wayne|America/Indiana/Indianapolis\",\"America/Fort_Wayne|America/Indianapolis\",\"America/Fort_Wayne|US/East-Indiana\",\"America/Godthab|America/Nuuk\",\"America/Halifax|Canada/Atlantic\",\"America/Havana|Cuba\",\"America/Indiana/Knox|America/Knox_IN\",\"America/Indiana/Knox|US/Indiana-Starke\",\"America/Jamaica|Jamaica\",\"America/Kentucky/Louisville|America/Louisville\",\"America/Los_Angeles|US/Pacific\",\"America/Manaus|Brazil/West\",\"America/Mazatlan|Mexico/BajaSur\",\"America/Mexico_City|Mexico/General\",\"America/New_York|US/Eastern\",\"America/Noronha|Brazil/DeNoronha\",\"America/Panama|America/Cayman\",\"America/Phoenix|US/Arizona\",\"America/Port_of_Spain|America/Anguilla\",\"America/Port_of_Spain|America/Antigua\",\"America/Port_of_Spain|America/Dominica\",\"America/Port_of_Spain|America/Grenada\",\"America/Port_of_Spain|America/Guadeloupe\",\"America/Port_of_Spain|America/Marigot\",\"America/Port_of_Spain|America/Montserrat\",\"America/Port_of_Spain|America/St_Barthelemy\",\"America/Port_of_Spain|America/St_Kitts\",\"America/Port_of_Spain|America/St_Lucia\",\"America/Port_of_Spain|America/St_Thomas\",\"America/Port_of_Spain|America/St_Vincent\",\"America/Port_of_Spain|America/Tortola\",\"America/Port_of_Spain|America/Virgin\",\"America/Regina|Canada/Saskatchewan\",\"America/Rio_Branco|America/Porto_Acre\",\"America/Rio_Branco|Brazil/Acre\",\"America/Santiago|Chile/Continental\",\"America/Sao_Paulo|Brazil/East\",\"America/St_Johns|Canada/Newfoundland\",\"America/Tijuana|America/Ensenada\",\"America/Tijuana|America/Santa_Isabel\",\"America/Tijuana|Mexico/BajaNorte\",\"America/Toronto|America/Montreal\",\"America/Toronto|Canada/Eastern\",\"America/Vancouver|Canada/Pacific\",\"America/Whitehorse|Canada/Yukon\",\"America/Winnipeg|Canada/Central\",\"Asia/Ashgabat|Asia/Ashkhabad\",\"Asia/Bangkok|Asia/Phnom_Penh\",\"Asia/Bangkok|Asia/Vientiane\",\"Asia/Dhaka|Asia/Dacca\",\"Asia/Dubai|Asia/Muscat\",\"Asia/Ho_Chi_Minh|Asia/Saigon\",\"Asia/Hong_Kong|Hongkong\",\"Asia/Jerusalem|Asia/Tel_Aviv\",\"Asia/Jerusalem|Israel\",\"Asia/Kathmandu|Asia/Katmandu\",\"Asia/Kolkata|Asia/Calcutta\",\"Asia/Kuala_Lumpur|Asia/Singapore\",\"Asia/Kuala_Lumpur|Singapore\",\"Asia/Macau|Asia/Macao\",\"Asia/Makassar|Asia/Ujung_Pandang\",\"Asia/Nicosia|Europe/Nicosia\",\"Asia/Qatar|Asia/Bahrain\",\"Asia/Rangoon|Asia/Yangon\",\"Asia/Riyadh|Asia/Aden\",\"Asia/Riyadh|Asia/Kuwait\",\"Asia/Seoul|ROK\",\"Asia/Shanghai|Asia/Chongqing\",\"Asia/Shanghai|Asia/Chungking\",\"Asia/Shanghai|Asia/Harbin\",\"Asia/Shanghai|PRC\",\"Asia/Taipei|ROC\",\"Asia/Tehran|Iran\",\"Asia/Thimphu|Asia/Thimbu\",\"Asia/Tokyo|Japan\",\"Asia/Ulaanbaatar|Asia/Ulan_Bator\",\"Asia/Urumqi|Asia/Kashgar\",\"Atlantic/Faroe|Atlantic/Faeroe\",\"Atlantic/Reykjavik|Iceland\",\"Atlantic/South_Georgia|Etc/GMT+2\",\"Australia/Adelaide|Australia/South\",\"Australia/Brisbane|Australia/Queensland\",\"Australia/Broken_Hill|Australia/Yancowinna\",\"Australia/Darwin|Australia/North\",\"Australia/Hobart|Australia/Currie\",\"Australia/Hobart|Australia/Tasmania\",\"Australia/Lord_Howe|Australia/LHI\",\"Australia/Melbourne|Australia/Victoria\",\"Australia/Perth|Australia/West\",\"Australia/Sydney|Australia/ACT\",\"Australia/Sydney|Australia/Canberra\",\"Australia/Sydney|Australia/NSW\",\"Etc/GMT-0|Etc/GMT\",\"Etc/GMT-0|Etc/GMT+0\",\"Etc/GMT-0|Etc/GMT0\",\"Etc/GMT-0|Etc/Greenwich\",\"Etc/GMT-0|GMT\",\"Etc/GMT-0|GMT+0\",\"Etc/GMT-0|GMT-0\",\"Etc/GMT-0|GMT0\",\"Etc/GMT-0|Greenwich\",\"Etc/UTC|Etc/UCT\",\"Etc/UTC|Etc/Universal\",\"Etc/UTC|Etc/Zulu\",\"Etc/UTC|UCT\",\"Etc/UTC|UTC\",\"Etc/UTC|Universal\",\"Etc/UTC|Zulu\",\"Europe/Belgrade|Europe/Ljubljana\",\"Europe/Belgrade|Europe/Podgorica\",\"Europe/Belgrade|Europe/Sarajevo\",\"Europe/Belgrade|Europe/Skopje\",\"Europe/Belgrade|Europe/Zagreb\",\"Europe/Chisinau|Europe/Tiraspol\",\"Europe/Dublin|Eire\",\"Europe/Helsinki|Europe/Mariehamn\",\"Europe/Istanbul|Asia/Istanbul\",\"Europe/Istanbul|Turkey\",\"Europe/Lisbon|Portugal\",\"Europe/London|Europe/Belfast\",\"Europe/London|Europe/Guernsey\",\"Europe/London|Europe/Isle_of_Man\",\"Europe/London|Europe/Jersey\",\"Europe/London|GB\",\"Europe/London|GB-Eire\",\"Europe/Moscow|W-SU\",\"Europe/Oslo|Arctic/Longyearbyen\",\"Europe/Oslo|Atlantic/Jan_Mayen\",\"Europe/Prague|Europe/Bratislava\",\"Europe/Rome|Europe/San_Marino\",\"Europe/Rome|Europe/Vatican\",\"Europe/Warsaw|Poland\",\"Europe/Zurich|Europe/Busingen\",\"Europe/Zurich|Europe/Vaduz\",\"Indian/Christmas|Etc/GMT-7\",\"Pacific/Auckland|Antarctica/McMurdo\",\"Pacific/Auckland|Antarctica/South_Pole\",\"Pacific/Auckland|NZ\",\"Pacific/Chatham|NZ-CHAT\",\"Pacific/Chuuk|Pacific/Truk\",\"Pacific/Chuuk|Pacific/Yap\",\"Pacific/Easter|Chile/EasterIsland\",\"Pacific/Guam|Pacific/Saipan\",\"Pacific/Honolulu|Pacific/Johnston\",\"Pacific/Honolulu|US/Hawaii\",\"Pacific/Kwajalein|Kwajalein\",\"Pacific/Pago_Pago|Pacific/Midway\",\"Pacific/Pago_Pago|Pacific/Samoa\",\"Pacific/Pago_Pago|US/Samoa\",\"Pacific/Palau|Etc/GMT-9\",\"Pacific/Pohnpei|Pacific/Ponape\",\"Pacific/Port_Moresby|Etc/GMT-10\",\"Pacific/Tarawa|Etc/GMT-12\",\"Pacific/Tarawa|Pacific/Funafuti\",\"Pacific/Tarawa|Pacific/Wake\",\"Pacific/Tarawa|Pacific/Wallis\"],\"countries\":[\"AD|Europe/Andorra\",\"AE|Asia/Dubai\",\"AF|Asia/Kabul\",\"AG|America/Port_of_Spain America/Antigua\",\"AI|America/Port_of_Spain America/Anguilla\",\"AL|Europe/Tirane\",\"AM|Asia/Yerevan\",\"AO|Africa/Lagos Africa/Luanda\",\"AQ|Antarctica/Casey Antarctica/Davis Antarctica/DumontDUrville Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Syowa Antarctica/Troll Antarctica/Vostok Pacific/Auckland Antarctica/McMurdo\",\"AR|America/Argentina/Buenos_Aires America/Argentina/Cordoba America/Argentina/Salta America/Argentina/Jujuy America/Argentina/Tucuman America/Argentina/Catamarca America/Argentina/La_Rioja America/Argentina/San_Juan America/Argentina/Mendoza America/Argentina/San_Luis America/Argentina/Rio_Gallegos America/Argentina/Ushuaia\",\"AS|Pacific/Pago_Pago\",\"AT|Europe/Vienna\",\"AU|Australia/Lord_Howe Antarctica/Macquarie Australia/Hobart Australia/Currie Australia/Melbourne Australia/Sydney Australia/Broken_Hill Australia/Brisbane Australia/Lindeman Australia/Adelaide Australia/Darwin Australia/Perth Australia/Eucla\",\"AW|America/Curacao America/Aruba\",\"AX|Europe/Helsinki Europe/Mariehamn\",\"AZ|Asia/Baku\",\"BA|Europe/Belgrade Europe/Sarajevo\",\"BB|America/Barbados\",\"BD|Asia/Dhaka\",\"BE|Europe/Brussels\",\"BF|Africa/Abidjan Africa/Ouagadougou\",\"BG|Europe/Sofia\",\"BH|Asia/Qatar Asia/Bahrain\",\"BI|Africa/Maputo Africa/Bujumbura\",\"BJ|Africa/Lagos Africa/Porto-Novo\",\"BL|America/Port_of_Spain America/St_Barthelemy\",\"BM|Atlantic/Bermuda\",\"BN|Asia/Brunei\",\"BO|America/La_Paz\",\"BQ|America/Curacao America/Kralendijk\",\"BR|America/Noronha America/Belem America/Fortaleza America/Recife America/Araguaina America/Maceio America/Bahia America/Sao_Paulo America/Campo_Grande America/Cuiaba America/Santarem America/Porto_Velho America/Boa_Vista America/Manaus America/Eirunepe America/Rio_Branco\",\"BS|America/Nassau\",\"BT|Asia/Thimphu\",\"BW|Africa/Maputo Africa/Gaborone\",\"BY|Europe/Minsk\",\"BZ|America/Belize\",\"CA|America/St_Johns America/Halifax America/Glace_Bay America/Moncton America/Goose_Bay America/Blanc-Sablon America/Toronto America/Nipigon America/Thunder_Bay America/Iqaluit America/Pangnirtung America/Atikokan America/Winnipeg America/Rainy_River America/Resolute America/Rankin_Inlet America/Regina America/Swift_Current America/Edmonton America/Cambridge_Bay America/Yellowknife America/Inuvik America/Creston America/Dawson_Creek America/Fort_Nelson America/Vancouver America/Whitehorse America/Dawson\",\"CC|Indian/Cocos\",\"CD|Africa/Maputo Africa/Lagos Africa/Kinshasa Africa/Lubumbashi\",\"CF|Africa/Lagos Africa/Bangui\",\"CG|Africa/Lagos Africa/Brazzaville\",\"CH|Europe/Zurich\",\"CI|Africa/Abidjan\",\"CK|Pacific/Rarotonga\",\"CL|America/Santiago America/Punta_Arenas Pacific/Easter\",\"CM|Africa/Lagos Africa/Douala\",\"CN|Asia/Shanghai Asia/Urumqi\",\"CO|America/Bogota\",\"CR|America/Costa_Rica\",\"CU|America/Havana\",\"CV|Atlantic/Cape_Verde\",\"CW|America/Curacao\",\"CX|Indian/Christmas\",\"CY|Asia/Nicosia Asia/Famagusta\",\"CZ|Europe/Prague\",\"DE|Europe/Zurich Europe/Berlin Europe/Busingen\",\"DJ|Africa/Nairobi Africa/Djibouti\",\"DK|Europe/Copenhagen\",\"DM|America/Port_of_Spain America/Dominica\",\"DO|America/Santo_Domingo\",\"DZ|Africa/Algiers\",\"EC|America/Guayaquil Pacific/Galapagos\",\"EE|Europe/Tallinn\",\"EG|Africa/Cairo\",\"EH|Africa/El_Aaiun\",\"ER|Africa/Nairobi Africa/Asmara\",\"ES|Europe/Madrid Africa/Ceuta Atlantic/Canary\",\"ET|Africa/Nairobi Africa/Addis_Ababa\",\"FI|Europe/Helsinki\",\"FJ|Pacific/Fiji\",\"FK|Atlantic/Stanley\",\"FM|Pacific/Chuuk Pacific/Pohnpei Pacific/Kosrae\",\"FO|Atlantic/Faroe\",\"FR|Europe/Paris\",\"GA|Africa/Lagos Africa/Libreville\",\"GB|Europe/London\",\"GD|America/Port_of_Spain America/Grenada\",\"GE|Asia/Tbilisi\",\"GF|America/Cayenne\",\"GG|Europe/London Europe/Guernsey\",\"GH|Africa/Accra\",\"GI|Europe/Gibraltar\",\"GL|America/Nuuk America/Danmarkshavn America/Scoresbysund America/Thule\",\"GM|Africa/Abidjan Africa/Banjul\",\"GN|Africa/Abidjan Africa/Conakry\",\"GP|America/Port_of_Spain America/Guadeloupe\",\"GQ|Africa/Lagos Africa/Malabo\",\"GR|Europe/Athens\",\"GS|Atlantic/South_Georgia\",\"GT|America/Guatemala\",\"GU|Pacific/Guam\",\"GW|Africa/Bissau\",\"GY|America/Guyana\",\"HK|Asia/Hong_Kong\",\"HN|America/Tegucigalpa\",\"HR|Europe/Belgrade Europe/Zagreb\",\"HT|America/Port-au-Prince\",\"HU|Europe/Budapest\",\"ID|Asia/Jakarta Asia/Pontianak Asia/Makassar Asia/Jayapura\",\"IE|Europe/Dublin\",\"IL|Asia/Jerusalem\",\"IM|Europe/London Europe/Isle_of_Man\",\"IN|Asia/Kolkata\",\"IO|Indian/Chagos\",\"IQ|Asia/Baghdad\",\"IR|Asia/Tehran\",\"IS|Atlantic/Reykjavik\",\"IT|Europe/Rome\",\"JE|Europe/London Europe/Jersey\",\"JM|America/Jamaica\",\"JO|Asia/Amman\",\"JP|Asia/Tokyo\",\"KE|Africa/Nairobi\",\"KG|Asia/Bishkek\",\"KH|Asia/Bangkok Asia/Phnom_Penh\",\"KI|Pacific/Tarawa Pacific/Enderbury Pacific/Kiritimati\",\"KM|Africa/Nairobi Indian/Comoro\",\"KN|America/Port_of_Spain America/St_Kitts\",\"KP|Asia/Pyongyang\",\"KR|Asia/Seoul\",\"KW|Asia/Riyadh Asia/Kuwait\",\"KY|America/Panama America/Cayman\",\"KZ|Asia/Almaty Asia/Qyzylorda Asia/Qostanay Asia/Aqtobe Asia/Aqtau Asia/Atyrau Asia/Oral\",\"LA|Asia/Bangkok Asia/Vientiane\",\"LB|Asia/Beirut\",\"LC|America/Port_of_Spain America/St_Lucia\",\"LI|Europe/Zurich Europe/Vaduz\",\"LK|Asia/Colombo\",\"LR|Africa/Monrovia\",\"LS|Africa/Johannesburg Africa/Maseru\",\"LT|Europe/Vilnius\",\"LU|Europe/Luxembourg\",\"LV|Europe/Riga\",\"LY|Africa/Tripoli\",\"MA|Africa/Casablanca\",\"MC|Europe/Monaco\",\"MD|Europe/Chisinau\",\"ME|Europe/Belgrade Europe/Podgorica\",\"MF|America/Port_of_Spain America/Marigot\",\"MG|Africa/Nairobi Indian/Antananarivo\",\"MH|Pacific/Majuro Pacific/Kwajalein\",\"MK|Europe/Belgrade Europe/Skopje\",\"ML|Africa/Abidjan Africa/Bamako\",\"MM|Asia/Yangon\",\"MN|Asia/Ulaanbaatar Asia/Hovd Asia/Choibalsan\",\"MO|Asia/Macau\",\"MP|Pacific/Guam Pacific/Saipan\",\"MQ|America/Martinique\",\"MR|Africa/Abidjan Africa/Nouakchott\",\"MS|America/Port_of_Spain America/Montserrat\",\"MT|Europe/Malta\",\"MU|Indian/Mauritius\",\"MV|Indian/Maldives\",\"MW|Africa/Maputo Africa/Blantyre\",\"MX|America/Mexico_City America/Cancun America/Merida America/Monterrey America/Matamoros America/Mazatlan America/Chihuahua America/Ojinaga America/Hermosillo America/Tijuana America/Bahia_Banderas\",\"MY|Asia/Kuala_Lumpur Asia/Kuching\",\"MZ|Africa/Maputo\",\"NA|Africa/Windhoek\",\"NC|Pacific/Noumea\",\"NE|Africa/Lagos Africa/Niamey\",\"NF|Pacific/Norfolk\",\"NG|Africa/Lagos\",\"NI|America/Managua\",\"NL|Europe/Amsterdam\",\"NO|Europe/Oslo\",\"NP|Asia/Kathmandu\",\"NR|Pacific/Nauru\",\"NU|Pacific/Niue\",\"NZ|Pacific/Auckland Pacific/Chatham\",\"OM|Asia/Dubai Asia/Muscat\",\"PA|America/Panama\",\"PE|America/Lima\",\"PF|Pacific/Tahiti Pacific/Marquesas Pacific/Gambier\",\"PG|Pacific/Port_Moresby Pacific/Bougainville\",\"PH|Asia/Manila\",\"PK|Asia/Karachi\",\"PL|Europe/Warsaw\",\"PM|America/Miquelon\",\"PN|Pacific/Pitcairn\",\"PR|America/Puerto_Rico\",\"PS|Asia/Gaza Asia/Hebron\",\"PT|Europe/Lisbon Atlantic/Madeira Atlantic/Azores\",\"PW|Pacific/Palau\",\"PY|America/Asuncion\",\"QA|Asia/Qatar\",\"RE|Indian/Reunion\",\"RO|Europe/Bucharest\",\"RS|Europe/Belgrade\",\"RU|Europe/Kaliningrad Europe/Moscow Europe/Simferopol Europe/Kirov Europe/Astrakhan Europe/Volgograd Europe/Saratov Europe/Ulyanovsk Europe/Samara Asia/Yekaterinburg Asia/Omsk Asia/Novosibirsk Asia/Barnaul Asia/Tomsk Asia/Novokuznetsk Asia/Krasnoyarsk Asia/Irkutsk Asia/Chita Asia/Yakutsk Asia/Khandyga Asia/Vladivostok Asia/Ust-Nera Asia/Magadan Asia/Sakhalin Asia/Srednekolymsk Asia/Kamchatka Asia/Anadyr\",\"RW|Africa/Maputo Africa/Kigali\",\"SA|Asia/Riyadh\",\"SB|Pacific/Guadalcanal\",\"SC|Indian/Mahe\",\"SD|Africa/Khartoum\",\"SE|Europe/Stockholm\",\"SG|Asia/Singapore\",\"SH|Africa/Abidjan Atlantic/St_Helena\",\"SI|Europe/Belgrade Europe/Ljubljana\",\"SJ|Europe/Oslo Arctic/Longyearbyen\",\"SK|Europe/Prague Europe/Bratislava\",\"SL|Africa/Abidjan Africa/Freetown\",\"SM|Europe/Rome Europe/San_Marino\",\"SN|Africa/Abidjan Africa/Dakar\",\"SO|Africa/Nairobi Africa/Mogadishu\",\"SR|America/Paramaribo\",\"SS|Africa/Juba\",\"ST|Africa/Sao_Tome\",\"SV|America/El_Salvador\",\"SX|America/Curacao America/Lower_Princes\",\"SY|Asia/Damascus\",\"SZ|Africa/Johannesburg Africa/Mbabane\",\"TC|America/Grand_Turk\",\"TD|Africa/Ndjamena\",\"TF|Indian/Reunion Indian/Kerguelen\",\"TG|Africa/Abidjan Africa/Lome\",\"TH|Asia/Bangkok\",\"TJ|Asia/Dushanbe\",\"TK|Pacific/Fakaofo\",\"TL|Asia/Dili\",\"TM|Asia/Ashgabat\",\"TN|Africa/Tunis\",\"TO|Pacific/Tongatapu\",\"TR|Europe/Istanbul\",\"TT|America/Port_of_Spain\",\"TV|Pacific/Funafuti\",\"TW|Asia/Taipei\",\"TZ|Africa/Nairobi Africa/Dar_es_Salaam\",\"UA|Europe/Simferopol Europe/Kiev Europe/Uzhgorod Europe/Zaporozhye\",\"UG|Africa/Nairobi Africa/Kampala\",\"UM|Pacific/Pago_Pago Pacific/Wake Pacific/Honolulu Pacific/Midway\",\"US|America/New_York America/Detroit America/Kentucky/Louisville America/Kentucky/Monticello America/Indiana/Indianapolis America/Indiana/Vincennes America/Indiana/Winamac America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Vevay America/Chicago America/Indiana/Tell_City America/Indiana/Knox America/Menominee America/North_Dakota/Center America/North_Dakota/New_Salem America/North_Dakota/Beulah America/Denver America/Boise America/Phoenix America/Los_Angeles America/Anchorage America/Juneau America/Sitka America/Metlakatla America/Yakutat America/Nome America/Adak Pacific/Honolulu\",\"UY|America/Montevideo\",\"UZ|Asia/Samarkand Asia/Tashkent\",\"VA|Europe/Rome Europe/Vatican\",\"VC|America/Port_of_Spain America/St_Vincent\",\"VE|America/Caracas\",\"VG|America/Port_of_Spain America/Tortola\",\"VI|America/Port_of_Spain America/St_Thomas\",\"VN|Asia/Bangkok Asia/Ho_Chi_Minh\",\"VU|Pacific/Efate\",\"WF|Pacific/Wallis\",\"WS|Pacific/Apia\",\"YE|Asia/Riyadh Asia/Aden\",\"YT|Africa/Nairobi Indian/Mayotte\",\"ZA|Africa/Johannesburg\",\"ZM|Africa/Maputo Africa/Lusaka\",\"ZW|Africa/Maputo Africa/Harare\"]}"); diff --git a/package.json b/package.json index 6fdbd73..7a190d8 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,7 @@ "dependencies": { "cozy-konnector-libs": "4.42.3", "moment": "^2.24.0", - "moment-timezone": "^0.5.26", - "node-fetch": "2" + "moment-timezone": "^0.5.26" }, "devDependencies": { "@types/moment-timezone": "^0.5.30", -- GitLab