From 4b8d9d1615b493e9fae52c5510087bf16bd43a18 Mon Sep 17 00:00:00 2001 From: Will Gunter <74369489+wcgunter@users.noreply.github.com> Date: Tue, 13 Jun 2023 12:22:36 -0700 Subject: [PATCH 01/24] UI - Persistent states (#151) * Added cookies for drop down persistance on deployments page. * Update comments, remove excessive cookie calls * Move cookie functions to cws.js * Persist state for hide susp. process checkbox * Add variable to control cookie expiry dates * Update workers page with checkbox state * replace cookies with local storage * Added persistant state for search filters in proc * Add persistant states to log page * Merge from develop * Move local storage names to vars for future * Updated local storage var names, changed defaults * Fix issue with subprocess window being overridden --- cws-ui/src/main/webapp/js/cws.js | 3 +- install/cws-ui/deployments.ftl | 53 +++++++++++-- install/cws-ui/logs.ftl | 129 +++++++++++++++++++++++++++---- install/cws-ui/processes.ftl | 28 +++++-- install/cws-ui/workers.ftl | 19 +++++ 5 files changed, 205 insertions(+), 27 deletions(-) diff --git a/cws-ui/src/main/webapp/js/cws.js b/cws-ui/src/main/webapp/js/cws.js index 70b272a2..e5475c32 100644 --- a/cws-ui/src/main/webapp/js/cws.js +++ b/cws-ui/src/main/webapp/js/cws.js @@ -42,4 +42,5 @@ function getQueryString(){ } return params; -} \ No newline at end of file +} + diff --git a/install/cws-ui/deployments.ftl b/install/cws-ui/deployments.ftl index dc44ea71..9fe3312b 100644 --- a/install/cws-ui/deployments.ftl +++ b/install/cws-ui/deployments.ftl @@ -9,6 +9,13 @@ @@ -195,11 +190,33 @@ + From 5f9e8fc954b34ffc54f3475fff2b2163161b8c9a Mon Sep 17 00:00:00 2001 From: Will Gunter <74369489+wcgunter@users.noreply.github.com> Date: Wed, 14 Jun 2023 12:17:25 -0700 Subject: [PATCH 02/24] UI - Allow appropriate buttons to open in a new tab (#152) * Replace buttons with , allow open in new tab * filter -> open in new tab support * add right click support for filter on logs page * Update test to search for anchor tag, not button * Update tests again to search for , not button * revert test changes - will investigate further * Update path of history button in tests * Missed a history tag * Update xpath for history button --- .../test/integration/ui/HistoryTestIT.java | 2 +- .../test/integration/ui/InitiatorsTestIT.java | 2 +- .../test/integration/ui/SnippetsTestIT.java | 2 +- .../cws/test/integration/ui/WebTestIT.java | 8 +++--- install/cws-ui/logs.ftl | 15 ++++++++--- install/cws-ui/processes.ftl | 27 +++++++++++++------ 6 files changed, 38 insertions(+), 18 deletions(-) diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java index 8e9ec004..b0cd091a 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java @@ -76,7 +76,7 @@ public void runResultsTest() throws IOException { waitForElementID("processes-table"); log.info("Verifying the header and output from the model."); - WebElement historyButton = findElByXPath("//button[contains(text(),'History')]"); + WebElement historyButton = findElByXPath("//a[contains(text(),'History')]"); waitForElement(historyButton); scrollTo(historyButton); historyButton.click(); diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java index b9028e72..9cbccfb6 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java @@ -201,7 +201,7 @@ public void runVariableProcTest() throws IOException { waitForElementID("processes-table"); log.info("Clicking on Test Initiators Page history."); - WebElement historyButton = findElByXPath("//button[contains(text(),'History')]"); + WebElement historyButton = findElByXPath("//a[contains(text(),'History')]"); waitForElement(historyButton); historyButton.sendKeys(Keys.RETURN); diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java index 2acbd3c4..a017e40b 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java @@ -120,7 +120,7 @@ public void runSnippetsModelTest() throws IOException { waitForElementID("processes-table"); log.info("Clicking on Test Snippets Page history."); - WebElement historyButton = findElByXPath("//button[contains(text(),'History')]"); + WebElement historyButton = findElByXPath("//a[contains(text(),'History')]"); waitForElement(historyButton); scrollTo(historyButton); historyButton.click(); diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java index a6cebd24..a76c9551 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java @@ -223,8 +223,8 @@ public void runHelloWorldTest() { filterSubmit.click(); sleep(1000); - waitForElementXPath("//button[contains(text(),'History')]"); - WebElement historyButton = driver.findElement(By.xpath("//button[contains(text(),'History')]")); + waitForElementXPath("//a[contains(text(),'History')]"); + WebElement historyButton = driver.findElement(By.xpath("//a[contains(text(),'History')]")); historyButton.click(); sleep(1000); @@ -270,8 +270,8 @@ public void runGroovyTest() { filterSubmit.click(); sleep(1000); - waitForElementXPath("//button[contains(text(),'History')]"); - WebElement historyButton = driver.findElement(By.xpath("//button[contains(text(),'History')]")); + waitForElementXPath("//a[contains(text(),'History')]"); + WebElement historyButton = driver.findElement(By.xpath("//a[contains(text(),'History')]")); historyButton.click(); sleep(1000); diff --git a/install/cws-ui/logs.ftl b/install/cws-ui/logs.ftl index 18d9ff07..c478410e 100644 --- a/install/cws-ui/logs.ftl +++ b/install/cws-ui/logs.ftl @@ -400,7 +400,7 @@
- + Filter
@@ -496,7 +496,7 @@ }); - $("#filter-submit-btn").click(function(){ + function getFilterQString() { var params = {}; if($("#pd-select").val() != "def"){ params.procDefKey = $("#pd-select").val(); @@ -529,9 +529,18 @@ qstring = qstring.substring(0,qstring.length-1); localStorage.setItem(qstringVar, qstring); //console.log(encodeURI(qstring)); - window.location="/${base}/logs" + qstring; + return qstring; + } + + $("#filter-submit-btn").click(function(e){ + e.preventDefault(); + window.location="/${base}/logs" + getFilterQString(); }); + $("#filter-submit-btn").on("contextmenu", function(e){ + $(this).attr("href", "/${base}/logs" + getFilterQString(false)); + }); + var today = new Date(); var todayDate = today.getDate() + "/" + today.getMonth() + "/" + today.getFullYear() ; //$("#start-date").attr("value", todayDate); diff --git a/install/cws-ui/processes.ftl b/install/cws-ui/processes.ftl index 596baaa8..601bad3e 100644 --- a/install/cws-ui/processes.ftl +++ b/install/cws-ui/processes.ftl @@ -125,7 +125,7 @@

- + Filter
@@ -238,10 +238,14 @@ todayHighlight:true }); - $("#filter-submit-btn").click(function(){ - + $("#filter-submit-btn").click(function(e){ + e.preventDefault(); updateLocation(false); }); + + $("#filter-submit-btn").on("contextmenu", function(e){ + $(this).attr("href", "/${base}/processes" + getFilterQString(false)); + }); displayMessage(); @@ -295,7 +299,7 @@ } }); - function updateLocation(changeHideSubs) { + function getFilterQString(changeHideSubs) { var params = {}; if($("#pd-select").val() != "def"){ @@ -342,11 +346,14 @@ qstring = qstring.substring(0,qstring.length-1); localStorage.setItem(qstringVar, qstring); console.log(encodeURI(qstring)); - window.location="/${base}/processes" + qstring; + return qstring; + } + + function updateLocation(changeHideSubs) { + window.location="/${base}/processes" + getFilterQString(changeHideSubs); } $("#hide-subprocs-btn").click(function(){ - updateLocation(true); }); @@ -371,6 +378,8 @@ if (procInstId !== '') { window.location = "/${base}/history?procInstId=" + procInstId; + } else { + return false; } } @@ -378,6 +387,8 @@ if (procInstId !== '') { window.location = "/${base}/processes?superProcInstId=" + procInstId; + } else { + return false; } } @@ -424,8 +435,8 @@ $("#processes-table").append( ""+ "" + actionTd + "" + - "" + - "" + + "History" + + "Subprocs" + ""+ (res[i].initiationKey == undefined ? '' : res[i].initiationKey) + "" + ""+ res[i].procDefKey +""+ ""+ (res[i].status == 'incident' ? ("" + procInstId + "") : procInstId) + "" + From f5f1a041787f552ab46eed28cc7bd8ff4fe0d9d8 Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 21 Jun 2023 11:57:21 -0700 Subject: [PATCH 03/24] installation validation LDAP --- .../main/java/jpl/cws/task/CwsInstaller.java | 47 ++++++++++++++++--- 1 file changed, 40 insertions(+), 7 deletions(-) diff --git a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java index 0fd50f29..8f833b7d 100644 --- a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java +++ b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java @@ -1660,6 +1660,9 @@ private static void validateConfig() { print("VALIDATING CONFIGURATION... Please wait, this may take some time..."); warningCount += validateDbConfig(); + if (cws_auth_scheme.equals("LDAP") || cws_auth_scheme.equals("CAM")) { + warningCount += validateLdapConfig(); + } warningCount += validateTomcatPorts(); boolean timeSyncMissing = validateTimeSyncService() == 1; @@ -1863,6 +1866,33 @@ private static int validateDbConfig() { return warningCount; } + private static int validateLdapConfig() { + int warningCount = 0; + + // VALIDATE LDAP or CAM CONFIGURATION AND LDAP USER INFO RETREIVEL + if (cws_auth_scheme.equals("LDAP")) { + print("checking that user provided LDAP authentication profile is valid..."); + } + if (cws_auth_scheme.equals("CAM")) { + print("checking that user provided CAM authentication profile is valid..."); + } + + String[] ldapAttrReturn = getIdentityPluginAttribute(pluginBeanFilePath, cws_user, cws_ldap_url); + + if (ldapAttrReturn[3] != null) { + print(" [WARNING]"); + print(" " + ldapAttrReturn[3]); + print(" LDAP user information was not retrieved. The user provided first name, lastname, and email address will used in CWS Properties files."); + print(""); + warningCount++; + } + else { + print(" [OK]"); + print(""); + } + + return warningCount; + } private static int validateTomcatPorts() { int warningCount = 0; @@ -2602,7 +2632,7 @@ private static String[] getIdentityPluginAttribute(Path beanFilePath, String use // String propertyBase = ""; String propertySearchBase = ""; - String[] identityAttributes = new String[3]; + String[] identityAttributes = new String[4]; String[] attributeFilter = {"givenName", "sn", "mail"}; try { @@ -2667,16 +2697,19 @@ private static String[] getIdentityPluginAttribute(Path beanFilePath, String use } dirCxt.close(); } catch (Exception e) { - print("+----------------------------------------------------------------------------------+"); - print("CWS Installer ERROR: LDAP API failed to retrieve CWS user's " + Arrays.toString(attributeFilter)); - print(" to set in CWS properties files and utilize for CWS services. Make sure 'ldap_plugin_bean.xml' is "); - print(" properly configured. Refer to the template /tomcat_conf/ldap_plugin_bean.xml"); - print("ERROR: " + e); - print("+----------------------------------------------------------------------------------+"); + if (cws_user_email == null || cws_user_email.length() < 8 || + cws_user_firstname == null || cws_user_firstname.equals("/") || + cws_user_lastname == null || cws_user_lastname.equals("/")) { + print("ERROR: Must specify cws_user_firstname, cws_user_lastname, cws_user_email property. LDAP API failed to retrieve CWS user's " + Arrays.toString(attributeFilter)); + print(" Set properties cws_user_email, cws_user_firstname, cws_user_lastname in your configuration. These properties will be used for startup notifications."); + exit(1); + } + // JNDI LDAP retrieval failed. identityAttributes[0] = "__CWS_ADMIN_FIRSTNAME__"; identityAttributes[1] = "__CWS_ADMIN_LASTNAME__"; identityAttributes[2] = "__CWS_ADMIN_EMAIL__"; + identityAttributes[3] = e; } return identityAttributes; } From 516d347a657d2e4506a2d6198873eacd77e6a7ba Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 21 Jun 2023 12:02:05 -0700 Subject: [PATCH 04/24] revert commit --- .../main/java/jpl/cws/task/CwsInstaller.java | 41 +------------------ 1 file changed, 1 insertion(+), 40 deletions(-) diff --git a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java index 8f833b7d..1b848f93 100644 --- a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java +++ b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java @@ -1660,9 +1660,6 @@ private static void validateConfig() { print("VALIDATING CONFIGURATION... Please wait, this may take some time..."); warningCount += validateDbConfig(); - if (cws_auth_scheme.equals("LDAP") || cws_auth_scheme.equals("CAM")) { - warningCount += validateLdapConfig(); - } warningCount += validateTomcatPorts(); boolean timeSyncMissing = validateTimeSyncService() == 1; @@ -1866,33 +1863,6 @@ private static int validateDbConfig() { return warningCount; } - private static int validateLdapConfig() { - int warningCount = 0; - - // VALIDATE LDAP or CAM CONFIGURATION AND LDAP USER INFO RETREIVEL - if (cws_auth_scheme.equals("LDAP")) { - print("checking that user provided LDAP authentication profile is valid..."); - } - if (cws_auth_scheme.equals("CAM")) { - print("checking that user provided CAM authentication profile is valid..."); - } - - String[] ldapAttrReturn = getIdentityPluginAttribute(pluginBeanFilePath, cws_user, cws_ldap_url); - - if (ldapAttrReturn[3] != null) { - print(" [WARNING]"); - print(" " + ldapAttrReturn[3]); - print(" LDAP user information was not retrieved. The user provided first name, lastname, and email address will used in CWS Properties files."); - print(""); - warningCount++; - } - else { - print(" [OK]"); - print(""); - } - - return warningCount; - } private static int validateTomcatPorts() { int warningCount = 0; @@ -2632,7 +2602,7 @@ private static String[] getIdentityPluginAttribute(Path beanFilePath, String use // String propertyBase = ""; String propertySearchBase = ""; - String[] identityAttributes = new String[4]; + String[] identityAttributes = new String[3]; String[] attributeFilter = {"givenName", "sn", "mail"}; try { @@ -2697,19 +2667,10 @@ private static String[] getIdentityPluginAttribute(Path beanFilePath, String use } dirCxt.close(); } catch (Exception e) { - if (cws_user_email == null || cws_user_email.length() < 8 || - cws_user_firstname == null || cws_user_firstname.equals("/") || - cws_user_lastname == null || cws_user_lastname.equals("/")) { - print("ERROR: Must specify cws_user_firstname, cws_user_lastname, cws_user_email property. LDAP API failed to retrieve CWS user's " + Arrays.toString(attributeFilter)); - print(" Set properties cws_user_email, cws_user_firstname, cws_user_lastname in your configuration. These properties will be used for startup notifications."); - exit(1); - } - // JNDI LDAP retrieval failed. identityAttributes[0] = "__CWS_ADMIN_FIRSTNAME__"; identityAttributes[1] = "__CWS_ADMIN_LASTNAME__"; identityAttributes[2] = "__CWS_ADMIN_EMAIL__"; - identityAttributes[3] = e; } return identityAttributes; } From 9f4f682514ecaa5e546d2d144f2996e95da4acdc Mon Sep 17 00:00:00 2001 From: Josh Date: Wed, 21 Jun 2023 12:19:41 -0700 Subject: [PATCH 05/24] revert commit 2 --- cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java index 1b848f93..0fd50f29 100644 --- a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java +++ b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java @@ -2667,6 +2667,12 @@ private static String[] getIdentityPluginAttribute(Path beanFilePath, String use } dirCxt.close(); } catch (Exception e) { + print("+----------------------------------------------------------------------------------+"); + print("CWS Installer ERROR: LDAP API failed to retrieve CWS user's " + Arrays.toString(attributeFilter)); + print(" to set in CWS properties files and utilize for CWS services. Make sure 'ldap_plugin_bean.xml' is "); + print(" properly configured. Refer to the template /tomcat_conf/ldap_plugin_bean.xml"); + print("ERROR: " + e); + print("+----------------------------------------------------------------------------------+"); // JNDI LDAP retrieval failed. identityAttributes[0] = "__CWS_ADMIN_FIRSTNAME__"; identityAttributes[1] = "__CWS_ADMIN_LASTNAME__"; From 194427e231fa203456cecc9ab50909aa98de1c8c Mon Sep 17 00:00:00 2001 From: Will Gunter <74369489+wcgunter@users.noreply.github.com> Date: Mon, 26 Jun 2023 12:37:55 -0700 Subject: [PATCH 06/24] UI - Add and implement data tables (#153) * Add download as JSON, working on CSV * Implement CSV, fix JSON exports * Update GUI - radio button to select file type * Update button, fix "Show All" for long stdouts * Add DataTables js utility & use on history page * update DT, refine history page, finish deployments * Update css for datatables * remove unnecessary info below table * add DataTable to processes table * update history to fix loading issue * Fix sorting on history page * Fix history not displaying all log rows * Removing paging for test suite support * Update processes page to fix select feature * Fixed double sorting icon * Add moment.js and DataTables integration - filter * Update where table is drawn to speed up page load * Update REST to return all processes * Defer renderings * Update processes page to only load 5000 at first * Increase search delay to increase performance * Attempt at fixing snippets test * Update xpath for new filter button * Update sleep timer * Update sleep, change from id to xpath * Update to "waitForElementXPath" * Copy from Selenium IDE, add sleep * wait even longer * Wait for process page to load * Revert, increase waiting * Change how we wait for add button * Update xpath for elements * Add wait for ajax spinner to dissappear * Fix duration * Need to wait even longer * Try using search bar instead of builder * Try to get console output * Fix qstring missing ? * Update to get # of procs loaded * reduce sleep, fix merge error * FINALLY fixed test errors - updating rest of them * Missed process page loading indirectly * Update completed element ID path * Update css selector * add screenshots for debugging * Remove reference to "complete" button --- .../jpl/cws/core/db/SchedulerDbService.java | 12 +- .../java/jpl/cws/controller/RestService.java | 12 +- .../test/integration/ui/HistoryTestIT.java | 13 +- .../test/integration/ui/InitiatorsTestIT.java | 11 +- .../test/integration/ui/SnippetsTestIT.java | 23 +- .../cws/test/integration/ui/WebTestIT.java | 130 +- .../main/webapp/WEB-INF/springmvc-servlet.xml | 6 + .../Buttons-2.3.6/css/buttons.bootstrap.css | 386 + .../css/buttons.bootstrap.min.css | 1 + .../Buttons-2.3.6/css/buttons.bootstrap4.css | 430 + .../css/buttons.bootstrap4.min.css | 1 + .../Buttons-2.3.6/css/buttons.bootstrap5.css | 432 + .../css/buttons.bootstrap5.min.css | 1 + .../Buttons-2.3.6/css/buttons.bulma.css | 429 + .../Buttons-2.3.6/css/buttons.bulma.min.css | 1 + .../Buttons-2.3.6/css/buttons.dataTables.css | 560 + .../css/buttons.dataTables.min.css | 1 + .../Buttons-2.3.6/css/buttons.foundation.css | 371 + .../css/buttons.foundation.min.css | 1 + .../Buttons-2.3.6/css/buttons.jqueryui.css | 387 + .../css/buttons.jqueryui.min.css | 1 + .../Buttons-2.3.6/css/buttons.semanticui.css | 409 + .../css/buttons.semanticui.min.css | 1 + .../DataTables/Buttons-2.3.6/css/common.scss | 106 + .../DataTables/Buttons-2.3.6/css/mixins.scss | 228 + .../Buttons-2.3.6/js/buttons.bootstrap.js | 106 + .../Buttons-2.3.6/js/buttons.bootstrap.min.js | 4 + .../Buttons-2.3.6/js/buttons.bootstrap4.js | 106 + .../js/buttons.bootstrap4.min.js | 4 + .../Buttons-2.3.6/js/buttons.bootstrap5.js | 106 + .../js/buttons.bootstrap5.min.js | 4 + .../Buttons-2.3.6/js/buttons.bulma.js | 117 + .../Buttons-2.3.6/js/buttons.bulma.min.js | 4 + .../Buttons-2.3.6/js/buttons.colVis.js | 250 + .../Buttons-2.3.6/js/buttons.colVis.min.js | 5 + .../Buttons-2.3.6/js/buttons.dataTables.js | 92 + .../js/buttons.dataTables.min.js | 4 + .../Buttons-2.3.6/js/buttons.foundation.js | 134 + .../js/buttons.foundation.min.js | 4 + .../Buttons-2.3.6/js/buttons.html5.js | 1494 + .../Buttons-2.3.6/js/buttons.html5.min.js | 8 + .../Buttons-2.3.6/js/buttons.jqueryui.js | 92 + .../Buttons-2.3.6/js/buttons.jqueryui.min.js | 4 + .../Buttons-2.3.6/js/buttons.print.js | 238 + .../Buttons-2.3.6/js/buttons.print.min.js | 5 + .../Buttons-2.3.6/js/buttons.semanticui.js | 104 + .../js/buttons.semanticui.min.js | 4 + .../Buttons-2.3.6/js/dataTables.buttons.js | 2538 + .../js/dataTables.buttons.min.js | 4 + .../css/dataTables.bootstrap.css | 416 + .../css/dataTables.bootstrap.min.css | 1 + .../css/dataTables.bootstrap4.css | 423 + .../css/dataTables.bootstrap4.min.css | 1 + .../css/dataTables.bootstrap5.css | 430 + .../css/dataTables.bootstrap5.min.css | 5 + .../css/dataTables.bulma.css | 379 + .../css/dataTables.bulma.min.css | 3 + .../css/dataTables.dataTables.css | 0 .../css/dataTables.dataTables.min.css | 0 .../css/dataTables.foundation.css | 357 + .../css/dataTables.foundation.min.css | 1 + .../css/dataTables.jqueryui.css | 673 + .../css/dataTables.jqueryui.min.css | 1 + .../css/dataTables.semanticui.css | 348 + .../css/dataTables.semanticui.min.css | 1 + .../css/jquery.dataTables.css | 584 + .../css/jquery.dataTables.min.css | 1 + .../DataTables-1.13.4/images/sort_asc.png | Bin 0 -> 160 bytes .../images/sort_asc_disabled.png | Bin 0 -> 148 bytes .../DataTables-1.13.4/images/sort_both.png | Bin 0 -> 201 bytes .../DataTables-1.13.4/images/sort_desc.png | Bin 0 -> 158 bytes .../images/sort_desc_disabled.png | Bin 0 -> 146 bytes .../js/dataTables.bootstrap.js | 200 + .../js/dataTables.bootstrap.min.js | 4 + .../js/dataTables.bootstrap4.js | 202 + .../js/dataTables.bootstrap4.min.js | 4 + .../js/dataTables.bootstrap5.js | 212 + .../js/dataTables.bootstrap5.min.js | 4 + .../DataTables-1.13.4/js/dataTables.bulma.js | 214 + .../js/dataTables.bulma.min.js | 4 + .../js/dataTables.dataTables.js | 55 + .../js/dataTables.dataTables.min.js | 4 + .../js/dataTables.foundation.js | 200 + .../js/dataTables.foundation.min.js | 4 + .../js/dataTables.jqueryui.js | 95 + .../js/dataTables.jqueryui.min.js | 4 + .../js/dataTables.semanticui.js | 228 + .../js/dataTables.semanticui.min.js | 4 + .../DataTables-1.13.4/js/jquery.dataTables.js | 15686 ++ .../js/jquery.dataTables.min.js | 4 + .../css/dataTables.dateTime.css | 218 + .../css/dataTables.dateTime.min.css | 1 + .../DateTime-1.4.1/js/dataTables.dateTime.js | 1713 + .../js/dataTables.dateTime.min.js | 6 + .../css/fixedHeader.bootstrap.css | 16 + .../css/fixedHeader.bootstrap.min.css | 1 + .../css/fixedHeader.bootstrap4.css | 16 + .../css/fixedHeader.bootstrap4.min.css | 1 + .../css/fixedHeader.bootstrap5.css | 16 + .../css/fixedHeader.bootstrap5.min.css | 1 + .../css/fixedHeader.bulma.css | 16 + .../css/fixedHeader.bulma.min.css | 1 + .../css/fixedHeader.dataTables.css | 18 + .../css/fixedHeader.dataTables.min.css | 1 + .../css/fixedHeader.foundation.css | 16 + .../css/fixedHeader.foundation.min.css | 1 + .../css/fixedHeader.jqueryui.css | 14 + .../css/fixedHeader.jqueryui.min.css | 1 + .../css/fixedHeader.semanticui.css | 13 + .../css/fixedHeader.semanticui.min.css | 1 + .../js/dataTables.fixedHeader.js | 1103 + .../js/dataTables.fixedHeader.min.js | 4 + .../js/fixedHeader.bootstrap.js | 58 + .../js/fixedHeader.bootstrap.min.js | 4 + .../js/fixedHeader.bootstrap4.js | 58 + .../js/fixedHeader.bootstrap4.min.js | 4 + .../js/fixedHeader.bootstrap5.js | 58 + .../js/fixedHeader.bootstrap5.min.js | 4 + .../FixedHeader-3.3.2/js/fixedHeader.bulma.js | 58 + .../js/fixedHeader.bulma.min.js | 4 + .../js/fixedHeader.dataTables.js | 58 + .../js/fixedHeader.dataTables.min.js | 4 + .../js/fixedHeader.foundation.js | 58 + .../js/fixedHeader.foundation.min.js | 4 + .../js/fixedHeader.jqueryui.js | 58 + .../js/fixedHeader.jqueryui.min.js | 4 + .../js/fixedHeader.semanticui.js | 58 + .../js/fixedHeader.semanticui.min.js | 4 + .../webapp/js/DataTables/JSZip-2.5.0/jszip.js | 9155 + .../js/DataTables/JSZip-2.5.0/jszip.min.js | 14 + .../Scroller-2.1.1/css/scroller.bootstrap.css | 37 + .../css/scroller.bootstrap.min.css | 1 + .../css/scroller.bootstrap4.css | 37 + .../css/scroller.bootstrap4.min.css | 1 + .../css/scroller.bootstrap5.css | 37 + .../css/scroller.bootstrap5.min.css | 1 + .../Scroller-2.1.1/css/scroller.bulma.css | 33 + .../Scroller-2.1.1/css/scroller.bulma.min.css | 1 + .../css/scroller.dataTables.css | 33 + .../css/scroller.dataTables.min.css | 1 + .../css/scroller.foundation.css | 17 + .../css/scroller.foundation.min.css | 1 + .../Scroller-2.1.1/css/scroller.jqueryui.css | 33 + .../css/scroller.jqueryui.min.css | 1 + .../css/scroller.semanticui.css | 33 + .../css/scroller.semanticui.min.css | 1 + .../Scroller-2.1.1/js/dataTables.scroller.js | 1353 + .../js/dataTables.scroller.min.js | 4 + .../Scroller-2.1.1/js/scroller.bootstrap.js | 58 + .../js/scroller.bootstrap.min.js | 4 + .../Scroller-2.1.1/js/scroller.bootstrap4.js | 58 + .../js/scroller.bootstrap4.min.js | 4 + .../Scroller-2.1.1/js/scroller.bootstrap5.js | 58 + .../js/scroller.bootstrap5.min.js | 4 + .../Scroller-2.1.1/js/scroller.bulma.js | 58 + .../Scroller-2.1.1/js/scroller.bulma.min.js | 4 + .../Scroller-2.1.1/js/scroller.dataTables.js | 58 + .../js/scroller.dataTables.min.js | 4 + .../Scroller-2.1.1/js/scroller.foundation.js | 58 + .../js/scroller.foundation.min.js | 4 + .../Scroller-2.1.1/js/scroller.jqueryui.js | 58 + .../js/scroller.jqueryui.min.js | 4 + .../Scroller-2.1.1/js/scroller.semanticui.js | 58 + .../js/scroller.semanticui.min.js | 4 + .../css/searchBuilder.bootstrap.css | 189 + .../css/searchBuilder.bootstrap.min.css | 1 + .../css/searchBuilder.bootstrap4.css | 199 + .../css/searchBuilder.bootstrap4.min.css | 1 + .../css/searchBuilder.bootstrap5.css | 205 + .../css/searchBuilder.bootstrap5.min.css | 1 + .../css/searchBuilder.bulma.css | 200 + .../css/searchBuilder.bulma.min.css | 1 + .../css/searchBuilder.dataTables.css | 236 + .../css/searchBuilder.dataTables.min.css | 1 + .../css/searchBuilder.foundation.css | 204 + .../css/searchBuilder.foundation.min.css | 1 + .../css/searchBuilder.jqueryui.css | 188 + .../css/searchBuilder.jqueryui.min.css | 1 + .../css/searchBuilder.semanticui.css | 234 + .../css/searchBuilder.semanticui.min.css | 1 + .../js/dataTables.searchBuilder.js | 3825 + .../js/dataTables.searchBuilder.min.js | 4 + .../js/searchBuilder.bootstrap.js | 74 + .../js/searchBuilder.bootstrap.min.js | 4 + .../js/searchBuilder.bootstrap4.js | 74 + .../js/searchBuilder.bootstrap4.min.js | 4 + .../js/searchBuilder.bootstrap5.js | 76 + .../js/searchBuilder.bootstrap5.min.js | 4 + .../js/searchBuilder.bulma.js | 72 + .../js/searchBuilder.bulma.min.js | 4 + .../js/searchBuilder.dataTables.js | 58 + .../js/searchBuilder.dataTables.min.js | 4 + .../js/searchBuilder.foundation.js | 74 + .../js/searchBuilder.foundation.min.js | 4 + .../js/searchBuilder.jqueryui.js | 74 + .../js/searchBuilder.jqueryui.min.js | 4 + .../js/searchBuilder.semanticui.js | 86 + .../js/searchBuilder.semanticui.min.js | 4 + .../css/searchPanes.bootstrap.css | 345 + .../css/searchPanes.bootstrap.min.css | 1 + .../css/searchPanes.bootstrap4.css | 342 + .../css/searchPanes.bootstrap4.min.css | 1 + .../css/searchPanes.bootstrap5.css | 347 + .../css/searchPanes.bootstrap5.min.css | 1 + .../css/searchPanes.bulma.css | 322 + .../css/searchPanes.bulma.min.css | 1 + .../css/searchPanes.dataTables.css | 371 + .../css/searchPanes.dataTables.min.css | 1 + .../css/searchPanes.foundation.css | 345 + .../css/searchPanes.foundation.min.css | 1 + .../css/searchPanes.jqueryui.css | 396 + .../css/searchPanes.jqueryui.min.css | 1 + .../css/searchPanes.semanticui.css | 406 + .../css/searchPanes.semanticui.min.css | 1 + .../js/dataTables.searchPanes.js | 3452 + .../js/dataTables.searchPanes.min.js | 4 + .../js/searchPanes.bootstrap.js | 82 + .../js/searchPanes.bootstrap.min.js | 4 + .../js/searchPanes.bootstrap4.js | 86 + .../js/searchPanes.bootstrap4.min.js | 4 + .../js/searchPanes.bootstrap5.js | 82 + .../js/searchPanes.bootstrap5.min.js | 4 + .../SearchPanes-2.1.2/js/searchPanes.bulma.js | 70 + .../js/searchPanes.bulma.min.js | 4 + .../js/searchPanes.dataTables.js | 58 + .../js/searchPanes.dataTables.min.js | 4 + .../js/searchPanes.foundation.js | 80 + .../js/searchPanes.foundation.min.js | 4 + .../js/searchPanes.jqueryui.js | 70 + .../js/searchPanes.jqueryui.min.js | 4 + .../js/searchPanes.semanticui.js | 77 + .../js/searchPanes.semanticui.min.js | 4 + .../Select-1.6.2/css/select.bootstrap.css | 61 + .../Select-1.6.2/css/select.bootstrap.min.css | 1 + .../Select-1.6.2/css/select.bootstrap4.css | 61 + .../css/select.bootstrap4.min.css | 1 + .../Select-1.6.2/css/select.bootstrap5.css | 64 + .../css/select.bootstrap5.min.css | 1 + .../Select-1.6.2/css/select.bulma.css | 61 + .../Select-1.6.2/css/select.bulma.min.css | 1 + .../Select-1.6.2/css/select.dataTables.css | 61 + .../css/select.dataTables.min.css | 1 + .../Select-1.6.2/css/select.foundation.css | 61 + .../css/select.foundation.min.css | 1 + .../Select-1.6.2/css/select.jqueryui.css | 61 + .../Select-1.6.2/css/select.jqueryui.min.css | 1 + .../Select-1.6.2/css/select.semanticui.css | 61 + .../css/select.semanticui.min.css | 1 + .../Select-1.6.2/js/dataTables.select.js | 1366 + .../Select-1.6.2/js/dataTables.select.min.js | 4 + .../Select-1.6.2/js/select.bootstrap.js | 58 + .../Select-1.6.2/js/select.bootstrap.min.js | 4 + .../Select-1.6.2/js/select.bootstrap4.js | 58 + .../Select-1.6.2/js/select.bootstrap4.min.js | 4 + .../Select-1.6.2/js/select.bootstrap5.js | 58 + .../Select-1.6.2/js/select.bootstrap5.min.js | 4 + .../Select-1.6.2/js/select.bulma.js | 58 + .../Select-1.6.2/js/select.bulma.min.js | 4 + .../Select-1.6.2/js/select.dataTables.js | 58 + .../Select-1.6.2/js/select.dataTables.min.js | 4 + .../Select-1.6.2/js/select.foundation.js | 58 + .../Select-1.6.2/js/select.foundation.min.js | 4 + .../Select-1.6.2/js/select.jqueryui.js | 58 + .../Select-1.6.2/js/select.jqueryui.min.js | 4 + .../Select-1.6.2/js/select.semanticui.js | 58 + .../Select-1.6.2/js/select.semanticui.min.js | 4 + .../css/stateRestore.bootstrap.css | 200 + .../css/stateRestore.bootstrap.min.css | 1 + .../css/stateRestore.bootstrap4.css | 231 + .../css/stateRestore.bootstrap4.min.css | 1 + .../css/stateRestore.bootstrap5.css | 231 + .../css/stateRestore.bootstrap5.min.css | 1 + .../css/stateRestore.bulma.css | 226 + .../css/stateRestore.bulma.min.css | 1 + .../css/stateRestore.dataTables.css | 174 + .../css/stateRestore.dataTables.min.css | 1 + .../css/stateRestore.foundation.css | 214 + .../css/stateRestore.foundation.min.css | 1 + .../css/stateRestore.jqueryui.css | 216 + .../css/stateRestore.jqueryui.min.css | 1 + .../css/stateRestore.semanticui.css | 264 + .../css/stateRestore.semanticui.min.css | 1 + .../js/dataTables.stateRestore.js | 2365 + .../js/dataTables.stateRestore.min.js | 4 + .../js/stateRestore.bootstrap.js | 71 + .../js/stateRestore.bootstrap.min.js | 4 + .../js/stateRestore.bootstrap4.js | 70 + .../js/stateRestore.bootstrap4.min.js | 4 + .../js/stateRestore.bootstrap5.js | 73 + .../js/stateRestore.bootstrap5.min.js | 4 + .../js/stateRestore.bulma.js | 71 + .../js/stateRestore.bulma.min.js | 4 + .../js/stateRestore.dataTables.js | 58 + .../js/stateRestore.dataTables.min.js | 4 + .../js/stateRestore.foundation.js | 73 + .../js/stateRestore.foundation.min.js | 4 + .../js/stateRestore.jqueryui.js | 74 + .../js/stateRestore.jqueryui.min.js | 4 + .../js/stateRestore.semanticui.js | 76 + .../js/stateRestore.semanticui.min.js | 4 + .../main/webapp/js/DataTables/datatables.css | 1898 + .../main/webapp/js/DataTables/datatables.js | 129998 +++++++++++++++ .../webapp/js/DataTables/datatables.min.css | 39 + .../webapp/js/DataTables/datatables.min.js | 138 + .../DataTables/jQuery-1.12.4/jquery-1.12.4.js | 11008 ++ .../jQuery-1.12.4/jquery-1.12.4.min.js | 5 + .../js/DataTables/pdfmake-0.2.7/pdfmake.js | 73862 ++++++++ .../DataTables/pdfmake-0.2.7/pdfmake.min.js | 3 + .../js/DataTables/pdfmake-0.2.7/vfs_fonts.js | 6 + .../main/webapp/js/DataTablesDateFilter.js | 71 + cws-ui/src/main/webapp/js/cws.js | 22 - cws-ui/src/main/webapp/js/moment.js | 5685 + install/cws-ui/deployments.ftl | 188 +- install/cws-ui/history.ftl | 254 +- install/cws-ui/processes.ftl | 555 +- 315 files changed, 288505 insertions(+), 510 deletions(-) create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.bootstrap.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.bootstrap4.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.bootstrap4.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.bootstrap5.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.bootstrap5.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.bulma.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.bulma.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.foundation.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.foundation.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.jqueryui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.jqueryui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.semanticui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/buttons.semanticui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/common.scss create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/css/mixins.scss create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.bootstrap.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.bootstrap.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.bootstrap4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.bootstrap4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.bootstrap5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.bootstrap5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.bulma.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.bulma.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.colVis.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.colVis.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.foundation.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.foundation.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.html5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.html5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.jqueryui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.jqueryui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.print.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.print.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.semanticui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/buttons.semanticui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/dataTables.buttons.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Buttons-2.3.6/js/dataTables.buttons.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.bootstrap.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.bootstrap4.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.bootstrap4.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.bootstrap5.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.bootstrap5.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.bulma.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.bulma.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.foundation.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.foundation.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.jqueryui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.jqueryui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.semanticui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/dataTables.semanticui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/jquery.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/css/jquery.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/images/sort_asc.png create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/images/sort_asc_disabled.png create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/images/sort_both.png create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/images/sort_desc.png create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/images/sort_desc_disabled.png create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.bootstrap.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.bootstrap.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.bootstrap4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.bootstrap4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.bootstrap5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.bootstrap5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.bulma.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.bulma.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.foundation.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.foundation.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.jqueryui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.jqueryui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.semanticui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/dataTables.semanticui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/jquery.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DataTables-1.13.4/js/jquery.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DateTime-1.4.1/css/dataTables.dateTime.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DateTime-1.4.1/css/dataTables.dateTime.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/DateTime-1.4.1/js/dataTables.dateTime.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/DateTime-1.4.1/js/dataTables.dateTime.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.bootstrap.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.bootstrap4.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.bootstrap4.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.bootstrap5.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.bootstrap5.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.bulma.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.bulma.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.foundation.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.foundation.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.jqueryui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.jqueryui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.semanticui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/css/fixedHeader.semanticui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/dataTables.fixedHeader.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/dataTables.fixedHeader.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.bootstrap.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.bootstrap.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.bootstrap4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.bootstrap4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.bootstrap5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.bootstrap5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.bulma.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.bulma.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.foundation.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.foundation.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.jqueryui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.jqueryui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.semanticui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/FixedHeader-3.3.2/js/fixedHeader.semanticui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/JSZip-2.5.0/jszip.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/JSZip-2.5.0/jszip.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.bootstrap.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.bootstrap4.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.bootstrap4.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.bootstrap5.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.bootstrap5.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.bulma.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.bulma.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.foundation.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.foundation.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.jqueryui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.jqueryui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.semanticui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/css/scroller.semanticui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/dataTables.scroller.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/dataTables.scroller.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.bootstrap.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.bootstrap.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.bootstrap4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.bootstrap4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.bootstrap5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.bootstrap5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.bulma.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.bulma.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.foundation.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.foundation.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.jqueryui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.jqueryui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.semanticui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Scroller-2.1.1/js/scroller.semanticui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.bootstrap.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.bootstrap4.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.bootstrap4.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.bootstrap5.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.bootstrap5.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.bulma.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.bulma.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.foundation.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.foundation.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.jqueryui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.jqueryui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.semanticui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/css/searchBuilder.semanticui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/dataTables.searchBuilder.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/dataTables.searchBuilder.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.bootstrap.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.bootstrap.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.bootstrap4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.bootstrap4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.bootstrap5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.bootstrap5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.bulma.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.bulma.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.foundation.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.foundation.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.jqueryui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.jqueryui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.semanticui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchBuilder-1.4.2/js/searchBuilder.semanticui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.bootstrap.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.bootstrap4.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.bootstrap4.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.bootstrap5.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.bootstrap5.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.bulma.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.bulma.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.foundation.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.foundation.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.jqueryui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.jqueryui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.semanticui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/css/searchPanes.semanticui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/dataTables.searchPanes.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/dataTables.searchPanes.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.bootstrap.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.bootstrap.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.bootstrap4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.bootstrap4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.bootstrap5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.bootstrap5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.bulma.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.bulma.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.foundation.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.foundation.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.jqueryui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.jqueryui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.semanticui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/SearchPanes-2.1.2/js/searchPanes.semanticui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.bootstrap.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.bootstrap4.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.bootstrap4.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.bootstrap5.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.bootstrap5.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.bulma.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.bulma.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.foundation.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.foundation.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.jqueryui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.jqueryui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.semanticui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/css/select.semanticui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/dataTables.select.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/dataTables.select.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.bootstrap.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.bootstrap.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.bootstrap4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.bootstrap4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.bootstrap5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.bootstrap5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.bulma.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.bulma.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.foundation.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.foundation.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.jqueryui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.jqueryui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.semanticui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/Select-1.6.2/js/select.semanticui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.bootstrap.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.bootstrap4.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.bootstrap4.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.bootstrap5.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.bootstrap5.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.bulma.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.bulma.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.dataTables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.dataTables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.foundation.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.foundation.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.jqueryui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.jqueryui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.semanticui.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/css/stateRestore.semanticui.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/dataTables.stateRestore.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/dataTables.stateRestore.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.bootstrap.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.bootstrap.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.bootstrap4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.bootstrap4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.bootstrap5.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.bootstrap5.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.bulma.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.bulma.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.dataTables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.dataTables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.foundation.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.foundation.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.jqueryui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.jqueryui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.semanticui.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/StateRestore-1.2.2/js/stateRestore.semanticui.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/datatables.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/datatables.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/datatables.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/datatables.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/jQuery-1.12.4/jquery-1.12.4.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/jQuery-1.12.4/jquery-1.12.4.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/pdfmake-0.2.7/pdfmake.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/pdfmake-0.2.7/pdfmake.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/pdfmake-0.2.7/vfs_fonts.js create mode 100644 cws-ui/src/main/webapp/js/DataTablesDateFilter.js create mode 100644 cws-ui/src/main/webapp/js/moment.js diff --git a/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java b/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java index 55094dee..184a2f5f 100644 --- a/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java +++ b/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java @@ -914,12 +914,6 @@ public List> getFilteredProcessInstances( if (procDefKey != null) { whereObjs.add(procDefKey); } if (minDate != null) { whereObjs.add(minDate); } if (maxDate != null) { whereObjs.add(maxDate); } - - Integer offset = page*PROCESSES_PAGE_SIZE; - Integer size = PROCESSES_PAGE_SIZE; - - whereObjs.add(offset); - whereObjs.add(size); String pattern = PENDING + "|" + DISABLED + "|" + FAILED_TO_START + "|" + FAILED_TO_SCHEDULE + "|" + CLAIMED_BY_WORKER + "|" + RUNNING + "|" + COMPLETE + "|" + RESOLVED + "|" + FAIL + "|" + INCIDENT; @@ -942,8 +936,7 @@ public List> getFilteredProcessInstances( (maxDate != null ? "created_time <= ? AND " : "") + (statusList != null ? "status IN "+statusClause+" AND " : "") + " proc_inst_id IS NULL " + // don't get any started processes - "ORDER BY created_time " + dateOrderBy + " " + - "LIMIT ?,?"; + "ORDER BY created_time " + dateOrderBy + " "; List> cwsRows = jdbcTemplate.queryForList(cwsQuery, whereObjs.toArray()); @@ -975,8 +968,7 @@ public List> getFilteredProcessInstances( (minDate != null ? "PI.start_time >= ? AND " : "") + (maxDate != null ? "PI.start_time <= ? AND " : "") + " 1=1 " + - "ORDER BY PI.start_time " + dateOrderBy + " " + - "LIMIT ?,?"; + "ORDER BY PI.start_time " + dateOrderBy + " "; List> camundaRows = jdbcTemplate.queryForList(camundaQuery, whereObjs.toArray()); diff --git a/cws-service/src/main/java/jpl/cws/controller/RestService.java b/cws-service/src/main/java/jpl/cws/controller/RestService.java index b1e57a8f..79325599 100644 --- a/cws-service/src/main/java/jpl/cws/controller/RestService.java +++ b/cws-service/src/main/java/jpl/cws/controller/RestService.java @@ -1139,9 +1139,10 @@ public GsonUTCDateAdapter() { ) { List instances = null; + int recordsToReturn = 0; + Integer pageNum = Integer.parseInt(page); try { - Integer pageNum = Integer.parseInt(page); - + dateOrderBy = dateOrderBy.toUpperCase(); if (!dateOrderBy.equals("DESC") && !dateOrderBy.equals("ASC")) { log.error("Invalid dateOrderBy of " + dateOrderBy + "! Forcing to be 'DESC'"); @@ -1156,13 +1157,18 @@ public GsonUTCDateAdapter() { instances = cwsConsoleService.getFilteredProcessInstancesCamunda( superProcInstId, procInstId, procDefKey, status, minDate, maxDate, dateOrderBy, pageNum); + if (pageNum > instances.size()) { + recordsToReturn = instances.size(); + } else { + recordsToReturn = pageNum; + } } catch (Exception e) { log.error("Problem getting process instance information!", e); // return an empty set return new GsonBuilder().setPrettyPrinting().create().toJson(new ArrayList()); } - return new GsonBuilder().setPrettyPrinting().create().toJson(instances); + return new GsonBuilder().setPrettyPrinting().create().toJson(instances.subList(0,recordsToReturn)); } diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java index b0cd091a..4d322fbd 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java @@ -8,6 +8,7 @@ import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.Select; import org.slf4j.Logger; @@ -63,15 +64,11 @@ public void runResultsTest() throws IOException { goToPage("processes"); log.info("Filtering Test History Page results."); - waitForElementID("pd-select"); - Select select = new Select(findElById("pd-select")); - select.selectByVisibleText("Test History Page"); + waitForElementXPath("//div[@id=\'processes-table_filter\']/label/input"); - waitForElementID("filter-submit-btn"); - - log.info("Clicking 'Submit' button."); - WebElement filterSubmit = findElById("filter-submit-btn"); - filterSubmit.click(); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).click(); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys("test_history_page"); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys(Keys.ENTER); waitForElementID("processes-table"); diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java index 9cbccfb6..d865c227 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java @@ -189,14 +189,11 @@ public void runVariableProcTest() throws IOException { goToPage("processes"); log.info("Filtering results for Test Initiators Page test."); - waitForElementID("pd-select"); - Select select = new Select(findElById("pd-select")); - select.selectByVisibleText("Test Initiators Page"); + waitForElementXPath("//div[@id=\'processes-table_filter\']/label/input"); - waitForElementID("filter-submit-btn"); - - WebElement filterSubmit = findElById("filter-submit-btn"); - filterSubmit.click(); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).click(); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys("test_initiators_page"); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys(Keys.ENTER); waitForElementID("processes-table"); diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java index a017e40b..ef9d5600 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/SnippetsTestIT.java @@ -3,13 +3,23 @@ import static org.junit.Assert.assertTrue; import java.io.IOException; +import java.time.Duration; +import java.util.List; +import java.util.Set; +import java.util.logging.Level; import org.junit.Ignore; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.Keys; import org.openqa.selenium.WebElement; +import org.openqa.selenium.logging.LogEntries; +import org.openqa.selenium.logging.LogEntry; +import org.openqa.selenium.logging.LogType; +import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.Select; +import org.openqa.selenium.support.ui.WebDriverWait; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -106,16 +116,13 @@ public void runSnippetsModelTest() throws IOException { startProcDef("test_snippets_page", "Test Snippets Page", 90000); goToPage("processes"); + sleep(8000); - waitForElementID("pd-select"); - log.info("Filter for Test Snippets Page results."); - Select select = new Select(findElById("pd-select")); - select.selectByVisibleText("Test Snippets Page"); + waitForElementXPath("//div[@id=\'processes-table_filter\']/label/input"); - waitForElementID("filter-submit-btn"); - - WebElement filterSubmit = findElById("filter-submit-btn"); - filterSubmit.click(); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).click(); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys("test_snippets_page"); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys(Keys.ENTER); waitForElementID("processes-table"); diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java index a76c9551..c104ecd2 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/WebTestIT.java @@ -6,42 +6,39 @@ import jpl.cws.test.WebTestUtil; import org.apache.commons.io.FileUtils; import org.junit.Test; -import org.openqa.selenium.By; -import org.openqa.selenium.OutputType; -import org.openqa.selenium.TakesScreenshot; -import org.openqa.selenium.WebElement; +import org.openqa.selenium.*; import org.openqa.selenium.support.ui.Select; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** - * + * * @author ghollins * */ public class WebTestIT extends WebTestUtil { private static final Logger log = LoggerFactory.getLogger(WebTestIT.class); - - - + + + @Test public void testGoogleSearch() throws InterruptedException, IOException { - - driver.get("http://www.google.com"); - - Thread.sleep(5000); // Let the user actually see something! - WebElement searchBox = driver.findElement(By.name("q")); - searchBox.sendKeys("ChromeDriver"); - searchBox.submit(); - Thread.sleep(5000); // Let the user actually see something! - - //log.info(driver.getPageSource()); - - File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); + + driver.get("http://www.google.com"); + + Thread.sleep(5000); // Let the user actually see something! + WebElement searchBox = driver.findElement(By.name("q")); + searchBox.sendKeys("ChromeDriver"); + searchBox.submit(); + Thread.sleep(5000); // Let the user actually see something! + + //log.info(driver.getPageSource()); + + File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); // Now you can do whatever you need to do with it, for example copy somewhere FileUtils.copyFile(scrFile, new File("/tmp/screenshot.png")); } - + @Test public void loginTest() { log.info("------ START loginTest ------"); @@ -50,7 +47,7 @@ public void loginTest() { logout(); log.info("------ END loginTest ------"); } - + @Test public void deployTest() { log.info("------ START deployTest ------"); @@ -62,7 +59,7 @@ public void deployTest() { logout(); log.info("------ END deployTest ------"); } - + @Test public void runDeployTest() { log.info("------ START deployTest ------"); @@ -77,9 +74,9 @@ public void runDeployTest() { // Start Instance WebElement tasks = driver.findElement(By.xpath("//a[@href='/camunda/app/tasklist']")); - tasks.click(); + tasks.click(); findOnPage("Camunda Tasklist"); - + sleep(10000); WebElement start = driver.findElement(By.xpath("//*[contains(@class,'start-process-action')]")); @@ -93,18 +90,18 @@ public void runDeployTest() { WebElement li = driver.findElement(By.xpath("//*[contains(text(),'Test Set Variables')]")); li.click(); sleep(5000); - + WebElement button = driver.findElement(By.xpath("//button[contains(text(),'Start')]")); button.click(); sleep(5000); - + // Go back to CWS WebElement cws = driver.findElement(By.xpath("//a[@href='/cws-ui']")); cws.click(); findOnPage("CWS - Deployments"); - + // Wait for Finish sleep(90000); @@ -123,15 +120,15 @@ public void runErrorHandlingTest() { // Enable Process Def enableWorkers("test_error_handling"); - - + + // Start Instance (1) through Camunda WebElement tasks = driver.findElement(By.xpath("//a[@href='/camunda/app/tasklist']")); - tasks.click(); + tasks.click(); findOnPage("Camunda Tasklist"); - + sleep(10000); - + WebElement start = driver.findElement(By.xpath("//*[contains(@class,'start-process-action')]")); start.click(); sleep(5000); @@ -143,12 +140,12 @@ public void runErrorHandlingTest() { WebElement li = driver.findElement(By.xpath("//*[contains(text(),'Test Error Handling')]")); li.click(); sleep(5000); - + WebElement button = driver.findElement(By.xpath("//button[contains(text(),'Start')]")); button.click(); sleep(5000); - + // Go back to CWS WebElement cws = driver.findElement(By.xpath("//a[@href='/cws-ui']")); cws.click(); @@ -162,7 +159,7 @@ public void runErrorHandlingTest() { logout(); log.info("------ END deployTest ------"); } - + @Test public void runHelloWorldTest() { log.info("------ START deployTest ------"); @@ -173,13 +170,13 @@ public void runHelloWorldTest() { uploadTestHelloWorld(); enableWorkers("test_hello_world"); - + WebElement tasks = driver.findElement(By.xpath("//a[@href='/camunda/app/tasklist']")); - tasks.click(); + tasks.click(); findOnPage("Camunda Tasklist"); - + sleep(10000); - + WebElement start = driver.findElement(By.xpath("//*[contains(@class,'start-process-action')]")); start.click(); sleep(5000); @@ -191,12 +188,12 @@ public void runHelloWorldTest() { WebElement li = driver.findElement(By.xpath("//*[contains(text(),'Test Hello World')]")); li.click(); sleep(5000); - + WebElement button = driver.findElement(By.xpath("//button[contains(text(),'Start')]")); button.click(); sleep(5000); - + // Go back to CWS WebElement cws = driver.findElement(By.xpath("//a[@href='/cws-ui']")); cws.click(); @@ -205,23 +202,18 @@ public void runHelloWorldTest() { // Wait for Finish sleep(90000); - if(findOnPage("completed")) { goToProcesses(); sleep(1000); log.info("Found a completed task."); - - WebElement completeBox = findElById("complete"); - completeBox.click(); - sleep(1000); - - Select select = new Select(findElById("pd-select")); - select.selectByVisibleText("Test Hello World"); - sleep(1000); - - WebElement filterSubmit = findElById("filter-submit-btn"); - filterSubmit.click(); - sleep(1000); + + waitForElementXPath("//div[@id=\'processes-table_filter\']/label/input"); + + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).click(); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys("test_hello_world"); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys(Keys.ENTER); + + waitForElementID("processes-table"); waitForElementXPath("//a[contains(text(),'History')]"); WebElement historyButton = driver.findElement(By.xpath("//a[contains(text(),'History')]")); @@ -231,10 +223,10 @@ public void runHelloWorldTest() { findOnPage("ls"); findOnPage("Hello World"); findOnPage("Command 'ls' exit code: 0"); - + sleep(9000); - - + + } else { log.info("Process did not complete either in time or at all"); } @@ -258,17 +250,13 @@ public void runGroovyTest() { sleep(1000); log.info("Found a completed task."); - WebElement completeBox = findElById("complete"); - completeBox.click(); - sleep(1000); + waitForElementXPath("//div[@id=\'processes-table_filter\']/label/input"); - Select select = new Select(findElById("pd-select")); - select.selectByVisibleText("Test Groovy Script"); - sleep(1000); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).click(); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys("test_groovy_script"); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys(Keys.ENTER); - WebElement filterSubmit = findElById("filter-submit-btn"); - filterSubmit.click(); - sleep(1000); + waitForElementID("processes-table"); waitForElementXPath("//a[contains(text(),'History')]"); WebElement historyButton = driver.findElement(By.xpath("//a[contains(text(),'History')]")); @@ -310,7 +298,7 @@ private void goToProcesses() { log.info("Found no completed tasks."); } } - + private void goToInitiators() { log.info("Navigating to Initiators page"); driver.get("http://"+HOSTNAME+":"+PORT + "/cws-ui/initiators"); @@ -318,11 +306,11 @@ private void goToInitiators() { private void uploadExternalPrintWorkingDirectory() { deployFile("external_pwd"); } - + private void uploadTestHelloWorld() { deployFile("test_hello_world"); } - + //---End Demo--- - + } diff --git a/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml b/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml index 6fb26eb7..2cac8eba 100644 --- a/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml +++ b/cws-ui/src/main/webapp/WEB-INF/springmvc-servlet.xml @@ -30,6 +30,11 @@ + + + UTF-8 + + /)) { + // Comment + return new SvgNode(null, 8, temp, error); + } else if (temp = parser.match(/^<\?[\s\S]*?\?>/)) { + // Processing instructions + return new SvgNode(null, 7, temp, error); + } else if (temp = parser.match(/^/)) { + // Doctype + return new SvgNode(null, 10, temp, error); + } else if (temp = parser.match(/^/, true)) { + // Cdata node + return new SvgNode('#cdata-section', 4, temp[1], error); + } else if (temp = parser.match(/^([^<]+)/, true)) { + // Text node + return new SvgNode('#text', 3, decodeEntities(temp[1]), error); + } + }; + while (child = recursive()) { + if (child.nodeType === 1 && !result) { + result = child; + } else if (child.nodeType === 1 || child.nodeType === 3 && child.nodeValue.trim() !== '') { + warningCallback('parseXml: data after document end has been discarded'); + } + } + if (parser.matchAll()) { + warningCallback('parseXml: parsing error'); + } + return result; + } + ; + function decodeEntities(str) { + return str.replace(/&(?:#([0-9]+)|#[xX]([0-9A-Fa-f]+)|([0-9A-Za-z]+));/g, function (mt, m0, m1, m2) { + if (m0) { + return String.fromCharCode(parseInt(m0, 10)); + } else if (m1) { + return String.fromCharCode(parseInt(m1, 16)); + } else if (m2 && Entities[m2]) { + return String.fromCharCode(Entities[m2]); + } else { + return mt; + } + }); + } + function parseColor(raw) { + var temp, result; + raw = (raw || '').trim(); + if (temp = NamedColors[raw]) { + result = [temp.slice(), 1]; + } else if (temp = raw.match(/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)$/i)) { + temp[1] = parseInt(temp[1]); + temp[2] = parseInt(temp[2]); + temp[3] = parseInt(temp[3]); + temp[4] = parseFloat(temp[4]); + if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256 && temp[4] <= 1) { + result = [temp.slice(1, 4), temp[4]]; + } + } else if (temp = raw.match(/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/i)) { + temp[1] = parseInt(temp[1]); + temp[2] = parseInt(temp[2]); + temp[3] = parseInt(temp[3]); + if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256) { + result = [temp.slice(1, 4), 1]; + } + } else if (temp = raw.match(/^rgb\(\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/i)) { + temp[1] = 2.55 * parseFloat(temp[1]); + temp[2] = 2.55 * parseFloat(temp[2]); + temp[3] = 2.55 * parseFloat(temp[3]); + if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256) { + result = [temp.slice(1, 4), 1]; + } + } else if (temp = raw.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)) { + result = [[parseInt(temp[1], 16), parseInt(temp[2], 16), parseInt(temp[3], 16)], 1]; + } else if (temp = raw.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i)) { + result = [[0x11 * parseInt(temp[1], 16), 0x11 * parseInt(temp[2], 16), 0x11 * parseInt(temp[3], 16)], 1]; + } + return colorCallback ? colorCallback(result, raw) : result; + } + function opacityToColor(color, opacity, isMask) { + var newColor = color[0].slice(), + newOpacity = color[1] * opacity; + if (isMask) { + for (var i = 0; i < color.length; i++) { + newColor[i] *= newOpacity; + } + return [newColor, 1]; + } else { + return [newColor, newOpacity]; + } + } + function multiplyMatrix() { + function multiply(a, b) { + return [a[0] * b[0] + a[2] * b[1], a[1] * b[0] + a[3] * b[1], a[0] * b[2] + a[2] * b[3], a[1] * b[2] + a[3] * b[3], a[0] * b[4] + a[2] * b[5] + a[4], a[1] * b[4] + a[3] * b[5] + a[5]]; + } + var result = arguments[0]; + for (var i = 1; i < arguments.length; i++) { + result = multiply(result, arguments[i]); + } + return result; + } + function transformPoint(p, m) { + return [m[0] * p[0] + m[2] * p[1] + m[4], m[1] * p[0] + m[3] * p[1] + m[5]]; + } + function getGlobalMatrix() { + var ctm = doc._ctm; + for (var i = groupStack.length - 1; i >= 0; i--) { + ctm = multiplyMatrix(groupStack[i].savedMatrix, ctm); + } + return ctm; + } + function getPageBBox() { + return new SvgShape().M(0, 0).L(doc.page.width, 0).L(doc.page.width, doc.page.height).L(0, doc.page.height).transform(inverseMatrix(getGlobalMatrix())).getBoundingBox(); + } + function inverseMatrix(m) { + var dt = m[0] * m[3] - m[1] * m[2]; + return [m[3] / dt, -m[1] / dt, -m[2] / dt, m[0] / dt, (m[2] * m[5] - m[3] * m[4]) / dt, (m[1] * m[4] - m[0] * m[5]) / dt]; + } + function validateMatrix(m) { + var m0 = validateNumber(m[0]), + m1 = validateNumber(m[1]), + m2 = validateNumber(m[2]), + m3 = validateNumber(m[3]), + m4 = validateNumber(m[4]), + m5 = validateNumber(m[5]); + if (isNotEqual(m0 * m3 - m1 * m2, 0)) { + return [m0, m1, m2, m3, m4, m5]; + } + } + function solveEquation(curve) { + var a = curve[2] || 0, + b = curve[1] || 0, + c = curve[0] || 0; + if (isEqual(a, 0) && isEqual(b, 0)) { + return []; + } else if (isEqual(a, 0)) { + return [-c / b]; + } else { + var d = b * b - 4 * a * c; + if (isNotEqual(d, 0) && d > 0) { + return [(-b + Math.sqrt(d)) / (2 * a), (-b - Math.sqrt(d)) / (2 * a)]; + } else if (isEqual(d, 0)) { + return [-b / (2 * a)]; + } else { + return []; + } + } + } + function getCurveValue(t, curve) { + return (curve[0] || 0) + (curve[1] || 0) * t + (curve[2] || 0) * t * t + (curve[3] || 0) * t * t * t; + } + function isEqual(number, ref) { + return Math.abs(number - ref) < 1e-10; + } + function isNotEqual(number, ref) { + return Math.abs(number - ref) >= 1e-10; + } + function validateNumber(n) { + return n > -1e21 && n < 1e21 ? Math.round(n * 1e6) / 1e6 : 0; + } + function isArrayLike(v) { + return typeof v === 'object' && v !== null && typeof v.length === 'number'; + } + function parseTranform(v) { + var parser = new StringParser((v || '').trim()), + result = [1, 0, 0, 1, 0, 0], + temp; + while (temp = parser.match(/^([A-Za-z]+)\s*[(]([^(]+)[)]/, true)) { + var func = temp[1], + nums = [], + parser2 = new StringParser(temp[2].trim()), + temp2 = void 0; + while (temp2 = parser2.matchNumber()) { + nums.push(Number(temp2)); + parser2.matchSeparator(); + } + if (func === 'matrix' && nums.length === 6) { + result = multiplyMatrix(result, [nums[0], nums[1], nums[2], nums[3], nums[4], nums[5]]); + } else if (func === 'translate' && nums.length === 2) { + result = multiplyMatrix(result, [1, 0, 0, 1, nums[0], nums[1]]); + } else if (func === 'translate' && nums.length === 1) { + result = multiplyMatrix(result, [1, 0, 0, 1, nums[0], 0]); + } else if (func === 'scale' && nums.length === 2) { + result = multiplyMatrix(result, [nums[0], 0, 0, nums[1], 0, 0]); + } else if (func === 'scale' && nums.length === 1) { + result = multiplyMatrix(result, [nums[0], 0, 0, nums[0], 0, 0]); + } else if (func === 'rotate' && nums.length === 3) { + var a = nums[0] * Math.PI / 180; + result = multiplyMatrix(result, [1, 0, 0, 1, nums[1], nums[2]], [Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0], [1, 0, 0, 1, -nums[1], -nums[2]]); + } else if (func === 'rotate' && nums.length === 1) { + var _a = nums[0] * Math.PI / 180; + result = multiplyMatrix(result, [Math.cos(_a), Math.sin(_a), -Math.sin(_a), Math.cos(_a), 0, 0]); + } else if (func === 'skewX' && nums.length === 1) { + var _a2 = nums[0] * Math.PI / 180; + result = multiplyMatrix(result, [1, 0, Math.tan(_a2), 1, 0, 0]); + } else if (func === 'skewY' && nums.length === 1) { + var _a3 = nums[0] * Math.PI / 180; + result = multiplyMatrix(result, [1, Math.tan(_a3), 0, 1, 0, 0]); + } else { + return; + } + parser.matchSeparator(); + } + if (parser.matchAll()) { + return; + } + return result; + } + function parseAspectRatio(aspectRatio, availWidth, availHeight, elemWidth, elemHeight, initAlign) { + var temp = (aspectRatio || '').trim().match(/^(none)$|^x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?$/) || [], + ratioType = temp[1] || temp[4] || 'meet', + xAlign = temp[2] || 'Mid', + yAlign = temp[3] || 'Mid', + scaleX = availWidth / elemWidth, + scaleY = availHeight / elemHeight, + dx = { + 'Min': 0, + 'Mid': 0.5, + 'Max': 1 + }[xAlign] - (initAlign || 0), + dy = { + 'Min': 0, + 'Mid': 0.5, + 'Max': 1 + }[yAlign] - (initAlign || 0); + if (ratioType === 'slice') { + scaleY = scaleX = Math.max(scaleX, scaleY); + } else if (ratioType === 'meet') { + scaleY = scaleX = Math.min(scaleX, scaleY); + } + return [scaleX, 0, 0, scaleY, dx * (availWidth - elemWidth * scaleX), dy * (availHeight - elemHeight * scaleY)]; + } + function parseStyleAttr(v) { + var result = Object.create(null); + v = (v || '').trim().split(/;/); + for (var i = 0; i < v.length; i++) { + var key = (v[i].split(':')[0] || '').trim(), + value = (v[i].split(':')[1] || '').trim(); + if (key) { + result[key] = value; + } + } + if (result['marker']) { + if (!result['marker-start']) { + result['marker-start'] = result['marker']; + } + if (!result['marker-mid']) { + result['marker-mid'] = result['marker']; + } + if (!result['marker-end']) { + result['marker-end'] = result['marker']; + } + } + if (result['font']) { + var fontFamily = null, + fontSize = null, + fontStyle = "normal", + fontWeight = "normal", + fontVariant = "normal"; + var parts = result['font'].split(/\s+/); + for (var _i = 0; _i < parts.length; _i++) { + switch (parts[_i]) { + case "normal": + break; + case "italic": + case "oblique": + fontStyle = parts[_i]; + break; + case "small-caps": + fontVariant = parts[_i]; + break; + case "bold": + case "bolder": + case "lighter": + case "100": + case "200": + case "300": + case "400": + case "500": + case "600": + case "700": + case "800": + case "900": + fontWeight = parts[_i]; + break; + default: + if (!fontSize) { + fontSize = parts[_i].split('/')[0]; + } else { + if (!fontFamily) { + fontFamily = parts[_i]; + } else { + fontFamily += ' ' + parts[_i]; + } + } + break; + } + } + if (!result['font-style']) { + result['font-style'] = fontStyle; + } + if (!result['font-variant']) { + result['font-variant'] = fontVariant; + } + if (!result['font-weight']) { + result['font-weight'] = fontWeight; + } + if (!result['font-size']) { + result['font-size'] = fontSize; + } + if (!result['font-family']) { + result['font-family'] = fontFamily; + } + } + return result; + } + function parseSelector(v) { + var parts = v.split(/(?=[.#])/g), + ids = [], + classes = [], + tags = [], + temp; + for (var i = 0; i < parts.length; i++) { + if (temp = parts[i].match(/^[#]([_A-Za-z0-9-]+)$/)) { + ids.push(temp[1]); + } else if (temp = parts[i].match(/^[.]([_A-Za-z0-9-]+)$/)) { + classes.push(temp[1]); + } else if (temp = parts[i].match(/^([_A-Za-z0-9-]+)$/)) { + tags.push(temp[1]); + } else if (parts[i] !== '*') { + return; + } + } + return { + tags: tags, + ids: ids, + classes: classes, + specificity: ids.length * 10000 + classes.length * 100 + tags.length + }; + } + function parseStyleSheet(v) { + var parser = new StringParser(v.trim()), + rules = [], + rule; + while (rule = parser.match(/^\s*([^\{\}]*?)\s*\{([^\{\}]*?)\}/, true)) { + var selectors = rule[1].split(/\s*,\s*/g), + css = parseStyleAttr(rule[2]); + for (var i = 0; i < selectors.length; i++) { + var selector = parseSelector(selectors[i]); + if (selector) { + rules.push({ + selector: selector, + css: css + }); + } + } + } + return rules; + } + function matchesSelector(elem, selector) { + if (elem.nodeType !== 1) { + return false; + } + for (var i = 0; i < selector.tags.length; i++) { + if (selector.tags[i] !== elem.nodeName) { + return false; + } + } + for (var _i2 = 0; _i2 < selector.ids.length; _i2++) { + if (selector.ids[_i2] !== elem.id) { + return false; + } + } + for (var _i3 = 0; _i3 < selector.classes.length; _i3++) { + if (elem.classList.indexOf(selector.classes[_i3]) === -1) { + return false; + } + } + return true; + } + function getStyle(elem) { + var result = Object.create(null); + var specificities = Object.create(null); + for (var i = 0; i < styleRules.length; i++) { + var rule = styleRules[i]; + if (matchesSelector(elem, rule.selector)) { + for (var key in rule.css) { + if (!(specificities[key] > rule.selector.specificity)) { + result[key] = rule.css[key]; + specificities[key] = rule.selector.specificity; + } + } + } + } + return result; + } + function combineArrays(array1, array2) { + return array1.concat(array2.slice(array1.length)); + } + function getAscent(font, size) { + return Math.max(font.ascender, (font.bbox[3] || font.bbox.maxY) * (font.scale || 1)) * size / 1000; + } + function getDescent(font, size) { + return Math.min(font.descender, (font.bbox[1] || font.bbox.minY) * (font.scale || 1)) * size / 1000; + } + function getXHeight(font, size) { + return (font.xHeight || 0.5 * (font.ascender - font.descender)) * size / 1000; + } + function getBaseline(font, size, baseline, shift) { + var dy1, dy2; + switch (baseline) { + case 'middle': + dy1 = 0.5 * getXHeight(font, size); + break; + case 'central': + dy1 = 0.5 * (getDescent(font, size) + getAscent(font, size)); + break; + case 'after-edge': + case 'text-after-edge': + dy1 = getDescent(font, size); + break; + case 'alphabetic': + case 'auto': + case 'baseline': + dy1 = 0; + break; + case 'mathematical': + dy1 = 0.5 * getAscent(font, size); + break; + case 'hanging': + dy1 = 0.8 * getAscent(font, size); + break; + case 'before-edge': + case 'text-before-edge': + dy1 = getAscent(font, size); + break; + default: + dy1 = 0; + break; + } + switch (shift) { + case 'baseline': + dy2 = 0; + break; + case 'super': + dy2 = 0.6 * size; + break; + case 'sub': + dy2 = -0.6 * size; + break; + default: + dy2 = shift; + break; + } + return dy1 - dy2; + } + function getTextPos(font, size, text) { + var encoded = font.encode('' + text), + hex = encoded[0], + pos = encoded[1], + data = []; + for (var i = 0; i < hex.length; i++) { + var unicode = font.unicode ? font.unicode[parseInt(hex[i], 16)] : [text.charCodeAt(i)]; + data.push({ + glyph: hex[i], + unicode: unicode, + width: pos[i].advanceWidth * size / 1000, + xOffset: pos[i].xOffset * size / 1000, + yOffset: pos[i].yOffset * size / 1000, + xAdvance: pos[i].xAdvance * size / 1000, + yAdvance: pos[i].yAdvance * size / 1000 + }); + } + return data; + } + function createSVGElement(obj, inherits) { + switch (obj.nodeName) { + case 'use': + return new SvgElemUse(obj, inherits); + case 'symbol': + return new SvgElemSymbol(obj, inherits); + case 'g': + return new SvgElemGroup(obj, inherits); + case 'a': + return new SvgElemLink(obj, inherits); + case 'svg': + return new SvgElemSvg(obj, inherits); + case 'image': + return new SVGElemImage(obj, inherits); + case 'rect': + return new SvgElemRect(obj, inherits); + case 'circle': + return new SvgElemCircle(obj, inherits); + case 'ellipse': + return new SvgElemEllipse(obj, inherits); + case 'line': + return new SvgElemLine(obj, inherits); + case 'polyline': + return new SvgElemPolyline(obj, inherits); + case 'polygon': + return new SvgElemPolygon(obj, inherits); + case 'path': + return new SvgElemPath(obj, inherits); + case 'text': + return new SvgElemText(obj, inherits); + case 'tspan': + return new SvgElemTspan(obj, inherits); + case 'textPath': + return new SvgElemTextPath(obj, inherits); + case '#text': + case '#cdata-section': + return new SvgElemTextNode(obj, inherits); + default: + return new SvgElem(obj, inherits); + } + } + var StringParser = function StringParser(str) { + this.match = function (exp, all) { + var temp = str.match(exp); + if (!temp || temp.index !== 0) { + return; + } + str = str.substring(temp[0].length); + return all ? temp : temp[0]; + }; + this.matchSeparator = function () { + return this.match(/^(?:\s*,\s*|\s*|)/); + }; + this.matchSpace = function () { + return this.match(/^(?:\s*)/); + }; + this.matchLengthUnit = function () { + return this.match(/^(?:px|pt|cm|mm|in|pc|em|ex|%|)/); + }; + this.matchNumber = function () { + return this.match(/^(?:[-+]?(?:[0-9]+[.][0-9]+|[0-9]+[.]|[.][0-9]+|[0-9]+)(?:[eE][-+]?[0-9]+)?)/); + }; + this.matchAll = function () { + return this.match(/^[\s\S]+/); + }; + }; + var BezierSegment = function BezierSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { + var divisions = 6 * precision; + var equationX = [p1x, -3 * p1x + 3 * c1x, 3 * p1x - 6 * c1x + 3 * c2x, -p1x + 3 * c1x - 3 * c2x + p2x]; + var equationY = [p1y, -3 * p1y + 3 * c1y, 3 * p1y - 6 * c1y + 3 * c2y, -p1y + 3 * c1y - 3 * c2y + p2y]; + var derivativeX = [-3 * p1x + 3 * c1x, 6 * p1x - 12 * c1x + 6 * c2x, -3 * p1x + 9 * c1x - 9 * c2x + 3 * p2x]; + var derivativeY = [-3 * p1y + 3 * c1y, 6 * p1y - 12 * c1y + 6 * c2y, -3 * p1y + 9 * c1y - 9 * c2y + 3 * p2y]; + var lengthMap = [0]; + for (var i = 1; i <= divisions; i++) { + var t = (i - 0.5) / divisions; + var dx = getCurveValue(t, derivativeX) / divisions, + dy = getCurveValue(t, derivativeY) / divisions, + l = Math.sqrt(dx * dx + dy * dy); + lengthMap[i] = lengthMap[i - 1] + l; + } + this.totalLength = lengthMap[divisions]; + this.startPoint = [p1x, p1y, isEqual(p1x, c1x) && isEqual(p1y, c1y) ? Math.atan2(c2y - c1y, c2x - c1x) : Math.atan2(c1y - p1y, c1x - p1x)]; + this.endPoint = [p2x, p2y, isEqual(c2x, p2x) && isEqual(c2y, p2y) ? Math.atan2(c2y - c1y, c2x - c1x) : Math.atan2(p2y - c2y, p2x - c2x)]; + this.getBoundingBox = function () { + var temp; + var minX = getCurveValue(0, equationX), + minY = getCurveValue(0, equationY), + maxX = getCurveValue(1, equationX), + maxY = getCurveValue(1, equationY); + if (minX > maxX) { + temp = maxX; + maxX = minX; + minX = temp; + } + if (minY > maxY) { + temp = maxY; + maxY = minY; + minY = temp; + } + var rootsX = solveEquation(derivativeX); + for (var _i4 = 0; _i4 < rootsX.length; _i4++) { + if (rootsX[_i4] >= 0 && rootsX[_i4] <= 1) { + var _x = getCurveValue(rootsX[_i4], equationX); + if (_x < minX) { + minX = _x; + } + if (_x > maxX) { + maxX = _x; + } + } + } + var rootsY = solveEquation(derivativeY); + for (var _i5 = 0; _i5 < rootsY.length; _i5++) { + if (rootsY[_i5] >= 0 && rootsY[_i5] <= 1) { + var _y = getCurveValue(rootsY[_i5], equationY); + if (_y < minY) { + minY = _y; + } + if (_y > maxY) { + maxY = _y; + } + } + } + return [minX, minY, maxX, maxY]; + }; + this.getPointAtLength = function (l) { + if (isEqual(l, 0)) { + return this.startPoint; + } + if (isEqual(l, this.totalLength)) { + return this.endPoint; + } + if (l < 0 || l > this.totalLength) { + return; + } + for (var _i6 = 1; _i6 <= divisions; _i6++) { + var l1 = lengthMap[_i6 - 1], + l2 = lengthMap[_i6]; + if (l1 <= l && l <= l2) { + var _t = (_i6 - (l2 - l) / (l2 - l1)) / divisions, + _x2 = getCurveValue(_t, equationX), + _y2 = getCurveValue(_t, equationY), + _dx = getCurveValue(_t, derivativeX), + _dy = getCurveValue(_t, derivativeY); + return [_x2, _y2, Math.atan2(_dy, _dx)]; + } + } + }; + }; + var LineSegment = function LineSegment(p1x, p1y, p2x, p2y) { + this.totalLength = Math.sqrt((p2x - p1x) * (p2x - p1x) + (p2y - p1y) * (p2y - p1y)); + this.startPoint = [p1x, p1y, Math.atan2(p2y - p1y, p2x - p1x)]; + this.endPoint = [p2x, p2y, Math.atan2(p2y - p1y, p2x - p1x)]; + this.getBoundingBox = function () { + return [Math.min(this.startPoint[0], this.endPoint[0]), Math.min(this.startPoint[1], this.endPoint[1]), Math.max(this.startPoint[0], this.endPoint[0]), Math.max(this.startPoint[1], this.endPoint[1])]; + }; + this.getPointAtLength = function (l) { + if (l >= 0 && l <= this.totalLength) { + var r = l / this.totalLength || 0, + _x3 = this.startPoint[0] + r * (this.endPoint[0] - this.startPoint[0]), + _y3 = this.startPoint[1] + r * (this.endPoint[1] - this.startPoint[1]); + return [_x3, _y3, this.startPoint[2]]; + } + }; + }; + var SvgShape = function SvgShape() { + this.pathCommands = []; + this.pathSegments = []; + this.startPoint = null; + this.endPoint = null; + this.totalLength = 0; + var startX = 0, + startY = 0, + currX = 0, + currY = 0, + lastCom, + lastCtrlX, + lastCtrlY; + this.move = function (x, y) { + startX = currX = x; + startY = currY = y; + return null; + }; + this.line = function (x, y) { + var segment = new LineSegment(currX, currY, x, y); + currX = x; + currY = y; + return segment; + }; + this.curve = function (c1x, c1y, c2x, c2y, x, y) { + var segment = new BezierSegment(currX, currY, c1x, c1y, c2x, c2y, x, y); + currX = x; + currY = y; + return segment; + }; + this.close = function () { + var segment = new LineSegment(currX, currY, startX, startY); + currX = startX; + currY = startY; + return segment; + }; + this.addCommand = function (data) { + this.pathCommands.push(data); + var segment = this[data[0]].apply(this, data.slice(3)); + if (segment) { + segment.hasStart = data[1]; + segment.hasEnd = data[2]; + this.startPoint = this.startPoint || segment.startPoint; + this.endPoint = segment.endPoint; + this.pathSegments.push(segment); + this.totalLength += segment.totalLength; + } + }; + this.M = function (x, y) { + this.addCommand(['move', true, true, x, y]); + lastCom = 'M'; + return this; + }; + this.m = function (x, y) { + return this.M(currX + x, currY + y); + }; + this.Z = this.z = function () { + this.addCommand(['close', true, true]); + lastCom = 'Z'; + return this; + }; + this.L = function (x, y) { + this.addCommand(['line', true, true, x, y]); + lastCom = 'L'; + return this; + }; + this.l = function (x, y) { + return this.L(currX + x, currY + y); + }; + this.H = function (x) { + return this.L(x, currY); + }; + this.h = function (x) { + return this.L(currX + x, currY); + }; + this.V = function (y) { + return this.L(currX, y); + }; + this.v = function (y) { + return this.L(currX, currY + y); + }; + this.C = function (c1x, c1y, c2x, c2y, x, y) { + this.addCommand(['curve', true, true, c1x, c1y, c2x, c2y, x, y]); + lastCom = 'C'; + lastCtrlX = c2x; + lastCtrlY = c2y; + return this; + }; + this.c = function (c1x, c1y, c2x, c2y, x, y) { + return this.C(currX + c1x, currY + c1y, currX + c2x, currY + c2y, currX + x, currY + y); + }; + this.S = function (c1x, c1y, x, y) { + return this.C(currX + (lastCom === 'C' ? currX - lastCtrlX : 0), currY + (lastCom === 'C' ? currY - lastCtrlY : 0), c1x, c1y, x, y); + }; + this.s = function (c1x, c1y, x, y) { + return this.C(currX + (lastCom === 'C' ? currX - lastCtrlX : 0), currY + (lastCom === 'C' ? currY - lastCtrlY : 0), currX + c1x, currY + c1y, currX + x, currY + y); + }; + this.Q = function (cx, cy, x, y) { + var c1x = currX + 2 / 3 * (cx - currX), + c1y = currY + 2 / 3 * (cy - currY), + c2x = x + 2 / 3 * (cx - x), + c2y = y + 2 / 3 * (cy - y); + this.addCommand(['curve', true, true, c1x, c1y, c2x, c2y, x, y]); + lastCom = 'Q'; + lastCtrlX = cx; + lastCtrlY = cy; + return this; + }; + this.q = function (c1x, c1y, x, y) { + return this.Q(currX + c1x, currY + c1y, currX + x, currY + y); + }; + this.T = function (x, y) { + return this.Q(currX + (lastCom === 'Q' ? currX - lastCtrlX : 0), currY + (lastCom === 'Q' ? currY - lastCtrlY : 0), x, y); + }; + this.t = function (x, y) { + return this.Q(currX + (lastCom === 'Q' ? currX - lastCtrlX : 0), currY + (lastCom === 'Q' ? currY - lastCtrlY : 0), currX + x, currY + y); + }; + this.A = function (rx, ry, fi, fa, fs, x, y) { + if (isEqual(rx, 0) || isEqual(ry, 0)) { + this.addCommand(['line', true, true, x, y]); + } else { + fi = fi * (Math.PI / 180); + rx = Math.abs(rx); + ry = Math.abs(ry); + fa = 1 * !!fa; + fs = 1 * !!fs; + var x1 = Math.cos(fi) * (currX - x) / 2 + Math.sin(fi) * (currY - y) / 2, + y1 = Math.cos(fi) * (currY - y) / 2 - Math.sin(fi) * (currX - x) / 2, + lambda = x1 * x1 / (rx * rx) + y1 * y1 / (ry * ry); + if (lambda > 1) { + rx *= Math.sqrt(lambda); + ry *= Math.sqrt(lambda); + } + var r = Math.sqrt(Math.max(0, rx * rx * ry * ry - rx * rx * y1 * y1 - ry * ry * x1 * x1) / (rx * rx * y1 * y1 + ry * ry * x1 * x1)), + x2 = (fa === fs ? -1 : 1) * r * rx * y1 / ry, + y2 = (fa === fs ? 1 : -1) * r * ry * x1 / rx; + var cx = Math.cos(fi) * x2 - Math.sin(fi) * y2 + (currX + x) / 2, + cy = Math.sin(fi) * x2 + Math.cos(fi) * y2 + (currY + y) / 2, + th1 = Math.atan2((y1 - y2) / ry, (x1 - x2) / rx), + th2 = Math.atan2((-y1 - y2) / ry, (-x1 - x2) / rx); + if (fs === 0 && th2 - th1 > 0) { + th2 -= 2 * Math.PI; + } else if (fs === 1 && th2 - th1 < 0) { + th2 += 2 * Math.PI; + } + var segms = Math.ceil(Math.abs(th2 - th1) / (Math.PI / precision)); + for (var i = 0; i < segms; i++) { + var th3 = th1 + i * (th2 - th1) / segms, + th4 = th1 + (i + 1) * (th2 - th1) / segms, + t = 4 / 3 * Math.tan((th4 - th3) / 4); + var c1x = cx + Math.cos(fi) * rx * (Math.cos(th3) - t * Math.sin(th3)) - Math.sin(fi) * ry * (Math.sin(th3) + t * Math.cos(th3)), + c1y = cy + Math.sin(fi) * rx * (Math.cos(th3) - t * Math.sin(th3)) + Math.cos(fi) * ry * (Math.sin(th3) + t * Math.cos(th3)), + c2x = cx + Math.cos(fi) * rx * (Math.cos(th4) + t * Math.sin(th4)) - Math.sin(fi) * ry * (Math.sin(th4) - t * Math.cos(th4)), + c2y = cy + Math.sin(fi) * rx * (Math.cos(th4) + t * Math.sin(th4)) + Math.cos(fi) * ry * (Math.sin(th4) - t * Math.cos(th4)), + endX = cx + Math.cos(fi) * rx * Math.cos(th4) - Math.sin(fi) * ry * Math.sin(th4), + endY = cy + Math.sin(fi) * rx * Math.cos(th4) + Math.cos(fi) * ry * Math.sin(th4); + this.addCommand(['curve', i === 0, i === segms - 1, c1x, c1y, c2x, c2y, endX, endY]); + } + } + lastCom = 'A'; + return this; + }; + this.a = function (rx, ry, fi, fa, fs, x, y) { + return this.A(rx, ry, fi, fa, fs, currX + x, currY + y); + }; + this.path = function (d) { + var command, + value, + temp, + parser = new StringParser((d || '').trim()); + while (command = parser.match(/^[astvzqmhlcASTVZQMHLC]/)) { + parser.matchSeparator(); + var values = []; + while (value = PathFlags[command + values.length] ? parser.match(/^[01]/) : parser.matchNumber()) { + parser.matchSeparator(); + if (values.length === PathArguments[command]) { + this[command].apply(this, values); + values = []; + if (command === 'M') { + command = 'L'; + } else if (command === 'm') { + command = 'l'; + } + } + values.push(Number(value)); + } + if (values.length === PathArguments[command]) { + this[command].apply(this, values); + } else { + warningCallback('SvgPath: command ' + command + ' with ' + values.length + ' numbers'); + return; + } + } + if (temp = parser.matchAll()) { + warningCallback('SvgPath: unexpected string ' + temp); + } + return this; + }; + this.getBoundingBox = function () { + var bbox = [Infinity, Infinity, -Infinity, -Infinity]; + function addBounds(bbox1) { + if (bbox1[0] < bbox[0]) { + bbox[0] = bbox1[0]; + } + if (bbox1[2] > bbox[2]) { + bbox[2] = bbox1[2]; + } + if (bbox1[1] < bbox[1]) { + bbox[1] = bbox1[1]; + } + if (bbox1[3] > bbox[3]) { + bbox[3] = bbox1[3]; + } + } + for (var i = 0; i < this.pathSegments.length; i++) { + addBounds(this.pathSegments[i].getBoundingBox()); + } + if (bbox[0] === Infinity) { + bbox[0] = 0; + } + if (bbox[1] === Infinity) { + bbox[1] = 0; + } + if (bbox[2] === -Infinity) { + bbox[2] = 0; + } + if (bbox[3] === -Infinity) { + bbox[3] = 0; + } + return bbox; + }; + this.getPointAtLength = function (l) { + if (l >= 0 && l <= this.totalLength) { + var temp; + for (var i = 0; i < this.pathSegments.length; i++) { + if (temp = this.pathSegments[i].getPointAtLength(l)) { + return temp; + } + l -= this.pathSegments[i].totalLength; + } + return this.endPoint; + } + }; + this.transform = function (m) { + this.pathSegments = []; + this.startPoint = null; + this.endPoint = null; + this.totalLength = 0; + for (var i = 0; i < this.pathCommands.length; i++) { + var data = this.pathCommands.shift(); + for (var j = 3; j < data.length; j += 2) { + var p = transformPoint([data[j], data[j + 1]], m); + data[j] = p[0]; + data[j + 1] = p[1]; + } + this.addCommand(data); + } + return this; + }; + this.mergeShape = function (shape) { + for (var i = 0; i < shape.pathCommands.length; i++) { + this.addCommand(shape.pathCommands[i].slice()); + } + return this; + }; + this.clone = function () { + return new SvgShape().mergeShape(this); + }; + this.insertInDocument = function () { + for (var i = 0; i < this.pathCommands.length; i++) { + var command = this.pathCommands[i][0], + values = this.pathCommands[i].slice(3); + switch (command) { + case 'move': + doc.moveTo(values[0], values[1]); + break; + case 'line': + doc.lineTo(values[0], values[1]); + break; + case 'curve': + doc.bezierCurveTo(values[0], values[1], values[2], values[3], values[4], values[5]); + break; + case 'close': + doc.closePath(); + break; + } + } + }; + this.getSubPaths = function () { + var subPaths = [], + shape = new SvgShape(); + for (var i = 0; i < this.pathCommands.length; i++) { + var data = this.pathCommands[i], + command = this.pathCommands[i][0]; + if (command === 'move' && i !== 0) { + subPaths.push(shape); + shape = new SvgShape(); + } + shape.addCommand(data); + } + subPaths.push(shape); + return subPaths; + }; + this.getMarkers = function () { + var markers = [], + subPaths = this.getSubPaths(); + for (var i = 0; i < subPaths.length; i++) { + var subPath = subPaths[i], + subPathMarkers = []; + for (var j = 0; j < subPath.pathSegments.length; j++) { + var segment = subPath.pathSegments[j]; + if (isNotEqual(segment.totalLength, 0) || j === 0 || j === subPath.pathSegments.length - 1) { + if (segment.hasStart) { + var startMarker = segment.getPointAtLength(0), + prevEndMarker = subPathMarkers.pop(); + if (prevEndMarker) { + startMarker[2] = 0.5 * (prevEndMarker[2] + startMarker[2]); + } + subPathMarkers.push(startMarker); + } + if (segment.hasEnd) { + var endMarker = segment.getPointAtLength(segment.totalLength); + subPathMarkers.push(endMarker); + } + } + } + markers = markers.concat(subPathMarkers); + } + return markers; + }; + }; + var SvgElem = function SvgElem(obj, inherits) { + var styleCache = Object.create(null); + var childrenCache = null; + this.name = obj.nodeName; + this.isOuterElement = obj === svg || !obj.parentNode; + this.inherits = inherits || (!this.isOuterElement ? createSVGElement(obj.parentNode, null) : null); + this.stack = this.inherits ? this.inherits.stack.concat(obj) : [obj]; + this.style = parseStyleAttr(typeof obj.getAttribute === 'function' && obj.getAttribute('style')); + this.css = useCSS ? getComputedStyle(obj) : getStyle(obj); + this.allowedChildren = []; + this.attr = function (key) { + if (typeof obj.getAttribute === 'function') { + return obj.getAttribute(key); + } + }; + this.resolveUrl = function (value) { + var temp = (value || '').match(/^\s*(?:url\("(.*)#(.*)"\)|url\('(.*)#(.*)'\)|url\((.*)#(.*)\)|(.*)#(.*))\s*$/) || []; + var file = temp[1] || temp[3] || temp[5] || temp[7], + id = temp[2] || temp[4] || temp[6] || temp[8]; + if (id) { + if (!file) { + var svgObj = svg.getElementById(id); + if (svgObj) { + if (this.stack.indexOf(svgObj) === -1) { + return svgObj; + } else { + warningCallback('SVGtoPDF: loop of circular references for id "' + id + '"'); + return; + } + } + } + if (documentCallback) { + var svgs = documentCache[file]; + if (!svgs) { + svgs = documentCallback(file); + if (!isArrayLike(svgs)) { + svgs = [svgs]; + } + for (var i = 0; i < svgs.length; i++) { + if (typeof svgs[i] === 'string') { + svgs[i] = parseXml(svgs[i]); + } + } + documentCache[file] = svgs; + } + for (var _i7 = 0; _i7 < svgs.length; _i7++) { + var _svgObj = svgs[_i7].getElementById(id); + if (_svgObj) { + if (this.stack.indexOf(_svgObj) === -1) { + return _svgObj; + } else { + warningCallback('SVGtoPDF: loop of circular references for id "' + file + '#' + id + '"'); + return; + } + } + } + } + } + }; + this.computeUnits = function (value, unit, percent, isFontSize) { + if (unit === '%') { + return parseFloat(value) / 100 * (isFontSize || percent != null ? percent : this.getViewport()); + } else if (unit === 'ex' || unit === 'em') { + return value * { + 'em': 1, + 'ex': 0.5 + }[unit] * (isFontSize ? percent : this.get('font-size')); + } else { + return value * { + '': 1, + 'px': 1, + 'pt': 96 / 72, + 'cm': 96 / 2.54, + 'mm': 96 / 25.4, + 'in': 96, + 'pc': 96 / 6 + }[unit]; + } + }; + this.computeLength = function (value, percent, initial, isFontSize) { + var parser = new StringParser((value || '').trim()), + temp1, + temp2; + if (typeof (temp1 = parser.matchNumber()) === 'string' && typeof (temp2 = parser.matchLengthUnit()) === 'string' && !parser.matchAll()) { + return this.computeUnits(temp1, temp2, percent, isFontSize); + } + return initial; + }; + this.computeLengthList = function (value, percent, strict) { + var parser = new StringParser((value || '').trim()), + result = [], + temp1, + temp2; + while (typeof (temp1 = parser.matchNumber()) === 'string' && typeof (temp2 = parser.matchLengthUnit()) === 'string') { + result.push(this.computeUnits(temp1, temp2, percent)); + parser.matchSeparator(); + } + if (strict && parser.matchAll()) { + return; + } + return result; + }; + this.getLength = function (key, percent, initial) { + return this.computeLength(this.attr(key), percent, initial); + }; + this.getLengthList = function (key, percent) { + return this.computeLengthList(this.attr(key), percent); + }; + this.getUrl = function (key) { + return this.resolveUrl(this.attr(key)); + }; + this.getNumberList = function (key) { + var parser = new StringParser((this.attr(key) || '').trim()), + result = [], + temp; + while (temp = parser.matchNumber()) { + result.push(Number(temp)); + parser.matchSeparator(); + } + result.error = parser.matchAll(); + return result; + }; + this.getViewbox = function (key, initial) { + var viewBox = this.getNumberList(key); + if (viewBox.length === 4 && viewBox[2] >= 0 && viewBox[3] >= 0) { + return viewBox; + } + return initial; + }; + this.getPercent = function (key, initial) { + var value = this.attr(key); + var parser = new StringParser((value || '').trim()), + temp1, + temp2; + var number = parser.matchNumber(); + if (!number) { + return initial; + } + if (parser.match('%')) { + number *= 0.01; + } + if (parser.matchAll()) { + return initial; + } + return Math.max(0, Math.min(1, number)); + }; + this.chooseValue = function (args) { + for (var i = 0; i < arguments.length; i++) { + if (arguments[i] != null && arguments[i] === arguments[i]) { + return arguments[i]; + } + } + return arguments[arguments.length - 1]; + }; + this.get = function (key) { + if (styleCache[key] !== undefined) { + return styleCache[key]; + } + var keyInfo = Properties[key] || {}, + value, + result; + for (var i = 0; i < 3; i++) { + switch (i) { + case 0: + if (key !== 'transform') { + // the CSS transform behaves strangely + value = this.css[keyInfo.css || key]; + } + break; + case 1: + value = this.style[key]; + break; + case 2: + value = this.attr(key); + break; + } + if (value === 'inherit') { + result = this.inherits ? this.inherits.get(key) : keyInfo.initial; + if (result != null) { + return styleCache[key] = result; + } + } + if (keyInfo.values != null) { + result = keyInfo.values[value]; + if (result != null) { + return styleCache[key] = result; + } + } + if (value != null) { + var parsed = void 0; + switch (key) { + case 'font-size': + result = this.computeLength(value, this.inherits ? this.inherits.get(key) : keyInfo.initial, undefined, true); + break; + case 'baseline-shift': + result = this.computeLength(value, this.get('font-size')); + break; + case 'font-family': + result = value || undefined; + break; + case 'opacity': + case 'stroke-opacity': + case 'fill-opacity': + case 'stop-opacity': + parsed = parseFloat(value); + if (!isNaN(parsed)) { + result = Math.max(0, Math.min(1, parsed)); + } + break; + case 'transform': + result = parseTranform(value); + break; + case 'stroke-dasharray': + if (value === 'none') { + result = []; + } else if (parsed = this.computeLengthList(value, this.getViewport(), true)) { + var sum = 0, + error = false; + for (var j = 0; j < parsed.length; j++) { + if (parsed[j] < 0) { + error = true; + } + sum += parsed[j]; + } + if (!error) { + if (parsed.length % 2 === 1) { + parsed = parsed.concat(parsed); + } + result = sum === 0 ? [] : parsed; + } + } + break; + case 'color': + if (value === 'none' || value === 'transparent') { + result = 'none'; + } else { + result = parseColor(value); + } + break; + case 'fill': + case 'stroke': + if (value === 'none' || value === 'transparent') { + result = 'none'; + } else if (value === 'currentColor') { + result = this.get('color'); + } else if (parsed = parseColor(value)) { + return parsed; + } else if (parsed = (value || '').split(' ')) { + var object = this.resolveUrl(parsed[0]), + fallbackColor = parseColor(parsed[1]); + if (object == null) { + result = fallbackColor; + } else if (object.nodeName === 'linearGradient' || object.nodeName === 'radialGradient') { + result = new SvgElemGradient(object, null, fallbackColor); + } else if (object.nodeName === 'pattern') { + result = new SvgElemPattern(object, null, fallbackColor); + } else { + result = fallbackColor; + } + } + break; + case 'stop-color': + if (value === 'none' || value === 'transparent') { + result = 'none'; + } else if (value === 'currentColor') { + result = this.get('color'); + } else { + result = parseColor(value); + } + break; + case 'marker-start': + case 'marker-mid': + case 'marker-end': + case 'clip-path': + case 'mask': + if (value === 'none') { + result = 'none'; + } else { + result = this.resolveUrl(value); + } + break; + case 'stroke-width': + parsed = this.computeLength(value, this.getViewport()); + if (parsed != null && parsed >= 0) { + result = parsed; + } + break; + case 'stroke-miterlimit': + parsed = parseFloat(value); + if (parsed != null && parsed >= 1) { + result = parsed; + } + break; + case 'word-spacing': + case 'letter-spacing': + result = this.computeLength(value, this.getViewport()); + break; + case 'stroke-dashoffset': + result = this.computeLength(value, this.getViewport()); + if (result != null) { + if (result < 0) { + // fix for crbug.com/660850 + var dasharray = this.get('stroke-dasharray'); + for (var _j = 0; _j < dasharray.length; _j++) { + result += dasharray[_j]; + } + } + } + break; + } + if (result != null) { + return styleCache[key] = result; + } + } + } + return styleCache[key] = keyInfo.inherit && this.inherits ? this.inherits.get(key) : keyInfo.initial; + }; + this.getChildren = function () { + if (childrenCache != null) { + return childrenCache; + } + var children = []; + for (var i = 0; i < obj.childNodes.length; i++) { + var child = obj.childNodes[i]; + if (!child.error && this.allowedChildren.indexOf(child.nodeName) !== -1) { + children.push(createSVGElement(child, this)); + } + } + return childrenCache = children; + }; + this.getParentVWidth = function () { + return this.inherits ? this.inherits.getVWidth() : viewportWidth; + }; + this.getParentVHeight = function () { + return this.inherits ? this.inherits.getVHeight() : viewportHeight; + }; + this.getParentViewport = function () { + return Math.sqrt(0.5 * this.getParentVWidth() * this.getParentVWidth() + 0.5 * this.getParentVHeight() * this.getParentVHeight()); + }; + this.getVWidth = function () { + return this.getParentVWidth(); + }; + this.getVHeight = function () { + return this.getParentVHeight(); + }; + this.getViewport = function () { + return Math.sqrt(0.5 * this.getVWidth() * this.getVWidth() + 0.5 * this.getVHeight() * this.getVHeight()); + }; + this.getBoundingBox = function () { + var shape = this.getBoundingShape(); + return shape.getBoundingBox(); + }; + }; + var SvgElemStylable = function SvgElemStylable(obj, inherits) { + SvgElem.call(this, obj, inherits); + this.transform = function () { + doc.transform.apply(doc, this.getTransformation()); + }; + this.clip = function () { + if (this.get('clip-path') !== 'none') { + var clipPath = new SvgElemClipPath(this.get('clip-path'), null); + clipPath.useMask(this.getBoundingBox()); + return true; + } + }; + this.mask = function () { + if (this.get('mask') !== 'none') { + var mask = new SvgElemMask(this.get('mask'), null); + mask.useMask(this.getBoundingBox()); + return true; + } + }; + this.getFill = function (isClip, isMask) { + var opacity = this.get('opacity'), + fill = this.get('fill'), + fillOpacity = this.get('fill-opacity'); + if (isClip) { + return DefaultColors.white; + } + if (fill !== 'none' && opacity && fillOpacity) { + if (fill instanceof SvgElemGradient || fill instanceof SvgElemPattern) { + return fill.getPaint(this.getBoundingBox(), fillOpacity * opacity, isClip, isMask); + } + return opacityToColor(fill, fillOpacity * opacity, isMask); + } + }; + this.getStroke = function (isClip, isMask) { + var opacity = this.get('opacity'), + stroke = this.get('stroke'), + strokeOpacity = this.get('stroke-opacity'); + if (isClip || isEqual(this.get('stroke-width'), 0)) { + return; + } + if (stroke !== 'none' && opacity && strokeOpacity) { + if (stroke instanceof SvgElemGradient || stroke instanceof SvgElemPattern) { + return stroke.getPaint(this.getBoundingBox(), strokeOpacity * opacity, isClip, isMask); + } + return opacityToColor(stroke, strokeOpacity * opacity, isMask); + } + }; + }; + var SvgElemHasChildren = function SvgElemHasChildren(obj, inherits) { + SvgElemStylable.call(this, obj, inherits); + this.allowedChildren = ['use', 'g', 'a', 'svg', 'image', 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon', 'path', 'text']; + this.getBoundingShape = function () { + var shape = new SvgShape(), + children = this.getChildren(); + for (var i = 0; i < children.length; i++) { + if (children[i].get('display') !== 'none') { + if (typeof children[i].getBoundingShape === 'function') { + var childShape = children[i].getBoundingShape().clone(); + if (typeof children[i].getTransformation === 'function') { + childShape.transform(children[i].getTransformation()); + } + shape.mergeShape(childShape); + } + } + } + return shape; + }; + this.drawChildren = function (isClip, isMask) { + var children = this.getChildren(); + for (var i = 0; i < children.length; i++) { + if (children[i].get('display') !== 'none') { + if (typeof children[i].drawInDocument === 'function') { + children[i].drawInDocument(isClip, isMask); + } + } + } + }; + }; + var SvgElemContainer = function SvgElemContainer(obj, inherits) { + SvgElemHasChildren.call(this, obj, inherits); + this.drawContent = function (isClip, isMask) { + this.transform(); + var clipped = this.clip(), + masked = this.mask(), + group; + if ((this.get('opacity') < 1 || clipped || masked) && !isClip) { + group = docBeginGroup(getPageBBox()); + } + this.drawChildren(isClip, isMask); + if (group) { + docEndGroup(group); + doc.fillOpacity(this.get('opacity')); + docInsertGroup(group); + } + }; + }; + var SvgElemUse = function SvgElemUse(obj, inherits) { + SvgElemContainer.call(this, obj, inherits); + var x = this.getLength('x', this.getVWidth(), 0), + y = this.getLength('y', this.getVHeight(), 0), + child = this.getUrl('href') || this.getUrl('xlink:href'); + if (child) { + child = createSVGElement(child, this); + } + this.getChildren = function () { + return child ? [child] : []; + }; + this.drawInDocument = function (isClip, isMask) { + doc.save(); + this.drawContent(isClip, isMask); + doc.restore(); + }; + this.getTransformation = function () { + return multiplyMatrix(this.get('transform'), [1, 0, 0, 1, x, y]); + }; + }; + var SvgElemSymbol = function SvgElemSymbol(obj, inherits) { + SvgElemContainer.call(this, obj, inherits); + var width = this.getLength('width', this.getParentVWidth(), this.getParentVWidth()), + height = this.getLength('height', this.getParentVHeight(), this.getParentVHeight()); + if (inherits instanceof SvgElemUse) { + width = inherits.getLength('width', inherits.getParentVWidth(), width); + height = inherits.getLength('height', inherits.getParentVHeight(), height); + } + var aspectRatio = (this.attr('preserveAspectRatio') || '').trim(), + viewBox = this.getViewbox('viewBox', [0, 0, width, height]); + this.getVWidth = function () { + return viewBox[2]; + }; + this.getVHeight = function () { + return viewBox[3]; + }; + this.drawInDocument = function (isClip, isMask) { + doc.save(); + this.drawContent(isClip, isMask); + doc.restore(); + }; + this.getTransformation = function () { + return multiplyMatrix(parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3]), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]); + }; + }; + var SvgElemGroup = function SvgElemGroup(obj, inherits) { + SvgElemContainer.call(this, obj, inherits); + this.drawInDocument = function (isClip, isMask) { + doc.save(); + if (this.link && !isClip && !isMask) { + this.addLink(); + } + this.drawContent(isClip, isMask); + doc.restore(); + }; + this.getTransformation = function () { + return this.get('transform'); + }; + }; + var SvgElemLink = function SvgElemLink(obj, inherits) { + if (inherits && inherits.isText) { + SvgElemTspan.call(this, obj, inherits); + this.allowedChildren = ['textPath', 'tspan', '#text', '#cdata-section', 'a']; + } else { + SvgElemGroup.call(this, obj, inherits); + } + this.link = this.attr('href') || this.attr('xlink:href'); + this.addLink = function () { + if (this.link.match(/^(?:[a-z][a-z0-9+.-]*:|\/\/)?/i) && this.getChildren().length) { + var bbox = this.getBoundingShape().transform(getGlobalMatrix()).getBoundingBox(); + docInsertLink(bbox[0], bbox[1], bbox[2], bbox[3], this.link); + } + }; + }; + var SvgElemSvg = function SvgElemSvg(obj, inherits) { + SvgElemContainer.call(this, obj, inherits); + var width = this.getLength('width', this.getParentVWidth(), this.getParentVWidth()), + height = this.getLength('height', this.getParentVHeight(), this.getParentVHeight()), + x = this.getLength('x', this.getParentVWidth(), 0), + y = this.getLength('y', this.getParentVHeight(), 0); + if (inherits instanceof SvgElemUse) { + width = inherits.getLength('width', inherits.getParentVWidth(), width); + height = inherits.getLength('height', inherits.getParentVHeight(), height); + } + var aspectRatio = this.attr('preserveAspectRatio'), + viewBox = this.getViewbox('viewBox', [0, 0, width, height]); + if (this.isOuterElement && preserveAspectRatio) { + x = y = 0; + width = viewportWidth; + height = viewportHeight; + aspectRatio = preserveAspectRatio; + } + this.getVWidth = function () { + return viewBox[2]; + }; + this.getVHeight = function () { + return viewBox[3]; + }; + this.drawInDocument = function (isClip, isMask) { + doc.save(); + if (this.get('overflow') === 'hidden') { + new SvgShape().M(x, y).L(x + width, y).L(x + width, y + height).L(x, y + height).Z().transform(this.get('transform')).insertInDocument(); + doc.clip(); + } + this.drawContent(isClip, isMask); + doc.restore(); + }; + this.getTransformation = function () { + return multiplyMatrix(this.get('transform'), [1, 0, 0, 1, x, y], parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3]), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]); + }; + }; + var SVGElemImage = function SVGElemImage(obj, inherits) { + SvgElemStylable.call(this, obj, inherits); + var link = imageCallback(this.attr('href') || this.attr('xlink:href') || ''), + x = this.getLength('x', this.getVWidth(), 0), + y = this.getLength('y', this.getVHeight(), 0), + width = this.getLength('width', this.getVWidth(), 'auto'), + height = this.getLength('height', this.getVHeight(), 'auto'), + image; + try { + image = doc.openImage(link); + } catch (e) { + warningCallback('SVGElemImage: failed to open image "' + link + '" in PDFKit'); + } + if (image) { + if (width === 'auto' && height !== 'auto') { + width = height * image.width / image.height; + } else if (height === 'auto' && width !== 'auto') { + height = width * image.height / image.width; + } else if (width === 'auto' && height === 'auto') { + width = image.width; + height = image.height; + } + } + if (width === 'auto' || width < 0) { + width = 0; + } + if (height === 'auto' || height < 0) { + height = 0; + } + this.getTransformation = function () { + return this.get('transform'); + }; + this.getBoundingShape = function () { + return new SvgShape().M(x, y).L(x + width, y).M(x + width, y + height).L(x, y + height); + }; + this.drawInDocument = function (isClip, isMask) { + if (this.get('visibility') === 'hidden' || !image) { + return; + } + doc.save(); + this.transform(); + if (this.get('overflow') === 'hidden') { + doc.rect(x, y, width, height).clip(); + } + this.clip(); + this.mask(); + doc.translate(x, y); + doc.transform.apply(doc, parseAspectRatio(this.attr('preserveAspectRatio'), width, height, image ? image.width : width, image ? image.height : height)); + if (!isClip) { + doc.fillOpacity(this.get('opacity')); + doc.image(image, 0, 0); + } else { + doc.rect(0, 0, image.width, image.height); + docFillColor(DefaultColors.white).fill(); + } + doc.restore(); + }; + }; + var SvgElemPattern = function SvgElemPattern(obj, inherits, fallback) { + SvgElemHasChildren.call(this, obj, inherits); + this.ref = function () { + var ref = this.getUrl('href') || this.getUrl('xlink:href'); + if (ref && ref.nodeName === obj.nodeName) { + return new SvgElemPattern(ref, inherits, fallback); + } + }.call(this); + var _attr = this.attr; + this.attr = function (key) { + var attr = _attr.call(this, key); + if (attr != null || key === 'href' || key === 'xlink:href') { + return attr; + } + return this.ref ? this.ref.attr(key) : null; + }; + var _getChildren = this.getChildren; + this.getChildren = function () { + var children = _getChildren.call(this); + if (children.length > 0) { + return children; + } + return this.ref ? this.ref.getChildren() : []; + }; + this.getPaint = function (bBox, gOpacity, isClip, isMask) { + var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse', + bBoxUnitsContent = this.attr('patternContentUnits') === 'objectBoundingBox', + x = this.getLength('x', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0), + y = this.getLength('y', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0), + width = this.getLength('width', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0), + height = this.getLength('height', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0); + if (bBoxUnitsContent && !bBoxUnitsPattern) { + // Use the same units for pattern & pattern content + x = (x - bBox[0]) / (bBox[2] - bBox[0]) || 0; + y = (y - bBox[1]) / (bBox[3] - bBox[1]) || 0; + width = width / (bBox[2] - bBox[0]) || 0; + height = height / (bBox[3] - bBox[1]) || 0; + } else if (!bBoxUnitsContent && bBoxUnitsPattern) { + x = bBox[0] + x * (bBox[2] - bBox[0]); + y = bBox[1] + y * (bBox[3] - bBox[1]); + width = width * (bBox[2] - bBox[0]); + height = height * (bBox[3] - bBox[1]); + } + var viewBox = this.getViewbox('viewBox', [0, 0, width, height]), + aspectRatio = (this.attr('preserveAspectRatio') || '').trim(), + aspectRatioMatrix = multiplyMatrix(parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3], 0), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]), + matrix = parseTranform(this.attr('patternTransform')); + if (bBoxUnitsContent) { + matrix = multiplyMatrix([bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]], matrix); + } + matrix = multiplyMatrix(matrix, [1, 0, 0, 1, x, y]); + if ((matrix = validateMatrix(matrix)) && (aspectRatioMatrix = validateMatrix(aspectRatioMatrix)) && (width = validateNumber(width)) && (height = validateNumber(height))) { + var group = docBeginGroup([0, 0, width, height]); + doc.transform.apply(doc, aspectRatioMatrix); + this.drawChildren(isClip, isMask); + docEndGroup(group); + return [docCreatePattern(group, width, height, matrix), gOpacity]; + } else { + return fallback ? [fallback[0], fallback[1] * gOpacity] : undefined; + } + }; + this.getVWidth = function () { + var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse', + width = this.getLength('width', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0); + return this.getViewbox('viewBox', [0, 0, width, 0])[2]; + }; + this.getVHeight = function () { + var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse', + height = this.getLength('height', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0); + return this.getViewbox('viewBox', [0, 0, 0, height])[3]; + }; + }; + var SvgElemGradient = function SvgElemGradient(obj, inherits, fallback) { + SvgElem.call(this, obj, inherits); + this.allowedChildren = ['stop']; + this.ref = function () { + var ref = this.getUrl('href') || this.getUrl('xlink:href'); + if (ref && ref.nodeName === obj.nodeName) { + return new SvgElemGradient(ref, inherits, fallback); + } + }.call(this); + var _attr = this.attr; + this.attr = function (key) { + var attr = _attr.call(this, key); + if (attr != null || key === 'href' || key === 'xlink:href') { + return attr; + } + return this.ref ? this.ref.attr(key) : null; + }; + var _getChildren = this.getChildren; + this.getChildren = function () { + var children = _getChildren.call(this); + if (children.length > 0) { + return children; + } + return this.ref ? this.ref.getChildren() : []; + }; + this.getPaint = function (bBox, gOpacity, isClip, isMask) { + var children = this.getChildren(); + if (children.length === 0) { + return; + } + if (children.length === 1) { + var child = children[0], + stopColor = child.get('stop-color'); + if (stopColor === 'none') { + return; + } + return opacityToColor(stopColor, child.get('stop-opacity') * gOpacity, isMask); + } + var bBoxUnits = this.attr('gradientUnits') !== 'userSpaceOnUse', + matrix = parseTranform(this.attr('gradientTransform')), + spread = this.attr('spreadMethod'), + grad, + x1, + x2, + y1, + y2, + r2, + nAfter = 0, + nBefore = 0, + nTotal = 1; + if (bBoxUnits) { + matrix = multiplyMatrix([bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]], matrix); + } + if (matrix = validateMatrix(matrix)) { + if (this.name === 'linearGradient') { + x1 = this.getLength('x1', bBoxUnits ? 1 : this.getVWidth(), 0); + x2 = this.getLength('x2', bBoxUnits ? 1 : this.getVWidth(), bBoxUnits ? 1 : this.getVWidth()); + y1 = this.getLength('y1', bBoxUnits ? 1 : this.getVHeight(), 0); + y2 = this.getLength('y2', bBoxUnits ? 1 : this.getVHeight(), 0); + } else { + x2 = this.getLength('cx', bBoxUnits ? 1 : this.getVWidth(), bBoxUnits ? 0.5 : 0.5 * this.getVWidth()); + y2 = this.getLength('cy', bBoxUnits ? 1 : this.getVHeight(), bBoxUnits ? 0.5 : 0.5 * this.getVHeight()); + r2 = this.getLength('r', bBoxUnits ? 1 : this.getViewport(), bBoxUnits ? 0.5 : 0.5 * this.getViewport()); + x1 = this.getLength('fx', bBoxUnits ? 1 : this.getVWidth(), x2); + y1 = this.getLength('fy', bBoxUnits ? 1 : this.getVHeight(), y2); + if (r2 < 0) { + warningCallback('SvgElemGradient: negative r value'); + } + var d = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), + multiplier = 1; + if (d > r2) { + // according to specification + multiplier = r2 / d; + x1 = x2 + (x1 - x2) * multiplier; + y1 = y2 + (y1 - y2) * multiplier; + } + r2 = Math.max(r2, d * multiplier * (1 + 1e-6)); // fix for edge-case gradients see issue #84 + } + + if (spread === 'reflect' || spread === 'repeat') { + var inv = inverseMatrix(matrix), + corner1 = transformPoint([bBox[0], bBox[1]], inv), + corner2 = transformPoint([bBox[2], bBox[1]], inv), + corner3 = transformPoint([bBox[2], bBox[3]], inv), + corner4 = transformPoint([bBox[0], bBox[3]], inv); + if (this.name === 'linearGradient') { + // See file 'gradient-repeat-maths.png' + nAfter = Math.max((corner1[0] - x2) * (x2 - x1) + (corner1[1] - y2) * (y2 - y1), (corner2[0] - x2) * (x2 - x1) + (corner2[1] - y2) * (y2 - y1), (corner3[0] - x2) * (x2 - x1) + (corner3[1] - y2) * (y2 - y1), (corner4[0] - x2) * (x2 - x1) + (corner4[1] - y2) * (y2 - y1)) / (Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); + nBefore = Math.max((corner1[0] - x1) * (x1 - x2) + (corner1[1] - y1) * (y1 - y2), (corner2[0] - x1) * (x1 - x2) + (corner2[1] - y1) * (y1 - y2), (corner3[0] - x1) * (x1 - x2) + (corner3[1] - y1) * (y1 - y2), (corner4[0] - x1) * (x1 - x2) + (corner4[1] - y1) * (y1 - y2)) / (Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); + } else { + nAfter = Math.sqrt(Math.max(Math.pow(corner1[0] - x2, 2) + Math.pow(corner1[1] - y2, 2), Math.pow(corner2[0] - x2, 2) + Math.pow(corner2[1] - y2, 2), Math.pow(corner3[0] - x2, 2) + Math.pow(corner3[1] - y2, 2), Math.pow(corner4[0] - x2, 2) + Math.pow(corner4[1] - y2, 2))) / r2 - 1; + } + nAfter = Math.ceil(nAfter + 0.5); // Add a little more because the stroke can extend outside of the bounding box + nBefore = Math.ceil(nBefore + 0.5); + nTotal = nBefore + 1 + nAfter; // How many times the gradient needs to be repeated to fill the object bounding box + } + + if (this.name === 'linearGradient') { + grad = doc.linearGradient(x1 - nBefore * (x2 - x1), y1 - nBefore * (y2 - y1), x2 + nAfter * (x2 - x1), y2 + nAfter * (y2 - y1)); + } else { + grad = doc.radialGradient(x1, y1, 0, x2, y2, r2 + nAfter * r2); + } + for (var n = 0; n < nTotal; n++) { + var offset = 0, + inOrder = spread !== 'reflect' || (n - nBefore) % 2 === 0; + for (var i = 0; i < children.length; i++) { + var _child = children[inOrder ? i : children.length - 1 - i], + _stopColor = _child.get('stop-color'); + if (_stopColor === 'none') { + _stopColor = DefaultColors.transparent; + } + _stopColor = opacityToColor(_stopColor, _child.get('stop-opacity') * gOpacity, isMask); + offset = Math.max(offset, inOrder ? _child.getPercent('offset', 0) : 1 - _child.getPercent('offset', 0)); + if (i === 0 && _stopColor[0].length === 4) { + grad._colorSpace = 'DeviceCMYK'; + } // Fix until PR #763 is merged into PDFKit + if (i === 0 && offset > 0) { + grad.stop((n + 0) / nTotal, _stopColor[0], _stopColor[1]); + } + grad.stop((n + offset) / (nAfter + nBefore + 1), _stopColor[0], _stopColor[1]); + if (i === children.length - 1 && offset < 1) { + grad.stop((n + 1) / nTotal, _stopColor[0], _stopColor[1]); + } + } + } + grad.setTransform.apply(grad, matrix); + return [grad, 1]; + } else { + return fallback ? [fallback[0], fallback[1] * gOpacity] : undefined; + } + }; + }; + var SvgElemBasicShape = function SvgElemBasicShape(obj, inherits) { + SvgElemStylable.call(this, obj, inherits); + this.dashScale = 1; + this.getBoundingShape = function () { + return this.shape; + }; + this.getTransformation = function () { + return this.get('transform'); + }; + this.drawInDocument = function (isClip, isMask) { + if (this.get('visibility') === 'hidden' || !this.shape) { + return; + } + doc.save(); + this.transform(); + this.clip(); + if (!isClip) { + var masked = this.mask(), + group; + if (masked) { + group = docBeginGroup(getPageBBox()); + } + var subPaths = this.shape.getSubPaths(), + fill = this.getFill(isClip, isMask), + stroke = this.getStroke(isClip, isMask), + lineWidth = this.get('stroke-width'), + lineCap = this.get('stroke-linecap'); + if (fill || stroke) { + if (fill) { + docFillColor(fill); + } + if (stroke) { + for (var j = 0; j < subPaths.length; j++) { + if (isEqual(subPaths[j].totalLength, 0)) { + if ((lineCap === 'square' || lineCap === 'round') && lineWidth > 0) { + if (subPaths[j].startPoint && subPaths[j].startPoint.length > 1) { + var _x4 = subPaths[j].startPoint[0], + _y4 = subPaths[j].startPoint[1]; + docFillColor(stroke); + if (lineCap === 'square') { + doc.rect(_x4 - 0.5 * lineWidth, _y4 - 0.5 * lineWidth, lineWidth, lineWidth); + } else if (lineCap === 'round') { + doc.circle(_x4, _y4, 0.5 * lineWidth); + } + doc.fill(); + } + } + } + } + var dashArray = this.get('stroke-dasharray'), + dashOffset = this.get('stroke-dashoffset'); + if (isNotEqual(this.dashScale, 1)) { + for (var _j2 = 0; _j2 < dashArray.length; _j2++) { + dashArray[_j2] *= this.dashScale; + } + dashOffset *= this.dashScale; + } + docStrokeColor(stroke); + doc.lineWidth(lineWidth).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(lineCap).dash(dashArray, { + phase: dashOffset + }); + } + for (var _j3 = 0; _j3 < subPaths.length; _j3++) { + if (subPaths[_j3].totalLength > 0) { + subPaths[_j3].insertInDocument(); + } + } + if (fill && stroke) { + doc.fillAndStroke(this.get('fill-rule')); + } else if (fill) { + doc.fill(this.get('fill-rule')); + } else if (stroke) { + doc.stroke(); + } + } + var markerStart = this.get('marker-start'), + markerMid = this.get('marker-mid'), + markerEnd = this.get('marker-end'); + if (markerStart !== 'none' || markerMid !== 'none' || markerEnd !== 'none') { + var markersPos = this.shape.getMarkers(); + if (markerStart !== 'none') { + var marker = new SvgElemMarker(markerStart, null); + marker.drawMarker(false, isMask, markersPos[0], lineWidth); + } + if (markerMid !== 'none') { + for (var i = 1; i < markersPos.length - 1; i++) { + var _marker = new SvgElemMarker(markerMid, null); + _marker.drawMarker(false, isMask, markersPos[i], lineWidth); + } + } + if (markerEnd !== 'none') { + var _marker2 = new SvgElemMarker(markerEnd, null); + _marker2.drawMarker(false, isMask, markersPos[markersPos.length - 1], lineWidth); + } + } + if (group) { + docEndGroup(group); + docInsertGroup(group); + } + } else { + this.shape.insertInDocument(); + docFillColor(DefaultColors.white); + doc.fill(this.get('clip-rule')); + } + doc.restore(); + }; + }; + var SvgElemRect = function SvgElemRect(obj, inherits) { + SvgElemBasicShape.call(this, obj, inherits); + var x = this.getLength('x', this.getVWidth(), 0), + y = this.getLength('y', this.getVHeight(), 0), + w = this.getLength('width', this.getVWidth(), 0), + h = this.getLength('height', this.getVHeight(), 0), + rx = this.getLength('rx', this.getVWidth()), + ry = this.getLength('ry', this.getVHeight()); + if (rx === undefined && ry === undefined) { + rx = ry = 0; + } else if (rx === undefined && ry !== undefined) { + rx = ry; + } else if (rx !== undefined && ry === undefined) { + ry = rx; + } + if (w > 0 && h > 0) { + if (rx && ry) { + rx = Math.min(rx, 0.5 * w); + ry = Math.min(ry, 0.5 * h); + this.shape = new SvgShape().M(x + rx, y).L(x + w - rx, y).A(rx, ry, 0, 0, 1, x + w, y + ry).L(x + w, y + h - ry).A(rx, ry, 0, 0, 1, x + w - rx, y + h).L(x + rx, y + h).A(rx, ry, 0, 0, 1, x, y + h - ry).L(x, y + ry).A(rx, ry, 0, 0, 1, x + rx, y).Z(); + } else { + this.shape = new SvgShape().M(x, y).L(x + w, y).L(x + w, y + h).L(x, y + h).Z(); + } + } else { + this.shape = new SvgShape(); + } + }; + var SvgElemCircle = function SvgElemCircle(obj, inherits) { + SvgElemBasicShape.call(this, obj, inherits); + var cx = this.getLength('cx', this.getVWidth(), 0), + cy = this.getLength('cy', this.getVHeight(), 0), + r = this.getLength('r', this.getViewport(), 0); + if (r > 0) { + this.shape = new SvgShape().M(cx + r, cy).A(r, r, 0, 0, 1, cx - r, cy).A(r, r, 0, 0, 1, cx + r, cy).Z(); + } else { + this.shape = new SvgShape(); + } + }; + var SvgElemEllipse = function SvgElemEllipse(obj, inherits) { + SvgElemBasicShape.call(this, obj, inherits); + var cx = this.getLength('cx', this.getVWidth(), 0), + cy = this.getLength('cy', this.getVHeight(), 0), + rx = this.getLength('rx', this.getVWidth(), 0), + ry = this.getLength('ry', this.getVHeight(), 0); + if (rx > 0 && ry > 0) { + this.shape = new SvgShape().M(cx + rx, cy).A(rx, ry, 0, 0, 1, cx - rx, cy).A(rx, ry, 0, 0, 1, cx + rx, cy).Z(); + } else { + this.shape = new SvgShape(); + } + }; + var SvgElemLine = function SvgElemLine(obj, inherits) { + SvgElemBasicShape.call(this, obj, inherits); + var x1 = this.getLength('x1', this.getVWidth(), 0), + y1 = this.getLength('y1', this.getVHeight(), 0), + x2 = this.getLength('x2', this.getVWidth(), 0), + y2 = this.getLength('y2', this.getVHeight(), 0); + this.shape = new SvgShape().M(x1, y1).L(x2, y2); + }; + var SvgElemPolyline = function SvgElemPolyline(obj, inherits) { + SvgElemBasicShape.call(this, obj, inherits); + var points = this.getNumberList('points'); + this.shape = new SvgShape(); + for (var i = 0; i < points.length - 1; i += 2) { + if (i === 0) { + this.shape.M(points[i], points[i + 1]); + } else { + this.shape.L(points[i], points[i + 1]); + } + } + if (points.error) { + warningCallback('SvgElemPolygon: unexpected string ' + points.error); + } + if (points.length % 2 === 1) { + warningCallback('SvgElemPolyline: uneven number of coordinates'); + } + }; + var SvgElemPolygon = function SvgElemPolygon(obj, inherits) { + SvgElemBasicShape.call(this, obj, inherits); + var points = this.getNumberList('points'); + this.shape = new SvgShape(); + for (var i = 0; i < points.length - 1; i += 2) { + if (i === 0) { + this.shape.M(points[i], points[i + 1]); + } else { + this.shape.L(points[i], points[i + 1]); + } + } + this.shape.Z(); + if (points.error) { + warningCallback('SvgElemPolygon: unexpected string ' + points.error); + } + if (points.length % 2 === 1) { + warningCallback('SvgElemPolygon: uneven number of coordinates'); + } + }; + var SvgElemPath = function SvgElemPath(obj, inherits) { + SvgElemBasicShape.call(this, obj, inherits); + this.shape = new SvgShape().path(this.attr('d')); + var pathLength = this.getLength('pathLength', this.getViewport()); + this.pathLength = pathLength > 0 ? pathLength : undefined; + this.dashScale = this.pathLength !== undefined ? this.shape.totalLength / this.pathLength : 1; + }; + var SvgElemMarker = function SvgElemMarker(obj, inherits) { + SvgElemHasChildren.call(this, obj, inherits); + var width = this.getLength('markerWidth', this.getParentVWidth(), 3), + height = this.getLength('markerHeight', this.getParentVHeight(), 3), + viewBox = this.getViewbox('viewBox', [0, 0, width, height]); + this.getVWidth = function () { + return viewBox[2]; + }; + this.getVHeight = function () { + return viewBox[3]; + }; + this.drawMarker = function (isClip, isMask, posArray, strokeWidth) { + doc.save(); + var orient = this.attr('orient'), + units = this.attr('markerUnits'), + rotate = orient === 'auto' ? posArray[2] : (parseFloat(orient) || 0) * Math.PI / 180, + scale = units === 'userSpaceOnUse' ? 1 : strokeWidth; + doc.transform(Math.cos(rotate) * scale, Math.sin(rotate) * scale, -Math.sin(rotate) * scale, Math.cos(rotate) * scale, posArray[0], posArray[1]); + var refX = this.getLength('refX', this.getVWidth(), 0), + refY = this.getLength('refY', this.getVHeight(), 0), + aspectRatioMatrix = parseAspectRatio(this.attr('preserveAspectRatio'), width, height, viewBox[2], viewBox[3], 0.5); + if (this.get('overflow') === 'hidden') { + doc.rect(aspectRatioMatrix[0] * (viewBox[0] + viewBox[2] / 2 - refX) - width / 2, aspectRatioMatrix[3] * (viewBox[1] + viewBox[3] / 2 - refY) - height / 2, width, height).clip(); + } + doc.transform.apply(doc, aspectRatioMatrix); + doc.translate(-refX, -refY); + var group; + if (this.get('opacity') < 1 && !isClip) { + group = docBeginGroup(getPageBBox()); + } + this.drawChildren(isClip, isMask); + if (group) { + docEndGroup(group); + doc.fillOpacity(this.get('opacity')); + docInsertGroup(group); + } + doc.restore(); + }; + }; + var SvgElemClipPath = function SvgElemClipPath(obj, inherits) { + SvgElemHasChildren.call(this, obj, inherits); + this.useMask = function (bBox) { + var group = docBeginGroup(getPageBBox()); + doc.save(); + if (this.attr('clipPathUnits') === 'objectBoundingBox') { + doc.transform(bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]); + } + this.clip(); + this.drawChildren(true, false); + doc.restore(); + docEndGroup(group); + docApplyMask(group, true); + }; + }; + var SvgElemMask = function SvgElemMask(obj, inherits) { + SvgElemHasChildren.call(this, obj, inherits); + this.useMask = function (bBox) { + var group = docBeginGroup(getPageBBox()); + doc.save(); + var x, y, w, h; + if (this.attr('maskUnits') === 'userSpaceOnUse') { + x = this.getLength('x', this.getVWidth(), -0.1 * (bBox[2] - bBox[0]) + bBox[0]); + y = this.getLength('y', this.getVHeight(), -0.1 * (bBox[3] - bBox[1]) + bBox[1]); + w = this.getLength('width', this.getVWidth(), 1.2 * (bBox[2] - bBox[0])); + h = this.getLength('height', this.getVHeight(), 1.2 * (bBox[3] - bBox[1])); + } else { + x = this.getLength('x', this.getVWidth(), -0.1) * (bBox[2] - bBox[0]) + bBox[0]; + y = this.getLength('y', this.getVHeight(), -0.1) * (bBox[3] - bBox[1]) + bBox[1]; + w = this.getLength('width', this.getVWidth(), 1.2) * (bBox[2] - bBox[0]); + h = this.getLength('height', this.getVHeight(), 1.2) * (bBox[3] - bBox[1]); + } + doc.rect(x, y, w, h).clip(); + if (this.attr('maskContentUnits') === 'objectBoundingBox') { + doc.transform(bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]); + } + this.clip(); + this.drawChildren(false, true); + doc.restore(); + docEndGroup(group); + docApplyMask(group, true); + }; + }; + var SvgElemTextContainer = function SvgElemTextContainer(obj, inherits) { + SvgElemStylable.call(this, obj, inherits); + this.allowedChildren = ['tspan', '#text', '#cdata-section', 'a']; + this.isText = true; + this.getBoundingShape = function () { + var shape = new SvgShape(); + for (var i = 0; i < this._pos.length; i++) { + var pos = this._pos[i]; + if (!pos.hidden) { + var dx0 = pos.ascent * Math.sin(pos.rotate), + dy0 = -pos.ascent * Math.cos(pos.rotate), + dx1 = pos.descent * Math.sin(pos.rotate), + dy1 = -pos.descent * Math.cos(pos.rotate), + dx2 = pos.width * Math.cos(pos.rotate), + dy2 = pos.width * Math.sin(pos.rotate); + shape.M(pos.x + dx0, pos.y + dy0).L(pos.x + dx0 + dx2, pos.y + dy0 + dy2).M(pos.x + dx1 + dx2, pos.y + dy1 + dy2).L(pos.x + dx1, pos.y + dy1); + } + } + return shape; + }; + this.drawTextInDocument = function (isClip, isMask) { + if (this.link && !isClip && !isMask) { + this.addLink(); + } + if (this.get('text-decoration') === 'underline') { + this.decorate(0.05 * this._font.size, -0.075 * this._font.size, isClip, isMask); + } + if (this.get('text-decoration') === 'overline') { + this.decorate(0.05 * this._font.size, getAscent(this._font.font, this._font.size) + 0.075 * this._font.size, isClip, isMask); + } + var fill = this.getFill(isClip, isMask), + stroke = this.getStroke(isClip, isMask), + strokeWidth = this.get('stroke-width'); + if (this._font.fauxBold) { + if (!stroke) { + stroke = fill; + strokeWidth = this._font.size * 0.03; + } else { + strokeWidth += this._font.size * 0.03; + } + } + var children = this.getChildren(); + for (var i = 0; i < children.length; i++) { + var childElem = children[i]; + switch (childElem.name) { + case 'tspan': + case 'textPath': + case 'a': + if (childElem.get('display') !== 'none') { + childElem.drawTextInDocument(isClip, isMask); + } + break; + case '#text': + case '#cdata-section': + if (this.get('visibility') === 'hidden') { + continue; + } + if (fill || stroke || isClip) { + if (fill) { + docFillColor(fill); + } + if (stroke && strokeWidth) { + docStrokeColor(stroke); + doc.lineWidth(strokeWidth).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(this.get('stroke-linecap')).dash(this.get('stroke-dasharray'), { + phase: this.get('stroke-dashoffset') + }); + } + docBeginText(this._font.font, this._font.size); + docSetTextMode(!!fill, !!stroke); + for (var j = 0, pos = childElem._pos; j < pos.length; j++) { + if (!pos[j].hidden && isNotEqual(pos[j].width, 0)) { + var cos = Math.cos(pos[j].rotate), + sin = Math.sin(pos[j].rotate), + skew = this._font.fauxItalic ? -0.25 : 0; + docSetTextMatrix(cos * pos[j].scale, sin * pos[j].scale, cos * skew - sin, sin * skew + cos, pos[j].x, pos[j].y); + docWriteGlyph(pos[j].glyph); + } + } + docEndText(); + } + break; + } + } + if (this.get('text-decoration') === 'line-through') { + this.decorate(0.05 * this._font.size, 0.5 * (getAscent(this._font.font, this._font.size) + getDescent(this._font.font, this._font.size)), isClip, isMask); + } + }; + this.decorate = function (lineWidth, linePosition, isClip, isMask) { + var fill = this.getFill(isClip, isMask), + stroke = this.getStroke(isClip, isMask); + if (fill) { + docFillColor(fill); + } + if (stroke) { + docStrokeColor(stroke); + doc.lineWidth(this.get('stroke-width')).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(this.get('stroke-linecap')).dash(this.get('stroke-dasharray'), { + phase: this.get('stroke-dashoffset') + }); + } + for (var j = 0, pos = this._pos; j < pos.length; j++) { + if (!pos[j].hidden && isNotEqual(pos[j].width, 0)) { + var dx0 = (linePosition + lineWidth / 2) * Math.sin(pos[j].rotate), + dy0 = -(linePosition + lineWidth / 2) * Math.cos(pos[j].rotate), + dx1 = (linePosition - lineWidth / 2) * Math.sin(pos[j].rotate), + dy1 = -(linePosition - lineWidth / 2) * Math.cos(pos[j].rotate), + dx2 = pos[j].width * Math.cos(pos[j].rotate), + dy2 = pos[j].width * Math.sin(pos[j].rotate); + new SvgShape().M(pos[j].x + dx0, pos[j].y + dy0).L(pos[j].x + dx0 + dx2, pos[j].y + dy0 + dy2).L(pos[j].x + dx1 + dx2, pos[j].y + dy1 + dy2).L(pos[j].x + dx1, pos[j].y + dy1).Z().insertInDocument(); + if (fill && stroke) { + doc.fillAndStroke(); + } else if (fill) { + doc.fill(); + } else if (stroke) { + doc.stroke(); + } + } + } + }; + }; + var SvgElemTextNode = function SvgElemTextNode(obj, inherits) { + this.name = obj.nodeName; + this.textContent = obj.nodeValue; + }; + var SvgElemTspan = function SvgElemTspan(obj, inherits) { + SvgElemTextContainer.call(this, obj, inherits); + }; + var SvgElemTextPath = function SvgElemTextPath(obj, inherits) { + SvgElemTextContainer.call(this, obj, inherits); + var pathObject, pathLength, temp; + if ((temp = this.attr('path')) && temp.trim() !== '') { + var _pathLength = this.getLength('pathLength', this.getViewport()); + this.pathObject = new SvgShape().path(temp); + this.pathLength = _pathLength > 0 ? _pathLength : this.pathObject.totalLength; + this.pathScale = this.pathObject.totalLength / this.pathLength; + } else if ((temp = this.getUrl('href') || this.getUrl('xlink:href')) && temp.nodeName === 'path') { + var pathElem = new SvgElemPath(temp, this); + this.pathObject = pathElem.shape.clone().transform(pathElem.get('transform')); + this.pathLength = this.chooseValue(pathElem.pathLength, this.pathObject.totalLength); + this.pathScale = this.pathObject.totalLength / this.pathLength; + } + }; + var SvgElemText = function SvgElemText(obj, inherits) { + SvgElemTextContainer.call(this, obj, inherits); + this.allowedChildren = ['textPath', 'tspan', '#text', '#cdata-section', 'a']; + (function (textParentElem) { + var processedText = '', + remainingText = obj.textContent, + textPaths = [], + currentChunk = [], + currentAnchor, + currentDirection, + currentX = 0, + currentY = 0; + function doAnchoring() { + if (currentChunk.length) { + var last = currentChunk[currentChunk.length - 1]; + var first = currentChunk[0]; + var width = last.x + last.width - first.x; + var anchordx = { + 'startltr': 0, + 'middleltr': 0.5, + 'endltr': 1, + 'startrtl': 1, + 'middlertl': 0.5, + 'endrtl': 0 + }[currentAnchor + currentDirection] * width || 0; + for (var i = 0; i < currentChunk.length; i++) { + currentChunk[i].x -= anchordx; + } + } + currentChunk = []; + } + function adjustLength(pos, length, spacingAndGlyphs) { + var firstChar = pos[0], + lastChar = pos[pos.length - 1], + startX = firstChar.x, + endX = lastChar.x + lastChar.width; + if (spacingAndGlyphs) { + var textScale = length / (endX - startX); + if (textScale > 0 && textScale < Infinity) { + for (var j = 0; j < pos.length; j++) { + pos[j].x = startX + textScale * (pos[j].x - startX); + pos[j].scale *= textScale; + pos[j].width *= textScale; + } + } + } else { + if (pos.length >= 2) { + var spaceDiff = (length - (endX - startX)) / (pos.length - 1); + for (var _j4 = 0; _j4 < pos.length; _j4++) { + pos[_j4].x += _j4 * spaceDiff; + } + } + } + currentX += length - (endX - startX); + } + function recursive(currentElem, parentElem) { + currentElem._x = combineArrays(currentElem.getLengthList('x', currentElem.getVWidth()), parentElem ? parentElem._x.slice(parentElem._pos.length) : []); + currentElem._y = combineArrays(currentElem.getLengthList('y', currentElem.getVHeight()), parentElem ? parentElem._y.slice(parentElem._pos.length) : []); + currentElem._dx = combineArrays(currentElem.getLengthList('dx', currentElem.getVWidth()), parentElem ? parentElem._dx.slice(parentElem._pos.length) : []); + currentElem._dy = combineArrays(currentElem.getLengthList('dy', currentElem.getVHeight()), parentElem ? parentElem._dy.slice(parentElem._pos.length) : []); + currentElem._rot = combineArrays(currentElem.getNumberList('rotate'), parentElem ? parentElem._rot.slice(parentElem._pos.length) : []); + currentElem._defRot = currentElem.chooseValue(currentElem._rot[currentElem._rot.length - 1], parentElem && parentElem._defRot, 0); + if (currentElem.name === 'textPath') { + currentElem._y = []; + } + var fontOptions = { + fauxItalic: false, + fauxBold: false + }, + fontNameorLink = fontCallback(currentElem.get('font-family'), currentElem.get('font-weight') === 'bold', currentElem.get('font-style') === 'italic', fontOptions); + try { + doc.font(fontNameorLink); + } catch (e) { + warningCallback('SVGElemText: failed to open font "' + fontNameorLink + '" in PDFKit'); + } + currentElem._pos = []; + currentElem._index = 0; + currentElem._font = { + font: doc._font, + size: currentElem.get('font-size'), + fauxItalic: fontOptions.fauxItalic, + fauxBold: fontOptions.fauxBold + }; + var textLength = currentElem.getLength('textLength', currentElem.getVWidth(), undefined), + spacingAndGlyphs = currentElem.attr('lengthAdjust') === 'spacingAndGlyphs', + wordSpacing = currentElem.get('word-spacing'), + letterSpacing = currentElem.get('letter-spacing'), + textAnchor = currentElem.get('text-anchor'), + textDirection = currentElem.get('direction'), + baseline = getBaseline(currentElem._font.font, currentElem._font.size, currentElem.get('alignment-baseline') || currentElem.get('dominant-baseline'), currentElem.get('baseline-shift')); + if (currentElem.name === 'textPath') { + doAnchoring(); + currentX = currentY = 0; + } + var children = currentElem.getChildren(); + for (var i = 0; i < children.length; i++) { + var childElem = children[i]; + switch (childElem.name) { + case 'tspan': + case 'textPath': + case 'a': + recursive(childElem, currentElem); + break; + case '#text': + case '#cdata-section': + var rawText = childElem.textContent, + renderedText = rawText, + words = void 0; + childElem._font = currentElem._font; + childElem._pos = []; + remainingText = remainingText.substring(rawText.length); + if (currentElem.get('xml:space') === 'preserve') { + renderedText = renderedText.replace(/[\s]/g, ' '); + } else { + renderedText = renderedText.replace(/[\s]+/g, ' '); + if (processedText.match(/[\s]$|^$/)) { + renderedText = renderedText.replace(/^[\s]/, ''); + } + if (remainingText.match(/^[\s]*$/)) { + renderedText = renderedText.replace(/[\s]$/, ''); + } + } + processedText += rawText; + if (wordSpacing === 0) { + words = [renderedText]; + } else { + words = renderedText.split(/(\s)/); + } + for (var w = 0; w < words.length; w++) { + var pos = getTextPos(currentElem._font.font, currentElem._font.size, words[w]); + for (var j = 0; j < pos.length; j++) { + var index = currentElem._index, + xAttr = currentElem._x[index], + yAttr = currentElem._y[index], + dxAttr = currentElem._dx[index], + dyAttr = currentElem._dy[index], + rotAttr = currentElem._rot[index], + continuous = !(w === 0 && j === 0); + if (xAttr !== undefined) { + continuous = false; + doAnchoring(); + currentX = xAttr; + } + if (yAttr !== undefined) { + continuous = false; + doAnchoring(); + currentY = yAttr; + } + if (dxAttr !== undefined) { + continuous = false; + currentX += dxAttr; + } + if (dyAttr !== undefined) { + continuous = false; + currentY += dyAttr; + } + if (rotAttr !== undefined || currentElem._defRot !== 0) { + continuous = false; + } + var position = { + glyph: pos[j].glyph, + rotate: Math.PI / 180 * currentElem.chooseValue(rotAttr, currentElem._defRot), + x: currentX + pos[j].xOffset, + y: currentY + baseline + pos[j].yOffset, + width: pos[j].width, + ascent: getAscent(currentElem._font.font, currentElem._font.size), + descent: getDescent(currentElem._font.font, currentElem._font.size), + scale: 1, + hidden: false, + continuous: continuous + }; + currentChunk.push(position); + childElem._pos.push(position); + currentElem._pos.push(position); + currentElem._index += pos[j].unicode.length; + if (currentChunk.length === 1) { + currentAnchor = textAnchor; + currentDirection = textDirection; + } + currentX += pos[j].xAdvance + letterSpacing; + currentY += pos[j].yAdvance; + } + if (words[w] === ' ') { + currentX += wordSpacing; + } + } + break; + default: + remainingText = remainingText.substring(childElem.textContent.length); + } + } + if (textLength && currentElem._pos.length) { + adjustLength(currentElem._pos, textLength, spacingAndGlyphs); + } + if (currentElem.name === 'textPath' || currentElem.name === 'text') { + doAnchoring(); + } + if (currentElem.name === 'textPath') { + textPaths.push(currentElem); + var pathObject = currentElem.pathObject; + if (pathObject) { + currentX = pathObject.endPoint[0]; + currentY = pathObject.endPoint[1]; + } + } + if (parentElem) { + parentElem._pos = parentElem._pos.concat(currentElem._pos); + parentElem._index += currentElem._index; + } + } + function textOnPath(currentElem) { + var pathObject = currentElem.pathObject, + pathLength = currentElem.pathLength, + pathScale = currentElem.pathScale; + if (pathObject) { + var textOffset = currentElem.getLength('startOffset', pathLength, 0); + for (var j = 0; j < currentElem._pos.length; j++) { + var charMidX = textOffset + currentElem._pos[j].x + 0.5 * currentElem._pos[j].width; + if (charMidX > pathLength || charMidX < 0) { + currentElem._pos[j].hidden = true; + } else { + var pointOnPath = pathObject.getPointAtLength(charMidX * pathScale); + if (isNotEqual(pathScale, 1)) { + currentElem._pos[j].scale *= pathScale; + currentElem._pos[j].width *= pathScale; + } + currentElem._pos[j].x = pointOnPath[0] - 0.5 * currentElem._pos[j].width * Math.cos(pointOnPath[2]) - currentElem._pos[j].y * Math.sin(pointOnPath[2]); + currentElem._pos[j].y = pointOnPath[1] - 0.5 * currentElem._pos[j].width * Math.sin(pointOnPath[2]) + currentElem._pos[j].y * Math.cos(pointOnPath[2]); + currentElem._pos[j].rotate = pointOnPath[2] + currentElem._pos[j].rotate; + currentElem._pos[j].continuous = false; + } + } + } else { + for (var _j5 = 0; _j5 < currentElem._pos.length; _j5++) { + currentElem._pos[_j5].hidden = true; + } + } + } + recursive(textParentElem, null); + for (var i = 0; i < textPaths.length; i++) { + textOnPath(textPaths[i]); + } + })(this); + this.getTransformation = function () { + return this.get('transform'); + }; + this.drawInDocument = function (isClip, isMask) { + doc.save(); + this.transform(); + this.clip(); + var masked = this.mask(), + group; + if (masked) { + group = docBeginGroup(getPageBBox()); + } + this.drawTextInDocument(isClip, isMask); + if (group) { + docEndGroup(group); + docInsertGroup(group); + } + doc.restore(); + }; + }; + options = options || {}; + var pxToPt = options.assumePt ? 1 : 72 / 96, + // 1px = 72/96pt, but only if assumePt is false + viewportWidth = (options.width || doc.page.width) / pxToPt, + viewportHeight = (options.height || doc.page.height) / pxToPt, + preserveAspectRatio = options.preserveAspectRatio || null, + // default to null so that the attr can override if not passed + useCSS = options.useCSS && typeof SVGElement !== 'undefined' && svg instanceof SVGElement && typeof getComputedStyle === 'function', + warningCallback = options.warningCallback, + fontCallback = options.fontCallback, + imageCallback = options.imageCallback, + colorCallback = options.colorCallback, + documentCallback = options.documentCallback, + precision = Math.ceil(Math.max(1, options.precision)) || 3, + groupStack = [], + documentCache = {}, + links = [], + styleRules = []; + if (typeof warningCallback !== 'function') { + warningCallback = function warningCallback(str) { + if (typeof console !== undefined && typeof console.warn === 'function') { + console.warn(str); + } + }; + } + if (typeof fontCallback !== 'function') { + fontCallback = function fontCallback(family, bold, italic, fontOptions) { + // Check if the font is already registered in the document + if (bold && italic) { + if (doc._registeredFonts.hasOwnProperty(family + '-BoldItalic')) { + return family + '-BoldItalic'; + } else if (doc._registeredFonts.hasOwnProperty(family + '-Italic')) { + fontOptions.fauxBold = true; + return family + '-Italic'; + } else if (doc._registeredFonts.hasOwnProperty(family + '-Bold')) { + fontOptions.fauxItalic = true; + return family + '-Bold'; + } else if (doc._registeredFonts.hasOwnProperty(family)) { + fontOptions.fauxBold = true; + fontOptions.fauxItalic = true; + return family; + } + } + if (bold && !italic) { + if (doc._registeredFonts.hasOwnProperty(family + '-Bold')) { + return family + '-Bold'; + } else if (doc._registeredFonts.hasOwnProperty(family)) { + fontOptions.fauxBold = true; + return family; + } + } + if (!bold && italic) { + if (doc._registeredFonts.hasOwnProperty(family + '-Italic')) { + return family + '-Italic'; + } else if (doc._registeredFonts.hasOwnProperty(family)) { + fontOptions.fauxItalic = true; + return family; + } + } + if (!bold && !italic) { + if (doc._registeredFonts.hasOwnProperty(family)) { + return family; + } + } + // Use standard fonts as fallback + if (family.match(/(?:^|,)\s*serif\s*$/)) { + if (bold && italic) { + return 'Times-BoldItalic'; + } + if (bold && !italic) { + return 'Times-Bold'; + } + if (!bold && italic) { + return 'Times-Italic'; + } + if (!bold && !italic) { + return 'Times-Roman'; + } + } else if (family.match(/(?:^|,)\s*monospace\s*$/)) { + if (bold && italic) { + return 'Courier-BoldOblique'; + } + if (bold && !italic) { + return 'Courier-Bold'; + } + if (!bold && italic) { + return 'Courier-Oblique'; + } + if (!bold && !italic) { + return 'Courier'; + } + } else if (family.match(/(?:^|,)\s*sans-serif\s*$/) || true) { + if (bold && italic) { + return 'Helvetica-BoldOblique'; + } + if (bold && !italic) { + return 'Helvetica-Bold'; + } + if (!bold && italic) { + return 'Helvetica-Oblique'; + } + if (!bold && !italic) { + return 'Helvetica'; + } + } + }; + } + if (typeof imageCallback !== 'function') { + imageCallback = function imageCallback(link) { + return link.replace(/\s+/g, ''); + }; + } + if (typeof colorCallback !== 'function') { + colorCallback = null; + } else { + for (var color in DefaultColors) { + var newColor = colorCallback(DefaultColors[color]); + DefaultColors[color][0] = newColor[0]; + DefaultColors[color][1] = newColor[1]; + } + } + if (typeof documentCallback !== 'function') { + documentCallback = null; + } + if (typeof svg === 'string') { + svg = parseXml(svg); + } + if (svg) { + var styles = svg.getElementsByTagName('style'); + for (var i = 0; i < styles.length; i++) { + styleRules = styleRules.concat(parseStyleSheet(styles[i].textContent)); + } + var elem = createSVGElement(svg, null); + if (typeof elem.drawInDocument === 'function') { + if (options.useCSS && !useCSS) { + warningCallback('SVGtoPDF: useCSS option can only be used for SVG *elements* in compatible browsers'); + } + var savedFillColor = doc._fillColor; + doc.save().translate(x || 0, y || 0).scale(pxToPt); + elem.drawInDocument(); + for (var _i8 = 0; _i8 < links.length; _i8++) { + doc.page.annotations.push(links[_i8]); + } + doc.restore(); + doc._fillColor = savedFillColor; + } else { + warningCallback('SVGtoPDF: this element can\'t be rendered directly: ' + svg.nodeName); + } + } else { + warningCallback('SVGtoPDF: the input does not look like a valid SVG'); + } +}; +if ( true && module && typeof module.exports !== 'undefined') { + module.exports = SVGtoPDF; +} + +/***/ }), + +/***/ 9742: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + +exports.byteLength = byteLength +exports.toByteArray = toByteArray +exports.fromByteArray = fromByteArray + +var lookup = [] +var revLookup = [] +var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array + +var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' +for (var i = 0, len = code.length; i < len; ++i) { + lookup[i] = code[i] + revLookup[code.charCodeAt(i)] = i +} + +// Support decoding URL-safe base64 strings, as Node.js does. +// See: https://en.wikipedia.org/wiki/Base64#URL_applications +revLookup['-'.charCodeAt(0)] = 62 +revLookup['_'.charCodeAt(0)] = 63 + +function getLens (b64) { + var len = b64.length + + if (len % 4 > 0) { + throw new Error('Invalid string. Length must be a multiple of 4') + } + + // Trim off extra bytes after placeholder bytes are found + // See: https://github.com/beatgammit/base64-js/issues/42 + var validLen = b64.indexOf('=') + if (validLen === -1) validLen = len + + var placeHoldersLen = validLen === len + ? 0 + : 4 - (validLen % 4) + + return [validLen, placeHoldersLen] +} + +// base64 is 4/3 + up to two characters of the original data +function byteLength (b64) { + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function _byteLength (b64, validLen, placeHoldersLen) { + return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen +} + +function toByteArray (b64) { + var tmp + var lens = getLens(b64) + var validLen = lens[0] + var placeHoldersLen = lens[1] + + var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) + + var curByte = 0 + + // if there are placeholders, only get up to the last complete 4 chars + var len = placeHoldersLen > 0 + ? validLen - 4 + : validLen + + var i + for (i = 0; i < len; i += 4) { + tmp = + (revLookup[b64.charCodeAt(i)] << 18) | + (revLookup[b64.charCodeAt(i + 1)] << 12) | + (revLookup[b64.charCodeAt(i + 2)] << 6) | + revLookup[b64.charCodeAt(i + 3)] + arr[curByte++] = (tmp >> 16) & 0xFF + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 2) { + tmp = + (revLookup[b64.charCodeAt(i)] << 2) | + (revLookup[b64.charCodeAt(i + 1)] >> 4) + arr[curByte++] = tmp & 0xFF + } + + if (placeHoldersLen === 1) { + tmp = + (revLookup[b64.charCodeAt(i)] << 10) | + (revLookup[b64.charCodeAt(i + 1)] << 4) | + (revLookup[b64.charCodeAt(i + 2)] >> 2) + arr[curByte++] = (tmp >> 8) & 0xFF + arr[curByte++] = tmp & 0xFF + } + + return arr +} + +function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + + lookup[num >> 12 & 0x3F] + + lookup[num >> 6 & 0x3F] + + lookup[num & 0x3F] +} + +function encodeChunk (uint8, start, end) { + var tmp + var output = [] + for (var i = start; i < end; i += 3) { + tmp = + ((uint8[i] << 16) & 0xFF0000) + + ((uint8[i + 1] << 8) & 0xFF00) + + (uint8[i + 2] & 0xFF) + output.push(tripletToBase64(tmp)) + } + return output.join('') +} + +function fromByteArray (uint8) { + var tmp + var len = uint8.length + var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes + var parts = [] + var maxChunkLength = 16383 // must be multiple of 3 + + // go through the array every three bytes, we'll deal with trailing stuff later + for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { + parts.push(encodeChunk( + uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) + )) + } + + // pad the end with zeros, but make sure to not forget the extra bytes + if (extraBytes === 1) { + tmp = uint8[len - 1] + parts.push( + lookup[tmp >> 2] + + lookup[(tmp << 4) & 0x3F] + + '==' + ) + } else if (extraBytes === 2) { + tmp = (uint8[len - 2] << 8) + uint8[len - 1] + parts.push( + lookup[tmp >> 10] + + lookup[(tmp >> 4) & 0x3F] + + lookup[(tmp << 2) & 0x3F] + + '=' + ) + } + + return parts.join('') +} + + +/***/ }), + +/***/ 4181: +/***/ (function(module) { + +/* Copyright 2013 Google Inc. All Rights Reserved. + + 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. + + Bit reading helpers +*/ + +var BROTLI_READ_SIZE = 4096; +var BROTLI_IBUF_SIZE = (2 * BROTLI_READ_SIZE + 32); +var BROTLI_IBUF_MASK = (2 * BROTLI_READ_SIZE - 1); + +var kBitMask = new Uint32Array([ + 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, + 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215 +]); + +/* Input byte buffer, consist of a ringbuffer and a "slack" region where */ +/* bytes from the start of the ringbuffer are copied. */ +function BrotliBitReader(input) { + this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE); + this.input_ = input; /* input callback */ + + this.reset(); +} + +BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE; +BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK; + +BrotliBitReader.prototype.reset = function() { + this.buf_ptr_ = 0; /* next input will write here */ + this.val_ = 0; /* pre-fetched bits */ + this.pos_ = 0; /* byte position in stream */ + this.bit_pos_ = 0; /* current bit-reading position in val_ */ + this.bit_end_pos_ = 0; /* bit-reading end position from LSB of val_ */ + this.eos_ = 0; /* input stream is finished */ + + this.readMoreInput(); + for (var i = 0; i < 4; i++) { + this.val_ |= this.buf_[this.pos_] << (8 * i); + ++this.pos_; + } + + return this.bit_end_pos_ > 0; +}; + +/* Fills up the input ringbuffer by calling the input callback. + + Does nothing if there are at least 32 bytes present after current position. + + Returns 0 if either: + - the input callback returned an error, or + - there is no more input and the position is past the end of the stream. + + After encountering the end of the input stream, 32 additional zero bytes are + copied to the ringbuffer, therefore it is safe to call this function after + every 32 bytes of input is read. +*/ +BrotliBitReader.prototype.readMoreInput = function() { + if (this.bit_end_pos_ > 256) { + return; + } else if (this.eos_) { + if (this.bit_pos_ > this.bit_end_pos_) + throw new Error('Unexpected end of input ' + this.bit_pos_ + ' ' + this.bit_end_pos_); + } else { + var dst = this.buf_ptr_; + var bytes_read = this.input_.read(this.buf_, dst, BROTLI_READ_SIZE); + if (bytes_read < 0) { + throw new Error('Unexpected end of input'); + } + + if (bytes_read < BROTLI_READ_SIZE) { + this.eos_ = 1; + /* Store 32 bytes of zero after the stream end. */ + for (var p = 0; p < 32; p++) + this.buf_[dst + bytes_read + p] = 0; + } + + if (dst === 0) { + /* Copy the head of the ringbuffer to the slack region. */ + for (var p = 0; p < 32; p++) + this.buf_[(BROTLI_READ_SIZE << 1) + p] = this.buf_[p]; + + this.buf_ptr_ = BROTLI_READ_SIZE; + } else { + this.buf_ptr_ = 0; + } + + this.bit_end_pos_ += bytes_read << 3; + } +}; + +/* Guarantees that there are at least 24 bits in the buffer. */ +BrotliBitReader.prototype.fillBitWindow = function() { + while (this.bit_pos_ >= 8) { + this.val_ >>>= 8; + this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24; + ++this.pos_; + this.bit_pos_ = this.bit_pos_ - 8 >>> 0; + this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0; + } +}; + +/* Reads the specified number of bits from Read Buffer. */ +BrotliBitReader.prototype.readBits = function(n_bits) { + if (32 - this.bit_pos_ < n_bits) { + this.fillBitWindow(); + } + + var val = ((this.val_ >>> this.bit_pos_) & kBitMask[n_bits]); + this.bit_pos_ += n_bits; + return val; +}; + +module.exports = BrotliBitReader; + + +/***/ }), + +/***/ 7080: +/***/ (function(__unused_webpack_module, exports) { + +/* Copyright 2013 Google Inc. All Rights Reserved. + + 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. + + Lookup table to map the previous two bytes to a context id. + + There are four different context modeling modes defined here: + CONTEXT_LSB6: context id is the least significant 6 bits of the last byte, + CONTEXT_MSB6: context id is the most significant 6 bits of the last byte, + CONTEXT_UTF8: second-order context model tuned for UTF8-encoded text, + CONTEXT_SIGNED: second-order context model tuned for signed integers. + + The context id for the UTF8 context model is calculated as follows. If p1 + and p2 are the previous two bytes, we calcualte the context as + + context = kContextLookup[p1] | kContextLookup[p2 + 256]. + + If the previous two bytes are ASCII characters (i.e. < 128), this will be + equivalent to + + context = 4 * context1(p1) + context2(p2), + + where context1 is based on the previous byte in the following way: + + 0 : non-ASCII control + 1 : \t, \n, \r + 2 : space + 3 : other punctuation + 4 : " ' + 5 : % + 6 : ( < [ { + 7 : ) > ] } + 8 : , ; : + 9 : . + 10 : = + 11 : number + 12 : upper-case vowel + 13 : upper-case consonant + 14 : lower-case vowel + 15 : lower-case consonant + + and context2 is based on the second last byte: + + 0 : control, space + 1 : punctuation + 2 : upper-case letter, number + 3 : lower-case letter + + If the last byte is ASCII, and the second last byte is not (in a valid UTF8 + stream it will be a continuation byte, value between 128 and 191), the + context is the same as if the second last byte was an ASCII control or space. + + If the last byte is a UTF8 lead byte (value >= 192), then the next byte will + be a continuation byte and the context id is 2 or 3 depending on the LSB of + the last byte and to a lesser extent on the second last byte if it is ASCII. + + If the last byte is a UTF8 continuation byte, the second last byte can be: + - continuation byte: the next byte is probably ASCII or lead byte (assuming + 4-byte UTF8 characters are rare) and the context id is 0 or 1. + - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1 + - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3 + + The possible value combinations of the previous two bytes, the range of + context ids and the type of the next byte is summarized in the table below: + + |--------\-----------------------------------------------------------------| + | \ Last byte | + | Second \---------------------------------------------------------------| + | last byte \ ASCII | cont. byte | lead byte | + | \ (0-127) | (128-191) | (192-) | + |=============|===================|=====================|==================| + | ASCII | next: ASCII/lead | not valid | next: cont. | + | (0-127) | context: 4 - 63 | | context: 2 - 3 | + |-------------|-------------------|---------------------|------------------| + | cont. byte | next: ASCII/lead | next: ASCII/lead | next: cont. | + | (128-191) | context: 4 - 63 | context: 0 - 1 | context: 2 - 3 | + |-------------|-------------------|---------------------|------------------| + | lead byte | not valid | next: ASCII/lead | not valid | + | (192-207) | | context: 0 - 1 | | + |-------------|-------------------|---------------------|------------------| + | lead byte | not valid | next: cont. | not valid | + | (208-) | | context: 2 - 3 | | + |-------------|-------------------|---------------------|------------------| + + The context id for the signed context mode is calculated as: + + context = (kContextLookup[512 + p1] << 3) | kContextLookup[512 + p2]. + + For any context modeling modes, the context ids can be calculated by |-ing + together two lookups from one table using context model dependent offsets: + + context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2]. + + where offset1 and offset2 are dependent on the context mode. +*/ + +var CONTEXT_LSB6 = 0; +var CONTEXT_MSB6 = 1; +var CONTEXT_UTF8 = 2; +var CONTEXT_SIGNED = 3; + +/* Common context lookup table for all context modes. */ +exports.lookup = new Uint8Array([ + /* CONTEXT_UTF8, last byte. */ + /* ASCII range. */ + 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 8, 12, 16, 12, 12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12, + 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12, + 12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52, 52, 48, + 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24, 12, 28, 12, 12, + 12, 56, 60, 60, 60, 56, 60, 60, 60, 56, 60, 60, 60, 60, 60, 56, + 60, 60, 60, 60, 60, 56, 60, 60, 60, 60, 60, 24, 12, 28, 12, 0, + /* UTF8 continuation byte range. */ + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, + /* UTF8 lead byte range. */ + 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, 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, + /* CONTEXT_UTF8 second last byte. */ + /* ASCII range. */ + 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 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3, 3, 3, 3, 3, + 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, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, + /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */ + 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56, + /* CONTEXT_LSB6, last byte. */ + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, + 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, + /* CONTEXT_MSB6, last byte. */ + 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, + 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, + 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, + 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, + 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, + 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, + 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, + 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, + 32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35, + 36, 36, 36, 36, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, + 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, + 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47, + 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 51, + 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 55, 55, 55, 55, + 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, + 60, 60, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, + /* CONTEXT_{M,L}SB6, second last byte, */ + 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, 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, +]); + +exports.lookupOffsets = new Uint16Array([ + /* CONTEXT_LSB6 */ + 1024, 1536, + /* CONTEXT_MSB6 */ + 1280, 1536, + /* CONTEXT_UTF8 */ + 0, 256, + /* CONTEXT_SIGNED */ + 768, 512, +]); + + +/***/ }), + +/***/ 6450: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var __webpack_unused_export__; +/* Copyright 2013 Google Inc. All Rights Reserved. + + 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 BrotliInput = (__webpack_require__(6154)/* .BrotliInput */ .g); +var BrotliOutput = (__webpack_require__(6154)/* .BrotliOutput */ .j); +var BrotliBitReader = __webpack_require__(4181); +var BrotliDictionary = __webpack_require__(5139); +var HuffmanCode = (__webpack_require__(966)/* .HuffmanCode */ .h); +var BrotliBuildHuffmanTable = (__webpack_require__(966)/* .BrotliBuildHuffmanTable */ .g); +var Context = __webpack_require__(7080); +var Prefix = __webpack_require__(8435); +var Transform = __webpack_require__(2973); + +var kDefaultCodeLength = 8; +var kCodeLengthRepeatCode = 16; +var kNumLiteralCodes = 256; +var kNumInsertAndCopyCodes = 704; +var kNumBlockLengthCodes = 26; +var kLiteralContextBits = 6; +var kDistanceContextBits = 2; + +var HUFFMAN_TABLE_BITS = 8; +var HUFFMAN_TABLE_MASK = 0xff; +/* Maximum possible Huffman table size for an alphabet size of 704, max code + * length 15 and root table bits 8. */ +var HUFFMAN_MAX_TABLE_SIZE = 1080; + +var CODE_LENGTH_CODES = 18; +var kCodeLengthCodeOrder = new Uint8Array([ + 1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, +]); + +var NUM_DISTANCE_SHORT_CODES = 16; +var kDistanceShortCodeIndexOffset = new Uint8Array([ + 3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 +]); + +var kDistanceShortCodeValueOffset = new Int8Array([ + 0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3 +]); + +var kMaxHuffmanTableSize = new Uint16Array([ + 256, 402, 436, 468, 500, 534, 566, 598, 630, 662, 694, 726, 758, 790, 822, + 854, 886, 920, 952, 984, 1016, 1048, 1080 +]); + +function DecodeWindowBits(br) { + var n; + if (br.readBits(1) === 0) { + return 16; + } + + n = br.readBits(3); + if (n > 0) { + return 17 + n; + } + + n = br.readBits(3); + if (n > 0) { + return 8 + n; + } + + return 17; +} + +/* Decodes a number in the range [0..255], by reading 1 - 11 bits. */ +function DecodeVarLenUint8(br) { + if (br.readBits(1)) { + var nbits = br.readBits(3); + if (nbits === 0) { + return 1; + } else { + return br.readBits(nbits) + (1 << nbits); + } + } + return 0; +} + +function MetaBlockLength() { + this.meta_block_length = 0; + this.input_end = 0; + this.is_uncompressed = 0; + this.is_metadata = false; +} + +function DecodeMetaBlockLength(br) { + var out = new MetaBlockLength; + var size_nibbles; + var size_bytes; + var i; + + out.input_end = br.readBits(1); + if (out.input_end && br.readBits(1)) { + return out; + } + + size_nibbles = br.readBits(2) + 4; + if (size_nibbles === 7) { + out.is_metadata = true; + + if (br.readBits(1) !== 0) + throw new Error('Invalid reserved bit'); + + size_bytes = br.readBits(2); + if (size_bytes === 0) + return out; + + for (i = 0; i < size_bytes; i++) { + var next_byte = br.readBits(8); + if (i + 1 === size_bytes && size_bytes > 1 && next_byte === 0) + throw new Error('Invalid size byte'); + + out.meta_block_length |= next_byte << (i * 8); + } + } else { + for (i = 0; i < size_nibbles; ++i) { + var next_nibble = br.readBits(4); + if (i + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0) + throw new Error('Invalid size nibble'); + + out.meta_block_length |= next_nibble << (i * 4); + } + } + + ++out.meta_block_length; + + if (!out.input_end && !out.is_metadata) { + out.is_uncompressed = br.readBits(1); + } + + return out; +} + +/* Decodes the next Huffman code from bit-stream. */ +function ReadSymbol(table, index, br) { + var start_index = index; + + var nbits; + br.fillBitWindow(); + index += (br.val_ >>> br.bit_pos_) & HUFFMAN_TABLE_MASK; + nbits = table[index].bits - HUFFMAN_TABLE_BITS; + if (nbits > 0) { + br.bit_pos_ += HUFFMAN_TABLE_BITS; + index += table[index].value; + index += (br.val_ >>> br.bit_pos_) & ((1 << nbits) - 1); + } + br.bit_pos_ += table[index].bits; + return table[index].value; +} + +function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) { + var symbol = 0; + var prev_code_len = kDefaultCodeLength; + var repeat = 0; + var repeat_code_len = 0; + var space = 32768; + + var table = []; + for (var i = 0; i < 32; i++) + table.push(new HuffmanCode(0, 0)); + + BrotliBuildHuffmanTable(table, 0, 5, code_length_code_lengths, CODE_LENGTH_CODES); + + while (symbol < num_symbols && space > 0) { + var p = 0; + var code_len; + + br.readMoreInput(); + br.fillBitWindow(); + p += (br.val_ >>> br.bit_pos_) & 31; + br.bit_pos_ += table[p].bits; + code_len = table[p].value & 0xff; + if (code_len < kCodeLengthRepeatCode) { + repeat = 0; + code_lengths[symbol++] = code_len; + if (code_len !== 0) { + prev_code_len = code_len; + space -= 32768 >> code_len; + } + } else { + var extra_bits = code_len - 14; + var old_repeat; + var repeat_delta; + var new_len = 0; + if (code_len === kCodeLengthRepeatCode) { + new_len = prev_code_len; + } + if (repeat_code_len !== new_len) { + repeat = 0; + repeat_code_len = new_len; + } + old_repeat = repeat; + if (repeat > 0) { + repeat -= 2; + repeat <<= extra_bits; + } + repeat += br.readBits(extra_bits) + 3; + repeat_delta = repeat - old_repeat; + if (symbol + repeat_delta > num_symbols) { + throw new Error('[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols'); + } + + for (var x = 0; x < repeat_delta; x++) + code_lengths[symbol + x] = repeat_code_len; + + symbol += repeat_delta; + + if (repeat_code_len !== 0) { + space -= repeat_delta << (15 - repeat_code_len); + } + } + } + if (space !== 0) { + throw new Error("[ReadHuffmanCodeLengths] space = " + space); + } + + for (; symbol < num_symbols; symbol++) + code_lengths[symbol] = 0; +} + +function ReadHuffmanCode(alphabet_size, tables, table, br) { + var table_size = 0; + var simple_code_or_skip; + var code_lengths = new Uint8Array(alphabet_size); + + br.readMoreInput(); + + /* simple_code_or_skip is used as follows: + 1 for simple code; + 0 for no skipping, 2 skips 2 code lengths, 3 skips 3 code lengths */ + simple_code_or_skip = br.readBits(2); + if (simple_code_or_skip === 1) { + /* Read symbols, codes & code lengths directly. */ + var i; + var max_bits_counter = alphabet_size - 1; + var max_bits = 0; + var symbols = new Int32Array(4); + var num_symbols = br.readBits(2) + 1; + while (max_bits_counter) { + max_bits_counter >>= 1; + ++max_bits; + } + + for (i = 0; i < num_symbols; ++i) { + symbols[i] = br.readBits(max_bits) % alphabet_size; + code_lengths[symbols[i]] = 2; + } + code_lengths[symbols[0]] = 1; + switch (num_symbols) { + case 1: + break; + case 3: + if ((symbols[0] === symbols[1]) || + (symbols[0] === symbols[2]) || + (symbols[1] === symbols[2])) { + throw new Error('[ReadHuffmanCode] invalid symbols'); + } + break; + case 2: + if (symbols[0] === symbols[1]) { + throw new Error('[ReadHuffmanCode] invalid symbols'); + } + + code_lengths[symbols[1]] = 1; + break; + case 4: + if ((symbols[0] === symbols[1]) || + (symbols[0] === symbols[2]) || + (symbols[0] === symbols[3]) || + (symbols[1] === symbols[2]) || + (symbols[1] === symbols[3]) || + (symbols[2] === symbols[3])) { + throw new Error('[ReadHuffmanCode] invalid symbols'); + } + + if (br.readBits(1)) { + code_lengths[symbols[2]] = 3; + code_lengths[symbols[3]] = 3; + } else { + code_lengths[symbols[0]] = 2; + } + break; + } + } else { /* Decode Huffman-coded code lengths. */ + var i; + var code_length_code_lengths = new Uint8Array(CODE_LENGTH_CODES); + var space = 32; + var num_codes = 0; + /* Static Huffman code for the code length code lengths */ + var huff = [ + new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2), + new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 1), + new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2), + new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 5) + ]; + for (i = simple_code_or_skip; i < CODE_LENGTH_CODES && space > 0; ++i) { + var code_len_idx = kCodeLengthCodeOrder[i]; + var p = 0; + var v; + br.fillBitWindow(); + p += (br.val_ >>> br.bit_pos_) & 15; + br.bit_pos_ += huff[p].bits; + v = huff[p].value; + code_length_code_lengths[code_len_idx] = v; + if (v !== 0) { + space -= (32 >> v); + ++num_codes; + } + } + + if (!(num_codes === 1 || space === 0)) + throw new Error('[ReadHuffmanCode] invalid num_codes or space'); + + ReadHuffmanCodeLengths(code_length_code_lengths, alphabet_size, code_lengths, br); + } + + table_size = BrotliBuildHuffmanTable(tables, table, HUFFMAN_TABLE_BITS, code_lengths, alphabet_size); + + if (table_size === 0) { + throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: "); + } + + return table_size; +} + +function ReadBlockLength(table, index, br) { + var code; + var nbits; + code = ReadSymbol(table, index, br); + nbits = Prefix.kBlockLengthPrefixCode[code].nbits; + return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits); +} + +function TranslateShortCodes(code, ringbuffer, index) { + var val; + if (code < NUM_DISTANCE_SHORT_CODES) { + index += kDistanceShortCodeIndexOffset[code]; + index &= 3; + val = ringbuffer[index] + kDistanceShortCodeValueOffset[code]; + } else { + val = code - NUM_DISTANCE_SHORT_CODES + 1; + } + return val; +} + +function MoveToFront(v, index) { + var value = v[index]; + var i = index; + for (; i; --i) v[i] = v[i - 1]; + v[0] = value; +} + +function InverseMoveToFrontTransform(v, v_len) { + var mtf = new Uint8Array(256); + var i; + for (i = 0; i < 256; ++i) { + mtf[i] = i; + } + for (i = 0; i < v_len; ++i) { + var index = v[i]; + v[i] = mtf[index]; + if (index) MoveToFront(mtf, index); + } +} + +/* Contains a collection of huffman trees with the same alphabet size. */ +function HuffmanTreeGroup(alphabet_size, num_htrees) { + this.alphabet_size = alphabet_size; + this.num_htrees = num_htrees; + this.codes = new Array(num_htrees + num_htrees * kMaxHuffmanTableSize[(alphabet_size + 31) >>> 5]); + this.htrees = new Uint32Array(num_htrees); +} + +HuffmanTreeGroup.prototype.decode = function(br) { + var i; + var table_size; + var next = 0; + for (i = 0; i < this.num_htrees; ++i) { + this.htrees[i] = next; + table_size = ReadHuffmanCode(this.alphabet_size, this.codes, next, br); + next += table_size; + } +}; + +function DecodeContextMap(context_map_size, br) { + var out = { num_htrees: null, context_map: null }; + var use_rle_for_zeros; + var max_run_length_prefix = 0; + var table; + var i; + + br.readMoreInput(); + var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1; + + var context_map = out.context_map = new Uint8Array(context_map_size); + if (num_htrees <= 1) { + return out; + } + + use_rle_for_zeros = br.readBits(1); + if (use_rle_for_zeros) { + max_run_length_prefix = br.readBits(4) + 1; + } + + table = []; + for (i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++) { + table[i] = new HuffmanCode(0, 0); + } + + ReadHuffmanCode(num_htrees + max_run_length_prefix, table, 0, br); + + for (i = 0; i < context_map_size;) { + var code; + + br.readMoreInput(); + code = ReadSymbol(table, 0, br); + if (code === 0) { + context_map[i] = 0; + ++i; + } else if (code <= max_run_length_prefix) { + var reps = 1 + (1 << code) + br.readBits(code); + while (--reps) { + if (i >= context_map_size) { + throw new Error("[DecodeContextMap] i >= context_map_size"); + } + context_map[i] = 0; + ++i; + } + } else { + context_map[i] = code - max_run_length_prefix; + ++i; + } + } + if (br.readBits(1)) { + InverseMoveToFrontTransform(context_map, context_map_size); + } + + return out; +} + +function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) { + var ringbuffer = tree_type * 2; + var index = tree_type; + var type_code = ReadSymbol(trees, tree_type * HUFFMAN_MAX_TABLE_SIZE, br); + var block_type; + if (type_code === 0) { + block_type = ringbuffers[ringbuffer + (indexes[index] & 1)]; + } else if (type_code === 1) { + block_type = ringbuffers[ringbuffer + ((indexes[index] - 1) & 1)] + 1; + } else { + block_type = type_code - 2; + } + if (block_type >= max_block_type) { + block_type -= max_block_type; + } + block_types[tree_type] = block_type; + ringbuffers[ringbuffer + (indexes[index] & 1)] = block_type; + ++indexes[index]; +} + +function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) { + var rb_size = ringbuffer_mask + 1; + var rb_pos = pos & ringbuffer_mask; + var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK; + var nbytes; + + /* For short lengths copy byte-by-byte */ + if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) { + while (len-- > 0) { + br.readMoreInput(); + ringbuffer[rb_pos++] = br.readBits(8); + if (rb_pos === rb_size) { + output.write(ringbuffer, rb_size); + rb_pos = 0; + } + } + return; + } + + if (br.bit_end_pos_ < 32) { + throw new Error('[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32'); + } + + /* Copy remaining 0-4 bytes from br.val_ to ringbuffer. */ + while (br.bit_pos_ < 32) { + ringbuffer[rb_pos] = (br.val_ >>> br.bit_pos_); + br.bit_pos_ += 8; + ++rb_pos; + --len; + } + + /* Copy remaining bytes from br.buf_ to ringbuffer. */ + nbytes = (br.bit_end_pos_ - br.bit_pos_) >> 3; + if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) { + var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos; + for (var x = 0; x < tail; x++) + ringbuffer[rb_pos + x] = br.buf_[br_pos + x]; + + nbytes -= tail; + rb_pos += tail; + len -= tail; + br_pos = 0; + } + + for (var x = 0; x < nbytes; x++) + ringbuffer[rb_pos + x] = br.buf_[br_pos + x]; + + rb_pos += nbytes; + len -= nbytes; + + /* If we wrote past the logical end of the ringbuffer, copy the tail of the + ringbuffer to its beginning and flush the ringbuffer to the output. */ + if (rb_pos >= rb_size) { + output.write(ringbuffer, rb_size); + rb_pos -= rb_size; + for (var x = 0; x < rb_pos; x++) + ringbuffer[x] = ringbuffer[rb_size + x]; + } + + /* If we have more to copy than the remaining size of the ringbuffer, then we + first fill the ringbuffer from the input and then flush the ringbuffer to + the output */ + while (rb_pos + len >= rb_size) { + nbytes = rb_size - rb_pos; + if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) { + throw new Error('[CopyUncompressedBlockToOutput] not enough bytes'); + } + output.write(ringbuffer, rb_size); + len -= nbytes; + rb_pos = 0; + } + + /* Copy straight from the input onto the ringbuffer. The ringbuffer will be + flushed to the output at a later time. */ + if (br.input_.read(ringbuffer, rb_pos, len) < len) { + throw new Error('[CopyUncompressedBlockToOutput] not enough bytes'); + } + + /* Restore the state of the bit reader. */ + br.reset(); +} + +/* Advances the bit reader position to the next byte boundary and verifies + that any skipped bits are set to zero. */ +function JumpToByteBoundary(br) { + var new_bit_pos = (br.bit_pos_ + 7) & ~7; + var pad_bits = br.readBits(new_bit_pos - br.bit_pos_); + return pad_bits == 0; +} + +function BrotliDecompressedSize(buffer) { + var input = new BrotliInput(buffer); + var br = new BrotliBitReader(input); + DecodeWindowBits(br); + var out = DecodeMetaBlockLength(br); + return out.meta_block_length; +} + +__webpack_unused_export__ = BrotliDecompressedSize; + +function BrotliDecompressBuffer(buffer, output_size) { + var input = new BrotliInput(buffer); + + if (output_size == null) { + output_size = BrotliDecompressedSize(buffer); + } + + var output_buffer = new Uint8Array(output_size); + var output = new BrotliOutput(output_buffer); + + BrotliDecompress(input, output); + + if (output.pos < output.buffer.length) { + output.buffer = output.buffer.subarray(0, output.pos); + } + + return output.buffer; +} + +exports.BrotliDecompressBuffer = BrotliDecompressBuffer; + +function BrotliDecompress(input, output) { + var i; + var pos = 0; + var input_end = 0; + var window_bits = 0; + var max_backward_distance; + var max_distance = 0; + var ringbuffer_size; + var ringbuffer_mask; + var ringbuffer; + var ringbuffer_end; + /* This ring buffer holds a few past copy distances that will be used by */ + /* some special distance codes. */ + var dist_rb = [ 16, 15, 11, 4 ]; + var dist_rb_idx = 0; + /* The previous 2 bytes used for context. */ + var prev_byte1 = 0; + var prev_byte2 = 0; + var hgroup = [new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0)]; + var block_type_trees; + var block_len_trees; + var br; + + /* We need the slack region for the following reasons: + - always doing two 8-byte copies for fast backward copying + - transforms + - flushing the input ringbuffer when decoding uncompressed blocks */ + var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE; + + br = new BrotliBitReader(input); + + /* Decode window size. */ + window_bits = DecodeWindowBits(br); + max_backward_distance = (1 << window_bits) - 16; + + ringbuffer_size = 1 << window_bits; + ringbuffer_mask = ringbuffer_size - 1; + ringbuffer = new Uint8Array(ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength); + ringbuffer_end = ringbuffer_size; + + block_type_trees = []; + block_len_trees = []; + for (var x = 0; x < 3 * HUFFMAN_MAX_TABLE_SIZE; x++) { + block_type_trees[x] = new HuffmanCode(0, 0); + block_len_trees[x] = new HuffmanCode(0, 0); + } + + while (!input_end) { + var meta_block_remaining_len = 0; + var is_uncompressed; + var block_length = [ 1 << 28, 1 << 28, 1 << 28 ]; + var block_type = [ 0 ]; + var num_block_types = [ 1, 1, 1 ]; + var block_type_rb = [ 0, 1, 0, 1, 0, 1 ]; + var block_type_rb_index = [ 0 ]; + var distance_postfix_bits; + var num_direct_distance_codes; + var distance_postfix_mask; + var num_distance_codes; + var context_map = null; + var context_modes = null; + var num_literal_htrees; + var dist_context_map = null; + var num_dist_htrees; + var context_offset = 0; + var context_map_slice = null; + var literal_htree_index = 0; + var dist_context_offset = 0; + var dist_context_map_slice = null; + var dist_htree_index = 0; + var context_lookup_offset1 = 0; + var context_lookup_offset2 = 0; + var context_mode; + var htree_command; + + for (i = 0; i < 3; ++i) { + hgroup[i].codes = null; + hgroup[i].htrees = null; + } + + br.readMoreInput(); + + var _out = DecodeMetaBlockLength(br); + meta_block_remaining_len = _out.meta_block_length; + if (pos + meta_block_remaining_len > output.buffer.length) { + /* We need to grow the output buffer to fit the additional data. */ + var tmp = new Uint8Array( pos + meta_block_remaining_len ); + tmp.set( output.buffer ); + output.buffer = tmp; + } + input_end = _out.input_end; + is_uncompressed = _out.is_uncompressed; + + if (_out.is_metadata) { + JumpToByteBoundary(br); + + for (; meta_block_remaining_len > 0; --meta_block_remaining_len) { + br.readMoreInput(); + /* Read one byte and ignore it. */ + br.readBits(8); + } + + continue; + } + + if (meta_block_remaining_len === 0) { + continue; + } + + if (is_uncompressed) { + br.bit_pos_ = (br.bit_pos_ + 7) & ~7; + CopyUncompressedBlockToOutput(output, meta_block_remaining_len, pos, + ringbuffer, ringbuffer_mask, br); + pos += meta_block_remaining_len; + continue; + } + + for (i = 0; i < 3; ++i) { + num_block_types[i] = DecodeVarLenUint8(br) + 1; + if (num_block_types[i] >= 2) { + ReadHuffmanCode(num_block_types[i] + 2, block_type_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); + ReadHuffmanCode(kNumBlockLengthCodes, block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); + block_length[i] = ReadBlockLength(block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); + block_type_rb_index[i] = 1; + } + } + + br.readMoreInput(); + + distance_postfix_bits = br.readBits(2); + num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits); + distance_postfix_mask = (1 << distance_postfix_bits) - 1; + num_distance_codes = (num_direct_distance_codes + (48 << distance_postfix_bits)); + context_modes = new Uint8Array(num_block_types[0]); + + for (i = 0; i < num_block_types[0]; ++i) { + br.readMoreInput(); + context_modes[i] = (br.readBits(2) << 1); + } + + var _o1 = DecodeContextMap(num_block_types[0] << kLiteralContextBits, br); + num_literal_htrees = _o1.num_htrees; + context_map = _o1.context_map; + + var _o2 = DecodeContextMap(num_block_types[2] << kDistanceContextBits, br); + num_dist_htrees = _o2.num_htrees; + dist_context_map = _o2.context_map; + + hgroup[0] = new HuffmanTreeGroup(kNumLiteralCodes, num_literal_htrees); + hgroup[1] = new HuffmanTreeGroup(kNumInsertAndCopyCodes, num_block_types[1]); + hgroup[2] = new HuffmanTreeGroup(num_distance_codes, num_dist_htrees); + + for (i = 0; i < 3; ++i) { + hgroup[i].decode(br); + } + + context_map_slice = 0; + dist_context_map_slice = 0; + context_mode = context_modes[block_type[0]]; + context_lookup_offset1 = Context.lookupOffsets[context_mode]; + context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; + htree_command = hgroup[1].htrees[0]; + + while (meta_block_remaining_len > 0) { + var cmd_code; + var range_idx; + var insert_code; + var copy_code; + var insert_length; + var copy_length; + var distance_code; + var distance; + var context; + var j; + var copy_dst; + + br.readMoreInput(); + + if (block_length[1] === 0) { + DecodeBlockType(num_block_types[1], + block_type_trees, 1, block_type, block_type_rb, + block_type_rb_index, br); + block_length[1] = ReadBlockLength(block_len_trees, HUFFMAN_MAX_TABLE_SIZE, br); + htree_command = hgroup[1].htrees[block_type[1]]; + } + --block_length[1]; + cmd_code = ReadSymbol(hgroup[1].codes, htree_command, br); + range_idx = cmd_code >> 6; + if (range_idx >= 2) { + range_idx -= 2; + distance_code = -1; + } else { + distance_code = 0; + } + insert_code = Prefix.kInsertRangeLut[range_idx] + ((cmd_code >> 3) & 7); + copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7); + insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + + br.readBits(Prefix.kInsertLengthPrefixCode[insert_code].nbits); + copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + + br.readBits(Prefix.kCopyLengthPrefixCode[copy_code].nbits); + prev_byte1 = ringbuffer[pos-1 & ringbuffer_mask]; + prev_byte2 = ringbuffer[pos-2 & ringbuffer_mask]; + for (j = 0; j < insert_length; ++j) { + br.readMoreInput(); + + if (block_length[0] === 0) { + DecodeBlockType(num_block_types[0], + block_type_trees, 0, block_type, block_type_rb, + block_type_rb_index, br); + block_length[0] = ReadBlockLength(block_len_trees, 0, br); + context_offset = block_type[0] << kLiteralContextBits; + context_map_slice = context_offset; + context_mode = context_modes[block_type[0]]; + context_lookup_offset1 = Context.lookupOffsets[context_mode]; + context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; + } + context = (Context.lookup[context_lookup_offset1 + prev_byte1] | + Context.lookup[context_lookup_offset2 + prev_byte2]); + literal_htree_index = context_map[context_map_slice + context]; + --block_length[0]; + prev_byte2 = prev_byte1; + prev_byte1 = ReadSymbol(hgroup[0].codes, hgroup[0].htrees[literal_htree_index], br); + ringbuffer[pos & ringbuffer_mask] = prev_byte1; + if ((pos & ringbuffer_mask) === ringbuffer_mask) { + output.write(ringbuffer, ringbuffer_size); + } + ++pos; + } + meta_block_remaining_len -= insert_length; + if (meta_block_remaining_len <= 0) break; + + if (distance_code < 0) { + var context; + + br.readMoreInput(); + if (block_length[2] === 0) { + DecodeBlockType(num_block_types[2], + block_type_trees, 2, block_type, block_type_rb, + block_type_rb_index, br); + block_length[2] = ReadBlockLength(block_len_trees, 2 * HUFFMAN_MAX_TABLE_SIZE, br); + dist_context_offset = block_type[2] << kDistanceContextBits; + dist_context_map_slice = dist_context_offset; + } + --block_length[2]; + context = (copy_length > 4 ? 3 : copy_length - 2) & 0xff; + dist_htree_index = dist_context_map[dist_context_map_slice + context]; + distance_code = ReadSymbol(hgroup[2].codes, hgroup[2].htrees[dist_htree_index], br); + if (distance_code >= num_direct_distance_codes) { + var nbits; + var postfix; + var offset; + distance_code -= num_direct_distance_codes; + postfix = distance_code & distance_postfix_mask; + distance_code >>= distance_postfix_bits; + nbits = (distance_code >> 1) + 1; + offset = ((2 + (distance_code & 1)) << nbits) - 4; + distance_code = num_direct_distance_codes + + ((offset + br.readBits(nbits)) << + distance_postfix_bits) + postfix; + } + } + + /* Convert the distance code to the actual distance by possibly looking */ + /* up past distnaces from the ringbuffer. */ + distance = TranslateShortCodes(distance_code, dist_rb, dist_rb_idx); + if (distance < 0) { + throw new Error('[BrotliDecompress] invalid distance'); + } + + if (pos < max_backward_distance && + max_distance !== max_backward_distance) { + max_distance = pos; + } else { + max_distance = max_backward_distance; + } + + copy_dst = pos & ringbuffer_mask; + + if (distance > max_distance) { + if (copy_length >= BrotliDictionary.minDictionaryWordLength && + copy_length <= BrotliDictionary.maxDictionaryWordLength) { + var offset = BrotliDictionary.offsetsByLength[copy_length]; + var word_id = distance - max_distance - 1; + var shift = BrotliDictionary.sizeBitsByLength[copy_length]; + var mask = (1 << shift) - 1; + var word_idx = word_id & mask; + var transform_idx = word_id >> shift; + offset += word_idx * copy_length; + if (transform_idx < Transform.kNumTransforms) { + var len = Transform.transformDictionaryWord(ringbuffer, copy_dst, offset, copy_length, transform_idx); + copy_dst += len; + pos += len; + meta_block_remaining_len -= len; + if (copy_dst >= ringbuffer_end) { + output.write(ringbuffer, ringbuffer_size); + + for (var _x = 0; _x < (copy_dst - ringbuffer_end); _x++) + ringbuffer[_x] = ringbuffer[ringbuffer_end + _x]; + } + } else { + throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); + } + } else { + throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); + } + } else { + if (distance_code > 0) { + dist_rb[dist_rb_idx & 3] = distance; + ++dist_rb_idx; + } + + if (copy_length > meta_block_remaining_len) { + throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); + } + + for (j = 0; j < copy_length; ++j) { + ringbuffer[pos & ringbuffer_mask] = ringbuffer[(pos - distance) & ringbuffer_mask]; + if ((pos & ringbuffer_mask) === ringbuffer_mask) { + output.write(ringbuffer, ringbuffer_size); + } + ++pos; + --meta_block_remaining_len; + } + } + + /* When we get here, we must have inserted at least one literal and */ + /* made a copy of at least length two, therefore accessing the last 2 */ + /* bytes is valid. */ + prev_byte1 = ringbuffer[(pos - 1) & ringbuffer_mask]; + prev_byte2 = ringbuffer[(pos - 2) & ringbuffer_mask]; + } + + /* Protect pos from overflow, wrap it around at every GB of input data */ + pos &= 0x3fffffff; + } + + output.write(ringbuffer, pos & ringbuffer_mask); +} + +__webpack_unused_export__ = BrotliDecompress; + +BrotliDictionary.init(); + + +/***/ }), + +/***/ 5340: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var base64 = __webpack_require__(9742); + +/** + * The normal dictionary-data.js is quite large, which makes it + * unsuitable for browser usage. In order to make it smaller, + * we read dictionary.bin, which is a compressed version of + * the dictionary, and on initial load, Brotli decompresses + * it's own dictionary. 😜 + */ +exports.init = function() { + var BrotliDecompressBuffer = (__webpack_require__(6450).BrotliDecompressBuffer); + var compressed = base64.toByteArray(__webpack_require__(2722)); + return BrotliDecompressBuffer(compressed); +}; + + +/***/ }), + +/***/ 2722: +/***/ (function(module) { + +module.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERYRY0hStJoMjNeTsNX7bn+Y7e4EQ3bf8xBc7L0BsyfFPK43dGSXpL6clYC/I328h54/VYrQ5i0648FgbGtl837svJ35L3Mot/+nPlNpWgKx1gGXQYqX6n+bbZ7wuyCHKcUok12Xjqub7NXZGzqBx0SD+uziNf87t7ve42jxSKQoW3nyxVrWIGlFShhCKxjpZZ5MeGna0+lBkk+kaN8F9qFBAFgEogyMBdcX/T1W/WnMOi/7ycWUQloEBKGeC48MkiwqJkJO+12eQiOFHMmck6q/IjWW3RZlany23TBm+cNr/84/oi5GGmGBZWrZ6j+zykVozz5fT/QH/Da6WTbZYYPynVNO7kxzuNN2kxKKWche5WveitPKAecB8YcAHz/+zXLjcLzkdDSktNIDwZE9J9X+tto43oJy65wApM3mDzYtCwX9lM+N5VR3kXYo0Z3t0TtXfgBFg7gU8oN0Dgl7fZlUbhNll+0uuohRVKjrEd8egrSndy5/Tgd2gqjA4CAVuC7ESUmL3DZoGnfhQV8uwnpi8EGvAVVsowNRxPudck7+oqAUDkwZopWqFnW1riss0t1z6iCISVKreYGNvQcXv+1L9+jbP8cd/dPUiqBso2q+7ZyFBvENCkkVr44iyPbtOoOoCecWsiuqMSML5lv+vN5MzUr+Dnh73G7Q1YnRYJVYXHRJaNAOByiaK6Cus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DAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="; + + +/***/ }), + +/***/ 5139: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/* Copyright 2013 Google Inc. All Rights Reserved. + + 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. + + Collection of static dictionary words. +*/ + +var data = __webpack_require__(5340); +exports.init = function() { + exports.dictionary = data.init(); +}; + +exports.offsetsByLength = new Uint32Array([ + 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, + 53248, 63488, 74752, 87040, 93696, 100864, 104704, 106752, 108928, 113536, + 115968, 118528, 119872, 121280, 122016, +]); + +exports.sizeBitsByLength = new Uint8Array([ + 0, 0, 0, 0, 10, 10, 11, 11, 10, 10, + 10, 10, 10, 9, 9, 8, 7, 7, 8, 7, + 7, 6, 6, 5, 5, +]); + +exports.minDictionaryWordLength = 4; +exports.maxDictionaryWordLength = 24; + + +/***/ }), + +/***/ 966: +/***/ (function(__unused_webpack_module, exports) { + +function HuffmanCode(bits, value) { + this.bits = bits; /* number of bits used for this symbol */ + this.value = value; /* symbol value or table offset */ +} + +exports.h = HuffmanCode; + +var MAX_LENGTH = 15; + +/* Returns reverse(reverse(key, len) + 1, len), where reverse(key, len) is the + bit-wise reversal of the len least significant bits of key. */ +function GetNextKey(key, len) { + var step = 1 << (len - 1); + while (key & step) { + step >>= 1; + } + return (key & (step - 1)) + step; +} + +/* Stores code in table[0], table[step], table[2*step], ..., table[end] */ +/* Assumes that end is an integer multiple of step */ +function ReplicateValue(table, i, step, end, code) { + do { + end -= step; + table[i + end] = new HuffmanCode(code.bits, code.value); + } while (end > 0); +} + +/* Returns the table width of the next 2nd level table. count is the histogram + of bit lengths for the remaining symbols, len is the code length of the next + processed symbol */ +function NextTableBitSize(count, len, root_bits) { + var left = 1 << (len - root_bits); + while (len < MAX_LENGTH) { + left -= count[len]; + if (left <= 0) break; + ++len; + left <<= 1; + } + return len - root_bits; +} + +exports.g = function(root_table, table, root_bits, code_lengths, code_lengths_size) { + var start_table = table; + var code; /* current table entry */ + var len; /* current code length */ + var symbol; /* symbol index in original or sorted table */ + var key; /* reversed prefix code */ + var step; /* step size to replicate values in current table */ + var low; /* low bits for current root entry */ + var mask; /* mask for low bits */ + var table_bits; /* key length of current table */ + var table_size; /* size of current table */ + var total_size; /* sum of root table size and 2nd level table sizes */ + var sorted; /* symbols sorted by code length */ + var count = new Int32Array(MAX_LENGTH + 1); /* number of codes of each length */ + var offset = new Int32Array(MAX_LENGTH + 1); /* offsets in sorted table for each length */ + + sorted = new Int32Array(code_lengths_size); + + /* build histogram of code lengths */ + for (symbol = 0; symbol < code_lengths_size; symbol++) { + count[code_lengths[symbol]]++; + } + + /* generate offsets into sorted symbol table by code length */ + offset[1] = 0; + for (len = 1; len < MAX_LENGTH; len++) { + offset[len + 1] = offset[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (symbol = 0; symbol < code_lengths_size; symbol++) { + if (code_lengths[symbol] !== 0) { + sorted[offset[code_lengths[symbol]]++] = symbol; + } + } + + table_bits = root_bits; + table_size = 1 << table_bits; + total_size = table_size; + + /* special case code with only one value */ + if (offset[MAX_LENGTH] === 1) { + for (key = 0; key < total_size; ++key) { + root_table[table + key] = new HuffmanCode(0, sorted[0] & 0xffff); + } + + return total_size; + } + + /* fill in root table */ + key = 0; + symbol = 0; + for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) { + for (; count[len] > 0; --count[len]) { + code = new HuffmanCode(len & 0xff, sorted[symbol++] & 0xffff); + ReplicateValue(root_table, table + key, step, table_size, code); + key = GetNextKey(key, len); + } + } + + /* fill in 2nd level tables and add pointers to root table */ + mask = total_size - 1; + low = -1; + for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) { + for (; count[len] > 0; --count[len]) { + if ((key & mask) !== low) { + table += table_size; + table_bits = NextTableBitSize(count, len, root_bits); + table_size = 1 << table_bits; + total_size += table_size; + low = key & mask; + root_table[start_table + low] = new HuffmanCode((table_bits + root_bits) & 0xff, ((table - start_table) - low) & 0xffff); + } + code = new HuffmanCode((len - root_bits) & 0xff, sorted[symbol++] & 0xffff); + ReplicateValue(root_table, table + (key >> root_bits), step, table_size, code); + key = GetNextKey(key, len); + } + } + + return total_size; +} + + +/***/ }), + +/***/ 8435: +/***/ (function(__unused_webpack_module, exports) { + +/* Copyright 2013 Google Inc. All Rights Reserved. + + 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. + + Lookup tables to map prefix codes to value ranges. This is used during + decoding of the block lengths, literal insertion lengths and copy lengths. +*/ + +/* Represents the range of values belonging to a prefix code: */ +/* [offset, offset + 2^nbits) */ +function PrefixCodeRange(offset, nbits) { + this.offset = offset; + this.nbits = nbits; +} + +exports.kBlockLengthPrefixCode = [ + new PrefixCodeRange(1, 2), new PrefixCodeRange(5, 2), new PrefixCodeRange(9, 2), new PrefixCodeRange(13, 2), + new PrefixCodeRange(17, 3), new PrefixCodeRange(25, 3), new PrefixCodeRange(33, 3), new PrefixCodeRange(41, 3), + new PrefixCodeRange(49, 4), new PrefixCodeRange(65, 4), new PrefixCodeRange(81, 4), new PrefixCodeRange(97, 4), + new PrefixCodeRange(113, 5), new PrefixCodeRange(145, 5), new PrefixCodeRange(177, 5), new PrefixCodeRange(209, 5), + new PrefixCodeRange(241, 6), new PrefixCodeRange(305, 6), new PrefixCodeRange(369, 7), new PrefixCodeRange(497, 8), + new PrefixCodeRange(753, 9), new PrefixCodeRange(1265, 10), new PrefixCodeRange(2289, 11), new PrefixCodeRange(4337, 12), + new PrefixCodeRange(8433, 13), new PrefixCodeRange(16625, 24) +]; + +exports.kInsertLengthPrefixCode = [ + new PrefixCodeRange(0, 0), new PrefixCodeRange(1, 0), new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0), + new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0), new PrefixCodeRange(6, 1), new PrefixCodeRange(8, 1), + new PrefixCodeRange(10, 2), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 3), new PrefixCodeRange(26, 3), + new PrefixCodeRange(34, 4), new PrefixCodeRange(50, 4), new PrefixCodeRange(66, 5), new PrefixCodeRange(98, 5), + new PrefixCodeRange(130, 6), new PrefixCodeRange(194, 7), new PrefixCodeRange(322, 8), new PrefixCodeRange(578, 9), + new PrefixCodeRange(1090, 10), new PrefixCodeRange(2114, 12), new PrefixCodeRange(6210, 14), new PrefixCodeRange(22594, 24), +]; + +exports.kCopyLengthPrefixCode = [ + new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0), new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0), + new PrefixCodeRange(6, 0), new PrefixCodeRange(7, 0), new PrefixCodeRange(8, 0), new PrefixCodeRange(9, 0), + new PrefixCodeRange(10, 1), new PrefixCodeRange(12, 1), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 2), + new PrefixCodeRange(22, 3), new PrefixCodeRange(30, 3), new PrefixCodeRange(38, 4), new PrefixCodeRange(54, 4), + new PrefixCodeRange(70, 5), new PrefixCodeRange(102, 5), new PrefixCodeRange(134, 6), new PrefixCodeRange(198, 7), + new PrefixCodeRange(326, 8), new PrefixCodeRange(582, 9), new PrefixCodeRange(1094, 10), new PrefixCodeRange(2118, 24), +]; + +exports.kInsertRangeLut = [ + 0, 0, 8, 8, 0, 16, 8, 16, 16, +]; + +exports.kCopyRangeLut = [ + 0, 8, 0, 8, 16, 0, 16, 8, 16, +]; + + +/***/ }), + +/***/ 6154: +/***/ (function(__unused_webpack_module, exports) { + +function BrotliInput(buffer) { + this.buffer = buffer; + this.pos = 0; +} + +BrotliInput.prototype.read = function(buf, i, count) { + if (this.pos + count > this.buffer.length) { + count = this.buffer.length - this.pos; + } + + for (var p = 0; p < count; p++) + buf[i + p] = this.buffer[this.pos + p]; + + this.pos += count; + return count; +} + +exports.g = BrotliInput; + +function BrotliOutput(buf) { + this.buffer = buf; + this.pos = 0; +} + +BrotliOutput.prototype.write = function(buf, count) { + if (this.pos + count > this.buffer.length) + throw new Error('Output buffer is not large enough'); + + this.buffer.set(buf.subarray(0, count), this.pos); + this.pos += count; + return count; +}; + +exports.j = BrotliOutput; + + +/***/ }), + +/***/ 2973: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/* Copyright 2013 Google Inc. All Rights Reserved. + + 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. + + Transformations on dictionary words. +*/ + +var BrotliDictionary = __webpack_require__(5139); + +var kIdentity = 0; +var kOmitLast1 = 1; +var kOmitLast2 = 2; +var kOmitLast3 = 3; +var kOmitLast4 = 4; +var kOmitLast5 = 5; +var kOmitLast6 = 6; +var kOmitLast7 = 7; +var kOmitLast8 = 8; +var kOmitLast9 = 9; +var kUppercaseFirst = 10; +var kUppercaseAll = 11; +var kOmitFirst1 = 12; +var kOmitFirst2 = 13; +var kOmitFirst3 = 14; +var kOmitFirst4 = 15; +var kOmitFirst5 = 16; +var kOmitFirst6 = 17; +var kOmitFirst7 = 18; +var kOmitFirst8 = 19; +var kOmitFirst9 = 20; + +function Transform(prefix, transform, suffix) { + this.prefix = new Uint8Array(prefix.length); + this.transform = transform; + this.suffix = new Uint8Array(suffix.length); + + for (var i = 0; i < prefix.length; i++) + this.prefix[i] = prefix.charCodeAt(i); + + for (var i = 0; i < suffix.length; i++) + this.suffix[i] = suffix.charCodeAt(i); +} + +var kTransforms = [ + new Transform( "", kIdentity, "" ), + new Transform( "", kIdentity, " " ), + new Transform( " ", kIdentity, " " ), + new Transform( "", kOmitFirst1, "" ), + new Transform( "", kUppercaseFirst, " " ), + new Transform( "", kIdentity, " the " ), + new Transform( " ", kIdentity, "" ), + new Transform( "s ", kIdentity, " " ), + new Transform( "", kIdentity, " of " ), + new Transform( "", kUppercaseFirst, "" ), + new Transform( "", kIdentity, " and " ), + new Transform( "", kOmitFirst2, "" ), + new Transform( "", kOmitLast1, "" ), + new Transform( ", ", kIdentity, " " ), + new Transform( "", kIdentity, ", " ), + new Transform( " ", kUppercaseFirst, " " ), + new Transform( "", kIdentity, " in " ), + new Transform( "", kIdentity, " to " ), + new Transform( "e ", kIdentity, " " ), + new Transform( "", kIdentity, "\"" ), + new Transform( "", kIdentity, "." ), + new Transform( "", kIdentity, "\">" ), + new Transform( "", kIdentity, "\n" ), + new Transform( "", kOmitLast3, "" ), + new Transform( "", kIdentity, "]" ), + new Transform( "", kIdentity, " for " ), + new Transform( "", kOmitFirst3, "" ), + new Transform( "", kOmitLast2, "" ), + new Transform( "", kIdentity, " a " ), + new Transform( "", kIdentity, " that " ), + new Transform( " ", kUppercaseFirst, "" ), + new Transform( "", kIdentity, ". " ), + new Transform( ".", kIdentity, "" ), + new Transform( " ", kIdentity, ", " ), + new Transform( "", kOmitFirst4, "" ), + new Transform( "", kIdentity, " with " ), + new Transform( "", kIdentity, "'" ), + new Transform( "", kIdentity, " from " ), + new Transform( "", kIdentity, " by " ), + new Transform( "", kOmitFirst5, "" ), + new Transform( "", kOmitFirst6, "" ), + new Transform( " the ", kIdentity, "" ), + new Transform( "", kOmitLast4, "" ), + new Transform( "", kIdentity, ". The " ), + new Transform( "", kUppercaseAll, "" ), + new Transform( "", kIdentity, " on " ), + new Transform( "", kIdentity, " as " ), + new Transform( "", kIdentity, " is " ), + new Transform( "", kOmitLast7, "" ), + new Transform( "", kOmitLast1, "ing " ), + new Transform( "", kIdentity, "\n\t" ), + new Transform( "", kIdentity, ":" ), + new Transform( " ", kIdentity, ". " ), + new Transform( "", kIdentity, "ed " ), + new Transform( "", kOmitFirst9, "" ), + new Transform( "", kOmitFirst7, "" ), + new Transform( "", kOmitLast6, "" ), + new Transform( "", kIdentity, "(" ), + new Transform( "", kUppercaseFirst, ", " ), + new Transform( "", kOmitLast8, "" ), + new Transform( "", kIdentity, " at " ), + new Transform( "", kIdentity, "ly " ), + new Transform( " the ", kIdentity, " of " ), + new Transform( "", kOmitLast5, "" ), + new Transform( "", kOmitLast9, "" ), + new Transform( " ", kUppercaseFirst, ", " ), + new Transform( "", kUppercaseFirst, "\"" ), + new Transform( ".", kIdentity, "(" ), + new Transform( "", kUppercaseAll, " " ), + new Transform( "", kUppercaseFirst, "\">" ), + new Transform( "", kIdentity, "=\"" ), + new Transform( " ", kIdentity, "." ), + new Transform( ".com/", kIdentity, "" ), + new Transform( " the ", kIdentity, " of the " ), + new Transform( "", kUppercaseFirst, "'" ), + new Transform( "", kIdentity, ". This " ), + new Transform( "", kIdentity, "," ), + new Transform( ".", kIdentity, " " ), + new Transform( "", kUppercaseFirst, "(" ), + new Transform( "", kUppercaseFirst, "." ), + new Transform( "", kIdentity, " not " ), + new Transform( " ", kIdentity, "=\"" ), + new Transform( "", kIdentity, "er " ), + new Transform( " ", kUppercaseAll, " " ), + new Transform( "", kIdentity, "al " ), + new Transform( " ", kUppercaseAll, "" ), + new Transform( "", kIdentity, "='" ), + new Transform( "", kUppercaseAll, "\"" ), + new Transform( "", kUppercaseFirst, ". " ), + new Transform( " ", kIdentity, "(" ), + new Transform( "", kIdentity, "ful " ), + new Transform( " ", kUppercaseFirst, ". " ), + new Transform( "", kIdentity, "ive " ), + new Transform( "", kIdentity, "less " ), + new Transform( "", kUppercaseAll, "'" ), + new Transform( "", kIdentity, "est " ), + new Transform( " ", kUppercaseFirst, "." ), + new Transform( "", kUppercaseAll, "\">" ), + new Transform( " ", kIdentity, "='" ), + new Transform( "", kUppercaseFirst, "," ), + new Transform( "", kIdentity, "ize " ), + new Transform( "", kUppercaseAll, "." ), + new Transform( "\xc2\xa0", kIdentity, "" ), + new Transform( " ", kIdentity, "," ), + new Transform( "", kUppercaseFirst, "=\"" ), + new Transform( "", kUppercaseAll, "=\"" ), + new Transform( "", kIdentity, "ous " ), + new Transform( "", kUppercaseAll, ", " ), + new Transform( "", kUppercaseFirst, "='" ), + new Transform( " ", kUppercaseFirst, "," ), + new Transform( " ", kUppercaseAll, "=\"" ), + new Transform( " ", kUppercaseAll, ", " ), + new Transform( "", kUppercaseAll, "," ), + new Transform( "", kUppercaseAll, "(" ), + new Transform( "", kUppercaseAll, ". " ), + new Transform( " ", kUppercaseAll, "." ), + new Transform( "", kUppercaseAll, "='" ), + new Transform( " ", kUppercaseAll, ". " ), + new Transform( " ", kUppercaseFirst, "=\"" ), + new Transform( " ", kUppercaseAll, "='" ), + new Transform( " ", kUppercaseFirst, "='" ) +]; + +exports.kTransforms = kTransforms; +exports.kNumTransforms = kTransforms.length; + +function ToUpperCase(p, i) { + if (p[i] < 0xc0) { + if (p[i] >= 97 && p[i] <= 122) { + p[i] ^= 32; + } + return 1; + } + + /* An overly simplified uppercasing model for utf-8. */ + if (p[i] < 0xe0) { + p[i + 1] ^= 32; + return 2; + } + + /* An arbitrary transform for three byte characters. */ + p[i + 2] ^= 5; + return 3; +} + +exports.transformDictionaryWord = function(dst, idx, word, len, transform) { + var prefix = kTransforms[transform].prefix; + var suffix = kTransforms[transform].suffix; + var t = kTransforms[transform].transform; + var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1); + var i = 0; + var start_idx = idx; + var uppercase; + + if (skip > len) { + skip = len; + } + + var prefix_pos = 0; + while (prefix_pos < prefix.length) { + dst[idx++] = prefix[prefix_pos++]; + } + + word += skip; + len -= skip; + + if (t <= kOmitLast9) { + len -= t; + } + + for (i = 0; i < len; i++) { + dst[idx++] = BrotliDictionary.dictionary[word + i]; + } + + uppercase = idx - len; + + if (t === kUppercaseFirst) { + ToUpperCase(dst, uppercase); + } else if (t === kUppercaseAll) { + while (len > 0) { + var step = ToUpperCase(dst, uppercase); + uppercase += step; + len -= step; + } + } + + var suffix_pos = 0; + while (suffix_pos < suffix.length) { + dst[idx++] = suffix[suffix_pos++]; + } + + return idx - start_idx; +} + + +/***/ }), + +/***/ 7709: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +module.exports = __webpack_require__(6450).BrotliDecompressBuffer; + + +/***/ }), + +/***/ 4505: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; +/* provided dependency */ var process = __webpack_require__(4155); + +/* eslint camelcase: "off" */ + +var assert = __webpack_require__(9282); + +var Zstream = __webpack_require__(2292); +var zlib_deflate = __webpack_require__(405); +var zlib_inflate = __webpack_require__(7948); +var constants = __webpack_require__(1619); + +for (var key in constants) { + exports[key] = constants[key]; +} + +// zlib modes +exports.NONE = 0; +exports.DEFLATE = 1; +exports.INFLATE = 2; +exports.GZIP = 3; +exports.GUNZIP = 4; +exports.DEFLATERAW = 5; +exports.INFLATERAW = 6; +exports.UNZIP = 7; + +var GZIP_HEADER_ID1 = 0x1f; +var GZIP_HEADER_ID2 = 0x8b; + +/** + * Emulate Node's zlib C++ layer for use by the JS layer in index.js + */ +function Zlib(mode) { + if (typeof mode !== 'number' || mode < exports.DEFLATE || mode > exports.UNZIP) { + throw new TypeError('Bad argument'); + } + + this.dictionary = null; + this.err = 0; + this.flush = 0; + this.init_done = false; + this.level = 0; + this.memLevel = 0; + this.mode = mode; + this.strategy = 0; + this.windowBits = 0; + this.write_in_progress = false; + this.pending_close = false; + this.gzip_id_bytes_read = 0; +} + +Zlib.prototype.close = function () { + if (this.write_in_progress) { + this.pending_close = true; + return; + } + + this.pending_close = false; + + assert(this.init_done, 'close before init'); + assert(this.mode <= exports.UNZIP); + + if (this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW) { + zlib_deflate.deflateEnd(this.strm); + } else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP) { + zlib_inflate.inflateEnd(this.strm); + } + + this.mode = exports.NONE; + + this.dictionary = null; +}; + +Zlib.prototype.write = function (flush, input, in_off, in_len, out, out_off, out_len) { + return this._write(true, flush, input, in_off, in_len, out, out_off, out_len); +}; + +Zlib.prototype.writeSync = function (flush, input, in_off, in_len, out, out_off, out_len) { + return this._write(false, flush, input, in_off, in_len, out, out_off, out_len); +}; + +Zlib.prototype._write = function (async, flush, input, in_off, in_len, out, out_off, out_len) { + assert.equal(arguments.length, 8); + + assert(this.init_done, 'write before init'); + assert(this.mode !== exports.NONE, 'already finalized'); + assert.equal(false, this.write_in_progress, 'write already in progress'); + assert.equal(false, this.pending_close, 'close is pending'); + + this.write_in_progress = true; + + assert.equal(false, flush === undefined, 'must provide flush value'); + + this.write_in_progress = true; + + if (flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK) { + throw new Error('Invalid flush value'); + } + + if (input == null) { + input = Buffer.alloc(0); + in_len = 0; + in_off = 0; + } + + this.strm.avail_in = in_len; + this.strm.input = input; + this.strm.next_in = in_off; + this.strm.avail_out = out_len; + this.strm.output = out; + this.strm.next_out = out_off; + this.flush = flush; + + if (!async) { + // sync version + this._process(); + + if (this._checkError()) { + return this._afterSync(); + } + return; + } + + // async version + var self = this; + process.nextTick(function () { + self._process(); + self._after(); + }); + + return this; +}; + +Zlib.prototype._afterSync = function () { + var avail_out = this.strm.avail_out; + var avail_in = this.strm.avail_in; + + this.write_in_progress = false; + + return [avail_in, avail_out]; +}; + +Zlib.prototype._process = function () { + var next_expected_header_byte = null; + + // If the avail_out is left at 0, then it means that it ran out + // of room. If there was avail_out left over, then it means + // that all of the input was consumed. + switch (this.mode) { + case exports.DEFLATE: + case exports.GZIP: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflate(this.strm, this.flush); + break; + case exports.UNZIP: + if (this.strm.avail_in > 0) { + next_expected_header_byte = this.strm.next_in; + } + + switch (this.gzip_id_bytes_read) { + case 0: + if (next_expected_header_byte === null) { + break; + } + + if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) { + this.gzip_id_bytes_read = 1; + next_expected_header_byte++; + + if (this.strm.avail_in === 1) { + // The only available byte was already read. + break; + } + } else { + this.mode = exports.INFLATE; + break; + } + + // fallthrough + case 1: + if (next_expected_header_byte === null) { + break; + } + + if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2) { + this.gzip_id_bytes_read = 2; + this.mode = exports.GUNZIP; + } else { + // There is no actual difference between INFLATE and INFLATERAW + // (after initialization). + this.mode = exports.INFLATE; + } + + break; + default: + throw new Error('invalid number of gzip magic number bytes read'); + } + + // fallthrough + case exports.INFLATE: + case exports.GUNZIP: + case exports.INFLATERAW: + this.err = zlib_inflate.inflate(this.strm, this.flush + + // If data was encoded with dictionary + );if (this.err === exports.Z_NEED_DICT && this.dictionary) { + // Load it + this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary); + if (this.err === exports.Z_OK) { + // And try to decode again + this.err = zlib_inflate.inflate(this.strm, this.flush); + } else if (this.err === exports.Z_DATA_ERROR) { + // Both inflateSetDictionary() and inflate() return Z_DATA_ERROR. + // Make it possible for After() to tell a bad dictionary from bad + // input. + this.err = exports.Z_NEED_DICT; + } + } + while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0x00) { + // Bytes remain in input buffer. Perhaps this is another compressed + // member in the same archive, or just trailing garbage. + // Trailing zero bytes are okay, though, since they are frequently + // used for padding. + + this.reset(); + this.err = zlib_inflate.inflate(this.strm, this.flush); + } + break; + default: + throw new Error('Unknown mode ' + this.mode); + } +}; + +Zlib.prototype._checkError = function () { + // Acceptable error states depend on the type of zlib stream. + switch (this.err) { + case exports.Z_OK: + case exports.Z_BUF_ERROR: + if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH) { + this._error('unexpected end of file'); + return false; + } + break; + case exports.Z_STREAM_END: + // normal statuses, not fatal + break; + case exports.Z_NEED_DICT: + if (this.dictionary == null) { + this._error('Missing dictionary'); + } else { + this._error('Bad dictionary'); + } + return false; + default: + // something else. + this._error('Zlib error'); + return false; + } + + return true; +}; + +Zlib.prototype._after = function () { + if (!this._checkError()) { + return; + } + + var avail_out = this.strm.avail_out; + var avail_in = this.strm.avail_in; + + this.write_in_progress = false; + + // call the write() cb + this.callback(avail_in, avail_out); + + if (this.pending_close) { + this.close(); + } +}; + +Zlib.prototype._error = function (message) { + if (this.strm.msg) { + message = this.strm.msg; + } + this.onerror(message, this.err + + // no hope of rescue. + );this.write_in_progress = false; + if (this.pending_close) { + this.close(); + } +}; + +Zlib.prototype.init = function (windowBits, level, memLevel, strategy, dictionary) { + assert(arguments.length === 4 || arguments.length === 5, 'init(windowBits, level, memLevel, strategy, [dictionary])'); + + assert(windowBits >= 8 && windowBits <= 15, 'invalid windowBits'); + assert(level >= -1 && level <= 9, 'invalid compression level'); + + assert(memLevel >= 1 && memLevel <= 9, 'invalid memlevel'); + + assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, 'invalid strategy'); + + this._init(level, windowBits, memLevel, strategy, dictionary); + this._setDictionary(); +}; + +Zlib.prototype.params = function () { + throw new Error('deflateParams Not supported'); +}; + +Zlib.prototype.reset = function () { + this._reset(); + this._setDictionary(); +}; + +Zlib.prototype._init = function (level, windowBits, memLevel, strategy, dictionary) { + this.level = level; + this.windowBits = windowBits; + this.memLevel = memLevel; + this.strategy = strategy; + + this.flush = exports.Z_NO_FLUSH; + + this.err = exports.Z_OK; + + if (this.mode === exports.GZIP || this.mode === exports.GUNZIP) { + this.windowBits += 16; + } + + if (this.mode === exports.UNZIP) { + this.windowBits += 32; + } + + if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW) { + this.windowBits = -1 * this.windowBits; + } + + this.strm = new Zstream(); + + switch (this.mode) { + case exports.DEFLATE: + case exports.GZIP: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy); + break; + case exports.INFLATE: + case exports.GUNZIP: + case exports.INFLATERAW: + case exports.UNZIP: + this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits); + break; + default: + throw new Error('Unknown mode ' + this.mode); + } + + if (this.err !== exports.Z_OK) { + this._error('Init error'); + } + + this.dictionary = dictionary; + + this.write_in_progress = false; + this.init_done = true; +}; + +Zlib.prototype._setDictionary = function () { + if (this.dictionary == null) { + return; + } + + this.err = exports.Z_OK; + + switch (this.mode) { + case exports.DEFLATE: + case exports.DEFLATERAW: + this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary); + break; + default: + break; + } + + if (this.err !== exports.Z_OK) { + this._error('Failed to set dictionary'); + } +}; + +Zlib.prototype._reset = function () { + this.err = exports.Z_OK; + + switch (this.mode) { + case exports.DEFLATE: + case exports.DEFLATERAW: + case exports.GZIP: + this.err = zlib_deflate.deflateReset(this.strm); + break; + case exports.INFLATE: + case exports.INFLATERAW: + case exports.GUNZIP: + this.err = zlib_inflate.inflateReset(this.strm); + break; + default: + break; + } + + if (this.err !== exports.Z_OK) { + this._error('Failed to reset stream'); + } +}; + +exports.Zlib = Zlib; + +/***/ }), + +/***/ 2635: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; +/* provided dependency */ var process = __webpack_require__(4155); + + +var Buffer = (__webpack_require__(8823).Buffer); +var Transform = (__webpack_require__(2830).Transform); +var binding = __webpack_require__(4505); +var util = __webpack_require__(9539); +var assert = (__webpack_require__(9282).ok); +var kMaxLength = (__webpack_require__(8823).kMaxLength); +var kRangeErrorMessage = 'Cannot create final Buffer. It would be larger ' + 'than 0x' + kMaxLength.toString(16) + ' bytes'; + +// zlib doesn't provide these, so kludge them in following the same +// const naming scheme zlib uses. +binding.Z_MIN_WINDOWBITS = 8; +binding.Z_MAX_WINDOWBITS = 15; +binding.Z_DEFAULT_WINDOWBITS = 15; + +// fewer than 64 bytes per chunk is stupid. +// technically it could work with as few as 8, but even 64 bytes +// is absurdly low. Usually a MB or more is best. +binding.Z_MIN_CHUNK = 64; +binding.Z_MAX_CHUNK = Infinity; +binding.Z_DEFAULT_CHUNK = 16 * 1024; + +binding.Z_MIN_MEMLEVEL = 1; +binding.Z_MAX_MEMLEVEL = 9; +binding.Z_DEFAULT_MEMLEVEL = 8; + +binding.Z_MIN_LEVEL = -1; +binding.Z_MAX_LEVEL = 9; +binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION; + +// expose all the zlib constants +var bkeys = Object.keys(binding); +for (var bk = 0; bk < bkeys.length; bk++) { + var bkey = bkeys[bk]; + if (bkey.match(/^Z/)) { + Object.defineProperty(exports, bkey, { + enumerable: true, value: binding[bkey], writable: false + }); + } +} + +// translation table for return codes. +var codes = { + Z_OK: binding.Z_OK, + Z_STREAM_END: binding.Z_STREAM_END, + Z_NEED_DICT: binding.Z_NEED_DICT, + Z_ERRNO: binding.Z_ERRNO, + Z_STREAM_ERROR: binding.Z_STREAM_ERROR, + Z_DATA_ERROR: binding.Z_DATA_ERROR, + Z_MEM_ERROR: binding.Z_MEM_ERROR, + Z_BUF_ERROR: binding.Z_BUF_ERROR, + Z_VERSION_ERROR: binding.Z_VERSION_ERROR +}; + +var ckeys = Object.keys(codes); +for (var ck = 0; ck < ckeys.length; ck++) { + var ckey = ckeys[ck]; + codes[codes[ckey]] = ckey; +} + +Object.defineProperty(exports, "codes", ({ + enumerable: true, value: Object.freeze(codes), writable: false +})); + +exports.Deflate = Deflate; +exports.Inflate = Inflate; +exports.Gzip = Gzip; +exports.Gunzip = Gunzip; +exports.DeflateRaw = DeflateRaw; +exports.InflateRaw = InflateRaw; +exports.Unzip = Unzip; + +exports.createDeflate = function (o) { + return new Deflate(o); +}; + +exports.createInflate = function (o) { + return new Inflate(o); +}; + +exports.createDeflateRaw = function (o) { + return new DeflateRaw(o); +}; + +exports.createInflateRaw = function (o) { + return new InflateRaw(o); +}; + +exports.createGzip = function (o) { + return new Gzip(o); +}; + +exports.createGunzip = function (o) { + return new Gunzip(o); +}; + +exports.createUnzip = function (o) { + return new Unzip(o); +}; + +// Convenience methods. +// compress/decompress a string or buffer in one step. +exports.deflate = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Deflate(opts), buffer, callback); +}; + +exports.deflateSync = function (buffer, opts) { + return zlibBufferSync(new Deflate(opts), buffer); +}; + +exports.gzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Gzip(opts), buffer, callback); +}; + +exports.gzipSync = function (buffer, opts) { + return zlibBufferSync(new Gzip(opts), buffer); +}; + +exports.deflateRaw = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new DeflateRaw(opts), buffer, callback); +}; + +exports.deflateRawSync = function (buffer, opts) { + return zlibBufferSync(new DeflateRaw(opts), buffer); +}; + +exports.unzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Unzip(opts), buffer, callback); +}; + +exports.unzipSync = function (buffer, opts) { + return zlibBufferSync(new Unzip(opts), buffer); +}; + +exports.inflate = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Inflate(opts), buffer, callback); +}; + +exports.inflateSync = function (buffer, opts) { + return zlibBufferSync(new Inflate(opts), buffer); +}; + +exports.gunzip = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new Gunzip(opts), buffer, callback); +}; + +exports.gunzipSync = function (buffer, opts) { + return zlibBufferSync(new Gunzip(opts), buffer); +}; + +exports.inflateRaw = function (buffer, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return zlibBuffer(new InflateRaw(opts), buffer, callback); +}; + +exports.inflateRawSync = function (buffer, opts) { + return zlibBufferSync(new InflateRaw(opts), buffer); +}; + +function zlibBuffer(engine, buffer, callback) { + var buffers = []; + var nread = 0; + + engine.on('error', onError); + engine.on('end', onEnd); + + engine.end(buffer); + flow(); + + function flow() { + var chunk; + while (null !== (chunk = engine.read())) { + buffers.push(chunk); + nread += chunk.length; + } + engine.once('readable', flow); + } + + function onError(err) { + engine.removeListener('end', onEnd); + engine.removeListener('readable', flow); + callback(err); + } + + function onEnd() { + var buf; + var err = null; + + if (nread >= kMaxLength) { + err = new RangeError(kRangeErrorMessage); + } else { + buf = Buffer.concat(buffers, nread); + } + + buffers = []; + engine.close(); + callback(err, buf); + } +} + +function zlibBufferSync(engine, buffer) { + if (typeof buffer === 'string') buffer = Buffer.from(buffer); + + if (!Buffer.isBuffer(buffer)) throw new TypeError('Not a string or buffer'); + + var flushFlag = engine._finishFlushFlag; + + return engine._processChunk(buffer, flushFlag); +} + +// generic zlib +// minimal 2-byte header +function Deflate(opts) { + if (!(this instanceof Deflate)) return new Deflate(opts); + Zlib.call(this, opts, binding.DEFLATE); +} + +function Inflate(opts) { + if (!(this instanceof Inflate)) return new Inflate(opts); + Zlib.call(this, opts, binding.INFLATE); +} + +// gzip - bigger header, same deflate compression +function Gzip(opts) { + if (!(this instanceof Gzip)) return new Gzip(opts); + Zlib.call(this, opts, binding.GZIP); +} + +function Gunzip(opts) { + if (!(this instanceof Gunzip)) return new Gunzip(opts); + Zlib.call(this, opts, binding.GUNZIP); +} + +// raw - no header +function DeflateRaw(opts) { + if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); + Zlib.call(this, opts, binding.DEFLATERAW); +} + +function InflateRaw(opts) { + if (!(this instanceof InflateRaw)) return new InflateRaw(opts); + Zlib.call(this, opts, binding.INFLATERAW); +} + +// auto-detect header. +function Unzip(opts) { + if (!(this instanceof Unzip)) return new Unzip(opts); + Zlib.call(this, opts, binding.UNZIP); +} + +function isValidFlushFlag(flag) { + return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK; +} + +// the Zlib class they all inherit from +// This thing manages the queue of requests, and returns +// true or false if there is anything in the queue when +// you call the .write() method. + +function Zlib(opts, mode) { + var _this = this; + + this._opts = opts = opts || {}; + this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK; + + Transform.call(this, opts); + + if (opts.flush && !isValidFlushFlag(opts.flush)) { + throw new Error('Invalid flush flag: ' + opts.flush); + } + if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) { + throw new Error('Invalid flush flag: ' + opts.finishFlush); + } + + this._flushFlag = opts.flush || binding.Z_NO_FLUSH; + this._finishFlushFlag = typeof opts.finishFlush !== 'undefined' ? opts.finishFlush : binding.Z_FINISH; + + if (opts.chunkSize) { + if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK) { + throw new Error('Invalid chunk size: ' + opts.chunkSize); + } + } + + if (opts.windowBits) { + if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS) { + throw new Error('Invalid windowBits: ' + opts.windowBits); + } + } + + if (opts.level) { + if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL) { + throw new Error('Invalid compression level: ' + opts.level); + } + } + + if (opts.memLevel) { + if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL) { + throw new Error('Invalid memLevel: ' + opts.memLevel); + } + } + + if (opts.strategy) { + if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY) { + throw new Error('Invalid strategy: ' + opts.strategy); + } + } + + if (opts.dictionary) { + if (!Buffer.isBuffer(opts.dictionary)) { + throw new Error('Invalid dictionary: it should be a Buffer instance'); + } + } + + this._handle = new binding.Zlib(mode); + + var self = this; + this._hadError = false; + this._handle.onerror = function (message, errno) { + // there is no way to cleanly recover. + // continuing only obscures problems. + _close(self); + self._hadError = true; + + var error = new Error(message); + error.errno = errno; + error.code = exports.codes[errno]; + self.emit('error', error); + }; + + var level = exports.Z_DEFAULT_COMPRESSION; + if (typeof opts.level === 'number') level = opts.level; + + var strategy = exports.Z_DEFAULT_STRATEGY; + if (typeof opts.strategy === 'number') strategy = opts.strategy; + + this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary); + + this._buffer = Buffer.allocUnsafe(this._chunkSize); + this._offset = 0; + this._level = level; + this._strategy = strategy; + + this.once('end', this.close); + + Object.defineProperty(this, '_closed', { + get: function () { + return !_this._handle; + }, + configurable: true, + enumerable: true + }); +} + +util.inherits(Zlib, Transform); + +Zlib.prototype.params = function (level, strategy, callback) { + if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL) { + throw new RangeError('Invalid compression level: ' + level); + } + if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY) { + throw new TypeError('Invalid strategy: ' + strategy); + } + + if (this._level !== level || this._strategy !== strategy) { + var self = this; + this.flush(binding.Z_SYNC_FLUSH, function () { + assert(self._handle, 'zlib binding closed'); + self._handle.params(level, strategy); + if (!self._hadError) { + self._level = level; + self._strategy = strategy; + if (callback) callback(); + } + }); + } else { + process.nextTick(callback); + } +}; + +Zlib.prototype.reset = function () { + assert(this._handle, 'zlib binding closed'); + return this._handle.reset(); +}; + +// This is the _flush function called by the transform class, +// internally, when the last chunk has been written. +Zlib.prototype._flush = function (callback) { + this._transform(Buffer.alloc(0), '', callback); +}; + +Zlib.prototype.flush = function (kind, callback) { + var _this2 = this; + + var ws = this._writableState; + + if (typeof kind === 'function' || kind === undefined && !callback) { + callback = kind; + kind = binding.Z_FULL_FLUSH; + } + + if (ws.ended) { + if (callback) process.nextTick(callback); + } else if (ws.ending) { + if (callback) this.once('end', callback); + } else if (ws.needDrain) { + if (callback) { + this.once('drain', function () { + return _this2.flush(kind, callback); + }); + } + } else { + this._flushFlag = kind; + this.write(Buffer.alloc(0), '', callback); + } +}; + +Zlib.prototype.close = function (callback) { + _close(this, callback); + process.nextTick(emitCloseNT, this); +}; + +function _close(engine, callback) { + if (callback) process.nextTick(callback); + + // Caller may invoke .close after a zlib error (which will null _handle). + if (!engine._handle) return; + + engine._handle.close(); + engine._handle = null; +} + +function emitCloseNT(self) { + self.emit('close'); +} + +Zlib.prototype._transform = function (chunk, encoding, cb) { + var flushFlag; + var ws = this._writableState; + var ending = ws.ending || ws.ended; + var last = ending && (!chunk || ws.length === chunk.length); + + if (chunk !== null && !Buffer.isBuffer(chunk)) return cb(new Error('invalid input')); + + if (!this._handle) return cb(new Error('zlib binding closed')); + + // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag + // (or whatever flag was provided using opts.finishFlush). + // If it's explicitly flushing at some other time, then we use + // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression + // goodness. + if (last) flushFlag = this._finishFlushFlag;else { + flushFlag = this._flushFlag; + // once we've flushed the last of the queue, stop flushing and + // go back to the normal behavior. + if (chunk.length >= ws.length) { + this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH; + } + } + + this._processChunk(chunk, flushFlag, cb); +}; + +Zlib.prototype._processChunk = function (chunk, flushFlag, cb) { + var availInBefore = chunk && chunk.length; + var availOutBefore = this._chunkSize - this._offset; + var inOff = 0; + + var self = this; + + var async = typeof cb === 'function'; + + if (!async) { + var buffers = []; + var nread = 0; + + var error; + this.on('error', function (er) { + error = er; + }); + + assert(this._handle, 'zlib binding closed'); + do { + var res = this._handle.writeSync(flushFlag, chunk, // in + inOff, // in_off + availInBefore, // in_len + this._buffer, // out + this._offset, //out_off + availOutBefore); // out_len + } while (!this._hadError && callback(res[0], res[1])); + + if (this._hadError) { + throw error; + } + + if (nread >= kMaxLength) { + _close(this); + throw new RangeError(kRangeErrorMessage); + } + + var buf = Buffer.concat(buffers, nread); + _close(this); + + return buf; + } + + assert(this._handle, 'zlib binding closed'); + var req = this._handle.write(flushFlag, chunk, // in + inOff, // in_off + availInBefore, // in_len + this._buffer, // out + this._offset, //out_off + availOutBefore); // out_len + + req.buffer = chunk; + req.callback = callback; + + function callback(availInAfter, availOutAfter) { + // When the callback is used in an async write, the callback's + // context is the `req` object that was created. The req object + // is === this._handle, and that's why it's important to null + // out the values after they are done being used. `this._handle` + // can stay in memory longer than the callback and buffer are needed. + if (this) { + this.buffer = null; + this.callback = null; + } + + if (self._hadError) return; + + var have = availOutBefore - availOutAfter; + assert(have >= 0, 'have should not go down'); + + if (have > 0) { + var out = self._buffer.slice(self._offset, self._offset + have); + self._offset += have; + // serve some output to the consumer. + if (async) { + self.push(out); + } else { + buffers.push(out); + nread += out.length; + } + } + + // exhausted the output buffer, or used all the input create a new one. + if (availOutAfter === 0 || self._offset >= self._chunkSize) { + availOutBefore = self._chunkSize; + self._offset = 0; + self._buffer = Buffer.allocUnsafe(self._chunkSize); + } + + if (availOutAfter === 0) { + // Not actually done. Need to reprocess. + // Also, update the availInBefore to the availInAfter value, + // so that if we have to hit it a third (fourth, etc.) time, + // it'll have the correct byte counts. + inOff += availInBefore - availInAfter; + availInBefore = availInAfter; + + if (!async) return true; + + var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize); + newReq.callback = callback; // this same function + newReq.buffer = chunk; + return; + } + + if (!async) return false; + + // finished with the chunk. + cb(); + } +}; + +util.inherits(Deflate, Zlib); +util.inherits(Inflate, Zlib); +util.inherits(Gzip, Zlib); +util.inherits(Gunzip, Zlib); +util.inherits(DeflateRaw, Zlib); +util.inherits(InflateRaw, Zlib); +util.inherits(Unzip, Zlib); + +/***/ }), + +/***/ 1924: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(210); + +var callBind = __webpack_require__(5559); + +var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); + +module.exports = function callBoundIntrinsic(name, allowMissing) { + var intrinsic = GetIntrinsic(name, !!allowMissing); + if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { + return callBind(intrinsic); + } + return intrinsic; +}; + + +/***/ }), + +/***/ 5559: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(8612); +var GetIntrinsic = __webpack_require__(210); + +var $apply = GetIntrinsic('%Function.prototype.apply%'); +var $call = GetIntrinsic('%Function.prototype.call%'); +var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); +var $max = GetIntrinsic('%Math.max%'); + +if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + } catch (e) { + // IE 8 has a broken defineProperty + $defineProperty = null; + } +} + +module.exports = function callBind(originalFunction) { + var func = $reflectApply(bind, $call, arguments); + if ($gOPD && $defineProperty) { + var desc = $gOPD(func, 'length'); + if (desc.configurable) { + // original length, plus the receiver, minus any additional arguments (after the receiver) + $defineProperty( + func, + 'length', + { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } + ); + } + } + return func; +}; + +var applyBind = function applyBind() { + return $reflectApply(bind, $apply, arguments); +}; + +if ($defineProperty) { + $defineProperty(module.exports, 'apply', { value: applyBind }); +} else { + module.exports.apply = applyBind; +} + + +/***/ }), + +/***/ 6313: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; +var clone = (function() { +'use strict'; + +/** + * Clones (copies) an Object using deep copying. + * + * This function supports circular references by default, but if you are certain + * there are no circular references in your object, you can save some CPU time + * by calling clone(obj, false). + * + * Caution: if `circular` is false and `parent` contains circular references, + * your program may enter an infinite loop and crash. + * + * @param `parent` - the object to be cloned + * @param `circular` - set to true if the object to be cloned may contain + * circular references. (optional - true by default) + * @param `depth` - set to a number if the object is only to be cloned to + * a particular depth. (optional - defaults to Infinity) + * @param `prototype` - sets the prototype to be used when cloning an object. + * (optional - defaults to parent prototype). +*/ +function clone(parent, circular, depth, prototype) { + var filter; + if (typeof circular === 'object') { + depth = circular.depth; + prototype = circular.prototype; + filter = circular.filter; + circular = circular.circular + } + // maintain two arrays for circular references, where corresponding parents + // and children have the same index + var allParents = []; + var allChildren = []; + + var useBuffer = typeof Buffer != 'undefined'; + + if (typeof circular == 'undefined') + circular = true; + + if (typeof depth == 'undefined') + depth = Infinity; + + // recurse this function so we don't reset allParents and allChildren + function _clone(parent, depth) { + // cloning null always returns null + if (parent === null) + return null; + + if (depth == 0) + return parent; + + var child; + var proto; + if (typeof parent != 'object') { + return parent; + } + + if (clone.__isArray(parent)) { + child = []; + } else if (clone.__isRegExp(parent)) { + child = new RegExp(parent.source, __getRegExpFlags(parent)); + if (parent.lastIndex) child.lastIndex = parent.lastIndex; + } else if (clone.__isDate(parent)) { + child = new Date(parent.getTime()); + } else if (useBuffer && Buffer.isBuffer(parent)) { + if (Buffer.allocUnsafe) { + // Node.js >= 4.5.0 + child = Buffer.allocUnsafe(parent.length); + } else { + // Older Node.js versions + child = new Buffer(parent.length); + } + parent.copy(child); + return child; + } else { + if (typeof prototype == 'undefined') { + proto = Object.getPrototypeOf(parent); + child = Object.create(proto); + } + else { + child = Object.create(prototype); + proto = prototype; + } + } + + if (circular) { + var index = allParents.indexOf(parent); + + if (index != -1) { + return allChildren[index]; + } + allParents.push(parent); + allChildren.push(child); + } + + for (var i in parent) { + var attrs; + if (proto) { + attrs = Object.getOwnPropertyDescriptor(proto, i); + } + + if (attrs && attrs.set == null) { + continue; + } + child[i] = _clone(parent[i], depth - 1); + } + + return child; + } + + return _clone(parent, depth); +} + +/** + * Simple flat clone using prototype, accepts only objects, usefull for property + * override on FLAT configuration object (no nested props). + * + * USE WITH CAUTION! This may not behave as you wish if you do not know how this + * works. + */ +clone.clonePrototype = function clonePrototype(parent) { + if (parent === null) + return null; + + var c = function () {}; + c.prototype = parent; + return new c(); +}; + +// private utility functions + +function __objToStr(o) { + return Object.prototype.toString.call(o); +}; +clone.__objToStr = __objToStr; + +function __isDate(o) { + return typeof o === 'object' && __objToStr(o) === '[object Date]'; +}; +clone.__isDate = __isDate; + +function __isArray(o) { + return typeof o === 'object' && __objToStr(o) === '[object Array]'; +}; +clone.__isArray = __isArray; + +function __isRegExp(o) { + return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; +}; +clone.__isRegExp = __isRegExp; + +function __getRegExpFlags(re) { + var flags = ''; + if (re.global) flags += 'g'; + if (re.ignoreCase) flags += 'i'; + if (re.multiline) flags += 'm'; + return flags; +}; +clone.__getRegExpFlags = __getRegExpFlags; + +return clone; +})(); + +if ( true && module.exports) { + module.exports = clone; +} + + +/***/ }), + +/***/ 4667: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +__webpack_require__(2479); +var path = __webpack_require__(857); + +module.exports = path.Object.values; + + +/***/ }), + +/***/ 7633: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +__webpack_require__(9170); +__webpack_require__(6992); +__webpack_require__(1539); +__webpack_require__(8674); +__webpack_require__(7922); +__webpack_require__(4668); +__webpack_require__(7727); +__webpack_require__(8783); +var path = __webpack_require__(857); + +module.exports = path.Promise; + + +/***/ }), + +/***/ 3867: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var parent = __webpack_require__(1150); +__webpack_require__(8628); +// TODO: Remove from `core-js@4` +__webpack_require__(7314); +__webpack_require__(7479); +__webpack_require__(6290); + +module.exports = parent; + + +/***/ }), + +/***/ 9662: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isCallable = __webpack_require__(614); +var tryToString = __webpack_require__(6330); + +var TypeError = global.TypeError; + +// `Assert: IsCallable(argument) is true` +module.exports = function (argument) { + if (isCallable(argument)) return argument; + throw TypeError(tryToString(argument) + ' is not a function'); +}; + + +/***/ }), + +/***/ 9483: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isConstructor = __webpack_require__(4411); +var tryToString = __webpack_require__(6330); + +var TypeError = global.TypeError; + +// `Assert: IsConstructor(argument) is true` +module.exports = function (argument) { + if (isConstructor(argument)) return argument; + throw TypeError(tryToString(argument) + ' is not a constructor'); +}; + + +/***/ }), + +/***/ 6077: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isCallable = __webpack_require__(614); + +var String = global.String; +var TypeError = global.TypeError; + +module.exports = function (argument) { + if (typeof argument == 'object' || isCallable(argument)) return argument; + throw TypeError("Can't set " + String(argument) + ' as a prototype'); +}; + + +/***/ }), + +/***/ 1223: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(5112); +var create = __webpack_require__(30); +var definePropertyModule = __webpack_require__(3070); + +var UNSCOPABLES = wellKnownSymbol('unscopables'); +var ArrayPrototype = Array.prototype; + +// Array.prototype[@@unscopables] +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +if (ArrayPrototype[UNSCOPABLES] == undefined) { + definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { + configurable: true, + value: create(null) + }); +} + +// add a key to Array.prototype[@@unscopables] +module.exports = function (key) { + ArrayPrototype[UNSCOPABLES][key] = true; +}; + + +/***/ }), + +/***/ 1530: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var charAt = (__webpack_require__(8710).charAt); + +// `AdvanceStringIndex` abstract operation +// https://tc39.es/ecma262/#sec-advancestringindex +module.exports = function (S, index, unicode) { + return index + (unicode ? charAt(S, index).length : 1); +}; + + +/***/ }), + +/***/ 5787: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isPrototypeOf = __webpack_require__(7976); + +var TypeError = global.TypeError; + +module.exports = function (it, Prototype) { + if (isPrototypeOf(Prototype, it)) return it; + throw TypeError('Incorrect invocation'); +}; + + +/***/ }), + +/***/ 9670: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isObject = __webpack_require__(111); + +var String = global.String; +var TypeError = global.TypeError; + +// `Assert: Type(argument) is Object` +module.exports = function (argument) { + if (isObject(argument)) return argument; + throw TypeError(String(argument) + ' is not an object'); +}; + + +/***/ }), + +/***/ 1048: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var toObject = __webpack_require__(7908); +var toAbsoluteIndex = __webpack_require__(1400); +var lengthOfArrayLike = __webpack_require__(6244); + +var min = Math.min; + +// `Array.prototype.copyWithin` method implementation +// https://tc39.es/ecma262/#sec-array.prototype.copywithin +// eslint-disable-next-line es/no-array-prototype-copywithin -- safe +module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { + var O = toObject(this); + var len = lengthOfArrayLike(O); + var to = toAbsoluteIndex(target, len); + var from = toAbsoluteIndex(start, len); + var end = arguments.length > 2 ? arguments[2] : undefined; + var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); + var inc = 1; + if (from < to && to < from + count) { + inc = -1; + from += count - 1; + to += count - 1; + } + while (count-- > 0) { + if (from in O) O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; + + +/***/ }), + +/***/ 1285: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var toObject = __webpack_require__(7908); +var toAbsoluteIndex = __webpack_require__(1400); +var lengthOfArrayLike = __webpack_require__(6244); + +// `Array.prototype.fill` method implementation +// https://tc39.es/ecma262/#sec-array.prototype.fill +module.exports = function fill(value /* , start = 0, end = @length */) { + var O = toObject(this); + var length = lengthOfArrayLike(O); + var argumentsLength = arguments.length; + var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length); + var end = argumentsLength > 2 ? arguments[2] : undefined; + var endPos = end === undefined ? length : toAbsoluteIndex(end, length); + while (endPos > index) O[index++] = value; + return O; +}; + + +/***/ }), + +/***/ 8533: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $forEach = (__webpack_require__(2092).forEach); +var arrayMethodIsStrict = __webpack_require__(9341); + +var STRICT_METHOD = arrayMethodIsStrict('forEach'); + +// `Array.prototype.forEach` method implementation +// https://tc39.es/ecma262/#sec-array.prototype.foreach +module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { + return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); +// eslint-disable-next-line es/no-array-prototype-foreach -- safe +} : [].forEach; + + +/***/ }), + +/***/ 7745: +/***/ (function(module) { + +module.exports = function (Constructor, list) { + var index = 0; + var length = list.length; + var result = new Constructor(length); + while (length > index) result[index] = list[index++]; + return result; +}; + + +/***/ }), + +/***/ 8457: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(7854); +var bind = __webpack_require__(9974); +var call = __webpack_require__(6916); +var toObject = __webpack_require__(7908); +var callWithSafeIterationClosing = __webpack_require__(3411); +var isArrayIteratorMethod = __webpack_require__(7659); +var isConstructor = __webpack_require__(4411); +var lengthOfArrayLike = __webpack_require__(6244); +var createProperty = __webpack_require__(6135); +var getIterator = __webpack_require__(8554); +var getIteratorMethod = __webpack_require__(1246); + +var Array = global.Array; + +// `Array.from` method implementation +// https://tc39.es/ecma262/#sec-array.from +module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { + var O = toObject(arrayLike); + var IS_CONSTRUCTOR = isConstructor(this); + var argumentsLength = arguments.length; + var mapfn = argumentsLength > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined); + var iteratorMethod = getIteratorMethod(O); + var index = 0; + var length, result, step, iterator, next, value; + // if the target is not iterable or it's an array with the default iterator - use a simple case + if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) { + iterator = getIterator(O, iteratorMethod); + next = iterator.next; + result = IS_CONSTRUCTOR ? new this() : []; + for (;!(step = call(next, iterator)).done; index++) { + value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; + createProperty(result, index, value); + } + } else { + length = lengthOfArrayLike(O); + result = IS_CONSTRUCTOR ? new this(length) : Array(length); + for (;length > index; index++) { + value = mapping ? mapfn(O[index], index) : O[index]; + createProperty(result, index, value); + } + } + result.length = index; + return result; +}; + + +/***/ }), + +/***/ 1318: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var toIndexedObject = __webpack_require__(5656); +var toAbsoluteIndex = __webpack_require__(1400); +var lengthOfArrayLike = __webpack_require__(6244); + +// `Array.prototype.{ indexOf, includes }` methods implementation +var createMethod = function (IS_INCLUDES) { + return function ($this, el, fromIndex) { + var O = toIndexedObject($this); + var length = lengthOfArrayLike(O); + var index = toAbsoluteIndex(fromIndex, length); + var value; + // Array#includes uses SameValueZero equality algorithm + // eslint-disable-next-line no-self-compare -- NaN check + if (IS_INCLUDES && el != el) while (length > index) { + value = O[index++]; + // eslint-disable-next-line no-self-compare -- NaN check + if (value != value) return true; + // Array#indexOf ignores holes, Array#includes - not + } else for (;length > index; index++) { + if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; + +module.exports = { + // `Array.prototype.includes` method + // https://tc39.es/ecma262/#sec-array.prototype.includes + includes: createMethod(true), + // `Array.prototype.indexOf` method + // https://tc39.es/ecma262/#sec-array.prototype.indexof + indexOf: createMethod(false) +}; + + +/***/ }), + +/***/ 2092: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var bind = __webpack_require__(9974); +var uncurryThis = __webpack_require__(1702); +var IndexedObject = __webpack_require__(8361); +var toObject = __webpack_require__(7908); +var lengthOfArrayLike = __webpack_require__(6244); +var arraySpeciesCreate = __webpack_require__(5417); + +var push = uncurryThis([].push); + +// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation +var createMethod = function (TYPE) { + 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 IS_FILTER_REJECT = TYPE == 7; + var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; + return function ($this, callbackfn, that, specificCreate) { + var O = toObject($this); + var self = IndexedObject(O); + var boundFunction = bind(callbackfn, that); + var length = lengthOfArrayLike(self); + var index = 0; + var create = specificCreate || arraySpeciesCreate; + var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; + var value, result; + for (;length > index; index++) if (NO_HOLES || index in self) { + value = self[index]; + result = boundFunction(value, index, O); + if (TYPE) { + if (IS_MAP) target[index] = result; // map + else if (result) switch (TYPE) { + case 3: return true; // some + case 5: return value; // find + case 6: return index; // findIndex + case 2: push(target, value); // filter + } else switch (TYPE) { + case 4: return false; // every + case 7: push(target, value); // filterReject + } + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; + }; +}; + +module.exports = { + // `Array.prototype.forEach` method + // https://tc39.es/ecma262/#sec-array.prototype.foreach + forEach: createMethod(0), + // `Array.prototype.map` method + // https://tc39.es/ecma262/#sec-array.prototype.map + map: createMethod(1), + // `Array.prototype.filter` method + // https://tc39.es/ecma262/#sec-array.prototype.filter + filter: createMethod(2), + // `Array.prototype.some` method + // https://tc39.es/ecma262/#sec-array.prototype.some + some: createMethod(3), + // `Array.prototype.every` method + // https://tc39.es/ecma262/#sec-array.prototype.every + every: createMethod(4), + // `Array.prototype.find` method + // https://tc39.es/ecma262/#sec-array.prototype.find + find: createMethod(5), + // `Array.prototype.findIndex` method + // https://tc39.es/ecma262/#sec-array.prototype.findIndex + findIndex: createMethod(6), + // `Array.prototype.filterReject` method + // https://github.com/tc39/proposal-array-filtering + filterReject: createMethod(7) +}; + + +/***/ }), + +/***/ 6583: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +/* eslint-disable es/no-array-prototype-lastindexof -- safe */ +var apply = __webpack_require__(2104); +var toIndexedObject = __webpack_require__(5656); +var toIntegerOrInfinity = __webpack_require__(9303); +var lengthOfArrayLike = __webpack_require__(6244); +var arrayMethodIsStrict = __webpack_require__(9341); + +var min = Math.min; +var $lastIndexOf = [].lastIndexOf; +var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0; +var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf'); +var FORCED = NEGATIVE_ZERO || !STRICT_METHOD; + +// `Array.prototype.lastIndexOf` method implementation +// https://tc39.es/ecma262/#sec-array.prototype.lastindexof +module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { + // convert -0 to +0 + if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0; + var O = toIndexedObject(this); + var length = lengthOfArrayLike(O); + var index = length - 1; + if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1])); + if (index < 0) index = length + index; + for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0; + return -1; +} : $lastIndexOf; + + +/***/ }), + +/***/ 1194: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); +var wellKnownSymbol = __webpack_require__(5112); +var V8_VERSION = __webpack_require__(7392); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (METHOD_NAME) { + // We can't use this feature detection in V8 since it causes + // deoptimization and serious performance degradation + // https://github.com/zloirock/core-js/issues/677 + return V8_VERSION >= 51 || !fails(function () { + var array = []; + var constructor = array.constructor = {}; + constructor[SPECIES] = function () { + return { foo: 1 }; + }; + return array[METHOD_NAME](Boolean).foo !== 1; + }); +}; + + +/***/ }), + +/***/ 9341: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(7293); + +module.exports = function (METHOD_NAME, argument) { + var method = [][METHOD_NAME]; + return !!method && fails(function () { + // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing + method.call(null, argument || function () { throw 1; }, 1); + }); +}; + + +/***/ }), + +/***/ 3671: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var aCallable = __webpack_require__(9662); +var toObject = __webpack_require__(7908); +var IndexedObject = __webpack_require__(8361); +var lengthOfArrayLike = __webpack_require__(6244); + +var TypeError = global.TypeError; + +// `Array.prototype.{ reduce, reduceRight }` methods implementation +var createMethod = function (IS_RIGHT) { + return function (that, callbackfn, argumentsLength, memo) { + aCallable(callbackfn); + var O = toObject(that); + var self = IndexedObject(O); + var length = lengthOfArrayLike(O); + var index = IS_RIGHT ? length - 1 : 0; + var i = IS_RIGHT ? -1 : 1; + if (argumentsLength < 2) while (true) { + if (index in self) { + memo = self[index]; + index += i; + break; + } + index += i; + if (IS_RIGHT ? index < 0 : length <= index) { + throw TypeError('Reduce of empty array with no initial value'); + } + } + for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; +}; + +module.exports = { + // `Array.prototype.reduce` method + // https://tc39.es/ecma262/#sec-array.prototype.reduce + left: createMethod(false), + // `Array.prototype.reduceRight` method + // https://tc39.es/ecma262/#sec-array.prototype.reduceright + right: createMethod(true) +}; + + +/***/ }), + +/***/ 206: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); + +module.exports = uncurryThis([].slice); + + +/***/ }), + +/***/ 4362: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var arraySlice = __webpack_require__(206); + +var floor = Math.floor; + +var mergeSort = function (array, comparefn) { + var length = array.length; + var middle = floor(length / 2); + return length < 8 ? insertionSort(array, comparefn) : merge( + array, + mergeSort(arraySlice(array, 0, middle), comparefn), + mergeSort(arraySlice(array, middle), comparefn), + comparefn + ); +}; + +var insertionSort = function (array, comparefn) { + var length = array.length; + var i = 1; + var element, j; + + while (i < length) { + j = i; + element = array[i]; + while (j && comparefn(array[j - 1], element) > 0) { + array[j] = array[--j]; + } + if (j !== i++) array[j] = element; + } return array; +}; + +var merge = function (array, left, right, comparefn) { + var llength = left.length; + var rlength = right.length; + var lindex = 0; + var rindex = 0; + + while (lindex < llength || rindex < rlength) { + array[lindex + rindex] = (lindex < llength && rindex < rlength) + ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] + : lindex < llength ? left[lindex++] : right[rindex++]; + } return array; +}; + +module.exports = mergeSort; + + +/***/ }), + +/***/ 7475: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isArray = __webpack_require__(3157); +var isConstructor = __webpack_require__(4411); +var isObject = __webpack_require__(111); +var wellKnownSymbol = __webpack_require__(5112); + +var SPECIES = wellKnownSymbol('species'); +var Array = global.Array; + +// a part of `ArraySpeciesCreate` abstract operation +// https://tc39.es/ecma262/#sec-arrayspeciescreate +module.exports = function (originalArray) { + var C; + if (isArray(originalArray)) { + C = originalArray.constructor; + // cross-realm fallback + if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined; + else if (isObject(C)) { + C = C[SPECIES]; + if (C === null) C = undefined; + } + } return C === undefined ? Array : C; +}; + + +/***/ }), + +/***/ 5417: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var arraySpeciesConstructor = __webpack_require__(7475); + +// `ArraySpeciesCreate` abstract operation +// https://tc39.es/ecma262/#sec-arrayspeciescreate +module.exports = function (originalArray, length) { + return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); +}; + + +/***/ }), + +/***/ 3411: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var anObject = __webpack_require__(9670); +var iteratorClose = __webpack_require__(9212); + +// call something on iterator step with safe closing on error +module.exports = function (iterator, fn, value, ENTRIES) { + try { + return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); + } catch (error) { + iteratorClose(iterator, 'throw', error); + } +}; + + +/***/ }), + +/***/ 7072: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(5112); + +var ITERATOR = wellKnownSymbol('iterator'); +var SAFE_CLOSING = false; + +try { + var called = 0; + var iteratorWithReturn = { + next: function () { + return { done: !!called++ }; + }, + 'return': function () { + SAFE_CLOSING = true; + } + }; + iteratorWithReturn[ITERATOR] = function () { + return this; + }; + // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing + Array.from(iteratorWithReturn, function () { throw 2; }); +} catch (error) { /* empty */ } + +module.exports = function (exec, SKIP_CLOSING) { + if (!SKIP_CLOSING && !SAFE_CLOSING) return false; + var ITERATION_SUPPORT = false; + try { + var object = {}; + object[ITERATOR] = function () { + return { + next: function () { + return { done: ITERATION_SUPPORT = true }; + } + }; + }; + exec(object); + } catch (error) { /* empty */ } + return ITERATION_SUPPORT; +}; + + +/***/ }), + +/***/ 4326: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); + +var toString = uncurryThis({}.toString); +var stringSlice = uncurryThis(''.slice); + +module.exports = function (it) { + return stringSlice(toString(it), 8, -1); +}; + + +/***/ }), + +/***/ 648: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); +var isCallable = __webpack_require__(614); +var classofRaw = __webpack_require__(4326); +var wellKnownSymbol = __webpack_require__(5112); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var Object = global.Object; + +// ES3 wrong here +var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function (it, key) { + try { + return it[key]; + } catch (error) { /* empty */ } +}; + +// getting tag from ES6+ `Object.prototype.toString` +module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { + var O, tag, result; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag + // builtinTag case + : CORRECT_ARGUMENTS ? classofRaw(O) + // ES3 arguments fallback + : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result; +}; + + +/***/ }), + +/***/ 7741: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var arraySlice = __webpack_require__(206); + +var replace = uncurryThis(''.replace); +var split = uncurryThis(''.split); +var join = uncurryThis([].join); + +var TEST = (function (arg) { return String(Error(arg).stack); })('zxcasd'); +var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/; +var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST); +var IS_FIREFOX_OR_SAFARI_STACK = /@[^\n]*\n/.test(TEST) && !/zxcasd/.test(TEST); + +module.exports = function (stack, dropEntries) { + if (typeof stack != 'string') return stack; + if (IS_V8_OR_CHAKRA_STACK) { + while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, ''); + } else if (IS_FIREFOX_OR_SAFARI_STACK) { + return join(arraySlice(split(stack, '\n'), dropEntries), '\n'); + } return stack; +}; + + +/***/ }), + +/***/ 5631: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var defineProperty = (__webpack_require__(3070).f); +var create = __webpack_require__(30); +var redefineAll = __webpack_require__(2248); +var bind = __webpack_require__(9974); +var anInstance = __webpack_require__(5787); +var iterate = __webpack_require__(408); +var defineIterator = __webpack_require__(654); +var setSpecies = __webpack_require__(6340); +var DESCRIPTORS = __webpack_require__(9781); +var fastKey = (__webpack_require__(2423).fastKey); +var InternalStateModule = __webpack_require__(9909); + +var setInternalState = InternalStateModule.set; +var internalStateGetterFor = InternalStateModule.getterFor; + +module.exports = { + getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { + var Constructor = wrapper(function (that, iterable) { + anInstance(that, Prototype); + setInternalState(that, { + type: CONSTRUCTOR_NAME, + index: create(null), + first: undefined, + last: undefined, + size: 0 + }); + if (!DESCRIPTORS) that.size = 0; + if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); + }); + + var Prototype = Constructor.prototype; + + var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); + + var define = function (that, key, value) { + var state = getInternalState(that); + var entry = getEntry(that, key); + var previous, index; + // change existing entry + if (entry) { + entry.value = value; + // create new entry + } else { + state.last = entry = { + index: index = fastKey(key, true), + key: key, + value: value, + previous: previous = state.last, + next: undefined, + removed: false + }; + if (!state.first) state.first = entry; + if (previous) previous.next = entry; + if (DESCRIPTORS) state.size++; + else that.size++; + // add to index + if (index !== 'F') state.index[index] = entry; + } return that; + }; + + var getEntry = function (that, key) { + var state = getInternalState(that); + // fast case + var index = fastKey(key); + var entry; + if (index !== 'F') return state.index[index]; + // frozen object case + for (entry = state.first; entry; entry = entry.next) { + if (entry.key == key) return entry; + } + }; + + redefineAll(Prototype, { + // `{ Map, Set }.prototype.clear()` methods + // https://tc39.es/ecma262/#sec-map.prototype.clear + // https://tc39.es/ecma262/#sec-set.prototype.clear + clear: function clear() { + var that = this; + var state = getInternalState(that); + var data = state.index; + var entry = state.first; + while (entry) { + entry.removed = true; + if (entry.previous) entry.previous = entry.previous.next = undefined; + delete data[entry.index]; + entry = entry.next; + } + state.first = state.last = undefined; + if (DESCRIPTORS) state.size = 0; + else that.size = 0; + }, + // `{ Map, Set }.prototype.delete(key)` methods + // https://tc39.es/ecma262/#sec-map.prototype.delete + // https://tc39.es/ecma262/#sec-set.prototype.delete + 'delete': function (key) { + var that = this; + var state = getInternalState(that); + var entry = getEntry(that, key); + if (entry) { + var next = entry.next; + var prev = entry.previous; + delete state.index[entry.index]; + entry.removed = true; + if (prev) prev.next = next; + if (next) next.previous = prev; + if (state.first == entry) state.first = next; + if (state.last == entry) state.last = prev; + if (DESCRIPTORS) state.size--; + else that.size--; + } return !!entry; + }, + // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods + // https://tc39.es/ecma262/#sec-map.prototype.foreach + // https://tc39.es/ecma262/#sec-set.prototype.foreach + forEach: function forEach(callbackfn /* , that = undefined */) { + var state = getInternalState(this); + var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined); + var entry; + while (entry = entry ? entry.next : state.first) { + boundFunction(entry.value, entry.key, this); + // revert to the last existing entry + while (entry && entry.removed) entry = entry.previous; + } + }, + // `{ Map, Set}.prototype.has(key)` methods + // https://tc39.es/ecma262/#sec-map.prototype.has + // https://tc39.es/ecma262/#sec-set.prototype.has + has: function has(key) { + return !!getEntry(this, key); + } + }); + + redefineAll(Prototype, IS_MAP ? { + // `Map.prototype.get(key)` method + // https://tc39.es/ecma262/#sec-map.prototype.get + get: function get(key) { + var entry = getEntry(this, key); + return entry && entry.value; + }, + // `Map.prototype.set(key, value)` method + // https://tc39.es/ecma262/#sec-map.prototype.set + set: function set(key, value) { + return define(this, key === 0 ? 0 : key, value); + } + } : { + // `Set.prototype.add(value)` method + // https://tc39.es/ecma262/#sec-set.prototype.add + add: function add(value) { + return define(this, value = value === 0 ? 0 : value, value); + } + }); + if (DESCRIPTORS) defineProperty(Prototype, 'size', { + get: function () { + return getInternalState(this).size; + } + }); + return Constructor; + }, + setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) { + var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; + var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME); + var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); + // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods + // https://tc39.es/ecma262/#sec-map.prototype.entries + // https://tc39.es/ecma262/#sec-map.prototype.keys + // https://tc39.es/ecma262/#sec-map.prototype.values + // https://tc39.es/ecma262/#sec-map.prototype-@@iterator + // https://tc39.es/ecma262/#sec-set.prototype.entries + // https://tc39.es/ecma262/#sec-set.prototype.keys + // https://tc39.es/ecma262/#sec-set.prototype.values + // https://tc39.es/ecma262/#sec-set.prototype-@@iterator + defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) { + setInternalState(this, { + type: ITERATOR_NAME, + target: iterated, + state: getInternalCollectionState(iterated), + kind: kind, + last: undefined + }); + }, function () { + var state = getInternalIteratorState(this); + var kind = state.kind; + var entry = state.last; + // revert to the last existing entry + while (entry && entry.removed) entry = entry.previous; + // get next entry + if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { + // or finish the iteration + state.target = undefined; + return { value: undefined, done: true }; + } + // return step by kind + if (kind == 'keys') return { value: entry.key, done: false }; + if (kind == 'values') return { value: entry.value, done: false }; + return { value: [entry.key, entry.value], done: false }; + }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); + + // `{ Map, Set }.prototype[@@species]` accessors + // https://tc39.es/ecma262/#sec-get-map-@@species + // https://tc39.es/ecma262/#sec-get-set-@@species + setSpecies(CONSTRUCTOR_NAME); + } +}; + + +/***/ }), + +/***/ 7710: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var isForced = __webpack_require__(4705); +var redefine = __webpack_require__(1320); +var InternalMetadataModule = __webpack_require__(2423); +var iterate = __webpack_require__(408); +var anInstance = __webpack_require__(5787); +var isCallable = __webpack_require__(614); +var isObject = __webpack_require__(111); +var fails = __webpack_require__(7293); +var checkCorrectnessOfIteration = __webpack_require__(7072); +var setToStringTag = __webpack_require__(8003); +var inheritIfRequired = __webpack_require__(9587); + +module.exports = function (CONSTRUCTOR_NAME, wrapper, common) { + var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; + var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; + var ADDER = IS_MAP ? 'set' : 'add'; + var NativeConstructor = global[CONSTRUCTOR_NAME]; + var NativePrototype = NativeConstructor && NativeConstructor.prototype; + var Constructor = NativeConstructor; + var exported = {}; + + var fixMethod = function (KEY) { + var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]); + redefine(NativePrototype, KEY, + KEY == 'add' ? function add(value) { + uncurriedNativeMethod(this, value === 0 ? 0 : value); + return this; + } : KEY == 'delete' ? function (key) { + return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); + } : KEY == 'get' ? function get(key) { + return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key); + } : KEY == 'has' ? function has(key) { + return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); + } : function set(key, value) { + uncurriedNativeMethod(this, key === 0 ? 0 : key, value); + return this; + } + ); + }; + + var REPLACE = isForced( + CONSTRUCTOR_NAME, + !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () { + new NativeConstructor().entries().next(); + })) + ); + + if (REPLACE) { + // create collection constructor + Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); + InternalMetadataModule.enable(); + } else if (isForced(CONSTRUCTOR_NAME, true)) { + var instance = new Constructor(); + // early implementations not supports chaining + var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); + // most early implementations doesn't supports iterables, most modern - not close it correctly + // eslint-disable-next-line no-new -- required for testing + var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); }); + // for early implementations -0 and +0 not the same + var BUGGY_ZERO = !IS_WEAK && fails(function () { + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new NativeConstructor(); + var index = 5; + while (index--) $instance[ADDER](index, index); + return !$instance.has(-0); + }); + + if (!ACCEPT_ITERABLES) { + Constructor = wrapper(function (dummy, iterable) { + anInstance(dummy, NativePrototype); + var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); + if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); + return that; + }); + Constructor.prototype = NativePrototype; + NativePrototype.constructor = Constructor; + } + + if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + + if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); + + // weak collections should not contains .clear method + if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear; + } + + exported[CONSTRUCTOR_NAME] = Constructor; + $({ global: true, forced: Constructor != NativeConstructor }, exported); + + setToStringTag(Constructor, CONSTRUCTOR_NAME); + + if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); + + return Constructor; +}; + + +/***/ }), + +/***/ 9920: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var hasOwn = __webpack_require__(2597); +var ownKeys = __webpack_require__(3887); +var getOwnPropertyDescriptorModule = __webpack_require__(1236); +var definePropertyModule = __webpack_require__(3070); + +module.exports = function (target, source) { + var keys = ownKeys(source); + var defineProperty = definePropertyModule.f; + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); + } +}; + + +/***/ }), + +/***/ 4964: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(5112); + +var MATCH = wellKnownSymbol('match'); + +module.exports = function (METHOD_NAME) { + var regexp = /./; + try { + '/./'[METHOD_NAME](regexp); + } catch (error1) { + try { + regexp[MATCH] = false; + return '/./'[METHOD_NAME](regexp); + } catch (error2) { /* empty */ } + } return false; +}; + + +/***/ }), + +/***/ 8544: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); + +module.exports = !fails(function () { + function F() { /* empty */ } + F.prototype.constructor = null; + // eslint-disable-next-line es/no-object-getprototypeof -- required for testing + return Object.getPrototypeOf(new F()) !== F.prototype; +}); + + +/***/ }), + +/***/ 4230: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var requireObjectCoercible = __webpack_require__(4488); +var toString = __webpack_require__(1340); + +var quot = /"/g; +var replace = uncurryThis(''.replace); + +// `CreateHTML` abstract operation +// https://tc39.es/ecma262/#sec-createhtml +module.exports = function (string, tag, attribute, value) { + var S = toString(requireObjectCoercible(string)); + var p1 = '<' + tag; + if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '"') + '"'; + return p1 + '>' + S + ''; +}; + + +/***/ }), + +/***/ 4994: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var IteratorPrototype = (__webpack_require__(3383).IteratorPrototype); +var create = __webpack_require__(30); +var createPropertyDescriptor = __webpack_require__(9114); +var setToStringTag = __webpack_require__(8003); +var Iterators = __webpack_require__(7497); + +var returnThis = function () { return this; }; + +module.exports = function (IteratorConstructor, NAME, next) { + var TO_STRING_TAG = NAME + ' Iterator'; + IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); + setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); + Iterators[TO_STRING_TAG] = returnThis; + return IteratorConstructor; +}; + + +/***/ }), + +/***/ 8880: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(9781); +var definePropertyModule = __webpack_require__(3070); +var createPropertyDescriptor = __webpack_require__(9114); + +module.exports = DESCRIPTORS ? function (object, key, value) { + return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); +} : function (object, key, value) { + object[key] = value; + return object; +}; + + +/***/ }), + +/***/ 9114: +/***/ (function(module) { + +module.exports = function (bitmap, value) { + return { + enumerable: !(bitmap & 1), + configurable: !(bitmap & 2), + writable: !(bitmap & 4), + value: value + }; +}; + + +/***/ }), + +/***/ 6135: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var toPropertyKey = __webpack_require__(4948); +var definePropertyModule = __webpack_require__(3070); +var createPropertyDescriptor = __webpack_require__(9114); + +module.exports = function (object, key, value) { + var propertyKey = toPropertyKey(key); + if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); + else object[propertyKey] = value; +}; + + +/***/ }), + +/***/ 8709: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(7854); +var anObject = __webpack_require__(9670); +var ordinaryToPrimitive = __webpack_require__(2140); + +var TypeError = global.TypeError; + +// `Date.prototype[@@toPrimitive](hint)` method implementation +// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive +module.exports = function (hint) { + anObject(this); + if (hint === 'string' || hint === 'default') hint = 'string'; + else if (hint !== 'number') throw TypeError('Incorrect hint'); + return ordinaryToPrimitive(this, hint); +}; + + +/***/ }), + +/***/ 654: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var call = __webpack_require__(6916); +var IS_PURE = __webpack_require__(1913); +var FunctionName = __webpack_require__(6530); +var isCallable = __webpack_require__(614); +var createIteratorConstructor = __webpack_require__(4994); +var getPrototypeOf = __webpack_require__(9518); +var setPrototypeOf = __webpack_require__(7674); +var setToStringTag = __webpack_require__(8003); +var createNonEnumerableProperty = __webpack_require__(8880); +var redefine = __webpack_require__(1320); +var wellKnownSymbol = __webpack_require__(5112); +var Iterators = __webpack_require__(7497); +var IteratorsCore = __webpack_require__(3383); + +var PROPER_FUNCTION_NAME = FunctionName.PROPER; +var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; +var IteratorPrototype = IteratorsCore.IteratorPrototype; +var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; +var ITERATOR = wellKnownSymbol('iterator'); +var KEYS = 'keys'; +var VALUES = 'values'; +var ENTRIES = 'entries'; + +var returnThis = function () { return this; }; + +module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { + createIteratorConstructor(IteratorConstructor, NAME, next); + + var getIterationMethod = function (KIND) { + if (KIND === DEFAULT && defaultIterator) return defaultIterator; + if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; + switch (KIND) { + case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; + case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; + case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; + } return function () { return new IteratorConstructor(this); }; + }; + + var TO_STRING_TAG = NAME + ' Iterator'; + var INCORRECT_VALUES_NAME = false; + var IterablePrototype = Iterable.prototype; + var nativeIterator = IterablePrototype[ITERATOR] + || IterablePrototype['@@iterator'] + || DEFAULT && IterablePrototype[DEFAULT]; + var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); + var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; + var CurrentIteratorPrototype, methods, KEY; + + // fix native + if (anyNativeIterator) { + CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); + if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { + if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { + if (setPrototypeOf) { + setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); + } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) { + redefine(CurrentIteratorPrototype, ITERATOR, returnThis); + } + } + // Set @@toStringTag to native iterators + setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); + if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; + } + } + + // fix Array.prototype.{ values, @@iterator }.name in V8 / FF + if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { + if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) { + createNonEnumerableProperty(IterablePrototype, 'name', VALUES); + } else { + INCORRECT_VALUES_NAME = true; + defaultIterator = function values() { return call(nativeIterator, this); }; + } + } + + // export additional methods + if (DEFAULT) { + methods = { + values: getIterationMethod(VALUES), + keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), + entries: getIterationMethod(ENTRIES) + }; + if (FORCED) for (KEY in methods) { + if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { + redefine(IterablePrototype, KEY, methods[KEY]); + } + } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); + } + + // define iterator + if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { + redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT }); + } + Iterators[NAME] = defaultIterator; + + return methods; +}; + + +/***/ }), + +/***/ 7235: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var path = __webpack_require__(857); +var hasOwn = __webpack_require__(2597); +var wrappedWellKnownSymbolModule = __webpack_require__(6061); +var defineProperty = (__webpack_require__(3070).f); + +module.exports = function (NAME) { + var Symbol = path.Symbol || (path.Symbol = {}); + if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, { + value: wrappedWellKnownSymbolModule.f(NAME) + }); +}; + + +/***/ }), + +/***/ 9781: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); + +// Detect IE8's incomplete defineProperty implementation +module.exports = !fails(function () { + // eslint-disable-next-line es/no-object-defineproperty -- required for testing + return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; +}); + + +/***/ }), + +/***/ 317: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isObject = __webpack_require__(111); + +var document = global.document; +// typeof document.createElement is 'object' in old IE +var EXISTS = isObject(document) && isObject(document.createElement); + +module.exports = function (it) { + return EXISTS ? document.createElement(it) : {}; +}; + + +/***/ }), + +/***/ 8324: +/***/ (function(module) { + +// iterable DOM collections +// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods +module.exports = { + CSSRuleList: 0, + CSSStyleDeclaration: 0, + CSSValueList: 0, + ClientRectList: 0, + DOMRectList: 0, + DOMStringList: 0, + DOMTokenList: 1, + DataTransferItemList: 0, + FileList: 0, + HTMLAllCollection: 0, + HTMLCollection: 0, + HTMLFormElement: 0, + HTMLSelectElement: 0, + MediaList: 0, + MimeTypeArray: 0, + NamedNodeMap: 0, + NodeList: 1, + PaintRequestList: 0, + Plugin: 0, + PluginArray: 0, + SVGLengthList: 0, + SVGNumberList: 0, + SVGPathSegList: 0, + SVGPointList: 0, + SVGStringList: 0, + SVGTransformList: 0, + SourceBufferList: 0, + StyleSheetList: 0, + TextTrackCueList: 0, + TextTrackList: 0, + TouchList: 0 +}; + + +/***/ }), + +/***/ 8509: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +// in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` +var documentCreateElement = __webpack_require__(317); + +var classList = documentCreateElement('span').classList; +var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype; + +module.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype; + + +/***/ }), + +/***/ 8886: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var userAgent = __webpack_require__(8113); + +var firefox = userAgent.match(/firefox\/(\d+)/i); + +module.exports = !!firefox && +firefox[1]; + + +/***/ }), + +/***/ 7871: +/***/ (function(module) { + +module.exports = typeof window == 'object'; + + +/***/ }), + +/***/ 256: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var UA = __webpack_require__(8113); + +module.exports = /MSIE|Trident/.test(UA); + + +/***/ }), + +/***/ 1528: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var userAgent = __webpack_require__(8113); +var global = __webpack_require__(7854); + +module.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined; + + +/***/ }), + +/***/ 6833: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var userAgent = __webpack_require__(8113); + +module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent); + + +/***/ }), + +/***/ 5268: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var classof = __webpack_require__(4326); +var global = __webpack_require__(7854); + +module.exports = classof(global.process) == 'process'; + + +/***/ }), + +/***/ 1036: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var userAgent = __webpack_require__(8113); + +module.exports = /web0s(?!.*chrome)/i.test(userAgent); + + +/***/ }), + +/***/ 8113: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var getBuiltIn = __webpack_require__(5005); + +module.exports = getBuiltIn('navigator', 'userAgent') || ''; + + +/***/ }), + +/***/ 7392: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var userAgent = __webpack_require__(8113); + +var process = global.process; +var Deno = global.Deno; +var versions = process && process.versions || Deno && Deno.version; +var v8 = versions && versions.v8; +var match, version; + +if (v8) { + match = v8.split('.'); + // in old Chrome, versions of V8 isn't V8 = Chrome / 10 + // but their correct versions are not interesting for us + version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); +} + +// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` +// so check `userAgent` even if `.v8` exists, but 0 +if (!version && userAgent) { + match = userAgent.match(/Edge\/(\d+)/); + if (!match || match[1] >= 74) { + match = userAgent.match(/Chrome\/(\d+)/); + if (match) version = +match[1]; + } +} + +module.exports = version; + + +/***/ }), + +/***/ 8008: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var userAgent = __webpack_require__(8113); + +var webkit = userAgent.match(/AppleWebKit\/(\d+)\./); + +module.exports = !!webkit && +webkit[1]; + + +/***/ }), + +/***/ 748: +/***/ (function(module) { + +// IE8- don't enum bug keys +module.exports = [ + 'constructor', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'toLocaleString', + 'toString', + 'valueOf' +]; + + +/***/ }), + +/***/ 2914: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); +var createPropertyDescriptor = __webpack_require__(9114); + +module.exports = !fails(function () { + var error = Error('a'); + if (!('stack' in error)) return true; + // eslint-disable-next-line es/no-object-defineproperty -- safe + Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7)); + return error.stack !== 7; +}); + + +/***/ }), + +/***/ 2109: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var getOwnPropertyDescriptor = (__webpack_require__(1236).f); +var createNonEnumerableProperty = __webpack_require__(8880); +var redefine = __webpack_require__(1320); +var setGlobal = __webpack_require__(3505); +var copyConstructorProperties = __webpack_require__(9920); +var isForced = __webpack_require__(4705); + +/* + options.target - name of the target object + options.global - target is the global object + options.stat - export as static methods of target + options.proto - export as prototype methods of target + options.real - real prototype method for the `pure` version + options.forced - export even if the native feature is available + options.bind - bind methods to the target, required for the `pure` version + options.wrap - wrap constructors to preventing global pollution, required for the `pure` version + options.unsafe - use the simple assignment of property instead of delete + defineProperty + options.sham - add a flag to not completely full polyfills + options.enumerable - export as enumerable property + options.noTargetGet - prevent calling a getter on target + options.name - the .name of the function if it does not match the key +*/ +module.exports = function (options, source) { + var TARGET = options.target; + var GLOBAL = options.global; + var STATIC = options.stat; + var FORCED, target, key, targetProperty, sourceProperty, descriptor; + if (GLOBAL) { + target = global; + } else if (STATIC) { + target = global[TARGET] || setGlobal(TARGET, {}); + } else { + target = (global[TARGET] || {}).prototype; + } + if (target) for (key in source) { + sourceProperty = source[key]; + if (options.noTargetGet) { + descriptor = getOwnPropertyDescriptor(target, key); + targetProperty = descriptor && descriptor.value; + } else targetProperty = target[key]; + FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); + // contained in target + if (!FORCED && targetProperty !== undefined) { + if (typeof sourceProperty == typeof targetProperty) continue; + copyConstructorProperties(sourceProperty, targetProperty); + } + // add a flag to not completely full polyfills + if (options.sham || (targetProperty && targetProperty.sham)) { + createNonEnumerableProperty(sourceProperty, 'sham', true); + } + // extend global + redefine(target, key, sourceProperty, options); + } +}; + + +/***/ }), + +/***/ 7293: +/***/ (function(module) { + +module.exports = function (exec) { + try { + return !!exec(); + } catch (error) { + return true; + } +}; + + +/***/ }), + +/***/ 7007: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +// TODO: Remove from `core-js@4` since it's moved to entry points +__webpack_require__(4916); +var uncurryThis = __webpack_require__(1702); +var redefine = __webpack_require__(1320); +var regexpExec = __webpack_require__(2261); +var fails = __webpack_require__(7293); +var wellKnownSymbol = __webpack_require__(5112); +var createNonEnumerableProperty = __webpack_require__(8880); + +var SPECIES = wellKnownSymbol('species'); +var RegExpPrototype = RegExp.prototype; + +module.exports = function (KEY, exec, FORCED, SHAM) { + var SYMBOL = wellKnownSymbol(KEY); + + var DELEGATES_TO_SYMBOL = !fails(function () { + // String methods call symbol-named RegEp methods + var O = {}; + O[SYMBOL] = function () { return 7; }; + return ''[KEY](O) != 7; + }); + + var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { + // Symbol-named RegExp methods call .exec + var execCalled = false; + var re = /a/; + + if (KEY === 'split') { + // We can't use real regex here since it causes deoptimization + // and serious performance degradation in V8 + // https://github.com/zloirock/core-js/issues/306 + re = {}; + // RegExp[@@split] doesn't call the regex's exec method, but first creates + // a new one. We need to return the patched regex when creating the new one. + re.constructor = {}; + re.constructor[SPECIES] = function () { return re; }; + re.flags = ''; + re[SYMBOL] = /./[SYMBOL]; + } + + re.exec = function () { execCalled = true; return null; }; + + re[SYMBOL](''); + return !execCalled; + }); + + if ( + !DELEGATES_TO_SYMBOL || + !DELEGATES_TO_EXEC || + FORCED + ) { + var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]); + var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { + var uncurriedNativeMethod = uncurryThis(nativeMethod); + var $exec = regexp.exec; + if ($exec === regexpExec || $exec === RegExpPrototype.exec) { + if (DELEGATES_TO_SYMBOL && !forceStringMethod) { + // The native String method already delegates to @@method (this + // polyfilled function), leasing to infinite recursion. + // We avoid it by directly calling the native @@method method. + return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) }; + } + return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) }; + } + return { done: false }; + }); + + redefine(String.prototype, KEY, methods[0]); + redefine(RegExpPrototype, SYMBOL, methods[1]); + } + + if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true); +}; + + +/***/ }), + +/***/ 6677: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); + +module.exports = !fails(function () { + // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing + return Object.isExtensible(Object.preventExtensions({})); +}); + + +/***/ }), + +/***/ 2104: +/***/ (function(module) { + +var FunctionPrototype = Function.prototype; +var apply = FunctionPrototype.apply; +var bind = FunctionPrototype.bind; +var call = FunctionPrototype.call; + +// eslint-disable-next-line es/no-reflect -- safe +module.exports = typeof Reflect == 'object' && Reflect.apply || (bind ? call.bind(apply) : function () { + return call.apply(apply, arguments); +}); + + +/***/ }), + +/***/ 9974: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var aCallable = __webpack_require__(9662); + +var bind = uncurryThis(uncurryThis.bind); + +// optional / simple context binding +module.exports = function (fn, that) { + aCallable(fn); + return that === undefined ? fn : bind ? bind(fn, that) : function (/* ...args */) { + return fn.apply(that, arguments); + }; +}; + + +/***/ }), + +/***/ 7065: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var aCallable = __webpack_require__(9662); +var isObject = __webpack_require__(111); +var hasOwn = __webpack_require__(2597); +var arraySlice = __webpack_require__(206); + +var Function = global.Function; +var concat = uncurryThis([].concat); +var join = uncurryThis([].join); +var factories = {}; + +var construct = function (C, argsLength, args) { + if (!hasOwn(factories, argsLength)) { + for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; + factories[argsLength] = Function('C,a', 'return new C(' + join(list, ',') + ')'); + } return factories[argsLength](C, args); +}; + +// `Function.prototype.bind` method implementation +// https://tc39.es/ecma262/#sec-function.prototype.bind +module.exports = Function.bind || function bind(that /* , ...args */) { + var F = aCallable(this); + var Prototype = F.prototype; + var partArgs = arraySlice(arguments, 1); + var boundFunction = function bound(/* args... */) { + var args = concat(partArgs, arraySlice(arguments)); + return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args); + }; + if (isObject(Prototype)) boundFunction.prototype = Prototype; + return boundFunction; +}; + + +/***/ }), + +/***/ 6916: +/***/ (function(module) { + +var call = Function.prototype.call; + +module.exports = call.bind ? call.bind(call) : function () { + return call.apply(call, arguments); +}; + + +/***/ }), + +/***/ 6530: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(9781); +var hasOwn = __webpack_require__(2597); + +var FunctionPrototype = Function.prototype; +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe +var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; + +var EXISTS = hasOwn(FunctionPrototype, 'name'); +// additional protection from minified / mangled / dropped function names +var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; +var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable)); + +module.exports = { + EXISTS: EXISTS, + PROPER: PROPER, + CONFIGURABLE: CONFIGURABLE +}; + + +/***/ }), + +/***/ 1702: +/***/ (function(module) { + +var FunctionPrototype = Function.prototype; +var bind = FunctionPrototype.bind; +var call = FunctionPrototype.call; +var callBind = bind && bind.bind(call); + +module.exports = bind ? function (fn) { + return fn && callBind(call, fn); +} : function (fn) { + return fn && function () { + return call.apply(fn, arguments); + }; +}; + + +/***/ }), + +/***/ 5005: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isCallable = __webpack_require__(614); + +var aFunction = function (argument) { + return isCallable(argument) ? argument : undefined; +}; + +module.exports = function (namespace, method) { + return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method]; +}; + + +/***/ }), + +/***/ 1246: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var classof = __webpack_require__(648); +var getMethod = __webpack_require__(8173); +var Iterators = __webpack_require__(7497); +var wellKnownSymbol = __webpack_require__(5112); + +var ITERATOR = wellKnownSymbol('iterator'); + +module.exports = function (it) { + if (it != undefined) return getMethod(it, ITERATOR) + || getMethod(it, '@@iterator') + || Iterators[classof(it)]; +}; + + +/***/ }), + +/***/ 8554: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var call = __webpack_require__(6916); +var aCallable = __webpack_require__(9662); +var anObject = __webpack_require__(9670); +var tryToString = __webpack_require__(6330); +var getIteratorMethod = __webpack_require__(1246); + +var TypeError = global.TypeError; + +module.exports = function (argument, usingIterator) { + var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator; + if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument)); + throw TypeError(tryToString(argument) + ' is not iterable'); +}; + + +/***/ }), + +/***/ 8173: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var aCallable = __webpack_require__(9662); + +// `GetMethod` abstract operation +// https://tc39.es/ecma262/#sec-getmethod +module.exports = function (V, P) { + var func = V[P]; + return func == null ? undefined : aCallable(func); +}; + + +/***/ }), + +/***/ 647: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var toObject = __webpack_require__(7908); + +var floor = Math.floor; +var charAt = uncurryThis(''.charAt); +var replace = uncurryThis(''.replace); +var stringSlice = uncurryThis(''.slice); +var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; +var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; + +// `GetSubstitution` abstract operation +// https://tc39.es/ecma262/#sec-getsubstitution +module.exports = function (matched, str, position, captures, namedCaptures, replacement) { + var tailPos = position + matched.length; + var m = captures.length; + var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; + if (namedCaptures !== undefined) { + namedCaptures = toObject(namedCaptures); + symbols = SUBSTITUTION_SYMBOLS; + } + return replace(replacement, symbols, function (match, ch) { + var capture; + switch (charAt(ch, 0)) { + case '$': return '$'; + case '&': return matched; + case '`': return stringSlice(str, 0, position); + case "'": return stringSlice(str, tailPos); + case '<': + capture = namedCaptures[stringSlice(ch, 1, -1)]; + break; + default: // \d\d? + var n = +ch; + if (n === 0) return match; + if (n > m) { + var f = floor(n / 10); + if (f === 0) return match; + if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1); + return match; + } + capture = captures[n - 1]; + } + return capture === undefined ? '' : capture; + }); +}; + + +/***/ }), + +/***/ 7854: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var check = function (it) { + return it && it.Math == Math && it; +}; + +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +module.exports = + // eslint-disable-next-line es/no-global-this -- safe + check(typeof globalThis == 'object' && globalThis) || + check(typeof window == 'object' && window) || + // eslint-disable-next-line no-restricted-globals -- safe + check(typeof self == 'object' && self) || + check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) || + // eslint-disable-next-line no-new-func -- fallback + (function () { return this; })() || Function('return this')(); + + +/***/ }), + +/***/ 2597: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var toObject = __webpack_require__(7908); + +var hasOwnProperty = uncurryThis({}.hasOwnProperty); + +// `HasOwnProperty` abstract operation +// https://tc39.es/ecma262/#sec-hasownproperty +module.exports = Object.hasOwn || function hasOwn(it, key) { + return hasOwnProperty(toObject(it), key); +}; + + +/***/ }), + +/***/ 3501: +/***/ (function(module) { + +module.exports = {}; + + +/***/ }), + +/***/ 842: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); + +module.exports = function (a, b) { + var console = global.console; + if (console && console.error) { + arguments.length == 1 ? console.error(a) : console.error(a, b); + } +}; + + +/***/ }), + +/***/ 490: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var getBuiltIn = __webpack_require__(5005); + +module.exports = getBuiltIn('document', 'documentElement'); + + +/***/ }), + +/***/ 4664: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(9781); +var fails = __webpack_require__(7293); +var createElement = __webpack_require__(317); + +// Thank's IE8 for his funny defineProperty +module.exports = !DESCRIPTORS && !fails(function () { + // eslint-disable-next-line es/no-object-defineproperty -- requied for testing + return Object.defineProperty(createElement('div'), 'a', { + get: function () { return 7; } + }).a != 7; +}); + + +/***/ }), + +/***/ 1179: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +// IEEE754 conversions based on https://github.com/feross/ieee754 +var global = __webpack_require__(7854); + +var Array = global.Array; +var abs = Math.abs; +var pow = Math.pow; +var floor = Math.floor; +var log = Math.log; +var LN2 = Math.LN2; + +var pack = function (number, mantissaLength, bytes) { + var buffer = Array(bytes); + var exponentLength = bytes * 8 - mantissaLength - 1; + var eMax = (1 << exponentLength) - 1; + var eBias = eMax >> 1; + var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0; + var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0; + var index = 0; + var exponent, mantissa, c; + number = abs(number); + // eslint-disable-next-line no-self-compare -- NaN check + if (number != number || number === Infinity) { + // eslint-disable-next-line no-self-compare -- NaN check + mantissa = number != number ? 1 : 0; + exponent = eMax; + } else { + exponent = floor(log(number) / LN2); + if (number * (c = pow(2, -exponent)) < 1) { + exponent--; + c *= 2; + } + if (exponent + eBias >= 1) { + number += rt / c; + } else { + number += rt * pow(2, 1 - eBias); + } + if (number * c >= 2) { + exponent++; + c /= 2; + } + if (exponent + eBias >= eMax) { + mantissa = 0; + exponent = eMax; + } else if (exponent + eBias >= 1) { + mantissa = (number * c - 1) * pow(2, mantissaLength); + exponent = exponent + eBias; + } else { + mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength); + exponent = 0; + } + } + for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8); + exponent = exponent << mantissaLength | mantissa; + exponentLength += mantissaLength; + for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8); + buffer[--index] |= sign * 128; + return buffer; +}; + +var unpack = function (buffer, mantissaLength) { + var bytes = buffer.length; + var exponentLength = bytes * 8 - mantissaLength - 1; + var eMax = (1 << exponentLength) - 1; + var eBias = eMax >> 1; + var nBits = exponentLength - 7; + var index = bytes - 1; + var sign = buffer[index--]; + var exponent = sign & 127; + var mantissa; + sign >>= 7; + for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8); + mantissa = exponent & (1 << -nBits) - 1; + exponent >>= -nBits; + nBits += mantissaLength; + for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8); + if (exponent === 0) { + exponent = 1 - eBias; + } else if (exponent === eMax) { + return mantissa ? NaN : sign ? -Infinity : Infinity; + } else { + mantissa = mantissa + pow(2, mantissaLength); + exponent = exponent - eBias; + } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); +}; + +module.exports = { + pack: pack, + unpack: unpack +}; + + +/***/ }), + +/***/ 8361: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var fails = __webpack_require__(7293); +var classof = __webpack_require__(4326); + +var Object = global.Object; +var split = uncurryThis(''.split); + +// fallback for non-array-like ES3 and non-enumerable old V8 strings +module.exports = fails(function () { + // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 + // eslint-disable-next-line no-prototype-builtins -- safe + return !Object('z').propertyIsEnumerable(0); +}) ? function (it) { + return classof(it) == 'String' ? split(it, '') : Object(it); +} : Object; + + +/***/ }), + +/***/ 9587: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var isCallable = __webpack_require__(614); +var isObject = __webpack_require__(111); +var setPrototypeOf = __webpack_require__(7674); + +// makes subclassing work correct for wrapped built-ins +module.exports = function ($this, dummy, Wrapper) { + var NewTarget, NewTargetPrototype; + if ( + // it can work only with native `setPrototypeOf` + setPrototypeOf && + // we haven't completely correct pre-ES6 way for getting `new.target`, so use this + isCallable(NewTarget = dummy.constructor) && + NewTarget !== Wrapper && + isObject(NewTargetPrototype = NewTarget.prototype) && + NewTargetPrototype !== Wrapper.prototype + ) setPrototypeOf($this, NewTargetPrototype); + return $this; +}; + + +/***/ }), + +/***/ 2788: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var isCallable = __webpack_require__(614); +var store = __webpack_require__(5465); + +var functionToString = uncurryThis(Function.toString); + +// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper +if (!isCallable(store.inspectSource)) { + store.inspectSource = function (it) { + return functionToString(it); + }; +} + +module.exports = store.inspectSource; + + +/***/ }), + +/***/ 8340: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var isObject = __webpack_require__(111); +var createNonEnumerableProperty = __webpack_require__(8880); + +// `InstallErrorCause` abstract operation +// https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause +module.exports = function (O, options) { + if (isObject(options) && 'cause' in options) { + createNonEnumerableProperty(O, 'cause', options.cause); + } +}; + + +/***/ }), + +/***/ 2423: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var uncurryThis = __webpack_require__(1702); +var hiddenKeys = __webpack_require__(3501); +var isObject = __webpack_require__(111); +var hasOwn = __webpack_require__(2597); +var defineProperty = (__webpack_require__(3070).f); +var getOwnPropertyNamesModule = __webpack_require__(8006); +var getOwnPropertyNamesExternalModule = __webpack_require__(1156); +var uid = __webpack_require__(9711); +var FREEZING = __webpack_require__(6677); + +var REQUIRED = false; +var METADATA = uid('meta'); +var id = 0; + +// eslint-disable-next-line es/no-object-isextensible -- safe +var isExtensible = Object.isExtensible || function () { + return true; +}; + +var setMetadata = function (it) { + defineProperty(it, METADATA, { value: { + objectID: 'O' + id++, // object ID + weakData: {} // weak collections IDs + } }); +}; + +var fastKey = function (it, create) { + // return a primitive with prefix + if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if (!hasOwn(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return 'F'; + // not necessary to add metadata + if (!create) return 'E'; + // add missing metadata + setMetadata(it); + // return object ID + } return it[METADATA].objectID; +}; + +var getWeakData = function (it, create) { + if (!hasOwn(it, METADATA)) { + // can't set metadata to uncaught frozen object + if (!isExtensible(it)) return true; + // not necessary to add metadata + if (!create) return false; + // add missing metadata + setMetadata(it); + // return the store of weak collections IDs + } return it[METADATA].weakData; +}; + +// add metadata on freeze-family methods calling +var onFreeze = function (it) { + if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it); + return it; +}; + +var enable = function () { + meta.enable = function () { /* empty */ }; + REQUIRED = true; + var getOwnPropertyNames = getOwnPropertyNamesModule.f; + var splice = uncurryThis([].splice); + var test = {}; + test[METADATA] = 1; + + // prevent exposing of metadata key + if (getOwnPropertyNames(test).length) { + getOwnPropertyNamesModule.f = function (it) { + var result = getOwnPropertyNames(it); + for (var i = 0, length = result.length; i < length; i++) { + if (result[i] === METADATA) { + splice(result, i, 1); + break; + } + } return result; + }; + + $({ target: 'Object', stat: true, forced: true }, { + getOwnPropertyNames: getOwnPropertyNamesExternalModule.f + }); + } +}; + +var meta = module.exports = { + enable: enable, + fastKey: fastKey, + getWeakData: getWeakData, + onFreeze: onFreeze +}; + +hiddenKeys[METADATA] = true; + + +/***/ }), + +/***/ 9909: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var NATIVE_WEAK_MAP = __webpack_require__(8536); +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var isObject = __webpack_require__(111); +var createNonEnumerableProperty = __webpack_require__(8880); +var hasOwn = __webpack_require__(2597); +var shared = __webpack_require__(5465); +var sharedKey = __webpack_require__(6200); +var hiddenKeys = __webpack_require__(3501); + +var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; +var TypeError = global.TypeError; +var WeakMap = global.WeakMap; +var set, get, has; + +var enforce = function (it) { + return has(it) ? get(it) : set(it, {}); +}; + +var getterFor = function (TYPE) { + return function (it) { + var state; + if (!isObject(it) || (state = get(it)).type !== TYPE) { + throw TypeError('Incompatible receiver, ' + TYPE + ' required'); + } return state; + }; +}; + +if (NATIVE_WEAK_MAP || shared.state) { + var store = shared.state || (shared.state = new WeakMap()); + var wmget = uncurryThis(store.get); + var wmhas = uncurryThis(store.has); + var wmset = uncurryThis(store.set); + set = function (it, metadata) { + if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); + metadata.facade = it; + wmset(store, it, metadata); + return metadata; + }; + get = function (it) { + return wmget(store, it) || {}; + }; + has = function (it) { + return wmhas(store, it); + }; +} else { + var STATE = sharedKey('state'); + hiddenKeys[STATE] = true; + set = function (it, metadata) { + if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); + metadata.facade = it; + createNonEnumerableProperty(it, STATE, metadata); + return metadata; + }; + get = function (it) { + return hasOwn(it, STATE) ? it[STATE] : {}; + }; + has = function (it) { + return hasOwn(it, STATE); + }; +} + +module.exports = { + set: set, + get: get, + has: has, + enforce: enforce, + getterFor: getterFor +}; + + +/***/ }), + +/***/ 7659: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(5112); +var Iterators = __webpack_require__(7497); + +var ITERATOR = wellKnownSymbol('iterator'); +var ArrayPrototype = Array.prototype; + +// check on default Array iterator +module.exports = function (it) { + return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); +}; + + +/***/ }), + +/***/ 3157: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var classof = __webpack_require__(4326); + +// `IsArray` abstract operation +// https://tc39.es/ecma262/#sec-isarray +// eslint-disable-next-line es/no-array-isarray -- safe +module.exports = Array.isArray || function isArray(argument) { + return classof(argument) == 'Array'; +}; + + +/***/ }), + +/***/ 614: +/***/ (function(module) { + +// `IsCallable` abstract operation +// https://tc39.es/ecma262/#sec-iscallable +module.exports = function (argument) { + return typeof argument == 'function'; +}; + + +/***/ }), + +/***/ 4411: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var fails = __webpack_require__(7293); +var isCallable = __webpack_require__(614); +var classof = __webpack_require__(648); +var getBuiltIn = __webpack_require__(5005); +var inspectSource = __webpack_require__(2788); + +var noop = function () { /* empty */ }; +var empty = []; +var construct = getBuiltIn('Reflect', 'construct'); +var constructorRegExp = /^\s*(?:class|function)\b/; +var exec = uncurryThis(constructorRegExp.exec); +var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); + +var isConstructorModern = function (argument) { + if (!isCallable(argument)) return false; + try { + construct(noop, empty, argument); + return true; + } catch (error) { + return false; + } +}; + +var isConstructorLegacy = function (argument) { + if (!isCallable(argument)) return false; + switch (classof(argument)) { + case 'AsyncFunction': + case 'GeneratorFunction': + case 'AsyncGeneratorFunction': return false; + // we can't check .prototype since constructors produced by .bind haven't it + } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument)); +}; + +// `IsConstructor` abstract operation +// https://tc39.es/ecma262/#sec-isconstructor +module.exports = !construct || fails(function () { + var called; + return isConstructorModern(isConstructorModern.call) + || !isConstructorModern(Object) + || !isConstructorModern(function () { called = true; }) + || called; +}) ? isConstructorLegacy : isConstructorModern; + + +/***/ }), + +/***/ 4705: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); +var isCallable = __webpack_require__(614); + +var replacement = /#|\.prototype\./; + +var isForced = function (feature, detection) { + var value = data[normalize(feature)]; + return value == POLYFILL ? true + : value == NATIVE ? false + : isCallable(detection) ? fails(detection) + : !!detection; +}; + +var normalize = isForced.normalize = function (string) { + return String(string).replace(replacement, '.').toLowerCase(); +}; + +var data = isForced.data = {}; +var NATIVE = isForced.NATIVE = 'N'; +var POLYFILL = isForced.POLYFILL = 'P'; + +module.exports = isForced; + + +/***/ }), + +/***/ 5988: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var isObject = __webpack_require__(111); + +var floor = Math.floor; + +// `IsIntegralNumber` abstract operation +// https://tc39.es/ecma262/#sec-isintegralnumber +// eslint-disable-next-line es/no-number-isinteger -- safe +module.exports = Number.isInteger || function isInteger(it) { + return !isObject(it) && isFinite(it) && floor(it) === it; +}; + + +/***/ }), + +/***/ 111: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var isCallable = __webpack_require__(614); + +module.exports = function (it) { + return typeof it == 'object' ? it !== null : isCallable(it); +}; + + +/***/ }), + +/***/ 1913: +/***/ (function(module) { + +module.exports = false; + + +/***/ }), + +/***/ 7850: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var isObject = __webpack_require__(111); +var classof = __webpack_require__(4326); +var wellKnownSymbol = __webpack_require__(5112); + +var MATCH = wellKnownSymbol('match'); + +// `IsRegExp` abstract operation +// https://tc39.es/ecma262/#sec-isregexp +module.exports = function (it) { + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp'); +}; + + +/***/ }), + +/***/ 2190: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var getBuiltIn = __webpack_require__(5005); +var isCallable = __webpack_require__(614); +var isPrototypeOf = __webpack_require__(7976); +var USE_SYMBOL_AS_UID = __webpack_require__(3307); + +var Object = global.Object; + +module.exports = USE_SYMBOL_AS_UID ? function (it) { + return typeof it == 'symbol'; +} : function (it) { + var $Symbol = getBuiltIn('Symbol'); + return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it)); +}; + + +/***/ }), + +/***/ 408: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var bind = __webpack_require__(9974); +var call = __webpack_require__(6916); +var anObject = __webpack_require__(9670); +var tryToString = __webpack_require__(6330); +var isArrayIteratorMethod = __webpack_require__(7659); +var lengthOfArrayLike = __webpack_require__(6244); +var isPrototypeOf = __webpack_require__(7976); +var getIterator = __webpack_require__(8554); +var getIteratorMethod = __webpack_require__(1246); +var iteratorClose = __webpack_require__(9212); + +var TypeError = global.TypeError; + +var Result = function (stopped, result) { + this.stopped = stopped; + this.result = result; +}; + +var ResultPrototype = Result.prototype; + +module.exports = function (iterable, unboundFunction, options) { + var that = options && options.that; + var AS_ENTRIES = !!(options && options.AS_ENTRIES); + var IS_ITERATOR = !!(options && options.IS_ITERATOR); + var INTERRUPTED = !!(options && options.INTERRUPTED); + var fn = bind(unboundFunction, that); + var iterator, iterFn, index, length, result, next, step; + + var stop = function (condition) { + if (iterator) iteratorClose(iterator, 'normal', condition); + return new Result(true, condition); + }; + + var callFn = function (value) { + if (AS_ENTRIES) { + anObject(value); + return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); + } return INTERRUPTED ? fn(value, stop) : fn(value); + }; + + if (IS_ITERATOR) { + iterator = iterable; + } else { + iterFn = getIteratorMethod(iterable); + if (!iterFn) throw TypeError(tryToString(iterable) + ' is not iterable'); + // optimisation for array iterators + if (isArrayIteratorMethod(iterFn)) { + for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) { + result = callFn(iterable[index]); + if (result && isPrototypeOf(ResultPrototype, result)) return result; + } return new Result(false); + } + iterator = getIterator(iterable, iterFn); + } + + next = iterator.next; + while (!(step = call(next, iterator)).done) { + try { + result = callFn(step.value); + } catch (error) { + iteratorClose(iterator, 'throw', error); + } + if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result; + } return new Result(false); +}; + + +/***/ }), + +/***/ 9212: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var call = __webpack_require__(6916); +var anObject = __webpack_require__(9670); +var getMethod = __webpack_require__(8173); + +module.exports = function (iterator, kind, value) { + var innerResult, innerError; + anObject(iterator); + try { + innerResult = getMethod(iterator, 'return'); + if (!innerResult) { + if (kind === 'throw') throw value; + return value; + } + innerResult = call(innerResult, iterator); + } catch (error) { + innerError = true; + innerResult = error; + } + if (kind === 'throw') throw value; + if (innerError) throw innerResult; + anObject(innerResult); + return value; +}; + + +/***/ }), + +/***/ 3383: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var fails = __webpack_require__(7293); +var isCallable = __webpack_require__(614); +var create = __webpack_require__(30); +var getPrototypeOf = __webpack_require__(9518); +var redefine = __webpack_require__(1320); +var wellKnownSymbol = __webpack_require__(5112); +var IS_PURE = __webpack_require__(1913); + +var ITERATOR = wellKnownSymbol('iterator'); +var BUGGY_SAFARI_ITERATORS = false; + +// `%IteratorPrototype%` object +// https://tc39.es/ecma262/#sec-%iteratorprototype%-object +var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; + +/* eslint-disable es/no-array-prototype-keys -- safe */ +if ([].keys) { + arrayIterator = [].keys(); + // Safari 8 has buggy iterators w/o `next` + if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; + else { + PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); + if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; + } +} + +var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () { + var test = {}; + // FF44- legacy iterators case + return IteratorPrototype[ITERATOR].call(test) !== test; +}); + +if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; +else if (IS_PURE) IteratorPrototype = create(IteratorPrototype); + +// `%IteratorPrototype%[@@iterator]()` method +// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator +if (!isCallable(IteratorPrototype[ITERATOR])) { + redefine(IteratorPrototype, ITERATOR, function () { + return this; + }); +} + +module.exports = { + IteratorPrototype: IteratorPrototype, + BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS +}; + + +/***/ }), + +/***/ 7497: +/***/ (function(module) { + +module.exports = {}; + + +/***/ }), + +/***/ 6244: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var toLength = __webpack_require__(7466); + +// `LengthOfArrayLike` abstract operation +// https://tc39.es/ecma262/#sec-lengthofarraylike +module.exports = function (obj) { + return toLength(obj.length); +}; + + +/***/ }), + +/***/ 5948: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var bind = __webpack_require__(9974); +var getOwnPropertyDescriptor = (__webpack_require__(1236).f); +var macrotask = (__webpack_require__(261).set); +var IS_IOS = __webpack_require__(6833); +var IS_IOS_PEBBLE = __webpack_require__(1528); +var IS_WEBOS_WEBKIT = __webpack_require__(1036); +var IS_NODE = __webpack_require__(5268); + +var MutationObserver = global.MutationObserver || global.WebKitMutationObserver; +var document = global.document; +var process = global.process; +var Promise = global.Promise; +// Node.js 11 shows ExperimentalWarning on getting `queueMicrotask` +var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask'); +var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; + +var flush, head, last, notify, toggle, node, promise, then; + +// modern engines have queueMicrotask method +if (!queueMicrotask) { + flush = function () { + var parent, fn; + if (IS_NODE && (parent = process.domain)) parent.exit(); + while (head) { + fn = head.fn; + head = head.next; + try { + fn(); + } catch (error) { + if (head) notify(); + else last = undefined; + throw error; + } + } last = undefined; + if (parent) parent.enter(); + }; + + // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 + // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898 + if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) { + toggle = true; + node = document.createTextNode(''); + new MutationObserver(flush).observe(node, { characterData: true }); + notify = function () { + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) { + // Promise.resolve without an argument throws an error in LG WebOS 2 + promise = Promise.resolve(undefined); + // workaround of WebKit ~ iOS Safari 10.1 bug + promise.constructor = Promise; + then = bind(promise.then, promise); + notify = function () { + then(flush); + }; + // Node.js without promises + } else if (IS_NODE) { + notify = function () { + process.nextTick(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + // strange IE + webpack dev server bug - use .bind(global) + macrotask = bind(macrotask, global); + notify = function () { + macrotask(flush); + }; + } +} + +module.exports = queueMicrotask || function (fn) { + var task = { fn: fn, next: undefined }; + if (last) last.next = task; + if (!head) { + head = task; + notify(); + } last = task; +}; + + +/***/ }), + +/***/ 3366: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); + +module.exports = global.Promise; + + +/***/ }), + +/***/ 133: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* eslint-disable es/no-symbol -- required for testing */ +var V8_VERSION = __webpack_require__(7392); +var fails = __webpack_require__(7293); + +// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing +module.exports = !!Object.getOwnPropertySymbols && !fails(function () { + var symbol = Symbol(); + // Chrome 38 Symbol has incorrect toString conversion + // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances + return !String(symbol) || !(Object(symbol) instanceof Symbol) || + // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances + !Symbol.sham && V8_VERSION && V8_VERSION < 41; +}); + + +/***/ }), + +/***/ 8536: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isCallable = __webpack_require__(614); +var inspectSource = __webpack_require__(2788); + +var WeakMap = global.WeakMap; + +module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap)); + + +/***/ }), + +/***/ 8523: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var aCallable = __webpack_require__(9662); + +var PromiseCapability = function (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 = aCallable(resolve); + this.reject = aCallable(reject); +}; + +// `NewPromiseCapability` abstract operation +// https://tc39.es/ecma262/#sec-newpromisecapability +module.exports.f = function (C) { + return new PromiseCapability(C); +}; + + +/***/ }), + +/***/ 6277: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var toString = __webpack_require__(1340); + +module.exports = function (argument, $default) { + return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument); +}; + + +/***/ }), + +/***/ 3929: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isRegExp = __webpack_require__(7850); + +var TypeError = global.TypeError; + +module.exports = function (it) { + if (isRegExp(it)) { + throw TypeError("The method doesn't accept regular expressions"); + } return it; +}; + + +/***/ }), + +/***/ 7023: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); + +var globalIsFinite = global.isFinite; + +// `Number.isFinite` method +// https://tc39.es/ecma262/#sec-number.isfinite +// eslint-disable-next-line es/no-number-isfinite -- safe +module.exports = Number.isFinite || function isFinite(it) { + return typeof it == 'number' && globalIsFinite(it); +}; + + +/***/ }), + +/***/ 1574: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var DESCRIPTORS = __webpack_require__(9781); +var uncurryThis = __webpack_require__(1702); +var call = __webpack_require__(6916); +var fails = __webpack_require__(7293); +var objectKeys = __webpack_require__(1956); +var getOwnPropertySymbolsModule = __webpack_require__(5181); +var propertyIsEnumerableModule = __webpack_require__(5296); +var toObject = __webpack_require__(7908); +var IndexedObject = __webpack_require__(8361); + +// eslint-disable-next-line es/no-object-assign -- safe +var $assign = Object.assign; +// eslint-disable-next-line es/no-object-defineproperty -- required for testing +var defineProperty = Object.defineProperty; +var concat = uncurryThis([].concat); + +// `Object.assign` method +// https://tc39.es/ecma262/#sec-object.assign +module.exports = !$assign || fails(function () { + // should have correct order of operations (Edge bug) + if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', { + enumerable: true, + get: function () { + defineProperty(this, 'b', { + value: 3, + enumerable: false + }); + } + }), { b: 2 })).b !== 1) return true; + // should work with symbols and should have deterministic property order (V8 bug) + var A = {}; + var B = {}; + // eslint-disable-next-line es/no-symbol -- safe + var symbol = Symbol(); + var alphabet = 'abcdefghijklmnopqrst'; + A[symbol] = 7; + alphabet.split('').forEach(function (chr) { B[chr] = chr; }); + return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet; +}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` + var T = toObject(target); + var argumentsLength = arguments.length; + var index = 1; + var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; + var propertyIsEnumerable = propertyIsEnumerableModule.f; + while (argumentsLength > index) { + var S = IndexedObject(arguments[index++]); + var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S); + var length = keys.length; + var j = 0; + var key; + while (length > j) { + key = keys[j++]; + if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key]; + } + } return T; +} : $assign; + + +/***/ }), + +/***/ 30: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* global ActiveXObject -- old IE, WSH */ +var anObject = __webpack_require__(9670); +var defineProperties = __webpack_require__(6048); +var enumBugKeys = __webpack_require__(748); +var hiddenKeys = __webpack_require__(3501); +var html = __webpack_require__(490); +var documentCreateElement = __webpack_require__(317); +var sharedKey = __webpack_require__(6200); + +var GT = '>'; +var LT = '<'; +var PROTOTYPE = 'prototype'; +var SCRIPT = 'script'; +var IE_PROTO = sharedKey('IE_PROTO'); + +var EmptyConstructor = function () { /* empty */ }; + +var scriptTag = function (content) { + return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; +}; + +// Create object with fake `null` prototype: use ActiveX Object with cleared prototype +var NullProtoObjectViaActiveX = function (activeXDocument) { + activeXDocument.write(scriptTag('')); + activeXDocument.close(); + var temp = activeXDocument.parentWindow.Object; + activeXDocument = null; // avoid memory leak + return temp; +}; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var NullProtoObjectViaIFrame = function () { + // Thrash, waste and sodomy: IE GC bug + var iframe = documentCreateElement('iframe'); + var JS = 'java' + SCRIPT + ':'; + var iframeDocument; + iframe.style.display = 'none'; + html.appendChild(iframe); + // https://github.com/zloirock/core-js/issues/475 + iframe.src = String(JS); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(scriptTag('document.F=Object')); + iframeDocument.close(); + return iframeDocument.F; +}; + +// Check for document.domain and active x support +// No need to use active x approach when document.domain is not set +// see https://github.com/es-shims/es5-shim/issues/150 +// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 +// avoid IE GC bug +var activeXDocument; +var NullProtoObject = function () { + try { + activeXDocument = new ActiveXObject('htmlfile'); + } catch (error) { /* ignore */ } + NullProtoObject = typeof document != 'undefined' + ? document.domain && activeXDocument + ? NullProtoObjectViaActiveX(activeXDocument) // old IE + : NullProtoObjectViaIFrame() + : NullProtoObjectViaActiveX(activeXDocument); // WSH + var length = enumBugKeys.length; + while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; + return NullProtoObject(); +}; + +hiddenKeys[IE_PROTO] = true; + +// `Object.create` method +// https://tc39.es/ecma262/#sec-object.create +module.exports = Object.create || function create(O, Properties) { + var result; + if (O !== null) { + EmptyConstructor[PROTOTYPE] = anObject(O); + result = new EmptyConstructor(); + EmptyConstructor[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = NullProtoObject(); + return Properties === undefined ? result : defineProperties(result, Properties); +}; + + +/***/ }), + +/***/ 6048: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(9781); +var definePropertyModule = __webpack_require__(3070); +var anObject = __webpack_require__(9670); +var toIndexedObject = __webpack_require__(5656); +var objectKeys = __webpack_require__(1956); + +// `Object.defineProperties` method +// https://tc39.es/ecma262/#sec-object.defineproperties +// eslint-disable-next-line es/no-object-defineproperties -- safe +module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { + anObject(O); + var props = toIndexedObject(Properties); + var keys = objectKeys(Properties); + var length = keys.length; + var index = 0; + var key; + while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]); + return O; +}; + + +/***/ }), + +/***/ 3070: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var DESCRIPTORS = __webpack_require__(9781); +var IE8_DOM_DEFINE = __webpack_require__(4664); +var anObject = __webpack_require__(9670); +var toPropertyKey = __webpack_require__(4948); + +var TypeError = global.TypeError; +// eslint-disable-next-line es/no-object-defineproperty -- safe +var $defineProperty = Object.defineProperty; + +// `Object.defineProperty` method +// https://tc39.es/ecma262/#sec-object.defineproperty +exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) { + anObject(O); + P = toPropertyKey(P); + anObject(Attributes); + if (IE8_DOM_DEFINE) try { + return $defineProperty(O, P, Attributes); + } catch (error) { /* empty */ } + if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); + if ('value' in Attributes) O[P] = Attributes.value; + return O; +}; + + +/***/ }), + +/***/ 1236: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(9781); +var call = __webpack_require__(6916); +var propertyIsEnumerableModule = __webpack_require__(5296); +var createPropertyDescriptor = __webpack_require__(9114); +var toIndexedObject = __webpack_require__(5656); +var toPropertyKey = __webpack_require__(4948); +var hasOwn = __webpack_require__(2597); +var IE8_DOM_DEFINE = __webpack_require__(4664); + +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe +var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor +exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { + O = toIndexedObject(O); + P = toPropertyKey(P); + if (IE8_DOM_DEFINE) try { + return $getOwnPropertyDescriptor(O, P); + } catch (error) { /* empty */ } + if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); +}; + + +/***/ }), + +/***/ 1156: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* eslint-disable es/no-object-getownpropertynames -- safe */ +var classof = __webpack_require__(4326); +var toIndexedObject = __webpack_require__(5656); +var $getOwnPropertyNames = (__webpack_require__(8006).f); +var arraySlice = __webpack_require__(206); + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function (it) { + try { + return $getOwnPropertyNames(it); + } catch (error) { + return arraySlice(windowNames); + } +}; + +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +module.exports.f = function getOwnPropertyNames(it) { + return windowNames && classof(it) == 'Window' + ? getWindowNames(it) + : $getOwnPropertyNames(toIndexedObject(it)); +}; + + +/***/ }), + +/***/ 8006: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var internalObjectKeys = __webpack_require__(6324); +var enumBugKeys = __webpack_require__(748); + +var hiddenKeys = enumBugKeys.concat('length', 'prototype'); + +// `Object.getOwnPropertyNames` method +// https://tc39.es/ecma262/#sec-object.getownpropertynames +// eslint-disable-next-line es/no-object-getownpropertynames -- safe +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { + return internalObjectKeys(O, hiddenKeys); +}; + + +/***/ }), + +/***/ 5181: +/***/ (function(__unused_webpack_module, exports) { + +// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe +exports.f = Object.getOwnPropertySymbols; + + +/***/ }), + +/***/ 9518: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var hasOwn = __webpack_require__(2597); +var isCallable = __webpack_require__(614); +var toObject = __webpack_require__(7908); +var sharedKey = __webpack_require__(6200); +var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544); + +var IE_PROTO = sharedKey('IE_PROTO'); +var Object = global.Object; +var ObjectPrototype = Object.prototype; + +// `Object.getPrototypeOf` method +// https://tc39.es/ecma262/#sec-object.getprototypeof +module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { + var object = toObject(O); + if (hasOwn(object, IE_PROTO)) return object[IE_PROTO]; + var constructor = object.constructor; + if (isCallable(constructor) && object instanceof constructor) { + return constructor.prototype; + } return object instanceof Object ? ObjectPrototype : null; +}; + + +/***/ }), + +/***/ 7976: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); + +module.exports = uncurryThis({}.isPrototypeOf); + + +/***/ }), + +/***/ 6324: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var hasOwn = __webpack_require__(2597); +var toIndexedObject = __webpack_require__(5656); +var indexOf = (__webpack_require__(1318).indexOf); +var hiddenKeys = __webpack_require__(3501); + +var push = uncurryThis([].push); + +module.exports = function (object, names) { + var O = toIndexedObject(object); + var i = 0; + var result = []; + var key; + for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key); + // Don't enum bug & hidden keys + while (names.length > i) if (hasOwn(O, key = names[i++])) { + ~indexOf(result, key) || push(result, key); + } + return result; +}; + + +/***/ }), + +/***/ 1956: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var internalObjectKeys = __webpack_require__(6324); +var enumBugKeys = __webpack_require__(748); + +// `Object.keys` method +// https://tc39.es/ecma262/#sec-object.keys +// eslint-disable-next-line es/no-object-keys -- safe +module.exports = Object.keys || function keys(O) { + return internalObjectKeys(O, enumBugKeys); +}; + + +/***/ }), + +/***/ 5296: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + +var $propertyIsEnumerable = {}.propertyIsEnumerable; +// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe +var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; + +// Nashorn ~ JDK8 bug +var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); + +// `Object.prototype.propertyIsEnumerable` method implementation +// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable +exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { + var descriptor = getOwnPropertyDescriptor(this, V); + return !!descriptor && descriptor.enumerable; +} : $propertyIsEnumerable; + + +/***/ }), + +/***/ 7674: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* eslint-disable no-proto -- safe */ +var uncurryThis = __webpack_require__(1702); +var anObject = __webpack_require__(9670); +var aPossiblePrototype = __webpack_require__(6077); + +// `Object.setPrototypeOf` method +// https://tc39.es/ecma262/#sec-object.setprototypeof +// Works with __proto__ only. Old v8 can't work with null proto objects. +// eslint-disable-next-line es/no-object-setprototypeof -- safe +module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { + var CORRECT_SETTER = false; + var test = {}; + var setter; + try { + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set); + setter(test, []); + CORRECT_SETTER = test instanceof Array; + } catch (error) { /* empty */ } + return function setPrototypeOf(O, proto) { + anObject(O); + aPossiblePrototype(proto); + if (CORRECT_SETTER) setter(O, proto); + else O.__proto__ = proto; + return O; + }; +}() : undefined); + + +/***/ }), + +/***/ 4699: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(9781); +var uncurryThis = __webpack_require__(1702); +var objectKeys = __webpack_require__(1956); +var toIndexedObject = __webpack_require__(5656); +var $propertyIsEnumerable = (__webpack_require__(5296).f); + +var propertyIsEnumerable = uncurryThis($propertyIsEnumerable); +var push = uncurryThis([].push); + +// `Object.{ entries, values }` methods implementation +var createMethod = function (TO_ENTRIES) { + return function (it) { + var O = toIndexedObject(it); + var keys = objectKeys(O); + var length = keys.length; + var i = 0; + var result = []; + var key; + while (length > i) { + key = keys[i++]; + if (!DESCRIPTORS || propertyIsEnumerable(O, key)) { + push(result, TO_ENTRIES ? [key, O[key]] : O[key]); + } + } + return result; + }; +}; + +module.exports = { + // `Object.entries` method + // https://tc39.es/ecma262/#sec-object.entries + entries: createMethod(true), + // `Object.values` method + // https://tc39.es/ecma262/#sec-object.values + values: createMethod(false) +}; + + +/***/ }), + +/***/ 288: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); +var classof = __webpack_require__(648); + +// `Object.prototype.toString` method implementation +// https://tc39.es/ecma262/#sec-object.prototype.tostring +module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { + return '[object ' + classof(this) + ']'; +}; + + +/***/ }), + +/***/ 2140: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var call = __webpack_require__(6916); +var isCallable = __webpack_require__(614); +var isObject = __webpack_require__(111); + +var TypeError = global.TypeError; + +// `OrdinaryToPrimitive` abstract operation +// https://tc39.es/ecma262/#sec-ordinarytoprimitive +module.exports = function (input, pref) { + var fn, val; + if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; + if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; + if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; + throw TypeError("Can't convert object to primitive value"); +}; + + +/***/ }), + +/***/ 3887: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var getBuiltIn = __webpack_require__(5005); +var uncurryThis = __webpack_require__(1702); +var getOwnPropertyNamesModule = __webpack_require__(8006); +var getOwnPropertySymbolsModule = __webpack_require__(5181); +var anObject = __webpack_require__(9670); + +var concat = uncurryThis([].concat); + +// all object keys, includes non-enumerable and symbols +module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { + var keys = getOwnPropertyNamesModule.f(anObject(it)); + var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; + return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; +}; + + +/***/ }), + +/***/ 857: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); + +module.exports = global; + + +/***/ }), + +/***/ 2534: +/***/ (function(module) { + +module.exports = function (exec) { + try { + return { error: false, value: exec() }; + } catch (error) { + return { error: true, value: error }; + } +}; + + +/***/ }), + +/***/ 9478: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var anObject = __webpack_require__(9670); +var isObject = __webpack_require__(111); +var newPromiseCapability = __webpack_require__(8523); + +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; +}; + + +/***/ }), + +/***/ 2248: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var redefine = __webpack_require__(1320); + +module.exports = function (target, src, options) { + for (var key in src) redefine(target, key, src[key], options); + return target; +}; + + +/***/ }), + +/***/ 1320: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var isCallable = __webpack_require__(614); +var hasOwn = __webpack_require__(2597); +var createNonEnumerableProperty = __webpack_require__(8880); +var setGlobal = __webpack_require__(3505); +var inspectSource = __webpack_require__(2788); +var InternalStateModule = __webpack_require__(9909); +var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(6530).CONFIGURABLE); + +var getInternalState = InternalStateModule.get; +var enforceInternalState = InternalStateModule.enforce; +var TEMPLATE = String(String).split('String'); + +(module.exports = function (O, key, value, options) { + var unsafe = options ? !!options.unsafe : false; + var simple = options ? !!options.enumerable : false; + var noTargetGet = options ? !!options.noTargetGet : false; + var name = options && options.name !== undefined ? options.name : key; + var state; + if (isCallable(value)) { + if (String(name).slice(0, 7) === 'Symbol(') { + name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; + } + if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { + createNonEnumerableProperty(value, 'name', name); + } + state = enforceInternalState(value); + if (!state.source) { + state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); + } + } + if (O === global) { + if (simple) O[key] = value; + else setGlobal(key, value); + return; + } else if (!unsafe) { + delete O[key]; + } else if (!noTargetGet && O[key]) { + simple = true; + } + if (simple) O[key] = value; + else createNonEnumerableProperty(O, key, value); +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, 'toString', function toString() { + return isCallable(this) && getInternalState(this).source || inspectSource(this); +}); + + +/***/ }), + +/***/ 7651: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var call = __webpack_require__(6916); +var anObject = __webpack_require__(9670); +var isCallable = __webpack_require__(614); +var classof = __webpack_require__(4326); +var regexpExec = __webpack_require__(2261); + +var TypeError = global.TypeError; + +// `RegExpExec` abstract operation +// https://tc39.es/ecma262/#sec-regexpexec +module.exports = function (R, S) { + var exec = R.exec; + if (isCallable(exec)) { + var result = call(exec, R, S); + if (result !== null) anObject(result); + return result; + } + if (classof(R) === 'RegExp') return call(regexpExec, R, S); + throw TypeError('RegExp#exec called on incompatible receiver'); +}; + + +/***/ }), + +/***/ 2261: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ +/* eslint-disable regexp/no-useless-quantifier -- testing */ +var call = __webpack_require__(6916); +var uncurryThis = __webpack_require__(1702); +var toString = __webpack_require__(1340); +var regexpFlags = __webpack_require__(7066); +var stickyHelpers = __webpack_require__(2999); +var shared = __webpack_require__(2309); +var create = __webpack_require__(30); +var getInternalState = (__webpack_require__(9909).get); +var UNSUPPORTED_DOT_ALL = __webpack_require__(9441); +var UNSUPPORTED_NCG = __webpack_require__(7168); + +var nativeReplace = shared('native-string-replace', String.prototype.replace); +var nativeExec = RegExp.prototype.exec; +var patchedExec = nativeExec; +var charAt = uncurryThis(''.charAt); +var indexOf = uncurryThis(''.indexOf); +var replace = uncurryThis(''.replace); +var stringSlice = uncurryThis(''.slice); + +var UPDATES_LAST_INDEX_WRONG = (function () { + var re1 = /a/; + var re2 = /b*/g; + call(nativeExec, re1, 'a'); + call(nativeExec, re2, 'a'); + return re1.lastIndex !== 0 || re2.lastIndex !== 0; +})(); + +var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; + +// nonparticipating capturing group, copied from es5-shim's String#split patch. +var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; + +var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG; + +if (PATCH) { + // eslint-disable-next-line max-statements -- TODO + patchedExec = function exec(string) { + var re = this; + var state = getInternalState(re); + var str = toString(string); + var raw = state.raw; + var result, reCopy, lastIndex, match, i, object, group; + + if (raw) { + raw.lastIndex = re.lastIndex; + result = call(patchedExec, raw, str); + re.lastIndex = raw.lastIndex; + return result; + } + + var groups = state.groups; + var sticky = UNSUPPORTED_Y && re.sticky; + var flags = call(regexpFlags, re); + var source = re.source; + var charsAdded = 0; + var strCopy = str; + + if (sticky) { + flags = replace(flags, 'y', ''); + if (indexOf(flags, 'g') === -1) { + flags += 'g'; + } + + strCopy = stringSlice(str, re.lastIndex); + // Support anchored sticky behavior. + if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) { + source = '(?: ' + source + ')'; + strCopy = ' ' + strCopy; + charsAdded++; + } + // ^(? + rx + ) is needed, in combination with some str slicing, to + // simulate the 'y' flag. + reCopy = new RegExp('^(?:' + source + ')', flags); + } + + if (NPCG_INCLUDED) { + reCopy = new RegExp('^' + source + '$(?!\\s)', flags); + } + if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; + + match = call(nativeExec, sticky ? reCopy : re, strCopy); + + if (sticky) { + if (match) { + match.input = stringSlice(match.input, charsAdded); + match[0] = stringSlice(match[0], charsAdded); + match.index = re.lastIndex; + re.lastIndex += match[0].length; + } else re.lastIndex = 0; + } else if (UPDATES_LAST_INDEX_WRONG && match) { + re.lastIndex = re.global ? match.index + match[0].length : lastIndex; + } + if (NPCG_INCLUDED && match && match.length > 1) { + // Fix browsers whose `exec` methods don't consistently return `undefined` + // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ + call(nativeReplace, match[0], reCopy, function () { + for (i = 1; i < arguments.length - 2; i++) { + if (arguments[i] === undefined) match[i] = undefined; + } + }); + } + + if (match && groups) { + match.groups = object = create(null); + for (i = 0; i < groups.length; i++) { + group = groups[i]; + object[group[0]] = match[group[1]]; + } + } + + return match; + }; +} + +module.exports = patchedExec; + + +/***/ }), + +/***/ 7066: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var anObject = __webpack_require__(9670); + +// `RegExp.prototype.flags` getter implementation +// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags +module.exports = function () { + var that = anObject(this); + var result = ''; + if (that.global) result += 'g'; + if (that.ignoreCase) result += 'i'; + if (that.multiline) result += 'm'; + if (that.dotAll) result += 's'; + if (that.unicode) result += 'u'; + if (that.sticky) result += 'y'; + return result; +}; + + +/***/ }), + +/***/ 2999: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var fails = __webpack_require__(7293); +var global = __webpack_require__(7854); + +// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError +var $RegExp = global.RegExp; + +exports.UNSUPPORTED_Y = fails(function () { + var re = $RegExp('a', 'y'); + re.lastIndex = 2; + return re.exec('abcd') != null; +}); + +exports.BROKEN_CARET = fails(function () { + // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 + var re = $RegExp('^r', 'gy'); + re.lastIndex = 2; + return re.exec('str') != null; +}); + + +/***/ }), + +/***/ 9441: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); +var global = __webpack_require__(7854); + +// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError +var $RegExp = global.RegExp; + +module.exports = fails(function () { + var re = $RegExp('.', 's'); + return !(re.dotAll && re.exec('\n') && re.flags === 's'); +}); + + +/***/ }), + +/***/ 7168: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); +var global = __webpack_require__(7854); + +// babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError +var $RegExp = global.RegExp; + +module.exports = fails(function () { + var re = $RegExp('(?b)', 'g'); + return re.exec('b').groups.a !== 'b' || + 'b'.replace(re, '$c') !== 'bc'; +}); + + +/***/ }), + +/***/ 4488: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); + +var TypeError = global.TypeError; + +// `RequireObjectCoercible` abstract operation +// https://tc39.es/ecma262/#sec-requireobjectcoercible +module.exports = function (it) { + if (it == undefined) throw TypeError("Can't call method on " + it); + return it; +}; + + +/***/ }), + +/***/ 3505: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); + +// eslint-disable-next-line es/no-object-defineproperty -- safe +var defineProperty = Object.defineProperty; + +module.exports = function (key, value) { + try { + defineProperty(global, key, { value: value, configurable: true, writable: true }); + } catch (error) { + global[key] = value; + } return value; +}; + + +/***/ }), + +/***/ 6340: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var getBuiltIn = __webpack_require__(5005); +var definePropertyModule = __webpack_require__(3070); +var wellKnownSymbol = __webpack_require__(5112); +var DESCRIPTORS = __webpack_require__(9781); + +var SPECIES = wellKnownSymbol('species'); + +module.exports = function (CONSTRUCTOR_NAME) { + var Constructor = getBuiltIn(CONSTRUCTOR_NAME); + var defineProperty = definePropertyModule.f; + + if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { + defineProperty(Constructor, SPECIES, { + configurable: true, + get: function () { return this; } + }); + } +}; + + +/***/ }), + +/***/ 8003: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var defineProperty = (__webpack_require__(3070).f); +var hasOwn = __webpack_require__(2597); +var wellKnownSymbol = __webpack_require__(5112); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); + +module.exports = function (it, TAG, STATIC) { + if (it && !hasOwn(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { + defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); + } +}; + + +/***/ }), + +/***/ 6200: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var shared = __webpack_require__(2309); +var uid = __webpack_require__(9711); + +var keys = shared('keys'); + +module.exports = function (key) { + return keys[key] || (keys[key] = uid(key)); +}; + + +/***/ }), + +/***/ 5465: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var setGlobal = __webpack_require__(3505); + +var SHARED = '__core-js_shared__'; +var store = global[SHARED] || setGlobal(SHARED, {}); + +module.exports = store; + + +/***/ }), + +/***/ 2309: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var IS_PURE = __webpack_require__(1913); +var store = __webpack_require__(5465); + +(module.exports = function (key, value) { + return store[key] || (store[key] = value !== undefined ? value : {}); +})('versions', []).push({ + version: '3.19.0', + mode: IS_PURE ? 'pure' : 'global', + copyright: '© 2021 Denis Pushkarev (zloirock.ru)' +}); + + +/***/ }), + +/***/ 6707: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var anObject = __webpack_require__(9670); +var aConstructor = __webpack_require__(9483); +var wellKnownSymbol = __webpack_require__(5112); + +var SPECIES = wellKnownSymbol('species'); + +// `SpeciesConstructor` abstract operation +// https://tc39.es/ecma262/#sec-speciesconstructor +module.exports = function (O, defaultConstructor) { + var C = anObject(O).constructor; + var S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S); +}; + + +/***/ }), + +/***/ 3429: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var fails = __webpack_require__(7293); + +// check the existence of a method, lowercase +// of a tag and escaping quotes in arguments +module.exports = function (METHOD_NAME) { + return fails(function () { + var test = ''[METHOD_NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }); +}; + + +/***/ }), + +/***/ 8710: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var toIntegerOrInfinity = __webpack_require__(9303); +var toString = __webpack_require__(1340); +var requireObjectCoercible = __webpack_require__(4488); + +var charAt = uncurryThis(''.charAt); +var charCodeAt = uncurryThis(''.charCodeAt); +var stringSlice = uncurryThis(''.slice); + +var createMethod = function (CONVERT_TO_STRING) { + return function ($this, pos) { + var S = toString(requireObjectCoercible($this)); + var position = toIntegerOrInfinity(pos); + var size = S.length; + var first, second; + if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; + first = charCodeAt(S, position); + return first < 0xD800 || first > 0xDBFF || position + 1 === size + || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF + ? CONVERT_TO_STRING + ? charAt(S, position) + : first + : CONVERT_TO_STRING + ? stringSlice(S, position, position + 2) + : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; + }; +}; + +module.exports = { + // `String.prototype.codePointAt` method + // https://tc39.es/ecma262/#sec-string.prototype.codepointat + codeAt: createMethod(false), + // `String.prototype.at` method + // https://github.com/mathiasbynens/String.prototype.at + charAt: createMethod(true) +}; + + +/***/ }), + +/***/ 8415: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(7854); +var toIntegerOrInfinity = __webpack_require__(9303); +var toString = __webpack_require__(1340); +var requireObjectCoercible = __webpack_require__(4488); + +var RangeError = global.RangeError; + +// `String.prototype.repeat` method implementation +// https://tc39.es/ecma262/#sec-string.prototype.repeat +module.exports = function repeat(count) { + var str = toString(requireObjectCoercible(this)); + var result = ''; + var n = toIntegerOrInfinity(count); + if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions'); + for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str; + return result; +}; + + +/***/ }), + +/***/ 6091: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER); +var fails = __webpack_require__(7293); +var whitespaces = __webpack_require__(1361); + +var non = '\u200B\u0085\u180E'; + +// check that a method works with the correct list +// of whitespaces and has a correct name +module.exports = function (METHOD_NAME) { + return fails(function () { + return !!whitespaces[METHOD_NAME]() + || non[METHOD_NAME]() !== non + || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME); + }); +}; + + +/***/ }), + +/***/ 3111: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); +var requireObjectCoercible = __webpack_require__(4488); +var toString = __webpack_require__(1340); +var whitespaces = __webpack_require__(1361); + +var replace = uncurryThis(''.replace); +var whitespace = '[' + whitespaces + ']'; +var ltrim = RegExp('^' + whitespace + whitespace + '*'); +var rtrim = RegExp(whitespace + whitespace + '*$'); + +// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation +var createMethod = function (TYPE) { + return function ($this) { + var string = toString(requireObjectCoercible($this)); + if (TYPE & 1) string = replace(string, ltrim, ''); + if (TYPE & 2) string = replace(string, rtrim, ''); + return string; + }; +}; + +module.exports = { + // `String.prototype.{ trimLeft, trimStart }` methods + // https://tc39.es/ecma262/#sec-string.prototype.trimstart + start: createMethod(1), + // `String.prototype.{ trimRight, trimEnd }` methods + // https://tc39.es/ecma262/#sec-string.prototype.trimend + end: createMethod(2), + // `String.prototype.trim` method + // https://tc39.es/ecma262/#sec-string.prototype.trim + trim: createMethod(3) +}; + + +/***/ }), + +/***/ 261: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var apply = __webpack_require__(2104); +var bind = __webpack_require__(9974); +var isCallable = __webpack_require__(614); +var hasOwn = __webpack_require__(2597); +var fails = __webpack_require__(7293); +var html = __webpack_require__(490); +var arraySlice = __webpack_require__(206); +var createElement = __webpack_require__(317); +var IS_IOS = __webpack_require__(6833); +var IS_NODE = __webpack_require__(5268); + +var set = global.setImmediate; +var clear = global.clearImmediate; +var process = global.process; +var Dispatch = global.Dispatch; +var Function = global.Function; +var MessageChannel = global.MessageChannel; +var String = global.String; +var counter = 0; +var queue = {}; +var ONREADYSTATECHANGE = 'onreadystatechange'; +var location, defer, channel, port; + +try { + // Deno throws a ReferenceError on `location` access without `--location` flag + location = global.location; +} catch (error) { /* empty */ } + +var run = function (id) { + if (hasOwn(queue, id)) { + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; + +var runner = function (id) { + return function () { + run(id); + }; +}; + +var listener = function (event) { + run(event.data); +}; + +var post = function (id) { + // old engines have not location.origin + global.postMessage(String(id), location.protocol + '//' + location.host); +}; + +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if (!set || !clear) { + set = function setImmediate(fn) { + var args = arraySlice(arguments, 1); + queue[++counter] = function () { + apply(isCallable(fn) ? fn : Function(fn), undefined, args); + }; + defer(counter); + return counter; + }; + clear = function clearImmediate(id) { + delete queue[id]; + }; + // Node.js 0.8- + if (IS_NODE) { + defer = function (id) { + process.nextTick(runner(id)); + }; + // Sphere (JS game engine) Dispatch API + } else if (Dispatch && Dispatch.now) { + defer = function (id) { + Dispatch.now(runner(id)); + }; + // Browsers with MessageChannel, includes WebWorkers + // except iOS - https://github.com/zloirock/core-js/issues/624 + } else if (MessageChannel && !IS_IOS) { + channel = new MessageChannel(); + port = channel.port2; + channel.port1.onmessage = listener; + defer = bind(port.postMessage, port); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if ( + global.addEventListener && + isCallable(global.postMessage) && + !global.importScripts && + location && location.protocol !== 'file:' && + !fails(post) + ) { + defer = post; + global.addEventListener('message', listener, false); + // IE8- + } else if (ONREADYSTATECHANGE in createElement('script')) { + defer = function (id) { + html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { + html.removeChild(this); + run(id); + }; + }; + // Rest old browsers + } else { + defer = function (id) { + setTimeout(runner(id), 0); + }; + } +} + +module.exports = { + set: set, + clear: clear +}; + + +/***/ }), + +/***/ 863: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); + +// `thisNumberValue` abstract operation +// https://tc39.es/ecma262/#sec-thisnumbervalue +module.exports = uncurryThis(1.0.valueOf); + + +/***/ }), + +/***/ 1400: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var toIntegerOrInfinity = __webpack_require__(9303); + +var max = Math.max; +var min = Math.min; + +// Helper for a popular repeating case of the spec: +// Let integer be ? ToInteger(index). +// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). +module.exports = function (index, length) { + var integer = toIntegerOrInfinity(index); + return integer < 0 ? max(integer + length, 0) : min(integer, length); +}; + + +/***/ }), + +/***/ 7067: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var toIntegerOrInfinity = __webpack_require__(9303); +var toLength = __webpack_require__(7466); + +var RangeError = global.RangeError; + +// `ToIndex` abstract operation +// https://tc39.es/ecma262/#sec-toindex +module.exports = function (it) { + if (it === undefined) return 0; + var number = toIntegerOrInfinity(it); + var length = toLength(number); + if (number !== length) throw RangeError('Wrong length or index'); + return length; +}; + + +/***/ }), + +/***/ 5656: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +// toObject with fallback for non-array-like ES3 strings +var IndexedObject = __webpack_require__(8361); +var requireObjectCoercible = __webpack_require__(4488); + +module.exports = function (it) { + return IndexedObject(requireObjectCoercible(it)); +}; + + +/***/ }), + +/***/ 9303: +/***/ (function(module) { + +var ceil = Math.ceil; +var floor = Math.floor; + +// `ToIntegerOrInfinity` abstract operation +// https://tc39.es/ecma262/#sec-tointegerorinfinity +module.exports = function (argument) { + var number = +argument; + // eslint-disable-next-line no-self-compare -- safe + return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number); +}; + + +/***/ }), + +/***/ 7466: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var toIntegerOrInfinity = __webpack_require__(9303); + +var min = Math.min; + +// `ToLength` abstract operation +// https://tc39.es/ecma262/#sec-tolength +module.exports = function (argument) { + return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 +}; + + +/***/ }), + +/***/ 7908: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var requireObjectCoercible = __webpack_require__(4488); + +var Object = global.Object; + +// `ToObject` abstract operation +// https://tc39.es/ecma262/#sec-toobject +module.exports = function (argument) { + return Object(requireObjectCoercible(argument)); +}; + + +/***/ }), + +/***/ 4590: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var toPositiveInteger = __webpack_require__(3002); + +var RangeError = global.RangeError; + +module.exports = function (it, BYTES) { + var offset = toPositiveInteger(it); + if (offset % BYTES) throw RangeError('Wrong offset'); + return offset; +}; + + +/***/ }), + +/***/ 3002: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var toIntegerOrInfinity = __webpack_require__(9303); + +var RangeError = global.RangeError; + +module.exports = function (it) { + var result = toIntegerOrInfinity(it); + if (result < 0) throw RangeError("The argument can't be less than 0"); + return result; +}; + + +/***/ }), + +/***/ 7593: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var call = __webpack_require__(6916); +var isObject = __webpack_require__(111); +var isSymbol = __webpack_require__(2190); +var getMethod = __webpack_require__(8173); +var ordinaryToPrimitive = __webpack_require__(2140); +var wellKnownSymbol = __webpack_require__(5112); + +var TypeError = global.TypeError; +var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); + +// `ToPrimitive` abstract operation +// https://tc39.es/ecma262/#sec-toprimitive +module.exports = function (input, pref) { + if (!isObject(input) || isSymbol(input)) return input; + var exoticToPrim = getMethod(input, TO_PRIMITIVE); + var result; + if (exoticToPrim) { + if (pref === undefined) pref = 'default'; + result = call(exoticToPrim, input, pref); + if (!isObject(result) || isSymbol(result)) return result; + throw TypeError("Can't convert object to primitive value"); + } + if (pref === undefined) pref = 'number'; + return ordinaryToPrimitive(input, pref); +}; + + +/***/ }), + +/***/ 4948: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var toPrimitive = __webpack_require__(7593); +var isSymbol = __webpack_require__(2190); + +// `ToPropertyKey` abstract operation +// https://tc39.es/ecma262/#sec-topropertykey +module.exports = function (argument) { + var key = toPrimitive(argument, 'string'); + return isSymbol(key) ? key : key + ''; +}; + + +/***/ }), + +/***/ 1694: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(5112); + +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var test = {}; + +test[TO_STRING_TAG] = 'z'; + +module.exports = String(test) === '[object z]'; + + +/***/ }), + +/***/ 1340: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var classof = __webpack_require__(648); + +var String = global.String; + +module.exports = function (argument) { + if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); + return String(argument); +}; + + +/***/ }), + +/***/ 6330: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); + +var String = global.String; + +module.exports = function (argument) { + try { + return String(argument); + } catch (error) { + return 'Object'; + } +}; + + +/***/ }), + +/***/ 9843: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var call = __webpack_require__(6916); +var DESCRIPTORS = __webpack_require__(9781); +var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832); +var ArrayBufferViewCore = __webpack_require__(2094); +var ArrayBufferModule = __webpack_require__(2091); +var anInstance = __webpack_require__(5787); +var createPropertyDescriptor = __webpack_require__(9114); +var createNonEnumerableProperty = __webpack_require__(8880); +var isIntegralNumber = __webpack_require__(5988); +var toLength = __webpack_require__(7466); +var toIndex = __webpack_require__(7067); +var toOffset = __webpack_require__(4590); +var toPropertyKey = __webpack_require__(4948); +var hasOwn = __webpack_require__(2597); +var classof = __webpack_require__(648); +var isObject = __webpack_require__(111); +var isSymbol = __webpack_require__(2190); +var create = __webpack_require__(30); +var isPrototypeOf = __webpack_require__(7976); +var setPrototypeOf = __webpack_require__(7674); +var getOwnPropertyNames = (__webpack_require__(8006).f); +var typedArrayFrom = __webpack_require__(7321); +var forEach = (__webpack_require__(2092).forEach); +var setSpecies = __webpack_require__(6340); +var definePropertyModule = __webpack_require__(3070); +var getOwnPropertyDescriptorModule = __webpack_require__(1236); +var InternalStateModule = __webpack_require__(9909); +var inheritIfRequired = __webpack_require__(9587); + +var getInternalState = InternalStateModule.get; +var setInternalState = InternalStateModule.set; +var nativeDefineProperty = definePropertyModule.f; +var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; +var round = Math.round; +var RangeError = global.RangeError; +var ArrayBuffer = ArrayBufferModule.ArrayBuffer; +var ArrayBufferPrototype = ArrayBuffer.prototype; +var DataView = ArrayBufferModule.DataView; +var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS; +var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR; +var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG; +var TypedArray = ArrayBufferViewCore.TypedArray; +var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype; +var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; +var isTypedArray = ArrayBufferViewCore.isTypedArray; +var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; +var WRONG_LENGTH = 'Wrong length'; + +var fromList = function (C, list) { + aTypedArrayConstructor(C); + var index = 0; + var length = list.length; + var result = new C(length); + while (length > index) result[index] = list[index++]; + return result; +}; + +var addGetter = function (it, key) { + nativeDefineProperty(it, key, { get: function () { + return getInternalState(this)[key]; + } }); +}; + +var isArrayBuffer = function (it) { + var klass; + return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer'; +}; + +var isTypedArrayIndex = function (target, key) { + return isTypedArray(target) + && !isSymbol(key) + && key in target + && isIntegralNumber(+key) + && key >= 0; +}; + +var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) { + key = toPropertyKey(key); + return isTypedArrayIndex(target, key) + ? createPropertyDescriptor(2, target[key]) + : nativeGetOwnPropertyDescriptor(target, key); +}; + +var wrappedDefineProperty = function defineProperty(target, key, descriptor) { + key = toPropertyKey(key); + if (isTypedArrayIndex(target, key) + && isObject(descriptor) + && hasOwn(descriptor, 'value') + && !hasOwn(descriptor, 'get') + && !hasOwn(descriptor, 'set') + // TODO: add validation descriptor w/o calling accessors + && !descriptor.configurable + && (!hasOwn(descriptor, 'writable') || descriptor.writable) + && (!hasOwn(descriptor, 'enumerable') || descriptor.enumerable) + ) { + target[key] = descriptor.value; + return target; + } return nativeDefineProperty(target, key, descriptor); +}; + +if (DESCRIPTORS) { + if (!NATIVE_ARRAY_BUFFER_VIEWS) { + getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor; + definePropertyModule.f = wrappedDefineProperty; + addGetter(TypedArrayPrototype, 'buffer'); + addGetter(TypedArrayPrototype, 'byteOffset'); + addGetter(TypedArrayPrototype, 'byteLength'); + addGetter(TypedArrayPrototype, 'length'); + } + + $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, { + getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor, + defineProperty: wrappedDefineProperty + }); + + module.exports = function (TYPE, wrapper, CLAMPED) { + var BYTES = TYPE.match(/\d+$/)[0] / 8; + var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array'; + var GETTER = 'get' + TYPE; + var SETTER = 'set' + TYPE; + var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME]; + var TypedArrayConstructor = NativeTypedArrayConstructor; + var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype; + var exported = {}; + + var getter = function (that, index) { + var data = getInternalState(that); + return data.view[GETTER](index * BYTES + data.byteOffset, true); + }; + + var setter = function (that, index, value) { + var data = getInternalState(that); + if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF; + data.view[SETTER](index * BYTES + data.byteOffset, value, true); + }; + + var addElement = function (that, index) { + nativeDefineProperty(that, index, { + get: function () { + return getter(this, index); + }, + set: function (value) { + return setter(this, index, value); + }, + enumerable: true + }); + }; + + if (!NATIVE_ARRAY_BUFFER_VIEWS) { + TypedArrayConstructor = wrapper(function (that, data, offset, $length) { + anInstance(that, TypedArrayConstructorPrototype); + var index = 0; + var byteOffset = 0; + var buffer, byteLength, length; + if (!isObject(data)) { + length = toIndex(data); + byteLength = length * BYTES; + buffer = new ArrayBuffer(byteLength); + } else if (isArrayBuffer(data)) { + buffer = data; + byteOffset = toOffset(offset, BYTES); + var $len = data.byteLength; + if ($length === undefined) { + if ($len % BYTES) throw RangeError(WRONG_LENGTH); + byteLength = $len - byteOffset; + if (byteLength < 0) throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if (isTypedArray(data)) { + return fromList(TypedArrayConstructor, data); + } else { + return call(typedArrayFrom, TypedArrayConstructor, data); + } + setInternalState(that, { + buffer: buffer, + byteOffset: byteOffset, + byteLength: byteLength, + length: length, + view: new DataView(buffer) + }); + while (index < length) addElement(that, index++); + }); + + if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); + TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype); + } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) { + TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) { + anInstance(dummy, TypedArrayConstructorPrototype); + return inheritIfRequired(function () { + if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data)); + if (isArrayBuffer(data)) return $length !== undefined + ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length) + : typedArrayOffset !== undefined + ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES)) + : new NativeTypedArrayConstructor(data); + if (isTypedArray(data)) return fromList(TypedArrayConstructor, data); + return call(typedArrayFrom, TypedArrayConstructor, data); + }(), dummy, TypedArrayConstructor); + }); + + if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); + forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) { + if (!(key in TypedArrayConstructor)) { + createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]); + } + }); + TypedArrayConstructor.prototype = TypedArrayConstructorPrototype; + } + + if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) { + createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor); + } + + createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor); + + if (TYPED_ARRAY_TAG) { + createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME); + } + + exported[CONSTRUCTOR_NAME] = TypedArrayConstructor; + + $({ + global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS + }, exported); + + if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) { + createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES); + } + + if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) { + createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES); + } + + setSpecies(CONSTRUCTOR_NAME); + }; +} else module.exports = function () { /* empty */ }; + + +/***/ }), + +/***/ 3832: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* eslint-disable no-new -- required for testing */ +var global = __webpack_require__(7854); +var fails = __webpack_require__(7293); +var checkCorrectnessOfIteration = __webpack_require__(7072); +var NATIVE_ARRAY_BUFFER_VIEWS = (__webpack_require__(2094).NATIVE_ARRAY_BUFFER_VIEWS); + +var ArrayBuffer = global.ArrayBuffer; +var Int8Array = global.Int8Array; + +module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () { + Int8Array(1); +}) || !fails(function () { + new Int8Array(-1); +}) || !checkCorrectnessOfIteration(function (iterable) { + new Int8Array(); + new Int8Array(null); + new Int8Array(1.5); + new Int8Array(iterable); +}, true) || fails(function () { + // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill + return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1; +}); + + +/***/ }), + +/***/ 3074: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var arrayFromConstructorAndList = __webpack_require__(7745); +var typedArraySpeciesConstructor = __webpack_require__(6304); + +module.exports = function (instance, list) { + return arrayFromConstructorAndList(typedArraySpeciesConstructor(instance), list); +}; + + +/***/ }), + +/***/ 7321: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var bind = __webpack_require__(9974); +var call = __webpack_require__(6916); +var aConstructor = __webpack_require__(9483); +var toObject = __webpack_require__(7908); +var lengthOfArrayLike = __webpack_require__(6244); +var getIterator = __webpack_require__(8554); +var getIteratorMethod = __webpack_require__(1246); +var isArrayIteratorMethod = __webpack_require__(7659); +var aTypedArrayConstructor = (__webpack_require__(2094).aTypedArrayConstructor); + +module.exports = function from(source /* , mapfn, thisArg */) { + var C = aConstructor(this); + var O = toObject(source); + var argumentsLength = arguments.length; + var mapfn = argumentsLength > 1 ? arguments[1] : undefined; + var mapping = mapfn !== undefined; + var iteratorMethod = getIteratorMethod(O); + var i, length, result, step, iterator, next; + if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) { + iterator = getIterator(O, iteratorMethod); + next = iterator.next; + O = []; + while (!(step = call(next, iterator)).done) { + O.push(step.value); + } + } + if (mapping && argumentsLength > 2) { + mapfn = bind(mapfn, arguments[2]); + } + length = lengthOfArrayLike(O); + result = new (aTypedArrayConstructor(C))(length); + for (i = 0; length > i; i++) { + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; +}; + + +/***/ }), + +/***/ 6304: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var ArrayBufferViewCore = __webpack_require__(2094); +var speciesConstructor = __webpack_require__(6707); + +var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR; +var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; + +// a part of `TypedArraySpeciesCreate` abstract operation +// https://tc39.es/ecma262/#typedarray-species-create +module.exports = function (originalArray) { + return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR])); +}; + + +/***/ }), + +/***/ 9711: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var uncurryThis = __webpack_require__(1702); + +var id = 0; +var postfix = Math.random(); +var toString = uncurryThis(1.0.toString); + +module.exports = function (key) { + return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); +}; + + +/***/ }), + +/***/ 3307: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +/* eslint-disable es/no-symbol -- required for testing */ +var NATIVE_SYMBOL = __webpack_require__(133); + +module.exports = NATIVE_SYMBOL + && !Symbol.sham + && typeof Symbol.iterator == 'symbol'; + + +/***/ }), + +/***/ 6061: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +var wellKnownSymbol = __webpack_require__(5112); + +exports.f = wellKnownSymbol; + + +/***/ }), + +/***/ 5112: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var shared = __webpack_require__(2309); +var hasOwn = __webpack_require__(2597); +var uid = __webpack_require__(9711); +var NATIVE_SYMBOL = __webpack_require__(133); +var USE_SYMBOL_AS_UID = __webpack_require__(3307); + +var WellKnownSymbolsStore = shared('wks'); +var Symbol = global.Symbol; +var symbolFor = Symbol && Symbol['for']; +var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; + +module.exports = function (name) { + if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) { + var description = 'Symbol.' + name; + if (NATIVE_SYMBOL && hasOwn(Symbol, name)) { + WellKnownSymbolsStore[name] = Symbol[name]; + } else if (USE_SYMBOL_AS_UID && symbolFor) { + WellKnownSymbolsStore[name] = symbolFor(description); + } else { + WellKnownSymbolsStore[name] = createWellKnownSymbol(description); + } + } return WellKnownSymbolsStore[name]; +}; + + +/***/ }), + +/***/ 1361: +/***/ (function(module) { + +// a string of all valid unicode whitespaces +module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + + '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + + +/***/ }), + +/***/ 9170: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var isPrototypeOf = __webpack_require__(7976); +var getPrototypeOf = __webpack_require__(9518); +var setPrototypeOf = __webpack_require__(7674); +var copyConstructorProperties = __webpack_require__(9920); +var create = __webpack_require__(30); +var createNonEnumerableProperty = __webpack_require__(8880); +var createPropertyDescriptor = __webpack_require__(9114); +var clearErrorStack = __webpack_require__(7741); +var installErrorCause = __webpack_require__(8340); +var iterate = __webpack_require__(408); +var normalizeStringArgument = __webpack_require__(6277); +var ERROR_STACK_INSTALLABLE = __webpack_require__(2914); + +var Error = global.Error; +var push = [].push; + +var $AggregateError = function AggregateError(errors, message /* , options */) { + var that = isPrototypeOf(AggregateErrorPrototype, this) ? this : create(AggregateErrorPrototype); + var options = arguments.length > 2 ? arguments[2] : undefined; + if (setPrototypeOf) { + that = setPrototypeOf(new Error(undefined), getPrototypeOf(that)); + } + createNonEnumerableProperty(that, 'message', normalizeStringArgument(message, '')); + if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1)); + installErrorCause(that, options); + var errorsArray = []; + iterate(errors, push, { that: errorsArray }); + createNonEnumerableProperty(that, 'errors', errorsArray); + return that; +}; + +if (setPrototypeOf) setPrototypeOf($AggregateError, Error); +else copyConstructorProperties($AggregateError, Error); + +var AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, { + constructor: createPropertyDescriptor(1, $AggregateError), + message: createPropertyDescriptor(1, ''), + name: createPropertyDescriptor(1, 'AggregateError') +}); + +// `AggregateError` constructor +// https://tc39.es/ecma262/#sec-aggregate-error-constructor +$({ global: true }, { + AggregateError: $AggregateError +}); + + +/***/ }), + +/***/ 2222: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var fails = __webpack_require__(7293); +var isArray = __webpack_require__(3157); +var isObject = __webpack_require__(111); +var toObject = __webpack_require__(7908); +var lengthOfArrayLike = __webpack_require__(6244); +var createProperty = __webpack_require__(6135); +var arraySpeciesCreate = __webpack_require__(5417); +var arrayMethodHasSpeciesSupport = __webpack_require__(1194); +var wellKnownSymbol = __webpack_require__(5112); +var V8_VERSION = __webpack_require__(7392); + +var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); +var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; +var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; +var TypeError = global.TypeError; + +// We can't use this feature detection in V8 since it causes +// deoptimization and serious performance degradation +// https://github.com/zloirock/core-js/issues/679 +var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { + var array = []; + array[IS_CONCAT_SPREADABLE] = false; + return array.concat()[0] !== array; +}); + +var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); + +var isConcatSpreadable = function (O) { + if (!isObject(O)) return false; + var spreadable = O[IS_CONCAT_SPREADABLE]; + return spreadable !== undefined ? !!spreadable : isArray(O); +}; + +var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; + +// `Array.prototype.concat` method +// https://tc39.es/ecma262/#sec-array.prototype.concat +// with adding support of @@isConcatSpreadable and @@species +$({ target: 'Array', proto: true, forced: FORCED }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + concat: function concat(arg) { + var O = toObject(this); + var A = arraySpeciesCreate(O, 0); + var n = 0; + var i, k, length, len, E; + for (i = -1, length = arguments.length; i < length; i++) { + E = i === -1 ? O : arguments[i]; + if (isConcatSpreadable(E)) { + len = lengthOfArrayLike(E); + if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); + } else { + if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); + createProperty(A, n++, E); + } + } + A.length = n; + return A; + } +}); + + +/***/ }), + +/***/ 545: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var copyWithin = __webpack_require__(1048); +var addToUnscopables = __webpack_require__(1223); + +// `Array.prototype.copyWithin` method +// https://tc39.es/ecma262/#sec-array.prototype.copywithin +$({ target: 'Array', proto: true }, { + copyWithin: copyWithin +}); + +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('copyWithin'); + + +/***/ }), + +/***/ 3290: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var fill = __webpack_require__(1285); +var addToUnscopables = __webpack_require__(1223); + +// `Array.prototype.fill` method +// https://tc39.es/ecma262/#sec-array.prototype.fill +$({ target: 'Array', proto: true }, { + fill: fill +}); + +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('fill'); + + +/***/ }), + +/***/ 7327: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var $filter = (__webpack_require__(2092).filter); +var arrayMethodHasSpeciesSupport = __webpack_require__(1194); + +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); + +// `Array.prototype.filter` method +// https://tc39.es/ecma262/#sec-array.prototype.filter +// with adding support of @@species +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + filter: function filter(callbackfn /* , thisArg */) { + return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ 1038: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var from = __webpack_require__(8457); +var checkCorrectnessOfIteration = __webpack_require__(7072); + +var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { + // eslint-disable-next-line es/no-array-from -- required for testing + Array.from(iterable); +}); + +// `Array.from` method +// https://tc39.es/ecma262/#sec-array.from +$({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { + from: from +}); + + +/***/ }), + +/***/ 6699: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var $includes = (__webpack_require__(1318).includes); +var addToUnscopables = __webpack_require__(1223); + +// `Array.prototype.includes` method +// https://tc39.es/ecma262/#sec-array.prototype.includes +$({ target: 'Array', proto: true }, { + includes: function includes(el /* , fromIndex = 0 */) { + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('includes'); + + +/***/ }), + +/***/ 6992: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var toIndexedObject = __webpack_require__(5656); +var addToUnscopables = __webpack_require__(1223); +var Iterators = __webpack_require__(7497); +var InternalStateModule = __webpack_require__(9909); +var defineIterator = __webpack_require__(654); + +var ARRAY_ITERATOR = 'Array Iterator'; +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); + +// `Array.prototype.entries` method +// https://tc39.es/ecma262/#sec-array.prototype.entries +// `Array.prototype.keys` method +// https://tc39.es/ecma262/#sec-array.prototype.keys +// `Array.prototype.values` method +// https://tc39.es/ecma262/#sec-array.prototype.values +// `Array.prototype[@@iterator]` method +// https://tc39.es/ecma262/#sec-array.prototype-@@iterator +// `CreateArrayIterator` internal method +// https://tc39.es/ecma262/#sec-createarrayiterator +module.exports = defineIterator(Array, 'Array', function (iterated, kind) { + setInternalState(this, { + type: ARRAY_ITERATOR, + target: toIndexedObject(iterated), // target + index: 0, // next index + kind: kind // kind + }); +// `%ArrayIteratorPrototype%.next` method +// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next +}, function () { + var state = getInternalState(this); + var target = state.target; + var kind = state.kind; + var index = state.index++; + if (!target || index >= target.length) { + state.target = undefined; + return { value: undefined, done: true }; + } + if (kind == 'keys') return { value: index, done: false }; + if (kind == 'values') return { value: target[index], done: false }; + return { value: [index, target[index]], done: false }; +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% +// https://tc39.es/ecma262/#sec-createunmappedargumentsobject +// https://tc39.es/ecma262/#sec-createmappedargumentsobject +Iterators.Arguments = Iterators.Array; + +// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); + + +/***/ }), + +/***/ 9600: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var uncurryThis = __webpack_require__(1702); +var IndexedObject = __webpack_require__(8361); +var toIndexedObject = __webpack_require__(5656); +var arrayMethodIsStrict = __webpack_require__(9341); + +var un$Join = uncurryThis([].join); + +var ES3_STRINGS = IndexedObject != Object; +var STRICT_METHOD = arrayMethodIsStrict('join', ','); + +// `Array.prototype.join` method +// https://tc39.es/ecma262/#sec-array.prototype.join +$({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, { + join: function join(separator) { + return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator); + } +}); + + +/***/ }), + +/***/ 1249: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var $map = (__webpack_require__(2092).map); +var arrayMethodHasSpeciesSupport = __webpack_require__(1194); + +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); + +// `Array.prototype.map` method +// https://tc39.es/ecma262/#sec-array.prototype.map +// with adding support of @@species +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + map: function map(callbackfn /* , thisArg */) { + return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); + + +/***/ }), + +/***/ 7042: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var isArray = __webpack_require__(3157); +var isConstructor = __webpack_require__(4411); +var isObject = __webpack_require__(111); +var toAbsoluteIndex = __webpack_require__(1400); +var lengthOfArrayLike = __webpack_require__(6244); +var toIndexedObject = __webpack_require__(5656); +var createProperty = __webpack_require__(6135); +var wellKnownSymbol = __webpack_require__(5112); +var arrayMethodHasSpeciesSupport = __webpack_require__(1194); +var un$Slice = __webpack_require__(206); + +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); + +var SPECIES = wellKnownSymbol('species'); +var Array = global.Array; +var max = Math.max; + +// `Array.prototype.slice` method +// https://tc39.es/ecma262/#sec-array.prototype.slice +// fallback for not array-like ES3 strings and DOM objects +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + slice: function slice(start, end) { + var O = toIndexedObject(this); + var length = lengthOfArrayLike(O); + var k = toAbsoluteIndex(start, length); + var fin = toAbsoluteIndex(end === undefined ? length : end, length); + // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible + var Constructor, result, n; + if (isArray(O)) { + Constructor = O.constructor; + // cross-realm fallback + if (isConstructor(Constructor) && (Constructor === Array || isArray(Constructor.prototype))) { + Constructor = undefined; + } else if (isObject(Constructor)) { + Constructor = Constructor[SPECIES]; + if (Constructor === null) Constructor = undefined; + } + if (Constructor === Array || Constructor === undefined) { + return un$Slice(O, k, fin); + } + } + result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0)); + for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); + result.length = n; + return result; + } +}); + + +/***/ }), + +/***/ 2707: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var uncurryThis = __webpack_require__(1702); +var aCallable = __webpack_require__(9662); +var toObject = __webpack_require__(7908); +var lengthOfArrayLike = __webpack_require__(6244); +var toString = __webpack_require__(1340); +var fails = __webpack_require__(7293); +var internalSort = __webpack_require__(4362); +var arrayMethodIsStrict = __webpack_require__(9341); +var FF = __webpack_require__(8886); +var IE_OR_EDGE = __webpack_require__(256); +var V8 = __webpack_require__(7392); +var WEBKIT = __webpack_require__(8008); + +var test = []; +var un$Sort = uncurryThis(test.sort); +var push = uncurryThis(test.push); + +// IE8- +var FAILS_ON_UNDEFINED = fails(function () { + test.sort(undefined); +}); +// V8 bug +var FAILS_ON_NULL = fails(function () { + test.sort(null); +}); +// Old WebKit +var STRICT_METHOD = arrayMethodIsStrict('sort'); + +var STABLE_SORT = !fails(function () { + // feature detection can be too slow, so check engines versions + if (V8) return V8 < 70; + if (FF && FF > 3) return; + if (IE_OR_EDGE) return true; + if (WEBKIT) return WEBKIT < 603; + + var result = ''; + var code, chr, value, index; + + // generate an array with more 512 elements (Chakra and old V8 fails only in this case) + for (code = 65; code < 76; code++) { + chr = String.fromCharCode(code); + + switch (code) { + case 66: case 69: case 70: case 72: value = 3; break; + case 68: case 71: value = 4; break; + default: value = 2; + } + + for (index = 0; index < 47; index++) { + test.push({ k: chr + index, v: value }); + } + } + + test.sort(function (a, b) { return b.v - a.v; }); + + for (index = 0; index < test.length; index++) { + chr = test[index].k.charAt(0); + if (result.charAt(result.length - 1) !== chr) result += chr; + } + + return result !== 'DGBEFHACIJK'; +}); + +var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT; + +var getSortCompare = function (comparefn) { + return function (x, y) { + if (y === undefined) return -1; + if (x === undefined) return 1; + if (comparefn !== undefined) return +comparefn(x, y) || 0; + return toString(x) > toString(y) ? 1 : -1; + }; +}; + +// `Array.prototype.sort` method +// https://tc39.es/ecma262/#sec-array.prototype.sort +$({ target: 'Array', proto: true, forced: FORCED }, { + sort: function sort(comparefn) { + if (comparefn !== undefined) aCallable(comparefn); + + var array = toObject(this); + + if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn); + + var items = []; + var arrayLength = lengthOfArrayLike(array); + var itemsLength, index; + + for (index = 0; index < arrayLength; index++) { + if (index in array) push(items, array[index]); + } + + internalSort(items, getSortCompare(comparefn)); + + itemsLength = items.length; + index = 0; + + while (index < itemsLength) array[index] = items[index++]; + while (index < arrayLength) delete array[index++]; + + return array; + } +}); + + +/***/ }), + +/***/ 561: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var toAbsoluteIndex = __webpack_require__(1400); +var toIntegerOrInfinity = __webpack_require__(9303); +var lengthOfArrayLike = __webpack_require__(6244); +var toObject = __webpack_require__(7908); +var arraySpeciesCreate = __webpack_require__(5417); +var createProperty = __webpack_require__(6135); +var arrayMethodHasSpeciesSupport = __webpack_require__(1194); + +var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice'); + +var TypeError = global.TypeError; +var max = Math.max; +var min = Math.min; +var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; +var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; + +// `Array.prototype.splice` method +// https://tc39.es/ecma262/#sec-array.prototype.splice +// with adding support of @@species +$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { + splice: function splice(start, deleteCount /* , ...items */) { + var O = toObject(this); + var len = lengthOfArrayLike(O); + var actualStart = toAbsoluteIndex(start, len); + var argumentsLength = arguments.length; + var insertCount, actualDeleteCount, A, k, from, to; + if (argumentsLength === 0) { + insertCount = actualDeleteCount = 0; + } else if (argumentsLength === 1) { + insertCount = 0; + actualDeleteCount = len - actualStart; + } else { + insertCount = argumentsLength - 2; + actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart); + } + if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { + throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); + } + A = arraySpeciesCreate(O, actualDeleteCount); + for (k = 0; k < actualDeleteCount; k++) { + from = actualStart + k; + if (from in O) createProperty(A, k, O[from]); + } + A.length = actualDeleteCount; + if (insertCount < actualDeleteCount) { + for (k = actualStart; k < len - actualDeleteCount; k++) { + from = k + actualDeleteCount; + to = k + insertCount; + if (from in O) O[to] = O[from]; + else delete O[to]; + } + for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; + } else if (insertCount > actualDeleteCount) { + for (k = len - actualDeleteCount; k > actualStart; k--) { + from = k + actualDeleteCount - 1; + to = k + insertCount - 1; + if (from in O) O[to] = O[from]; + else delete O[to]; + } + } + for (k = 0; k < insertCount; k++) { + O[k + actualStart] = arguments[k + 2]; + } + O.length = len - actualDeleteCount + insertCount; + return A; + } +}); + + +/***/ }), + +/***/ 6078: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var hasOwn = __webpack_require__(2597); +var redefine = __webpack_require__(1320); +var dateToPrimitive = __webpack_require__(8709); +var wellKnownSymbol = __webpack_require__(5112); + +var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); +var DatePrototype = Date.prototype; + +// `Date.prototype[@@toPrimitive]` method +// https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive +if (!hasOwn(DatePrototype, TO_PRIMITIVE)) { + redefine(DatePrototype, TO_PRIMITIVE, dateToPrimitive); +} + + +/***/ }), + +/***/ 8309: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(9781); +var FUNCTION_NAME_EXISTS = (__webpack_require__(6530).EXISTS); +var uncurryThis = __webpack_require__(1702); +var defineProperty = (__webpack_require__(3070).f); + +var FunctionPrototype = Function.prototype; +var functionToString = uncurryThis(FunctionPrototype.toString); +var nameRE = /^\s*function ([^ (]*)/; +var regExpExec = uncurryThis(nameRE.exec); +var NAME = 'name'; + +// Function instances `.name` property +// https://tc39.es/ecma262/#sec-function-instances-name +if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) { + defineProperty(FunctionPrototype, NAME, { + configurable: true, + get: function () { + try { + return regExpExec(nameRE, functionToString(this))[1]; + } catch (error) { + return ''; + } + } + }); +} + + +/***/ }), + +/***/ 5837: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); + +// `globalThis` object +// https://tc39.es/ecma262/#sec-globalthis +$({ global: true }, { + globalThis: global +}); + + +/***/ }), + +/***/ 3706: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var setToStringTag = __webpack_require__(8003); + +// JSON[@@toStringTag] property +// https://tc39.es/ecma262/#sec-json-@@tostringtag +setToStringTag(global.JSON, 'JSON', true); + + +/***/ }), + +/***/ 1532: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var collection = __webpack_require__(7710); +var collectionStrong = __webpack_require__(5631); + +// `Map` constructor +// https://tc39.es/ecma262/#sec-map-objects +collection('Map', function (init) { + return function Map() { return init(this, arguments.length ? arguments[0] : undefined); }; +}, collectionStrong); + + +/***/ }), + +/***/ 2703: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var setToStringTag = __webpack_require__(8003); + +// Math[@@toStringTag] property +// https://tc39.es/ecma262/#sec-math-@@tostringtag +setToStringTag(Math, 'Math', true); + + +/***/ }), + +/***/ 9653: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var DESCRIPTORS = __webpack_require__(9781); +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var isForced = __webpack_require__(4705); +var redefine = __webpack_require__(1320); +var hasOwn = __webpack_require__(2597); +var inheritIfRequired = __webpack_require__(9587); +var isPrototypeOf = __webpack_require__(7976); +var isSymbol = __webpack_require__(2190); +var toPrimitive = __webpack_require__(7593); +var fails = __webpack_require__(7293); +var getOwnPropertyNames = (__webpack_require__(8006).f); +var getOwnPropertyDescriptor = (__webpack_require__(1236).f); +var defineProperty = (__webpack_require__(3070).f); +var thisNumberValue = __webpack_require__(863); +var trim = (__webpack_require__(3111).trim); + +var NUMBER = 'Number'; +var NativeNumber = global[NUMBER]; +var NumberPrototype = NativeNumber.prototype; +var TypeError = global.TypeError; +var arraySlice = uncurryThis(''.slice); +var charCodeAt = uncurryThis(''.charCodeAt); + +// `ToNumeric` abstract operation +// https://tc39.es/ecma262/#sec-tonumeric +var toNumeric = function (value) { + var primValue = toPrimitive(value, 'number'); + return typeof primValue == 'bigint' ? primValue : toNumber(primValue); +}; + +// `ToNumber` abstract operation +// https://tc39.es/ecma262/#sec-tonumber +var toNumber = function (argument) { + var it = toPrimitive(argument, 'number'); + var first, third, radix, maxCode, digits, length, index, code; + if (isSymbol(it)) throw TypeError('Cannot convert a Symbol value to a number'); + if (typeof it == 'string' && it.length > 2) { + it = trim(it); + first = charCodeAt(it, 0); + if (first === 43 || first === 45) { + third = charCodeAt(it, 2); + if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if (first === 48) { + switch (charCodeAt(it, 1)) { + case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i + case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i + default: return +it; + } + digits = arraySlice(it, 2); + length = digits.length; + for (index = 0; index < length; index++) { + code = charCodeAt(digits, index); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if (code < 48 || code > maxCode) return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +// `Number` constructor +// https://tc39.es/ecma262/#sec-number-constructor +if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { + var NumberWrapper = function Number(value) { + var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value)); + var dummy = this; + // check on 1..constructor(foo) case + return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); }) + ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n; + }; + for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES2015 (in case, if modules with ES2015 Number statics required before): + 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' + + // ESNext + 'fromString,range' + ).split(','), j = 0, key; keys.length > j; j++) { + if (hasOwn(NativeNumber, key = keys[j]) && !hasOwn(NumberWrapper, key)) { + defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key)); + } + } + NumberWrapper.prototype = NumberPrototype; + NumberPrototype.constructor = NumberWrapper; + redefine(global, NUMBER, NumberWrapper); +} + + +/***/ }), + +/***/ 3299: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); + +// `Number.EPSILON` constant +// https://tc39.es/ecma262/#sec-number.epsilon +$({ target: 'Number', stat: true }, { + EPSILON: Math.pow(2, -52) +}); + + +/***/ }), + +/***/ 5192: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var numberIsFinite = __webpack_require__(7023); + +// `Number.isFinite` method +// https://tc39.es/ecma262/#sec-number.isfinite +$({ target: 'Number', stat: true }, { isFinite: numberIsFinite }); + + +/***/ }), + +/***/ 3161: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var isIntegralNumber = __webpack_require__(5988); + +// `Number.isInteger` method +// https://tc39.es/ecma262/#sec-number.isinteger +$({ target: 'Number', stat: true }, { + isInteger: isIntegralNumber +}); + + +/***/ }), + +/***/ 6977: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var toIntegerOrInfinity = __webpack_require__(9303); +var thisNumberValue = __webpack_require__(863); +var $repeat = __webpack_require__(8415); +var fails = __webpack_require__(7293); + +var RangeError = global.RangeError; +var String = global.String; +var floor = Math.floor; +var repeat = uncurryThis($repeat); +var stringSlice = uncurryThis(''.slice); +var un$ToFixed = uncurryThis(1.0.toFixed); + +var pow = function (x, n, acc) { + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; + +var log = function (x) { + var n = 0; + var x2 = x; + while (x2 >= 4096) { + n += 12; + x2 /= 4096; + } + while (x2 >= 2) { + n += 1; + x2 /= 2; + } return n; +}; + +var multiply = function (data, n, c) { + var index = -1; + var c2 = c; + while (++index < 6) { + c2 += n * data[index]; + data[index] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; + +var divide = function (data, n) { + var index = 6; + var c = 0; + while (--index >= 0) { + c += data[index]; + data[index] = floor(c / n); + c = (c % n) * 1e7; + } +}; + +var dataToString = function (data) { + var index = 6; + var s = ''; + while (--index >= 0) { + if (s !== '' || index === 0 || data[index] !== 0) { + var t = String(data[index]); + s = s === '' ? t : s + repeat('0', 7 - t.length) + t; + } + } return s; +}; + +var FORCED = fails(function () { + return un$ToFixed(0.00008, 3) !== '0.000' || + un$ToFixed(0.9, 0) !== '1' || + un$ToFixed(1.255, 2) !== '1.25' || + un$ToFixed(1000000000000000128.0, 0) !== '1000000000000000128'; +}) || !fails(function () { + // V8 ~ Android 4.3- + un$ToFixed({}); +}); + +// `Number.prototype.toFixed` method +// https://tc39.es/ecma262/#sec-number.prototype.tofixed +$({ target: 'Number', proto: true, forced: FORCED }, { + toFixed: function toFixed(fractionDigits) { + var number = thisNumberValue(this); + var fractDigits = toIntegerOrInfinity(fractionDigits); + var data = [0, 0, 0, 0, 0, 0]; + var sign = ''; + var result = '0'; + var e, z, j, k; + + if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits'); + // eslint-disable-next-line no-self-compare -- NaN check + if (number != number) return 'NaN'; + if (number <= -1e21 || number >= 1e21) return String(number); + if (number < 0) { + sign = '-'; + number = -number; + } + if (number > 1e-21) { + e = log(number * pow(2, 69, 1)) - 69; + z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if (e > 0) { + multiply(data, 0, z); + j = fractDigits; + while (j >= 7) { + multiply(data, 1e7, 0); + j -= 7; + } + multiply(data, pow(10, j, 1), 0); + j = e - 1; + while (j >= 23) { + divide(data, 1 << 23); + j -= 23; + } + divide(data, 1 << j); + multiply(data, 1, 1); + divide(data, 2); + result = dataToString(data); + } else { + multiply(data, 0, z); + multiply(data, 1 << -e, 0); + result = dataToString(data) + repeat('0', fractDigits); + } + } + if (fractDigits > 0) { + k = result.length; + result = sign + (k <= fractDigits + ? '0.' + repeat('0', fractDigits - k) + result + : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits)); + } else { + result = sign + result; + } return result; + } +}); + + +/***/ }), + +/***/ 9601: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var assign = __webpack_require__(1574); + +// `Object.assign` method +// https://tc39.es/ecma262/#sec-object.assign +// eslint-disable-next-line es/no-object-assign -- required for testing +$({ target: 'Object', stat: true, forced: Object.assign !== assign }, { + assign: assign +}); + + +/***/ }), + +/***/ 3371: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var FREEZING = __webpack_require__(6677); +var fails = __webpack_require__(7293); +var isObject = __webpack_require__(111); +var onFreeze = (__webpack_require__(2423).onFreeze); + +// eslint-disable-next-line es/no-object-freeze -- safe +var $freeze = Object.freeze; +var FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); }); + +// `Object.freeze` method +// https://tc39.es/ecma262/#sec-object.freeze +$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, { + freeze: function freeze(it) { + return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it; + } +}); + + +/***/ }), + +/***/ 5003: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var fails = __webpack_require__(7293); +var toIndexedObject = __webpack_require__(5656); +var nativeGetOwnPropertyDescriptor = (__webpack_require__(1236).f); +var DESCRIPTORS = __webpack_require__(9781); + +var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); }); +var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES; + +// `Object.getOwnPropertyDescriptor` method +// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor +$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) { + return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key); + } +}); + + +/***/ }), + +/***/ 9337: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var DESCRIPTORS = __webpack_require__(9781); +var ownKeys = __webpack_require__(3887); +var toIndexedObject = __webpack_require__(5656); +var getOwnPropertyDescriptorModule = __webpack_require__(1236); +var createProperty = __webpack_require__(6135); + +// `Object.getOwnPropertyDescriptors` method +// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors +$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { + var O = toIndexedObject(object); + var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; + var keys = ownKeys(O); + var result = {}; + var index = 0; + var key, descriptor; + while (keys.length > index) { + descriptor = getOwnPropertyDescriptor(O, key = keys[index++]); + if (descriptor !== undefined) createProperty(result, key, descriptor); + } + return result; + } +}); + + +/***/ }), + +/***/ 489: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var fails = __webpack_require__(7293); +var toObject = __webpack_require__(7908); +var nativeGetPrototypeOf = __webpack_require__(9518); +var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544); + +var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); }); + +// `Object.getPrototypeOf` method +// https://tc39.es/ecma262/#sec-object.getprototypeof +$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, { + getPrototypeOf: function getPrototypeOf(it) { + return nativeGetPrototypeOf(toObject(it)); + } +}); + + + +/***/ }), + +/***/ 7941: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var toObject = __webpack_require__(7908); +var nativeKeys = __webpack_require__(1956); +var fails = __webpack_require__(7293); + +var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); }); + +// `Object.keys` method +// https://tc39.es/ecma262/#sec-object.keys +$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { + keys: function keys(it) { + return nativeKeys(toObject(it)); + } +}); + + +/***/ }), + +/***/ 1539: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); +var redefine = __webpack_require__(1320); +var toString = __webpack_require__(288); + +// `Object.prototype.toString` method +// https://tc39.es/ecma262/#sec-object.prototype.tostring +if (!TO_STRING_TAG_SUPPORT) { + redefine(Object.prototype, 'toString', toString, { unsafe: true }); +} + + +/***/ }), + +/***/ 2479: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var $values = (__webpack_require__(4699).values); + +// `Object.values` method +// https://tc39.es/ecma262/#sec-object.values +$({ target: 'Object', stat: true }, { + values: function values(O) { + return $values(O); + } +}); + + +/***/ }), + +/***/ 7922: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var call = __webpack_require__(6916); +var aCallable = __webpack_require__(9662); +var newPromiseCapabilityModule = __webpack_require__(8523); +var perform = __webpack_require__(2534); +var iterate = __webpack_require__(408); + +// `Promise.allSettled` method +// https://tc39.es/ecma262/#sec-promise.allsettled +$({ target: 'Promise', stat: true }, { + allSettled: function allSettled(iterable) { + var C = this; + var capability = newPromiseCapabilityModule.f(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var promiseResolve = aCallable(C.resolve); + var values = []; + var counter = 0; + var remaining = 1; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyCalled = false; + remaining++; + call(promiseResolve, C, promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[index] = { status: 'fulfilled', value: value }; + --remaining || resolve(values); + }, function (error) { + if (alreadyCalled) return; + alreadyCalled = true; + values[index] = { status: 'rejected', reason: error }; + --remaining || resolve(values); + }); + }); + --remaining || resolve(values); + }); + if (result.error) reject(result.value); + return capability.promise; + } +}); + + +/***/ }), + +/***/ 4668: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var aCallable = __webpack_require__(9662); +var getBuiltIn = __webpack_require__(5005); +var call = __webpack_require__(6916); +var newPromiseCapabilityModule = __webpack_require__(8523); +var perform = __webpack_require__(2534); +var iterate = __webpack_require__(408); + +var PROMISE_ANY_ERROR = 'No one promise resolved'; + +// `Promise.any` method +// https://tc39.es/ecma262/#sec-promise.any +$({ target: 'Promise', stat: true }, { + any: function any(iterable) { + var C = this; + var AggregateError = getBuiltIn('AggregateError'); + var capability = newPromiseCapabilityModule.f(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var promiseResolve = aCallable(C.resolve); + var errors = []; + var counter = 0; + var remaining = 1; + var alreadyResolved = false; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyRejected = false; + remaining++; + call(promiseResolve, C, promise).then(function (value) { + if (alreadyRejected || alreadyResolved) return; + alreadyResolved = true; + resolve(value); + }, function (error) { + if (alreadyRejected || alreadyResolved) return; + alreadyRejected = true; + errors[index] = error; + --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR)); + }); + }); + --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR)); + }); + if (result.error) reject(result.value); + return capability.promise; + } +}); + + +/***/ }), + +/***/ 7727: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var IS_PURE = __webpack_require__(1913); +var NativePromise = __webpack_require__(3366); +var fails = __webpack_require__(7293); +var getBuiltIn = __webpack_require__(5005); +var isCallable = __webpack_require__(614); +var speciesConstructor = __webpack_require__(6707); +var promiseResolve = __webpack_require__(9478); +var redefine = __webpack_require__(1320); + +// Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829 +var NON_GENERIC = !!NativePromise && fails(function () { + NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ }); +}); + +// `Promise.prototype.finally` method +// https://tc39.es/ecma262/#sec-promise.prototype.finally +$({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, { + 'finally': function (onFinally) { + var C = speciesConstructor(this, getBuiltIn('Promise')); + var isFunction = isCallable(onFinally); + 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 + ); + } +}); + +// makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then` +if (!IS_PURE && isCallable(NativePromise)) { + var method = getBuiltIn('Promise').prototype['finally']; + if (NativePromise.prototype['finally'] !== method) { + redefine(NativePromise.prototype, 'finally', method, { unsafe: true }); + } +} + + +/***/ }), + +/***/ 8674: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var IS_PURE = __webpack_require__(1913); +var global = __webpack_require__(7854); +var getBuiltIn = __webpack_require__(5005); +var call = __webpack_require__(6916); +var NativePromise = __webpack_require__(3366); +var redefine = __webpack_require__(1320); +var redefineAll = __webpack_require__(2248); +var setPrototypeOf = __webpack_require__(7674); +var setToStringTag = __webpack_require__(8003); +var setSpecies = __webpack_require__(6340); +var aCallable = __webpack_require__(9662); +var isCallable = __webpack_require__(614); +var isObject = __webpack_require__(111); +var anInstance = __webpack_require__(5787); +var inspectSource = __webpack_require__(2788); +var iterate = __webpack_require__(408); +var checkCorrectnessOfIteration = __webpack_require__(7072); +var speciesConstructor = __webpack_require__(6707); +var task = (__webpack_require__(261).set); +var microtask = __webpack_require__(5948); +var promiseResolve = __webpack_require__(9478); +var hostReportErrors = __webpack_require__(842); +var newPromiseCapabilityModule = __webpack_require__(8523); +var perform = __webpack_require__(2534); +var InternalStateModule = __webpack_require__(9909); +var isForced = __webpack_require__(4705); +var wellKnownSymbol = __webpack_require__(5112); +var IS_BROWSER = __webpack_require__(7871); +var IS_NODE = __webpack_require__(5268); +var V8_VERSION = __webpack_require__(7392); + +var SPECIES = wellKnownSymbol('species'); +var PROMISE = 'Promise'; + +var getInternalState = InternalStateModule.get; +var setInternalState = InternalStateModule.set; +var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); +var NativePromisePrototype = NativePromise && NativePromise.prototype; +var PromiseConstructor = NativePromise; +var PromisePrototype = NativePromisePrototype; +var TypeError = global.TypeError; +var document = global.document; +var process = global.process; +var newPromiseCapability = newPromiseCapabilityModule.f; +var newGenericPromiseCapability = newPromiseCapability; + +var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent); +var NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent); +var UNHANDLED_REJECTION = 'unhandledrejection'; +var REJECTION_HANDLED = 'rejectionhandled'; +var PENDING = 0; +var FULFILLED = 1; +var REJECTED = 2; +var HANDLED = 1; +var UNHANDLED = 2; +var SUBCLASSING = false; + +var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; + +var FORCED = isForced(PROMISE, function () { + var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor); + var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor); + // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables + // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 + // We can't detect it synchronously, so just check versions + if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true; + // We need Promise#finally in the pure version for preventing prototype pollution + if (IS_PURE && !PromisePrototype['finally']) return true; + // We can't use @@species feature detection in V8 since it causes + // deoptimization and performance degradation + // https://github.com/zloirock/core-js/issues/679 + if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false; + // Detect correctness of subclassing with @@species support + var promise = new PromiseConstructor(function (resolve) { resolve(1); }); + var FakePromise = function (exec) { + exec(function () { /* empty */ }, function () { /* empty */ }); + }; + var constructor = promise.constructor = {}; + constructor[SPECIES] = FakePromise; + SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise; + if (!SUBCLASSING) return true; + // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT; +}); + +var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) { + PromiseConstructor.all(iterable)['catch'](function () { /* empty */ }); +}); + +// helpers +var isThenable = function (it) { + var then; + return isObject(it) && isCallable(then = it.then) ? then : false; +}; + +var notify = function (state, isReject) { + if (state.notified) return; + state.notified = true; + var chain = state.reactions; + microtask(function () { + var value = state.value; + var ok = state.state == FULFILLED; + var index = 0; + // variable length - can't use forEach + while (chain.length > index) { + var reaction = chain[index++]; + 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 (state.rejection === UNHANDLED) onHandleUnhandled(state); + state.rejection = HANDLED; + } + if (handler === true) result = value; + else { + if (domain) domain.enter(); + result = handler(value); // can throw + if (domain) { + domain.exit(); + exited = true; + } + } + if (result === reaction.promise) { + reject(TypeError('Promise-chain cycle')); + } else if (then = isThenable(result)) { + call(then, result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch (error) { + if (domain && !exited) domain.exit(); + reject(error); + } + } + state.reactions = []; + state.notified = false; + if (isReject && !state.rejection) onUnhandled(state); + }); +}; + +var dispatchEvent = function (name, promise, reason) { + var event, handler; + if (DISPATCH_EVENT) { + event = document.createEvent('Event'); + event.promise = promise; + event.reason = reason; + event.initEvent(name, false, true); + global.dispatchEvent(event); + } else event = { promise: promise, reason: reason }; + if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event); + else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); +}; + +var onUnhandled = function (state) { + call(task, global, function () { + var promise = state.facade; + var value = state.value; + var IS_UNHANDLED = isUnhandled(state); + var result; + if (IS_UNHANDLED) { + result = perform(function () { + if (IS_NODE) { + process.emit('unhandledRejection', value, promise); + } else dispatchEvent(UNHANDLED_REJECTION, promise, value); + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; + if (result.error) throw result.value; + } + }); +}; + +var isUnhandled = function (state) { + return state.rejection !== HANDLED && !state.parent; +}; + +var onHandleUnhandled = function (state) { + call(task, global, function () { + var promise = state.facade; + if (IS_NODE) { + process.emit('rejectionHandled', promise); + } else dispatchEvent(REJECTION_HANDLED, promise, state.value); + }); +}; + +var bind = function (fn, state, unwrap) { + return function (value) { + fn(state, value, unwrap); + }; +}; + +var internalReject = function (state, value, unwrap) { + if (state.done) return; + state.done = true; + if (unwrap) state = unwrap; + state.value = value; + state.state = REJECTED; + notify(state, true); +}; + +var internalResolve = function (state, value, unwrap) { + if (state.done) return; + state.done = true; + if (unwrap) state = unwrap; + try { + if (state.facade === value) throw TypeError("Promise can't be resolved itself"); + var then = isThenable(value); + if (then) { + microtask(function () { + var wrapper = { done: false }; + try { + call(then, value, + bind(internalResolve, wrapper, state), + bind(internalReject, wrapper, state) + ); + } catch (error) { + internalReject(wrapper, error, state); + } + }); + } else { + state.value = value; + state.state = FULFILLED; + notify(state, false); + } + } catch (error) { + internalReject({ done: false }, error, state); + } +}; + +// constructor polyfill +if (FORCED) { + // 25.4.3.1 Promise(executor) + PromiseConstructor = function Promise(executor) { + anInstance(this, PromisePrototype); + aCallable(executor); + call(Internal, this); + var state = getInternalState(this); + try { + executor(bind(internalResolve, state), bind(internalReject, state)); + } catch (error) { + internalReject(state, error); + } + }; + PromisePrototype = PromiseConstructor.prototype; + // eslint-disable-next-line no-unused-vars -- required for `.length` + Internal = function Promise(executor) { + setInternalState(this, { + type: PROMISE, + done: false, + notified: false, + parent: false, + reactions: [], + rejection: false, + state: PENDING, + value: undefined + }); + }; + Internal.prototype = redefineAll(PromisePrototype, { + // `Promise.prototype.then` method + // https://tc39.es/ecma262/#sec-promise.prototype.then + then: function then(onFulfilled, onRejected) { + var state = getInternalPromiseState(this); + var reactions = state.reactions; + var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); + reaction.ok = isCallable(onFulfilled) ? onFulfilled : true; + reaction.fail = isCallable(onRejected) && onRejected; + reaction.domain = IS_NODE ? process.domain : undefined; + state.parent = true; + reactions[reactions.length] = reaction; + if (state.state != PENDING) notify(state, false); + return reaction.promise; + }, + // `Promise.prototype.catch` method + // https://tc39.es/ecma262/#sec-promise.prototype.catch + 'catch': function (onRejected) { + return this.then(undefined, onRejected); + } + }); + OwnPromiseCapability = function () { + var promise = new Internal(); + var state = getInternalState(promise); + this.promise = promise; + this.resolve = bind(internalResolve, state); + this.reject = bind(internalReject, state); + }; + newPromiseCapabilityModule.f = newPromiseCapability = function (C) { + return C === PromiseConstructor || C === PromiseWrapper + ? new OwnPromiseCapability(C) + : newGenericPromiseCapability(C); + }; + + if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) { + nativeThen = NativePromisePrototype.then; + + if (!SUBCLASSING) { + // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs + redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) { + var that = this; + return new PromiseConstructor(function (resolve, reject) { + call(nativeThen, that, resolve, reject); + }).then(onFulfilled, onRejected); + // https://github.com/zloirock/core-js/issues/640 + }, { unsafe: true }); + + // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then` + redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true }); + } + + // make `.constructor === Promise` work for native promise-based APIs + try { + delete NativePromisePrototype.constructor; + } catch (error) { /* empty */ } + + // make `instanceof Promise` work for native promise-based APIs + if (setPrototypeOf) { + setPrototypeOf(NativePromisePrototype, PromisePrototype); + } + } +} + +$({ global: true, wrap: true, forced: FORCED }, { + Promise: PromiseConstructor +}); + +setToStringTag(PromiseConstructor, PROMISE, false, true); +setSpecies(PROMISE); + +PromiseWrapper = getBuiltIn(PROMISE); + +// statics +$({ target: PROMISE, stat: true, forced: FORCED }, { + // `Promise.reject` method + // https://tc39.es/ecma262/#sec-promise.reject + reject: function reject(r) { + var capability = newPromiseCapability(this); + call(capability.reject, undefined, r); + return capability.promise; + } +}); + +$({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, { + // `Promise.resolve` method + // https://tc39.es/ecma262/#sec-promise.resolve + resolve: function resolve(x) { + return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x); + } +}); + +$({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { + // `Promise.all` method + // https://tc39.es/ecma262/#sec-promise.all + all: function all(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var resolve = capability.resolve; + var reject = capability.reject; + var result = perform(function () { + var $promiseResolve = aCallable(C.resolve); + var values = []; + var counter = 0; + var remaining = 1; + iterate(iterable, function (promise) { + var index = counter++; + var alreadyCalled = false; + remaining++; + call($promiseResolve, C, promise).then(function (value) { + if (alreadyCalled) return; + alreadyCalled = true; + values[index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if (result.error) reject(result.value); + return capability.promise; + }, + // `Promise.race` method + // https://tc39.es/ecma262/#sec-promise.race + race: function race(iterable) { + var C = this; + var capability = newPromiseCapability(C); + var reject = capability.reject; + var result = perform(function () { + var $promiseResolve = aCallable(C.resolve); + iterate(iterable, function (promise) { + call($promiseResolve, C, promise).then(capability.resolve, reject); + }); + }); + if (result.error) reject(result.value); + return capability.promise; + } +}); + + +/***/ }), + +/***/ 2419: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var getBuiltIn = __webpack_require__(5005); +var apply = __webpack_require__(2104); +var bind = __webpack_require__(7065); +var aConstructor = __webpack_require__(9483); +var anObject = __webpack_require__(9670); +var isObject = __webpack_require__(111); +var create = __webpack_require__(30); +var fails = __webpack_require__(7293); + +var nativeConstruct = getBuiltIn('Reflect', 'construct'); +var ObjectPrototype = Object.prototype; +var push = [].push; + +// `Reflect.construct` method +// https://tc39.es/ecma262/#sec-reflect.construct +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function () { + function F() { /* empty */ } + return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F); +}); + +var ARGS_BUG = !fails(function () { + nativeConstruct(function () { /* empty */ }); +}); + +var FORCED = NEW_TARGET_BUG || ARGS_BUG; + +$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, { + construct: function construct(Target, args /* , newTarget */) { + aConstructor(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]); + if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget); + if (Target == newTarget) { + // w/o altered newTarget, optimization for 0-4 arguments + switch (args.length) { + case 0: return new Target(); + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + apply(push, $args, args); + return new (apply(bind, Target, $args))(); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype; + var instance = create(isObject(proto) ? proto : ObjectPrototype); + var result = apply(Target, instance, args); + return isObject(result) ? result : instance; + } +}); + + +/***/ }), + +/***/ 4916: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var exec = __webpack_require__(2261); + +// `RegExp.prototype.exec` method +// https://tc39.es/ecma262/#sec-regexp.prototype.exec +$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { + exec: exec +}); + + +/***/ }), + +/***/ 2087: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var DESCRIPTORS = __webpack_require__(9781); +var objectDefinePropertyModule = __webpack_require__(3070); +var regExpFlags = __webpack_require__(7066); +var fails = __webpack_require__(7293); + +var RegExpPrototype = RegExp.prototype; + +var FORCED = DESCRIPTORS && fails(function () { + // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe + return Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call({ dotAll: true, sticky: true }) !== 'sy'; +}); + +// `RegExp.prototype.flags` getter +// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags +if (FORCED) objectDefinePropertyModule.f(RegExpPrototype, 'flags', { + configurable: true, + get: regExpFlags +}); + + +/***/ }), + +/***/ 9714: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var uncurryThis = __webpack_require__(1702); +var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER); +var redefine = __webpack_require__(1320); +var anObject = __webpack_require__(9670); +var isPrototypeOf = __webpack_require__(7976); +var $toString = __webpack_require__(1340); +var fails = __webpack_require__(7293); +var regExpFlags = __webpack_require__(7066); + +var TO_STRING = 'toString'; +var RegExpPrototype = RegExp.prototype; +var n$ToString = RegExpPrototype[TO_STRING]; +var getFlags = uncurryThis(regExpFlags); + +var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); +// FF44- RegExp#toString has a wrong name +var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING; + +// `RegExp.prototype.toString` method +// https://tc39.es/ecma262/#sec-regexp.prototype.tostring +if (NOT_GENERIC || INCORRECT_NAME) { + redefine(RegExp.prototype, TO_STRING, function toString() { + var R = anObject(this); + var p = $toString(R.source); + var rf = R.flags; + var f = $toString(rf === undefined && isPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf); + return '/' + p + '/' + f; + }, { unsafe: true }); +} + + +/***/ }), + +/***/ 189: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var collection = __webpack_require__(7710); +var collectionStrong = __webpack_require__(5631); + +// `Set` constructor +// https://tc39.es/ecma262/#sec-set-objects +collection('Set', function (init) { + return function Set() { return init(this, arguments.length ? arguments[0] : undefined); }; +}, collectionStrong); + + +/***/ }), + +/***/ 9841: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var codeAt = (__webpack_require__(8710).codeAt); + +// `String.prototype.codePointAt` method +// https://tc39.es/ecma262/#sec-string.prototype.codepointat +$({ target: 'String', proto: true }, { + codePointAt: function codePointAt(pos) { + return codeAt(this, pos); + } +}); + + +/***/ }), + +/***/ 4953: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var toAbsoluteIndex = __webpack_require__(1400); + +var RangeError = global.RangeError; +var fromCharCode = String.fromCharCode; +// eslint-disable-next-line es/no-string-fromcodepoint -- required for testing +var $fromCodePoint = String.fromCodePoint; +var join = uncurryThis([].join); + +// length should be 1, old FF problem +var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1; + +// `String.fromCodePoint` method +// https://tc39.es/ecma262/#sec-string.fromcodepoint +$({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + fromCodePoint: function fromCodePoint(x) { + var elements = []; + var length = arguments.length; + var i = 0; + var code; + while (length > i) { + code = +arguments[i++]; + if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point'); + elements[i] = code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00); + } return join(elements, ''); + } +}); + + +/***/ }), + +/***/ 2023: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var uncurryThis = __webpack_require__(1702); +var notARegExp = __webpack_require__(3929); +var requireObjectCoercible = __webpack_require__(4488); +var toString = __webpack_require__(1340); +var correctIsRegExpLogic = __webpack_require__(4964); + +var stringIndexOf = uncurryThis(''.indexOf); + +// `String.prototype.includes` method +// https://tc39.es/ecma262/#sec-string.prototype.includes +$({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { + includes: function includes(searchString /* , position = 0 */) { + return !!~stringIndexOf( + toString(requireObjectCoercible(this)), + toString(notARegExp(searchString)), + arguments.length > 1 ? arguments[1] : undefined + ); + } +}); + + +/***/ }), + +/***/ 8734: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var createHTML = __webpack_require__(4230); +var forcedStringHTMLMethod = __webpack_require__(3429); + +// `String.prototype.italics` method +// https://tc39.es/ecma262/#sec-string.prototype.italics +$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, { + italics: function italics() { + return createHTML(this, 'i', '', ''); + } +}); + + +/***/ }), + +/***/ 8783: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var charAt = (__webpack_require__(8710).charAt); +var toString = __webpack_require__(1340); +var InternalStateModule = __webpack_require__(9909); +var defineIterator = __webpack_require__(654); + +var STRING_ITERATOR = 'String Iterator'; +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); + +// `String.prototype[@@iterator]` method +// https://tc39.es/ecma262/#sec-string.prototype-@@iterator +defineIterator(String, 'String', function (iterated) { + setInternalState(this, { + type: STRING_ITERATOR, + string: toString(iterated), + index: 0 + }); +// `%StringIteratorPrototype%.next` method +// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next +}, function next() { + var state = getInternalState(this); + var string = state.string; + var index = state.index; + var point; + if (index >= string.length) return { value: undefined, done: true }; + point = charAt(string, index); + state.index += point.length; + return { value: point, done: false }; +}); + + +/***/ }), + +/***/ 9254: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var createHTML = __webpack_require__(4230); +var forcedStringHTMLMethod = __webpack_require__(3429); + +// `String.prototype.link` method +// https://tc39.es/ecma262/#sec-string.prototype.link +$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, { + link: function link(url) { + return createHTML(this, 'a', 'href', url); + } +}); + + +/***/ }), + +/***/ 6373: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +/* eslint-disable es/no-string-prototype-matchall -- safe */ +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var call = __webpack_require__(6916); +var uncurryThis = __webpack_require__(1702); +var createIteratorConstructor = __webpack_require__(4994); +var requireObjectCoercible = __webpack_require__(4488); +var toLength = __webpack_require__(7466); +var toString = __webpack_require__(1340); +var anObject = __webpack_require__(9670); +var classof = __webpack_require__(4326); +var isPrototypeOf = __webpack_require__(7976); +var isRegExp = __webpack_require__(7850); +var regExpFlags = __webpack_require__(7066); +var getMethod = __webpack_require__(8173); +var redefine = __webpack_require__(1320); +var fails = __webpack_require__(7293); +var wellKnownSymbol = __webpack_require__(5112); +var speciesConstructor = __webpack_require__(6707); +var advanceStringIndex = __webpack_require__(1530); +var regExpExec = __webpack_require__(7651); +var InternalStateModule = __webpack_require__(9909); +var IS_PURE = __webpack_require__(1913); + +var MATCH_ALL = wellKnownSymbol('matchAll'); +var REGEXP_STRING = 'RegExp String'; +var REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator'; +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR); +var RegExpPrototype = RegExp.prototype; +var TypeError = global.TypeError; +var getFlags = uncurryThis(regExpFlags); +var stringIndexOf = uncurryThis(''.indexOf); +var un$MatchAll = uncurryThis(''.matchAll); + +var WORKS_WITH_NON_GLOBAL_REGEX = !!un$MatchAll && !fails(function () { + un$MatchAll('a', /./); +}); + +var $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, $global, fullUnicode) { + setInternalState(this, { + type: REGEXP_STRING_ITERATOR, + regexp: regexp, + string: string, + global: $global, + unicode: fullUnicode, + done: false + }); +}, REGEXP_STRING, function next() { + var state = getInternalState(this); + if (state.done) return { value: undefined, done: true }; + var R = state.regexp; + var S = state.string; + var match = regExpExec(R, S); + if (match === null) return { value: undefined, done: state.done = true }; + if (state.global) { + if (toString(match[0]) === '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode); + return { value: match, done: false }; + } + state.done = true; + return { value: match, done: false }; +}); + +var $matchAll = function (string) { + var R = anObject(this); + var S = toString(string); + var C, flagsValue, flags, matcher, $global, fullUnicode; + C = speciesConstructor(R, RegExp); + flagsValue = R.flags; + if (flagsValue === undefined && isPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype)) { + flagsValue = getFlags(R); + } + flags = flagsValue === undefined ? '' : toString(flagsValue); + matcher = new C(C === RegExp ? R.source : R, flags); + $global = !!~stringIndexOf(flags, 'g'); + fullUnicode = !!~stringIndexOf(flags, 'u'); + matcher.lastIndex = toLength(R.lastIndex); + return new $RegExpStringIterator(matcher, S, $global, fullUnicode); +}; + +// `String.prototype.matchAll` method +// https://tc39.es/ecma262/#sec-string.prototype.matchall +$({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, { + matchAll: function matchAll(regexp) { + var O = requireObjectCoercible(this); + var flags, S, matcher, rx; + if (regexp != null) { + if (isRegExp(regexp)) { + flags = toString(requireObjectCoercible('flags' in RegExpPrototype + ? regexp.flags + : getFlags(regexp) + )); + if (!~stringIndexOf(flags, 'g')) throw TypeError('`.matchAll` does not allow non-global regexes'); + } + if (WORKS_WITH_NON_GLOBAL_REGEX) return un$MatchAll(O, regexp); + matcher = getMethod(regexp, MATCH_ALL); + if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll; + if (matcher) return call(matcher, regexp, O); + } else if (WORKS_WITH_NON_GLOBAL_REGEX) return un$MatchAll(O, regexp); + S = toString(O); + rx = new RegExp(regexp, 'g'); + return IS_PURE ? call($matchAll, rx, S) : rx[MATCH_ALL](S); + } +}); + +IS_PURE || MATCH_ALL in RegExpPrototype || redefine(RegExpPrototype, MATCH_ALL, $matchAll); + + +/***/ }), + +/***/ 4723: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var call = __webpack_require__(6916); +var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); +var anObject = __webpack_require__(9670); +var toLength = __webpack_require__(7466); +var toString = __webpack_require__(1340); +var requireObjectCoercible = __webpack_require__(4488); +var getMethod = __webpack_require__(8173); +var advanceStringIndex = __webpack_require__(1530); +var regExpExec = __webpack_require__(7651); + +// @@match logic +fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) { + return [ + // `String.prototype.match` method + // https://tc39.es/ecma262/#sec-string.prototype.match + function match(regexp) { + var O = requireObjectCoercible(this); + var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH); + return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O)); + }, + // `RegExp.prototype[@@match]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@match + function (string) { + var rx = anObject(this); + var S = toString(string); + var res = maybeCallNative(nativeMatch, rx, S); + + if (res.done) return res.value; + + if (!rx.global) return regExpExec(rx, S); + + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + var A = []; + var n = 0; + var result; + while ((result = regExpExec(rx, S)) !== null) { + var matchStr = toString(result[0]); + A[n] = matchStr; + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + n++; + } + return n === 0 ? null : A; + } + ]; +}); + + +/***/ }), + +/***/ 2481: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var $ = __webpack_require__(2109); +var repeat = __webpack_require__(8415); + +// `String.prototype.repeat` method +// https://tc39.es/ecma262/#sec-string.prototype.repeat +$({ target: 'String', proto: true }, { + repeat: repeat +}); + + +/***/ }), + +/***/ 5306: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var apply = __webpack_require__(2104); +var call = __webpack_require__(6916); +var uncurryThis = __webpack_require__(1702); +var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); +var fails = __webpack_require__(7293); +var anObject = __webpack_require__(9670); +var isCallable = __webpack_require__(614); +var toIntegerOrInfinity = __webpack_require__(9303); +var toLength = __webpack_require__(7466); +var toString = __webpack_require__(1340); +var requireObjectCoercible = __webpack_require__(4488); +var advanceStringIndex = __webpack_require__(1530); +var getMethod = __webpack_require__(8173); +var getSubstitution = __webpack_require__(647); +var regExpExec = __webpack_require__(7651); +var wellKnownSymbol = __webpack_require__(5112); + +var REPLACE = wellKnownSymbol('replace'); +var max = Math.max; +var min = Math.min; +var concat = uncurryThis([].concat); +var push = uncurryThis([].push); +var stringIndexOf = uncurryThis(''.indexOf); +var stringSlice = uncurryThis(''.slice); + +var maybeToString = function (it) { + return it === undefined ? it : String(it); +}; + +// IE <= 11 replaces $0 with the whole match, as if it was $& +// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 +var REPLACE_KEEPS_$0 = (function () { + // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing + return 'a'.replace(/./, '$0') === '$0'; +})(); + +// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string +var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { + if (/./[REPLACE]) { + return /./[REPLACE]('a', '$0') === ''; + } + return false; +})(); + +var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { + var re = /./; + re.exec = function () { + var result = []; + result.groups = { a: '7' }; + return result; + }; + // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive + return ''.replace(re, '$') !== '7'; +}); + +// @@replace logic +fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { + var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; + + return [ + // `String.prototype.replace` method + // https://tc39.es/ecma262/#sec-string.prototype.replace + function replace(searchValue, replaceValue) { + var O = requireObjectCoercible(this); + var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE); + return replacer + ? call(replacer, searchValue, O, replaceValue) + : call(nativeReplace, toString(O), searchValue, replaceValue); + }, + // `RegExp.prototype[@@replace]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace + function (string, replaceValue) { + var rx = anObject(this); + var S = toString(string); + + if ( + typeof replaceValue == 'string' && + stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 && + stringIndexOf(replaceValue, '$<') === -1 + ) { + var res = maybeCallNative(nativeReplace, rx, S, replaceValue); + if (res.done) return res.value; + } + + var functionalReplace = isCallable(replaceValue); + if (!functionalReplace) replaceValue = toString(replaceValue); + + var global = rx.global; + if (global) { + var fullUnicode = rx.unicode; + rx.lastIndex = 0; + } + var results = []; + while (true) { + var result = regExpExec(rx, S); + if (result === null) break; + + push(results, result); + if (!global) break; + + var matchStr = toString(result[0]); + if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); + } + + var accumulatedResult = ''; + var nextSourcePosition = 0; + for (var i = 0; i < results.length; i++) { + result = results[i]; + + var matched = toString(result[0]); + var position = max(min(toIntegerOrInfinity(result.index), S.length), 0); + var captures = []; + // NOTE: This is equivalent to + // captures = result.slice(1).map(maybeToString) + // but for some reason `nativeSlice.call(result, 1, result.length)` (called in + // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and + // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. + for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j])); + var namedCaptures = result.groups; + if (functionalReplace) { + var replacerArgs = concat([matched], captures, position, S); + if (namedCaptures !== undefined) push(replacerArgs, namedCaptures); + var replacement = toString(apply(replaceValue, undefined, replacerArgs)); + } else { + replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); + } + if (position >= nextSourcePosition) { + accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement; + nextSourcePosition = position + matched.length; + } + } + return accumulatedResult + stringSlice(S, nextSourcePosition); + } + ]; +}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE); + + +/***/ }), + +/***/ 3123: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var apply = __webpack_require__(2104); +var call = __webpack_require__(6916); +var uncurryThis = __webpack_require__(1702); +var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); +var isRegExp = __webpack_require__(7850); +var anObject = __webpack_require__(9670); +var requireObjectCoercible = __webpack_require__(4488); +var speciesConstructor = __webpack_require__(6707); +var advanceStringIndex = __webpack_require__(1530); +var toLength = __webpack_require__(7466); +var toString = __webpack_require__(1340); +var getMethod = __webpack_require__(8173); +var arraySlice = __webpack_require__(206); +var callRegExpExec = __webpack_require__(7651); +var regexpExec = __webpack_require__(2261); +var stickyHelpers = __webpack_require__(2999); +var fails = __webpack_require__(7293); + +var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y; +var MAX_UINT32 = 0xFFFFFFFF; +var min = Math.min; +var $push = [].push; +var exec = uncurryThis(/./.exec); +var push = uncurryThis($push); +var stringSlice = uncurryThis(''.slice); + +// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec +// Weex JS has frozen built-in prototypes, so use try / catch wrapper +var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { + // eslint-disable-next-line regexp/no-empty-group -- required for testing + var re = /(?:)/; + var originalExec = re.exec; + re.exec = function () { return originalExec.apply(this, arguments); }; + var result = 'ab'.split(re); + return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; +}); + +// @@split logic +fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) { + var internalSplit; + if ( + 'abbc'.split(/(b)*/)[1] == 'c' || + // eslint-disable-next-line regexp/no-empty-group -- required for testing + 'test'.split(/(?:)/, -1).length != 4 || + 'ab'.split(/(?:ab)*/).length != 2 || + '.'.split(/(.?)(.?)/).length != 4 || + // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing + '.'.split(/()()/).length > 1 || + ''.split(/.?/).length + ) { + // based on es5-shim implementation, need to rework it + internalSplit = function (separator, limit) { + var string = toString(requireObjectCoercible(this)); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (separator === undefined) return [string]; + // If `separator` is not a regex, use native split + if (!isRegExp(separator)) { + return call(nativeSplit, string, separator, lim); + } + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var match, lastIndex, lastLength; + while (match = call(regexpExec, separatorCopy, string)) { + lastIndex = separatorCopy.lastIndex; + if (lastIndex > lastLastIndex) { + push(output, stringSlice(string, lastLastIndex, match.index)); + if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1)); + lastLength = match[0].length; + lastLastIndex = lastIndex; + if (output.length >= lim) break; + } + if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop + } + if (lastLastIndex === string.length) { + if (lastLength || !exec(separatorCopy, '')) push(output, ''); + } else push(output, stringSlice(string, lastLastIndex)); + return output.length > lim ? arraySlice(output, 0, lim) : output; + }; + // Chakra, V8 + } else if ('0'.split(undefined, 0).length) { + internalSplit = function (separator, limit) { + return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit); + }; + } else internalSplit = nativeSplit; + + return [ + // `String.prototype.split` method + // https://tc39.es/ecma262/#sec-string.prototype.split + function split(separator, limit) { + var O = requireObjectCoercible(this); + var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT); + return splitter + ? call(splitter, separator, O, limit) + : call(internalSplit, toString(O), separator, limit); + }, + // `RegExp.prototype[@@split]` method + // https://tc39.es/ecma262/#sec-regexp.prototype-@@split + // + // NOTE: This cannot be properly polyfilled in engines that don't support + // the 'y' flag. + function (string, limit) { + var rx = anObject(this); + var S = toString(string); + var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit); + + if (res.done) return res.value; + + var C = speciesConstructor(rx, RegExp); + + var unicodeMatching = rx.unicode; + var flags = (rx.ignoreCase ? 'i' : '') + + (rx.multiline ? 'm' : '') + + (rx.unicode ? 'u' : '') + + (UNSUPPORTED_Y ? 'g' : 'y'); + + // ^(? + rx + ) is needed, in combination with some S slicing, to + // simulate the 'y' flag. + var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags); + var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; + if (lim === 0) return []; + if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; + var p = 0; + var q = 0; + var A = []; + while (q < S.length) { + splitter.lastIndex = UNSUPPORTED_Y ? 0 : q; + var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S); + var e; + if ( + z === null || + (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p + ) { + q = advanceStringIndex(S, q, unicodeMatching); + } else { + push(A, stringSlice(S, p, q)); + if (A.length === lim) return A; + for (var i = 1; i <= z.length - 1; i++) { + push(A, z[i]); + if (A.length === lim) return A; + } + q = p = e; + } + } + push(A, stringSlice(S, p)); + return A; + } + ]; +}, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y); + + +/***/ }), + +/***/ 7397: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var createHTML = __webpack_require__(4230); +var forcedStringHTMLMethod = __webpack_require__(3429); + +// `String.prototype.strike` method +// https://tc39.es/ecma262/#sec-string.prototype.strike +$({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, { + strike: function strike() { + return createHTML(this, 'strike', '', ''); + } +}); + + +/***/ }), + +/***/ 3210: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var $trim = (__webpack_require__(3111).trim); +var forcedStringTrimMethod = __webpack_require__(6091); + +// `String.prototype.trim` method +// https://tc39.es/ecma262/#sec-string.prototype.trim +$({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, { + trim: function trim() { + return $trim(this); + } +}); + + +/***/ }), + +/***/ 2443: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(7235); + +// `Symbol.asyncIterator` well-known symbol +// https://tc39.es/ecma262/#sec-symbol.asynciterator +defineWellKnownSymbol('asyncIterator'); + + +/***/ }), + +/***/ 1817: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; +// `Symbol.prototype.description` getter +// https://tc39.es/ecma262/#sec-symbol.prototype.description + +var $ = __webpack_require__(2109); +var DESCRIPTORS = __webpack_require__(9781); +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var hasOwn = __webpack_require__(2597); +var isCallable = __webpack_require__(614); +var isPrototypeOf = __webpack_require__(7976); +var toString = __webpack_require__(1340); +var defineProperty = (__webpack_require__(3070).f); +var copyConstructorProperties = __webpack_require__(9920); + +var NativeSymbol = global.Symbol; +var SymbolPrototype = NativeSymbol && NativeSymbol.prototype; + +if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) || + // Safari 12 bug + NativeSymbol().description !== undefined +)) { + var EmptyStringDescriptionStore = {}; + // wrap Symbol constructor for correct work with undefined description + var SymbolWrapper = function Symbol() { + var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]); + var result = isPrototypeOf(SymbolPrototype, this) + ? new NativeSymbol(description) + // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)' + : description === undefined ? NativeSymbol() : NativeSymbol(description); + if (description === '') EmptyStringDescriptionStore[result] = true; + return result; + }; + + copyConstructorProperties(SymbolWrapper, NativeSymbol); + SymbolWrapper.prototype = SymbolPrototype; + SymbolPrototype.constructor = SymbolWrapper; + + var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)'; + var symbolToString = uncurryThis(SymbolPrototype.toString); + var symbolValueOf = uncurryThis(SymbolPrototype.valueOf); + var regexp = /^Symbol\((.*)\)[^)]+$/; + var replace = uncurryThis(''.replace); + var stringSlice = uncurryThis(''.slice); + + defineProperty(SymbolPrototype, 'description', { + configurable: true, + get: function description() { + var symbol = symbolValueOf(this); + var string = symbolToString(symbol); + if (hasOwn(EmptyStringDescriptionStore, symbol)) return ''; + var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1'); + return desc === '' ? undefined : desc; + } + }); + + $({ global: true, forced: true }, { + Symbol: SymbolWrapper + }); +} + + +/***/ }), + +/***/ 2165: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(7235); + +// `Symbol.iterator` well-known symbol +// https://tc39.es/ecma262/#sec-symbol.iterator +defineWellKnownSymbol('iterator'); + + +/***/ }), + +/***/ 2526: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var global = __webpack_require__(7854); +var getBuiltIn = __webpack_require__(5005); +var apply = __webpack_require__(2104); +var call = __webpack_require__(6916); +var uncurryThis = __webpack_require__(1702); +var IS_PURE = __webpack_require__(1913); +var DESCRIPTORS = __webpack_require__(9781); +var NATIVE_SYMBOL = __webpack_require__(133); +var fails = __webpack_require__(7293); +var hasOwn = __webpack_require__(2597); +var isArray = __webpack_require__(3157); +var isCallable = __webpack_require__(614); +var isObject = __webpack_require__(111); +var isPrototypeOf = __webpack_require__(7976); +var isSymbol = __webpack_require__(2190); +var anObject = __webpack_require__(9670); +var toObject = __webpack_require__(7908); +var toIndexedObject = __webpack_require__(5656); +var toPropertyKey = __webpack_require__(4948); +var $toString = __webpack_require__(1340); +var createPropertyDescriptor = __webpack_require__(9114); +var nativeObjectCreate = __webpack_require__(30); +var objectKeys = __webpack_require__(1956); +var getOwnPropertyNamesModule = __webpack_require__(8006); +var getOwnPropertyNamesExternal = __webpack_require__(1156); +var getOwnPropertySymbolsModule = __webpack_require__(5181); +var getOwnPropertyDescriptorModule = __webpack_require__(1236); +var definePropertyModule = __webpack_require__(3070); +var propertyIsEnumerableModule = __webpack_require__(5296); +var arraySlice = __webpack_require__(206); +var redefine = __webpack_require__(1320); +var shared = __webpack_require__(2309); +var sharedKey = __webpack_require__(6200); +var hiddenKeys = __webpack_require__(3501); +var uid = __webpack_require__(9711); +var wellKnownSymbol = __webpack_require__(5112); +var wrappedWellKnownSymbolModule = __webpack_require__(6061); +var defineWellKnownSymbol = __webpack_require__(7235); +var setToStringTag = __webpack_require__(8003); +var InternalStateModule = __webpack_require__(9909); +var $forEach = (__webpack_require__(2092).forEach); + +var HIDDEN = sharedKey('hidden'); +var SYMBOL = 'Symbol'; +var PROTOTYPE = 'prototype'; +var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); + +var setInternalState = InternalStateModule.set; +var getInternalState = InternalStateModule.getterFor(SYMBOL); + +var ObjectPrototype = Object[PROTOTYPE]; +var $Symbol = global.Symbol; +var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE]; +var TypeError = global.TypeError; +var QObject = global.QObject; +var $stringify = getBuiltIn('JSON', 'stringify'); +var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; +var nativeDefineProperty = definePropertyModule.f; +var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f; +var nativePropertyIsEnumerable = propertyIsEnumerableModule.f; +var push = uncurryThis([].push); + +var AllSymbols = shared('symbols'); +var ObjectPrototypeSymbols = shared('op-symbols'); +var StringToSymbolRegistry = shared('string-to-symbol-registry'); +var SymbolToStringRegistry = shared('symbol-to-string-registry'); +var WellKnownSymbolsStore = shared('wks'); + +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDescriptor = DESCRIPTORS && fails(function () { + return nativeObjectCreate(nativeDefineProperty({}, 'a', { + get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; } + })).a != 7; +}) ? function (O, P, Attributes) { + var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P); + if (ObjectPrototypeDescriptor) delete ObjectPrototype[P]; + nativeDefineProperty(O, P, Attributes); + if (ObjectPrototypeDescriptor && O !== ObjectPrototype) { + nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor); + } +} : nativeDefineProperty; + +var wrap = function (tag, description) { + var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype); + setInternalState(symbol, { + type: SYMBOL, + tag: tag, + description: description + }); + if (!DESCRIPTORS) symbol.description = description; + return symbol; +}; + +var $defineProperty = function defineProperty(O, P, Attributes) { + if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes); + anObject(O); + var key = toPropertyKey(P); + anObject(Attributes); + if (hasOwn(AllSymbols, key)) { + if (!Attributes.enumerable) { + if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {})); + O[HIDDEN][key] = true; + } else { + if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false; + Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) }); + } return setSymbolDescriptor(O, key, Attributes); + } return nativeDefineProperty(O, key, Attributes); +}; + +var $defineProperties = function defineProperties(O, Properties) { + anObject(O); + var properties = toIndexedObject(Properties); + var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties)); + $forEach(keys, function (key) { + if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]); + }); + return O; +}; + +var $create = function create(O, Properties) { + return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties); +}; + +var $propertyIsEnumerable = function propertyIsEnumerable(V) { + var P = toPropertyKey(V); + var enumerable = call(nativePropertyIsEnumerable, this, P); + if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false; + return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P] + ? enumerable : true; +}; + +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { + var it = toIndexedObject(O); + var key = toPropertyKey(P); + if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return; + var descriptor = nativeGetOwnPropertyDescriptor(it, key); + if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) { + descriptor.enumerable = true; + } + return descriptor; +}; + +var $getOwnPropertyNames = function getOwnPropertyNames(O) { + var names = nativeGetOwnPropertyNames(toIndexedObject(O)); + var result = []; + $forEach(names, function (key) { + if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key); + }); + return result; +}; + +var $getOwnPropertySymbols = function getOwnPropertySymbols(O) { + var IS_OBJECT_PROTOTYPE = O === ObjectPrototype; + var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O)); + var result = []; + $forEach(names, function (key) { + if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) { + push(result, AllSymbols[key]); + } + }); + return result; +}; + +// `Symbol` constructor +// https://tc39.es/ecma262/#sec-symbol-constructor +if (!NATIVE_SYMBOL) { + $Symbol = function Symbol() { + if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor'); + var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]); + var tag = uid(description); + var setter = function (value) { + if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value); + if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false; + setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value)); + }; + if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); + return wrap(tag, description); + }; + + SymbolPrototype = $Symbol[PROTOTYPE]; + + redefine(SymbolPrototype, 'toString', function toString() { + return getInternalState(this).tag; + }); + + redefine($Symbol, 'withoutSetter', function (description) { + return wrap(uid(description), description); + }); + + propertyIsEnumerableModule.f = $propertyIsEnumerable; + definePropertyModule.f = $defineProperty; + getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor; + getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames; + getOwnPropertySymbolsModule.f = $getOwnPropertySymbols; + + wrappedWellKnownSymbolModule.f = function (name) { + return wrap(wellKnownSymbol(name), name); + }; + + if (DESCRIPTORS) { + // https://github.com/tc39/proposal-Symbol-description + nativeDefineProperty(SymbolPrototype, 'description', { + configurable: true, + get: function description() { + return getInternalState(this).description; + } + }); + if (!IS_PURE) { + redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true }); + } + } +} + +$({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { + Symbol: $Symbol +}); + +$forEach(objectKeys(WellKnownSymbolsStore), function (name) { + defineWellKnownSymbol(name); +}); + +$({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, { + // `Symbol.for` method + // https://tc39.es/ecma262/#sec-symbol.for + 'for': function (key) { + var string = $toString(key); + if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string]; + var symbol = $Symbol(string); + StringToSymbolRegistry[string] = symbol; + SymbolToStringRegistry[symbol] = string; + return symbol; + }, + // `Symbol.keyFor` method + // https://tc39.es/ecma262/#sec-symbol.keyfor + keyFor: function keyFor(sym) { + if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol'); + if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; + }, + useSetter: function () { USE_SETTER = true; }, + useSimple: function () { USE_SETTER = false; } +}); + +$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, { + // `Object.create` method + // https://tc39.es/ecma262/#sec-object.create + create: $create, + // `Object.defineProperty` method + // https://tc39.es/ecma262/#sec-object.defineproperty + defineProperty: $defineProperty, + // `Object.defineProperties` method + // https://tc39.es/ecma262/#sec-object.defineproperties + defineProperties: $defineProperties, + // `Object.getOwnPropertyDescriptor` method + // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors + getOwnPropertyDescriptor: $getOwnPropertyDescriptor +}); + +$({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, { + // `Object.getOwnPropertyNames` method + // https://tc39.es/ecma262/#sec-object.getownpropertynames + getOwnPropertyNames: $getOwnPropertyNames, + // `Object.getOwnPropertySymbols` method + // https://tc39.es/ecma262/#sec-object.getownpropertysymbols + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives +// https://bugs.chromium.org/p/v8/issues/detail?id=3443 +$({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, { + getOwnPropertySymbols: function getOwnPropertySymbols(it) { + return getOwnPropertySymbolsModule.f(toObject(it)); + } +}); + +// `JSON.stringify` method behavior with symbols +// https://tc39.es/ecma262/#sec-json.stringify +if ($stringify) { + var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () { + var symbol = $Symbol(); + // MS Edge converts symbol values to JSON as {} + return $stringify([symbol]) != '[null]' + // WebKit converts symbol values to JSON as null + || $stringify({ a: symbol }) != '{}' + // V8 throws on boxed symbols + || $stringify(Object(symbol)) != '{}'; + }); + + $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, { + // eslint-disable-next-line no-unused-vars -- required for `.length` + stringify: function stringify(it, replacer, space) { + var args = arraySlice(arguments); + var $replacer = replacer; + if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined + if (!isArray(replacer)) replacer = function (key, value) { + if (isCallable($replacer)) value = call($replacer, this, key, value); + if (!isSymbol(value)) return value; + }; + args[1] = replacer; + return apply($stringify, null, args); + } + }); +} + +// `Symbol.prototype[@@toPrimitive]` method +// https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive +if (!SymbolPrototype[TO_PRIMITIVE]) { + var valueOf = SymbolPrototype.valueOf; + // eslint-disable-next-line no-unused-vars -- required for .length + redefine(SymbolPrototype, TO_PRIMITIVE, function (hint) { + // TODO: improve hint logic + return call(valueOf, this); + }); +} +// `Symbol.prototype[@@toStringTag]` property +// https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag +setToStringTag($Symbol, SYMBOL); + +hiddenKeys[HIDDEN] = true; + + +/***/ }), + +/***/ 6649: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(7235); + +// `Symbol.toPrimitive` well-known symbol +// https://tc39.es/ecma262/#sec-symbol.toprimitive +defineWellKnownSymbol('toPrimitive'); + + +/***/ }), + +/***/ 3680: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var defineWellKnownSymbol = __webpack_require__(7235); + +// `Symbol.toStringTag` well-known symbol +// https://tc39.es/ecma262/#sec-symbol.tostringtag +defineWellKnownSymbol('toStringTag'); + + +/***/ }), + +/***/ 2990: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var uncurryThis = __webpack_require__(1702); +var ArrayBufferViewCore = __webpack_require__(2094); +var $ArrayCopyWithin = __webpack_require__(1048); + +var u$ArrayCopyWithin = uncurryThis($ArrayCopyWithin); +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.copyWithin` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin +exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) { + return u$ArrayCopyWithin(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined); +}); + + +/***/ }), + +/***/ 8927: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $every = (__webpack_require__(2092).every); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.every` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.every +exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) { + return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 3105: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var call = __webpack_require__(6916); +var $fill = __webpack_require__(1285); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.fill` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill +exportTypedArrayMethod('fill', function fill(value /* , start, end */) { + var length = arguments.length; + return call( + $fill, + aTypedArray(this), + value, + length > 1 ? arguments[1] : undefined, + length > 2 ? arguments[2] : undefined + ); +}); + + +/***/ }), + +/***/ 5035: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $filter = (__webpack_require__(2092).filter); +var fromSpeciesAndList = __webpack_require__(3074); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.filter` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter +exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) { + var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + return fromSpeciesAndList(this, list); +}); + + +/***/ }), + +/***/ 7174: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $findIndex = (__webpack_require__(2092).findIndex); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.findIndex` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex +exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) { + return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 4345: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $find = (__webpack_require__(2092).find); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.find` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.find +exportTypedArrayMethod('find', function find(predicate /* , thisArg */) { + return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 4197: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Float32Array` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Float32', function (init) { + return function Float32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ 6495: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Float64Array` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Float64', function (init) { + return function Float64Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ 2846: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $forEach = (__webpack_require__(2092).forEach); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.forEach` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach +exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) { + $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 8145: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832); +var exportTypedArrayStaticMethod = (__webpack_require__(2094).exportTypedArrayStaticMethod); +var typedArrayFrom = __webpack_require__(7321); + +// `%TypedArray%.from` method +// https://tc39.es/ecma262/#sec-%typedarray%.from +exportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS); + + +/***/ }), + +/***/ 4731: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $includes = (__webpack_require__(1318).includes); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.includes` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes +exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) { + return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 7209: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $indexOf = (__webpack_require__(1318).indexOf); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.indexOf` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof +exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) { + return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 5109: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Int16Array` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Int16', function (init) { + return function Int16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ 5125: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Int32Array` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Int32', function (init) { + return function Int32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ 7145: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Int8Array` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Int8', function (init) { + return function Int8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ 6319: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER); +var ArrayBufferViewCore = __webpack_require__(2094); +var ArrayIterators = __webpack_require__(6992); +var wellKnownSymbol = __webpack_require__(5112); + +var ITERATOR = wellKnownSymbol('iterator'); +var Uint8Array = global.Uint8Array; +var arrayValues = uncurryThis(ArrayIterators.values); +var arrayKeys = uncurryThis(ArrayIterators.keys); +var arrayEntries = uncurryThis(ArrayIterators.entries); +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; +var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR]; + +var PROPER_ARRAY_VALUES_NAME = !!nativeTypedArrayIterator && nativeTypedArrayIterator.name === 'values'; + +var typedArrayValues = function values() { + return arrayValues(aTypedArray(this)); +}; + +// `%TypedArray%.prototype.entries` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries +exportTypedArrayMethod('entries', function entries() { + return arrayEntries(aTypedArray(this)); +}); +// `%TypedArray%.prototype.keys` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys +exportTypedArrayMethod('keys', function keys() { + return arrayKeys(aTypedArray(this)); +}); +// `%TypedArray%.prototype.values` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.values +exportTypedArrayMethod('values', typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME); +// `%TypedArray%.prototype[@@iterator]` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator +exportTypedArrayMethod(ITERATOR, typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME); + + +/***/ }), + +/***/ 8867: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var uncurryThis = __webpack_require__(1702); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; +var $join = uncurryThis([].join); + +// `%TypedArray%.prototype.join` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.join +exportTypedArrayMethod('join', function join(separator) { + return $join(aTypedArray(this), separator); +}); + + +/***/ }), + +/***/ 7789: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var apply = __webpack_require__(2104); +var $lastIndexOf = __webpack_require__(6583); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.lastIndexOf` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof +exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) { + var length = arguments.length; + return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]); +}); + + +/***/ }), + +/***/ 3739: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $map = (__webpack_require__(2092).map); +var typedArraySpeciesConstructor = __webpack_require__(6304); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.map` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.map +exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) { + return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) { + return new (typedArraySpeciesConstructor(O))(length); + }); +}); + + +/***/ }), + +/***/ 4483: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $reduceRight = (__webpack_require__(3671).right); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.reduceRicht` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright +exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) { + var length = arguments.length; + return $reduceRight(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 9368: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $reduce = (__webpack_require__(3671).left); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.reduce` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce +exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) { + var length = arguments.length; + return $reduce(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 2056: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; +var floor = Math.floor; + +// `%TypedArray%.prototype.reverse` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse +exportTypedArrayMethod('reverse', function reverse() { + var that = this; + var length = aTypedArray(that).length; + var middle = floor(length / 2); + var index = 0; + var value; + while (index < middle) { + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; +}); + + +/***/ }), + +/***/ 3462: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(7854); +var ArrayBufferViewCore = __webpack_require__(2094); +var lengthOfArrayLike = __webpack_require__(6244); +var toOffset = __webpack_require__(4590); +var toObject = __webpack_require__(7908); +var fails = __webpack_require__(7293); + +var RangeError = global.RangeError; +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +var FORCED = fails(function () { + // eslint-disable-next-line es/no-typed-arrays -- required for testing + new Int8Array(1).set({}); +}); + +// `%TypedArray%.prototype.set` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.set +exportTypedArrayMethod('set', function set(arrayLike /* , offset */) { + aTypedArray(this); + var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1); + var length = this.length; + var src = toObject(arrayLike); + var len = lengthOfArrayLike(src); + var index = 0; + if (len + offset > length) throw RangeError('Wrong length'); + while (index < len) this[offset + index] = src[index++]; +}, FORCED); + + +/***/ }), + +/***/ 678: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var typedArraySpeciesConstructor = __webpack_require__(6304); +var fails = __webpack_require__(7293); +var arraySlice = __webpack_require__(206); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +var FORCED = fails(function () { + // eslint-disable-next-line es/no-typed-arrays -- required for testing + new Int8Array(1).slice(); +}); + +// `%TypedArray%.prototype.slice` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice +exportTypedArrayMethod('slice', function slice(start, end) { + var list = arraySlice(aTypedArray(this), start, end); + var C = typedArraySpeciesConstructor(this); + var index = 0; + var length = list.length; + var result = new C(length); + while (length > index) result[index] = list[index++]; + return result; +}, FORCED); + + +/***/ }), + +/***/ 7462: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var $some = (__webpack_require__(2092).some); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.some` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.some +exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) { + return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); +}); + + +/***/ }), + +/***/ 3824: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); +var fails = __webpack_require__(7293); +var aCallable = __webpack_require__(9662); +var internalSort = __webpack_require__(4362); +var ArrayBufferViewCore = __webpack_require__(2094); +var FF = __webpack_require__(8886); +var IE_OR_EDGE = __webpack_require__(256); +var V8 = __webpack_require__(7392); +var WEBKIT = __webpack_require__(8008); + +var Array = global.Array; +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; +var Uint16Array = global.Uint16Array; +var un$Sort = Uint16Array && uncurryThis(Uint16Array.prototype.sort); + +// WebKit +var ACCEPT_INCORRECT_ARGUMENTS = !!un$Sort && !(fails(function () { + un$Sort(new Uint16Array(2), null); +}) && fails(function () { + un$Sort(new Uint16Array(2), {}); +})); + +var STABLE_SORT = !!un$Sort && !fails(function () { + // feature detection can be too slow, so check engines versions + if (V8) return V8 < 74; + if (FF) return FF < 67; + if (IE_OR_EDGE) return true; + if (WEBKIT) return WEBKIT < 602; + + var array = new Uint16Array(516); + var expected = Array(516); + var index, mod; + + for (index = 0; index < 516; index++) { + mod = index % 4; + array[index] = 515 - index; + expected[index] = index - 2 * mod + 3; + } + + un$Sort(array, function (a, b) { + return (a / 4 | 0) - (b / 4 | 0); + }); + + for (index = 0; index < 516; index++) { + if (array[index] !== expected[index]) return true; + } +}); + +var getSortCompare = function (comparefn) { + return function (x, y) { + if (comparefn !== undefined) return +comparefn(x, y) || 0; + // eslint-disable-next-line no-self-compare -- NaN check + if (y !== y) return -1; + // eslint-disable-next-line no-self-compare -- NaN check + if (x !== x) return 1; + if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1; + return x > y; + }; +}; + +// `%TypedArray%.prototype.sort` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort +exportTypedArrayMethod('sort', function sort(comparefn) { + if (comparefn !== undefined) aCallable(comparefn); + if (STABLE_SORT) return un$Sort(this, comparefn); + + return internalSort(aTypedArray(this), getSortCompare(comparefn)); +}, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS); + + +/***/ }), + +/***/ 5021: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var ArrayBufferViewCore = __webpack_require__(2094); +var toLength = __webpack_require__(7466); +var toAbsoluteIndex = __webpack_require__(1400); +var typedArraySpeciesConstructor = __webpack_require__(6304); + +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; + +// `%TypedArray%.prototype.subarray` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray +exportTypedArrayMethod('subarray', function subarray(begin, end) { + var O = aTypedArray(this); + var length = O.length; + var beginIndex = toAbsoluteIndex(begin, length); + var C = typedArraySpeciesConstructor(O); + return new C( + O.buffer, + O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex) + ); +}); + + +/***/ }), + +/***/ 2974: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var global = __webpack_require__(7854); +var apply = __webpack_require__(2104); +var ArrayBufferViewCore = __webpack_require__(2094); +var fails = __webpack_require__(7293); +var arraySlice = __webpack_require__(206); + +var Int8Array = global.Int8Array; +var aTypedArray = ArrayBufferViewCore.aTypedArray; +var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; +var $toLocaleString = [].toLocaleString; + +// iOS Safari 6.x fails here +var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () { + $toLocaleString.call(new Int8Array(1)); +}); + +var FORCED = fails(function () { + return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString(); +}) || !fails(function () { + Int8Array.prototype.toLocaleString.call([1, 2]); +}); + +// `%TypedArray%.prototype.toLocaleString` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring +exportTypedArrayMethod('toLocaleString', function toLocaleString() { + return apply( + $toLocaleString, + TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this), + arraySlice(arguments) + ); +}, FORCED); + + +/***/ }), + +/***/ 5016: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var exportTypedArrayMethod = (__webpack_require__(2094).exportTypedArrayMethod); +var fails = __webpack_require__(7293); +var global = __webpack_require__(7854); +var uncurryThis = __webpack_require__(1702); + +var Uint8Array = global.Uint8Array; +var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {}; +var arrayToString = [].toString; +var join = uncurryThis([].join); + +if (fails(function () { arrayToString.call({}); })) { + arrayToString = function toString() { + return join(this); + }; +} + +var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString; + +// `%TypedArray%.prototype.toString` method +// https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring +exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD); + + +/***/ }), + +/***/ 8255: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Uint16Array` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Uint16', function (init) { + return function Uint16Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ 9135: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Uint32Array` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Uint32', function (init) { + return function Uint32Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ 2472: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Uint8Array` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Uint8', function (init) { + return function Uint8Array(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}); + + +/***/ }), + +/***/ 9743: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var createTypedArrayConstructor = __webpack_require__(9843); + +// `Uint8ClampedArray` constructor +// https://tc39.es/ecma262/#sec-typedarray-objects +createTypedArrayConstructor('Uint8', function (init) { + return function Uint8ClampedArray(data, byteOffset, length) { + return init(this, data, byteOffset, length); + }; +}, true); + + +/***/ }), + +/***/ 8628: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +// TODO: Remove from `core-js@4` +__webpack_require__(9170); + + +/***/ }), + +/***/ 5743: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +// TODO: Remove from `core-js@4` +__webpack_require__(5837); + + +/***/ }), + +/***/ 7314: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +// TODO: Remove from `core-js@4` +__webpack_require__(7922); + + +/***/ }), + +/***/ 6290: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +// TODO: Remove from `core-js@4` +__webpack_require__(4668); + + +/***/ }), + +/***/ 7479: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var newPromiseCapabilityModule = __webpack_require__(8523); +var perform = __webpack_require__(2534); + +// `Promise.try` method +// https://github.com/tc39/proposal-promise-try +$({ target: 'Promise', stat: true }, { + 'try': function (callbackfn) { + var promiseCapability = newPromiseCapabilityModule.f(this); + var result = perform(callbackfn); + (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value); + return promiseCapability.promise; + } +}); + + +/***/ }), + +/***/ 3728: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +// TODO: Remove from `core-js@4` +__webpack_require__(6373); + + +/***/ }), + +/***/ 4747: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var DOMIterables = __webpack_require__(8324); +var DOMTokenListPrototype = __webpack_require__(8509); +var forEach = __webpack_require__(8533); +var createNonEnumerableProperty = __webpack_require__(8880); + +var handlePrototype = function (CollectionPrototype) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { + createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); + } catch (error) { + CollectionPrototype.forEach = forEach; + } +}; + +for (var COLLECTION_NAME in DOMIterables) { + if (DOMIterables[COLLECTION_NAME]) { + handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype); + } +} + +handlePrototype(DOMTokenListPrototype); + + +/***/ }), + +/***/ 3948: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +var global = __webpack_require__(7854); +var DOMIterables = __webpack_require__(8324); +var DOMTokenListPrototype = __webpack_require__(8509); +var ArrayIteratorMethods = __webpack_require__(6992); +var createNonEnumerableProperty = __webpack_require__(8880); +var wellKnownSymbol = __webpack_require__(5112); + +var ITERATOR = wellKnownSymbol('iterator'); +var TO_STRING_TAG = wellKnownSymbol('toStringTag'); +var ArrayValues = ArrayIteratorMethods.values; + +var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) { + if (CollectionPrototype) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[ITERATOR] !== ArrayValues) try { + createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); + } catch (error) { + CollectionPrototype[ITERATOR] = ArrayValues; + } + if (!CollectionPrototype[TO_STRING_TAG]) { + createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); + } + if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { + // some Chrome versions have non-configurable methods on DOMTokenList + if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { + createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); + } catch (error) { + CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; + } + } + } +}; + +for (var COLLECTION_NAME in DOMIterables) { + handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME); +} + +handlePrototype(DOMTokenListPrototype, 'DOMTokenList'); + + +/***/ }), + +/***/ 3753: +/***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var $ = __webpack_require__(2109); +var call = __webpack_require__(6916); + +// `URL.prototype.toJSON` method +// https://url.spec.whatwg.org/#dom-url-tojson +$({ target: 'URL', proto: true, enumerable: true }, { + toJSON: function toJSON() { + return call(URL.prototype.toString, this); + } +}); + + +/***/ }), + +/***/ 1150: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var parent = __webpack_require__(7633); +__webpack_require__(3948); + +module.exports = parent; + + +/***/ }), + +/***/ 251: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var objectKeys = __webpack_require__(2215); +var isArguments = __webpack_require__(2584); +var is = __webpack_require__(609); +var isRegex = __webpack_require__(8420); +var flags = __webpack_require__(2847); +var isDate = __webpack_require__(8923); + +var getTime = Date.prototype.getTime; + +function deepEqual(actual, expected, options) { + var opts = options || {}; + + // 7.1. All identical values are equivalent, as determined by ===. + if (opts.strict ? is(actual, expected) : actual === expected) { + return true; + } + + // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==. + if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) { + return opts.strict ? is(actual, expected) : actual == expected; + } + + /* + * 7.4. For all other Object pairs, including Array objects, equivalence is + * determined by having the same number of owned properties (as verified + * with Object.prototype.hasOwnProperty.call), the same set of keys + * (although not necessarily the same order), equivalent values for every + * corresponding key, and an identical 'prototype' property. Note: this + * accounts for both named and indexed properties on Arrays. + */ + // eslint-disable-next-line no-use-before-define + return objEquiv(actual, expected, opts); +} + +function isUndefinedOrNull(value) { + return value === null || value === undefined; +} + +function isBuffer(x) { + if (!x || typeof x !== 'object' || typeof x.length !== 'number') { + return false; + } + if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { + return false; + } + if (x.length > 0 && typeof x[0] !== 'number') { + return false; + } + return true; +} + +function objEquiv(a, b, opts) { + /* eslint max-statements: [2, 50] */ + var i, key; + if (typeof a !== typeof b) { return false; } + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; } + + // an identical 'prototype' property. + if (a.prototype !== b.prototype) { return false; } + + if (isArguments(a) !== isArguments(b)) { return false; } + + var aIsRegex = isRegex(a); + var bIsRegex = isRegex(b); + if (aIsRegex !== bIsRegex) { return false; } + if (aIsRegex || bIsRegex) { + return a.source === b.source && flags(a) === flags(b); + } + + if (isDate(a) && isDate(b)) { + return getTime.call(a) === getTime.call(b); + } + + var aIsBuffer = isBuffer(a); + var bIsBuffer = isBuffer(b); + if (aIsBuffer !== bIsBuffer) { return false; } + if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here + if (a.length !== b.length) { return false; } + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) { return false; } + } + return true; + } + + if (typeof a !== typeof b) { return false; } + + try { + var ka = objectKeys(a); + var kb = objectKeys(b); + } catch (e) { // happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates hasOwnProperty) + if (ka.length !== kb.length) { return false; } + + // the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + // ~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) { return false; } + } + // equivalent values for every corresponding key, and ~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key], opts)) { return false; } + } + + return true; +} + +module.exports = deepEqual; + + +/***/ }), + +/***/ 4289: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keys = __webpack_require__(2215); +var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; + +var toStr = Object.prototype.toString; +var concat = Array.prototype.concat; +var origDefineProperty = Object.defineProperty; + +var isFunction = function (fn) { + return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; +}; + +var hasPropertyDescriptors = __webpack_require__(1044)(); + +var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; + +var defineProperty = function (object, name, value, predicate) { + if (name in object && (!isFunction(predicate) || !predicate())) { + return; + } + if (supportsDescriptors) { + origDefineProperty(object, name, { + configurable: true, + enumerable: false, + value: value, + writable: true + }); + } else { + object[name] = value; // eslint-disable-line no-param-reassign + } +}; + +var defineProperties = function (object, map) { + var predicates = arguments.length > 2 ? arguments[2] : {}; + var props = keys(map); + if (hasSymbols) { + props = concat.call(props, Object.getOwnPropertySymbols(map)); + } + for (var i = 0; i < props.length; i += 1) { + defineProperty(object, props[i], map[props[i]], predicates[props[i]]); + } +}; + +defineProperties.supportsDescriptors = !!supportsDescriptors; + +module.exports = defineProperties; + + +/***/ }), + +/***/ 8091: +/***/ (function(module) { + +"use strict"; +/** + * Code refactored from Mozilla Developer Network: + * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign + */ + + + +function assign(target, firstSource) { + if (target === undefined || target === null) { + throw new TypeError('Cannot convert first argument to object'); + } + + var to = Object(target); + for (var i = 1; i < arguments.length; i++) { + var nextSource = arguments[i]; + if (nextSource === undefined || nextSource === null) { + continue; + } + + var keysArray = Object.keys(Object(nextSource)); + for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { + var nextKey = keysArray[nextIndex]; + var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); + if (desc !== undefined && desc.enumerable) { + to[nextKey] = nextSource[nextKey]; + } + } + } + return to; +} + +function polyfill() { + if (!Object.assign) { + Object.defineProperty(Object, 'assign', { + enumerable: false, + configurable: true, + writable: true, + value: assign + }); + } +} + +module.exports = { + assign: assign, + polyfill: polyfill +}; + + +/***/ }), + +/***/ 7187: +/***/ (function(module) { + +"use strict"; +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN +// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE +// USE OR OTHER DEALINGS IN THE SOFTWARE. + + + +var R = typeof Reflect === 'object' ? Reflect : null +var ReflectApply = R && typeof R.apply === 'function' + ? R.apply + : function ReflectApply(target, receiver, args) { + return Function.prototype.apply.call(target, receiver, args); + } + +var ReflectOwnKeys +if (R && typeof R.ownKeys === 'function') { + ReflectOwnKeys = R.ownKeys +} else if (Object.getOwnPropertySymbols) { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target) + .concat(Object.getOwnPropertySymbols(target)); + }; +} else { + ReflectOwnKeys = function ReflectOwnKeys(target) { + return Object.getOwnPropertyNames(target); + }; +} + +function ProcessEmitWarning(warning) { + if (console && console.warn) console.warn(warning); +} + +var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { + return value !== value; +} + +function EventEmitter() { + EventEmitter.init.call(this); +} +module.exports = EventEmitter; +module.exports.once = once; + +// Backwards-compat with node 0.10.x +EventEmitter.EventEmitter = EventEmitter; + +EventEmitter.prototype._events = undefined; +EventEmitter.prototype._eventsCount = 0; +EventEmitter.prototype._maxListeners = undefined; + +// By default EventEmitters will print a warning if more than 10 listeners are +// added to it. This is a useful default which helps finding memory leaks. +var defaultMaxListeners = 10; + +function checkListener(listener) { + if (typeof listener !== 'function') { + throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); + } +} + +Object.defineProperty(EventEmitter, 'defaultMaxListeners', { + enumerable: true, + get: function() { + return defaultMaxListeners; + }, + set: function(arg) { + if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { + throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); + } + defaultMaxListeners = arg; + } +}); + +EventEmitter.init = function() { + + if (this._events === undefined || + this._events === Object.getPrototypeOf(this)._events) { + this._events = Object.create(null); + this._eventsCount = 0; + } + + this._maxListeners = this._maxListeners || undefined; +}; + +// Obviously not all Emitters should be limited to 10. This function allows +// that to be increased. Set to zero for unlimited. +EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { + if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { + throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); + } + this._maxListeners = n; + return this; +}; + +function _getMaxListeners(that) { + if (that._maxListeners === undefined) + return EventEmitter.defaultMaxListeners; + return that._maxListeners; +} + +EventEmitter.prototype.getMaxListeners = function getMaxListeners() { + return _getMaxListeners(this); +}; + +EventEmitter.prototype.emit = function emit(type) { + var args = []; + for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); + var doError = (type === 'error'); + + var events = this._events; + if (events !== undefined) + doError = (doError && events.error === undefined); + else if (!doError) + return false; + + // If there is no 'error' event listener then throw. + if (doError) { + var er; + if (args.length > 0) + er = args[0]; + if (er instanceof Error) { + // Note: The comments on the `throw` lines are intentional, they show + // up in Node's output if this results in an unhandled exception. + throw er; // Unhandled 'error' event + } + // At least give some kind of context to the user + var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); + err.context = er; + throw err; // Unhandled 'error' event + } + + var handler = events[type]; + + if (handler === undefined) + return false; + + if (typeof handler === 'function') { + ReflectApply(handler, this, args); + } else { + var len = handler.length; + var listeners = arrayClone(handler, len); + for (var i = 0; i < len; ++i) + ReflectApply(listeners[i], this, args); + } + + return true; +}; + +function _addListener(target, type, listener, prepend) { + var m; + var events; + var existing; + + checkListener(listener); + + events = target._events; + if (events === undefined) { + events = target._events = Object.create(null); + target._eventsCount = 0; + } else { + // To avoid recursion in the case that type === "newListener"! Before + // adding it to the listeners, first emit "newListener". + if (events.newListener !== undefined) { + target.emit('newListener', type, + listener.listener ? listener.listener : listener); + + // Re-assign `events` because a newListener handler could have caused the + // this._events to be assigned to a new object + events = target._events; + } + existing = events[type]; + } + + if (existing === undefined) { + // Optimize the case of one listener. Don't need the extra array object. + existing = events[type] = listener; + ++target._eventsCount; + } else { + if (typeof existing === 'function') { + // Adding the second element, need to change to array. + existing = events[type] = + prepend ? [listener, existing] : [existing, listener]; + // If we've already got an array, just append. + } else if (prepend) { + existing.unshift(listener); + } else { + existing.push(listener); + } + + // Check for listener leak + m = _getMaxListeners(target); + if (m > 0 && existing.length > m && !existing.warned) { + existing.warned = true; + // No error code for this since it is a Warning + // eslint-disable-next-line no-restricted-syntax + var w = new Error('Possible EventEmitter memory leak detected. ' + + existing.length + ' ' + String(type) + ' listeners ' + + 'added. Use emitter.setMaxListeners() to ' + + 'increase limit'); + w.name = 'MaxListenersExceededWarning'; + w.emitter = target; + w.type = type; + w.count = existing.length; + ProcessEmitWarning(w); + } + } + + return target; +} + +EventEmitter.prototype.addListener = function addListener(type, listener) { + return _addListener(this, type, listener, false); +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.prependListener = + function prependListener(type, listener) { + return _addListener(this, type, listener, true); + }; + +function onceWrapper() { + if (!this.fired) { + this.target.removeListener(this.type, this.wrapFn); + this.fired = true; + if (arguments.length === 0) + return this.listener.call(this.target); + return this.listener.apply(this.target, arguments); + } +} + +function _onceWrap(target, type, listener) { + var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; + var wrapped = onceWrapper.bind(state); + wrapped.listener = listener; + state.wrapFn = wrapped; + return wrapped; +} + +EventEmitter.prototype.once = function once(type, listener) { + checkListener(listener); + this.on(type, _onceWrap(this, type, listener)); + return this; +}; + +EventEmitter.prototype.prependOnceListener = + function prependOnceListener(type, listener) { + checkListener(listener); + this.prependListener(type, _onceWrap(this, type, listener)); + return this; + }; + +// Emits a 'removeListener' event if and only if the listener was removed. +EventEmitter.prototype.removeListener = + function removeListener(type, listener) { + var list, events, position, i, originalListener; + + checkListener(listener); + + events = this._events; + if (events === undefined) + return this; + + list = events[type]; + if (list === undefined) + return this; + + if (list === listener || list.listener === listener) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else { + delete events[type]; + if (events.removeListener) + this.emit('removeListener', type, list.listener || listener); + } + } else if (typeof list !== 'function') { + position = -1; + + for (i = list.length - 1; i >= 0; i--) { + if (list[i] === listener || list[i].listener === listener) { + originalListener = list[i].listener; + position = i; + break; + } + } + + if (position < 0) + return this; + + if (position === 0) + list.shift(); + else { + spliceOne(list, position); + } + + if (list.length === 1) + events[type] = list[0]; + + if (events.removeListener !== undefined) + this.emit('removeListener', type, originalListener || listener); + } + + return this; + }; + +EventEmitter.prototype.off = EventEmitter.prototype.removeListener; + +EventEmitter.prototype.removeAllListeners = + function removeAllListeners(type) { + var listeners, events, i; + + events = this._events; + if (events === undefined) + return this; + + // not listening for removeListener, no need to emit + if (events.removeListener === undefined) { + if (arguments.length === 0) { + this._events = Object.create(null); + this._eventsCount = 0; + } else if (events[type] !== undefined) { + if (--this._eventsCount === 0) + this._events = Object.create(null); + else + delete events[type]; + } + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + var keys = Object.keys(events); + var key; + for (i = 0; i < keys.length; ++i) { + key = keys[i]; + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = Object.create(null); + this._eventsCount = 0; + return this; + } + + listeners = events[type]; + + if (typeof listeners === 'function') { + this.removeListener(type, listeners); + } else if (listeners !== undefined) { + // LIFO order + for (i = listeners.length - 1; i >= 0; i--) { + this.removeListener(type, listeners[i]); + } + } + + return this; + }; + +function _listeners(target, type, unwrap) { + var events = target._events; + + if (events === undefined) + return []; + + var evlistener = events[type]; + if (evlistener === undefined) + return []; + + if (typeof evlistener === 'function') + return unwrap ? [evlistener.listener || evlistener] : [evlistener]; + + return unwrap ? + unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); +} + +EventEmitter.prototype.listeners = function listeners(type) { + return _listeners(this, type, true); +}; + +EventEmitter.prototype.rawListeners = function rawListeners(type) { + return _listeners(this, type, false); +}; + +EventEmitter.listenerCount = function(emitter, type) { + if (typeof emitter.listenerCount === 'function') { + return emitter.listenerCount(type); + } else { + return listenerCount.call(emitter, type); + } +}; + +EventEmitter.prototype.listenerCount = listenerCount; +function listenerCount(type) { + var events = this._events; + + if (events !== undefined) { + var evlistener = events[type]; + + if (typeof evlistener === 'function') { + return 1; + } else if (evlistener !== undefined) { + return evlistener.length; + } + } + + return 0; +} + +EventEmitter.prototype.eventNames = function eventNames() { + return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; +}; + +function arrayClone(arr, n) { + var copy = new Array(n); + for (var i = 0; i < n; ++i) + copy[i] = arr[i]; + return copy; +} + +function spliceOne(list, index) { + for (; index + 1 < list.length; index++) + list[index] = list[index + 1]; + list.pop(); +} + +function unwrapListeners(arr) { + var ret = new Array(arr.length); + for (var i = 0; i < ret.length; ++i) { + ret[i] = arr[i].listener || arr[i]; + } + return ret; +} + +function once(emitter, name) { + return new Promise(function (resolve, reject) { + function errorListener(err) { + emitter.removeListener(name, resolver); + reject(err); + } + + function resolver() { + if (typeof emitter.removeListener === 'function') { + emitter.removeListener('error', errorListener); + } + resolve([].slice.call(arguments)); + }; + + eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); + if (name !== 'error') { + addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); + } + }); +} + +function addErrorHandlerIfEventEmitter(emitter, handler, flags) { + if (typeof emitter.on === 'function') { + eventTargetAgnosticAddListener(emitter, 'error', handler, flags); + } +} + +function eventTargetAgnosticAddListener(emitter, name, listener, flags) { + if (typeof emitter.on === 'function') { + if (flags.once) { + emitter.once(name, listener); + } else { + emitter.on(name, listener); + } + } else if (typeof emitter.addEventListener === 'function') { + // EventTarget does not have `error` event semantics like Node + // EventEmitters, we do not listen for `error` events here. + emitter.addEventListener(name, function wrapListener(arg) { + // IE does not have builtin `{ once: true }` support so we + // have to do it manually. + if (flags.once) { + emitter.removeEventListener(name, wrapListener); + } + listener(arg); + }); + } else { + throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); + } +} + + +/***/ }), + +/***/ 2536: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +var ___EXPOSE_LOADER_IMPORT___ = __webpack_require__(4275); +var ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = __webpack_require__(7672); +var ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___; +if (typeof ___EXPOSE_LOADER_GLOBAL_THIS___["pdfMake"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___["pdfMake"] = ___EXPOSE_LOADER_IMPORT___; +module.exports = ___EXPOSE_LOADER_IMPORT___; + + +/***/ }), + +/***/ 7672: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// eslint-disable-next-line func-names +module.exports = function () { + if (typeof globalThis === "object") { + return globalThis; + } + + var g; + + try { + // This works if eval is allowed (see CSP) + // eslint-disable-next-line no-new-func + g = this || new Function("return this")(); + } catch (e) { + // This works if the window reference is available + if (typeof window === "object") { + return window; + } // This works if the self reference is available + + + if (typeof self === "object") { + return self; + } // This works if the global reference is available + + + if (typeof __webpack_require__.g !== "undefined") { + return __webpack_require__.g; + } + } + + return g; +}(); + +/***/ }), + +/***/ 4029: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var isCallable = __webpack_require__(5320); + +var toStr = Object.prototype.toString; +var hasOwnProperty = Object.prototype.hasOwnProperty; + +var forEachArray = function forEachArray(array, iterator, receiver) { + for (var i = 0, len = array.length; i < len; i++) { + if (hasOwnProperty.call(array, i)) { + if (receiver == null) { + iterator(array[i], i, array); + } else { + iterator.call(receiver, array[i], i, array); + } + } + } +}; + +var forEachString = function forEachString(string, iterator, receiver) { + for (var i = 0, len = string.length; i < len; i++) { + // no such thing as a sparse string. + if (receiver == null) { + iterator(string.charAt(i), i, string); + } else { + iterator.call(receiver, string.charAt(i), i, string); + } + } +}; + +var forEachObject = function forEachObject(object, iterator, receiver) { + for (var k in object) { + if (hasOwnProperty.call(object, k)) { + if (receiver == null) { + iterator(object[k], k, object); + } else { + iterator.call(receiver, object[k], k, object); + } + } + } +}; + +var forEach = function forEach(list, iterator, thisArg) { + if (!isCallable(iterator)) { + throw new TypeError('iterator must be a function'); + } + + var receiver; + if (arguments.length >= 3) { + receiver = thisArg; + } + + if (toStr.call(list) === '[object Array]') { + forEachArray(list, iterator, receiver); + } else if (typeof list === 'string') { + forEachString(list, iterator, receiver); + } else { + forEachObject(list, iterator, receiver); + } +}; + +module.exports = forEach; + + +/***/ }), + +/***/ 7648: +/***/ (function(module) { + +"use strict"; + + +/* eslint no-invalid-this: 1 */ + +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; + + +/***/ }), + +/***/ 8612: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(7648); + +module.exports = Function.prototype.bind || implementation; + + +/***/ }), + +/***/ 5972: +/***/ (function(module) { + +"use strict"; + + +var functionsHaveNames = function functionsHaveNames() { + return typeof function f() {}.name === 'string'; +}; + +var gOPD = Object.getOwnPropertyDescriptor; +if (gOPD) { + try { + gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + gOPD = null; + } +} + +functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { + if (!functionsHaveNames() || !gOPD) { + return false; + } + var desc = gOPD(function () {}, 'name'); + return !!desc && !!desc.configurable; +}; + +var $bind = Function.prototype.bind; + +functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { + return functionsHaveNames() && typeof $bind === 'function' && function f() {}.bind().name !== ''; +}; + +module.exports = functionsHaveNames; + + +/***/ }), + +/***/ 210: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var undefined; + +var $SyntaxError = SyntaxError; +var $Function = Function; +var $TypeError = TypeError; + +// eslint-disable-next-line consistent-return +var getEvalledConstructor = function (expressionSyntax) { + try { + return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); + } catch (e) {} +}; + +var $gOPD = Object.getOwnPropertyDescriptor; +if ($gOPD) { + try { + $gOPD({}, ''); + } catch (e) { + $gOPD = null; // this is IE 8, which has a broken gOPD + } +} + +var throwTypeError = function () { + throw new $TypeError(); +}; +var ThrowTypeError = $gOPD + ? (function () { + try { + // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties + arguments.callee; // IE 8 does not throw here + return throwTypeError; + } catch (calleeThrows) { + try { + // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') + return $gOPD(arguments, 'callee').get; + } catch (gOPDthrows) { + return throwTypeError; + } + } + }()) + : throwTypeError; + +var hasSymbols = __webpack_require__(1405)(); + +var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto + +var needsEval = {}; + +var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); + +var INTRINSICS = { + '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, + '%Array%': Array, + '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, + '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, + '%AsyncFromSyncIteratorPrototype%': undefined, + '%AsyncFunction%': needsEval, + '%AsyncGenerator%': needsEval, + '%AsyncGeneratorFunction%': needsEval, + '%AsyncIteratorPrototype%': needsEval, + '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, + '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, + '%Boolean%': Boolean, + '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, + '%Date%': Date, + '%decodeURI%': decodeURI, + '%decodeURIComponent%': decodeURIComponent, + '%encodeURI%': encodeURI, + '%encodeURIComponent%': encodeURIComponent, + '%Error%': Error, + '%eval%': eval, // eslint-disable-line no-eval + '%EvalError%': EvalError, + '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, + '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, + '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, + '%Function%': $Function, + '%GeneratorFunction%': needsEval, + '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, + '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, + '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, + '%isFinite%': isFinite, + '%isNaN%': isNaN, + '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, + '%JSON%': typeof JSON === 'object' ? JSON : undefined, + '%Map%': typeof Map === 'undefined' ? undefined : Map, + '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), + '%Math%': Math, + '%Number%': Number, + '%Object%': Object, + '%parseFloat%': parseFloat, + '%parseInt%': parseInt, + '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, + '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, + '%RangeError%': RangeError, + '%ReferenceError%': ReferenceError, + '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, + '%RegExp%': RegExp, + '%Set%': typeof Set === 'undefined' ? undefined : Set, + '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), + '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, + '%String%': String, + '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, + '%Symbol%': hasSymbols ? Symbol : undefined, + '%SyntaxError%': $SyntaxError, + '%ThrowTypeError%': ThrowTypeError, + '%TypedArray%': TypedArray, + '%TypeError%': $TypeError, + '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, + '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, + '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, + '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, + '%URIError%': URIError, + '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, + '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, + '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet +}; + +var doEval = function doEval(name) { + var value; + if (name === '%AsyncFunction%') { + value = getEvalledConstructor('async function () {}'); + } else if (name === '%GeneratorFunction%') { + value = getEvalledConstructor('function* () {}'); + } else if (name === '%AsyncGeneratorFunction%') { + value = getEvalledConstructor('async function* () {}'); + } else if (name === '%AsyncGenerator%') { + var fn = doEval('%AsyncGeneratorFunction%'); + if (fn) { + value = fn.prototype; + } + } else if (name === '%AsyncIteratorPrototype%') { + var gen = doEval('%AsyncGenerator%'); + if (gen) { + value = getProto(gen.prototype); + } + } + + INTRINSICS[name] = value; + + return value; +}; + +var LEGACY_ALIASES = { + '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], + '%ArrayPrototype%': ['Array', 'prototype'], + '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], + '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], + '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], + '%ArrayProto_values%': ['Array', 'prototype', 'values'], + '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], + '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], + '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], + '%BooleanPrototype%': ['Boolean', 'prototype'], + '%DataViewPrototype%': ['DataView', 'prototype'], + '%DatePrototype%': ['Date', 'prototype'], + '%ErrorPrototype%': ['Error', 'prototype'], + '%EvalErrorPrototype%': ['EvalError', 'prototype'], + '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], + '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], + '%FunctionPrototype%': ['Function', 'prototype'], + '%Generator%': ['GeneratorFunction', 'prototype'], + '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], + '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], + '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], + '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], + '%JSONParse%': ['JSON', 'parse'], + '%JSONStringify%': ['JSON', 'stringify'], + '%MapPrototype%': ['Map', 'prototype'], + '%NumberPrototype%': ['Number', 'prototype'], + '%ObjectPrototype%': ['Object', 'prototype'], + '%ObjProto_toString%': ['Object', 'prototype', 'toString'], + '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], + '%PromisePrototype%': ['Promise', 'prototype'], + '%PromiseProto_then%': ['Promise', 'prototype', 'then'], + '%Promise_all%': ['Promise', 'all'], + '%Promise_reject%': ['Promise', 'reject'], + '%Promise_resolve%': ['Promise', 'resolve'], + '%RangeErrorPrototype%': ['RangeError', 'prototype'], + '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], + '%RegExpPrototype%': ['RegExp', 'prototype'], + '%SetPrototype%': ['Set', 'prototype'], + '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], + '%StringPrototype%': ['String', 'prototype'], + '%SymbolPrototype%': ['Symbol', 'prototype'], + '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], + '%TypedArrayPrototype%': ['TypedArray', 'prototype'], + '%TypeErrorPrototype%': ['TypeError', 'prototype'], + '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], + '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], + '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], + '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], + '%URIErrorPrototype%': ['URIError', 'prototype'], + '%WeakMapPrototype%': ['WeakMap', 'prototype'], + '%WeakSetPrototype%': ['WeakSet', 'prototype'] +}; + +var bind = __webpack_require__(8612); +var hasOwn = __webpack_require__(7642); +var $concat = bind.call(Function.call, Array.prototype.concat); +var $spliceApply = bind.call(Function.apply, Array.prototype.splice); +var $replace = bind.call(Function.call, String.prototype.replace); +var $strSlice = bind.call(Function.call, String.prototype.slice); +var $exec = bind.call(Function.call, RegExp.prototype.exec); + +/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ +var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; +var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ +var stringToPath = function stringToPath(string) { + var first = $strSlice(string, 0, 1); + var last = $strSlice(string, -1); + if (first === '%' && last !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); + } else if (last === '%' && first !== '%') { + throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); + } + var result = []; + $replace(string, rePropName, function (match, number, quote, subString) { + result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; + }); + return result; +}; +/* end adaptation */ + +var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { + var intrinsicName = name; + var alias; + if (hasOwn(LEGACY_ALIASES, intrinsicName)) { + alias = LEGACY_ALIASES[intrinsicName]; + intrinsicName = '%' + alias[0] + '%'; + } + + if (hasOwn(INTRINSICS, intrinsicName)) { + var value = INTRINSICS[intrinsicName]; + if (value === needsEval) { + value = doEval(intrinsicName); + } + if (typeof value === 'undefined' && !allowMissing) { + throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); + } + + return { + alias: alias, + name: intrinsicName, + value: value + }; + } + + throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); +}; + +module.exports = function GetIntrinsic(name, allowMissing) { + if (typeof name !== 'string' || name.length === 0) { + throw new $TypeError('intrinsic name must be a non-empty string'); + } + if (arguments.length > 1 && typeof allowMissing !== 'boolean') { + throw new $TypeError('"allowMissing" argument must be a boolean'); + } + + if ($exec(/^%?[^%]*%?$/, name) === null) { + throw new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name'); + } + var parts = stringToPath(name); + var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; + + var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); + var intrinsicRealName = intrinsic.name; + var value = intrinsic.value; + var skipFurtherCaching = false; + + var alias = intrinsic.alias; + if (alias) { + intrinsicBaseName = alias[0]; + $spliceApply(parts, $concat([0, 1], alias)); + } + + for (var i = 1, isOwn = true; i < parts.length; i += 1) { + var part = parts[i]; + var first = $strSlice(part, 0, 1); + var last = $strSlice(part, -1); + if ( + ( + (first === '"' || first === "'" || first === '`') + || (last === '"' || last === "'" || last === '`') + ) + && first !== last + ) { + throw new $SyntaxError('property names with quotes must have matching quotes'); + } + if (part === 'constructor' || !isOwn) { + skipFurtherCaching = true; + } + + intrinsicBaseName += '.' + part; + intrinsicRealName = '%' + intrinsicBaseName + '%'; + + if (hasOwn(INTRINSICS, intrinsicRealName)) { + value = INTRINSICS[intrinsicRealName]; + } else if (value != null) { + if (!(part in value)) { + if (!allowMissing) { + throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); + } + return void undefined; + } + if ($gOPD && (i + 1) >= parts.length) { + var desc = $gOPD(value, part); + isOwn = !!desc; + + // By convention, when a data property is converted to an accessor + // property to emulate a data property that does not suffer from + // the override mistake, that accessor's getter is marked with + // an `originalValue` property. Here, when we detect this, we + // uphold the illusion by pretending to see that original data + // property, i.e., returning the value rather than the getter + // itself. + if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { + value = desc.get; + } else { + value = value[part]; + } + } else { + isOwn = hasOwn(value, part); + value = value[part]; + } + + if (isOwn && !skipFurtherCaching) { + INTRINSICS[intrinsicRealName] = value; + } + } + } + return value; +}; + + +/***/ }), + +/***/ 7296: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(210); + +var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); + +if ($gOPD) { + try { + $gOPD([], 'length'); + } catch (e) { + // IE 8 has a broken gOPD + $gOPD = null; + } +} + +module.exports = $gOPD; + + +/***/ }), + +/***/ 1044: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var GetIntrinsic = __webpack_require__(210); + +var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); + +var hasPropertyDescriptors = function hasPropertyDescriptors() { + if ($defineProperty) { + try { + $defineProperty({}, 'a', { value: 1 }); + return true; + } catch (e) { + // IE 8 has a broken defineProperty + return false; + } + } + return false; +}; + +hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { + // node v0.6 has a bug where array lengths can be Set but not Defined + if (!hasPropertyDescriptors()) { + return null; + } + try { + return $defineProperty([], 'length', { value: 1 }).length !== 1; + } catch (e) { + // In Firefox 4-22, defining length on an array throws an exception. + return true; + } +}; + +module.exports = hasPropertyDescriptors; + + +/***/ }), + +/***/ 1405: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var origSymbol = typeof Symbol !== 'undefined' && Symbol; +var hasSymbolSham = __webpack_require__(5419); + +module.exports = function hasNativeSymbols() { + if (typeof origSymbol !== 'function') { return false; } + if (typeof Symbol !== 'function') { return false; } + if (typeof origSymbol('foo') !== 'symbol') { return false; } + if (typeof Symbol('bar') !== 'symbol') { return false; } + + return hasSymbolSham(); +}; + + +/***/ }), + +/***/ 5419: +/***/ (function(module) { + +"use strict"; + + +/* eslint complexity: [2, 18], max-statements: [2, 33] */ +module.exports = function hasSymbols() { + if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } + if (typeof Symbol.iterator === 'symbol') { return true; } + + var obj = {}; + var sym = Symbol('test'); + var symObj = Object(sym); + if (typeof sym === 'string') { return false; } + + if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } + if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } + + // temp disabled per https://github.com/ljharb/object.assign/issues/17 + // if (sym instanceof Symbol) { return false; } + // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 + // if (!(symObj instanceof Symbol)) { return false; } + + // if (typeof Symbol.prototype.toString !== 'function') { return false; } + // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } + + var symVal = 42; + obj[sym] = symVal; + for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop + if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } + + if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } + + var syms = Object.getOwnPropertySymbols(obj); + if (syms.length !== 1 || syms[0] !== sym) { return false; } + + if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } + + if (typeof Object.getOwnPropertyDescriptor === 'function') { + var descriptor = Object.getOwnPropertyDescriptor(obj, sym); + if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } + } + + return true; +}; + + +/***/ }), + +/***/ 6410: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasSymbols = __webpack_require__(5419); + +module.exports = function hasToStringTagShams() { + return hasSymbols() && !!Symbol.toStringTag; +}; + + +/***/ }), + +/***/ 7642: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var bind = __webpack_require__(8612); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); + + +/***/ }), + +/***/ 688: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var Buffer = (__webpack_require__(7103).Buffer); + +// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. +// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. +// To save memory and loading time, we read table files only when requested. + +exports._dbcs = DBCSCodec; + +var UNASSIGNED = -1, + GB18030_CODE = -2, + SEQ_START = -10, + NODE_START = -1000, + UNASSIGNED_NODE = new Array(0x100), + DEF_CHAR = -1; + +for (var i = 0; i < 0x100; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; + + +// Class DBCSCodec reads and initializes mapping tables. +function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data.") + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + + // Load tables. + var mappingTable = codecOptions.table(); + + + // Decode tables: MBCS -> Unicode. + + // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. + // Trie root is decodeTables[0]. + // Values: >= 0 -> unicode character code. can be > 0xFFFF + // == UNASSIGNED -> unknown/unassigned sequence. + // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. + // <= NODE_START -> index of the next node in our trie to process next byte. + // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. + + // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. + this.decodeTableSeq = []; + + // Actual mapping tables consist of chunks. Use them to fill up decode tables. + for (var i = 0; i < mappingTable.length; i++) + this._addDecodeChunk(mappingTable[i]); + + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. + + // Add GB18030 common decode nodes. + var commonThirdByteNodeIdx = this.decodeTables.length; + this.decodeTables.push(UNASSIGNED_NODE.slice(0)); + + var commonFourthByteNodeIdx = this.decodeTables.length; + this.decodeTables.push(UNASSIGNED_NODE.slice(0)); + + // Fill out the tree + var firstByteNode = this.decodeTables[0]; + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; + for (var j = 0x30; j <= 0x39; j++) { + if (secondByteNode[j] === UNASSIGNED) { + secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; + } else if (secondByteNode[j] > NODE_START) { + throw new Error("gb18030 decode tables conflict at byte 2"); + } + + var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; + for (var k = 0x81; k <= 0xFE; k++) { + if (thirdByteNode[k] === UNASSIGNED) { + thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; + } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { + continue; + } else if (thirdByteNode[k] > NODE_START) { + throw new Error("gb18030 decode tables conflict at byte 3"); + } + + var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; + for (var l = 0x30; l <= 0x39; l++) { + if (fourthByteNode[l] === UNASSIGNED) + fourthByteNode[l] = GB18030_CODE; + } + } + } + } + } + + this.defaultCharUnicode = iconv.defaultCharUnicode; + + + // Encode tables: Unicode -> DBCS. + + // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. + // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. + // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). + // == UNASSIGNED -> no conversion found. Output a default char. + // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. + this.encodeTable = []; + + // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of + // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key + // means end of sequence (needed when one sequence is a strict subsequence of another). + // Objects are kept separately from encodeTable to increase performance. + this.encodeTableSeq = []; + + // Some chars can be decoded, but need not be encoded. + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { + var val = codecOptions.encodeSkipVals[i]; + if (typeof val === 'number') + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + + // Use decode trie to recursively fill out encode tables. + this._fillEncodeTable(0, 0, skipEncodeChars); + + // Add more encoding pairs when needed. + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); + } + + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); +} + +DBCSCodec.prototype.encoder = DBCSEncoder; +DBCSCodec.prototype.decoder = DBCSDecoder; + +// Decoder helpers +DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>>= 8) + bytes.push(addr & 0xFF); + if (bytes.length == 0) + bytes.push(0); + + var node = this.decodeTables[0]; + for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. + var val = node[bytes[i]]; + + if (val == UNASSIGNED) { // Create new node. + node[bytes[i]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } + else if (val <= NODE_START) { // Existing node. + node = this.decodeTables[NODE_START - val]; + } + else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; +} + + +DBCSCodec.prototype._addDecodeChunk = function(chunk) { + // First element of chunk is the hex mbcs code where we start. + var curAddr = parseInt(chunk[0], 16); + + // Choose the decoding node where we'll write our chars. + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 0xFF; + + // Write all other elements of the chunk to the table. + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { // String, write as-is. + for (var l = 0; l < part.length;) { + var code = part.charCodeAt(l++); + if (0xD800 <= code && code < 0xDC00) { // Decode surrogate + var codeTrail = part.charCodeAt(l++); + if (0xDC00 <= codeTrail && codeTrail < 0xE000) + writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } + else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) + var len = 0xFFF - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. + + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } + else + writeTable[curAddr++] = code; // Basic char + } + } + else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. + var charCode = writeTable[curAddr - 1] + 1; + for (var l = 0; l < part; l++) + writeTable[curAddr++] = charCode++; + } + else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 0xFF) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); +} + +// Encoder helpers +DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; // This could be > 0xFF because of astral characters. + if (this.encodeTable[high] === undefined) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. + return this.encodeTable[high]; +} + +DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; +} + +DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + + // Get the root of character tree according to first character of the sequence. + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + + var node; + if (bucket[low] <= SEQ_START) { + // There's already a sequence with - use it. + node = this.encodeTableSeq[SEQ_START-bucket[low]]; + } + else { + // There was no sequence object - allocate a new one. + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } + + // Traverse the character tree, allocating new nodes as needed. + for (var j = 1; j < seq.length-1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === 'object') + node = oldVal; + else { + node = node[uCode] = {} + if (oldVal !== undefined) + node[DEF_CHAR] = oldVal + } + } + + // Set the leaf to given dbcsCode. + uCode = seq[seq.length-1]; + node[uCode] = dbcsCode; +} + +DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + var hasValues = false; + var subNodeEmpty = {}; + for (var i = 0; i < 0x100; i++) { + var uCode = node[i]; + var mbCode = prefix + i; + if (skipEncodeChars[mbCode]) + continue; + + if (uCode >= 0) { + this._setEncodeChar(uCode, mbCode); + hasValues = true; + } else if (uCode <= NODE_START) { + var subNodeIdx = NODE_START - uCode; + if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). + var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. + if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) + hasValues = true; + else + subNodeEmpty[subNodeIdx] = true; + } + } else if (uCode <= SEQ_START) { + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + hasValues = true; + } + } + return hasValues; +} + + + +// == Encoder ================================================================== + +function DBCSEncoder(options, codec) { + // Encoder state + this.leadSurrogate = -1; + this.seqObj = undefined; + + // Static data + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; +} + +DBCSEncoder.prototype.write = function(str) { + var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), + leadSurrogate = this.leadSurrogate, + seqObj = this.seqObj, nextChar = -1, + i = 0, j = 0; + + while (true) { + // 0. Get next character. + if (nextChar === -1) { + if (i == str.length) break; + var uCode = str.charCodeAt(i++); + } + else { + var uCode = nextChar; + nextChar = -1; + } + + // 1. Handle surrogates. + if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. + if (uCode < 0xDC00) { // We've got lead surrogate. + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + // Double lead surrogate found. + uCode = UNASSIGNED; + } + } else { // We've got trail surrogate. + if (leadSurrogate !== -1) { + uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); + leadSurrogate = -1; + } else { + // Incomplete surrogate pair - only trail surrogate found. + uCode = UNASSIGNED; + } + + } + } + else if (leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. + leadSurrogate = -1; + } + + // 2. Convert uCode character. + var dbcsCode = UNASSIGNED; + if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence + var resCode = seqObj[uCode]; + if (typeof resCode === 'object') { // Sequence continues. + seqObj = resCode; + continue; + + } else if (typeof resCode == 'number') { // Sequence finished. Write it. + dbcsCode = resCode; + + } else if (resCode == undefined) { // Current character is not part of the sequence. + + // Try default character for this sequence + resCode = seqObj[DEF_CHAR]; + if (resCode !== undefined) { + dbcsCode = resCode; // Found. Write it. + nextChar = uCode; // Current character will be written too in the next iteration. + + } else { + // TODO: What if we have no default? (resCode == undefined) + // Then, we should write first char of the sequence as-is and try the rest recursively. + // Didn't do it for now because no encoding has this situation yet. + // Currently, just skip the sequence and write current char. + } + } + seqObj = undefined; + } + else if (uCode >= 0) { // Regular character + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== undefined) + dbcsCode = subtable[uCode & 0xFF]; + + if (dbcsCode <= SEQ_START) { // Sequence start + seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; + continue; + } + + if (dbcsCode == UNASSIGNED && this.gb18030) { + // Use GB18030 algorithm to find character(s) to write. + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; + newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; + newBuf[j++] = 0x30 + dbcsCode; + continue; + } + } + } + + // 3. Write dbcsCode character. + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else if (dbcsCode < 0x10000) { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + else if (dbcsCode < 0x1000000) { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = (dbcsCode >> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } else { + newBuf[j++] = dbcsCode >>> 24; + newBuf[j++] = (dbcsCode >>> 16) & 0xFF; + newBuf[j++] = (dbcsCode >>> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } + } + + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); +} + +DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === undefined) + return; // All clean. Most often case. + + var newBuf = Buffer.alloc(10), j = 0; + + if (this.seqObj) { // We're in the sequence. + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== undefined) { // Write beginning of the sequence. + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + } else { + // See todo above. + } + this.seqObj = undefined; + } + + if (this.leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + + return newBuf.slice(0, j); +} + +// Export for testing +DBCSEncoder.prototype.findIdx = findIdx; + + +// == Decoder ================================================================== + +function DBCSDecoder(options, codec) { + // Decoder state + this.nodeIdx = 0; + this.prevBytes = []; + + // Static data + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; +} + +DBCSDecoder.prototype.write = function(buf) { + var newBuf = Buffer.alloc(buf.length*2), + nodeIdx = this.nodeIdx, + prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, + seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. + uCode; + + for (var i = 0, j = 0; i < buf.length; i++) { + var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; + + // Lookup in current trie node. + var uCode = this.decodeTables[nodeIdx][curByte]; + + if (uCode >= 0) { + // Normal character, just use it. + } + else if (uCode === UNASSIGNED) { // Unknown char. + // TODO: Callback with seq. + uCode = this.defaultCharUnicode.charCodeAt(0); + i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. + } + else if (uCode === GB18030_CODE) { + if (i >= 3) { + var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); + } else { + var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + + (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + + (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + + (curByte-0x30); + } + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } + else if (uCode <= NODE_START) { // Go to next trie node. + nodeIdx = NODE_START - uCode; + continue; + } + else if (uCode <= SEQ_START) { // Output a sequence of chars. + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length-1]; + } + else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + + // Write the character to buffer, handling higher planes using surrogate pair. + if (uCode >= 0x10000) { + uCode -= 0x10000; + var uCodeLead = 0xD800 | (uCode >> 10); + newBuf[j++] = uCodeLead & 0xFF; + newBuf[j++] = uCodeLead >> 8; + + uCode = 0xDC00 | (uCode & 0x3FF); + } + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + + // Reset trie node. + nodeIdx = 0; seqStart = i+1; + } + + this.nodeIdx = nodeIdx; + this.prevBytes = (seqStart >= 0) + ? Array.prototype.slice.call(buf, seqStart) + : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); + + return newBuf.slice(0, j).toString('ucs2'); +} + +DBCSDecoder.prototype.end = function() { + var ret = ''; + + // Try to parse all remaining chars. + while (this.prevBytes.length > 0) { + // Skip 1 character in the buffer. + ret += this.defaultCharUnicode; + var bytesArr = this.prevBytes.slice(1); + + // Parse remaining as usual. + this.prevBytes = []; + this.nodeIdx = 0; + if (bytesArr.length > 0) + ret += this.write(bytesArr); + } + + this.prevBytes = []; + this.nodeIdx = 0; + return ret; +} + +// Binary search for GB18030. Returns largest i such that table[i] <= val. +function findIdx(table, val) { + if (table[0] > val) + return -1; + + var l = 0, r = table.length; + while (l < r-1) { // always table[l] <= val < table[r] + var mid = l + ((r-l+1) >> 1); + if (table[mid] <= val) + l = mid; + else + r = mid; + } + return l; +} + + + +/***/ }), + +/***/ 5990: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// Description of supported double byte encodings and aliases. +// Tables are not require()-d until they are needed to speed up library load. +// require()-s are direct to support Browserify. + +module.exports = { + + // == Japanese/ShiftJIS ==================================================== + // All japanese encodings are based on JIS X set of standards: + // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. + // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. + // Has several variations in 1978, 1983, 1990 and 1997. + // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. + // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. + // 2 planes, first is superset of 0208, second - revised 0212. + // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + + // Byte encodings are: + // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte + // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. + // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. + // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. + // 0x00-0x7F - lower part of 0201 + // 0x8E, 0xA1-0xDF - upper part of 0201 + // (0xA1-0xFE)x2 - 0208 plane (94x94). + // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). + // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. + // Used as-is in ISO2022 family. + // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, + // 0201-1976 Roman, 0208-1978, 0208-1983. + // * ISO2022-JP-1: Adds esc seq for 0212-1990. + // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. + // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. + // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. + // + // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. + // + // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + + 'shiftjis': { + type: '_dbcs', + table: function() { return __webpack_require__(7014) }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + encodeSkipVals: [{from: 0xED40, to: 0xF940}], + }, + 'csshiftjis': 'shiftjis', + 'mskanji': 'shiftjis', + 'sjis': 'shiftjis', + 'windows31j': 'shiftjis', + 'ms31j': 'shiftjis', + 'xsjis': 'shiftjis', + 'windows932': 'shiftjis', + 'ms932': 'shiftjis', + '932': 'shiftjis', + 'cp932': 'shiftjis', + + 'eucjp': { + type: '_dbcs', + table: function() { return __webpack_require__(5633) }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + }, + + // TODO: KDDI extension to Shift_JIS + // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. + // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + + + // == Chinese/GBK ========================================================== + // http://en.wikipedia.org/wiki/GBK + // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + + // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 + 'gb2312': 'cp936', + 'gb231280': 'cp936', + 'gb23121980': 'cp936', + 'csgb2312': 'cp936', + 'csiso58gb231280': 'cp936', + 'euccn': 'cp936', + + // Microsoft's CP936 is a subset and approximation of GBK. + 'windows936': 'cp936', + 'ms936': 'cp936', + '936': 'cp936', + 'cp936': { + type: '_dbcs', + table: function() { return __webpack_require__(3336) }, + }, + + // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. + 'gbk': { + type: '_dbcs', + table: function() { return (__webpack_require__(3336).concat)(__webpack_require__(4346)) }, + }, + 'xgbk': 'gbk', + 'isoir58': 'gbk', + + // GB18030 is an algorithmic extension of GBK. + // Main source: https://www.w3.org/TR/encoding/#gbk-encoder + // http://icu-project.org/docs/papers/gb18030.html + // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml + // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 + 'gb18030': { + type: '_dbcs', + table: function() { return (__webpack_require__(3336).concat)(__webpack_require__(4346)) }, + gb18030: function() { return __webpack_require__(6258) }, + encodeSkipVals: [0x80], + encodeAdd: {'€': 0xA2E3}, + }, + + 'chinese': 'gb18030', + + + // == Korean =============================================================== + // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. + 'windows949': 'cp949', + 'ms949': 'cp949', + '949': 'cp949', + 'cp949': { + type: '_dbcs', + table: function() { return __webpack_require__(7348) }, + }, + + 'cseuckr': 'cp949', + 'csksc56011987': 'cp949', + 'euckr': 'cp949', + 'isoir149': 'cp949', + 'korean': 'cp949', + 'ksc56011987': 'cp949', + 'ksc56011989': 'cp949', + 'ksc5601': 'cp949', + + + // == Big5/Taiwan/Hong Kong ================================================ + // There are lots of tables for Big5 and cp950. Please see the following links for history: + // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html + // Variations, in roughly number of defined chars: + // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT + // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ + // * Big5-2003 (Taiwan standard) almost superset of cp950. + // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. + // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. + // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. + // Plus, it has 4 combining sequences. + // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 + // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. + // Implementations are not consistent within browsers; sometimes labeled as just big5. + // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. + // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 + // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. + // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt + // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt + // + // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder + // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. + + 'windows950': 'cp950', + 'ms950': 'cp950', + '950': 'cp950', + 'cp950': { + type: '_dbcs', + table: function() { return __webpack_require__(4284) }, + }, + + // 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__(4284).concat)(__webpack_require__(3480)) }, + encodeSkipVals: [ + // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of + // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. + // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. + 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, + 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, + 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, + 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, + 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, + + // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 + 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, + ], + }, + + 'cnbig5': 'big5hkscs', + 'csbig5': 'big5hkscs', + 'xxbig5': 'big5hkscs', +}; + + +/***/ }), + +/***/ 6934: +/***/ (function(__unused_webpack_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__(1025), + __webpack_require__(7688), + __webpack_require__(1279), + __webpack_require__(758), + __webpack_require__(9068), + __webpack_require__(3769), + __webpack_require__(7018), + __webpack_require__(688), + __webpack_require__(5990), +]; + +// 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]; +} + + +/***/ }), + +/***/ 1025: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + +var Buffer = (__webpack_require__(7103).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__(2553)/* .StringDecoder */ .s); + +if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. + StringDecoder.prototype.end = function() {}; + + +function InternalDecoder(options, codec) { + this.decoder = new StringDecoder(codec.enc); +} + +InternalDecoder.prototype.write = function(buf) { + if (!Buffer.isBuffer(buf)) { + buf = Buffer.from(buf); + } + + return this.decoder.write(buf); +} + +InternalDecoder.prototype.end = function() { + return this.decoder.end(); +} + + +//------------------------------------------------------------------------------ +// 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"); +} + +InternalEncoderBase64.prototype.end = function() { + return Buffer.from(this.prevStr, "base64"); +} + + +//------------------------------------------------------------------------------ +// CESU-8 encoder is also special. + +function InternalEncoderCesu8(options, codec) { +} + +InternalEncoderCesu8.prototype.write = function(str) { + var buf = Buffer.alloc(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + // Naive implementation, but it works because CESU-8 is especially easy + // to convert from UTF-16 (which all JS strings are encoded in). + if (charCode < 0x80) + buf[bufIdx++] = charCode; + else if (charCode < 0x800) { + buf[bufIdx++] = 0xC0 + (charCode >>> 6); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + else { // charCode will always be < 0x10000 in javascript. + buf[bufIdx++] = 0xE0 + (charCode >>> 12); + buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + } + return buf.slice(0, bufIdx); +} + +InternalEncoderCesu8.prototype.end = function() { +} + +//------------------------------------------------------------------------------ +// CESU-8 decoder is not implemented in Node v4.0+ + +function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; +} + +InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, + res = ''; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 0xC0) !== 0x80) { // Leading byte + if (contBytes > 0) { // Previous code is invalid + res += this.defaultCharUnicode; + contBytes = 0; + } + + if (curByte < 0x80) { // Single-byte code + res += String.fromCharCode(curByte); + } else if (curByte < 0xE0) { // Two-byte code + acc = curByte & 0x1F; + contBytes = 1; accBytes = 1; + } else if (curByte < 0xF0) { // Three-byte code + acc = curByte & 0x0F; + contBytes = 2; accBytes = 1; + } else { // Four or more are not supported for CESU-8. + res += this.defaultCharUnicode; + } + } else { // Continuation byte + if (contBytes > 0) { // We're waiting for it. + acc = (acc << 6) | (curByte & 0x3f); + contBytes--; accBytes++; + if (contBytes === 0) { + // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) + if (accBytes === 2 && acc < 0x80 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 0x800) + res += this.defaultCharUnicode; + else + // Actually add character. + res += String.fromCharCode(acc); + } + } else { // Unexpected continuation byte + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; + return res; +} + +InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; +} + + +/***/ }), + +/***/ 9068: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var Buffer = (__webpack_require__(7103).Buffer); + +// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that +// correspond to encoded bytes (if 128 - then lower half is ASCII). + +exports._sbcs = SBCSCodec; +function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data.") + + // Prepare char buffer for decoding. + if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) + throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); + + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + + this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); + + // Encoding buffer. + var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); + + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + + this.encodeBuf = encodeBuf; +} + +SBCSCodec.prototype.encoder = SBCSEncoder; +SBCSCodec.prototype.decoder = SBCSDecoder; + + +function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; +} + +SBCSEncoder.prototype.write = function(str) { + var buf = Buffer.alloc(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + + return buf; +} + +SBCSEncoder.prototype.end = function() { +} + + +function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; +} + +SBCSDecoder.prototype.write = function(buf) { + // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. + var decodeBuf = this.decodeBuf; + var newBuf = Buffer.alloc(buf.length*2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i]*2; idx2 = i*2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2+1] = decodeBuf[idx1+1]; + } + return newBuf.toString('ucs2'); +} + +SBCSDecoder.prototype.end = function() { +} + + +/***/ }), + +/***/ 7018: +/***/ (function(module) { + +"use strict"; + + +// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. +module.exports = { + "437": "cp437", + "737": "cp737", + "775": "cp775", + "850": "cp850", + "852": "cp852", + "855": "cp855", + "856": "cp856", + "857": "cp857", + "858": "cp858", + "860": "cp860", + "861": "cp861", + "862": "cp862", + "863": "cp863", + "864": "cp864", + "865": "cp865", + "866": "cp866", + "869": "cp869", + "874": "windows874", + "922": "cp922", + "1046": "cp1046", + "1124": "cp1124", + "1125": "cp1125", + "1129": "cp1129", + "1133": "cp1133", + "1161": "cp1161", + "1162": "cp1162", + "1163": "cp1163", + "1250": "windows1250", + "1251": "windows1251", + "1252": "windows1252", + "1253": "windows1253", + "1254": "windows1254", + "1255": "windows1255", + "1256": "windows1256", + "1257": "windows1257", + "1258": "windows1258", + "28591": "iso88591", + "28592": "iso88592", + "28593": "iso88593", + "28594": "iso88594", + "28595": "iso88595", + "28596": "iso88596", + "28597": "iso88597", + "28598": "iso88598", + "28599": "iso88599", + "28600": "iso885910", + "28601": "iso885911", + "28603": "iso885913", + "28604": "iso885914", + "28605": "iso885915", + "28606": "iso885916", + "windows874": { + "type": "_sbcs", + "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "win874": "windows874", + "cp874": "windows874", + "windows1250": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "win1250": "windows1250", + "cp1250": "windows1250", + "windows1251": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "win1251": "windows1251", + "cp1251": "windows1251", + "windows1252": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "win1252": "windows1252", + "cp1252": "windows1252", + "windows1253": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "win1253": "windows1253", + "cp1253": "windows1253", + "windows1254": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "win1254": "windows1254", + "cp1254": "windows1254", + "windows1255": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "win1255": "windows1255", + "cp1255": "windows1255", + "windows1256": { + "type": "_sbcs", + "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" + }, + "win1256": "windows1256", + "cp1256": "windows1256", + "windows1257": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" + }, + "win1257": "windows1257", + "cp1257": "windows1257", + "windows1258": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "win1258": "windows1258", + "cp1258": "windows1258", + "iso88591": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28591": "iso88591", + "iso88592": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "cp28592": "iso88592", + "iso88593": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" + }, + "cp28593": "iso88593", + "iso88594": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" + }, + "cp28594": "iso88594", + "iso88595": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" + }, + "cp28595": "iso88595", + "iso88596": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" + }, + "cp28596": "iso88596", + "iso88597": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "cp28597": "iso88597", + "iso88598": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "cp28598": "iso88598", + "iso88599": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "cp28599": "iso88599", + "iso885910": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" + }, + "cp28600": "iso885910", + "iso885911": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "cp28601": "iso885911", + "iso885913": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" + }, + "cp28603": "iso885913", + "iso885914": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" + }, + "cp28604": "iso885914", + "iso885915": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28605": "iso885915", + "iso885916": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" + }, + "cp28606": "iso885916", + "cp437": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm437": "cp437", + "csibm437": "cp437", + "cp737": { + "type": "_sbcs", + "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " + }, + "ibm737": "cp737", + "csibm737": "cp737", + "cp775": { + "type": "_sbcs", + "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " + }, + "ibm775": "cp775", + "csibm775": "cp775", + "cp850": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm850": "cp850", + "csibm850": "cp850", + "cp852": { + "type": "_sbcs", + "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " + }, + "ibm852": "cp852", + "csibm852": "cp852", + "cp855": { + "type": "_sbcs", + "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " + }, + "ibm855": "cp855", + "csibm855": "cp855", + "cp856": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm856": "cp856", + "csibm856": "cp856", + "cp857": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " + }, + "ibm857": "cp857", + "csibm857": "cp857", + "cp858": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm858": "cp858", + "csibm858": "cp858", + "cp860": { + "type": "_sbcs", + "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm860": "cp860", + "csibm860": "cp860", + "cp861": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm861": "cp861", + "csibm861": "cp861", + "cp862": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm862": "cp862", + "csibm862": "cp862", + "cp863": { + "type": "_sbcs", + "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm863": "cp863", + "csibm863": "cp863", + "cp864": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" + }, + "ibm864": "cp864", + "csibm864": "cp864", + "cp865": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm865": "cp865", + "csibm865": "cp865", + "cp866": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " + }, + "ibm866": "cp866", + "csibm866": "cp866", + "cp869": { + "type": "_sbcs", + "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " + }, + "ibm869": "cp869", + "csibm869": "cp869", + "cp922": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" + }, + "ibm922": "cp922", + "csibm922": "cp922", + "cp1046": { + "type": "_sbcs", + "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" + }, + "ibm1046": "cp1046", + "csibm1046": "cp1046", + "cp1124": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" + }, + "ibm1124": "cp1124", + "csibm1124": "cp1124", + "cp1125": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " + }, + "ibm1125": "cp1125", + "csibm1125": "cp1125", + "cp1129": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1129": "cp1129", + "csibm1129": "cp1129", + "cp1133": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" + }, + "ibm1133": "cp1133", + "csibm1133": "cp1133", + "cp1161": { + "type": "_sbcs", + "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " + }, + "ibm1161": "cp1161", + "csibm1161": "cp1161", + "cp1162": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "ibm1162": "cp1162", + "csibm1162": "cp1162", + "cp1163": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1163": "cp1163", + "csibm1163": "cp1163", + "maccroatian": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" + }, + "maccyrillic": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "macgreek": { + "type": "_sbcs", + "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" + }, + "maciceland": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macroman": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macromania": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macthai": { + "type": "_sbcs", + "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" + }, + "macturkish": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macukraine": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "koi8r": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8u": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8ru": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8t": { + "type": "_sbcs", + "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "armscii8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" + }, + "rk1048": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "tcvn": { + "type": "_sbcs", + "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" + }, + "georgianacademy": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "georgianps": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "pt154": { + "type": "_sbcs", + "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "viscii": { + "type": "_sbcs", + "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" + }, + "iso646cn": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "iso646jp": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "hproman8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" + }, + "macintosh": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "ascii": { + "type": "_sbcs", + "chars": "��������������������������������������������������������������������������������������������������������������������������������" + }, + "tis620": { + "type": "_sbcs", + "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + } +} + +/***/ }), + +/***/ 3769: +/***/ (function(module) { + +"use strict"; + + +// Manually added data to be used by sbcs codec in addition to generated one. + +module.exports = { + // Not supported by iconv, not sure why. + "10029": "maccenteuro", + "maccenteuro": { + "type": "_sbcs", + "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" + }, + + "808": "cp808", + "ibm808": "cp808", + "cp808": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " + }, + + "mik": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + + "cp720": { + "type": "_sbcs", + "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" + }, + + // Aliases of generated encodings. + "ascii8bit": "ascii", + "usascii": "ascii", + "ansix34": "ascii", + "ansix341968": "ascii", + "ansix341986": "ascii", + "csascii": "ascii", + "cp367": "ascii", + "ibm367": "ascii", + "isoir6": "ascii", + "iso646us": "ascii", + "iso646irv": "ascii", + "us": "ascii", + + "latin1": "iso88591", + "latin2": "iso88592", + "latin3": "iso88593", + "latin4": "iso88594", + "latin5": "iso88599", + "latin6": "iso885910", + "latin7": "iso885913", + "latin8": "iso885914", + "latin9": "iso885915", + "latin10": "iso885916", + + "csisolatin1": "iso88591", + "csisolatin2": "iso88592", + "csisolatin3": "iso88593", + "csisolatin4": "iso88594", + "csisolatincyrillic": "iso88595", + "csisolatinarabic": "iso88596", + "csisolatingreek" : "iso88597", + "csisolatinhebrew": "iso88598", + "csisolatin5": "iso88599", + "csisolatin6": "iso885910", + + "l1": "iso88591", + "l2": "iso88592", + "l3": "iso88593", + "l4": "iso88594", + "l5": "iso88599", + "l6": "iso885910", + "l7": "iso885913", + "l8": "iso885914", + "l9": "iso885915", + "l10": "iso885916", + + "isoir14": "iso646jp", + "isoir57": "iso646cn", + "isoir100": "iso88591", + "isoir101": "iso88592", + "isoir109": "iso88593", + "isoir110": "iso88594", + "isoir144": "iso88595", + "isoir127": "iso88596", + "isoir126": "iso88597", + "isoir138": "iso88598", + "isoir148": "iso88599", + "isoir157": "iso885910", + "isoir166": "tis620", + "isoir179": "iso885913", + "isoir199": "iso885914", + "isoir203": "iso885915", + "isoir226": "iso885916", + + "cp819": "iso88591", + "ibm819": "iso88591", + + "cyrillic": "iso88595", + + "arabic": "iso88596", + "arabic8": "iso88596", + "ecma114": "iso88596", + "asmo708": "iso88596", + + "greek" : "iso88597", + "greek8" : "iso88597", + "ecma118" : "iso88597", + "elot928" : "iso88597", + + "hebrew": "iso88598", + "hebrew8": "iso88598", + + "turkish": "iso88599", + "turkish8": "iso88599", + + "thai": "iso885911", + "thai8": "iso885911", + + "celtic": "iso885914", + "celtic8": "iso885914", + "isoceltic": "iso885914", + + "tis6200": "tis620", + "tis62025291": "tis620", + "tis62025330": "tis620", + + "10000": "macroman", + "10006": "macgreek", + "10007": "maccyrillic", + "10079": "maciceland", + "10081": "macturkish", + + "cspc8codepage437": "cp437", + "cspc775baltic": "cp775", + "cspc850multilingual": "cp850", + "cspcp852": "cp852", + "cspc862latinhebrew": "cp862", + "cpgr": "cp869", + + "msee": "cp1250", + "mscyrl": "cp1251", + "msansi": "cp1252", + "msgreek": "cp1253", + "msturk": "cp1254", + "mshebr": "cp1255", + "msarab": "cp1256", + "winbaltrim": "cp1257", + + "cp20866": "koi8r", + "20866": "koi8r", + "ibm878": "koi8r", + "cskoi8r": "koi8r", + + "cp21866": "koi8u", + "21866": "koi8u", + "ibm1168": "koi8u", + + "strk10482002": "rk1048", + + "tcvn5712": "tcvn", + "tcvn57121": "tcvn", + + "gb198880": "iso646cn", + "cn": "iso646cn", + + "csiso14jisc6220ro": "iso646jp", + "jisc62201969ro": "iso646jp", + "jp": "iso646jp", + + "cshproman8": "hproman8", + "r8": "hproman8", + "roman8": "hproman8", + "xroman8": "hproman8", + "ibm1051": "hproman8", + + "mac": "macintosh", + "csmacintosh": "macintosh", +}; + + + +/***/ }), + +/***/ 1279: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var Buffer = (__webpack_require__(7103).Buffer); + +// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js + +// == UTF16-BE codec. ========================================================== + +exports.utf16be = Utf16BECodec; +function Utf16BECodec() { +} + +Utf16BECodec.prototype.encoder = Utf16BEEncoder; +Utf16BECodec.prototype.decoder = Utf16BEDecoder; +Utf16BECodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf16BEEncoder() { +} + +Utf16BEEncoder.prototype.write = function(str) { + var buf = Buffer.from(str, 'ucs2'); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; + } + return buf; +} + +Utf16BEEncoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf16BEDecoder() { + this.overflowByte = -1; +} + +Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ''; + + var buf2 = Buffer.alloc(buf.length + 1), + i = 0, j = 0; + + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; j = 2; + } + + for (; i < buf.length-1; i += 2, j+= 2) { + buf2[j] = buf[i+1]; + buf2[j+1] = buf[i]; + } + + this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; + + return buf2.slice(0, j).toString('ucs2'); +} + +Utf16BEDecoder.prototype.end = function() { + this.overflowByte = -1; +} + + +// == UTF-16 codec ============================================================= +// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. +// Defaults to UTF-16LE, as it's prevalent and default in Node. +// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le +// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); + +// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). + +exports.utf16 = Utf16Codec; +function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; +} + +Utf16Codec.prototype.encoder = Utf16Encoder; +Utf16Codec.prototype.decoder = Utf16Decoder; + + +// -- Encoding (pass-through) + +function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === undefined) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder('utf-16le', options); +} + +Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); +} + +Utf16Encoder.prototype.end = function() { + return this.encoder.end(); +} + + +// -- Decoding + +function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBufs = []; + this.initialBufsLen = 0; + + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBufs.push(buf); + this.initialBufsLen += buf.length; + + if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + + return this.decoder.write(buf); +} + +Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + var trail = this.decoder.end(); + if (trail) + resStr += trail; + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + return this.decoder.end(); +} + +function detectEncoding(bufs, defaultEncoding) { + var b = []; + var charsProcessed = 0; + var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. + + outer_loop: + for (var i = 0; i < bufs.length; i++) { + var buf = bufs[i]; + for (var j = 0; j < buf.length; j++) { + b.push(buf[j]); + if (b.length === 2) { + if (charsProcessed === 0) { + // Check BOM first. + if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; + if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; + } + + if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; + if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; + + b.length = 0; + charsProcessed++; + + if (charsProcessed >= 100) { + break outer_loop; + } + } + } + } + + // Make decisions. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; + if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; + + // Couldn't decide (likely all zeros or not enough data). + return defaultEncoding || 'utf-16le'; +} + + + + +/***/ }), + +/***/ 7688: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +var Buffer = (__webpack_require__(7103).Buffer); + +// == UTF32-LE/BE codec. ========================================================== + +exports._utf32 = Utf32Codec; + +function Utf32Codec(codecOptions, iconv) { + this.iconv = iconv; + this.bomAware = true; + this.isLE = codecOptions.isLE; +} + +exports.utf32le = { type: '_utf32', isLE: true }; +exports.utf32be = { type: '_utf32', isLE: false }; + +// Aliases +exports.ucs4le = 'utf32le'; +exports.ucs4be = 'utf32be'; + +Utf32Codec.prototype.encoder = Utf32Encoder; +Utf32Codec.prototype.decoder = Utf32Decoder; + +// -- Encoding + +function Utf32Encoder(options, codec) { + this.isLE = codec.isLE; + this.highSurrogate = 0; +} + +Utf32Encoder.prototype.write = function(str) { + var src = Buffer.from(str, 'ucs2'); + var dst = Buffer.alloc(src.length * 2); + var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; + var offset = 0; + + for (var i = 0; i < src.length; i += 2) { + var code = src.readUInt16LE(i); + var isHighSurrogate = (0xD800 <= code && code < 0xDC00); + var isLowSurrogate = (0xDC00 <= code && code < 0xE000); + + if (this.highSurrogate) { + if (isHighSurrogate || !isLowSurrogate) { + // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low + // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character + // (technically wrong, but expected by some applications, like Windows file names). + write32.call(dst, this.highSurrogate, offset); + offset += 4; + } + else { + // Create 32-bit value from high and low surrogates; + var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; + + write32.call(dst, codepoint, offset); + offset += 4; + this.highSurrogate = 0; + + continue; + } + } + + if (isHighSurrogate) + this.highSurrogate = code; + else { + // Even if the current character is a low surrogate, with no previous high surrogate, we'll + // encode it as a semi-invalid stand-alone character for the same reasons expressed above for + // unpaired high surrogates. + write32.call(dst, code, offset); + offset += 4; + this.highSurrogate = 0; + } + } + + if (offset < dst.length) + dst = dst.slice(0, offset); + + return dst; +}; + +Utf32Encoder.prototype.end = function() { + // Treat any leftover high surrogate as a semi-valid independent character. + if (!this.highSurrogate) + return; + + var buf = Buffer.alloc(4); + + if (this.isLE) + buf.writeUInt32LE(this.highSurrogate, 0); + else + buf.writeUInt32BE(this.highSurrogate, 0); + + this.highSurrogate = 0; + + return buf; +}; + +// -- Decoding + +function Utf32Decoder(options, codec) { + this.isLE = codec.isLE; + this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); + this.overflow = []; +} + +Utf32Decoder.prototype.write = function(src) { + if (src.length === 0) + return ''; + + var i = 0; + var codepoint = 0; + var dst = Buffer.alloc(src.length + 4); + var offset = 0; + var isLE = this.isLE; + var overflow = this.overflow; + var badChar = this.badChar; + + if (overflow.length > 0) { + for (; i < src.length && overflow.length < 4; i++) + overflow.push(src[i]); + + if (overflow.length === 4) { + // NOTE: codepoint is a signed int32 and can be negative. + // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). + if (isLE) { + codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); + } else { + codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); + } + overflow.length = 0; + + offset = _writeCodepoint(dst, offset, codepoint, badChar); + } + } + + // Main loop. Should be as optimized as possible. + for (; i < src.length - 3; i += 4) { + // NOTE: codepoint is a signed int32 and can be negative. + if (isLE) { + codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); + } else { + codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); + } + offset = _writeCodepoint(dst, offset, codepoint, badChar); + } + + // Keep overflowing bytes. + for (; i < src.length; i++) { + overflow.push(src[i]); + } + + return dst.slice(0, offset).toString('ucs2'); +}; + +function _writeCodepoint(dst, offset, codepoint, badChar) { + // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. + if (codepoint < 0 || codepoint > 0x10FFFF) { + // Not a valid Unicode codepoint + codepoint = badChar; + } + + // Ephemeral Planes: Write high surrogate. + if (codepoint >= 0x10000) { + codepoint -= 0x10000; + + var high = 0xD800 | (codepoint >> 10); + dst[offset++] = high & 0xff; + dst[offset++] = high >> 8; + + // Low surrogate is written below. + var codepoint = 0xDC00 | (codepoint & 0x3FF); + } + + // Write BMP char or low surrogate. + dst[offset++] = codepoint & 0xff; + dst[offset++] = codepoint >> 8; + + return offset; +}; + +Utf32Decoder.prototype.end = function() { + this.overflow.length = 0; +}; + +// == UTF-32 Auto codec ============================================================= +// Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. +// Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 +// Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); + +// Encoder prepends BOM (which can be overridden with (addBOM: false}). + +exports.utf32 = Utf32AutoCodec; +exports.ucs4 = 'utf32'; + +function Utf32AutoCodec(options, iconv) { + this.iconv = iconv; +} + +Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; +Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; + +// -- Encoding + +function Utf32AutoEncoder(options, codec) { + options = options || {}; + + if (options.addBOM === undefined) + options.addBOM = true; + + this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); +} + +Utf32AutoEncoder.prototype.write = function(str) { + return this.encoder.write(str); +}; + +Utf32AutoEncoder.prototype.end = function() { + return this.encoder.end(); +}; + +// -- Decoding + +function Utf32AutoDecoder(options, codec) { + this.decoder = null; + this.initialBufs = []; + this.initialBufsLen = 0; + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf32AutoDecoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBufs.push(buf); + this.initialBufsLen += buf.length; + + if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + + return this.decoder.write(buf); +}; + +Utf32AutoDecoder.prototype.end = function() { + if (!this.decoder) { + var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var resStr = ''; + for (var i = 0; i < this.initialBufs.length; i++) + resStr += this.decoder.write(this.initialBufs[i]); + + var trail = this.decoder.end(); + if (trail) + resStr += trail; + + this.initialBufs.length = this.initialBufsLen = 0; + return resStr; + } + + return this.decoder.end(); +}; + +function detectEncoding(bufs, defaultEncoding) { + var b = []; + var charsProcessed = 0; + var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. + var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. + + outer_loop: + for (var i = 0; i < bufs.length; i++) { + var buf = bufs[i]; + for (var j = 0; j < buf.length; j++) { + b.push(buf[j]); + if (b.length === 4) { + if (charsProcessed === 0) { + // Check BOM first. + if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { + return 'utf-32le'; + } + if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { + return 'utf-32be'; + } + } + + if (b[0] !== 0 || b[1] > 0x10) invalidBE++; + if (b[3] !== 0 || b[2] > 0x10) invalidLE++; + + if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; + if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; + + b.length = 0; + charsProcessed++; + + if (charsProcessed >= 100) { + break outer_loop; + } + } + } + } + + // Make decisions. + if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; + if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; + + // Couldn't decide (likely all zeros or not enough data). + return defaultEncoding || 'utf-32le'; +} + + +/***/ }), + +/***/ 758: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + +var Buffer = (__webpack_require__(7103).Buffer); + +// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 +// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 + +exports.utf7 = Utf7Codec; +exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 +function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7Codec.prototype.encoder = Utf7Encoder; +Utf7Codec.prototype.decoder = Utf7Decoder; +Utf7Codec.prototype.bomAware = true; + + +// -- Encoding + +var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + +function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; +} + +Utf7Encoder.prototype.write = function(str) { + // Naive implementation. + // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". + return Buffer.from(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === '+' ? '' : + this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + + "-"; + }.bind(this))); +} + +Utf7Encoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64Regex = /[A-Za-z0-9\/+]/; +var base64Chars = []; +for (var i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + +var plusChar = '+'.charCodeAt(0), + minusChar = '-'.charCodeAt(0), + andChar = '&'.charCodeAt(0); + +Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '+' + if (buf[i] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64Chars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" + res += "+"; + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus is absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + +// UTF-7-IMAP codec. +// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) +// Differences: +// * Base64 part is started by "&" instead of "+" +// * Direct characters are 0x20-0x7E, except "&" (0x26) +// * In Base64, "," is used instead of "/" +// * Base64 must not be used to represent direct characters. +// * No implicit shift back from Base64 (should always end with '-') +// * String must end in non-shifted position. +// * "-&" while in base64 is not allowed. + + +exports.utf7imap = Utf7IMAPCodec; +function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; +Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; +Utf7IMAPCodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = Buffer.alloc(6); + this.base64AccumIdx = 0; +} + +Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, + base64Accum = this.base64Accum, + base64AccumIdx = this.base64AccumIdx, + buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; + + for (var i = 0; i < str.length; i++) { + var uChar = str.charCodeAt(i); + if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + inBase64 = false; + } + + if (!inBase64) { + buf[bufIdx++] = uChar; // Write direct character + + if (uChar === andChar) // Ampersand -> '&-' + buf[bufIdx++] = minusChar; + } + + } else { // Non-direct character + if (!inBase64) { + buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 0xFF; + + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); + base64AccumIdx = 0; + } + } + } + } + + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + + return buf.slice(0, bufIdx); +} + +Utf7IMAPEncoder.prototype.end = function() { + var buf = Buffer.alloc(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + this.base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + this.inBase64 = false; + } + + return buf.slice(0, bufIdx); +} + + +// -- Decoding + +function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64IMAPChars = base64Chars.slice(); +base64IMAPChars[','.charCodeAt(0)] = true; + +Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '&' + if (buf[i] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64IMAPChars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" + res += "&"; + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus may be absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + + + +/***/ }), + +/***/ 5395: +/***/ (function(__unused_webpack_module, exports) { + +"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(); +} + + + +/***/ }), + +/***/ 4914: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var Buffer = (__webpack_require__(7103).Buffer); + +var bomHandling = __webpack_require__(5395), + 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__(6934); // 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; +} + +// Streaming API +// NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add +// up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. +// If you would like to enable it explicitly, please add the following code to your app: +// > iconv.enableStreamingAPI(require('stream')); +iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { + if (iconv.supportsStreams) + return; + + // Dependency-inject stream module to create IconvLite stream classes. + var streams = __webpack_require__(8044)(stream_module); + + // Not public API yet, but expose the stream classes. + iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; + + // Streaming API. + iconv.encodeStream = function encodeStream(encoding, options) { + return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + } + + iconv.decodeStream = function decodeStream(encoding, options) { + return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + } + + iconv.supportsStreams = true; +} + +// Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). +var stream_module; +try { + stream_module = __webpack_require__(5832); +} catch (e) {} + +if (stream_module && stream_module.Transform) { + iconv.enableStreamingAPI(stream_module); + +} else { + // In rare cases where 'stream' module is not available by default, throw a helpful exception. + iconv.encodeStream = iconv.decodeStream = function() { + throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); + }; +} + +if (false) {} + + +/***/ }), + +/***/ 8044: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var Buffer = (__webpack_require__(7103).Buffer); + +// NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), +// we opt to dependency-inject it instead of creating a hard dependency. +module.exports = function(stream_module) { + var Transform = stream_module.Transform; + + // == Encoder stream ======================================================= + + function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; // We accept only strings, so we don't need to decode them. + Transform.call(this, options); + } + + IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } + }); + + IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != 'string') + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on('error', cb); + this.on('data', function(chunk) { chunks.push(chunk); }); + this.on('end', function() { + cb(null, Buffer.concat(chunks)); + }); + return this; + } + + + // == Decoder stream ======================================================= + + function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = 'utf8'; // We output strings. + Transform.call(this, options); + } + + IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } + }); + + IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } + } + + IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ''; + this.on('error', cb); + this.on('data', function(chunk) { res += chunk; }); + this.on('end', function() { + cb(null, res); + }); + return this; + } + + return { + IconvLiteEncoderStream: IconvLiteEncoderStream, + IconvLiteDecoderStream: IconvLiteDecoderStream, + }; +}; + + +/***/ }), + +/***/ 645: +/***/ (function(__unused_webpack_module, exports) { + +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +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] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} + + 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) +} + +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) + + 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 { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} + + +/***/ }), + +/***/ 5717: +/***/ (function(module) { + +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 + } + } +} + + +/***/ }), + +/***/ 2584: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var hasToStringTag = __webpack_require__(6410)(); +var callBound = __webpack_require__(1924); + +var $toString = callBound('Object.prototype.toString'); + +var isStandardArguments = function isArguments(value) { + if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) { + return false; + } + return $toString(value) === '[object Arguments]'; +}; + +var isLegacyArguments = function isArguments(value) { + if (isStandardArguments(value)) { + return true; + } + return value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + $toString(value) !== '[object Array]' && + $toString(value.callee) === '[object Function]'; +}; + +var supportsStandardArguments = (function () { + return isStandardArguments(arguments); +}()); + +isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests + +module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; + + +/***/ }), + +/***/ 5320: +/***/ (function(module) { + +"use strict"; + + +var fnToStr = Function.prototype.toString; +var reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply; +var badArrayLike; +var isCallableMarker; +if (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') { + try { + badArrayLike = Object.defineProperty({}, 'length', { + get: function () { + throw isCallableMarker; + } + }); + isCallableMarker = {}; + // eslint-disable-next-line no-throw-literal + reflectApply(function () { throw 42; }, null, badArrayLike); + } catch (_) { + if (_ !== isCallableMarker) { + reflectApply = null; + } + } +} else { + reflectApply = null; +} + +var constructorRegex = /^\s*class\b/; +var isES6ClassFn = function isES6ClassFunction(value) { + try { + var fnStr = fnToStr.call(value); + return constructorRegex.test(fnStr); + } catch (e) { + return false; // not a function + } +}; + +var tryFunctionObject = function tryFunctionToStr(value) { + try { + if (isES6ClassFn(value)) { return false; } + fnToStr.call(value); + return true; + } catch (e) { + return false; + } +}; +var toStr = Object.prototype.toString; +var objectClass = '[object Object]'; +var fnClass = '[object Function]'; +var genClass = '[object GeneratorFunction]'; +var ddaClass = '[object HTMLAllCollection]'; // IE 11 +var ddaClass2 = '[object HTML document.all class]'; +var ddaClass3 = '[object HTMLCollection]'; // IE 9-10 +var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag` + +var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing + +var isDDA = function isDocumentDotAll() { return false; }; +if (typeof document === 'object') { + // Firefox 3 canonicalizes DDA to undefined when it's not accessed directly + var all = document.all; + if (toStr.call(all) === toStr.call(document.all)) { + isDDA = function isDocumentDotAll(value) { + /* globals document: false */ + // in IE 6-8, typeof document.all is "object" and it's truthy + if ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) { + try { + var str = toStr.call(value); + return ( + str === ddaClass + || str === ddaClass2 + || str === ddaClass3 // opera 12.16 + || str === objectClass // IE 6-8 + ) && value('') == null; // eslint-disable-line eqeqeq + } catch (e) { /**/ } + } + return false; + }; + } +} + +module.exports = reflectApply + ? function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + try { + reflectApply(value, null, badArrayLike); + } catch (e) { + if (e !== isCallableMarker) { return false; } + } + return !isES6ClassFn(value) && tryFunctionObject(value); + } + : function isCallable(value) { + if (isDDA(value)) { return true; } + if (!value) { return false; } + if (typeof value !== 'function' && typeof value !== 'object') { return false; } + if (hasToStringTag) { return tryFunctionObject(value); } + if (isES6ClassFn(value)) { return false; } + var strClass = toStr.call(value); + if (strClass !== fnClass && strClass !== genClass && !(/^\[object HTML/).test(strClass)) { return false; } + return tryFunctionObject(value); + }; + + +/***/ }), + +/***/ 8923: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var getDay = Date.prototype.getDay; +var tryDateObject = function tryDateGetDayCall(value) { + try { + getDay.call(value); + return true; + } catch (e) { + return false; + } +}; + +var toStr = Object.prototype.toString; +var dateClass = '[object Date]'; +var hasToStringTag = __webpack_require__(6410)(); + +module.exports = function isDateObject(value) { + if (typeof value !== 'object' || value === null) { + return false; + } + return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; +}; + + +/***/ }), + +/***/ 8662: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var toStr = Object.prototype.toString; +var fnToStr = Function.prototype.toString; +var isFnRegex = /^\s*(?:function)?\*/; +var hasToStringTag = __webpack_require__(6410)(); +var getProto = Object.getPrototypeOf; +var getGeneratorFunc = function () { // eslint-disable-line consistent-return + if (!hasToStringTag) { + return false; + } + try { + return Function('return function*() {}')(); + } catch (e) { + } +}; +var GeneratorFunction; + +module.exports = function isGeneratorFunction(fn) { + if (typeof fn !== 'function') { + return false; + } + if (isFnRegex.test(fnToStr.call(fn))) { + return true; + } + if (!hasToStringTag) { + var str = toStr.call(fn); + return str === '[object GeneratorFunction]'; + } + if (!getProto) { + return false; + } + if (typeof GeneratorFunction === 'undefined') { + var generatorFunc = getGeneratorFunc(); + GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false; + } + return getProto(fn) === GeneratorFunction; +}; + + +/***/ }), + +/***/ 8611: +/***/ (function(module) { + +"use strict"; + + +/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */ + +module.exports = function isNaN(value) { + return value !== value; +}; + + +/***/ }), + +/***/ 360: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBind = __webpack_require__(5559); +var define = __webpack_require__(4289); + +var implementation = __webpack_require__(8611); +var getPolyfill = __webpack_require__(9415); +var shim = __webpack_require__(6743); + +var polyfill = callBind(getPolyfill(), Number); + +/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */ + +define(polyfill, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = polyfill; + + +/***/ }), + +/***/ 9415: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(8611); + +module.exports = function getPolyfill() { + if (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) { + return Number.isNaN; + } + return implementation; +}; + + +/***/ }), + +/***/ 6743: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(4289); +var getPolyfill = __webpack_require__(9415); + +/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */ + +module.exports = function shimNumberIsNaN() { + var polyfill = getPolyfill(); + define(Number, { isNaN: polyfill }, { + isNaN: function testIsNaN() { + return Number.isNaN !== polyfill; + } + }); + return polyfill; +}; + + +/***/ }), + +/***/ 8420: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var callBound = __webpack_require__(1924); +var hasToStringTag = __webpack_require__(6410)(); +var has; +var $exec; +var isRegexMarker; +var badStringifier; + +if (hasToStringTag) { + has = callBound('Object.prototype.hasOwnProperty'); + $exec = callBound('RegExp.prototype.exec'); + isRegexMarker = {}; + + var throwRegexMarker = function () { + throw isRegexMarker; + }; + badStringifier = { + toString: throwRegexMarker, + valueOf: throwRegexMarker + }; + + if (typeof Symbol.toPrimitive === 'symbol') { + badStringifier[Symbol.toPrimitive] = throwRegexMarker; + } +} + +var $toString = callBound('Object.prototype.toString'); +var gOPD = Object.getOwnPropertyDescriptor; +var regexClass = '[object RegExp]'; + +module.exports = hasToStringTag + // eslint-disable-next-line consistent-return + ? function isRegex(value) { + if (!value || typeof value !== 'object') { + return false; + } + + var descriptor = gOPD(value, 'lastIndex'); + var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); + if (!hasLastIndexDataProperty) { + return false; + } + + try { + $exec(value, badStringifier); + } catch (e) { + return e === isRegexMarker; + } + } + : function isRegex(value) { + // In older browsers, typeof regex incorrectly returns 'function' + if (!value || (typeof value !== 'object' && typeof value !== 'function')) { + return false; + } + + return $toString(value) === regexClass; + }; + + +/***/ }), + +/***/ 5692: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var forEach = __webpack_require__(4029); +var availableTypedArrays = __webpack_require__(3083); +var callBound = __webpack_require__(1924); + +var $toString = callBound('Object.prototype.toString'); +var hasToStringTag = __webpack_require__(6410)(); +var gOPD = __webpack_require__(7296); + +var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis; +var typedArrays = availableTypedArrays(); + +var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { + for (var i = 0; i < array.length; i += 1) { + if (array[i] === value) { + return i; + } + } + return -1; +}; +var $slice = callBound('String.prototype.slice'); +var toStrTags = {}; +var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); +if (hasToStringTag && gOPD && getPrototypeOf) { + forEach(typedArrays, function (typedArray) { + var arr = new g[typedArray](); + if (Symbol.toStringTag in arr) { + var proto = getPrototypeOf(arr); + var descriptor = gOPD(proto, Symbol.toStringTag); + if (!descriptor) { + var superProto = getPrototypeOf(proto); + descriptor = gOPD(superProto, Symbol.toStringTag); + } + toStrTags[typedArray] = descriptor.get; + } + }); +} + +var tryTypedArrays = function tryAllTypedArrays(value) { + var anyTrue = false; + forEach(toStrTags, function (getter, typedArray) { + if (!anyTrue) { + try { + anyTrue = getter.call(value) === typedArray; + } catch (e) { /**/ } + } + }); + return anyTrue; +}; + +module.exports = function isTypedArray(value) { + if (!value || typeof value !== 'object') { return false; } + if (!hasToStringTag || !(Symbol.toStringTag in value)) { + var tag = $slice($toString(value), 8, -1); + return $indexOf(typedArrays, tag) > -1; + } + if (!gOPD) { return false; } + return tryTypedArrays(value); +}; + + +/***/ }), + +/***/ 4244: +/***/ (function(module) { + +"use strict"; + + +var numberIsNaN = function (value) { + return value !== value; +}; + +module.exports = function is(a, b) { + if (a === 0 && b === 0) { + return 1 / a === 1 / b; + } + if (a === b) { + return true; + } + if (numberIsNaN(a) && numberIsNaN(b)) { + return true; + } + return false; +}; + + + +/***/ }), + +/***/ 609: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(4289); +var callBind = __webpack_require__(5559); + +var implementation = __webpack_require__(4244); +var getPolyfill = __webpack_require__(5624); +var shim = __webpack_require__(2281); + +var polyfill = callBind(getPolyfill(), Object); + +define(polyfill, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = polyfill; + + +/***/ }), + +/***/ 5624: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(4244); + +module.exports = function getPolyfill() { + return typeof Object.is === 'function' ? Object.is : implementation; +}; + + +/***/ }), + +/***/ 2281: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var getPolyfill = __webpack_require__(5624); +var define = __webpack_require__(4289); + +module.exports = function shimObjectIs() { + var polyfill = getPolyfill(); + define(Object, { is: polyfill }, { + is: function testObjectIs() { + return Object.is !== polyfill; + } + }); + return polyfill; +}; + + +/***/ }), + +/***/ 8987: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var keysShim; +if (!Object.keys) { + // modified from https://github.com/es-shims/es5-shim + var has = Object.prototype.hasOwnProperty; + var toStr = Object.prototype.toString; + var isArgs = __webpack_require__(1414); // eslint-disable-line global-require + var isEnumerable = Object.prototype.propertyIsEnumerable; + var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); + var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); + var dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ]; + var equalsConstructorPrototype = function (o) { + var ctor = o.constructor; + return ctor && ctor.prototype === o; + }; + var excludedKeys = { + $applicationCache: true, + $console: true, + $external: true, + $frame: true, + $frameElement: true, + $frames: true, + $innerHeight: true, + $innerWidth: true, + $onmozfullscreenchange: true, + $onmozfullscreenerror: true, + $outerHeight: true, + $outerWidth: true, + $pageXOffset: true, + $pageYOffset: true, + $parent: true, + $scrollLeft: true, + $scrollTop: true, + $scrollX: true, + $scrollY: true, + $self: true, + $webkitIndexedDB: true, + $webkitStorageInfo: true, + $window: true + }; + var hasAutomationEqualityBug = (function () { + /* global window */ + if (typeof window === 'undefined') { return false; } + for (var k in window) { + try { + if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { + try { + equalsConstructorPrototype(window[k]); + } catch (e) { + return true; + } + } + } catch (e) { + return true; + } + } + return false; + }()); + var equalsConstructorPrototypeIfNotBuggy = function (o) { + /* global window */ + if (typeof window === 'undefined' || !hasAutomationEqualityBug) { + return equalsConstructorPrototype(o); + } + try { + return equalsConstructorPrototype(o); + } catch (e) { + return false; + } + }; + + keysShim = function keys(object) { + var isObject = object !== null && typeof object === 'object'; + var isFunction = toStr.call(object) === '[object Function]'; + var isArguments = isArgs(object); + var isString = isObject && toStr.call(object) === '[object String]'; + var theKeys = []; + + if (!isObject && !isFunction && !isArguments) { + throw new TypeError('Object.keys called on a non-object'); + } + + var skipProto = hasProtoEnumBug && isFunction; + if (isString && object.length > 0 && !has.call(object, 0)) { + for (var i = 0; i < object.length; ++i) { + theKeys.push(String(i)); + } + } + + if (isArguments && object.length > 0) { + for (var j = 0; j < object.length; ++j) { + theKeys.push(String(j)); + } + } else { + for (var name in object) { + if (!(skipProto && name === 'prototype') && has.call(object, name)) { + theKeys.push(String(name)); + } + } + } + + if (hasDontEnumBug) { + var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); + + for (var k = 0; k < dontEnums.length; ++k) { + if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { + theKeys.push(dontEnums[k]); + } + } + } + return theKeys; + }; +} +module.exports = keysShim; + + +/***/ }), + +/***/ 2215: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var slice = Array.prototype.slice; +var isArgs = __webpack_require__(1414); + +var origKeys = Object.keys; +var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8987); + +var originalKeys = Object.keys; + +keysShim.shim = function shimObjectKeys() { + if (Object.keys) { + var keysWorksWithArguments = (function () { + // Safari 5.0 bug + var args = Object.keys(arguments); + return args && args.length === arguments.length; + }(1, 2)); + if (!keysWorksWithArguments) { + Object.keys = function keys(object) { // eslint-disable-line func-name-matching + if (isArgs(object)) { + return originalKeys(slice.call(object)); + } + return originalKeys(object); + }; + } + } else { + Object.keys = keysShim; + } + return Object.keys || keysShim; +}; + +module.exports = keysShim; + + +/***/ }), + +/***/ 1414: +/***/ (function(module) { + +"use strict"; + + +var toStr = Object.prototype.toString; + +module.exports = function isArguments(value) { + var str = toStr.call(value); + var isArgs = str === '[object Arguments]'; + if (!isArgs) { + isArgs = str !== '[object Array]' && + value !== null && + typeof value === 'object' && + typeof value.length === 'number' && + value.length >= 0 && + toStr.call(value.callee) === '[object Function]'; + } + return isArgs; +}; + + +/***/ }), + +/***/ 4236: +/***/ (function(__unused_webpack_module, exports) { + +"use strict"; + + + +var TYPED_OK = (typeof Uint8Array !== 'undefined') && + (typeof Uint16Array !== 'undefined') && + (typeof Int32Array !== 'undefined'); + +function _has(obj, key) { + return Object.prototype.hasOwnProperty.call(obj, key); +} + +exports.assign = function (obj /*from1, from2, from3, ...*/) { + var sources = Array.prototype.slice.call(arguments, 1); + while (sources.length) { + var source = sources.shift(); + if (!source) { continue; } + + if (typeof source !== 'object') { + throw new TypeError(source + 'must be non-object'); + } + + for (var p in source) { + if (_has(source, p)) { + obj[p] = source[p]; + } + } + } + + return obj; +}; + + +// reduce buffer size, avoiding mem copy +exports.shrinkBuf = function (buf, size) { + if (buf.length === size) { return buf; } + if (buf.subarray) { return buf.subarray(0, size); } + buf.length = size; + return buf; +}; + + +var fnTyped = { + arraySet: function (dest, src, src_offs, len, dest_offs) { + if (src.subarray && dest.subarray) { + dest.set(src.subarray(src_offs, src_offs + len), dest_offs); + return; + } + // Fallback to ordinary array + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function (chunks) { + var i, l, len, pos, chunk, result; + + // calculate data length + len = 0; + for (i = 0, l = chunks.length; i < l; i++) { + len += chunks[i].length; + } + + // join chunks + result = new Uint8Array(len); + pos = 0; + for (i = 0, l = chunks.length; i < l; i++) { + chunk = chunks[i]; + result.set(chunk, pos); + pos += chunk.length; + } + + return result; + } +}; + +var fnUntyped = { + arraySet: function (dest, src, src_offs, len, dest_offs) { + for (var i = 0; i < len; i++) { + dest[dest_offs + i] = src[src_offs + i]; + } + }, + // Join array of chunks to single array. + flattenChunks: function (chunks) { + return [].concat.apply([], chunks); + } +}; + + +// Enable/Disable typed arrays use, for testing +// +exports.setTyped = function (on) { + if (on) { + exports.Buf8 = Uint8Array; + exports.Buf16 = Uint16Array; + exports.Buf32 = Int32Array; + exports.assign(exports, fnTyped); + } else { + exports.Buf8 = Array; + exports.Buf16 = Array; + exports.Buf32 = Array; + exports.assign(exports, fnUntyped); + } +}; + +exports.setTyped(TYPED_OK); + + +/***/ }), + +/***/ 6069: +/***/ (function(module) { + +"use strict"; + + +// Note: adler32 takes 12% for level 0 and 2% for level 6. +// It isn't worth it to make additional optimizations as in original. +// Small size is preferable. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function adler32(adler, buf, len, pos) { + var s1 = (adler & 0xffff) |0, + s2 = ((adler >>> 16) & 0xffff) |0, + n = 0; + + while (len !== 0) { + // Set limit ~ twice less than 5552, to keep + // s2 in 31-bits, because we force signed ints. + // in other case %= will fail. + n = len > 2000 ? 2000 : len; + len -= n; + + do { + s1 = (s1 + buf[pos++]) |0; + s2 = (s2 + s1) |0; + } while (--n); + + s1 %= 65521; + s2 %= 65521; + } + + return (s1 | (s2 << 16)) |0; +} + + +module.exports = adler32; + + +/***/ }), + +/***/ 1619: +/***/ (function(module) { + +"use strict"; + + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + + /* Allowed flush values; see deflate() and inflate() below for details */ + Z_NO_FLUSH: 0, + Z_PARTIAL_FLUSH: 1, + Z_SYNC_FLUSH: 2, + Z_FULL_FLUSH: 3, + Z_FINISH: 4, + Z_BLOCK: 5, + Z_TREES: 6, + + /* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ + Z_OK: 0, + Z_STREAM_END: 1, + Z_NEED_DICT: 2, + Z_ERRNO: -1, + Z_STREAM_ERROR: -2, + Z_DATA_ERROR: -3, + //Z_MEM_ERROR: -4, + Z_BUF_ERROR: -5, + //Z_VERSION_ERROR: -6, + + /* compression levels */ + Z_NO_COMPRESSION: 0, + Z_BEST_SPEED: 1, + Z_BEST_COMPRESSION: 9, + Z_DEFAULT_COMPRESSION: -1, + + + Z_FILTERED: 1, + Z_HUFFMAN_ONLY: 2, + Z_RLE: 3, + Z_FIXED: 4, + Z_DEFAULT_STRATEGY: 0, + + /* Possible values of the data_type field (though see inflate()) */ + Z_BINARY: 0, + Z_TEXT: 1, + //Z_ASCII: 1, // = Z_TEXT (deprecated) + Z_UNKNOWN: 2, + + /* The deflate compression method */ + Z_DEFLATED: 8 + //Z_NULL: null // Use -1 or null inline, depending on var type +}; + + +/***/ }), + +/***/ 2869: +/***/ (function(module) { + +"use strict"; + + +// Note: we can't get significant speed boost here. +// So write code to minimize size - no pregenerated tables +// and array tools dependencies. + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// Use ordinary array, since untyped makes no boost here +function makeTable() { + var c, table = []; + + for (var n = 0; n < 256; n++) { + c = n; + for (var k = 0; k < 8; k++) { + c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); + } + table[n] = c; + } + + return table; +} + +// Create table on load. Just 255 signed longs. Not a problem. +var crcTable = makeTable(); + + +function crc32(crc, buf, len, pos) { + var t = crcTable, + end = pos + len; + + crc ^= -1; + + for (var i = pos; i < end; i++) { + crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; + } + + return (crc ^ (-1)); // >>> 0; +} + + +module.exports = crc32; + + +/***/ }), + +/***/ 405: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = __webpack_require__(4236); +var trees = __webpack_require__(342); +var adler32 = __webpack_require__(6069); +var crc32 = __webpack_require__(2869); +var msg = __webpack_require__(8898); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +var Z_NO_FLUSH = 0; +var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +//var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +//var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +//var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + + +/* compression levels */ +//var Z_NO_COMPRESSION = 0; +//var Z_BEST_SPEED = 1; +//var Z_BEST_COMPRESSION = 9; +var Z_DEFAULT_COMPRESSION = -1; + + +var Z_FILTERED = 1; +var Z_HUFFMAN_ONLY = 2; +var Z_RLE = 3; +var Z_FIXED = 4; +var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +//var Z_BINARY = 0; +//var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + + +/* The deflate compression method */ +var Z_DEFLATED = 8; + +/*============================================================================*/ + + +var MAX_MEM_LEVEL = 9; +/* Maximum value for memLevel in deflateInit2 */ +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_MEM_LEVEL = 8; + + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ +var LITERALS = 256; +/* number of literal bytes 0..255 */ +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ +var D_CODES = 30; +/* number of distance codes */ +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); + +var PRESET_DICT = 0x20; + +var INIT_STATE = 42; +var EXTRA_STATE = 69; +var NAME_STATE = 73; +var COMMENT_STATE = 91; +var HCRC_STATE = 103; +var BUSY_STATE = 113; +var FINISH_STATE = 666; + +var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ +var BS_BLOCK_DONE = 2; /* block flush performed */ +var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ +var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ + +var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. + +function err(strm, errorCode) { + strm.msg = msg[errorCode]; + return errorCode; +} + +function rank(f) { + return ((f) << 1) - ((f) > 4 ? 9 : 0); +} + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + + +/* ========================================================================= + * Flush as much pending output as possible. All deflate() output goes + * through this function so some applications may wish to modify it + * to avoid allocating a large strm->output buffer and copying into it. + * (See also read_buf()). + */ +function flush_pending(strm) { + var s = strm.state; + + //_tr_flush_bits(s); + var len = s.pending; + if (len > strm.avail_out) { + len = strm.avail_out; + } + if (len === 0) { return; } + + utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); + strm.next_out += len; + s.pending_out += len; + strm.total_out += len; + strm.avail_out -= len; + s.pending -= len; + if (s.pending === 0) { + s.pending_out = 0; + } +} + + +function flush_block_only(s, last) { + trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); + s.block_start = s.strstart; + flush_pending(s.strm); +} + + +function put_byte(s, b) { + s.pending_buf[s.pending++] = b; +} + + +/* ========================================================================= + * Put a short in the pending buffer. The 16-bit value is put in MSB order. + * IN assertion: the stream state is correct and there is enough room in + * pending_buf. + */ +function putShortMSB(s, b) { +// put_byte(s, (Byte)(b >> 8)); +// put_byte(s, (Byte)(b & 0xff)); + s.pending_buf[s.pending++] = (b >>> 8) & 0xff; + s.pending_buf[s.pending++] = b & 0xff; +} + + +/* =========================================================================== + * Read a new buffer from the current input stream, update the adler32 + * and total number of bytes read. All deflate() input goes through + * this function so some applications may wish to modify it to avoid + * allocating a large strm->input buffer and copying from it. + * (See also flush_pending()). + */ +function read_buf(strm, buf, start, size) { + var len = strm.avail_in; + + if (len > size) { len = size; } + if (len === 0) { return 0; } + + strm.avail_in -= len; + + // zmemcpy(buf, strm->next_in, len); + utils.arraySet(buf, strm.input, strm.next_in, len, start); + if (strm.state.wrap === 1) { + strm.adler = adler32(strm.adler, buf, len, start); + } + + else if (strm.state.wrap === 2) { + strm.adler = crc32(strm.adler, buf, len, start); + } + + strm.next_in += len; + strm.total_in += len; + + return len; +} + + +/* =========================================================================== + * Set match_start to the longest match starting at the given string and + * return its length. Matches shorter or equal to prev_length are discarded, + * in which case the result is equal to prev_length and match_start is + * garbage. + * IN assertions: cur_match is the head of the hash chain for the current + * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 + * OUT assertion: the match length is not greater than s->lookahead. + */ +function longest_match(s, cur_match) { + var chain_length = s.max_chain_length; /* max hash chain length */ + var scan = s.strstart; /* current string */ + var match; /* matched string */ + var len; /* length of current match */ + var best_len = s.prev_length; /* best match length so far */ + var nice_match = s.nice_match; /* stop if match long enough */ + var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? + s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; + + var _win = s.window; // shortcut + + var wmask = s.w_mask; + var prev = s.prev; + + /* Stop when cur_match becomes <= limit. To simplify the code, + * we prevent matches with the string of window index 0. + */ + + var strend = s.strstart + MAX_MATCH; + var scan_end1 = _win[scan + best_len - 1]; + var scan_end = _win[scan + best_len]; + + /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. + * It is easy to get rid of this optimization if necessary. + */ + // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); + + /* Do not waste too much time if we already have a good match: */ + if (s.prev_length >= s.good_match) { + chain_length >>= 2; + } + /* Do not look for matches beyond the end of the input. This is necessary + * to make deflate deterministic. + */ + if (nice_match > s.lookahead) { nice_match = s.lookahead; } + + // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + + do { + // Assert(cur_match < s->strstart, "no future"); + match = cur_match; + + /* Skip to next match if the match length cannot increase + * or if the match length is less than 2. Note that the checks below + * for insufficient lookahead only occur occasionally for performance + * reasons. Therefore uninitialized memory will be accessed, and + * conditional jumps will be made that depend on those values. + * However the length of the match is limited to the lookahead, so + * the output of deflate is not affected by the uninitialized values. + */ + + if (_win[match + best_len] !== scan_end || + _win[match + best_len - 1] !== scan_end1 || + _win[match] !== _win[scan] || + _win[++match] !== _win[scan + 1]) { + continue; + } + + /* The check at best_len-1 can be removed because it will be made + * again later. (This heuristic is not always a win.) + * It is not necessary to compare scan[2] and match[2] since they + * are always equal when the other bytes match, given that + * the hash keys are equal and that HASH_BITS >= 8. + */ + scan += 2; + match++; + // Assert(*scan == *match, "match[2]?"); + + /* We check for insufficient lookahead only every 8th comparison; + * the 256th check will be made at strstart+258. + */ + do { + /*jshint noempty:false*/ + } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && + scan < strend); + + // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + + len = MAX_MATCH - (strend - scan); + scan = strend - MAX_MATCH; + + if (len > best_len) { + s.match_start = cur_match; + best_len = len; + if (len >= nice_match) { + break; + } + scan_end1 = _win[scan + best_len - 1]; + scan_end = _win[scan + best_len]; + } + } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); + + if (best_len <= s.lookahead) { + return best_len; + } + return s.lookahead; +} + + +/* =========================================================================== + * Fill the window when the lookahead becomes insufficient. + * Updates strstart and lookahead. + * + * IN assertion: lookahead < MIN_LOOKAHEAD + * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD + * At least one byte has been read, or avail_in == 0; reads are + * performed for at least two bytes (required for the zip translate_eol + * option -- not supported here). + */ +function fill_window(s) { + var _w_size = s.w_size; + var p, n, m, more, str; + + //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); + + do { + more = s.window_size - s.lookahead - s.strstart; + + // JS ints have 32 bit, block below not needed + /* Deal with !@#$% 64K limit: */ + //if (sizeof(int) <= 2) { + // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { + // more = wsize; + // + // } else if (more == (unsigned)(-1)) { + // /* Very unlikely, but possible on 16 bit machine if + // * strstart == 0 && lookahead == 1 (input done a byte at time) + // */ + // more--; + // } + //} + + + /* If the window is almost full and there is insufficient lookahead, + * move the upper half to the lower one to make room in the upper half. + */ + if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { + + utils.arraySet(s.window, s.window, _w_size, _w_size, 0); + s.match_start -= _w_size; + s.strstart -= _w_size; + /* we now have strstart >= MAX_DIST */ + s.block_start -= _w_size; + + /* Slide the hash table (could be avoided with 32 bit values + at the expense of memory usage). We slide even when level == 0 + to keep the hash table consistent if we switch back to level > 0 + later. (Using level 0 permanently is not an optimal usage of + zlib, so we don't care about this pathological case.) + */ + + n = s.hash_size; + p = n; + do { + m = s.head[--p]; + s.head[p] = (m >= _w_size ? m - _w_size : 0); + } while (--n); + + n = _w_size; + p = n; + do { + m = s.prev[--p]; + s.prev[p] = (m >= _w_size ? m - _w_size : 0); + /* If n is not on any hash chain, prev[n] is garbage but + * its value will never be used. + */ + } while (--n); + + more += _w_size; + } + if (s.strm.avail_in === 0) { + break; + } + + /* If there was no sliding: + * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && + * more == window_size - lookahead - strstart + * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) + * => more >= window_size - 2*WSIZE + 2 + * In the BIG_MEM or MMAP case (not yet supported), + * window_size == input_size + MIN_LOOKAHEAD && + * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. + * Otherwise, window_size == 2*WSIZE so more >= 2. + * If there was sliding, more >= WSIZE. So in all cases, more >= 2. + */ + //Assert(more >= 2, "more < 2"); + n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); + s.lookahead += n; + + /* Initialize the hash value now that we have some input: */ + if (s.lookahead + s.insert >= MIN_MATCH) { + str = s.strstart - s.insert; + s.ins_h = s.window[str]; + + /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; +//#if MIN_MATCH != 3 +// Call update_hash() MIN_MATCH-3 more times +//#endif + while (s.insert) { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = str; + str++; + s.insert--; + if (s.lookahead + s.insert < MIN_MATCH) { + break; + } + } + } + /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, + * but this is not important since only literal bytes will be emitted. + */ + + } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); + + /* If the WIN_INIT bytes after the end of the current data have never been + * written, then zero those bytes in order to avoid memory check reports of + * the use of uninitialized (or uninitialised as Julian writes) bytes by + * the longest match routines. Update the high water mark for the next + * time through here. WIN_INIT is set to MAX_MATCH since the longest match + * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. + */ +// if (s.high_water < s.window_size) { +// var curr = s.strstart + s.lookahead; +// var init = 0; +// +// if (s.high_water < curr) { +// /* Previous high water mark below current data -- zero WIN_INIT +// * bytes or up to end of window, whichever is less. +// */ +// init = s.window_size - curr; +// if (init > WIN_INIT) +// init = WIN_INIT; +// zmemzero(s->window + curr, (unsigned)init); +// s->high_water = curr + init; +// } +// else if (s->high_water < (ulg)curr + WIN_INIT) { +// /* High water mark at or above current data, but below current data +// * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up +// * to end of window, whichever is less. +// */ +// init = (ulg)curr + WIN_INIT - s->high_water; +// if (init > s->window_size - s->high_water) +// init = s->window_size - s->high_water; +// zmemzero(s->window + s->high_water, (unsigned)init); +// s->high_water += init; +// } +// } +// +// Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, +// "not enough room for search"); +} + +/* =========================================================================== + * Copy without compression as much as possible from the input stream, return + * the current block state. + * This function does not insert new strings in the dictionary since + * uncompressible data is probably not useful. This function is used + * only for the level=0 compression option. + * NOTE: this function should be optimized to avoid extra copying from + * window to pending_buf. + */ +function deflate_stored(s, flush) { + /* Stored blocks are limited to 0xffff bytes, pending_buf is limited + * to pending_buf_size, and each stored block has a 5 byte header: + */ + var max_block_size = 0xffff; + + if (max_block_size > s.pending_buf_size - 5) { + max_block_size = s.pending_buf_size - 5; + } + + /* Copy as much as possible from input to output: */ + for (;;) { + /* Fill the window as much as possible: */ + if (s.lookahead <= 1) { + + //Assert(s->strstart < s->w_size+MAX_DIST(s) || + // s->block_start >= (long)s->w_size, "slide too late"); +// if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || +// s.block_start >= s.w_size)) { +// throw new Error("slide too late"); +// } + + fill_window(s); + if (s.lookahead === 0 && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + + if (s.lookahead === 0) { + break; + } + /* flush the current block */ + } + //Assert(s->block_start >= 0L, "block gone"); +// if (s.block_start < 0) throw new Error("block gone"); + + s.strstart += s.lookahead; + s.lookahead = 0; + + /* Emit a stored block if pending_buf will be full: */ + var max_start = s.block_start + max_block_size; + + if (s.strstart === 0 || s.strstart >= max_start) { + /* strstart == 0 is possible when wraparound on 16-bit machine */ + s.lookahead = s.strstart - max_start; + s.strstart = max_start; + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + + + } + /* Flush if we may have to slide, otherwise block_start may become + * negative and the data will be gone: + */ + if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + + s.insert = 0; + + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + + if (s.strstart > s.block_start) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_NEED_MORE; +} + +/* =========================================================================== + * Compress as much as possible from the input stream, return the current + * block state. + * This function does not perform lazy evaluation of matches and inserts + * new strings in the dictionary only for unmatched strings or for short + * matches. It is used only for the fast compression options. + */ +function deflate_fast(s, flush) { + var hash_head; /* head of the hash chain */ + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { + break; /* flush the current block */ + } + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + * At this point we have always match_length < MIN_MATCH + */ + if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + } + if (s.match_length >= MIN_MATCH) { + // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only + + /*** _tr_tally_dist(s, s.strstart - s.match_start, + s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + + /* Insert new strings in the hash table only if the match length + * is not too large. This saves time but degrades compression. + */ + if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { + s.match_length--; /* string at strstart already in table */ + do { + s.strstart++; + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + /* strstart never exceeds WSIZE-MAX_MATCH, so there are + * always MIN_MATCH bytes ahead. + */ + } while (--s.match_length !== 0); + s.strstart++; + } else + { + s.strstart += s.match_length; + s.match_length = 0; + s.ins_h = s.window[s.strstart]; + /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; + +//#if MIN_MATCH != 3 +// Call UPDATE_HASH() MIN_MATCH-3 more times +//#endif + /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not + * matter since it will be recomputed at next deflate call. + */ + } + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s.window[s.strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * Same as above, but achieves better compression. We use a lazy + * evaluation for matches: a match is finally adopted only if there is + * no better match at the next window position. + */ +function deflate_slow(s, flush) { + var hash_head; /* head of hash chain */ + var bflush; /* set if current block must be flushed */ + + var max_insert; + + /* Process the input block. */ + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the next match, plus MIN_MATCH bytes to insert the + * string following the next match. + */ + if (s.lookahead < MIN_LOOKAHEAD) { + fill_window(s); + if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* Insert the string window[strstart .. strstart+2] in the + * dictionary, and set hash_head to the head of the hash chain: + */ + hash_head = 0/*NIL*/; + if (s.lookahead >= MIN_MATCH) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + + /* Find the longest match, discarding those <= prev_length. + */ + s.prev_length = s.match_length; + s.prev_match = s.match_start; + s.match_length = MIN_MATCH - 1; + + if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && + s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { + /* To simplify the code, we prevent matches with the string + * of window index 0 (in particular we have to avoid a match + * of the string with itself at the start of the input file). + */ + s.match_length = longest_match(s, hash_head); + /* longest_match() sets match_start */ + + if (s.match_length <= 5 && + (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { + + /* If prev_match is also MIN_MATCH, match_start is garbage + * but we will ignore the current match anyway. + */ + s.match_length = MIN_MATCH - 1; + } + } + /* If there was a match at the previous step and the current + * match is not better, output the previous match: + */ + if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { + max_insert = s.strstart + s.lookahead - MIN_MATCH; + /* Do not insert strings in hash table beyond this. */ + + //check_match(s, s.strstart-1, s.prev_match, s.prev_length); + + /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, + s.prev_length - MIN_MATCH, bflush);***/ + bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); + /* Insert in hash table all strings up to the end of the match. + * strstart-1 and strstart are already inserted. If there is not + * enough lookahead, the last two strings are not inserted in + * the hash table. + */ + s.lookahead -= s.prev_length - 1; + s.prev_length -= 2; + do { + if (++s.strstart <= max_insert) { + /*** INSERT_STRING(s, s.strstart, hash_head); ***/ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; + hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; + s.head[s.ins_h] = s.strstart; + /***/ + } + } while (--s.prev_length !== 0); + s.match_available = 0; + s.match_length = MIN_MATCH - 1; + s.strstart++; + + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + } else if (s.match_available) { + /* If there was no match at the previous position, output a + * single literal. If there was a match but the current match + * is longer, truncate the previous match to a single literal. + */ + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + if (bflush) { + /*** FLUSH_BLOCK_ONLY(s, 0) ***/ + flush_block_only(s, false); + /***/ + } + s.strstart++; + s.lookahead--; + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + } else { + /* There is no previous match to compare with, wait for + * the next step to decide. + */ + s.match_available = 1; + s.strstart++; + s.lookahead--; + } + } + //Assert (flush != Z_NO_FLUSH, "no flush?"); + if (s.match_available) { + //Tracevv((stderr,"%c", s->window[s->strstart-1])); + /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); + + s.match_available = 0; + } + s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + + return BS_BLOCK_DONE; +} + + +/* =========================================================================== + * For Z_RLE, simply look for runs of bytes, generate matches only of distance + * one. Do not maintain a hash table. (It will be regenerated if this run of + * deflate switches away from Z_RLE.) + */ +function deflate_rle(s, flush) { + var bflush; /* set if current block must be flushed */ + var prev; /* byte at distance one to match */ + var scan, strend; /* scan goes up to strend for length of run */ + + var _win = s.window; + + for (;;) { + /* Make sure that we always have enough lookahead, except + * at the end of the input file. We need MAX_MATCH bytes + * for the longest run, plus one for the unrolled loop. + */ + if (s.lookahead <= MAX_MATCH) { + fill_window(s); + if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + if (s.lookahead === 0) { break; } /* flush the current block */ + } + + /* See how many times the previous byte repeats */ + s.match_length = 0; + if (s.lookahead >= MIN_MATCH && s.strstart > 0) { + scan = s.strstart - 1; + prev = _win[scan]; + if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { + strend = s.strstart + MAX_MATCH; + do { + /*jshint noempty:false*/ + } while (prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + prev === _win[++scan] && prev === _win[++scan] && + scan < strend); + s.match_length = MAX_MATCH - (strend - scan); + if (s.match_length > s.lookahead) { + s.match_length = s.lookahead; + } + } + //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + } + + /* Emit match if have run of MIN_MATCH or longer, else emit literal */ + if (s.match_length >= MIN_MATCH) { + //check_match(s, s.strstart, s.strstart - 1, s.match_length); + + /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ + bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); + + s.lookahead -= s.match_length; + s.strstart += s.match_length; + s.match_length = 0; + } else { + /* No match, output a literal byte */ + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + + s.lookahead--; + s.strstart++; + } + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* =========================================================================== + * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. + * (It will be regenerated if this run of deflate switches away from Huffman.) + */ +function deflate_huff(s, flush) { + var bflush; /* set if current block must be flushed */ + + for (;;) { + /* Make sure that we have a literal to write. */ + if (s.lookahead === 0) { + fill_window(s); + if (s.lookahead === 0) { + if (flush === Z_NO_FLUSH) { + return BS_NEED_MORE; + } + break; /* flush the current block */ + } + } + + /* Output a literal byte */ + s.match_length = 0; + //Tracevv((stderr,"%c", s->window[s->strstart])); + /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ + bflush = trees._tr_tally(s, 0, s.window[s.strstart]); + s.lookahead--; + s.strstart++; + if (bflush) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + } + s.insert = 0; + if (flush === Z_FINISH) { + /*** FLUSH_BLOCK(s, 1); ***/ + flush_block_only(s, true); + if (s.strm.avail_out === 0) { + return BS_FINISH_STARTED; + } + /***/ + return BS_FINISH_DONE; + } + if (s.last_lit) { + /*** FLUSH_BLOCK(s, 0); ***/ + flush_block_only(s, false); + if (s.strm.avail_out === 0) { + return BS_NEED_MORE; + } + /***/ + } + return BS_BLOCK_DONE; +} + +/* Values for max_lazy_match, good_match and max_chain_length, depending on + * the desired pack level (0..9). The values given below have been tuned to + * exclude worst case performance for pathological files. Better values may be + * found for specific files. + */ +function Config(good_length, max_lazy, nice_length, max_chain, func) { + this.good_length = good_length; + this.max_lazy = max_lazy; + this.nice_length = nice_length; + this.max_chain = max_chain; + this.func = func; +} + +var configuration_table; + +configuration_table = [ + /* good lazy nice chain */ + new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ + new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ + new Config(4, 5, 16, 8, deflate_fast), /* 2 */ + new Config(4, 6, 32, 32, deflate_fast), /* 3 */ + + new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ + new Config(8, 16, 32, 32, deflate_slow), /* 5 */ + new Config(8, 16, 128, 128, deflate_slow), /* 6 */ + new Config(8, 32, 128, 256, deflate_slow), /* 7 */ + new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ + new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ +]; + + +/* =========================================================================== + * Initialize the "longest match" routines for a new zlib stream + */ +function lm_init(s) { + s.window_size = 2 * s.w_size; + + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + + /* Set the default configuration parameters: + */ + s.max_lazy_match = configuration_table[s.level].max_lazy; + s.good_match = configuration_table[s.level].good_length; + s.nice_match = configuration_table[s.level].nice_length; + s.max_chain_length = configuration_table[s.level].max_chain; + + s.strstart = 0; + s.block_start = 0; + s.lookahead = 0; + s.insert = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + s.ins_h = 0; +} + + +function DeflateState() { + this.strm = null; /* pointer back to this zlib stream */ + this.status = 0; /* as the name implies */ + this.pending_buf = null; /* output still pending */ + this.pending_buf_size = 0; /* size of pending_buf */ + this.pending_out = 0; /* next pending byte to output to the stream */ + this.pending = 0; /* nb of bytes in the pending buffer */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.gzhead = null; /* gzip header information to write */ + this.gzindex = 0; /* where in extra, name, or comment */ + this.method = Z_DEFLATED; /* can only be DEFLATED */ + this.last_flush = -1; /* value of flush param for previous deflate call */ + + this.w_size = 0; /* LZ77 window size (32K by default) */ + this.w_bits = 0; /* log2(w_size) (8..16) */ + this.w_mask = 0; /* w_size - 1 */ + + this.window = null; + /* Sliding window. Input bytes are read into the second half of the window, + * and move to the first half later to keep a dictionary of at least wSize + * bytes. With this organization, matches are limited to a distance of + * wSize-MAX_MATCH bytes, but this ensures that IO is always + * performed with a length multiple of the block size. + */ + + this.window_size = 0; + /* Actual size of window: 2*wSize, except when the user input buffer + * is directly used as sliding window. + */ + + this.prev = null; + /* Link to older string with same hash index. To limit the size of this + * array to 64K, this link is maintained only for the last 32K strings. + * An index in this array is thus a window index modulo 32K. + */ + + this.head = null; /* Heads of the hash chains or NIL. */ + + this.ins_h = 0; /* hash index of string to be inserted */ + this.hash_size = 0; /* number of elements in hash table */ + this.hash_bits = 0; /* log2(hash_size) */ + this.hash_mask = 0; /* hash_size-1 */ + + this.hash_shift = 0; + /* Number of bits by which ins_h must be shifted at each input + * step. It must be such that after MIN_MATCH steps, the oldest + * byte no longer takes part in the hash key, that is: + * hash_shift * MIN_MATCH >= hash_bits + */ + + this.block_start = 0; + /* Window position at the beginning of the current output block. Gets + * negative when the window is moved backwards. + */ + + this.match_length = 0; /* length of best match */ + this.prev_match = 0; /* previous match */ + this.match_available = 0; /* set if previous match exists */ + this.strstart = 0; /* start of string to insert */ + this.match_start = 0; /* start of matching string */ + this.lookahead = 0; /* number of valid bytes ahead in window */ + + this.prev_length = 0; + /* Length of the best match at previous step. Matches not greater than this + * are discarded. This is used in the lazy match evaluation. + */ + + this.max_chain_length = 0; + /* To speed up deflation, hash chains are never searched beyond this + * length. A higher limit improves compression ratio but degrades the + * speed. + */ + + this.max_lazy_match = 0; + /* Attempt to find a better match only when the current match is strictly + * smaller than this value. This mechanism is used only for compression + * levels >= 4. + */ + // That's alias to max_lazy_match, don't use directly + //this.max_insert_length = 0; + /* Insert new strings in the hash table only if the match length is not + * greater than this length. This saves time but degrades compression. + * max_insert_length is used only for compression levels <= 3. + */ + + this.level = 0; /* compression level (1..9) */ + this.strategy = 0; /* favor or force Huffman coding*/ + + this.good_match = 0; + /* Use a faster search when the previous match is longer than this */ + + this.nice_match = 0; /* Stop searching when current match exceeds this */ + + /* used by trees.c: */ + + /* Didn't use ct_data typedef below to suppress compiler warning */ + + // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ + // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ + // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ + + // Use flat array of DOUBLE size, with interleaved fata, + // because JS does not support effective + this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); + this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); + this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); + zero(this.dyn_ltree); + zero(this.dyn_dtree); + zero(this.bl_tree); + + this.l_desc = null; /* desc. for literal tree */ + this.d_desc = null; /* desc. for distance tree */ + this.bl_desc = null; /* desc. for bit length tree */ + + //ush bl_count[MAX_BITS+1]; + this.bl_count = new utils.Buf16(MAX_BITS + 1); + /* number of codes at each bit length for an optimal tree */ + + //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ + this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ + zero(this.heap); + + this.heap_len = 0; /* number of elements in the heap */ + this.heap_max = 0; /* element of largest frequency */ + /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. + * The same heap array is used to build all trees. + */ + + this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; + zero(this.depth); + /* Depth of each subtree used as tie breaker for trees of equal frequency + */ + + this.l_buf = 0; /* buffer index for literals or lengths */ + + this.lit_bufsize = 0; + /* Size of match buffer for literals/lengths. There are 4 reasons for + * limiting lit_bufsize to 64K: + * - frequencies can be kept in 16 bit counters + * - if compression is not successful for the first block, all input + * data is still in the window so we can still emit a stored block even + * when input comes from standard input. (This can also be done for + * all blocks if lit_bufsize is not greater than 32K.) + * - if compression is not successful for a file smaller than 64K, we can + * even emit a stored file instead of a stored block (saving 5 bytes). + * This is applicable only for zip (not gzip or zlib). + * - creating new Huffman trees less frequently may not provide fast + * adaptation to changes in the input data statistics. (Take for + * example a binary file with poorly compressible code followed by + * a highly compressible string table.) Smaller buffer sizes give + * fast adaptation but have of course the overhead of transmitting + * trees more frequently. + * - I can't count above 4 + */ + + this.last_lit = 0; /* running index in l_buf */ + + this.d_buf = 0; + /* Buffer index for distances. To simplify the code, d_buf and l_buf have + * the same number of elements. To use different lengths, an extra flag + * array would be necessary. + */ + + this.opt_len = 0; /* bit length of current block with optimal trees */ + this.static_len = 0; /* bit length of current block with static trees */ + this.matches = 0; /* number of string matches in current block */ + this.insert = 0; /* bytes at end of window left to insert */ + + + this.bi_buf = 0; + /* Output buffer. bits are inserted starting at the bottom (least + * significant bits). + */ + this.bi_valid = 0; + /* Number of valid bits in bi_buf. All bits above the last valid bit + * are always zero. + */ + + // Used for window memory init. We safely ignore it for JS. That makes + // sense only for pointers and memory check tools. + //this.high_water = 0; + /* High water mark offset in window for initialized bytes -- bytes above + * this are set to zero in order to avoid memory check warnings when + * longest match routines access bytes past the input. This is then + * updated to the new high water mark. + */ +} + + +function deflateResetKeep(strm) { + var s; + + if (!strm || !strm.state) { + return err(strm, Z_STREAM_ERROR); + } + + strm.total_in = strm.total_out = 0; + strm.data_type = Z_UNKNOWN; + + s = strm.state; + s.pending = 0; + s.pending_out = 0; + + if (s.wrap < 0) { + s.wrap = -s.wrap; + /* was made negative by deflate(..., Z_FINISH); */ + } + s.status = (s.wrap ? INIT_STATE : BUSY_STATE); + strm.adler = (s.wrap === 2) ? + 0 // crc32(0, Z_NULL, 0) + : + 1; // adler32(0, Z_NULL, 0) + s.last_flush = Z_NO_FLUSH; + trees._tr_init(s); + return Z_OK; +} + + +function deflateReset(strm) { + var ret = deflateResetKeep(strm); + if (ret === Z_OK) { + lm_init(strm.state); + } + return ret; +} + + +function deflateSetHeader(strm, head) { + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } + strm.state.gzhead = head; + return Z_OK; +} + + +function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { + if (!strm) { // === Z_NULL + return Z_STREAM_ERROR; + } + var wrap = 1; + + if (level === Z_DEFAULT_COMPRESSION) { + level = 6; + } + + if (windowBits < 0) { /* suppress zlib wrapper */ + wrap = 0; + windowBits = -windowBits; + } + + else if (windowBits > 15) { + wrap = 2; /* write gzip wrapper instead */ + windowBits -= 16; + } + + + if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { + return err(strm, Z_STREAM_ERROR); + } + + + if (windowBits === 8) { + windowBits = 9; + } + /* until 256-byte window bug fixed */ + + var s = new DeflateState(); + + strm.state = s; + s.strm = strm; + + s.wrap = wrap; + s.gzhead = null; + s.w_bits = windowBits; + s.w_size = 1 << s.w_bits; + s.w_mask = s.w_size - 1; + + s.hash_bits = memLevel + 7; + s.hash_size = 1 << s.hash_bits; + s.hash_mask = s.hash_size - 1; + s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); + + s.window = new utils.Buf8(s.w_size * 2); + s.head = new utils.Buf16(s.hash_size); + s.prev = new utils.Buf16(s.w_size); + + // Don't need mem init magic for JS. + //s.high_water = 0; /* nothing written to s->window yet */ + + s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ + + s.pending_buf_size = s.lit_bufsize * 4; + + //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); + //s->pending_buf = (uchf *) overlay; + s.pending_buf = new utils.Buf8(s.pending_buf_size); + + // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) + //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); + s.d_buf = 1 * s.lit_bufsize; + + //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; + s.l_buf = (1 + 2) * s.lit_bufsize; + + s.level = level; + s.strategy = strategy; + s.method = method; + + return deflateReset(strm); +} + +function deflateInit(strm, level) { + return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); +} + + +function deflate(strm, flush) { + var old_flush, s; + var beg, val; // for gzip header write only + + if (!strm || !strm.state || + flush > Z_BLOCK || flush < 0) { + return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; + } + + s = strm.state; + + if (!strm.output || + (!strm.input && strm.avail_in !== 0) || + (s.status === FINISH_STATE && flush !== Z_FINISH)) { + return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); + } + + s.strm = strm; /* just in case */ + old_flush = s.last_flush; + s.last_flush = flush; + + /* Write the header */ + if (s.status === INIT_STATE) { + + if (s.wrap === 2) { // GZIP header + strm.adler = 0; //crc32(0L, Z_NULL, 0); + put_byte(s, 31); + put_byte(s, 139); + put_byte(s, 8); + if (!s.gzhead) { // s->gzhead == Z_NULL + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, 0); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, OS_CODE); + s.status = BUSY_STATE; + } + else { + put_byte(s, (s.gzhead.text ? 1 : 0) + + (s.gzhead.hcrc ? 2 : 0) + + (!s.gzhead.extra ? 0 : 4) + + (!s.gzhead.name ? 0 : 8) + + (!s.gzhead.comment ? 0 : 16) + ); + put_byte(s, s.gzhead.time & 0xff); + put_byte(s, (s.gzhead.time >> 8) & 0xff); + put_byte(s, (s.gzhead.time >> 16) & 0xff); + put_byte(s, (s.gzhead.time >> 24) & 0xff); + put_byte(s, s.level === 9 ? 2 : + (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? + 4 : 0)); + put_byte(s, s.gzhead.os & 0xff); + if (s.gzhead.extra && s.gzhead.extra.length) { + put_byte(s, s.gzhead.extra.length & 0xff); + put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); + } + if (s.gzhead.hcrc) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); + } + s.gzindex = 0; + s.status = EXTRA_STATE; + } + } + else // DEFLATE header + { + var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; + var level_flags = -1; + + if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { + level_flags = 0; + } else if (s.level < 6) { + level_flags = 1; + } else if (s.level === 6) { + level_flags = 2; + } else { + level_flags = 3; + } + header |= (level_flags << 6); + if (s.strstart !== 0) { header |= PRESET_DICT; } + header += 31 - (header % 31); + + s.status = BUSY_STATE; + putShortMSB(s, header); + + /* Save the adler32 of the preset dictionary: */ + if (s.strstart !== 0) { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + strm.adler = 1; // adler32(0L, Z_NULL, 0); + } + } + +//#ifdef GZIP + if (s.status === EXTRA_STATE) { + if (s.gzhead.extra/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + + while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + break; + } + } + put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); + s.gzindex++; + } + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (s.gzindex === s.gzhead.extra.length) { + s.gzindex = 0; + s.status = NAME_STATE; + } + } + else { + s.status = NAME_STATE; + } + } + if (s.status === NAME_STATE) { + if (s.gzhead.name/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.name.length) { + val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.gzindex = 0; + s.status = COMMENT_STATE; + } + } + else { + s.status = COMMENT_STATE; + } + } + if (s.status === COMMENT_STATE) { + if (s.gzhead.comment/* != Z_NULL*/) { + beg = s.pending; /* start of bytes to update crc */ + //int val; + + do { + if (s.pending === s.pending_buf_size) { + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + flush_pending(strm); + beg = s.pending; + if (s.pending === s.pending_buf_size) { + val = 1; + break; + } + } + // JS specific: little magic to add zero terminator to end of string + if (s.gzindex < s.gzhead.comment.length) { + val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; + } else { + val = 0; + } + put_byte(s, val); + } while (val !== 0); + + if (s.gzhead.hcrc && s.pending > beg) { + strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); + } + if (val === 0) { + s.status = HCRC_STATE; + } + } + else { + s.status = HCRC_STATE; + } + } + if (s.status === HCRC_STATE) { + if (s.gzhead.hcrc) { + if (s.pending + 2 > s.pending_buf_size) { + flush_pending(strm); + } + if (s.pending + 2 <= s.pending_buf_size) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + strm.adler = 0; //crc32(0L, Z_NULL, 0); + s.status = BUSY_STATE; + } + } + else { + s.status = BUSY_STATE; + } + } +//#endif + + /* Flush as much pending output as possible */ + if (s.pending !== 0) { + flush_pending(strm); + if (strm.avail_out === 0) { + /* Since avail_out is 0, deflate will be called again with + * more output space, but possibly with both pending and + * avail_in equal to zero. There won't be anything to do, + * but this is not an error situation so make sure we + * return OK instead of BUF_ERROR at next call of deflate: + */ + s.last_flush = -1; + return Z_OK; + } + + /* Make sure there is something to do and avoid duplicate consecutive + * flushes. For repeated and useless calls with Z_FINISH, we keep + * returning Z_STREAM_END instead of Z_BUF_ERROR. + */ + } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && + flush !== Z_FINISH) { + return err(strm, Z_BUF_ERROR); + } + + /* User must not provide more input after the first FINISH: */ + if (s.status === FINISH_STATE && strm.avail_in !== 0) { + return err(strm, Z_BUF_ERROR); + } + + /* Start a new block or continue the current one. + */ + if (strm.avail_in !== 0 || s.lookahead !== 0 || + (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { + var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : + (s.strategy === Z_RLE ? deflate_rle(s, flush) : + configuration_table[s.level].func(s, flush)); + + if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { + s.status = FINISH_STATE; + } + if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { + if (strm.avail_out === 0) { + s.last_flush = -1; + /* avoid BUF_ERROR next call, see above */ + } + return Z_OK; + /* If flush != Z_NO_FLUSH && avail_out == 0, the next call + * of deflate should use the same flush parameter to make sure + * that the flush is complete. So we don't have to output an + * empty block here, this will be done at next call. This also + * ensures that for a very small output buffer, we emit at most + * one empty block. + */ + } + if (bstate === BS_BLOCK_DONE) { + if (flush === Z_PARTIAL_FLUSH) { + trees._tr_align(s); + } + else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ + + trees._tr_stored_block(s, 0, 0, false); + /* For a full flush, this empty block will be recognized + * as a special marker by inflate_sync(). + */ + if (flush === Z_FULL_FLUSH) { + /*** CLEAR_HASH(s); ***/ /* forget history */ + zero(s.head); // Fill with NIL (= 0); + + if (s.lookahead === 0) { + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + } + } + flush_pending(strm); + if (strm.avail_out === 0) { + s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ + return Z_OK; + } + } + } + //Assert(strm->avail_out > 0, "bug2"); + //if (strm.avail_out <= 0) { throw new Error("bug2");} + + if (flush !== Z_FINISH) { return Z_OK; } + if (s.wrap <= 0) { return Z_STREAM_END; } + + /* Write the trailer */ + if (s.wrap === 2) { + put_byte(s, strm.adler & 0xff); + put_byte(s, (strm.adler >> 8) & 0xff); + put_byte(s, (strm.adler >> 16) & 0xff); + put_byte(s, (strm.adler >> 24) & 0xff); + put_byte(s, strm.total_in & 0xff); + put_byte(s, (strm.total_in >> 8) & 0xff); + put_byte(s, (strm.total_in >> 16) & 0xff); + put_byte(s, (strm.total_in >> 24) & 0xff); + } + else + { + putShortMSB(s, strm.adler >>> 16); + putShortMSB(s, strm.adler & 0xffff); + } + + flush_pending(strm); + /* If avail_out is zero, the application will call deflate again + * to flush the rest. + */ + if (s.wrap > 0) { s.wrap = -s.wrap; } + /* write the trailer only once! */ + return s.pending !== 0 ? Z_OK : Z_STREAM_END; +} + +function deflateEnd(strm) { + var status; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + status = strm.state.status; + if (status !== INIT_STATE && + status !== EXTRA_STATE && + status !== NAME_STATE && + status !== COMMENT_STATE && + status !== HCRC_STATE && + status !== BUSY_STATE && + status !== FINISH_STATE + ) { + return err(strm, Z_STREAM_ERROR); + } + + strm.state = null; + + return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; +} + + +/* ========================================================================= + * Initializes the compression dictionary from the given byte + * sequence without producing any compressed output. + */ +function deflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var s; + var str, n; + var wrap; + var avail; + var next; + var input; + var tmpDict; + + if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { + return Z_STREAM_ERROR; + } + + s = strm.state; + wrap = s.wrap; + + if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { + return Z_STREAM_ERROR; + } + + /* when using zlib wrappers, compute Adler-32 for provided dictionary */ + if (wrap === 1) { + /* adler32(strm->adler, dictionary, dictLength); */ + strm.adler = adler32(strm.adler, dictionary, dictLength, 0); + } + + s.wrap = 0; /* avoid computing Adler-32 in read_buf */ + + /* if dictionary would fill window, just replace the history */ + if (dictLength >= s.w_size) { + if (wrap === 0) { /* already empty otherwise */ + /*** CLEAR_HASH(s); ***/ + zero(s.head); // Fill with NIL (= 0); + s.strstart = 0; + s.block_start = 0; + s.insert = 0; + } + /* use the tail */ + // dictionary = dictionary.slice(dictLength - s.w_size); + tmpDict = new utils.Buf8(s.w_size); + utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); + dictionary = tmpDict; + dictLength = s.w_size; + } + /* insert dictionary into window and hash */ + avail = strm.avail_in; + next = strm.next_in; + input = strm.input; + strm.avail_in = dictLength; + strm.next_in = 0; + strm.input = dictionary; + fill_window(s); + while (s.lookahead >= MIN_MATCH) { + str = s.strstart; + n = s.lookahead - (MIN_MATCH - 1); + do { + /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ + s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; + + s.prev[str & s.w_mask] = s.head[s.ins_h]; + + s.head[s.ins_h] = str; + str++; + } while (--n); + s.strstart = str; + s.lookahead = MIN_MATCH - 1; + fill_window(s); + } + s.strstart += s.lookahead; + s.block_start = s.strstart; + s.insert = s.lookahead; + s.lookahead = 0; + s.match_length = s.prev_length = MIN_MATCH - 1; + s.match_available = 0; + strm.next_in = next; + strm.input = input; + strm.avail_in = avail; + s.wrap = wrap; + return Z_OK; +} + + +exports.deflateInit = deflateInit; +exports.deflateInit2 = deflateInit2; +exports.deflateReset = deflateReset; +exports.deflateResetKeep = deflateResetKeep; +exports.deflateSetHeader = deflateSetHeader; +exports.deflate = deflate; +exports.deflateEnd = deflateEnd; +exports.deflateSetDictionary = deflateSetDictionary; +exports.deflateInfo = 'pako deflate (from Nodeca project)'; + +/* Not implemented +exports.deflateBound = deflateBound; +exports.deflateCopy = deflateCopy; +exports.deflateParams = deflateParams; +exports.deflatePending = deflatePending; +exports.deflatePrime = deflatePrime; +exports.deflateTune = deflateTune; +*/ + + +/***/ }), + +/***/ 4264: +/***/ (function(module) { + +"use strict"; + + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +// See state defs from inflate.js +var BAD = 30; /* got a data error -- remain here until reset */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ + +/* + Decode literal, length, and distance codes and write out the resulting + literal and match bytes until either not enough input or output is + available, an end-of-block is encountered, or a data error is encountered. + When large enough input and output buffers are supplied to inflate(), for + example, a 16K input buffer and a 64K output buffer, more than 95% of the + inflate execution time is spent in this routine. + + Entry assumptions: + + state.mode === LEN + strm.avail_in >= 6 + strm.avail_out >= 258 + start >= strm.avail_out + state.bits < 8 + + On return, state.mode is one of: + + LEN -- ran out of enough output space or enough available input + TYPE -- reached end of block code, inflate() to interpret next block + BAD -- error in block data + + Notes: + + - The maximum input bits used by a length/distance pair is 15 bits for the + length code, 5 bits for the length extra, 15 bits for the distance code, + and 13 bits for the distance extra. This totals 48 bits, or six bytes. + Therefore if strm.avail_in >= 6, then there is enough input to avoid + checking for available input while decoding. + + - The maximum bytes that a single length/distance pair can output is 258 + bytes, which is the maximum length that can be coded. inflate_fast() + requires strm.avail_out >= 258 for each loop to avoid checking for + output space. + */ +module.exports = function inflate_fast(strm, start) { + var state; + var _in; /* local strm.input */ + var last; /* have enough input while in < last */ + var _out; /* local strm.output */ + var beg; /* inflate()'s initial strm.output */ + var end; /* while out < end, enough space available */ +//#ifdef INFLATE_STRICT + var dmax; /* maximum distance from zlib header */ +//#endif + var wsize; /* window size or zero if not using window */ + var whave; /* valid bytes in the window */ + var wnext; /* window write index */ + // Use `s_window` instead `window`, avoid conflict with instrumentation tools + var s_window; /* allocated sliding window, if wsize != 0 */ + var hold; /* local strm.hold */ + var bits; /* local strm.bits */ + var lcode; /* local strm.lencode */ + var dcode; /* local strm.distcode */ + var lmask; /* mask for first level of length codes */ + var dmask; /* mask for first level of distance codes */ + var here; /* retrieved table entry */ + var op; /* code bits, operation, extra bits, or */ + /* window position, window bytes to copy */ + var len; /* match length, unused bytes */ + var dist; /* match distance */ + var from; /* where to copy match from */ + var from_source; + + + var input, output; // JS specific, because we have no pointers + + /* copy state to local variables */ + state = strm.state; + //here = state.here; + _in = strm.next_in; + input = strm.input; + last = _in + (strm.avail_in - 5); + _out = strm.next_out; + output = strm.output; + beg = _out - (start - strm.avail_out); + end = _out + (strm.avail_out - 257); +//#ifdef INFLATE_STRICT + dmax = state.dmax; +//#endif + wsize = state.wsize; + whave = state.whave; + wnext = state.wnext; + s_window = state.window; + hold = state.hold; + bits = state.bits; + lcode = state.lencode; + dcode = state.distcode; + lmask = (1 << state.lenbits) - 1; + dmask = (1 << state.distbits) - 1; + + + /* decode literals and length/distances until end-of-block or not enough + input data or output space */ + + top: + do { + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + + here = lcode[hold & lmask]; + + dolen: + for (;;) { // Goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + if (op === 0) { /* literal */ + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + output[_out++] = here & 0xffff/*here.val*/; + } + else if (op & 16) { /* length base */ + len = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (op) { + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + len += hold & ((1 << op) - 1); + hold >>>= op; + bits -= op; + } + //Tracevv((stderr, "inflate: length %u\n", len)); + if (bits < 15) { + hold += input[_in++] << bits; + bits += 8; + hold += input[_in++] << bits; + bits += 8; + } + here = dcode[hold & dmask]; + + dodist: + for (;;) { // goto emulation + op = here >>> 24/*here.bits*/; + hold >>>= op; + bits -= op; + op = (here >>> 16) & 0xff/*here.op*/; + + if (op & 16) { /* distance base */ + dist = here & 0xffff/*here.val*/; + op &= 15; /* number of extra bits */ + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + if (bits < op) { + hold += input[_in++] << bits; + bits += 8; + } + } + dist += hold & ((1 << op) - 1); +//#ifdef INFLATE_STRICT + if (dist > dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } +//#endif + hold >>>= op; + bits -= op; + //Tracevv((stderr, "inflate: distance %u\n", dist)); + op = _out - beg; /* max distance in output */ + if (dist > op) { /* see if copy from window */ + op = dist - op; /* distance back in window */ + if (op > whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break top; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// if (len <= op - whave) { +// do { +// output[_out++] = 0; +// } while (--len); +// continue top; +// } +// len -= op - whave; +// do { +// output[_out++] = 0; +// } while (--op > whave); +// if (op === 0) { +// from = _out - dist; +// do { +// output[_out++] = output[from++]; +// } while (--len); +// continue top; +// } +//#endif + } + from = 0; // window index + from_source = s_window; + if (wnext === 0) { /* very common case */ + from += wsize - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + else if (wnext < op) { /* wrap around window */ + from += wsize + wnext - op; + op -= wnext; + if (op < len) { /* some from end of window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = 0; + if (wnext < len) { /* some from start of window */ + op = wnext; + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + } + else { /* contiguous in window */ + from += wnext - op; + if (op < len) { /* some from window */ + len -= op; + do { + output[_out++] = s_window[from++]; + } while (--op); + from = _out - dist; /* rest from output */ + from_source = output; + } + } + while (len > 2) { + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + output[_out++] = from_source[from++]; + len -= 3; + } + if (len) { + output[_out++] = from_source[from++]; + if (len > 1) { + output[_out++] = from_source[from++]; + } + } + } + else { + from = _out - dist; /* copy direct from output */ + do { /* minimum length is three */ + output[_out++] = output[from++]; + output[_out++] = output[from++]; + output[_out++] = output[from++]; + len -= 3; + } while (len > 2); + if (len) { + output[_out++] = output[from++]; + if (len > 1) { + output[_out++] = output[from++]; + } + } + } + } + else if ((op & 64) === 0) { /* 2nd level distance code */ + here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dodist; + } + else { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } + else if ((op & 64) === 0) { /* 2nd level length code */ + here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; + continue dolen; + } + else if (op & 32) { /* end-of-block */ + //Tracevv((stderr, "inflate: end of block\n")); + state.mode = TYPE; + break top; + } + else { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break top; + } + + break; // need to emulate goto via "continue" + } + } while (_in < last && _out < end); + + /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ + len = bits >> 3; + _in -= len; + bits -= len << 3; + hold &= (1 << bits) - 1; + + /* update state and return */ + strm.next_in = _in; + strm.next_out = _out; + strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); + strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); + state.hold = hold; + state.bits = bits; + return; +}; + + +/***/ }), + +/***/ 7948: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = __webpack_require__(4236); +var adler32 = __webpack_require__(6069); +var crc32 = __webpack_require__(2869); +var inflate_fast = __webpack_require__(4264); +var inflate_table = __webpack_require__(9241); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +/* Allowed flush values; see deflate() and inflate() below for details */ +//var Z_NO_FLUSH = 0; +//var Z_PARTIAL_FLUSH = 1; +//var Z_SYNC_FLUSH = 2; +//var Z_FULL_FLUSH = 3; +var Z_FINISH = 4; +var Z_BLOCK = 5; +var Z_TREES = 6; + + +/* Return codes for the compression/decompression functions. Negative values + * are errors, positive values are used for special but normal events. + */ +var Z_OK = 0; +var Z_STREAM_END = 1; +var Z_NEED_DICT = 2; +//var Z_ERRNO = -1; +var Z_STREAM_ERROR = -2; +var Z_DATA_ERROR = -3; +var Z_MEM_ERROR = -4; +var Z_BUF_ERROR = -5; +//var Z_VERSION_ERROR = -6; + +/* The deflate compression method */ +var Z_DEFLATED = 8; + + +/* STATES ====================================================================*/ +/* ===========================================================================*/ + + +var HEAD = 1; /* i: waiting for magic header */ +var FLAGS = 2; /* i: waiting for method and flags (gzip) */ +var TIME = 3; /* i: waiting for modification time (gzip) */ +var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ +var EXLEN = 5; /* i: waiting for extra length (gzip) */ +var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ +var NAME = 7; /* i: waiting for end of file name (gzip) */ +var COMMENT = 8; /* i: waiting for end of comment (gzip) */ +var HCRC = 9; /* i: waiting for header crc (gzip) */ +var DICTID = 10; /* i: waiting for dictionary check value */ +var DICT = 11; /* waiting for inflateSetDictionary() call */ +var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ +var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ +var STORED = 14; /* i: waiting for stored size (length and complement) */ +var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ +var COPY = 16; /* i/o: waiting for input or output to copy stored block */ +var TABLE = 17; /* i: waiting for dynamic block table lengths */ +var LENLENS = 18; /* i: waiting for code length code lengths */ +var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ +var LEN_ = 20; /* i: same as LEN below, but only first time in */ +var LEN = 21; /* i: waiting for length/lit/eob code */ +var LENEXT = 22; /* i: waiting for length extra bits */ +var DIST = 23; /* i: waiting for distance code */ +var DISTEXT = 24; /* i: waiting for distance extra bits */ +var MATCH = 25; /* o: waiting for output space to copy string */ +var LIT = 26; /* o: waiting for output space to write literal */ +var CHECK = 27; /* i: waiting for 32-bit check value */ +var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ +var DONE = 29; /* finished check, done -- remain here until reset */ +var BAD = 30; /* got a data error -- remain here until reset */ +var MEM = 31; /* got an inflate() memory error -- remain here until reset */ +var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ + +/* ===========================================================================*/ + + + +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var MAX_WBITS = 15; +/* 32K LZ77 window */ +var DEF_WBITS = MAX_WBITS; + + +function zswap32(q) { + return (((q >>> 24) & 0xff) + + ((q >>> 8) & 0xff00) + + ((q & 0xff00) << 8) + + ((q & 0xff) << 24)); +} + + +function InflateState() { + this.mode = 0; /* current inflate mode */ + this.last = false; /* true if processing last block */ + this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ + this.havedict = false; /* true if dictionary provided */ + this.flags = 0; /* gzip header method and flags (0 if zlib) */ + this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ + this.check = 0; /* protected copy of check value */ + this.total = 0; /* protected copy of output count */ + // TODO: may be {} + this.head = null; /* where to save gzip header information */ + + /* sliding window */ + this.wbits = 0; /* log base 2 of requested window size */ + this.wsize = 0; /* window size or zero if not using window */ + this.whave = 0; /* valid bytes in the window */ + this.wnext = 0; /* window write index */ + this.window = null; /* allocated sliding window, if needed */ + + /* bit accumulator */ + this.hold = 0; /* input bit accumulator */ + this.bits = 0; /* number of bits in "in" */ + + /* for string and stored block copying */ + this.length = 0; /* literal or length of data to copy */ + this.offset = 0; /* distance back to copy string from */ + + /* for table and code decoding */ + this.extra = 0; /* extra bits needed */ + + /* fixed and dynamic code tables */ + this.lencode = null; /* starting table for length/literal codes */ + this.distcode = null; /* starting table for distance codes */ + this.lenbits = 0; /* index bits for lencode */ + this.distbits = 0; /* index bits for distcode */ + + /* dynamic table building */ + this.ncode = 0; /* number of code length code lengths */ + this.nlen = 0; /* number of length code lengths */ + this.ndist = 0; /* number of distance code lengths */ + this.have = 0; /* number of code lengths in lens[] */ + this.next = null; /* next available space in codes[] */ + + this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ + this.work = new utils.Buf16(288); /* work area for code table building */ + + /* + because we don't have pointers in js, we use lencode and distcode directly + as buffers so we don't need codes + */ + //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ + this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ + this.distdyn = null; /* dynamic table for distance codes (JS specific) */ + this.sane = 0; /* if false, allow invalid distance too far */ + this.back = 0; /* bits back of last unprocessed length/lit */ + this.was = 0; /* initial length of match */ +} + +function inflateResetKeep(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + strm.total_in = strm.total_out = state.total = 0; + strm.msg = ''; /*Z_NULL*/ + if (state.wrap) { /* to support ill-conceived Java test suite */ + strm.adler = state.wrap & 1; + } + state.mode = HEAD; + state.last = 0; + state.havedict = 0; + state.dmax = 32768; + state.head = null/*Z_NULL*/; + state.hold = 0; + state.bits = 0; + //state.lencode = state.distcode = state.next = state.codes; + state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); + state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); + + state.sane = 1; + state.back = -1; + //Tracev((stderr, "inflate: reset\n")); + return Z_OK; +} + +function inflateReset(strm) { + var state; + + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + state.wsize = 0; + state.whave = 0; + state.wnext = 0; + return inflateResetKeep(strm); + +} + +function inflateReset2(strm, windowBits) { + var wrap; + var state; + + /* get the state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + + /* extract wrap request from windowBits parameter */ + if (windowBits < 0) { + wrap = 0; + windowBits = -windowBits; + } + else { + wrap = (windowBits >> 4) + 1; + if (windowBits < 48) { + windowBits &= 15; + } + } + + /* set number of window bits, free window if different */ + if (windowBits && (windowBits < 8 || windowBits > 15)) { + return Z_STREAM_ERROR; + } + if (state.window !== null && state.wbits !== windowBits) { + state.window = null; + } + + /* update state and reset the rest of it */ + state.wrap = wrap; + state.wbits = windowBits; + return inflateReset(strm); +} + +function inflateInit2(strm, windowBits) { + var ret; + var state; + + if (!strm) { return Z_STREAM_ERROR; } + //strm.msg = Z_NULL; /* in case we return an error */ + + state = new InflateState(); + + //if (state === Z_NULL) return Z_MEM_ERROR; + //Tracev((stderr, "inflate: allocated\n")); + strm.state = state; + state.window = null/*Z_NULL*/; + ret = inflateReset2(strm, windowBits); + if (ret !== Z_OK) { + strm.state = null/*Z_NULL*/; + } + return ret; +} + +function inflateInit(strm) { + return inflateInit2(strm, DEF_WBITS); +} + + +/* + Return state with length and distance decoding tables and index sizes set to + fixed code decoding. Normally this returns fixed tables from inffixed.h. + If BUILDFIXED is defined, then instead this routine builds the tables the + first time it's called, and returns those tables the first time and + thereafter. This reduces the size of the code by about 2K bytes, in + exchange for a little execution time. However, BUILDFIXED should not be + used for threaded applications, since the rewriting of the tables and virgin + may not be thread-safe. + */ +var virgin = true; + +var lenfix, distfix; // We have no pointers in JS, so keep tables separate + +function fixedtables(state) { + /* build fixed huffman tables if first call (may not be thread safe) */ + if (virgin) { + var sym; + + lenfix = new utils.Buf32(512); + distfix = new utils.Buf32(32); + + /* literal/length table */ + sym = 0; + while (sym < 144) { state.lens[sym++] = 8; } + while (sym < 256) { state.lens[sym++] = 9; } + while (sym < 280) { state.lens[sym++] = 7; } + while (sym < 288) { state.lens[sym++] = 8; } + + inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); + + /* distance table */ + sym = 0; + while (sym < 32) { state.lens[sym++] = 5; } + + inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); + + /* do this just once */ + virgin = false; + } + + state.lencode = lenfix; + state.lenbits = 9; + state.distcode = distfix; + state.distbits = 5; +} + + +/* + Update the window with the last wsize (normally 32K) bytes written before + returning. If window does not exist yet, create it. This is only called + when a window is already in use, or when output has been written during this + inflate call, but the end of the deflate stream has not been reached yet. + It is also called to create a window for dictionary data when a dictionary + is loaded. + + Providing output buffers larger than 32K to inflate() should provide a speed + advantage, since only the last 32K of output is copied to the sliding window + upon return from inflate(), and since all distances after the first 32K of + output will fall in the output data, making match copies simpler and faster. + The advantage may be dependent on the size of the processor's data caches. + */ +function updatewindow(strm, src, end, copy) { + var dist; + var state = strm.state; + + /* if it hasn't been done already, allocate space for the window */ + if (state.window === null) { + state.wsize = 1 << state.wbits; + state.wnext = 0; + state.whave = 0; + + state.window = new utils.Buf8(state.wsize); + } + + /* copy state->wsize or less output bytes into the circular window */ + if (copy >= state.wsize) { + utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); + state.wnext = 0; + state.whave = state.wsize; + } + else { + dist = state.wsize - state.wnext; + if (dist > copy) { + dist = copy; + } + //zmemcpy(state->window + state->wnext, end - copy, dist); + utils.arraySet(state.window, src, end - copy, dist, state.wnext); + copy -= dist; + if (copy) { + //zmemcpy(state->window, end - copy, copy); + utils.arraySet(state.window, src, end - copy, copy, 0); + state.wnext = copy; + state.whave = state.wsize; + } + else { + state.wnext += dist; + if (state.wnext === state.wsize) { state.wnext = 0; } + if (state.whave < state.wsize) { state.whave += dist; } + } + } + return 0; +} + +function inflate(strm, flush) { + var state; + var input, output; // input/output buffers + var next; /* next input INDEX */ + var put; /* next output INDEX */ + var have, left; /* available input and output */ + var hold; /* bit buffer */ + var bits; /* bits in bit buffer */ + var _in, _out; /* save starting available input and output */ + var copy; /* number of stored or match bytes to copy */ + var from; /* where to copy match bytes from */ + var from_source; + var here = 0; /* current decoding table entry */ + var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) + //var last; /* parent table entry */ + var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) + var len; /* length to copy for repeats, bits to drop */ + var ret; /* return code */ + var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ + var opts; + + var n; // temporary var for NEED_BITS + + var order = /* permutation of code lengths */ + [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; + + + if (!strm || !strm.state || !strm.output || + (!strm.input && strm.avail_in !== 0)) { + return Z_STREAM_ERROR; + } + + state = strm.state; + if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ + + + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + _in = have; + _out = left; + ret = Z_OK; + + inf_leave: // goto emulation + for (;;) { + switch (state.mode) { + case HEAD: + if (state.wrap === 0) { + state.mode = TYPEDO; + break; + } + //=== NEEDBITS(16); + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ + state.check = 0/*crc32(0L, Z_NULL, 0)*/; + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = FLAGS; + break; + } + state.flags = 0; /* expect zlib header */ + if (state.head) { + state.head.done = false; + } + if (!(state.wrap & 1) || /* check if zlib header allowed */ + (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { + strm.msg = 'incorrect header check'; + state.mode = BAD; + break; + } + if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// + len = (hold & 0x0f)/*BITS(4)*/ + 8; + if (state.wbits === 0) { + state.wbits = len; + } + else if (len > state.wbits) { + strm.msg = 'invalid window size'; + state.mode = BAD; + break; + } + state.dmax = 1 << len; + //Tracev((stderr, "inflate: zlib header ok\n")); + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = hold & 0x200 ? DICTID : TYPE; + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + break; + case FLAGS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.flags = hold; + if ((state.flags & 0xff) !== Z_DEFLATED) { + strm.msg = 'unknown compression method'; + state.mode = BAD; + break; + } + if (state.flags & 0xe000) { + strm.msg = 'unknown header flags set'; + state.mode = BAD; + break; + } + if (state.head) { + state.head.text = ((hold >> 8) & 1); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = TIME; + /* falls through */ + case TIME: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.time = hold; + } + if (state.flags & 0x0200) { + //=== CRC4(state.check, hold) + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + hbuf[2] = (hold >>> 16) & 0xff; + hbuf[3] = (hold >>> 24) & 0xff; + state.check = crc32(state.check, hbuf, 4, 0); + //=== + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = OS; + /* falls through */ + case OS: + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (state.head) { + state.head.xflags = (hold & 0xff); + state.head.os = (hold >> 8); + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = EXLEN; + /* falls through */ + case EXLEN: + if (state.flags & 0x0400) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length = hold; + if (state.head) { + state.head.extra_len = hold; + } + if (state.flags & 0x0200) { + //=== CRC2(state.check, hold); + hbuf[0] = hold & 0xff; + hbuf[1] = (hold >>> 8) & 0xff; + state.check = crc32(state.check, hbuf, 2, 0); + //===// + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + else if (state.head) { + state.head.extra = null/*Z_NULL*/; + } + state.mode = EXTRA; + /* falls through */ + case EXTRA: + if (state.flags & 0x0400) { + copy = state.length; + if (copy > have) { copy = have; } + if (copy) { + if (state.head) { + len = state.head.extra_len - state.length; + if (!state.head.extra) { + // Use untyped array for more convenient processing later + state.head.extra = new Array(state.head.extra_len); + } + utils.arraySet( + state.head.extra, + input, + next, + // extra field is limited to 65536 bytes + // - no need for additional size check + copy, + /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ + len + ); + //zmemcpy(state.head.extra + len, next, + // len + copy > state.head.extra_max ? + // state.head.extra_max - len : copy); + } + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + state.length -= copy; + } + if (state.length) { break inf_leave; } + } + state.length = 0; + state.mode = NAME; + /* falls through */ + case NAME: + if (state.flags & 0x0800) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + // TODO: 2 or 1 bytes? + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.name_max*/)) { + state.head.name += String.fromCharCode(len); + } + } while (len && copy < have); + + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.name = null; + } + state.length = 0; + state.mode = COMMENT; + /* falls through */ + case COMMENT: + if (state.flags & 0x1000) { + if (have === 0) { break inf_leave; } + copy = 0; + do { + len = input[next + copy++]; + /* use constant limit because in js we should not preallocate memory */ + if (state.head && len && + (state.length < 65536 /*state.head.comm_max*/)) { + state.head.comment += String.fromCharCode(len); + } + } while (len && copy < have); + if (state.flags & 0x0200) { + state.check = crc32(state.check, input, copy, next); + } + have -= copy; + next += copy; + if (len) { break inf_leave; } + } + else if (state.head) { + state.head.comment = null; + } + state.mode = HCRC; + /* falls through */ + case HCRC: + if (state.flags & 0x0200) { + //=== NEEDBITS(16); */ + while (bits < 16) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.check & 0xffff)) { + strm.msg = 'header crc mismatch'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + } + if (state.head) { + state.head.hcrc = ((state.flags >> 9) & 1); + state.head.done = true; + } + strm.adler = state.check = 0; + state.mode = TYPE; + break; + case DICTID: + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + strm.adler = state.check = zswap32(hold); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = DICT; + /* falls through */ + case DICT: + if (state.havedict === 0) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + return Z_NEED_DICT; + } + strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; + state.mode = TYPE; + /* falls through */ + case TYPE: + if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } + /* falls through */ + case TYPEDO: + if (state.last) { + //--- BYTEBITS() ---// + hold >>>= bits & 7; + bits -= bits & 7; + //---// + state.mode = CHECK; + break; + } + //=== NEEDBITS(3); */ + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.last = (hold & 0x01)/*BITS(1)*/; + //--- DROPBITS(1) ---// + hold >>>= 1; + bits -= 1; + //---// + + switch ((hold & 0x03)/*BITS(2)*/) { + case 0: /* stored block */ + //Tracev((stderr, "inflate: stored block%s\n", + // state.last ? " (last)" : "")); + state.mode = STORED; + break; + case 1: /* fixed block */ + fixedtables(state); + //Tracev((stderr, "inflate: fixed codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = LEN_; /* decode codes */ + if (flush === Z_TREES) { + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break inf_leave; + } + break; + case 2: /* dynamic block */ + //Tracev((stderr, "inflate: dynamic codes block%s\n", + // state.last ? " (last)" : "")); + state.mode = TABLE; + break; + case 3: + strm.msg = 'invalid block type'; + state.mode = BAD; + } + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + break; + case STORED: + //--- BYTEBITS() ---// /* go to byte boundary */ + hold >>>= bits & 7; + bits -= bits & 7; + //---// + //=== NEEDBITS(32); */ + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { + strm.msg = 'invalid stored block lengths'; + state.mode = BAD; + break; + } + state.length = hold & 0xffff; + //Tracev((stderr, "inflate: stored length %u\n", + // state.length)); + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + state.mode = COPY_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case COPY_: + state.mode = COPY; + /* falls through */ + case COPY: + copy = state.length; + if (copy) { + if (copy > have) { copy = have; } + if (copy > left) { copy = left; } + if (copy === 0) { break inf_leave; } + //--- zmemcpy(put, next, copy); --- + utils.arraySet(output, input, next, copy, put); + //---// + have -= copy; + next += copy; + left -= copy; + put += copy; + state.length -= copy; + break; + } + //Tracev((stderr, "inflate: stored end\n")); + state.mode = TYPE; + break; + case TABLE: + //=== NEEDBITS(14); */ + while (bits < 14) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; + //--- DROPBITS(5) ---// + hold >>>= 5; + bits -= 5; + //---// + state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; + //--- DROPBITS(4) ---// + hold >>>= 4; + bits -= 4; + //---// +//#ifndef PKZIP_BUG_WORKAROUND + if (state.nlen > 286 || state.ndist > 30) { + strm.msg = 'too many length or distance symbols'; + state.mode = BAD; + break; + } +//#endif + //Tracev((stderr, "inflate: table sizes ok\n")); + state.have = 0; + state.mode = LENLENS; + /* falls through */ + case LENLENS: + while (state.have < state.ncode) { + //=== NEEDBITS(3); + while (bits < 3) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + while (state.have < 19) { + state.lens[order[state.have++]] = 0; + } + // We have separate tables & no pointers. 2 commented lines below not needed. + //state.next = state.codes; + //state.lencode = state.next; + // Switch to use dynamic table + state.lencode = state.lendyn; + state.lenbits = 7; + + opts = { bits: state.lenbits }; + ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); + state.lenbits = opts.bits; + + if (ret) { + strm.msg = 'invalid code lengths set'; + state.mode = BAD; + break; + } + //Tracev((stderr, "inflate: code lengths ok\n")); + state.have = 0; + state.mode = CODELENS; + /* falls through */ + case CODELENS: + while (state.have < state.nlen + state.ndist) { + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_val < 16) { + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.lens[state.have++] = here_val; + } + else { + if (here_val === 16) { + //=== NEEDBITS(here.bits + 2); + n = here_bits + 2; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + if (state.have === 0) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + len = state.lens[state.have - 1]; + copy = 3 + (hold & 0x03);//BITS(2); + //--- DROPBITS(2) ---// + hold >>>= 2; + bits -= 2; + //---// + } + else if (here_val === 17) { + //=== NEEDBITS(here.bits + 3); + n = here_bits + 3; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 3 + (hold & 0x07);//BITS(3); + //--- DROPBITS(3) ---// + hold >>>= 3; + bits -= 3; + //---// + } + else { + //=== NEEDBITS(here.bits + 7); + n = here_bits + 7; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + len = 0; + copy = 11 + (hold & 0x7f);//BITS(7); + //--- DROPBITS(7) ---// + hold >>>= 7; + bits -= 7; + //---// + } + if (state.have + copy > state.nlen + state.ndist) { + strm.msg = 'invalid bit length repeat'; + state.mode = BAD; + break; + } + while (copy--) { + state.lens[state.have++] = len; + } + } + } + + /* handle error breaks in while */ + if (state.mode === BAD) { break; } + + /* check for end-of-block code (better have one) */ + if (state.lens[256] === 0) { + strm.msg = 'invalid code -- missing end-of-block'; + state.mode = BAD; + break; + } + + /* build code tables -- note: do not change the lenbits or distbits + values here (9 and 6) without reading the comments in inftrees.h + concerning the ENOUGH constants, which depend on those values */ + state.lenbits = 9; + + opts = { bits: state.lenbits }; + ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.lenbits = opts.bits; + // state.lencode = state.next; + + if (ret) { + strm.msg = 'invalid literal/lengths set'; + state.mode = BAD; + break; + } + + state.distbits = 6; + //state.distcode.copy(state.codes); + // Switch to use dynamic table + state.distcode = state.distdyn; + opts = { bits: state.distbits }; + ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); + // We have separate tables & no pointers. 2 commented lines below not needed. + // state.next_index = opts.table_index; + state.distbits = opts.bits; + // state.distcode = state.next; + + if (ret) { + strm.msg = 'invalid distances set'; + state.mode = BAD; + break; + } + //Tracev((stderr, 'inflate: codes ok\n')); + state.mode = LEN_; + if (flush === Z_TREES) { break inf_leave; } + /* falls through */ + case LEN_: + state.mode = LEN; + /* falls through */ + case LEN: + if (have >= 6 && left >= 258) { + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + inflate_fast(strm, _out); + //--- LOAD() --- + put = strm.next_out; + output = strm.output; + left = strm.avail_out; + next = strm.next_in; + input = strm.input; + have = strm.avail_in; + hold = state.hold; + bits = state.bits; + //--- + + if (state.mode === TYPE) { + state.back = -1; + } + break; + } + state.back = 0; + for (;;) { + here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if (here_bits <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if (here_op && (here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.lencode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + state.length = here_val; + if (here_op === 0) { + //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? + // "inflate: literal '%c'\n" : + // "inflate: literal 0x%02x\n", here.val)); + state.mode = LIT; + break; + } + if (here_op & 32) { + //Tracevv((stderr, "inflate: end of block\n")); + state.back = -1; + state.mode = TYPE; + break; + } + if (here_op & 64) { + strm.msg = 'invalid literal/length code'; + state.mode = BAD; + break; + } + state.extra = here_op & 15; + state.mode = LENEXT; + /* falls through */ + case LENEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } + //Tracevv((stderr, "inflate: length %u\n", state.length)); + state.was = state.length; + state.mode = DIST; + /* falls through */ + case DIST: + for (;;) { + here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + if ((here_op & 0xf0) === 0) { + last_bits = here_bits; + last_op = here_op; + last_val = here_val; + for (;;) { + here = state.distcode[last_val + + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; + here_bits = here >>> 24; + here_op = (here >>> 16) & 0xff; + here_val = here & 0xffff; + + if ((last_bits + here_bits) <= bits) { break; } + //--- PULLBYTE() ---// + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + //---// + } + //--- DROPBITS(last.bits) ---// + hold >>>= last_bits; + bits -= last_bits; + //---// + state.back += last_bits; + } + //--- DROPBITS(here.bits) ---// + hold >>>= here_bits; + bits -= here_bits; + //---// + state.back += here_bits; + if (here_op & 64) { + strm.msg = 'invalid distance code'; + state.mode = BAD; + break; + } + state.offset = here_val; + state.extra = (here_op) & 15; + state.mode = DISTEXT; + /* falls through */ + case DISTEXT: + if (state.extra) { + //=== NEEDBITS(state.extra); + n = state.extra; + while (bits < n) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; + //--- DROPBITS(state.extra) ---// + hold >>>= state.extra; + bits -= state.extra; + //---// + state.back += state.extra; + } +//#ifdef INFLATE_STRICT + if (state.offset > state.dmax) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +//#endif + //Tracevv((stderr, "inflate: distance %u\n", state.offset)); + state.mode = MATCH; + /* falls through */ + case MATCH: + if (left === 0) { break inf_leave; } + copy = _out - left; + if (state.offset > copy) { /* copy from window */ + copy = state.offset - copy; + if (copy > state.whave) { + if (state.sane) { + strm.msg = 'invalid distance too far back'; + state.mode = BAD; + break; + } +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility +//#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR +// Trace((stderr, "inflate.c too far\n")); +// copy -= state.whave; +// if (copy > state.length) { copy = state.length; } +// if (copy > left) { copy = left; } +// left -= copy; +// state.length -= copy; +// do { +// output[put++] = 0; +// } while (--copy); +// if (state.length === 0) { state.mode = LEN; } +// break; +//#endif + } + if (copy > state.wnext) { + copy -= state.wnext; + from = state.wsize - copy; + } + else { + from = state.wnext - copy; + } + if (copy > state.length) { copy = state.length; } + from_source = state.window; + } + else { /* copy from output */ + from_source = output; + from = put - state.offset; + copy = state.length; + } + if (copy > left) { copy = left; } + left -= copy; + state.length -= copy; + do { + output[put++] = from_source[from++]; + } while (--copy); + if (state.length === 0) { state.mode = LEN; } + break; + case LIT: + if (left === 0) { break inf_leave; } + output[put++] = state.length; + left--; + state.mode = LEN; + break; + case CHECK: + if (state.wrap) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + // Use '|' instead of '+' to make sure that result is signed + hold |= input[next++] << bits; + bits += 8; + } + //===// + _out -= left; + strm.total_out += _out; + state.total += _out; + if (_out) { + strm.adler = state.check = + /*UPDATE(state.check, put - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); + + } + _out = left; + // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too + if ((state.flags ? hold : zswap32(hold)) !== state.check) { + strm.msg = 'incorrect data check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: check matches trailer\n")); + } + state.mode = LENGTH; + /* falls through */ + case LENGTH: + if (state.wrap && state.flags) { + //=== NEEDBITS(32); + while (bits < 32) { + if (have === 0) { break inf_leave; } + have--; + hold += input[next++] << bits; + bits += 8; + } + //===// + if (hold !== (state.total & 0xffffffff)) { + strm.msg = 'incorrect length check'; + state.mode = BAD; + break; + } + //=== INITBITS(); + hold = 0; + bits = 0; + //===// + //Tracev((stderr, "inflate: length matches trailer\n")); + } + state.mode = DONE; + /* falls through */ + case DONE: + ret = Z_STREAM_END; + break inf_leave; + case BAD: + ret = Z_DATA_ERROR; + break inf_leave; + case MEM: + return Z_MEM_ERROR; + case SYNC: + /* falls through */ + default: + return Z_STREAM_ERROR; + } + } + + // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" + + /* + Return from inflate(), updating the total counts and the check value. + If there was no progress during the inflate() call, return a buffer + error. Call updatewindow() to create and/or update the window state. + Note: a memory error from inflate() is non-recoverable. + */ + + //--- RESTORE() --- + strm.next_out = put; + strm.avail_out = left; + strm.next_in = next; + strm.avail_in = have; + state.hold = hold; + state.bits = bits; + //--- + + if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && + (state.mode < CHECK || flush !== Z_FINISH))) { + if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { + state.mode = MEM; + return Z_MEM_ERROR; + } + } + _in -= strm.avail_in; + _out -= strm.avail_out; + strm.total_in += _in; + strm.total_out += _out; + state.total += _out; + if (state.wrap && _out) { + strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ + (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); + } + strm.data_type = state.bits + (state.last ? 64 : 0) + + (state.mode === TYPE ? 128 : 0) + + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); + if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { + ret = Z_BUF_ERROR; + } + return ret; +} + +function inflateEnd(strm) { + + if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { + return Z_STREAM_ERROR; + } + + var state = strm.state; + if (state.window) { + state.window = null; + } + strm.state = null; + return Z_OK; +} + +function inflateGetHeader(strm, head) { + var state; + + /* check state */ + if (!strm || !strm.state) { return Z_STREAM_ERROR; } + state = strm.state; + if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } + + /* save header structure */ + state.head = head; + head.done = false; + return Z_OK; +} + +function inflateSetDictionary(strm, dictionary) { + var dictLength = dictionary.length; + + var state; + var dictid; + var ret; + + /* check state */ + if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } + state = strm.state; + + if (state.wrap !== 0 && state.mode !== DICT) { + return Z_STREAM_ERROR; + } + + /* check for correct dictionary identifier */ + if (state.mode === DICT) { + dictid = 1; /* adler32(0, null, 0)*/ + /* dictid = adler32(dictid, dictionary, dictLength); */ + dictid = adler32(dictid, dictionary, dictLength, 0); + if (dictid !== state.check) { + return Z_DATA_ERROR; + } + } + /* copy dictionary to window using updatewindow(), which will amend the + existing dictionary if appropriate */ + ret = updatewindow(strm, dictionary, dictLength, dictLength); + if (ret) { + state.mode = MEM; + return Z_MEM_ERROR; + } + state.havedict = 1; + // Tracev((stderr, "inflate: dictionary set\n")); + return Z_OK; +} + +exports.inflateReset = inflateReset; +exports.inflateReset2 = inflateReset2; +exports.inflateResetKeep = inflateResetKeep; +exports.inflateInit = inflateInit; +exports.inflateInit2 = inflateInit2; +exports.inflate = inflate; +exports.inflateEnd = inflateEnd; +exports.inflateGetHeader = inflateGetHeader; +exports.inflateSetDictionary = inflateSetDictionary; +exports.inflateInfo = 'pako inflate (from Nodeca project)'; + +/* Not implemented +exports.inflateCopy = inflateCopy; +exports.inflateGetDictionary = inflateGetDictionary; +exports.inflateMark = inflateMark; +exports.inflatePrime = inflatePrime; +exports.inflateSync = inflateSync; +exports.inflateSyncPoint = inflateSyncPoint; +exports.inflateUndermine = inflateUndermine; +*/ + + +/***/ }), + +/***/ 9241: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +var utils = __webpack_require__(4236); + +var MAXBITS = 15; +var ENOUGH_LENS = 852; +var ENOUGH_DISTS = 592; +//var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); + +var CODES = 0; +var LENS = 1; +var DISTS = 2; + +var lbase = [ /* Length codes 257..285 base */ + 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, + 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 +]; + +var lext = [ /* Length codes 257..285 extra */ + 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 +]; + +var dbase = [ /* Distance codes 0..29 base */ + 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, + 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, + 8193, 12289, 16385, 24577, 0, 0 +]; + +var dext = [ /* Distance codes 0..29 extra */ + 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, + 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, + 28, 28, 29, 29, 64, 64 +]; + +module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) +{ + var bits = opts.bits; + //here = opts.here; /* table entry for duplication */ + + var len = 0; /* a code's length in bits */ + var sym = 0; /* index of code symbols */ + var min = 0, max = 0; /* minimum and maximum code lengths */ + var root = 0; /* number of index bits for root table */ + var curr = 0; /* number of index bits for current table */ + var drop = 0; /* code bits to drop for sub-table */ + var left = 0; /* number of prefix codes available */ + var used = 0; /* code entries in table used */ + var huff = 0; /* Huffman code */ + var incr; /* for incrementing code, index */ + var fill; /* index for replicating entries */ + var low; /* low bits for current root entry */ + var mask; /* mask for low root bits */ + var next; /* next available space in table */ + var base = null; /* base value table to use */ + var base_index = 0; +// var shoextra; /* extra bits table to use */ + var end; /* use base and extra for symbol > end */ + var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ + var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ + var extra = null; + var extra_index = 0; + + var here_bits, here_op, here_val; + + /* + Process a set of code lengths to create a canonical Huffman code. The + code lengths are lens[0..codes-1]. Each length corresponds to the + symbols 0..codes-1. The Huffman code is generated by first sorting the + symbols by length from short to long, and retaining the symbol order + for codes with equal lengths. Then the code starts with all zero bits + for the first code of the shortest length, and the codes are integer + increments for the same length, and zeros are appended as the length + increases. For the deflate format, these bits are stored backwards + from their more natural integer increment ordering, and so when the + decoding tables are built in the large loop below, the integer codes + are incremented backwards. + + This routine assumes, but does not check, that all of the entries in + lens[] are in the range 0..MAXBITS. The caller must assure this. + 1..MAXBITS is interpreted as that code length. zero means that that + symbol does not occur in this code. + + The codes are sorted by computing a count of codes for each length, + creating from that a table of starting indices for each length in the + sorted table, and then entering the symbols in order in the sorted + table. The sorted table is work[], with that space being provided by + the caller. + + The length counts are used for other purposes as well, i.e. finding + the minimum and maximum length codes, determining if there are any + codes at all, checking for a valid set of lengths, and looking ahead + at length counts to determine sub-table sizes when building the + decoding tables. + */ + + /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ + for (len = 0; len <= MAXBITS; len++) { + count[len] = 0; + } + for (sym = 0; sym < codes; sym++) { + count[lens[lens_index + sym]]++; + } + + /* bound code lengths, force root to be within code lengths */ + root = bits; + for (max = MAXBITS; max >= 1; max--) { + if (count[max] !== 0) { break; } + } + if (root > max) { + root = max; + } + if (max === 0) { /* no symbols to code at all */ + //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ + //table.bits[opts.table_index] = 1; //here.bits = (var char)1; + //table.val[opts.table_index++] = 0; //here.val = (var short)0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + + //table.op[opts.table_index] = 64; + //table.bits[opts.table_index] = 1; + //table.val[opts.table_index++] = 0; + table[table_index++] = (1 << 24) | (64 << 16) | 0; + + opts.bits = 1; + return 0; /* no symbols, but wait for decoding to report error */ + } + for (min = 1; min < max; min++) { + if (count[min] !== 0) { break; } + } + if (root < min) { + root = min; + } + + /* check for an over-subscribed or incomplete set of lengths */ + left = 1; + for (len = 1; len <= MAXBITS; len++) { + left <<= 1; + left -= count[len]; + if (left < 0) { + return -1; + } /* over-subscribed */ + } + if (left > 0 && (type === CODES || max !== 1)) { + return -1; /* incomplete set */ + } + + /* generate offsets into symbol table for each length for sorting */ + offs[1] = 0; + for (len = 1; len < MAXBITS; len++) { + offs[len + 1] = offs[len] + count[len]; + } + + /* sort symbols by length, by symbol order within each length */ + for (sym = 0; sym < codes; sym++) { + if (lens[lens_index + sym] !== 0) { + work[offs[lens[lens_index + sym]]++] = sym; + } + } + + /* + Create and fill in decoding tables. In this loop, the table being + filled is at next and has curr index bits. The code being used is huff + with length len. That code is converted to an index by dropping drop + bits off of the bottom. For codes where len is less than drop + curr, + those top drop + curr - len bits are incremented through all values to + fill the table with replicated entries. + + root is the number of index bits for the root table. When len exceeds + root, sub-tables are created pointed to by the root entry with an index + of the low root bits of huff. This is saved in low to check for when a + new sub-table should be started. drop is zero when the root table is + being filled, and drop is root when sub-tables are being filled. + + When a new sub-table is needed, it is necessary to look ahead in the + code lengths to determine what size sub-table is needed. The length + counts are used for this, and so count[] is decremented as codes are + entered in the tables. + + used keeps track of how many table entries have been allocated from the + provided *table space. It is checked for LENS and DIST tables against + the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in + the initial root table size constants. See the comments in inftrees.h + for more information. + + sym increments through all symbols, and the loop terminates when + all codes of length max, i.e. all codes, have been processed. This + routine permits incomplete codes, so another loop after this one fills + in the rest of the decoding tables with invalid code markers. + */ + + /* set up for code type */ + // poor man optimization - use if-else instead of switch, + // to avoid deopts in old v8 + if (type === CODES) { + base = extra = work; /* dummy value--not used */ + end = 19; + + } else if (type === LENS) { + base = lbase; + base_index -= 257; + extra = lext; + extra_index -= 257; + end = 256; + + } else { /* DISTS */ + base = dbase; + extra = dext; + end = -1; + } + + /* initialize opts for loop */ + huff = 0; /* starting code */ + sym = 0; /* starting code symbol */ + len = min; /* starting code length */ + next = table_index; /* current table to fill in */ + curr = root; /* current table index bits */ + drop = 0; /* current bits to drop from code for index */ + low = -1; /* trigger new sub-table when len > root */ + used = 1 << root; /* use root table entries */ + mask = used - 1; /* mask for comparing low */ + + /* check available table space */ + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* process all codes and make table entries */ + for (;;) { + /* create table entry */ + here_bits = len - drop; + if (work[sym] < end) { + here_op = 0; + here_val = work[sym]; + } + else if (work[sym] > end) { + here_op = extra[extra_index + work[sym]]; + here_val = base[base_index + work[sym]]; + } + else { + here_op = 32 + 64; /* end of block */ + here_val = 0; + } + + /* replicate for those indices with low len bits equal to huff */ + incr = 1 << (len - drop); + fill = 1 << curr; + min = fill; /* save offset to next table */ + do { + fill -= incr; + table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; + } while (fill !== 0); + + /* backwards increment the len-bit code huff */ + incr = 1 << (len - 1); + while (huff & incr) { + incr >>= 1; + } + if (incr !== 0) { + huff &= incr - 1; + huff += incr; + } else { + huff = 0; + } + + /* go to next symbol, update count, len */ + sym++; + if (--count[len] === 0) { + if (len === max) { break; } + len = lens[lens_index + work[sym]]; + } + + /* create new sub-table if needed */ + if (len > root && (huff & mask) !== low) { + /* if first time, transition to sub-tables */ + if (drop === 0) { + drop = root; + } + + /* increment past last table */ + next += min; /* here min is 1 << curr */ + + /* determine length of next table */ + curr = len - drop; + left = 1 << curr; + while (curr + drop < max) { + left -= count[curr + drop]; + if (left <= 0) { break; } + curr++; + left <<= 1; + } + + /* check for enough space */ + used += 1 << curr; + if ((type === LENS && used > ENOUGH_LENS) || + (type === DISTS && used > ENOUGH_DISTS)) { + return 1; + } + + /* point entry in root table to sub-table */ + low = huff & mask; + /*table.op[low] = curr; + table.bits[low] = root; + table.val[low] = next - opts.table_index;*/ + table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; + } + } + + /* fill in remaining table entry if code is incomplete (guaranteed to have + at most one remaining entry, since if the code is incomplete, the + maximum code length that was allowed to get this far is one bit) */ + if (huff !== 0) { + //table.op[next + huff] = 64; /* invalid code marker */ + //table.bits[next + huff] = len - drop; + //table.val[next + huff] = 0; + table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; + } + + /* set return parameters */ + //opts.table_index += used; + opts.bits = root; + return 0; +}; + + +/***/ }), + +/***/ 8898: +/***/ (function(module) { + +"use strict"; + + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +module.exports = { + 2: 'need dictionary', /* Z_NEED_DICT 2 */ + 1: 'stream end', /* Z_STREAM_END 1 */ + 0: '', /* Z_OK 0 */ + '-1': 'file error', /* Z_ERRNO (-1) */ + '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ + '-3': 'data error', /* Z_DATA_ERROR (-3) */ + '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ + '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ + '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ +}; + + +/***/ }), + +/***/ 342: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +"use strict"; + + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +/* eslint-disable space-unary-ops */ + +var utils = __webpack_require__(4236); + +/* Public constants ==========================================================*/ +/* ===========================================================================*/ + + +//var Z_FILTERED = 1; +//var Z_HUFFMAN_ONLY = 2; +//var Z_RLE = 3; +var Z_FIXED = 4; +//var Z_DEFAULT_STRATEGY = 0; + +/* Possible values of the data_type field (though see inflate()) */ +var Z_BINARY = 0; +var Z_TEXT = 1; +//var Z_ASCII = 1; // = Z_TEXT +var Z_UNKNOWN = 2; + +/*============================================================================*/ + + +function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } + +// From zutil.h + +var STORED_BLOCK = 0; +var STATIC_TREES = 1; +var DYN_TREES = 2; +/* The three kinds of block type */ + +var MIN_MATCH = 3; +var MAX_MATCH = 258; +/* The minimum and maximum match lengths */ + +// From deflate.h +/* =========================================================================== + * Internal compression state. + */ + +var LENGTH_CODES = 29; +/* number of length codes, not counting the special END_BLOCK code */ + +var LITERALS = 256; +/* number of literal bytes 0..255 */ + +var L_CODES = LITERALS + 1 + LENGTH_CODES; +/* number of Literal or Length codes, including the END_BLOCK code */ + +var D_CODES = 30; +/* number of distance codes */ + +var BL_CODES = 19; +/* number of codes used to transfer the bit lengths */ + +var HEAP_SIZE = 2 * L_CODES + 1; +/* maximum heap size */ + +var MAX_BITS = 15; +/* All codes must not exceed MAX_BITS bits */ + +var Buf_size = 16; +/* size of bit buffer in bi_buf */ + + +/* =========================================================================== + * Constants + */ + +var MAX_BL_BITS = 7; +/* Bit length codes must not exceed MAX_BL_BITS bits */ + +var END_BLOCK = 256; +/* end of block literal code */ + +var REP_3_6 = 16; +/* repeat previous bit length 3-6 times (2 bits of repeat count) */ + +var REPZ_3_10 = 17; +/* repeat a zero length 3-10 times (3 bits of repeat count) */ + +var REPZ_11_138 = 18; +/* repeat a zero length 11-138 times (7 bits of repeat count) */ + +/* eslint-disable comma-spacing,array-bracket-spacing */ +var extra_lbits = /* extra bits for each length code */ + [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; + +var extra_dbits = /* extra bits for each distance code */ + [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; + +var extra_blbits = /* extra bits for each bit length code */ + [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; + +var bl_order = + [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; +/* eslint-enable comma-spacing,array-bracket-spacing */ + +/* The lengths of the bit length codes are sent in order of decreasing + * probability, to avoid transmitting the lengths for unused bit length codes. + */ + +/* =========================================================================== + * Local data. These are initialized only once. + */ + +// We pre-fill arrays with 0 to avoid uninitialized gaps + +var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ + +// !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 +var static_ltree = new Array((L_CODES + 2) * 2); +zero(static_ltree); +/* The static literal tree. Since the bit lengths are imposed, there is no + * need for the L_CODES extra codes used during heap construction. However + * The codes 286 and 287 are needed to build a canonical tree (see _tr_init + * below). + */ + +var static_dtree = new Array(D_CODES * 2); +zero(static_dtree); +/* The static distance tree. (Actually a trivial tree since all codes use + * 5 bits.) + */ + +var _dist_code = new Array(DIST_CODE_LEN); +zero(_dist_code); +/* Distance codes. The first 256 values correspond to the distances + * 3 .. 258, the last 256 values correspond to the top 8 bits of + * the 15 bit distances. + */ + +var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); +zero(_length_code); +/* length code for each normalized match length (0 == MIN_MATCH) */ + +var base_length = new Array(LENGTH_CODES); +zero(base_length); +/* First normalized length for each code (0 = MIN_MATCH) */ + +var base_dist = new Array(D_CODES); +zero(base_dist); +/* First normalized distance for each code (0 = distance of 1) */ + + +function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { + + this.static_tree = static_tree; /* static tree or NULL */ + this.extra_bits = extra_bits; /* extra bits for each code or NULL */ + this.extra_base = extra_base; /* base index for extra_bits */ + this.elems = elems; /* max number of elements in the tree */ + this.max_length = max_length; /* max bit length for the codes */ + + // show if `static_tree` has data or dummy - needed for monomorphic objects + this.has_stree = static_tree && static_tree.length; +} + + +var static_l_desc; +var static_d_desc; +var static_bl_desc; + + +function TreeDesc(dyn_tree, stat_desc) { + this.dyn_tree = dyn_tree; /* the dynamic tree */ + this.max_code = 0; /* largest code with non zero frequency */ + this.stat_desc = stat_desc; /* the corresponding static tree */ +} + + + +function d_code(dist) { + return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; +} + + +/* =========================================================================== + * Output a short LSB first on the stream. + * IN assertion: there is enough room in pendingBuf. + */ +function put_short(s, w) { +// put_byte(s, (uch)((w) & 0xff)); +// put_byte(s, (uch)((ush)(w) >> 8)); + s.pending_buf[s.pending++] = (w) & 0xff; + s.pending_buf[s.pending++] = (w >>> 8) & 0xff; +} + + +/* =========================================================================== + * Send a value on a given number of bits. + * IN assertion: length <= 16 and value fits in length bits. + */ +function send_bits(s, value, length) { + if (s.bi_valid > (Buf_size - length)) { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + put_short(s, s.bi_buf); + s.bi_buf = value >> (Buf_size - s.bi_valid); + s.bi_valid += length - Buf_size; + } else { + s.bi_buf |= (value << s.bi_valid) & 0xffff; + s.bi_valid += length; + } +} + + +function send_code(s, c, tree) { + send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); +} + + +/* =========================================================================== + * Reverse the first len bits of a code, using straightforward code (a faster + * method would use a table) + * IN assertion: 1 <= len <= 15 + */ +function bi_reverse(code, len) { + var res = 0; + do { + res |= code & 1; + code >>>= 1; + res <<= 1; + } while (--len > 0); + return res >>> 1; +} + + +/* =========================================================================== + * Flush the bit buffer, keeping at most 7 bits in it. + */ +function bi_flush(s) { + if (s.bi_valid === 16) { + put_short(s, s.bi_buf); + s.bi_buf = 0; + s.bi_valid = 0; + + } else if (s.bi_valid >= 8) { + s.pending_buf[s.pending++] = s.bi_buf & 0xff; + s.bi_buf >>= 8; + s.bi_valid -= 8; + } +} + + +/* =========================================================================== + * Compute the optimal bit lengths for a tree and update the total bit length + * for the current block. + * IN assertion: the fields freq and dad are set, heap[heap_max] and + * above are the tree nodes sorted by increasing frequency. + * OUT assertions: the field len is set to the optimal bit length, the + * array bl_count contains the frequencies for each bit length. + * The length opt_len is updated; static_len is also updated if stree is + * not null. + */ +function gen_bitlen(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var max_code = desc.max_code; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var extra = desc.stat_desc.extra_bits; + var base = desc.stat_desc.extra_base; + var max_length = desc.stat_desc.max_length; + var h; /* heap index */ + var n, m; /* iterate over the tree elements */ + var bits; /* bit length */ + var xbits; /* extra bits */ + var f; /* frequency */ + var overflow = 0; /* number of elements with bit length too large */ + + for (bits = 0; bits <= MAX_BITS; bits++) { + s.bl_count[bits] = 0; + } + + /* In a first pass, compute the optimal bit lengths (which may + * overflow in the case of the bit length tree). + */ + tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ + + for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { + n = s.heap[h]; + bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; + if (bits > max_length) { + bits = max_length; + overflow++; + } + tree[n * 2 + 1]/*.Len*/ = bits; + /* We overwrite tree[n].Dad which is no longer needed */ + + if (n > max_code) { continue; } /* not a leaf node */ + + s.bl_count[bits]++; + xbits = 0; + if (n >= base) { + xbits = extra[n - base]; + } + f = tree[n * 2]/*.Freq*/; + s.opt_len += f * (bits + xbits); + if (has_stree) { + s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); + } + } + if (overflow === 0) { return; } + + // Trace((stderr,"\nbit length overflow\n")); + /* This happens for example on obj2 and pic of the Calgary corpus */ + + /* Find the first bit length which could increase: */ + do { + bits = max_length - 1; + while (s.bl_count[bits] === 0) { bits--; } + s.bl_count[bits]--; /* move one leaf down the tree */ + s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ + s.bl_count[max_length]--; + /* The brother of the overflow item also moves one step up, + * but this does not affect bl_count[max_length] + */ + overflow -= 2; + } while (overflow > 0); + + /* Now recompute all bit lengths, scanning in increasing frequency. + * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all + * lengths instead of fixing only the wrong ones. This idea is taken + * from 'ar' written by Haruhiko Okumura.) + */ + for (bits = max_length; bits !== 0; bits--) { + n = s.bl_count[bits]; + while (n !== 0) { + m = s.heap[--h]; + if (m > max_code) { continue; } + if (tree[m * 2 + 1]/*.Len*/ !== bits) { + // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); + s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; + tree[m * 2 + 1]/*.Len*/ = bits; + } + n--; + } + } +} + + +/* =========================================================================== + * Generate the codes for a given tree and bit counts (which need not be + * optimal). + * IN assertion: the array bl_count contains the bit length statistics for + * the given tree and the field len is set for all tree elements. + * OUT assertion: the field code is set for all tree elements of non + * zero code length. + */ +function gen_codes(tree, max_code, bl_count) +// ct_data *tree; /* the tree to decorate */ +// int max_code; /* largest code with non zero frequency */ +// ushf *bl_count; /* number of codes at each bit length */ +{ + var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ + var code = 0; /* running code value */ + var bits; /* bit index */ + var n; /* code index */ + + /* The distribution counts are first used to generate the code values + * without bit reversal. + */ + for (bits = 1; bits <= MAX_BITS; bits++) { + next_code[bits] = code = (code + bl_count[bits - 1]) << 1; + } + /* Check that the bit counts in bl_count are consistent. The last code + * must be all ones. + */ + //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ + length = 0; + for (code = 0; code < LENGTH_CODES - 1; code++) { + base_length[code] = length; + for (n = 0; n < (1 << extra_lbits[code]); n++) { + _length_code[length++] = code; + } + } + //Assert (length == 256, "tr_static_init: length != 256"); + /* Note that the length 255 (match length 258) can be represented + * in two different ways: code 284 + 5 bits or code 285, so we + * overwrite length_code[255] to use the best encoding: + */ + _length_code[length - 1] = code; + + /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ + dist = 0; + for (code = 0; code < 16; code++) { + base_dist[code] = dist; + for (n = 0; n < (1 << extra_dbits[code]); n++) { + _dist_code[dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: dist != 256"); + dist >>= 7; /* from now on, all distances are divided by 128 */ + for (; code < D_CODES; code++) { + base_dist[code] = dist << 7; + for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { + _dist_code[256 + dist++] = code; + } + } + //Assert (dist == 256, "tr_static_init: 256+dist != 512"); + + /* Construct the codes of the static literal tree */ + for (bits = 0; bits <= MAX_BITS; bits++) { + bl_count[bits] = 0; + } + + n = 0; + while (n <= 143) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + while (n <= 255) { + static_ltree[n * 2 + 1]/*.Len*/ = 9; + n++; + bl_count[9]++; + } + while (n <= 279) { + static_ltree[n * 2 + 1]/*.Len*/ = 7; + n++; + bl_count[7]++; + } + while (n <= 287) { + static_ltree[n * 2 + 1]/*.Len*/ = 8; + n++; + bl_count[8]++; + } + /* Codes 286 and 287 do not exist, but we must include them in the + * tree construction to get a canonical Huffman tree (longest code + * all ones) + */ + gen_codes(static_ltree, L_CODES + 1, bl_count); + + /* The static distance tree is trivial: */ + for (n = 0; n < D_CODES; n++) { + static_dtree[n * 2 + 1]/*.Len*/ = 5; + static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); + } + + // Now data ready and we can init static trees + static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); + static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); + static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); + + //static_init_done = true; +} + + +/* =========================================================================== + * Initialize a new block. + */ +function init_block(s) { + var n; /* iterates over tree elements */ + + /* Initialize the trees. */ + for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } + for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } + + s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; + s.opt_len = s.static_len = 0; + s.last_lit = s.matches = 0; +} + + +/* =========================================================================== + * Flush the bit buffer and align the output on a byte boundary + */ +function bi_windup(s) +{ + if (s.bi_valid > 8) { + put_short(s, s.bi_buf); + } else if (s.bi_valid > 0) { + //put_byte(s, (Byte)s->bi_buf); + s.pending_buf[s.pending++] = s.bi_buf; + } + s.bi_buf = 0; + s.bi_valid = 0; +} + +/* =========================================================================== + * Copy a stored block, storing first the length and its + * one's complement if requested. + */ +function copy_block(s, buf, len, header) +//DeflateState *s; +//charf *buf; /* the input data */ +//unsigned len; /* its length */ +//int header; /* true if block header must be written */ +{ + bi_windup(s); /* align on byte boundary */ + + if (header) { + put_short(s, len); + put_short(s, ~len); + } +// while (len--) { +// put_byte(s, *buf++); +// } + utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); + s.pending += len; +} + +/* =========================================================================== + * Compares to subtrees, using the tree depth as tie breaker when + * the subtrees have equal frequency. This minimizes the worst case length. + */ +function smaller(tree, n, m, depth) { + var _n2 = n * 2; + var _m2 = m * 2; + return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || + (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); +} + +/* =========================================================================== + * Restore the heap property by moving down the tree starting at node k, + * exchanging a node with the smallest of its two sons if necessary, stopping + * when the heap property is re-established (each father smaller than its + * two sons). + */ +function pqdownheap(s, tree, k) +// deflate_state *s; +// ct_data *tree; /* the tree to restore */ +// int k; /* node to move down */ +{ + var v = s.heap[k]; + var j = k << 1; /* left son of k */ + while (j <= s.heap_len) { + /* Set j to the smallest of the two sons: */ + if (j < s.heap_len && + smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { + j++; + } + /* Exit if v is smaller than both sons */ + if (smaller(tree, v, s.heap[j], s.depth)) { break; } + + /* Exchange v with the smallest son */ + s.heap[k] = s.heap[j]; + k = j; + + /* And continue down the tree, setting j to the left son of k */ + j <<= 1; + } + s.heap[k] = v; +} + + +// inlined manually +// var SMALLEST = 1; + +/* =========================================================================== + * Send the block data compressed using the given Huffman trees + */ +function compress_block(s, ltree, dtree) +// deflate_state *s; +// const ct_data *ltree; /* literal tree */ +// const ct_data *dtree; /* distance tree */ +{ + var dist; /* distance of matched string */ + var lc; /* match length or unmatched char (if dist == 0) */ + var lx = 0; /* running index in l_buf */ + var code; /* the code to send */ + var extra; /* number of extra bits to send */ + + if (s.last_lit !== 0) { + do { + dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); + lc = s.pending_buf[s.l_buf + lx]; + lx++; + + if (dist === 0) { + send_code(s, lc, ltree); /* send a literal byte */ + //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); + } else { + /* Here, lc is the match length - MIN_MATCH */ + code = _length_code[lc]; + send_code(s, code + LITERALS + 1, ltree); /* send the length code */ + extra = extra_lbits[code]; + if (extra !== 0) { + lc -= base_length[code]; + send_bits(s, lc, extra); /* send the extra length bits */ + } + dist--; /* dist is now the match distance - 1 */ + code = d_code(dist); + //Assert (code < D_CODES, "bad d_code"); + + send_code(s, code, dtree); /* send the distance code */ + extra = extra_dbits[code]; + if (extra !== 0) { + dist -= base_dist[code]; + send_bits(s, dist, extra); /* send the extra distance bits */ + } + } /* literal or match pair ? */ + + /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ + //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, + // "pendingBuf overflow"); + + } while (lx < s.last_lit); + } + + send_code(s, END_BLOCK, ltree); +} + + +/* =========================================================================== + * Construct one Huffman tree and assigns the code bit strings and lengths. + * Update the total bit length for the current block. + * IN assertion: the field freq is set for all tree elements. + * OUT assertions: the fields len and code are set to the optimal bit length + * and corresponding code. The length opt_len is updated; static_len is + * also updated if stree is not null. The field max_code is set. + */ +function build_tree(s, desc) +// deflate_state *s; +// tree_desc *desc; /* the tree descriptor */ +{ + var tree = desc.dyn_tree; + var stree = desc.stat_desc.static_tree; + var has_stree = desc.stat_desc.has_stree; + var elems = desc.stat_desc.elems; + var n, m; /* iterate over heap elements */ + var max_code = -1; /* largest code with non zero frequency */ + var node; /* new node being created */ + + /* Construct the initial heap, with least frequent element in + * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. + * heap[0] is not used. + */ + s.heap_len = 0; + s.heap_max = HEAP_SIZE; + + for (n = 0; n < elems; n++) { + if (tree[n * 2]/*.Freq*/ !== 0) { + s.heap[++s.heap_len] = max_code = n; + s.depth[n] = 0; + + } else { + tree[n * 2 + 1]/*.Len*/ = 0; + } + } + + /* The pkzip format requires that at least one distance code exists, + * and that at least one bit should be sent even if there is only one + * possible code. So to avoid special checks later on we force at least + * two codes of non zero frequency. + */ + while (s.heap_len < 2) { + node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); + tree[node * 2]/*.Freq*/ = 1; + s.depth[node] = 0; + s.opt_len--; + + if (has_stree) { + s.static_len -= stree[node * 2 + 1]/*.Len*/; + } + /* node is 0 or 1 so it does not have extra bits */ + } + desc.max_code = max_code; + + /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, + * establish sub-heaps of increasing lengths: + */ + for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } + + /* Construct the Huffman tree by repeatedly combining the least two + * frequent nodes. + */ + node = elems; /* next internal node of the tree */ + do { + //pqremove(s, tree, n); /* n = node of least frequency */ + /*** pqremove ***/ + n = s.heap[1/*SMALLEST*/]; + s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; + pqdownheap(s, tree, 1/*SMALLEST*/); + /***/ + + m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ + + s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ + s.heap[--s.heap_max] = m; + + /* Create a new node father of n and m */ + tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; + s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; + tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; + + /* and insert the new node in the heap */ + s.heap[1/*SMALLEST*/] = node++; + pqdownheap(s, tree, 1/*SMALLEST*/); + + } while (s.heap_len >= 2); + + s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; + + /* At this point, the fields freq and dad are set. We can now + * generate the bit lengths. + */ + gen_bitlen(s, desc); + + /* The field len is now set, we can generate the bit codes */ + gen_codes(tree, max_code, s.bl_count); +} + + +/* =========================================================================== + * Scan a literal or distance tree to determine the frequencies of the codes + * in the bit length tree. + */ +function scan_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + s.bl_tree[curlen * 2]/*.Freq*/ += count; + + } else if (curlen !== 0) { + + if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } + s.bl_tree[REP_3_6 * 2]/*.Freq*/++; + + } else if (count <= 10) { + s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; + + } else { + s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; + } + + count = 0; + prevlen = curlen; + + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Send a literal or distance tree in compressed form, using the codes in + * bl_tree. + */ +function send_tree(s, tree, max_code) +// deflate_state *s; +// ct_data *tree; /* the tree to be scanned */ +// int max_code; /* and its largest code of non zero frequency */ +{ + var n; /* iterates over all tree elements */ + var prevlen = -1; /* last emitted length */ + var curlen; /* length of current code */ + + var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ + + var count = 0; /* repeat count of the current code */ + var max_count = 7; /* max repeat count */ + var min_count = 4; /* min repeat count */ + + /* tree[max_code+1].Len = -1; */ /* guard already set */ + if (nextlen === 0) { + max_count = 138; + min_count = 3; + } + + for (n = 0; n <= max_code; n++) { + curlen = nextlen; + nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; + + if (++count < max_count && curlen === nextlen) { + continue; + + } else if (count < min_count) { + do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); + + } else if (curlen !== 0) { + if (curlen !== prevlen) { + send_code(s, curlen, s.bl_tree); + count--; + } + //Assert(count >= 3 && count <= 6, " 3_6?"); + send_code(s, REP_3_6, s.bl_tree); + send_bits(s, count - 3, 2); + + } else if (count <= 10) { + send_code(s, REPZ_3_10, s.bl_tree); + send_bits(s, count - 3, 3); + + } else { + send_code(s, REPZ_11_138, s.bl_tree); + send_bits(s, count - 11, 7); + } + + count = 0; + prevlen = curlen; + if (nextlen === 0) { + max_count = 138; + min_count = 3; + + } else if (curlen === nextlen) { + max_count = 6; + min_count = 3; + + } else { + max_count = 7; + min_count = 4; + } + } +} + + +/* =========================================================================== + * Construct the Huffman tree for the bit lengths and return the index in + * bl_order of the last bit length code to send. + */ +function build_bl_tree(s) { + var max_blindex; /* index of last bit length code of non zero freq */ + + /* Determine the bit length frequencies for literal and distance trees */ + scan_tree(s, s.dyn_ltree, s.l_desc.max_code); + scan_tree(s, s.dyn_dtree, s.d_desc.max_code); + + /* Build the bit length tree: */ + build_tree(s, s.bl_desc); + /* opt_len now includes the length of the tree representations, except + * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. + */ + + /* Determine the number of bit length codes to send. The pkzip format + * requires that at least 4 bit length codes be sent. (appnote.txt says + * 3 but the actual value used is 4.) + */ + for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { + if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { + break; + } + } + /* Update opt_len to include the bit length tree and counts */ + s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; + //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", + // s->opt_len, s->static_len)); + + return max_blindex; +} + + +/* =========================================================================== + * Send the header for a block using dynamic Huffman trees: the counts, the + * lengths of the bit length codes, the literal tree and the distance tree. + * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. + */ +function send_all_trees(s, lcodes, dcodes, blcodes) +// deflate_state *s; +// int lcodes, dcodes, blcodes; /* number of codes for each tree */ +{ + var rank; /* index in bl_order */ + + //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); + //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, + // "too many codes"); + //Tracev((stderr, "\nbl counts: ")); + send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ + send_bits(s, dcodes - 1, 5); + send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ + for (rank = 0; rank < blcodes; rank++) { + //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); + send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); + } + //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ + //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); + + send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ + //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); +} + + +/* =========================================================================== + * Check if the data type is TEXT or BINARY, using the following algorithm: + * - TEXT if the two conditions below are satisfied: + * a) There are no non-portable control characters belonging to the + * "black list" (0..6, 14..25, 28..31). + * b) There is at least one printable character belonging to the + * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). + * - BINARY otherwise. + * - The following partially-portable control characters form a + * "gray list" that is ignored in this detection algorithm: + * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). + * IN assertion: the fields Freq of dyn_ltree are set. + */ +function detect_data_type(s) { + /* black_mask is the bit mask of black-listed bytes + * set bits 0..6, 14..25, and 28..31 + * 0xf3ffc07f = binary 11110011111111111100000001111111 + */ + var black_mask = 0xf3ffc07f; + var n; + + /* Check for non-textual ("black-listed") bytes. */ + for (n = 0; n <= 31; n++, black_mask >>>= 1) { + if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { + return Z_BINARY; + } + } + + /* Check for textual ("white-listed") bytes. */ + if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || + s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + for (n = 32; n < LITERALS; n++) { + if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { + return Z_TEXT; + } + } + + /* There are no "black-listed" or "white-listed" bytes: + * this stream either is empty or has tolerated ("gray-listed") bytes only. + */ + return Z_BINARY; +} + + +var static_init_done = false; + +/* =========================================================================== + * Initialize the tree data structures for a new zlib stream. + */ +function _tr_init(s) +{ + + if (!static_init_done) { + tr_static_init(); + static_init_done = true; + } + + s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); + s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); + s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); + + s.bi_buf = 0; + s.bi_valid = 0; + + /* Initialize the first block of the first file: */ + init_block(s); +} + + +/* =========================================================================== + * Send a stored block + */ +function _tr_stored_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ + copy_block(s, buf, stored_len, true); /* with header */ +} + + +/* =========================================================================== + * Send one empty static block to give enough lookahead for inflate. + * This takes 10 bits, of which 7 may remain in the bit buffer. + */ +function _tr_align(s) { + send_bits(s, STATIC_TREES << 1, 3); + send_code(s, END_BLOCK, static_ltree); + bi_flush(s); +} + + +/* =========================================================================== + * Determine the best encoding for the current block: dynamic trees, static + * trees or store, and output the encoded block to the zip file. + */ +function _tr_flush_block(s, buf, stored_len, last) +//DeflateState *s; +//charf *buf; /* input block, or NULL if too old */ +//ulg stored_len; /* length of input block */ +//int last; /* one if this is the last block for a file */ +{ + var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ + var max_blindex = 0; /* index of last bit length code of non zero freq */ + + /* Build the Huffman trees unless a stored block is forced */ + if (s.level > 0) { + + /* Check if the file is binary or text */ + if (s.strm.data_type === Z_UNKNOWN) { + s.strm.data_type = detect_data_type(s); + } + + /* Construct the literal and distance trees */ + build_tree(s, s.l_desc); + // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + + build_tree(s, s.d_desc); + // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, + // s->static_len)); + /* At this point, opt_len and static_len are the total bit lengths of + * the compressed block data, excluding the tree representations. + */ + + /* Build the bit length tree for the above two trees, and get the index + * in bl_order of the last bit length code to send. + */ + max_blindex = build_bl_tree(s); + + /* Determine the best encoding. Compute the block lengths in bytes. */ + opt_lenb = (s.opt_len + 3 + 7) >>> 3; + static_lenb = (s.static_len + 3 + 7) >>> 3; + + // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", + // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, + // s->last_lit)); + + if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } + + } else { + // Assert(buf != (char*)0, "lost buf"); + opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ + } + + if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { + /* 4: two words for the lengths */ + + /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. + * Otherwise we can't have processed more than WSIZE input bytes since + * the last block flush, because compression would have been + * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to + * transform a block into a stored block. + */ + _tr_stored_block(s, buf, stored_len, last); + + } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { + + send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); + compress_block(s, static_ltree, static_dtree); + + } else { + send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); + send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); + compress_block(s, s.dyn_ltree, s.dyn_dtree); + } + // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); + /* The above check is made mod 2^32, for files larger than 512 MB + * and uLong implemented on 32 bits. + */ + init_block(s); + + if (last) { + bi_windup(s); + } + // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, + // s->compressed_len-7*last)); +} + +/* =========================================================================== + * Save the match info and tally the frequency counts. Return true if + * the current block must be flushed. + */ +function _tr_tally(s, dist, lc) +// deflate_state *s; +// unsigned dist; /* distance of matched string */ +// unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ +{ + //var out_length, in_length, dcode; + + s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; + s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; + + s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; + s.last_lit++; + + if (dist === 0) { + /* lc is the unmatched char */ + s.dyn_ltree[lc * 2]/*.Freq*/++; + } else { + s.matches++; + /* Here, lc is the match length - MIN_MATCH */ + dist--; /* dist = match distance - 1 */ + //Assert((ush)dist < (ush)MAX_DIST(s) && + // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && + // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); + + s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; + s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; + } + +// (!) This block is disabled in zlib defaults, +// don't enable it for binary compatibility + +//#ifdef TRUNCATE_BLOCK +// /* Try to guess if it is profitable to stop the current block here */ +// if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { +// /* Compute an upper bound for the compressed length */ +// out_length = s.last_lit*8; +// in_length = s.strstart - s.block_start; +// +// for (dcode = 0; dcode < D_CODES; dcode++) { +// out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); +// } +// out_length >>>= 3; +// //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", +// // s->last_lit, in_length, out_length, +// // 100L - out_length*100L/in_length)); +// if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { +// return true; +// } +// } +//#endif + + return (s.last_lit === s.lit_bufsize - 1); + /* We avoid equality with lit_bufsize because of wraparound at 64K + * on 16 bit machines and because stored blocks are restricted to + * 64K-1 bytes. + */ +} + +exports._tr_init = _tr_init; +exports._tr_stored_block = _tr_stored_block; +exports._tr_flush_block = _tr_flush_block; +exports._tr_tally = _tr_tally; +exports._tr_align = _tr_align; + + +/***/ }), + +/***/ 2292: +/***/ (function(module) { + +"use strict"; + + +// (C) 1995-2013 Jean-loup Gailly and Mark Adler +// (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin +// +// This software is provided 'as-is', without any express or implied +// warranty. In no event will the authors be held liable for any damages +// arising from the use of this software. +// +// Permission is granted to anyone to use this software for any purpose, +// including commercial applications, and to alter it and redistribute it +// freely, subject to the following restrictions: +// +// 1. The origin of this software must not be misrepresented; you must not +// claim that you wrote the original software. If you use this software +// in a product, an acknowledgment in the product documentation would be +// appreciated but is not required. +// 2. Altered source versions must be plainly marked as such, and must not be +// misrepresented as being the original software. +// 3. This notice may not be removed or altered from any source distribution. + +function ZStream() { + /* next input byte */ + this.input = null; // JS specific, because we have no pointers + this.next_in = 0; + /* number of bytes available at input */ + this.avail_in = 0; + /* total number of input bytes read so far */ + this.total_in = 0; + /* next output byte should be put there */ + this.output = null; // JS specific, because we have no pointers + this.next_out = 0; + /* remaining free space at output */ + this.avail_out = 0; + /* total number of bytes output so far */ + this.total_out = 0; + /* last error message, NULL if no error */ + this.msg = ''/*Z_NULL*/; + /* not visible by applications */ + this.state = null; + /* best guess about the data type: binary or text */ + this.data_type = 2/*Z_UNKNOWN*/; + /* adler32 value of the uncompressed data */ + this.adler = 0; +} + +module.exports = ZStream; + + +/***/ }), + +/***/ 4155: +/***/ (function(module) { + +// shim for using process in browser +var process = module.exports = {}; + +// cached from whatever global is present so that test runners that stub it +// don't break things. But we need to wrap it in a try catch in case it is +// wrapped in strict mode code which doesn't define any globals. It's inside a +// function because try/catches deoptimize in certain engines. + +var cachedSetTimeout; +var cachedClearTimeout; + +function defaultSetTimout() { + throw new Error('setTimeout has not been defined'); +} +function defaultClearTimeout () { + throw new Error('clearTimeout has not been defined'); +} +(function () { + try { + if (typeof setTimeout === 'function') { + cachedSetTimeout = setTimeout; + } else { + cachedSetTimeout = defaultSetTimout; + } + } catch (e) { + cachedSetTimeout = defaultSetTimout; + } + try { + if (typeof clearTimeout === 'function') { + cachedClearTimeout = clearTimeout; + } else { + cachedClearTimeout = defaultClearTimeout; + } + } catch (e) { + cachedClearTimeout = defaultClearTimeout; + } +} ()) +function runTimeout(fun) { + if (cachedSetTimeout === setTimeout) { + //normal enviroments in sane situations + return setTimeout(fun, 0); + } + // if setTimeout wasn't available but was latter defined + if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { + cachedSetTimeout = setTimeout; + return setTimeout(fun, 0); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedSetTimeout(fun, 0); + } catch(e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedSetTimeout.call(null, fun, 0); + } catch(e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error + return cachedSetTimeout.call(this, fun, 0); + } + } + + +} +function runClearTimeout(marker) { + if (cachedClearTimeout === clearTimeout) { + //normal enviroments in sane situations + return clearTimeout(marker); + } + // if clearTimeout wasn't available but was latter defined + if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { + cachedClearTimeout = clearTimeout; + return clearTimeout(marker); + } + try { + // when when somebody has screwed with setTimeout but no I.E. maddness + return cachedClearTimeout(marker); + } catch (e){ + try { + // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally + return cachedClearTimeout.call(null, marker); + } catch (e){ + // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. + // Some versions of I.E. have different rules for clearTimeout vs setTimeout + return cachedClearTimeout.call(this, marker); + } + } + + + +} +var queue = []; +var draining = false; +var currentQueue; +var queueIndex = -1; + +function cleanUpNextTick() { + if (!draining || !currentQueue) { + return; + } + draining = false; + if (currentQueue.length) { + queue = currentQueue.concat(queue); + } else { + queueIndex = -1; + } + if (queue.length) { + drainQueue(); + } +} + +function drainQueue() { + if (draining) { + return; + } + var timeout = runTimeout(cleanUpNextTick); + draining = true; + + var len = queue.length; + while(len) { + currentQueue = queue; + queue = []; + while (++queueIndex < len) { + if (currentQueue) { + currentQueue[queueIndex].run(); + } + } + queueIndex = -1; + len = queue.length; + } + currentQueue = null; + draining = false; + runClearTimeout(timeout); +} + +process.nextTick = function (fun) { + var args = new Array(arguments.length - 1); + if (arguments.length > 1) { + for (var i = 1; i < arguments.length; i++) { + args[i - 1] = arguments[i]; + } + } + queue.push(new Item(fun, args)); + if (queue.length === 1 && !draining) { + runTimeout(drainQueue); + } +}; + +// v8 likes predictible objects +function Item(fun, array) { + this.fun = fun; + this.array = array; +} +Item.prototype.run = function () { + this.fun.apply(null, this.array); +}; +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; +process.version = ''; // empty string to avoid regexp issues +process.versions = {}; + +function noop() {} + +process.on = noop; +process.addListener = noop; +process.once = noop; +process.off = noop; +process.removeListener = noop; +process.removeAllListeners = noop; +process.emit = noop; +process.prependListener = noop; +process.prependOnceListener = noop; + +process.listeners = function (name) { return [] } + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +}; + +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; +process.umask = function() { return 0; }; + + +/***/ }), + +/***/ 3697: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var functionsHaveConfigurableNames = (__webpack_require__(5972).functionsHaveConfigurableNames)(); + +var $Object = Object; +var $TypeError = TypeError; + +module.exports = function flags() { + if (this != null && this !== $Object(this)) { + throw new $TypeError('RegExp.prototype.flags getter called on non-object'); + } + var result = ''; + if (this.hasIndices) { + result += 'd'; + } + if (this.global) { + result += 'g'; + } + if (this.ignoreCase) { + result += 'i'; + } + if (this.multiline) { + result += 'm'; + } + if (this.dotAll) { + result += 's'; + } + if (this.unicode) { + result += 'u'; + } + if (this.sticky) { + result += 'y'; + } + return result; +}; + +if (functionsHaveConfigurableNames && Object.defineProperty) { + Object.defineProperty(module.exports, "name", ({ value: 'get flags' })); +} + + +/***/ }), + +/***/ 2847: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var define = __webpack_require__(4289); +var callBind = __webpack_require__(5559); + +var implementation = __webpack_require__(3697); +var getPolyfill = __webpack_require__(1721); +var shim = __webpack_require__(2753); + +var flagsBound = callBind(getPolyfill()); + +define(flagsBound, { + getPolyfill: getPolyfill, + implementation: implementation, + shim: shim +}); + +module.exports = flagsBound; + + +/***/ }), + +/***/ 1721: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var implementation = __webpack_require__(3697); + +var supportsDescriptors = (__webpack_require__(4289).supportsDescriptors); +var $gOPD = Object.getOwnPropertyDescriptor; + +module.exports = function getPolyfill() { + if (supportsDescriptors && (/a/mig).flags === 'gim') { + var descriptor = $gOPD(RegExp.prototype, 'flags'); + if ( + descriptor + && typeof descriptor.get === 'function' + && typeof RegExp.prototype.dotAll === 'boolean' + && typeof RegExp.prototype.hasIndices === 'boolean' + ) { + /* eslint getter-return: 0 */ + var calls = ''; + var o = {}; + Object.defineProperty(o, 'hasIndices', { + get: function () { + calls += 'd'; + } + }); + Object.defineProperty(o, 'sticky', { + get: function () { + calls += 'y'; + } + }); + if (calls === 'dy') { + return descriptor.get; + } + } + } + return implementation; +}; + + +/***/ }), + +/***/ 2753: +/***/ (function(module, __unused_webpack_exports, __webpack_require__) { + +"use strict"; + + +var supportsDescriptors = (__webpack_require__(4289).supportsDescriptors); +var getPolyfill = __webpack_require__(1721); +var gOPD = Object.getOwnPropertyDescriptor; +var defineProperty = Object.defineProperty; +var TypeErr = TypeError; +var getProto = Object.getPrototypeOf; +var regex = /a/; + +module.exports = function shimFlags() { + if (!supportsDescriptors || !getProto) { + throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); + } + var polyfill = getPolyfill(); + var proto = getProto(regex); + var descriptor = gOPD(proto, 'flags'); + if (!descriptor || descriptor.get !== polyfill) { + defineProperty(proto, 'flags', { + configurable: true, + enumerable: false, + get: polyfill + }); + } + return polyfill; +}; + + +/***/ }), + +/***/ 6099: +/***/ (function(__unused_webpack_module, exports, __webpack_require__) { + +/* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; +;(function (sax) { // wrapper for non-node envs + sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } + sax.SAXParser = SAXParser + sax.SAXStream = SAXStream + sax.createStream = createStream + + // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. + // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), + // since that's the earliest that a buffer overrun could occur. This way, checks are + // as rare as required, but as often as necessary to ensure never crossing this bound. + // Furthermore, buffers are only tested at most once per write(), so passing a very + // large string into write() might have undesirable effects, but this is manageable by + // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme + // edge case, result in creating at most one complete copy of the string passed in. + // Set to Infinity to have unlimited buffers. + sax.MAX_BUFFER_LENGTH = 64 * 1024 + + var buffers = [ + 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', + 'procInstName', 'procInstBody', 'entity', 'attribName', + 'attribValue', 'cdata', 'script' + ] + + sax.EVENTS = [ + 'text', + 'processinginstruction', + 'sgmldeclaration', + 'doctype', + 'comment', + 'opentagstart', + 'attribute', + 'opentag', + 'closetag', + 'opencdata', + 'cdata', + 'closecdata', + 'error', + 'end', + 'ready', + 'script', + 'opennamespace', + 'closenamespace' + ] + + function SAXParser (strict, opt) { + if (!(this instanceof SAXParser)) { + return new SAXParser(strict, opt) + } + + var parser = this + clearBuffers(parser) + parser.q = parser.c = '' + parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH + parser.opt = opt || {} + parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags + parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase' + parser.tags = [] + parser.closed = parser.closedRoot = parser.sawRoot = false + parser.tag = parser.error = null + parser.strict = !!strict + parser.noscript = !!(strict || parser.opt.noscript) + parser.state = S.BEGIN + parser.strictEntities = parser.opt.strictEntities + parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES) + parser.attribList = [] + + // namespaces form a prototype chain. + // it always points at the current tag, + // which protos to its parent tag. + if (parser.opt.xmlns) { + parser.ns = Object.create(rootNS) + } + + // mostly just for error reporting + parser.trackPosition = parser.opt.position !== false + if (parser.trackPosition) { + parser.position = parser.line = parser.column = 0 + } + emit(parser, 'onready') + } + + if (!Object.create) { + Object.create = function (o) { + function F () {} + F.prototype = o + var newf = new F() + return newf + } + } + + if (!Object.keys) { + Object.keys = function (o) { + var a = [] + for (var i in o) if (o.hasOwnProperty(i)) a.push(i) + return a + } + } + + function checkBufferLength (parser) { + var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) + var maxActual = 0 + for (var i = 0, l = buffers.length; i < l; i++) { + var len = parser[buffers[i]].length + if (len > maxAllowed) { + // Text/cdata nodes can get big, and since they're buffered, + // we can get here under normal conditions. + // Avoid issues by emitting the text node now, + // so at least it won't get any bigger. + switch (buffers[i]) { + case 'textNode': + closeText(parser) + break + + case 'cdata': + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + break + + case 'script': + emitNode(parser, 'onscript', parser.script) + parser.script = '' + break + + default: + error(parser, 'Max buffer length exceeded: ' + buffers[i]) + } + } + maxActual = Math.max(maxActual, len) + } + // schedule the next check for the earliest possible buffer overrun. + var m = sax.MAX_BUFFER_LENGTH - maxActual + parser.bufferCheckPosition = m + parser.position + } + + function clearBuffers (parser) { + for (var i = 0, l = buffers.length; i < l; i++) { + parser[buffers[i]] = '' + } + } + + function flushBuffers (parser) { + closeText(parser) + if (parser.cdata !== '') { + emitNode(parser, 'oncdata', parser.cdata) + parser.cdata = '' + } + if (parser.script !== '') { + emitNode(parser, 'onscript', parser.script) + parser.script = '' + } + } + + SAXParser.prototype = { + end: function () { end(this) }, + write: write, + resume: function () { this.error = null; return this }, + close: function () { return this.write(null) }, + flush: function () { flushBuffers(this) } + } + + var Stream + try { + Stream = (__webpack_require__(2830).Stream) + } catch (ex) { + Stream = function () {} + } + + var streamWraps = sax.EVENTS.filter(function (ev) { + return ev !== 'error' && ev !== 'end' + }) + + function createStream (strict, opt) { + return new SAXStream(strict, opt) + } + + function SAXStream (strict, opt) { + if (!(this instanceof SAXStream)) { + return new SAXStream(strict, opt) + } + + Stream.apply(this) + + this._parser = new SAXParser(strict, opt) + this.writable = true + this.readable = true + + var me = this + + this._parser.onend = function () { + me.emit('end') + } + + this._parser.onerror = function (er) { + me.emit('error', er) + + // if didn't throw, then means error was handled. + // go ahead and clear error, so we can write again. + me._parser.error = null + } + + this._decoder = null + + streamWraps.forEach(function (ev) { + Object.defineProperty(me, 'on' + ev, { + get: function () { + return me._parser['on' + ev] + }, + set: function (h) { + if (!h) { + me.removeAllListeners(ev) + me._parser['on' + ev] = h + return h + } + me.on(ev, h) + }, + enumerable: true, + configurable: false + }) + }) + } + + SAXStream.prototype = Object.create(Stream.prototype, { + constructor: { + value: SAXStream + } + }) + + SAXStream.prototype.write = function (data) { + if (typeof Buffer === 'function' && + typeof Buffer.isBuffer === 'function' && + Buffer.isBuffer(data)) { + if (!this._decoder) { + var SD = (__webpack_require__(2553)/* .StringDecoder */ .s) + this._decoder = new SD('utf8') + } + data = this._decoder.write(data) + } + + this._parser.write(data.toString()) + this.emit('data', data) + return true + } + + SAXStream.prototype.end = function (chunk) { + if (chunk && chunk.length) { + this.write(chunk) + } + this._parser.end() + return true + } + + SAXStream.prototype.on = function (ev, handler) { + var me = this + if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { + me._parser['on' + ev] = function () { + var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) + args.splice(0, 0, ev) + me.emit.apply(me, args) + } + } + + return Stream.prototype.on.call(me, ev, handler) + } + + // this really needs to be replaced with character classes. + // XML allows all manner of ridiculous numbers and digits. + var CDATA = '[CDATA[' + var DOCTYPE = 'DOCTYPE' + var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' + var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/' + var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } + + // http://www.w3.org/TR/REC-xml/#NT-NameStartChar + // This implementation works on strings, a single character at a time + // as such, it cannot ever support astral-plane characters (10000-EFFFF) + // without a significant breaking change to either this parser, or the + // JavaScript language. Implementation of an emoji-capable xml parser + // is left as an exercise for the reader. + var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + + var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + + var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ + var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ + + function isWhitespace (c) { + return c === ' ' || c === '\n' || c === '\r' || c === '\t' + } + + function isQuote (c) { + return c === '"' || c === '\'' + } + + function isAttribEnd (c) { + return c === '>' || isWhitespace(c) + } + + function isMatch (regex, c) { + return regex.test(c) + } + + function notMatch (regex, c) { + return !isMatch(regex, c) + } + + var S = 0 + sax.STATE = { + BEGIN: S++, // leading byte order mark or whitespace + BEGIN_WHITESPACE: S++, // leading whitespace + TEXT: S++, // general stuff + TEXT_ENTITY: S++, // & and such. + OPEN_WAKA: S++, // < + SGML_DECL: S++, // + SCRIPT: S++, // + + + diff --git a/install/cws-ui/history.ftl b/install/cws-ui/history.ftl index 4fffc135..d13ad6dd 100644 --- a/install/cws-ui/history.ftl +++ b/install/cws-ui/history.ftl @@ -9,11 +9,19 @@ + + @@ -321,6 +492,7 @@ <#include "navbar.ftl">
@@ -352,18 +551,21 @@
- - - - - - + + + + + + + +
Time StampTypeSourceDetails
Time StampTypeSourceDetails
+ - + \ No newline at end of file diff --git a/install/cws-ui/processes.ftl b/install/cws-ui/processes.ftl index 601bad3e..4ebe70e6 100644 --- a/install/cws-ui/processes.ftl +++ b/install/cws-ui/processes.ftl @@ -4,13 +4,25 @@ CWS - Processes + + + + + + + + @@ -16,12 +19,13 @@ @@ -491,42 +550,40 @@ <#include "navbar.ftl"> -
+

History

- - - - - - - - - - - - - - - - - - - -
Process DefinitionUnknown
Process Instance IDUnknown
Start TimeN/A
End TimeN/A
DurationN/A
StatusUnknown
+ + + + + + + + + + + + + + + + + + + +
Process DefinitionUnknown
Process Instance IDUnknown
Start TimeN/A
End TimeN/A
DurationN/A
StatusUnknown
- -
- +
+ + + + + + + +
Input VariableValue
- +
@@ -565,7 +622,6 @@
- \ No newline at end of file diff --git a/install/cws-ui/processes.ftl b/install/cws-ui/processes.ftl index c0d0618d..9a660fde 100644 --- a/install/cws-ui/processes.ftl +++ b/install/cws-ui/processes.ftl @@ -31,6 +31,15 @@ #processes-table { font-size: 90%; } + summary::before { + margin-right: .5ch; + content: '▶️'; + transition: 0.2s; + } + + details[open] summary::before { + transform: rotate(90deg); + } @@ -119,10 +128,8 @@ - + - - @@ -130,6 +137,7 @@ + @@ -365,6 +373,7 @@ } } } + function viewHistory(procInstId) { @@ -455,9 +464,8 @@ table.row.add( $(""+ "" + - "" + - "" + - "" + + "" + ""+ "" + ""+ @@ -465,6 +473,7 @@ ""+ ""+ ""+ + ""+ "") ); } @@ -690,6 +699,10 @@ }); } + function copyInput(varValue) { + navigator.clipboard.writeText(varValue); + } + // -------------------------------------------------------------------------------- // Function fired when user clicks on "Retry Selected Failed to Start Rows..." in drop-down list // @@ -1278,80 +1291,97 @@ var startedOnWorker = ""; var workerIP = ""; var duration = ""; + var process_end = ""; + var inputVars = ""; + var inputVarsTemp = ""; if (data[8] !== "") { - startedOnWorker = data[8]; - startedOnWorker = startedOnWorker.substring(0, startedOnWorker.indexOf("
")); - - workerIP = data[8]; - //get everything after - workerIP = workerIP.substring(workerIP.indexOf("") + 4, workerIP.length); + startedOnWorker = data[6].substring(0, data[6].indexOf("
")); + workerIP = data[6].substring(data[6].indexOf("")+4, data[6].length); } else { - startedOnWorker = data[8]; - workerIP = ""; + startedOnWorker = data[6]; } - if (data[10] !== "") { - duration = data[10]; + if (data[8] !== "") { + duration = data[8]; //get everything after
but before duration = duration.substring(duration.indexOf("
") + 7, duration.indexOf("")); - } else { - duration = ""; + process_end = data[8].substring(0, data[8].indexOf("
")-1); } - thisProcJSON["definition_key"] = data[4]; - thisProcJSON["process_instance_id"] = data[5]; - thisProcJSON["status"] = data[6]; - thisProcJSON["initiator"] = data[3]; - thisProcJSON["schedule_queued_time"] = data[7]; + if (data[9] !== "") { + inputVarsTemp = data[9].replaceAll("
", ", "); + inputVarsTemp = inputVarsTemp.replaceAll("
Show All", ""); + while (inputVarsTemp.indexOf("") !== -1) { + inputVarsTemp = inputVarsTemp.substring(inputVarsTemp.indexOf("") + 3, inputVarsTemp.length); + inputVarsTemp = inputVarsTemp.replace("", "") + inputVars += inputVarsTemp.substring(0, inputVarsTemp.indexOf("")) + ", "; + } + inputVars = inputVars.substring(0, inputVars.length - 2); + } + + thisProcJSON["definition_key"] = data[2]; + thisProcJSON["process_instance_id"] = data[3]; + thisProcJSON["status"] = data[4]; + thisProcJSON["schedule_queued_time"] = data[5]; thisProcJSON["started_on_worker"] = startedOnWorker; thisProcJSON["worker_ip"] = workerIP; - thisProcJSON["process_start"] = data[9]; - thisProcJSON["process_end"] = data[10]; + thisProcJSON["process_start"] = data[7]; + thisProcJSON["process_end"] = process_end; thisProcJSON["duration"] = duration; + thisProcJSON["input_variables"] = inputVars; - processes[data[5]] = thisProcJSON; + processes[data[3]] = thisProcJSON; } ); } else { - dt.rows({selected:true, search:'applied'}).every( function ( rowIdx, tableLoop, rowLoop ) { + dt.rows({selected: true, search:'applied'}).every( function ( rowIdx, tableLoop, rowLoop ) { var data = this.data(); var thisProcJSON = {}; var startedOnWorker = ""; var workerIP = ""; var duration = ""; + var process_end = ""; + var inputVars = ""; + var inputVarsTemp = ""; if (data[8] !== "") { - startedOnWorker = data[8]; - startedOnWorker = startedOnWorker.substring(0, startedOnWorker.indexOf("
")); - - workerIP = data[8]; - //get everything after - workerIP = workerIP.substring(workerIP.indexOf("") + 4, workerIP.length); + startedOnWorker = data[6].substring(0, data[6].indexOf("
")); + workerIP = data[6].substring(data[6].indexOf("")+4, data[6].length); } else { - startedOnWorker = data[8]; - workerIP = ""; + startedOnWorker = data[6]; } - if (data[10] !== "") { - duration = data[10]; + if (data[8] !== "") { + duration = data[8]; //get everything after
but before duration = duration.substring(duration.indexOf("
") + 7, duration.indexOf("")); - } else { - duration = ""; + process_end = data[8].substring(0, data[8].indexOf("
")-1); + + } + + if (data[9] !== "") { + inputVarsTemp = data[9].replaceAll("
", ", "); + inputVarsTemp = inputVarsTemp.replaceAll("
Show All", ""); + while (inputVarsTemp.indexOf("") !== -1) { + inputVarsTemp = inputVarsTemp.substring(inputVarsTemp.indexOf("") + 3, inputVarsTemp.length); + inputVarsTemp = inputVarsTemp.replace("", "") + inputVars += inputVarsTemp.substring(0, inputVarsTemp.indexOf("")) + ", "; + } + inputVars = inputVars.substring(0, inputVars.length - 2); } - thisProcJSON["definition_key"] = data[4]; - thisProcJSON["process_instance_id"] = data[5]; - thisProcJSON["status"] = data[6]; - thisProcJSON["initiator"] = data[3]; - thisProcJSON["schedule_queued_time"] = data[7]; + thisProcJSON["definition_key"] = data[2]; + thisProcJSON["process_instance_id"] = data[3]; + thisProcJSON["status"] = data[4]; + thisProcJSON["schedule_queued_time"] = data[5]; thisProcJSON["started_on_worker"] = startedOnWorker; thisProcJSON["worker_ip"] = workerIP; - thisProcJSON["process_start"] = data[9]; - thisProcJSON["process_end"] = data[10]; + thisProcJSON["process_start"] = data[7]; + thisProcJSON["process_end"] = process_end; thisProcJSON["duration"] = duration; + thisProcJSON["input_variables"] = inputVars; - processes[data[5]] = thisProcJSON; + processes[data[3]] = thisProcJSON; } ); } jsonFile["processes"] = processes; From 48b7b7f3c967d7dcd56e4f176f2f075091e77f5b Mon Sep 17 00:00:00 2001 From: Will Gunter <74369489+wcgunter@users.noreply.github.com> Date: Thu, 6 Jul 2023 11:47:27 -0700 Subject: [PATCH 09/24] UI - Update history page for clarity and interactability (#157) * Display more detail on status on history page * Add "mark as resolved" button to history page * Update processes test * Remove unnecessary API call --- .../java/jpl/cws/controller/RestService.java | 16 +- .../test/integration/ui/ProcessesTestIT.java | 6 +- install/cws-ui/history.ftl | 199 +++++++++++++----- 3 files changed, 161 insertions(+), 60 deletions(-) diff --git a/cws-service/src/main/java/jpl/cws/controller/RestService.java b/cws-service/src/main/java/jpl/cws/controller/RestService.java index 79325599..12cd6d70 100644 --- a/cws-service/src/main/java/jpl/cws/controller/RestService.java +++ b/cws-service/src/main/java/jpl/cws/controller/RestService.java @@ -1120,7 +1120,20 @@ public GsonUTCDateAdapter() { } return size; } - + + @RequestMapping(value="/history/getStatus/{procInstId}", method = GET) + public @ResponseBody String getStatusByProcInstId( + @PathVariable String procInstId) { + List instances = null; + instances = cwsConsoleService.getFilteredProcessInstancesCamunda( + null, procInstId, null, null, null, null, "DESC", 1); + if (instances.size() == 0) { + return null; + } else { + return instances.get(0).getStatus(); + } + } + /** * REST method used to get Processes table JSON @@ -1306,7 +1319,6 @@ public GsonUTCDateAdapter() { return ResponseEntity.ok("{ \"status\" : \"success\", \"message\" : \"Updated " + numRowsUpdated + " rows.\"}"); } - /** * * diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/ProcessesTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/ProcessesTestIT.java index fd3d3c69..14f4d18a 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/ProcessesTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/ProcessesTestIT.java @@ -64,7 +64,7 @@ public void runStatusCompleteTest() throws IOException { log.info("------ START ProcessesTestIT:runStatusCompleteTest ------"); goToPage("processes"); - + log.info("Getting info from table..."); wait.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.tagName("table"))); WebElement myTable = driver.findElement(By.tagName("table")); @@ -72,7 +72,7 @@ public void runStatusCompleteTest() throws IOException { List myRows = myTable.findElements(By.tagName("tr")); sleep(8000); - + log.info("Locating Test Processes Page from table rows and verifying that it completed."); waitForElementXPath("//div[@id=\'processes-table_filter\']/label/input"); @@ -92,7 +92,7 @@ public void runStatusCompleteTest() throws IOException { scriptPass = false; } log.info("------ END ProcessesTestIT:runStatusCompleteTest:runStatusCompleteTest ------"); - } + } catch (Throwable e) { System.out.println(e.toString()); scriptPass = false; diff --git a/install/cws-ui/history.ftl b/install/cws-ui/history.ftl index a4277297..4c7f644e 100644 --- a/install/cws-ui/history.ftl +++ b/install/cws-ui/history.ftl @@ -14,7 +14,8 @@ @@ -224,16 +225,76 @@ $('#procDuration').html(convertMillis(data.duration)); } - var status = data.state; - - if (data.state === "COMPLETED") { - status = "Complete"; - } - else if (data.state === "ACTIVE") { - status = "Running"; + $.ajax({ + type: "GET", + url: "/${base}/rest/history/getStatus/" + data.procInstId, + success: function(data) { + var status = data; + switch (data) { + case "pending": + status = "Pending"; + $("#procStatus").css("color", "blue"); + break; + case "disabled": + status = "Disabled"; + $("#procStatus").css("color", "red"); + break; + case "failedToSchedule": + status = "Failed to schedule"; + $("#procStatus").css("color", "red"); + break; + case "claimedByWorker": + status = "Claimed by Worker"; + $("#procStatus").css("color", "blue"); + break; + case "failedToStart": + status = "Failed to start"; + $("#procStatus").css("color", "red"); + break; + case "running": + status = "Running"; + $("#procStatus").css("color", "blue"); + break; + case "complete": + status = "Complete"; + $("#procStatus").css("color", "green"); + break; + case "resolved": + status = "Resolved"; + $("#procStatus").css("color", "green"); + break; + case "fail": + status = "Failed"; + $("#procStatus").css("color", "red"); + break; + case "incident": + status = "Incident"; + $("#procStatus").css("color", "red"); + break; + default: + status = "Unknown"; + $("#procStatus").css("color", "red"); + break; + } + $('#procStatus').html(status); + if ($("#procStatus").text() == "Failed") { + $("#resolveButtonDiv").show(); + $("#resolveButton").show(); + $("#retryIncidentButton").hide(); + } else if ($("#procStatus").text() == "Incident") { + $("#resolveButtonDiv").show(); + $("#retryIncidentButton").show(); + $("#resolveButton").hide(); + } else { + $("#resolveButtonDiv").hide(); + $("#resolveButton").hide(); + $("#retryIncidentButton").hide(); + } + }, + error: function(e) { + $("procStatus").html("Error fetching status - please try again later."); } - - $('#procStatus').html(status); + }); } setInputVariableTable(inputVarRows); @@ -429,24 +490,62 @@ $("#procInstId").text() + '.json' ); } + + function retryIncident(procInstId) { + var idArr = [procInstId]; + $.ajax({ + type: "POST", + url: "/${base}/rest/processes/retryIncidentRows", + Accept : "application/json", + contentType: "application/json", + dataType: "json", + data: JSON.stringify(idArr), + }) + .done(function(msg) { + console.log(msg); + location.reload(); + }) + .fail(function(xhr, err) { + console.err(msg); + }); + } + + function markAsResolved(procInstId) { + var idArr = [procInstId]; + $.ajax({ + type: "POST", + url: "/${base}/rest/processes/markResolved", + Accept : "application/json", + contentType: "application/json", + dataType: "json", + data: JSON.stringify(idArr), + }) + .done(function(msg) { + console.log(msg); + location.reload(); + }) + .fail(function(xhr, err) { + console.err(xhr.responseTextmsg.message); + }); + } $( document ).ready(function() { $("#logData").DataTable({ - order: [[0, 'asc']], + order: [[0, 'desc']], paging: false, - dom: "<'row'<'col-sm-2 button'><'col-sm-auto filter'f>>" + "ti", + dom: "<'row'<'col-sm-2 download-button'><'col-sm-10 filter'f>>" + "tip", }); - $(``).appendTo("div.button"); + $('').appendTo(".download-button"); // Get query string values params = getQueryString(); @@ -554,26 +653,26 @@

History

-
Select Initiator Definition Key Proc Inst ID StatusStarted on Worker Process Start Process EndInput Variables
HistorySubprocs"+ (res[i].initiationKey == undefined ? '' : res[i].initiationKey) + "History" + + "Subprocs"+ res[i].procDefKey +""+ (res[i].status == 'incident' ? ("" + procInstId + "") : procInstId) + ""+ res[i].status +""+ (res[i].startedByWorker == undefined ? '' : res[i].startedByWorker + workerIP) + ""+ procStartTime + ""+ procEndTime + procDuration + ""+ (res[i].inputVariables == undefined ? '' : res[i].inputVariables) + "
- - - - - - - - - - - - - - - - - - -
Process DefinitionUnknown
Process Instance IDUnknown
Start TimeN/A
End TimeN/A
DurationN/A
StatusUnknown
+ + + + + + + + + + + + + + + + + + + +
Process DefinitionUnknown
Process Instance IDUnknown
Start TimeN/A
End TimeN/A
DurationN/A
Status
@@ -585,20 +684,10 @@
- +
From 07ce03d56bda3c8270d99a14e59009a8337b846a Mon Sep 17 00:00:00 2001 From: Will Gunter <74369489+wcgunter@users.noreply.github.com> Date: Thu, 6 Jul 2023 13:32:04 -0700 Subject: [PATCH 10/24] Update to DataTables tables on workers page (#158) --- install/cws-ui/workers.ftl | 50 +++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/install/cws-ui/workers.ftl b/install/cws-ui/workers.ftl index 3e362dca..552c3149 100644 --- a/install/cws-ui/workers.ftl +++ b/install/cws-ui/workers.ftl @@ -5,6 +5,8 @@ + + @@ -196,6 +198,30 @@ refreshStats(); pageRefId = setInterval(pageRefresh, refreshRate); + + $("#workers-table").DataTable({ + columnDefs: [ + { orderable: false, targets: 3 }, + { orderable: false, targets: 4 } + ], + order: [[0, 'asc']] + }); + $("#ext-workers-table").DataTable({ + order: [[0, 'asc']] + }); + $("#amq-clients-table").DataTable({ + order: [[0, 'asc']] + }); + + if(localStorage.getItem(hideDownWorkersVar) === "1") { + $("#hide-down-btn").prop("checked", true); + var table = $('#workers-table').DataTable(); + table.columns(1).search("up").draw(); + } else { + $("#hide-down-btn").prop("checked", false); + var table = $('#workers-table').DataTable(); + table.columns(1).search("").draw(); + } }); function pageRefresh(){ @@ -376,7 +402,7 @@

AMQ Clients

- +
@@ -413,30 +439,16 @@ From 9f04832dcc48407f2bb439f892b76858569aa7fe Mon Sep 17 00:00:00 2001 From: Josh Haile <35245966+voxparcxls@users.noreply.github.com> Date: Thu, 6 Jul 2023 14:50:59 -0700 Subject: [PATCH 11/24] IDS-9940: LDAP User Attributes Validation (#149) * ldap attributes in .properties * add LDAP user info validation step * steps to verify ldap user and validate user info * updated interactive mode for LDAP prompts * add warning message for ldap failure * modify error message * ldap attribute sentence - mail * ldap prompt - update warning message * output for specific attribute missing * return specific missing LDAP attributes in error message * modify fix options --- .../main/java/jpl/cws/task/CwsInstaller.java | 338 ++++++++++++++++-- 1 file changed, 308 insertions(+), 30 deletions(-) diff --git a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java index 0fd50f29..47d412d1 100644 --- a/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java +++ b/cws-installer/src/main/java/jpl/cws/task/CwsInstaller.java @@ -58,9 +58,15 @@ import java.sql.Statement; import java.sql.Timestamp; import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; import java.util.Calendar; import java.util.HashSet; import java.util.TimeZone; +import javax.naming.AuthenticationNotSupportedException; +import javax.naming.AuthenticationException; +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; import javax.tools.ToolProvider; @@ -241,8 +247,8 @@ public static void main(String args[]) { if (!reconfigure && !installConsole) { deleteCwsUiWebApp(); } - setIdentityPluginType(); setupDatabase(); + setIdentityPluginType(); setupAdminUser(); setupNotificationEmails(); setupTokenExpirationHours(); @@ -734,20 +740,83 @@ private static void setupDatabase() { private static void setupAdminUser() { cws_user = getPreset("admin_user"); + String manually_provide_admin_info = ""; if (cws_installer_mode.equals("interactive")) { if (cws_user == null) { if (cws_auth_scheme.equalsIgnoreCase("LDAP")) { - cws_user = readRequiredLine("Enter name of LDAP user to be used as initial administrator: ", - "Must specify a LDAP username!"); + boolean valid_ldap_user = false; + while (!valid_ldap_user) { + cws_user = readRequiredLine("Enter name of LDAP user to be used as initial administrator: ", + "Must specify an LDAP username!"); + try { + String read_provide_admin_info = ""; + Path pluginBeanFilePath = Paths.get(config_templates_dir + SEP + "tomcat_conf" + SEP + "ldap_plugin_bean.xml"); + String ldapBaseDn = getLdapBaseDnValue(pluginBeanFilePath); + boolean verifyLdapUserInfo = verifyLdapUserInfoRetrieval(cws_ldap_url,ldapBaseDn, cws_user); + + if (verifyLdapUserInfo) { + valid_ldap_user = verifyLdapUserInfo; + } else { + print(" WARNING: CWS Installer could not retrieve LDAP User Information."); + print(" **RECOMMENDATION**: Set up your LDAP Admin account with the"); + print(" following LDAP attributes: givenName, sn, mail."); + print(" And restart the CWS installation process."); + while (!read_provide_admin_info.equalsIgnoreCase("y") && + !read_provide_admin_info.equalsIgnoreCase("n")) { + + read_provide_admin_info = + readRequiredLine("Do you want to manually provide administrator first name, last name, and email? (Y/N): ", + "ERROR: Must specify either 'Y' or 'N'"); + } + manually_provide_admin_info = read_provide_admin_info.toLowerCase(); + if (manually_provide_admin_info.equalsIgnoreCase("y")) { + valid_ldap_user = true; + } + } + } catch(IOException e) { + // exception + } + } } else { cws_user = readRequiredLine("Enter username to be used as initial administrator: ", "Must specify a username!"); } } else { if (cws_auth_scheme.equalsIgnoreCase("LDAP")) { - cws_user = readLine("Enter name of LDAP user to be used as initial administrator. " + - "Default is " + cws_user + ": ", cws_user); + boolean valid_ldap_user = false; + while (!valid_ldap_user) { + cws_user = readLine("Enter name of LDAP user to be used as initial administrator. " + + "Default is " + cws_user + ": ", cws_user); + try { + String read_provide_admin_info = ""; + Path pluginBeanFilePath = Paths.get(config_templates_dir + SEP + "tomcat_conf" + SEP + "ldap_plugin_bean.xml"); + String ldapBaseDn = getLdapBaseDnValue(pluginBeanFilePath); + boolean verifyLdapUserInfo = verifyLdapUserInfoRetrieval(cws_ldap_url,ldapBaseDn, cws_user); + + if (verifyLdapUserInfo) { + valid_ldap_user = verifyLdapUserInfo; + } else { + print(" WARNING: CWS Installer could not retrieve LDAP User Information."); + print(" **RECOMMENDATION**: Set up your LDAP Admin account with the"); + print(" following LDAP attributes: givenName, sn, mail."); + print(" And restart the CWS installation process."); + while (!read_provide_admin_info.equalsIgnoreCase("y") && + !read_provide_admin_info.equalsIgnoreCase("n")) { + + read_provide_admin_info = + readRequiredLine("Do you want to manually provide administrator first name, last name, and email? (Y/N): ", + "ERROR: Must specify either 'Y' or 'N'"); + } + manually_provide_admin_info = read_provide_admin_info.toLowerCase(); + if (manually_provide_admin_info.equalsIgnoreCase("y")) { + valid_ldap_user = true; + } + } + } catch(IOException e) { + // exception + } + } } else { cws_user = readLine("Enter username to be used as initial administrator. " + "Default is " + cws_user + ": ", cws_user); @@ -759,8 +828,8 @@ private static void setupAdminUser() { } } - // Prompt only for CAMUNDA security scheme - if (cws_auth_scheme.equalsIgnoreCase("CAMUNDA")) { + // Prompt only for CAMUNDA security scheme OR if user wants to manually enter firstname, lastname, and email + if (cws_auth_scheme.equalsIgnoreCase("CAMUNDA") || manually_provide_admin_info.equalsIgnoreCase("y")) { cws_user_firstname = getPreset("admin_firstname"); if (cws_installer_mode.equals("interactive")) { @@ -1660,6 +1729,13 @@ private static void validateConfig() { print("VALIDATING CONFIGURATION... Please wait, this may take some time..."); warningCount += validateDbConfig(); + if (cws_auth_scheme.equals("LDAP")) { + try { + warningCount += validateLdapUserConfig(); + } catch(IOException e) { + // exception + } + } warningCount += validateTomcatPorts(); boolean timeSyncMissing = validateTimeSyncService() == 1; @@ -1863,6 +1939,172 @@ private static int validateDbConfig() { return warningCount; } + private static int validateLdapUserConfig() throws IOException { + int warningCount = 0; + // VALIDATE LDAP or CAM CONFIGURATION AND LDAP USER INFO RETREIVEL + print(""); + if (cws_auth_scheme.equals("LDAP")) { + print("checking that user provided LDAP authentication profile (UID: " + cws_user + ") is valid..."); + } + + Path pluginBeanFilePath = Paths.get(config_templates_dir + SEP + "tomcat_conf" + SEP + "ldap_plugin_bean.xml"); + String ldapBaseDn = getLdapBaseDnValue(pluginBeanFilePath); + boolean verifyLdapUserInfo = verifyLdapUserInfoRetrieval(cws_ldap_url,ldapBaseDn, cws_user); + + if (verifyLdapUserInfo == false) { + print(" [WARNING]"); + print(" It was determined that your CWS Admin User ID '" + cws_user + "' did not return a user first name, last name, and email."); + print(" You must satisfy these LDAP requirements before installing CWS with CWS Admin User ID '" + cws_user + "'"); + print(" (1) Make sure your LDAP account holds the properties: givenName, sn, mail "); + print(" (2) Check your host machine for proper installation of LDAP Server Certificates "); + print(" (3) Verify the LDAP plugin bean has the correct properties "); + print(" Plugin bean filepath: " + pluginBeanFilePath.toString() ); + print(" "); + + + if (cws_installer_mode.equals("interactive")) { + if (cws_user_firstname == null || cws_user_lastname == null || cws_user_email == null) { + return 1; + } else { + print(" CWS installation will default to using the following presets:"); + print(" admin_firstname=" + cws_user_firstname); + print(" admin_lastname=" + cws_user_lastname); + print(" admin_email=" + cws_user_email); + print(" "); + } + } else { + if (getPreset("admin_firstname") == null || getPreset("admin_lastname") == null || getPreset("admin_email") == null) { + print(" POSSIBLE FIXES: "); + print(" - Option #1: (RECOMMENDED) Update your LDAP Admin account '" + cws_user + "' with the following"); + print(" LDAP attributes: givenName, sn, mail. And restart the CWS installation process."); + print(" - Option #2: Include these 3 settings with assigned values in your configuration.properties file:"); + print(" - admin_firstname=[VALUE]"); + print(" - admin_lastname=[VALUE]"); + print(" - admin_email=[VALUE]"); + print(" "); + return 1; + } else { + print(" CWS installation will default to using the following presets:"); + print(" admin_firstname=" + getPreset("admin_firstname")); + print(" admin_lastname=" + getPreset("admin_lastname")); + print(" admin_email=" + getPreset("admin_email")); + print(" "); + } + } + + print(" [OK]"); + + } else { + print(" [OK]"); + } + return warningCount; + } + + private static boolean verifyLdapUserInfoRetrieval(String ldapUrl, String searchBaseDn, String ldapUid) { + // + // Verify that LDAP Admin User has properties givenName, sn, and mail + // + Hashtable env = new Hashtable(); + env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); + env.put(Context.PROVIDER_URL, ldapUrl); + String[] attributeFilter = {"givenName", "sn", "mail"}; + List attributesNotFound = new ArrayList<>(); + + try { + DirContext ctx = new InitialDirContext(env); + SearchControls ctrl = new SearchControls(); + ctrl.setReturningAttributes(attributeFilter); + ctrl.setSearchScope(SearchControls.SUBTREE_SCOPE); + + String filter = "(&(uid=" + ldapUid + "))"; + NamingEnumeration results = ctx.search(searchBaseDn, filter, ctrl); + if (!results.hasMore()) { + return false; + } + while (results.hasMore()) { + SearchResult result = (SearchResult) results.next(); + Attributes attrs = result.getAttributes(); + // First name attribute - givenName + Attribute givenNameAttr = attrs.get("givenName"); + // Last name attribute - sn + Attribute snAttr = attrs.get("sn"); + // Email attribute - mail + Attribute mailAttr = attrs.get("mail"); + if (givenNameAttr == null || snAttr == null || mailAttr == null) { + if (givenNameAttr == null) { + attributesNotFound.add("givenName"); + } + if (snAttr == null) { + attributesNotFound.add("sn"); + } + if (mailAttr == null) { + attributesNotFound.add("mail"); + } + print(" ERROR: LDAP Admin ID '" + ldapUid + "' is missing attribute(s) - " + attributesNotFound); + return false; + } + } + ctx.close(); + } catch (AuthenticationNotSupportedException e) { + print(" ERROR: LDAP authentication failed with server " + ldapUrl + " (" + e.getMessage() + ")"); + return false; + } catch (AuthenticationException e) { + print(" ERROR: LDAP authentication error: " + e.getMessage()); + return false; + } catch (NamingException e) { + print(" ERROR: LDAP JNDI API context error: " + e.getMessage()); + return false; + } + return true; + } + + private static String getLdapBaseDnValue(Path beanFilePath) throws IOException { + // + // Get and return LDAP baseDn, userSearchBase to validate LDAP user info + // + String propertyBase = ""; + String base = ""; + String propertySearchBase = ""; + String[] identityAttributes = new String[3]; + String[] attributeFilter = {"givenName", "sn", "mail"}; + + try { + String fileContent = new String(Files.readAllBytes(beanFilePath)); + String repl = ""; + String replContent = fileContent.substring(0, fileContent.indexOf(" Date: Thu, 13 Jul 2023 10:36:55 -0700 Subject: [PATCH 12/24] UI - Bug Fixes #1 & Restoring Server Side Filtering (Processes) (#160) * Remove downdown for download (button only now) * Move Processes page list export under Actions bttn * Fix copy history links / open all in new tabs * Add ability to hide/show columns * Update width of input variables * Fix width issue * Remove workerID input var from proc list * Fix infinite refresh if page not visited before * Update process parsing methods to speedup loading * Get state search from URL * Auto-filter based on URL request * Move log download functions to common js * Update number of processes returned per api call * Update tooltip, remove unnecessary css * Sort history so earliest is first * Move input vars into existing table * Fix arrow issue & reconsile with history page * Show "None" if no input vars are set * Get console logs (error) * Add sleep * Restore server-side filtering, fix tooltip url --- .../jpl/cws/core/db/SchedulerDbService.java | 1025 ++++++------ .../java/jpl/cws/controller/RestService.java | 32 +- .../jpl/cws/scheduler/CwsProcessInstance.java | 9 +- .../jpl/cws/service/CwsConsoleService.java | 47 +- .../test/integration/ui/HistoryTestIT.java | 3 +- .../test/integration/ui/InitiatorsTestIT.java | 16 + cws-ui/src/main/webapp/css/dashboard.css | 58 - cws-ui/src/main/webapp/css/microtip.css | 266 ++++ .../src/main/webapp/images/tooltip-bottom.svg | 1 + .../src/main/webapp/images/tooltip-left.svg | 1 + .../src/main/webapp/images/tooltip-right.svg | 1 + cws-ui/src/main/webapp/images/tooltip-top.svg | 1 + cws-ui/src/main/webapp/js/cws.js | 446 ++++++ install/cws-ui/deployments.ftl | 27 +- install/cws-ui/history.ftl | 94 +- install/cws-ui/processes.ftl | 1408 +++++++---------- 16 files changed, 1973 insertions(+), 1462 deletions(-) create mode 100644 cws-ui/src/main/webapp/css/microtip.css create mode 100644 cws-ui/src/main/webapp/images/tooltip-bottom.svg create mode 100644 cws-ui/src/main/webapp/images/tooltip-left.svg create mode 100644 cws-ui/src/main/webapp/images/tooltip-right.svg create mode 100644 cws-ui/src/main/webapp/images/tooltip-top.svg diff --git a/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java b/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java index 184a2f5f..adfe79b5 100644 --- a/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java +++ b/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java @@ -24,16 +24,16 @@ /** * Helper / service methods related scheduler database tables. - * + * * @author ghollins * */ public class SchedulerDbService extends DbService implements InitializingBean { private static int externalWorkerNum = 0; private static final Logger log = LoggerFactory.getLogger(SchedulerDbService.class); - + @Autowired private CwsEmailerService cwsEmailerService; - + public static final String PENDING = "pending"; public static final String DISABLED = "disabled"; public static final String FAILED_TO_SCHEDULE = "failedToSchedule"; @@ -44,65 +44,65 @@ public class SchedulerDbService extends DbService implements InitializingBean { public static final String RESOLVED = "resolved"; public static final String FAIL = "fail"; public static final String INCIDENT = "incident"; - + public static final int DEFAULT_WORKER_PROC_DEF_MAX_INSTANCES = 1; - public static final int PROCESSES_PAGE_SIZE = 100; + public static final int PROCESSES_PAGE_SIZE = 50; - public static final String FIND_CLAIMABLE_ROWS_SQL = + public static final String FIND_CLAIMABLE_ROWS_SQL = "SELECT uuid FROM cws_sched_worker_proc_inst " + - "WHERE " + - " status='"+PENDING+"' AND " + - " proc_def_key=? " + - "ORDER BY " + - " priority ASC, " + // lower priorities favored - " created_time ASC " + // older dates (FIFO) favored - "LIMIT ?"; - - public static final String UPDATE_CLAIMABLE_ROW_SQL = + "WHERE " + + " status='"+PENDING+"' AND " + + " proc_def_key=? " + + "ORDER BY " + + " priority ASC, " + // lower priorities favored + " created_time ASC " + // older dates (FIFO) favored + "LIMIT ?"; + + public static final String UPDATE_CLAIMABLE_ROW_SQL = "UPDATE cws_sched_worker_proc_inst " + - "SET " + - " claimed_by_worker=?, " + - " claim_uuid=?, " + - " status='"+CLAIMED_BY_WORKER+"' " + - "WHERE " + - " uuid=? AND claim_uuid IS NULL " + - " AND EXISTS (SELECT * FROM cws_worker WHERE id=? AND status='up')"; - - public static final String INSERT_SCHED_WORKER_PROC_INST_ROW_SQL = + "SET " + + " claimed_by_worker=?, " + + " claim_uuid=?, " + + " status='"+CLAIMED_BY_WORKER+"' " + + "WHERE " + + " uuid=? AND claim_uuid IS NULL " + + " AND EXISTS (SELECT * FROM cws_worker WHERE id=? AND status='up')"; + + public static final String INSERT_SCHED_WORKER_PROC_INST_ROW_SQL = "INSERT INTO cws_sched_worker_proc_inst " + - "(uuid, created_time, updated_time, proc_inst_id, " + - "proc_def_key, proc_business_key, priority, proc_variables, status, error_message, " + - "initiation_key, claimed_by_worker, started_by_worker, last_rejection_worker, num_worker_attempts, claim_uuid) " + - "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; - + "(uuid, created_time, updated_time, proc_inst_id, " + + "proc_def_key, proc_business_key, priority, proc_variables, status, error_message, " + + "initiation_key, claimed_by_worker, started_by_worker, last_rejection_worker, num_worker_attempts, claim_uuid) " + + "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; + public static final String PROC_INST_STATUS_SQL = - " IF (PI.END_TIME_ IS NULL, 'running', " + - "IF (AI.ACT_TYPE_ in ('noneEndEvent','endEvent','escalationEndEvent','compensationEndEvent','signalEndEvent','terminateEndEvent') AND " + - "PI.END_TIME_ IS NOT NULL, 'complete', 'fail')) "; + " IF (PI.END_TIME_ IS NULL, 'running', " + + "IF (AI.ACT_TYPE_ in ('noneEndEvent','endEvent','escalationEndEvent','compensationEndEvent','signalEndEvent','terminateEndEvent') AND " + + "PI.END_TIME_ IS NOT NULL, 'complete', 'fail')) "; + - public SchedulerDbService() { log.trace("SchedulerDbService constructor..."); } - + @Override public void afterPropertiesSet() throws Exception { log.trace("jdbcTemplate = "+jdbcTemplate); } - - + + public boolean engineProcessRowExists(String procDefKey) { int numRows = jdbcTemplate.queryForObject( - "SELECT count(*) FROM cws_worker_proc_def " + - "WHERE proc_def_key=?", - new Object[]{procDefKey}, Integer.class); + "SELECT count(*) FROM cws_worker_proc_def " + + "WHERE proc_def_key=?", + new Object[]{procDefKey}, Integer.class); return numRows > 0; } - - + + /** * Inserts a row into the cws_sched_worker_proc_inst table. - * + * */ public void insertSchedEngineProcInstRow(final SchedulerJob schedulerJob) throws Exception { long t0 = System.currentTimeMillis(); @@ -144,32 +144,32 @@ protected void setValues(PreparedStatement ps, LobCreator lobCreator) throws SQL } } } - - + + public void batchUpdateProcInstRowStatus( Set uuids, String oldStatus, String newStatus) throws Exception { - + log.warn("batch is " + uuids + ", " + uuids.size()); } - - + + /** * Updates a cws_sched_worker_proc_inst row's status, * while ensuring only a valid state transition occurs * (by querying by current/old status). - * + * */ public void updateProcInstRowStatus( - String uuid, - String oldStatus, - String newStatus, - String errorMessage, - boolean clearWorkerInfo) throws Exception { + String uuid, + String oldStatus, + String newStatus, + String errorMessage, + boolean clearWorkerInfo) throws Exception { long t0 = System.currentTimeMillis(); log.trace("uuid="+uuid+": " + oldStatus + "--->" + newStatus +", errorMessage="+errorMessage); - + // Attempt to update the database // There is a slight chance that the process will finish so quickly that // we may need to try several times here, hence the while loop. @@ -178,20 +178,20 @@ public void updateProcInstRowStatus( // to avoid race conditions here int numTries = 0; int numUpdated = 0; - + while (numUpdated == 0 && numTries < 20) { numUpdated = jdbcTemplate.update( - "UPDATE cws_sched_worker_proc_inst " + - "SET status=?, updated_time=?, " + - (clearWorkerInfo ? "claim_uuid = NULL, claimed_by_worker = NULL, started_by_worker = NULL, last_rejection_worker = NULL," : "") + - "error_message=? " + - "WHERE uuid=? AND status=?", - new Object[] {newStatus, - new Timestamp(DateTime.now().getMillis()), - errorMessage, uuid, oldStatus}); + "UPDATE cws_sched_worker_proc_inst " + + "SET status=?, updated_time=?, " + + (clearWorkerInfo ? "claim_uuid = NULL, claimed_by_worker = NULL, started_by_worker = NULL, last_rejection_worker = NULL," : "") + + "error_message=? " + + "WHERE uuid=? AND status=?", + new Object[] {newStatus, + new Timestamp(DateTime.now().getMillis()), + errorMessage, uuid, oldStatus}); if (numUpdated == 0 && ++numTries < 20) { String rowStatus = getProcInstRowStatus(uuid); - + // Workaround for potential Camunda bug. // This bug should now be fixed (as of v7.3.1+), // but it was decided that leaving this code in anyways @@ -203,7 +203,7 @@ public void updateProcInstRowStatus( log.warn("already updated row to '"+COMPLETE+"' status -- workaround for Camunda bug"); return; // don't try to update anymore } - + log.warn("sleeping before trying DB update again..."); Thread.sleep(250); } @@ -212,14 +212,14 @@ public void updateProcInstRowStatus( if (timeTaken > SLOW_WARN_THRESHOLD) { log.warn("updateProcInstRowStatus (cws_sched_worker_proc_inst) took " + timeTaken + " ms!"); } - + if (numUpdated != 1) { - throw new Exception("did not update 1 row, updated "+numUpdated + ". " + + throw new Exception("did not update 1 row, updated "+numUpdated + ". " + "(uuid="+uuid+": " + oldStatus + "--->" + newStatus +", errorMessage="+errorMessage+")"); } } - - + + public int updateProcInstIdAndStartedByWorker( String uuid, String workerId, @@ -227,27 +227,27 @@ public int updateProcInstIdAndStartedByWorker( long t0 = System.currentTimeMillis(); int numUpdated = jdbcTemplate.update( "UPDATE cws_sched_worker_proc_inst " + - "SET started_by_worker=?, proc_inst_id=?, updated_time=? " + - "WHERE uuid=?", + "SET started_by_worker=?, proc_inst_id=?, updated_time=? " + + "WHERE uuid=?", new Object[] { - workerId, - procInstId, - new Timestamp(DateTime.now().getMillis()), - uuid} - ); + workerId, + procInstId, + new Timestamp(DateTime.now().getMillis()), + uuid} + ); long timeTaken = System.currentTimeMillis() - t0; if (timeTaken > SLOW_WARN_THRESHOLD) { log.warn("UPDATE of cws_sched_worker_proc_inst took " + timeTaken + " ms!"); } return numUpdated; } - + /** * Attempt to claim a process start request in the database. - * + * * @param workerProcsList -- attempts to claim rows for the active set of process definition(s) * @return mappings of claimUuids and claimedRowUuids * @@ -274,11 +274,11 @@ public Map> claimHighestPriorityStartReq(String workerId, Ma // for (Map.Entry procs : limitsPerProcs.entrySet()) { rowUuidsPerProcDefKey = jdbcTemplate.queryForList(FIND_CLAIMABLE_ROWS_SQL, String.class, - new Object[] {procs.getKey(), procs.getValue()*2}); + new Object[] {procs.getKey(), procs.getValue()*2}); // get list of uuids using array of procdefkeys IN (keys) unfilteredRowUuids.addAll(rowUuidsPerProcDefKey); } - + Collections.sort(unfilteredRowUuids); for (String id : unfilteredRowUuids) { String procDefKeyString = getProcDefKeyFromUuid(id); @@ -371,7 +371,7 @@ else if (log.isTraceEnabled()) { else { log.trace("no rows claimed by worker: " + workerId); } - + if (numClaimed != claimUuids.size()) { log.error("numUpdated != claimUuids.size()" ); } @@ -382,13 +382,13 @@ else if (log.isTraceEnabled()) { return ret; } - - + + public String getProcInstRowStatus(String uuid) { List> list = jdbcTemplate.queryForList( - "SELECT status FROM cws_sched_worker_proc_inst " + - "WHERE uuid=?", - new Object[] {uuid}); + "SELECT status FROM cws_sched_worker_proc_inst " + + "WHERE uuid=?", + new Object[] {uuid}); if (list != null && !list.isEmpty()) { return list.iterator().next().values().iterator().next().toString(); } @@ -399,8 +399,8 @@ public String getProcInstRowStatus(String uuid) { public int getMaxProcsValueForWorker(String workerId) { return jdbcTemplate.queryForObject( - "SELECT max_num_running_procs FROM cws_worker WHERE id=?", - new Object[] {workerId}, Integer.class); + "SELECT max_num_running_procs FROM cws_worker WHERE id=?", + new Object[] {workerId}, Integer.class); } public int getCountForClaimedProcInstPerKey(String procDefKey, List claimedUuids) { @@ -417,9 +417,9 @@ public String getProcDefKeyFromUuid(String uuid) { public Map getProcInstRow(String uuid) { List> list = jdbcTemplate.queryForList( - "SELECT * FROM cws_sched_worker_proc_inst " + - "WHERE uuid=?", - new Object[] {uuid}); + "SELECT * FROM cws_sched_worker_proc_inst " + + "WHERE uuid=?", + new Object[] {uuid}); if (list.size() != 1) { log.error("unexpected list size: " + list.size() + ", for uuid: " + uuid); } @@ -430,54 +430,54 @@ public Map getProcInstRow(String uuid) { return null; } } - - + + /** - * + * */ public List> getClaimedProcInstRows(List claimUuids) { long t0 = System.currentTimeMillis(); String claimUuidsStr = "'" + StringUtils.join(claimUuids.toArray(), "','") + "'"; List> list = jdbcTemplate.queryForList( - "SELECT * FROM cws_sched_worker_proc_inst " + - "WHERE claim_uuid IN (" + claimUuidsStr + ")"); + "SELECT * FROM cws_sched_worker_proc_inst " + + "WHERE claim_uuid IN (" + claimUuidsStr + ")"); long timeTaken = System.currentTimeMillis() - t0; if (timeTaken > SLOW_WARN_THRESHOLD) { log.warn("SELECT * FROM cws_sched_worker_proc_inst by claim_uuid took " + timeTaken + " ms!"); } - + if (list.size() != claimUuids.size()) { log.error("unexpected claim size: " + list.size() + ", for claim_uuids: " + claimUuidsStr + " (expected " + claimUuids.size() + ")"); } return list; } - + public boolean externalWorkerExists(String workerId) { return jdbcTemplate.queryForObject( - "SELECT count(*) FROM cws_external_worker WHERE id=?", new Object[]{workerId}, Integer.class) > 0; + "SELECT count(*) FROM cws_external_worker WHERE id=?", new Object[]{workerId}, Integer.class) > 0; } - + /** * Create a row (if not already exists) in the database for this engine */ - public String createExternalWorkerRow(String workerId, String hostname) { + public String createExternalWorkerRow(String workerId, String hostname) { if (!externalWorkerExists(workerId)) { log.info("Inserting row into cws_external_worker table..."); - + int numUpdated = 0; int numTries = 0; String workerName = null; while (numTries++ < 10 && numUpdated != 1) { Timestamp tsNow = new Timestamp(DateTime.now().getMillis()); workerName = "ext_worker" + String.format("%1$4s", externalWorkerNum++).replace(' ', '0'); - + try { numUpdated = jdbcTemplate.update( "INSERT INTO cws_external_worker" + - " (id, name, hostname, created_time, last_heartbeat_time) " + - "VALUES (?,?,?,?,?)", + " (id, name, hostname, created_time, last_heartbeat_time) " + + "VALUES (?,?,?,?,?)", new Object[] { workerId, workerName, @@ -487,142 +487,142 @@ public String createExternalWorkerRow(String workerId, String hostname) { }); } catch (DataAccessException e) { - + try { // Could not update database, wait and retry again Thread.sleep((long)(Math.random() * 500.0)); } catch (InterruptedException ex) { - + } } } - + if (numUpdated != 1) { log.error("Could not create external worker row for workerId " + workerId + " !"); } - + return workerName; } - + log.error("Could not create external worker row for workerId " + workerId + " !"); - + return null; } - - + + public int updateExternalWorkerHeartbeat(String workerId) { return jdbcTemplate.update( - "UPDATE cws_external_worker SET last_heartbeat_time = ? WHERE id=?", - new Object[] { new Timestamp(DateTime.now().getMillis()), workerId } + "UPDATE cws_external_worker SET last_heartbeat_time = ? WHERE id=?", + new Object[] { new Timestamp(DateTime.now().getMillis()), workerId } ); } - + public int updateExternalWorkerActiveTopics(String workerId, String activeTopics) { return jdbcTemplate.update( - "UPDATE cws_external_worker SET activeTopics = ? WHERE id=?", - new Object[] { activeTopics, workerId } + "UPDATE cws_external_worker SET activeTopics = ? WHERE id=?", + new Object[] { activeTopics, workerId } ); } - + public int updateExternalWorkerCurrentTopic(String workerId, String currentTopic) { return jdbcTemplate.update( - "UPDATE cws_external_worker SET currentTopic = ? WHERE id=?", - new Object[] { currentTopic, workerId } + "UPDATE cws_external_worker SET currentTopic = ? WHERE id=?", + new Object[] { currentTopic, workerId } ); } - + public int updateExternalWorkerCurrentCommand(String workerId, String currentCommand) { return jdbcTemplate.update( - "UPDATE cws_external_worker SET currentCommand = ? WHERE id=?", - new Object[] { currentCommand, workerId } + "UPDATE cws_external_worker SET currentCommand = ? WHERE id=?", + new Object[] { currentCommand, workerId } ); } - + public int updateExternalWorkerCurrentWorkingDir(String workerId, String currentWorkingDir) { return jdbcTemplate.update( - "UPDATE cws_external_worker SET currentWorkingDir = ? WHERE id=?", - new Object[] { currentWorkingDir, workerId } + "UPDATE cws_external_worker SET currentWorkingDir = ? WHERE id=?", + new Object[] { currentWorkingDir, workerId } ); } - + public List> getWorkers() { return jdbcTemplate.queryForList( - "SELECT * FROM cws_worker ORDER BY name"); + "SELECT * FROM cws_worker ORDER BY name"); } - + public List> getExternalWorkers() { return jdbcTemplate.queryForList( - "SELECT * FROM cws_external_worker ORDER BY name"); + "SELECT * FROM cws_external_worker ORDER BY name"); } - + public List> getWorkersStats() { return jdbcTemplate.queryForList( - "SELECT status, COUNT(*) as cnt FROM cws_worker WHERE cws_install_type != 'console_only' GROUP BY status"); + "SELECT status, COUNT(*) as cnt FROM cws_worker WHERE cws_install_type != 'console_only' GROUP BY status"); } - + public List> getDiskUsage() { return jdbcTemplate.queryForList( - "SELECT id, name, cws_install_type, disk_free_bytes FROM cws_worker"); + "SELECT id, name, cws_install_type, disk_free_bytes FROM cws_worker"); } - + public List> getLogUsage(String workerId) { return jdbcTemplate.queryForList( - "SELECT filename, size_bytes FROM cws_log_usage WHERE worker_id=?", - new Object[] { workerId } - ); + "SELECT filename, size_bytes FROM cws_log_usage WHERE worker_id=?", + new Object[] { workerId } + ); } - + public long getDbSize() throws Exception { List> list = jdbcTemplate.queryForList( "SELECT SUM(data_length + index_length) AS size " + - "FROM information_schema.TABLES " + - "WHERE table_schema = (SELECT DATABASE())"); - + "FROM information_schema.TABLES " + + "WHERE table_schema = (SELECT DATABASE())"); + if (list.size() != 1) { throw new Exception("Could not get database size."); } return Long.parseLong(list.get(0).get("size").toString()); } - - + + /** * Returns the number of "up" Workers. - * + * */ public int getNumUpWorkers() { String query = "SELECT COUNT(*) FROM cws_worker WHERE status = 'up'"; return jdbcTemplate.queryForObject(query, Integer.class); } - - + + /** - * + * */ public List> getWorkerNumRunningProcs() { return jdbcTemplate.queryForList( - "SELECT cws_worker.id, active_count as cnt " + - "FROM cws_worker"); + "SELECT cws_worker.id, active_count as cnt " + + "FROM cws_worker"); } - - + + /** * Gets a list of unresponsive workers. - * + * */ public List> detectDeadWorkers(int thresholdMilliseconds) { try { Timestamp thresholdTimeAgo = new Timestamp(DateTime.now().minusMillis(thresholdMilliseconds).getMillis()); return jdbcTemplate.queryForList("SELECT * FROM cws_worker " + - "WHERE last_heartbeat_time < ? AND status = 'up'", - new Object[] { thresholdTimeAgo }); + "WHERE last_heartbeat_time < ? AND status = 'up'", + new Object[] { thresholdTimeAgo }); } catch (Throwable e) { cwsEmailerService.sendNotificationEmails("CWS Database Error", "Severe Error!\n\nCould not query database for dead workers.\n\nDetails: " + e.getMessage()); log.error("Problem occurred while querying the database for dead workers.", e); - + throw e; } } @@ -646,40 +646,40 @@ public List> detectAbandonedWorkers(int daysToAbandoned) { throw e; } } - - + + /** * Gets a list of unresponsive external workers. - * + * */ public List> detectDeadExternalWorkers(int thresholdMilliseconds) { try { Timestamp thresholdTimeAgo = new Timestamp(DateTime.now().minusMillis(thresholdMilliseconds).getMillis()); return jdbcTemplate.queryForList("SELECT * FROM cws_external_worker " + - "WHERE last_heartbeat_time < ?", - new Object[] { thresholdTimeAgo }); + "WHERE last_heartbeat_time < ?", + new Object[] { thresholdTimeAgo }); } catch (Throwable e) { cwsEmailerService.sendNotificationEmails("CWS Database Error", "Severe Error!\n\nCould not query database for dead external workers.\n\nDetails: " + e.getMessage()); log.error("Problem occurred while querying the database for dead external workers.", e); - + throw e; } } - + /** - * - */ + * + */ public void deleteProcessDefinition(String procDefKey) { - + jdbcTemplate.update( "DELETE FROM cws_worker_proc_def " + - "where proc_def_key=?", + "where proc_def_key=?", new Object[] {procDefKey}); - + jdbcTemplate.update( "DELETE FROM cws_sched_worker_proc_inst " + - "where proc_def_key=?", + "where proc_def_key=?", new Object[] {procDefKey}); } @@ -705,46 +705,46 @@ public void deleteAbandonedWorker(String workerId) { } - + /** - * - */ + * + */ public void deleteDeadExternalWorkers(String workerId) { jdbcTemplate.update( - "DELETE FROM cws_external_worker " + - "where id=?", - new Object[] {workerId}); + "DELETE FROM cws_external_worker " + + "where id=?", + new Object[] {workerId}); } /** - * + * */ public int getWorkerJobExecutorMaxPoolSize(String workerId) { return jdbcTemplate.queryForObject( - "SELECT job_executor_max_pool_size FROM cws_worker WHERE id=?", - new Object[] {workerId}, Integer.class); + "SELECT job_executor_max_pool_size FROM cws_worker WHERE id=?", + new Object[] {workerId}, Integer.class); } - - + + /** - * + * */ public Map getCwsProcessInstanceRowForUuid(String uuid) { return jdbcTemplate.queryForMap( - "SELECT * " + - "FROM cws_sched_worker_proc_inst " + - "WHERE uuid=?", - new Object[] {uuid}); + "SELECT * " + + "FROM cws_sched_worker_proc_inst " + + "WHERE uuid=?", + new Object[] {uuid}); } /** * Updates the job table to set retries, used to retry processes * which have raised an incident and have exhausted their retries - * - * If there is an entry in the external task table with no retries, - * it updates that as well. This allows the process engine to - * gracefully recover from both failed jobs and failed external - * task executions. + * + * If there is an entry in the external task table with no retries, + * it updates that as well. This allows the process engine to + * gracefully recover from both failed jobs and failed external + * task executions. * * Probably can do this in the Camunda API, but this works for now * @@ -761,24 +761,24 @@ public int setRetriesForUuids(List uuids, int retries) { // do this first because otherwise a process could raise an incident while retries // are still being set, and then the new incident would be deleted String query = - "DELETE FROM ACT_RU_INCIDENT " + - "WHERE PROC_INST_ID_ IN " + uuidSqlArray; + "DELETE FROM ACT_RU_INCIDENT " + + "WHERE PROC_INST_ID_ IN " + uuidSqlArray; jdbcTemplate.update(query); String jobQuery = - "UPDATE ACT_RU_JOB " + - "SET RETRIES_ = ? " + - "WHERE RETRIES_ = 0 " + - "AND PROCESS_INSTANCE_ID_ = ? "; + "UPDATE ACT_RU_JOB " + + "SET RETRIES_ = ? " + + "WHERE RETRIES_ = 0 " + + "AND PROCESS_INSTANCE_ID_ = ? "; // Also set retries for this process's external tasks String extTaskQuery = - "UPDATE ACT_RU_EXT_TASK " + - "SET RETRIES_ = ? " + - "WHERE RETRIES_ = 0 " + - "OR RETRIES_ IS NULL " + - "AND PROC_INST_ID_ = ? "; + "UPDATE ACT_RU_EXT_TASK " + + "SET RETRIES_ = ? " + + "WHERE RETRIES_ = 0 " + + "OR RETRIES_ IS NULL " + + "AND PROC_INST_ID_ = ? "; int updated = 0; for(String uuid : uuids) { @@ -839,7 +839,7 @@ public int getFilteredProcessInstancesSize( String statusList, String minDate, String maxDate - ) + ) { List whereObjs = new ArrayList(); if (procInstId != null) { whereObjs.add(procInstId); } @@ -855,48 +855,48 @@ public int getFilteredProcessInstancesSize( List statuses = Arrays.asList(statusList.split(",")); statusClause = buildSanitizedSqlArray(statuses, pattern); } - + log.trace("statusClause = " + statusClause); - + int cwsRowsCount = - jdbcTemplate.queryForObject( - "SELECT COUNT(*) " + - "FROM cws_sched_worker_proc_inst " + - "WHERE " + - (procInstId != null ? "proc_inst_id=? AND " : "") + - (procDefKey != null ? "proc_def_key=? AND " : "") + - (minDate != null ? "created_time >= ? AND " : "") + - (maxDate != null ? "created_time <= ? AND " : "") + - (statusList != null ? "status IN "+statusClause+" AND " : "") + - "proc_inst_id IS NULL ", // don't get any started processes - whereObjs.toArray(), Integer.class); + jdbcTemplate.queryForObject( + "SELECT COUNT(*) " + + "FROM cws_sched_worker_proc_inst " + + "WHERE " + + (procInstId != null ? "proc_inst_id=? AND " : "") + + (procDefKey != null ? "proc_def_key=? AND " : "") + + (minDate != null ? "created_time >= ? AND " : "") + + (maxDate != null ? "created_time <= ? AND " : "") + + (statusList != null ? "status IN "+statusClause+" AND " : "") + + "proc_inst_id IS NULL ", // don't get any started processes + whereObjs.toArray(), Integer.class); // Now add superProcInstId to whereObjs and put at the beginning for SQL query. Only add if contains "real" procInstId if (superProcInstId != null && !superProcInstId.equalsIgnoreCase("NULL")) { whereObjs.add(0, superProcInstId); } String camundaCountQuery = "SELECT COUNT(*) " + - "FROM cws_proc_inst_status " + - "WHERE " + - (superProcInstId != null ? superProcInstId.equalsIgnoreCase("NULL") ? "super_proc_inst_id IS NULL AND " : "super_proc_inst_id=? AND " : "") + - (procInstId != null ? "proc_inst_id=? AND " : "") + - (procDefKey != null ? "proc_def_key=? AND " : "") + - (statusList != null ? "status IN " + statusClause + " AND " : "") + - (minDate != null ? "start_time >= ? AND " : "") + - (maxDate != null ? "start_time <= ? AND " : "") + - " 1=1 "; + "FROM cws_proc_inst_status " + + "WHERE " + + (superProcInstId != null ? superProcInstId.equalsIgnoreCase("NULL") ? "super_proc_inst_id IS NULL AND " : "super_proc_inst_id=? AND " : "") + + (procInstId != null ? "proc_inst_id=? AND " : "") + + (procDefKey != null ? "proc_def_key=? AND " : "") + + (statusList != null ? "status IN " + statusClause + " AND " : "") + + (minDate != null ? "start_time >= ? AND " : "") + + (maxDate != null ? "start_time <= ? AND " : "") + + " 1=1 "; int camundaRowsCount = jdbcTemplate.queryForObject(camundaCountQuery, whereObjs.toArray(), Integer.class); - + log.trace("cwsRowsCount = " + cwsRowsCount + ", camundaRowsCount = " + camundaRowsCount); - + return cwsRowsCount + camundaRowsCount; } - - + + /** * Returns the set of filtered process instances. - * + * */ public List> getFilteredProcessInstances( String superProcInstId, @@ -907,14 +907,20 @@ public List> getFilteredProcessInstances( String maxDate, String dateOrderBy, int page - ) - { + ) + { List whereObjs = new ArrayList(); if (procInstId != null) { whereObjs.add(procInstId); } if (procDefKey != null) { whereObjs.add(procDefKey); } if (minDate != null) { whereObjs.add(minDate); } if (maxDate != null) { whereObjs.add(maxDate); } + Integer offset = page*PROCESSES_PAGE_SIZE; + Integer size = PROCESSES_PAGE_SIZE; + + whereObjs.add(offset); + whereObjs.add(size); + String pattern = PENDING + "|" + DISABLED + "|" + FAILED_TO_START + "|" + FAILED_TO_SCHEDULE + "|" + CLAIMED_BY_WORKER + "|" + RUNNING + "|" + COMPLETE + "|" + RESOLVED + "|" + FAIL + "|" + INCIDENT; @@ -928,15 +934,16 @@ public List> getFilteredProcessInstances( String cwsQuery = "SELECT * " + - "FROM cws_sched_worker_proc_inst " + - "WHERE " + - (procInstId != null ? "proc_inst_id=? AND " : "") + - (procDefKey != null ? "proc_def_key=? AND " : "") + - (minDate != null ? "created_time >= ? AND " : "") + - (maxDate != null ? "created_time <= ? AND " : "") + - (statusList != null ? "status IN "+statusClause+" AND " : "") + - " proc_inst_id IS NULL " + // don't get any started processes - "ORDER BY created_time " + dateOrderBy + " "; + "FROM cws_sched_worker_proc_inst " + + "WHERE " + + (procInstId != null ? "proc_inst_id=? AND " : "") + + (procDefKey != null ? "proc_def_key=? AND " : "") + + (minDate != null ? "created_time >= ? AND " : "") + + (maxDate != null ? "created_time <= ? AND " : "") + + (statusList != null ? "status IN "+statusClause+" AND " : "") + + " proc_inst_id IS NULL " + // don't get any started processes + "ORDER BY created_time " + dateOrderBy + " " + + "LIMIT ?,?"; List> cwsRows = jdbcTemplate.queryForList(cwsQuery, whereObjs.toArray()); @@ -945,59 +952,79 @@ public List> getFilteredProcessInstances( String camundaQuery = "SELECT " + - // If there is no corresponding row in the CWS, table, then this wasn't scheduled - " CI.initiation_key AS initiation_key, " + - " CI.created_time AS created_time, " + - " CI.updated_time AS updated_time, " + - " CI.claimed_by_worker AS claimed_by_worker, " + - " CI.started_by_worker AS started_by_worker, " + - " PI.proc_inst_id AS proc_inst_id, " + - " PI.super_proc_inst_id AS super_proc_inst_id, " + - " PI.proc_def_key AS proc_def_key, " + - " PI.start_time AS proc_start_time, " + - " PI.end_time AS proc_end_time, " + - " PI.status AS status " + - "FROM cws_proc_inst_status PI " + - "LEFT JOIN cws_sched_worker_proc_inst CI " + - "ON PI.proc_inst_id = CI.proc_inst_id " + - "WHERE " + - (superProcInstId != null ? superProcInstId.equalsIgnoreCase("NULL") ? "PI.super_proc_inst_id IS NULL AND " : "PI.super_proc_inst_id=? AND " : "") + - (procInstId != null ? "PI.proc_inst_id=? AND " : "") + - (procDefKey != null ? "PI.proc_def_key=? AND " : "") + - (statusList != null ? "PI.status IN "+statusClause+" AND " : "") + - (minDate != null ? "PI.start_time >= ? AND " : "") + - (maxDate != null ? "PI.start_time <= ? AND " : "") + - " 1=1 " + - "ORDER BY PI.start_time " + dateOrderBy + " "; + // If there is no corresponding row in the CWS, table, then this wasn't scheduled + " CI.initiation_key AS initiation_key, " + + " CI.created_time AS created_time, " + + " CI.updated_time AS updated_time, " + + " CI.claimed_by_worker AS claimed_by_worker, " + + " CI.started_by_worker AS started_by_worker, " + + " PI.proc_inst_id AS proc_inst_id, " + + " PI.super_proc_inst_id AS super_proc_inst_id, " + + " PI.proc_def_key AS proc_def_key, " + + " PI.start_time AS proc_start_time, " + + " PI.end_time AS proc_end_time, " + + " PI.status AS status " + + "FROM cws_proc_inst_status PI " + + "LEFT JOIN cws_sched_worker_proc_inst CI " + + "ON PI.proc_inst_id = CI.proc_inst_id " + + "WHERE " + + (superProcInstId != null ? superProcInstId.equalsIgnoreCase("NULL") ? "PI.super_proc_inst_id IS NULL AND " : "PI.super_proc_inst_id=? AND " : "") + + (procInstId != null ? "PI.proc_inst_id=? AND " : "") + + (procDefKey != null ? "PI.proc_def_key=? AND " : "") + + (statusList != null ? "PI.status IN "+statusClause+" AND " : "") + + (minDate != null ? "PI.start_time >= ? AND " : "") + + (maxDate != null ? "PI.start_time <= ? AND " : "") + + " 1=1 " + + "ORDER BY PI.start_time " + dateOrderBy + " " + + "LIMIT ?,?"; List> camundaRows = jdbcTemplate.queryForList(camundaQuery, whereObjs.toArray()); - + // JOIN THE SETS... // // FINAL SET = CWS (PENDING, FAILED_TO_START) + Camunda (running, failed, completed) - // + // List> ret = new ArrayList>(); - + // Get the CWS rows, and add them in. // (these will only be the 'pending' rows // - for (Map cwsRow : cwsRows) { - Map finalRow = new HashMap(); - finalRow.put("uuid", (String)cwsRow.get("uuid")); - finalRow.put("proc_def_key", (String)cwsRow.get("proc_def_key")); - finalRow.put("proc_inst_id", (String)cwsRow.get("proc_inst_id")); - finalRow.put("super_proc_inst_id", null); // cws rows will never have a super proc inst id since it's started by the user - finalRow.put("status", (String)cwsRow.get("status")); - finalRow.put("initiation_key", (String)cwsRow.get("initiation_key")); - finalRow.put("created_time", (Timestamp)cwsRow.get("created_time")); - finalRow.put("updated_time", (Timestamp)cwsRow.get("updated_time")); - finalRow.put("claimed_by_worker", (String)cwsRow.get("claimed_by_worker")); - finalRow.put("started_by_worker", (String)cwsRow.get("started_by_worker")); - finalRow.put("proc_start_time", null); // pending rows haven't actually run yet - finalRow.put("proc_end_time", null); // pending rows haven't actually run yet - ret.add(finalRow); + if (superProcInstId == null) { + for (Map cwsRow : cwsRows) { + Map finalRow = new HashMap(); + finalRow.put("uuid", (String)cwsRow.get("uuid")); + finalRow.put("proc_def_key", (String)cwsRow.get("proc_def_key")); + finalRow.put("proc_inst_id", (String)cwsRow.get("proc_inst_id")); + finalRow.put("super_proc_inst_id", null); // cws rows will never have a super proc inst id since it's started by the user + finalRow.put("status", (String)cwsRow.get("status")); + finalRow.put("initiation_key", (String)cwsRow.get("initiation_key")); + finalRow.put("created_time", (Timestamp)cwsRow.get("created_time")); + finalRow.put("updated_time", (Timestamp)cwsRow.get("updated_time")); + finalRow.put("claimed_by_worker", (String)cwsRow.get("claimed_by_worker")); + finalRow.put("started_by_worker", (String)cwsRow.get("started_by_worker")); + finalRow.put("proc_start_time", null); // pending rows haven't actually run yet + finalRow.put("proc_end_time", null); // pending rows haven't actually run yet + ret.add(finalRow); + } + } else if (superProcInstId.equalsIgnoreCase("NULL")) { + for (Map cwsRow : cwsRows) { + Map finalRow = new HashMap(); + finalRow.put("uuid", (String)cwsRow.get("uuid")); + finalRow.put("proc_def_key", (String)cwsRow.get("proc_def_key")); + finalRow.put("proc_inst_id", (String)cwsRow.get("proc_inst_id")); + finalRow.put("super_proc_inst_id", null); // cws rows will never have a super proc inst id since it's started by the user + finalRow.put("status", (String)cwsRow.get("status")); + finalRow.put("initiation_key", (String)cwsRow.get("initiation_key")); + finalRow.put("created_time", (Timestamp)cwsRow.get("created_time")); + finalRow.put("updated_time", (Timestamp)cwsRow.get("updated_time")); + finalRow.put("claimed_by_worker", (String)cwsRow.get("claimed_by_worker")); + finalRow.put("started_by_worker", (String)cwsRow.get("started_by_worker")); + finalRow.put("proc_start_time", null); // pending rows haven't actually run yet + finalRow.put("proc_end_time", null); // pending rows haven't actually run yet + ret.add(finalRow); + } } - + // Get the Camunda rows, and add them in // for (Map camundaRow : camundaRows) { @@ -1018,7 +1045,7 @@ public List> getFilteredProcessInstances( finalRow.put("proc_end_time", (Timestamp)camundaRow.get("proc_end_time")); ret.add(finalRow); } - + return ret; } @@ -1040,21 +1067,21 @@ public List> getProcessInstanceStats(String lastNumHours) { String query = "SELECT " + - " proc_def_key, " + - " status, " + - " COUNT(*) AS cnt " + - "FROM cws_sched_worker_proc_inst " + - "WHERE status IN ('" + PENDING + "', '" + DISABLED + "', '" + FAILED_TO_START + "') " + - "AND (created_time > ? OR updated_time > ?) " + - "GROUP BY proc_def_key, status " + - "UNION ALL " + - "SELECT " + - " proc_def_key, " + - " status, " + - " COUNT(*) AS cnt " + - "FROM cws_proc_inst_status " + - "WHERE (start_time > ? OR end_time > ?) " + - "GROUP BY proc_def_key, status "; + " proc_def_key, " + + " status, " + + " COUNT(*) AS cnt " + + "FROM cws_sched_worker_proc_inst " + + "WHERE status IN ('" + PENDING + "', '" + DISABLED + "', '" + FAILED_TO_START + "') " + + "AND (created_time > ? OR updated_time > ?) " + + "GROUP BY proc_def_key, status " + + "UNION ALL " + + "SELECT " + + " proc_def_key, " + + " status, " + + " COUNT(*) AS cnt " + + "FROM cws_proc_inst_status " + + "WHERE (start_time > ? OR end_time > ?) " + + "GROUP BY proc_def_key, status "; List> camundaAndCwsStatuses = jdbcTemplate.queryForList(query, time, time, time, time); @@ -1074,30 +1101,30 @@ public List> getStatusByBusinessKey(String procDefKey, String String query = "SELECT " + - " status, " + - " COUNT(*) AS cnt " + - "FROM cws_sched_worker_proc_inst " + - "WHERE status IN ('" + PENDING + "', '" + DISABLED + "', '" + FAILED_TO_START + "') " + - "AND proc_business_key = ? " + - "AND proc_def_key = ? " + - "GROUP BY proc_def_key, status " + - "UNION ALL " + - "SELECT " + - " status, " + - " COUNT(*) AS cnt " + - "FROM cws_proc_inst_status " + - "WHERE business_key = ? " + - "AND proc_def_key = ? " + - "GROUP BY proc_def_key, status "; + " status, " + + " COUNT(*) AS cnt " + + "FROM cws_sched_worker_proc_inst " + + "WHERE status IN ('" + PENDING + "', '" + DISABLED + "', '" + FAILED_TO_START + "') " + + "AND proc_business_key = ? " + + "AND proc_def_key = ? " + + "GROUP BY proc_def_key, status " + + "UNION ALL " + + "SELECT " + + " status, " + + " COUNT(*) AS cnt " + + "FROM cws_proc_inst_status " + + "WHERE business_key = ? " + + "AND proc_def_key = ? " + + "GROUP BY proc_def_key, status "; List> camundaAndCwsStatuses = jdbcTemplate.queryForList(query, businessKey, procDefKey, businessKey, procDefKey); return new ArrayList<>(camundaAndCwsStatuses); } - + /** * Used by worker syncCounters method - * + * * List of [uuid, proc_def_key, status] */ public List> getStatsForScheduledProcs(Set cwsSchedUuids) { @@ -1111,12 +1138,12 @@ public List> getStatsForScheduledProcs(Set cwsSchedUu } uuidInClause += ")"; //log.debug(uuidInClause); - + List> camundaStatuses = jdbcTemplate.queryForList( - "SELECT DISTINCT " + + "SELECT DISTINCT " + " CI.uuid AS uuid, " + " PI.PROC_DEF_KEY_ AS proc_def_key, " + - PROC_INST_STATUS_SQL + " AS status " + + PROC_INST_STATUS_SQL + " AS status " + "FROM ACT_HI_PROCINST PI " + " LEFT JOIN cws_sched_worker_proc_inst CI " + " ON PI.PROC_INST_ID_ = CI.proc_inst_id " + @@ -1124,14 +1151,14 @@ public List> getStatsForScheduledProcs(Set cwsSchedUu " ON " + " PI.PROC_INST_ID_ = AI.PROC_INST_ID_ " + " AND " + - " (AI.END_TIME_ is null or AI.ACT_TYPE_ LIKE '%ndEvent' AND PI.END_TIME_ IS NOT NULL) " + + " (AI.END_TIME_ is null or AI.ACT_TYPE_ LIKE '%ndEvent' AND PI.END_TIME_ IS NOT NULL) " + "WHERE " + " (AI.PARENT_ACT_INST_ID_ IS NULL OR AI.PARENT_ACT_INST_ID_ NOT LIKE 'SubProcess%') " + " AND " + PROC_INST_STATUS_SQL + " IN ('complete','running', 'fail') " + " AND " + " CI.uuid in " + uuidInClause); - + List> cwsStatuses = jdbcTemplate.queryForList( "SELECT DISTINCT " + " uuid, " + @@ -1142,93 +1169,93 @@ public List> getStatsForScheduledProcs(Set cwsSchedUu " uuid in " + uuidInClause + " " + " AND " + " proc_inst_id IS NULL " // don't get any started processes (covered in above query) - ); - + ); + log.debug(camundaStatuses.size() + " camunda rows, " + cwsStatuses.size() + " cwsStatuses rows."); - + ret.addAll(camundaStatuses); ret.addAll(cwsStatuses); } - + return ret; } - - + + /** - * + * */ public List> getRunningProcessInstances() { return jdbcTemplate.queryForList( - "SELECT proc_inst_id, uuid, proc_def_key, status " + - "FROM cws_sched_worker_proc_inst " + - "WHERE status='running'"); + "SELECT proc_inst_id, uuid, proc_def_key, status " + + "FROM cws_sched_worker_proc_inst " + + "WHERE status='running'"); } - - + + /** - * + * */ public List> getIncompleteProcessInstancesForWorker(String workerId) { return jdbcTemplate.queryForList( - "SELECT proc_def_key, COUNT(*) as cnt " + - "FROM cws_sched_worker_proc_inst " + - "WHERE started_by_worker=? AND status IN ('pending', 'running') " + - "GROUP BY proc_def_key", - new Object[] {workerId}); - } - - + "SELECT proc_def_key, COUNT(*) as cnt " + + "FROM cws_sched_worker_proc_inst " + + "WHERE started_by_worker=? AND status IN ('pending', 'running') " + + "GROUP BY proc_def_key", + new Object[] {workerId}); + } + + /** - * + * */ public List> getPendingProcessInstances() { return jdbcTemplate.queryForList( - "SELECT * " + - "FROM cws_sched_worker_proc_inst " + - "WHERE status = '" + PENDING + "'"); + "SELECT * " + + "FROM cws_sched_worker_proc_inst " + + "WHERE status = '" + PENDING + "'"); } - - + + /** * Returns mapping of process instance statuses. * If procInstId is specified, then returns information about a single process instance, * otherwise information about all process instances is returned. - * + * * Camunda will first create a row in ACT_HI_PROCINST upon process start. * Then when the process completes, it will create multiple rows (one per activity) in ACT_HI_ACTINST. - * + * */ public List> getProcInstStatus(String procInstId, Integer limit) { String query = - "SELECT DISTINCT " + - " PI.PROC_DEF_ID_ AS procDefKey," + - " PI.PROC_INST_ID_ AS procInstId, " + - " PI.START_TIME_ AS startTime, " + - " PI.END_TIME_ AS endTime, " + - " PI.DURATION_ AS duration, " + - " PI.END_ACT_ID_ AS endActivityId, " + - PROC_INST_STATUS_SQL + " AS status " + - "FROM " + - " ACT_HI_PROCINST PI " + - " LEFT JOIN " + - " ACT_HI_ACTINST AI " + - " ON " + - " PI.PROC_INST_ID_ = AI.PROC_INST_ID_ AND " + - " ((PI.END_ACT_ID_ IS NULL) OR AI.ACT_ID_ = PI.END_ACT_ID_) " + - "WHERE " + - " PI.PROC_INST_ID_ = '"+procInstId+"' AND " + - // don't be fooled by sub-process end events. - // This clause was put in because of CWS-350 - " AI.PARENT_ACT_INST_ID_ NOT LIKE 'SubProcess%' " + - "ORDER BY PI.START_TIME_ desc " + - (limit == null ? "" : " LIMIT "+limit); + "SELECT DISTINCT " + + " PI.PROC_DEF_ID_ AS procDefKey," + + " PI.PROC_INST_ID_ AS procInstId, " + + " PI.START_TIME_ AS startTime, " + + " PI.END_TIME_ AS endTime, " + + " PI.DURATION_ AS duration, " + + " PI.END_ACT_ID_ AS endActivityId, " + + PROC_INST_STATUS_SQL + " AS status " + + "FROM " + + " ACT_HI_PROCINST PI " + + " LEFT JOIN " + + " ACT_HI_ACTINST AI " + + " ON " + + " PI.PROC_INST_ID_ = AI.PROC_INST_ID_ AND " + + " ((PI.END_ACT_ID_ IS NULL) OR AI.ACT_ID_ = PI.END_ACT_ID_) " + + "WHERE " + + " PI.PROC_INST_ID_ = '"+procInstId+"' AND " + + // don't be fooled by sub-process end events. + // This clause was put in because of CWS-350 + " AI.PARENT_ACT_INST_ID_ NOT LIKE 'SubProcess%' " + + "ORDER BY PI.START_TIME_ desc " + + (limit == null ? "" : " LIMIT "+limit); log.trace("QUERY: " + query); return jdbcTemplate.queryForList(query); } - - + + /** - * + * */ public void updateWorkerProcDefEnabled(String workerId, String procDefKey, String deploymentId, boolean isEnabled) throws Exception { int numUpdated = 0; @@ -1238,16 +1265,16 @@ public void updateWorkerProcDefEnabled(String workerId, String procDefKey, Strin // If the row already existed, then update the row. // numUpdated = jdbcTemplate.update( - "INSERT IGNORE INTO cws_worker_proc_def " + - "(worker_id, proc_def_key, max_instances, deployment_id, accepting_new) " + - "VALUES (?, ?, ?, ?, ?)", - new Object[] {workerId, procDefKey, DEFAULT_WORKER_PROC_DEF_MAX_INSTANCES, deploymentId, isEnabled}); + "INSERT IGNORE INTO cws_worker_proc_def " + + "(worker_id, proc_def_key, max_instances, deployment_id, accepting_new) " + + "VALUES (?, ?, ?, ?, ?)", + new Object[] {workerId, procDefKey, DEFAULT_WORKER_PROC_DEF_MAX_INSTANCES, deploymentId, isEnabled}); if (numUpdated == 0) { // row was already there, so just update it numUpdated = jdbcTemplate.update( - "UPDATE cws_worker_proc_def " + - "SET accepting_new=1 " + - "WHERE worker_id=? AND proc_def_key=?", - new Object[] {workerId, procDefKey}); + "UPDATE cws_worker_proc_def " + + "SET accepting_new=1 " + + "WHERE worker_id=? AND proc_def_key=?", + new Object[] {workerId, procDefKey}); log.debug("Updated (set accepting_new = 1) " + numUpdated + " row(s) in the cws_worker_proc_def table..."); } else { @@ -1259,204 +1286,204 @@ public void updateWorkerProcDefEnabled(String workerId, String procDefKey, Strin // then update the accepting_new flag // numUpdated = jdbcTemplate.update( - "UPDATE cws_worker_proc_def " + - "SET accepting_new=0 " + - "WHERE worker_id=? AND proc_def_key=?", - new Object[] {workerId, procDefKey}); + "UPDATE cws_worker_proc_def " + + "SET accepting_new=0 " + + "WHERE worker_id=? AND proc_def_key=?", + new Object[] {workerId, procDefKey}); log.debug("Updated (set accepting_new = 0) " + numUpdated + " row(s) in the cws_worker_proc_def table..."); } } - - + + /** - * + * */ public void updateWorkerProcDefLimit(String workerId, String procDefKey, int newLimit) throws Exception { int numUpdated = jdbcTemplate.update( - "UPDATE cws_worker_proc_def " + - "SET max_instances=? " + - "WHERE worker_id=? AND proc_def_key=?", - new Object[] {newLimit, workerId, procDefKey}); - + "UPDATE cws_worker_proc_def " + + "SET max_instances=? " + + "WHERE worker_id=? AND proc_def_key=?", + new Object[] {newLimit, workerId, procDefKey}); + log.debug("updated "+numUpdated + " rows"); } - - + + /** - * + * */ public void updateWorkerProcDefDeploymentId(String workerId, String procDefKey, String newDeploymentId) throws Exception { int numUpdated = jdbcTemplate.update( - "UPDATE cws_worker_proc_def " + - "SET deployment_id=? " + - "WHERE worker_id=? AND proc_def_key=?", - new Object[] {newDeploymentId, workerId, procDefKey}); - + "UPDATE cws_worker_proc_def " + + "SET deployment_id=? " + + "WHERE worker_id=? AND proc_def_key=?", + new Object[] {newDeploymentId, workerId, procDefKey}); + log.trace("updated "+numUpdated + " rows"); } - - + + /** - * + * */ public void updateWorkerNumJobExecutorThreads(String workerId, int numThreads) { int numUpdated = jdbcTemplate.update( - "UPDATE cws_worker " + - "SET job_executor_max_pool_size=? " + - "WHERE id=?", - new Object[] {numThreads, workerId}); + "UPDATE cws_worker " + + "SET job_executor_max_pool_size=? " + + "WHERE id=?", + new Object[] {numThreads, workerId}); log.debug("updated "+numUpdated + " rows"); } - - + + /** - * + * */ public void updateWorkerStatus(String workerId, String status) { int numRowsUpdated = jdbcTemplate.update( - "UPDATE cws_worker SET status=? WHERE id=?", - new Object[] { status, workerId } + "UPDATE cws_worker SET status=? WHERE id=?", + new Object[] { status, workerId } ); log.debug("setWorkerStatus ('" + workerId + "', " + status + "): Updated " + numRowsUpdated + " rows."); } - + public void setWorkerAcceptingNew(boolean acceptingNew, String workerId) { jdbcTemplate.update( - "UPDATE cws_worker_proc_def " + - "SET accepting_new=? " + - "WHERE worker_id=?", - new Object[] { acceptingNew, workerId } + "UPDATE cws_worker_proc_def " + + "SET accepting_new=? " + + "WHERE worker_id=?", + new Object[] { acceptingNew, workerId } ); } - - + + /** - * + * */ public List> getWorkerProcDefRows() { return jdbcTemplate.queryForList( - "SELECT * FROM cws_worker_proc_def"); + "SELECT * FROM cws_worker_proc_def"); } - - + + /** * Get proc defs where accepting_new is 1, and worker is alive (up) */ public List getAcceptableProcDefKeys() { return jdbcTemplate.queryForList( - "SELECT DISTINCT proc_def_key " + - "FROM cws_worker_proc_def WPD JOIN cws_worker W " + - "ON W.status='up' AND W.id=WPD.worker_id AND WPD.accepting_new = 1", - String.class + "SELECT DISTINCT proc_def_key " + + "FROM cws_worker_proc_def WPD JOIN cws_worker W " + + "ON W.status='up' AND W.id=WPD.worker_id AND WPD.accepting_new = 1", + String.class ); } - - + + /** - * - */ + * + */ public List> getWorkersForProcDefKey(String procDefKey){ return jdbcTemplate.queryForList( - "SELECT w.id, w.name, w.status, w.cws_install_type, pd.proc_def_key,pd.accepting_new "+ - "FROM cws_worker AS w "+ - "LEFT JOIN cws_worker_proc_def AS pd ON w.id=pd.worker_id AND "+ - "(pd.proc_def_key='" + procDefKey + "' OR pd.proc_def_key IS NULL) ORDER BY w.name"); + "SELECT w.id, w.name, w.status, w.cws_install_type, pd.proc_def_key,pd.accepting_new "+ + "FROM cws_worker AS w "+ + "LEFT JOIN cws_worker_proc_def AS pd ON w.id=pd.worker_id AND "+ + "(pd.proc_def_key='" + procDefKey + "' OR pd.proc_def_key IS NULL) ORDER BY w.name"); } - - + + /** - * - */ + * + */ public List> getProcDefWorkerCount(){ return jdbcTemplate.queryForList( - "SELECT prc.KEY_ AS pdk , IFNULL(SUM(pd.accepting_new),0) AS workers "+ - "FROM ACT_RE_PROCDEF AS prc "+ - "LEFT JOIN cws_worker_proc_def AS pd ON prc.KEY_=pd.proc_def_key GROUP BY KEY_"); - + "SELECT prc.KEY_ AS pdk , IFNULL(SUM(pd.accepting_new),0) AS workers "+ + "FROM ACT_RE_PROCDEF AS prc "+ + "LEFT JOIN cws_worker_proc_def AS pd ON prc.KEY_=pd.proc_def_key GROUP BY KEY_"); + // Simpler? : // select proc_def_key as pdk, sum(accepting_new) as workers from cws_worker_proc_def group by proc_def_key; } - - + + /** - * + * */ public Integer isWorkerProcDefAcceptingNew(String workerId, String deploymentId) { try { return jdbcTemplate.queryForObject( - "SELECT accepting_new " + - "FROM cws_worker_proc_def " + - "WHERE worker_id=? AND deployment_id=?", - new Object[]{workerId, deploymentId}, Integer.class); + "SELECT accepting_new " + + "FROM cws_worker_proc_def " + + "WHERE worker_id=? AND deployment_id=?", + new Object[]{workerId, deploymentId}, Integer.class); } catch (EmptyResultDataAccessException e) { log.debug("no cws_worker_proc_def row found for workerId = '" + workerId + "', deploymentId = '" + deploymentId + "'"); return null; } } - - + + /** - * + * */ public List> getWorkerProcDefRows(String workerId, Boolean acceptingNew) { if (acceptingNew != null) { return jdbcTemplate.queryForList( - "SELECT * FROM cws_worker_proc_def " + - "WHERE worker_id=? AND accepting_new=?", - new Object[]{workerId, acceptingNew}); + "SELECT * FROM cws_worker_proc_def " + + "WHERE worker_id=? AND accepting_new=?", + new Object[]{workerId, acceptingNew}); } else { return jdbcTemplate.queryForList( - "SELECT * FROM cws_worker_proc_def " + - "WHERE worker_id=?", - new Object[]{workerId}); + "SELECT * FROM cws_worker_proc_def " + + "WHERE worker_id=?", + new Object[]{workerId}); } } - - + + /** - * - */ + * + */ public void insertCwsToken(String cwsToken, String username, Timestamp expirationTime) { jdbcTemplate.update( - "INSERT IGNORE INTO cws_token " + - "(token, username, expiration_time) " + - "VALUES (?, ?, ?)", - new Object[] {cwsToken, username, expirationTime}); + "INSERT IGNORE INTO cws_token " + + "(token, username, expiration_time) " + + "VALUES (?, ?, ?)", + new Object[] {cwsToken, username, expirationTime}); } - - + + /** - * - */ + * + */ public void deleteCwsToken(String cwsToken, String username) { jdbcTemplate.update( - "DELETE FROM cws_token " + - "where token=? and username=?", - new Object[] {cwsToken, username}); + "DELETE FROM cws_token " + + "where token=? and username=?", + new Object[] {cwsToken, username}); } - - + + /** - * - */ + * + */ public Map getCwsToken(String cwsToken, String username) { return jdbcTemplate.queryForMap( - "SELECT * FROM cws_token " + - "WHERE token=? AND username=?", - new Object[] { cwsToken, username } + "SELECT * FROM cws_token " + + "WHERE token=? AND username=?", + new Object[] { cwsToken, username } ); } - - + + /** - * - */ + * + */ public List> getAllCwsTokens() { return jdbcTemplate.queryForList( - "SELECT * FROM cws_token" + "SELECT * FROM cws_token" ); } @@ -1468,9 +1495,9 @@ public List> getAllCwsTokens() { */ private int updateStatus(String status, String procInstId) { String query = - "UPDATE cws_proc_inst_status " + - "SET status = ? " + - "WHERE proc_inst_id = ? "; + "UPDATE cws_proc_inst_status " + + "SET status = ? " + + "WHERE proc_inst_id = ? "; return jdbcTemplate.update(query, status, procInstId); } @@ -1487,9 +1514,9 @@ private int updateStatusBulk(String status, List procInstIds) { String uuidSqlArray = buildSanitizedSqlArray(procInstIds, uuidPattern); String query = - "UPDATE cws_proc_inst_status " + - "SET status = ? " + - "WHERE proc_inst_id IN " + uuidSqlArray; + "UPDATE cws_proc_inst_status " + + "SET status = ? " + + "WHERE proc_inst_id IN " + uuidSqlArray; return jdbcTemplate.update(query, status); } @@ -1523,9 +1550,9 @@ public int retryFailedToStart(List uuids) { String uuidSqlArray = buildSanitizedSqlArray(uuids, uuidPattern); String query = - "UPDATE cws_sched_worker_proc_inst " + - "SET status = 'pending' " + - "WHERE uuid IN " + uuidSqlArray; + "UPDATE cws_sched_worker_proc_inst " + + "SET status = 'pending' " + + "WHERE uuid IN " + uuidSqlArray; return jdbcTemplate.update(query); } diff --git a/cws-service/src/main/java/jpl/cws/controller/RestService.java b/cws-service/src/main/java/jpl/cws/controller/RestService.java index 12cd6d70..8dcbc894 100644 --- a/cws-service/src/main/java/jpl/cws/controller/RestService.java +++ b/cws-service/src/main/java/jpl/cws/controller/RestService.java @@ -1103,8 +1103,12 @@ public GsonUTCDateAdapter() { @RequestParam(value = "procDefKey", required=false) String procDefKey, @RequestParam(value = "status", required=false) String status, @RequestParam(value = "minDate", required=false) String minDate, - @RequestParam(value = "maxDate", required=false) String maxDate + @RequestParam(value = "maxDate", required=false) String maxDate, + @RequestParam(value = "maxReturn", required=false, defaultValue="5000") String maxReturn ) { + + Integer intMaxReturn = Integer.parseInt(maxReturn); + log.debug("REST: getProcessInstancesSize (superProcInstId='" + superProcInstId + "', procInstId='" + procInstId + "', procDefKey='"+procDefKey+ @@ -1114,6 +1118,9 @@ public GsonUTCDateAdapter() { try { size = dbService.getFilteredProcessInstancesSize( superProcInstId, procInstId, procDefKey, status, minDate, maxDate); + if (intMaxReturn > 0 && intMaxReturn < size) { + size = intMaxReturn; + } } catch (Exception e) { log.error("Problem while getFilteredProcessInstancesSize", e); @@ -1126,14 +1133,13 @@ public GsonUTCDateAdapter() { @PathVariable String procInstId) { List instances = null; instances = cwsConsoleService.getFilteredProcessInstancesCamunda( - null, procInstId, null, null, null, null, "DESC", 1); + null, procInstId, null, null, null, null, "DESC", 0); if (instances.size() == 0) { return null; } else { return instances.get(0).getStatus(); } } - /** * REST method used to get Processes table JSON @@ -1148,14 +1154,16 @@ public GsonUTCDateAdapter() { @RequestParam(value = "minDate", required=false) String minDate, @RequestParam(value = "maxDate", required=false) String maxDate, @RequestParam(value = "dateOrderBy", required=false, defaultValue="DESC") String dateOrderBy, - @RequestParam(value = "page", required=false, defaultValue="0") String page + @RequestParam(value = "page", required=false, defaultValue="0") String page, + @RequestParam(value = "maxReturn", required=false, defaultValue="5000") String maxReturn ) { List instances = null; - int recordsToReturn = 0; - Integer pageNum = Integer.parseInt(page); try { + Integer pageNum = Integer.parseInt(page); + Integer intMaxReturn = Integer.parseInt(maxReturn); + dateOrderBy = dateOrderBy.toUpperCase(); if (!dateOrderBy.equals("DESC") && !dateOrderBy.equals("ASC")) { log.error("Invalid dateOrderBy of " + dateOrderBy + "! Forcing to be 'DESC'"); @@ -1166,22 +1174,22 @@ public GsonUTCDateAdapter() { "', procInstId='" + procInstId + "', procDefKey='"+procDefKey+ "', status='"+status+"', minDate="+minDate+", maxDate="+maxDate+ - ", dateOrderBy="+dateOrderBy+", page="+page+")"); + ", dateOrderBy="+dateOrderBy+")"); instances = cwsConsoleService.getFilteredProcessInstancesCamunda( superProcInstId, procInstId, procDefKey, status, minDate, maxDate, dateOrderBy, pageNum); - if (pageNum > instances.size()) { - recordsToReturn = instances.size(); - } else { - recordsToReturn = pageNum; + + if ((intMaxReturn != -1) && (instances.size() > intMaxReturn)) { + instances = instances.subList(0, intMaxReturn); } + } catch (Exception e) { log.error("Problem getting process instance information!", e); // return an empty set return new GsonBuilder().setPrettyPrinting().create().toJson(new ArrayList()); } - return new GsonBuilder().setPrettyPrinting().create().toJson(instances.subList(0,recordsToReturn)); + return new GsonBuilder().serializeNulls().create().toJson(instances); } diff --git a/cws-service/src/main/java/jpl/cws/scheduler/CwsProcessInstance.java b/cws-service/src/main/java/jpl/cws/scheduler/CwsProcessInstance.java index 16e18938..4596a263 100644 --- a/cws-service/src/main/java/jpl/cws/scheduler/CwsProcessInstance.java +++ b/cws-service/src/main/java/jpl/cws/scheduler/CwsProcessInstance.java @@ -1,6 +1,7 @@ package jpl.cws.scheduler; import java.sql.Timestamp; +import java.util.Map; public class CwsProcessInstance { @@ -22,7 +23,7 @@ public class CwsProcessInstance { private Timestamp procStartTime; // from Camunda ACT_HI_PROCINST_ table private Timestamp procEndTime; // from Camunda ACT_HI_PROCINST_ table - private String inputVariables; + private Map inputVariables; public CwsProcessInstance( String uuid, @@ -37,7 +38,7 @@ public CwsProcessInstance( String startedByWorker, Timestamp procStartTime, Timestamp procEndTime, - String inputVariables) { + Map inputVariables) { super(); this.uuid = uuid; this.procDefKey = procDefKey; @@ -86,11 +87,11 @@ public String getStatus() { public void setStatus(String status) { this.status = status; } - public void setInputVariables(String input) { + public void setInputVariables(Map input) { this.inputVariables = input; } - public String getInputVariables() { + public Map getInputVariables() { return inputVariables; } diff --git a/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java b/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java index bef32a67..0ab1d8dd 100644 --- a/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java +++ b/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java @@ -612,50 +612,31 @@ public LogHistory getHistoryForProcess(String processInstanceId) { return history; } - public String getInputVariablesForProcess(String processInstanceId) { + public Map getInputVariablesForProcess(String processInstanceId) { + Map inputVarMap = new HashMap(); List historyDetails = new ArrayList(); getHistoryVarDetails(historyDetails, processInstanceId); - - String output = ""; - String before = ""; - String after = ""; - int putAllAfter = 0; - int count = 0; + + if (processInstanceId == null) { + return inputVarMap; + } for (HistoryDetail historyDetail : historyDetails) { if (historyDetail.type.equals("VarUpdate") && historyDetail.activity.equals(processInstanceId)) { - if (count > 3) { - putAllAfter = 1; - } String message = historyDetail.message; String varType = message.substring(message.indexOf("("), message.indexOf(")")+1); String varName = message.substring(message.indexOf(")")+2); varName = varName.substring(0, varName.indexOf("=")-1) + " " + varType; String varValue = message.substring(message.indexOf("=")+2); - String temp = "
" + varName + ": " + varValue + "
" - + "

"; - if (varName.contains("workerId")) { - after = after + temp; - } else if (varName.contains("startedOnWorkerId")) { - after = after + temp; - putAllAfter = 1; - } else if (putAllAfter == 0) { - before = before + temp; + + if (inputVarMap.containsKey(varName)) { } else { - after = after + temp; + inputVarMap.put(varName, varValue); } - count++; + } } - if (after.isEmpty()) { - output = before; - } else { - output = before + "
Show All" + after + "
"; - } - return output; + return inputVarMap; } public List getExternalWorkersUiDTO() { @@ -1081,9 +1062,11 @@ public List getFilteredProcessInstancesCamunda(String superP String startedByWorker = (String) row.get("started_by_worker"); Timestamp procStartTime = (Timestamp) row.get("proc_start_time"); Timestamp procEndTime = (Timestamp) row.get("proc_end_time"); - String inputVars = ""; + Map inputVars; if (procInstIdObj != null) { - inputVars = getInputVariablesForProcess(procInstIdObj.toString()); + inputVars = getInputVariablesForProcess(procInstIdObj.toString()); + } else { + inputVars = new HashMap(); } CwsProcessInstance instance = new CwsProcessInstance(uuidObj == null ? null : uuidObj.toString(), procDefKeyObj == null ? null : procDefKeyObj.toString(), diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java index 4d322fbd..e02107b4 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/HistoryTestIT.java @@ -63,9 +63,10 @@ public void runResultsTest() throws IOException { goToPage("processes"); - log.info("Filtering Test History Page results."); waitForElementXPath("//div[@id=\'processes-table_filter\']/label/input"); + sleep(5000); + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).click(); driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys("test_history_page"); driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys(Keys.ENTER); diff --git a/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java b/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java index d865c227..65400f77 100644 --- a/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java +++ b/cws-test/src/test/java/jpl/cws/test/integration/ui/InitiatorsTestIT.java @@ -4,6 +4,9 @@ import java.io.IOException; import java.time.Duration; +import java.util.List; +import java.util.Set; +import java.util.logging.Level; import org.junit.Test; import org.openqa.selenium.By; @@ -15,6 +18,9 @@ import org.openqa.selenium.support.ui.WebDriverWait; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.openqa.selenium.logging.LogEntries; +import org.openqa.selenium.logging.LogEntry; +import org.openqa.selenium.logging.LogType; import jpl.cws.test.WebTestUtil; @@ -191,6 +197,16 @@ public void runVariableProcTest() throws IOException { log.info("Filtering results for Test Initiators Page test."); waitForElementXPath("//div[@id=\'processes-table_filter\']/label/input"); + Set logtyp = driver.manage().logs().getAvailableLogTypes(); + for (String s : logtyp) { + log.info("BROWSER: " + logtyp); + } + LogEntries logEntries = driver.manage().logs().get(LogType.BROWSER); + List lg = logEntries.getAll(); + for(LogEntry logEntry : lg) { + log.info("BROWSER: " + logEntry); + } + driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).click(); driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys("test_initiators_page"); driver.findElement(By.xpath("//div[@id=\'processes-table_filter\']/label/input")).sendKeys(Keys.ENTER); diff --git a/cws-ui/src/main/webapp/css/dashboard.css b/cws-ui/src/main/webapp/css/dashboard.css index 9ca0ab03..d3828a34 100644 --- a/cws-ui/src/main/webapp/css/dashboard.css +++ b/cws-ui/src/main/webapp/css/dashboard.css @@ -299,16 +299,6 @@ div[class*="bar-"]{ --button-diameter: 25px; --button-outline-width: 1px; --button-outline-color: rgb(141, 141, 141); - /* tooltip */ - --tooltip-bg: #f4f3f3; - --toolptip-border-radius: 4px; - --tooltip-font-family: Menlo, Roboto Mono, monospace; - --tooltip-font-size: 12px; - --tootip-text-color: rgb(50, 50, 50); - --tooltip-padding-x: 7px; - --tooltip-padding-y: 7px; - --tooltip-offset: 8px; - --tooltip-transition-duration: 0.3s; } .copy { @@ -325,57 +315,9 @@ div[class*="bar-"]{ float: right; } -.tooltip { - position: absolute; - opacity: 0; - visibility: 0; - top: 0; - left: 50%; - transform: translateX(-50%); - white-space: nowrap; - color: var(--tootip-text-color); - background: var(--tooltip-bg); - padding: var(--tooltip-padding-y) var(--tooltip-padding-x); - border-radius: var(--toolptip-border-radius); - pointer-events: none; - transition: all var(--tooltip-transition-duration) cubic-bezier(0.68, -0.55, 0.265, 1.55); -} - -.tooltip::before { - content: attr(data-text-initial); -} - -.tooltip::after { - content: ""; - position: absolute; - bottom: calc(var(--tooltip-padding-y) / 2 * -1); - width: var(--tooltip-padding-y); - height: var(--tooltip-padding-y); - background: inherit; - left: 50%; - transform: translateX(-50%) rotate(45deg); - z-index: -999; - pointer-events: none; -} - .copy svg { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); } - - -/* actions */ - -.copy:hover .tooltip, -.copy:focus:not(:focus-visible) .tooltip { - opacity: 1; - visibility: visible; - top: calc((100% + var(--tooltip-offset)) * -1); -} - -.copy:focus:not(:focus-visible) .tooltip::before { - content: attr(data-text-end); -} - diff --git a/cws-ui/src/main/webapp/css/microtip.css b/cws-ui/src/main/webapp/css/microtip.css new file mode 100644 index 00000000..eb90685f --- /dev/null +++ b/cws-ui/src/main/webapp/css/microtip.css @@ -0,0 +1,266 @@ +/* ------------------------------------------------------------------- + Microtip + + Modern, lightweight css-only tooltips + Just 1kb minified and gzipped + + @author Ghosh + @package Microtip + +---------------------------------------------------------------------- + 1. Base Styles + 2. Direction Modifiers + 3. Position Modifiers +--------------------------------------------------------------------*/ + + +/* ------------------------------------------------ + [1] Base Styles +-------------------------------------------------*/ + +[aria-label][role~="tooltip"] { + position: relative; +} + +[aria-label][role~="tooltip"]::before, +[aria-label][role~="tooltip"]::after { + transform: translate3d(0, 0, 0); + -webkit-backface-visibility: hidden; + backface-visibility: hidden; + will-change: transform; + opacity: 0; + pointer-events: none; + transition: all var(--microtip-transition-duration, .18s) var(--microtip-transition-easing, ease-in-out) var(--microtip-transition-delay, 0s); + position: absolute; + box-sizing: border-box; + z-index: 10; + transform-origin: top; +} + +[aria-label][role~="tooltip"]::before { + background-size: 100% auto !important; + content: ""; +} + +[aria-label][role~="tooltip"]::after { + background: rgba(17, 17, 17, .9); + border-radius: 4px; + color: #ffffff; + content: attr(aria-label); + font-size: var(--microtip-font-size, 13px); + font-weight: var(--microtip-font-weight, normal); + text-transform: var(--microtip-text-transform, none); + padding: .5em 1em; + white-space: nowrap; + box-sizing: content-box; +} + +[aria-label][role~="tooltip"]:hover::before, +[aria-label][role~="tooltip"]:hover::after, +[aria-label][role~="tooltip"]:focus::before, +[aria-label][role~="tooltip"]:focus::after { + opacity: 1; + pointer-events: auto; +} + + + +/* ------------------------------------------------ + [2] Position Modifiers +-------------------------------------------------*/ + +[role~="tooltip"][data-microtip-position|="top"]::before { + background: url("../images/tooltip-top.svg"); + height: 6px; + width: 18px; + margin-bottom: 5px; +} + +[role~="tooltip"][data-microtip-position|="top"]::after { + margin-bottom: 11px; +} + +[role~="tooltip"][data-microtip-position|="top"]::before { + transform: translate3d(-50%, 0, 0); + bottom: 100%; + left: 50%; +} + +[role~="tooltip"][data-microtip-position|="top"]:hover::before { + transform: translate3d(-50%, -5px, 0); +} + +[role~="tooltip"][data-microtip-position|="top"]::after { + transform: translate3d(-50%, 0, 0); + bottom: 100%; + left: 50%; +} + +[role~="tooltip"][data-microtip-position="top"]:hover::after { + transform: translate3d(-50%, -5px, 0); +} + +/* ------------------------------------------------ + [2.1] Top Left +-------------------------------------------------*/ +[role~="tooltip"][data-microtip-position="top-left"]::after { + transform: translate3d(calc(-100% + 16px), 0, 0); + bottom: 100%; +} + +[role~="tooltip"][data-microtip-position="top-left"]:hover::after { + transform: translate3d(calc(-100% + 16px), -5px, 0); +} + + +/* ------------------------------------------------ + [2.2] Top Right +-------------------------------------------------*/ +[role~="tooltip"][data-microtip-position="top-right"]::after { + transform: translate3d(calc(0% + -16px), 0, 0); + bottom: 100%; +} + +[role~="tooltip"][data-microtip-position="top-right"]:hover::after { + transform: translate3d(calc(0% + -16px), -5px, 0); +} + + +/* ------------------------------------------------ + [2.3] Bottom +-------------------------------------------------*/ +[role~="tooltip"][data-microtip-position|="bottom"]::before { + background: url("../images/tooltip-bottom.svg"); + height: 6px; + width: 18px; + margin-top: 5px; + margin-bottom: 0; +} + +[role~="tooltip"][data-microtip-position|="bottom"]::after { + margin-top: 11px; +} + +[role~="tooltip"][data-microtip-position|="bottom"]::before { + transform: translate3d(-50%, -10px, 0); + bottom: auto; + left: 50%; + top: 100%; +} + +[role~="tooltip"][data-microtip-position|="bottom"]:hover::before { + transform: translate3d(-50%, 0, 0); +} + +[role~="tooltip"][data-microtip-position|="bottom"]::after { + transform: translate3d(-50%, -10px, 0); + top: 100%; + left: 50%; +} + +[role~="tooltip"][data-microtip-position="bottom"]:hover::after { + transform: translate3d(-50%, 0, 0); +} + + +/* ------------------------------------------------ + [2.4] Bottom Left +-------------------------------------------------*/ +[role~="tooltip"][data-microtip-position="bottom-left"]::after { + transform: translate3d(calc(-100% + 16px), -10px, 0); + top: 100%; +} + +[role~="tooltip"][data-microtip-position="bottom-left"]:hover::after { + transform: translate3d(calc(-100% + 16px), 0, 0); +} + + +/* ------------------------------------------------ + [2.5] Bottom Right +-------------------------------------------------*/ +[role~="tooltip"][data-microtip-position="bottom-right"]::after { + transform: translate3d(calc(0% + -16px), -10px, 0); + top: 100%; +} + +[role~="tooltip"][data-microtip-position="bottom-right"]:hover::after { + transform: translate3d(calc(0% + -16px), 0, 0); +} + + +/* ------------------------------------------------ + [2.6] Left +-------------------------------------------------*/ +[role~="tooltip"][data-microtip-position="left"]::before, +[role~="tooltip"][data-microtip-position="left"]::after { + bottom: auto; + left: auto; + right: 100%; + top: 50%; + transform: translate3d(10px, -50%, 0); +} + +[role~="tooltip"][data-microtip-position="left"]::before { + background: url("../images/tooltip-left.svg"); + height: 18px; + width: 6px; + margin-right: 5px; + margin-bottom: 0; +} + +[role~="tooltip"][data-microtip-position="left"]::after { + margin-right: 11px; +} + +[role~="tooltip"][data-microtip-position="left"]:hover::before, +[role~="tooltip"][data-microtip-position="left"]:hover::after { + transform: translate3d(0, -50%, 0); +} + + +/* ------------------------------------------------ + [2.7] Right +-------------------------------------------------*/ +[role~="tooltip"][data-microtip-position="right"]::before, +[role~="tooltip"][data-microtip-position="right"]::after { + bottom: auto; + left: 100%; + top: 50%; + transform: translate3d(-10px, -50%, 0); +} + +[role~="tooltip"][data-microtip-position="right"]::before { + background: url("../images/tooltip-right.svg"); + height: 18px; + width: 6px; + margin-bottom: 0; + margin-left: 5px; +} + +[role~="tooltip"][data-microtip-position="right"]::after { + margin-left: 11px; +} + +[role~="tooltip"][data-microtip-position="right"]:hover::before, +[role~="tooltip"][data-microtip-position="right"]:hover::after { + transform: translate3d(0, -50%, 0); +} + +/* ------------------------------------------------ + [3] Size +-------------------------------------------------*/ +[role~="tooltip"][data-microtip-size="small"]::after { + white-space: initial; + width: 80px; +} + +[role~="tooltip"][data-microtip-size="medium"]::after { + white-space: initial; + width: 150px; +} + +[role~="tooltip"][data-microtip-size="large"]::after { + white-space: initial; + width: 260px; +} diff --git a/cws-ui/src/main/webapp/images/tooltip-bottom.svg b/cws-ui/src/main/webapp/images/tooltip-bottom.svg new file mode 100644 index 00000000..a8431526 --- /dev/null +++ b/cws-ui/src/main/webapp/images/tooltip-bottom.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cws-ui/src/main/webapp/images/tooltip-left.svg b/cws-ui/src/main/webapp/images/tooltip-left.svg new file mode 100644 index 00000000..ce070d5a --- /dev/null +++ b/cws-ui/src/main/webapp/images/tooltip-left.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cws-ui/src/main/webapp/images/tooltip-right.svg b/cws-ui/src/main/webapp/images/tooltip-right.svg new file mode 100644 index 00000000..f3e741cc --- /dev/null +++ b/cws-ui/src/main/webapp/images/tooltip-right.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cws-ui/src/main/webapp/images/tooltip-top.svg b/cws-ui/src/main/webapp/images/tooltip-top.svg new file mode 100644 index 00000000..e25e328d --- /dev/null +++ b/cws-ui/src/main/webapp/images/tooltip-top.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/cws-ui/src/main/webapp/js/cws.js b/cws-ui/src/main/webapp/js/cws.js index de591b7d..96289bdb 100644 --- a/cws-ui/src/main/webapp/js/cws.js +++ b/cws-ui/src/main/webapp/js/cws.js @@ -22,3 +22,449 @@ function getQueryString(){ return params; } +function getInstanceCSV(procInstId) { + var outputCSV = ""; + var logLines = []; + var scrollId = ""; + var proc_info = {}; + var baseEsReq = { + "from": 0, + "size": 20, + "query": { + "bool": { + "must" :[] + } + }, + "sort": { "@timestamp": { "order": "asc" } } + }; + baseEsReq.query.bool.must.push({"query_string":{"fields":["procInstId"],"query" : "\"" + decodeURIComponent(procInstId) + "\""}}); + + //get process history + $.ajax({ + type: "GET", + url: "/${base}/rest/history/" + procInstId, + Accept : "application/json", + contentType: "application/json", + dataType: "json", + async: false + }).success(function(data) { + var status = data.state; + if (data.state === "COMPLETED") { + status = "Complete"; + } + else if (data.state === "ACTIVE") { + status = "Running"; + } + proc_info["process_definition"] = data.procDefKey; + proc_info["process_instance"] = data.procInstId; + proc_info["start_time"] = data.startTime; + proc_info["end_time"] = data.endTime; + proc_info["duration"] = convertMillis(data.duration); + proc_info["status"] = status; + for (const entry of data.details) { + let date = entry["date"]; + if (entry["message"].startsWith("Ended ")) { + date += " "; + } + const row = [date, entry["type"], entry["activity"], outputMessage(entry["message"])]; + logLines.push(row); + } + }).fail(function(xhr, err) { + console.error("Error getting instance JSON: " + xhr.responseText); + }); + + $.ajax({ + type: "GET", + url: "/${base}/rest/logs/get?source=" + encodeURIComponent(JSON.stringify(baseEsReq)), + Accept : "application/json", + contentType: "application/json", + dataType: "json", + async: false + }).success(function(data) { + var finished = false; + scrollId = data._scroll_id; + if (data.hits) { + for (const hit of data.hits.hits) { + const source = hit._source; + const row = [source["@timestamp"], "Log", source.actInstId.split(':')[0], "

" + source.msgBody.replace(//g, '>').replace(/\n/g, "
") + "

"]; + logLines.push(row); + + } + } + while (!finished) { + $.ajax({ + type: "POST", + url: "/${base}/rest/logs/get/scroll", + data: "scrollId=" + scrollId, + async: false, + success: function(data) { + if (data.hits) { + + if (data.hits.hits.length > 0) { + for (const hit of data.hits.hits) { + const source = hit._source; + const row = [source["@timestamp"], "Log", source.actInstId.split(':')[0], "

" + source.msgBody.replace(//g, '>').replace(/\n/g, "
") + "

"]; + logLines.push(row); + } + scrollId = data._scroll_id; + } + else { + finished = true; + } + } + }, + error: function(e) { + alert("Error retrieving history data."); + } + }); + } + }).fail(function(xhr, err) { + console.error("Error getting instance JSON: " + xhr.responseText); + }); + logLines.sort(function(a, b) { + var aTemp = a[0]; + //if there is a space in the last char, remove it + if (aTemp.charAt(aTemp.length - 1) == " ") { + aTemp = aTemp.substring(0, aTemp.length - 1); + } + var bTemp = b[0]; + //if there is a space in the last char, remove it + if (bTemp.charAt(bTemp.length - 1) == " ") { + bTemp = bTemp.substring(0, bTemp.length - 1); + } + var aDate = moment(aTemp); + var bDate = moment(bTemp); + if (aDate.isBefore(bDate)) return -1; + if (bDate.isBefore(aDate)) return 1; + return 0; + }); + + logLines.forEach(function(row) { + var data = row; + var details = data[3]; + var tmpDetails = ""; + var lineString = ""; + if (data[3].indexOf("Setting (json)") === -1) { + details = details.replaceAll('
', "\n"); + details = details.replaceAll("

", ""); + details = details.replaceAll("

", ""); + details = details.replaceAll('"' , '""'); + details = details.replaceAll('\n' , ' '); + //add first and last char as double quotes + details = '"' + details + '"'; + lineString = proc_info["process_definition"] + "," + proc_info["process_instance"] + "," + data[0] + "," + data[1] + "," + data[2] + "," + details + "\r\n"; + } else { + lineString = proc_info["process_definition"] + "," + proc_info["process_instance"] + "," + data[0] + "," + data[1] + "," + data[2] + ","; + //remove last char + if (data[3].indexOf("_in =") !== -1) { + lineString += '"' + details.substring(0, details.indexOf("_in =")+3) + " "; + details = details.substring(details.indexOf("_in =")+3); + } else { + lineString += '"' + details.substring(0, details.indexOf("_out =")+4) + " "; + details = details.substring(details.indexOf("_out =")+4); + } + //now we need to go through and get details from json string + //note: key is always after
")+1); + var key = details.substring(0, details.indexOf("")); + details = details.substring(details.indexOf("")); + tmpDetails += key + ": " + value + "; "; + } + //check/clean tmpDetails + if (tmpDetails !== "") { + //replace all break points with new line + tmpDetails = tmpDetails.replaceAll(/
/g, " "); + //find and remove everything between and + tmpDetails = tmpDetails.replace(/.*<\/summary>/g, ""); + //find and remove
and
+ tmpDetails = tmpDetails.replace(/
/g, ""); + tmpDetails = tmpDetails.replace(/<\/details>/g, ""); + //CSV quirk: replace all " with "" + tmpDetails = tmpDetails.replaceAll('"' , '""'); + } + //remove last char + tmpDetails = tmpDetails.substring(0, tmpDetails.length-1); + tmpDetails = tmpDetails + '"'; + lineString += tmpDetails + "\r\n"; + } + lineString = lineString.replaceAll("
Remote Address
and value is the following td + while (details.indexOf("
")+4); + var value = details.substring(0, details.indexOf("
", ""); + outputCSV = outputCSV + lineString; + } ); + return outputCSV; +}; + +function getInstanceJSON(procInstId) { + var outputJSON = {}; + var logLinesJSON = {}; + var logLines = []; + var scrollId = ""; + var baseEsReq = { + "from": 0, + "size": 20, + "query": { + "bool": { + "must" :[] + } + }, + "sort": { "@timestamp": { "order": "asc" } } + }; + baseEsReq.query.bool.must.push({"query_string":{"fields":["procInstId"],"query" : "\"" + decodeURIComponent(procInstId) + "\""}}); + + //get process history + $.ajax({ + type: "GET", + url: "/${base}/rest/history/" + procInstId, + Accept : "application/json", + contentType: "application/json", + dataType: "json", + async: false + }).success(function(data) { + var status = data.state; + if (data.state === "COMPLETED") { + status = "Complete"; + } + else if (data.state === "ACTIVE") { + status = "Running"; + } + var proc_info = { + "process_definition": data.procDefKey, + "process_instance": data.procInstId, + "start_time": data.startTime, + "end_time": data.endTime, + "duration": convertMillis(data.duration), + "status": status + }; + outputJSON["process_info"] = proc_info; + for (const entry of data.details) { + let date = entry["date"]; + if (entry["message"].startsWith("Ended ")) { + date += " "; + } + const row = [date, entry["type"], entry["activity"], outputMessage(entry["message"])]; + logLines.push(row); + } + }).fail(function(xhr, err) { + console.error("Error getting instance JSON: " + xhr.responseText); + }); + + $.ajax({ + type: "GET", + url: "/${base}/rest/logs/get?source=" + encodeURIComponent(JSON.stringify(baseEsReq)), + Accept : "application/json", + contentType: "application/json", + dataType: "json", + async: false + }).success(function(data) { + var finished = false; + scrollId = data._scroll_id; + if (data.hits) { + for (const hit of data.hits.hits) { + const source = hit._source; + const row = [source["@timestamp"], "Log", source.actInstId.split(':')[0], "

" + source.msgBody.replace(//g, '>').replace(/\n/g, "
") + "

"]; + logLines.push(row); + + } + } + while (!finished) { + $.ajax({ + type: "POST", + url: "/${base}/rest/logs/get/scroll", + data: "scrollId=" + scrollId, + async: false, + success: function(data) { + if (data.hits) { + + if (data.hits.hits.length > 0) { + for (const hit of data.hits.hits) { + const source = hit._source; + const row = [source["@timestamp"], "Log", source.actInstId.split(':')[0], "

" + source.msgBody.replace(//g, '>').replace(/\n/g, "
") + "

"]; + logLines.push(row); + } + scrollId = data._scroll_id; + } + else { + finished = true; + } + } + }, + error: function(e) { + alert("Error retrieving history data."); + } + }); + } + }).fail(function(xhr, err) { + console.error("Error getting instance JSON: " + xhr.responseText); + }); + logLines.sort(function(a, b) { + var aTemp = a[0]; + //if there is a space in the last char, remove it + if (aTemp.charAt(aTemp.length - 1) == " ") { + aTemp = aTemp.substring(0, aTemp.length - 1); + } + var bTemp = b[0]; + //if there is a space in the last char, remove it + if (bTemp.charAt(bTemp.length - 1) == " ") { + bTemp = bTemp.substring(0, bTemp.length - 1); + } + var aDate = moment(aTemp); + var bDate = moment(bTemp); + if (aDate.isBefore(bDate)) return -1; + if (bDate.isBefore(aDate)) return 1; + return 0; + }); + + var i = 0; + logLines.forEach(function(row) { + var data = row; + var tmpDetails = data[3]; + var details = ""; + var lineJson = {}; + var nestedJson = {}; + //go through data[0] and if there is a space at the end, remove it + if (data[0].charAt(data[0].length - 1) == " ") { + data[0] = data[0].substring(0, data[0].length - 1); + } + if (data[3].indexOf("Setting (json)") === -1) { + //check if data[3] starts with "
". If it does, remove it. + if (data[3].startsWith("
")) { + tmpDetails = data[3].substring(11); + } + details = data[3]; + lineJson = { + "time-stamp": data[0], + "type": data[1], + "source": data[2], + "details": details + }; + } else { + var fixedDetails = ""; + if (data[3].startsWith("
")) { + data[3] = data[3].substring(11); + } + //we need to first separate the string from the rest of the HTML + if (data[3].indexOf("_in =") !== -1) { + details = data[3].substring(0, data[3].indexOf("_in =")+3); + tmpDetails = data[3].substring(data[3].indexOf("_in =")+3); + } else { + details = data[3].substring(0, data[3].indexOf("_out =")+4); + tmpDetails = data[3].substring(data[3].indexOf("_out =")+4); + } + //now we need to go through and get details from json string + //note: key is always after ")+1); + var key = tmpDetails.substring(0, tmpDetails.indexOf("")); + tmpDetails = tmpDetails.substring(tmpDetails.indexOf("")); + nestedJson[key] = value; + } + //check/clean nested json object + if (nestedJson["stdout"] !== undefined) { + //replace all break points with new line + nestedJson["stdout"] = nestedJson["stdout"].replaceAll(/
/g, "\n"); + //find and remove everything between and + nestedJson["stdout"] = nestedJson["stdout"].replace(/.*<\/summary>/g, ""); + } + lineJson = { + "time-stamp": data[0], + "type": data[1], + "source": data[2], + "details": details, + "json": nestedJson + }; + } + //check/clean details + if (lineJson["details"] !== "") { + //replace all break points with new line + details = details.replaceAll('
', "\n"); + details = details.replaceAll('
', "\n"); + details = details.replaceAll("

", ""); + details = details.replaceAll("

", ""); + lineJson["details"] = details; + } + logLinesJSON[i] = lineJson; + i++; + } ); + outputJSON["logs"] = logLinesJSON; + return outputJSON; +}; + +function outputMessage(msg) { + + if (msg.startsWith("Setting (json) ")) { + + var i2 = msg.indexOf("= ") + + if (i2 != -1) { + var cmd = msg.substring(0, i2 + 1) + var jsonObj = JSON.parse(msg.substring(i2 + 2)) + var output = '
and value is the following td + while (tmpDetails.indexOf("
")+4); + var value = tmpDetails.substring(0, tmpDetails.indexOf("
' + cmd + '

' + + Object.keys(jsonObj).forEach(function(key) { + var value = jsonObj[key]; + output += makeRow(key, value, cmd) + }); + + output += '
' + + return output + } + } + + return msg.replace(//g, '>').replace(/\n/g, "
") +} + +function makeRow(key, value, cmd) { + + var style = 'width: 210px;' + + if (cmd.endsWith('_out =')) { + style = 'width: 120px;' + } + + if (key == 'stdout' || key == 'stderr') { + return '' + key + '' + formatMsg(value) + '' + } + return '' + key + '' + value + '' +} + +function formatMsg(msg) { + + var index = 0, count = 0, maxCount = 30 + + for ( ; count < maxCount && i2 != -1; count++) { + + var i2 = msg.indexOf('\n', index) + + if (i2 != -1) { + index = i2 + 1 + } + } + + if (count < maxCount - 1 || index > msg.length / 2) { + return msg.replace(//g, '>').replace(/\n/g, "
") + } + + var first = msg.substring(0, index).replace(//g, '>').replace(/\n/g, "
") + var rest = msg.substring(index).replace(//g, '>').replace(/\n/g, "
") + + return first + '
Show All' + rest + '
' +} + +function convertMillis(millis) { + + var x = millis / 1000 + var seconds = Math.floor(x % 60) + x /= 60 + var minutes = Math.floor(x) + + if (minutes === 0) + return millis / 1000 + " sec"; + + return minutes + " min " + seconds + " sec" +} + diff --git a/install/cws-ui/deployments.ftl b/install/cws-ui/deployments.ftl index a9388a8d..93121de2 100644 --- a/install/cws-ui/deployments.ftl +++ b/install/cws-ui/deployments.ftl @@ -11,8 +11,9 @@ + - - - @@ -18,6 +15,7 @@ + - - - - - - - - - + + + + + + + - <#include "navbar.ftl">
@@ -106,22 +94,80 @@

Processes

-
- By default, the 5000 most recent processes are loaded. - - - +
+

Filters:

+

Select filters before retrieving data to reduce loading time.

+
+

Process Definition:

+ +
+

Subprocess & Superprocess:

+ +
+
+ + +
+
+
+

Status:

+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+

Created Date:

+ + + +
+
+

Max Results:

+ + +
+
+
+
+
+ +
Matched Processes:
+
+
-
- - + +
+  Filters 
+

Displaying Subprocesses for Process Instance ID: 34374-349083748

-
@@ -137,7 +183,9 @@ Started on Worker Process Start Process End - Input Variables + Input Variables + Superprocess ID + UUID @@ -152,52 +200,236 @@ //STATE PERSISTANCE CONSTS const username = "username"; //temporary, hardcoded value for now - const rowsToLoadVar = "CWS_DASH_PROC_ROWS-" + username; + const hideSubProcsVar = "CWS_DASH_PROCS_HIDE_SUBPROCS-" + username; + //GLOBAL VARS var params = {}; - var rows; - var loadRows = 5000; - var rowsTotal = 0; + //DOCUMENT.READY START $( document ).ready(function() { - - //get our current url - var currentUrl = window.location.href; - - if (localStorage.getItem(rowsToLoadVar) != null) { - loadRows = parseInt(localStorage.getItem(rowsToLoadVar)); + //try to load hideSubProcsVar from local storage. If it doesn't exist, set it to true + //(automatically hides subprocs if never visited this page before) + if (localStorage.getItem(hideSubProcsVar) === null) { + localStorage.setItem(hideSubProcsVar, true); } - if (localStorage.getItem(rowsToLoadVar) != null) { - loadRows = parseInt(localStorage.getItem(rowsToLoadVar)); - } + //initialize our datepicker elements + $("#min-date").datepicker({ + orientation:'left top', + todayBtn: 'true', + todayHighlight:true + }); - displayMessage(); + $("#max-date").datepicker({ + orientation:'left top', + todayBtn: 'true', + todayHighlight:true + }); + + $("#filters-btn").click(function(){ + if($("#filters-div").is(":visible")) + $("#filter-arrow").removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down"); + else + $("#filter-arrow").removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up"); + $("#filters-div").slideToggle(); + }); + + $("#filter-submit-btn").click(function(){ + updateLocation(false); + }); + + $("#display-subprocs-div").css('display', 'none'); //get our params from the url params = getQueryString(); - if (!params) { - $("#hide-subprocs-btn").prop('checked', false); - $("#display-subprocs-div").css('display', 'none'); - } - else if (!params.superProcInstId) { - $("#hide-subprocs-btn").prop('checked', false); - $("#display-subprocs-div").css('display', 'none'); - } - else if (params.superProcInstId.toLowerCase() === 'null') { - $("#hide-subprocs-btn").prop('checked', true); - $("#display-subprocs-div").css('display', 'none'); - } - else { - $("#hide-subprocs-div").css('display', 'none'); - - $("#super-proc-inst-id").html(params.superProcInstId); - } + //get our current url + var currentUrl = window.location.href; + + //apply our params to the filter section of the page + applyParamsToFilters(params); + getNumMatchingProcesses(); + + //when we edit a filter in the filters table, get the new number of matching processes + $("#pd-select").change(function(){ + getNumMatchingProcesses(); + }); + $("#status-select").change(function(){ + getNumMatchingProcesses(); + }); + $("#min-date").change(function(){ + getNumMatchingProcesses(); + }); + $("#max-date").change(function(){ + getNumMatchingProcesses(); + }); + $("#super-proc-inst-id-in").change(function(){ + getNumMatchingProcesses(); + }); + $("#filter-submit-btn").click(function(){ + updateLocation(false); + }); + $("#hide-subprocs-btn").click(function(){ + updateLocation(true); + if (!($("#hide-subprocs-btn")).is(":checked")) { + $("#super-proc-inst-id-in").hide(); + } else { + $("#super-proc-inst-id-in").show(); + } + }); + $("#max-return-num").change(function(){ + getNumMatchingProcesses(); + }); + $("#max-return-all").change(function(){ + getNumMatchingProcesses(); + if ($("#max-return-all").is(":checked")) { + $("#max-return-num").prop('disabled', true); + } else { + $("#max-return-num").prop('disabled', false); + } + }); + + displayMessage(); $.fn.dataTable.moment( 'MMM D, YYYY, h:mm:ss A' ); $("#processes-table").DataTable({ + language: { + searchBuilder: { + add: "Add Criteria" + } + }, + deferRender: true, + columns: [ + { + data: null, + defaultContent: '', + className: 'select-checkbox', + orderable: false + }, + { + data: "procInstId", + defaultContent: '', + className: 'details-control', + orderable: false, + render: function (data, type) { + if (type === 'display') { + if (data == null) { + return 'History' + + "Subprocs"; + } + return 'History' + + "Subprocs"; + } + return data; + } + }, + { + data: "procDefKey", + }, + { + data: {procInstId : "procInstId", status : "status"}, + render: function (data, type) { + if (type === 'display') { + if (data.status === "incident") { + var incidentUrl = "/camunda/app/cockpit/default/#/process-instance/" + data.procInstId + "/runtime?tab=incidents-tab"; + return "" + data.procInstId + ""; + } else { + return data.procInstId; + } + } else { + return data; + } + } + }, + { data: "status" }, + { data: "createdTimestamp" }, + { + data: "startedByWorker", + render: function (data, type) { + if (type === 'display') { + if (data !== null) { + return data + "
Worker IP: " + data.split("_").slice(0, -2).join("."); + } + } + return data; + } + }, + { data: "procStartTime" }, + { + data: {procEndTime : "procEndTime", procStartTime : "procStartTime"}, + render: function (data, type) { + if (type === 'display') { + if (data.procEndTime == null) { + return ""; + } + if (data.procStartTime !== '' && data.procEndTime !== '') { + var start = moment(data.procStartTime); + var end = moment(data.procEndTime); + var procDuration = "
(~" + moment.duration(end.diff(start)).humanize() + ")"; + } else { + var procDuration = ''; + } + return data.procEndTime + procDuration; + } else { + return data.procEndTime; + } + } + }, + { + data: "inputVariables", + render: function (data, type) { + if (jQuery.isEmptyObject(data)) { + return ""; + } + if (type === 'display') { + var output = ""; + var before = ""; + var after = ""; + var putAllAfter = 0; + var count = 0; + for (const [key, value] of Object.entries(data)) { + if (key === "workerId") { + continue; + } + if (count > 3) { + putAllAfter = 1; + } + var temp = "
" + key + ": " + value + "
" + + "" + + "" + + "

"; + if (key === "startedOnWorkerId") { + after = after + temp; + putAllAfter = 1; + } else if (putAllAfter === 0) { + before = before + temp; + } else { + after = after + temp; + } + count++; + } + if (after.length < 0) { + output = before; + } else { + output = before + "
Show All" + after + "
"; + } + return output; + } else { + var outputToString = ""; + for (const [key, value] of Object.entries(data)) { + if (key === "workerId") { + continue; + } + outputToString += outputToString + key + ": " + value + ","; + } + return outputToString; + } + } + }, + { data: "superProcInstId" }, + { data: "uuid" } + ], searchDelay: 250, select: { style: 'multi+shift', @@ -206,23 +438,33 @@ columnDefs: [ { orderable: false, - className: 'select-checkbox', + className: 'select-checkbox noVis', targets: 0 }, { orderable: false, + className: 'noVis', searchable: false, targets: 1 }, { - orderable: false, - searchable: false, - targets: 2 - } + targets: [ 6,10,11 ], + visible: false + }, + { "width": "300px", "targets": 9 } ], - stateSave: true, - dom: "Q<'row'<'col-sm-auto buttons'B>><'row'<'col-sm-1 action-button'><'col-sm-1 download-button'><'col-sm-5 length'l><'col-sm-5 filter'f>>" + "tip", + "stateSave": true, + "stateLoadParams": function (settings, data) { + data.columns.forEach(function (column) { + column.search.search = ""; + }); + }, + dom: "Q<'row'<'col-sm-auto buttons'B>><'row'<'col-sm-1 action-button'><'col-sm-5 length'l><'col-sm-6 filter'f>>" + "tip", buttons: [ + { + extend: 'colvis', + columns: ':not(.noVis)' + }, { text: "Select all on page", action: function () { @@ -250,23 +492,13 @@ $("#processes-table").DataTable().rows().deselect(); updateActionList(); } - } + }, ], searchBuilder: { - columns: [3,4,5,6,7,8,9,10], - }, - language: { - searchBuilder: { - title: { - 0: 'Filters', - _: 'Filters (%d active)' - }, - } - } + columns: [2,3,4,5,6,7,8,9,10,11] + } }); - renderRows(loadRows); - var table = $("#processes-table").DataTable(); table.on( 'select', function ( e, dt, type, indexes ) { updateActionList(); @@ -276,12 +508,23 @@ updateActionList(); } ); + $(document).on('click', '.copy', function (e) { + e.preventDefault(); + var copyValue = $(this).attr('data-copyValue'); + copyInput(copyValue); + $(this).attr('aria-label', 'Copied!'); + setTimeout(function () { + $('.copy').attr('aria-label', 'Copy'); + }, 2000); + }); + $('' + '`).appendTo(".action-button"); - $(`)`).appendTo(".download-button"); + fetchAndDisplayProcesses(); }); + //DOCUMENT.READY END - $("#load-more-btn").click(function() { - loadRows += 5000; - localStorage.setItem(rowsToLoadVar, loadRows); - renderRows(loadRows); - }); + function fetchAndDisplayProcesses() { + //create our qstring + var qstring = "?"; + if(params != null){ + for(p in params){ + qstring += encodeURI(p)+"="+encodeURI(params[p])+"&"; + } + } + qstring = qstring.substring(0,qstring.length-1); + //fetch number of processes + var numProcs = 0; + //show ajax spinner + $(".ajax-spinner").show(); + $.ajax({ + url: "/${base}/rest/processes/getInstancesSize" + qstring, + type: "GET", + async: false, + success: function (data) { + numProcs = data; + }, + error: function (xhr, ajaxOptions, thrownError) { + console.log("Error getting number of processes: " + thrownError); + } + }); + //fetch processes + var numCalls = Math.ceil(numProcs / 50); + var returnedData = []; + var doneArr = []; + var urlPageAddition = ""; + if (qstring === "") { + urlPageAddition = "?page="; + } else { + urlPageAddition = "&page="; + } + for (var i = 0; i < numCalls; i++) { + $.ajax({ + url: "/${base}/rest/processes/getInstancesCamunda" + qstring + urlPageAddition + i, + type: "GET", + async: true, + success: function (data) { + returnedData = returnedData.concat(data); + doneArr.push(true); + }, + error: function (xhr, ajaxOptions, thrownError) { + console.log("Error getting processes: " + thrownError); + } + }); + } + var interval = setInterval(function () { + if (doneArr.length === numCalls) { + clearInterval(interval); + $("#processes-table").DataTable().clear(); + $("#processes-table").DataTable().rows.add(returnedData).draw(); + //hide ajax spinner + $(".ajax-spinner").hide(); + } + }, 250); + } + + function updateLocation(changeHideSubs) { + var localParams = {}; - $("#load-less-btn").click(function() { - loadRows -= 5000; - if (loadRows < 5000) { - loadRows = 5000; + if($("#pd-select").val() != "def"){ + localParams["procDefKey"] = $("#pd-select").val(); } - localStorage.setItem(rowsToLoadVar, loadRows); - renderRows(loadRows); - }); + localParams["status"] = ''; + $("#status-select input:checked").each(function(){ + localParams["status"] += $(this).val()+','; + }); + if(localParams["status"] != '') + localParams["status"] = localParams["status"].substr(0, localParams["status"].length - 1 ); + else + delete localParams['status']; + if($("#super-proc-inst-id-in").val() != ""){ + localParams["superProcInstId"] = $("#super-proc-inst-id-in").val(); + } + if($("#min-date").val() != ""){ + localParams["minDate"] = encodeURIComponent($("#min-date").val()); + } + if($("#max-date").val() != ""){ + localParams["maxDate"] = encodeURIComponent($("#max-date").val()); + } + if($("#max-return-all").prop("checked")){ + localParams["maxReturn"] = -1; + } + else{ + localParams["maxReturn"] = $("#max-return-num").val(); + } + if ($("#hide-subprocs-btn").prop("checked")) { + localParams["superProcInstId"] = "null"; + } else if (!($("#hide-subprocs-btn").prop("checked"))) { + delete localParams["superProcInstId"]; + } + var qstring = "?"; + if(localParams != null){ + for(p in localParams){ + qstring += encodeURI(p)+"="+encodeURI(localParams[p])+"&"; + } + } + qstring = qstring.substring(0,qstring.length-1); + console.log(encodeURI(qstring)); + window.location="/${base}/processes" + qstring; + } - $("#load-all-btn").click(function() { - loadRows = -1; - localStorage.setItem(rowsToLoadVar, loadRows); - renderRows(loadRows); - }); + function getNumMatchingProcesses() { + var localParams = {}; - function getFilterQString(changeHideSubs) { - var params = {}; - - if (changeHideSubs) { - if ($("#hide-subprocs-btn").prop("checked")) { - params.superProcInstId = "null"; + if($("#pd-select").val() != "def"){ + localParams["procDefKey"] = $("#pd-select").val(); + } + localParams["status"] = ''; + $("#status-select input:checked").each(function(){ + localParams["status"] += $(this).val()+','; + }); + if(localParams["status"] != '') + localParams["status"] = localParams["status"].substr(0, localParams["status"].length - 1 ); + else + delete localParams['status']; + if($("#super-proc-inst-id-in").val() != ""){ + localParams["superProcInstId"] = $("#super-proc-inst-id-in").val(); + } + if($("#min-date").val() != ""){ + localParams["minDate"] = encodeURIComponent($("#min-date").val()); + } + if($("#max-date").val() != ""){ + localParams["maxDate"] = encodeURIComponent($("#max-date").val()); + } + if($("#max-return-all").prop("checked")){ + localParams["maxReturn"] = -1; + } + else{ + localParams["maxReturn"] = $("#max-return-num").val(); + } + if ($("#hide-subprocs-btn").prop("checked")) { + localParams["superProcInstId"] = "null"; + } else { + delete localParams["superProcInstId"]; + + } + var qstring = "?"; + if(localParams != null){ + for(p in localParams){ + qstring += encodeURI(p)+"="+encodeURI(localParams[p])+"&"; } } - else { - var qs = getQueryString(); - - if (qs && qs.superProcInstId) { - params.superProcInstId = qs.superProcInstId; + qstring = qstring.substring(0,qstring.length-1); + var numMatching = 0; + $.ajax({ + url: "/${base}/rest/processes/getInstancesSize" + qstring, + type: "GET", + async: false, + success: function (data) { + numMatching = data; + }, + error: function (xhr, ajaxOptions, thrownError) { + console.log("Error getting number of processes: " + thrownError); + numMatching = "Error"; } + }); + $("#numMatchProcesses").text(numMatching); + if (numMatching > 5000) { + $("#procCountWarning").text("Warning: Large number of processes may increase load time."); + } else { + $("#procCountWarning").text(""); } - - var qstring = "?"; + } + function applyParamsToFilters(params) { if(params != null){ - for(p in params){ - qstring += encodeURI(p)+"="+encodeURI(params[p])+"&"; + $("#pd-select").val(params.procDefKey || "def"); + if(params.status){ + var k = params.status.split(','); + for(i in k){ + $("#status-select input[value='"+k[i]+"']").prop("checked",true); + } + } + if (!params) { + $("#super-proc-inst-id-in").show(); + $("#hide-subprocs-btn").prop('checked', false); + $("#display-subprocs-div").css('display', 'none'); } + else if (params.superProcInstId == undefined) { + $("#super-proc-inst-id-in").show(); + $("#hide-subprocs-btn").prop('checked', false); + $("#display-subprocs-div").css('display', 'none'); + } + else if (params.superProcInstId.toLowerCase() === 'null') { + $("#super-proc-inst-id-in").hide(); + $("#hide-subprocs-btn").prop('checked', true); + $("#display-subprocs-div").css('display', 'none'); + } + else { + $("#super-proc-inst-id-in").show(); + $("#hide-subprocs-div").css('display', 'none'); + $("#super-proc-inst-id").html(params.superProcInstId); + } + //$("#status-select").val(params.status); + $("#min-date").val(params.minDate || ""); + $("#max-date").val(params.maxDate || ""); + $("#max-return").val(params.maxReturn || 5000); + $("#super-proc-inst-id-in").val(params.superProcInstId || ""); } - qstring = qstring.substring(0,qstring.length-1); - return qstring; } - function updateLocation(changeHideSubs) { - window.location="/${base}/processes" + getFilterQString(changeHideSubs); - } - - $("#hide-subprocs-btn").click(function(){ - updateLocation(true); - }); - // --------------------------------- // DISPLAY STATUS MESSAGE (IF ANY) // @@ -374,8 +759,6 @@ } } - - function viewHistory(procInstId) { if (procInstId !== '') { @@ -393,97 +776,6 @@ return false; } } - - // ---------------------------------------------------- - // Get the process instances, and render them as rows - // - function renderRows(rowsToLoad) { - - $("#proc-log div.ajax-spinner").show(); - - qstr = document.location.search; - //we only care about the superProcInstId part of query string - if (qstr.indexOf("superProcInstId") > -1) { - //get everything after ? and before first & - qstr = qstr.substring(qstr.indexOf("?")); - if (qstr.indexOf("&") > -1) { - qstr = qstr.substring(0, qstr.indexOf("&")); - } - } else { - qstr = ""; - } - //console.log("/${base}/rest/processes/getInstances"+qstr); - params = getQueryString(); - var numProcs = 0; - var requestProc = 0; - - //get the number of instances - $.get("/${base}/rest/processes/getInstancesSize"+qstr, - function(res) { - numProcs = res; - rowsTotal = res; - if (numProcs < 5000) { - $("#load-more-div").hide(); - } else { - $("#load-more-div").show(); - } - if (rowsToLoad === -1) { - requestProc = numProcs; - } else { - requestProc = rowsToLoad; - } - // - // GET THE PROCESS INSTANCE, - // AND RENDER THEM... - // - if (qstr === "") { - qstr = "?"; - } - $.get("/${base}/rest/processes/getInstancesCamunda"+qstr+"&page="+requestProc, - function(res) { - var table = $("#processes-table").DataTable() - - table.clear(); - for (i in res) { - var procInstId = (res[i].procInstId == undefined ? '' : res[i].procInstId); - var incidentUrl = "/camunda/app/cockpit/default/#/process-instance/" + procInstId + "/runtime?tab=incidents-tab"; - if (res[i].startedByWorker !== undefined) { - var workerIP = "
Worker IP: " + res[i].startedByWorker.split("_").slice(0, -2).join("."); - } else { - var workerIP = "
Worker IP: "; - } - var procStartTime = (res[i].procStartTime == undefined ? '' : res[i].procStartTime); - var procEndTime = (res[i].procEndTime == undefined ? '' : res[i].procEndTime); - if (procStartTime !== '' && procEndTime !== '') { - var start = moment(procStartTime); - var end = moment(procEndTime); - var procDuration = "
(~" + moment.duration(end.diff(start)).humanize() + ")"; - } else { - var procDuration = ''; - } - table.row.add( - $(""+ - "" + - "History" + - "Subprocs" + - ""+ res[i].procDefKey +""+ - ""+ (res[i].status == 'incident' ? ("" + procInstId + "") : procInstId) + "" + - ""+ res[i].status +""+ - ""+ (res[i].createdTimestamp == undefined ? '' : res[i].createdTimestamp) + ""+ - ""+ (res[i].startedByWorker == undefined ? '' : res[i].startedByWorker + workerIP) + ""+ - ""+ procStartTime + ""+ - ""+ procEndTime + procDuration + ""+ - ""+ (res[i].inputVariables == undefined ? '' : res[i].inputVariables) + ""+ - "") - ); - } - table.draw(); - - $("#proc-log div.ajax-spinner").hide(); - }); - }); - - } // --------------------------------------------------------------- // Updates the list of active items in the Actions drop-down list @@ -505,7 +797,7 @@ selectedRows.every( function ( rowIdx, tableLoop, rowLoop ) { var data = this.data(); - switch (data[6]) { + switch (data[4]) { case 'disabled': numDisabledSelected++; break; @@ -554,6 +846,8 @@ $("#action_download_selected_json").removeClass("enabled"); $("#action_download_selected_csv").addClass("disabled"); $("#action_download_selected_csv").removeClass("enabled"); + $("#action_download_selected_list").addClass("disabled"); + $("#action_download_selected_list").removeClass("enabled"); // Remove hrefs from the anchor tags $("#action_disable_atag").removeAttr("href"); @@ -565,6 +859,7 @@ $("#action_copy_all_selected_history_links_atag").removeAttr("href"); $("#action_download_selected_json_atag").removeAttr("href"); $("#action_download_selected_csv_atag").removeAttr("href"); + $("#action_download_selected_list_atag").removeAttr("href"); // Enable the right one @@ -594,15 +889,19 @@ $("#action_mark_as_resolved_atag").attr("href", "javascript:action_mark_as_resolved();"); } - if ((numSelected > 0 && numPendingSelected === 0)) { - $("#action_open_selected_new_tabs").removeClass("disabled"); - $("#action_open_selected_new_tabs_atag").attr("href", "javascript:action_open_selected_new_tabs();"); - $("#action_copy_all_selected_history_links").removeClass("disabled"); - $("#action_copy_all_selected_history_links_atag").attr("href", "javascript:action_copy_all_selected_history_links();"); - $("#action_download_selected_json").removeClass("disabled"); - $("#action_download_selected_json_atag").attr("href", "javascript:downloadSelectedJSON();"); - $("#action_download_selected_csv").removeClass("disabled"); - $("#action_download_selected_csv_atag").attr("href", "javascript:downloadSelectedCSV();"); + if ((numSelected > 0)) { + $("#action_download_selected_list").removeClass("disabled"); + $("#action_download_selected_list_atag").attr("href", "javascript:downloadListJSON();"); + if (numPendingSelected === 0) { + $("#action_open_selected_new_tabs").removeClass("disabled"); + $("#action_open_selected_new_tabs_atag").attr("href", "javascript:action_open_selected_new_tabs();"); + $("#action_copy_all_selected_history_links").removeClass("disabled"); + $("#action_copy_all_selected_history_links_atag").attr("href", "javascript:action_copy_all_selected_history_links();"); + $("#action_download_selected_json").removeClass("disabled"); + $("#action_download_selected_json_atag").attr("href", "javascript:downloadSelectedJSON();"); + $("#action_download_selected_csv").removeClass("disabled"); + $("#action_download_selected_csv_atag").attr("href", "javascript:downloadSelectedCSV();"); + } } // Execute adaptation actions if any @@ -614,7 +913,7 @@ var selectedRows = table.rows( { selected: true } ); selectedRows.every( function ( rowIdx, tableLoop, rowLoop ) { var data = this.data(); - window.open("/${base}/history?procInstId=" + data[5], "_blank"); + window.open("/${base}/history?procInstId=" + data["procInstId"], "_blank"); } ); } @@ -626,16 +925,16 @@ var links = ""; selectedRows.every( function ( rowIdx, tableLoop, rowLoop ) { var data = this.data(); - links += protocol + "://" + host + "/${base}/history?procInstId=" + data[5] + "\n"; + links += protocol + "://" + host + "/${base}/history?procInstId=" + data["procInstId"] + "\n"; } ); navigator.clipboard.writeText(links); } - // ------------------------------------------------------------------------------- // Function fired when user clicks on "Enable Selected Rows..." in drop-down list // function action_enable_rows() { + var table = $("#processes-table").DataTable(); $.ajax({ type: "POST", url: "/${base}/rest/processes/makeDisabledRowsPending", @@ -646,19 +945,18 @@ }) .done(function(msg) { $("#action_msg").html(msg.message); - renderRows(); - resetCheckboxes(); + table.ajax.reload(); }) .fail(function(xhr, err) { $("#action_msg").html(xhr.responseTextmsg.message); }); } - // -------------------------------------------------------------------------------- // Function fired when user clicks on "Disable Selected Rows..." in drop-down list // function action_disable_rows() { + var table = $("#processes-table").DataTable(); $.ajax({ type: "POST", url: "/${base}/rest/processes/makePendingRowsDisabled", @@ -669,19 +967,18 @@ }) .done(function(msg) { $("#action_msg").html(msg.message); - renderRows(); - resetCheckboxes(); + table.ajax.reload(); }) .fail(function(xhr, err) { $("#action_msg").html(xhr.responseTextmsg.message); }); } - // -------------------------------------------------------------------------------- // Function fired when user clicks on "Retry Selected Incident Rows..." in drop-down list // function action_retry_incident_rows() { + var table = $("#processes-table").DataTable(); $.ajax({ type: "POST", url: "/${base}/rest/processes/retryIncidentRows", @@ -692,7 +989,7 @@ }) .done(function(msg) { $("#action_msg").html(msg.message); - location.reload(); + table.ajax.reload(); }) .fail(function(xhr, err) { $("#action_msg").html(xhr.responseTextmsg.message); @@ -707,6 +1004,7 @@ // Function fired when user clicks on "Retry Selected Failed to Start Rows..." in drop-down list // function action_retry_failed_to_start() { + var table = $("#processes-table").DataTable(); $.ajax({ type: "POST", url: "/${base}/rest/processes/retryFailedToStart", @@ -717,7 +1015,7 @@ }) .done(function(msg) { $("#action_msg").html(msg.message); - location.reload(); + table.ajax.reload(); }) .fail(function(xhr, err) { $("#action_msg").html(xhr.responseTextmsg.message); @@ -728,6 +1026,7 @@ // Function fired when user clicks on "Mark Selected Failed Rows As Resolved..." in drop-down list // function action_mark_as_resolved() { + var table = $("#processes-table").DataTable(); $.ajax({ type: "POST", url: "/${base}/rest/processes/markResolved", @@ -738,20 +1037,12 @@ }) .done(function(msg) { $("#action_msg").html(msg.message); - location.reload(); + table.ajax.reload(); }) .fail(function(xhr, err) { $("#action_msg").html(xhr.responseTextmsg.message); }); } - - // ------------------------------------ - // Clear checked selections (resolves timing issues after an action is chosen) - // - function resetCheckboxes() { - $("input[status]:checked").attr("checked", false) - updateActionList(); - } // ------------------------------------ // Get array of selected rows (uuids) @@ -765,11 +1056,10 @@ var selectedRows = table.rows( { selected: true } ); selectedRows.every( function ( rowIdx, tableLoop, rowLoop ) { - var html = this.node(); - var status = $(html).children("td:first").attr("status"); - var uuid = $(html).children("td:first").attr("uuid"); - var procInstId = $(html).children("td:first").attr("procInstId"); var data = this.data(); + var status = data["status"]; + var uuid = data["uuid"]; + var procInstId = data["procInstId"]; switch (status) { case 'disabled': selectedRowUuids.push(uuid); @@ -798,7 +1088,7 @@ var selectedRows = table.rows( { selected: true } ); selectedRows.every( function ( rowIdx, tableLoop, rowLoop ) { var data = this.data(); - var procInstId = data[5]; + var procInstId = data["procInstId"]; var json = getInstanceJSON(procInstId); mainJSON[procInstId] = json; }); @@ -815,7 +1105,7 @@ var selectedRows = table.rows( { selected: true } ); selectedRows.every( function ( rowIdx, tableLoop, rowLoop ) { var data = this.data(); - var procInstId = data[5]; + var procInstId = data["procInstId"]; var csv = getInstanceCSV(procInstId); mainCSV += csv; }); @@ -825,452 +1115,6 @@ ); } - function getInstanceCSV(procInstId) { - var outputCSV = ""; - var logLines = []; - var scrollId = ""; - var proc_info = {}; - var baseEsReq = { - "from": 0, - "size": 20, - "query": { - "bool": { - "must" :[] - } - }, - "sort": { "@timestamp": { "order": "asc" } } - }; - baseEsReq.query.bool.must.push({"query_string":{"fields":["procInstId"],"query" : "\"" + decodeURIComponent(procInstId) + "\""}}); - - //get process history - $.ajax({ - type: "GET", - url: "/${base}/rest/history/" + procInstId, - Accept : "application/json", - contentType: "application/json", - dataType: "json", - async: false - }).success(function(data) { - var status = data.state; - if (data.state === "COMPLETED") { - status = "Complete"; - } - else if (data.state === "ACTIVE") { - status = "Running"; - } - proc_info["process_definition"] = data.procDefKey; - proc_info["process_instance"] = data.procInstId; - proc_info["start_time"] = data.startTime; - proc_info["end_time"] = data.endTime; - proc_info["duration"] = convertMillis(data.duration); - proc_info["status"] = status; - for (const entry of data.details) { - let date = entry["date"]; - if (entry["message"].startsWith("Ended ")) { - date += " "; - } - const row = [date, entry["type"], entry["activity"], outputMessage(entry["message"])]; - logLines.push(row); - } - }).fail(function(xhr, err) { - console.error("Error getting instance JSON: " + xhr.responseText); - }); - - $.ajax({ - type: "GET", - url: "/${base}/rest/logs/get?source=" + encodeURIComponent(JSON.stringify(baseEsReq)), - Accept : "application/json", - contentType: "application/json", - dataType: "json", - async: false - }).success(function(data) { - var finished = false; - scrollId = data._scroll_id; - if (data.hits) { - for (const hit of data.hits.hits) { - const source = hit._source; - const row = [source["@timestamp"], "Log", source.actInstId.split(':')[0], "

" + source.msgBody.replace(//g, '>').replace(/\n/g, "
") + "

"]; - logLines.push(row); - - } - } - while (!finished) { - $.ajax({ - type: "POST", - url: "/${base}/rest/logs/get/scroll", - data: "scrollId=" + scrollId, - async: false, - success: function(data) { - if (data.hits) { - - if (data.hits.hits.length > 0) { - for (const hit of data.hits.hits) { - const source = hit._source; - const row = [source["@timestamp"], "Log", source.actInstId.split(':')[0], "

" + source.msgBody.replace(//g, '>').replace(/\n/g, "
") + "

"]; - logLines.push(row); - } - scrollId = data._scroll_id; - } - else { - finished = true; - } - } - }, - error: function(e) { - alert("Error retrieving history data."); - } - }); - } - }).fail(function(xhr, err) { - console.error("Error getting instance JSON: " + xhr.responseText); - }); - logLines.sort(function(a, b) { - var aTemp = a[0]; - //if there is a space in the last char, remove it - if (aTemp.charAt(aTemp.length - 1) == " ") { - aTemp = aTemp.substring(0, aTemp.length - 1); - } - var bTemp = b[0]; - //if there is a space in the last char, remove it - if (bTemp.charAt(bTemp.length - 1) == " ") { - bTemp = bTemp.substring(0, bTemp.length - 1); - } - var aDate = moment(aTemp); - var bDate = moment(bTemp); - if (aDate.isBefore(bDate)) return -1; - if (bDate.isBefore(aDate)) return 1; - return 0; - }); - - logLines.forEach(function(row) { - var data = row; - var details = data[3]; - var tmpDetails = ""; - var lineString = ""; - if (data[3].indexOf("Setting (json)") === -1) { - details = details.replaceAll('
', "\n"); - details = details.replaceAll("

", ""); - details = details.replaceAll("

", ""); - details = details.replaceAll('"' , '""'); - details = details.replaceAll('\n' , ' '); - //add first and last char as double quotes - details = '"' + details + '"'; - lineString = proc_info["process_definition"] + "," + proc_info["process_instance"] + "," + data[0] + "," + data[1] + "," + data[2] + "," + details + "\r\n"; - } else { - lineString = proc_info["process_definition"] + "," + proc_info["process_instance"] + "," + data[0] + "," + data[1] + "," + data[2] + ","; - //remove last char - if (data[3].indexOf("_in =") !== -1) { - lineString += '"' + details.substring(0, details.indexOf("_in =")+3) + " "; - details = details.substring(details.indexOf("_in =")+3); - } else { - lineString += '"' + details.substring(0, details.indexOf("_out =")+4) + " "; - details = details.substring(details.indexOf("_out =")+4); - } - //now we need to go through and get details from json string - //note: key is always after and value is the following td - while (details.indexOf("")+1); - var key = details.substring(0, details.indexOf("")); - details = details.substring(details.indexOf("")+4); - var value = details.substring(0, details.indexOf("")); - tmpDetails += key + ": " + value + "; "; - } - //check/clean tmpDetails - if (tmpDetails !== "") { - //replace all break points with new line - tmpDetails = tmpDetails.replaceAll(/
/g, " "); - //find and remove everything between and - tmpDetails = tmpDetails.replace(/.*<\/summary>/g, ""); - //find and remove
and
- tmpDetails = tmpDetails.replace(/
/g, ""); - tmpDetails = tmpDetails.replace(/<\/details>/g, ""); - //CSV quirk: replace all " with "" - tmpDetails = tmpDetails.replaceAll('"' , '""'); - } - //remove last char - tmpDetails = tmpDetails.substring(0, tmpDetails.length-1); - tmpDetails = tmpDetails + '"'; - lineString += tmpDetails + "\r\n"; - } - lineString = lineString.replaceAll("", ""); - outputCSV = outputCSV + lineString; - } ); - return outputCSV; - }; - - function getInstanceJSON(procInstId) { - var outputJSON = {}; - var logLinesJSON = {}; - var logLines = []; - var scrollId = ""; - var baseEsReq = { - "from": 0, - "size": 20, - "query": { - "bool": { - "must" :[] - } - }, - "sort": { "@timestamp": { "order": "asc" } } - }; - baseEsReq.query.bool.must.push({"query_string":{"fields":["procInstId"],"query" : "\"" + decodeURIComponent(procInstId) + "\""}}); - - //get process history - $.ajax({ - type: "GET", - url: "/${base}/rest/history/" + procInstId, - Accept : "application/json", - contentType: "application/json", - dataType: "json", - async: false - }).success(function(data) { - var status = data.state; - if (data.state === "COMPLETED") { - status = "Complete"; - } - else if (data.state === "ACTIVE") { - status = "Running"; - } - var proc_info = { - "process_definition": data.procDefKey, - "process_instance": data.procInstId, - "start_time": data.startTime, - "end_time": data.endTime, - "duration": convertMillis(data.duration), - "status": status - }; - outputJSON["process_info"] = proc_info; - for (const entry of data.details) { - let date = entry["date"]; - if (entry["message"].startsWith("Ended ")) { - date += " "; - } - const row = [date, entry["type"], entry["activity"], outputMessage(entry["message"])]; - logLines.push(row); - } - }).fail(function(xhr, err) { - console.error("Error getting instance JSON: " + xhr.responseText); - }); - - $.ajax({ - type: "GET", - url: "/${base}/rest/logs/get?source=" + encodeURIComponent(JSON.stringify(baseEsReq)), - Accept : "application/json", - contentType: "application/json", - dataType: "json", - async: false - }).success(function(data) { - var finished = false; - scrollId = data._scroll_id; - if (data.hits) { - for (const hit of data.hits.hits) { - const source = hit._source; - const row = [source["@timestamp"], "Log", source.actInstId.split(':')[0], "

" + source.msgBody.replace(//g, '>').replace(/\n/g, "
") + "

"]; - logLines.push(row); - - } - } - while (!finished) { - $.ajax({ - type: "POST", - url: "/${base}/rest/logs/get/scroll", - data: "scrollId=" + scrollId, - async: false, - success: function(data) { - if (data.hits) { - - if (data.hits.hits.length > 0) { - for (const hit of data.hits.hits) { - const source = hit._source; - const row = [source["@timestamp"], "Log", source.actInstId.split(':')[0], "

" + source.msgBody.replace(//g, '>').replace(/\n/g, "
") + "

"]; - logLines.push(row); - } - scrollId = data._scroll_id; - } - else { - finished = true; - } - } - }, - error: function(e) { - alert("Error retrieving history data."); - } - }); - } - }).fail(function(xhr, err) { - console.error("Error getting instance JSON: " + xhr.responseText); - }); - logLines.sort(function(a, b) { - var aTemp = a[0]; - //if there is a space in the last char, remove it - if (aTemp.charAt(aTemp.length - 1) == " ") { - aTemp = aTemp.substring(0, aTemp.length - 1); - } - var bTemp = b[0]; - //if there is a space in the last char, remove it - if (bTemp.charAt(bTemp.length - 1) == " ") { - bTemp = bTemp.substring(0, bTemp.length - 1); - } - var aDate = moment(aTemp); - var bDate = moment(bTemp); - if (aDate.isBefore(bDate)) return -1; - if (bDate.isBefore(aDate)) return 1; - return 0; - }); - - var i = 0; - logLines.forEach(function(row) { - var data = row; - var tmpDetails = data[3]; - var details = ""; - var lineJson = {}; - var nestedJson = {}; - //go through data[0] and if there is a space at the end, remove it - if (data[0].charAt(data[0].length - 1) == " ") { - data[0] = data[0].substring(0, data[0].length - 1); - } - if (data[3].indexOf("Setting (json)") === -1) { - //check if data[3] starts with "
". If it does, remove it. - if (data[3].startsWith("
")) { - tmpDetails = data[3].substring(11); - } - details = data[3]; - lineJson = { - "time-stamp": data[0], - "type": data[1], - "source": data[2], - "details": details - }; - } else { - var fixedDetails = ""; - if (data[3].startsWith("
")) { - data[3] = data[3].substring(11); - } - //we need to first separate the string from the rest of the HTML - if (data[3].indexOf("_in =") !== -1) { - details = data[3].substring(0, data[3].indexOf("_in =")+3); - tmpDetails = data[3].substring(data[3].indexOf("_in =")+3); - } else { - details = data[3].substring(0, data[3].indexOf("_out =")+4); - tmpDetails = data[3].substring(data[3].indexOf("_out =")+4); - } - //now we need to go through and get details from json string - //note: key is always after ")+1); - var key = tmpDetails.substring(0, tmpDetails.indexOf("")); - tmpDetails = tmpDetails.substring(tmpDetails.indexOf("")); - nestedJson[key] = value; - } - //check/clean nested json object - if (nestedJson["stdout"] !== undefined) { - //replace all break points with new line - nestedJson["stdout"] = nestedJson["stdout"].replaceAll(/
/g, "\n"); - //find and remove everything between and - nestedJson["stdout"] = nestedJson["stdout"].replace(/.*<\/summary>/g, ""); - } - lineJson = { - "time-stamp": data[0], - "type": data[1], - "source": data[2], - "details": details, - "json": nestedJson - }; - } - //check/clean details - if (lineJson["details"] !== "") { - //replace all break points with new line - details = details.replaceAll('
', "\n"); - details = details.replaceAll('
', "\n"); - details = details.replaceAll("

", ""); - details = details.replaceAll("

", ""); - lineJson["details"] = details; - } - logLinesJSON[i] = lineJson; - i++; - } ); - outputJSON["logs"] = logLinesJSON; - return outputJSON; - }; - - function outputMessage(msg) { - - if (msg.startsWith("Setting (json) ")) { - - var i2 = msg.indexOf("= ") - - if (i2 != -1) { - var cmd = msg.substring(0, i2 + 1) - var jsonObj = JSON.parse(msg.substring(i2 + 2)) - var output = '
and value is the following td - while (tmpDetails.indexOf("
")+4); - var value = tmpDetails.substring(0, tmpDetails.indexOf("
' + cmd + '

' - - Object.keys(jsonObj).forEach(function(key) { - var value = jsonObj[key]; - output += makeRow(key, value, cmd) - }); - - output += '
' - - return output - } - } - - return msg.replace(//g, '>').replace(/\n/g, "
") - } - - function makeRow(key, value, cmd) { - - var style = 'width: 210px;' - - if (cmd.endsWith('_out =')) { - style = 'width: 120px;' - } - - if (key == 'stdout' || key == 'stderr') { - return '' + key + '' + formatMsg(value) + '' - } - return '' + key + '' + value + '' - } - - function formatMsg(msg) { - - var index = 0, count = 0, maxCount = 30 - - for ( ; count < maxCount && i2 != -1; count++) { - - var i2 = msg.indexOf('\n', index) - - if (i2 != -1) { - index = i2 + 1 - } - } - - if (count < maxCount - 1 || index > msg.length / 2) { - return msg.replace(//g, '>').replace(/\n/g, "
") - } - - var first = msg.substring(0, index).replace(//g, '>').replace(/\n/g, "
") - var rest = msg.substring(index).replace(//g, '>').replace(/\n/g, "
") - - return first + '
Show All' + rest + '
' - } - - function convertMillis(millis) { - - var x = millis / 1000 - var seconds = Math.floor(x % 60) - x /= 60 - var minutes = Math.floor(x) - - if (minutes === 0) - return millis / 1000 + " sec"; - - return minutes + " min " + seconds + " sec" - } - $("#json-bttn").click(function(e) { e.preventDefault(); downloadListJSON(); @@ -1282,108 +1126,58 @@ var numRows = dt.rows({selected:true}).count(); var jsonFile = {}; var processes = {}; - jsonFile["num_rows_loaded"] = rowsTotal; - - if (numRows === 0) { - dt.rows({search:'applied'}).every( function ( rowIdx, tableLoop, rowLoop ) { - var data = this.data(); - var thisProcJSON = {}; - var startedOnWorker = ""; - var workerIP = ""; - var duration = ""; - var process_end = ""; - var inputVars = ""; - var inputVarsTemp = ""; - - if (data[8] !== "") { - startedOnWorker = data[6].substring(0, data[6].indexOf("
")); - workerIP = data[6].substring(data[6].indexOf("")+4, data[6].length); - } else { - startedOnWorker = data[6]; - } - if (data[8] !== "") { - duration = data[8]; - //get everything after
but before - duration = duration.substring(duration.indexOf("
") + 7, duration.indexOf("")); - process_end = data[8].substring(0, data[8].indexOf("
")-1); - } - - if (data[9] !== "") { - inputVarsTemp = data[9].replaceAll("
", ", "); - inputVarsTemp = inputVarsTemp.replaceAll("
Show All", ""); - while (inputVarsTemp.indexOf("") !== -1) { - inputVarsTemp = inputVarsTemp.substring(inputVarsTemp.indexOf("") + 3, inputVarsTemp.length); - inputVarsTemp = inputVarsTemp.replace("", "") - inputVars += inputVarsTemp.substring(0, inputVarsTemp.indexOf("
")) + ", "; - } - inputVars = inputVars.substring(0, inputVars.length - 2); - } + dt.rows({selected: true, search:'applied'}).every( function ( rowIdx, tableLoop, rowLoop ) { + var data = this.data(); + console.log(data); + var thisProcJSON = {}; + var startedOnWorker = ""; + var workerIP = ""; + var duration = ""; + var process_end = ""; + var inputVars = ""; + var inputVarsTemp = ""; + + if (data["startedByWorker"] !== "") { + startedOnWorker = data["startedByWorker"]; + workerIP = data["startedByWorker"].split("_").slice(0, -2).join("."); + } else { + startedOnWorker = data["startedByWorker"]; + } - thisProcJSON["definition_key"] = data[2]; - thisProcJSON["process_instance_id"] = data[3]; - thisProcJSON["status"] = data[4]; - thisProcJSON["schedule_queued_time"] = data[5]; - thisProcJSON["started_on_worker"] = startedOnWorker; - thisProcJSON["worker_ip"] = workerIP; - thisProcJSON["process_start"] = data[7]; - thisProcJSON["process_end"] = process_end; - thisProcJSON["duration"] = duration; - thisProcJSON["input_variables"] = inputVars; - - processes[data[3]] = thisProcJSON; - } ); - } else { - dt.rows({selected: true, search:'applied'}).every( function ( rowIdx, tableLoop, rowLoop ) { - var data = this.data(); - var thisProcJSON = {}; - var startedOnWorker = ""; - var workerIP = ""; - var duration = ""; - var process_end = ""; - var inputVars = ""; - var inputVarsTemp = ""; - - if (data[8] !== "") { - startedOnWorker = data[6].substring(0, data[6].indexOf("
")); - workerIP = data[6].substring(data[6].indexOf("")+4, data[6].length); + if (data["procEndTime"] !== "") { + process_end = data["procEndTime"]; + if (data["procStartTime"] !== '' && data["procEndTime"] !== '') { + var start = moment(data["procStartTime"]); + var end = moment(data["procEndTime"]); + duration = moment.duration(end.diff(start)).humanize(); } else { - startedOnWorker = data[6]; + duration = ''; } + } - if (data[8] !== "") { - duration = data[8]; - //get everything after
but before - duration = duration.substring(duration.indexOf("
") + 7, duration.indexOf("")); - process_end = data[8].substring(0, data[8].indexOf("
")-1); - + if (data["inputVariables"] !== {}) { + for (var key in data["inputVariables"]) { + inputVarsTemp += key + ": " + data["inputVariables"][key] + ", "; } - - if (data[9] !== "") { - inputVarsTemp = data[9].replaceAll("
", ", "); - inputVarsTemp = inputVarsTemp.replaceAll("
Show All", ""); - while (inputVarsTemp.indexOf("") !== -1) { - inputVarsTemp = inputVarsTemp.substring(inputVarsTemp.indexOf("") + 3, inputVarsTemp.length); - inputVarsTemp = inputVarsTemp.replace("", "") - inputVars += inputVarsTemp.substring(0, inputVarsTemp.indexOf("
")) + ", "; - } - inputVars = inputVars.substring(0, inputVars.length - 2); + if (inputVarsTemp.length > 2) { + inputVars = inputVarsTemp.substring(0, inputVarsTemp.length-2); } + } - thisProcJSON["definition_key"] = data[2]; - thisProcJSON["process_instance_id"] = data[3]; - thisProcJSON["status"] = data[4]; - thisProcJSON["schedule_queued_time"] = data[5]; - thisProcJSON["started_on_worker"] = startedOnWorker; - thisProcJSON["worker_ip"] = workerIP; - thisProcJSON["process_start"] = data[7]; - thisProcJSON["process_end"] = process_end; - thisProcJSON["duration"] = duration; - thisProcJSON["input_variables"] = inputVars; - - processes[data[3]] = thisProcJSON; - } ); - } + thisProcJSON["definition_key"] = data["procDefKey"]; + thisProcJSON["process_instance_id"] = data["procInstId"]; + thisProcJSON["status"] = data["status"]; + thisProcJSON["schedule_queued_time"] = data["createdTimestamp"]; + thisProcJSON["started_on_worker"] = startedOnWorker; + thisProcJSON["worker_ip"] = workerIP; + thisProcJSON["process_start"] = data["procStartTime"]; + thisProcJSON["process_end"] = process_end; + thisProcJSON["duration"] = duration; + thisProcJSON["input_variables"] = inputVars; + + processes[data["procInstId"]] = thisProcJSON; + } ); jsonFile["processes"] = processes; console.log(jsonFile); $.fn.dataTable.fileSave( From 969d9bcd4c583f411a267e79796be2d289b3d0fe Mon Sep 17 00:00:00 2001 From: James Wood Date: Thu, 13 Jul 2023 11:41:33 -0700 Subject: [PATCH 13/24] Add worker tags table and insert/update rest API (#159) * - Added sql table - Added Insert/Update REST API for worker tags * Added line feed --- .../jpl/cws/core/db/SchedulerDbService.java | 33 +++++++++++++++++++ .../java/jpl/cws/core/web/JsonResponse.java | 5 ++- .../java/jpl/cws/controller/RestService.java | 31 +++++++++++++++-- install/sql/core.sql.template | 12 ++++++- 4 files changed, 77 insertions(+), 4 deletions(-) diff --git a/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java b/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java index adfe79b5..4ae9aa8e 100644 --- a/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java +++ b/cws-core/src/main/java/jpl/cws/core/db/SchedulerDbService.java @@ -1254,6 +1254,39 @@ public List> getProcInstStatus(String procInstId, Integer lim } + /** + * + */ + public void updateWorkerTag(String workerId, String name, String value) throws Exception { + + // If we are adding a tag, then first try inserting a new row. + // If the insert actually inserted a new row, then we are done. + // If the row already existed, then update the row. + // + int numUpdated = jdbcTemplate.update( + "INSERT IGNORE INTO cws_worker_tags " + + "(worker_id, name, value) " + + "VALUES (?, ?, ?)", + new Object[] {workerId, name, value}); + if (numUpdated == 0) { + // row was already there, so just update it + numUpdated = jdbcTemplate.update( + "UPDATE cws_worker_tags " + + "SET value=?, updated_time=? " + + "WHERE worker_id=? AND name=?", + new Object[] { + value, + new Timestamp(DateTime.now().getMillis()), + workerId, + name}); + log.debug("Updated " + numUpdated + " row(s) in the cws_worker_tags table..."); + } + else { + log.debug("Inserted " + numUpdated + " row(s) into the cws_worker_tags table..."); + } + } + + /** * */ diff --git a/cws-core/src/main/java/jpl/cws/core/web/JsonResponse.java b/cws-core/src/main/java/jpl/cws/core/web/JsonResponse.java index 5460ac77..ccd8e83e 100644 --- a/cws-core/src/main/java/jpl/cws/core/web/JsonResponse.java +++ b/cws-core/src/main/java/jpl/cws/core/web/JsonResponse.java @@ -1,6 +1,7 @@ package jpl.cws.core.web; import com.google.gson.GsonBuilder; +import org.apache.commons.lang.StringEscapeUtils; public class JsonResponse { public enum Status { @@ -25,6 +26,8 @@ public String getMessage() { } public String toString() { - return new GsonBuilder().setPrettyPrinting().create().toJson(this); + String json = new GsonBuilder().setPrettyPrinting().create().toJson(this); + + return StringEscapeUtils.unescapeJava(json); } } diff --git a/cws-service/src/main/java/jpl/cws/controller/RestService.java b/cws-service/src/main/java/jpl/cws/controller/RestService.java index 8dcbc894..8fa87ece 100644 --- a/cws-service/src/main/java/jpl/cws/controller/RestService.java +++ b/cws-service/src/main/java/jpl/cws/controller/RestService.java @@ -1001,8 +1001,35 @@ public GsonUTCDateAdapter() { return "success"; } - - + + + /** + * Inserts or updates worker tag with name and value + * + */ + @RequestMapping(value = "/worker/{workerId}/updateTag/{name}", method = POST, produces="application/json") + public @ResponseBody String updateWorkerTag( + HttpServletResponse response, + @PathVariable String workerId, + @PathVariable String name, + @RequestParam(value = "value") String value) { + + try { + dbService.updateWorkerTag(workerId, name, value); + } catch (Exception e) { + log.error("Unexpected error", e); + + response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + + return new JsonResponse(JsonResponse.Status.FAIL, e.getMessage()).toString(); + } + + response.setStatus(HttpServletResponse.SC_OK); + + return new JsonResponse(JsonResponse.Status.SUCCESS, "Updated worker '" + workerId + "' tag: " + name + "='" + value + "'").toString(); + } + + /** * Checks if procDefKey is deployed (exists) * diff --git a/install/sql/core.sql.template b/install/sql/core.sql.template index 59c0e37e..9a4e7a5b 100644 --- a/install/sql/core.sql.template +++ b/install/sql/core.sql.template @@ -16,6 +16,15 @@ CREATE TABLE IF NOT EXISTS `cws_worker` ( UNIQUE KEY (`name`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; +CREATE TABLE IF NOT EXISTS `cws_worker_tags` ( + `worker_id` varchar(255) COLLATE utf8_bin NOT NULL, + `name` varchar(255) COLLATE utf8_bin NOT NULL, + `value` varchar(1000) COLLATE utf8_bin DEFAULT NULL, + `created_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP(), + `updated_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP(), + PRIMARY KEY (`worker_id`, `name`), + CONSTRAINT `FK_cws_worker_tags` FOREIGN KEY (`worker_id`) REFERENCES `cws_worker` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; CREATE TABLE IF NOT EXISTS `cws_external_worker` ( `id` varchar(255) COLLATE utf8_bin NOT NULL DEFAULT '', @@ -36,7 +45,8 @@ CREATE TABLE IF NOT EXISTS `cws_log_usage` ( `worker_id` varchar(255) COLLATE utf8_bin NOT NULL, `filename` varchar(255) COLLATE utf8_bin NOT NULL, `size_bytes` bigint NOT NULL, - PRIMARY KEY (`worker_id`, `filename`) + PRIMARY KEY (`worker_id`, `filename`), + CONSTRAINT `FK_cws_worker_log_usage` FOREIGN KEY (`worker_id`) REFERENCES `cws_worker` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin; From 123107752dca7ac969744012345824adcb0e86d3 Mon Sep 17 00:00:00 2001 From: Will Gunter <74369489+wcgunter@users.noreply.github.com> Date: Thu, 20 Jul 2023 10:04:01 -0700 Subject: [PATCH 14/24] UI - Add custom output display to Processes & History pages (#162) * Initial attempt (copy doesn't work) * Update output var column css * Update filteirng * Update filter for output variables * Adjust thumbnail css * Add ability to copy images, move func. to cws.js * Make images grow when hovered over * Add support for hyperlink strings * Update img detection to support all image types * Update history page to use new custom input fetch * Initial output table on history page * Update link recognition to include AWS S3 URIs * Fix JSON creation for new input/output var methods * UI update, fix "show entries" overlap * Fix issue where table was not responsive * Update responsiveness, scaling on page size change * Fix bug with download list (json) * Add icons to processes table btns, rm. var type * Update name of adv. filter btn * Move info & pagination into div, position correct * Add comments, move css to file, fix csv export * Update deployments page to use new above/below div * Add icon to download btn * Remove variable type on history page * Make images smaller, update hover behavior * Remove size limit on history page --- .../jpl/cws/scheduler/CwsProcessInstance.java | 305 +- .../java/jpl/cws/scheduler/LogHistory.java | 4 + .../jpl/cws/service/CwsConsoleService.java | 2075 +++++------ cws-ui/src/main/webapp/css/dashboard.css | 31 + cws-ui/src/main/webapp/css/processes.css | 121 + .../DataTables/dataTables.responsive.min.js | 4 + .../DataTables/responsive.bootstrap.min.css | 1 + .../js/DataTables/responsive.bootstrap.min.js | 4 + cws-ui/src/main/webapp/js/cws.js | 477 +-- install/cws-ui/deployments.ftl | 1816 +++++----- install/cws-ui/history.ftl | 574 ++- install/cws-ui/processes.ftl | 3119 ++++++++++------- 12 files changed, 4739 insertions(+), 3792 deletions(-) create mode 100644 cws-ui/src/main/webapp/css/processes.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/dataTables.responsive.min.js create mode 100644 cws-ui/src/main/webapp/js/DataTables/responsive.bootstrap.min.css create mode 100644 cws-ui/src/main/webapp/js/DataTables/responsive.bootstrap.min.js diff --git a/cws-service/src/main/java/jpl/cws/scheduler/CwsProcessInstance.java b/cws-service/src/main/java/jpl/cws/scheduler/CwsProcessInstance.java index 4596a263..2ee4f939 100644 --- a/cws-service/src/main/java/jpl/cws/scheduler/CwsProcessInstance.java +++ b/cws-service/src/main/java/jpl/cws/scheduler/CwsProcessInstance.java @@ -5,143 +5,170 @@ public class CwsProcessInstance { - private String uuid; // from CWS cws_sched_worker_proc_inst table - - private String procDefKey; - private String procInstId; - private String superProcInstId; - private String status; - - private String initiationKey; // from CWS cws_sched_worker_proc_inst table - - private Timestamp createdTimestamp; // from CWS cws_sched_worker_proc_inst table - private Timestamp updatedTimestamp; // from CWS cws_sched_worker_proc_inst table - - private String claimedByWorker; // from CWS cws_sched_worker_proc_inst table - private String startedByWorker; // from CWS cws_sched_worker_proc_inst table - - private Timestamp procStartTime; // from Camunda ACT_HI_PROCINST_ table - private Timestamp procEndTime; // from Camunda ACT_HI_PROCINST_ table - - private Map inputVariables; - - public CwsProcessInstance( - String uuid, - String procDefKey, - String procInstId, - String superProcInstId, - String status, - String initiationKey, - Timestamp createdTimestamp, - Timestamp updatedTimestamp, - String claimedByWorker, - String startedByWorker, - Timestamp procStartTime, - Timestamp procEndTime, - Map inputVariables) { - super(); - this.uuid = uuid; - this.procDefKey = procDefKey; - this.procInstId = procInstId; - this.superProcInstId = superProcInstId; - this.status = status; - this.initiationKey = initiationKey; - this.createdTimestamp = createdTimestamp; - this.updatedTimestamp = updatedTimestamp; - this.claimedByWorker = claimedByWorker; - this.startedByWorker = startedByWorker; - this.procStartTime = procStartTime; - this.procEndTime = procEndTime; - this.inputVariables = inputVariables; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public String getProcDefKey() { - return procDefKey; - } - public void setProcDefKey(String procDefKey) { - this.procDefKey = procDefKey; - } - public String getProcInstId() { - return procInstId; - } - public void setProcInstId(String procInstId) { - this.procInstId = procInstId; - } - public String getSuperProcInstId() { - return superProcInstId; - } - public void setSuperProcInstId(String superProcInstId) { - this.superProcInstId = superProcInstId; - } - public String getStatus() { - return status; - } - public void setStatus(String status) { - this.status = status; - } - public void setInputVariables(Map input) { - this.inputVariables = input; - } - - public Map getInputVariables() { - return inputVariables; - } - - public String getInitiationKey() { - return initiationKey; - } - public void setInitiationKey(String initiationKey) { - this.initiationKey = initiationKey; - } - - public Timestamp getCreatedTimestamp() { - return createdTimestamp; - } - public void setCreatedTimestamp(Timestamp createdTimestamp) { - this.createdTimestamp = createdTimestamp; - } - - public Timestamp getUpdatedTimestamp() { - return updatedTimestamp; - } - public void setUpdatedTimestamp(Timestamp updatedTimestamp) { - this.updatedTimestamp = updatedTimestamp; - } - - public String getClaimedByWorker() { - return claimedByWorker; - } - public void setClaimedByWorker(String claimedByWorker) { - this.claimedByWorker = claimedByWorker; - } - - public String getStartedByWorker() { - return startedByWorker; - } - public void setStartedByWorker(String startedByWorker) { - this.startedByWorker = startedByWorker; - } - - public Timestamp getProcStartTime() { - return procStartTime; - } - public void setProcStartTime(Timestamp procStartTime) { - this.procStartTime = procStartTime; - } - - public Timestamp getProcEndTime() { - return procEndTime; - } - public void setProcEndTime(Timestamp procEndTime) { - this.procEndTime = procEndTime; - } - + private String uuid; // from CWS cws_sched_worker_proc_inst table + + private String procDefKey; + private String procInstId; + private String superProcInstId; + private String status; + + private String initiationKey; // from CWS cws_sched_worker_proc_inst table + + private Timestamp createdTimestamp; // from CWS cws_sched_worker_proc_inst table + private Timestamp updatedTimestamp; // from CWS cws_sched_worker_proc_inst table + + private String claimedByWorker; // from CWS cws_sched_worker_proc_inst table + private String startedByWorker; // from CWS cws_sched_worker_proc_inst table + + private Timestamp procStartTime; // from Camunda ACT_HI_PROCINST_ table + private Timestamp procEndTime; // from Camunda ACT_HI_PROCINST_ table + + private Map inputVariables; + + private Map outputVariables; + + public CwsProcessInstance( + String uuid, + String procDefKey, + String procInstId, + String superProcInstId, + String status, + String initiationKey, + Timestamp createdTimestamp, + Timestamp updatedTimestamp, + String claimedByWorker, + String startedByWorker, + Timestamp procStartTime, + Timestamp procEndTime, + Map inputVariables, + Map outputVariables) { + super(); + this.uuid = uuid; + this.procDefKey = procDefKey; + this.procInstId = procInstId; + this.superProcInstId = superProcInstId; + this.status = status; + this.initiationKey = initiationKey; + this.createdTimestamp = createdTimestamp; + this.updatedTimestamp = updatedTimestamp; + this.claimedByWorker = claimedByWorker; + this.startedByWorker = startedByWorker; + this.procStartTime = procStartTime; + this.procEndTime = procEndTime; + this.inputVariables = inputVariables; + this.outputVariables = outputVariables; + } + + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getProcDefKey() { + return procDefKey; + } + + public void setProcDefKey(String procDefKey) { + this.procDefKey = procDefKey; + } + + public String getProcInstId() { + return procInstId; + } + + public void setProcInstId(String procInstId) { + this.procInstId = procInstId; + } + + public String getSuperProcInstId() { + return superProcInstId; + } + + public void setSuperProcInstId(String superProcInstId) { + this.superProcInstId = superProcInstId; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getInitiationKey() { + return initiationKey; + } + + public void setInitiationKey(String initiationKey) { + this.initiationKey = initiationKey; + } + + public Timestamp getCreatedTimestamp() { + return createdTimestamp; + } + + public void setCreatedTimestamp(Timestamp createdTimestamp) { + this.createdTimestamp = createdTimestamp; + } + + public Timestamp getUpdatedTimestamp() { + return updatedTimestamp; + } + + public void setUpdatedTimestamp(Timestamp updatedTimestamp) { + this.updatedTimestamp = updatedTimestamp; + } + + public String getClaimedByWorker() { + return claimedByWorker; + } + + public void setClaimedByWorker(String claimedByWorker) { + this.claimedByWorker = claimedByWorker; + } + + public String getStartedByWorker() { + return startedByWorker; + } + + public void setStartedByWorker(String startedByWorker) { + this.startedByWorker = startedByWorker; + } + + public Timestamp getProcStartTime() { + return procStartTime; + } + + public void setProcStartTime(Timestamp procStartTime) { + this.procStartTime = procStartTime; + } + + public Timestamp getProcEndTime() { + return procEndTime; + } + + public void setProcEndTime(Timestamp procEndTime) { + this.procEndTime = procEndTime; + } + + public void setInputVariables(Map input) { + this.inputVariables = input; + } + + public Map getInputVariables() { + return inputVariables; + } + + public void setOutputVariables(Map output) { + this.outputVariables = output; + } + + public Map getOutputVariables() { + return outputVariables; + } + } diff --git a/cws-service/src/main/java/jpl/cws/scheduler/LogHistory.java b/cws-service/src/main/java/jpl/cws/scheduler/LogHistory.java index dc2a8e83..ea8bf67f 100644 --- a/cws-service/src/main/java/jpl/cws/scheduler/LogHistory.java +++ b/cws-service/src/main/java/jpl/cws/scheduler/LogHistory.java @@ -1,7 +1,9 @@ package jpl.cws.scheduler; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; public class LogHistory { @@ -13,4 +15,6 @@ public class LogHistory { public Long duration = 0L; public List details = new ArrayList(); + public Map inputVariables = new HashMap(); + public Map outputVariables = new HashMap(); } diff --git a/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java b/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java index 0ab1d8dd..0ed7a156 100644 --- a/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java +++ b/cws-service/src/main/java/jpl/cws/service/CwsConsoleService.java @@ -1,49 +1,33 @@ package jpl.cws.service; -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.ByteArrayInputStream; -import java.io.Console; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.sql.Timestamp; -import java.text.DateFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.List; -import java.util.Locale; -import java.util.Map; -import java.util.TimeZone; -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -import javax.jms.BytesMessage; -import javax.jms.JMSException; -import javax.jms.Message; -import javax.jms.Session; - +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonNull; +import com.google.gson.JsonObject; +import de.ruedigermoeller.serialization.FSTObjectInput; +import jpl.cws.core.code.CodeService; +import jpl.cws.core.db.SchedulerDbService; +import jpl.cws.core.log.CwsEmailerService; +import jpl.cws.core.service.ProcessService; +import jpl.cws.core.service.SpringApplicationContext; +import jpl.cws.core.web.DiskUsage; +import jpl.cws.core.web.LogInfo; +import jpl.cws.core.web.WorkerInfo; +import jpl.cws.process.initiation.CwsProcessInitiator; +import jpl.cws.scheduler.*; +import jpl.cws.service.camunda.CamundaExecutionService; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; import org.camunda.bpm.engine.HistoryService; import org.camunda.bpm.engine.RepositoryService; -import org.camunda.bpm.engine.history.HistoricActivityInstance; -import org.camunda.bpm.engine.history.HistoricDetail; -import org.camunda.bpm.engine.history.HistoricIncident; -import org.camunda.bpm.engine.history.HistoricProcessInstance; -import org.camunda.bpm.engine.history.HistoricVariableUpdate; -import org.camunda.bpm.engine.history.UserOperationLogEntry; -import com.google.gson.JsonArray; -import com.google.gson.JsonObject; -import com.google.gson.JsonNull; +import org.camunda.bpm.engine.RuntimeService; +import org.camunda.bpm.engine.history.*; import org.camunda.bpm.engine.impl.persistence.entity.HistoricDetailVariableInstanceUpdateEntity; import org.camunda.bpm.engine.repository.Deployment; import org.camunda.bpm.engine.repository.DeploymentBuilder; import org.camunda.bpm.engine.repository.ProcessDefinition; +import org.camunda.bpm.engine.variable.value.FileValue; +import org.camunda.bpm.engine.variable.value.TypedValue; import org.camunda.bpm.model.bpmn.Bpmn; import org.camunda.bpm.model.bpmn.BpmnModelInstance; import org.camunda.bpm.model.bpmn.impl.instance.StartEventImpl; @@ -58,1096 +42,1155 @@ import org.springframework.jms.core.JmsTemplate; import org.springframework.jms.core.MessageCreator; -import com.google.gson.GsonBuilder; - -import de.ruedigermoeller.serialization.FSTObjectInput; -import jpl.cws.core.code.CodeService; -import jpl.cws.core.db.SchedulerDbService; -import jpl.cws.core.log.CwsEmailerService; -import jpl.cws.core.service.ProcessService; -import jpl.cws.core.service.SpringApplicationContext; -import jpl.cws.core.web.DiskUsage; -import jpl.cws.core.web.LogInfo; -import jpl.cws.core.web.WorkerInfo; -import jpl.cws.process.initiation.CwsProcessInitiator; -import jpl.cws.scheduler.CwsProcessInstance; -import jpl.cws.scheduler.ExternalWorker; -import jpl.cws.scheduler.HistoryDetail; -import jpl.cws.scheduler.InputVariableDetail; -import jpl.cws.scheduler.LogHistory; -import jpl.cws.scheduler.SchedulerQueueUtils; -import jpl.cws.scheduler.Worker; -import jpl.cws.service.camunda.CamundaExecutionService; +import javax.jms.BytesMessage; +import javax.jms.JMSException; +import javax.jms.Message; +import javax.jms.Session; +import java.io.*; +import java.sql.Timestamp; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.regex.Matcher; +import java.util.regex.Pattern; /** * cws-console service layer - * + *

* Delegates to other services (e.g. cws-core CodeService) as necessary * * @author ghollins - * */ public class CwsConsoleService { - private static final Logger log = LoggerFactory.getLogger(CwsConsoleService.class); - - @Autowired - private CodeService cwsCodeService; - @Autowired - private JmsTemplate jmsCodeUpdateTopicTemplate; - @Autowired - private JmsTemplate jmsWorkerLogCleanupTopicTemplate; - @Autowired - private JmsTemplate jmsSystemShutdownTopicTemplate; - @Autowired - private JmsTemplate jmsWorkerConfigChangeTopicTemplate; - - @Autowired - private RepositoryService repositoryService; - - @Autowired - private HistoryService historyService; - @Autowired - protected CamundaExecutionService cwsExecutionService; - @Autowired - private SpringApplicationContext springApplicationContext; - @Autowired - private SchedulerDbService schedulerDbService; - @Autowired - protected SchedulerQueueUtils cwsSchedulerUtils; - @Autowired - private ProcessService cwsProcessService; - @Autowired - private CwsEmailerService cwsEmailerService; - - @Value("${cws.install.dir}") private String cwsInstallDir; - @Value("${cws.history.days.to.live}") private String historyDaysToLive; - - private String CWS_HOME; - - private static Pattern cmdLineExecPattern = Pattern.compile( - "^(.*\\bjpl.cws.task.CmdLineExecTask\\b.*)(camunda:topic=\".*?\")(.*)$"); - private static Pattern emptyFieldPattern = Pattern.compile( - "^\\s*$"); - private static Pattern userTaskPattern = Pattern.compile( - "^(?!.*?camunda:asyncAfter=\"true\")(\\s* processInstances = model.getModelElementsByType(processType); - String procDefKey = processInstances.iterator().next().getAttributeValue("id"); - - File tempFile = new File(getCwsHome() + "/bpmn/" + bpmnFile.getName() + ".tmp"); - FileUtils.deleteQuietly(tempFile); // make sure any old tmp file is deleted first - FileUtils.moveFile(bpmnFile, tempFile); - - // Make a second pass, to swap in topic names - BufferedReader reader = null; - - // Translate, and write out to final file (under cws/bpmn directory) - // - File finalFile = new File(getCwsHome() + "/bpmn/" + bpmnFile.getName()); - - BufferedWriter bw = null; - try { - bw = new BufferedWriter(new FileWriter(finalFile)); - reader = new BufferedReader(new FileReader(tempFile)); - String line = reader.readLine(); - - // Scan each line using the compiled patterns, making adjustments where necessary to produce - // a valid final XML file for deployment - while (line != null) { - Matcher cmdLineExecMatcher = cmdLineExecPattern.matcher(line); - Matcher emptyFieldMatcher = emptyFieldPattern.matcher(line); - Matcher userTaskFieldMatcher = userTaskPattern.matcher(line); - - // Replace topic name if external task uses a 'jpl.cws.task.CmdLineExecTask' modelTemplate - // (this is the value set by the modeler in the case of Command Line Execution tasks. - if (cmdLineExecMatcher.matches()) { - bw.write(cmdLineExecMatcher.group(1) + "camunda:topic=\"" + procDefKey + "\"" + cmdLineExecMatcher.group(3)); - } - // Filter out empty camunda:field tags which can sneak in for REST GET/POST tasks - else if (emptyFieldMatcher.matches()) { - log.debug("filtered out empty tag: " + line); - } - // Always add camunda:asyncAfter="true" to User Tasks - else if (userTaskFieldMatcher.matches()) { - bw.write(userTaskFieldMatcher.group(1) + userTaskFieldMatcher.group(2) + " camunda:asyncAfter=\"true\"" + userTaskFieldMatcher.group(3)); - } - else { - bw.write(line); - } - bw.newLine(); - line = reader.readLine(); - } - } - catch (Exception e) { - log.error("problem parsing BPMN XML...", e); - } - finally { - try { - reader.close(); - } catch (IOException e) { - log.error("Problem when closing BufferedReader", e); - } - try { - bw.close(); - } catch (IOException e) { - log.error("Problem when closing BufferedWriter", e); - } - } - - model = Bpmn.readModelFromFile(finalFile); - - return deployProcessDefinition(finalFile, model, bpmnFile.getName()); - } - - - /** - * Deploys a process definition - * - */ - public String deployProcessDefinition(File file, BpmnModelInstance model, String origFileName) throws Exception { - - // Read data out of InputStream into a String - String bpmnXml; - - try (FileInputStream fs = new FileInputStream(file)) { - bpmnXml = IOUtils.toString(fs, "UTF-8"); - } catch (IOException e) { - return "ERROR: " + e.getMessage(); - } - - return deployProcessDefinition(bpmnXml, model, origFileName); - } - - - /** - * Deploys a process definition - * @throws Exception - * - */ - public String deployProcessDefinition(String bpmnXml, BpmnModelInstance model, String origFileName) throws Exception { - try { - String url = "https://github.com/NASA-AMMOS/common-workflow-service/wiki"; - // - // Validate that process definition uses an async start event. - // This is preferable so that we don't spawn a lot of threads - // that hang around and don't return immediately. - // - if (!containsProcessStartAsync(model)) { - log.warn("BPMN XML does not contain async start event!"); - return "ERROR: Make sure your process has an \"Asynchronous Before\" startEvent. Please refer to the wiki."; - } - - // Validate that process definition has a name. - if (!hasName(model)) { - log.warn("BPMN model does not have a name!"); - return "ERROR: Make sure your process has a name. Please refer to the wiki."; - } - - // Validate that process id contains only alphanumeric characters - // and underscore - if (!noInvalidCharacters(model)) { - log.warn("BPMN model process id contains invalid character(s)!"); - return "ERROR: Your process id contains invalid character(s). Please refer to the wiki."; - } - - // Validate that process definition has 'Is Executable' checked. - if (!isExecutable(model)) { - log.warn("BPMN model is not executable"); - return "ERROR: Make sure your process has \"Is Executable\" checked. Please refer to the wiki."; - } - - // Get DeploymentBuilder from repository service - // - DeploymentBuilder deployment = repositoryService.createDeployment(); - - // give deployment the name of the files, for easy identification - deployment.name(origFileName); - // configure with source data - deployment.addString(origFileName, bpmnXml); - // configure to filter out duplicates - deployment.enableDuplicateFiltering(true); - - // Deploy process definition - // - log.debug("About to deploy " + origFileName + "..."); - Deployment resultingDeployment = deployment.deploy(); - log.info(origFileName + " deployed. " + resultingDeployment.getId() + ", " + resultingDeployment.getName() - + ", " + resultingDeployment.getDeploymentTime()); - - // Update existing worker_proc_def rows in DB - // - ProcessDefinition deployedProcDef = repositoryService.createProcessDefinitionQuery() - .deploymentId(resultingDeployment.getId()).list().iterator().next(); - for (Map worker : schedulerDbService.getWorkers()) { - log.trace("UPDATING WORKER_PROC_DEF_ROW: " + worker.get("id").toString() + ", " - + deployedProcDef.getKey() + ", " + deployedProcDef.getDeploymentId()); - schedulerDbService.updateWorkerProcDefDeploymentId(worker.get("id").toString(), - deployedProcDef.getKey(), deployedProcDef.getDeploymentId()); - } - - repositoryService.updateProcessDefinitionHistoryTimeToLive(deployedProcDef.getId(), Integer.parseInt(historyDaysToLive)); - - // Notify workers that there has been a change - // to the set of deployed process definitions - // - sendWorkerConfigChangeTopicMessage(); - - } catch (Exception e) { - log.error("Something went wrong in deploying the process definition: ", e); - return "ERROR: Failed to deploy process definition XML (" + origFileName - + ") and/or notify workers. (Message = '" + e.getMessage() + "')"; - } - - log.info("Deployed process definition: '" + origFileName + "'. Newly deployed file can be found under " + getCwsHome() + "/bpmn"); - - return null; // no error to report - } - - - // Note: this method uses isCamundaAsync() in addition to - // isCamundaAsyncBefore() - // at the suggestion of the developer of this method. - // This allows it to find the 'async:camunda' attribute in the .bpmn files - // from the modeler, - // which has since been deprecated in place of 'asyncBefore:camunda' - // - @SuppressWarnings("deprecation") - private boolean containsProcessStartAsync(BpmnModelInstance model) { - ModelElementType startEventType = model.getModel().getType(StartEvent.class); - Collection startEventInstances = model.getModelElementsByType(startEventType); - boolean acc = true; - for (ModelElementInstance event : startEventInstances) { - StartEventImpl startEvent = (StartEventImpl) event; - acc = (acc && (startEvent.isCamundaAsync() || startEvent.isCamundaAsyncBefore())); - } - return acc; - } - - private boolean hasName(BpmnModelInstance model) { - ModelElementType processType = model.getModel().getType(Process.class); - Collection processInstances = model.getModelElementsByType(processType); - return (processInstances.iterator().next().getAttributeValue("name") != null); - } - - private boolean noInvalidCharacters(BpmnModelInstance model) { - ModelElementType processType = model.getModel().getType(Process.class); - Collection processInstances = model.getModelElementsByType(processType); - String pattern = "[\\w]+"; - return processInstances.iterator().next().getAttributeValue("id").matches(pattern); - } - - private boolean isExecutable(BpmnModelInstance model) { - ModelElementType processType = model.getModel().getType(Process.class); - Collection processInstances = model.getModelElementsByType(processType); - return (processInstances.iterator().next().getAttributeValue("isExecutable").equals("true")); - } - - /** - * Validates the specified code, and sends message to topic if valid, so - * that listeners may know that code has been updated. - * - * @return true if valid, false otherwise - * - */ - public String validateAndPersistCode(String code) { - String codeErrors = cwsCodeService.validateAndPersistCode(code); - - // If code was valid and persisted, send message to topic - // so Workers (CodeUpdateListener) will be notified of code update - if (codeErrors == null) { - sendCodeUpdatedTopicMessage(); - } - - return codeErrors; - } - - /** - * Init the specified code, and sends message to topic if valid, so that - * listeners may know that code has been updated. - * - * @return true if valid, false otherwise - * - */ - public String doSystemShutdown() { - - sendSystemShutdownTopicMessage(); - - return "\nShutting down system now...\n"; - } - - public CwsProcessInitiator getProcessInitiatorById(String initiatorId) { - CwsProcessInitiator initiator = (CwsProcessInitiator) SpringApplicationContext.getBean(initiatorId); - return initiator; - } - - public void replaceInitiatorBean(String springBeanKey, CwsProcessInitiator newInitiator) { - log.debug("replaceInitiatorBean initiator: " + springBeanKey + " ..."); - springApplicationContext.replaceBean(springBeanKey, null, newInitiator.getPropertyValues(), - newInitiator.getClass()); - } - - public void removeBean(String beanName) { - springApplicationContext.removeBean(beanName); - } - - public String[] getBeanNamesOfType(Class type) { - return springApplicationContext.getBeanDefinitionNamesOfType(type); - } - - public void removeAllBeansOfType(Class type) { - springApplicationContext.removeAllBeansOfType(type); - } - - private void getHistoryVarDetails(List history, String processInstanceId) { + private static final Logger log = LoggerFactory.getLogger(CwsConsoleService.class); + + @Autowired + private CodeService cwsCodeService; + @Autowired + private JmsTemplate jmsCodeUpdateTopicTemplate; + @Autowired + private JmsTemplate jmsWorkerLogCleanupTopicTemplate; + @Autowired + private JmsTemplate jmsSystemShutdownTopicTemplate; + @Autowired + private JmsTemplate jmsWorkerConfigChangeTopicTemplate; + + @Autowired + private RepositoryService repositoryService; + + @Autowired + private HistoryService historyService; + @Autowired + protected CamundaExecutionService cwsExecutionService; + @Autowired + private SpringApplicationContext springApplicationContext; + @Autowired + private SchedulerDbService schedulerDbService; + @Autowired + protected SchedulerQueueUtils cwsSchedulerUtils; + @Autowired + private ProcessService cwsProcessService; + @Autowired + private CwsEmailerService cwsEmailerService; + @Autowired + private RuntimeService runtimeService; + + @Value("${cws.install.dir}") + private String cwsInstallDir; + @Value("${cws.history.days.to.live}") + private String historyDaysToLive; + + private String CWS_HOME; + + private static Pattern cmdLineExecPattern = Pattern.compile( + "^(.*\\bjpl.cws.task.CmdLineExecTask\\b.*)(camunda:topic=\".*?\")(.*)$"); + private static Pattern emptyFieldPattern = Pattern.compile( + "^\\s*$"); + private static Pattern userTaskPattern = Pattern.compile( + "^(?!.*?camunda:asyncAfter=\"true\")(\\s* processInstances = model.getModelElementsByType(processType); + String procDefKey = processInstances.iterator().next().getAttributeValue("id"); + + File tempFile = new File(getCwsHome() + "/bpmn/" + bpmnFile.getName() + ".tmp"); + FileUtils.deleteQuietly(tempFile); // make sure any old tmp file is deleted first + FileUtils.moveFile(bpmnFile, tempFile); + + // Make a second pass, to swap in topic names + BufferedReader reader = null; + + // Translate, and write out to final file (under cws/bpmn directory) + // + File finalFile = new File(getCwsHome() + "/bpmn/" + bpmnFile.getName()); + + BufferedWriter bw = null; + try { + bw = new BufferedWriter(new FileWriter(finalFile)); + reader = new BufferedReader(new FileReader(tempFile)); + String line = reader.readLine(); + + // Scan each line using the compiled patterns, making adjustments where necessary to produce + // a valid final XML file for deployment + while (line != null) { + Matcher cmdLineExecMatcher = cmdLineExecPattern.matcher(line); + Matcher emptyFieldMatcher = emptyFieldPattern.matcher(line); + Matcher userTaskFieldMatcher = userTaskPattern.matcher(line); + + // Replace topic name if external task uses a 'jpl.cws.task.CmdLineExecTask' modelTemplate + // (this is the value set by the modeler in the case of Command Line Execution tasks. + if (cmdLineExecMatcher.matches()) { + bw.write(cmdLineExecMatcher.group(1) + "camunda:topic=\"" + procDefKey + "\"" + cmdLineExecMatcher.group(3)); + } + // Filter out empty camunda:field tags which can sneak in for REST GET/POST tasks + else if (emptyFieldMatcher.matches()) { + log.debug("filtered out empty tag: " + line); + } + // Always add camunda:asyncAfter="true" to User Tasks + else if (userTaskFieldMatcher.matches()) { + bw.write(userTaskFieldMatcher.group(1) + userTaskFieldMatcher.group(2) + " camunda:asyncAfter=\"true\"" + userTaskFieldMatcher.group(3)); + } else { + bw.write(line); + } + bw.newLine(); + line = reader.readLine(); + } + } catch (Exception e) { + log.error("problem parsing BPMN XML...", e); + } finally { + try { + reader.close(); + } catch (IOException e) { + log.error("Problem when closing BufferedReader", e); + } + try { + bw.close(); + } catch (IOException e) { + log.error("Problem when closing BufferedWriter", e); + } + } + + model = Bpmn.readModelFromFile(finalFile); + + return deployProcessDefinition(finalFile, model, bpmnFile.getName()); + } + + + /** + * Deploys a process definition + */ + public String deployProcessDefinition(File file, BpmnModelInstance model, String origFileName) throws Exception { + + // Read data out of InputStream into a String + String bpmnXml; + + try (FileInputStream fs = new FileInputStream(file)) { + bpmnXml = IOUtils.toString(fs, "UTF-8"); + } catch (IOException e) { + return "ERROR: " + e.getMessage(); + } + + return deployProcessDefinition(bpmnXml, model, origFileName); + } + + + /** + * Deploys a process definition + * + * @throws Exception + */ + public String deployProcessDefinition(String bpmnXml, BpmnModelInstance model, String origFileName) throws Exception { + try { + String url = "https://github.com/NASA-AMMOS/common-workflow-service/wiki"; + // + // Validate that process definition uses an async start event. + // This is preferable so that we don't spawn a lot of threads + // that hang around and don't return immediately. + // + if (!containsProcessStartAsync(model)) { + log.warn("BPMN XML does not contain async start event!"); + return "ERROR: Make sure your process has an \"Asynchronous Before\" startEvent. Please refer to the wiki."; + } + + // Validate that process definition has a name. + if (!hasName(model)) { + log.warn("BPMN model does not have a name!"); + return "ERROR: Make sure your process has a name. Please refer to the wiki."; + } + + // Validate that process id contains only alphanumeric characters + // and underscore + if (!noInvalidCharacters(model)) { + log.warn("BPMN model process id contains invalid character(s)!"); + return "ERROR: Your process id contains invalid character(s). Please refer to the wiki."; + } + + // Validate that process definition has 'Is Executable' checked. + if (!isExecutable(model)) { + log.warn("BPMN model is not executable"); + return "ERROR: Make sure your process has \"Is Executable\" checked. Please refer to the wiki."; + } + + // Get DeploymentBuilder from repository service + // + DeploymentBuilder deployment = repositoryService.createDeployment(); + + // give deployment the name of the files, for easy identification + deployment.name(origFileName); + // configure with source data + deployment.addString(origFileName, bpmnXml); + // configure to filter out duplicates + deployment.enableDuplicateFiltering(true); + + // Deploy process definition + // + log.debug("About to deploy " + origFileName + "..."); + Deployment resultingDeployment = deployment.deploy(); + log.info(origFileName + " deployed. " + resultingDeployment.getId() + ", " + resultingDeployment.getName() + + ", " + resultingDeployment.getDeploymentTime()); + + // Update existing worker_proc_def rows in DB + // + ProcessDefinition deployedProcDef = repositoryService.createProcessDefinitionQuery() + .deploymentId(resultingDeployment.getId()).list().iterator().next(); + for (Map worker : schedulerDbService.getWorkers()) { + log.trace("UPDATING WORKER_PROC_DEF_ROW: " + worker.get("id").toString() + ", " + + deployedProcDef.getKey() + ", " + deployedProcDef.getDeploymentId()); + schedulerDbService.updateWorkerProcDefDeploymentId(worker.get("id").toString(), + deployedProcDef.getKey(), deployedProcDef.getDeploymentId()); + } + + repositoryService.updateProcessDefinitionHistoryTimeToLive(deployedProcDef.getId(), Integer.parseInt(historyDaysToLive)); + + // Notify workers that there has been a change + // to the set of deployed process definitions + // + sendWorkerConfigChangeTopicMessage(); + + } catch (Exception e) { + log.error("Something went wrong in deploying the process definition: ", e); + return "ERROR: Failed to deploy process definition XML (" + origFileName + + ") and/or notify workers. (Message = '" + e.getMessage() + "')"; + } + + log.info("Deployed process definition: '" + origFileName + "'. Newly deployed file can be found under " + getCwsHome() + "/bpmn"); + + return null; // no error to report + } + + + // Note: this method uses isCamundaAsync() in addition to + // isCamundaAsyncBefore() + // at the suggestion of the developer of this method. + // This allows it to find the 'async:camunda' attribute in the .bpmn files + // from the modeler, + // which has since been deprecated in place of 'asyncBefore:camunda' + // + @SuppressWarnings("deprecation") + private boolean containsProcessStartAsync(BpmnModelInstance model) { + ModelElementType startEventType = model.getModel().getType(StartEvent.class); + Collection startEventInstances = model.getModelElementsByType(startEventType); + boolean acc = true; + for (ModelElementInstance event : startEventInstances) { + StartEventImpl startEvent = (StartEventImpl) event; + acc = (acc && (startEvent.isCamundaAsync() || startEvent.isCamundaAsyncBefore())); + } + return acc; + } + + private boolean hasName(BpmnModelInstance model) { + ModelElementType processType = model.getModel().getType(Process.class); + Collection processInstances = model.getModelElementsByType(processType); + return (processInstances.iterator().next().getAttributeValue("name") != null); + } + + private boolean noInvalidCharacters(BpmnModelInstance model) { + ModelElementType processType = model.getModel().getType(Process.class); + Collection processInstances = model.getModelElementsByType(processType); + String pattern = "[\\w]+"; + return processInstances.iterator().next().getAttributeValue("id").matches(pattern); + } + + private boolean isExecutable(BpmnModelInstance model) { + ModelElementType processType = model.getModel().getType(Process.class); + Collection processInstances = model.getModelElementsByType(processType); + return (processInstances.iterator().next().getAttributeValue("isExecutable").equals("true")); + } + + /** + * Validates the specified code, and sends message to topic if valid, so + * that listeners may know that code has been updated. + * + * @return true if valid, false otherwise + */ + public String validateAndPersistCode(String code) { + String codeErrors = cwsCodeService.validateAndPersistCode(code); + + // If code was valid and persisted, send message to topic + // so Workers (CodeUpdateListener) will be notified of code update + if (codeErrors == null) { + sendCodeUpdatedTopicMessage(); + } + + return codeErrors; + } + + /** + * Init the specified code, and sends message to topic if valid, so that + * listeners may know that code has been updated. + * + * @return true if valid, false otherwise + */ + public String doSystemShutdown() { + + sendSystemShutdownTopicMessage(); + + return "\nShutting down system now...\n"; + } - List historicDetails = historyService.createHistoricDetailQuery() - .processInstanceId(processInstanceId) - .list(); + public CwsProcessInitiator getProcessInitiatorById(String initiatorId) { + CwsProcessInitiator initiator = (CwsProcessInitiator) SpringApplicationContext.getBean(initiatorId); + return initiator; + } - for (HistoricDetail detail : historicDetails) { + public void replaceInitiatorBean(String springBeanKey, CwsProcessInitiator newInitiator) { + log.debug("replaceInitiatorBean initiator: " + springBeanKey + " ..."); + springApplicationContext.replaceBean(springBeanKey, null, newInitiator.getPropertyValues(), + newInitiator.getClass()); + } - if (detail instanceof HistoricVariableUpdate) { + public void removeBean(String beanName) { + springApplicationContext.removeBean(beanName); + } - HistoricDetailVariableInstanceUpdateEntity variable = (HistoricDetailVariableInstanceUpdateEntity)detail; + public String[] getBeanNamesOfType(Class type) { + return springApplicationContext.getBeanDefinitionNamesOfType(type); + } - String message = ""; + public void removeAllBeansOfType(Class type) { + springApplicationContext.removeAllBeansOfType(type); + } - if (variable.getSerializerName().equals("json")) { - // TODO: Update this to be a collapsible table - message = "Setting (json) " + variable.getVariableName() + " = " + variable.getValue(); - } - else { - message = "Setting (" + variable.getTypeName() + ") " + variable.getVariableName() + " = " + variable.getValue(); - } + private void getHistoryVarDetails(List history, String processInstanceId) { - HistoryDetail historyDetail = new HistoryDetail(variable.getTime(), "VarUpdate", variable.getActivityInstanceId().split(":")[0], message); + List historicDetails = historyService.createHistoricDetailQuery() + .processInstanceId(processInstanceId) + .list(); - history.add(historyDetail); - } - } - } + for (HistoricDetail detail : historicDetails) { - private void getHistoryIncidentDetails(List history, String processInstanceId) { + if (detail instanceof HistoricVariableUpdate) { - List historicIncidents = historyService.createHistoricIncidentQuery() - .processInstanceId(processInstanceId) - .list(); + HistoricDetailVariableInstanceUpdateEntity variable = (HistoricDetailVariableInstanceUpdateEntity) detail; - for (HistoricIncident incident : historicIncidents) { + String message = ""; - String message = incident.getIncidentType() + ": " + incident.getIncidentMessage(); + if (variable.getSerializerName().equals("json")) { - if (incident.isOpen()) { - message += " (Incident Open)"; - } + // TODO: Update this to be a collapsible table + message = "Setting (json) " + variable.getVariableName() + " = " + variable.getValue(); + } else { + message = "Setting (" + variable.getTypeName() + ") " + variable.getVariableName() + " = " + variable.getValue(); + } - if (incident.isDeleted()) { - message += " (Incident Deleted)"; - } + HistoryDetail historyDetail = new HistoryDetail(variable.getTime(), "VarUpdate", variable.getActivityInstanceId().split(":")[0], message); - if (incident.isResolved()) { - message += " (Incident Resolved)"; - } + history.add(historyDetail); + } + } + } - HistoryDetail historyDetail = new HistoryDetail(incident.getCreateTime(), "Incident", incident.getActivityId(), message); + private void getHistoryIncidentDetails(List history, String processInstanceId) { - history.add(historyDetail); - } - } + List historicIncidents = historyService.createHistoricIncidentQuery() + .processInstanceId(processInstanceId) + .list(); - private void getHistoryActivityDetails(List history, String processInstanceId) { + for (HistoricIncident incident : historicIncidents) { - List historicActivities = historyService.createHistoricActivityInstanceQuery() - .processInstanceId(processInstanceId) - .list(); + String message = incident.getIncidentType() + ": " + incident.getIncidentMessage(); - for (HistoricActivityInstance activity : historicActivities) { + if (incident.isOpen()) { + message += " (Incident Open)"; + } - String message = "Started " + activity.getActivityType(); + if (incident.isDeleted()) { + message += " (Incident Deleted)"; + } - if (activity.getActivityName() != null) { - message += " with description \"" + activity.getActivityName() + "\""; - } + if (incident.isResolved()) { + message += " (Incident Resolved)"; + } - HistoryDetail historyDetail = new HistoryDetail(activity.getStartTime(), "ProcessFlow", activity.getActivityId(), message); - history.add(historyDetail); + HistoryDetail historyDetail = new HistoryDetail(incident.getCreateTime(), "Incident", incident.getActivityId(), message); - if (activity.getEndTime() != null) { + history.add(historyDetail); + } + } - String messageEnd = "Ended " + activity.getActivityType(); + private void getHistoryActivityDetails(List history, String processInstanceId) { - if (activity.getDurationInMillis() != null) { - messageEnd += " with duration " + activity.getDurationInMillis() + " msec"; - } + List historicActivities = historyService.createHistoricActivityInstanceQuery() + .processInstanceId(processInstanceId) + .list(); - HistoryDetail historyDetailEnd = new HistoryDetail(activity.getEndTime(), "ProcessFlow", activity.getActivityId(), messageEnd); + for (HistoricActivityInstance activity : historicActivities) { - history.add(historyDetailEnd); - } - } - } + String message = "Started " + activity.getActivityType(); - private void getHistoryUserOperationLog(List history, String processInstanceId) { + if (activity.getActivityName() != null) { + message += " with description \"" + activity.getActivityName() + "\""; + } - List userOperations = historyService.createUserOperationLogQuery() - .processInstanceId(processInstanceId) - .list(); + HistoryDetail historyDetail = new HistoryDetail(activity.getStartTime(), "ProcessFlow", activity.getActivityId(), message); + history.add(historyDetail); - for (UserOperationLogEntry userOperation : userOperations) { + if (activity.getEndTime() != null) { - String message = userOperation.getEntityType() + ": " + userOperation.getOperationType() + ". Property \"" + userOperation.getProperty() + "\" changed from " + userOperation.getOrgValue() + " to " + userOperation.getNewValue(); + String messageEnd = "Ended " + activity.getActivityType(); - HistoryDetail historyDetail = new HistoryDetail(userOperation.getTimestamp(), "UserOp", "N/A", message); + if (activity.getDurationInMillis() != null) { + messageEnd += " with duration " + activity.getDurationInMillis() + " msec"; + } - history.add(historyDetail); - } - } + HistoryDetail historyDetailEnd = new HistoryDetail(activity.getEndTime(), "ProcessFlow", activity.getActivityId(), messageEnd); - public LogHistory getHistoryForProcess(String processInstanceId) { + history.add(historyDetailEnd); + } + } + } - LogHistory history = new LogHistory(); + private void getHistoryUserOperationLog(List history, String processInstanceId) { - history.procInstId = processInstanceId; + List userOperations = historyService.createUserOperationLogQuery() + .processInstanceId(processInstanceId) + .list(); - HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + for (UserOperationLogEntry userOperation : userOperations) { - if (instance == null) { + String message = userOperation.getEntityType() + ": " + userOperation.getOperationType() + ". Property \"" + userOperation.getProperty() + "\" changed from " + userOperation.getOrgValue() + " to " + userOperation.getNewValue(); - // History may have been cleared and no longer exists so return empty history - return history; - } + HistoryDetail historyDetail = new HistoryDetail(userOperation.getTimestamp(), "UserOp", "N/A", message); - history.procDefKey = instance.getProcessDefinitionKey(); + history.add(historyDetail); + } + } - DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US); - dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); + public LogHistory getHistoryForProcess(String processInstanceId) { - history.startTime = dateFormat.format(instance.getStartTime()); + LogHistory history = new LogHistory(); - if (instance.getEndTime() != null) { - history.endTime = dateFormat.format(instance.getEndTime()); - } + history.procInstId = processInstanceId; - history.state = instance.getState(); + HistoricProcessInstance instance = historyService.createHistoricProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); - if (instance.getDurationInMillis() != null) { - history.duration = instance.getDurationInMillis(); - } + if (instance == null) { - getHistoryIncidentDetails(history.details, processInstanceId); - getHistoryActivityDetails(history.details, processInstanceId); - getHistoryVarDetails(history.details, processInstanceId); - getHistoryUserOperationLog(history.details, processInstanceId); + // History may have been cleared and no longer exists so return empty history + return history; + } - return history; - } + history.procDefKey = instance.getProcessDefinitionKey(); - public Map getInputVariablesForProcess(String processInstanceId) { - Map inputVarMap = new HashMap(); - List historyDetails = new ArrayList(); - getHistoryVarDetails(historyDetails, processInstanceId); - - if (processInstanceId == null) { - return inputVarMap; - } + DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'", Locale.US); + dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); - for (HistoryDetail historyDetail : historyDetails) { - if (historyDetail.type.equals("VarUpdate") && historyDetail.activity.equals(processInstanceId)) { - String message = historyDetail.message; - String varType = message.substring(message.indexOf("("), message.indexOf(")")+1); - String varName = message.substring(message.indexOf(")")+2); - varName = varName.substring(0, varName.indexOf("=")-1) + " " + varType; - String varValue = message.substring(message.indexOf("=")+2); + history.startTime = dateFormat.format(instance.getStartTime()); + + if (instance.getEndTime() != null) { + history.endTime = dateFormat.format(instance.getEndTime()); + } + + history.state = instance.getState(); + + if (instance.getDurationInMillis() != null) { + history.duration = instance.getDurationInMillis(); + } + + history.inputVariables = getInputVariablesForProcess(processInstanceId); + history.outputVariables = getOutputVariablesForProcess(processInstanceId); + + getHistoryIncidentDetails(history.details, processInstanceId); + getHistoryActivityDetails(history.details, processInstanceId); + getHistoryVarDetails(history.details, processInstanceId); + getHistoryUserOperationLog(history.details, processInstanceId); + + return history; + } + + public Map getInputVariablesForProcess(String processInstanceId) { + Map inputVarMap = new HashMap(); + + List historicVariableInstances= historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list(); + + if (historicVariableInstances.isEmpty()) { + return inputVarMap; + } + + for (HistoricVariableInstance historicVariableInstance : historicVariableInstances) { + String varName = historicVariableInstance.getName(); + if(!(varName.toUpperCase().startsWith("TASK_") && (varName.toUpperCase().endsWith("_IN") || varName.toUpperCase().endsWith("_OUT"))) && !(varName.toUpperCase().startsWith("OUTPUT_"))) { + String varType = historicVariableInstance.getTypeName(); + //if varType is not a file, then get the value as a string and put it in the outputVarMap + if (varType == null || !varType.equals("file")) { + Object objValue = historicVariableInstance.getValue(); + if (objValue == null) { + inputVarMap.put(varName + " (" + varType + ")", null); + } else { + String varValue = historicVariableInstance.getValue().toString(); + inputVarMap.put(varName + " (" + varType + ")", varValue); + } + } else { + //the variable is a file. + //we need to get the file name and the contents of the file and put them in the outputVarMap + TypedValue typedValue = historicVariableInstance.getTypedValue(); + if (typedValue instanceof FileValue) { + FileValue fileValue = (FileValue) typedValue; + String fileName = fileValue.getFilename(); + String mimeType = fileValue.getMimeType(); + if (mimeType.contains("image")) { + InputStream fileInputStream = fileValue.getValue(); + String encodedString = "data:" + mimeType + ";base64, "; + try { + byte[] sourceBytes = IOUtils.toByteArray(fileInputStream); + encodedString += Base64.getEncoder().encodeToString(sourceBytes); + } catch (IOException e) { + throw new RuntimeException(e); + } + inputVarMap.put(varName + " (" + varType + ", image)", encodedString); + } else { + inputVarMap.put(varName + " (" + varType + ")", fileName); + } + } + } + } + } + return inputVarMap; + } + + public Map getOutputVariablesForProcess(String processInstanceId) { + Map outputVarMap = new HashMap(); + + List historicVariableInstances= historyService.createHistoricVariableInstanceQuery().processInstanceId(processInstanceId).list(); + + if (historicVariableInstances.isEmpty()) { + return outputVarMap; + } + + for (HistoricVariableInstance historicVariableInstance : historicVariableInstances) { + String varName = historicVariableInstance.getName(); + String varActivity = historicVariableInstance.getActivityInstanceId().split(":")[0]; + if(!(varName.toUpperCase().startsWith("TASK_") && (varName.toUpperCase().endsWith("_IN") || varName.toUpperCase().endsWith("_OUT"))) && (varName.toUpperCase().startsWith("OUTPUT_"))) { + String varType = historicVariableInstance.getTypeName(); + //if varType is not a file, then get the value as a string and put it in the outputVarMap + if (varType == null || !varType.equals("file")) { + Object objValue = historicVariableInstance.getValue(); + if (objValue == null) { + outputVarMap.put(varName + " (" + varType + ")", null); + } else { + String varValue = historicVariableInstance.getValue().toString(); + outputVarMap.put(varName + " (" + varType + ")", varValue); + } + } else { + //the variable is a file. + //we need to get the file name and the contents of the file and put them in the outputVarMap + TypedValue typedValue = historicVariableInstance.getTypedValue(); + if (typedValue instanceof FileValue) { + FileValue fileValue = (FileValue) typedValue; + String fileName = fileValue.getFilename(); + String mimeType = fileValue.getMimeType(); + if (mimeType.contains("image")) { + InputStream fileInputStream = fileValue.getValue(); + String encodedString = "data:" + mimeType + ";base64, "; + try { + byte[] sourceBytes = IOUtils.toByteArray(fileInputStream); + encodedString += Base64.getEncoder().encodeToString(sourceBytes); + } catch (IOException e) { + throw new RuntimeException(e); + } + outputVarMap.put(varName + " (" + varType + ", " + mimeType + ")", encodedString); + } else { + outputVarMap.put(varName + " (" + varType + ")", fileName); + } + } + } + } + } + return outputVarMap; + } + + public List getExternalWorkersUiDTO() { + List workers = new ArrayList(); + + List> workerRows = schedulerDbService.getExternalWorkers(); + + for (Map workerRow : workerRows) { + String workerId = workerRow.get("id").toString(); + String workerName = workerRow.get("name").toString(); + String workerHostname = workerRow.get("hostname").toString(); + + // Create new worker object if necessary + // + ExternalWorker worker = new ExternalWorker(workerId, workerName, workerHostname); + + // Get active topics + // + Object activeTopicsObj = workerRow.get("activeTopics"); + if (activeTopicsObj != null) { + worker.setActiveTopics(activeTopicsObj.toString()); + } + + // Get current topic + // + Object currentTopicObj = workerRow.get("currentTopic"); + if (currentTopicObj != null) { + worker.setCurrentTopic(currentTopicObj.toString()); + } + + // Get current command + // + Object currentCommandObj = workerRow.get("currentCommand"); + if (currentCommandObj != null) { + worker.setCurrentCommand(currentCommandObj.toString()); + } + + // Get current working dir + // + Object currentWorkingDirObj = workerRow.get("currentWorkingDir"); + if (currentWorkingDirObj != null) { + worker.setCurrentWorkingDir(currentWorkingDirObj.toString()); + } + + // Get and set worker.lastHeartbeatTime + // + Timestamp workerLastHeartbeatTime = (Timestamp) workerRow.get("last_heartbeat_time"); + log.trace("worker " + workerId + ", got last_heartbeat_time = " + workerLastHeartbeatTime); + worker.setLastHeartbeatTime(workerLastHeartbeatTime); + + log.trace("adding external worker to uiDTO: " + workerId); + workers.add(worker); + } + + return workers; + } + + /** + * + */ + public List getWorkersUiDTO(List procDefs) { + List workers = new ArrayList(); + + List> workerRows = schedulerDbService.getWorkers(); + + List> workerProcDefRows = schedulerDbService.getWorkerProcDefRows(); + + for (Map workerRow : workerRows) { + String workerId = workerRow.get("id").toString(); + String workerName = workerRow.get("name").toString(); + String workerType = workerRow.get("cws_worker_type").toString(); + + // Get worker install type + // + Object workerInstallTypeObj = workerRow.get("cws_install_type"); + String workerInstallType = "unknown"; + if (workerInstallTypeObj == null) { + log.error("'cws_install_type' value for worker '" + workerId + "' was null!"); + } else { + workerInstallType = workerInstallTypeObj.toString(); + } + + // Get worker status + // + Object workerStatusObj = workerRow.get("status"); + String workerStatus = "unknown"; + if (workerStatusObj == null) { + log.error("'status' value for worker '" + workerId + "' was null!"); + } else { + workerStatus = workerStatusObj.toString(); + } + + // Create new worker object if necessary + // + Worker worker = new Worker(workerId, workerName, workerInstallType, workerType, workerStatus); + + // Get and set worker.lastHeartbeatTime + // + Timestamp workerLastHeartbeatTime = (Timestamp) workerRow.get("last_heartbeat_time"); + log.trace("worker " + workerId + ", got last_heartbeat_time = " + workerLastHeartbeatTime); + worker.setLastHeartbeatTime(workerLastHeartbeatTime); + + // Get and set worker.jobExecutorMaxPoolSize + // + worker.setJobExecutorMaxPoolSize((Integer) workerRow.get("job_executor_max_pool_size")); + + Map procInstanceLimits = worker.getProcInstanceLimits(); + + for (Map row : workerProcDefRows) { + + Boolean acceptingNew = (Boolean) row.get("accepting_new"); + if (acceptingNew) { + String procDefWorkerId = row.get("worker_id").toString(); + if (procDefWorkerId.equals(workerId)) { + String procDefKey = row.get("proc_def_key").toString(); + Integer limit = Integer.parseInt(row.get("max_instances").toString()); + procInstanceLimits.put(procDefKey, limit); + } + } + } + + for (ProcessDefinition procDef : procDefs) { + if (!procInstanceLimits.containsKey(procDef.getKey())) { + procInstanceLimits.put(procDef.getKey(), null); + } + } + + // set updated procInstanceLimits map back to worker object + worker.setProcInstanceLimits(procInstanceLimits); + + log.trace("adding worker to uiDTO: " + workerId); + workers.add(worker); + } + + return workers; + } + + /** + * Returns the title representing the statistics of the workers + * + * @return + */ + public String getWorkersTitle() { + try { + List> rows = schedulerDbService.getWorkersStats(); + + Integer nUp = 0, nDown = 0; + + for (Map row : rows) { - if (inputVarMap.containsKey(varName)) { - } else { - inputVarMap.put(varName, varValue); - } - - } - } - return inputVarMap; - } - - public List getExternalWorkersUiDTO() { - List workers = new ArrayList(); - - List> workerRows = schedulerDbService.getExternalWorkers(); - - for (Map workerRow : workerRows) { - String workerId = workerRow.get("id").toString(); - String workerName = workerRow.get("name").toString(); - String workerHostname = workerRow.get("hostname").toString(); - - // Create new worker object if necessary - // - ExternalWorker worker = new ExternalWorker(workerId, workerName, workerHostname); - - // Get active topics - // - Object activeTopicsObj = workerRow.get("activeTopics"); - if (activeTopicsObj != null) { - worker.setActiveTopics(activeTopicsObj.toString()); - } - - // Get current topic - // - Object currentTopicObj = workerRow.get("currentTopic"); - if (currentTopicObj != null) { - worker.setCurrentTopic(currentTopicObj.toString()); - } - - // Get current command - // - Object currentCommandObj = workerRow.get("currentCommand"); - if (currentCommandObj != null) { - worker.setCurrentCommand(currentCommandObj.toString()); - } - - // Get current working dir - // - Object currentWorkingDirObj = workerRow.get("currentWorkingDir"); - if (currentWorkingDirObj != null) { - worker.setCurrentWorkingDir(currentWorkingDirObj.toString()); - } - - // Get and set worker.lastHeartbeatTime - // - Timestamp workerLastHeartbeatTime = (Timestamp) workerRow.get("last_heartbeat_time"); - log.trace("worker " + workerId + ", got last_heartbeat_time = " + workerLastHeartbeatTime); - worker.setLastHeartbeatTime(workerLastHeartbeatTime); - - log.trace("adding external worker to uiDTO: " + workerId); - workers.add(worker); - } - - return workers; - } - - /** - * - */ - public List getWorkersUiDTO(List procDefs) { - List workers = new ArrayList(); - - List> workerRows = schedulerDbService.getWorkers(); - - List> workerProcDefRows = schedulerDbService.getWorkerProcDefRows(); - - for (Map workerRow : workerRows) { - String workerId = workerRow.get("id").toString(); - String workerName = workerRow.get("name").toString(); - String workerType = workerRow.get("cws_worker_type").toString(); - - // Get worker install type - // - Object workerInstallTypeObj = workerRow.get("cws_install_type"); - String workerInstallType = "unknown"; - if (workerInstallTypeObj == null) { - log.error("'cws_install_type' value for worker '" + workerId + "' was null!"); - } else { - workerInstallType = workerInstallTypeObj.toString(); - } - - // Get worker status - // - Object workerStatusObj = workerRow.get("status"); - String workerStatus = "unknown"; - if (workerStatusObj == null) { - log.error("'status' value for worker '" + workerId + "' was null!"); - } else { - workerStatus = workerStatusObj.toString(); - } - - // Create new worker object if necessary - // - Worker worker = new Worker(workerId, workerName, workerInstallType, workerType, workerStatus); - - // Get and set worker.lastHeartbeatTime - // - Timestamp workerLastHeartbeatTime = (Timestamp) workerRow.get("last_heartbeat_time"); - log.trace("worker " + workerId + ", got last_heartbeat_time = " + workerLastHeartbeatTime); - worker.setLastHeartbeatTime(workerLastHeartbeatTime); - - // Get and set worker.jobExecutorMaxPoolSize - // - worker.setJobExecutorMaxPoolSize((Integer) workerRow.get("job_executor_max_pool_size")); - - Map procInstanceLimits = worker.getProcInstanceLimits(); - - for (Map row : workerProcDefRows) { - - Boolean acceptingNew = (Boolean) row.get("accepting_new"); - if (acceptingNew) { - String procDefWorkerId = row.get("worker_id").toString(); - if (procDefWorkerId.equals(workerId)) { - String procDefKey = row.get("proc_def_key").toString(); - Integer limit = Integer.parseInt(row.get("max_instances").toString()); - procInstanceLimits.put(procDefKey, limit); - } - } - } - - for (ProcessDefinition procDef : procDefs) { - if (!procInstanceLimits.containsKey(procDef.getKey())) { - procInstanceLimits.put(procDef.getKey(), null); - } - } - - // set updated procInstanceLimits map back to worker object - worker.setProcInstanceLimits(procInstanceLimits); - - log.trace("adding worker to uiDTO: " + workerId); - workers.add(worker); - } - - return workers; - } - - /** - * Returns the title representing the statistics of the workers - * - * @return - */ - public String getWorkersTitle() { - try { - List> rows = schedulerDbService.getWorkersStats(); - - Integer nUp = 0, nDown = 0; - - for (Map row : rows) { - - String status = row.get("status").toString(); - - Integer count = Integer.parseInt(row.get("cnt").toString()); + String status = row.get("status").toString(); + + Integer count = Integer.parseInt(row.get("cnt").toString()); - if (status.equals("up")) { - nUp = count; - } else if (status.equals("down")) { - nDown = count; - } - } + if (status.equals("up")) { + nUp = count; + } else if (status.equals("down")) { + nDown = count; + } + } - return (nUp + nDown) + " Workers (" + nUp + " up, " + nDown + " down)"; - } catch (Exception e) { - return "Workers"; - } - } + return (nUp + nDown) + " Workers (" + nUp + " up, " + nDown + " down)"; + } catch (Exception e) { + return "Workers"; + } + } - /** - * - */ - public Map getProcessInstanceStats(String lastNumHours) { - List> rows = schedulerDbService.getProcessInstanceStats(lastNumHours); + /** + * + */ + public Map getProcessInstanceStats(String lastNumHours) { + List> rows = schedulerDbService.getProcessInstanceStats(lastNumHours); - Map ret = new HashMap(); - for (Map row : rows) { - String key = row.get("proc_def_key").toString(); - String status = row.get("status").toString(); + Map ret = new HashMap(); + for (Map row : rows) { + String key = row.get("proc_def_key").toString(); + String status = row.get("status").toString(); - if (status.equals("complete")) { - key = "numCompleted_" + key; - } else if (status.equals("running")) { - key = "numRunning_" + key; - } else if (status.equals("pending")) { - key = "numPending_" + key; - } + if (status.equals("complete")) { + key = "numCompleted_" + key; + } else if (status.equals("running")) { + key = "numRunning_" + key; + } else if (status.equals("pending")) { + key = "numPending_" + key; + } - ret.put(key, row.get("cnt").toString()); - } + ret.put(key, row.get("cnt").toString()); + } - return ret; - } + return ret; + } - /** - * - */ - public Map getWorkerNumRunningProcs() { - List> rows = schedulerDbService.getWorkerNumRunningProcs(); + /** + * + */ + public Map getWorkerNumRunningProcs() { + List> rows = schedulerDbService.getWorkerNumRunningProcs(); - Map ret = new HashMap(); - for (Map row : rows) { - String key = row.get("id").toString(); - ret.put(key, row.get("cnt").toString()); - } + Map ret = new HashMap(); + for (Map row : rows) { + String key = row.get("id").toString(); + ret.put(key, row.get("cnt").toString()); + } - return ret; - } + return ret; + } - public DiskUsage getDiskUsage() throws Exception { + public DiskUsage getDiskUsage() throws Exception { - DiskUsage diskUsage = new DiskUsage(); + DiskUsage diskUsage = new DiskUsage(); - try { + try { - diskUsage.databaseSize = schedulerDbService.getDbSize(); + diskUsage.databaseSize = schedulerDbService.getDbSize(); - List> rows = schedulerDbService.getDiskUsage(); + List> rows = schedulerDbService.getDiskUsage(); - for (Map row : rows) { + for (Map row : rows) { - String id = row.get("id").toString(); - String name = row.get("name").toString(); - String installType = row.get("cws_install_type").toString(); - Object diskFreeBytes = row.get("disk_free_bytes"); + String id = row.get("id").toString(); + String name = row.get("name").toString(); + String installType = row.get("cws_install_type").toString(); + Object diskFreeBytes = row.get("disk_free_bytes"); - if (installType.contains("console")) { + if (installType.contains("console")) { - name = "Console (" + name + ")"; - } + name = "Console (" + name + ")"; + } - WorkerInfo workerInfo = new WorkerInfo(name, diskFreeBytes); + WorkerInfo workerInfo = new WorkerInfo(name, diskFreeBytes); - // Get logs - List> logRows = schedulerDbService.getLogUsage(id); + // Get logs + List> logRows = schedulerDbService.getLogUsage(id); - for (Map logRow : logRows) { + for (Map logRow : logRows) { - String filename = logRow.get("filename").toString(); - Object size = logRow.get("size_bytes"); + String filename = logRow.get("filename").toString(); + Object size = logRow.get("size_bytes"); - workerInfo.getLogs().add(new LogInfo(filename, size)); - } + workerInfo.getLogs().add(new LogInfo(filename, size)); + } - diskUsage.workers.add(workerInfo); - } - } - catch (Exception e) { - log.error("Error getting system disk usage.", e); + diskUsage.workers.add(workerInfo); + } + } catch (Exception e) { + log.error("Error getting system disk usage.", e); - throw e; - } + throw e; + } - return diskUsage; - } + return diskUsage; + } - public void cleanupElasticsearch() { + public void cleanupElasticsearch() { - try { + try { - log.debug("Cleaning up elasticsearch..."); + log.debug("Cleaning up elasticsearch..."); - java.lang.Process p = Runtime.getRuntime().exec(cwsInstallDir + "/clean_es_history.sh"); + java.lang.Process p = Runtime.getRuntime().exec(cwsInstallDir + "/clean_es_history.sh"); - // Wait for the process to complete - // - p.waitFor(); + // Wait for the process to complete + // + p.waitFor(); - if (p.exitValue() != 0) { + if (p.exitValue() != 0) { - log.error("Elasticsearch cleanup failed. Exit code: " + p.exitValue()); - } + log.error("Elasticsearch cleanup failed. Exit code: " + p.exitValue()); + } - log.debug("Elasticsearch cleanup done!"); + log.debug("Elasticsearch cleanup done!"); - } catch (Exception e) { - log.error("error: ", e); - } - } + } catch (Exception e) { + log.error("error: ", e); + } + } - /* - * Return JSON key values of process status e.g. {PD1: {errors:4, - * pending:3,... },...} - */ - public Map> getProcessInstanceStatsJSON(String lastNumHours) { + /* + * Return JSON key values of process status e.g. {PD1: {errors:4, + * pending:3,... },...} + */ + public Map> getProcessInstanceStatsJSON(String lastNumHours) { - List> rows = schedulerDbService.getProcessInstanceStats(lastNumHours); + List> rows = schedulerDbService.getProcessInstanceStats(lastNumHours); - Map> ret = new HashMap>(); + Map> ret = new HashMap>(); - for (Map row : rows) { - String procDefKey = row.get("proc_def_key").toString(); + for (Map row : rows) { + String procDefKey = row.get("proc_def_key").toString(); - String status = row.get("status").toString(); + String status = row.get("status").toString(); - // if the key is new - if (!ret.containsKey(procDefKey)) { - Map statusObject = new HashMap(); - statusObject.put(status, row.get("cnt").toString()); + // if the key is new + if (!ret.containsKey(procDefKey)) { + Map statusObject = new HashMap(); + statusObject.put(status, row.get("cnt").toString()); - ret.put(procDefKey, statusObject); - } else { // existing proc_def_key - ret.get(procDefKey).put(status, row.get("cnt").toString()); - } - } + ret.put(procDefKey, statusObject); + } else { // existing proc_def_key + ret.get(procDefKey).put(status, row.get("cnt").toString()); + } + } - return ret; - } + return ret; + } - /* - * Return summary of proc_def_key, business_key pair - * - * e.g. {fail: 100, complete: 30, pending: 10...} - */ - public Map getStatsByBusinessKey(String procDefKey, String businessKey) { + /* + * Return summary of proc_def_key, business_key pair + * + * e.g. {fail: 100, complete: 30, pending: 10...} + */ + public Map getStatsByBusinessKey(String procDefKey, String businessKey) { - List> rows = schedulerDbService.getStatusByBusinessKey(procDefKey, businessKey); + List> rows = schedulerDbService.getStatusByBusinessKey(procDefKey, businessKey); - Map ret = new HashMap<>(); + Map ret = new HashMap<>(); - // Make sure we got a result - if (!rows.isEmpty()) { - // Pull it out of the list, we just want the single JSON object + // Make sure we got a result + if (!rows.isEmpty()) { + // Pull it out of the list, we just want the single JSON object - for (Map row : rows) { - ret.put(row.get("status").toString(), Integer.parseInt(row.get("cnt").toString())); - } - } - return ret; - } + for (Map row : rows) { + ret.put(row.get("status").toString(), Integer.parseInt(row.get("cnt").toString())); + } + } + return ret; + } - /* - * - * - */ - public JsonArray getPendingProcessesJSON() throws Exception { + /* + * + * + */ + public JsonArray getPendingProcessesJSON() throws Exception { - List> rows = schedulerDbService.getPendingProcessInstances(); - - JsonArray ja = new JsonArray(); - - for (Map row : rows) { - String uuid = row.get("uuid").toString(); - String procDefKey = row.get("proc_def_key").toString(); - String createdTime = row.get("created_time").toString(); - - JsonObject jo = new JsonObject(); - - jo.addProperty("uuid", uuid); - jo.addProperty("created_time", createdTime); - jo.addProperty("proc_def_key", procDefKey); - - try { - // Get process variables as a map - // - byte[] procVarsAsBytes = (byte[])row.get("proc_variables"); - FSTObjectInput in = new FSTObjectInput(new ByteArrayInputStream(procVarsAsBytes)); - Map procVars = (Map)in.readObject(); - in.close(); - - if (procVars == null) { - procVars = new HashMap(); - } - - log.trace("procVars: " + procVars); - - JsonObject vars = new JsonObject(); - - for (String varName : procVars.keySet()) { - Object value = procVars.get(varName); - - if (value != null) { - vars.addProperty(varName, value.toString()); - } - else { - vars.add(varName, JsonNull.INSTANCE); - } - } - - jo.add("variables", vars); - } - catch (Exception e) { - - log.error("getPendingProcessesJSON could not parse proc_variables", e); - - throw e; - } - - ja.add(jo); - } - - return ja; - } - - /** - * - */ - public String getProcInstStatusJson(String uuidOrProcInstId) { - Map data = cwsProcessService.getProcInstStatusMap(uuidOrProcInstId); - return new GsonBuilder().setPrettyPrinting().create().toJson(data); - } - - /** - * - */ - public List getFilteredProcessInstancesCamunda(String superProcInstId, String procInstId, String procDefKey, - String status, String minDate, String maxDate, String dateOrderBy, int page) { - - List instances = new ArrayList(); - - List> rows = schedulerDbService.getFilteredProcessInstances(superProcInstId, procInstId, procDefKey, status, - minDate, maxDate, dateOrderBy, page); - - for (Map row : rows) { - String uuidObj = (String) row.get("uuid"); - String procDefKeyObj = (String) row.get("proc_def_key"); - String procInstIdObj = (String) row.get("proc_inst_id"); - String superProcInstIdObj = (String) row.get("super_proc_inst_id"); - String statusObj = (String) row.get("status"); - String initiationKeyObj = (String) row.get("initiation_key"); - Timestamp createdTimestampObj = (Timestamp) row.get("created_time"); - Timestamp updatedTimestampObj = (Timestamp) row.get("updated_time"); - String claimedByWorker = (String) row.get("claimed_by_worker"); - String startedByWorker = (String) row.get("started_by_worker"); - Timestamp procStartTime = (Timestamp) row.get("proc_start_time"); - Timestamp procEndTime = (Timestamp) row.get("proc_end_time"); - Map inputVars; - if (procInstIdObj != null) { - inputVars = getInputVariablesForProcess(procInstIdObj.toString()); - } else { - inputVars = new HashMap(); - } - CwsProcessInstance instance = new CwsProcessInstance(uuidObj == null ? null : uuidObj.toString(), - procDefKeyObj == null ? null : procDefKeyObj.toString(), - procInstIdObj == null ? null : procInstIdObj.toString(), - superProcInstIdObj == null ? null : superProcInstIdObj.toString(), - statusObj == null ? null : statusObj, - initiationKeyObj == null ? null : initiationKeyObj, - createdTimestampObj == null ? null : createdTimestampObj, - updatedTimestampObj == null ? null : updatedTimestampObj, - claimedByWorker == null ? null : claimedByWorker, startedByWorker == null ? null : startedByWorker, - procStartTime == null ? null : procStartTime, procEndTime == null ? null : procEndTime, - inputVars); - instances.add(instance); - } - - return instances; - } - - /** - * Post to a message broker topic, to notify listeners that it needs to cleanup the logs - * - */ - public void sendWorkerLogCleanupTopicMessage() { - log.info("sending worker log cleanup topic message..."); - try { - jmsWorkerLogCleanupTopicTemplate.send(new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - BytesMessage msg = session.createBytesMessage(); - msg.setIntProperty("historyDaysToLive", Integer.parseInt(historyDaysToLive)); - return msg; - } - }); - } catch (Throwable e) { - cwsEmailerService.sendNotificationEmails("CWS JMS Error", - "Severe Error!\n\nCould not access AMQ.\n\nDetails: " + e.getMessage()); - log.error("Could not access AMQ.", e); - - throw e; - } - } - - /** - * Post to a message broker topic, to notify listeners that the code has - * been updated. - * - */ - private void sendCodeUpdatedTopicMessage() { - log.info("sending code updated topic message..."); - try { - jmsCodeUpdateTopicTemplate.send(new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - return session.createBytesMessage(); - } - }); - } catch (Throwable e) { - cwsEmailerService.sendNotificationEmails("CWS JMS Error", - "Severe Error!\n\nCould not access AMQ.\n\nDetails: " + e.getMessage()); - log.error("Could not access AMQ.", e); - - throw e; - } - } - - /** - * Post to a message broker topic, to notify listeners to shutdown. - * - */ - private void sendSystemShutdownTopicMessage() { - log.info("sending system shutdown topic message..."); - try { - jmsSystemShutdownTopicTemplate.send(new MessageCreator() { - public Message createMessage(Session session) throws JMSException { - return session.createBytesMessage(); - } - }); - } catch (Throwable e) { - cwsEmailerService.sendNotificationEmails("CWS JMS Error", - "Severe Error!\n\nCould not access AMQ.\n\nDetails: " + e.getMessage()); - log.error("Could not access AMQ.", e); - - throw e; - } - } + List> rows = schedulerDbService.getPendingProcessInstances(); + + JsonArray ja = new JsonArray(); + + for (Map row : rows) { + String uuid = row.get("uuid").toString(); + String procDefKey = row.get("proc_def_key").toString(); + String createdTime = row.get("created_time").toString(); + + JsonObject jo = new JsonObject(); + + jo.addProperty("uuid", uuid); + jo.addProperty("created_time", createdTime); + jo.addProperty("proc_def_key", procDefKey); + + try { + // Get process variables as a map + // + byte[] procVarsAsBytes = (byte[]) row.get("proc_variables"); + FSTObjectInput in = new FSTObjectInput(new ByteArrayInputStream(procVarsAsBytes)); + Map procVars = (Map) in.readObject(); + in.close(); + + if (procVars == null) { + procVars = new HashMap(); + } + + log.trace("procVars: " + procVars); + + JsonObject vars = new JsonObject(); + + for (String varName : procVars.keySet()) { + Object value = procVars.get(varName); + + if (value != null) { + vars.addProperty(varName, value.toString()); + } else { + vars.add(varName, JsonNull.INSTANCE); + } + } + + jo.add("variables", vars); + } catch (Exception e) { + + log.error("getPendingProcessesJSON could not parse proc_variables", e); + + throw e; + } + + ja.add(jo); + } + + return ja; + } + + /** + * + */ + public String getProcInstStatusJson(String uuidOrProcInstId) { + Map data = cwsProcessService.getProcInstStatusMap(uuidOrProcInstId); + return new GsonBuilder().setPrettyPrinting().create().toJson(data); + } + + /** + * + */ + public List getFilteredProcessInstancesCamunda(String superProcInstId, String procInstId, String procDefKey, + String status, String minDate, String maxDate, String dateOrderBy, int page) { + + List instances = new ArrayList(); + + List> rows = schedulerDbService.getFilteredProcessInstances(superProcInstId, procInstId, procDefKey, status, + minDate, maxDate, dateOrderBy, page); + + for (Map row : rows) { + String uuidObj = (String) row.get("uuid"); + String procDefKeyObj = (String) row.get("proc_def_key"); + String procInstIdObj = (String) row.get("proc_inst_id"); + String superProcInstIdObj = (String) row.get("super_proc_inst_id"); + String statusObj = (String) row.get("status"); + String initiationKeyObj = (String) row.get("initiation_key"); + Timestamp createdTimestampObj = (Timestamp) row.get("created_time"); + Timestamp updatedTimestampObj = (Timestamp) row.get("updated_time"); + String claimedByWorker = (String) row.get("claimed_by_worker"); + String startedByWorker = (String) row.get("started_by_worker"); + Timestamp procStartTime = (Timestamp) row.get("proc_start_time"); + Timestamp procEndTime = (Timestamp) row.get("proc_end_time"); + Map inputVars; + Map outputVars; + if (procInstIdObj != null) { + inputVars = getInputVariablesForProcess(procInstIdObj.toString()); + outputVars = getOutputVariablesForProcess(procInstIdObj.toString()); + } else { + inputVars = new HashMap(); + outputVars = new HashMap(); + } + CwsProcessInstance instance = new CwsProcessInstance(uuidObj == null ? null : uuidObj.toString(), + procDefKeyObj == null ? null : procDefKeyObj.toString(), + procInstIdObj == null ? null : procInstIdObj.toString(), + superProcInstIdObj == null ? null : superProcInstIdObj.toString(), + statusObj == null ? null : statusObj, + initiationKeyObj == null ? null : initiationKeyObj, + createdTimestampObj == null ? null : createdTimestampObj, + updatedTimestampObj == null ? null : updatedTimestampObj, + claimedByWorker == null ? null : claimedByWorker, startedByWorker == null ? null : startedByWorker, + procStartTime == null ? null : procStartTime, procEndTime == null ? null : procEndTime, + inputVars, outputVars); + instances.add(instance); + } + + return instances; + } + + /** + * Post to a message broker topic, to notify listeners that it needs to cleanup the logs + */ + public void sendWorkerLogCleanupTopicMessage() { + log.info("sending worker log cleanup topic message..."); + try { + jmsWorkerLogCleanupTopicTemplate.send(new MessageCreator() { + public Message createMessage(Session session) throws JMSException { + BytesMessage msg = session.createBytesMessage(); + msg.setIntProperty("historyDaysToLive", Integer.parseInt(historyDaysToLive)); + return msg; + } + }); + } catch (Throwable e) { + cwsEmailerService.sendNotificationEmails("CWS JMS Error", + "Severe Error!\n\nCould not access AMQ.\n\nDetails: " + e.getMessage()); + log.error("Could not access AMQ.", e); + + throw e; + } + } + + /** + * Post to a message broker topic, to notify listeners that the code has + * been updated. + */ + private void sendCodeUpdatedTopicMessage() { + log.info("sending code updated topic message..."); + try { + jmsCodeUpdateTopicTemplate.send(new MessageCreator() { + public Message createMessage(Session session) throws JMSException { + return session.createBytesMessage(); + } + }); + } catch (Throwable e) { + cwsEmailerService.sendNotificationEmails("CWS JMS Error", + "Severe Error!\n\nCould not access AMQ.\n\nDetails: " + e.getMessage()); + log.error("Could not access AMQ.", e); + + throw e; + } + } + + /** + * Post to a message broker topic, to notify listeners to shutdown. + */ + private void sendSystemShutdownTopicMessage() { + log.info("sending system shutdown topic message..."); + try { + jmsSystemShutdownTopicTemplate.send(new MessageCreator() { + public Message createMessage(Session session) throws JMSException { + return session.createBytesMessage(); + } + }); + } catch (Throwable e) { + cwsEmailerService.sendNotificationEmails("CWS JMS Error", + "Severe Error!\n\nCould not access AMQ.\n\nDetails: " + e.getMessage()); + log.error("Could not access AMQ.", e); + + throw e; + } + } } diff --git a/cws-ui/src/main/webapp/css/dashboard.css b/cws-ui/src/main/webapp/css/dashboard.css index d3828a34..6a44f619 100644 --- a/cws-ui/src/main/webapp/css/dashboard.css +++ b/cws-ui/src/main/webapp/css/dashboard.css @@ -313,6 +313,7 @@ div[class*="bar-"]{ position: relative; outline: none; float: right; + text-align: end; } .copy svg { @@ -321,3 +322,33 @@ div[class*="bar-"]{ left: 50%; transform: translate(-50%, -50%); } + +.grow { + transition: all 0.3s ease-in-out; + position: relative; + z-index: 5; + height:inherit; + border: 5px solid lightgray; + border-radius: 5px; + max-height: 150px; + max-width: 150px; +} + +.grow:hover { + transform: scale(2) translateX(-15%); + z-index: 6; +} + +.history-grow { + transition: all 0.3s ease-in-out; + position: relative; + z-index: 5; + height:inherit; + border: 5px solid lightgray; + border-radius: 5px; +} + +.history-grow:hover { + transform: scale(2) translateX(-15%); + z-index: 6; +} \ No newline at end of file diff --git a/cws-ui/src/main/webapp/css/processes.css b/cws-ui/src/main/webapp/css/processes.css new file mode 100644 index 00000000..7c226b9a --- /dev/null +++ b/cws-ui/src/main/webapp/css/processes.css @@ -0,0 +1,121 @@ +label { + margin-bottom: 0px; +} + +.dataTables_wrapper .dtsb-titleRow { + display: none; +} + +.dataTables_wrapper .dtsb-group { + padding-bottom: -15px !important; + padding-top: 8px; +} + +summary { + width: 100px; + display: list-item; +} + +#processes-table { + font-size: 90%; +} + +#pd-select { + width: 90%; +} + +#status-select { + border: 1px solid #ddd; + border-radius: 3px; + padding: 10px; +} + +#status-select label { + cursor: pointer; + padding-left: 5px; +} + +#datepicker-div input { + /*width:40%;*/ + margin-bottom: 1em; + float: left; +} + +.tr-fail { + color: #D9534F; +} + +.tr-complete { + color: black; +} + +.tr-running { + color: #5BC0DE; +} + +.tr-pending { + color: #F0AD4E; +} + +.tr-incident { + color: #C347ED; +} + +#hide-subprocs-div { + margin: 20px 0px; +} + +#display-subprocs-div { + margin: 30px 0px; +} + +#super-proc-inst-id { + background: #ededed; + ; + padding: 5px; + border-radius: 8px; + margin-left: 8px; + padding: 5px; +} + +.thumbnail { + margin-top: 5px !important; + margin-bottom: 5px !important; +} + +.above-table-div { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: flex-start; + align-items: flex-end; + gap: 10px; + margin-bottom: 5px; +} + +.above-table-buttons { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: flex-end; + align-items: flex-end; + gap: 10px; +} + +.above-table-filler { + flex-grow: 1; +} + +.btn-icon { + margin-right: 5px; +} + +.below-table-div { + display: flex; + flex-direction: row; + flex-wrap: nowrap; + justify-content: space-between; + align-items: flex-start; + gap: 10px; + margin-bottom: 5px; +} \ No newline at end of file diff --git a/cws-ui/src/main/webapp/js/DataTables/dataTables.responsive.min.js b/cws-ui/src/main/webapp/js/DataTables/dataTables.responsive.min.js new file mode 100644 index 00000000..4e5c971d --- /dev/null +++ b/cws-ui/src/main/webapp/js/DataTables/dataTables.responsive.min.js @@ -0,0 +1,4 @@ +/*! Responsive 2.5.0 + * © SpryMedia Ltd - datatables.net/license + */ +!function(n){var i,r;"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return n(e,window,document)}):"object"==typeof exports?(i=require("jquery"),r=function(e,t){t.fn.dataTable||require("datatables.net")(e,t)},"undefined"==typeof window?module.exports=function(e,t){return e=e||window,t=t||i(e),r(e,t),n(t,e,e.document)}:(r(window,i),module.exports=n(i,window,window.document))):n(jQuery,window,document)}(function(f,m,d,h){"use strict";function a(e,t){if(!r.versionCheck||!r.versionCheck("1.10.10"))throw"DataTables Responsive requires DataTables 1.10.10 or newer";this.s={childNodeStore:{},columns:[],current:[],dt:new r.Api(e)},this.s.dt.settings()[0].responsive||(t&&"string"==typeof t.details?t.details={type:t.details}:t&&!1===t.details?t.details={type:!1}:t&&!0===t.details&&(t.details={type:"inline"}),this.c=f.extend(!0,{},a.defaults,r.defaults.responsive,t),(e.responsive=this)._constructor())}var r=f.fn.dataTable,e=(f.extend(a.prototype,{_constructor:function(){var s=this,i=this.s.dt,e=i.settings()[0],t=f(m).innerWidth(),e=(i.settings()[0]._responsive=this,f(m).on("resize.dtr orientationchange.dtr",r.util.throttle(function(){var e=f(m).innerWidth();e!==t&&(s._resize(),t=e)})),e.oApi._fnCallbackReg(e,"aoRowCreatedCallback",function(e,t,n){-1!==f.inArray(!1,s.s.current)&&f(">td, >th",e).each(function(e){e=i.column.index("toData",e);!1===s.s.current[e]&&f(this).css("display","none")})}),i.on("destroy.dtr",function(){i.off(".dtr"),f(i.table().body()).off(".dtr"),f(m).off("resize.dtr orientationchange.dtr"),i.cells(".dtr-control").nodes().to$().removeClass("dtr-control"),f.each(s.s.current,function(e,t){!1===t&&s._setColumnVis(e,!0)})}),this.c.breakpoints.sort(function(e,t){return e.widtht.width?-1:0}),this._classLogic(),this._resizeAuto(),this.c.details);!1!==e.type&&(s._detailsInit(),i.on("column-visibility.dtr",function(){s._timer&&clearTimeout(s._timer),s._timer=setTimeout(function(){s._timer=null,s._classLogic(),s._resizeAuto(),s._resize(!0),s._redrawChildren()},100)}),i.on("draw.dtr",function(){s._redrawChildren()}),f(i.table().node()).addClass("dtr-"+e.type)),i.on("column-reorder.dtr",function(e,t,n){s._classLogic(),s._resizeAuto(),s._resize(!0)}),i.on("column-sizing.dtr",function(){s._resizeAuto(),s._resize()}),i.on("column-calc.dt",function(e,t){for(var n=s.s.current,i=0;i=r&&u(e,l[s].name);else if("not-"===n)for(s=0,o=l.length;s").append(r).appendTo(i)),f("").append(n).appendTo(t),"inline"===this.c.details.type&&f(e).addClass("dtr-inline collapsed"),f(e).find("[name]").removeAttr("name"),f(e).css("position","relative"),(r=f("

").css({width:1,height:1,overflow:"hidden",clear:"both"}).append(e)).insertBefore(s.table().node()),n.each(function(e){e=s.column.index("fromVisible",e);o[e].minWidth=this.offsetWidth||0}),r.remove())},_responsiveOnlyHidden:function(){var n=this.s.dt;return f.map(this.s.current,function(e,t){return!1===n.column(t).visible()||e})},_setColumnVis:function(e,t){var n=this,i=this.s.dt,r=t?"":"none";f(i.column(e).header()).css("display",r).toggleClass("dtr-hidden",!t),f(i.column(e).footer()).css("display",r).toggleClass("dtr-hidden",!t),i.column(e).nodes().to$().css("display",r).toggleClass("dtr-hidden",!t),f.isEmptyObject(this.s.childNodeStore)||i.cells(null,e).indexes().each(function(e){n._childNodesRestore(i,e.row,e.column)})},_tabIndexes:function(){var e=this.s.dt,t=e.cells({page:"current"}).nodes().to$(),n=e.settings()[0],i=this.c.details.target;t.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]"),("number"==typeof i?e.cells(null,i,{page:"current"}).nodes().to$():f(i="td:first-child, th:first-child"===i?">td:first-child, >th:first-child":i,e.rows({page:"current"}).nodes())).attr("tabIndex",n.iTabIndex).data("dtr-keyboard",1)}}),a.defaults={breakpoints:a.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],auto:!0,details:{display:(a.display={childRow:function(e,t,n){return t?f(e.node()).hasClass("parent")?(e.child(n(),"child").show(),!0):void 0:e.child.isShown()?(e.child(!1),!1):(e.child(n(),"child").show(),!0)},childRowImmediate:function(e,t,n){return!t&&e.child.isShown()||!e.responsive.hasHidden()?(e.child(!1),!1):(e.child(n(),"child").show(),!0)},modal:function(o){return function(e,t,n,i){if(t){if(!(s=f("div.dtr-modal-content")).length||e.index()!==s.data("dtr-row-idx"))return null;s.empty().append(n())}else{var r=function(){s.remove(),f(d).off("keypress.dtr"),f(e.node()).removeClass("parent"),i()},s=f('
').append(f('
').append(f('
').data("dtr-row-idx",e.index()).append(n())).append(f('
×
').click(function(){r()}))).append(f('
').click(function(){r()})).appendTo("body");f(e.node()).addClass("parent"),f(d).on("keyup.dtr",function(e){27===e.keyCode&&(e.stopPropagation(),r())})}return o&&o.header&&f("div.dtr-modal-content").prepend("

"+o.header(e)+"

"),!0}}}).childRow,renderer:(a.renderer={listHiddenNodes:function(){return function(i,e,t){var r=this,s=f('