diff --git a/package-lock.json b/package-lock.json
index 02d78ee0e55e5eb61016c201bacd742038f37ffc..d5c4770aeeb40af8d428d774a867b77fe539fc4c 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,8 +1,3212 @@
 {
   "name": "@startinblox/component-chat",
   "version": "0.0.0",
-  "lockfileVersion": 1,
+  "lockfileVersion": 2,
   "requires": true,
+  "packages": {
+    "": {
+      "name": "@startinblox/component-chat",
+      "version": "0.0.0",
+      "license": "MIT",
+      "dependencies": {
+        "@babel/cli": "^7.10.1",
+        "@babel/core": "^7.10.2",
+        "babel-plugin-transform-commonjs": "^1.1.6",
+        "copyfiles": "^2.3.0",
+        "minify": "^7.0.0",
+        "npm-run-all": "^4.1.5",
+        "sass": "^1.32.5"
+      },
+      "devDependencies": {
+        "watch-cli": "^0.2.3"
+      }
+    },
+    "node_modules/@babel/cli": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.10.1.tgz",
+      "integrity": "sha512-cVB+dXeGhMOqViIaZs3A9OUAe4pKw4SBNdMw6yHJMYR7s4TB+Cei7ThquV/84O19PdIFWuwe03vxxES0BHUm5g==",
+      "dependencies": {
+        "chokidar": "^2.1.8",
+        "commander": "^4.0.1",
+        "convert-source-map": "^1.1.0",
+        "fs-readdir-recursive": "^1.1.0",
+        "glob": "^7.0.0",
+        "lodash": "^4.17.13",
+        "make-dir": "^2.1.0",
+        "slash": "^2.0.0",
+        "source-map": "^0.5.0"
+      },
+      "bin": {
+        "babel": "bin/babel.js",
+        "babel-external-helpers": "bin/babel-external-helpers.js"
+      }
+    },
+    "node_modules/@babel/code-frame": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.1.tgz",
+      "integrity": "sha512-IGhtTmpjGbYzcEDOw7DcQtbQSXcG9ftmAXtWTu9V936vDye4xjjekktFAtgZsWpzTj/X01jocB46mTywm/4SZw==",
+      "dependencies": {
+        "@babel/highlight": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/core": {
+      "version": "7.10.2",
+      "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.2.tgz",
+      "integrity": "sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ==",
+      "dependencies": {
+        "@babel/code-frame": "^7.10.1",
+        "@babel/generator": "^7.10.2",
+        "@babel/helper-module-transforms": "^7.10.1",
+        "@babel/helpers": "^7.10.1",
+        "@babel/parser": "^7.10.2",
+        "@babel/template": "^7.10.1",
+        "@babel/traverse": "^7.10.1",
+        "@babel/types": "^7.10.2",
+        "convert-source-map": "^1.7.0",
+        "debug": "^4.1.0",
+        "gensync": "^1.0.0-beta.1",
+        "json5": "^2.1.2",
+        "lodash": "^4.17.13",
+        "resolve": "^1.3.2",
+        "semver": "^5.4.1",
+        "source-map": "^0.5.0"
+      },
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/@babel/generator": {
+      "version": "7.10.2",
+      "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.2.tgz",
+      "integrity": "sha512-AxfBNHNu99DTMvlUPlt1h2+Hn7knPpH5ayJ8OqDWSeLld+Fi2AYBTC/IejWDM9Edcii4UzZRCsbUt0WlSDsDsA==",
+      "dependencies": {
+        "@babel/types": "^7.10.2",
+        "jsesc": "^2.5.1",
+        "lodash": "^4.17.13",
+        "source-map": "^0.5.0"
+      }
+    },
+    "node_modules/@babel/helper-function-name": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.1.tgz",
+      "integrity": "sha512-fcpumwhs3YyZ/ttd5Rz0xn0TpIwVkN7X0V38B9TWNfVF42KEkhkAAuPCQ3oXmtTRtiPJrmZ0TrfS0GKF0eMaRQ==",
+      "dependencies": {
+        "@babel/helper-get-function-arity": "^7.10.1",
+        "@babel/template": "^7.10.1",
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/helper-get-function-arity": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.1.tgz",
+      "integrity": "sha512-F5qdXkYGOQUb0hpRaPoetF9AnsXknKjWMZ+wmsIRsp5ge5sFh4c3h1eH2pRTTuy9KKAA2+TTYomGXAtEL2fQEw==",
+      "dependencies": {
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/helper-member-expression-to-functions": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.1.tgz",
+      "integrity": "sha512-u7XLXeM2n50gb6PWJ9hoO5oO7JFPaZtrh35t8RqKLT1jFKj9IWeD1zrcrYp1q1qiZTdEarfDWfTIP8nGsu0h5g==",
+      "dependencies": {
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/helper-module-imports": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.1.tgz",
+      "integrity": "sha512-SFxgwYmZ3HZPyZwJRiVNLRHWuW2OgE5k2nrVs6D9Iv4PPnXVffuEHy83Sfx/l4SqF+5kyJXjAyUmrG7tNm+qVg==",
+      "dependencies": {
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/helper-module-transforms": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz",
+      "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==",
+      "dependencies": {
+        "@babel/helper-module-imports": "^7.10.1",
+        "@babel/helper-replace-supers": "^7.10.1",
+        "@babel/helper-simple-access": "^7.10.1",
+        "@babel/helper-split-export-declaration": "^7.10.1",
+        "@babel/template": "^7.10.1",
+        "@babel/types": "^7.10.1",
+        "lodash": "^4.17.13"
+      }
+    },
+    "node_modules/@babel/helper-optimise-call-expression": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.1.tgz",
+      "integrity": "sha512-a0DjNS1prnBsoKx83dP2falChcs7p3i8VMzdrSbfLhuQra/2ENC4sbri34dz/rWmDADsmF1q5GbfaXydh0Jbjg==",
+      "dependencies": {
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/helper-plugin-utils": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz",
+      "integrity": "sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA=="
+    },
+    "node_modules/@babel/helper-replace-supers": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz",
+      "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==",
+      "dependencies": {
+        "@babel/helper-member-expression-to-functions": "^7.10.1",
+        "@babel/helper-optimise-call-expression": "^7.10.1",
+        "@babel/traverse": "^7.10.1",
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/helper-simple-access": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz",
+      "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==",
+      "dependencies": {
+        "@babel/template": "^7.10.1",
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/helper-split-export-declaration": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz",
+      "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==",
+      "dependencies": {
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/helper-validator-identifier": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.1.tgz",
+      "integrity": "sha512-5vW/JXLALhczRCWP0PnFDMCJAchlBvM7f4uk/jXritBnIa6E1KmqmtrS3yn1LAnxFBypQ3eneLuXjsnfQsgILw=="
+    },
+    "node_modules/@babel/helpers": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz",
+      "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==",
+      "dependencies": {
+        "@babel/template": "^7.10.1",
+        "@babel/traverse": "^7.10.1",
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/highlight": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.1.tgz",
+      "integrity": "sha512-8rMof+gVP8mxYZApLF/JgNDAkdKa+aJt3ZYxF8z6+j/hpeXL7iMsKCPHa2jNMHu/qqBwzQF4OHNoYi8dMA/rYg==",
+      "dependencies": {
+        "@babel/helper-validator-identifier": "^7.10.1",
+        "chalk": "^2.0.0",
+        "js-tokens": "^4.0.0"
+      }
+    },
+    "node_modules/@babel/parser": {
+      "version": "7.10.2",
+      "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.2.tgz",
+      "integrity": "sha512-PApSXlNMJyB4JiGVhCOlzKIif+TKFTvu0aQAhnTvfP/z3vVSN6ZypH5bfUNwFXXjRQtUEBNFd2PtmCmG2Py3qQ==",
+      "bin": {
+        "parser": "bin/babel-parser.js"
+      },
+      "engines": {
+        "node": ">=6.0.0"
+      }
+    },
+    "node_modules/@babel/template": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.1.tgz",
+      "integrity": "sha512-OQDg6SqvFSsc9A0ej6SKINWrpJiNonRIniYondK2ViKhB06i3c0s+76XUft71iqBEe9S1OKsHwPAjfHnuvnCig==",
+      "dependencies": {
+        "@babel/code-frame": "^7.10.1",
+        "@babel/parser": "^7.10.1",
+        "@babel/types": "^7.10.1"
+      }
+    },
+    "node_modules/@babel/traverse": {
+      "version": "7.10.1",
+      "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.1.tgz",
+      "integrity": "sha512-C/cTuXeKt85K+p08jN6vMDz8vSV0vZcI0wmQ36o6mjbuo++kPMdpOYw23W2XH04dbRt9/nMEfA4W3eR21CD+TQ==",
+      "dependencies": {
+        "@babel/code-frame": "^7.10.1",
+        "@babel/generator": "^7.10.1",
+        "@babel/helper-function-name": "^7.10.1",
+        "@babel/helper-split-export-declaration": "^7.10.1",
+        "@babel/parser": "^7.10.1",
+        "@babel/types": "^7.10.1",
+        "debug": "^4.1.0",
+        "globals": "^11.1.0",
+        "lodash": "^4.17.13"
+      }
+    },
+    "node_modules/@babel/types": {
+      "version": "7.10.2",
+      "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.2.tgz",
+      "integrity": "sha512-AD3AwWBSz0AWF0AkCN9VPiWrvldXq+/e3cHa4J89vo4ymjz1XwrBFFVZmkJTsQIPNk+ZVomPSXUJqq8yyjZsng==",
+      "dependencies": {
+        "@babel/helper-validator-identifier": "^7.10.1",
+        "lodash": "^4.17.13",
+        "to-fast-properties": "^2.0.0"
+      }
+    },
+    "node_modules/@types/color-name": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz",
+      "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ=="
+    },
+    "node_modules/ansi-regex": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
+      "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==",
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/ansi-styles": {
+      "version": "3.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz",
+      "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==",
+      "dependencies": {
+        "color-convert": "^1.9.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/anymatch": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz",
+      "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==",
+      "dependencies": {
+        "micromatch": "^3.1.4",
+        "normalize-path": "^2.1.1"
+      }
+    },
+    "node_modules/anymatch/node_modules/normalize-path": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz",
+      "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=",
+      "dependencies": {
+        "remove-trailing-separator": "^1.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/arr-diff": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz",
+      "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/arr-flatten": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz",
+      "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/arr-union": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz",
+      "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/array-unique": {
+      "version": "0.3.2",
+      "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz",
+      "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/assign-symbols": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz",
+      "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/async-each": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz",
+      "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ=="
+    },
+    "node_modules/atob": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
+      "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
+      "bin": {
+        "atob": "bin/atob.js"
+      },
+      "engines": {
+        "node": ">= 4.5.0"
+      }
+    },
+    "node_modules/babel-plugin-transform-commonjs": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/babel-plugin-transform-commonjs/-/babel-plugin-transform-commonjs-1.1.6.tgz",
+      "integrity": "sha512-nLPA5wR1LzYmJkYZSjIZVv5Fjqr+lBmgNCGCvUjHKnNGG1OX/kfWggUJECaowEW3D8SaLOyuOU2x4UQw6G5Rwg==",
+      "dependencies": {
+        "@babel/helper-plugin-utils": "^7.0.0"
+      }
+    },
+    "node_modules/balanced-match": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+      "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
+    },
+    "node_modules/base": {
+      "version": "0.11.2",
+      "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz",
+      "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==",
+      "dependencies": {
+        "cache-base": "^1.0.1",
+        "class-utils": "^0.3.5",
+        "component-emitter": "^1.2.1",
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.1",
+        "mixin-deep": "^1.2.0",
+        "pascalcase": "^0.1.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/base/node_modules/define-property": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+      "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+      "dependencies": {
+        "is-descriptor": "^1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/base/node_modules/is-accessor-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+      "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+      "dependencies": {
+        "kind-of": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/base/node_modules/is-data-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+      "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+      "dependencies": {
+        "kind-of": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/base/node_modules/is-descriptor": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+      "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+      "dependencies": {
+        "is-accessor-descriptor": "^1.0.0",
+        "is-data-descriptor": "^1.0.0",
+        "kind-of": "^6.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/binary-extensions": {
+      "version": "1.13.1",
+      "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz",
+      "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/bindings": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
+      "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==",
+      "optional": true,
+      "dependencies": {
+        "file-uri-to-path": "1.0.0"
+      }
+    },
+    "node_modules/brace-expansion": {
+      "version": "1.1.11",
+      "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+      "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+      "dependencies": {
+        "balanced-match": "^1.0.0",
+        "concat-map": "0.0.1"
+      }
+    },
+    "node_modules/braces": {
+      "version": "2.3.2",
+      "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz",
+      "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==",
+      "dependencies": {
+        "arr-flatten": "^1.1.0",
+        "array-unique": "^0.3.2",
+        "extend-shallow": "^2.0.1",
+        "fill-range": "^4.0.0",
+        "isobject": "^3.0.1",
+        "repeat-element": "^1.1.2",
+        "snapdragon": "^0.8.1",
+        "snapdragon-node": "^2.0.1",
+        "split-string": "^3.0.2",
+        "to-regex": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/braces/node_modules/extend-shallow": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+      "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+      "dependencies": {
+        "is-extendable": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/buffer-from": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
+    },
+    "node_modules/cache-base": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
+      "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==",
+      "dependencies": {
+        "collection-visit": "^1.0.0",
+        "component-emitter": "^1.2.1",
+        "get-value": "^2.0.6",
+        "has-value": "^1.0.0",
+        "isobject": "^3.0.1",
+        "set-value": "^2.0.0",
+        "to-object-path": "^0.3.0",
+        "union-value": "^1.0.0",
+        "unset-value": "^1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/call-bind": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+      "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+      "dependencies": {
+        "function-bind": "^1.1.1",
+        "get-intrinsic": "^1.0.2"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/camel-case": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
+      "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
+      "dependencies": {
+        "pascal-case": "^3.1.2",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/camelcase": {
+      "version": "5.3.1",
+      "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
+      "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/chalk": {
+      "version": "2.4.2",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",
+      "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==",
+      "dependencies": {
+        "ansi-styles": "^3.2.1",
+        "escape-string-regexp": "^1.0.5",
+        "supports-color": "^5.3.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/chokidar": {
+      "version": "2.1.8",
+      "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz",
+      "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==",
+      "dependencies": {
+        "anymatch": "^2.0.0",
+        "async-each": "^1.0.1",
+        "braces": "^2.3.2",
+        "fsevents": "^1.2.7",
+        "glob-parent": "^3.1.0",
+        "inherits": "^2.0.3",
+        "is-binary-path": "^1.0.0",
+        "is-glob": "^4.0.0",
+        "normalize-path": "^3.0.0",
+        "path-is-absolute": "^1.0.0",
+        "readdirp": "^2.2.1",
+        "upath": "^1.1.1"
+      },
+      "optionalDependencies": {
+        "fsevents": "^1.2.7"
+      }
+    },
+    "node_modules/class-utils": {
+      "version": "0.3.6",
+      "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz",
+      "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==",
+      "dependencies": {
+        "arr-union": "^3.1.0",
+        "define-property": "^0.2.5",
+        "isobject": "^3.0.0",
+        "static-extend": "^0.1.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/class-utils/node_modules/define-property": {
+      "version": "0.2.5",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+      "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+      "dependencies": {
+        "is-descriptor": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/clean-css": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.0.1.tgz",
+      "integrity": "sha512-F1zAGOowUCg8yxT0O4UR+nmbMauf3YwbiUS60CPxpzJU7ulpamGzQomFrJSK4w/HqHtMmQKSHJUNue+dQQYQdg==",
+      "dependencies": {
+        "source-map": "~0.6.0"
+      },
+      "engines": {
+        "node": ">= 10.0"
+      }
+    },
+    "node_modules/clean-css/node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/cliui": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
+      "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
+      "dependencies": {
+        "string-width": "^4.2.0",
+        "strip-ansi": "^6.0.0",
+        "wrap-ansi": "^6.2.0"
+      }
+    },
+    "node_modules/collection-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
+      "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=",
+      "dependencies": {
+        "map-visit": "^1.0.0",
+        "object-visit": "^1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/color-convert": {
+      "version": "1.9.3",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
+      "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==",
+      "dependencies": {
+        "color-name": "1.1.3"
+      }
+    },
+    "node_modules/color-name": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
+      "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
+    },
+    "node_modules/commander": {
+      "version": "4.1.1",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz",
+      "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==",
+      "engines": {
+        "node": ">= 6"
+      }
+    },
+    "node_modules/component-emitter": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz",
+      "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg=="
+    },
+    "node_modules/concat-map": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+      "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
+    },
+    "node_modules/convert-source-map": {
+      "version": "1.7.0",
+      "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz",
+      "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==",
+      "dependencies": {
+        "safe-buffer": "~5.1.1"
+      }
+    },
+    "node_modules/copy-descriptor": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz",
+      "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/copyfiles": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/copyfiles/-/copyfiles-2.3.0.tgz",
+      "integrity": "sha512-73v7KFuDFJ/ofkQjZBMjMBFWGgkS76DzXvBMUh7djsMOE5EELWtAO/hRB6Wr5Vj5Zg+YozvoHemv0vnXpqxmOQ==",
+      "dependencies": {
+        "glob": "^7.0.5",
+        "minimatch": "^3.0.3",
+        "mkdirp": "^1.0.4",
+        "noms": "0.0.0",
+        "through2": "^2.0.1",
+        "yargs": "^15.3.1"
+      },
+      "bin": {
+        "copyfiles": "copyfiles",
+        "copyup": "copyfiles"
+      }
+    },
+    "node_modules/copyfiles/node_modules/mkdirp": {
+      "version": "1.0.4",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",
+      "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",
+      "bin": {
+        "mkdirp": "bin/cmd.js"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/core-util-is": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
+      "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
+    },
+    "node_modules/css-b64-images": {
+      "version": "0.2.5",
+      "resolved": "https://registry.npmjs.org/css-b64-images/-/css-b64-images-0.2.5.tgz",
+      "integrity": "sha1-QgBdgyBLK0pdk7axpWRBM7WSegI=",
+      "bin": {
+        "css-b64-images": "bin/css-b64-images"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/debug": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
+      "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+      "dependencies": {
+        "ms": "2.1.2"
+      },
+      "engines": {
+        "node": ">=6.0"
+      },
+      "peerDependenciesMeta": {
+        "supports-color": {
+          "optional": true
+        }
+      }
+    },
+    "node_modules/debug/node_modules/ms": {
+      "version": "2.1.2",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+      "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+    },
+    "node_modules/decamelize": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
+      "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/decode-uri-component": {
+      "version": "0.2.0",
+      "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
+      "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=",
+      "engines": {
+        "node": ">=0.10"
+      }
+    },
+    "node_modules/define-properties": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz",
+      "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==",
+      "dependencies": {
+        "object-keys": "^1.0.12"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/define-property": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz",
+      "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==",
+      "dependencies": {
+        "is-descriptor": "^1.0.2",
+        "isobject": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/define-property/node_modules/is-accessor-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+      "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+      "dependencies": {
+        "kind-of": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/define-property/node_modules/is-data-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+      "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+      "dependencies": {
+        "kind-of": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/define-property/node_modules/is-descriptor": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+      "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+      "dependencies": {
+        "is-accessor-descriptor": "^1.0.0",
+        "is-data-descriptor": "^1.0.0",
+        "kind-of": "^6.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/dot-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
+      "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
+      "dependencies": {
+        "no-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/emoji-regex": {
+      "version": "8.0.0",
+      "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+      "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+    },
+    "node_modules/error-ex": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+      "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+      "dependencies": {
+        "is-arrayish": "^0.2.1"
+      }
+    },
+    "node_modules/es-abstract": {
+      "version": "1.17.6",
+      "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz",
+      "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==",
+      "dependencies": {
+        "es-to-primitive": "^1.2.1",
+        "function-bind": "^1.1.1",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.1",
+        "is-callable": "^1.2.0",
+        "is-regex": "^1.1.0",
+        "object-inspect": "^1.7.0",
+        "object-keys": "^1.1.1",
+        "object.assign": "^4.1.0",
+        "string.prototype.trimend": "^1.0.1",
+        "string.prototype.trimstart": "^1.0.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/es-to-primitive": {
+      "version": "1.2.1",
+      "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+      "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+      "dependencies": {
+        "is-callable": "^1.1.4",
+        "is-date-object": "^1.0.1",
+        "is-symbol": "^1.0.2"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/escape-string-regexp": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz",
+      "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=",
+      "engines": {
+        "node": ">=0.8.0"
+      }
+    },
+    "node_modules/expand-brackets": {
+      "version": "2.1.4",
+      "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz",
+      "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=",
+      "dependencies": {
+        "debug": "^2.3.3",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "posix-character-classes": "^0.1.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/expand-brackets/node_modules/debug": {
+      "version": "2.6.9",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+      "dependencies": {
+        "ms": "2.0.0"
+      }
+    },
+    "node_modules/expand-brackets/node_modules/define-property": {
+      "version": "0.2.5",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+      "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+      "dependencies": {
+        "is-descriptor": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/expand-brackets/node_modules/extend-shallow": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+      "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+      "dependencies": {
+        "is-extendable": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/extend-shallow": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz",
+      "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=",
+      "dependencies": {
+        "assign-symbols": "^1.0.0",
+        "is-extendable": "^1.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/extend-shallow/node_modules/is-extendable": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+      "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+      "dependencies": {
+        "is-plain-object": "^2.0.4"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/extglob": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz",
+      "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==",
+      "dependencies": {
+        "array-unique": "^0.3.2",
+        "define-property": "^1.0.0",
+        "expand-brackets": "^2.1.4",
+        "extend-shallow": "^2.0.1",
+        "fragment-cache": "^0.2.1",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/extglob/node_modules/define-property": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+      "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+      "dependencies": {
+        "is-descriptor": "^1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/extglob/node_modules/extend-shallow": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+      "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+      "dependencies": {
+        "is-extendable": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/extglob/node_modules/is-accessor-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+      "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+      "dependencies": {
+        "kind-of": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/extglob/node_modules/is-data-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+      "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+      "dependencies": {
+        "kind-of": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/extglob/node_modules/is-descriptor": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+      "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+      "dependencies": {
+        "is-accessor-descriptor": "^1.0.0",
+        "is-data-descriptor": "^1.0.0",
+        "kind-of": "^6.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/file-uri-to-path": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz",
+      "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==",
+      "optional": true
+    },
+    "node_modules/fill-range": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz",
+      "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=",
+      "dependencies": {
+        "extend-shallow": "^2.0.1",
+        "is-number": "^3.0.0",
+        "repeat-string": "^1.6.1",
+        "to-regex-range": "^2.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/fill-range/node_modules/extend-shallow": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+      "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+      "dependencies": {
+        "is-extendable": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/find-up": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz",
+      "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
+      "dependencies": {
+        "locate-path": "^5.0.0",
+        "path-exists": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/for-in": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
+      "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/fragment-cache": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz",
+      "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=",
+      "dependencies": {
+        "map-cache": "^0.2.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/fs-readdir-recursive": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz",
+      "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA=="
+    },
+    "node_modules/fs.realpath": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+      "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
+    },
+    "node_modules/fsevents": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz",
+      "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==",
+      "hasInstallScript": true,
+      "optional": true,
+      "os": [
+        "darwin"
+      ],
+      "dependencies": {
+        "bindings": "^1.5.0",
+        "nan": "^2.12.1"
+      },
+      "engines": {
+        "node": ">= 4.0"
+      }
+    },
+    "node_modules/function-bind": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
+      "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
+    },
+    "node_modules/gaze": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
+      "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=",
+      "dev": true,
+      "dependencies": {
+        "globule": "~0.1.0"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/gensync": {
+      "version": "1.0.0-beta.1",
+      "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
+      "integrity": "sha512-r8EC6NO1sngH/zdD9fiRDLdcgnbayXah+mLgManTaIZJqEC1MZstmnox8KpnI2/fxQwrp5OpCOYWLp4rBl4Jcg==",
+      "engines": {
+        "node": ">=6.9.0"
+      }
+    },
+    "node_modules/get-caller-file": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+      "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+      "engines": {
+        "node": "6.* || 8.* || >= 10.*"
+      }
+    },
+    "node_modules/get-intrinsic": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+      "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+      "dependencies": {
+        "function-bind": "^1.1.1",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.1"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/get-value": {
+      "version": "2.0.6",
+      "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
+      "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/glob": {
+      "version": "7.1.6",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+      "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+      "dependencies": {
+        "fs.realpath": "^1.0.0",
+        "inflight": "^1.0.4",
+        "inherits": "2",
+        "minimatch": "^3.0.4",
+        "once": "^1.3.0",
+        "path-is-absolute": "^1.0.0"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/glob-parent": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
+      "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=",
+      "dependencies": {
+        "is-glob": "^3.1.0",
+        "path-dirname": "^1.0.0"
+      }
+    },
+    "node_modules/glob-parent/node_modules/is-glob": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz",
+      "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=",
+      "dependencies": {
+        "is-extglob": "^2.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/globals": {
+      "version": "11.12.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
+      "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==",
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/globule": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
+      "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=",
+      "dev": true,
+      "dependencies": {
+        "glob": "~3.1.21",
+        "lodash": "~1.0.1",
+        "minimatch": "~0.2.11"
+      },
+      "engines": {
+        "node": ">= 0.8.0"
+      }
+    },
+    "node_modules/globule/node_modules/glob": {
+      "version": "3.1.21",
+      "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
+      "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
+      "dev": true,
+      "dependencies": {
+        "graceful-fs": "~1.2.0",
+        "inherits": "1",
+        "minimatch": "~0.2.11"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/globule/node_modules/graceful-fs": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
+      "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=",
+      "deprecated": "please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js",
+      "dev": true,
+      "engines": {
+        "node": ">=0.4.0"
+      }
+    },
+    "node_modules/globule/node_modules/inherits": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
+      "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=",
+      "dev": true
+    },
+    "node_modules/globule/node_modules/lodash": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz",
+      "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=",
+      "dev": true,
+      "engines": [
+        "node",
+        "rhino"
+      ]
+    },
+    "node_modules/globule/node_modules/minimatch": {
+      "version": "0.2.14",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
+      "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
+      "deprecated": "Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue",
+      "dev": true,
+      "dependencies": {
+        "lru-cache": "2",
+        "sigmund": "~1.0.0"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/graceful-fs": {
+      "version": "4.2.4",
+      "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
+      "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw=="
+    },
+    "node_modules/has": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
+      "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
+      "dependencies": {
+        "function-bind": "^1.1.1"
+      },
+      "engines": {
+        "node": ">= 0.4.0"
+      }
+    },
+    "node_modules/has-color": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
+      "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=",
+      "dev": true,
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/has-flag": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+      "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=",
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/has-symbols": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz",
+      "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==",
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/has-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
+      "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=",
+      "dependencies": {
+        "get-value": "^2.0.6",
+        "has-values": "^1.0.0",
+        "isobject": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/has-values": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz",
+      "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=",
+      "dependencies": {
+        "is-number": "^3.0.0",
+        "kind-of": "^4.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/has-values/node_modules/kind-of": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz",
+      "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=",
+      "dependencies": {
+        "is-buffer": "^1.1.5"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/he": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
+      "bin": {
+        "he": "bin/he"
+      }
+    },
+    "node_modules/hosted-git-info": {
+      "version": "2.8.8",
+      "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
+      "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
+    },
+    "node_modules/html-minifier-terser": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
+      "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==",
+      "dependencies": {
+        "camel-case": "^4.1.1",
+        "clean-css": "^4.2.3",
+        "commander": "^4.1.1",
+        "he": "^1.2.0",
+        "param-case": "^3.0.3",
+        "relateurl": "^0.2.7",
+        "terser": "^4.6.3"
+      },
+      "bin": {
+        "html-minifier-terser": "cli.js"
+      },
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/html-minifier-terser/node_modules/clean-css": {
+      "version": "4.2.3",
+      "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
+      "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==",
+      "dependencies": {
+        "source-map": "~0.6.0"
+      },
+      "engines": {
+        "node": ">= 4.0"
+      }
+    },
+    "node_modules/html-minifier-terser/node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/html-minifier-terser/node_modules/terser": {
+      "version": "4.8.0",
+      "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
+      "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
+      "dependencies": {
+        "commander": "^2.20.0",
+        "source-map": "~0.6.1",
+        "source-map-support": "~0.5.12"
+      },
+      "bin": {
+        "terser": "bin/terser"
+      },
+      "engines": {
+        "node": ">=6.0.0"
+      }
+    },
+    "node_modules/html-minifier-terser/node_modules/terser/node_modules/commander": {
+      "version": "2.20.3",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+      "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
+    },
+    "node_modules/inflight": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+      "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+      "dependencies": {
+        "once": "^1.3.0",
+        "wrappy": "1"
+      }
+    },
+    "node_modules/inherits": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+      "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+    },
+    "node_modules/is-accessor-descriptor": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz",
+      "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=",
+      "dependencies": {
+        "kind-of": "^3.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-accessor-descriptor/node_modules/kind-of": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+      "dependencies": {
+        "is-buffer": "^1.1.5"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-arrayish": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+      "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0="
+    },
+    "node_modules/is-binary-path": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz",
+      "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=",
+      "dependencies": {
+        "binary-extensions": "^1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-buffer": {
+      "version": "1.1.6",
+      "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz",
+      "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
+    },
+    "node_modules/is-callable": {
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
+      "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==",
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/is-data-descriptor": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz",
+      "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=",
+      "dependencies": {
+        "kind-of": "^3.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-data-descriptor/node_modules/kind-of": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+      "dependencies": {
+        "is-buffer": "^1.1.5"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-date-object": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz",
+      "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==",
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/is-descriptor": {
+      "version": "0.1.6",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz",
+      "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==",
+      "dependencies": {
+        "is-accessor-descriptor": "^0.1.6",
+        "is-data-descriptor": "^0.1.4",
+        "kind-of": "^5.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-descriptor/node_modules/kind-of": {
+      "version": "5.1.0",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz",
+      "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-extendable": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz",
+      "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-extglob": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
+      "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-fullwidth-code-point": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+      "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/is-glob": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz",
+      "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==",
+      "dependencies": {
+        "is-extglob": "^2.1.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-number": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz",
+      "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=",
+      "dependencies": {
+        "kind-of": "^3.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-number/node_modules/kind-of": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+      "dependencies": {
+        "is-buffer": "^1.1.5"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-plain-object": {
+      "version": "2.0.4",
+      "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
+      "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
+      "dependencies": {
+        "isobject": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/is-regex": {
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
+      "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
+      "dependencies": {
+        "call-bind": "^1.0.2",
+        "has-symbols": "^1.0.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/is-symbol": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz",
+      "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==",
+      "dependencies": {
+        "has-symbols": "^1.0.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/is-windows": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
+      "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/isarray": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
+      "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE="
+    },
+    "node_modules/isexe": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+      "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA="
+    },
+    "node_modules/isobject": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
+      "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/js-tokens": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+      "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
+    },
+    "node_modules/jsesc": {
+      "version": "2.5.2",
+      "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz",
+      "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==",
+      "bin": {
+        "jsesc": "bin/jsesc"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/json-parse-better-errors": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+      "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw=="
+    },
+    "node_modules/json5": {
+      "version": "2.1.3",
+      "resolved": "https://registry.npmjs.org/json5/-/json5-2.1.3.tgz",
+      "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
+      "dependencies": {
+        "minimist": "^1.2.5"
+      },
+      "bin": {
+        "json5": "lib/cli.js"
+      },
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/kind-of": {
+      "version": "6.0.3",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
+      "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/locate-path": {
+      "version": "5.0.0",
+      "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz",
+      "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
+      "dependencies": {
+        "p-locate": "^4.1.0"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/lodash": {
+      "version": "4.17.15",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
+      "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
+    },
+    "node_modules/lower-case": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
+      "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
+      "dependencies": {
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/lru-cache": {
+      "version": "2.7.3",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
+      "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=",
+      "dev": true
+    },
+    "node_modules/make-dir": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
+      "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==",
+      "dependencies": {
+        "pify": "^4.0.1",
+        "semver": "^5.6.0"
+      },
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/map-cache": {
+      "version": "0.2.2",
+      "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
+      "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/map-visit": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz",
+      "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=",
+      "dependencies": {
+        "object-visit": "^1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/memorystream": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
+      "integrity": "sha1-htcJCzDORV1j+64S3aUaR93K+bI=",
+      "engines": {
+        "node": ">= 0.10.0"
+      }
+    },
+    "node_modules/micromatch": {
+      "version": "3.1.10",
+      "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz",
+      "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==",
+      "dependencies": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "braces": "^2.3.1",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "extglob": "^2.0.4",
+        "fragment-cache": "^0.2.1",
+        "kind-of": "^6.0.2",
+        "nanomatch": "^1.2.9",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/minify": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/minify/-/minify-7.0.0.tgz",
+      "integrity": "sha512-vgavF0qIto4WV4xpuaEx6Uo5hWyOh1rr/THg3v3AIwBc86b7ahLOdv5OCnRerQ75kObqo49/1J2CFSv7/fEL1g==",
+      "dependencies": {
+        "clean-css": "^5.0.1",
+        "css-b64-images": "~0.2.5",
+        "debug": "^4.1.0",
+        "html-minifier-terser": "^5.1.1",
+        "terser": "^5.3.2",
+        "try-to-catch": "^3.0.0"
+      },
+      "bin": {
+        "minify": "bin/minify.js"
+      },
+      "engines": {
+        "node": ">=14"
+      }
+    },
+    "node_modules/minimatch": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+      "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+      "dependencies": {
+        "brace-expansion": "^1.1.7"
+      },
+      "engines": {
+        "node": "*"
+      }
+    },
+    "node_modules/minimist": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+    },
+    "node_modules/mixin-deep": {
+      "version": "1.3.2",
+      "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
+      "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==",
+      "dependencies": {
+        "for-in": "^1.0.2",
+        "is-extendable": "^1.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/mixin-deep/node_modules/is-extendable": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz",
+      "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==",
+      "dependencies": {
+        "is-plain-object": "^2.0.4"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/ms": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+      "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g="
+    },
+    "node_modules/nan": {
+      "version": "2.14.1",
+      "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz",
+      "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==",
+      "optional": true
+    },
+    "node_modules/nanomatch": {
+      "version": "1.2.13",
+      "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
+      "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==",
+      "dependencies": {
+        "arr-diff": "^4.0.0",
+        "array-unique": "^0.3.2",
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "fragment-cache": "^0.2.1",
+        "is-windows": "^1.0.2",
+        "kind-of": "^6.0.2",
+        "object.pick": "^1.3.0",
+        "regex-not": "^1.0.0",
+        "snapdragon": "^0.8.1",
+        "to-regex": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/nice-try": {
+      "version": "1.0.5",
+      "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+      "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
+    },
+    "node_modules/no-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
+      "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
+      "dependencies": {
+        "lower-case": "^2.0.2",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/noms": {
+      "version": "0.0.0",
+      "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz",
+      "integrity": "sha1-2o69nzr51nYJGbJ9nNyAkqczKFk=",
+      "dependencies": {
+        "inherits": "^2.0.1",
+        "readable-stream": "~1.0.31"
+      }
+    },
+    "node_modules/noms/node_modules/isarray": {
+      "version": "0.0.1",
+      "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz",
+      "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8="
+    },
+    "node_modules/noms/node_modules/readable-stream": {
+      "version": "1.0.34",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz",
+      "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=",
+      "dependencies": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.1",
+        "isarray": "0.0.1",
+        "string_decoder": "~0.10.x"
+      }
+    },
+    "node_modules/noms/node_modules/string_decoder": {
+      "version": "0.10.31",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
+      "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ="
+    },
+    "node_modules/normalize-package-data": {
+      "version": "2.5.0",
+      "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+      "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+      "dependencies": {
+        "hosted-git-info": "^2.1.4",
+        "resolve": "^1.10.0",
+        "semver": "2 || 3 || 4 || 5",
+        "validate-npm-package-license": "^3.0.1"
+      }
+    },
+    "node_modules/normalize-path": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
+      "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/npm-run-all": {
+      "version": "4.1.5",
+      "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
+      "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
+      "dependencies": {
+        "ansi-styles": "^3.2.1",
+        "chalk": "^2.4.1",
+        "cross-spawn": "^6.0.5",
+        "memorystream": "^0.3.1",
+        "minimatch": "^3.0.4",
+        "pidtree": "^0.3.0",
+        "read-pkg": "^3.0.0",
+        "shell-quote": "^1.6.1",
+        "string.prototype.padend": "^3.0.0"
+      },
+      "bin": {
+        "npm-run-all": "bin/npm-run-all/index.js",
+        "run-p": "bin/run-p/index.js",
+        "run-s": "bin/run-s/index.js"
+      },
+      "engines": {
+        "node": ">= 4"
+      }
+    },
+    "node_modules/npm-run-all/node_modules/cross-spawn": {
+      "version": "6.0.5",
+      "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+      "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+      "dependencies": {
+        "nice-try": "^1.0.4",
+        "path-key": "^2.0.1",
+        "semver": "^5.5.0",
+        "shebang-command": "^1.2.0",
+        "which": "^1.2.9"
+      },
+      "engines": {
+        "node": ">=4.8"
+      }
+    },
+    "node_modules/npm-run-all/node_modules/load-json-file": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+      "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=",
+      "dependencies": {
+        "graceful-fs": "^4.1.2",
+        "parse-json": "^4.0.0",
+        "pify": "^3.0.0",
+        "strip-bom": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/npm-run-all/node_modules/parse-json": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+      "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=",
+      "dependencies": {
+        "error-ex": "^1.3.1",
+        "json-parse-better-errors": "^1.0.1"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/npm-run-all/node_modules/path-type": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+      "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+      "dependencies": {
+        "pify": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/npm-run-all/node_modules/pify": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+      "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=",
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/npm-run-all/node_modules/read-pkg": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+      "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=",
+      "dependencies": {
+        "load-json-file": "^4.0.0",
+        "normalize-package-data": "^2.3.2",
+        "path-type": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/npm-run-all/node_modules/strip-bom": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+      "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=",
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/object-copy": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
+      "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=",
+      "dependencies": {
+        "copy-descriptor": "^0.1.0",
+        "define-property": "^0.2.5",
+        "kind-of": "^3.0.3"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/object-copy/node_modules/define-property": {
+      "version": "0.2.5",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+      "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+      "dependencies": {
+        "is-descriptor": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/object-copy/node_modules/kind-of": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+      "dependencies": {
+        "is-buffer": "^1.1.5"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/object-inspect": {
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
+      "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==",
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/object-keys": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz",
+      "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==",
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/object-visit": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz",
+      "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=",
+      "dependencies": {
+        "isobject": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/object.assign": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+      "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
+      "dependencies": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "has-symbols": "^1.0.1",
+        "object-keys": "^1.1.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/object.pick": {
+      "version": "1.3.0",
+      "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
+      "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=",
+      "dependencies": {
+        "isobject": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/once": {
+      "version": "1.4.0",
+      "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+      "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+      "dependencies": {
+        "wrappy": "1"
+      }
+    },
+    "node_modules/p-limit": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
+      "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
+      "dependencies": {
+        "p-try": "^2.0.0"
+      },
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/p-locate": {
+      "version": "4.1.0",
+      "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz",
+      "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
+      "dependencies": {
+        "p-limit": "^2.2.0"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/p-try": {
+      "version": "2.2.0",
+      "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
+      "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/param-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
+      "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
+      "dependencies": {
+        "dot-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/pascal-case": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
+      "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
+      "dependencies": {
+        "no-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
+    "node_modules/pascalcase": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
+      "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/path-dirname": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz",
+      "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA="
+    },
+    "node_modules/path-exists": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz",
+      "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/path-is-absolute": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+      "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/path-key": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+      "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=",
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/path-parse": {
+      "version": "1.0.6",
+      "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz",
+      "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw=="
+    },
+    "node_modules/pidtree": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz",
+      "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==",
+      "bin": {
+        "pidtree": "bin/pidtree.js"
+      },
+      "engines": {
+        "node": ">=0.10"
+      }
+    },
+    "node_modules/pify": {
+      "version": "4.0.1",
+      "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
+      "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==",
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/posix-character-classes": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz",
+      "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/process-nextick-args": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz",
+      "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag=="
+    },
+    "node_modules/readable-stream": {
+      "version": "2.3.7",
+      "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz",
+      "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==",
+      "dependencies": {
+        "core-util-is": "~1.0.0",
+        "inherits": "~2.0.3",
+        "isarray": "~1.0.0",
+        "process-nextick-args": "~2.0.0",
+        "safe-buffer": "~5.1.1",
+        "string_decoder": "~1.1.1",
+        "util-deprecate": "~1.0.1"
+      }
+    },
+    "node_modules/readdirp": {
+      "version": "2.2.1",
+      "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz",
+      "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==",
+      "dependencies": {
+        "graceful-fs": "^4.1.11",
+        "micromatch": "^3.1.10",
+        "readable-stream": "^2.0.2"
+      },
+      "engines": {
+        "node": ">=0.10"
+      }
+    },
+    "node_modules/regex-not": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz",
+      "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==",
+      "dependencies": {
+        "extend-shallow": "^3.0.2",
+        "safe-regex": "^1.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/relateurl": {
+      "version": "0.2.7",
+      "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+      "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=",
+      "engines": {
+        "node": ">= 0.10"
+      }
+    },
+    "node_modules/remove-trailing-separator": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
+      "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8="
+    },
+    "node_modules/repeat-element": {
+      "version": "1.1.3",
+      "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz",
+      "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/repeat-string": {
+      "version": "1.6.1",
+      "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz",
+      "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=",
+      "engines": {
+        "node": ">=0.10"
+      }
+    },
+    "node_modules/require-directory": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+      "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/require-main-filename": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz",
+      "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
+    },
+    "node_modules/resolve": {
+      "version": "1.17.0",
+      "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz",
+      "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==",
+      "dependencies": {
+        "path-parse": "^1.0.6"
+      }
+    },
+    "node_modules/resolve-url": {
+      "version": "0.2.1",
+      "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz",
+      "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo="
+    },
+    "node_modules/ret": {
+      "version": "0.1.15",
+      "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz",
+      "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==",
+      "engines": {
+        "node": ">=0.12"
+      }
+    },
+    "node_modules/safe-buffer": {
+      "version": "5.1.2",
+      "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
+      "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
+    },
+    "node_modules/safe-regex": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz",
+      "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=",
+      "dependencies": {
+        "ret": "~0.1.10"
+      }
+    },
+    "node_modules/sass": {
+      "version": "1.32.5",
+      "resolved": "https://registry.npmjs.org/sass/-/sass-1.32.5.tgz",
+      "integrity": "sha512-kU1yJ5zUAmPxr7f3q0YXTAd1oZjSR1g3tYyv+xu0HZSl5JiNOaE987eiz7wCUvbm4I9fGWGU2TgApTtcP4GMNQ==",
+      "dependencies": {
+        "chokidar": ">=2.0.0 <4.0.0"
+      },
+      "bin": {
+        "sass": "sass.js"
+      },
+      "engines": {
+        "node": ">=8.9.0"
+      }
+    },
+    "node_modules/semver": {
+      "version": "5.7.1",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz",
+      "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
+      "bin": {
+        "semver": "bin/semver"
+      }
+    },
+    "node_modules/set-blocking": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
+      "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
+    },
+    "node_modules/set-value": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
+      "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==",
+      "dependencies": {
+        "extend-shallow": "^2.0.1",
+        "is-extendable": "^0.1.1",
+        "is-plain-object": "^2.0.3",
+        "split-string": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/set-value/node_modules/extend-shallow": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+      "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+      "dependencies": {
+        "is-extendable": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/shebang-command": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+      "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=",
+      "dependencies": {
+        "shebang-regex": "^1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/shebang-regex": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+      "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/shell-quote": {
+      "version": "1.7.2",
+      "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz",
+      "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg=="
+    },
+    "node_modules/sigmund": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+      "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
+      "dev": true
+    },
+    "node_modules/slash": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
+      "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==",
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/snapdragon": {
+      "version": "0.8.2",
+      "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz",
+      "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==",
+      "dependencies": {
+        "base": "^0.11.1",
+        "debug": "^2.2.0",
+        "define-property": "^0.2.5",
+        "extend-shallow": "^2.0.1",
+        "map-cache": "^0.2.2",
+        "source-map": "^0.5.6",
+        "source-map-resolve": "^0.5.0",
+        "use": "^3.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon-node": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz",
+      "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==",
+      "dependencies": {
+        "define-property": "^1.0.0",
+        "isobject": "^3.0.0",
+        "snapdragon-util": "^3.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon-node/node_modules/define-property": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz",
+      "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=",
+      "dependencies": {
+        "is-descriptor": "^1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon-node/node_modules/is-accessor-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz",
+      "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==",
+      "dependencies": {
+        "kind-of": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon-node/node_modules/is-data-descriptor": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz",
+      "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==",
+      "dependencies": {
+        "kind-of": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon-node/node_modules/is-descriptor": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz",
+      "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==",
+      "dependencies": {
+        "is-accessor-descriptor": "^1.0.0",
+        "is-data-descriptor": "^1.0.0",
+        "kind-of": "^6.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon-util": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz",
+      "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==",
+      "dependencies": {
+        "kind-of": "^3.2.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon-util/node_modules/kind-of": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+      "dependencies": {
+        "is-buffer": "^1.1.5"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon/node_modules/debug": {
+      "version": "2.6.9",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz",
+      "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==",
+      "dependencies": {
+        "ms": "2.0.0"
+      }
+    },
+    "node_modules/snapdragon/node_modules/define-property": {
+      "version": "0.2.5",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+      "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+      "dependencies": {
+        "is-descriptor": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/snapdragon/node_modules/extend-shallow": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz",
+      "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=",
+      "dependencies": {
+        "is-extendable": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/source-map": {
+      "version": "0.5.7",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz",
+      "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/source-map-resolve": {
+      "version": "0.5.3",
+      "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz",
+      "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==",
+      "dependencies": {
+        "atob": "^2.1.2",
+        "decode-uri-component": "^0.2.0",
+        "resolve-url": "^0.2.1",
+        "source-map-url": "^0.4.0",
+        "urix": "^0.1.0"
+      }
+    },
+    "node_modules/source-map-support": {
+      "version": "0.5.19",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
+      "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
+      "dependencies": {
+        "buffer-from": "^1.0.0",
+        "source-map": "^0.6.0"
+      }
+    },
+    "node_modules/source-map-support/node_modules/source-map": {
+      "version": "0.6.1",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/source-map-url": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
+      "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
+    },
+    "node_modules/spdx-correct": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz",
+      "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==",
+      "dependencies": {
+        "spdx-expression-parse": "^3.0.0",
+        "spdx-license-ids": "^3.0.0"
+      }
+    },
+    "node_modules/spdx-exceptions": {
+      "version": "2.3.0",
+      "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
+      "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A=="
+    },
+    "node_modules/spdx-expression-parse": {
+      "version": "3.0.1",
+      "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
+      "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
+      "dependencies": {
+        "spdx-exceptions": "^2.1.0",
+        "spdx-license-ids": "^3.0.0"
+      }
+    },
+    "node_modules/spdx-license-ids": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz",
+      "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q=="
+    },
+    "node_modules/split-string": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz",
+      "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==",
+      "dependencies": {
+        "extend-shallow": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/static-extend": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz",
+      "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=",
+      "dependencies": {
+        "define-property": "^0.2.5",
+        "object-copy": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/static-extend/node_modules/define-property": {
+      "version": "0.2.5",
+      "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz",
+      "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=",
+      "dependencies": {
+        "is-descriptor": "^0.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/string_decoder": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "dependencies": {
+        "safe-buffer": "~5.1.0"
+      }
+    },
+    "node_modules/string-width": {
+      "version": "4.2.0",
+      "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
+      "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==",
+      "dependencies": {
+        "emoji-regex": "^8.0.0",
+        "is-fullwidth-code-point": "^3.0.0",
+        "strip-ansi": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/string.prototype.padend": {
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.0.tgz",
+      "integrity": "sha512-3aIv8Ffdp8EZj8iLwREGpQaUZiPyrWrpzMBHvkiSW/bK/EGve9np07Vwy7IJ5waydpGXzQZu/F8Oze2/IWkBaA==",
+      "dependencies": {
+        "define-properties": "^1.1.3",
+        "es-abstract": "^1.17.0-next.1"
+      },
+      "engines": {
+        "node": ">= 0.4"
+      }
+    },
+    "node_modules/string.prototype.trimend": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
+      "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
+      "dependencies": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/string.prototype.trimstart": {
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
+      "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
+      "dependencies": {
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
+      },
+      "funding": {
+        "url": "https://github.com/sponsors/ljharb"
+      }
+    },
+    "node_modules/strip-ansi": {
+      "version": "6.0.0",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz",
+      "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==",
+      "dependencies": {
+        "ansi-regex": "^5.0.0"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/supports-color": {
+      "version": "5.5.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz",
+      "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==",
+      "dependencies": {
+        "has-flag": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/terser": {
+      "version": "5.5.1",
+      "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz",
+      "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==",
+      "dependencies": {
+        "commander": "^2.20.0",
+        "source-map": "~0.7.2",
+        "source-map-support": "~0.5.19"
+      },
+      "bin": {
+        "terser": "bin/terser"
+      },
+      "engines": {
+        "node": ">=10"
+      }
+    },
+    "node_modules/terser/node_modules/commander": {
+      "version": "2.20.3",
+      "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+      "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
+    },
+    "node_modules/terser/node_modules/source-map": {
+      "version": "0.7.3",
+      "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+      "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
+      "engines": {
+        "node": ">= 8"
+      }
+    },
+    "node_modules/through2": {
+      "version": "2.0.5",
+      "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
+      "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==",
+      "dependencies": {
+        "readable-stream": "~2.3.6",
+        "xtend": "~4.0.1"
+      }
+    },
+    "node_modules/to-fast-properties": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
+      "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/to-object-path": {
+      "version": "0.3.0",
+      "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
+      "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=",
+      "dependencies": {
+        "kind-of": "^3.0.2"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/to-object-path/node_modules/kind-of": {
+      "version": "3.2.2",
+      "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz",
+      "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=",
+      "dependencies": {
+        "is-buffer": "^1.1.5"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/to-regex": {
+      "version": "3.0.2",
+      "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz",
+      "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==",
+      "dependencies": {
+        "define-property": "^2.0.2",
+        "extend-shallow": "^3.0.2",
+        "regex-not": "^1.0.2",
+        "safe-regex": "^1.1.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/to-regex-range": {
+      "version": "2.1.1",
+      "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz",
+      "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=",
+      "dependencies": {
+        "is-number": "^3.0.0",
+        "repeat-string": "^1.6.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/try-to-catch": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-3.0.0.tgz",
+      "integrity": "sha512-eIm6ZXwR35jVF8By/HdbbkcaCDTBI5PpCPkejRKrYp0jyf/DbCCcRhHD7/O9jtFI3ewsqo9WctFEiJTS6i+CQA==",
+      "engines": {
+        "node": ">=6"
+      }
+    },
+    "node_modules/tslib": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+      "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
+    },
+    "node_modules/union-value": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
+      "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==",
+      "dependencies": {
+        "arr-union": "^3.1.0",
+        "get-value": "^2.0.6",
+        "is-extendable": "^0.1.1",
+        "set-value": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/unset-value": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz",
+      "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=",
+      "dependencies": {
+        "has-value": "^0.3.1",
+        "isobject": "^3.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/unset-value/node_modules/has-value": {
+      "version": "0.3.1",
+      "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz",
+      "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=",
+      "dependencies": {
+        "get-value": "^2.0.3",
+        "has-values": "^0.1.4",
+        "isobject": "^2.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/unset-value/node_modules/has-value/node_modules/isobject": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz",
+      "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=",
+      "dependencies": {
+        "isarray": "1.0.0"
+      },
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/unset-value/node_modules/has-values": {
+      "version": "0.1.4",
+      "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz",
+      "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/upath": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz",
+      "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==",
+      "engines": {
+        "node": ">=4",
+        "yarn": "*"
+      }
+    },
+    "node_modules/urix": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz",
+      "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI="
+    },
+    "node_modules/use": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz",
+      "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==",
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/util-deprecate": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz",
+      "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
+    },
+    "node_modules/validate-npm-package-license": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+      "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+      "dependencies": {
+        "spdx-correct": "^3.0.0",
+        "spdx-expression-parse": "^3.0.0"
+      }
+    },
+    "node_modules/verbalize": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/verbalize/-/verbalize-0.1.2.tgz",
+      "integrity": "sha1-Fl/aRkAzFUj46ZCx1+FDletyAgc=",
+      "dev": true,
+      "dependencies": {
+        "chalk": "~0.4.0"
+      },
+      "engines": {
+        "node": ">=0.10.0",
+        "npm": ">=1.2.10"
+      }
+    },
+    "node_modules/verbalize/node_modules/ansi-styles": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz",
+      "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=",
+      "dev": true,
+      "engines": {
+        "node": ">=0.8.0"
+      }
+    },
+    "node_modules/verbalize/node_modules/chalk": {
+      "version": "0.4.0",
+      "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz",
+      "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=",
+      "dev": true,
+      "dependencies": {
+        "ansi-styles": "~1.0.0",
+        "has-color": "~0.1.0",
+        "strip-ansi": "~0.1.0"
+      },
+      "engines": {
+        "node": ">=0.8.0"
+      }
+    },
+    "node_modules/verbalize/node_modules/strip-ansi": {
+      "version": "0.1.1",
+      "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
+      "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=",
+      "dev": true,
+      "bin": {
+        "strip-ansi": "cli.js"
+      },
+      "engines": {
+        "node": ">=0.8.0"
+      }
+    },
+    "node_modules/watch-cli": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/watch-cli/-/watch-cli-0.2.3.tgz",
+      "integrity": "sha512-+g6n5J+jimY8hxcoHQaePPNnjmRux0nCN9BztkChx9mOas61rou3nXxTireuOMSPz7sIM7/vk6vG1f85h6Ob2A==",
+      "dev": true,
+      "dependencies": {
+        "gaze": "^0.5.1",
+        "lodash": "^3.5.0",
+        "minimist": "^1.1.1",
+        "supports-color": "^4.0.0",
+        "verbalize": "^0.1.2"
+      },
+      "bin": {
+        "watch": "bin/watch"
+      },
+      "engines": {
+        "node": ">=0.8"
+      }
+    },
+    "node_modules/watch-cli/node_modules/has-flag": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
+      "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
+      "dev": true,
+      "engines": {
+        "node": ">=0.10.0"
+      }
+    },
+    "node_modules/watch-cli/node_modules/lodash": {
+      "version": "3.10.1",
+      "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+      "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
+      "dev": true
+    },
+    "node_modules/watch-cli/node_modules/supports-color": {
+      "version": "4.5.0",
+      "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
+      "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
+      "dev": true,
+      "dependencies": {
+        "has-flag": "^2.0.0"
+      },
+      "engines": {
+        "node": ">=4"
+      }
+    },
+    "node_modules/which": {
+      "version": "1.3.1",
+      "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+      "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+      "dependencies": {
+        "isexe": "^2.0.0"
+      },
+      "bin": {
+        "which": "bin/which"
+      }
+    },
+    "node_modules/which-module": {
+      "version": "2.0.0",
+      "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz",
+      "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho="
+    },
+    "node_modules/wrap-ansi": {
+      "version": "6.2.0",
+      "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
+      "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
+      "dependencies": {
+        "ansi-styles": "^4.0.0",
+        "string-width": "^4.1.0",
+        "strip-ansi": "^6.0.0"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/wrap-ansi/node_modules/ansi-styles": {
+      "version": "4.2.1",
+      "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
+      "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
+      "dependencies": {
+        "@types/color-name": "^1.1.1",
+        "color-convert": "^2.0.1"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/wrap-ansi/node_modules/color-convert": {
+      "version": "2.0.1",
+      "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+      "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+      "dependencies": {
+        "color-name": "~1.1.4"
+      },
+      "engines": {
+        "node": ">=7.0.0"
+      }
+    },
+    "node_modules/wrap-ansi/node_modules/color-name": {
+      "version": "1.1.4",
+      "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+      "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+    },
+    "node_modules/wrappy": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+      "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
+    },
+    "node_modules/xtend": {
+      "version": "4.0.2",
+      "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz",
+      "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==",
+      "engines": {
+        "node": ">=0.4"
+      }
+    },
+    "node_modules/y18n": {
+      "version": "4.0.0",
+      "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz",
+      "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w=="
+    },
+    "node_modules/yargs": {
+      "version": "15.3.1",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz",
+      "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==",
+      "dependencies": {
+        "cliui": "^6.0.0",
+        "decamelize": "^1.2.0",
+        "find-up": "^4.1.0",
+        "get-caller-file": "^2.0.1",
+        "require-directory": "^2.1.1",
+        "require-main-filename": "^2.0.0",
+        "set-blocking": "^2.0.0",
+        "string-width": "^4.2.0",
+        "which-module": "^2.0.0",
+        "y18n": "^4.0.0",
+        "yargs-parser": "^18.1.1"
+      },
+      "engines": {
+        "node": ">=8"
+      }
+    },
+    "node_modules/yargs-parser": {
+      "version": "18.1.3",
+      "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz",
+      "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
+      "dependencies": {
+        "camelcase": "^5.0.0",
+        "decamelize": "^1.2.0"
+      },
+      "engines": {
+        "node": ">=6"
+      }
+    }
+  },
   "dependencies": {
     "@babel/cli": {
       "version": "7.10.1",
@@ -49,21 +3253,6 @@
         "resolve": "^1.3.2",
         "semver": "^5.4.1",
         "source-map": "^0.5.0"
-      },
-      "dependencies": {
-        "debug": {
-          "version": "4.1.1",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
-          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
-          "requires": {
-            "ms": "^2.1.1"
-          }
-        },
-        "ms": {
-          "version": "2.1.2",
-          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
-          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
-        }
       }
     },
     "@babel/generator": {
@@ -220,21 +3409,6 @@
         "debug": "^4.1.0",
         "globals": "^11.1.0",
         "lodash": "^4.17.13"
-      },
-      "dependencies": {
-        "debug": {
-          "version": "4.1.1",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz",
-          "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==",
-          "requires": {
-            "ms": "^2.1.1"
-          }
-        },
-        "ms": {
-          "version": "2.1.2",
-          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
-          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
-        }
       }
     },
     "@babel/types": {
@@ -432,6 +3606,11 @@
         }
       }
     },
+    "buffer-from": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz",
+      "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A=="
+    },
     "cache-base": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz",
@@ -448,6 +3627,24 @@
         "unset-value": "^1.0.0"
       }
     },
+    "call-bind": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",
+      "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",
+      "requires": {
+        "function-bind": "^1.1.1",
+        "get-intrinsic": "^1.0.2"
+      }
+    },
+    "camel-case": {
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz",
+      "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==",
+      "requires": {
+        "pascal-case": "^3.1.2",
+        "tslib": "^2.0.3"
+      }
+    },
     "camelcase": {
       "version": "5.3.1",
       "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz",
@@ -503,6 +3700,21 @@
         }
       }
     },
+    "clean-css": {
+      "version": "5.0.1",
+      "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.0.1.tgz",
+      "integrity": "sha512-F1zAGOowUCg8yxT0O4UR+nmbMauf3YwbiUS60CPxpzJU7ulpamGzQomFrJSK4w/HqHtMmQKSHJUNue+dQQYQdg==",
+      "requires": {
+        "source-map": "~0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+        }
+      }
+    },
     "cliui": {
       "version": "6.0.0",
       "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz",
@@ -588,6 +3800,26 @@
       "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
       "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac="
     },
+    "css-b64-images": {
+      "version": "0.2.5",
+      "resolved": "https://registry.npmjs.org/css-b64-images/-/css-b64-images-0.2.5.tgz",
+      "integrity": "sha1-QgBdgyBLK0pdk7axpWRBM7WSegI="
+    },
+    "debug": {
+      "version": "4.3.1",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz",
+      "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==",
+      "requires": {
+        "ms": "2.1.2"
+      },
+      "dependencies": {
+        "ms": {
+          "version": "2.1.2",
+          "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
+          "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
+        }
+      }
+    },
     "decamelize": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz",
@@ -643,6 +3875,15 @@
         }
       }
     },
+    "dot-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz",
+      "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==",
+      "requires": {
+        "no-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
     "emoji-regex": {
       "version": "8.0.0",
       "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
@@ -881,6 +4122,15 @@
       "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
       "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
     },
+    "gaze": {
+      "version": "0.5.2",
+      "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz",
+      "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=",
+      "dev": true,
+      "requires": {
+        "globule": "~0.1.0"
+      }
+    },
     "gensync": {
       "version": "1.0.0-beta.1",
       "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.1.tgz",
@@ -891,6 +4141,16 @@
       "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
       "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="
     },
+    "get-intrinsic": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz",
+      "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==",
+      "requires": {
+        "function-bind": "^1.1.1",
+        "has": "^1.0.3",
+        "has-symbols": "^1.0.1"
+      }
+    },
     "get-value": {
       "version": "2.0.6",
       "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz",
@@ -933,6 +4193,58 @@
       "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
       "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA=="
     },
+    "globule": {
+      "version": "0.1.0",
+      "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz",
+      "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=",
+      "dev": true,
+      "requires": {
+        "glob": "~3.1.21",
+        "lodash": "~1.0.1",
+        "minimatch": "~0.2.11"
+      },
+      "dependencies": {
+        "glob": {
+          "version": "3.1.21",
+          "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz",
+          "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=",
+          "dev": true,
+          "requires": {
+            "graceful-fs": "~1.2.0",
+            "inherits": "1",
+            "minimatch": "~0.2.11"
+          }
+        },
+        "graceful-fs": {
+          "version": "1.2.3",
+          "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz",
+          "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=",
+          "dev": true
+        },
+        "inherits": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz",
+          "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=",
+          "dev": true
+        },
+        "lodash": {
+          "version": "1.0.2",
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz",
+          "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=",
+          "dev": true
+        },
+        "minimatch": {
+          "version": "0.2.14",
+          "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz",
+          "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=",
+          "dev": true,
+          "requires": {
+            "lru-cache": "2",
+            "sigmund": "~1.0.0"
+          }
+        }
+      }
+    },
     "graceful-fs": {
       "version": "4.2.4",
       "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz",
@@ -946,6 +4258,12 @@
         "function-bind": "^1.1.1"
       }
     },
+    "has-color": {
+      "version": "0.1.7",
+      "resolved": "https://registry.npmjs.org/has-color/-/has-color-0.1.7.tgz",
+      "integrity": "sha1-ZxRKUmDDT8PMpnfQQdr1L+e3iy8=",
+      "dev": true
+    },
     "has-flag": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
@@ -985,11 +4303,62 @@
         }
       }
     },
+    "he": {
+      "version": "1.2.0",
+      "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
+      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
+    },
     "hosted-git-info": {
       "version": "2.8.8",
       "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
       "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
     },
+    "html-minifier-terser": {
+      "version": "5.1.1",
+      "resolved": "https://registry.npmjs.org/html-minifier-terser/-/html-minifier-terser-5.1.1.tgz",
+      "integrity": "sha512-ZPr5MNObqnV/T9akshPKbVgyOqLmy+Bxo7juKCfTfnjNniTAMdy4hz21YQqoofMBJD2kdREaqPPdThoR78Tgxg==",
+      "requires": {
+        "camel-case": "^4.1.1",
+        "clean-css": "^4.2.3",
+        "commander": "^4.1.1",
+        "he": "^1.2.0",
+        "param-case": "^3.0.3",
+        "relateurl": "^0.2.7",
+        "terser": "^4.6.3"
+      },
+      "dependencies": {
+        "clean-css": {
+          "version": "4.2.3",
+          "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.3.tgz",
+          "integrity": "sha512-VcMWDN54ZN/DS+g58HYL5/n4Zrqe8vHJpGA8KdgUXFU4fuP/aHNw8eld9SyEIyabIMJX/0RaY/fplOo5hYLSFA==",
+          "requires": {
+            "source-map": "~0.6.0"
+          }
+        },
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+        },
+        "terser": {
+          "version": "4.8.0",
+          "resolved": "https://registry.npmjs.org/terser/-/terser-4.8.0.tgz",
+          "integrity": "sha512-EAPipTNeWsb/3wLPeup1tVPaXfIaU68xMnVdPafIL1TV05OhASArYyIfFvnvJCNrR2NIOvDVNNTFRa+Re2MWyw==",
+          "requires": {
+            "commander": "^2.20.0",
+            "source-map": "~0.6.1",
+            "source-map-support": "~0.5.12"
+          },
+          "dependencies": {
+            "commander": {
+              "version": "2.20.3",
+              "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+              "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
+            }
+          }
+        }
+      }
+    },
     "inflight": {
       "version": "1.0.6",
       "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
@@ -1041,9 +4410,9 @@
       "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w=="
     },
     "is-callable": {
-      "version": "1.2.0",
-      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz",
-      "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw=="
+      "version": "1.2.3",
+      "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz",
+      "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ=="
     },
     "is-data-descriptor": {
       "version": "0.1.4",
@@ -1135,10 +4504,11 @@
       }
     },
     "is-regex": {
-      "version": "1.1.0",
-      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz",
-      "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==",
+      "version": "1.1.2",
+      "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.2.tgz",
+      "integrity": "sha512-axvdhb5pdhEVThqJzYXwMlVuZwC+FF2DpcOhTS+y/8jVq4trxyPgfcwIxIKiyeuLlSQYKkmUaPQJ8ZE4yNKXDg==",
       "requires": {
+        "call-bind": "^1.0.2",
         "has-symbols": "^1.0.1"
       }
     },
@@ -1191,13 +4561,6 @@
       "integrity": "sha512-KXPvOm8K9IJKFM0bmdn8QXh7udDh1g/giieX0NLCaMnb4hEiVFqnop2ImTXCc5e0/oHz3LTqmHGtExn5hfMkOA==",
       "requires": {
         "minimist": "^1.2.5"
-      },
-      "dependencies": {
-        "minimist": {
-          "version": "1.2.5",
-          "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
-          "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
-        }
       }
     },
     "kind-of": {
@@ -1218,6 +4581,20 @@
       "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz",
       "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A=="
     },
+    "lower-case": {
+      "version": "2.0.2",
+      "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz",
+      "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==",
+      "requires": {
+        "tslib": "^2.0.3"
+      }
+    },
+    "lru-cache": {
+      "version": "2.7.3",
+      "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz",
+      "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=",
+      "dev": true
+    },
     "make-dir": {
       "version": "2.1.0",
       "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz",
@@ -1265,6 +4642,19 @@
         "to-regex": "^3.0.2"
       }
     },
+    "minify": {
+      "version": "7.0.0",
+      "resolved": "https://registry.npmjs.org/minify/-/minify-7.0.0.tgz",
+      "integrity": "sha512-vgavF0qIto4WV4xpuaEx6Uo5hWyOh1rr/THg3v3AIwBc86b7ahLOdv5OCnRerQ75kObqo49/1J2CFSv7/fEL1g==",
+      "requires": {
+        "clean-css": "^5.0.1",
+        "css-b64-images": "~0.2.5",
+        "debug": "^4.1.0",
+        "html-minifier-terser": "^5.1.1",
+        "terser": "^5.3.2",
+        "try-to-catch": "^3.0.0"
+      }
+    },
     "minimatch": {
       "version": "3.0.4",
       "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
@@ -1273,6 +4663,11 @@
         "brace-expansion": "^1.1.7"
       }
     },
+    "minimist": {
+      "version": "1.2.5",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
+      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw=="
+    },
     "mixin-deep": {
       "version": "1.3.2",
       "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",
@@ -1326,6 +4721,15 @@
       "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
       "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ=="
     },
+    "no-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz",
+      "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==",
+      "requires": {
+        "lower-case": "^2.0.2",
+        "tslib": "^2.0.3"
+      }
+    },
     "noms": {
       "version": "0.0.0",
       "resolved": "https://registry.npmjs.org/noms/-/noms-0.0.0.tgz",
@@ -1481,9 +4885,9 @@
       }
     },
     "object-inspect": {
-      "version": "1.7.0",
-      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.7.0.tgz",
-      "integrity": "sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw=="
+      "version": "1.9.0",
+      "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz",
+      "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw=="
     },
     "object-keys": {
       "version": "1.1.1",
@@ -1499,14 +4903,14 @@
       }
     },
     "object.assign": {
-      "version": "4.1.0",
-      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz",
-      "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==",
+      "version": "4.1.2",
+      "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz",
+      "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==",
       "requires": {
-        "define-properties": "^1.1.2",
-        "function-bind": "^1.1.1",
-        "has-symbols": "^1.0.0",
-        "object-keys": "^1.0.11"
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3",
+        "has-symbols": "^1.0.1",
+        "object-keys": "^1.1.1"
       }
     },
     "object.pick": {
@@ -1546,6 +4950,24 @@
       "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz",
       "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="
     },
+    "param-case": {
+      "version": "3.0.4",
+      "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz",
+      "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==",
+      "requires": {
+        "dot-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
+    "pascal-case": {
+      "version": "3.1.2",
+      "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz",
+      "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==",
+      "requires": {
+        "no-case": "^3.0.4",
+        "tslib": "^2.0.3"
+      }
+    },
     "pascalcase": {
       "version": "0.1.1",
       "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz",
@@ -1629,6 +5051,11 @@
         "safe-regex": "^1.1.0"
       }
     },
+    "relateurl": {
+      "version": "0.2.7",
+      "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz",
+      "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk="
+    },
     "remove-trailing-separator": {
       "version": "1.1.0",
       "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz",
@@ -1742,6 +5169,12 @@
       "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz",
       "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg=="
     },
+    "sigmund": {
+      "version": "1.0.1",
+      "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz",
+      "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=",
+      "dev": true
+    },
     "slash": {
       "version": "2.0.0",
       "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz",
@@ -1869,6 +5302,22 @@
         "urix": "^0.1.0"
       }
     },
+    "source-map-support": {
+      "version": "0.5.19",
+      "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz",
+      "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==",
+      "requires": {
+        "buffer-from": "^1.0.0",
+        "source-map": "^0.6.0"
+      },
+      "dependencies": {
+        "source-map": {
+          "version": "0.6.1",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+          "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+        }
+      }
+    },
     "source-map-url": {
       "version": "0.4.0",
       "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz",
@@ -1929,6 +5378,14 @@
         }
       }
     },
+    "string_decoder": {
+      "version": "1.1.1",
+      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
+      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "requires": {
+        "safe-buffer": "~5.1.0"
+      }
+    },
     "string-width": {
       "version": "4.2.0",
       "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz",
@@ -1949,29 +5406,21 @@
       }
     },
     "string.prototype.trimend": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz",
-      "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==",
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.3.tgz",
+      "integrity": "sha512-ayH0pB+uf0U28CtjlLvL7NaohvR1amUvVZk+y3DYb0Ey2PUV5zPkkKy9+U1ndVEIXO8hNg18eIv9Jntbii+dKw==",
       "requires": {
-        "define-properties": "^1.1.3",
-        "es-abstract": "^1.17.5"
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
       }
     },
     "string.prototype.trimstart": {
-      "version": "1.0.1",
-      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz",
-      "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==",
-      "requires": {
-        "define-properties": "^1.1.3",
-        "es-abstract": "^1.17.5"
-      }
-    },
-    "string_decoder": {
-      "version": "1.1.1",
-      "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
-      "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
+      "version": "1.0.3",
+      "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.3.tgz",
+      "integrity": "sha512-oBIBUy5lea5tt0ovtOFiEQaBkoBBkyJhZXzJYrSmDo5IUUqbOPvVezuRs/agBIdZ2p2Eo1FD6bD9USyBLfl3xg==",
       "requires": {
-        "safe-buffer": "~5.1.0"
+        "call-bind": "^1.0.0",
+        "define-properties": "^1.1.3"
       }
     },
     "strip-ansi": {
@@ -1990,6 +5439,28 @@
         "has-flag": "^3.0.0"
       }
     },
+    "terser": {
+      "version": "5.5.1",
+      "resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz",
+      "integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==",
+      "requires": {
+        "commander": "^2.20.0",
+        "source-map": "~0.7.2",
+        "source-map-support": "~0.5.19"
+      },
+      "dependencies": {
+        "commander": {
+          "version": "2.20.3",
+          "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+          "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="
+        },
+        "source-map": {
+          "version": "0.7.3",
+          "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
+          "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ=="
+        }
+      }
+    },
     "through2": {
       "version": "2.0.5",
       "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz",
@@ -2042,6 +5513,16 @@
         "repeat-string": "^1.6.1"
       }
     },
+    "try-to-catch": {
+      "version": "3.0.0",
+      "resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-3.0.0.tgz",
+      "integrity": "sha512-eIm6ZXwR35jVF8By/HdbbkcaCDTBI5PpCPkejRKrYp0jyf/DbCCcRhHD7/O9jtFI3ewsqo9WctFEiJTS6i+CQA=="
+    },
+    "tslib": {
+      "version": "2.1.0",
+      "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
+      "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
+    },
     "union-value": {
       "version": "1.0.1",
       "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz",
@@ -2118,6 +5599,76 @@
         "spdx-expression-parse": "^3.0.0"
       }
     },
+    "verbalize": {
+      "version": "0.1.2",
+      "resolved": "https://registry.npmjs.org/verbalize/-/verbalize-0.1.2.tgz",
+      "integrity": "sha1-Fl/aRkAzFUj46ZCx1+FDletyAgc=",
+      "dev": true,
+      "requires": {
+        "chalk": "~0.4.0"
+      },
+      "dependencies": {
+        "ansi-styles": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-1.0.0.tgz",
+          "integrity": "sha1-yxAt8cVvUSPquLZ817mAJ6AnkXg=",
+          "dev": true
+        },
+        "chalk": {
+          "version": "0.4.0",
+          "resolved": "https://registry.npmjs.org/chalk/-/chalk-0.4.0.tgz",
+          "integrity": "sha1-UZmj3c0MHv4jvAjBsCewYXbgxk8=",
+          "dev": true,
+          "requires": {
+            "ansi-styles": "~1.0.0",
+            "has-color": "~0.1.0",
+            "strip-ansi": "~0.1.0"
+          }
+        },
+        "strip-ansi": {
+          "version": "0.1.1",
+          "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz",
+          "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=",
+          "dev": true
+        }
+      }
+    },
+    "watch-cli": {
+      "version": "0.2.3",
+      "resolved": "https://registry.npmjs.org/watch-cli/-/watch-cli-0.2.3.tgz",
+      "integrity": "sha512-+g6n5J+jimY8hxcoHQaePPNnjmRux0nCN9BztkChx9mOas61rou3nXxTireuOMSPz7sIM7/vk6vG1f85h6Ob2A==",
+      "dev": true,
+      "requires": {
+        "gaze": "^0.5.1",
+        "lodash": "^3.5.0",
+        "minimist": "^1.1.1",
+        "supports-color": "^4.0.0",
+        "verbalize": "^0.1.2"
+      },
+      "dependencies": {
+        "has-flag": {
+          "version": "2.0.0",
+          "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz",
+          "integrity": "sha1-6CB68cx7MNRGzHC3NLXovhj4jVE=",
+          "dev": true
+        },
+        "lodash": {
+          "version": "3.10.1",
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-3.10.1.tgz",
+          "integrity": "sha1-W/Rejkm6QYnhfUgnid/RW9FAt7Y=",
+          "dev": true
+        },
+        "supports-color": {
+          "version": "4.5.0",
+          "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.5.0.tgz",
+          "integrity": "sha1-vnoN5ITexcXN34s9WRJQRJEvY1s=",
+          "dev": true,
+          "requires": {
+            "has-flag": "^2.0.0"
+          }
+        }
+      }
+    },
     "which": {
       "version": "1.3.1",
       "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
diff --git a/package.json b/package.json
index 5112b2b82b0460a3269d11f200f015aa974fb8cd..ffcfe872cb6692bc43b818949d898fdd21face4e 100644
--- a/package.json
+++ b/package.json
@@ -51,18 +51,24 @@
     "@babel/core": "^7.10.2",
     "babel-plugin-transform-commonjs": "^1.1.6",
     "copyfiles": "^2.3.0",
+    "minify": "^7.0.0",
     "npm-run-all": "^4.1.5",
     "sass": "^1.32.5"
   },
+  "devDependencies": {
+    "watch-cli": "^0.2.3"
+  },
   "scripts": {
-    "build": "run-p copy:* build:*",
+    "build": "run-p copy:* && run-p build:*",
     "build:css": "node build-scss.js",
+    "build:conversejs": "minify src/conversejs/converse.js > dist/conversejs/converse.min.js",
     "build:js": "babel \"src/*.js\" --out-dir dist/",
     "build:plugins": "babel \"src/plugins/*.js\" --out-dir dist/plugins/",
     "copy:image": "copyfiles -u 2 src/assets/* dist/assets && copyfiles -u 2 src/assets/**/* dist/assets",
     "copy:conversejs": "copyfiles -u 2 src/conversejs/* dist/conversejs && copyfiles -u 2 src/conversejs/**/**/* dist/conversejs && copyfiles -u 2 src/conversejs/**/* dist/conversejs",
     "watch": "run-p copy:* watch:*",
     "watch:css": "npm run build:css && npm run build:css -- -w",
+    "watch:conversejs": "watch -p src/conversejs/converse.js -c 'npm run build:conversejs'",
     "watch:js": "babel --watch \"src/*.js\" --out-dir dist/",
     "watch:plugins": "babel --watch \"src/plugins/*.js\" --out-dir dist/plugins/"
   }
diff --git a/src/conversejs/converse.js b/src/conversejs/converse.js
index 8713ea8043a18271921f4b8b281b0b47124fe823..6d11120e1e84b7cfbe7878a17c94a765dcda6c6b 100644
--- a/src/conversejs/converse.js
+++ b/src/conversejs/converse.js
@@ -81353,7 +81353,7 @@ const ChatRoomMixin = {
   getAllKnownNicknamesRegex() {
     const longNickString = this.getAllKnownNicknames().join('|');
     const escapedLongNickString = parse_helpers.escapeRegexString(longNickString);
-    return RegExp("(?:\\p{P}|\\p{Z}|^)@(".concat(escapedLongNickString, ")(?![\\w@-])"), 'uig');
+    return RegExp("(?:\\p{P}|\\p{Z}|^)@(".concat(escapedLongNickString, ")(?![\\w@-])"), 'uigm');
   },
 
   getOccupantByJID(jid) {
@@ -81374,7 +81374,7 @@ const ChatRoomMixin = {
    * @param { String } text
    */
   parseTextForReferences(text) {
-    const mentions_regex = /(\p{P}|\p{Z}|^)([@][\w_-]+(?:\.\w+)*)/giu;
+    const mentions_regex = /(\p{P}|\p{Z}|^)([@][\w_-]+(?:\.\w+)*)/gium;
 
     if (!text || !mentions_regex.test(text)) {
       return [text, []];
diff --git a/src/conversejs/converse.min.js b/src/conversejs/converse.min.js
deleted file mode 100644
index 235c984d15e8054c8c4bb25b07cda4141e428e16..0000000000000000000000000000000000000000
--- a/src/conversejs/converse.min.js
+++ /dev/null
@@ -1,592 +0,0 @@
-!function(e){function t(t){for(var n,i,o=t[0],s=t[1],a=0,l=[];a<o.length;a++)i=o[a],Object.prototype.hasOwnProperty.call(r,i)&&r[i]&&l.push(r[i][0]),r[i]=0;for(n in s)Object.prototype.hasOwnProperty.call(s,n)&&(e[n]=s[n]);for(c&&c(t);l.length;)l.shift()()}var n={},r={178:0};function i(t){if(n[t])return n[t].exports;var r=n[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(e){var t=[],n=r[e];if(0!==n)if(n)t.push(n[2]);else{var o=new Promise((function(t,i){n=r[e]=[t,i]}));t.push(n[2]=o);var s,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+""+({0:"locales/dayjs/af",1:"locales/dayjs/ar",2:"locales/dayjs/ar-dz",3:"locales/dayjs/ar-kw",4:"locales/dayjs/ar-ly",5:"locales/dayjs/ar-ma",6:"locales/dayjs/ar-sa",7:"locales/dayjs/ar-tn",8:"locales/dayjs/az",9:"locales/dayjs/be",10:"locales/dayjs/bg",11:"locales/dayjs/bi",12:"locales/dayjs/bm",13:"locales/dayjs/bn",14:"locales/dayjs/bo",15:"locales/dayjs/br",16:"locales/dayjs/bs",17:"locales/dayjs/ca",18:"locales/dayjs/cs",19:"locales/dayjs/cv",20:"locales/dayjs/cy",21:"locales/dayjs/da",22:"locales/dayjs/de",23:"locales/dayjs/de-at",24:"locales/dayjs/de-ch",25:"locales/dayjs/dv",26:"locales/dayjs/el",27:"locales/dayjs/en",28:"locales/dayjs/en-SG",29:"locales/dayjs/en-au",30:"locales/dayjs/en-ca",31:"locales/dayjs/en-gb",32:"locales/dayjs/en-ie",33:"locales/dayjs/en-il",34:"locales/dayjs/en-in",35:"locales/dayjs/en-nz",36:"locales/dayjs/en-tt",37:"locales/dayjs/eo",38:"locales/dayjs/es",39:"locales/dayjs/es-do",40:"locales/dayjs/es-pr",41:"locales/dayjs/es-us",42:"locales/dayjs/et",43:"locales/dayjs/eu",44:"locales/dayjs/fa",45:"locales/dayjs/fi",46:"locales/dayjs/fo",47:"locales/dayjs/fr",48:"locales/dayjs/fr-ca",49:"locales/dayjs/fr-ch",50:"locales/dayjs/fy",51:"locales/dayjs/ga",52:"locales/dayjs/gd",53:"locales/dayjs/gl",54:"locales/dayjs/gom-latn",55:"locales/dayjs/gu",56:"locales/dayjs/he",57:"locales/dayjs/hi",58:"locales/dayjs/hr",59:"locales/dayjs/ht",60:"locales/dayjs/hu",61:"locales/dayjs/hy-am",62:"locales/dayjs/id",63:"locales/dayjs/is",64:"locales/dayjs/it",65:"locales/dayjs/it-ch",66:"locales/dayjs/ja",67:"locales/dayjs/jv",68:"locales/dayjs/ka",69:"locales/dayjs/kk",70:"locales/dayjs/km",71:"locales/dayjs/kn",72:"locales/dayjs/ko",73:"locales/dayjs/ku",74:"locales/dayjs/ky",75:"locales/dayjs/lb",76:"locales/dayjs/lo",77:"locales/dayjs/lt",78:"locales/dayjs/lv",79:"locales/dayjs/me",80:"locales/dayjs/mi",81:"locales/dayjs/mk",82:"locales/dayjs/ml",83:"locales/dayjs/mn",84:"locales/dayjs/mr",85:"locales/dayjs/ms",86:"locales/dayjs/ms-my",87:"locales/dayjs/mt",88:"locales/dayjs/my",89:"locales/dayjs/nb",90:"locales/dayjs/ne",91:"locales/dayjs/nl",92:"locales/dayjs/nl-be",93:"locales/dayjs/nn",94:"locales/dayjs/oc-lnc",95:"locales/dayjs/pa-in",96:"locales/dayjs/pl",97:"locales/dayjs/pt",98:"locales/dayjs/pt-br",99:"locales/dayjs/ro",100:"locales/dayjs/ru",101:"locales/dayjs/rw",102:"locales/dayjs/sd",103:"locales/dayjs/se",104:"locales/dayjs/si",105:"locales/dayjs/sk",106:"locales/dayjs/sl",107:"locales/dayjs/sq",108:"locales/dayjs/sr",109:"locales/dayjs/sr-cyrl",110:"locales/dayjs/ss",111:"locales/dayjs/sv",112:"locales/dayjs/sw",113:"locales/dayjs/ta",114:"locales/dayjs/te",115:"locales/dayjs/tet",116:"locales/dayjs/tg",117:"locales/dayjs/th",118:"locales/dayjs/tk",119:"locales/dayjs/tl-ph",120:"locales/dayjs/tlh",121:"locales/dayjs/tr",122:"locales/dayjs/tzl",123:"locales/dayjs/tzm",124:"locales/dayjs/tzm-latn",125:"locales/dayjs/ug-cn",126:"locales/dayjs/uk",127:"locales/dayjs/ur",128:"locales/dayjs/uz",129:"locales/dayjs/uz-latn",130:"locales/dayjs/vi",131:"locales/dayjs/x-pseudo",132:"locales/dayjs/yo",133:"locales/dayjs/zh",134:"locales/dayjs/zh-cn",135:"locales/dayjs/zh-hk",136:"locales/dayjs/zh-tw",137:"emojis",138:"icons",139:"locales/af-LC_MESSAGES-converse-po",140:"locales/ar-LC_MESSAGES-converse-po",141:"locales/bg-LC_MESSAGES-converse-po",142:"locales/ca-LC_MESSAGES-converse-po",143:"locales/cs-LC_MESSAGES-converse-po",144:"locales/da-LC_MESSAGES-converse-po",145:"locales/dayjs/index-d-ts",146:"locales/dayjs/types-d-ts",147:"locales/de-LC_MESSAGES-converse-po",148:"locales/eo-LC_MESSAGES-converse-po",149:"locales/es-LC_MESSAGES-converse-po",150:"locales/eu-LC_MESSAGES-converse-po",151:"locales/fi-LC_MESSAGES-converse-po",152:"locales/fr-LC_MESSAGES-converse-po",153:"locales/gl-LC_MESSAGES-converse-po",154:"locales/he-LC_MESSAGES-converse-po",155:"locales/hi-LC_MESSAGES-converse-po",156:"locales/hu-LC_MESSAGES-converse-po",157:"locales/id-LC_MESSAGES-converse-po",158:"locales/it-LC_MESSAGES-converse-po",159:"locales/ja-LC_MESSAGES-converse-po",160:"locales/lt-LC_MESSAGES-converse-po",161:"locales/mr-LC_MESSAGES-converse-po",162:"locales/nb-LC_MESSAGES-converse-po",163:"locales/nl-LC_MESSAGES-converse-po",164:"locales/nl_BE-LC_MESSAGES-converse-po",165:"locales/oc-LC_MESSAGES-converse-po",166:"locales/pl-LC_MESSAGES-converse-po",167:"locales/pt-LC_MESSAGES-converse-po",168:"locales/pt_BR-LC_MESSAGES-converse-po",169:"locales/ro-LC_MESSAGES-converse-po",170:"locales/ru-LC_MESSAGES-converse-po",171:"locales/sv-LC_MESSAGES-converse-po",172:"locales/th-LC_MESSAGES-converse-po",173:"locales/tr-LC_MESSAGES-converse-po",174:"locales/uk-LC_MESSAGES-converse-po",175:"locales/vi-LC_MESSAGES-converse-po",176:"locales/zh_CN-LC_MESSAGES-converse-po",177:"locales/zh_TW-LC_MESSAGES-converse-po"}[e]||e)+".js"}(e);var c=new Error;s=function(t){a.onerror=a.onload=null,clearTimeout(l);var n=r[e];if(0!==n){if(n){var i=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;c.message="Loading chunk "+e+" failed.\n("+i+": "+o+")",c.name="ChunkLoadError",c.type=i,c.request=o,n[1](c)}r[e]=void 0}};var l=setTimeout((function(){s({type:"timeout",target:a})}),12e4);a.onerror=a.onload=s,document.head.appendChild(a)}return Promise.all(t)},i.m=e,i.c=n,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)i.d(n,r,function(t){return e[t]}.bind(null,r));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="/dist/",i.oe=function(e){throw console.error(e),e};var o=window.webpackJsonp=window.webpackJsonp||[],s=o.push.bind(o);o.push=t,o=o.slice();for(var a=0;a<o.length;a++)t(o[a]);var c=s;i(i.s=326)}([function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"c",(function(){return _})),n.d(t,"b",(function(){return b})),n.d(t,"d",(function(){return y})),n.d(t,"e",(function(){return w}));var r=n(15);const i=function(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},o=function(e){if("string"!=typeof e)throw new Error("str2binl was passed a non-string");const t=[];for(let n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<n%32;return t},s=function(e,t,n,r,o,s){return i((a=i(i(t,e),i(r,s)))<<(c=o)|a>>>32-c,n);var a,c},a=function(e,t,n,r,i,o,a){return s(t&n|~t&r,e,t,i,o,a)},c=function(e,t,n,r,i,o,a){return s(t&r|n&~r,e,t,i,o,a)},l=function(e,t,n,r,i,o,a){return s(t^n^r,e,t,i,o,a)},u=function(e,t,n,r,i,o,a){return s(n^(t|~r),e,t,i,o,a)},d=function(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let n,r,o,s,d=1732584193,h=-271733879,f=-1732584194,p=271733878;for(let t=0;t<e.length;t+=16)n=d,r=h,o=f,s=p,d=a(d,h,f,p,e[t+0],7,-680876936),p=a(p,d,h,f,e[t+1],12,-389564586),f=a(f,p,d,h,e[t+2],17,606105819),h=a(h,f,p,d,e[t+3],22,-1044525330),d=a(d,h,f,p,e[t+4],7,-176418897),p=a(p,d,h,f,e[t+5],12,1200080426),f=a(f,p,d,h,e[t+6],17,-1473231341),h=a(h,f,p,d,e[t+7],22,-45705983),d=a(d,h,f,p,e[t+8],7,1770035416),p=a(p,d,h,f,e[t+9],12,-1958414417),f=a(f,p,d,h,e[t+10],17,-42063),h=a(h,f,p,d,e[t+11],22,-1990404162),d=a(d,h,f,p,e[t+12],7,1804603682),p=a(p,d,h,f,e[t+13],12,-40341101),f=a(f,p,d,h,e[t+14],17,-1502002290),h=a(h,f,p,d,e[t+15],22,1236535329),d=c(d,h,f,p,e[t+1],5,-165796510),p=c(p,d,h,f,e[t+6],9,-1069501632),f=c(f,p,d,h,e[t+11],14,643717713),h=c(h,f,p,d,e[t+0],20,-373897302),d=c(d,h,f,p,e[t+5],5,-701558691),p=c(p,d,h,f,e[t+10],9,38016083),f=c(f,p,d,h,e[t+15],14,-660478335),h=c(h,f,p,d,e[t+4],20,-405537848),d=c(d,h,f,p,e[t+9],5,568446438),p=c(p,d,h,f,e[t+14],9,-1019803690),f=c(f,p,d,h,e[t+3],14,-187363961),h=c(h,f,p,d,e[t+8],20,1163531501),d=c(d,h,f,p,e[t+13],5,-1444681467),p=c(p,d,h,f,e[t+2],9,-51403784),f=c(f,p,d,h,e[t+7],14,1735328473),h=c(h,f,p,d,e[t+12],20,-1926607734),d=l(d,h,f,p,e[t+5],4,-378558),p=l(p,d,h,f,e[t+8],11,-2022574463),f=l(f,p,d,h,e[t+11],16,1839030562),h=l(h,f,p,d,e[t+14],23,-35309556),d=l(d,h,f,p,e[t+1],4,-1530992060),p=l(p,d,h,f,e[t+4],11,1272893353),f=l(f,p,d,h,e[t+7],16,-155497632),h=l(h,f,p,d,e[t+10],23,-1094730640),d=l(d,h,f,p,e[t+13],4,681279174),p=l(p,d,h,f,e[t+0],11,-358537222),f=l(f,p,d,h,e[t+3],16,-722521979),h=l(h,f,p,d,e[t+6],23,76029189),d=l(d,h,f,p,e[t+9],4,-640364487),p=l(p,d,h,f,e[t+12],11,-421815835),f=l(f,p,d,h,e[t+15],16,530742520),h=l(h,f,p,d,e[t+2],23,-995338651),d=u(d,h,f,p,e[t+0],6,-198630844),p=u(p,d,h,f,e[t+7],10,1126891415),f=u(f,p,d,h,e[t+14],15,-1416354905),h=u(h,f,p,d,e[t+5],21,-57434055),d=u(d,h,f,p,e[t+12],6,1700485571),p=u(p,d,h,f,e[t+3],10,-1894986606),f=u(f,p,d,h,e[t+10],15,-1051523),h=u(h,f,p,d,e[t+1],21,-2054922799),d=u(d,h,f,p,e[t+8],6,1873313359),p=u(p,d,h,f,e[t+15],10,-30611744),f=u(f,p,d,h,e[t+6],15,-1560198380),h=u(h,f,p,d,e[t+13],21,1309151649),d=u(d,h,f,p,e[t+4],6,-145523070),p=u(p,d,h,f,e[t+11],10,-1120210379),f=u(f,p,d,h,e[t+2],15,718787259),h=u(h,f,p,d,e[t+9],21,-343485551),d=i(d,n),h=i(h,r),f=i(f,o),p=i(p,s);return[d,h,f,p]},h={hexdigest:function(e){return function(e){let t="";for(let n=0;n<4*e.length;n++)t+="0123456789abcdef".charAt(e[n>>2]>>n%4*8+4&15)+"0123456789abcdef".charAt(e[n>>2]>>n%4*8&15);return t}(d(o(e),8*e.length))},hash:function(e){return function(e){let t="";for(let n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>n%32&255);return t}(d(o(e),8*e.length))}};var f=n(7);const p=function(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)(n=e.charCodeAt(t))>=0&&n<=127?r+=e.charAt(t):n>2047?(r+=String.fromCharCode(224|n>>12&15),r+=String.fromCharCode(128|n>>6&63),r+=String.fromCharCode(128|n>>0&63)):(r+=String.fromCharCode(192|n>>6&31),r+=String.fromCharCode(128|n>>0&63));return r},g=function(e){e=e||{};for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n="",r="",i="";const o=e[t],s="object"==typeof o,a=escape(unescape(s?o.value:o));s&&(n=o.expires?";expires="+o.expires:"",r=o.domain?";domain="+o.domain:"",i=o.path?";path="+o.path:""),document.cookie=t+"="+a+n+r+i}};var m=n(10);function v(e,t){return new w.Builder(e,t)}function _(e){return new w.Builder("message",e)}function b(e){return new w.Builder("iq",e)}function y(e){return new w.Builder("presence",e)}const w={VERSION:"1.3.6",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",FRAMING:"urn:ietf:params:xml:ns:xmpp-framing",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag(e){for(let t=0;t<w.XHTML.tags.length;t++)if(e===w.XHTML.tags[t])return!0;return!1},validAttribute(e,t){if(void 0!==w.XHTML.attributes[e]&&w.XHTML.attributes[e].length>0)for(let n=0;n<w.XHTML.attributes[e].length;n++)if(t===w.XHTML.attributes[e][n])return!0;return!1},validCSS(e){for(let t=0;t<w.XHTML.css.length;t++)if(e===w.XHTML.css[t])return!0;return!1}},Status:{ERROR:0,CONNECTING:1,CONNFAIL:2,AUTHENTICATING:3,AUTHFAIL:4,CONNECTED:5,DISCONNECTED:6,DISCONNECTING:7,ATTACHED:8,REDIRECT:9,CONNTIMEOUT:10,BINDREQUIRED:11,ATTACHFAIL:12},ErrorCondition:{BAD_FORMAT:"bad-format",CONFLICT:"conflict",MISSING_JID_NODE:"x-strophe-bad-non-anon-jid",NO_AUTH_MECH:"no-auth-mech",UNKNOWN_REASON:"unknown"},LogLevel:{DEBUG:0,INFO:1,WARN:2,ERROR:3,FATAL:4},ElementType:{NORMAL:1,TEXT:3,CDATA:4,FRAGMENT:11},TIMEOUT:1.1,SECONDARY_TIMEOUT:.1,addNamespace(e,t){w.NS[e]=t},forEachChild(e,t,n){for(let r=0;r<e.childNodes.length;r++){const i=e.childNodes[r];i.nodeType!==w.ElementType.NORMAL||t&&!this.isTagEqual(i,t)||n(i)}},isTagEqual:(e,t)=>e.tagName===t,_xmlGenerator:null,xmlGenerator:()=>(w._xmlGenerator||(w._xmlGenerator=r.b()),w._xmlGenerator),xmlElement(e){if(!e)return null;const t=w.xmlGenerator().createElement(e);for(let e=1;e<arguments.length;e++){const n=arguments[e];if(n)if("string"==typeof n||"number"==typeof n)t.appendChild(w.xmlTextNode(n));else if("object"==typeof n&&"function"==typeof n.sort)for(let e=0;e<n.length;e++){const r=n[e];"object"==typeof r&&"function"==typeof r.sort&&void 0!==r[1]&&null!==r[1]&&t.setAttribute(r[0],r[1])}else if("object"==typeof n)for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&void 0!==n[e]&&null!==n[e]&&t.setAttribute(e,n[e])}return t},xmlescape:e=>e=(e=(e=(e=(e=e.replace(/\&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/'/g,"&apos;")).replace(/"/g,"&quot;"),xmlunescape:e=>e=(e=(e=(e=(e=e.replace(/\&amp;/g,"&")).replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&apos;/g,"'")).replace(/&quot;/g,'"'),xmlTextNode:e=>w.xmlGenerator().createTextNode(e),xmlHtmlNode(e){let t;if(r.a){t=(new r.a).parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},getText(e){if(!e)return null;let t="";0===e.childNodes.length&&e.nodeType===w.ElementType.TEXT&&(t+=e.nodeValue);for(let n=0;n<e.childNodes.length;n++)e.childNodes[n].nodeType===w.ElementType.TEXT&&(t+=e.childNodes[n].nodeValue);return w.xmlescape(t)},copyElement(e){let t;if(e.nodeType===w.ElementType.NORMAL){t=w.xmlElement(e.tagName);for(let n=0;n<e.attributes.length;n++)t.setAttribute(e.attributes[n].nodeName,e.attributes[n].value);for(let n=0;n<e.childNodes.length;n++)t.appendChild(w.copyElement(e.childNodes[n]))}else e.nodeType===w.ElementType.TEXT&&(t=w.xmlGenerator().createTextNode(e.nodeValue));return t},createHtml(e){let t;if(e.nodeType===w.ElementType.NORMAL){const n=e.nodeName.toLowerCase();if(w.XHTML.validTag(n))try{t=w.xmlElement(n);for(let r=0;r<w.XHTML.attributes[n].length;r++){const i=w.XHTML.attributes[n][r];let o=e.getAttribute(i);if(null!=o&&""!==o&&!1!==o&&0!==o)if("style"===i&&"object"==typeof o&&void 0!==o.cssText&&(o=o.cssText),"style"===i){const e=[],n=o.split(";");for(let t=0;t<n.length;t++){const r=n[t].split(":"),i=r[0].replace(/^\s*/,"").replace(/\s*$/,"").toLowerCase();if(w.XHTML.validCSS(i)){const t=r[1].replace(/^\s*/,"").replace(/\s*$/,"");e.push(i+": "+t)}}e.length>0&&(o=e.join("; "),t.setAttribute(i,o))}else t.setAttribute(i,o)}for(let n=0;n<e.childNodes.length;n++)t.appendChild(w.createHtml(e.childNodes[n]))}catch(e){t=w.xmlTextNode("")}else{t=w.xmlGenerator().createDocumentFragment();for(let n=0;n<e.childNodes.length;n++)t.appendChild(w.createHtml(e.childNodes[n]))}}else if(e.nodeType===w.ElementType.FRAGMENT){t=w.xmlGenerator().createDocumentFragment();for(let n=0;n<e.childNodes.length;n++)t.appendChild(w.createHtml(e.childNodes[n]))}else e.nodeType===w.ElementType.TEXT&&(t=w.xmlTextNode(e.nodeValue));return t},escapeNode:e=>"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/\"/g,"\\22").replace(/\&/g,"\\26").replace(/\'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(/</g,"\\3c").replace(/>/g,"\\3e").replace(/@/g,"\\40"),unescapeNode:e=>"string"!=typeof e?e:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\"),getNodeFromJid:e=>e.indexOf("@")<0?null:e.split("@")[0],getDomainFromJid(e){const t=w.getBareJidFromJid(e);if(t.indexOf("@")<0)return t;{const e=t.split("@");return e.splice(0,1),e.join("@")}},getResourceFromJid(e){if(!e)return null;const t=e.split("/");return t.length<2?null:(t.splice(0,1),t.join("/"))},getBareJidFromJid:e=>e?e.split("/")[0]:null,_handleError(e){void 0!==e.stack&&w.fatal(e.stack),e.sourceURL?w.fatal("error: "+this.handler+" "+e.sourceURL+":"+e.line+" - "+e.name+": "+e.message):e.fileName?w.fatal("error: "+this.handler+" "+e.fileName+":"+e.lineNumber+" - "+e.name+": "+e.message):w.fatal("error: "+e.message)},log(e,t){e===this.LogLevel.FATAL&&"object"==typeof window.console&&"function"==typeof window.console.error&&window.console.error(t)},debug(e){this.log(this.LogLevel.DEBUG,e)},info(e){this.log(this.LogLevel.INFO,e)},warn(e){this.log(this.LogLevel.WARN,e)},error(e){this.log(this.LogLevel.ERROR,e)},fatal(e){this.log(this.LogLevel.FATAL,e)},serialize(e){if(!e)return null;"function"==typeof e.tree&&(e=e.tree());const t=[...Array(e.attributes.length).keys()].map(t=>e.attributes[t].nodeName);t.sort();let n=t.reduce((t,n)=>"".concat(t," ").concat(n,'="').concat(w.xmlescape(e.attributes.getNamedItem(n).value),'"'),"<".concat(e.nodeName));if(e.childNodes.length>0){n+=">";for(let t=0;t<e.childNodes.length;t++){const r=e.childNodes[t];switch(r.nodeType){case w.ElementType.NORMAL:n+=w.serialize(r);break;case w.ElementType.TEXT:n+=w.xmlescape(r.nodeValue);break;case w.ElementType.CDATA:n+="<![CDATA["+r.nodeValue+"]]>"}}n+="</"+e.nodeName+">"}else n+="/>";return n},_requestId:0,_connectionPlugins:{},addConnectionPlugin(e,t){w._connectionPlugins[e]=t},Builder:class{constructor(e,t){"presence"!==e&&"message"!==e&&"iq"!==e||(t&&!t.xmlns?t.xmlns=w.NS.CLIENT:t||(t={xmlns:w.NS.CLIENT})),this.nodeTree=w.xmlElement(e,t),this.node=this.nodeTree}tree(){return this.nodeTree}toString(){return w.serialize(this.nodeTree)}up(){return this.node=this.node.parentNode,this}root(){return this.node=this.nodeTree,this}attrs(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(void 0===e[t]?this.node.removeAttribute(t):this.node.setAttribute(t,e[t]));return this}c(e,t,n){const r=w.xmlElement(e,t,n);return this.node.appendChild(r),"string"!=typeof n&&"number"!=typeof n&&(this.node=r),this}cnode(e){let t;const n=w.xmlGenerator();try{t=void 0!==n.importNode}catch(e){t=!1}const r=t?n.importNode(e,!0):w.copyElement(e);return this.node.appendChild(r),this.node=r,this}t(e){const t=w.xmlTextNode(e);return this.node.appendChild(t),this}h(e){const t=w.xmlGenerator().createElement("body");t.innerHTML=e;const n=w.createHtml(t);for(;n.childNodes.length>0;)this.node.appendChild(n.childNodes[0]);return this}},Handler:function(e,t,n,r,i,o,s){this.handler=e,this.ns=t,this.name=n,this.type=r,this.id=i,this.options=s||{matchBareFromJid:!1,ignoreNamespaceFragment:!1},this.options.matchBare&&(w.warn('The "matchBare" option is deprecated, use "matchBareFromJid" instead.'),this.options.matchBareFromJid=this.options.matchBare,delete this.options.matchBare),this.options.matchBareFromJid?this.from=o?w.getBareJidFromJid(o):null:this.from=o,this.user=!0}};w.Handler.prototype={getNamespace(e){let t=e.getAttribute("xmlns");return t&&this.options.ignoreNamespaceFragment&&(t=t.split("#")[0]),t},namespaceMatch(e){let t=!1;return!this.ns||(w.forEachChild(e,null,e=>{this.getNamespace(e)===this.ns&&(t=!0)}),t||this.getNamespace(e)===this.ns)},isMatch(e){let t=e.getAttribute("from");this.options.matchBareFromJid&&(t=w.getBareJidFromJid(t));const n=e.getAttribute("type");return!(!this.namespaceMatch(e)||this.name&&!w.isTagEqual(e,this.name)||this.type&&(Array.isArray(this.type)?-1===this.type.indexOf(n):n!==this.type)||this.id&&e.getAttribute("id")!==this.id||this.from&&t!==this.from)},run(e){let t=null;try{t=this.handler(e)}catch(e){throw w._handleError(e),e}return t},toString(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},w.TimedHandler=class{constructor(e,t){this.period=e,this.handler=t,this.lastCalled=(new Date).getTime(),this.user=!0}run(){return this.lastCalled=(new Date).getTime(),this.handler()}reset(){this.lastCalled=(new Date).getTime()}toString(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},w.Connection=class{constructor(e,t){this.service=e,this.options=t||{};const n=this.options.protocol||"";this.options.worker?this._proto=new w.WorkerWebsocket(this):0===e.indexOf("ws:")||0===e.indexOf("wss:")||0===n.indexOf("ws")?this._proto=new w.Websocket(this):this._proto=new w.Bosh(this),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_bind=!1,this.do_session=!1,this.mechanisms={},this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.protocolErrorHandlers={HTTP:{},websocket:{}},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(()=>this._onIdle(),100),g(this.options.cookies),this.registerSASLMechanisms(this.options.mechanisms);for(const e in w._connectionPlugins)if(Object.prototype.hasOwnProperty.call(w._connectionPlugins,e)){const t=function(){};t.prototype=w._connectionPlugins[e],this[e]=new t,this[e].init(this)}}reset(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0}pause(){this.paused=!0}resume(){this.paused=!1}getUniqueId(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}));return"string"==typeof e||"number"==typeof e?t+":"+e:t+""}addProtocolErrorHandler(e,t,n){this.protocolErrorHandlers[e][t]=n}connect(e,t,n,r,i,o,s){this.jid=e,this.authzid=w.getBareJidFromJid(this.jid),this.authcid=s||w.getNodeFromJid(this.jid),this.pass=t,this.connect_callback=n,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=w.getDomainFromJid(this.jid),this._changeConnectStatus(w.Status.CONNECTING,null),this._proto._connect(r,i,o)}attach(e,t,n,r,i,o,s){if(this._proto._attach)return this._proto._attach(e,t,n,r,i,o,s);{const e=new Error('The "attach" method is not available for your connection protocol');throw e.name="StropheSessionError",e}}restore(e,t,n,r,i){if(!this._sessionCachingSupported()){const e=new Error('The "restore" method can only be used with a BOSH connection.');throw e.name="StropheSessionError",e}this._proto._restore(e,t,n,r,i)}_sessionCachingSupported(){if(this._proto instanceof w.Bosh){if(!JSON)return!1;try{sessionStorage.setItem("_strophe_","_strophe_"),sessionStorage.removeItem("_strophe_")}catch(e){return!1}return!0}return!1}xmlInput(e){}xmlOutput(e){}rawInput(e){}rawOutput(e){}nextValidRid(e){}send(e){if(null!==e){if("function"==typeof e.sort)for(let t=0;t<e.length;t++)this._queueData(e[t]);else"function"==typeof e.tree?this._queueData(e.tree()):this._queueData(e);this._proto._send()}}flush(){clearTimeout(this._idleTimeout),this._onIdle()}sendPresence(e,t,n,r){let i=null;"function"==typeof e.tree&&(e=e.tree());let o=e.getAttribute("id");if(o||(o=this.getUniqueId("sendPresence"),e.setAttribute("id",o)),"function"==typeof t||"function"==typeof n){const e=this.addHandler(e=>{i&&this.deleteTimedHandler(i),"error"===e.getAttribute("type")?n&&n(e):t&&t(e)},null,"presence",null,o);r&&(i=this.addTimedHandler(r,()=>(this.deleteHandler(e),n&&n(null),!1)))}return this.send(e),o}sendIQ(e,t,n,r){let i=null;"function"==typeof e.tree&&(e=e.tree());let o=e.getAttribute("id");if(o||(o=this.getUniqueId("sendIQ"),e.setAttribute("id",o)),"function"==typeof t||"function"==typeof n){const e=this.addHandler(e=>{i&&this.deleteTimedHandler(i);const r=e.getAttribute("type");if("result"===r)t&&t(e);else{if("error"!==r){const e=new Error("Got bad IQ type of ".concat(r));throw e.name="StropheError",e}n&&n(e)}},null,"iq",["error","result"],o);r&&(i=this.addTimedHandler(r,()=>(this.deleteHandler(e),n&&n(null),!1)))}return this.send(e),o}_queueData(e){if(null===e||!e.tagName||!e.childNodes){const e=new Error("Cannot queue non-DOMElement.");throw e.name="StropheError",e}this._data.push(e)}_sendRestart(){this._data.push("restart"),this._proto._sendRestart(),this._idleTimeout=setTimeout(()=>this._onIdle(),100)}addTimedHandler(e,t){const n=new w.TimedHandler(e,t);return this.addTimeds.push(n),n}deleteTimedHandler(e){this.removeTimeds.push(e)}addHandler(e,t,n,r,i,o,s){const a=new w.Handler(e,t,n,r,i,o,s);return this.addHandlers.push(a),a}deleteHandler(e){this.removeHandlers.push(e);const t=this.addHandlers.indexOf(e);t>=0&&this.addHandlers.splice(t,1)}registerSASLMechanisms(e){this.mechanisms={},(e=e||[w.SASLAnonymous,w.SASLExternal,w.SASLOAuthBearer,w.SASLXOAuth2,w.SASLPlain,w.SASLSHA1]).forEach(e=>this.registerSASLMechanism(e))}registerSASLMechanism(e){this.mechanisms[e.name]=e}disconnect(e){if(this._changeConnectStatus(w.Status.DISCONNECTING,e),e?w.warn("Disconnect was called because: "+e):w.info("Disconnect was called"),this.connected){let e=!1;this.disconnecting=!0,this.authenticated&&(e=y({xmlns:w.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(e)}else w.warn("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests(),this._doDisconnect()}_changeConnectStatus(e,t,n){for(const n in w._connectionPlugins)if(Object.prototype.hasOwnProperty.call(w._connectionPlugins,n)){const r=this[n];if(r.statusChanged)try{r.statusChanged(e,t)}catch(e){w.error("".concat(n," plugin caused an exception changing status: ").concat(e))}}if(this.connect_callback)try{this.connect_callback(e,t,n)}catch(e){w._handleError(e),w.error("User connection callback caused an exception: ".concat(e))}}_doDisconnect(e){"number"==typeof this._idleTimeout&&clearTimeout(this._idleTimeout),null!==this._disconnectTimeout&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),w.debug("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(w.Status.DISCONNECTED,e),this.connected=!1}_dataRecv(e,t){const n=this._proto._reqToData(e);if(null===n)return;for(this.xmlInput!==w.Connection.prototype.xmlInput&&(n.nodeName===this._proto.strip&&n.childNodes.length?this.xmlInput(n.childNodes[0]):this.xmlInput(n)),this.rawInput!==w.Connection.prototype.rawInput&&(t?this.rawInput(t):this.rawInput(w.serialize(n)));this.removeHandlers.length>0;){const e=this.removeHandlers.pop(),t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}for(;this.addHandlers.length>0;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())return void this._doDisconnect();const r=n.getAttribute("type");if(null!==r&&"terminate"===r){if(this.disconnecting)return;let e=n.getAttribute("condition");const t=n.getElementsByTagName("conflict");return null!==e?("remote-stream-error"===e&&t.length>0&&(e="conflict"),this._changeConnectStatus(w.Status.CONNFAIL,e)):this._changeConnectStatus(w.Status.CONNFAIL,w.ErrorCondition.UNKOWN_REASON),void this._doDisconnect(e)}w.forEachChild(n,null,e=>{const t=this.handlers;this.handlers=[];for(let n=0;n<t.length;n++){const r=t[n];try{(!r.isMatch(e)||!this.authenticated&&r.user||r.run(e))&&this.handlers.push(r)}catch(e){w.warn("Removing Strophe handlers due to uncaught exception: "+e.message)}}})}_connect_cb(e,t,n){let r;w.debug("_connect_cb was called"),this.connected=!0;try{r=this._proto._reqToData(e)}catch(e){if(e.name!==w.ErrorCondition.BAD_FORMAT)throw e;this._changeConnectStatus(w.Status.CONNFAIL,w.ErrorCondition.BAD_FORMAT),this._doDisconnect(w.ErrorCondition.BAD_FORMAT)}if(!r)return;if(this.xmlInput!==w.Connection.prototype.xmlInput&&(r.nodeName===this._proto.strip&&r.childNodes.length?this.xmlInput(r.childNodes[0]):this.xmlInput(r)),this.rawInput!==w.Connection.prototype.rawInput&&(n?this.rawInput(n):this.rawInput(w.serialize(r))),this._proto._connect_cb(r)===w.Status.CONNFAIL)return;let i;if(i=r.getElementsByTagNameNS?r.getElementsByTagNameNS(w.NS.STREAM,"features").length>0:r.getElementsByTagName("stream:features").length>0||r.getElementsByTagName("features").length>0,!i)return void this._proto._no_auth_received(t);const o=Array.from(r.getElementsByTagName("mechanism")).map(e=>this.mechanisms[e.textContent]).filter(e=>e);0!==o.length||0!==r.getElementsByTagName("auth").length?!1!==this.do_authentication&&this.authenticate(o):this._proto._no_auth_received(t)}sortMechanismsByPriority(e){for(let t=0;t<e.length-1;++t){let n=t;for(let r=t+1;r<e.length;++r)e[r].priority>e[n].priority&&(n=r);if(n!==t){const r=e[t];e[t]=e[n],e[n]=r}}return e}authenticate(e){this._attemptSASLAuth(e)||this._attemptLegacyAuth()}_attemptSASLAuth(e){e=this.sortMechanismsByPriority(e||[]);let t=!1;for(let n=0;n<e.length;++n){if(!e[n].test(this))continue;this._sasl_success_handler=this._addSysHandler(this._sasl_success_cb.bind(this),null,"success",null,null),this._sasl_failure_handler=this._addSysHandler(this._sasl_failure_cb.bind(this),null,"failure",null,null),this._sasl_challenge_handler=this._addSysHandler(this._sasl_challenge_cb.bind(this),null,"challenge",null,null),this._sasl_mechanism=new e[n],this._sasl_mechanism.onStart(this);const r=v("auth",{xmlns:w.NS.SASL,mechanism:this._sasl_mechanism.name});if(this._sasl_mechanism.isClientFirst){const e=this._sasl_mechanism.onChallenge(this,null);r.t(Object(m.btoa)(e))}this.send(r.tree()),t=!0;break}return t}_sasl_challenge_cb(e){const t=Object(m.atob)(w.getText(e)),n=this._sasl_mechanism.onChallenge(this,t),r=v("response",{xmlns:w.NS.SASL});return""!==n&&r.t(Object(m.btoa)(n)),this.send(r.tree()),!0}_attemptLegacyAuth(){null===w.getNodeFromJid(this.jid)?(this._changeConnectStatus(w.Status.CONNFAIL,w.ErrorCondition.MISSING_JID_NODE),this.disconnect(w.ErrorCondition.MISSING_JID_NODE)):(this._changeConnectStatus(w.Status.AUTHENTICATING,null),this._addSysHandler(this._onLegacyAuthIQResult.bind(this),null,null,null,"_auth_1"),this.send(b({type:"get",to:this.domain,id:"_auth_1"}).c("query",{xmlns:w.NS.AUTH}).c("username",{}).t(w.getNodeFromJid(this.jid)).tree()))}_onLegacyAuthIQResult(e){const t=b({type:"set",id:"_auth_2"}).c("query",{xmlns:w.NS.AUTH}).c("username",{}).t(w.getNodeFromJid(this.jid)).up().c("password").t(this.pass);return w.getResourceFromJid(this.jid)||(this.jid=w.getBareJidFromJid(this.jid)+"/strophe"),t.up().c("resource",{}).t(w.getResourceFromJid(this.jid)),this._addSysHandler(this._auth2_cb.bind(this),null,null,null,"_auth_2"),this.send(t.tree()),!1}_sasl_success_cb(e){if(this._sasl_data["server-signature"]){let t;const n=/([a-z]+)=([^,]+)(,|$)/,r=Object(m.atob)(w.getText(e)).match(n);if("v"===r[1]&&(t=r[2]),t!==this._sasl_data["server-signature"])return this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_data={},this._sasl_failure_cb(null)}w.info("SASL authentication succeeded."),this._sasl_mechanism&&this._sasl_mechanism.onSuccess(),this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null);const t=[],n=(e,t)=>{for(;e.length;)this.deleteHandler(e.pop());return this._onStreamFeaturesAfterSASL(t),!1};return t.push(this._addSysHandler(e=>n(t,e),null,"stream:features",null,null)),t.push(this._addSysHandler(e=>n(t,e),w.NS.STREAM,"features",null,null)),this._sendRestart(),!1}_onStreamFeaturesAfterSASL(e){this.features=e;for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];"bind"===n.nodeName&&(this.do_bind=!0),"session"===n.nodeName&&(this.do_session=!0)}return this.do_bind?(this.options.explicitResourceBinding?this._changeConnectStatus(w.Status.BINDREQUIRED,null):this.bind(),!1):(this._changeConnectStatus(w.Status.AUTHFAIL,null),!1)}bind(){if(!this.do_bind)return void w.log(w.LogLevel.INFO,'Strophe.Connection.prototype.bind called but "do_bind" is false');this._addSysHandler(this._onResourceBindResultIQ.bind(this),null,null,null,"_bind_auth_2");const e=w.getResourceFromJid(this.jid);e?this.send(b({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:w.NS.BIND}).c("resource",{}).t(e).tree()):this.send(b({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:w.NS.BIND}).tree())}_onResourceBindResultIQ(e){if("error"===e.getAttribute("type")){let t;return w.warn("Resource binding failed."),e.getElementsByTagName("conflict").length>0&&(t=w.ErrorCondition.CONFLICT),this._changeConnectStatus(w.Status.AUTHFAIL,t,e),!1}const t=e.getElementsByTagName("bind");if(!(t.length>0))return w.warn("Resource binding failed."),this._changeConnectStatus(w.Status.AUTHFAIL,null,e),!1;{const e=t[0].getElementsByTagName("jid");e.length>0&&(this.jid=w.getText(e[0]),this.do_session?this._establishSession():(this.authenticated=!0,this._changeConnectStatus(w.Status.CONNECTED,null)))}}_establishSession(){if(!this.do_session)throw new Error("Strophe.Connection.prototype._establishSession "+"called but apparently ".concat(w.NS.SESSION," wasn't advertised by the server"));this._addSysHandler(this._onSessionResultIQ.bind(this),null,null,null,"_session_auth_2"),this.send(b({type:"set",id:"_session_auth_2"}).c("session",{xmlns:w.NS.SESSION}).tree())}_onSessionResultIQ(e){if("result"===e.getAttribute("type"))this.authenticated=!0,this._changeConnectStatus(w.Status.CONNECTED,null);else if("error"===e.getAttribute("type"))return w.warn("Session creation failed."),this._changeConnectStatus(w.Status.AUTHFAIL,null,e),!1;return!1}_sasl_failure_cb(e){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(w.Status.AUTHFAIL,null,e),!1}_auth2_cb(e){return"result"===e.getAttribute("type")?(this.authenticated=!0,this._changeConnectStatus(w.Status.CONNECTED,null)):"error"===e.getAttribute("type")&&(this._changeConnectStatus(w.Status.AUTHFAIL,null,e),this.disconnect("authentication failed")),!1}_addSysTimedHandler(e,t){const n=new w.TimedHandler(e,t);return n.user=!1,this.addTimeds.push(n),n}_addSysHandler(e,t,n,r,i){const o=new w.Handler(e,t,n,r,i);return o.user=!1,this.addHandlers.push(o),o}_onDisconnectTimeout(){return w.debug("_onDisconnectTimeout was called"),this._changeConnectStatus(w.Status.CONNTIMEOUT,null),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1}_onIdle(){for(;this.addTimeds.length>0;)this.timedHandlers.push(this.addTimeds.pop());for(;this.removeTimeds.length>0;){const e=this.removeTimeds.pop(),t=this.timedHandlers.indexOf(e);t>=0&&this.timedHandlers.splice(t,1)}const e=(new Date).getTime(),t=[];for(let n=0;n<this.timedHandlers.length;n++){const r=this.timedHandlers[n];if(this.authenticated||!r.user){r.lastCalled+r.period-e<=0?r.run()&&t.push(r):t.push(r)}}this.timedHandlers=t,clearTimeout(this._idleTimeout),this._proto._onIdle(),this.connected&&(this._idleTimeout=setTimeout(()=>this._onIdle(),100))}},w.SASLMechanism=class{constructor(e,t,n){this.name=e,this.isClientFirst=t,this.priority=n}static test(e){return!0}onStart(e){this._connection=e}onChallenge(e,t){throw new Error("You should implement challenge handling!")}onFailure(){this._connection=null}onSuccess(){this._connection=null}},w.SASLAnonymous=class extends w.SASLMechanism{constructor(){super(w.SASLAnonymous.name,!1,w.SASLAnonymous.priority)}static get name(){return"ANONYMOUS"}static get priority(){return 20}static test(e){return null===e.authcid}},w.SASLPlain=class extends w.SASLMechanism{constructor(){super(w.SASLPlain.name,!0,w.SASLPlain.priority)}static get name(){return"PLAIN"}static get priority(){return 50}static test(e){return null!==e.authcid}onChallenge(e){const{authcid:t,authzid:n,domain:r,pass:i}=e;if(!r)throw new Error("SASLPlain onChallenge: domain is not defined!");let o=n!=="".concat(t,"@").concat(r)?n:"";return o+="\0",o+=t,o+="\0",o+=i,p(o)}},w.SASLSHA1=class extends w.SASLMechanism{constructor(){super(w.SASLSHA1.name,!0,w.SASLSHA1.priority)}static get name(){return"SCRAM-SHA-1"}static get priority(){return 60}static test(e){return null!==e.authcid}onChallenge(e,t,n){const r=n||h.hexdigest(""+1234567890*Math.random());let i="n="+p(e.authcid);return i+=",r=",i+=r,e._sasl_data.cnonce=r,e._sasl_data["client-first-message-bare"]=i,i="n,,"+i,this.onChallenge=(e,t)=>{let n,r,i,o,s,a,c,l,u="c=biws,",d="".concat(e._sasl_data["client-first-message-bare"],",").concat(t,",");const h=e._sasl_data.cnonce,g=/([a-z]+)=([^,]+)(,|$)/;for(;t.match(g);){const e=t.match(g);switch(t=t.replace(e[0],""),e[1]){case"r":n=e[2];break;case"s":r=e[2];break;case"i":i=e[2]}}if(n.substr(0,h.length)!==h)return e._sasl_data={},e._sasl_failure_cb();u+="r="+n,d+=u,r=Object(m.atob)(r),r+="\0\0\0";const v=p(e.pass);for(o=a=f.a.core_hmac_sha1(v,r),c=1;c<i;c++){for(s=f.a.core_hmac_sha1(v,f.a.binb2str(a)),l=0;l<5;l++)o[l]^=s[l];a=s}o=f.a.binb2str(o);const _=f.a.core_hmac_sha1(o,"Client Key"),b=f.a.str_hmac_sha1(o,"Server Key"),y=f.a.core_hmac_sha1(f.a.str_sha1(f.a.binb2str(_)),d);for(e._sasl_data["server-signature"]=f.a.b64_hmac_sha1(b,d),l=0;l<5;l++)_[l]^=y[l];return u+=",p="+Object(m.btoa)(f.a.binb2str(_)),u},i}},w.SASLOAuthBearer=class extends w.SASLMechanism{constructor(){super(w.SASLOAuthBearer.name,!0,w.SASLOAuthBearer.priority)}static get name(){return"OAUTHBEARER"}static get priority(){return 40}static test(e){return null!==e.pass}onChallenge(e){let t="n,";return null!==e.authcid&&(t=t+"a="+e.authzid),t+=",",t+="",t+="auth=Bearer ",t+=e.pass,t+="",t+="",p(t)}},w.SASLExternal=class extends w.SASLMechanism{constructor(){super(w.SASLExternal.name,!0,w.SASLExternal.priority)}static get name(){return"EXTERNAL"}static get priority(){return 10}onChallenge(e){return e.authcid===e.authzid?"":e.authzid}},w.SASLXOAuth2=class extends w.SASLMechanism{constructor(){super(w.SASLXOAuth2.name,!0,w.SASLXOAuth2.priority)}static get name(){return"X-OAUTH2"}static get priority(){return 30}static test(e){return null!==e.pass}onChallenge(e){let t="\0";return null!==e.authcid&&(t+=e.authzid),t+="\0",t+=e.pass,p(t)}};t.f={Strophe:w,$build:v,$iq:b,$msg:_,$pres:y,SHA1:f.a,MD5:h,b64_hmac_sha1:f.a.b64_hmac_sha1,b64_sha1:f.a.b64_sha1,str_hmac_sha1:f.a.str_hmac_sha1,str_sha1:f.a.str_sha1}},function(e,t,n){"use strict";(function(e){n(154),n(68),n(493);var r=n(0);n.d(t,"e",(function(){return r.e})),n.d(t,"a",(function(){return r.a})),n.d(t,"b",(function(){return r.b})),n.d(t,"c",(function(){return r.c})),n.d(t,"d",(function(){return r.d})),e.$build=r.f.$build,e.$iq=r.f.$iq,e.$msg=r.f.$msg,e.$pres=r.f.$pres,e.Strophe=r.f.Strophe}).call(this,n(12))},function(e,t,n){"use strict";n.d(t,"a",(function(){return C})),n.d(t,"b",(function(){return j})),n.d(t,"d",(function(){return O})),n.d(t,"c",(function(){return S}));var r=n(9);const i=function(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n},o=function(e){if("string"!=typeof e)throw new Error("str2binl was passed a non-string");const t=[];for(let n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<n%32;return t},s=function(e,t,n,r,o,s){return i((a=i(i(t,e),i(r,s)))<<(c=o)|a>>>32-c,n);var a,c},a=function(e,t,n,r,i,o,a){return s(t&n|~t&r,e,t,i,o,a)},c=function(e,t,n,r,i,o,a){return s(t&r|n&~r,e,t,i,o,a)},l=function(e,t,n,r,i,o,a){return s(t^n^r,e,t,i,o,a)},u=function(e,t,n,r,i,o,a){return s(n^(t|~r),e,t,i,o,a)},d=function(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;let n,r,o,s,d=1732584193,h=-271733879,f=-1732584194,p=271733878;for(let t=0;t<e.length;t+=16)n=d,r=h,o=f,s=p,d=a(d,h,f,p,e[t+0],7,-680876936),p=a(p,d,h,f,e[t+1],12,-389564586),f=a(f,p,d,h,e[t+2],17,606105819),h=a(h,f,p,d,e[t+3],22,-1044525330),d=a(d,h,f,p,e[t+4],7,-176418897),p=a(p,d,h,f,e[t+5],12,1200080426),f=a(f,p,d,h,e[t+6],17,-1473231341),h=a(h,f,p,d,e[t+7],22,-45705983),d=a(d,h,f,p,e[t+8],7,1770035416),p=a(p,d,h,f,e[t+9],12,-1958414417),f=a(f,p,d,h,e[t+10],17,-42063),h=a(h,f,p,d,e[t+11],22,-1990404162),d=a(d,h,f,p,e[t+12],7,1804603682),p=a(p,d,h,f,e[t+13],12,-40341101),f=a(f,p,d,h,e[t+14],17,-1502002290),h=a(h,f,p,d,e[t+15],22,1236535329),d=c(d,h,f,p,e[t+1],5,-165796510),p=c(p,d,h,f,e[t+6],9,-1069501632),f=c(f,p,d,h,e[t+11],14,643717713),h=c(h,f,p,d,e[t+0],20,-373897302),d=c(d,h,f,p,e[t+5],5,-701558691),p=c(p,d,h,f,e[t+10],9,38016083),f=c(f,p,d,h,e[t+15],14,-660478335),h=c(h,f,p,d,e[t+4],20,-405537848),d=c(d,h,f,p,e[t+9],5,568446438),p=c(p,d,h,f,e[t+14],9,-1019803690),f=c(f,p,d,h,e[t+3],14,-187363961),h=c(h,f,p,d,e[t+8],20,1163531501),d=c(d,h,f,p,e[t+13],5,-1444681467),p=c(p,d,h,f,e[t+2],9,-51403784),f=c(f,p,d,h,e[t+7],14,1735328473),h=c(h,f,p,d,e[t+12],20,-1926607734),d=l(d,h,f,p,e[t+5],4,-378558),p=l(p,d,h,f,e[t+8],11,-2022574463),f=l(f,p,d,h,e[t+11],16,1839030562),h=l(h,f,p,d,e[t+14],23,-35309556),d=l(d,h,f,p,e[t+1],4,-1530992060),p=l(p,d,h,f,e[t+4],11,1272893353),f=l(f,p,d,h,e[t+7],16,-155497632),h=l(h,f,p,d,e[t+10],23,-1094730640),d=l(d,h,f,p,e[t+13],4,681279174),p=l(p,d,h,f,e[t+0],11,-358537222),f=l(f,p,d,h,e[t+3],16,-722521979),h=l(h,f,p,d,e[t+6],23,76029189),d=l(d,h,f,p,e[t+9],4,-640364487),p=l(p,d,h,f,e[t+12],11,-421815835),f=l(f,p,d,h,e[t+15],16,530742520),h=l(h,f,p,d,e[t+2],23,-995338651),d=u(d,h,f,p,e[t+0],6,-198630844),p=u(p,d,h,f,e[t+7],10,1126891415),f=u(f,p,d,h,e[t+14],15,-1416354905),h=u(h,f,p,d,e[t+5],21,-57434055),d=u(d,h,f,p,e[t+12],6,1700485571),p=u(p,d,h,f,e[t+3],10,-1894986606),f=u(f,p,d,h,e[t+10],15,-1051523),h=u(h,f,p,d,e[t+1],21,-2054922799),d=u(d,h,f,p,e[t+8],6,1873313359),p=u(p,d,h,f,e[t+15],10,-30611744),f=u(f,p,d,h,e[t+6],15,-1560198380),h=u(h,f,p,d,e[t+13],21,1309151649),d=u(d,h,f,p,e[t+4],6,-145523070),p=u(p,d,h,f,e[t+11],10,-1120210379),f=u(f,p,d,h,e[t+2],15,718787259),h=u(h,f,p,d,e[t+9],21,-343485551),d=i(d,n),h=i(h,r),f=i(f,o),p=i(p,s);return[d,h,f,p]},h={hexdigest:function(e){return function(e){let t="";for(let n=0;n<4*e.length;n++)t+="0123456789abcdef".charAt(e[n>>2]>>n%4*8+4&15)+"0123456789abcdef".charAt(e[n>>2]>>n%4*8&15);return t}(d(o(e),8*e.length))},hash:function(e){return function(e){let t="";for(let n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>n%32&255);return t}(d(o(e),8*e.length))}};function f(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;var n,r,i,o,s,a,c,l,u=new Array(80),d=1732584193,h=-271733879,f=-1732584194,m=271733878,b=-1009589776;for(n=0;n<e.length;n+=16){for(o=d,s=h,a=f,c=m,l=b,r=0;r<80;r++)u[r]=r<16?e[n+r]:_(u[r-3]^u[r-8]^u[r-14]^u[r-16],1),i=v(v(_(d,5),p(r,h,f,m)),v(v(b,u[r]),g(r))),b=m,m=f,f=_(h,30),h=d,d=i;d=v(d,o),h=v(h,s),f=v(f,a),m=v(m,c),b=v(b,l)}return[d,h,f,m,b]}function p(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function g(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function m(e,t){var n=b(e);n.length>16&&(n=f(n,8*e.length));for(var r=new Array(16),i=new Array(16),o=0;o<16;o++)r[o]=909522486^n[o],i[o]=1549556828^n[o];var s=f(r.concat(b(t)),512+8*t.length);return f(i.concat(s),672)}function v(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function _(e,t){return e<<t|e>>>32-t}function b(e){for(var t=[],n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}function y(e){for(var t,n,r="",i=0;i<4*e.length;i+=3)for(t=(e[i>>2]>>8*(3-i%4)&255)<<16|(e[i+1>>2]>>8*(3-(i+1)%4)&255)<<8|e[i+2>>2]>>8*(3-(i+2)%4)&255,n=0;n<4;n++)8*i+6*n>32*e.length?r+="=":r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t>>6*(3-n)&63);return r}function w(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}const S={b64_hmac_sha1:function(e,t){return y(m(e,t))},b64_sha1:function(e){return y(f(b(e),8*e.length))},binb2str:w,core_hmac_sha1:m,str_hmac_sha1:function(e,t){return w(m(e,t))},str_sha1:function(e){return w(f(b(e),8*e.length))}},x=function(e){var t,n,r="",i=e.length;for(t=0;t<i;t++)(n=e.charCodeAt(t))>=0&&n<=127?r+=e.charAt(t):n>2047?(r+=String.fromCharCode(224|n>>12&15),r+=String.fromCharCode(128|n>>6&63),r+=String.fromCharCode(128|n>>0&63)):(r+=String.fromCharCode(192|n>>6&31),r+=String.fromCharCode(128|n>>0&63));return r},E=function(e){e=e||{};for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){let n="",r="",i="";const o=e[t],s="object"==typeof o,a=escape(unescape(s?o.value:o));s&&(n=o.expires?";expires="+o.expires:"",r=o.domain?";domain="+o.domain:"",i=o.path?";path="+o.path:""),document.cookie=t+"="+a+n+r+i}};var A=n(10);function C(e,t){return new O.Builder(e,t)}function j(e){return new O.Builder("iq",e)}function T(e){return new O.Builder("presence",e)}const O={VERSION:"1.4.1",NS:{HTTPBIND:"http://jabber.org/protocol/httpbind",BOSH:"urn:xmpp:xbosh",CLIENT:"jabber:client",AUTH:"jabber:iq:auth",ROSTER:"jabber:iq:roster",PROFILE:"jabber:iq:profile",DISCO_INFO:"http://jabber.org/protocol/disco#info",DISCO_ITEMS:"http://jabber.org/protocol/disco#items",MUC:"http://jabber.org/protocol/muc",SASL:"urn:ietf:params:xml:ns:xmpp-sasl",STREAM:"http://etherx.jabber.org/streams",FRAMING:"urn:ietf:params:xml:ns:xmpp-framing",BIND:"urn:ietf:params:xml:ns:xmpp-bind",SESSION:"urn:ietf:params:xml:ns:xmpp-session",VERSION:"jabber:iq:version",STANZAS:"urn:ietf:params:xml:ns:xmpp-stanzas",XHTML_IM:"http://jabber.org/protocol/xhtml-im",XHTML:"http://www.w3.org/1999/xhtml"},XHTML:{tags:["a","blockquote","br","cite","em","img","li","ol","p","span","strong","ul","body"],attributes:{a:["href"],blockquote:["style"],br:[],cite:["style"],em:[],img:["src","alt","style","height","width"],li:["style"],ol:["style"],p:["style"],span:["style"],strong:[],ul:["style"],body:[]},css:["background-color","color","font-family","font-size","font-style","font-weight","margin-left","margin-right","text-align","text-decoration"],validTag(e){for(let t=0;t<O.XHTML.tags.length;t++)if(e===O.XHTML.tags[t])return!0;return!1},validAttribute(e,t){if(void 0!==O.XHTML.attributes[e]&&O.XHTML.attributes[e].length>0)for(let n=0;n<O.XHTML.attributes[e].length;n++)if(t===O.XHTML.attributes[e][n])return!0;return!1},validCSS(e){for(let t=0;t<O.XHTML.css.length;t++)if(e===O.XHTML.css[t])return!0;return!1}},Status:{ERROR:0,CONNECTING:1,CONNFAIL:2,AUTHENTICATING:3,AUTHFAIL:4,CONNECTED:5,DISCONNECTED:6,DISCONNECTING:7,ATTACHED:8,REDIRECT:9,CONNTIMEOUT:10,BINDREQUIRED:11,ATTACHFAIL:12},ErrorCondition:{BAD_FORMAT:"bad-format",CONFLICT:"conflict",MISSING_JID_NODE:"x-strophe-bad-non-anon-jid",NO_AUTH_MECH:"no-auth-mech",UNKNOWN_REASON:"unknown"},LogLevel:{DEBUG:0,INFO:1,WARN:2,ERROR:3,FATAL:4},ElementType:{NORMAL:1,TEXT:3,CDATA:4,FRAGMENT:11},TIMEOUT:1.1,SECONDARY_TIMEOUT:.1,addNamespace(e,t){O.NS[e]=t},forEachChild(e,t,n){for(let r=0;r<e.childNodes.length;r++){const i=e.childNodes[r];i.nodeType!==O.ElementType.NORMAL||t&&!this.isTagEqual(i,t)||n(i)}},isTagEqual:(e,t)=>e.tagName===t,_xmlGenerator:null,xmlGenerator:()=>(O._xmlGenerator||(O._xmlGenerator=r.c()),O._xmlGenerator),xmlElement(e){if(!e)return null;const t=O.xmlGenerator().createElement(e);for(let e=1;e<arguments.length;e++){const n=arguments[e];if(n)if("string"==typeof n||"number"==typeof n)t.appendChild(O.xmlTextNode(n));else if("object"==typeof n&&"function"==typeof n.sort)for(let e=0;e<n.length;e++){const r=n[e];"object"==typeof r&&"function"==typeof r.sort&&void 0!==r[1]&&null!==r[1]&&t.setAttribute(r[0],r[1])}else if("object"==typeof n)for(const e in n)Object.prototype.hasOwnProperty.call(n,e)&&void 0!==n[e]&&null!==n[e]&&t.setAttribute(e,n[e])}return t},xmlescape:e=>e=(e=(e=(e=(e=e.replace(/\&/g,"&amp;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;")).replace(/'/g,"&apos;")).replace(/"/g,"&quot;"),xmlunescape:e=>e=(e=(e=(e=(e=e.replace(/\&amp;/g,"&")).replace(/&lt;/g,"<")).replace(/&gt;/g,">")).replace(/&apos;/g,"'")).replace(/&quot;/g,'"'),xmlTextNode:e=>O.xmlGenerator().createTextNode(e),xmlHtmlNode(e){let t;if(r.a){t=(new r.a).parseFromString(e,"text/xml")}else t=new ActiveXObject("Microsoft.XMLDOM"),t.async="false",t.loadXML(e);return t},getText(e){if(!e)return null;let t="";0===e.childNodes.length&&e.nodeType===O.ElementType.TEXT&&(t+=e.nodeValue);for(let n=0;n<e.childNodes.length;n++)e.childNodes[n].nodeType===O.ElementType.TEXT&&(t+=e.childNodes[n].nodeValue);return O.xmlescape(t)},copyElement(e){let t;if(e.nodeType===O.ElementType.NORMAL){t=O.xmlElement(e.tagName);for(let n=0;n<e.attributes.length;n++)t.setAttribute(e.attributes[n].nodeName,e.attributes[n].value);for(let n=0;n<e.childNodes.length;n++)t.appendChild(O.copyElement(e.childNodes[n]))}else e.nodeType===O.ElementType.TEXT&&(t=O.xmlGenerator().createTextNode(e.nodeValue));return t},createHtml(e){let t;if(e.nodeType===O.ElementType.NORMAL){const n=e.nodeName.toLowerCase();if(O.XHTML.validTag(n))try{t=O.xmlElement(n);for(let r=0;r<O.XHTML.attributes[n].length;r++){const i=O.XHTML.attributes[n][r];let o=e.getAttribute(i);if(null!=o&&""!==o&&!1!==o&&0!==o)if("style"===i&&"object"==typeof o&&void 0!==o.cssText&&(o=o.cssText),"style"===i){const e=[],n=o.split(";");for(let t=0;t<n.length;t++){const r=n[t].split(":"),i=r[0].replace(/^\s*/,"").replace(/\s*$/,"").toLowerCase();if(O.XHTML.validCSS(i)){const t=r[1].replace(/^\s*/,"").replace(/\s*$/,"");e.push(i+": "+t)}}e.length>0&&(o=e.join("; "),t.setAttribute(i,o))}else t.setAttribute(i,o)}for(let n=0;n<e.childNodes.length;n++)t.appendChild(O.createHtml(e.childNodes[n]))}catch(e){t=O.xmlTextNode("")}else{t=O.xmlGenerator().createDocumentFragment();for(let n=0;n<e.childNodes.length;n++)t.appendChild(O.createHtml(e.childNodes[n]))}}else if(e.nodeType===O.ElementType.FRAGMENT){t=O.xmlGenerator().createDocumentFragment();for(let n=0;n<e.childNodes.length;n++)t.appendChild(O.createHtml(e.childNodes[n]))}else e.nodeType===O.ElementType.TEXT&&(t=O.xmlTextNode(e.nodeValue));return t},escapeNode:e=>"string"!=typeof e?e:e.replace(/^\s+|\s+$/g,"").replace(/\\/g,"\\5c").replace(/ /g,"\\20").replace(/\"/g,"\\22").replace(/\&/g,"\\26").replace(/\'/g,"\\27").replace(/\//g,"\\2f").replace(/:/g,"\\3a").replace(/</g,"\\3c").replace(/>/g,"\\3e").replace(/@/g,"\\40"),unescapeNode:e=>"string"!=typeof e?e:e.replace(/\\20/g," ").replace(/\\22/g,'"').replace(/\\26/g,"&").replace(/\\27/g,"'").replace(/\\2f/g,"/").replace(/\\3a/g,":").replace(/\\3c/g,"<").replace(/\\3e/g,">").replace(/\\40/g,"@").replace(/\\5c/g,"\\"),getNodeFromJid:e=>e.indexOf("@")<0?null:e.split("@")[0],getDomainFromJid(e){const t=O.getBareJidFromJid(e);if(t.indexOf("@")<0)return t;{const e=t.split("@");return e.splice(0,1),e.join("@")}},getResourceFromJid(e){if(!e)return null;const t=e.split("/");return t.length<2?null:(t.splice(0,1),t.join("/"))},getBareJidFromJid:e=>e?e.split("/")[0]:null,_handleError(e){void 0!==e.stack&&O.fatal(e.stack),e.sourceURL?O.fatal("error: "+this.handler+" "+e.sourceURL+":"+e.line+" - "+e.name+": "+e.message):e.fileName?O.fatal("error: "+this.handler+" "+e.fileName+":"+e.lineNumber+" - "+e.name+": "+e.message):O.fatal("error: "+e.message)},log(e,t){var n;e===this.LogLevel.FATAL&&(null===(n=console)||void 0===n||n.error(t))},debug(e){this.log(this.LogLevel.DEBUG,e)},info(e){this.log(this.LogLevel.INFO,e)},warn(e){this.log(this.LogLevel.WARN,e)},error(e){this.log(this.LogLevel.ERROR,e)},fatal(e){this.log(this.LogLevel.FATAL,e)},serialize(e){if(!e)return null;"function"==typeof e.tree&&(e=e.tree());const t=[...Array(e.attributes.length).keys()].map(t=>e.attributes[t].nodeName);t.sort();let n=t.reduce((t,n)=>"".concat(t," ").concat(n,'="').concat(O.xmlescape(e.attributes.getNamedItem(n).value),'"'),"<".concat(e.nodeName));if(e.childNodes.length>0){n+=">";for(let t=0;t<e.childNodes.length;t++){const r=e.childNodes[t];switch(r.nodeType){case O.ElementType.NORMAL:n+=O.serialize(r);break;case O.ElementType.TEXT:n+=O.xmlescape(r.nodeValue);break;case O.ElementType.CDATA:n+="<![CDATA["+r.nodeValue+"]]>"}}n+="</"+e.nodeName+">"}else n+="/>";return n},_requestId:0,_connectionPlugins:{},addConnectionPlugin(e,t){O._connectionPlugins[e]=t},Builder:class{constructor(e,t){"presence"!==e&&"message"!==e&&"iq"!==e||(t&&!t.xmlns?t.xmlns=O.NS.CLIENT:t||(t={xmlns:O.NS.CLIENT})),this.nodeTree=O.xmlElement(e,t),this.node=this.nodeTree}tree(){return this.nodeTree}toString(){return O.serialize(this.nodeTree)}up(){return this.node=this.node.parentNode,this}root(){return this.node=this.nodeTree,this}attrs(e){for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(void 0===e[t]?this.node.removeAttribute(t):this.node.setAttribute(t,e[t]));return this}c(e,t,n){const r=O.xmlElement(e,t,n);return this.node.appendChild(r),"string"!=typeof n&&"number"!=typeof n&&(this.node=r),this}cnode(e){let t;const n=O.xmlGenerator();try{t=void 0!==n.importNode}catch(e){t=!1}const r=t?n.importNode(e,!0):O.copyElement(e);return this.node.appendChild(r),this.node=r,this}t(e){const t=O.xmlTextNode(e);return this.node.appendChild(t),this}h(e){const t=O.xmlGenerator().createElement("body");t.innerHTML=e;const n=O.createHtml(t);for(;n.childNodes.length>0;)this.node.appendChild(n.childNodes[0]);return this}},Handler:function(e,t,n,r,i,o,s){this.handler=e,this.ns=t,this.name=n,this.type=r,this.id=i,this.options=s||{matchBareFromJid:!1,ignoreNamespaceFragment:!1},this.options.matchBare&&(O.warn('The "matchBare" option is deprecated, use "matchBareFromJid" instead.'),this.options.matchBareFromJid=this.options.matchBare,delete this.options.matchBare),this.options.matchBareFromJid?this.from=o?O.getBareJidFromJid(o):null:this.from=o,this.user=!0}};O.Handler.prototype={getNamespace(e){let t=e.getAttribute("xmlns");return t&&this.options.ignoreNamespaceFragment&&(t=t.split("#")[0]),t},namespaceMatch(e){let t=!1;return!this.ns||(O.forEachChild(e,null,e=>{this.getNamespace(e)===this.ns&&(t=!0)}),t||this.getNamespace(e)===this.ns)},isMatch(e){let t=e.getAttribute("from");this.options.matchBareFromJid&&(t=O.getBareJidFromJid(t));const n=e.getAttribute("type");return!(!this.namespaceMatch(e)||this.name&&!O.isTagEqual(e,this.name)||this.type&&(Array.isArray(this.type)?-1===this.type.indexOf(n):n!==this.type)||this.id&&e.getAttribute("id")!==this.id||this.from&&t!==this.from)},run(e){let t=null;try{t=this.handler(e)}catch(e){throw O._handleError(e),e}return t},toString(){return"{Handler: "+this.handler+"("+this.name+","+this.id+","+this.ns+")}"}},O.TimedHandler=class{constructor(e,t){this.period=e,this.handler=t,this.lastCalled=(new Date).getTime(),this.user=!0}run(){return this.lastCalled=(new Date).getTime(),this.handler()}reset(){this.lastCalled=(new Date).getTime()}toString(){return"{TimedHandler: "+this.handler+"("+this.period+")}"}},O.Connection=class{constructor(e,t){this.service=e,this.options=t||{},this.setProtocol(),this.jid="",this.domain=null,this.features=null,this._sasl_data={},this.do_bind=!1,this.do_session=!1,this.mechanisms={},this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.protocolErrorHandlers={HTTP:{},websocket:{}},this._idleTimeout=null,this._disconnectTimeout=null,this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.do_authentication=!0,this.paused=!1,this.restored=!1,this._data=[],this._uniqueId=0,this._sasl_success_handler=null,this._sasl_failure_handler=null,this._sasl_challenge_handler=null,this.maxRetries=5,this._idleTimeout=setTimeout(()=>this._onIdle(),100),E(this.options.cookies),this.registerSASLMechanisms(this.options.mechanisms);for(const e in O._connectionPlugins)if(Object.prototype.hasOwnProperty.call(O._connectionPlugins,e)){const t=function(){};t.prototype=O._connectionPlugins[e],this[e]=new t,this[e].init(this)}}setProtocol(){const e=this.options.protocol||"";this.options.worker?this._proto=new O.WorkerWebsocket(this):0===this.service.indexOf("ws:")||0===this.service.indexOf("wss:")||0===e.indexOf("ws")?this._proto=new O.Websocket(this):this._proto=new O.Bosh(this)}reset(){this._proto._reset(),this.do_session=!1,this.do_bind=!1,this.timedHandlers=[],this.handlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this.authenticated=!1,this.connected=!1,this.disconnecting=!1,this.restored=!1,this._data=[],this._requests=[],this._uniqueId=0}pause(){this.paused=!0}resume(){this.paused=!1}getUniqueId(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}));return"string"==typeof e||"number"==typeof e?t+":"+e:t+""}addProtocolErrorHandler(e,t,n){this.protocolErrorHandlers[e][t]=n}connect(e,t,n,r,i,o,s){this.jid=e,this.authzid=O.getBareJidFromJid(this.jid),this.authcid=s||O.getNodeFromJid(this.jid),this.pass=t,this.connect_callback=n,this.disconnecting=!1,this.connected=!1,this.authenticated=!1,this.restored=!1,this.domain=O.getDomainFromJid(this.jid),this._changeConnectStatus(O.Status.CONNECTING,null),this._proto._connect(r,i,o)}attach(e,t,n,r,i,o,s){if(this._proto._attach)return this._proto._attach(e,t,n,r,i,o,s);{const e=new Error('The "attach" method is not available for your connection protocol');throw e.name="StropheSessionError",e}}restore(e,t,n,r,i){if(!this._sessionCachingSupported()){const e=new Error('The "restore" method can only be used with a BOSH connection.');throw e.name="StropheSessionError",e}this._proto._restore(e,t,n,r,i)}_sessionCachingSupported(){if(this._proto instanceof O.Bosh){if(!JSON)return!1;try{sessionStorage.setItem("_strophe_","_strophe_"),sessionStorage.removeItem("_strophe_")}catch(e){return!1}return!0}return!1}xmlInput(e){}xmlOutput(e){}rawInput(e){}rawOutput(e){}nextValidRid(e){}send(e){if(null!==e){if("function"==typeof e.sort)for(let t=0;t<e.length;t++)this._queueData(e[t]);else"function"==typeof e.tree?this._queueData(e.tree()):this._queueData(e);this._proto._send()}}flush(){clearTimeout(this._idleTimeout),this._onIdle()}sendPresence(e,t,n,r){let i=null;"function"==typeof e.tree&&(e=e.tree());let o=e.getAttribute("id");if(o||(o=this.getUniqueId("sendPresence"),e.setAttribute("id",o)),"function"==typeof t||"function"==typeof n){const e=this.addHandler(e=>{i&&this.deleteTimedHandler(i),"error"===e.getAttribute("type")?n&&n(e):t&&t(e)},null,"presence",null,o);r&&(i=this.addTimedHandler(r,()=>(this.deleteHandler(e),n&&n(null),!1)))}return this.send(e),o}sendIQ(e,t,n,r){let i=null;"function"==typeof e.tree&&(e=e.tree());let o=e.getAttribute("id");if(o||(o=this.getUniqueId("sendIQ"),e.setAttribute("id",o)),"function"==typeof t||"function"==typeof n){const e=this.addHandler(e=>{i&&this.deleteTimedHandler(i);const r=e.getAttribute("type");if("result"===r)t&&t(e);else{if("error"!==r){const e=new Error("Got bad IQ type of ".concat(r));throw e.name="StropheError",e}n&&n(e)}},null,"iq",["error","result"],o);r&&(i=this.addTimedHandler(r,()=>(this.deleteHandler(e),n&&n(null),!1)))}return this.send(e),o}_queueData(e){if(null===e||!e.tagName||!e.childNodes){const e=new Error("Cannot queue non-DOMElement.");throw e.name="StropheError",e}this._data.push(e)}_sendRestart(){this._data.push("restart"),this._proto._sendRestart(),this._idleTimeout=setTimeout(()=>this._onIdle(),100)}addTimedHandler(e,t){const n=new O.TimedHandler(e,t);return this.addTimeds.push(n),n}deleteTimedHandler(e){this.removeTimeds.push(e)}addHandler(e,t,n,r,i,o,s){const a=new O.Handler(e,t,n,r,i,o,s);return this.addHandlers.push(a),a}deleteHandler(e){this.removeHandlers.push(e);const t=this.addHandlers.indexOf(e);t>=0&&this.addHandlers.splice(t,1)}registerSASLMechanisms(e){this.mechanisms={},(e=e||[O.SASLAnonymous,O.SASLExternal,O.SASLOAuthBearer,O.SASLXOAuth2,O.SASLPlain,O.SASLSHA1]).forEach(e=>this.registerSASLMechanism(e))}registerSASLMechanism(e){const t=new e;this.mechanisms[t.mechname]=t}disconnect(e){if(this._changeConnectStatus(O.Status.DISCONNECTING,e),e?O.warn("Disconnect was called because: "+e):O.info("Disconnect was called"),this.connected){let e=!1;this.disconnecting=!0,this.authenticated&&(e=T({xmlns:O.NS.CLIENT,type:"unavailable"})),this._disconnectTimeout=this._addSysTimedHandler(3e3,this._onDisconnectTimeout.bind(this)),this._proto._disconnect(e)}else O.warn("Disconnect was called before Strophe connected to the server"),this._proto._abortAllRequests(),this._doDisconnect()}_changeConnectStatus(e,t,n){for(const n in O._connectionPlugins)if(Object.prototype.hasOwnProperty.call(O._connectionPlugins,n)){const r=this[n];if(r.statusChanged)try{r.statusChanged(e,t)}catch(e){O.error("".concat(n," plugin caused an exception changing status: ").concat(e))}}if(this.connect_callback)try{this.connect_callback(e,t,n)}catch(e){O._handleError(e),O.error("User connection callback caused an exception: ".concat(e))}}_doDisconnect(e){"number"==typeof this._idleTimeout&&clearTimeout(this._idleTimeout),null!==this._disconnectTimeout&&(this.deleteTimedHandler(this._disconnectTimeout),this._disconnectTimeout=null),O.debug("_doDisconnect was called"),this._proto._doDisconnect(),this.authenticated=!1,this.disconnecting=!1,this.restored=!1,this.handlers=[],this.timedHandlers=[],this.removeTimeds=[],this.removeHandlers=[],this.addTimeds=[],this.addHandlers=[],this._changeConnectStatus(O.Status.DISCONNECTED,e),this.connected=!1}_dataRecv(e,t){const n=this._proto._reqToData(e);if(null===n)return;for(this.xmlInput!==O.Connection.prototype.xmlInput&&(n.nodeName===this._proto.strip&&n.childNodes.length?this.xmlInput(n.childNodes[0]):this.xmlInput(n)),this.rawInput!==O.Connection.prototype.rawInput&&(t?this.rawInput(t):this.rawInput(O.serialize(n)));this.removeHandlers.length>0;){const e=this.removeHandlers.pop(),t=this.handlers.indexOf(e);t>=0&&this.handlers.splice(t,1)}for(;this.addHandlers.length>0;)this.handlers.push(this.addHandlers.pop());if(this.disconnecting&&this._proto._emptyQueue())return void this._doDisconnect();const r=n.getAttribute("type");if(null!==r&&"terminate"===r){if(this.disconnecting)return;let e=n.getAttribute("condition");const t=n.getElementsByTagName("conflict");return null!==e?("remote-stream-error"===e&&t.length>0&&(e="conflict"),this._changeConnectStatus(O.Status.CONNFAIL,e)):this._changeConnectStatus(O.Status.CONNFAIL,O.ErrorCondition.UNKOWN_REASON),void this._doDisconnect(e)}O.forEachChild(n,null,e=>{const t=this.handlers;this.handlers=[];for(let n=0;n<t.length;n++){const r=t[n];try{(!r.isMatch(e)||!this.authenticated&&r.user||r.run(e))&&this.handlers.push(r)}catch(e){O.warn("Removing Strophe handlers due to uncaught exception: "+e.message)}}})}_connect_cb(e,t,n){let r;O.debug("_connect_cb was called"),this.connected=!0;try{r=this._proto._reqToData(e)}catch(e){if(e.name!==O.ErrorCondition.BAD_FORMAT)throw e;this._changeConnectStatus(O.Status.CONNFAIL,O.ErrorCondition.BAD_FORMAT),this._doDisconnect(O.ErrorCondition.BAD_FORMAT)}if(!r)return;if(this.xmlInput!==O.Connection.prototype.xmlInput&&(r.nodeName===this._proto.strip&&r.childNodes.length?this.xmlInput(r.childNodes[0]):this.xmlInput(r)),this.rawInput!==O.Connection.prototype.rawInput&&(n?this.rawInput(n):this.rawInput(O.serialize(r))),this._proto._connect_cb(r)===O.Status.CONNFAIL)return;let i;if(i=r.getElementsByTagNameNS?r.getElementsByTagNameNS(O.NS.STREAM,"features").length>0:r.getElementsByTagName("stream:features").length>0||r.getElementsByTagName("features").length>0,!i)return void this._proto._no_auth_received(t);const o=Array.from(r.getElementsByTagName("mechanism")).map(e=>this.mechanisms[e.textContent]).filter(e=>e);0!==o.length||0!==r.getElementsByTagName("auth").length?!1!==this.do_authentication&&this.authenticate(o):this._proto._no_auth_received(t)}sortMechanismsByPriority(e){for(let t=0;t<e.length-1;++t){let n=t;for(let r=t+1;r<e.length;++r)e[r].priority>e[n].priority&&(n=r);if(n!==t){const r=e[t];e[t]=e[n],e[n]=r}}return e}authenticate(e){this._attemptSASLAuth(e)||this._attemptLegacyAuth()}_attemptSASLAuth(e){e=this.sortMechanismsByPriority(e||[]);let t=!1;for(let n=0;n<e.length;++n){if(!e[n].test(this))continue;this._sasl_success_handler=this._addSysHandler(this._sasl_success_cb.bind(this),null,"success",null,null),this._sasl_failure_handler=this._addSysHandler(this._sasl_failure_cb.bind(this),null,"failure",null,null),this._sasl_challenge_handler=this._addSysHandler(this._sasl_challenge_cb.bind(this),null,"challenge",null,null),this._sasl_mechanism=e[n],this._sasl_mechanism.onStart(this);const r=C("auth",{xmlns:O.NS.SASL,mechanism:this._sasl_mechanism.mechname});if(this._sasl_mechanism.isClientFirst){const e=this._sasl_mechanism.onChallenge(this,null);r.t(Object(A.btoa)(e))}this.send(r.tree()),t=!0;break}return t}_sasl_challenge_cb(e){const t=Object(A.atob)(O.getText(e)),n=this._sasl_mechanism.onChallenge(this,t),r=C("response",{xmlns:O.NS.SASL});return""!==n&&r.t(Object(A.btoa)(n)),this.send(r.tree()),!0}_attemptLegacyAuth(){null===O.getNodeFromJid(this.jid)?(this._changeConnectStatus(O.Status.CONNFAIL,O.ErrorCondition.MISSING_JID_NODE),this.disconnect(O.ErrorCondition.MISSING_JID_NODE)):(this._changeConnectStatus(O.Status.AUTHENTICATING,null),this._addSysHandler(this._onLegacyAuthIQResult.bind(this),null,null,null,"_auth_1"),this.send(j({type:"get",to:this.domain,id:"_auth_1"}).c("query",{xmlns:O.NS.AUTH}).c("username",{}).t(O.getNodeFromJid(this.jid)).tree()))}_onLegacyAuthIQResult(e){const t=j({type:"set",id:"_auth_2"}).c("query",{xmlns:O.NS.AUTH}).c("username",{}).t(O.getNodeFromJid(this.jid)).up().c("password").t(this.pass);return O.getResourceFromJid(this.jid)||(this.jid=O.getBareJidFromJid(this.jid)+"/strophe"),t.up().c("resource",{}).t(O.getResourceFromJid(this.jid)),this._addSysHandler(this._auth2_cb.bind(this),null,null,null,"_auth_2"),this.send(t.tree()),!1}_sasl_success_cb(e){if(this._sasl_data["server-signature"]){let t;const n=/([a-z]+)=([^,]+)(,|$)/,r=Object(A.atob)(O.getText(e)).match(n);if("v"===r[1]&&(t=r[2]),t!==this._sasl_data["server-signature"])return this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_data={},this._sasl_failure_cb(null)}O.info("SASL authentication succeeded."),this._sasl_mechanism&&this._sasl_mechanism.onSuccess(),this.deleteHandler(this._sasl_failure_handler),this._sasl_failure_handler=null,this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null);const t=[],n=(e,t)=>{for(;e.length;)this.deleteHandler(e.pop());return this._onStreamFeaturesAfterSASL(t),!1};return t.push(this._addSysHandler(e=>n(t,e),null,"stream:features",null,null)),t.push(this._addSysHandler(e=>n(t,e),O.NS.STREAM,"features",null,null)),this._sendRestart(),!1}_onStreamFeaturesAfterSASL(e){this.features=e;for(let t=0;t<e.childNodes.length;t++){const n=e.childNodes[t];"bind"===n.nodeName&&(this.do_bind=!0),"session"===n.nodeName&&(this.do_session=!0)}return this.do_bind?(this.options.explicitResourceBinding?this._changeConnectStatus(O.Status.BINDREQUIRED,null):this.bind(),!1):(this._changeConnectStatus(O.Status.AUTHFAIL,null),!1)}bind(){if(!this.do_bind)return void O.log(O.LogLevel.INFO,'Strophe.Connection.prototype.bind called but "do_bind" is false');this._addSysHandler(this._onResourceBindResultIQ.bind(this),null,null,null,"_bind_auth_2");const e=O.getResourceFromJid(this.jid);e?this.send(j({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:O.NS.BIND}).c("resource",{}).t(e).tree()):this.send(j({type:"set",id:"_bind_auth_2"}).c("bind",{xmlns:O.NS.BIND}).tree())}_onResourceBindResultIQ(e){if("error"===e.getAttribute("type")){let t;return O.warn("Resource binding failed."),e.getElementsByTagName("conflict").length>0&&(t=O.ErrorCondition.CONFLICT),this._changeConnectStatus(O.Status.AUTHFAIL,t,e),!1}const t=e.getElementsByTagName("bind");if(!(t.length>0))return O.warn("Resource binding failed."),this._changeConnectStatus(O.Status.AUTHFAIL,null,e),!1;{const e=t[0].getElementsByTagName("jid");e.length>0&&(this.authenticated=!0,this.jid=O.getText(e[0]),this.do_session?this._establishSession():this._changeConnectStatus(O.Status.CONNECTED,null))}}_establishSession(){if(!this.do_session)throw new Error("Strophe.Connection.prototype._establishSession "+"called but apparently ".concat(O.NS.SESSION," wasn't advertised by the server"));this._addSysHandler(this._onSessionResultIQ.bind(this),null,null,null,"_session_auth_2"),this.send(j({type:"set",id:"_session_auth_2"}).c("session",{xmlns:O.NS.SESSION}).tree())}_onSessionResultIQ(e){if("result"===e.getAttribute("type"))this.authenticated=!0,this._changeConnectStatus(O.Status.CONNECTED,null);else if("error"===e.getAttribute("type"))return this.authenticated=!1,O.warn("Session creation failed."),this._changeConnectStatus(O.Status.AUTHFAIL,null,e),!1;return!1}_sasl_failure_cb(e){return this._sasl_success_handler&&(this.deleteHandler(this._sasl_success_handler),this._sasl_success_handler=null),this._sasl_challenge_handler&&(this.deleteHandler(this._sasl_challenge_handler),this._sasl_challenge_handler=null),this._sasl_mechanism&&this._sasl_mechanism.onFailure(),this._changeConnectStatus(O.Status.AUTHFAIL,null,e),!1}_auth2_cb(e){return"result"===e.getAttribute("type")?(this.authenticated=!0,this._changeConnectStatus(O.Status.CONNECTED,null)):"error"===e.getAttribute("type")&&(this._changeConnectStatus(O.Status.AUTHFAIL,null,e),this.disconnect("authentication failed")),!1}_addSysTimedHandler(e,t){const n=new O.TimedHandler(e,t);return n.user=!1,this.addTimeds.push(n),n}_addSysHandler(e,t,n,r,i){const o=new O.Handler(e,t,n,r,i);return o.user=!1,this.addHandlers.push(o),o}_onDisconnectTimeout(){return O.debug("_onDisconnectTimeout was called"),this._changeConnectStatus(O.Status.CONNTIMEOUT,null),this._proto._onDisconnectTimeout(),this._doDisconnect(),!1}_onIdle(){for(;this.addTimeds.length>0;)this.timedHandlers.push(this.addTimeds.pop());for(;this.removeTimeds.length>0;){const e=this.removeTimeds.pop(),t=this.timedHandlers.indexOf(e);t>=0&&this.timedHandlers.splice(t,1)}const e=(new Date).getTime(),t=[];for(let n=0;n<this.timedHandlers.length;n++){const r=this.timedHandlers[n];if(this.authenticated||!r.user){r.lastCalled+r.period-e<=0?r.run()&&t.push(r):t.push(r)}}this.timedHandlers=t,clearTimeout(this._idleTimeout),this._proto._onIdle(),this.connected&&(this._idleTimeout=setTimeout(()=>this._onIdle(),100))}},O.SASLMechanism=class{constructor(e,t,n){this.mechname=e,this.isClientFirst=t,this.priority=n}test(){return!0}onStart(e){this._connection=e}onChallenge(e,t){throw new Error("You should implement challenge handling!")}onFailure(){this._connection=null}onSuccess(){this._connection=null}},O.SASLAnonymous=class extends O.SASLMechanism{constructor(e="ANONYMOUS",t=!1,n=20){super(e,t,n)}test(e){return null===e.authcid}},O.SASLPlain=class extends O.SASLMechanism{constructor(e="PLAIN",t=!0,n=50){super(e,t,n)}test(e){return null!==e.authcid}onChallenge(e){const{authcid:t,authzid:n,domain:r,pass:i}=e;if(!r)throw new Error("SASLPlain onChallenge: domain is not defined!");let o=n!=="".concat(t,"@").concat(r)?n:"";return o+="\0",o+=t,o+="\0",o+=i,x(o)}},O.SASLSHA1=class extends O.SASLMechanism{constructor(e="SCRAM-SHA-1",t=!0,n=60){super(e,t,n)}test(e){return null!==e.authcid}onChallenge(e,t,n){const r=n||h.hexdigest(""+1234567890*Math.random());let i="n="+x(e.authcid);return i+=",r=",i+=r,e._sasl_data.cnonce=r,e._sasl_data["client-first-message-bare"]=i,i="n,,"+i,this.onChallenge=(e,t)=>{let n,r,i,o,s,a,c,l,u="c=biws,",d="".concat(e._sasl_data["client-first-message-bare"],",").concat(t,",");const h=e._sasl_data.cnonce,f=/([a-z]+)=([^,]+)(,|$)/;for(;t.match(f);){const e=t.match(f);switch(t=t.replace(e[0],""),e[1]){case"r":n=e[2];break;case"s":r=e[2];break;case"i":i=e[2]}}if(n.substr(0,h.length)!==h)return e._sasl_data={},e._sasl_failure_cb();u+="r="+n,d+=u,r=Object(A.atob)(r),r+="\0\0\0";const p=x(e.pass);for(o=a=S.core_hmac_sha1(p,r),c=1;c<i;c++){for(s=S.core_hmac_sha1(p,S.binb2str(a)),l=0;l<5;l++)o[l]^=s[l];a=s}o=S.binb2str(o);const g=S.core_hmac_sha1(o,"Client Key"),m=S.str_hmac_sha1(o,"Server Key"),v=S.core_hmac_sha1(S.str_sha1(S.binb2str(g)),d);for(e._sasl_data["server-signature"]=S.b64_hmac_sha1(m,d),l=0;l<5;l++)g[l]^=v[l];return u+=",p="+Object(A.btoa)(S.binb2str(g)),u},i}},O.SASLOAuthBearer=class extends O.SASLMechanism{constructor(e="OAUTHBEARER",t=!0,n=40){super(e,t,n)}test(e){return null!==e.pass}onChallenge(e){let t="n,";return null!==e.authcid&&(t=t+"a="+e.authzid),t+=",",t+="",t+="auth=Bearer ",t+=e.pass,t+="",t+="",x(t)}},O.SASLExternal=class extends O.SASLMechanism{constructor(e="EXTERNAL",t=!0,n=10){super(e,t,n)}onChallenge(e){return e.authcid===e.authzid?"":e.authzid}},O.SASLXOAuth2=class extends O.SASLMechanism{constructor(e="X-OAUTH2",t=!0,n=30){super(e,t,n)}test(e){return null!==e.pass}onChallenge(e){let t="\0";return null!==e.authcid&&(t+=e.authzid),t+="\0",t+=e.pass,x(t)}};t.e={Strophe:O,$build:C,$iq:j,$msg:function(e){return new O.Builder("message",e)},$pres:T,SHA1:S,MD5:h,b64_hmac_sha1:S.b64_hmac_sha1,b64_sha1:S.b64_sha1,str_hmac_sha1:S.str_hmac_sha1,str_sha1:S.str_sha1}},function(e,t,n){var r;
-/*!
- * Sizzle CSS Selector Engine v2.3.5
- * https://sizzlejs.com/
- *
- * Copyright JS Foundation and other contributors
- * Released under the MIT license
- * https://js.foundation/
- *
- * Date: 2020-03-14
- */!function(i){var o,s,a,c,l,u,d,h,f,p,g,m,v,_,b,y,w,S,x,E="sizzle"+1*new Date,A=i.document,C=0,j=0,T=he(),O=he(),k=he(),N=he(),I=function(e,t){return e===t&&(g=!0),0},M={}.hasOwnProperty,R=[],D=R.pop,P=R.push,L=R.push,z=R.slice,F=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",q="[\\x20\\t\\r\\n\\f]",H="(?:\\\\[\\da-fA-F]{1,6}"+q+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",U="\\["+q+"*("+H+")(?:"+q+"*([*^$|!~]?=)"+q+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+H+"))|)"+q+"*\\]",$=":("+H+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+U+")*)|.*)\\)|)",W=new RegExp(q+"+","g"),G=new RegExp("^"+q+"+|((?:^|[^\\\\])(?:\\\\.)*)"+q+"+$","g"),V=new RegExp("^"+q+"*,"+q+"*"),J=new RegExp("^"+q+"*([>+~]|"+q+")"+q+"*"),X=new RegExp(q+"|>"),Q=new RegExp($),Y=new RegExp("^"+H+"$"),K={ID:new RegExp("^#("+H+")"),CLASS:new RegExp("^\\.("+H+")"),TAG:new RegExp("^("+H+"|[*])"),ATTR:new RegExp("^"+U),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+q+"*(even|odd|(([+-]|)(\\d*)n|)"+q+"*(?:([+-]|)"+q+"*(\\d+)|))"+q+"*\\)|)","i"),bool:new RegExp("^(?:"+B+")$","i"),needsContext:new RegExp("^"+q+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+q+"*((?:-\\d)?\\d*)"+q+"*\\)|)(?=[^-]|$)","i")},Z=/HTML$/i,ee=/^(?:input|select|textarea|button)$/i,te=/^h\d$/i,ne=/^[^{]+\{\s*\[native \w/,re=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ie=/[+~]/,oe=new RegExp("\\\\[\\da-fA-F]{1,6}"+q+"?|\\\\([^\\r\\n\\f])","g"),se=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},ae=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ce=function(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},le=function(){m()},ue=Ee((function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()}),{dir:"parentNode",next:"legend"});try{L.apply(R=z.call(A.childNodes),A.childNodes),R[A.childNodes.length].nodeType}catch(e){L={apply:R.length?function(e,t){P.apply(e,z.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function de(e,t,n,r){var i,o,a,c,l,d,f,p=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!r&&(m(t),t=t||v,b)){if(11!==g&&(l=re.exec(e)))if(i=l[1]){if(9===g){if(!(a=t.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(p&&(a=p.getElementById(i))&&x(t,a)&&a.id===i)return n.push(a),n}else{if(l[2])return L.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&s.getElementsByClassName&&t.getElementsByClassName)return L.apply(n,t.getElementsByClassName(i)),n}if(s.qsa&&!N[e+" "]&&(!y||!y.test(e))&&(1!==g||"object"!==t.nodeName.toLowerCase())){if(f=e,p=t,1===g&&(X.test(e)||J.test(e))){for((p=ie.test(e)&&we(t.parentNode)||t)===t&&s.scope||((c=t.getAttribute("id"))?c=c.replace(ae,ce):t.setAttribute("id",c=E)),o=(d=u(e)).length;o--;)d[o]=(c?"#"+c:":scope")+" "+xe(d[o]);f=d.join(",")}try{return L.apply(n,p.querySelectorAll(f)),n}catch(t){N(e,!0)}finally{c===E&&t.removeAttribute("id")}}}return h(e.replace(G,"$1"),t,n,r)}function he(){var e=[];return function t(n,r){return e.push(n+" ")>a.cacheLength&&delete t[e.shift()],t[n+" "]=r}}function fe(e){return e[E]=!0,e}function pe(e){var t=v.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ge(e,t){for(var n=e.split("|"),r=n.length;r--;)a.attrHandle[n[r]]=t}function me(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function ve(e){return function(t){return"input"===t.nodeName.toLowerCase()&&t.type===e}}function _e(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function be(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ue(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function ye(e){return fe((function(t){return t=+t,fe((function(n,r){for(var i,o=e([],n.length,t),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function we(e){return e&&void 0!==e.getElementsByTagName&&e}for(o in s=de.support={},l=de.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Z.test(t||n&&n.nodeName||"HTML")},m=de.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:A;return r!=v&&9===r.nodeType&&r.documentElement?(_=(v=r).documentElement,b=!l(v),A!=v&&(n=v.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",le,!1):n.attachEvent&&n.attachEvent("onunload",le)),s.scope=pe((function(e){return _.appendChild(e).appendChild(v.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length})),s.attributes=pe((function(e){return e.className="i",!e.getAttribute("className")})),s.getElementsByTagName=pe((function(e){return e.appendChild(v.createComment("")),!e.getElementsByTagName("*").length})),s.getElementsByClassName=ne.test(v.getElementsByClassName),s.getById=pe((function(e){return _.appendChild(e).id=E,!v.getElementsByName||!v.getElementsByName(E).length})),s.getById?(a.filter.ID=function(e){var t=e.replace(oe,se);return function(e){return e.getAttribute("id")===t}},a.find.ID=function(e,t){if(void 0!==t.getElementById&&b){var n=t.getElementById(e);return n?[n]:[]}}):(a.filter.ID=function(e){var t=e.replace(oe,se);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},a.find.ID=function(e,t){if(void 0!==t.getElementById&&b){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];for(i=t.getElementsByName(e),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),a.find.TAG=s.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):s.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},a.find.CLASS=s.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&b)return t.getElementsByClassName(e)},w=[],y=[],(s.qsa=ne.test(v.querySelectorAll))&&(pe((function(e){var t;_.appendChild(e).innerHTML="<a id='"+E+"'></a><select id='"+E+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+q+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+q+"*(?:value|"+B+")"),e.querySelectorAll("[id~="+E+"-]").length||y.push("~="),(t=v.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+q+"*name"+q+"*="+q+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")})),pe((function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=v.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+q+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),_.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")}))),(s.matchesSelector=ne.test(S=_.matches||_.webkitMatchesSelector||_.mozMatchesSelector||_.oMatchesSelector||_.msMatchesSelector))&&pe((function(e){s.disconnectedMatch=S.call(e,"*"),S.call(e,"[s!='']:x"),w.push("!=",$)})),y=y.length&&new RegExp(y.join("|")),w=w.length&&new RegExp(w.join("|")),t=ne.test(_.compareDocumentPosition),x=t||ne.test(_.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},I=t?function(e,t){if(e===t)return g=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!s.sortDetached&&t.compareDocumentPosition(e)===n?e==v||e.ownerDocument==A&&x(A,e)?-1:t==v||t.ownerDocument==A&&x(A,t)?1:p?F(p,e)-F(p,t):0:4&n?-1:1)}:function(e,t){if(e===t)return g=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e==v?-1:t==v?1:i?-1:o?1:p?F(p,e)-F(p,t):0;if(i===o)return me(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?me(s[r],a[r]):s[r]==A?-1:a[r]==A?1:0},v):v},de.matches=function(e,t){return de(e,null,null,t)},de.matchesSelector=function(e,t){if(m(e),s.matchesSelector&&b&&!N[t+" "]&&(!w||!w.test(t))&&(!y||!y.test(t)))try{var n=S.call(e,t);if(n||s.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return de(t,v,null,[e]).length>0},de.contains=function(e,t){return(e.ownerDocument||e)!=v&&m(e),x(e,t)},de.attr=function(e,t){(e.ownerDocument||e)!=v&&m(e);var n=a.attrHandle[t.toLowerCase()],r=n&&M.call(a.attrHandle,t.toLowerCase())?n(e,t,!b):void 0;return void 0!==r?r:s.attributes||!b?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},de.escape=function(e){return(e+"").replace(ae,ce)},de.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},de.uniqueSort=function(e){var t,n=[],r=0,i=0;if(g=!s.detectDuplicates,p=!s.sortStable&&e.slice(0),e.sort(I),g){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return p=null,e},c=de.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=c(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=c(t);return n},(a=de.selectors={cacheLength:50,createPseudo:fe,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(oe,se),e[3]=(e[3]||e[4]||e[5]||"").replace(oe,se),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||de.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&de.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&Q.test(n)&&(t=u(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(oe,se).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=T[e+" "];return t||(t=new RegExp("(^|"+q+")"+e+"("+q+"|$)"))&&T(e,(function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")}))},ATTR:function(e,t,n){return function(r){var i=de.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(W," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,c){var l,u,d,h,f,p,g=o!==s?"nextSibling":"previousSibling",m=t.parentNode,v=a&&t.nodeName.toLowerCase(),_=!c&&!a,b=!1;if(m){if(o){for(;g;){for(h=t;h=h[g];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;p=g="only"===e&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&_){for(b=(f=(l=(u=(d=(h=m)[E]||(h[E]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&l[1])&&l[2],h=f&&m.childNodes[f];h=++f&&h&&h[g]||(b=f=0)||p.pop();)if(1===h.nodeType&&++b&&h===t){u[e]=[C,f,b];break}}else if(_&&(b=f=(l=(u=(d=(h=t)[E]||(h[E]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]||[])[0]===C&&l[1]),!1===b)for(;(h=++f&&h&&h[g]||(b=f=0)||p.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++b||(_&&((u=(d=h[E]||(h[E]={}))[h.uniqueID]||(d[h.uniqueID]={}))[e]=[C,b]),h!==t)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(e,t){var n,r=a.pseudos[e]||a.setFilters[e.toLowerCase()]||de.error("unsupported pseudo: "+e);return r[E]?r(t):r.length>1?(n=[e,e,"",t],a.setFilters.hasOwnProperty(e.toLowerCase())?fe((function(e,n){for(var i,o=r(e,t),s=o.length;s--;)e[i=F(e,o[s])]=!(n[i]=o[s])})):function(e){return r(e,0,n)}):r}},pseudos:{not:fe((function(e){var t=[],n=[],r=d(e.replace(G,"$1"));return r[E]?fe((function(e,t,n,i){for(var o,s=r(e,null,i,[]),a=e.length;a--;)(o=s[a])&&(e[a]=!(t[a]=o))})):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}})),has:fe((function(e){return function(t){return de(e,t).length>0}})),contains:fe((function(e){return e=e.replace(oe,se),function(t){return(t.textContent||c(t)).indexOf(e)>-1}})),lang:fe((function(e){return Y.test(e||"")||de.error("unsupported lang: "+e),e=e.replace(oe,se).toLowerCase(),function(t){var n;do{if(n=b?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}})),target:function(e){var t=i.location&&i.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===_},focus:function(e){return e===v.activeElement&&(!v.hasFocus||v.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:be(!1),disabled:be(!0),checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!a.pseudos.empty(e)},header:function(e){return te.test(e.nodeName)},input:function(e){return ee.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:ye((function(){return[0]})),last:ye((function(e,t){return[t-1]})),eq:ye((function(e,t,n){return[n<0?n+t:n]})),even:ye((function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e})),odd:ye((function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e})),lt:ye((function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e})),gt:ye((function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e}))}}).pseudos.nth=a.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})a.pseudos[o]=ve(o);for(o in{submit:!0,reset:!0})a.pseudos[o]=_e(o);function Se(){}function xe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function Ee(e,t,n){var r=t.dir,i=t.next,o=i||r,s=n&&"parentNode"===o,a=j++;return t.first?function(t,n,i){for(;t=t[r];)if(1===t.nodeType||s)return e(t,n,i);return!1}:function(t,n,c){var l,u,d,h=[C,a];if(c){for(;t=t[r];)if((1===t.nodeType||s)&&e(t,n,c))return!0}else for(;t=t[r];)if(1===t.nodeType||s)if(u=(d=t[E]||(t[E]={}))[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else{if((l=u[o])&&l[0]===C&&l[1]===a)return h[2]=l[2];if(u[o]=h,h[2]=e(t,n,c))return!0}return!1}}function Ae(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function Ce(e,t,n,r,i){for(var o,s=[],a=0,c=e.length,l=null!=t;a<c;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),l&&t.push(a)));return s}function je(e,t,n,r,i,o){return r&&!r[E]&&(r=je(r)),i&&!i[E]&&(i=je(i,o)),fe((function(o,s,a,c){var l,u,d,h=[],f=[],p=s.length,g=o||function(e,t,n){for(var r=0,i=t.length;r<i;r++)de(e,t[r],n);return n}(t||"*",a.nodeType?[a]:a,[]),m=!e||!o&&t?g:Ce(g,h,e,a,c),v=n?i||(o?e:p||r)?[]:s:m;if(n&&n(m,v,a,c),r)for(l=Ce(v,f),r(l,[],a,c),u=l.length;u--;)(d=l[u])&&(v[f[u]]=!(m[f[u]]=d));if(o){if(i||e){if(i){for(l=[],u=v.length;u--;)(d=v[u])&&l.push(m[u]=d);i(null,v=[],l,c)}for(u=v.length;u--;)(d=v[u])&&(l=i?F(o,d):h[u])>-1&&(o[l]=!(s[l]=d))}}else v=Ce(v===s?v.splice(p,v.length):v),i?i(null,s,v,c):L.apply(s,v)}))}function Te(e){for(var t,n,r,i=e.length,o=a.relative[e[0].type],s=o||a.relative[" "],c=o?1:0,l=Ee((function(e){return e===t}),s,!0),u=Ee((function(e){return F(t,e)>-1}),s,!0),d=[function(e,n,r){var i=!o&&(r||n!==f)||((t=n).nodeType?l(e,n,r):u(e,n,r));return t=null,i}];c<i;c++)if(n=a.relative[e[c].type])d=[Ee(Ae(d),n)];else{if((n=a.filter[e[c].type].apply(null,e[c].matches))[E]){for(r=++c;r<i&&!a.relative[e[r].type];r++);return je(c>1&&Ae(d),c>1&&xe(e.slice(0,c-1).concat({value:" "===e[c-2].type?"*":""})).replace(G,"$1"),n,c<r&&Te(e.slice(c,r)),r<i&&Te(e=e.slice(r)),r<i&&xe(e))}d.push(n)}return Ae(d)}Se.prototype=a.filters=a.pseudos,a.setFilters=new Se,u=de.tokenize=function(e,t){var n,r,i,o,s,c,l,u=O[e+" "];if(u)return t?0:u.slice(0);for(s=e,c=[],l=a.preFilter;s;){for(o in n&&!(r=V.exec(s))||(r&&(s=s.slice(r[0].length)||s),c.push(i=[])),n=!1,(r=J.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(G," ")}),s=s.slice(n.length)),a.filter)!(r=K[o].exec(s))||l[o]&&!(r=l[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?de.error(e):O(e,c).slice(0)},d=de.compile=function(e,t){var n,r=[],i=[],o=k[e+" "];if(!o){for(t||(t=u(e)),n=t.length;n--;)(o=Te(t[n]))[E]?r.push(o):i.push(o);(o=k(e,function(e,t){var n=t.length>0,r=e.length>0,i=function(i,o,s,c,l){var u,d,h,p=0,g="0",_=i&&[],y=[],w=f,S=i||r&&a.find.TAG("*",l),x=C+=null==w?1:Math.random()||.1,E=S.length;for(l&&(f=o==v||o||l);g!==E&&null!=(u=S[g]);g++){if(r&&u){for(d=0,o||u.ownerDocument==v||(m(u),s=!b);h=e[d++];)if(h(u,o||v,s)){c.push(u);break}l&&(C=x)}n&&((u=!h&&u)&&p--,i&&_.push(u))}if(p+=g,n&&g!==p){for(d=0;h=t[d++];)h(_,y,o,s);if(i){if(p>0)for(;g--;)_[g]||y[g]||(y[g]=D.call(c));y=Ce(y)}L.apply(c,y),l&&!i&&y.length>0&&p+t.length>1&&de.uniqueSort(c)}return l&&(C=x,f=w),_};return n?fe(i):i}(i,r))).selector=e}return o},h=de.select=function(e,t,n,r){var i,o,s,c,l,h="function"==typeof e&&e,f=!r&&u(e=h.selector||e);if(n=n||[],1===f.length){if((o=f[0]=f[0].slice(0)).length>2&&"ID"===(s=o[0]).type&&9===t.nodeType&&b&&a.relative[o[1].type]){if(!(t=(a.find.ID(s.matches[0].replace(oe,se),t)||[])[0]))return n;h&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=K.needsContext.test(e)?0:o.length;i--&&(s=o[i],!a.relative[c=s.type]);)if((l=a.find[c])&&(r=l(s.matches[0].replace(oe,se),ie.test(o[0].type)&&we(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&xe(o)))return L.apply(n,r),n;break}}return(h||d(e,f))(r,t,!b,n,!t||ie.test(e)&&we(t.parentNode)||t),n},s.sortStable=E.split("").sort(I).join("")===E,s.detectDuplicates=!!g,m(),s.sortDetached=pe((function(e){return 1&e.compareDocumentPosition(v.createElement("fieldset"))})),pe((function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")}))||ge("type|href|height|width",(function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)})),s.attributes&&pe((function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")}))||ge("value",(function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue})),pe((function(e){return null==e.getAttribute("disabled")}))||ge(B,(function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}));var Oe=i.Sizzle;de.noConflict=function(){return i.Sizzle===de&&(i.Sizzle=Oe),de},void 0===(r=function(){return de}.call(t,n,t,e))||(e.exports=r)}(window)},,function(e,t,n){e.exports=function(){"use strict";var e="millisecond",t="second",n="minute",r="hour",i="day",o="week",s="month",a="quarter",c="year",l=/^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/,u=/\[([^\]]+)]|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,d=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},h={s:d,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+d(r,2,"0")+":"+d(i,2,"0")},m:function(e,t){var n=12*(t.year()-e.year())+(t.month()-e.month()),r=e.clone().add(n,s),i=t-r<0,o=e.clone().add(n+(i?-1:1),s);return Number(-(n+(t-r)/(i?r-o:o-r))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(l){return{M:s,y:c,w:o,d:i,D:"date",h:r,m:n,s:t,ms:e,Q:a}[l]||String(l||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},f={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},p="en",g={};g[p]=f;var m=function(e){return e instanceof y},v=function(e,t,n){var r;if(!e)return p;if("string"==typeof e)g[e]&&(r=e),t&&(g[e]=t,r=e);else{var i=e.name;g[i]=e,r=i}return!n&&r&&(p=r),r||!n&&p},_=function(e,t){if(m(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new y(n)},b=h;b.l=v,b.i=m,b.w=function(e,t){return _(e,{locale:t.$L,utc:t.$u,$offset:t.$offset})};var y=function(){function d(e){this.$L=this.$L||v(e.locale,null,!0),this.parse(e)}var h=d.prototype;return h.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(b.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(l);if(r)return n?new Date(Date.UTC(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)):new Date(r[1],r[2]-1,r[3]||1,r[4]||0,r[5]||0,r[6]||0,r[7]||0)}return new Date(t)}(e),this.init()},h.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},h.$utils=function(){return b},h.isValid=function(){return!("Invalid Date"===this.$d.toString())},h.isSame=function(e,t){var n=_(e);return this.startOf(t)<=n&&n<=this.endOf(t)},h.isAfter=function(e,t){return _(e)<this.startOf(t)},h.isBefore=function(e,t){return this.endOf(t)<_(e)},h.$g=function(e,t,n){return b.u(e)?this[t]:this.set(n,e)},h.year=function(e){return this.$g(e,"$y",c)},h.month=function(e){return this.$g(e,"$M",s)},h.day=function(e){return this.$g(e,"$W",i)},h.date=function(e){return this.$g(e,"$D","date")},h.hour=function(e){return this.$g(e,"$H",r)},h.minute=function(e){return this.$g(e,"$m",n)},h.second=function(e){return this.$g(e,"$s",t)},h.millisecond=function(t){return this.$g(t,"$ms",e)},h.unix=function(){return Math.floor(this.valueOf()/1e3)},h.valueOf=function(){return this.$d.getTime()},h.startOf=function(e,a){var l=this,u=!!b.u(a)||a,d=b.p(e),h=function(e,t){var n=b.w(l.$u?Date.UTC(l.$y,t,e):new Date(l.$y,t,e),l);return u?n:n.endOf(i)},f=function(e,t){return b.w(l.toDate()[e].apply(l.toDate("s"),(u?[0,0,0,0]:[23,59,59,999]).slice(t)),l)},p=this.$W,g=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(d){case c:return u?h(1,0):h(31,11);case s:return u?h(1,g):h(0,g+1);case o:var _=this.$locale().weekStart||0,y=(p<_?p+7:p)-_;return h(u?m-y:m+(6-y),g);case i:case"date":return f(v+"Hours",0);case r:return f(v+"Minutes",1);case n:return f(v+"Seconds",2);case t:return f(v+"Milliseconds",3);default:return this.clone()}},h.endOf=function(e){return this.startOf(e,!1)},h.$set=function(o,a){var l,u=b.p(o),d="set"+(this.$u?"UTC":""),h=(l={},l.day=d+"Date",l.date=d+"Date",l[s]=d+"Month",l[c]=d+"FullYear",l[r]=d+"Hours",l[n]=d+"Minutes",l[t]=d+"Seconds",l[e]=d+"Milliseconds",l)[u],f=u===i?this.$D+(a-this.$W):a;if(u===s||u===c){var p=this.clone().set("date",1);p.$d[h](f),p.init(),this.$d=p.set("date",Math.min(this.$D,p.daysInMonth())).$d}else h&&this.$d[h](f);return this.init(),this},h.set=function(e,t){return this.clone().$set(e,t)},h.get=function(e){return this[b.p(e)]()},h.add=function(e,a){var l,u=this;e=Number(e);var d=b.p(a),h=function(t){var n=_(u);return b.w(n.date(n.date()+Math.round(t*e)),u)};if(d===s)return this.set(s,this.$M+e);if(d===c)return this.set(c,this.$y+e);if(d===i)return h(1);if(d===o)return h(7);var f=(l={},l[n]=6e4,l[r]=36e5,l[t]=1e3,l)[d]||1,p=this.$d.getTime()+e*f;return b.w(p,this)},h.subtract=function(e,t){return this.add(-1*e,t)},h.format=function(e){var t=this;if(!this.isValid())return"Invalid Date";var n=e||"YYYY-MM-DDTHH:mm:ssZ",r=b.z(this),i=this.$locale(),o=this.$H,s=this.$m,a=this.$M,c=i.weekdays,l=i.months,d=function(e,r,i,o){return e&&(e[r]||e(t,n))||i[r].substr(0,o)},h=function(e){return b.s(o%12||12,e,"0")},f=i.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},p={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:b.s(a+1,2,"0"),MMM:d(i.monthsShort,a,l,3),MMMM:d(l,a),D:this.$D,DD:b.s(this.$D,2,"0"),d:String(this.$W),dd:d(i.weekdaysMin,this.$W,c,2),ddd:d(i.weekdaysShort,this.$W,c,3),dddd:c[this.$W],H:String(o),HH:b.s(o,2,"0"),h:h(1),hh:h(2),a:f(o,s,!0),A:f(o,s,!1),m:String(s),mm:b.s(s,2,"0"),s:String(this.$s),ss:b.s(this.$s,2,"0"),SSS:b.s(this.$ms,3,"0"),Z:r};return n.replace(u,(function(e,t){return t||p[e]||r.replace(":","")}))},h.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},h.diff=function(e,i,l){var u,d=b.p(i),h=_(e),f=6e4*(h.utcOffset()-this.utcOffset()),p=this-h,g=b.m(this,h);return g=(u={},u[c]=g/12,u[s]=g,u[a]=g/3,u[o]=(p-f)/6048e5,u.day=(p-f)/864e5,u[r]=p/36e5,u[n]=p/6e4,u[t]=p/1e3,u)[d]||p,l?g:b.a(g)},h.daysInMonth=function(){return this.endOf(s).$D},h.$locale=function(){return g[this.$L]},h.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=v(e,t,!0);return r&&(n.$L=r),n},h.clone=function(){return b.w(this.$d,this)},h.toDate=function(){return new Date(this.valueOf())},h.toJSON=function(){return this.isValid()?this.toISOString():null},h.toISOString=function(){return this.$d.toISOString()},h.toString=function(){return this.$d.toUTCString()},d}();return _.prototype=y.prototype,_.extend=function(e,t){return e(t,y,_),_},_.locale=v,_.isDayjs=m,_.unix=function(e){return _(1e3*e)},_.en=g[p],_.Ls=g,_}()},function(e,t,n){"use strict";var r=n(63),i="object"==typeof self&&self&&self.Object===Object&&self,o=r.a||i||Function("return this")();t.a=o},function(e,t,n){"use strict";function r(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;var n,r,s,l,u,d,h,f,p=new Array(80),g=1732584193,m=-271733879,v=-1732584194,_=271733878,b=-1009589776;for(n=0;n<e.length;n+=16){for(l=g,u=m,d=v,h=_,f=b,r=0;r<80;r++)p[r]=r<16?e[n+r]:c(p[r-3]^p[r-8]^p[r-14]^p[r-16],1),s=a(a(c(g,5),i(r,m,v,_)),a(a(b,p[r]),o(r))),b=_,_=v,v=c(m,30),m=g,g=s;g=a(g,l),m=a(m,u),v=a(v,d),_=a(_,h),b=a(b,f)}return[g,m,v,_,b]}function i(e,t,n,r){return e<20?t&n|~t&r:e<40?t^n^r:e<60?t&n|t&r|n&r:t^n^r}function o(e){return e<20?1518500249:e<40?1859775393:e<60?-1894007588:-899497514}function s(e,t){var n=l(e);n.length>16&&(n=r(n,8*e.length));for(var i=new Array(16),o=new Array(16),s=0;s<16;s++)i[s]=909522486^n[s],o[s]=1549556828^n[s];var a=r(i.concat(l(t)),512+8*t.length);return r(o.concat(a),672)}function a(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function c(e,t){return e<<t|e>>>32-t}function l(e){for(var t=[],n=0;n<8*e.length;n+=8)t[n>>5]|=(255&e.charCodeAt(n/8))<<24-n%32;return t}function u(e){for(var t,n,r="",i=0;i<4*e.length;i+=3)for(t=(e[i>>2]>>8*(3-i%4)&255)<<16|(e[i+1>>2]>>8*(3-(i+1)%4)&255)<<8|e[i+2>>2]>>8*(3-(i+2)%4)&255,n=0;n<4;n++)8*i+6*n>32*e.length?r+="=":r+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(t>>6*(3-n)&63);return r}function d(e){for(var t="",n=0;n<32*e.length;n+=8)t+=String.fromCharCode(e[n>>5]>>>24-n%32&255);return t}n.d(t,"a",(function(){return h}));const h={b64_hmac_sha1:function(e,t){return u(s(e,t))},b64_sha1:function(e){return u(r(l(e),8*e.length))},binb2str:d,core_hmac_sha1:s,str_hmac_sha1:function(e,t){return d(s(e,t))},str_sha1:function(e){return d(r(l(e),8*e.length))}}},function(e,t,n){var r=n(496),i=n(137),o=/[&<>"']/g,s=RegExp(o.source);e.exports=function(e){return(e=i(e))&&s.test(e)?e.replace(o,r):e}},function(e,t,n){"use strict";(function(e){n.d(t,"b",(function(){return r})),n.d(t,"a",(function(){return i})),n.d(t,"c",(function(){return o}));const r=function(){let t=e.WebSocket;if(void 0===t)try{t=n(499)}catch(e){throw new Error('You must install the "ws" package to use Strophe in nodejs.')}return t}();const i=function(){let t=e.DOMParser;if(void 0===t)try{t=n(47).DOMParser}catch(e){throw new Error('You must install the "xmldom" package to use Strophe in nodejs.')}return t}();function o(){if("undefined"==typeof document)try{return(new(0,n(47).DOMImplementation)).createDocument("jabber:client","strophe",null)}catch(e){throw new Error('You must install the "xmldom" package to use Strophe in nodejs.')}if(void 0===document.implementation.createDocument||document.implementation.createDocument&&document.documentMode&&document.documentMode<10){const e=function(){const e=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];for(let t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(e){}}();return e.appendChild(e.createElement("strophe")),e}return document.implementation.createDocument("jabber:client","strophe",null)}}).call(this,n(12))},function(e,t,n){"use strict";const r=n(330),i=n(331);e.exports={atob:r,btoa:i}},function(e,t,n){var r=n(96),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){"use strict";(function(e){var r=n(63),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.a.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();t.a=a}).call(this,n(69)(e))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return i}));!function(){let t=e.WebSocket;if(void 0===t)try{t=n(328)}catch(e){throw new Error('You must install the "ws" package to use Strophe in nodejs.')}}();const r=function(){let t=e.DOMParser;if(void 0===t)try{t=n(47).DOMParser}catch(e){throw new Error('You must install the "xmldom" package to use Strophe in nodejs.')}return t}();function i(){if("undefined"==typeof document)try{return(new(0,n(47).DOMImplementation)).createDocument("jabber:client","strophe",null)}catch(e){throw new Error('You must install the "xmldom" package to use Strophe in nodejs.')}if(void 0===document.implementation.createDocument||document.implementation.createDocument&&document.documentMode&&document.documentMode<10){const e=function(){const e=["Msxml2.DOMDocument.6.0","Msxml2.DOMDocument.5.0","Msxml2.DOMDocument.4.0","MSXML2.DOMDocument.3.0","MSXML2.DOMDocument","MSXML.DOMDocument","Microsoft.XMLDOM"];for(let t=0;t<e.length;t++)try{return new ActiveXObject(e[t])}catch(e){}}();return e.appendChild(e.createElement("strophe")),e}return document.implementation.createDocument("jabber:client","strophe",null)}}).call(this,n(12))},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){var r=n(144)("wks"),i=n(145),o=n(13).Symbol,s="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=s&&o[e]||(s?o:i)("Symbol."+e))}).store=r},function(e,t,n){!function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,(function(e){return i(t[s][1][e]||e)}),l,l.exports,e,t,n,r)}return n[s].exports}for(var o=!1,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,t,n){var r=e("cssfilter").FilterCSS,i=e("cssfilter").getDefaultWhiteList,o=e("./util");function s(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}}var a=new r;function c(e){return e.replace(l,"&lt;").replace(u,"&gt;")}var l=/</g,u=/>/g,d=/"/g,h=/&quot;/g,f=/&#([a-zA-Z0-9]*);?/gim,p=/&colon;?/gim,g=/&newline;?/gim,m=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,v=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,_=/u\s*r\s*l\s*\(.*/gi;function b(e){return e.replace(d,"&quot;")}function y(e){return e.replace(h,'"')}function w(e){return e.replace(f,(function(e,t){return"x"===t[0]||"X"===t[0]?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))}))}function S(e){return e.replace(p,":").replace(g," ")}function x(e){for(var t="",n=0,r=e.length;n<r;n++)t+=e.charCodeAt(n)<32?" ":e.charAt(n);return o.trim(t)}function E(e){return e=x(e=S(e=w(e=y(e))))}function A(e){return e=c(e=b(e))}var C=/<!--[\s\S]*?-->/g;n.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},n.getDefaultWhiteList=s,n.onTag=function(e,t,n){},n.onIgnoreTag=function(e,t,n){},n.onTagAttr=function(e,t,n){},n.onIgnoreTagAttr=function(e,t,n){},n.safeAttrValue=function(e,t,n,r){if(n=E(n),"href"===t||"src"===t){if("#"===(n=o.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"data:image/"!==n.substr(0,11)&&"ftp://"!==n.substr(0,6)&&"./"!==n.substr(0,2)&&"../"!==n.substr(0,3)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===t){if(m.lastIndex=0,m.test(n))return""}else if("style"===t){if(v.lastIndex=0,v.test(n))return"";if(_.lastIndex=0,_.test(n)&&(m.lastIndex=0,m.test(n)))return"";!1!==r&&(n=(r=r||a).process(n))}return n=A(n)},n.escapeHtml=c,n.escapeQuote=b,n.unescapeQuote=y,n.escapeHtmlEntities=w,n.escapeDangerHtml5Entities=S,n.clearNonPrintableCharacter=x,n.friendlyAttrValue=E,n.escapeAttrValue=A,n.onIgnoreTagStripAll=function(){return""},n.StripTagBody=function(e,t){"function"!=typeof t&&(t=function(){});var n=!Array.isArray(e),r=[],i=!1;return{onIgnoreTag:function(s,a,c){if(function(t){return!!n||-1!==o.indexOf(e,t)}(s)){if(c.isClosing){var l="[/removed]",u=c.position+l.length;return r.push([!1!==i?i:c.position,u]),i=!1,l}return i||(i=c.position),"[removed]"}return t(s,a,c)},remove:function(e){var t="",n=0;return o.forEach(r,(function(r){t+=e.slice(n,r[0]),n=r[1]})),t+=e.slice(n)}}},n.stripCommentTag=function(e){return e.replace(C,"")},n.stripBlankChar=function(e){var t=e.split("");return(t=t.filter((function(e){var t=e.charCodeAt(0);return 127!==t&&(!(t<=31)||(10===t||13===t))}))).join("")},n.cssFilter=a,n.getDefaultCSSWhiteList=i},{"./util":4,cssfilter:8}],2:[function(e,t,n){var r=e("./default"),i=e("./parser"),o=e("./xss");function s(e,t){return new o(t).process(e)}for(var a in(n=t.exports=s).filterXSS=s,n.FilterXSS=o,r)n[a]=r[a];for(var a in i)n[a]=i[a];"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)},{"./default":1,"./parser":3,"./xss":5}],3:[function(e,t,n){var r=e("./util");function i(e){var t=r.spaceIndex(e);if(-1===t)var n=e.slice(1,-1);else n=e.slice(1,t+1);return"/"===(n=r.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function o(e){return"</"===e.slice(0,2)}var s=/[^a-zA-Z0-9_:\.\-]/gim;function a(e,t){for(;t<e.length;t++){var n=e[t];if(" "!==n)return"="===n?t:-1}}function c(e,t){for(;t>0;t--){var n=e[t];if(" "!==n)return"="===n?t:-1}}function l(e){return function(e){return'"'===e[0]&&'"'===e[e.length-1]||"'"===e[0]&&"'"===e[e.length-1]}(e)?e.substr(1,e.length-2):e}n.parseTag=function(e,t,n){"use strict";var r="",s=0,a=!1,c=!1,l=0,u=e.length,d="",h="";for(l=0;l<u;l++){var f=e.charAt(l);if(!1===a){if("<"===f){a=l;continue}}else if(!1===c){if("<"===f){r+=n(e.slice(s,l)),a=l,s=l;continue}if(">"===f){r+=n(e.slice(s,a)),d=i(h=e.slice(a,l+1)),r+=t(a,r.length,d,h,o(h)),s=l+1,a=!1;continue}if(('"'===f||"'"===f)&&"="===e.charAt(l-1)){c=f;continue}}else if(f===c){c=!1;continue}}return s<e.length&&(r+=n(e.substr(s))),r},n.parseAttr=function(e,t){"use strict";var n=0,i=[],o=!1,u=e.length;function d(e,n){if(!((e=(e=r.trim(e)).replace(s,"").toLowerCase()).length<1)){var o=t(e,n||"");o&&i.push(o)}}for(var h=0;h<u;h++){var f,p=e.charAt(h);if(!1!==o||"="!==p)if(!1===o||h!==n||'"'!==p&&"'"!==p||"="!==e.charAt(h-1))if(/\s|\n|\t/.test(p)){if(e=e.replace(/\s|\n|\t/g," "),!1===o){if(-1===(f=a(e,h))){d(r.trim(e.slice(n,h))),o=!1,n=h+1;continue}h=f-1;continue}if(-1===(f=c(e,h-1))){d(o,l(r.trim(e.slice(n,h)))),o=!1,n=h+1;continue}}else;else{if(-1===(f=e.indexOf(p,h+1)))break;d(o,r.trim(e.slice(n+1,f))),o=!1,n=(h=f)+1}else o=e.slice(n,h),n=h+1}return n<e.length&&(!1===o?d(e.slice(n)):d(o,l(r.trim(e.slice(n))))),r.trim(i.join(" "))}},{"./util":4}],4:[function(e,t,n){t.exports={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}},{}],5:[function(e,t,n){var r=e("cssfilter").FilterCSS,i=e("./default"),o=e("./parser"),s=o.parseTag,a=o.parseAttr,c=e("./util");function l(e){return null==e}function u(e){(e=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{})).stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=i.onIgnoreTagStripAll),e.whiteList=e.whiteList||i.whiteList,e.onTag=e.onTag||i.onTag,e.onTagAttr=e.onTagAttr||i.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||i.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||i.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||i.safeAttrValue,e.escapeHtml=e.escapeHtml||i.escapeHtml,this.options=e,!1===e.css?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new r(e.css))}u.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,n=t.whiteList,r=t.onTag,o=t.onIgnoreTag,u=t.onTagAttr,d=t.onIgnoreTagAttr,h=t.safeAttrValue,f=t.escapeHtml,p=this.cssFilter;t.stripBlankChar&&(e=i.stripBlankChar(e)),t.allowCommentTag||(e=i.stripCommentTag(e));var g=!1;if(t.stripIgnoreTagBody){g=i.StripTagBody(t.stripIgnoreTagBody,o);o=g.onIgnoreTag}var m=s(e,(function(e,t,i,s,g){var m,v={sourcePosition:e,position:t,isClosing:g,isWhite:n.hasOwnProperty(i)};if(!l(m=r(i,s,v)))return m;if(v.isWhite){if(v.isClosing)return"</"+i+">";var _=function(e){var t=c.spaceIndex(e);if(-1===t)return{html:"",closing:"/"===e[e.length-2]};var n="/"===(e=c.trim(e.slice(t+1,-1)))[e.length-1];return n&&(e=c.trim(e.slice(0,-1))),{html:e,closing:n}}(s),b=n[i],y=a(_.html,(function(e,t){var n,r=-1!==c.indexOf(b,e);return l(n=u(i,e,t,r))?r?(t=h(i,e,t,p))?e+'="'+t+'"':e:l(n=d(i,e,t,r))?void 0:n:n}));s="<"+i;return y&&(s+=" "+y),_.closing&&(s+=" /"),s+=">"}return l(m=o(i,s,v))?f(s):m}),f);return g&&(m=g.remove(m)),m},t.exports=u},{"./default":1,"./parser":3,"./util":4,cssfilter:8}],6:[function(e,t,n){var r=e("./default"),i=e("./parser");e("./util");function o(e){return null==e}function s(e){(e=function(e){var t={};for(var n in e)t[n]=e[n];return t}(e||{})).whiteList=e.whiteList||r.whiteList,e.onAttr=e.onAttr||r.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||r.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||r.safeAttrValue,this.options=e}s.prototype.process=function(e){if(!(e=(e=e||"").toString()))return"";var t=this.options,n=t.whiteList,r=t.onAttr,s=t.onIgnoreAttr,a=t.safeAttrValue;return i(e,(function(e,t,i,c,l){var u=n[i],d=!1;if(!0===u?d=u:"function"==typeof u?d=u(c):u instanceof RegExp&&(d=u.test(c)),!0!==d&&(d=!1),c=a(i,c)){var h,f={position:t,sourcePosition:e,source:l,isWhite:d};return d?o(h=r(i,c,f))?i+":"+c:h:o(h=s(i,c,f))?void 0:h}}))},t.exports=s},{"./default":7,"./parser":9,"./util":10}],7:[function(e,t,n){function r(){var e={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return e}var i=/javascript\s*\:/gim;n.whiteList=r(),n.getDefaultWhiteList=r,n.onAttr=function(e,t,n){},n.onIgnoreAttr=function(e,t,n){},n.safeAttrValue=function(e,t){return i.test(t)?"":t}},{}],8:[function(e,t,n){var r=e("./default"),i=e("./css");for(var o in(n=t.exports=function(e,t){return new i(t).process(e)}).FilterCSS=i,r)n[o]=r[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)},{"./css":6,"./default":7}],9:[function(e,t,n){var r=e("./util");t.exports=function(e,t){";"!==(e=r.trimRight(e))[e.length-1]&&(e+=";");var n=e.length,i=!1,o=0,s=0,a="";function c(){if(!i){var n=r.trim(e.slice(o,s)),c=n.indexOf(":");if(-1!==c){var l=r.trim(n.slice(0,c)),u=r.trim(n.slice(c+1));if(l){var d=t(o,a.length,l,u,n);d&&(a+=d+"; ")}}}o=s+1}for(;s<n;s++){var l=e[s];if("/"===l&&"*"===e[s+1]){var u=e.indexOf("*/",s+2);if(-1===u)break;o=(s=u+1)+1,i=!1}else"("===l?i=!0:")"===l?i=!1:";"===l?i||c():"\n"===l&&c()}return r.trim(a)}},{"./util":10}],10:[function(e,t,n){t.exports={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,i;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,i=e.length;r<i;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}}},{}]},{},[2]),t.filterXSS=filterXSS,t.filterCSS=filterCSS},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){"use strict";(function(e){var r=n(6),i=n(159),o="object"==typeof exports&&exports&&!exports.nodeType&&exports,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.a.Buffer:void 0,c=(a?a.isBuffer:void 0)||i.a;t.a=c}).call(this,n(69)(e))},function(e,t,n){(function(t){e.exports=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var c=new Error("Cannot find module '"+s+"'");throw c.code="MODULE_NOT_FOUND",c}var l=n[s]={exports:{}};t[s][0].call(l.exports,(function(e){var n=t[s][1][e];return i(n||e)}),l,l.exports,e,t,n,r)}return n[s].exports}for(var o=!1,s=0;s<r.length;s++)i(r[s]);return i}({1:[function(e,n,r){(function(e){"use strict";var t,r,i=e.MutationObserver||e.WebKitMutationObserver;if(i){var o=0,s=new i(u),a=e.document.createTextNode("");s.observe(a,{characterData:!0}),t=function(){a.data=o=++o%2}}else if(e.setImmediate||void 0===e.MessageChannel)t="document"in e&&"onreadystatechange"in e.document.createElement("script")?function(){var t=e.document.createElement("script");t.onreadystatechange=function(){u(),t.onreadystatechange=null,t.parentNode.removeChild(t),t=null},e.document.documentElement.appendChild(t)}:function(){setTimeout(u,0)};else{var c=new e.MessageChannel;c.port1.onmessage=u,t=function(){c.port2.postMessage(0)}}var l=[];function u(){var e,t;r=!0;for(var n=l.length;n;){for(t=l,l=[],e=-1;++e<n;)t[e]();n=l.length}r=!1}n.exports=function(e){1!==l.push(e)||r||t()}}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],2:[function(e,t,n){"use strict";var r=e(1);function i(){}var o={},s=["REJECTED"],a=["FULFILLED"],c=["PENDING"];function l(e){if("function"!=typeof e)throw new TypeError("resolver must be a function");this.state=c,this.queue=[],this.outcome=void 0,e!==i&&f(this,e)}function u(e,t,n){this.promise=e,"function"==typeof t&&(this.onFulfilled=t,this.callFulfilled=this.otherCallFulfilled),"function"==typeof n&&(this.onRejected=n,this.callRejected=this.otherCallRejected)}function d(e,t,n){r((function(){var r;try{r=t(n)}catch(t){return o.reject(e,t)}r===e?o.reject(e,new TypeError("Cannot resolve promise with itself")):o.resolve(e,r)}))}function h(e){var t=e&&e.then;if(e&&("object"==typeof e||"function"==typeof e)&&"function"==typeof t)return function(){t.apply(e,arguments)}}function f(e,t){var n=!1;function r(t){n||(n=!0,o.reject(e,t))}function i(t){n||(n=!0,o.resolve(e,t))}var s=p((function(){t(i,r)}));"error"===s.status&&r(s.value)}function p(e,t){var n={};try{n.value=e(t),n.status="success"}catch(e){n.status="error",n.value=e}return n}t.exports=l,l.prototype.catch=function(e){return this.then(null,e)},l.prototype.then=function(e,t){if("function"!=typeof e&&this.state===a||"function"!=typeof t&&this.state===s)return this;var n=new this.constructor(i);return this.state!==c?d(n,this.state===a?e:t,this.outcome):this.queue.push(new u(n,e,t)),n},u.prototype.callFulfilled=function(e){o.resolve(this.promise,e)},u.prototype.otherCallFulfilled=function(e){d(this.promise,this.onFulfilled,e)},u.prototype.callRejected=function(e){o.reject(this.promise,e)},u.prototype.otherCallRejected=function(e){d(this.promise,this.onRejected,e)},o.resolve=function(e,t){var n=p(h,t);if("error"===n.status)return o.reject(e,n.value);var r=n.value;if(r)f(e,r);else{e.state=a,e.outcome=t;for(var i=-1,s=e.queue.length;++i<s;)e.queue[i].callFulfilled(t)}return e},o.reject=function(e,t){e.state=s,e.outcome=t;for(var n=-1,r=e.queue.length;++n<r;)e.queue[n].callRejected(t);return e},l.resolve=function(e){return e instanceof this?e:o.resolve(new this(i),e)},l.reject=function(e){var t=new this(i);return o.reject(t,e)},l.all=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s=new Array(n),a=0,c=-1,l=new this(i);++c<n;)u(e[c],c);return l;function u(e,i){t.resolve(e).then((function(e){s[i]=e,++a!==n||r||(r=!0,o.resolve(l,s))}),(function(e){r||(r=!0,o.reject(l,e))}))}},l.race=function(e){var t=this;if("[object Array]"!==Object.prototype.toString.call(e))return this.reject(new TypeError("must be an array"));var n=e.length,r=!1;if(!n)return this.resolve([]);for(var s,a=-1,c=new this(i);++a<n;)s=e[a],t.resolve(s).then((function(e){r||(r=!0,o.resolve(c,e))}),(function(e){r||(r=!0,o.reject(c,e))}));return c}},{1:1}],3:[function(e,n,r){(function(t){"use strict";"function"!=typeof t.Promise&&(t.Promise=e(2))}).call(this,void 0!==t?t:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{2:2}],4:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){try{if("undefined"!=typeof indexedDB)return indexedDB;if("undefined"!=typeof webkitIndexedDB)return webkitIndexedDB;if("undefined"!=typeof mozIndexedDB)return mozIndexedDB;if("undefined"!=typeof OIndexedDB)return OIndexedDB;if("undefined"!=typeof msIndexedDB)return msIndexedDB}catch(e){return}}();function o(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}}"undefined"==typeof Promise&&e(3);var s=Promise;function a(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))}function c(e,t,n){"function"==typeof t&&e.then(t),"function"==typeof n&&e.catch(n)}function l(e){return"string"!=typeof e&&(console.warn(e+" used as a key, but it is not a string."),e=String(e)),e}function u(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}var d=void 0,h={},f=Object.prototype.toString;function p(e){return"boolean"==typeof d?s.resolve(d):function(e){return new s((function(t){var n=e.transaction("local-forage-detect-blob-support","readwrite"),r=o([""]);n.objectStore("local-forage-detect-blob-support").put(r,"key"),n.onabort=function(e){e.preventDefault(),e.stopPropagation(),t(!1)},n.oncomplete=function(){var e=navigator.userAgent.match(/Chrome\/(\d+)/),n=navigator.userAgent.match(/Edge\//);t(n||!e||parseInt(e[1],10)>=43)}})).catch((function(){return!1}))}(e).then((function(e){return d=e}))}function g(e){var t=h[e.name],n={};n.promise=new s((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function m(e){var t=h[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function v(e,t){var n=h[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function _(e,t){return new s((function(n,r){if(h[e.name]=h[e.name]||{forages:[],db:null,dbReady:null,deferredOperations:[]},e.db){if(!t)return n(e.db);g(e),e.db.close()}var o=[e.name];t&&o.push(e.version);var s=i.open.apply(i,o);t&&(s.onupgradeneeded=function(t){var n=s.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore("local-forage-detect-blob-support")}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),s.onerror=function(e){e.preventDefault(),r(s.error)},s.onsuccess=function(){n(s.result),m(e)}}))}function b(e){return _(e,!1)}function y(e){return _(e,!0)}function w(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),r=e.version<e.db.version,i=e.version>e.db.version;if(r&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),i||n){if(n){var o=e.db.version+1;o>e.version&&(e.version=o)}return!0}return!1}function S(e){return o([function(e){for(var t=e.length,n=new ArrayBuffer(t),r=new Uint8Array(n),i=0;i<t;i++)r[i]=e.charCodeAt(i);return n}(atob(e.data))],{type:e.type})}function x(e){return e&&e.__local_forage_encoded_blob}function E(e){var t=this,n=t._initReady().then((function(){var e=h[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return c(n,e,e),n}function A(e,t,n,r){void 0===r&&(r=1);try{var i=e.db.transaction(e.storeName,t);n(null,i)}catch(i){if(r>0&&(!e.db||"InvalidStateError"===i.name||"NotFoundError"===i.name))return s.resolve().then((function(){if(!e.db||"NotFoundError"===i.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),y(e)})).then((function(){return function(e){g(e);for(var t=h[e.name],n=t.forages,r=0;r<n.length;r++){var i=n[r];i._dbInfo.db&&(i._dbInfo.db.close(),i._dbInfo.db=null)}return e.db=null,b(e).then((function(t){return e.db=t,w(e)?y(e):t})).then((function(r){e.db=t.db=r;for(var i=0;i<n.length;i++)n[i]._dbInfo.db=r})).catch((function(t){throw v(e,t),t}))}(e).then((function(){A(e,t,n,r-1)}))})).catch(n);n(i)}}var C={_driver:"asyncStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]=e[r];var i=h[n.name];i||(i={forages:[],db:null,dbReady:null,deferredOperations:[]},h[n.name]=i),i.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=E);var o=[];function a(){return s.resolve()}for(var c=0;c<i.forages.length;c++){var l=i.forages[c];l!==t&&o.push(l._initReady().catch(a))}var u=i.forages.slice(0);return s.all(o).then((function(){return n.db=i.db,b(n)})).then((function(e){return n.db=e,w(n,t._defaultConfig.version)?y(n):e})).then((function(e){n.db=i.db=e,t._dbInfo=n;for(var r=0;r<u.length;r++){var o=u[r];o!==t&&(o._dbInfo.db=n.db,o._dbInfo.version=n.version)}}))},_support:function(){try{if(!i||!i.open)return!1;var e="undefined"!=typeof openDatabase&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),t="function"==typeof fetch&&-1!==fetch.toString().indexOf("[native code");return(!e||t)&&"undefined"!=typeof indexedDB&&"undefined"!=typeof IDBKeyRange}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=new s((function(t,r){n.ready().then((function(){A(n._dbInfo,"readonly",(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).openCursor(),a=1;s.onsuccess=function(){var n=s.result;if(n){var r=n.value;x(r)&&(r=S(r));var i=e(r,n.key,a++);void 0!==i?t(i):n.continue()}else t()},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return a(r,t),r},getItem:function(e,t){var n=this;e=l(e);var r=new s((function(t,r){n.ready().then((function(){A(n._dbInfo,"readonly",(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).get(e);s.onsuccess=function(){var e=s.result;void 0===e&&(e=null),x(e)&&(e=S(e)),t(e)},s.onerror=function(){r(s.error)}}catch(e){r(e)}}))})).catch(r)}));return a(r,t),r},setItem:function(e,t,n){var r=this;e=l(e);var i=new s((function(n,i){var o;r.ready().then((function(){return o=r._dbInfo,"[object Blob]"===f.call(t)?p(o.db).then((function(e){return e?t:(n=t,new s((function(e,t){var r=new FileReader;r.onerror=t,r.onloadend=function(t){var r=btoa(t.target.result||"");e({__local_forage_encoded_blob:!0,data:r,type:n.type})},r.readAsBinaryString(n)})));var n})):t})).then((function(t){A(r._dbInfo,"readwrite",(function(o,s){if(o)return i(o);try{var a=s.objectStore(r._dbInfo.storeName);null===t&&(t=void 0);var c=a.put(t,e);s.oncomplete=function(){void 0===t&&(t=null),n(t)},s.onabort=s.onerror=function(){var e=c.error?c.error:c.transaction.error;i(e)}}catch(e){i(e)}}))})).catch(i)}));return a(i,n),i},removeItem:function(e,t){var n=this;e=l(e);var r=new s((function(t,r){n.ready().then((function(){A(n._dbInfo,"readwrite",(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName).delete(e);o.oncomplete=function(){t()},o.onerror=function(){r(s.error)},o.onabort=function(){var e=s.error?s.error:s.transaction.error;r(e)}}catch(e){r(e)}}))})).catch(r)}));return a(r,t),r},clear:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){A(t._dbInfo,"readwrite",(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).clear();i.oncomplete=function(){e()},i.onabort=i.onerror=function(){var e=o.error?o.error:o.transaction.error;n(e)}}catch(e){n(e)}}))})).catch(n)}));return a(n,e),n},length:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){A(t._dbInfo,"readonly",(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).count();o.onsuccess=function(){e(o.result)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,e),n},key:function(e,t){var n=this,r=new s((function(t,r){e<0?t(null):n.ready().then((function(){A(n._dbInfo,"readonly",(function(i,o){if(i)return r(i);try{var s=o.objectStore(n._dbInfo.storeName),a=!1,c=s.openKeyCursor();c.onsuccess=function(){var n=c.result;n?0===e||a?t(n.key):(a=!0,n.advance(e)):t(null)},c.onerror=function(){r(c.error)}}catch(e){r(e)}}))})).catch(r)}));return a(r,t),r},keys:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){A(t._dbInfo,"readonly",(function(r,i){if(r)return n(r);try{var o=i.objectStore(t._dbInfo.storeName).openKeyCursor(),s=[];o.onsuccess=function(){var t=o.result;t?(s.push(t.key),t.continue()):e(s)},o.onerror=function(){n(o.error)}}catch(e){n(e)}}))})).catch(n)}));return a(n,e),n},dropInstance:function(e,t){t=u.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,o=this;if(e.name){var c=e.name===n.name&&o._dbInfo.db,l=c?s.resolve(o._dbInfo.db):b(e).then((function(t){var n=h[e.name],r=n.forages;n.db=t;for(var i=0;i<r.length;i++)r[i]._dbInfo.db=t;return t}));r=e.storeName?l.then((function(t){if(t.objectStoreNames.contains(e.storeName)){var n=t.version+1;g(e);var r=h[e.name],o=r.forages;t.close();for(var a=0;a<o.length;a++){var c=o[a];c._dbInfo.db=null,c._dbInfo.version=n}return new s((function(t,r){var o=i.open(e.name,n);o.onerror=function(e){o.result.close(),r(e)},o.onupgradeneeded=function(){o.result.deleteObjectStore(e.storeName)},o.onsuccess=function(){var e=o.result;e.close(),t(e)}})).then((function(e){r.db=e;for(var t=0;t<o.length;t++){var n=o[t];n._dbInfo.db=e,m(n._dbInfo)}})).catch((function(t){throw(v(e,t)||s.resolve()).catch((function(){})),t}))}})):l.then((function(t){g(e);var n=h[e.name],r=n.forages;t.close();for(var o=0;o<r.length;o++)r[o]._dbInfo.db=null;return new s((function(t,n){var r=i.deleteDatabase(e.name);r.onerror=r.onblocked=function(e){var t=r.result;t&&t.close(),n(e)},r.onsuccess=function(){var e=r.result;e&&e.close(),t(e)}})).then((function(e){n.db=e;for(var t=0;t<r.length;t++)m(r[t]._dbInfo)})).catch((function(t){throw(v(e,t)||s.resolve()).catch((function(){})),t}))}))}else r=s.reject("Invalid arguments");return a(r,t),r}},j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=/^~~local_forage_type~([^~]+)~/,O="__lfsc__:".length,k=O+"arbf".length,N=Object.prototype.toString;function I(e){var t,n,r,i,o,s=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),u=new Uint8Array(l);for(t=0;t<a;t+=4)n=j.indexOf(e[t]),r=j.indexOf(e[t+1]),i=j.indexOf(e[t+2]),o=j.indexOf(e[t+3]),u[c++]=n<<2|r>>4,u[c++]=(15&r)<<4|i>>2,u[c++]=(3&i)<<6|63&o;return l}function M(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=j[n[t]>>2],r+=j[(3&n[t])<<4|n[t+1]>>4],r+=j[(15&n[t+1])<<2|n[t+2]>>6],r+=j[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var R={serialize:function(e,t){var n="";if(e&&(n=N.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===N.call(e.buffer))){var r,i="__lfsc__:";e instanceof ArrayBuffer?(r=e,i+="arbf"):(r=e.buffer,"[object Int8Array]"===n?i+="si08":"[object Uint8Array]"===n?i+="ui08":"[object Uint8ClampedArray]"===n?i+="uic8":"[object Int16Array]"===n?i+="si16":"[object Uint16Array]"===n?i+="ur16":"[object Int32Array]"===n?i+="si32":"[object Uint32Array]"===n?i+="ui32":"[object Float32Array]"===n?i+="fl32":"[object Float64Array]"===n?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+M(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+M(this.result);t("__lfsc__:blob"+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,O))return JSON.parse(e);var t,n=e.substring(k),r=e.substring(O,k);if("blob"===r&&T.test(n)){var i=n.match(T);t=i[1],n=n.substring(i[0].length)}var s=I(n);switch(r){case"arbf":return s;case"blob":return o([s],{type:t});case"si08":return new Int8Array(s);case"ui08":return new Uint8Array(s);case"uic8":return new Uint8ClampedArray(s);case"si16":return new Int16Array(s);case"ur16":return new Uint16Array(s);case"si32":return new Int32Array(s);case"ui32":return new Uint32Array(s);case"fl32":return new Float32Array(s);case"fl64":return new Float64Array(s);default:throw new Error("Unkown type: "+r)}},stringToBuffer:I,bufferToString:M};function D(e,t,n,r){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,r)}function P(e,t,n,r,i,o){e.executeSql(n,r,i,(function(e,s){s.code===s.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?o(e,s):D(e,t,(function(){e.executeSql(n,r,i,o)}),o)}),o):o(e,s)}),o)}function L(e,t,n,r){var i=this;e=l(e);var o=new s((function(o,s){i.ready().then((function(){void 0===t&&(t=null);var a=t,c=i._dbInfo;c.serializer.serialize(t,(function(t,l){l?s(l):c.db.transaction((function(n){P(n,c,"INSERT OR REPLACE INTO "+c.storeName+" (key, value) VALUES (?, ?)",[e,t],(function(){o(a)}),(function(e,t){s(t)}))}),(function(t){if(t.code===t.QUOTA_ERR){if(r>0)return void o(L.apply(i,[e,a,n,r-1]));s(t)}}))}))})).catch(s)}));return a(o,n),o}function z(e){return new s((function(t,n){e.transaction((function(r){r.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],(function(n,r){for(var i=[],o=0;o<r.rows.length;o++)i.push(r.rows.item(o).name);t({db:e,storeNames:i})}),(function(e,t){n(t)}))}),(function(e){n(e)}))}))}var F={_driver:"webSQLStorage",_initStorage:function(e){var t=this,n={db:null};if(e)for(var r in e)n[r]="string"!=typeof e[r]?e[r].toString():e[r];var i=new s((function(e,r){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return r(e)}n.db.transaction((function(i){D(i,n,(function(){t._dbInfo=n,e()}),(function(e,t){r(t)}))}),r)}));return n.serializer=R,i},_support:"function"==typeof openDatabase,iterate:function(e,t){var n=this,r=new s((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){P(n,i,"SELECT * FROM "+i.storeName,[],(function(n,r){for(var o=r.rows,s=o.length,a=0;a<s;a++){var c=o.item(a),l=c.value;if(l&&(l=i.serializer.deserialize(l)),void 0!==(l=e(l,c.key,a+1)))return void t(l)}t()}),(function(e,t){r(t)}))}))})).catch(r)}));return a(r,t),r},getItem:function(e,t){var n=this;e=l(e);var r=new s((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){P(n,i,"SELECT * FROM "+i.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var r=n.rows.length?n.rows.item(0).value:null;r&&(r=i.serializer.deserialize(r)),t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return a(r,t),r},setItem:function(e,t,n){return L.apply(this,[e,t,n,1])},removeItem:function(e,t){var n=this;e=l(e);var r=new s((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){P(n,i,"DELETE FROM "+i.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){r(t)}))}))})).catch(r)}));return a(r,t),r},clear:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){P(t,r,"DELETE FROM "+r.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,e),n},length:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){P(t,r,"SELECT COUNT(key) as c FROM "+r.storeName,[],(function(t,n){var r=n.rows.item(0).c;e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,e),n},key:function(e,t){var n=this,r=new s((function(t,r){n.ready().then((function(){var i=n._dbInfo;i.db.transaction((function(n){P(n,i,"SELECT key FROM "+i.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var r=n.rows.length?n.rows.item(0).key:null;t(r)}),(function(e,t){r(t)}))}))})).catch(r)}));return a(r,t),r},keys:function(e){var t=this,n=new s((function(e,n){t.ready().then((function(){var r=t._dbInfo;r.db.transaction((function(t){P(t,r,"SELECT key FROM "+r.storeName,[],(function(t,n){for(var r=[],i=0;i<n.rows.length;i++)r.push(n.rows.item(i).key);e(r)}),(function(e,t){n(t)}))}))})).catch(n)}));return a(n,e),n},dropInstance:function(e,t){t=u.apply(this,arguments);var n=this.config();(e="function"!=typeof e&&e||{}).name||(e.name=e.name||n.name,e.storeName=e.storeName||n.storeName);var r,i=this;return a(r=e.name?new s((function(t){var r;r=e.name===n.name?i._dbInfo.db:openDatabase(e.name,"","",0),e.storeName?t({db:r,storeNames:[e.storeName]}):t(z(r))})).then((function(e){return new s((function(t,n){e.db.transaction((function(r){function i(e){return new s((function(t,n){r.executeSql("DROP TABLE IF EXISTS "+e,[],(function(){t()}),(function(e,t){n(t)}))}))}for(var o=[],a=0,c=e.storeNames.length;a<c;a++)o.push(i(e.storeNames[a]));s.all(o).then((function(){t()})).catch((function(e){n(e)}))}),(function(e){n(e)}))}))})):s.reject("Invalid arguments"),t),r}};function B(e,t){var n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}function q(){return!function(){try{return localStorage.setItem("_localforage_support_test",!0),localStorage.removeItem("_localforage_support_test"),!1}catch(e){return!0}}()||localStorage.length>0}var H={_driver:"localStorageWrapper",_initStorage:function(e){var t={};if(e)for(var n in e)t[n]=e[n];return t.keyPrefix=B(e,this._defaultConfig),q()?(this._dbInfo=t,t.serializer=R,s.resolve()):s.reject()},_support:function(){try{return"undefined"!=typeof localStorage&&"setItem"in localStorage&&!!localStorage.setItem}catch(e){return!1}}(),iterate:function(e,t){var n=this,r=n.ready().then((function(){for(var t=n._dbInfo,r=t.keyPrefix,i=r.length,o=localStorage.length,s=1,a=0;a<o;a++){var c=localStorage.key(a);if(0===c.indexOf(r)){var l=localStorage.getItem(c);if(l&&(l=t.serializer.deserialize(l)),void 0!==(l=e(l,c.substring(i),s++)))return l}}}));return a(r,t),r},getItem:function(e,t){var n=this;e=l(e);var r=n.ready().then((function(){var t=n._dbInfo,r=localStorage.getItem(t.keyPrefix+e);return r&&(r=t.serializer.deserialize(r)),r}));return a(r,t),r},setItem:function(e,t,n){var r=this;e=l(e);var i=r.ready().then((function(){void 0===t&&(t=null);var n=t;return new s((function(i,o){var s=r._dbInfo;s.serializer.serialize(t,(function(t,r){if(r)o(r);else try{localStorage.setItem(s.keyPrefix+e,t),i(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||o(e),o(e)}}))}))}));return a(i,n),i},removeItem:function(e,t){var n=this;e=l(e);var r=n.ready().then((function(){var t=n._dbInfo;localStorage.removeItem(t.keyPrefix+e)}));return a(r,t),r},clear:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var r=localStorage.key(n);0===r.indexOf(e)&&localStorage.removeItem(r)}}));return a(n,e),n},length:function(e){var t=this.keys().then((function(e){return e.length}));return a(t,e),t},key:function(e,t){var n=this,r=n.ready().then((function(){var t,r=n._dbInfo;try{t=localStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(r.keyPrefix.length)),t}));return a(r,t),r},keys:function(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo,n=localStorage.length,r=[],i=0;i<n;i++){var o=localStorage.key(i);0===o.indexOf(e.keyPrefix)&&r.push(o.substring(e.keyPrefix.length))}return r}));return a(n,e),n},dropInstance:function(e,t){if(t=u.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){var n=this.config();e.name=e.name||n.name,e.storeName=e.storeName||n.storeName}var r,i=this;return a(r=e.name?new s((function(t){e.storeName?t(B(e,i._defaultConfig)):t(e.name+"/")})).then((function(e){for(var t=localStorage.length-1;t>=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):s.reject("Invalid arguments"),t),r}},U=function(e,t){for(var n,r,i=e.length,o=0;o<i;){if((n=e[o])===(r=t)||"number"==typeof n&&"number"==typeof r&&isNaN(n)&&isNaN(r))return!0;o++}return!1},$=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},W={},G={},V={INDEXEDDB:C,WEBSQL:F,LOCALSTORAGE:H},J=[V.INDEXEDDB._driver,V.WEBSQL._driver,V.LOCALSTORAGE._driver],X=["dropInstance"],Q=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(X),Y={description:"",driver:J.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function K(e,t){e[t]=function(){var n=arguments;return e.ready().then((function(){return e[t].apply(e,n)}))}}function Z(){for(var e=1;e<arguments.length;e++){var t=arguments[e];if(t)for(var n in t)t.hasOwnProperty(n)&&($(t[n])?arguments[0][n]=t[n].slice():arguments[0][n]=t[n])}return arguments[0]}var ee=new(function(){function e(t){for(var n in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),V)if(V.hasOwnProperty(n)){var r=V[n],i=r._driver;this[n]=i,W[i]||this.defineDriver(r)}this._defaultConfig=Z({},Y),this._config=Z({},this._defaultConfig,t),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch((function(){}))}return e.prototype.config=function(e){if("object"===(void 0===e?"undefined":r(e))){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var t in e){if("storeName"===t&&(e[t]=e[t].replace(/\W/g,"_")),"version"===t&&"number"!=typeof e[t])return new Error("Database version must be a number.");this._config[t]=e[t]}return!("driver"in e)||!e.driver||this.setDriver(this._config.driver)}return"string"==typeof e?this._config[e]:this._config},e.prototype.defineDriver=function(e,t,n){var r=new s((function(t,n){try{var r=e._driver,i=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!e._driver)return void n(i);for(var o=Q.concat("_initStorage"),c=0,l=o.length;c<l;c++){var u=o[c];if((!U(X,u)||e[u])&&"function"!=typeof e[u])return void n(i)}!function(){for(var t=function(e){return function(){var t=new Error("Method "+e+" is not implemented by the current driver"),n=s.reject(t);return a(n,arguments[arguments.length-1]),n}},n=0,r=X.length;n<r;n++){var i=X[n];e[i]||(e[i]=t(i))}}();var d=function(n){W[r]&&console.info("Redefining LocalForage driver: "+r),W[r]=e,G[r]=n,t()};"_support"in e?e._support&&"function"==typeof e._support?e._support().then(d,n):d(!!e._support):d(!0)}catch(e){n(e)}}));return c(r,t,n),r},e.prototype.driver=function(){return this._driver||null},e.prototype.getDriver=function(e,t,n){var r=W[e]?s.resolve(W[e]):s.reject(new Error("Driver not found."));return c(r,t,n),r},e.prototype.getSerializer=function(e){var t=s.resolve(R);return c(t,e),t},e.prototype.ready=function(e){var t=this,n=t._driverSet.then((function(){return null===t._ready&&(t._ready=t._initDriver()),t._ready}));return c(n,e,e),n},e.prototype.setDriver=function(e,t,n){var r=this;$(e)||(e=[e]);var i=this._getSupportedDrivers(e);function o(){r._config.driver=r.driver()}function a(e){return r._extend(e),o(),r._ready=r._initStorage(r._config),r._ready}var l=null!==this._driverSet?this._driverSet.catch((function(){return s.resolve()})):s.resolve();return this._driverSet=l.then((function(){var e=i[0];return r._dbInfo=null,r._ready=null,r.getDriver(e).then((function(e){r._driver=e._driver,o(),r._wrapLibraryMethodsWithReady(),r._initDriver=function(e){return function(){var t=0;return function n(){for(;t<e.length;){var i=e[t];return t++,r._dbInfo=null,r._ready=null,r.getDriver(i).then(a).catch(n)}o();var c=new Error("No available storage method found.");return r._driverSet=s.reject(c),r._driverSet}()}}(i)}))})).catch((function(){o();var e=new Error("No available storage method found.");return r._driverSet=s.reject(e),r._driverSet})),c(this._driverSet,t,n),this._driverSet},e.prototype.supports=function(e){return!!G[e]},e.prototype._extend=function(e){Z(this,e)},e.prototype._getSupportedDrivers=function(e){for(var t=[],n=0,r=e.length;n<r;n++){var i=e[n];this.supports(i)&&t.push(i)}return t},e.prototype._wrapLibraryMethodsWithReady=function(){for(var e=0,t=Q.length;e<t;e++)K(this,Q[e])},e.prototype.createInstance=function(t){return new e(t)},e}());t.exports=ee},{3:3}]},{},[4])(4)}).call(this,n(12))},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){"use strict";(function(e){n(498),n(158),n(500);var r=n(2);n.d(t,"b",(function(){return r.d})),n.d(t,"a",(function(){return r.b})),e.$build=r.e.$build,e.$iq=r.e.$iq,e.$msg=r.e.$msg,e.$pres=r.e.$pres,e.Strophe=r.e.Strophe;const{b64_sha1:i}=r.c}).call(this,n(12))},function(e,t,n){var r=n(49),i=n(335),o=n(336),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},function(e,t,n){var r=n(353),i=n(356);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(41);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},,function(e,t,n){var r=n(62),i=n(71);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t,n){var r=n(13),i=n(19),o=n(58),s=n(31),a=n(60),c=function(e,t,n){var l,u,d,h=e&c.F,f=e&c.G,p=e&c.S,g=e&c.P,m=e&c.B,v=e&c.W,_=f?i:i[t]||(i[t]={}),b=_.prototype,y=f?r:p?r[t]:(r[t]||{}).prototype;for(l in f&&(n=t),n)(u=!h&&y&&void 0!==y[l])&&a(_,l)||(d=u?y[l]:n[l],_[l]=f&&"function"!=typeof y[l]?n[l]:m&&u?o(d,r):v&&y[l]==d?function(e){var t=function(t,n,r){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,r)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(d):g&&"function"==typeof d?o(Function.call,d):d,g&&((_.virtual||(_.virtual={}))[l]=d,e&c.R&&b&&!b[l]&&s(b,l,d)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},function(e,t,n){var r=n(40),i=n(140);e.exports=n(32)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){e.exports=!n(82)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(98),i=n(102),o=n(29);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t,n){(function(n){var r,i,o;i=[],void 0===(o="function"==typeof(r=function(){"use strict";var e=void 0!==n?n:this||window,t=document,r=t.documentElement,i="body",o=e.BSN={},s=o.supports=[],a="data-toggle",c="delay",l="target",u="animation",d="onmouseleave"in t?["mouseenter","mouseleave"]:["mouseover","mouseout"],h="getAttribute",f="setAttribute",p="parentNode",g="length",m="style",v="push",_="active",b="left",y="top",w=/\b(top|bottom|left|right)+/,S=0,x="WebkitTransition"in r[m]||"Transition".toLowerCase()in r[m],E="WebkitTransition"in r[m]?"Webkit".toLowerCase()+"TransitionEnd":"Transition".toLowerCase()+"end",A="WebkitDuration"in r[m]?"Webkit".toLowerCase()+"TransitionDuration":"Transition".toLowerCase()+"Duration",C=function(e){e.focus?e.focus():e.setActive()},j=function(e,t){e.classList.add(t)},T=function(e,t){e.classList.remove(t)},O=function(e,t){return e.classList.contains(t)},k=function(e,t){return[].slice.call(e.getElementsByClassName(t))},N=function(e,n){return"object"==typeof e?e:(n||t).querySelector(e)},I=function(e,n){var r=n.charAt(0),i=n.substr(1);if("."===r){for(;e&&e!==t;e=e[p])if(null!==N(n,e[p])&&O(e,i))return e}else if("#"===r)for(;e&&e!==t;e=e[p])if(e.id===i)return e;return!1},M=function(e,t,n,r){r=r||!1,e.addEventListener(t,n,r)},R=function(e,t,n,r){r=r||!1,e.removeEventListener(t,n,r)},D=function(e,t,n,r){M(e,t,(function i(o){n(o),R(e,t,i,r)}),r)},P=!!function(){var t=!1;try{var n=Object.defineProperty({},"passive",{get:function(){t=!0}});D(e,"testPassive",null,n)}catch(e){}return t}()&&{passive:!0},L=function(t){var n=x?e.getComputedStyle(t)[A]:0;return n="number"!=typeof(n=parseFloat(n))||isNaN(n)?0:1e3*n},z=function(e,t){var n=0;L(e)?D(e,E,(function(e){!n&&t(e),n=1})):setTimeout((function(){!n&&t(),n=1}),17)},F=function(e,t,n){var r=new CustomEvent(e+".bs."+t);r.relatedTarget=n,this.dispatchEvent(r)},B=function(n,o,s,a){var c,l,u,d,h,f,p=o.offsetWidth,g=o.offsetHeight,v=r.clientWidth||t[i].clientWidth,_=r.clientHeight||t[i].clientHeight,S=n.getBoundingClientRect(),x=a===t[i]?{y:e.pageYOffset||r.scrollTop,x:e.pageXOffset||r.scrollLeft}:{x:a.offsetLeft+a.scrollLeft,y:a.offsetTop+a.scrollTop},E=S.right-S[b],A=S.bottom-S.top,C=O(o,"popover"),j=N(".arrow",o),T=S.top+A/2-g/2<0,k=S[b]+E/2-p/2<0,I=S[b]+p/2+E/2>=v,M=S.top+g/2+A/2>=_,R=S.top-g<0,D=S[b]-p<0,P=S.top+g+A>=_,L=S[b]+p+E>=v;s="right"===(s=(s="bottom"===(s=(s=(s===b||"right"===s)&&D&&L?y:s)===y&&R?"bottom":s)&&P?y:s)===b&&D?"right":s)&&L?b:s,-1===o.className.indexOf(s)&&(o.className=o.className.replace(w,s)),h=j.offsetWidth,f=j.offsetHeight,s===b||"right"===s?(l=s===b?S[b]+x.x-p-(C?h:0):S[b]+x.x+E,T?(c=S.top+x.y,u=A/2-h):M?(c=S.top+x.y-g+A,u=g-A/2-h):(c=S.top+x.y-g/2+A/2,u=g/2-(C?.9*f:f/2))):s!==y&&"bottom"!==s||(c=s===y?S.top+x.y-g-(C?f:0):S.top+x.y+A,k?(l=0,d=S[b]+E/2-h):I?(l=v-1.01*p,d=p-(v-S[b])+E/2-h/2):(l=S[b]+x.x-p/2+E/2,d=p/2-(C?h:h/2))),o[m].top=c+"px",o[m][b]=l+"px",u&&(j[m].top=u+"px"),d&&(j[m][b]=d+"px")};o.version="2.0.27";var q=function(e){e=N(e);var t=this,n=I(e,".alert"),r=function(r){n=I(r[l],".alert"),(e=N('[data-dismiss="alert"]',n))&&n&&(e===r[l]||e.contains(r[l]))&&t.close()},i=function(){F.call(n,"closed","alert"),R(e,"click",r),n[p].removeChild(n)};this.close=function(){n&&e&&O(n,"show")&&(F.call(n,"close","alert"),T(n,"show"),n&&(O(n,"fade")?z(n,i):i()))},"Alert"in e||M(e,"click",r),e.Alert=t};s[v](["Alert",q,'[data-dismiss="alert"]']);var H=function(e){e=N(e);var n=!1,r="checked",i=function(t){var i="LABEL"===t[l].tagName?t[l]:"LABEL"===t[l][p].tagName?t[l][p]:null;if(i){var o=k(i[p],"btn"),s=i.getElementsByTagName("INPUT")[0];if(s){if("checkbox"===s.type&&(s[r]?(T(i,_),s[h](r),s.removeAttribute(r),s[r]=!1):(j(i,_),s[h](r),s[f](r,r),s[r]=!0),n||(n=!0,F.call(s,"change","button"),F.call(e,"change","button"))),"radio"===s.type&&!n&&(!s[r]||0===t.screenX&&0==t.screenY)){j(i,_),j(i,"focus"),s[f](r,r),s[r]=!0,F.call(s,"change","button"),F.call(e,"change","button"),n=!0;for(var a=0,c=o[g];a<c;a++){var u=o[a],d=u.getElementsByTagName("INPUT")[0];u!==i&&O(u,_)&&(T(u,_),d.removeAttribute(r),d[r]=!1,F.call(d,"change","button"))}}setTimeout((function(){n=!1}),50)}}},o=function(e){j(e[l][p],"focus")},s=function(e){T(e[l][p],"focus")};if(!("Button"in e)){M(e,"click",i),M(e,"keyup",(function(e){32===(e.which||e.keyCode)&&e[l]===t.activeElement&&i(e)})),M(e,"keydown",(function(e){32===(e.which||e.keyCode)&&e.preventDefault()}));for(var a=k(e,"btn"),c=0;c<a.length;c++){var u=a[c].getElementsByTagName("INPUT")[0];M(u,"focus",o),M(u,"blur",s)}}var d=k(e,"btn"),m=d[g];for(c=0;c<m;c++)!O(d[c],_)&&N("input:checked",d[c])&&j(d[c],_);e.Button=this};s[v](["Button",H,"["+a+'="buttons"]']);var U=function(e,t){e=N(e),t=t||{};var n,r,i,o,s,a=null,c=null,l=this,u=e[h]("data-parent"),d=function(e,t){F.call(e,"hide","collapse"),e.isAnimating=!0,e[m].height=e.scrollHeight+"px",T(e,"collapse"),T(e,"show"),j(e,"collapsing"),e.offsetWidth,e[m].height="0px",z(e,(function(){e.isAnimating=!1,e[f]("aria-expanded","false"),t[f]("aria-expanded","false"),T(e,"collapsing"),j(e,"collapse"),e[m].height="",F.call(e,"hidden","collapse")}))};this.toggle=function(e){e.preventDefault(),O(c,"show")?l.hide():l.show()},this.hide=function(){c.isAnimating||(d(c,e),j(e,"collapsed"))},this.show=function(){var t,i;a&&(n=N(".collapse.show",a),r=n&&(N('[data-target="#'+n.id+'"]',a)||N('[href="#'+n.id+'"]',a))),(!c.isAnimating||n&&!n.isAnimating)&&(r&&n!==c&&(d(n,r),j(r,"collapsed")),i=e,F.call(t=c,"show","collapse"),t.isAnimating=!0,j(t,"collapsing"),T(t,"collapse"),t[m].height=t.scrollHeight+"px",z(t,(function(){t.isAnimating=!1,t[f]("aria-expanded","true"),i[f]("aria-expanded","true"),T(t,"collapsing"),j(t,"collapse"),j(t,"show"),t[m].height="",F.call(t,"shown","collapse")})),T(e,"collapsed"))},"Collapse"in e||M(e,"click",l.toggle),i=e.href&&e[h]("href"),o=e[h]("data-target"),s=i||o&&"#"===o.charAt(0)&&o,(c=s&&N(s)).isAnimating=!1,a=N(t.parent)||u&&I(e,u),e.Collapse=l};s[v](["Collapse",U,"["+a+'="collapse"]']);var $=function(e,n){e=N(e),this.persist=!0===n||"true"===e[h]("data-persist")||!1;var r=this,i=e[p],o=null,s=N(".dropdown-menu",i),c=function(){for(var e=s.children,t=[],n=0;n<e[g];n++)e[n].children[g]&&"A"===e[n].children[0].tagName&&t[v](e[n].children[0]),"A"===e[n].tagName&&t[v](e[n]);return t}(),u=function(e){(e.href&&"#"===e.href.slice(-1)||e[p]&&e[p].href&&"#"===e[p].href.slice(-1))&&this.preventDefault()},d=function(){var n=e.open?M:R;n(t,"click",m),n(t,"keydown",b),n(t,"keyup",y),n(t,"focus",m,!0)},m=function(t){var n=t[l],i=n&&(n[h](a)||n[p]&&h in n[p]&&n[p][h](a));("focus"!==t.type||n!==e&&n!==s&&!s.contains(n))&&(n!==s&&!s.contains(n)||!r.persist&&!i)&&(o=n===e||e.contains(n)?e:null,S(),u.call(t,n))},_=function(t){o=e,w(),u.call(t,t[l])},b=function(e){var t=e.which||e.keyCode;38!==t&&40!==t||e.preventDefault()},y=function(n){var i=n.which||n.keyCode,a=t.activeElement,l=c.indexOf(a),u=a===e,d=s.contains(a),h=a[p]===s||a[p][p]===s;h&&(l=u?0:38===i?l>1?l-1:0:40===i&&l<c[g]-1?l+1:l,c[l]&&C(c[l])),(c[g]&&h||!c[g]&&(d||u)||!d)&&e.open&&27===i&&(r.toggle(),o=null)},w=function(){F.call(i,"show","dropdown",o),j(s,"show"),j(i,"show"),e[f]("aria-expanded",!0),F.call(i,"shown","dropdown",o),e.open=!0,R(e,"click",_),setTimeout((function(){C(s.getElementsByTagName("INPUT")[0]||e),d()}),1)},S=function(){F.call(i,"hide","dropdown",o),T(s,"show"),T(i,"show"),e[f]("aria-expanded",!1),F.call(i,"hidden","dropdown",o),e.open=!1,d(),C(e),setTimeout((function(){M(e,"click",_)}),1)};e.open=!1,this.toggle=function(){O(i,"show")&&e.open?S():w()},"Dropdown"in e||(!1 in s&&s[f]("tabindex","0"),M(e,"click",_)),e.Dropdown=r};s[v](["Dropdown",$,"["+a+'="dropdown"]']);var W=function(n,o){var s=(n=N(n))[h]("data-target")||n[h]("href"),a=N(s),c=O(n,"modal")?n:a;if(O(n,"modal")&&(n=null),c){o=o||{},this.keyboard=!1!==o.keyboard&&"false"!==c[h]("data-keyboard"),this.backdrop="static"!==o.backdrop&&"static"!==c[h]("data-backdrop")||"static",this.backdrop=!1!==o.backdrop&&"false"!==c[h]("data-backdrop")&&this.backdrop,this[u]=!!O(c,"fade"),this.content=o.content,c.isAnimating=!1;var d,v,_,y,w,E=this,A=null,I=k(r,"fixed-top").concat(k(r,"fixed-bottom")),D=function(){var n,r=e.getComputedStyle(t[i]),o=parseInt(r.paddingRight,10);if(d&&(t[i][m].paddingRight=o+v+"px",c[m].paddingRight=v+"px",I[g]))for(var s=0;s<I[g];s++)n=e.getComputedStyle(I[s]).paddingRight,I[s][m].paddingRight=parseInt(n)+v+"px"},B=function(){var n,o,s;d=t[i].clientWidth<(n=r.getBoundingClientRect(),e.innerWidth||n.right-Math.abs(n[b])),(s=t.createElement("div")).className="modal-scrollbar-measure",t[i].appendChild(s),o=s.offsetWidth-s.clientWidth,t[i].removeChild(s),v=o},q=function(){(_=N(".modal-backdrop"))&&null!==_&&"object"==typeof _&&(S=0,t[i].removeChild(_),_=null)},H=function(){C(c),c.isAnimating=!1,F.call(c,"shown","modal",A),M(e,"resize",E.update,P),M(c,"click",W),M(t,"keydown",$)},U=function(){c[m].display="",n&&C(n),F.call(c,"hidden","modal"),k(t,"modal show")[0]||(function(){if(t[i][m].paddingRight="",c[m].paddingRight="",I[g])for(var e=0;e<I[g];e++)I[e][m].paddingRight=""}(),T(t[i],"modal-open"),_&&O(_,"fade")?(T(_,"show"),z(_,q)):q(),R(e,"resize",E.update,P),R(c,"click",W),R(t,"keydown",$)),c.isAnimating=!1},$=function(e){c.isAnimating||E.keyboard&&27==e.which&&O(c,"show")&&E.hide()},W=function(e){if(!c.isAnimating){var t=e[l];O(c,"show")&&("modal"===t[p][h]("data-dismiss")||"modal"===t[h]("data-dismiss")||t===c&&"static"!==E.backdrop)&&(E.hide(),A=null,e.preventDefault())}};this.toggle=function(){O(c,"show")?this.hide():this.show()},this.show=function(){O(c,"show")||c.isAnimating||(clearTimeout(w),w=setTimeout((function(){c.isAnimating=!0,F.call(c,"show","modal",A);var e,n=k(t,"modal show")[0];n&&n!==c&&("modalTrigger"in n&&n.modalTrigger.Modal.hide(),"Modal"in n&&n.Modal.hide()),E.backdrop&&!S&&!_&&(e=t.createElement("div"),null===(_=N(".modal-backdrop"))&&(e[f]("class","modal-backdrop"+(E[u]?" fade":"")),_=e,t[i].appendChild(_)),S=1),_&&!O(_,"show")&&(_.offsetWidth,y=L(_),j(_,"show")),setTimeout((function(){c[m].display="block",B(),D(),j(t[i],"modal-open"),j(c,"show"),c[f]("aria-hidden",!1),O(c,"fade")?z(c,H):H()}),x&&_&&y?y:1)}),1))},this.hide=function(){!c.isAnimating&&O(c,"show")&&(clearTimeout(w),w=setTimeout((function(){c.isAnimating=!0,F.call(c,"hide","modal"),_=N(".modal-backdrop"),y=_&&L(_),T(c,"show"),c[f]("aria-hidden",!0),setTimeout((function(){O(c,"fade")?z(c,U):U()}),x&&_&&y?y:2)}),2))},this.setContent=function(e){N(".modal-content",c).innerHTML=e},this.update=function(){O(c,"show")&&(B(),D())},n&&!("Modal"in n)&&M(n,"click",(function(e){if(!c.isAnimating){var t=e[l];(t=t.hasAttribute("data-target")||t.hasAttribute("href")?t:t[p])!==n||O(c,"show")||(c.modalTrigger=n,A=n,E.show(),e.preventDefault())}})),E.content&&E.setContent(E.content),n?(n.Modal=E,c.modalTrigger=n):c.Modal=E}};s[v](["Modal",W,"["+a+'="modal"]']);var G=function(n,r){n=N(n),r=r||{};var o=n[h]("data-trigger"),s=n[h]("data-animation"),a=n[h]("data-placement"),p=n[h]("data-dismissible"),g=n[h]("data-delay"),v=n[h]("data-container"),_='<button type="button" class="close">×</button>',b=N(r.container),w=N(v),S=I(n,".modal"),x=I(n,".fixed-top"),E=I(n,".fixed-bottom");this.template=r.template?r.template:null,this.trigger=r.trigger?r.trigger:o||"hover",this[u]=r[u]&&"fade"!==r[u]?r[u]:s||"fade",this.placement=r.placement?r.placement:a||y,this[c]=parseInt(r[c]||g)||200,this.dismissible=!(!r.dismissible&&"true"!==p),this.container=b||w||x||E||S||t[i];var A=this,C=r.title||n[h]("data-title")||null,k=r.content||n[h]("data-content")||null;if(k||this.template){var D=null,L=0,q=this.placement,H=function(e){null!==D&&e[l]===N(".close",D)&&A.hide()},U=function(r){"click"!=A.trigger&&"focus"!=A.trigger||!A.dismissible&&r(n,"blur",A.hide),A.dismissible&&r(t,"click",H),r(e,"resize",A.hide,P)},$=function(){U(M),F.call(n,"shown","popover")},W=function(){U(R),A.container.removeChild(D),L=null,D=null,F.call(n,"hidden","popover")};this.toggle=function(){null===D?A.show():A.hide()},this.show=function(){clearTimeout(L),L=setTimeout((function(){null===D&&(q=A.placement,function(){C=r.title||n[h]("data-title"),k=(k=r.content||n[h]("data-content"))?k.trim():null,D=t.createElement("div");var e=t.createElement("div");if(e[f]("class","arrow"),D.appendChild(e),null!==k&&null===A.template){if(D[f]("role","tooltip"),null!==C){var i=t.createElement("h3");i[f]("class","popover-header"),i.innerHTML=A.dismissible?C+_:C,D.appendChild(i)}var o=t.createElement("div");o[f]("class","popover-body"),o.innerHTML=A.dismissible&&null===C?k+_:k,D.appendChild(o)}else{var s=t.createElement("div");A.template=A.template.trim(),s.innerHTML=A.template,D.innerHTML=s.firstChild.innerHTML}A.container.appendChild(D),D[m].display="block",D[f]("class","popover bs-popover-"+q+" "+A[u])}(),B(n,D,q,A.container),!O(D,"show")&&j(D,"show"),F.call(n,"show","popover"),A[u]?z(D,$):$())}),20)},this.hide=function(){clearTimeout(L),L=setTimeout((function(){D&&null!==D&&O(D,"show")&&(F.call(n,"hide","popover"),T(D,"show"),A[u]?z(D,W):W())}),A[c])},"Popover"in n||("hover"===A.trigger?(M(n,d[0],A.show),A.dismissible||M(n,d[1],A.hide)):"click"!=A.trigger&&"focus"!=A.trigger||M(n,A.trigger,A.toggle)),n.Popover=A}};s[v](["Popover",G,"["+a+'="popover"]']);var V=function(e,t){var n=(e=N(e))[h]("data-height");t=t||{},this.height=!!x&&(t.height||"true"===n);var r,i,o,s,a,c,l,u=this,d=I(e,".nav"),v=!1,y=d&&N(".dropdown-toggle",d),w=function(){v[m].height="",T(v,"collapsing"),d.isAnimating=!1},S=function(){v?c?w():setTimeout((function(){v[m].height=l+"px",v.offsetWidth,z(v,w)}),50):d.isAnimating=!1,F.call(r,"shown","tab",i)},E=function(){v&&(o[m].float=b,s[m].float=b,a=o.scrollHeight),j(s,_),F.call(r,"show","tab",i),T(o,_),F.call(i,"hidden","tab",r),v&&(l=s.scrollHeight,c=l===a,j(v,"collapsing"),v[m].height=a+"px",v.offsetHeight,o[m].float="",s[m].float=""),O(s,"fade")?setTimeout((function(){j(s,"show"),z(s,S)}),20):S()};if(d){d.isAnimating=!1;var A=function(){var e,t=k(d,_);return 1!==t[g]||O(t[0][p],"dropdown")?t[g]>1&&(e=t[t[g]-1]):e=t[0],e},C=function(){return N(A()[h]("href"))};this.show=function(){s=N((r=r||e)[h]("href")),i=A(),o=C(),d.isAnimating=!0,T(i,_),i[f]("aria-selected","false"),j(r,_),r[f]("aria-selected","true"),y&&(O(e[p],"dropdown-menu")?O(y,_)||j(y,_):O(y,_)&&T(y,_)),F.call(i,"hide","tab",r),O(o,"fade")?(T(o,"show"),z(o,E)):E()},"Tab"in e||M(e,"click",(function(e){e.preventDefault(),r=e.currentTarget,!d.isAnimating&&!O(r,_)&&u.show()})),u.height&&(v=C()[p]),e.Tab=u}};s[v](["Tab",V,"["+a+'="tab"]']);var J=function(e,t){t=t||{};var n=(e=N(e))[h]("data-animation"),r=e[h]("data-autohide"),i=e[h]("data-delay");this.animation=!1===t.animation||"false"===n?0:1,this.autohide=!1===t.autohide||"false"===r?0:1,this[c]=parseInt(t[c]||i)||500;var o=this,s=0,a=I(e,".toast"),l=function(){T(a,"showing"),j(a,"show"),F.call(a,"shown","toast"),o.autohide&&o.hide()},u=function(){j(a,"hide"),F.call(a,"hidden","toast")},d=function(){T(a,"show"),o.animation?z(a,u):u()},f=function(){clearTimeout(s),s=null,j(a,"hide"),R(e,"click",o.hide),e.Toast=null,e=null,a=null};this.show=function(){a&&(F.call(a,"show","toast"),o.animation&&j(a,"fade"),T(a,"hide"),j(a,"showing"),o.animation?z(a,l):l())},this.hide=function(e){a&&O(a,"show")&&(F.call(a,"hide","toast"),e?d():s=setTimeout(d,o[c]))},this.dispose=function(){a&&O(a,"show")&&(T(a,"show"),o.animation?z(a,f):f())},"Toast"in e||M(e,"click",o.hide),e.Toast=o};s[v](["Toast",J,'[data-dismiss="toast"]']);var X=function(n,r){r=r||{};var o=(n=N(n))[h]("data-animation"),s=n[h]("data-placement"),a=n[h]("data-delay"),l=n[h]("data-container"),p=N(r.container),g=N(l),v=I(n,".modal"),_=I(n,".fixed-top"),w=I(n,".fixed-bottom");this[u]=r[u]&&"fade"!==r[u]?r[u]:o||"fade",this.placement=r.placement?r.placement:s||y,this[c]=parseInt(r[c]||a)||200,this.container=p||g||_||w||v||t[i];var S=this,x=0,E=this.placement,A=null,C=n[h]("title")||n[h]("data-title")||n[h]("data-original-title");if(C&&""!=C){var k=function(){M(e,"resize",S.hide,P),F.call(n,"shown","tooltip")},D=function(){R(e,"resize",S.hide,P),S.container.removeChild(A),A=null,x=null,F.call(n,"hidden","tooltip")};this.show=function(){clearTimeout(x),x=setTimeout((function(){null===A&&(E=S.placement,!1!==function(){if((C=n[h]("title")||n[h]("data-title")||n[h]("data-original-title"))&&""!==C){(A=t.createElement("div"))[f]("role","tooltip"),A[m][b]="0",A[m].top="0";var e=t.createElement("div");e[f]("class","arrow"),A.appendChild(e);var r=t.createElement("div");r[f]("class","tooltip-inner"),A.appendChild(r),r.innerHTML=C,S.container.appendChild(A),A[f]("class","tooltip bs-tooltip-"+E+" "+S[u])}}()&&(B(n,A,E,S.container),!O(A,"show")&&j(A,"show"),F.call(n,"show","tooltip"),S[u]?z(A,k):k()))}),20)},this.hide=function(){clearTimeout(x),x=setTimeout((function(){A&&O(A,"show")&&(F.call(n,"hide","tooltip"),T(A,"show"),S[u]?z(A,D):D())}),S[c])},this.toggle=function(){A?S.hide():S.show()},"Tooltip"in n||(n[f]("data-original-title",C),n.removeAttribute("title"),M(n,d[0],S.show),M(n,d[1],S.hide)),n.Tooltip=S}};s[v](["Tooltip",X,"["+a+'="tooltip"]']);var Q=function(e,t){for(var n=0,r=t[g];n<r;n++)new e(t[n])},Y=o.initCallback=function(e){e=e||t;for(var n=0,r=s[g];n<r;n++)Q(s[n][1],e.querySelectorAll(s[n][2]))};return t[i]?Y():M(t,"DOMContentLoaded",(function(){Y()})),{Alert:q,Button:H,Collapse:U,Dropdown:$,Modal:W,Popover:G,Tab:V,Toast:J,Tooltip:X}})?r.apply(t,i):r)||(e.exports=o)}).call(this,n(12))},function(e,t,n){var r,i,o;
-/*!
- * URI.js - Mutating URLs
- *
- * Version: 1.19.2
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- *   MIT License http://www.opensource.org/licenses/mit-license
- *
- */!function(s,a){"use strict";e.exports?e.exports=a(n(155),n(156),n(157)):(i=[n(155),n(156),n(157)],void 0===(o="function"==typeof(r=a)?r.apply(t,i):r)||(e.exports=o))}(0,(function(e,t,n,r){"use strict";var i=r&&r.URI;function o(e,t){var n=arguments.length>=1,r=arguments.length>=2;if(!(this instanceof o))return n?r?new o(e,t):new o(e):new o;if(void 0===e){if(n)throw new TypeError("undefined is not a valid argument for URI");e="undefined"!=typeof location?location.href+"":""}if(null===e&&n)throw new TypeError("null is not a valid argument for URI");return this.href(e),void 0!==t?this.absoluteTo(t):this}o.version="1.19.2";var s=o.prototype,a=Object.prototype.hasOwnProperty;function c(e){return e.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function l(e){return void 0===e?"Undefined":String(Object.prototype.toString.call(e)).slice(8,-1)}function u(e){return"Array"===l(e)}function d(e,t){var n,r,i={};if("RegExp"===l(t))i=null;else if(u(t))for(n=0,r=t.length;n<r;n++)i[t[n]]=!0;else i[t]=!0;for(n=0,r=e.length;n<r;n++){(i&&void 0!==i[e[n]]||!i&&t.test(e[n]))&&(e.splice(n,1),r--,n--)}return e}function h(e,t){var n,r;if(u(t)){for(n=0,r=t.length;n<r;n++)if(!h(e,t[n]))return!1;return!0}var i=l(t);for(n=0,r=e.length;n<r;n++)if("RegExp"===i){if("string"==typeof e[n]&&e[n].match(t))return!0}else if(e[n]===t)return!0;return!1}function f(e,t){if(!u(e)||!u(t))return!1;if(e.length!==t.length)return!1;e.sort(),t.sort();for(var n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function p(e){return e.replace(/^\/+|\/+$/g,"")}function g(e){return escape(e)}function m(e){return encodeURIComponent(e).replace(/[!'()*]/g,g).replace(/\*/g,"%2A")}o._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,preventInvalidHostname:o.preventInvalidHostname,duplicateQueryParameters:o.duplicateQueryParameters,escapeQuerySpace:o.escapeQuerySpace}},o.preventInvalidHostname=!1,o.duplicateQueryParameters=!1,o.escapeQuerySpace=!0,o.protocol_expression=/^[a-z][a-z0-9.+-]*$/i,o.idn_expression=/[^a-z0-9\._-]/i,o.punycode_expression=/(xn--)/i,o.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,o.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,o.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi,o.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/,parens:/(\([^\)]*\)|\[[^\]]*\]|\{[^}]*\}|<[^>]*>)/g},o.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"},o.hostProtocols=["http","https"],o.invalid_hostname_characters=/[^a-zA-Z0-9\.\-:_]/,o.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"},o.getDomAttribute=function(e){if(e&&e.nodeName){var t=e.nodeName.toLowerCase();if("input"!==t||"image"===e.type)return o.domAttributes[t]}},o.encode=m,o.decode=decodeURIComponent,o.iso8859=function(){o.encode=escape,o.decode=unescape},o.unicode=function(){o.encode=m,o.decode=decodeURIComponent},o.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}},urnpath:{encode:{expression:/%(21|24|27|28|29|2A|2B|2C|3B|3D|40)/gi,map:{"%21":"!","%24":"$","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"=","%40":"@"}},decode:{expression:/[\/\?#:]/g,map:{"/":"%2F","?":"%3F","#":"%23",":":"%3A"}}}},o.encodeQuery=function(e,t){var n=o.encode(e+"");return void 0===t&&(t=o.escapeQuerySpace),t?n.replace(/%20/g,"+"):n},o.decodeQuery=function(e,t){e+="",void 0===t&&(t=o.escapeQuerySpace);try{return o.decode(t?e.replace(/\+/g,"%20"):e)}catch(t){return e}};var v,_={encode:"encode",decode:"decode"},b=function(e,t){return function(n){try{return o[t](n+"").replace(o.characters[e][t].expression,(function(n){return o.characters[e][t].map[n]}))}catch(e){return n}}};for(v in _)o[v+"PathSegment"]=b("pathname",_[v]),o[v+"UrnPathSegment"]=b("urnpath",_[v]);var y=function(e,t,n){return function(r){var i;i=n?function(e){return o[t](o[n](e))}:o[t];for(var s=(r+"").split(e),a=0,c=s.length;a<c;a++)s[a]=i(s[a]);return s.join(e)}};function w(e){return function(t,n){return void 0===t?this._parts[e]||"":(this._parts[e]=t||null,this.build(!n),this)}}function S(e,t){return function(n,r){return void 0===n?this._parts[e]||"":(null!==n&&(n+="").charAt(0)===t&&(n=n.substring(1)),this._parts[e]=n,this.build(!r),this)}}o.decodePath=y("/","decodePathSegment"),o.decodeUrnPath=y(":","decodeUrnPathSegment"),o.recodePath=y("/","encodePathSegment","decode"),o.recodeUrnPath=y(":","encodeUrnPathSegment","decode"),o.encodeReserved=b("reserved","encode"),o.parse=function(e,t){var n;return t||(t={preventInvalidHostname:o.preventInvalidHostname}),(n=e.indexOf("#"))>-1&&(t.fragment=e.substring(n+1)||null,e=e.substring(0,n)),(n=e.indexOf("?"))>-1&&(t.query=e.substring(n+1)||null,e=e.substring(0,n)),"//"===e.substring(0,2)?(t.protocol=null,e=e.substring(2),e=o.parseAuthority(e,t)):(n=e.indexOf(":"))>-1&&(t.protocol=e.substring(0,n)||null,t.protocol&&!t.protocol.match(o.protocol_expression)?t.protocol=void 0:"//"===e.substring(n+1,n+3)?(e=e.substring(n+3),e=o.parseAuthority(e,t)):(e=e.substring(n+1),t.urn=!0)),t.path=e,t},o.parseHost=function(e,t){e||(e="");var n,r,i=(e=e.replace(/\\/g,"/")).indexOf("/");if(-1===i&&(i=e.length),"["===e.charAt(0))n=e.indexOf("]"),t.hostname=e.substring(1,n)||null,t.port=e.substring(n+2,i)||null,"/"===t.port&&(t.port=null);else{var s=e.indexOf(":"),a=e.indexOf("/"),c=e.indexOf(":",s+1);-1!==c&&(-1===a||c<a)?(t.hostname=e.substring(0,i)||null,t.port=null):(r=e.substring(0,i).split(":"),t.hostname=r[0]||null,t.port=r[1]||null)}return t.hostname&&"/"!==e.substring(i).charAt(0)&&(i++,e="/"+e),t.preventInvalidHostname&&o.ensureValidHostname(t.hostname,t.protocol),t.port&&o.ensureValidPort(t.port),e.substring(i)||"/"},o.parseAuthority=function(e,t){return e=o.parseUserinfo(e,t),o.parseHost(e,t)},o.parseUserinfo=function(e,t){var n,r=e.indexOf("/"),i=e.lastIndexOf("@",r>-1?r:e.length-1);return i>-1&&(-1===r||i<r)?(n=e.substring(0,i).split(":"),t.username=n[0]?o.decode(n[0]):null,n.shift(),t.password=n[0]?o.decode(n.join(":")):null,e=e.substring(i+1)):(t.username=null,t.password=null),e},o.parseQuery=function(e,t){if(!e)return{};if(!(e=e.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"")))return{};for(var n,r,i,s={},c=e.split("&"),l=c.length,u=0;u<l;u++)n=c[u].split("="),r=o.decodeQuery(n.shift(),t),i=n.length?o.decodeQuery(n.join("="),t):null,a.call(s,r)?("string"!=typeof s[r]&&null!==s[r]||(s[r]=[s[r]]),s[r].push(i)):s[r]=i;return s},o.build=function(e){var t="",n=!1;return e.protocol&&(t+=e.protocol+":"),e.urn||!t&&!e.hostname||(t+="//",n=!0),t+=o.buildAuthority(e)||"","string"==typeof e.path&&("/"!==e.path.charAt(0)&&n&&(t+="/"),t+=e.path),"string"==typeof e.query&&e.query&&(t+="?"+e.query),"string"==typeof e.fragment&&e.fragment&&(t+="#"+e.fragment),t},o.buildHost=function(e){var t="";return e.hostname?(o.ip6_expression.test(e.hostname)?t+="["+e.hostname+"]":t+=e.hostname,e.port&&(t+=":"+e.port),t):""},o.buildAuthority=function(e){return o.buildUserinfo(e)+o.buildHost(e)},o.buildUserinfo=function(e){var t="";return e.username&&(t+=o.encode(e.username)),e.password&&(t+=":"+o.encode(e.password)),t&&(t+="@"),t},o.buildQuery=function(e,t,n){var r,i,s,c,l="";for(i in e)if(a.call(e,i))if(u(e[i]))for(r={},s=0,c=e[i].length;s<c;s++)void 0!==e[i][s]&&void 0===r[e[i][s]+""]&&(l+="&"+o.buildQueryParameter(i,e[i][s],n),!0!==t&&(r[e[i][s]+""]=!0));else void 0!==e[i]&&(l+="&"+o.buildQueryParameter(i,e[i],n));return l.substring(1)},o.buildQueryParameter=function(e,t,n){return o.encodeQuery(e,n)+(null!==t?"="+o.encodeQuery(t,n):"")},o.addQuery=function(e,t,n){if("object"==typeof t)for(var r in t)a.call(t,r)&&o.addQuery(e,r,t[r]);else{if("string"!=typeof t)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");if(void 0===e[t])return void(e[t]=n);"string"==typeof e[t]&&(e[t]=[e[t]]),u(n)||(n=[n]),e[t]=(e[t]||[]).concat(n)}},o.setQuery=function(e,t,n){if("object"==typeof t)for(var r in t)a.call(t,r)&&o.setQuery(e,r,t[r]);else{if("string"!=typeof t)throw new TypeError("URI.setQuery() accepts an object, string as the name parameter");e[t]=void 0===n?null:n}},o.removeQuery=function(e,t,n){var r,i,s;if(u(t))for(r=0,i=t.length;r<i;r++)e[t[r]]=void 0;else if("RegExp"===l(t))for(s in e)t.test(s)&&(e[s]=void 0);else if("object"==typeof t)for(s in t)a.call(t,s)&&o.removeQuery(e,s,t[s]);else{if("string"!=typeof t)throw new TypeError("URI.removeQuery() accepts an object, string, RegExp as the first parameter");void 0!==n?"RegExp"===l(n)?!u(e[t])&&n.test(e[t])?e[t]=void 0:e[t]=d(e[t],n):e[t]!==String(n)||u(n)&&1!==n.length?u(e[t])&&(e[t]=d(e[t],n)):e[t]=void 0:e[t]=void 0}},o.hasQuery=function(e,t,n,r){switch(l(t)){case"String":break;case"RegExp":for(var i in e)if(a.call(e,i)&&t.test(i)&&(void 0===n||o.hasQuery(e,i,n)))return!0;return!1;case"Object":for(var s in t)if(a.call(t,s)&&!o.hasQuery(e,s,t[s]))return!1;return!0;default:throw new TypeError("URI.hasQuery() accepts a string, regular expression or object as the name parameter")}switch(l(n)){case"Undefined":return t in e;case"Boolean":return n===Boolean(u(e[t])?e[t].length:e[t]);case"Function":return!!n(e[t],t,e);case"Array":return!!u(e[t])&&(r?h:f)(e[t],n);case"RegExp":return u(e[t])?!!r&&h(e[t],n):Boolean(e[t]&&e[t].match(n));case"Number":n=String(n);case"String":return u(e[t])?!!r&&h(e[t],n):e[t]===n;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}},o.joinPaths=function(){for(var e=[],t=[],n=0,r=0;r<arguments.length;r++){var i=new o(arguments[r]);e.push(i);for(var s=i.segment(),a=0;a<s.length;a++)"string"==typeof s[a]&&t.push(s[a]),s[a]&&n++}if(!t.length||!n)return new o("");var c=new o("").segment(t);return""!==e[0].path()&&"/"!==e[0].path().slice(0,1)||c.path("/"+c.path()),c.normalize()},o.commonPath=function(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n++)if(e.charAt(n)!==t.charAt(n)){n--;break}return n<1?e.charAt(0)===t.charAt(0)&&"/"===e.charAt(0)?"/":"":("/"===e.charAt(n)&&"/"===t.charAt(n)||(n=e.substring(0,n).lastIndexOf("/")),e.substring(0,n+1))},o.withinString=function(e,t,n){n||(n={});var r=n.start||o.findUri.start,i=n.end||o.findUri.end,s=n.trim||o.findUri.trim,a=n.parens||o.findUri.parens,c=/[a-z0-9-]=["']?$/i;for(r.lastIndex=0;;){var l=r.exec(e);if(!l)break;var u=l.index;if(n.ignoreHtml){var d=e.slice(Math.max(u-3,0),u);if(d&&c.test(d))continue}for(var h=u+e.slice(u).search(i),f=e.slice(u,h),p=-1;;){var g=a.exec(f);if(!g)break;var m=g.index+g[0].length;p=Math.max(p,m)}if(!((f=p>-1?f.slice(0,p)+f.slice(p).replace(s,""):f.replace(s,"")).length<=l[0].length||n.ignore&&n.ignore.test(f))){var v=t(f,u,h=u+f.length,e);void 0!==v?(v=String(v),e=e.slice(0,u)+v+e.slice(h),r.lastIndex=u+v.length):r.lastIndex=h}}return r.lastIndex=0,e},o.ensureValidHostname=function(t,n){var r=!!t,i=!1;if(!!n&&(i=h(o.hostProtocols,n)),i&&!r)throw new TypeError("Hostname cannot be empty, if protocol is "+n);if(t&&t.match(o.invalid_hostname_characters)){if(!e)throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_] and Punycode.js is not available');if(e.toASCII(t).match(o.invalid_hostname_characters))throw new TypeError('Hostname "'+t+'" contains characters other than [A-Z0-9.-:_]')}},o.ensureValidPort=function(e){if(e){var t=Number(e);if(!(/^[0-9]+$/.test(t)&&t>0&&t<65536))throw new TypeError('Port "'+e+'" is not a valid port')}},o.noConflict=function(e){if(e){var t={URI:this.noConflict()};return r.URITemplate&&"function"==typeof r.URITemplate.noConflict&&(t.URITemplate=r.URITemplate.noConflict()),r.IPv6&&"function"==typeof r.IPv6.noConflict&&(t.IPv6=r.IPv6.noConflict()),r.SecondLevelDomains&&"function"==typeof r.SecondLevelDomains.noConflict&&(t.SecondLevelDomains=r.SecondLevelDomains.noConflict()),t}return r.URI===this&&(r.URI=i),this},s.build=function(e){return!0===e?this._deferred_build=!0:(void 0===e||this._deferred_build)&&(this._string=o.build(this._parts),this._deferred_build=!1),this},s.clone=function(){return new o(this)},s.valueOf=s.toString=function(){return this.build(!1)._string},s.protocol=w("protocol"),s.username=w("username"),s.password=w("password"),s.hostname=w("hostname"),s.port=w("port"),s.query=S("query","?"),s.fragment=S("fragment","#"),s.search=function(e,t){var n=this.query(e,t);return"string"==typeof n&&n.length?"?"+n:n},s.hash=function(e,t){var n=this.fragment(e,t);return"string"==typeof n&&n.length?"#"+n:n},s.pathname=function(e,t){if(void 0===e||!0===e){var n=this._parts.path||(this._parts.hostname?"/":"");return e?(this._parts.urn?o.decodeUrnPath:o.decodePath)(n):n}return this._parts.urn?this._parts.path=e?o.recodeUrnPath(e):"":this._parts.path=e?o.recodePath(e):"/",this.build(!t),this},s.path=s.pathname,s.href=function(e,t){var n;if(void 0===e)return this.toString();this._string="",this._parts=o._parts();var r=e instanceof o,i="object"==typeof e&&(e.hostname||e.path||e.pathname);e.nodeName&&(e=e[o.getDomAttribute(e)]||"",i=!1);if(!r&&i&&void 0!==e.pathname&&(e=e.toString()),"string"==typeof e||e instanceof String)this._parts=o.parse(String(e),this._parts);else{if(!r&&!i)throw new TypeError("invalid input");var s=r?e._parts:e;for(n in s)"query"!==n&&a.call(this._parts,n)&&(this._parts[n]=s[n]);s.query&&this.query(s.query,!1)}return this.build(!t),this},s.is=function(e){var t=!1,r=!1,i=!1,s=!1,a=!1,c=!1,l=!1,u=!this._parts.urn;switch(this._parts.hostname&&(u=!1,r=o.ip4_expression.test(this._parts.hostname),i=o.ip6_expression.test(this._parts.hostname),a=(s=!(t=r||i))&&n&&n.has(this._parts.hostname),c=s&&o.idn_expression.test(this._parts.hostname),l=s&&o.punycode_expression.test(this._parts.hostname)),e.toLowerCase()){case"relative":return u;case"absolute":return!u;case"domain":case"name":return s;case"sld":return a;case"ip":return t;case"ip4":case"ipv4":case"inet4":return r;case"ip6":case"ipv6":case"inet6":return i;case"idn":return c;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return l}return null};var x=s.protocol,E=s.port,A=s.hostname;s.protocol=function(e,t){if(e&&!(e=e.replace(/:(\/\/)?$/,"")).match(o.protocol_expression))throw new TypeError('Protocol "'+e+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return x.call(this,e,t)},s.scheme=s.protocol,s.port=function(e,t){return this._parts.urn?void 0===e?"":this:(void 0!==e&&(0===e&&(e=null),e&&(":"===(e+="").charAt(0)&&(e=e.substring(1)),o.ensureValidPort(e))),E.call(this,e,t))},s.hostname=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0!==e){var n={preventInvalidHostname:this._parts.preventInvalidHostname};if("/"!==o.parseHost(e,n))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');e=n.hostname,this._parts.preventInvalidHostname&&o.ensureValidHostname(e,this._parts.protocol)}return A.call(this,e,t)},s.origin=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=this.protocol();return this.authority()?(n?n+"://":"")+this.authority():""}var r=o(e);return this.protocol(r.protocol()).authority(r.authority()).build(!t),this},s.host=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?o.buildHost(this._parts):"";if("/"!==o.parseHost(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.authority=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e)return this._parts.hostname?o.buildAuthority(this._parts):"";if("/"!==o.parseAuthority(e,this._parts))throw new TypeError('Hostname "'+e+'" contains characters other than [A-Z0-9.-]');return this.build(!t),this},s.userinfo=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){var n=o.buildUserinfo(this._parts);return n?n.substring(0,n.length-1):n}return"@"!==e[e.length-1]&&(e+="@"),o.parseUserinfo(e,this._parts),this.build(!t),this},s.resource=function(e,t){var n;return void 0===e?this.path()+this.search()+this.hash():(n=o.parse(e),this._parts.path=n.path,this._parts.query=n.query,this._parts.fragment=n.fragment,this.build(!t),this)},s.subdomain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,n)||""}var r=this._parts.hostname.length-this.domain().length,i=this._parts.hostname.substring(0,r),s=new RegExp("^"+c(i));if(e&&"."!==e.charAt(e.length-1)&&(e+="."),-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");return e&&o.ensureValidHostname(e,this._parts.protocol),this._parts.hostname=this._parts.hostname.replace(s,e),this.build(!t),this},s.domain=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var n=this._parts.hostname.match(/\./g);if(n&&n.length<2)return this._parts.hostname;var r=this._parts.hostname.length-this.tld(t).length-1;return r=this._parts.hostname.lastIndexOf(".",r-1)+1,this._parts.hostname.substring(r)||""}if(!e)throw new TypeError("cannot set domain empty");if(-1!==e.indexOf(":"))throw new TypeError("Domains cannot contain colons");if(o.ensureValidHostname(e,this._parts.protocol),!this._parts.hostname||this.is("IP"))this._parts.hostname=e;else{var i=new RegExp(c(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(i,e)}return this.build(!t),this},s.tld=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("boolean"==typeof e&&(t=e,e=void 0),void 0===e){if(!this._parts.hostname||this.is("IP"))return"";var r=this._parts.hostname.lastIndexOf("."),i=this._parts.hostname.substring(r+1);return!0!==t&&n&&n.list[i.toLowerCase()]&&n.get(this._parts.hostname)||i}var o;if(!e)throw new TypeError("cannot set TLD empty");if(e.match(/[^a-zA-Z0-9-]/)){if(!n||!n.is(e))throw new TypeError('TLD "'+e+'" contains characters other than [A-Z0-9]');o=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");o=new RegExp(c(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(o,e)}return this.build(!t),this},s.directory=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var n=this._parts.path.length-this.filename().length-1,r=this._parts.path.substring(0,n)||(this._parts.hostname?"/":"");return e?o.decodePath(r):r}var i=this._parts.path.length-this.filename().length,s=this._parts.path.substring(0,i),a=new RegExp("^"+c(s));return this.is("relative")||(e||(e="/"),"/"!==e.charAt(0)&&(e="/"+e)),e&&"/"!==e.charAt(e.length-1)&&(e+="/"),e=o.recodePath(e),this._parts.path=this._parts.path.replace(a,e),this.build(!t),this},s.filename=function(e,t){if(this._parts.urn)return void 0===e?"":this;if("string"!=typeof e){if(!this._parts.path||"/"===this._parts.path)return"";var n=this._parts.path.lastIndexOf("/"),r=this._parts.path.substring(n+1);return e?o.decodePathSegment(r):r}var i=!1;"/"===e.charAt(0)&&(e=e.substring(1)),e.match(/\.?\//)&&(i=!0);var s=new RegExp(c(this.filename())+"$");return e=o.recodePath(e),this._parts.path=this._parts.path.replace(s,e),i?this.normalizePath(t):this.build(!t),this},s.suffix=function(e,t){if(this._parts.urn)return void 0===e?"":this;if(void 0===e||!0===e){if(!this._parts.path||"/"===this._parts.path)return"";var n,r,i=this.filename(),s=i.lastIndexOf(".");return-1===s?"":(n=i.substring(s+1),r=/^[a-z0-9%]+$/i.test(n)?n:"",e?o.decodePathSegment(r):r)}"."===e.charAt(0)&&(e=e.substring(1));var a,l=this.suffix();if(l)a=e?new RegExp(c(l)+"$"):new RegExp(c("."+l)+"$");else{if(!e)return this;this._parts.path+="."+o.recodePath(e)}return a&&(e=o.recodePath(e),this._parts.path=this._parts.path.replace(a,e)),this.build(!t),this},s.segment=function(e,t,n){var r=this._parts.urn?":":"/",i=this.path(),o="/"===i.substring(0,1),s=i.split(r);if(void 0!==e&&"number"!=typeof e&&(n=t,t=e,e=void 0),void 0!==e&&"number"!=typeof e)throw new Error('Bad segment "'+e+'", must be 0-based integer');if(o&&s.shift(),e<0&&(e=Math.max(s.length+e,0)),void 0===t)return void 0===e?s:s[e];if(null===e||void 0===s[e])if(u(t)){s=[];for(var a=0,c=t.length;a<c;a++)(t[a].length||s.length&&s[s.length-1].length)&&(s.length&&!s[s.length-1].length&&s.pop(),s.push(p(t[a])))}else(t||"string"==typeof t)&&(t=p(t),""===s[s.length-1]?s[s.length-1]=t:s.push(t));else t?s[e]=p(t):s.splice(e,1);return o&&s.unshift(""),this.path(s.join(r),n)},s.segmentCoded=function(e,t,n){var r,i,s;if("number"!=typeof e&&(n=t,t=e,e=void 0),void 0===t){if(u(r=this.segment(e,t,n)))for(i=0,s=r.length;i<s;i++)r[i]=o.decode(r[i]);else r=void 0!==r?o.decode(r):void 0;return r}if(u(t))for(i=0,s=t.length;i<s;i++)t[i]=o.encode(t[i]);else t="string"==typeof t||t instanceof String?o.encode(t):t;return this.segment(e,t,n)};var C=s.query;return s.query=function(e,t){if(!0===e)return o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"==typeof e){var n=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace),r=e.call(this,n);return this._parts.query=o.buildQuery(r||n,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this}return void 0!==e&&"string"!=typeof e?(this._parts.query=o.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!t),this):C.call(this,e,t)},s.setQuery=function(e,t,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"==typeof e||e instanceof String)r[e]=void 0!==t?t:null;else{if("object"!=typeof e)throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");for(var i in e)a.call(e,i)&&(r[i]=e[i])}return this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},s.addQuery=function(e,t,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.addQuery(r,e,void 0===t?null:t),this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},s.removeQuery=function(e,t,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.removeQuery(r,e,t),this._parts.query=o.buildQuery(r,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),"string"!=typeof e&&(n=t),this.build(!n),this},s.hasQuery=function(e,t,n){var r=o.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return o.hasQuery(r,e,t,n)},s.setSearch=s.setQuery,s.addSearch=s.addQuery,s.removeSearch=s.removeQuery,s.hasSearch=s.hasQuery,s.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()},s.normalizeProtocol=function(e){return"string"==typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!e)),this},s.normalizeHostname=function(n){return this._parts.hostname&&(this.is("IDN")&&e?this._parts.hostname=e.toASCII(this._parts.hostname):this.is("IPv6")&&t&&(this._parts.hostname=t.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!n)),this},s.normalizePort=function(e){return"string"==typeof this._parts.protocol&&this._parts.port===o.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!e)),this},s.normalizePath=function(e){var t,n=this._parts.path;if(!n)return this;if(this._parts.urn)return this._parts.path=o.recodeUrnPath(this._parts.path),this.build(!e),this;if("/"===this._parts.path)return this;var r,i,s="";for("/"!==(n=o.recodePath(n)).charAt(0)&&(t=!0,n="/"+n),"/.."!==n.slice(-3)&&"/."!==n.slice(-2)||(n+="/"),n=n.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/"),t&&(s=n.substring(1).match(/^(\.\.\/)+/)||"")&&(s=s[0]);-1!==(r=n.search(/\/\.\.(\/|$)/));)0!==r?(-1===(i=n.substring(0,r).lastIndexOf("/"))&&(i=r),n=n.substring(0,i)+n.substring(r+3)):n=n.substring(3);return t&&this.is("relative")&&(n=s+n.substring(1)),this._parts.path=n,this.build(!e),this},s.normalizePathname=s.normalizePath,s.normalizeQuery=function(e){return"string"==typeof this._parts.query&&(this._parts.query.length?this.query(o.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!e)),this},s.normalizeFragment=function(e){return this._parts.fragment||(this._parts.fragment=null,this.build(!e)),this},s.normalizeSearch=s.normalizeQuery,s.normalizeHash=s.normalizeFragment,s.iso8859=function(){var e=o.encode,t=o.decode;o.encode=escape,o.decode=decodeURIComponent;try{this.normalize()}finally{o.encode=e,o.decode=t}return this},s.unicode=function(){var e=o.encode,t=o.decode;o.encode=m,o.decode=unescape;try{this.normalize()}finally{o.encode=e,o.decode=t}return this},s.readable=function(){var t=this.clone();t.username("").password("").normalize();var n="";if(t._parts.protocol&&(n+=t._parts.protocol+"://"),t._parts.hostname&&(t.is("punycode")&&e?(n+=e.toUnicode(t._parts.hostname),t._parts.port&&(n+=":"+t._parts.port)):n+=t.host()),t._parts.hostname&&t._parts.path&&"/"!==t._parts.path.charAt(0)&&(n+="/"),n+=t.path(!0),t._parts.query){for(var r="",i=0,s=t._parts.query.split("&"),a=s.length;i<a;i++){var c=(s[i]||"").split("=");r+="&"+o.decodeQuery(c[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"),void 0!==c[1]&&(r+="="+o.decodeQuery(c[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}n+="?"+r.substring(1)}return n+=o.decodeQuery(t.hash(),!0)},s.absoluteTo=function(e){var t,n,r,i=this.clone(),s=["protocol","username","password","hostname","port"];if(this._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e instanceof o||(e=new o(e)),i._parts.protocol)return i;if(i._parts.protocol=e._parts.protocol,this._parts.hostname)return i;for(n=0;r=s[n];n++)i._parts[r]=e._parts[r];return i._parts.path?(".."===i._parts.path.substring(-2)&&(i._parts.path+="/"),"/"!==i.path().charAt(0)&&(t=(t=e.directory())||(0===e.path().indexOf("/")?"/":""),i._parts.path=(t?t+"/":"")+i._parts.path,i.normalizePath())):(i._parts.path=e._parts.path,i._parts.query||(i._parts.query=e._parts.query)),i.build(),i},s.relativeTo=function(e){var t,n,r,i,s,a=this.clone().normalize();if(a._parts.urn)throw new Error("URNs do not have any generally defined hierarchical components");if(e=new o(e).normalize(),t=a._parts,n=e._parts,i=a.path(),s=e.path(),"/"!==i.charAt(0))throw new Error("URI is already relative");if("/"!==s.charAt(0))throw new Error("Cannot calculate a URI relative to another relative URI");if(t.protocol===n.protocol&&(t.protocol=null),t.username!==n.username||t.password!==n.password)return a.build();if(null!==t.protocol||null!==t.username||null!==t.password)return a.build();if(t.hostname!==n.hostname||t.port!==n.port)return a.build();if(t.hostname=null,t.port=null,i===s)return t.path="",a.build();if(!(r=o.commonPath(i,s)))return a.build();var c=n.path.substring(r.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");return t.path=c+t.path.substring(r.length)||"./",a.build()},s.equals=function(e){var t,n,r,i,s,c=this.clone(),l=new o(e),d={};if(c.normalize(),l.normalize(),c.toString()===l.toString())return!0;if(r=c.query(),i=l.query(),c.query(""),l.query(""),c.toString()!==l.toString())return!1;if(r.length!==i.length)return!1;for(s in t=o.parseQuery(r,this._parts.escapeQuerySpace),n=o.parseQuery(i,this._parts.escapeQuerySpace),t)if(a.call(t,s)){if(u(t[s])){if(!f(t[s],n[s]))return!1}else if(t[s]!==n[s])return!1;d[s]=!0}for(s in n)if(a.call(n,s)&&!d[s])return!1;return!0},s.preventInvalidHostname=function(e){return this._parts.preventInvalidHostname=!!e,this},s.duplicateQueryParameters=function(e){return this._parts.duplicateQueryParameters=!!e,this},s.escapeQuerySpace=function(e){return this._parts.escapeQuerySpace=!!e,this},o}))},function(e,t,n){var r=n(113),i=n(29),o=n(114),s=n(70),a=n(92),c=Math.max;e.exports=function(e,t,n,l){e=i(e)?e:a(e),n=n&&!l?s(n):0;var u=e.length;return n<0&&(n=c(u+n,0)),o(e)?n<=u&&e.indexOf(t,n)>-1:!!u&&r(e,t,n)>-1}},function(e,t){var n=/^(?:0|[1-9]\d*)$/;e.exports=function(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&n.test(e))&&e>-1&&e%1==0&&e<t}},function(e,t){e.exports=function(e){return e}},function(e,t,n){var r=n(48);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){var r=n(27),i=n(451),o=n(452),s=Object.defineProperty;t.f=n(32)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return s(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){e.exports={}},function(e,t,n){(function(e,r){var i;
-/**
- * @license
- * Lodash <https://lodash.com/>
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
- * Released under MIT license <https://lodash.com/license>
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
- */(function(){var o="Expected a function",s="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],c="[object Arguments]",l="[object Array]",u="[object Boolean]",d="[object Date]",h="[object Error]",f="[object Function]",p="[object GeneratorFunction]",g="[object Map]",m="[object Number]",v="[object Object]",_="[object RegExp]",b="[object Set]",y="[object String]",w="[object Symbol]",S="[object WeakMap]",x="[object ArrayBuffer]",E="[object DataView]",A="[object Float32Array]",C="[object Float64Array]",j="[object Int8Array]",T="[object Int16Array]",O="[object Int32Array]",k="[object Uint8Array]",N="[object Uint16Array]",I="[object Uint32Array]",M=/\b__p \+= '';/g,R=/\b(__p \+=) '' \+/g,D=/(__e\(.*?\)|\b__t\)) \+\n'';/g,P=/&(?:amp|lt|gt|quot|#39);/g,L=/[&<>"']/g,z=RegExp(P.source),F=RegExp(L.source),B=/<%-([\s\S]+?)%>/g,q=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,U=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,$=/^\w*$/,W=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,G=/[\\^$.*+?()[\]{}|]/g,V=RegExp(G.source),J=/^\s+|\s+$/g,X=/^\s+/,Q=/\s+$/,Y=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,K=/\{\n\/\* \[wrapped with (.+)\] \*/,Z=/,? & /,ee=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,te=/\\(\\)?/g,ne=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,re=/\w*$/,ie=/^[-+]0x[0-9a-f]+$/i,oe=/^0b[01]+$/i,se=/^\[object .+?Constructor\]$/,ae=/^0o[0-7]+$/i,ce=/^(?:0|[1-9]\d*)$/,le=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ue=/($^)/,de=/['\n\r\u2028\u2029\\]/g,he="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",fe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",pe="[\\ud800-\\udfff]",ge="["+fe+"]",me="["+he+"]",ve="\\d+",_e="[\\u2700-\\u27bf]",be="[a-z\\xdf-\\xf6\\xf8-\\xff]",ye="[^\\ud800-\\udfff"+fe+ve+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",we="\\ud83c[\\udffb-\\udfff]",Se="[^\\ud800-\\udfff]",xe="(?:\\ud83c[\\udde6-\\uddff]){2}",Ee="[\\ud800-\\udbff][\\udc00-\\udfff]",Ae="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Ce="(?:"+be+"|"+ye+")",je="(?:"+Ae+"|"+ye+")",Te="(?:"+me+"|"+we+")"+"?",Oe="[\\ufe0e\\ufe0f]?"+Te+("(?:\\u200d(?:"+[Se,xe,Ee].join("|")+")[\\ufe0e\\ufe0f]?"+Te+")*"),ke="(?:"+[_e,xe,Ee].join("|")+")"+Oe,Ne="(?:"+[Se+me+"?",me,xe,Ee,pe].join("|")+")",Ie=RegExp("['’]","g"),Me=RegExp(me,"g"),Re=RegExp(we+"(?="+we+")|"+Ne+Oe,"g"),De=RegExp([Ae+"?"+be+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ge,Ae,"$"].join("|")+")",je+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ge,Ae+Ce,"$"].join("|")+")",Ae+"?"+Ce+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Ae+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ve,ke].join("|"),"g"),Pe=RegExp("[\\u200d\\ud800-\\udfff"+he+"\\ufe0e\\ufe0f]"),Le=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,ze=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Fe=-1,Be={};Be[A]=Be[C]=Be[j]=Be[T]=Be[O]=Be[k]=Be["[object Uint8ClampedArray]"]=Be[N]=Be[I]=!0,Be[c]=Be[l]=Be[x]=Be[u]=Be[E]=Be[d]=Be[h]=Be[f]=Be[g]=Be[m]=Be[v]=Be[_]=Be[b]=Be[y]=Be[S]=!1;var qe={};qe[c]=qe[l]=qe[x]=qe[E]=qe[u]=qe[d]=qe[A]=qe[C]=qe[j]=qe[T]=qe[O]=qe[g]=qe[m]=qe[v]=qe[_]=qe[b]=qe[y]=qe[w]=qe[k]=qe["[object Uint8ClampedArray]"]=qe[N]=qe[I]=!0,qe[h]=qe[f]=qe[S]=!1;var He={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ue=parseFloat,$e=parseInt,We="object"==typeof e&&e&&e.Object===Object&&e,Ge="object"==typeof self&&self&&self.Object===Object&&self,Ve=We||Ge||Function("return this")(),Je=t&&!t.nodeType&&t,Xe=Je&&"object"==typeof r&&r&&!r.nodeType&&r,Qe=Xe&&Xe.exports===Je,Ye=Qe&&We.process,Ke=function(){try{var e=Xe&&Xe.require&&Xe.require("util").types;return e||Ye&&Ye.binding&&Ye.binding("util")}catch(e){}}(),Ze=Ke&&Ke.isArrayBuffer,et=Ke&&Ke.isDate,tt=Ke&&Ke.isMap,nt=Ke&&Ke.isRegExp,rt=Ke&&Ke.isSet,it=Ke&&Ke.isTypedArray;function ot(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function st(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r}function at(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function ct(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function lt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function ut(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}function dt(e,t){return!!(null==e?0:e.length)&&wt(e,t,0)>-1}function ht(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function ft(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function pt(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function gt(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n}function mt(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function vt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var _t=At("length");function bt(e,t,n){var r;return n(e,(function(e,n,i){if(t(e,n,i))return r=n,!1})),r}function yt(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}function wt(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):yt(e,xt,n)}function St(e,t,n,r){for(var i=n-1,o=e.length;++i<o;)if(r(e[i],t))return i;return-1}function xt(e){return e!=e}function Et(e,t){var n=null==e?0:e.length;return n?Tt(e,t)/n:NaN}function At(e){return function(t){return null==t?void 0:t[e]}}function Ct(e){return function(t){return null==e?void 0:e[t]}}function jt(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n}function Tt(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function Ot(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function kt(e){return function(t){return e(t)}}function Nt(e,t){return ft(t,(function(t){return e[t]}))}function It(e,t){return e.has(t)}function Mt(e,t){for(var n=-1,r=e.length;++n<r&&wt(t,e[n],0)>-1;);return n}function Rt(e,t){for(var n=e.length;n--&&wt(t,e[n],0)>-1;);return n}function Dt(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Pt=Ct({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Lt=Ct({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function zt(e){return"\\"+He[e]}function Ft(e){return Pe.test(e)}function Bt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function qt(e,t){return function(n){return e(t(n))}}function Ht(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var a=e[n];a!==t&&a!==s||(e[n]=s,o[i++]=n)}return o}function Ut(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function $t(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function Wt(e){return Ft(e)?function(e){var t=Re.lastIndex=0;for(;Re.test(e);)++t;return t}(e):_t(e)}function Gt(e){return Ft(e)?function(e){return e.match(Re)||[]}(e):function(e){return e.split("")}(e)}var Vt=Ct({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Jt=function e(t){var n,r=(t=null==t?Ve:Jt.defaults(Ve.Object(),t,Jt.pick(Ve,ze))).Array,i=t.Date,he=t.Error,fe=t.Function,pe=t.Math,ge=t.Object,me=t.RegExp,ve=t.String,_e=t.TypeError,be=r.prototype,ye=fe.prototype,we=ge.prototype,Se=t["__core-js_shared__"],xe=ye.toString,Ee=we.hasOwnProperty,Ae=0,Ce=(n=/[^.]+$/.exec(Se&&Se.keys&&Se.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",je=we.toString,Te=xe.call(ge),Oe=Ve._,ke=me("^"+xe.call(Ee).replace(G,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ne=Qe?t.Buffer:void 0,Re=t.Symbol,Pe=t.Uint8Array,He=Ne?Ne.allocUnsafe:void 0,We=qt(ge.getPrototypeOf,ge),Ge=ge.create,Je=we.propertyIsEnumerable,Xe=be.splice,Ye=Re?Re.isConcatSpreadable:void 0,Ke=Re?Re.iterator:void 0,_t=Re?Re.toStringTag:void 0,Ct=function(){try{var e=Zi(ge,"defineProperty");return e({},"",{}),e}catch(e){}}(),Xt=t.clearTimeout!==Ve.clearTimeout&&t.clearTimeout,Qt=i&&i.now!==Ve.Date.now&&i.now,Yt=t.setTimeout!==Ve.setTimeout&&t.setTimeout,Kt=pe.ceil,Zt=pe.floor,en=ge.getOwnPropertySymbols,tn=Ne?Ne.isBuffer:void 0,nn=t.isFinite,rn=be.join,on=qt(ge.keys,ge),sn=pe.max,an=pe.min,cn=i.now,ln=t.parseInt,un=pe.random,dn=be.reverse,hn=Zi(t,"DataView"),fn=Zi(t,"Map"),pn=Zi(t,"Promise"),gn=Zi(t,"Set"),mn=Zi(t,"WeakMap"),vn=Zi(ge,"create"),_n=mn&&new mn,bn={},yn=jo(hn),wn=jo(fn),Sn=jo(pn),xn=jo(gn),En=jo(mn),An=Re?Re.prototype:void 0,Cn=An?An.valueOf:void 0,jn=An?An.toString:void 0;function Tn(e){if($s(e)&&!Ms(e)&&!(e instanceof In)){if(e instanceof Nn)return e;if(Ee.call(e,"__wrapped__"))return To(e)}return new Nn(e)}var On=function(){function e(){}return function(t){if(!Us(t))return{};if(Ge)return Ge(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();function kn(){}function Nn(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}function In(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Mn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Rn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Dn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Pn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new Dn;++t<n;)this.add(e[t])}function Ln(e){var t=this.__data__=new Rn(e);this.size=t.size}function zn(e,t){var n=Ms(e),r=!n&&Is(e),i=!n&&!r&&Ls(e),o=!n&&!r&&!i&&Ks(e),s=n||r||i||o,a=s?Ot(e.length,ve):[],c=a.length;for(var l in e)!t&&!Ee.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||so(l,c))||a.push(l);return a}function Fn(e){var t=e.length;return t?e[Pr(0,t-1)]:void 0}function Bn(e,t){return Eo(vi(e),Xn(t,0,e.length))}function qn(e){return Eo(vi(e))}function Hn(e,t,n){(void 0!==n&&!Os(e[t],n)||void 0===n&&!(t in e))&&Vn(e,t,n)}function Un(e,t,n){var r=e[t];Ee.call(e,t)&&Os(r,n)&&(void 0!==n||t in e)||Vn(e,t,n)}function $n(e,t){for(var n=e.length;n--;)if(Os(e[n][0],t))return n;return-1}function Wn(e,t,n,r){return er(e,(function(e,i,o){t(r,e,n(e),o)})),r}function Gn(e,t){return e&&_i(t,ya(t),e)}function Vn(e,t,n){"__proto__"==t&&Ct?Ct(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Jn(e,t){for(var n=-1,i=t.length,o=r(i),s=null==e;++n<i;)o[n]=s?void 0:ga(e,t[n]);return o}function Xn(e,t,n){return e==e&&(void 0!==n&&(e=e<=n?e:n),void 0!==t&&(e=e>=t?e:t)),e}function Qn(e,t,n,r,i,o){var s,a=1&t,l=2&t,h=4&t;if(n&&(s=i?n(e,r,i,o):n(e)),void 0!==s)return s;if(!Us(e))return e;var S=Ms(e);if(S){if(s=function(e){var t=e.length,n=new e.constructor(t);t&&"string"==typeof e[0]&&Ee.call(e,"index")&&(n.index=e.index,n.input=e.input);return n}(e),!a)return vi(e,s)}else{var M=no(e),R=M==f||M==p;if(Ls(e))return di(e,a);if(M==v||M==c||R&&!i){if(s=l||R?{}:io(e),!a)return l?function(e,t){return _i(e,to(e),t)}(e,function(e,t){return e&&_i(t,wa(t),e)}(s,e)):function(e,t){return _i(e,eo(e),t)}(e,Gn(s,e))}else{if(!qe[M])return i?e:{};s=function(e,t,n){var r=e.constructor;switch(t){case x:return hi(e);case u:case d:return new r(+e);case E:return function(e,t){var n=t?hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case A:case C:case j:case T:case O:case k:case"[object Uint8ClampedArray]":case N:case I:return fi(e,n);case g:return new r;case m:case y:return new r(e);case _:return function(e){var t=new e.constructor(e.source,re.exec(e));return t.lastIndex=e.lastIndex,t}(e);case b:return new r;case w:return i=e,Cn?ge(Cn.call(i)):{}}var i}(e,M,a)}}o||(o=new Ln);var D=o.get(e);if(D)return D;o.set(e,s),Xs(e)?e.forEach((function(r){s.add(Qn(r,t,n,r,e,o))})):Ws(e)&&e.forEach((function(r,i){s.set(i,Qn(r,t,n,i,e,o))}));var P=S?void 0:(h?l?Gi:Wi:l?wa:ya)(e);return at(P||e,(function(r,i){P&&(r=e[i=r]),Un(s,i,Qn(r,t,n,i,e,o))})),s}function Yn(e,t,n){var r=n.length;if(null==e)return!r;for(e=ge(e);r--;){var i=n[r],o=t[i],s=e[i];if(void 0===s&&!(i in e)||!o(s))return!1}return!0}function Kn(e,t,n){if("function"!=typeof e)throw new _e(o);return yo((function(){e.apply(void 0,n)}),t)}function Zn(e,t,n,r){var i=-1,o=dt,s=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=ft(t,kt(n))),r?(o=ht,s=!1):t.length>=200&&(o=It,s=!1,t=new Pn(t));e:for(;++i<a;){var u=e[i],d=null==n?u:n(u);if(u=r||0!==u?u:0,s&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else o(t,d,r)||c.push(u)}return c}Tn.templateSettings={escape:B,evaluate:q,interpolate:H,variable:"",imports:{_:Tn}},Tn.prototype=kn.prototype,Tn.prototype.constructor=Tn,Nn.prototype=On(kn.prototype),Nn.prototype.constructor=Nn,In.prototype=On(kn.prototype),In.prototype.constructor=In,Mn.prototype.clear=function(){this.__data__=vn?vn(null):{},this.size=0},Mn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Mn.prototype.get=function(e){var t=this.__data__;if(vn){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return Ee.call(t,e)?t[e]:void 0},Mn.prototype.has=function(e){var t=this.__data__;return vn?void 0!==t[e]:Ee.call(t,e)},Mn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=vn&&void 0===t?"__lodash_hash_undefined__":t,this},Rn.prototype.clear=function(){this.__data__=[],this.size=0},Rn.prototype.delete=function(e){var t=this.__data__,n=$n(t,e);return!(n<0)&&(n==t.length-1?t.pop():Xe.call(t,n,1),--this.size,!0)},Rn.prototype.get=function(e){var t=this.__data__,n=$n(t,e);return n<0?void 0:t[n][1]},Rn.prototype.has=function(e){return $n(this.__data__,e)>-1},Rn.prototype.set=function(e,t){var n=this.__data__,r=$n(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},Dn.prototype.clear=function(){this.size=0,this.__data__={hash:new Mn,map:new(fn||Rn),string:new Mn}},Dn.prototype.delete=function(e){var t=Yi(this,e).delete(e);return this.size-=t?1:0,t},Dn.prototype.get=function(e){return Yi(this,e).get(e)},Dn.prototype.has=function(e){return Yi(this,e).has(e)},Dn.prototype.set=function(e,t){var n=Yi(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Pn.prototype.add=Pn.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Pn.prototype.has=function(e){return this.__data__.has(e)},Ln.prototype.clear=function(){this.__data__=new Rn,this.size=0},Ln.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ln.prototype.get=function(e){return this.__data__.get(e)},Ln.prototype.has=function(e){return this.__data__.has(e)},Ln.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Rn){var r=n.__data__;if(!fn||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new Dn(r)}return n.set(e,t),this.size=n.size,this};var er=wi(cr),tr=wi(lr,!0);function nr(e,t){var n=!0;return er(e,(function(e,r,i){return n=!!t(e,r,i)})),n}function rr(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],s=t(o);if(null!=s&&(void 0===a?s==s&&!Ys(s):n(s,a)))var a=s,c=o}return c}function ir(e,t){var n=[];return er(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n}function or(e,t,n,r,i){var o=-1,s=e.length;for(n||(n=oo),i||(i=[]);++o<s;){var a=e[o];t>0&&n(a)?t>1?or(a,t-1,n,r,i):pt(i,a):r||(i[i.length]=a)}return i}var sr=Si(),ar=Si(!0);function cr(e,t){return e&&sr(e,t,ya)}function lr(e,t){return e&&ar(e,t,ya)}function ur(e,t){return ut(t,(function(t){return Bs(e[t])}))}function dr(e,t){for(var n=0,r=(t=ai(t,e)).length;null!=e&&n<r;)e=e[Co(t[n++])];return n&&n==r?e:void 0}function hr(e,t,n){var r=t(e);return Ms(e)?r:pt(r,n(e))}function fr(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":_t&&_t in ge(e)?function(e){var t=Ee.call(e,_t),n=e[_t];try{e[_t]=void 0;var r=!0}catch(e){}var i=je.call(e);r&&(t?e[_t]=n:delete e[_t]);return i}(e):function(e){return je.call(e)}(e)}function pr(e,t){return e>t}function gr(e,t){return null!=e&&Ee.call(e,t)}function mr(e,t){return null!=e&&t in ge(e)}function vr(e,t,n){for(var i=n?ht:dt,o=e[0].length,s=e.length,a=s,c=r(s),l=1/0,u=[];a--;){var d=e[a];a&&t&&(d=ft(d,kt(t))),l=an(d.length,l),c[a]=!n&&(t||o>=120&&d.length>=120)?new Pn(a&&d):void 0}d=e[0];var h=-1,f=c[0];e:for(;++h<o&&u.length<l;){var p=d[h],g=t?t(p):p;if(p=n||0!==p?p:0,!(f?It(f,g):i(u,g,n))){for(a=s;--a;){var m=c[a];if(!(m?It(m,g):i(e[a],g,n)))continue e}f&&f.push(g),u.push(p)}}return u}function _r(e,t,n){var r=null==(e=mo(e,t=ai(t,e)))?e:e[Co(Fo(t))];return null==r?void 0:ot(r,e,n)}function br(e){return $s(e)&&fr(e)==c}function yr(e,t,n,r,i){return e===t||(null==e||null==t||!$s(e)&&!$s(t)?e!=e&&t!=t:function(e,t,n,r,i,o){var s=Ms(e),a=Ms(t),f=s?l:no(e),p=a?l:no(t),S=(f=f==c?v:f)==v,A=(p=p==c?v:p)==v,C=f==p;if(C&&Ls(e)){if(!Ls(t))return!1;s=!0,S=!1}if(C&&!S)return o||(o=new Ln),s||Ks(e)?Ui(e,t,n,r,i,o):function(e,t,n,r,i,o,s){switch(n){case E:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case x:return!(e.byteLength!=t.byteLength||!o(new Pe(e),new Pe(t)));case u:case d:case m:return Os(+e,+t);case h:return e.name==t.name&&e.message==t.message;case _:case y:return e==t+"";case g:var a=Bt;case b:var c=1&r;if(a||(a=Ut),e.size!=t.size&&!c)return!1;var l=s.get(e);if(l)return l==t;r|=2,s.set(e,t);var f=Ui(a(e),a(t),r,i,o,s);return s.delete(e),f;case w:if(Cn)return Cn.call(e)==Cn.call(t)}return!1}(e,t,f,n,r,i,o);if(!(1&n)){var j=S&&Ee.call(e,"__wrapped__"),T=A&&Ee.call(t,"__wrapped__");if(j||T){var O=j?e.value():e,k=T?t.value():t;return o||(o=new Ln),i(O,k,n,r,o)}}if(!C)return!1;return o||(o=new Ln),function(e,t,n,r,i,o){var s=1&n,a=Wi(e),c=a.length,l=Wi(t).length;if(c!=l&&!s)return!1;var u=c;for(;u--;){var d=a[u];if(!(s?d in t:Ee.call(t,d)))return!1}var h=o.get(e),f=o.get(t);if(h&&f)return h==t&&f==e;var p=!0;o.set(e,t),o.set(t,e);var g=s;for(;++u<c;){d=a[u];var m=e[d],v=t[d];if(r)var _=s?r(v,m,d,t,e,o):r(m,v,d,e,t,o);if(!(void 0===_?m===v||i(m,v,n,r,o):_)){p=!1;break}g||(g="constructor"==d)}if(p&&!g){var b=e.constructor,y=t.constructor;b==y||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return o.delete(e),o.delete(t),p}(e,t,n,r,i,o)}(e,t,n,r,yr,i))}function wr(e,t,n,r){var i=n.length,o=i,s=!r;if(null==e)return!o;for(e=ge(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var c=(a=n[i])[0],l=e[c],u=a[1];if(s&&a[2]){if(void 0===l&&!(c in e))return!1}else{var d=new Ln;if(r)var h=r(l,u,c,e,t,d);if(!(void 0===h?yr(u,l,3,r,d):h))return!1}}return!0}function Sr(e){return!(!Us(e)||(t=e,Ce&&Ce in t))&&(Bs(e)?ke:se).test(jo(e));var t}function xr(e){return"function"==typeof e?e:null==e?Ga:"object"==typeof e?Ms(e)?Or(e[0],e[1]):Tr(e):tc(e)}function Er(e){if(!ho(e))return on(e);var t=[];for(var n in ge(e))Ee.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Ar(e){if(!Us(e))return function(e){var t=[];if(null!=e)for(var n in ge(e))t.push(n);return t}(e);var t=ho(e),n=[];for(var r in e)("constructor"!=r||!t&&Ee.call(e,r))&&n.push(r);return n}function Cr(e,t){return e<t}function jr(e,t){var n=-1,i=Ds(e)?r(e.length):[];return er(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}function Tr(e){var t=Ki(e);return 1==t.length&&t[0][2]?po(t[0][0],t[0][1]):function(n){return n===e||wr(n,e,t)}}function Or(e,t){return co(e)&&fo(t)?po(Co(e),t):function(n){var r=ga(n,e);return void 0===r&&r===t?ma(n,e):yr(t,r,3)}}function kr(e,t,n,r,i){e!==t&&sr(t,(function(o,s){if(i||(i=new Ln),Us(o))!function(e,t,n,r,i,o,s){var a=_o(e,n),c=_o(t,n),l=s.get(c);if(l)return void Hn(e,n,l);var u=o?o(a,c,n+"",e,t,s):void 0,d=void 0===u;if(d){var h=Ms(c),f=!h&&Ls(c),p=!h&&!f&&Ks(c);u=c,h||f||p?Ms(a)?u=a:Ps(a)?u=vi(a):f?(d=!1,u=di(c,!0)):p?(d=!1,u=fi(c,!0)):u=[]:Vs(c)||Is(c)?(u=a,Is(a)?u=sa(a):Us(a)&&!Bs(a)||(u=io(c))):d=!1}d&&(s.set(c,u),i(u,c,r,o,s),s.delete(c));Hn(e,n,u)}(e,t,s,n,kr,r,i);else{var a=r?r(_o(e,s),o,s+"",e,t,i):void 0;void 0===a&&(a=o),Hn(e,s,a)}}),wa)}function Nr(e,t){var n=e.length;if(n)return so(t+=t<0?n:0,n)?e[t]:void 0}function Ir(e,t,n){t=t.length?ft(t,(function(e){return Ms(e)?function(t){return dr(t,1===e.length?e[0]:e)}:e})):[Ga];var r=-1;return t=ft(t,kt(Qi())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(jr(e,(function(e,n,i){return{criteria:ft(t,(function(t){return t(e)})),index:++r,value:e}})),(function(e,t){return function(e,t,n){var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;for(;++r<s;){var c=pi(i[r],o[r]);if(c){if(r>=a)return c;var l=n[r];return c*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)}))}function Mr(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=dr(e,s);n(a,s)&&qr(o,ai(s,e),a)}return o}function Rr(e,t,n,r){var i=r?St:wt,o=-1,s=t.length,a=e;for(e===t&&(t=vi(t)),n&&(a=ft(e,kt(n)));++o<s;)for(var c=0,l=t[o],u=n?n(l):l;(c=i(a,u,c,r))>-1;)a!==e&&Xe.call(a,c,1),Xe.call(e,c,1);return e}function Dr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==o){var o=i;so(i)?Xe.call(e,i,1):Zr(e,i)}}return e}function Pr(e,t){return e+Zt(un()*(t-e+1))}function Lr(e,t){var n="";if(!e||t<1||t>9007199254740991)return n;do{t%2&&(n+=e),(t=Zt(t/2))&&(e+=e)}while(t);return n}function zr(e,t){return wo(go(e,t,Ga),e+"")}function Fr(e){return Fn(Oa(e))}function Br(e,t){var n=Oa(e);return Eo(n,Xn(t,0,n.length))}function qr(e,t,n,r){if(!Us(e))return e;for(var i=-1,o=(t=ai(t,e)).length,s=o-1,a=e;null!=a&&++i<o;){var c=Co(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=s){var u=a[c];void 0===(l=r?r(u,c,a):void 0)&&(l=Us(u)?u:so(t[i+1])?[]:{})}Un(a,c,l),a=a[c]}return e}var Hr=_n?function(e,t){return _n.set(e,t),e}:Ga,Ur=Ct?function(e,t){return Ct(e,"toString",{configurable:!0,enumerable:!1,value:Ua(t),writable:!0})}:Ga;function $r(e){return Eo(Oa(e))}function Wr(e,t,n){var i=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var s=r(o);++i<o;)s[i]=e[i+t];return s}function Gr(e,t){var n;return er(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n}function Vr(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=e[o];null!==s&&!Ys(s)&&(n?s<=t:s<t)?r=o+1:i=o}return i}return Jr(e,t,Ga,n)}function Jr(e,t,n,r){var i=0,o=null==e?0:e.length;if(0===o)return 0;for(var s=(t=n(t))!=t,a=null===t,c=Ys(t),l=void 0===t;i<o;){var u=Zt((i+o)/2),d=n(e[u]),h=void 0!==d,f=null===d,p=d==d,g=Ys(d);if(s)var m=r||p;else m=l?p&&(r||h):a?p&&h&&(r||!f):c?p&&h&&!f&&(r||!g):!f&&!g&&(r?d<=t:d<t);m?i=u+1:o=u}return an(o,4294967294)}function Xr(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n],a=t?t(s):s;if(!n||!Os(a,c)){var c=a;o[i++]=0===s?0:s}}return o}function Qr(e){return"number"==typeof e?e:Ys(e)?NaN:+e}function Yr(e){if("string"==typeof e)return e;if(Ms(e))return ft(e,Yr)+"";if(Ys(e))return jn?jn.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Kr(e,t,n){var r=-1,i=dt,o=e.length,s=!0,a=[],c=a;if(n)s=!1,i=ht;else if(o>=200){var l=t?null:Li(e);if(l)return Ut(l);s=!1,i=It,c=new Pn}else c=t?[]:a;e:for(;++r<o;){var u=e[r],d=t?t(u):u;if(u=n||0!==u?u:0,s&&d==d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),a.push(u)}else i(c,d,n)||(c!==a&&c.push(d),a.push(u))}return a}function Zr(e,t){return null==(e=mo(e,t=ai(t,e)))||delete e[Co(Fo(t))]}function ei(e,t,n,r){return qr(e,t,n(dr(e,t)),r)}function ti(e,t,n,r){for(var i=e.length,o=r?i:-1;(r?o--:++o<i)&&t(e[o],o,e););return n?Wr(e,r?0:o,r?o+1:i):Wr(e,r?o+1:0,r?i:o)}function ni(e,t){var n=e;return n instanceof In&&(n=n.value()),gt(t,(function(e,t){return t.func.apply(t.thisArg,pt([e],t.args))}),n)}function ri(e,t,n){var i=e.length;if(i<2)return i?Kr(e[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=e[o],c=-1;++c<i;)c!=o&&(s[o]=Zn(s[o]||a,e[c],t,n));return Kr(or(s,1),t,n)}function ii(e,t,n){for(var r=-1,i=e.length,o=t.length,s={};++r<i;){var a=r<o?t[r]:void 0;n(s,e[r],a)}return s}function oi(e){return Ps(e)?e:[]}function si(e){return"function"==typeof e?e:Ga}function ai(e,t){return Ms(e)?e:co(e,t)?[e]:Ao(aa(e))}var ci=zr;function li(e,t,n){var r=e.length;return n=void 0===n?r:n,!t&&n>=r?e:Wr(e,t,n)}var ui=Xt||function(e){return Ve.clearTimeout(e)};function di(e,t){if(t)return e.slice();var n=e.length,r=He?He(n):new e.constructor(n);return e.copy(r),r}function hi(e){var t=new e.constructor(e.byteLength);return new Pe(t).set(new Pe(e)),t}function fi(e,t){var n=t?hi(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function pi(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Ys(e),s=void 0!==t,a=null===t,c=t==t,l=Ys(t);if(!a&&!l&&!o&&e>t||o&&s&&c&&!a&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!o&&!l&&e<t||l&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!c)return-1}return 0}function gi(e,t,n,i){for(var o=-1,s=e.length,a=n.length,c=-1,l=t.length,u=sn(s-a,0),d=r(l+u),h=!i;++c<l;)d[c]=t[c];for(;++o<a;)(h||o<s)&&(d[n[o]]=e[o]);for(;u--;)d[c++]=e[o++];return d}function mi(e,t,n,i){for(var o=-1,s=e.length,a=-1,c=n.length,l=-1,u=t.length,d=sn(s-c,0),h=r(d+u),f=!i;++o<d;)h[o]=e[o];for(var p=o;++l<u;)h[p+l]=t[l];for(;++a<c;)(f||o<s)&&(h[p+n[a]]=e[o++]);return h}function vi(e,t){var n=-1,i=e.length;for(t||(t=r(i));++n<i;)t[n]=e[n];return t}function _i(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),i?Vn(n,a,c):Un(n,a,c)}return n}function bi(e,t){return function(n,r){var i=Ms(n)?st:Wn,o=t?t():{};return i(n,e,Qi(r,2),o)}}function yi(e){return zr((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&ao(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=ge(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t}))}function wi(e,t){return function(n,r){if(null==n)return n;if(!Ds(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=ge(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Si(e){return function(t,n,r){for(var i=-1,o=ge(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}function xi(e){return function(t){var n=Ft(t=aa(t))?Gt(t):void 0,r=n?n[0]:t.charAt(0),i=n?li(n,1).join(""):t.slice(1);return r[e]()+i}}function Ei(e){return function(t){return gt(Ba(Ia(t).replace(Ie,"")),e,"")}}function Ai(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=On(e.prototype),r=e.apply(n,t);return Us(r)?r:n}}function Ci(e){return function(t,n,r){var i=ge(t);if(!Ds(t)){var o=Qi(n,3);t=ya(t),n=function(e){return o(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[o?t[s]:s]:void 0}}function ji(e){return $i((function(t){var n=t.length,r=n,i=Nn.prototype.thru;for(e&&t.reverse();r--;){var s=t[r];if("function"!=typeof s)throw new _e(o);if(i&&!a&&"wrapper"==Ji(s))var a=new Nn([],!0)}for(r=a?r:n;++r<n;){var c=Ji(s=t[r]),l="wrapper"==c?Vi(s):void 0;a=l&&lo(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?a[Ji(l[0])].apply(a,l[3]):1==s.length&&lo(s)?a[c]():a.thru(s)}return function(){var e=arguments,r=e[0];if(a&&1==e.length&&Ms(r))return a.plant(r).value();for(var i=0,o=n?t[i].apply(this,e):r;++i<n;)o=t[i].call(this,o);return o}}))}function Ti(e,t,n,i,o,s,a,c,l,u){var d=128&t,h=1&t,f=2&t,p=24&t,g=512&t,m=f?void 0:Ai(e);return function v(){for(var _=arguments.length,b=r(_),y=_;y--;)b[y]=arguments[y];if(p)var w=Xi(v),S=Dt(b,w);if(i&&(b=gi(b,i,o,p)),s&&(b=mi(b,s,a,p)),_-=S,p&&_<u){var x=Ht(b,w);return Di(e,t,Ti,v.placeholder,n,b,x,c,l,u-_)}var E=h?n:this,A=f?E[e]:e;return _=b.length,c?b=vo(b,c):g&&_>1&&b.reverse(),d&&l<_&&(b.length=l),this&&this!==Ve&&this instanceof v&&(A=m||Ai(A)),A.apply(E,b)}}function Oi(e,t){return function(n,r){return function(e,t,n,r){return cr(e,(function(e,i,o){t(r,n(e),i,o)})),r}(n,e,t(r),{})}}function ki(e,t){return function(n,r){var i;if(void 0===n&&void 0===r)return t;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Yr(n),r=Yr(r)):(n=Qr(n),r=Qr(r)),i=e(n,r)}return i}}function Ni(e){return $i((function(t){return t=ft(t,kt(Qi())),zr((function(n){var r=this;return e(t,(function(e){return ot(e,r,n)}))}))}))}function Ii(e,t){var n=(t=void 0===t?" ":Yr(t)).length;if(n<2)return n?Lr(t,e):t;var r=Lr(t,Kt(e/Wt(t)));return Ft(t)?li(Gt(r),0,e).join(""):r.slice(0,e)}function Mi(e){return function(t,n,i){return i&&"number"!=typeof i&&ao(t,n,i)&&(n=i=void 0),t=na(t),void 0===n?(n=t,t=0):n=na(n),function(e,t,n,i){for(var o=-1,s=sn(Kt((t-e)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=e,e+=n;return a}(t,n,i=void 0===i?t<n?1:-1:na(i),e)}}function Ri(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=oa(t),n=oa(n)),e(t,n)}}function Di(e,t,n,r,i,o,s,a,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var d=[e,t,i,u?o:void 0,u?s:void 0,u?void 0:o,u?void 0:s,a,c,l],h=n.apply(void 0,d);return lo(e)&&bo(h,d),h.placeholder=r,So(h,e,t)}function Pi(e){var t=pe[e];return function(e,n){if(e=oa(e),(n=null==n?0:an(ra(n),292))&&nn(e)){var r=(aa(e)+"e").split("e");return+((r=(aa(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Li=gn&&1/Ut(new gn([,-0]))[1]==1/0?function(e){return new gn(e)}:Ya;function zi(e){return function(t){var n=no(t);return n==g?Bt(t):n==b?$t(t):function(e,t){return ft(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Fi(e,t,n,i,a,c,l,u){var d=2&t;if(!d&&"function"!=typeof e)throw new _e(o);var h=i?i.length:0;if(h||(t&=-97,i=a=void 0),l=void 0===l?l:sn(ra(l),0),u=void 0===u?u:ra(u),h-=a?a.length:0,64&t){var f=i,p=a;i=a=void 0}var g=d?void 0:Vi(e),m=[e,t,n,i,a,f,p,c,l,u];if(g&&function(e,t){var n=e[1],r=t[1],i=n|r,o=i<131,a=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!o&&!a)return e;1&r&&(e[2]=t[2],i|=1&n?0:4);var c=t[3];if(c){var l=e[3];e[3]=l?gi(l,c,t[4]):c,e[4]=l?Ht(e[3],s):t[4]}(c=t[5])&&(l=e[5],e[5]=l?mi(l,c,t[6]):c,e[6]=l?Ht(e[5],s):t[6]);(c=t[7])&&(e[7]=c);128&r&&(e[8]=null==e[8]?t[8]:an(e[8],t[8]));null==e[9]&&(e[9]=t[9]);e[0]=t[0],e[1]=i}(m,g),e=m[0],t=m[1],n=m[2],i=m[3],a=m[4],!(u=m[9]=void 0===m[9]?d?0:e.length:sn(m[9]-h,0))&&24&t&&(t&=-25),t&&1!=t)v=8==t||16==t?function(e,t,n){var i=Ai(e);return function o(){for(var s=arguments.length,a=r(s),c=s,l=Xi(o);c--;)a[c]=arguments[c];var u=s<3&&a[0]!==l&&a[s-1]!==l?[]:Ht(a,l);if((s-=u.length)<n)return Di(e,t,Ti,o.placeholder,void 0,a,u,void 0,void 0,n-s);var d=this&&this!==Ve&&this instanceof o?i:e;return ot(d,this,a)}}(e,t,u):32!=t&&33!=t||a.length?Ti.apply(void 0,m):function(e,t,n,i){var o=1&t,s=Ai(e);return function t(){for(var a=-1,c=arguments.length,l=-1,u=i.length,d=r(u+c),h=this&&this!==Ve&&this instanceof t?s:e;++l<u;)d[l]=i[l];for(;c--;)d[l++]=arguments[++a];return ot(h,o?n:this,d)}}(e,t,n,i);else var v=function(e,t,n){var r=1&t,i=Ai(e);return function t(){var o=this&&this!==Ve&&this instanceof t?i:e;return o.apply(r?n:this,arguments)}}(e,t,n);return So((g?Hr:bo)(v,m),e,t)}function Bi(e,t,n,r){return void 0===e||Os(e,we[n])&&!Ee.call(r,n)?t:e}function qi(e,t,n,r,i,o){return Us(e)&&Us(t)&&(o.set(t,e),kr(e,t,void 0,qi,o),o.delete(t)),e}function Hi(e){return Vs(e)?void 0:e}function Ui(e,t,n,r,i,o){var s=1&n,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=o.get(e),u=o.get(t);if(l&&u)return l==t&&u==e;var d=-1,h=!0,f=2&n?new Pn:void 0;for(o.set(e,t),o.set(t,e);++d<a;){var p=e[d],g=t[d];if(r)var m=s?r(g,p,d,t,e,o):r(p,g,d,e,t,o);if(void 0!==m){if(m)continue;h=!1;break}if(f){if(!vt(t,(function(e,t){if(!It(f,t)&&(p===e||i(p,e,n,r,o)))return f.push(t)}))){h=!1;break}}else if(p!==g&&!i(p,g,n,r,o)){h=!1;break}}return o.delete(e),o.delete(t),h}function $i(e){return wo(go(e,void 0,Ro),e+"")}function Wi(e){return hr(e,ya,eo)}function Gi(e){return hr(e,wa,to)}var Vi=_n?function(e){return _n.get(e)}:Ya;function Ji(e){for(var t=e.name+"",n=bn[t],r=Ee.call(bn,t)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==e)return i.name}return t}function Xi(e){return(Ee.call(Tn,"placeholder")?Tn:e).placeholder}function Qi(){var e=Tn.iteratee||Va;return e=e===Va?xr:e,arguments.length?e(arguments[0],arguments[1]):e}function Yi(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Ki(e){for(var t=ya(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,fo(i)]}return t}function Zi(e,t){var n=function(e,t){return null==e?void 0:e[t]}(e,t);return Sr(n)?n:void 0}var eo=en?function(e){return null==e?[]:(e=ge(e),ut(en(e),(function(t){return Je.call(e,t)})))}:ic,to=en?function(e){for(var t=[];e;)pt(t,eo(e)),e=We(e);return t}:ic,no=fr;function ro(e,t,n){for(var r=-1,i=(t=ai(t,e)).length,o=!1;++r<i;){var s=Co(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Hs(i)&&so(s,i)&&(Ms(e)||Is(e))}function io(e){return"function"!=typeof e.constructor||ho(e)?{}:On(We(e))}function oo(e){return Ms(e)||Is(e)||!!(Ye&&e&&e[Ye])}function so(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&ce.test(e))&&e>-1&&e%1==0&&e<t}function ao(e,t,n){if(!Us(n))return!1;var r=typeof t;return!!("number"==r?Ds(n)&&so(t,n.length):"string"==r&&t in n)&&Os(n[t],e)}function co(e,t){if(Ms(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ys(e))||($.test(e)||!U.test(e)||null!=t&&e in ge(t))}function lo(e){var t=Ji(e),n=Tn[t];if("function"!=typeof n||!(t in In.prototype))return!1;if(e===n)return!0;var r=Vi(n);return!!r&&e===r[0]}(hn&&no(new hn(new ArrayBuffer(1)))!=E||fn&&no(new fn)!=g||pn&&"[object Promise]"!=no(pn.resolve())||gn&&no(new gn)!=b||mn&&no(new mn)!=S)&&(no=function(e){var t=fr(e),n=t==v?e.constructor:void 0,r=n?jo(n):"";if(r)switch(r){case yn:return E;case wn:return g;case Sn:return"[object Promise]";case xn:return b;case En:return S}return t});var uo=Se?Bs:oc;function ho(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||we)}function fo(e){return e==e&&!Us(e)}function po(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in ge(n)))}}function go(e,t,n){return t=sn(void 0===t?e.length-1:t,0),function(){for(var i=arguments,o=-1,s=sn(i.length-t,0),a=r(s);++o<s;)a[o]=i[t+o];o=-1;for(var c=r(t+1);++o<t;)c[o]=i[o];return c[t]=n(a),ot(e,this,c)}}function mo(e,t){return t.length<2?e:dr(e,Wr(t,0,-1))}function vo(e,t){for(var n=e.length,r=an(t.length,n),i=vi(e);r--;){var o=t[r];e[r]=so(o,n)?i[o]:void 0}return e}function _o(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var bo=xo(Hr),yo=Yt||function(e,t){return Ve.setTimeout(e,t)},wo=xo(Ur);function So(e,t,n){var r=t+"";return wo(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(Y,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return at(a,(function(n){var r="_."+n[0];t&n[1]&&!dt(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(K);return t?t[1].split(Z):[]}(r),n)))}function xo(e){var t=0,n=0;return function(){var r=cn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function Eo(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=Pr(n,i),s=e[o];e[o]=e[n],e[n]=s}return e.length=t,e}var Ao=function(e){var t=xs(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(W,(function(e,n,r,i){t.push(r?i.replace(te,"$1"):n||e)})),t}));function Co(e){if("string"==typeof e||Ys(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function jo(e){if(null!=e){try{return xe.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function To(e){if(e instanceof In)return e.clone();var t=new Nn(e.__wrapped__,e.__chain__);return t.__actions__=vi(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Oo=zr((function(e,t){return Ps(e)?Zn(e,or(t,1,Ps,!0)):[]})),ko=zr((function(e,t){var n=Fo(t);return Ps(n)&&(n=void 0),Ps(e)?Zn(e,or(t,1,Ps,!0),Qi(n,2)):[]})),No=zr((function(e,t){var n=Fo(t);return Ps(n)&&(n=void 0),Ps(e)?Zn(e,or(t,1,Ps,!0),void 0,n):[]}));function Io(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ra(n);return i<0&&(i=sn(r+i,0)),yt(e,Qi(t,3),i)}function Mo(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ra(n),i=n<0?sn(r+i,0):an(i,r-1)),yt(e,Qi(t,3),i,!0)}function Ro(e){return(null==e?0:e.length)?or(e,1):[]}function Do(e){return e&&e.length?e[0]:void 0}var Po=zr((function(e){var t=ft(e,oi);return t.length&&t[0]===e[0]?vr(t):[]})),Lo=zr((function(e){var t=Fo(e),n=ft(e,oi);return t===Fo(n)?t=void 0:n.pop(),n.length&&n[0]===e[0]?vr(n,Qi(t,2)):[]})),zo=zr((function(e){var t=Fo(e),n=ft(e,oi);return(t="function"==typeof t?t:void 0)&&n.pop(),n.length&&n[0]===e[0]?vr(n,void 0,t):[]}));function Fo(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var Bo=zr(qo);function qo(e,t){return e&&e.length&&t&&t.length?Rr(e,t):e}var Ho=$i((function(e,t){var n=null==e?0:e.length,r=Jn(e,t);return Dr(e,ft(t,(function(e){return so(e,n)?+e:e})).sort(pi)),r}));function Uo(e){return null==e?e:dn.call(e)}var $o=zr((function(e){return Kr(or(e,1,Ps,!0))})),Wo=zr((function(e){var t=Fo(e);return Ps(t)&&(t=void 0),Kr(or(e,1,Ps,!0),Qi(t,2))})),Go=zr((function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,Kr(or(e,1,Ps,!0),void 0,t)}));function Vo(e){if(!e||!e.length)return[];var t=0;return e=ut(e,(function(e){if(Ps(e))return t=sn(e.length,t),!0})),Ot(t,(function(t){return ft(e,At(t))}))}function Jo(e,t){if(!e||!e.length)return[];var n=Vo(e);return null==t?n:ft(n,(function(e){return ot(t,void 0,e)}))}var Xo=zr((function(e,t){return Ps(e)?Zn(e,t):[]})),Qo=zr((function(e){return ri(ut(e,Ps))})),Yo=zr((function(e){var t=Fo(e);return Ps(t)&&(t=void 0),ri(ut(e,Ps),Qi(t,2))})),Ko=zr((function(e){var t=Fo(e);return t="function"==typeof t?t:void 0,ri(ut(e,Ps),void 0,t)})),Zo=zr(Vo);var es=zr((function(e){var t=e.length,n=t>1?e[t-1]:void 0;return n="function"==typeof n?(e.pop(),n):void 0,Jo(e,n)}));function ts(e){var t=Tn(e);return t.__chain__=!0,t}function ns(e,t){return t(e)}var rs=$i((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return Jn(t,e)};return!(t>1||this.__actions__.length)&&r instanceof In&&so(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:ns,args:[i],thisArg:void 0}),new Nn(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(void 0),e}))):this.thru(i)}));var is=bi((function(e,t,n){Ee.call(e,n)?++e[n]:Vn(e,n,1)}));var os=Ci(Io),ss=Ci(Mo);function as(e,t){return(Ms(e)?at:er)(e,Qi(t,3))}function cs(e,t){return(Ms(e)?ct:tr)(e,Qi(t,3))}var ls=bi((function(e,t,n){Ee.call(e,n)?e[n].push(t):Vn(e,n,[t])}));var us=zr((function(e,t,n){var i=-1,o="function"==typeof t,s=Ds(e)?r(e.length):[];return er(e,(function(e){s[++i]=o?ot(t,e,n):_r(e,t,n)})),s})),ds=bi((function(e,t,n){Vn(e,n,t)}));function hs(e,t){return(Ms(e)?ft:jr)(e,Qi(t,3))}var fs=bi((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]}));var ps=zr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&ao(e,t[0],t[1])?t=[]:n>2&&ao(t[0],t[1],t[2])&&(t=[t[0]]),Ir(e,or(t,1),[])})),gs=Qt||function(){return Ve.Date.now()};function ms(e,t,n){return t=n?void 0:t,Fi(e,128,void 0,void 0,void 0,void 0,t=e&&null==t?e.length:t)}function vs(e,t){var n;if("function"!=typeof t)throw new _e(o);return e=ra(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}}var _s=zr((function(e,t,n){var r=1;if(n.length){var i=Ht(n,Xi(_s));r|=32}return Fi(e,r,t,n,i)})),bs=zr((function(e,t,n){var r=3;if(n.length){var i=Ht(n,Xi(bs));r|=32}return Fi(t,r,e,n,i)}));function ys(e,t,n){var r,i,s,a,c,l,u=0,d=!1,h=!1,f=!0;if("function"!=typeof e)throw new _e(o);function p(t){var n=r,o=i;return r=i=void 0,u=t,a=e.apply(o,n)}function g(e){return u=e,c=yo(v,t),d?p(e):a}function m(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=s}function v(){var e=gs();if(m(e))return _(e);c=yo(v,function(e){var n=t-(e-l);return h?an(n,s-(e-u)):n}(e))}function _(e){return c=void 0,f&&r?p(e):(r=i=void 0,a)}function b(){var e=gs(),n=m(e);if(r=arguments,i=this,l=e,n){if(void 0===c)return g(l);if(h)return ui(c),c=yo(v,t),p(l)}return void 0===c&&(c=yo(v,t)),a}return t=oa(t)||0,Us(n)&&(d=!!n.leading,s=(h="maxWait"in n)?sn(oa(n.maxWait)||0,t):s,f="trailing"in n?!!n.trailing:f),b.cancel=function(){void 0!==c&&ui(c),u=0,r=l=i=c=void 0},b.flush=function(){return void 0===c?a:_(gs())},b}var ws=zr((function(e,t){return Kn(e,1,t)})),Ss=zr((function(e,t,n){return Kn(e,oa(t)||0,n)}));function xs(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new _e(o);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(xs.Cache||Dn),n}function Es(e){if("function"!=typeof e)throw new _e(o);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}xs.Cache=Dn;var As=ci((function(e,t){var n=(t=1==t.length&&Ms(t[0])?ft(t[0],kt(Qi())):ft(or(t,1),kt(Qi()))).length;return zr((function(r){for(var i=-1,o=an(r.length,n);++i<o;)r[i]=t[i].call(this,r[i]);return ot(e,this,r)}))})),Cs=zr((function(e,t){return Fi(e,32,void 0,t,Ht(t,Xi(Cs)))})),js=zr((function(e,t){return Fi(e,64,void 0,t,Ht(t,Xi(js)))})),Ts=$i((function(e,t){return Fi(e,256,void 0,void 0,void 0,t)}));function Os(e,t){return e===t||e!=e&&t!=t}var ks=Ri(pr),Ns=Ri((function(e,t){return e>=t})),Is=br(function(){return arguments}())?br:function(e){return $s(e)&&Ee.call(e,"callee")&&!Je.call(e,"callee")},Ms=r.isArray,Rs=Ze?kt(Ze):function(e){return $s(e)&&fr(e)==x};function Ds(e){return null!=e&&Hs(e.length)&&!Bs(e)}function Ps(e){return $s(e)&&Ds(e)}var Ls=tn||oc,zs=et?kt(et):function(e){return $s(e)&&fr(e)==d};function Fs(e){if(!$s(e))return!1;var t=fr(e);return t==h||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Vs(e)}function Bs(e){if(!Us(e))return!1;var t=fr(e);return t==f||t==p||"[object AsyncFunction]"==t||"[object Proxy]"==t}function qs(e){return"number"==typeof e&&e==ra(e)}function Hs(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}function Us(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function $s(e){return null!=e&&"object"==typeof e}var Ws=tt?kt(tt):function(e){return $s(e)&&no(e)==g};function Gs(e){return"number"==typeof e||$s(e)&&fr(e)==m}function Vs(e){if(!$s(e)||fr(e)!=v)return!1;var t=We(e);if(null===t)return!0;var n=Ee.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&xe.call(n)==Te}var Js=nt?kt(nt):function(e){return $s(e)&&fr(e)==_};var Xs=rt?kt(rt):function(e){return $s(e)&&no(e)==b};function Qs(e){return"string"==typeof e||!Ms(e)&&$s(e)&&fr(e)==y}function Ys(e){return"symbol"==typeof e||$s(e)&&fr(e)==w}var Ks=it?kt(it):function(e){return $s(e)&&Hs(e.length)&&!!Be[fr(e)]};var Zs=Ri(Cr),ea=Ri((function(e,t){return e<=t}));function ta(e){if(!e)return[];if(Ds(e))return Qs(e)?Gt(e):vi(e);if(Ke&&e[Ke])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[Ke]());var t=no(e);return(t==g?Bt:t==b?Ut:Oa)(e)}function na(e){return e?(e=oa(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ra(e){var t=na(e),n=t%1;return t==t?n?t-n:t:0}function ia(e){return e?Xn(ra(e),0,4294967295):0}function oa(e){if("number"==typeof e)return e;if(Ys(e))return NaN;if(Us(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Us(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(J,"");var n=oe.test(e);return n||ae.test(e)?$e(e.slice(2),n?2:8):ie.test(e)?NaN:+e}function sa(e){return _i(e,wa(e))}function aa(e){return null==e?"":Yr(e)}var ca=yi((function(e,t){if(ho(t)||Ds(t))_i(t,ya(t),e);else for(var n in t)Ee.call(t,n)&&Un(e,n,t[n])})),la=yi((function(e,t){_i(t,wa(t),e)})),ua=yi((function(e,t,n,r){_i(t,wa(t),e,r)})),da=yi((function(e,t,n,r){_i(t,ya(t),e,r)})),ha=$i(Jn);var fa=zr((function(e,t){e=ge(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&ao(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],s=wa(o),a=-1,c=s.length;++a<c;){var l=s[a],u=e[l];(void 0===u||Os(u,we[l])&&!Ee.call(e,l))&&(e[l]=o[l])}return e})),pa=zr((function(e){return e.push(void 0,qi),ot(xa,void 0,e)}));function ga(e,t,n){var r=null==e?void 0:dr(e,t);return void 0===r?n:r}function ma(e,t){return null!=e&&ro(e,t,mr)}var va=Oi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),e[t]=n}),Ua(Ga)),_a=Oi((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=je.call(t)),Ee.call(e,t)?e[t].push(n):e[t]=[n]}),Qi),ba=zr(_r);function ya(e){return Ds(e)?zn(e):Er(e)}function wa(e){return Ds(e)?zn(e,!0):Ar(e)}var Sa=yi((function(e,t,n){kr(e,t,n)})),xa=yi((function(e,t,n,r){kr(e,t,n,r)})),Ea=$i((function(e,t){var n={};if(null==e)return n;var r=!1;t=ft(t,(function(t){return t=ai(t,e),r||(r=t.length>1),t})),_i(e,Gi(e),n),r&&(n=Qn(n,7,Hi));for(var i=t.length;i--;)Zr(n,t[i]);return n}));var Aa=$i((function(e,t){return null==e?{}:function(e,t){return Mr(e,t,(function(t,n){return ma(e,n)}))}(e,t)}));function Ca(e,t){if(null==e)return{};var n=ft(Gi(e),(function(e){return[e]}));return t=Qi(t),Mr(e,n,(function(e,n){return t(e,n[0])}))}var ja=zi(ya),Ta=zi(wa);function Oa(e){return null==e?[]:Nt(e,ya(e))}var ka=Ei((function(e,t,n){return t=t.toLowerCase(),e+(n?Na(t):t)}));function Na(e){return Fa(aa(e).toLowerCase())}function Ia(e){return(e=aa(e))&&e.replace(le,Pt).replace(Me,"")}var Ma=Ei((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),Ra=Ei((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Da=xi("toLowerCase");var Pa=Ei((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()}));var La=Ei((function(e,t,n){return e+(n?" ":"")+Fa(t)}));var za=Ei((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Fa=xi("toUpperCase");function Ba(e,t,n){return e=aa(e),void 0===(t=n?void 0:t)?function(e){return Le.test(e)}(e)?function(e){return e.match(De)||[]}(e):function(e){return e.match(ee)||[]}(e):e.match(t)||[]}var qa=zr((function(e,t){try{return ot(e,void 0,t)}catch(e){return Fs(e)?e:new he(e)}})),Ha=$i((function(e,t){return at(t,(function(t){t=Co(t),Vn(e,t,_s(e[t],e))})),e}));function Ua(e){return function(){return e}}var $a=ji(),Wa=ji(!0);function Ga(e){return e}function Va(e){return xr("function"==typeof e?e:Qn(e,1))}var Ja=zr((function(e,t){return function(n){return _r(n,e,t)}})),Xa=zr((function(e,t){return function(n){return _r(e,n,t)}}));function Qa(e,t,n){var r=ya(t),i=ur(t,r);null!=n||Us(t)&&(i.length||!r.length)||(n=t,t=e,e=this,i=ur(t,ya(t)));var o=!(Us(n)&&"chain"in n&&!n.chain),s=Bs(e);return at(i,(function(n){var r=t[n];e[n]=r,s&&(e.prototype[n]=function(){var t=this.__chain__;if(o||t){var n=e(this.__wrapped__),i=n.__actions__=vi(this.__actions__);return i.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,pt([this.value()],arguments))})})),e}function Ya(){}var Ka=Ni(ft),Za=Ni(lt),ec=Ni(vt);function tc(e){return co(e)?At(Co(e)):function(e){return function(t){return dr(t,e)}}(e)}var nc=Mi(),rc=Mi(!0);function ic(){return[]}function oc(){return!1}var sc=ki((function(e,t){return e+t}),0),ac=Pi("ceil"),cc=ki((function(e,t){return e/t}),1),lc=Pi("floor");var uc,dc=ki((function(e,t){return e*t}),1),hc=Pi("round"),fc=ki((function(e,t){return e-t}),0);return Tn.after=function(e,t){if("function"!=typeof t)throw new _e(o);return e=ra(e),function(){if(--e<1)return t.apply(this,arguments)}},Tn.ary=ms,Tn.assign=ca,Tn.assignIn=la,Tn.assignInWith=ua,Tn.assignWith=da,Tn.at=ha,Tn.before=vs,Tn.bind=_s,Tn.bindAll=Ha,Tn.bindKey=bs,Tn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Ms(e)?e:[e]},Tn.chain=ts,Tn.chunk=function(e,t,n){t=(n?ao(e,t,n):void 0===t)?1:sn(ra(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var o=0,s=0,a=r(Kt(i/t));o<i;)a[s++]=Wr(e,o,o+=t);return a},Tn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i},Tn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],i=e;i--;)t[i-1]=arguments[i];return pt(Ms(n)?vi(n):[n],or(t,1))},Tn.cond=function(e){var t=null==e?0:e.length,n=Qi();return e=t?ft(e,(function(e){if("function"!=typeof e[1])throw new _e(o);return[n(e[0]),e[1]]})):[],zr((function(n){for(var r=-1;++r<t;){var i=e[r];if(ot(i[0],this,n))return ot(i[1],this,n)}}))},Tn.conforms=function(e){return function(e){var t=ya(e);return function(n){return Yn(n,e,t)}}(Qn(e,1))},Tn.constant=Ua,Tn.countBy=is,Tn.create=function(e,t){var n=On(e);return null==t?n:Gn(n,t)},Tn.curry=function e(t,n,r){var i=Fi(t,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Tn.curryRight=function e(t,n,r){var i=Fi(t,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=e.placeholder,i},Tn.debounce=ys,Tn.defaults=fa,Tn.defaultsDeep=pa,Tn.defer=ws,Tn.delay=Ss,Tn.difference=Oo,Tn.differenceBy=ko,Tn.differenceWith=No,Tn.drop=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,(t=n||void 0===t?1:ra(t))<0?0:t,r):[]},Tn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,0,(t=r-(t=n||void 0===t?1:ra(t)))<0?0:t):[]},Tn.dropRightWhile=function(e,t){return e&&e.length?ti(e,Qi(t,3),!0,!0):[]},Tn.dropWhile=function(e,t){return e&&e.length?ti(e,Qi(t,3),!0):[]},Tn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&ao(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=ra(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ra(r))<0&&(r+=i),r=n>r?0:ia(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},Tn.filter=function(e,t){return(Ms(e)?ut:ir)(e,Qi(t,3))},Tn.flatMap=function(e,t){return or(hs(e,t),1)},Tn.flatMapDeep=function(e,t){return or(hs(e,t),1/0)},Tn.flatMapDepth=function(e,t,n){return n=void 0===n?1:ra(n),or(hs(e,t),n)},Tn.flatten=Ro,Tn.flattenDeep=function(e){return(null==e?0:e.length)?or(e,1/0):[]},Tn.flattenDepth=function(e,t){return(null==e?0:e.length)?or(e,t=void 0===t?1:ra(t)):[]},Tn.flip=function(e){return Fi(e,512)},Tn.flow=$a,Tn.flowRight=Wa,Tn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},Tn.functions=function(e){return null==e?[]:ur(e,ya(e))},Tn.functionsIn=function(e){return null==e?[]:ur(e,wa(e))},Tn.groupBy=ls,Tn.initial=function(e){return(null==e?0:e.length)?Wr(e,0,-1):[]},Tn.intersection=Po,Tn.intersectionBy=Lo,Tn.intersectionWith=zo,Tn.invert=va,Tn.invertBy=_a,Tn.invokeMap=us,Tn.iteratee=Va,Tn.keyBy=ds,Tn.keys=ya,Tn.keysIn=wa,Tn.map=hs,Tn.mapKeys=function(e,t){var n={};return t=Qi(t,3),cr(e,(function(e,r,i){Vn(n,t(e,r,i),e)})),n},Tn.mapValues=function(e,t){var n={};return t=Qi(t,3),cr(e,(function(e,r,i){Vn(n,r,t(e,r,i))})),n},Tn.matches=function(e){return Tr(Qn(e,1))},Tn.matchesProperty=function(e,t){return Or(e,Qn(t,1))},Tn.memoize=xs,Tn.merge=Sa,Tn.mergeWith=xa,Tn.method=Ja,Tn.methodOf=Xa,Tn.mixin=Qa,Tn.negate=Es,Tn.nthArg=function(e){return e=ra(e),zr((function(t){return Nr(t,e)}))},Tn.omit=Ea,Tn.omitBy=function(e,t){return Ca(e,Es(Qi(t)))},Tn.once=function(e){return vs(2,e)},Tn.orderBy=function(e,t,n,r){return null==e?[]:(Ms(t)||(t=null==t?[]:[t]),Ms(n=r?void 0:n)||(n=null==n?[]:[n]),Ir(e,t,n))},Tn.over=Ka,Tn.overArgs=As,Tn.overEvery=Za,Tn.overSome=ec,Tn.partial=Cs,Tn.partialRight=js,Tn.partition=fs,Tn.pick=Aa,Tn.pickBy=Ca,Tn.property=tc,Tn.propertyOf=function(e){return function(t){return null==e?void 0:dr(e,t)}},Tn.pull=Bo,Tn.pullAll=qo,Tn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Rr(e,t,Qi(n,2)):e},Tn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Rr(e,t,void 0,n):e},Tn.pullAt=Ho,Tn.range=nc,Tn.rangeRight=rc,Tn.rearg=Ts,Tn.reject=function(e,t){return(Ms(e)?ut:ir)(e,Es(Qi(t,3)))},Tn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],o=e.length;for(t=Qi(t,3);++r<o;){var s=e[r];t(s,r,e)&&(n.push(s),i.push(r))}return Dr(e,i),n},Tn.rest=function(e,t){if("function"!=typeof e)throw new _e(o);return zr(e,t=void 0===t?t:ra(t))},Tn.reverse=Uo,Tn.sampleSize=function(e,t,n){return t=(n?ao(e,t,n):void 0===t)?1:ra(t),(Ms(e)?Bn:Br)(e,t)},Tn.set=function(e,t,n){return null==e?e:qr(e,t,n)},Tn.setWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:qr(e,t,n,r)},Tn.shuffle=function(e){return(Ms(e)?qn:$r)(e)},Tn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&ao(e,t,n)?(t=0,n=r):(t=null==t?0:ra(t),n=void 0===n?r:ra(n)),Wr(e,t,n)):[]},Tn.sortBy=ps,Tn.sortedUniq=function(e){return e&&e.length?Xr(e):[]},Tn.sortedUniqBy=function(e,t){return e&&e.length?Xr(e,Qi(t,2)):[]},Tn.split=function(e,t,n){return n&&"number"!=typeof n&&ao(e,t,n)&&(t=n=void 0),(n=void 0===n?4294967295:n>>>0)?(e=aa(e))&&("string"==typeof t||null!=t&&!Js(t))&&!(t=Yr(t))&&Ft(e)?li(Gt(e),0,n):e.split(t,n):[]},Tn.spread=function(e,t){if("function"!=typeof e)throw new _e(o);return t=null==t?0:sn(ra(t),0),zr((function(n){var r=n[t],i=li(n,0,t);return r&&pt(i,r),ot(e,this,i)}))},Tn.tail=function(e){var t=null==e?0:e.length;return t?Wr(e,1,t):[]},Tn.take=function(e,t,n){return e&&e.length?Wr(e,0,(t=n||void 0===t?1:ra(t))<0?0:t):[]},Tn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Wr(e,(t=r-(t=n||void 0===t?1:ra(t)))<0?0:t,r):[]},Tn.takeRightWhile=function(e,t){return e&&e.length?ti(e,Qi(t,3),!1,!0):[]},Tn.takeWhile=function(e,t){return e&&e.length?ti(e,Qi(t,3)):[]},Tn.tap=function(e,t){return t(e),e},Tn.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new _e(o);return Us(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),ys(e,t,{leading:r,maxWait:t,trailing:i})},Tn.thru=ns,Tn.toArray=ta,Tn.toPairs=ja,Tn.toPairsIn=Ta,Tn.toPath=function(e){return Ms(e)?ft(e,Co):Ys(e)?[e]:vi(Ao(aa(e)))},Tn.toPlainObject=sa,Tn.transform=function(e,t,n){var r=Ms(e),i=r||Ls(e)||Ks(e);if(t=Qi(t,4),null==n){var o=e&&e.constructor;n=i?r?new o:[]:Us(e)&&Bs(o)?On(We(e)):{}}return(i?at:cr)(e,(function(e,r,i){return t(n,e,r,i)})),n},Tn.unary=function(e){return ms(e,1)},Tn.union=$o,Tn.unionBy=Wo,Tn.unionWith=Go,Tn.uniq=function(e){return e&&e.length?Kr(e):[]},Tn.uniqBy=function(e,t){return e&&e.length?Kr(e,Qi(t,2)):[]},Tn.uniqWith=function(e,t){return t="function"==typeof t?t:void 0,e&&e.length?Kr(e,void 0,t):[]},Tn.unset=function(e,t){return null==e||Zr(e,t)},Tn.unzip=Vo,Tn.unzipWith=Jo,Tn.update=function(e,t,n){return null==e?e:ei(e,t,si(n))},Tn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:void 0,null==e?e:ei(e,t,si(n),r)},Tn.values=Oa,Tn.valuesIn=function(e){return null==e?[]:Nt(e,wa(e))},Tn.without=Xo,Tn.words=Ba,Tn.wrap=function(e,t){return Cs(si(t),e)},Tn.xor=Qo,Tn.xorBy=Yo,Tn.xorWith=Ko,Tn.zip=Zo,Tn.zipObject=function(e,t){return ii(e||[],t||[],Un)},Tn.zipObjectDeep=function(e,t){return ii(e||[],t||[],qr)},Tn.zipWith=es,Tn.entries=ja,Tn.entriesIn=Ta,Tn.extend=la,Tn.extendWith=ua,Qa(Tn,Tn),Tn.add=sc,Tn.attempt=qa,Tn.camelCase=ka,Tn.capitalize=Na,Tn.ceil=ac,Tn.clamp=function(e,t,n){return void 0===n&&(n=t,t=void 0),void 0!==n&&(n=(n=oa(n))==n?n:0),void 0!==t&&(t=(t=oa(t))==t?t:0),Xn(oa(e),t,n)},Tn.clone=function(e){return Qn(e,4)},Tn.cloneDeep=function(e){return Qn(e,5)},Tn.cloneDeepWith=function(e,t){return Qn(e,5,t="function"==typeof t?t:void 0)},Tn.cloneWith=function(e,t){return Qn(e,4,t="function"==typeof t?t:void 0)},Tn.conformsTo=function(e,t){return null==t||Yn(e,t,ya(t))},Tn.deburr=Ia,Tn.defaultTo=function(e,t){return null==e||e!=e?t:e},Tn.divide=cc,Tn.endsWith=function(e,t,n){e=aa(e),t=Yr(t);var r=e.length,i=n=void 0===n?r:Xn(ra(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},Tn.eq=Os,Tn.escape=function(e){return(e=aa(e))&&F.test(e)?e.replace(L,Lt):e},Tn.escapeRegExp=function(e){return(e=aa(e))&&V.test(e)?e.replace(G,"\\$&"):e},Tn.every=function(e,t,n){var r=Ms(e)?lt:nr;return n&&ao(e,t,n)&&(t=void 0),r(e,Qi(t,3))},Tn.find=os,Tn.findIndex=Io,Tn.findKey=function(e,t){return bt(e,Qi(t,3),cr)},Tn.findLast=ss,Tn.findLastIndex=Mo,Tn.findLastKey=function(e,t){return bt(e,Qi(t,3),lr)},Tn.floor=lc,Tn.forEach=as,Tn.forEachRight=cs,Tn.forIn=function(e,t){return null==e?e:sr(e,Qi(t,3),wa)},Tn.forInRight=function(e,t){return null==e?e:ar(e,Qi(t,3),wa)},Tn.forOwn=function(e,t){return e&&cr(e,Qi(t,3))},Tn.forOwnRight=function(e,t){return e&&lr(e,Qi(t,3))},Tn.get=ga,Tn.gt=ks,Tn.gte=Ns,Tn.has=function(e,t){return null!=e&&ro(e,t,gr)},Tn.hasIn=ma,Tn.head=Do,Tn.identity=Ga,Tn.includes=function(e,t,n,r){e=Ds(e)?e:Oa(e),n=n&&!r?ra(n):0;var i=e.length;return n<0&&(n=sn(i+n,0)),Qs(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&wt(e,t,n)>-1},Tn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:ra(n);return i<0&&(i=sn(r+i,0)),wt(e,t,i)},Tn.inRange=function(e,t,n){return t=na(t),void 0===n?(n=t,t=0):n=na(n),function(e,t,n){return e>=an(t,n)&&e<sn(t,n)}(e=oa(e),t,n)},Tn.invoke=ba,Tn.isArguments=Is,Tn.isArray=Ms,Tn.isArrayBuffer=Rs,Tn.isArrayLike=Ds,Tn.isArrayLikeObject=Ps,Tn.isBoolean=function(e){return!0===e||!1===e||$s(e)&&fr(e)==u},Tn.isBuffer=Ls,Tn.isDate=zs,Tn.isElement=function(e){return $s(e)&&1===e.nodeType&&!Vs(e)},Tn.isEmpty=function(e){if(null==e)return!0;if(Ds(e)&&(Ms(e)||"string"==typeof e||"function"==typeof e.splice||Ls(e)||Ks(e)||Is(e)))return!e.length;var t=no(e);if(t==g||t==b)return!e.size;if(ho(e))return!Er(e).length;for(var n in e)if(Ee.call(e,n))return!1;return!0},Tn.isEqual=function(e,t){return yr(e,t)},Tn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:void 0)?n(e,t):void 0;return void 0===r?yr(e,t,void 0,n):!!r},Tn.isError=Fs,Tn.isFinite=function(e){return"number"==typeof e&&nn(e)},Tn.isFunction=Bs,Tn.isInteger=qs,Tn.isLength=Hs,Tn.isMap=Ws,Tn.isMatch=function(e,t){return e===t||wr(e,t,Ki(t))},Tn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:void 0,wr(e,t,Ki(t),n)},Tn.isNaN=function(e){return Gs(e)&&e!=+e},Tn.isNative=function(e){if(uo(e))throw new he("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Sr(e)},Tn.isNil=function(e){return null==e},Tn.isNull=function(e){return null===e},Tn.isNumber=Gs,Tn.isObject=Us,Tn.isObjectLike=$s,Tn.isPlainObject=Vs,Tn.isRegExp=Js,Tn.isSafeInteger=function(e){return qs(e)&&e>=-9007199254740991&&e<=9007199254740991},Tn.isSet=Xs,Tn.isString=Qs,Tn.isSymbol=Ys,Tn.isTypedArray=Ks,Tn.isUndefined=function(e){return void 0===e},Tn.isWeakMap=function(e){return $s(e)&&no(e)==S},Tn.isWeakSet=function(e){return $s(e)&&"[object WeakSet]"==fr(e)},Tn.join=function(e,t){return null==e?"":rn.call(e,t)},Tn.kebabCase=Ma,Tn.last=Fo,Tn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ra(n))<0?sn(r+i,0):an(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):yt(e,xt,i,!0)},Tn.lowerCase=Ra,Tn.lowerFirst=Da,Tn.lt=Zs,Tn.lte=ea,Tn.max=function(e){return e&&e.length?rr(e,Ga,pr):void 0},Tn.maxBy=function(e,t){return e&&e.length?rr(e,Qi(t,2),pr):void 0},Tn.mean=function(e){return Et(e,Ga)},Tn.meanBy=function(e,t){return Et(e,Qi(t,2))},Tn.min=function(e){return e&&e.length?rr(e,Ga,Cr):void 0},Tn.minBy=function(e,t){return e&&e.length?rr(e,Qi(t,2),Cr):void 0},Tn.stubArray=ic,Tn.stubFalse=oc,Tn.stubObject=function(){return{}},Tn.stubString=function(){return""},Tn.stubTrue=function(){return!0},Tn.multiply=dc,Tn.nth=function(e,t){return e&&e.length?Nr(e,ra(t)):void 0},Tn.noConflict=function(){return Ve._===this&&(Ve._=Oe),this},Tn.noop=Ya,Tn.now=gs,Tn.pad=function(e,t,n){e=aa(e);var r=(t=ra(t))?Wt(e):0;if(!t||r>=t)return e;var i=(t-r)/2;return Ii(Zt(i),n)+e+Ii(Kt(i),n)},Tn.padEnd=function(e,t,n){e=aa(e);var r=(t=ra(t))?Wt(e):0;return t&&r<t?e+Ii(t-r,n):e},Tn.padStart=function(e,t,n){e=aa(e);var r=(t=ra(t))?Wt(e):0;return t&&r<t?Ii(t-r,n)+e:e},Tn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),ln(aa(e).replace(X,""),t||0)},Tn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&ao(e,t,n)&&(t=n=void 0),void 0===n&&("boolean"==typeof t?(n=t,t=void 0):"boolean"==typeof e&&(n=e,e=void 0)),void 0===e&&void 0===t?(e=0,t=1):(e=na(e),void 0===t?(t=e,e=0):t=na(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=un();return an(e+i*(t-e+Ue("1e-"+((i+"").length-1))),t)}return Pr(e,t)},Tn.reduce=function(e,t,n){var r=Ms(e)?gt:jt,i=arguments.length<3;return r(e,Qi(t,4),n,i,er)},Tn.reduceRight=function(e,t,n){var r=Ms(e)?mt:jt,i=arguments.length<3;return r(e,Qi(t,4),n,i,tr)},Tn.repeat=function(e,t,n){return t=(n?ao(e,t,n):void 0===t)?1:ra(t),Lr(aa(e),t)},Tn.replace=function(){var e=arguments,t=aa(e[0]);return e.length<3?t:t.replace(e[1],e[2])},Tn.result=function(e,t,n){var r=-1,i=(t=ai(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=null==e?void 0:e[Co(t[r])];void 0===o&&(r=i,o=n),e=Bs(o)?o.call(e):o}return e},Tn.round=hc,Tn.runInContext=e,Tn.sample=function(e){return(Ms(e)?Fn:Fr)(e)},Tn.size=function(e){if(null==e)return 0;if(Ds(e))return Qs(e)?Wt(e):e.length;var t=no(e);return t==g||t==b?e.size:Er(e).length},Tn.snakeCase=Pa,Tn.some=function(e,t,n){var r=Ms(e)?vt:Gr;return n&&ao(e,t,n)&&(t=void 0),r(e,Qi(t,3))},Tn.sortedIndex=function(e,t){return Vr(e,t)},Tn.sortedIndexBy=function(e,t,n){return Jr(e,t,Qi(n,2))},Tn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=Vr(e,t);if(r<n&&Os(e[r],t))return r}return-1},Tn.sortedLastIndex=function(e,t){return Vr(e,t,!0)},Tn.sortedLastIndexBy=function(e,t,n){return Jr(e,t,Qi(n,2),!0)},Tn.sortedLastIndexOf=function(e,t){if(null==e?0:e.length){var n=Vr(e,t,!0)-1;if(Os(e[n],t))return n}return-1},Tn.startCase=La,Tn.startsWith=function(e,t,n){return e=aa(e),n=null==n?0:Xn(ra(n),0,e.length),t=Yr(t),e.slice(n,n+t.length)==t},Tn.subtract=fc,Tn.sum=function(e){return e&&e.length?Tt(e,Ga):0},Tn.sumBy=function(e,t){return e&&e.length?Tt(e,Qi(t,2)):0},Tn.template=function(e,t,n){var r=Tn.templateSettings;n&&ao(e,t,n)&&(t=void 0),e=aa(e),t=ua({},t,r,Bi);var i,o,s=ua({},t.imports,r.imports,Bi),a=ya(s),c=Nt(s,a),l=0,u=t.interpolate||ue,d="__p += '",h=me((t.escape||ue).source+"|"+u.source+"|"+(u===H?ne:ue).source+"|"+(t.evaluate||ue).source+"|$","g"),f="//# sourceURL="+(Ee.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Fe+"]")+"\n";e.replace(h,(function(t,n,r,s,a,c){return r||(r=s),d+=e.slice(l,c).replace(de,zt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),a&&(o=!0,d+="';\n"+a+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+t.length,t})),d+="';\n";var p=Ee.call(t,"variable")&&t.variable;p||(d="with (obj) {\n"+d+"\n}\n"),d=(o?d.replace(M,""):d).replace(R,"$1").replace(D,"$1;"),d="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var g=qa((function(){return fe(a,f+"return "+d).apply(void 0,c)}));if(g.source=d,Fs(g))throw g;return g},Tn.times=function(e,t){if((e=ra(e))<1||e>9007199254740991)return[];var n=4294967295,r=an(e,4294967295);e-=4294967295;for(var i=Ot(r,t=Qi(t));++n<e;)t(n);return i},Tn.toFinite=na,Tn.toInteger=ra,Tn.toLength=ia,Tn.toLower=function(e){return aa(e).toLowerCase()},Tn.toNumber=oa,Tn.toSafeInteger=function(e){return e?Xn(ra(e),-9007199254740991,9007199254740991):0===e?e:0},Tn.toString=aa,Tn.toUpper=function(e){return aa(e).toUpperCase()},Tn.trim=function(e,t,n){if((e=aa(e))&&(n||void 0===t))return e.replace(J,"");if(!e||!(t=Yr(t)))return e;var r=Gt(e),i=Gt(t);return li(r,Mt(r,i),Rt(r,i)+1).join("")},Tn.trimEnd=function(e,t,n){if((e=aa(e))&&(n||void 0===t))return e.replace(Q,"");if(!e||!(t=Yr(t)))return e;var r=Gt(e);return li(r,0,Rt(r,Gt(t))+1).join("")},Tn.trimStart=function(e,t,n){if((e=aa(e))&&(n||void 0===t))return e.replace(X,"");if(!e||!(t=Yr(t)))return e;var r=Gt(e);return li(r,Mt(r,Gt(t))).join("")},Tn.truncate=function(e,t){var n=30,r="...";if(Us(t)){var i="separator"in t?t.separator:i;n="length"in t?ra(t.length):n,r="omission"in t?Yr(t.omission):r}var o=(e=aa(e)).length;if(Ft(e)){var s=Gt(e);o=s.length}if(n>=o)return e;var a=n-Wt(r);if(a<1)return r;var c=s?li(s,0,a).join(""):e.slice(0,a);if(void 0===i)return c+r;if(s&&(a+=c.length-a),Js(i)){if(e.slice(a).search(i)){var l,u=c;for(i.global||(i=me(i.source,aa(re.exec(i))+"g")),i.lastIndex=0;l=i.exec(u);)var d=l.index;c=c.slice(0,void 0===d?a:d)}}else if(e.indexOf(Yr(i),a)!=a){var h=c.lastIndexOf(i);h>-1&&(c=c.slice(0,h))}return c+r},Tn.unescape=function(e){return(e=aa(e))&&z.test(e)?e.replace(P,Vt):e},Tn.uniqueId=function(e){var t=++Ae;return aa(e)+t},Tn.upperCase=za,Tn.upperFirst=Fa,Tn.each=as,Tn.eachRight=cs,Tn.first=Do,Qa(Tn,(uc={},cr(Tn,(function(e,t){Ee.call(Tn.prototype,t)||(uc[t]=e)})),uc),{chain:!1}),Tn.VERSION="4.17.20",at(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){Tn[e].placeholder=Tn})),at(["drop","take"],(function(e,t){In.prototype[e]=function(n){n=void 0===n?1:sn(ra(n),0);var r=this.__filtered__&&!t?new In(this):this.clone();return r.__filtered__?r.__takeCount__=an(n,r.__takeCount__):r.__views__.push({size:an(n,4294967295),type:e+(r.__dir__<0?"Right":"")}),r},In.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),at(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;In.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Qi(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),at(["head","last"],(function(e,t){var n="take"+(t?"Right":"");In.prototype[e]=function(){return this[n](1).value()[0]}})),at(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");In.prototype[e]=function(){return this.__filtered__?new In(this):this[n](1)}})),In.prototype.compact=function(){return this.filter(Ga)},In.prototype.find=function(e){return this.filter(e).head()},In.prototype.findLast=function(e){return this.reverse().find(e)},In.prototype.invokeMap=zr((function(e,t){return"function"==typeof e?new In(this):this.map((function(n){return _r(n,e,t)}))})),In.prototype.reject=function(e){return this.filter(Es(Qi(e)))},In.prototype.slice=function(e,t){e=ra(e);var n=this;return n.__filtered__&&(e>0||t<0)?new In(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),void 0!==t&&(n=(t=ra(t))<0?n.dropRight(-t):n.take(t-e)),n)},In.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},In.prototype.toArray=function(){return this.take(4294967295)},cr(In.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=Tn[r?"take"+("last"==t?"Right":""):t],o=r||/^find/.test(t);i&&(Tn.prototype[t]=function(){var t=this.__wrapped__,s=r?[1]:arguments,a=t instanceof In,c=s[0],l=a||Ms(t),u=function(e){var t=i.apply(Tn,pt([e],s));return r&&d?t[0]:t};l&&n&&"function"==typeof c&&1!=c.length&&(a=l=!1);var d=this.__chain__,h=!!this.__actions__.length,f=o&&!d,p=a&&!h;if(!o&&l){t=p?t:new In(this);var g=e.apply(t,s);return g.__actions__.push({func:ns,args:[u],thisArg:void 0}),new Nn(g,d)}return f&&p?e.apply(this,s):(g=this.thru(u),f?r?g.value()[0]:g.value():g)})})),at(["pop","push","shift","sort","splice","unshift"],(function(e){var t=be[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);Tn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var i=this.value();return t.apply(Ms(i)?i:[],e)}return this[n]((function(n){return t.apply(Ms(n)?n:[],e)}))}})),cr(In.prototype,(function(e,t){var n=Tn[t];if(n){var r=n.name+"";Ee.call(bn,r)||(bn[r]=[]),bn[r].push({name:t,func:n})}})),bn[Ti(void 0,2).name]=[{name:"wrapper",func:void 0}],In.prototype.clone=function(){var e=new In(this.__wrapped__);return e.__actions__=vi(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=vi(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=vi(this.__views__),e},In.prototype.reverse=function(){if(this.__filtered__){var e=new In(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},In.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Ms(e),r=t<0,i=n?e.length:0,o=function(e,t,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":e+=s;break;case"dropRight":t-=s;break;case"take":t=an(t,e+s);break;case"takeRight":e=sn(e,t-s)}}return{start:e,end:t}}(0,i,this.__views__),s=o.start,a=o.end,c=a-s,l=r?a:s-1,u=this.__iteratees__,d=u.length,h=0,f=an(c,this.__takeCount__);if(!n||!r&&i==c&&f==c)return ni(e,this.__actions__);var p=[];e:for(;c--&&h<f;){for(var g=-1,m=e[l+=t];++g<d;){var v=u[g],_=v.iteratee,b=v.type,y=_(m);if(2==b)m=y;else if(!y){if(1==b)continue e;break e}}p[h++]=m}return p},Tn.prototype.at=rs,Tn.prototype.chain=function(){return ts(this)},Tn.prototype.commit=function(){return new Nn(this.value(),this.__chain__)},Tn.prototype.next=function(){void 0===this.__values__&&(this.__values__=ta(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?void 0:this.__values__[this.__index__++]}},Tn.prototype.plant=function(e){for(var t,n=this;n instanceof kn;){var r=To(n);r.__index__=0,r.__values__=void 0,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},Tn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof In){var t=e;return this.__actions__.length&&(t=new In(this)),(t=t.reverse()).__actions__.push({func:ns,args:[Uo],thisArg:void 0}),new Nn(t,this.__chain__)}return this.thru(Uo)},Tn.prototype.toJSON=Tn.prototype.valueOf=Tn.prototype.value=function(){return ni(this.__wrapped__,this.__actions__)},Tn.prototype.first=Tn.prototype.head,Ke&&(Tn.prototype[Ke]=function(){return this}),Tn}();Ve._=Jt,void 0===(i=function(){return Jt}.call(t,n,t,r))||(r.exports=i)}).call(this)}).call(this,n(12),n(46)(e))},function(e,t,n){e.exports=n(337)},function(e,t,n){e.exports=n(351)},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){function r(e){this.options=e||{locator:{}}}function i(){this.cdata=!1}function o(e,t){t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber}function s(e){if(e)return"\n@"+(e.systemId||"")+"#[line:"+e.lineNumber+",col:"+e.columnNumber+"]"}function a(e,t,n){return"string"==typeof e?e.substr(t,n):e.length>=t+n||t?new java.lang.String(e,t,n)+"":e}function c(e,t){e.currentElement?e.currentElement.appendChild(t):e.doc.appendChild(t)}r.prototype.parseFromString=function(e,t){var n=this.options,r=new l,o=n.domBuilder||new i,a=n.errorHandler,c=n.locator,u=n.xmlns||{},d={lt:"<",gt:">",amp:"&",quot:'"',apos:"'"};return c&&o.setDocumentLocator(c),r.errorHandler=function(e,t,n){if(!e){if(t instanceof i)return t;e=t}var r={},o=e instanceof Function;function a(t){var i=e[t];!i&&o&&(i=2==e.length?function(n){e(t,n)}:e),r[t]=i&&function(e){i("[xmldom "+t+"]\t"+e+s(n))}||function(){}}return n=n||{},a("warning"),a("error"),a("fatalError"),r}(a,o,c),r.domBuilder=n.domBuilder||o,/\/x?html?$/.test(t)&&(d.nbsp=" ",d.copy="©",u[""]="http://www.w3.org/1999/xhtml"),u.xml=u.xml||"http://www.w3.org/XML/1998/namespace",e?r.parse(e,u,d):r.errorHandler.error("invalid doc source"),o.doc},i.prototype={startDocument:function(){this.doc=(new u).createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(e,t,n,r){var i=this.doc,s=i.createElementNS(e,n||t),a=r.length;c(this,s),this.currentElement=s,this.locator&&o(this.locator,s);for(var l=0;l<a;l++){e=r.getURI(l);var u=r.getValue(l),d=(n=r.getQName(l),i.createAttributeNS(e,n));this.locator&&o(r.getLocator(l),d),d.value=d.nodeValue=u,s.setAttributeNode(d)}},endElement:function(e,t,n){var r=this.currentElement;r.tagName;this.currentElement=r.parentNode},startPrefixMapping:function(e,t){},endPrefixMapping:function(e){},processingInstruction:function(e,t){var n=this.doc.createProcessingInstruction(e,t);this.locator&&o(this.locator,n),c(this,n)},ignorableWhitespace:function(e,t,n){},characters:function(e,t,n){if(e=a.apply(this,arguments)){if(this.cdata)var r=this.doc.createCDATASection(e);else r=this.doc.createTextNode(e);this.currentElement?this.currentElement.appendChild(r):/^\s*$/.test(e)&&this.doc.appendChild(r),this.locator&&o(this.locator,r)}},skippedEntity:function(e){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(e){(this.locator=e)&&(e.lineNumber=0)},comment:function(e,t,n){e=a.apply(this,arguments);var r=this.doc.createComment(e);this.locator&&o(this.locator,r),c(this,r)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(e,t,n){var r=this.doc.implementation;if(r&&r.createDocumentType){var i=r.createDocumentType(e,t,n);this.locator&&o(this.locator,i),c(this,i)}},warning:function(e){console.warn("[xmldom warning]\t"+e,s(this.locator))},error:function(e){console.error("[xmldom error]\t"+e,s(this.locator))},fatalError:function(e){throw console.error("[xmldom fatalError]\t"+e,s(this.locator)),e}},"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,(function(e){i.prototype[e]=function(){return null}}));var l=n(329).XMLReader,u=t.DOMImplementation=n(95).DOMImplementation;t.XMLSerializer=n(95).XMLSerializer,t.DOMParser=r},function(e,t,n){var r=n(25),i=n(23);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},function(e,t,n){var r=n(11).Symbol;e.exports=r},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(74),i=n(20);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=r(e.prototype),o=e.apply(n,t);return i(o)?o:n}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=e.length,i=0,o=[];++n<r;){var s=e[n];s!==t&&"__lodash_placeholder__"!==s||(e[n]="__lodash_placeholder__",o[i++]=n)}return o}},function(e,t,n){var r=n(388),i=n(389),o=n(390),s=n(391),a=n(392);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},function(e,t,n){var r=n(50);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},function(e,t,n){var r=n(26)(Object,"create");e.exports=r},function(e,t,n){var r=n(406);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},function(e,t,n){var r=n(16),i=n(81),o=n(429),s=n(137);e.exports=function(e,t){return r(e)?e:i(e,t)?[e]:o(s(e))}},function(e,t,n){var r=n(59);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,i){return e.call(t,n,r,i)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t,n){var r=n(25),i=n(20);e.exports=function(e){if(!i(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},function(e,t,n){"use strict";(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.a=n}).call(this,n(12))},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/form_input.html --\x3e\n<div class="form-group">\n    ',"hidden"!==e.type&&(t+='\n        <label for="'+n(e.id)+'">'+n(e.label)+"</label>\n    "),t+="\n    ","password"===e.type&&e.fixed_username&&(t+='\n        \x3c!-- This is a hack to prevent Chrome from auto-filling the username in\n            any of the other input fields in the MUC configuration form. --\x3e\n        <input class="hidden-username" type="text" autocomplete="username" value="'+n(e.fixed_username)+'"></input>\n    '),t+='\n    <input \n        class="form-control" name="'+n(e.name)+'" type="'+n(e.type)+'" id="'+n(e.id)+'"\n        ',e.autocomplete&&(t+=' autocomplete="'+n(e.autocomplete)+'" '),t+="\n        ",e.placeholder&&(t+=' placeholder="'+n(e.placeholder)+'" '),t+="\n        ",e.value&&(t+=' value="'+n(e.value)+'" '),t+="\n        ",e.required&&(t+=' required="required" '),t+=" />\n</div>\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/form_username.html --\x3e\n<div class="form-group">\n    ',e.label&&(t+="\n    <label>\n        "+n(e.label)+"\n    </label>\n    "),t+='\n    <div class="input-group">\n        <div class="input-group-prepend">\n            <input name="'+n(e.name)+'" type="'+n(e.type)+'"\n                ',e.value&&(t+=' value="'+n(e.value)+'" '),t+="\n                ",e.required&&(t+=' required="required" '),t+=' />\n            <div class="input-group-text col" title="'+n(e.domain)+'">'+n(e.domain)+"</div>\n        </div>\n    </div>\n</div>\n"}},function(e,t,n){var r,i;r=[n(43)],void 0===(i=function(e){return e.noConflict()}.apply(t,r))||(e.exports=i)},function(e,t,n){
-/**
- * @preserve jed.js https://github.com/SlexAxton/Jed
- */
-!function(n,r){var i=Array.prototype,o=Object.prototype,s=i.slice,a=o.hasOwnProperty,c=i.forEach,l={},u={forEach:function(e,t,n){var r,i,o;if(null!==e)if(c&&e.forEach===c)e.forEach(t,n);else if(e.length===+e.length){for(r=0,i=e.length;r<i;r++)if(r in e&&t.call(n,e[r],r,e)===l)return}else for(o in e)if(a.call(e,o)&&t.call(n,e[o],o,e)===l)return},extend:function(e){return this.forEach(s.call(arguments,1),(function(t){for(var n in t)e[n]=t[n]})),e}},d=function(e){if(this.defaults={locale_data:{messages:{"":{domain:"messages",lang:"en",plural_forms:"nplurals=2; plural=(n != 1);"}}},domain:"messages",debug:!1},this.options=u.extend({},this.defaults,e),this.textdomain(this.options.domain),e.domain&&!this.options.locale_data[this.options.domain])throw new Error("Text domain set to non-existent domain: `"+e.domain+"`")};function h(e){return d.PF.compile(e||"nplurals=2; plural=(n != 1);")}function f(e,t){this._key=e,this._i18n=t}d.context_delimiter=String.fromCharCode(4),u.extend(f.prototype,{onDomain:function(e){return this._domain=e,this},withContext:function(e){return this._context=e,this},ifPlural:function(e,t){return this._val=e,this._pkey=t,this},fetch:function(e){return"[object Array]"!={}.toString.call(e)&&(e=[].slice.call(arguments,0)),(e&&e.length?d.sprintf:function(e){return e})(this._i18n.dcnpgettext(this._domain,this._context,this._key,this._pkey,this._val),e)}}),u.extend(d.prototype,{translate:function(e){return new f(e,this)},textdomain:function(e){if(!e)return this._textdomain;this._textdomain=e},gettext:function(e){return this.dcnpgettext.call(this,void 0,void 0,e)},dgettext:function(e,t){return this.dcnpgettext.call(this,e,void 0,t)},dcgettext:function(e,t){return this.dcnpgettext.call(this,e,void 0,t)},ngettext:function(e,t,n){return this.dcnpgettext.call(this,void 0,void 0,e,t,n)},dngettext:function(e,t,n,r){return this.dcnpgettext.call(this,e,void 0,t,n,r)},dcngettext:function(e,t,n,r){return this.dcnpgettext.call(this,e,void 0,t,n,r)},pgettext:function(e,t){return this.dcnpgettext.call(this,void 0,e,t)},dpgettext:function(e,t,n){return this.dcnpgettext.call(this,e,t,n)},dcpgettext:function(e,t,n){return this.dcnpgettext.call(this,e,t,n)},npgettext:function(e,t,n,r){return this.dcnpgettext.call(this,void 0,e,t,n,r)},dnpgettext:function(e,t,n,r,i){return this.dcnpgettext.call(this,e,t,n,r,i)},dcnpgettext:function(e,t,n,r,i){var o;if(r=r||n,e=e||this._textdomain,!this.options)return(o=new d).dcnpgettext.call(o,void 0,void 0,n,r,i);if(!this.options.locale_data)throw new Error("No locale data provided.");if(!this.options.locale_data[e])throw new Error("Domain `"+e+"` was not found.");if(!this.options.locale_data[e][""])throw new Error("No locale meta information provided.");if(!n)throw new Error("No translation key found.");var s,a,c,l=t?t+d.context_delimiter+n:n,u=this.options.locale_data,f=u[e],p=(u.messages||this.defaults.locale_data.messages)[""],g=f[""].plural_forms||f[""]["Plural-Forms"]||f[""]["plural-forms"]||p.plural_forms||p["Plural-Forms"]||p["plural-forms"];if(void 0===i)c=0;else{if("number"!=typeof i&&(i=parseInt(i,10),isNaN(i)))throw new Error("The number that was passed in is not a number.");c=h(g)(i)}if(!f)throw new Error("No domain named `"+e+"` could be found.");return!(s=f[l])||c>s.length?(this.options.missing_key_callback&&this.options.missing_key_callback(l,e),a=[n,r],!0===this.options.debug&&console.log(a[h(g)(i)]),a[h()(i)]):(a=s[c])||(a=[n,r])[h()(i)]}});var p,g,m=function(){function e(e){return Object.prototype.toString.call(e).slice(8,-1).toLowerCase()}function t(e,t){for(var n=[];t>0;n[--t]=e);return n.join("")}var n=function(){return n.cache.hasOwnProperty(arguments[0])||(n.cache[arguments[0]]=n.parse(arguments[0])),n.format.call(null,n.cache[arguments[0]],arguments)};return n.format=function(n,r){var i,o,s,a,c,l,u,d=1,h=n.length,f="",p=[];for(o=0;o<h;o++)if("string"===(f=e(n[o])))p.push(n[o]);else if("array"===f){if((a=n[o])[2])for(i=r[d],s=0;s<a[2].length;s++){if(!i.hasOwnProperty(a[2][s]))throw m('[sprintf] property "%s" does not exist',a[2][s]);i=i[a[2][s]]}else i=a[1]?r[a[1]]:r[d++];if(/[^s]/.test(a[8])&&"number"!=e(i))throw m("[sprintf] expecting number but found %s",e(i));switch(null==i&&(i=""),a[8]){case"b":i=i.toString(2);break;case"c":i=String.fromCharCode(i);break;case"d":i=parseInt(i,10);break;case"e":i=a[7]?i.toExponential(a[7]):i.toExponential();break;case"f":i=a[7]?parseFloat(i).toFixed(a[7]):parseFloat(i);break;case"o":i=i.toString(8);break;case"s":i=(i=String(i))&&a[7]?i.substring(0,a[7]):i;break;case"u":i=Math.abs(i);break;case"x":i=i.toString(16);break;case"X":i=i.toString(16).toUpperCase()}i=/[def]/.test(a[8])&&a[3]&&i>=0?"+"+i:i,l=a[4]?"0"==a[4]?"0":a[4].charAt(1):" ",u=a[6]-String(i).length,c=a[6]?t(l,u):"",p.push(a[5]?i+c:c+i)}return p.join("")},n.cache={},n.parse=function(e){for(var t=e,n=[],r=[],i=0;t;){if(null!==(n=/^[^\x25]+/.exec(t)))r.push(n[0]);else if(null!==(n=/^\x25{2}/.exec(t)))r.push("%");else{if(null===(n=/^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fosuxX])/.exec(t)))throw"[sprintf] huh?";if(n[2]){i|=1;var o=[],s=n[2],a=[];if(null===(a=/^([a-z_][a-z_\d]*)/i.exec(s)))throw"[sprintf] huh?";for(o.push(a[1]);""!==(s=s.substring(a[0].length));)if(null!==(a=/^\.([a-z_][a-z_\d]*)/i.exec(s)))o.push(a[1]);else{if(null===(a=/^\[(\d+)\]/.exec(s)))throw"[sprintf] huh?";o.push(a[1])}n[2]=o}else i|=2;if(3===i)throw"[sprintf] mixing positional and named placeholders is not (yet) supported";r.push(n)}t=t.substring(n[0].length)}return r},n}(),v=function(e,t){return t.unshift(e),m.apply(null,t)};d.parse_plural=function(e,t){return e=e.replace(/n/g,t),d.parse_expression(e)},d.sprintf=function(e,t){return"[object Array]"=={}.toString.call(t)?v(e,[].slice.call(t)):m.apply(this,[].slice.call(arguments))},d.prototype.sprintf=function(){return d.sprintf.apply(this,arguments)},(d.PF={}).parse=function(e){var t=d.PF.extractPluralExpr(e);return d.PF.parser.parse.call(d.PF.parser,t)},d.PF.compile=function(e){var t=d.PF.parse(e);return function(e){return!0===(n=d.PF.interpreter(t)(e))?1:n||0;var n}},d.PF.interpreter=function(e){return function(t){switch(e.type){case"GROUP":return d.PF.interpreter(e.expr)(t);case"TERNARY":return d.PF.interpreter(e.expr)(t)?d.PF.interpreter(e.truthy)(t):d.PF.interpreter(e.falsey)(t);case"OR":return d.PF.interpreter(e.left)(t)||d.PF.interpreter(e.right)(t);case"AND":return d.PF.interpreter(e.left)(t)&&d.PF.interpreter(e.right)(t);case"LT":return d.PF.interpreter(e.left)(t)<d.PF.interpreter(e.right)(t);case"GT":return d.PF.interpreter(e.left)(t)>d.PF.interpreter(e.right)(t);case"LTE":return d.PF.interpreter(e.left)(t)<=d.PF.interpreter(e.right)(t);case"GTE":return d.PF.interpreter(e.left)(t)>=d.PF.interpreter(e.right)(t);case"EQ":return d.PF.interpreter(e.left)(t)==d.PF.interpreter(e.right)(t);case"NEQ":return d.PF.interpreter(e.left)(t)!=d.PF.interpreter(e.right)(t);case"MOD":return d.PF.interpreter(e.left)(t)%d.PF.interpreter(e.right)(t);case"VAR":return t;case"NUM":return e.val;default:throw new Error("Invalid Token found.")}}},d.PF.extractPluralExpr=function(e){e=e.replace(/^\s\s*/,"").replace(/\s\s*$/,""),/;\s*$/.test(e)||(e=e.concat(";"));var t,n=/nplurals\=(\d+);/,r=e.match(n);if(!(r.length>1))throw new Error("nplurals not found in plural_forms string: "+e);if(r[1],!((t=(e=e.replace(n,"")).match(/plural\=(.*);/))&&t.length>1))throw new Error("`plural` expression not found: "+e);return t[1]},d.PF.parser=(p={trace:function(){},yy:{},symbols_:{error:2,expressions:3,e:4,EOF:5,"?":6,":":7,"||":8,"&&":9,"<":10,"<=":11,">":12,">=":13,"!=":14,"==":15,"%":16,"(":17,")":18,n:19,NUMBER:20,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",6:"?",7:":",8:"||",9:"&&",10:"<",11:"<=",12:">",13:">=",14:"!=",15:"==",16:"%",17:"(",18:")",19:"n",20:"NUMBER"},productions_:[0,[3,2],[4,5],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,1],[4,1]],performAction:function(e,t,n,r,i,o,s){var a=o.length-1;switch(i){case 1:return{type:"GROUP",expr:o[a-1]};case 2:this.$={type:"TERNARY",expr:o[a-4],truthy:o[a-2],falsey:o[a]};break;case 3:this.$={type:"OR",left:o[a-2],right:o[a]};break;case 4:this.$={type:"AND",left:o[a-2],right:o[a]};break;case 5:this.$={type:"LT",left:o[a-2],right:o[a]};break;case 6:this.$={type:"LTE",left:o[a-2],right:o[a]};break;case 7:this.$={type:"GT",left:o[a-2],right:o[a]};break;case 8:this.$={type:"GTE",left:o[a-2],right:o[a]};break;case 9:this.$={type:"NEQ",left:o[a-2],right:o[a]};break;case 10:this.$={type:"EQ",left:o[a-2],right:o[a]};break;case 11:this.$={type:"MOD",left:o[a-2],right:o[a]};break;case 12:this.$={type:"GROUP",expr:o[a-1]};break;case 13:this.$={type:"VAR"};break;case 14:this.$={type:"NUM",val:Number(e)}}},table:[{3:1,4:2,17:[1,3],19:[1,4],20:[1,5]},{1:[3]},{5:[1,6],6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{4:17,17:[1,3],19:[1,4],20:[1,5]},{5:[2,13],6:[2,13],7:[2,13],8:[2,13],9:[2,13],10:[2,13],11:[2,13],12:[2,13],13:[2,13],14:[2,13],15:[2,13],16:[2,13],18:[2,13]},{5:[2,14],6:[2,14],7:[2,14],8:[2,14],9:[2,14],10:[2,14],11:[2,14],12:[2,14],13:[2,14],14:[2,14],15:[2,14],16:[2,14],18:[2,14]},{1:[2,1]},{4:18,17:[1,3],19:[1,4],20:[1,5]},{4:19,17:[1,3],19:[1,4],20:[1,5]},{4:20,17:[1,3],19:[1,4],20:[1,5]},{4:21,17:[1,3],19:[1,4],20:[1,5]},{4:22,17:[1,3],19:[1,4],20:[1,5]},{4:23,17:[1,3],19:[1,4],20:[1,5]},{4:24,17:[1,3],19:[1,4],20:[1,5]},{4:25,17:[1,3],19:[1,4],20:[1,5]},{4:26,17:[1,3],19:[1,4],20:[1,5]},{4:27,17:[1,3],19:[1,4],20:[1,5]},{6:[1,7],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[1,28]},{6:[1,7],7:[1,29],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16]},{5:[2,3],6:[2,3],7:[2,3],8:[2,3],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[2,5],11:[2,5],12:[2,5],13:[2,5],14:[2,5],15:[2,5],16:[1,16],18:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[2,6],12:[2,6],13:[2,6],14:[2,6],15:[2,6],16:[1,16],18:[2,6]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],12:[2,7],13:[2,7],14:[2,7],15:[2,7],16:[1,16],18:[2,7]},{5:[2,8],6:[2,8],7:[2,8],8:[2,8],9:[2,8],10:[2,8],11:[2,8],12:[2,8],13:[2,8],14:[2,8],15:[2,8],16:[1,16],18:[2,8]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],12:[2,9],13:[2,9],14:[2,9],15:[2,9],16:[1,16],18:[2,9]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],12:[2,10],13:[2,10],14:[2,10],15:[2,10],16:[1,16],18:[2,10]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],12:[2,11],13:[2,11],14:[2,11],15:[2,11],16:[2,11],18:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],12:[2,12],13:[2,12],14:[2,12],15:[2,12],16:[2,12],18:[2,12]},{4:30,17:[1,3],19:[1,4],20:[1,5]},{5:[2,2],6:[1,7],7:[2,2],8:[1,8],9:[1,9],10:[1,10],11:[1,11],12:[1,12],13:[1,13],14:[1,14],15:[1,15],16:[1,16],18:[2,2]}],defaultActions:{6:[2,1]},parseError:function(e,t){throw new Error(e)},parse:function(e){var t=this,n=[0],r=[null],i=[],o=this.table,s="",a=0,c=0,l=0;this.lexer.setInput(e),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,void 0===this.lexer.yylloc&&(this.lexer.yylloc={});var u=this.lexer.yylloc;function d(){var e;return"number"!=typeof(e=t.lexer.lex()||1)&&(e=t.symbols_[e]||e),e}i.push(u),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var h,f,p,g,m,v,_,b,y,w,S={};;){if(p=n[n.length-1],this.defaultActions[p]?g=this.defaultActions[p]:(null==h&&(h=d()),g=o[p]&&o[p][h]),void 0===g||!g.length||!g[0]){if(!l){for(v in y=[],o[p])this.terminals_[v]&&v>2&&y.push("'"+this.terminals_[v]+"'");var x="";x=this.lexer.showPosition?"Parse error on line "+(a+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+y.join(", ")+", got '"+this.terminals_[h]+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==h?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(x,{text:this.lexer.match,token:this.terminals_[h]||h,line:this.lexer.yylineno,loc:u,expected:y})}if(3==l){if(1==h)throw new Error(x||"Parsing halted.");c=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,u=this.lexer.yylloc,h=d()}for(;!(2..toString()in o[p]);){if(0==p)throw new Error(x||"Parsing halted.");w=1,n.length=n.length-2*w,r.length=r.length-w,i.length=i.length-w,p=n[n.length-1]}f=h,h=2,g=o[p=n[n.length-1]]&&o[p][2],l=3}if(g[0]instanceof Array&&g.length>1)throw new Error("Parse Error: multiple actions possible at state: "+p+", token: "+h);switch(g[0]){case 1:n.push(h),r.push(this.lexer.yytext),i.push(this.lexer.yylloc),n.push(g[1]),h=null,f?(h=f,f=null):(c=this.lexer.yyleng,s=this.lexer.yytext,a=this.lexer.yylineno,u=this.lexer.yylloc,l>0&&l--);break;case 2:if(_=this.productions_[g[1]][1],S.$=r[r.length-_],S._$={first_line:i[i.length-(_||1)].first_line,last_line:i[i.length-1].last_line,first_column:i[i.length-(_||1)].first_column,last_column:i[i.length-1].last_column},void 0!==(m=this.performAction.call(S,s,c,a,this.yy,g[1],r,i)))return m;_&&(n=n.slice(0,-1*_*2),r=r.slice(0,-1*_),i=i.slice(0,-1*_)),n.push(this.productions_[g[1]][0]),r.push(S.$),i.push(S._$),b=o[n[n.length-2]][n[n.length-1]],n.push(b);break;case 3:return!0}}return!0}},g=function(){var e={EOF:1,parseError:function(e,t){if(!this.yy.parseError)throw new Error(e);this.yy.parseError(e,t)},setInput:function(e){return this._input=e,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.match+=e,this.matched+=e,e.match(/\n/)&&this.yylineno++,this._input=this._input.slice(1),e},unput:function(e){return this._input=e+this._input,this},more:function(){return this._more=!0,this},pastInput:function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var e=this.pastInput(),t=new Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},next:function(){if(this.done)return this.EOF;var e,t;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),r=0;r<n.length;r++)if(e=this._input.match(this.rules[n[r]]))return(t=e[0].match(/\n.*/g))&&(this.yylineno+=t.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:t?t[t.length-1].length-1:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],this.performAction.call(this,this.yy,this,n[r],this.conditionStack[this.conditionStack.length-1])||void 0;if(""===this._input)return this.EOF;this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var e=this.next();return void 0!==e?e:this.lex()},begin:function(e){this.conditionStack.push(e)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(e){this.begin(e)},performAction:function(e,t,n,r){switch(n){case 0:break;case 1:return 20;case 2:return 19;case 3:return 8;case 4:return 9;case 5:return 6;case 6:return 7;case 7:return 11;case 8:return 13;case 9:return 10;case 10:return 12;case 11:return 14;case 12:return 15;case 13:return 16;case 14:return 17;case 15:return 18;case 16:return 5;case 17:return"INVALID"}},rules:[/^\s+/,/^[0-9]+(\.[0-9]+)?\b/,/^n\b/,/^\|\|/,/^&&/,/^\?/,/^:/,/^<=/,/^>=/,/^</,/^>/,/^!=/,/^==/,/^%/,/^\(/,/^\)/,/^$/,/^./],conditions:{INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};return e}(),p.lexer=g,p),e.exports&&(t=e.exports=d),t.Jed=d}()},function(e,t,n){"use strict";var r=n(15),i=n(0);i.e.Websocket=class{constructor(e){this._conn=e,this.strip="wrapper";const t=e.service;if(0!==t.indexOf("ws:")&&0!==t.indexOf("wss:")){let n="";"ws"===e.options.protocol&&"https:"!==window.location.protocol?n+="ws":n+="wss",n+="://"+window.location.host,0!==t.indexOf("/")?n+=window.location.pathname+t:n+=t,e.service=n}}_buildStream(){return Object(i.a)("open",{xmlns:i.e.NS.FRAMING,to:this._conn.domain,version:"1.0"})}_checkStreamError(e,t){let n;if(n=e.getElementsByTagNameNS?e.getElementsByTagNameNS(i.e.NS.STREAM,"error"):e.getElementsByTagName("stream:error"),0===n.length)return!1;const r=n[0];let o="",s="";for(let e=0;e<r.childNodes.length;e++){const t=r.childNodes[e];if("urn:ietf:params:xml:ns:xmpp-streams"!==t.getAttribute("xmlns"))break;"text"===t.nodeName?s=t.textContent:o=t.nodeName}let a="WebSocket stream error: ";return a+=o||"unknown",s&&(a+=" - "+s),i.e.error(a),this._conn._changeConnectStatus(t,o),this._conn._doDisconnect(),!0}_reset(){}_connect(){this._closeSocket(),this.socket=new WebSocket(this._conn.service,"xmpp"),this.socket.onopen=()=>this._onOpen(),this.socket.onerror=e=>this._onError(e),this.socket.onclose=e=>this._onClose(e),this.socket.onmessage=e=>this._onInitialMessage(e)}_connect_cb(e){if(this._checkStreamError(e,i.e.Status.CONNFAIL))return i.e.Status.CONNFAIL}_handleStreamStart(e){let t=!1;const n=e.getAttribute("xmlns");"string"!=typeof n?t="Missing xmlns in <open />":n!==i.e.NS.FRAMING&&(t="Wrong xmlns in <open />: "+n);const r=e.getAttribute("version");return"string"!=typeof r?t="Missing version in <open />":"1.0"!==r&&(t="Wrong version in <open />: "+r),!t||(this._conn._changeConnectStatus(i.e.Status.CONNFAIL,t),this._conn._doDisconnect(),!1)}_onInitialMessage(e){if(0===e.data.indexOf("<open ")||0===e.data.indexOf("<?xml")){const t=e.data.replace(/^(<\?.*?\?>\s*)*/,"");if(""===t)return;const n=(new r.a).parseFromString(t,"text/xml").documentElement;this._conn.xmlInput(n),this._conn.rawInput(e.data),this._handleStreamStart(n)&&this._connect_cb(n)}else if(0===e.data.indexOf("<close ")){const t=(new r.a).parseFromString(e.data,"text/xml").documentElement;this._conn.xmlInput(t),this._conn.rawInput(e.data);const n=t.getAttribute("see-other-uri");if(n){const e=this._conn.service;(e.indexOf("wss:")>=0&&n.indexOf("wss:")>=0||e.indexOf("ws:")>=0)&&(this._conn._changeConnectStatus(i.e.Status.REDIRECT,"Received see-other-uri, resetting connection"),this._conn.reset(),this._conn.service=n,this._connect())}else this._conn._changeConnectStatus(i.e.Status.CONNFAIL,"Received closing stream"),this._conn._doDisconnect()}else{this._replaceMessageHandler();const t=this._streamWrap(e.data),n=(new r.a).parseFromString(t,"text/xml").documentElement;this._conn._connect_cb(n,null,e.data)}}_replaceMessageHandler(){this.socket.onmessage=e=>this._onMessage(e)}_disconnect(e){if(this.socket&&this.socket.readyState!==WebSocket.CLOSED){e&&this._conn.send(e);const t=Object(i.a)("close",{xmlns:i.e.NS.FRAMING});this._conn.xmlOutput(t.tree());const n=i.e.serialize(t);this._conn.rawOutput(n);try{this.socket.send(n)}catch(e){i.e.warn("Couldn't send <close /> tag.")}}this._conn._doDisconnect()}_doDisconnect(){i.e.debug("WebSockets _doDisconnect was called"),this._closeSocket()}_streamWrap(e){return"<wrapper>"+e+"</wrapper>"}_closeSocket(){if(this.socket)try{this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close()}catch(e){i.e.debug(e.message)}this.socket=null}_emptyQueue(){return!0}_onClose(e){this._conn.connected&&!this._conn.disconnecting?(i.e.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):e&&1006===e.code&&!this._conn.connected&&this.socket?(i.e.error("Websocket closed unexcectedly"),this._conn._changeConnectStatus(i.e.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._conn._doDisconnect()):i.e.debug("Websocket closed")}_no_auth_received(e){i.e.error("Server did not offer a supported authentication mechanism"),this._conn._changeConnectStatus(i.e.Status.CONNFAIL,i.e.ErrorCondition.NO_AUTH_MECH),e&&e.call(this._conn),this._conn._doDisconnect()}_onDisconnectTimeout(){}_abortAllRequests(){}_onError(e){i.e.error("Websocket error "+e),this._conn._changeConnectStatus(i.e.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._disconnect()}_onIdle(){const e=this._conn._data;if(e.length>0&&!this._conn.paused){for(let t=0;t<e.length;t++)if(null!==e[t]){let n;n="restart"===e[t]?this._buildStream().tree():e[t];const r=i.e.serialize(n);this._conn.xmlOutput(n),this._conn.rawOutput(r),this.socket.send(r)}this._conn._data=[]}}_onMessage(e){let t;const n='<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />';if(e.data===n)return this._conn.rawInput(n),this._conn.xmlInput(e),void(this._conn.disconnecting||this._conn._doDisconnect());if(0===e.data.search("<open ")){if(t=(new r.a).parseFromString(e.data,"text/xml").documentElement,!this._handleStreamStart(t))return}else{const n=this._streamWrap(e.data);t=(new r.a).parseFromString(n,"text/xml").documentElement}return this._checkStreamError(t,i.e.Status.ERROR)?void 0:this._conn.disconnecting&&"presence"===t.firstChild.nodeName&&"unavailable"===t.firstChild.getAttribute("type")?(this._conn.xmlInput(t),void this._conn.rawInput(i.e.serialize(t))):void this._conn._dataRecv(t,e.data)}_onOpen(){i.e.debug("Websocket open");const e=this._buildStream();this._conn.xmlOutput(e.tree());const t=i.e.serialize(e);this._conn.rawOutput(t),this.socket.send(t)}_reqToData(e){return e}_send(){this._conn.flush()}_sendRestart(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}}},function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,n){var r=n(333);e.exports=function(e){var t=r(e),n=t%1;return t==t?n?t-n:t:0}},function(e,t){e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}},function(e,t,n){var r=n(20),i=Object.create,o=function(){function e(){}return function(t){if(!r(t))return{};if(i)return i(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=o},function(e,t,n){var r=n(74),i=n(76);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e){return e.placeholder}},function(e,t,n){var r=n(26)(n(11),"Map");e.exports=r},function(e,t,n){var r=n(398),i=n(405),o=n(407),s=n(408),a=n(409);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},function(e,t,n){var r=n(57),i=n(39);e.exports=function(e,t){for(var n=0,o=(t=r(t,e)).length;null!=e&&n<o;)e=e[i(t[n++])];return n&&n==o?e:void 0}},function(e,t,n){var r=n(16),i=n(48),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!i(e))||(s.test(e)||!o.test(e)||null!=t&&e in Object(t))}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(41),i=n(13).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on  "+e);return e}},function(e,t,n){var r=n(457),i=n(84);e.exports=function(e){return r(i(e))}},function(e,t){var n=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:n)(e)}},function(e,t,n){var r=n(144)("keys"),i=n(145);e.exports=function(e){return r[e]||(r[e]=i(e))}},function(e,t){e.exports=!0},function(e,t,n){e.exports={default:n(465),__esModule:!0}},function(e,t,n){var r=n(40).f,i=n(60),o=n(17)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){"use strict";var r=n(59);function i(e){var t,n;this.promise=new e((function(e,r){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=r})),this.resolve=r(t),this.reject=r(n)}e.exports.f=function(e){return new i(e)}},function(e,t,n){var r=n(367),i=n(33);e.exports=function(e){return null==e?[]:r(e,i(e))}},function(e,t,n){var r=n(109),i=n(368),o=n(77),s=n(52),a=r((function(e,t){var n=s(t,o(a));return i(e,32,void 0,t,n)}));a.placeholder={},e.exports=a},function(e,t,n){var r;!function(){"use strict";var i={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function o(e){return a(l(e),arguments)}function s(e,t){return o.apply(null,[e].concat(t||[]))}function a(e,t){var n,r,s,a,c,l,u,d,h,f=1,p=e.length,g="";for(r=0;r<p;r++)if("string"==typeof e[r])g+=e[r];else if("object"==typeof e[r]){if((a=e[r]).keys)for(n=t[f],s=0;s<a.keys.length;s++){if(null==n)throw new Error(o('[sprintf] Cannot access property "%s" of undefined value "%s"',a.keys[s],a.keys[s-1]));n=n[a.keys[s]]}else n=a.param_no?t[a.param_no]:t[f++];if(i.not_type.test(a.type)&&i.not_primitive.test(a.type)&&n instanceof Function&&(n=n()),i.numeric_arg.test(a.type)&&"number"!=typeof n&&isNaN(n))throw new TypeError(o("[sprintf] expecting number but found %T",n));switch(i.number.test(a.type)&&(d=n>=0),a.type){case"b":n=parseInt(n,10).toString(2);break;case"c":n=String.fromCharCode(parseInt(n,10));break;case"d":case"i":n=parseInt(n,10);break;case"j":n=JSON.stringify(n,null,a.width?parseInt(a.width):0);break;case"e":n=a.precision?parseFloat(n).toExponential(a.precision):parseFloat(n).toExponential();break;case"f":n=a.precision?parseFloat(n).toFixed(a.precision):parseFloat(n);break;case"g":n=a.precision?String(Number(n.toPrecision(a.precision))):parseFloat(n);break;case"o":n=(parseInt(n,10)>>>0).toString(8);break;case"s":n=String(n),n=a.precision?n.substring(0,a.precision):n;break;case"t":n=String(!!n),n=a.precision?n.substring(0,a.precision):n;break;case"T":n=Object.prototype.toString.call(n).slice(8,-1).toLowerCase(),n=a.precision?n.substring(0,a.precision):n;break;case"u":n=parseInt(n,10)>>>0;break;case"v":n=n.valueOf(),n=a.precision?n.substring(0,a.precision):n;break;case"x":n=(parseInt(n,10)>>>0).toString(16);break;case"X":n=(parseInt(n,10)>>>0).toString(16).toUpperCase()}i.json.test(a.type)?g+=n:(!i.number.test(a.type)||d&&!a.sign?h="":(h=d?"+":"-",n=n.toString().replace(i.sign,"")),l=a.pad_char?"0"===a.pad_char?"0":a.pad_char.charAt(1):" ",u=a.width-(h+n).length,c=a.width&&u>0?l.repeat(u):"",g+=a.align?h+n+c:"0"===l?h+c+n:c+h+n)}return g}var c=Object.create(null);function l(e){if(c[e])return c[e];for(var t,n=e,r=[],o=0;n;){if(null!==(t=i.text.exec(n)))r.push(t[0]);else if(null!==(t=i.modulo.exec(n)))r.push("%");else{if(null===(t=i.placeholder.exec(n)))throw new SyntaxError("[sprintf] unexpected placeholder");if(t[2]){o|=1;var s=[],a=t[2],l=[];if(null===(l=i.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(s.push(l[1]);""!==(a=a.substring(l[0].length));)if(null!==(l=i.key_access.exec(a)))s.push(l[1]);else{if(null===(l=i.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");s.push(l[1])}t[2]=s}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}n=n.substring(t[0].length)}return c[e]=r}t.sprintf=o,t.vsprintf=s,"undefined"!=typeof window&&(window.sprintf=o,window.vsprintf=s,void 0===(r=function(){return{sprintf:o,vsprintf:s}}.call(t,n,t,e))||(e.exports=r))}()},function(e,t){function n(e,t){for(var n in e)t[n]=e[n]}function r(e,t){var r=e.prototype;if(Object.create){var i=Object.create(t.prototype);r.__proto__=i}if(!(r instanceof t)){function o(){}o.prototype=t.prototype,n(r,o=new o),e.prototype=r=o}r.constructor!=e&&("function"!=typeof e&&console.error("unknow Class:"+e),r.constructor=e)}var i={},o=i.ELEMENT_NODE=1,s=i.ATTRIBUTE_NODE=2,a=i.TEXT_NODE=3,c=i.CDATA_SECTION_NODE=4,l=i.ENTITY_REFERENCE_NODE=5,u=i.ENTITY_NODE=6,d=i.PROCESSING_INSTRUCTION_NODE=7,h=i.COMMENT_NODE=8,f=i.DOCUMENT_NODE=9,p=i.DOCUMENT_TYPE_NODE=10,g=i.DOCUMENT_FRAGMENT_NODE=11,m=i.NOTATION_NODE=12,v={},_={},b=(v.INDEX_SIZE_ERR=(_[1]="Index size error",1),v.DOMSTRING_SIZE_ERR=(_[2]="DOMString size error",2),v.HIERARCHY_REQUEST_ERR=(_[3]="Hierarchy request error",3)),y=(v.WRONG_DOCUMENT_ERR=(_[4]="Wrong document",4),v.INVALID_CHARACTER_ERR=(_[5]="Invalid character",5),v.NO_DATA_ALLOWED_ERR=(_[6]="No data allowed",6),v.NO_MODIFICATION_ALLOWED_ERR=(_[7]="No modification allowed",7),v.NOT_FOUND_ERR=(_[8]="Not found",8)),w=(v.NOT_SUPPORTED_ERR=(_[9]="Not supported",9),v.INUSE_ATTRIBUTE_ERR=(_[10]="Attribute in use",10));v.INVALID_STATE_ERR=(_[11]="Invalid state",11),v.SYNTAX_ERR=(_[12]="Syntax error",12),v.INVALID_MODIFICATION_ERR=(_[13]="Invalid modification",13),v.NAMESPACE_ERR=(_[14]="Invalid namespace",14),v.INVALID_ACCESS_ERR=(_[15]="Invalid access",15);function S(e,t){if(t instanceof Error)var n=t;else n=this,Error.call(this,_[e]),this.message=_[e],Error.captureStackTrace&&Error.captureStackTrace(this,S);return n.code=e,t&&(this.message=this.message+": "+t),n}function x(){}function E(e,t){this._node=e,this._refresh=t,A(this)}function A(e){var t=e._node._inc||e._node.ownerDocument._inc;if(e._inc!=t){var r=e._refresh(e._node);te(e,"length",r.length),n(r,e),e._inc=t}}function C(){}function j(e,t){for(var n=e.length;n--;)if(e[n]===t)return n}function T(e,t,n,r){if(r?t[j(t,r)]=n:t[t.length++]=n,e){n.ownerElement=e;var i=e.ownerDocument;i&&(r&&D(i,e,r),function(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}(i,e,n))}}function O(e,t,n){var r=j(t,n);if(!(r>=0))throw S(y,new Error(e.tagName+"@"+n));for(var i=t.length-1;r<i;)t[r]=t[++r];if(t.length=i,e){var o=e.ownerDocument;o&&(D(o,e,n),n.ownerElement=null)}}function k(e){if(this._features={},e)for(var t in e)this._features=e[t]}function N(){}function I(e){return("<"==e?"&lt;":">"==e&&"&gt;")||"&"==e&&"&amp;"||'"'==e&&"&quot;"||"&#"+e.charCodeAt()+";"}function M(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(M(e,t))return!0}while(e=e.nextSibling)}function R(){}function D(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function P(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var i=t.firstChild,o=0;i;)r[o++]=i,i=i.nextSibling;r.length=o}}}function L(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,P(e.ownerDocument,e),t}function z(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===g){var i=t.firstChild;if(null==i)return t;var o=t.lastChild}else i=o=t;var s=n?n.previousSibling:e.lastChild;i.previousSibling=s,o.nextSibling=n,s?s.nextSibling=i:e.firstChild=i,null==n?e.lastChild=o:n.previousSibling=o;do{i.parentNode=e}while(i!==o&&(i=i.nextSibling));return P(e.ownerDocument||e,e),t.nodeType==g&&(t.firstChild=t.lastChild=null),t}function F(){this._nsMap={}}function B(){}function q(){}function H(){}function U(){}function $(){}function W(){}function G(){}function V(){}function J(){}function X(){}function Q(){}function Y(){}function K(e,t){var n=[],r=9==this.nodeType?this.documentElement:this,i=r.prefix,o=r.namespaceURI;if(o&&null==i&&null==(i=r.lookupPrefix(o)))var s=[{namespace:o,prefix:null}];return ee(this,n,e,t,s),n.join("")}function Z(e,t,n){var r=e.prefix||"",i=e.namespaceURI;if(!r&&!i)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===i||"http://www.w3.org/2000/xmlns/"==i)return!1;for(var o=n.length;o--;){var s=n[o];if(s.prefix==r)return s.namespace!=i}return!0}function ee(e,t,n,r,i){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case o:i||(i=[]);i.length;var u=e.attributes,m=u.length,v=e.firstChild,_=e.tagName;n="http://www.w3.org/1999/xhtml"===e.namespaceURI||n,t.push("<",_);for(var b=0;b<m;b++){"xmlns"==(y=u.item(b)).prefix?i.push({prefix:y.localName,namespace:y.value}):"xmlns"==y.nodeName&&i.push({prefix:"",namespace:y.value})}for(b=0;b<m;b++){var y;if(Z(y=u.item(b),0,i)){var w=y.prefix||"",S=y.namespaceURI,x=w?" xmlns:"+w:" xmlns";t.push(x,'="',S,'"'),i.push({prefix:w,namespace:S})}ee(y,t,n,r,i)}if(Z(e,0,i)){w=e.prefix||"",S=e.namespaceURI,x=w?" xmlns:"+w:" xmlns";t.push(x,'="',S,'"'),i.push({prefix:w,namespace:S})}if(v||n&&!/^(?:meta|link|img|br|hr|input)$/i.test(_)){if(t.push(">"),n&&/^script$/i.test(_))for(;v;)v.data?t.push(v.data):ee(v,t,n,r,i),v=v.nextSibling;else for(;v;)ee(v,t,n,r,i),v=v.nextSibling;t.push("</",_,">")}else t.push("/>");return;case f:case g:for(v=e.firstChild;v;)ee(v,t,n,r,i),v=v.nextSibling;return;case s:return t.push(" ",e.name,'="',e.value.replace(/[<&"]/g,I),'"');case a:return t.push(e.data.replace(/[<&]/g,I));case c:return t.push("<![CDATA[",e.data,"]]>");case h:return t.push("\x3c!--",e.data,"--\x3e");case p:var E=e.publicId,A=e.systemId;if(t.push("<!DOCTYPE ",e.name),E)t.push(' PUBLIC "',E),A&&"."!=A&&t.push('" "',A),t.push('">');else if(A&&"."!=A)t.push(' SYSTEM "',A,'">');else{var C=e.internalSubset;C&&t.push(" [",C,"]"),t.push(">")}return;case d:return t.push("<?",e.target," ",e.data,"?>");case l:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function te(e,t,n){e[t]=n}S.prototype=Error.prototype,n(v,S),x.prototype={length:0,item:function(e){return this[e]||null},toString:function(e,t){for(var n=[],r=0;r<this.length;r++)ee(this[r],n,e,t);return n.join("")}},E.prototype.item=function(e){return A(this),this[e]},r(E,x),C.prototype={length:0,item:x.prototype.item,getNamedItem:function(e){for(var t=this.length;t--;){var n=this[t];if(n.nodeName==e)return n}},setNamedItem:function(e){var t=e.ownerElement;if(t&&t!=this._ownerElement)throw new S(w);var n=this.getNamedItem(e.nodeName);return T(this._ownerElement,this,e,n),n},setNamedItemNS:function(e){var t,n=e.ownerElement;if(n&&n!=this._ownerElement)throw new S(w);return t=this.getNamedItemNS(e.namespaceURI,e.localName),T(this._ownerElement,this,e,t),t},removeNamedItem:function(e){var t=this.getNamedItem(e);return O(this._ownerElement,this,t),t},removeNamedItemNS:function(e,t){var n=this.getNamedItemNS(e,t);return O(this._ownerElement,this,n),n},getNamedItemNS:function(e,t){for(var n=this.length;n--;){var r=this[n];if(r.localName==t&&r.namespaceURI==e)return r}return null}},k.prototype={hasFeature:function(e,t){var n=this._features[e.toLowerCase()];return!(!n||t&&!(t in n))},createDocument:function(e,t,n){var r=new R;if(r.implementation=this,r.childNodes=new x,r.doctype=n,n&&r.appendChild(n),t){var i=r.createElementNS(e,t);r.appendChild(i)}return r},createDocumentType:function(e,t,n){var r=new W;return r.name=e,r.nodeName=e,r.publicId=t,r.systemId=n,r}},N.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(e,t){return z(this,e,t)},replaceChild:function(e,t){this.insertBefore(e,t),t&&this.removeChild(t)},removeChild:function(e){return L(this,e)},appendChild:function(e){return this.insertBefore(e,null)},hasChildNodes:function(){return null!=this.firstChild},cloneNode:function(e){return function e(t,n,r){var i=new n.constructor;for(var a in n){var c=n[a];"object"!=typeof c&&c!=i[a]&&(i[a]=c)}n.childNodes&&(i.childNodes=new x);switch(i.ownerDocument=t,i.nodeType){case o:var l=n.attributes,u=i.attributes=new C,d=l.length;u._ownerElement=i;for(var h=0;h<d;h++)i.setAttributeNode(e(t,l.item(h),!0));break;case s:r=!0}if(r)for(var f=n.firstChild;f;)i.appendChild(e(t,f,r)),f=f.nextSibling;return i}(this.ownerDocument||this,this,e)},normalize:function(){for(var e=this.firstChild;e;){var t=e.nextSibling;t&&t.nodeType==a&&e.nodeType==a?(this.removeChild(t),e.appendData(t.data)):(e.normalize(),e=t)}},isSupported:function(e,t){return this.ownerDocument.implementation.hasFeature(e,t)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==s?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==s?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(i,N),n(i,N.prototype),R.prototype={nodeName:"#document",nodeType:f,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==g){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==o&&(this.documentElement=e),z(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),L(this,e)},importNode:function(e,t){return function e(t,n,r){var i;switch(n.nodeType){case o:(i=n.cloneNode(!1)).ownerDocument=t;case g:break;case s:r=!0}i||(i=n.cloneNode(!1));if(i.ownerDocument=t,i.parentNode=null,r)for(var a=n.firstChild;a;)i.appendChild(e(t,a,r)),a=a.nextSibling;return i}(this,e,t)},getElementById:function(e){var t=null;return M(this.documentElement,(function(n){if(n.nodeType==o&&n.getAttribute("id")==e)return t=n,!0})),t},createElement:function(e){var t=new F;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new x,(t.attributes=new C)._ownerElement=t,t},createDocumentFragment:function(){var e=new X;return e.ownerDocument=this,e.childNodes=new x,e},createTextNode:function(e){var t=new H;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new U;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new $;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new Q;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new B;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new J;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new F,r=t.split(":"),i=n.attributes=new C;return n.childNodes=new x,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,i._ownerElement=n,n},createAttributeNS:function(e,t){var n=new B,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(R,N),F.prototype={nodeType:o,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===g?this.insertBefore(e,null):function(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);r=e.lastChild}return r=e.lastChild,t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,P(e.ownerDocument,e,t),t}(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new E(this,(function(t){var n=[];return M(t,(function(r){r===t||r.nodeType!=o||"*"!==e&&r.tagName!=e||n.push(r)})),n}))},getElementsByTagNameNS:function(e,t){return new E(this,(function(n){var r=[];return M(n,(function(i){i===n||i.nodeType!==o||"*"!==e&&i.namespaceURI!==e||"*"!==t&&i.localName!=t||r.push(i)})),r}))}},R.prototype.getElementsByTagName=F.prototype.getElementsByTagName,R.prototype.getElementsByTagNameNS=F.prototype.getElementsByTagNameNS,r(F,N),B.prototype.nodeType=s,r(B,N),q.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(_[b])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(q,N),H.prototype={nodeName:"#text",nodeType:a,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(H,q),U.prototype={nodeName:"#comment",nodeType:h},r(U,q),$.prototype={nodeName:"#cdata-section",nodeType:c},r($,q),W.prototype.nodeType=p,r(W,N),G.prototype.nodeType=m,r(G,N),V.prototype.nodeType=u,r(V,N),J.prototype.nodeType=l,r(J,N),X.prototype.nodeName="#document-fragment",X.prototype.nodeType=g,r(X,N),Q.prototype.nodeType=d,r(Q,N),Y.prototype.serializeToString=function(e,t,n){return K.call(e,t,n)},N.prototype.toString=K;try{if(Object.defineProperty){Object.defineProperty(E.prototype,"length",{get:function(){return A(this),this.$$length}}),Object.defineProperty(N.prototype,"textContent",{get:function(){return function e(t){switch(t.nodeType){case o:case g:var n=[];for(t=t.firstChild;t;)7!==t.nodeType&&8!==t.nodeType&&n.push(e(t)),t=t.nextSibling;return n.join("");default:return t.nodeValue}}(this)},set:function(e){switch(this.nodeType){case o:case g:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),te=function(e,t,n){e["$$"+t]=n}}}catch(e){}t.DOMImplementation=k,t.XMLSerializer=Y},function(e,t,n){(function(t){var n="object"==typeof t&&t&&t.Object===Object&&t;e.exports=n}).call(this,n(12))},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}},function(e,t,n){var r=n(342),i=n(99),o=n(16),s=n(100),a=n(37),c=n(101),l=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=o(e),u=!n&&i(e),d=!n&&!u&&s(e),h=!n&&!u&&!d&&c(e),f=n||u||d||h,p=f?r(e.length,String):[],g=p.length;for(var m in e)!t&&!l.call(e,m)||f&&("length"==m||d&&("offset"==m||"parent"==m)||h&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||a(m,g))||p.push(m);return p}},function(e,t,n){var r=n(343),i=n(23),o=Object.prototype,s=o.hasOwnProperty,a=o.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(e){return i(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=c},function(e,t,n){(function(e){var r=n(11),i=n(344),o=t&&!t.nodeType&&t,s=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=s&&s.exports===o?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||i;e.exports=c}).call(this,n(46)(e))},function(e,t,n){var r=n(345),i=n(346),o=n(347),s=o&&o.isTypedArray,a=s?i(s):r;e.exports=a},function(e,t,n){var r=n(103),i=n(348),o=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=[];for(var n in Object(e))o.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(106),i=n(50),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];o.call(e,t)&&i(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},function(e,t,n){var r=n(107);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},function(e,t,n){var r=n(26),i=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},function(e,t){var n=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return n.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},function(e,t,n){var r=n(38),i=n(358),o=n(110);e.exports=function(e,t){return o(i(e,t,r),e+"")}},function(e,t,n){var r=n(359),i=n(111)(r);e.exports=i},function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var i=n(),o=16-(i-r);if(r=i,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}},function(e,t,n){var r=n(98),i=n(362),o=n(29);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(364),i=n(365),o=n(366);e.exports=function(e,t,n){return t==t?o(e,t,n):r(e,i,n)}},function(e,t,n){var r=n(25),i=n(16),o=n(23);e.exports=function(e){return"string"==typeof e||!i(e)&&o(e)&&"[object String]"==r(e)}},function(e,t,n){var r=n(38),i=n(116),o=i?function(e,t){return i.set(e,t),e}:r;e.exports=o},function(e,t,n){var r=n(117),i=r&&new r;e.exports=i},function(e,t,n){var r=n(26)(n(11),"WeakMap");e.exports=r},function(e,t,n){var r=n(119),i=n(120),o=n(371),s=n(51),a=n(121),c=n(77),l=n(382),u=n(52),d=n(11);e.exports=function e(t,n,h,f,p,g,m,v,_,b){var y=128&n,w=1&n,S=2&n,x=24&n,E=512&n,A=S?void 0:s(t);return function C(){for(var j=arguments.length,T=Array(j),O=j;O--;)T[O]=arguments[O];if(x)var k=c(C),N=o(T,k);if(f&&(T=r(T,f,p,x)),g&&(T=i(T,g,m,x)),j-=N,x&&j<b){var I=u(T,k);return a(t,n,e,C.placeholder,h,T,I,v,_,b-j)}var M=w?h:this,R=S?M[t]:t;return j=T.length,v?T=l(T,v):E&&j>1&&T.reverse(),y&&_<j&&(T.length=_),this&&this!==d&&this instanceof C&&(R=A||s(R)),R.apply(M,T)}}},function(e,t){var n=Math.max;e.exports=function(e,t,r,i){for(var o=-1,s=e.length,a=r.length,c=-1,l=t.length,u=n(s-a,0),d=Array(l+u),h=!i;++c<l;)d[c]=t[c];for(;++o<a;)(h||o<s)&&(d[r[o]]=e[o]);for(;u--;)d[c++]=e[o++];return d}},function(e,t){var n=Math.max;e.exports=function(e,t,r,i){for(var o=-1,s=e.length,a=-1,c=r.length,l=-1,u=t.length,d=n(s-c,0),h=Array(d+u),f=!i;++o<d;)h[o]=e[o];for(var p=o;++l<u;)h[p+l]=t[l];for(;++a<c;)(f||o<s)&&(h[p+r[a]]=e[o++]);return h}},function(e,t,n){var r=n(372),i=n(125),o=n(126);e.exports=function(e,t,n,s,a,c,l,u,d,h){var f=8&t;t|=f?32:64,4&(t&=~(f?64:32))||(t&=-4);var p=[e,t,a,f?c:void 0,f?l:void 0,f?void 0:c,f?void 0:l,u,d,h],g=n.apply(void 0,p);return r(e)&&i(g,p),g.placeholder=s,o(g,e,t)}},function(e,t,n){var r=n(116),i=n(373),o=r?function(e){return r.get(e)}:i;e.exports=o},function(e,t,n){var r=n(74),i=n(76);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=r(i.prototype),o.prototype.constructor=o,e.exports=o},function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},function(e,t,n){var r=n(115),i=n(111)(r);e.exports=i},function(e,t,n){var r=n(378),i=n(379),o=n(110),s=n(380);e.exports=function(e,t,n){var a=t+"";return o(e,i(a,s(r(a),n)))}},function(e,t,n){var r=n(53),i=n(393),o=n(394),s=n(395),a=n(396),c=n(397);function l(e){var t=this.__data__=new r(e);this.size=t.size}l.prototype.clear=i,l.prototype.delete=o,l.prototype.get=s,l.prototype.has=a,l.prototype.set=c,e.exports=l},function(e,t,n){var r=n(410),i=n(23);e.exports=function e(t,n,o,s,a){return t===n||(null==t||null==n||!i(t)&&!i(n)?t!=t&&n!=n:r(t,n,o,s,e,a))}},function(e,t,n){var r=n(411),i=n(414),o=n(415);e.exports=function(e,t,n,s,a,c){var l=1&n,u=e.length,d=t.length;if(u!=d&&!(l&&d>u))return!1;var h=c.get(e),f=c.get(t);if(h&&f)return h==t&&f==e;var p=-1,g=!0,m=2&n?new r:void 0;for(c.set(e,t),c.set(t,e);++p<u;){var v=e[p],_=t[p];if(s)var b=l?s(_,v,p,t,e,c):s(v,_,p,e,t,c);if(void 0!==b){if(b)continue;g=!1;break}if(m){if(!i(t,(function(e,t){if(!o(m,t)&&(v===e||a(v,e,n,s,c)))return m.push(t)}))){g=!1;break}}else if(v!==_&&!a(v,_,n,s,c)){g=!1;break}}return c.delete(e),c.delete(t),g}},function(e,t,n){var r=n(131),i=n(16);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}},function(e,t,n){var r=n(422),i=n(133),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(423),i=n(78),o=n(424),s=n(425),a=n(117),c=n(25),l=n(108),u=l(r),d=l(i),h=l(o),f=l(s),p=l(a),g=c;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||o&&"[object Promise]"!=g(o.resolve())||s&&"[object Set]"!=g(new s)||a&&"[object WeakMap]"!=g(new a))&&(g=function(e){var t=c(e),n="[object Object]"==t?e.constructor:void 0,r=n?l(n):"";if(r)switch(r){case u:return"[object DataView]";case d:return"[object Map]";case h:return"[object Promise]";case f:return"[object Set]";case p:return"[object WeakMap]"}return t}),e.exports=g},function(e,t,n){var r=n(20);e.exports=function(e){return e==e&&!r(e)}},function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},function(e,t,n){var r=n(432);e.exports=function(e){return null==e?"":r(e)}},function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=l(n(447)),i=l(n(453)),o=l(n(461)),s=l(n(464)),a=l(n(89));t.default=function(e,t){var n=(0,c.getStorage)(),l=!(!n||!n[t]),u=l?n[t]:{clear:function(){},get:function(){},remove:function(){},set:function(){}},d=u.clear.bind(u),h=u.get.bind(u),f=u.remove.bind(u),p=u.set.bind(u);return{_driver:e,_support:l,_initStorage:function(){return a.default.resolve()},clear:function(e){var t=this;return(0,s.default)(o.default.mark((function n(){return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:d(),e&&e();case 2:case"end":return t.stop()}}),n,t)})))()},iterate:function(e,t){var n=this;return(0,s.default)(o.default.mark((function r(){var s;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,c.usePromise)(h,null);case 2:s=n.sent,(0,i.default)(s).forEach((function(t,n){return e(s[t],t,n)})),t&&t();case 6:case"end":return n.stop()}}),r,n)})))()},getItem:function(e,t){var n=this;return(0,s.default)(o.default.mark((function r(){var i;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.prev=0,n.next=3,(0,c.usePromise)(h,e);case 3:return i=n.sent,i=void 0===(i="string"==typeof e?i[e]:i)?null:i,t&&t(null,i),n.abrupt("return",i);case 10:throw n.prev=10,n.t0=n.catch(0),t&&t(n.t0),n.t0;case 14:case"end":return n.stop()}}),r,n,[[0,10]])})))()},key:function(e,t){var n=this;return(0,s.default)(o.default.mark((function r(){var s,a;return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,c.usePromise)(h,null);case 2:return s=n.sent,a=(0,i.default)(s)[e],t&&t(a),n.abrupt("return",a);case 6:case"end":return n.stop()}}),r,n)})))()},keys:function(e){var t=this;return(0,s.default)(o.default.mark((function n(){var r,s;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.usePromise)(h,null);case 2:return r=t.sent,s=(0,i.default)(r),e&&e(s),t.abrupt("return",s);case 6:case"end":return t.stop()}}),n,t)})))()},length:function(e){var t=this;return(0,s.default)(o.default.mark((function n(){var r,s;return o.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,c.usePromise)(h,null);case 2:return r=t.sent,s=(0,i.default)(r).length,e&&e(s),t.abrupt("return",s);case 6:case"end":return t.stop()}}),n,t)})))()},removeItem:function(e,t){var n=this;return(0,s.default)(o.default.mark((function r(){return o.default.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,c.usePromise)(f,e);case 2:t&&t();case 3:case"end":return n.stop()}}),r,n)})))()},setItem:function(e,t,n){var i=this;return(0,s.default)(o.default.mark((function s(){return o.default.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,(0,c.usePromise)(p,(0,r.default)({},e,t));case 2:n&&n();case 3:case"end":return i.stop()}}),s,i)})))()}}};var c=n(492);function l(e){return e&&e.__esModule?e:{default:e}}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var r=n(84);e.exports=function(e){return Object(r(e))}},function(e,t,n){var r=n(456),i=n(146);e.exports=Object.keys||function(e){return r(e,i)}},function(e,t,n){var r=n(86),i=Math.min;e.exports=function(e){return e>0?i(r(e),9007199254740991):0}},function(e,t,n){var r=n(19),i=n(13),o=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(e.exports=function(e,t){return o[e]||(o[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(88)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t,n){"use strict";var r=n(88),i=n(30),o=n(469),s=n(31),a=n(42),c=n(470),l=n(90),u=n(473),d=n(17)("iterator"),h=!([].keys&&"next"in[].keys()),f=function(){return this};e.exports=function(e,t,n,p,g,m,v){c(n,t,p);var _,b,y,w=function(e){if(!h&&e in A)return A[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},S=t+" Iterator",x="values"==g,E=!1,A=e.prototype,C=A[d]||A["@@iterator"]||g&&A[g],j=C||w(g),T=g?x?w("entries"):j:void 0,O="Array"==t&&A.entries||C;if(O&&(y=u(O.call(new e)))!==Object.prototype&&y.next&&(l(y,S,!0),r||"function"==typeof y[d]||s(y,d,f)),x&&C&&"values"!==C.name&&(E=!0,j=function(){return C.call(this)}),r&&!v||!h&&!E&&A[d]||s(A,d,j),a[t]=j,a[S]=f,g)if(_={values:x?j:w("values"),keys:m?j:w("keys"),entries:T},v)for(b in _)b in A||o(A,b,_[b]);else i(i.P+i.F*(h||E),t,_);return _}},function(e,t,n){var r=n(13).document;e.exports=r&&r.documentElement},function(e,t,n){var r=n(61),i=n(17)("toStringTag"),o="Arguments"==r(function(){return arguments}());e.exports=function(e){var t,n,s;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),i))?n:o?r(t):"Object"==(s=r(t))&&"function"==typeof t.callee?"Arguments":s}},function(e,t,n){var r=n(27),i=n(59),o=n(17)("species");e.exports=function(e,t){var n,s=r(e).constructor;return void 0===s||null==(n=r(s)[o])?t:i(n)}},function(e,t,n){var r,i,o,s=n(58),a=n(484),c=n(148),l=n(83),u=n(13),d=u.process,h=u.setImmediate,f=u.clearImmediate,p=u.MessageChannel,g=u.Dispatch,m=0,v={},_=function(){var e=+this;if(v.hasOwnProperty(e)){var t=v[e];delete v[e],t()}},b=function(e){_.call(e.data)};h&&f||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return v[++m]=function(){a("function"==typeof e?e:Function(e),t)},r(m),m},f=function(e){delete v[e]},"process"==n(61)(d)?r=function(e){d.nextTick(s(_,e,1))}:g&&g.now?r=function(e){g.now(s(_,e,1))}:p?(o=(i=new p).port2,i.port1.onmessage=b,r=s(o.postMessage,o,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(r=function(e){u.postMessage(e+"","*")},u.addEventListener("message",b,!1)):r="onreadystatechange"in l("script")?function(e){c.appendChild(l("script")).onreadystatechange=function(){c.removeChild(this),_.call(e)}}:function(e){setTimeout(s(_,e,1),0)}),e.exports={set:h,clear:f}},function(e,t){e.exports=function(e){try{return{e:!1,v:e()}}catch(e){return{e:!0,v:e}}}},function(e,t,n){var r=n(27),i=n(41),o=n(91);e.exports=function(e,t){if(r(e),i(t)&&t.constructor===e)return t;var n=o.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var r=n(15),i=n(0);i.e.Request=class{constructor(e,t,n,r){this.id=++i.e._requestId,this.xmlData=e,this.data=i.e.serialize(e),this.origFunc=t,this.func=t,this.rid=n,this.date=NaN,this.sends=r||0,this.abort=!1,this.dead=null,this.age=function(){if(!this.date)return 0;return(new Date-this.date)/1e3},this.timeDead=function(){if(!this.dead)return 0;return(new Date-this.dead)/1e3},this.xhr=this._newXHR()}getResponse(){let e=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){if(e=this.xhr.responseXML.documentElement,"parsererror"===e.tagName)throw i.e.error("invalid response received"),i.e.error("responseText: "+this.xhr.responseText),i.e.error("responseXML: "+i.e.serialize(this.xhr.responseXML)),new Error("parsererror")}else if(this.xhr.responseText){if(i.e.debug("Got responseText but no responseXML; attempting to parse it with DOMParser..."),e=(new r.a).parseFromString(this.xhr.responseText,"application/xml").documentElement,!e)throw new Error("Parsing produced null node");if(e.querySelector("parsererror")){i.e.error("invalid response received: "+e.querySelector("parsererror").textContent),i.e.error("responseText: "+this.xhr.responseText);const t=new Error;throw t.name=i.e.ErrorCondition.BAD_FORMAT,t}}return e}_newXHR(){let e=null;return window.XMLHttpRequest?(e=new XMLHttpRequest,e.overrideMimeType&&e.overrideMimeType("text/xml; charset=utf-8")):window.ActiveXObject&&(e=new ActiveXObject("Microsoft.XMLHTTP")),e.onreadystatechange=this.func.bind(null,this),e}},i.e.Bosh=class e{constructor(e){this._conn=e,this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.hold=1,this.wait=60,this.window=5,this.errors=0,this.inactivity=null,this.lastResponseHeaders=null,this._requests=[]}_buildBody(){const e=Object(i.a)("body",{rid:this.rid++,xmlns:i.e.NS.HTTPBIND});return null!==this.sid&&e.attrs({sid:this.sid}),this._conn.options.keepalive&&this._conn._sessionCachingSupported()&&this._cacheSession(),e}_reset(){this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.errors=0,this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)}_connect(e,t,n){this.wait=e||this.wait,this.hold=t||this.hold,this.errors=0;const r=this._buildBody().attrs({to:this._conn.domain,"xml:lang":"en",wait:this.wait,hold:this.hold,content:"text/xml; charset=utf-8",ver:"1.6","xmpp:version":"1.0","xmlns:xmpp":i.e.NS.BOSH});n&&r.attrs({route:n});const o=this._conn._connect_cb;this._requests.push(new i.e.Request(r.tree(),this._onRequestStateChange.bind(this,o.bind(this._conn)),r.tree().getAttribute("rid"))),this._throttledRequestHandler()}_attach(e,t,n,r,o,s,a){this._conn.jid=e,this.sid=t,this.rid=n,this._conn.connect_callback=r,this._conn.domain=i.e.getDomainFromJid(this._conn.jid),this._conn.authenticated=!0,this._conn.connected=!0,this.wait=o||this.wait,this.hold=s||this.hold,this.window=a||this.window,this._conn._changeConnectStatus(i.e.Status.ATTACHED,null)}_restore(e,t,n,r,o){const s=JSON.parse(window.sessionStorage.getItem("strophe-bosh-session"));if(!(null!=s&&s.rid&&s.sid&&s.jid&&(null==e||i.e.getBareJidFromJid(s.jid)===i.e.getBareJidFromJid(e)||null===i.e.getNodeFromJid(e)&&i.e.getDomainFromJid(s.jid)===e))){const e=new Error("_restore: no restoreable session.");throw e.name="StropheSessionError",e}this._conn.restored=!0,this._attach(s.jid,s.sid,s.rid,t,n,r,o)}_cacheSession(){this._conn.authenticated?this._conn.jid&&this.rid&&this.sid&&window.sessionStorage.setItem("strophe-bosh-session",JSON.stringify({jid:this._conn.jid,rid:this.rid,sid:this.sid})):window.sessionStorage.removeItem("strophe-bosh-session")}_connect_cb(e){const t=e.getAttribute("type");if(null!==t&&"terminate"===t){let t=e.getAttribute("condition");i.e.error("BOSH-Connection failed: "+t);const n=e.getElementsByTagName("conflict");return null!==t?("remote-stream-error"===t&&n.length>0&&(t="conflict"),this._conn._changeConnectStatus(i.e.Status.CONNFAIL,t)):this._conn._changeConnectStatus(i.e.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(t),i.e.Status.CONNFAIL}this.sid||(this.sid=e.getAttribute("sid"));const n=e.getAttribute("requests");n&&(this.window=parseInt(n,10));const r=e.getAttribute("hold");r&&(this.hold=parseInt(r,10));const o=e.getAttribute("wait");o&&(this.wait=parseInt(o,10));const s=e.getAttribute("inactivity");s&&(this.inactivity=parseInt(s,10))}_disconnect(e){this._sendTerminate(e)}_doDisconnect(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)}_emptyQueue(){return 0===this._requests.length}_callProtocolErrorHandlers(t){const n=e._getRequestStatus(t),r=this._conn.protocolErrorHandlers.HTTP[n];r&&r.call(this,n)}_hitError(e){this.errors++,i.e.warn("request errored, status: "+e+", number of errors: "+this.errors),this.errors>4&&this._conn._onDisconnectTimeout()}_no_auth_received(e){i.e.warn("Server did not yet offer a supported authentication mechanism. Sending a blank poll request."),e=e?e.bind(this._conn):this._conn._connect_cb.bind(this._conn);const t=this._buildBody();this._requests.push(new i.e.Request(t.tree(),this._onRequestStateChange.bind(this,e),t.tree().getAttribute("rid"))),this._throttledRequestHandler()}_onDisconnectTimeout(){this._abortAllRequests()}_abortAllRequests(){for(;this._requests.length>0;){const e=this._requests.pop();e.abort=!0,e.xhr.abort(),e.xhr.onreadystatechange=function(){}}}_onIdle(){const e=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===e.length&&!this._conn.disconnecting&&(i.e.debug("no requests during idle cycle, sending blank request"),e.push(null)),!this._conn.paused){if(this._requests.length<2&&e.length>0){const t=this._buildBody();for(let n=0;n<e.length;n++)null!==e[n]&&("restart"===e[n]?t.attrs({to:this._conn.domain,"xml:lang":"en","xmpp:restart":"true","xmlns:xmpp":i.e.NS.BOSH}):t.cnode(e[n]).up());delete this._conn._data,this._conn._data=[],this._requests.push(new i.e.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"))),this._throttledRequestHandler()}if(this._requests.length>0){const e=this._requests[0].age();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(i.e.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),e>Math.floor(i.e.TIMEOUT*this.wait)&&(i.e.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(i.e.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}}}static _getRequestStatus(e,t){let n;if(4===e.xhr.readyState)try{n=e.xhr.status}catch(e){i.e.error("Caught an error while retrieving a request's status, reqStatus: "+n)}return void 0===n&&(n="number"==typeof t?t:0),n}_onRequestStateChange(t,n){if(i.e.debug("request id "+n.id+"."+n.sends+" state changed to "+n.xhr.readyState),n.abort)return void(n.abort=!1);if(4!==n.xhr.readyState)return;const r=e._getRequestStatus(n);if(this.lastResponseHeaders=n.xhr.getAllResponseHeaders(),this._conn.disconnecting&&r>=400)return this._hitError(r),void this._callProtocolErrorHandlers(n);const o=r>0&&r<500,s=n.sends>this._conn.maxRetries;if((o||s)&&(this._removeRequest(n),i.e.debug("request id "+n.id+" should now be removed")),200===r){const e=this._requests[0]===n;(this._requests[1]===n||e&&this._requests.length>0&&this._requests[0].age()>Math.floor(i.e.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),this._conn.nextValidRid(Number(n.rid)+1),i.e.debug("request id "+n.id+"."+n.sends+" got 200"),t(n),this.errors=0}else 0===r||r>=400&&r<600||r>=12e3?(i.e.error("request id "+n.id+"."+n.sends+" error "+r+" happened"),this._hitError(r),this._callProtocolErrorHandlers(n),r>=400&&r<500&&(this._conn._changeConnectStatus(i.e.Status.DISCONNECTING,null),this._conn._doDisconnect())):i.e.error("request id "+n.id+"."+n.sends+" error "+r+" happened");o||s?s&&!this._conn.connected&&this._conn._changeConnectStatus(i.e.Status.CONNFAIL,"giving-up"):this._throttledRequestHandler()}_processRequest(t){let n=this._requests[t];const r=e._getRequestStatus(n,-1);if(n.sends>this._conn.maxRetries)return void this._conn._onDisconnectTimeout();const o=n.age(),s=!isNaN(o)&&o>Math.floor(i.e.TIMEOUT*this.wait),a=null!==n.dead&&n.timeDead()>Math.floor(i.e.SECONDARY_TIMEOUT*this.wait),c=4===n.xhr.readyState&&(r<1||r>=500);if((s||a||c)&&(a&&i.e.error("Request ".concat(this._requests[t].id," timed out (secondary), restarting")),n.abort=!0,n.xhr.abort(),n.xhr.onreadystatechange=function(){},this._requests[t]=new i.e.Request(n.xmlData,n.origFunc,n.rid,n.sends),n=this._requests[t]),0===n.xhr.readyState){i.e.debug("request id "+n.id+"."+n.sends+" posting");try{const e=this._conn.options.contentType||"text/xml; charset=utf-8";n.xhr.open("POST",this._conn.service,!this._conn.options.sync),void 0!==n.xhr.setRequestHeader&&n.xhr.setRequestHeader("Content-Type",e),this._conn.options.withCredentials&&(n.xhr.withCredentials=!0)}catch(e){return i.e.error("XHR open failed: "+e.toString()),this._conn.connected||this._conn._changeConnectStatus(i.e.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}const e=()=>{if(n.date=new Date,this._conn.options.customHeaders){const e=this._conn.options.customHeaders;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.xhr.setRequestHeader(t,e[t])}n.xhr.send(n.data)};if(n.sends>1){const t=1e3*Math.min(Math.floor(i.e.TIMEOUT*this.wait),Math.pow(n.sends,3));setTimeout((function(){e()}),t)}else e();n.sends++,this._conn.xmlOutput!==i.e.Connection.prototype.xmlOutput&&(n.xmlData.nodeName===this.strip&&n.xmlData.childNodes.length?this._conn.xmlOutput(n.xmlData.childNodes[0]):this._conn.xmlOutput(n.xmlData)),this._conn.rawOutput!==i.e.Connection.prototype.rawOutput&&this._conn.rawOutput(n.data)}else i.e.debug("_processRequest: "+(0===t?"first":"second")+" request has readyState of "+n.xhr.readyState)}_removeRequest(e){i.e.debug("removing request");for(let t=this._requests.length-1;t>=0;t--)e===this._requests[t]&&this._requests.splice(t,1);e.xhr.onreadystatechange=function(){},this._throttledRequestHandler()}_restartRequest(e){const t=this._requests[e];null===t.dead&&(t.dead=new Date),this._processRequest(e)}_reqToData(e){try{return e.getResponse()}catch(e){if("parsererror"!==e.message)throw e;this._conn.disconnect("strophe-parsererror")}}_sendTerminate(e){i.e.debug("_sendTerminate was called");const t=this._buildBody().attrs({type:"terminate"});e&&t.cnode(e.tree());const n=new i.e.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"));this._requests.push(n),this._throttledRequestHandler()}_send(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(()=>this._conn._onIdle(),100)}_sendRestart(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)}_throttledRequestHandler(){this._requests?i.e.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):i.e.debug("_throttledRequestHandler called with undefined requests"),this._requests&&0!==this._requests.length&&(this._requests.length>0&&this._processRequest(0),this._requests.length>1&&Math.abs(this._requests[0].rid-this._requests[1].rid)<this.window&&this._processRequest(1))}},i.e.Bosh.prototype.strip=null},function(e,t,n){(function(e,r){var i;/*! https://mths.be/punycode v1.4.0 by @mathias */!function(o){t&&t.nodeType,e&&e.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,c=2147483647,l=/^xn--/,u=/[^\x20-\x7E]/,d=/[\x2E\u3002\uFF0E\uFF61]/g,h={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},f=Math.floor,p=String.fromCharCode;function g(e){throw new RangeError(h[e])}function m(e,t){for(var n=e.length,r=[];n--;)r[n]=t(e[n]);return r}function v(e,t){var n=e.split("@"),r="";return n.length>1&&(r=n[0]+"@",e=n[1]),r+m((e=e.replace(d,".")).split("."),t).join(".")}function _(e){for(var t,n,r=[],i=0,o=e.length;i<o;)(t=e.charCodeAt(i++))>=55296&&t<=56319&&i<o?56320==(64512&(n=e.charCodeAt(i++)))?r.push(((1023&t)<<10)+(1023&n)+65536):(r.push(t),i--):r.push(t);return r}function b(e){return m(e,(function(e){var t="";return e>65535&&(t+=p((e-=65536)>>>10&1023|55296),e=56320|1023&e),t+=p(e)})).join("")}function y(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function w(e,t,n){var r=0;for(e=n?f(e/700):e>>1,e+=f(e/t);e>455;r+=36)e=f(e/35);return f(r+36*e/(e+38))}function S(e){var t,n,r,i,o,s,a,l,u,d,h,p=[],m=e.length,v=0,_=128,y=72;for((n=e.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)e.charCodeAt(r)>=128&&g("not-basic"),p.push(e.charCodeAt(r));for(i=n>0?n+1:0;i<m;){for(o=v,s=1,a=36;i>=m&&g("invalid-input"),((l=(h=e.charCodeAt(i++))-48<10?h-22:h-65<26?h-65:h-97<26?h-97:36)>=36||l>f((c-v)/s))&&g("overflow"),v+=l*s,!(l<(u=a<=y?1:a>=y+26?26:a-y));a+=36)s>f(c/(d=36-u))&&g("overflow"),s*=d;y=w(v-o,t=p.length+1,0==o),f(v/t)>c-_&&g("overflow"),_+=f(v/t),v%=t,p.splice(v++,0,_)}return b(p)}function x(e){var t,n,r,i,o,s,a,l,u,d,h,m,v,b,S,x=[];for(m=(e=_(e)).length,t=128,n=0,o=72,s=0;s<m;++s)(h=e[s])<128&&x.push(p(h));for(r=i=x.length,i&&x.push("-");r<m;){for(a=c,s=0;s<m;++s)(h=e[s])>=t&&h<a&&(a=h);for(a-t>f((c-n)/(v=r+1))&&g("overflow"),n+=(a-t)*v,t=a,s=0;s<m;++s)if((h=e[s])<t&&++n>c&&g("overflow"),h==t){for(l=n,u=36;!(l<(d=u<=o?1:u>=o+26?26:u-o));u+=36)S=l-d,b=36-d,x.push(p(y(d+S%b,0))),l=f(S/b);x.push(p(y(l,0))),o=w(n,v,r==i),n=0,++r}++n,++t}return x.join("")}a={version:"1.3.2",ucs2:{decode:_,encode:b},decode:S,encode:x,toASCII:function(e){return v(e,(function(e){return u.test(e)?"xn--"+x(e):e}))},toUnicode:function(e){return v(e,(function(e){return l.test(e)?S(e.slice(4).toLowerCase()):e}))}},void 0===(i=function(){return a}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(46)(e),n(12))},function(e,t,n){var r,i;
-/*!
- * URI.js - Mutating URLs
- * IPv6 Support
- *
- * Version: 1.19.2
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- *   MIT License http://www.opensource.org/licenses/mit-license
- *
- */!function(o,s){"use strict";e.exports?e.exports=s():void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}(0,(function(e){"use strict";var t=e&&e.IPv6;return{best:function(e){var t,n,r=e.toLowerCase().split(":"),i=r.length,o=8;for(""===r[0]&&""===r[1]&&""===r[2]?(r.shift(),r.shift()):""===r[0]&&""===r[1]?r.shift():""===r[i-1]&&""===r[i-2]&&r.pop(),-1!==r[(i=r.length)-1].indexOf(".")&&(o=7),t=0;t<i&&""!==r[t];t++);if(t<o)for(r.splice(t,1,"0000");r.length<o;)r.splice(t,0,"0000");for(var s=0;s<o;s++){n=r[s].split("");for(var a=0;a<3&&("0"===n[0]&&n.length>1);a++)n.splice(0,1);r[s]=n.join("")}var c=-1,l=0,u=0,d=-1,h=!1;for(s=0;s<o;s++)h?"0"===r[s]?u+=1:(h=!1,u>l&&(c=d,l=u)):"0"===r[s]&&(h=!0,d=s,u=1);u>l&&(c=d,l=u),l>1&&r.splice(c,l,""),i=r.length;var f="";for(""===r[0]&&(f=":"),s=0;s<i&&(f+=r[s],s!==i-1);s++)f+=":";return""===r[i-1]&&(f+=":"),f},noConflict:function(){return e.IPv6===this&&(e.IPv6=t),this}}}))},function(e,t,n){var r,i;
-/*!
- * URI.js - Mutating URLs
- * Second Level Domain (SLD) Support
- *
- * Version: 1.19.2
- *
- * Author: Rodney Rehm
- * Web: http://medialize.github.io/URI.js/
- *
- * Licensed under
- *   MIT License http://www.opensource.org/licenses/mit-license
- *
- */!function(o,s){"use strict";e.exports?e.exports=s():void 0===(i="function"==typeof(r=s)?r.call(t,n,t,e):r)||(e.exports=i)}(0,(function(e){"use strict";var t=e&&e.SecondLevelDomains,n={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ",do:" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ",in:" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch ",com:"ar br cn de eu gb gr hu jpn kr no qc ru sa se uk us uy za ",net:"gb jp se uk ",org:"ae",de:"com "},has:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return!1;var i=n.list[e.slice(t+1)];return!!i&&i.indexOf(" "+e.slice(r+1,t)+" ")>=0},is:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return!1;if(e.lastIndexOf(".",t-1)>=0)return!1;var r=n.list[e.slice(t+1)];return!!r&&r.indexOf(" "+e.slice(0,t)+" ")>=0},get:function(e){var t=e.lastIndexOf(".");if(t<=0||t>=e.length-1)return null;var r=e.lastIndexOf(".",t-1);if(r<=0||r>=t-1)return null;var i=n.list[e.slice(t+1)];return i?i.indexOf(" "+e.slice(r+1,t)+" ")<0?null:e.slice(r+1):null},noConflict:function(){return e.SecondLevelDomains===this&&(e.SecondLevelDomains=t),this}};return n}))},function(e,t,n){"use strict";var r=n(9),i=n(2);i.d.Websocket=class{constructor(e){this._conn=e,this.strip="wrapper";const t=e.service;if(0!==t.indexOf("ws:")&&0!==t.indexOf("wss:")){let n="";"ws"===e.options.protocol&&"https:"!==window.location.protocol?n+="ws":n+="wss",n+="://"+window.location.host,0!==t.indexOf("/")?n+=window.location.pathname+t:n+=t,e.service=n}}_buildStream(){return Object(i.a)("open",{xmlns:i.d.NS.FRAMING,to:this._conn.domain,version:"1.0"})}_checkStreamError(e,t){let n;if(n=e.getElementsByTagNameNS?e.getElementsByTagNameNS(i.d.NS.STREAM,"error"):e.getElementsByTagName("stream:error"),0===n.length)return!1;const r=n[0];let o="",s="";for(let e=0;e<r.childNodes.length;e++){const t=r.childNodes[e];if("urn:ietf:params:xml:ns:xmpp-streams"!==t.getAttribute("xmlns"))break;"text"===t.nodeName?s=t.textContent:o=t.nodeName}let a="WebSocket stream error: ";return a+=o||"unknown",s&&(a+=" - "+s),i.d.error(a),this._conn._changeConnectStatus(t,o),this._conn._doDisconnect(),!0}_reset(){}_connect(){this._closeSocket(),this.socket=new r.b(this._conn.service,"xmpp"),this.socket.onopen=()=>this._onOpen(),this.socket.onerror=e=>this._onError(e),this.socket.onclose=e=>this._onClose(e),this.socket.onmessage=e=>this._onInitialMessage(e)}_connect_cb(e){if(this._checkStreamError(e,i.d.Status.CONNFAIL))return i.d.Status.CONNFAIL}_handleStreamStart(e){let t=!1;const n=e.getAttribute("xmlns");"string"!=typeof n?t="Missing xmlns in <open />":n!==i.d.NS.FRAMING&&(t="Wrong xmlns in <open />: "+n);const r=e.getAttribute("version");return"string"!=typeof r?t="Missing version in <open />":"1.0"!==r&&(t="Wrong version in <open />: "+r),!t||(this._conn._changeConnectStatus(i.d.Status.CONNFAIL,t),this._conn._doDisconnect(),!1)}_onInitialMessage(e){if(0===e.data.indexOf("<open ")||0===e.data.indexOf("<?xml")){const t=e.data.replace(/^(<\?.*?\?>\s*)*/,"");if(""===t)return;const n=(new r.a).parseFromString(t,"text/xml").documentElement;this._conn.xmlInput(n),this._conn.rawInput(e.data),this._handleStreamStart(n)&&this._connect_cb(n)}else if(0===e.data.indexOf("<close ")){const t=(new r.a).parseFromString(e.data,"text/xml").documentElement;this._conn.xmlInput(t),this._conn.rawInput(e.data);const n=t.getAttribute("see-other-uri");if(n){const e=this._conn.service;(e.indexOf("wss:")>=0&&n.indexOf("wss:")>=0||e.indexOf("ws:")>=0)&&(this._conn._changeConnectStatus(i.d.Status.REDIRECT,"Received see-other-uri, resetting connection"),this._conn.reset(),this._conn.service=n,this._connect())}else this._conn._changeConnectStatus(i.d.Status.CONNFAIL,"Received closing stream"),this._conn._doDisconnect()}else{this._replaceMessageHandler();const t=this._streamWrap(e.data),n=(new r.a).parseFromString(t,"text/xml").documentElement;this._conn._connect_cb(n,null,e.data)}}_replaceMessageHandler(){this.socket.onmessage=e=>this._onMessage(e)}_disconnect(e){if(this.socket&&this.socket.readyState!==r.b.CLOSED){e&&this._conn.send(e);const t=Object(i.a)("close",{xmlns:i.d.NS.FRAMING});this._conn.xmlOutput(t.tree());const n=i.d.serialize(t);this._conn.rawOutput(n);try{this.socket.send(n)}catch(e){i.d.warn("Couldn't send <close /> tag.")}}setTimeout(()=>this._conn._doDisconnect,0)}_doDisconnect(){i.d.debug("WebSockets _doDisconnect was called"),this._closeSocket()}_streamWrap(e){return"<wrapper>"+e+"</wrapper>"}_closeSocket(){if(this.socket)try{this.socket.onclose=null,this.socket.onerror=null,this.socket.onmessage=null,this.socket.close()}catch(e){i.d.debug(e.message)}this.socket=null}_emptyQueue(){return!0}_onClose(e){this._conn.connected&&!this._conn.disconnecting?(i.d.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):e&&1006===e.code&&!this._conn.connected&&this.socket?(i.d.error("Websocket closed unexcectedly"),this._conn._changeConnectStatus(i.d.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._conn._doDisconnect()):i.d.debug("Websocket closed")}_no_auth_received(e){i.d.error("Server did not offer a supported authentication mechanism"),this._conn._changeConnectStatus(i.d.Status.CONNFAIL,i.d.ErrorCondition.NO_AUTH_MECH),e&&e.call(this._conn),this._conn._doDisconnect()}_onDisconnectTimeout(){}_abortAllRequests(){}_onError(e){i.d.error("Websocket error "+e),this._conn._changeConnectStatus(i.d.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._disconnect()}_onIdle(){const e=this._conn._data;if(e.length>0&&!this._conn.paused){for(let t=0;t<e.length;t++)if(null!==e[t]){let n;n="restart"===e[t]?this._buildStream().tree():e[t];const r=i.d.serialize(n);this._conn.xmlOutput(n),this._conn.rawOutput(r),this.socket.send(r)}this._conn._data=[]}}_onMessage(e){let t;const n='<close xmlns="urn:ietf:params:xml:ns:xmpp-framing" />';if(e.data===n)return this._conn.rawInput(n),this._conn.xmlInput(e),void(this._conn.disconnecting||this._conn._doDisconnect());if(0===e.data.search("<open ")){if(t=(new r.a).parseFromString(e.data,"text/xml").documentElement,!this._handleStreamStart(t))return}else{const n=this._streamWrap(e.data);t=(new r.a).parseFromString(n,"text/xml").documentElement}return this._checkStreamError(t,i.d.Status.ERROR)?void 0:this._conn.disconnecting&&"presence"===t.firstChild.nodeName&&"unavailable"===t.firstChild.getAttribute("type")?(this._conn.xmlInput(t),void this._conn.rawInput(i.d.serialize(t))):void this._conn._dataRecv(t,e.data)}_onOpen(){i.d.debug("Websocket open");const e=this._buildStream();this._conn.xmlOutput(e.tree());const t=i.d.serialize(e);this._conn.rawOutput(t),this.socket.send(t)}_reqToData(e){return e}_send(){this._conn.flush()}_sendRestart(){clearTimeout(this._conn._idleTimeout),this._conn._onIdle.bind(this._conn)()}}},function(e,t,n){"use strict";t.a=function(){return!1}},function(e,t,n){"use strict";(function(e){var r=n(6),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i?r.a.Buffer:void 0,a=s?s.allocUnsafe:void 0;t.a=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(69)(e))},function(e,t,n){e.exports=function(){"use strict";return function(e,t,n){var r=t.prototype,i=r.format;n.en.ordinal=function(e){var t=["th","st","nd","rd"],n=e%100;return"["+e+(t[(n-20)%10]||t[n]||t[0])+"]"},r.format=function(e){var t=this,n=this.$locale(),r=this.$utils(),o=(e||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|gggg|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case"Q":return Math.ceil((t.$M+1)/3);case"Do":return n.ordinal(t.$D);case"gggg":return t.weekYear();case"wo":return n.ordinal(t.week(),"W");case"w":case"ww":return r.s(t.week(),"w"===e?1:2,"0");case"k":case"kk":return r.s(String(0===t.$H?24:t.$H),"k"===e?1:2,"0");case"X":return Math.floor(t.$d.getTime()/1e3);case"x":return t.$d.getTime();default:return e}}));return i.bind(this)(o)}}}()},function(e,t,n){var r=n(332),i=n(70);e.exports=function(e,t,n){var o=null==e?0:e.length;return o?(t=n||void 0===t?1:i(t),r(e,t<0?0:t,o)):[]}},function(e,t,n){var r=n(25),i=n(23);e.exports=function(e){return!0===e||!1===e||i(e)&&"[object Boolean]"==r(e)}},function(e,t){e.exports=function(e){return null==e}},function(e,t,n){var r=n(73),i=n(385),o=n(438),s=n(440);e.exports=function(e,t){if(null==e)return{};var n=r(s(e),(function(e){return[e]}));return t=i(t),o(e,n,(function(e,n){return t(e,n[0])}))}},function(e,t,n){var r=n(102),i=n(134),o=n(29),s=n(114),a=n(443);e.exports=function(e){if(null==e)return 0;if(o(e))return s(e)?a(e):e.length;var t=i(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(139),o=(r=i)&&r.__esModule?r:{default:r};t.default=(0,o.default)("webExtensionSyncStorage","sync")},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(139),o=(r=i)&&r.__esModule?r:{default:r};t.default=(0,o.default)("webExtensionLocalStorage","local")},function(e,t,n){"use strict";(function(t){!function(t){var n=/^(b|B)$/,r={iec:{bits:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},i={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]};function o(e){var t,o,s,a,c,l,u,d,h,f,p,g,m,v,_,b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},y=[],w=0,S=void 0,x=void 0;if(isNaN(e))throw new TypeError("Invalid number");return o=!0===b.bits,p=!0===b.unix,t=b.base||2,f=void 0!==b.round?b.round:p?1:2,l=void 0!==b.locale?b.locale:"",u=b.localeOptions||{},g=void 0!==b.separator?b.separator:"",m=void 0!==b.spacer?b.spacer:p?"":" ",_=b.symbols||{},v=2===t&&b.standard||"jedec",h=b.output||"string",a=!0===b.fullform,c=b.fullforms instanceof Array?b.fullforms:[],S=void 0!==b.exponent?b.exponent:-1,s=2<t?1e3:1024,(d=(x=Number(e))<0)&&(x=-x),(-1===S||isNaN(S))&&(S=Math.floor(Math.log(x)/Math.log(s)))<0&&(S=0),8<S&&(S=8),"exponent"===h?S:(0===x?(y[0]=0,y[1]=p?"":r[v][o?"bits":"bytes"][S]):(w=x/(2===t?Math.pow(2,10*S):Math.pow(1e3,S)),o&&s<=(w*=8)&&S<8&&(w/=s,S++),y[0]=Number(w.toFixed(0<S?f:0)),y[0]===s&&S<8&&void 0===b.exponent&&(y[0]=1,S++),y[1]=10===t&&1===S?o?"kb":"kB":r[v][o?"bits":"bytes"][S],p&&(y[1]="jedec"===v?y[1].charAt(0):0<S?y[1].replace(/B$/,""):y[1],n.test(y[1])&&(y[0]=Math.floor(y[0]),y[1]=""))),d&&(y[0]=-y[0]),y[1]=_[y[1]]||y[1],!0===l?y[0]=y[0].toLocaleString():0<l.length?y[0]=y[0].toLocaleString(l,u):0<g.length&&(y[0]=y[0].toString().replace(".",g)),"array"===h?y:(a&&(y[1]=c[S]?c[S]:i[v][S]+(o?"bit":"byte")+(1===y[0]?"":"s")),"object"===h?{value:y[0],symbol:y[1],exponent:S}:y.join(m)))}o.partial=function(e){return function(t){return o(t,e)}},e.exports=o}("undefined"!=typeof window&&window)}).call(this,n(12))},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+="\x3c!-- src/templates/form_captcha.html --\x3e\n",e.label&&(t+="\n<label>\n    "+n(e.label)+"\n</label>\n"),t+='\n<img src="data:'+n(e.type)+";base64,"+n(e.data)+'">\n<input name="'+n(e.name)+'" type="text" ',e.required&&(t+=' required="required" '),t+=" />\n\n\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/form_checkbox.html --\x3e\n<div class="form-group">\n    <input id="'+n(e.id)+'" name="'+n(e.name)+'" type="checkbox" '+n(e.checked)+" ",e.required&&(t+=" required "),t+=' />\n    <label class="form-check-label" for="'+n(e.id)+'">'+n(e.label)+"</label>\n</div>\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t,n="",i=r.escape;Array.prototype.join;return n+='\x3c!-- src/templates/form_select.html --\x3e\n<div class="form-group">\n    <label for="'+i(e.id)+'">'+i(e.label)+'</label>\n    <select class="form-control" id="'+i(e.id)+'" name="'+i(e.name)+'" ',e.multiple&&(n+=' multiple="multiple" '),n+=">"+(null==(t=e.options)?"":t)+"</select>\n</div>\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;return t+='\x3c!-- src/templates/form_textarea.html --\x3e\n<label class="label-ta">'+n(e.label)+'</label>\n<textarea name="'+n(e.name)+'">'+n(e.value)+"</textarea>\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;return t+="\x3c!-- src/templates/form_url.html --\x3e\n<label>\n    "+n(e.label)+'\n    <a class="form-url" target="_blank" rel="noopener" href="'+n(e.value)+'">'+n(e.value)+"</a>\n</label>\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/select_option.html --\x3e\n<option value="'+n(e.value)+'" ',e.selected&&(t+=' selected="selected" '),t+=" >"+n(e.label)+"</option>\n"}},function(e,t,n){"use strict";(function(t){!function(t){var n=/^(b|B)$/,r={iec:{bits:["b","Kib","Mib","Gib","Tib","Pib","Eib","Zib","Yib"],bytes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},jedec:{bits:["b","Kb","Mb","Gb","Tb","Pb","Eb","Zb","Yb"],bytes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}},i={iec:["","kibi","mebi","gibi","tebi","pebi","exbi","zebi","yobi"],jedec:["","kilo","mega","giga","tera","peta","exa","zetta","yotta"]};function o(e){var t,o,s,a,c,l,u,d,h,f,p,g,m,v,_,b=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},y=[],w=0,S=void 0,x=void 0;if(isNaN(e))throw new TypeError("Invalid number");return o=!0===b.bits,p=!0===b.unix,t=b.base||2,f=void 0!==b.round?b.round:p?1:2,l=void 0!==b.locale?b.locale:"",u=b.localeOptions||{},g=void 0!==b.separator?b.separator:"",m=void 0!==b.spacer?b.spacer:p?"":" ",_=b.symbols||{},v=2===t&&b.standard||"jedec",h=b.output||"string",a=!0===b.fullform,c=b.fullforms instanceof Array?b.fullforms:[],S=void 0!==b.exponent?b.exponent:-1,s=2<t?1e3:1024,(d=(x=Number(e))<0)&&(x=-x),(-1===S||isNaN(S))&&(S=Math.floor(Math.log(x)/Math.log(s)))<0&&(S=0),8<S&&(S=8),"exponent"===h?S:(0===x?(y[0]=0,y[1]=p?"":r[v][o?"bits":"bytes"][S]):(w=x/(2===t?Math.pow(2,10*S):Math.pow(1e3,S)),o&&s<=(w*=8)&&S<8&&(w/=s,S++),y[0]=Number(w.toFixed(0<S?f:0)),y[0]===s&&S<8&&void 0===b.exponent&&(y[0]=1,S++),y[1]=10===t&&1===S?o?"kb":"kB":r[v][o?"bits":"bytes"][S],p&&(y[1]="jedec"===v?y[1].charAt(0):0<S?y[1].replace(/B$/,""):y[1],n.test(y[1])&&(y[0]=Math.floor(y[0]),y[1]=""))),d&&(y[0]=-y[0]),y[1]=_[y[1]]||y[1],!0===l?y[0]=y[0].toLocaleString():0<l.length?y[0]=y[0].toLocaleString(l,u):0<g.length&&(y[0]=y[0].toString().replace(".",g)),"array"===h?y:(a&&(y[1]=c[S]?c[S]:i[v][S]+(o?"bit":"byte")+(1===y[0]?"":"s")),"object"===h?{value:y[0],symbol:y[1],exponent:S}:y.join(m)))}o.partial=function(e){return function(t){return o(t,e)}},e.exports=o}("undefined"!=typeof window&&window)}).call(this,n(12))},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="";return t+='\x3c!-- src/plugins/controlbox/templates/toggle.html --\x3e\n<span class="toggle-feedback">'+(0,r.escape)(e.label_toggle)+"</span>\n"}},function(e,t,n){n(8);e.exports=function(e){return'\x3c!-- src/templates/dragresize.html --\x3e\n<div class="dragresize dragresize-top"></div>\n<div class="dragresize dragresize-topleft"></div>\n<div class="dragresize dragresize-left"></div>\n','\x3c!-- src/templates/dragresize.html --\x3e\n<div class="dragresize dragresize-top"></div>\n<div class="dragresize dragresize-topleft"></div>\n<div class="dragresize dragresize-left"></div>\n'}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/room_description.html --\x3e\n\x3c!-- FIXME: check markup in mockup --\x3e\n<div class="room-info">\n<p class="room-info"><strong>'+n(e.label_jid)+"</strong> "+n(e.jid)+'</p>\n<p class="room-info"><strong>'+n(e.label_desc)+"</strong> "+n(e.desc)+'</p>\n<p class="room-info"><strong>'+n(e.label_occ)+"</strong> "+n(e.occ)+'</p>\n<p class="room-info"><strong>'+n(e.label_features)+"</strong>\n    <ul>\n        ",e.passwordprotected&&(t+='\n        <li class="room-info locked">'+n(e.label_requires_auth)+"</li>\n        "),t+="\n        ",e.hidden&&(t+='\n        <li class="room-info">'+n(e.label_hidden)+"</li>\n        "),t+="\n        ",e.membersonly&&(t+='\n        <li class="room-info">'+n(e.label_requires_invite)+"</li>\n        "),t+="\n        ",e.moderated&&(t+='\n        <li class="room-info">'+n(e.label_moderated)+"</li>\n        "),t+="\n        ",e.nonanonymous&&(t+='\n        <li class="room-info">'+n(e.label_non_anon)+"</li>\n        "),t+="\n        ",e.open&&(t+='\n        <li class="room-info">'+n(e.label_open_room)+"</li>\n        "),t+="\n        ",e.persistent&&(t+='\n        <li class="room-info">'+n(e.label_permanent_room)+"</li>\n        "),t+="\n        ",e.publicroom&&(t+='\n        <li class="room-info">'+n(e.label_public)+"</li>\n        "),t+="\n        ",e.semianonymous&&(t+='\n        <li class="room-info">'+n(e.label_semi_anon)+"</li>\n        "),t+="\n        ",e.temporary&&(t+='\n        <li class="room-info">'+n(e.label_temp_room)+"</li>\n        "),t+="\n        ",e.unmoderated&&(t+='\n        <li class="room-info">'+n(e.label_unmoderated)+"</li>\n        "),t+="\n    </ul>\n</p>\n</div>\n"}},function(e,t,n){var r,i;
-/**
- * @license MIT or GPL-2.0
- * @fileOverview Favico animations
- * @author Miroslav Magda, http://blog.ejci.net
- * @source: https://github.com/ejci/favico.js
- * @version 0.3.10
- */i=function(e){"use strict";e=e||{};var t,n,r,i,o,s,a,c,l,u,d,h,f,p,g={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:!1,element:null,dataUrl:!1,win:window};(h={}).ff="undefined"!=typeof InstallTrigger,h.chrome=!!window.chrome,h.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0,h.ie=/*@cc_on!@*/!1,h.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0,h.supported=h.chrome||h.ff||h.opera;var m=[];d=function(){},c=!1;var v={ready:function(){c=!0,v.reset(),d()},reset:function(){c&&(m=[],l=!1,u=!1,s.clearRect(0,0,i,r),s.drawImage(a,0,0,i,r),y.setIcon(o),window.clearTimeout(f),window.clearTimeout(void 0))},start:function(){if(c&&!u&&m.length>0){u=!0;var e=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach((function(e){e in m[0].options&&(t[e]=m[0].options[e])})),x.run(m[0].options,(function(){l=m[0],u=!1,m.length>0&&(m.shift(),v.start())}),!1)};l?x.run(l.options,(function(){e()}),!0):e()}}},_={},b=function(e){return e.n="number"==typeof e.n?Math.abs(0|e.n):e.n,e.x=i*e.x,e.y=r*e.y,e.w=i*e.w,e.h=r*e.h,e.len=(""+e.n).length,e};_.circle=function(e){var n=!1;2===(e=b(e)).len?(e.x=e.x-.4*e.w,e.w=1.4*e.w,n=!0):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w,n=!0),s.clearRect(0,0,i,r),s.drawImage(a,0,0,i,r),s.beginPath(),s.font=t.fontStyle+" "+Math.floor(e.h*(e.n>99?.85:1))+"px "+t.fontFamily,s.textAlign="center",n?(s.moveTo(e.x+e.w/2,e.y),s.lineTo(e.x+e.w-e.h/2,e.y),s.quadraticCurveTo(e.x+e.w,e.y,e.x+e.w,e.y+e.h/2),s.lineTo(e.x+e.w,e.y+e.h-e.h/2),s.quadraticCurveTo(e.x+e.w,e.y+e.h,e.x+e.w-e.h/2,e.y+e.h),s.lineTo(e.x+e.h/2,e.y+e.h),s.quadraticCurveTo(e.x,e.y+e.h,e.x,e.y+e.h-e.h/2),s.lineTo(e.x,e.y+e.h/2),s.quadraticCurveTo(e.x,e.y,e.x+e.h/2,e.y)):s.arc(e.x+e.w/2,e.y+e.h/2,e.h/2,0,2*Math.PI),s.fillStyle="rgba("+t.bgColor.r+","+t.bgColor.g+","+t.bgColor.b+","+e.o+")",s.fill(),s.closePath(),s.beginPath(),s.stroke(),s.fillStyle="rgba("+t.textColor.r+","+t.textColor.g+","+t.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?s.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):s.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),s.closePath()},_.rectangle=function(e){2===(e=b(e)).len?(e.x=e.x-.4*e.w,e.w=1.4*e.w):e.len>=3&&(e.x=e.x-.65*e.w,e.w=1.65*e.w),s.clearRect(0,0,i,r),s.drawImage(a,0,0,i,r),s.beginPath(),s.font=t.fontStyle+" "+Math.floor(e.h*(e.n>99?.9:1))+"px "+t.fontFamily,s.textAlign="center",s.fillStyle="rgba("+t.bgColor.r+","+t.bgColor.g+","+t.bgColor.b+","+e.o+")",s.fillRect(e.x,e.y,e.w,e.h),s.fillStyle="rgba("+t.textColor.r+","+t.textColor.g+","+t.textColor.b+","+e.o+")","number"==typeof e.n&&e.n>999?s.fillText((e.n>9999?9:Math.floor(e.n/1e3))+"k+",Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.2*e.h)):s.fillText(e.n,Math.floor(e.x+e.w/2),Math.floor(e.y+e.h-.15*e.h)),s.closePath()};var y={};function w(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return t+t+n+n+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return!!t&&{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}}function S(e,t){var n,r={};for(n in e)r[n]=e[n];for(n in t)r[n]=t[n];return r}y.getIcons=function(){var e=[];return t.element?e=[t.element]:t.elementId?(e=[p.getElementById(t.elementId)])[0].setAttribute("href",e[0].getAttribute("src")):0===(e=function(){for(var e=[],t=p.getElementsByTagName("head")[0].getElementsByTagName("link"),n=0;n<t.length;n++)/(^|\s)icon(\s|$)/i.test(t[n].getAttribute("rel"))&&e.push(t[n]);return e}()).length&&((e=[p.createElement("link")])[0].setAttribute("rel","icon"),p.getElementsByTagName("head")[0].appendChild(e[0])),e.forEach((function(e){e.setAttribute("type","image/png")})),e},y.setIcon=function(e){var t=e.toDataURL("image/png");y.setIconSrc(t)},y.setIconSrc=function(e){if(t.dataUrl&&t.dataUrl(e),t.element)t.element.setAttribute("href",e),t.element.setAttribute("src",e);else if(t.elementId){var r=p.getElementById(t.elementId);r.setAttribute("href",e),r.setAttribute("src",e)}else if(h.ff||h.opera){var i=n[n.length-1],o=p.createElement("link");n=[o],h.opera&&o.setAttribute("rel","icon"),o.setAttribute("rel","icon"),o.setAttribute("type","image/png"),p.getElementsByTagName("head")[0].appendChild(o),o.setAttribute("href",e),i.parentNode&&i.parentNode.removeChild(i)}else n.forEach((function(t){t.setAttribute("href",e)}))};var x={duration:40,types:{}};return x.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],x.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}],x.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],x.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}],x.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}],x.run=function(e,n,r,i){var s=x.types[p.hidden||p.msHidden||p.webkitHidden||p.mozHidden?"none":t.animation];i=!0===r?void 0!==i?i:s.length-1:void 0!==i?i:0,n=n||function(){},i<s.length&&i>=0?(_[t.type](S(e,s[i])),f=setTimeout((function(){r?i-=1:i+=1,x.run(e,n,r,i)}),x.duration),y.setIcon(o)):n()},function(){(t=S(g,e)).bgColor=w(t.bgColor),t.textColor=w(t.textColor),t.position=t.position.toLowerCase(),t.animation=x.types[""+t.animation]?t.animation:g.animation,p=t.win.document;var c=t.position.indexOf("up")>-1,l=t.position.indexOf("left")>-1;if(c||l)for(var u in x.types)for(var d=0;d<x.types[u].length;d++){var h=x.types[u][d];c&&(h.y<.6?h.y=h.y-.4:h.y=h.y-2*h.y+(1-h.w)),l&&(h.x<.6?h.x=h.x-.4:h.x=h.x-2*h.x+(1-h.h)),x.types[u][d]=h}t.type=_[""+t.type]?t.type:g.type,n=y.getIcons(),o=document.createElement("canvas"),a=document.createElement("img");var f=n[n.length-1];f.hasAttribute("href")?(a.setAttribute("crossOrigin","anonymous"),a.onload=function(){r=a.height>0?a.height:32,i=a.width>0?a.width:32,o.height=r,o.width=i,s=o.getContext("2d"),v.ready()},a.setAttribute("src",f.getAttribute("href"))):(r=32,i=32,a.height=r,a.width=i,o.height=r,o.width=i,s=o.getContext("2d"),v.ready())}(),{badge:function(e,t){t=("string"==typeof t?{animation:t}:t)||{},d=function(){try{if("number"==typeof e?e>0:""!==e){var n={type:"badge",options:{n:e}};if("animation"in t&&x.types[""+t.animation]&&(n.options.animation=""+t.animation),"type"in t&&_[""+t.type]&&(n.options.type=""+t.type),["bgColor","textColor"].forEach((function(e){e in t&&(n.options[e]=w(t[e]))})),["fontStyle","fontFamily"].forEach((function(e){e in t&&(n.options[e]=t[e])})),m.push(n),m.length>100)throw new Error("Too many badges requests in queue.");v.start()}else v.reset()}catch(e){throw new Error("Error setting badge. Message: "+e.message)}},c&&d()},setOpt:function(e,n){var r=e;null==n&&"[object Object]"==Object.prototype.toString.call(e)||((r={})[e]=n);for(var i=Object.keys(r),o=0;o<i.length;o++)"bgColor"==i[o]||"textColor"==i[o]?t[i[o]]=w(r[i[o]]):t[i[o]]=r[i[o]];m.push(l),v.start()},reset:v.reset,browser:{supported:h.supported}}},void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r)},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/register_panel.html --\x3e\n<div>\n    <form id="converse-register" class="converse-form">\n        <legend class="col-form-label">'+n(e.__("Create your account"))+'</legend>\n\n        <div class="form-group">\n            <label>'+n(e.__("Please enter the XMPP provider to register with:"))+'</label>\n            <div class="form-errors hidden"></div>\n\n            ',e.default_domain?t+="\n                "+n(e.default_domain)+"\n            </div>\n            ":t+='\n                <input class="form-control" required="required" type="text" name="domain" placeholder="'+n(e.domain_placeholder)+'"/>\n                <p class="form-text text-muted">'+n(e.help_providers)+' <a href="'+n(e.href_providers)+'" class="url" target="_blank" rel="noopener">'+n(e.help_providers_link)+'</a>.</p>\n            </div>\n            <fieldset class="buttons">\n                <input class="btn btn-primary" type="submit" value="'+n(e.label_register)+'"/>\n                <div class="switch-form">\n                    <p>'+n(e.__("Already have a chat account?"))+'</p>\n                    <p><a class="login-here toggle-register-login" href="#converse/login">'+n(e.__("Log in here"))+"</a></p>\n                </div>\n            </fieldset>\n            ",t+="\n        \x3c!--</div>--\x3e\n    </form>\n</div>\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/registration_form.html --\x3e\n<legend class="col-form-label">'+n(e.__("Account Registration:"))+" "+n(e.domain)+'</legend>\n<p class="title">'+n(e.title)+'</p>\n<p class="form-help instructions">'+n(e.instructions)+'</p>\n<div class="form-errors hidden"></div>\n\n<fieldset class="buttons">\n    <input type="submit" class="btn btn-primary" value="'+n(e.__("Register"))+'"/>\n    ',e.registration_domain||(t+='\n        <input type="button" class="btn btn-secondary button-cancel" value="'+n(e.__("Choose a different provider"))+'"/>\n    '),t+='\n    <div class="switch-form">\n        <p>'+n(e.__("Already have a chat account?"))+'</p>\n        <p><a class="login-here toggle-register-login" href="#converse/login">'+n(e.__("Log in here"))+"</a></p>\n    </div>\n</fieldset>\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/registration_request.html --\x3e\n<span class="spinner login-submit fa fa-spinner"></span>\n<p class="info">'+n(e.__("Hold tight, we're fetching the registration form…"))+"</p>\n",e.cancel&&(t+='\n    <button class="btn btn-secondary button-cancel hor_centered">'+n(e.__("Cancel"))+"</button>\n"),t+="\n"}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/group_header.html --\x3e\n<a href="#" class="list-toggle group-toggle controlbox-padded" title="'+n(e.desc_group_toggle)+'">\n    <span class="fa ',e.toggle_state===e._converse.OPENED?t+=" fa-caret-down ":t+=" fa-caret-right ",t+='">\n    </span> '+n(e.label_group)+'</a>\n<ul class="items-list roster-group-contacts ',e.toggle_state===e._converse.CLOSED&&(t+=" collapsed "),t+='"></ul>\n'}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+="\x3c!-- src/templates/pending_contact.html --\x3e\n",e.allow_chat_pending_contacts&&(t+='\n<a class="list-item-link open-chat w-100" href="#">\n'),t+='\n<span class="pending-contact-name" title="JID: '+n(e.jid)+'">'+n(e.display_name)+"</span> \n",e.allow_chat_pending_contacts&&(t+="</a>"),t+='\n<a class="list-item-action remove-xmpp-contact far fa-trash-alt" title="'+n(e.desc_remove)+'" href="#"></a>\n'}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+="\x3c!-- src/templates/requesting_contact.html --\x3e\n",e.allow_chat_pending_contacts&&(t+='\n<a class="open-chat w-100"href="#">\n'),t+='\n<span class="req-contact-name w-100" title="JID: '+n(e.jid)+'">'+n(e.display_name)+"</span>\n",e.allow_chat_pending_contacts&&(t+="\n</a>\n"),t+='\n<a class="accept-xmpp-request list-item-action list-item-action--visible fa fa-check"\n   aria-label="'+n(e.desc_accept)+'" title="'+n(e.desc_accept)+'" href="#"></a>\n<a class="decline-xmpp-request list-item-action list-item-action--visible  fa fa-times"\n   aria-label="'+n(e.desc_decline)+'" title="'+n(e.desc_decline)+'" href="#"></a>\n'}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/roster.html --\x3e\n<div class="d-flex controlbox-padded">\n    <span class="w-100 controlbox-heading controlbox-heading--contacts">'+n(e.heading_contacts)+'</span>\n    <a class="controlbox-heading__btn sync-contacts fa fa-sync" title="'+n(e.title_sync_contacts)+'"></a>\n    ',e.allow_contact_requests&&(t+='\n        <a class="controlbox-heading__btn add-contact fa fa-user-plus"\n           title="'+n(e.title_add_contact)+'"\n           data-toggle="modal"\n           data-target="#add-contact-modal"></a>\n    '),t+='\n</div>\n\n<form class="roster-filter-form"></form>\n\n<div class="list-container roster-contacts"></div>\n'}},function(e,t,n){var r={escape:n(8)};e.exports=function(e){var t="",n=r.escape;Array.prototype.join;return t+='\x3c!-- src/templates/roster_item.html --\x3e\n<a class="list-item-link cbox-list-item open-chat w-100 ',e.num_unread&&(t+=" unread-msgs "),t+='"\n   title="'+n(e.desc_chat)+'" href="#">\n\n    <canvas class="avatar" height="30" width="30"></canvas>\n    <span class="'+n(e.status_icon)+'" title="'+n(e.desc_status)+'"></span>\n    ',e.num_unread&&(t+=' <span class="msgs-indicator">'+n(e.num_unread)+"</span> "),t+='\n    <span class="contact-name contact-name--'+n(e.show)+" ",e.num_unread&&(t+=" unread-msgs "),t+='">'+n(e.display_name)+"</span>\n</a>\n",e.allow_contact_removal&&(t+='\n<a class="list-item-action remove-xmpp-contact far fa-trash-alt" title="'+n(e.desc_remove)+'" href="#"></a>\n'),t+="\n"}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);const r={},i={plugins:{add(e,t){if(void 0!==r[e])throw new TypeError('Error: plugin with name "'.concat(e,'" has already been ')+"registered!");r[e]=t}},initialize(e={}){i.load(e).initialize(e)},load:(e={})=>(e.assets_path&&(n.p=e.assets_path),n(506),Object.keys(r).forEach(e=>i.plugins.add(e,r[e])),i)};window.converse=i,t.default=i},function(e,t){function n(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};const n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}"function"!=typeof window.CustomEvent&&(n.prototype=window.Event.prototype,window.CustomEvent=n),String.prototype.includes||(String.prototype.includes=function(e,t){"use strict";return"number"!=typeof t&&(t=0),!(t+e.length>this.length)&&-1!==this.indexOf(e,t)}),String.prototype.endsWith||(String.prototype.endsWith=function(e,t){const n=this.toString();(void 0===t||t>n.length)&&(t=n.length),t-=e.length;const r=n.indexOf(e,t);return-1!==r&&r===t}),String.prototype.startsWith||(String.prototype.startsWith=function(e,t){return t=t||0,this.substr(t,e.length)===e}),String.prototype.splitOnce||(String.prototype.splitOnce=function(e){const t=this.split(e);return[t.shift(),t.join(e)]}),String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")})},function(e,t,n){"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(e,t){var n=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+n.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),i=new RegExp("^"+n.source+r.source+"*(?::"+n.source+r.source+"*)?$");function o(){}function s(e,t){return t.lineNumber=e.lineNumber,t.columnNumber=e.columnNumber,t}function a(e,t,n,r,i,o){for(var s,a=++t,c=0;;){var l=e.charAt(a);switch(l){case"=":if(1===c)s=e.slice(t,a),c=3;else{if(2!==c)throw new Error("attribute equal must after attrName");c=3}break;case"'":case'"':if(3===c||1===c){if(1===c&&(o.warning('attribute value must after "="'),s=e.slice(t,a)),t=a+1,!((a=e.indexOf(l,t))>0))throw new Error("attribute value no end '"+l+"' match");u=e.slice(t,a).replace(/&#?\w+;/g,i),n.add(s,u,t-1),c=5}else{if(4!=c)throw new Error('attribute value must after "="');u=e.slice(t,a).replace(/&#?\w+;/g,i),n.add(s,u,t),o.warning('attribute "'+s+'" missed start quot('+l+")!!"),t=a+1,c=5}break;case"/":switch(c){case 0:n.setTagName(e.slice(t,a));case 5:case 6:case 7:c=7,n.closed=!0;case 4:case 1:case 2:break;default:throw new Error("attribute invalid close char('/')")}break;case"":return o.error("unexpected end of input"),0==c&&n.setTagName(e.slice(t,a)),a;case">":switch(c){case 0:n.setTagName(e.slice(t,a));case 5:case 6:case 7:break;case 4:case 1:"/"===(u=e.slice(t,a)).slice(-1)&&(n.closed=!0,u=u.slice(0,-1));case 2:2===c&&(u=s),4==c?(o.warning('attribute "'+u+'" missed quot(")!!'),n.add(s,u.replace(/&#?\w+;/g,i),t)):("http://www.w3.org/1999/xhtml"===r[""]&&u.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),n.add(u,u,t));break;case 3:throw new Error("attribute value missed!!")}return a;case"€":l=" ";default:if(l<=" ")switch(c){case 0:n.setTagName(e.slice(t,a)),c=6;break;case 1:s=e.slice(t,a),c=2;break;case 4:var u=e.slice(t,a).replace(/&#?\w+;/g,i);o.warning('attribute "'+u+'" missed quot(")!!'),n.add(s,u,t);case 5:c=6}else switch(c){case 2:n.tagName;"http://www.w3.org/1999/xhtml"===r[""]&&s.match(/^(?:disabled|checked|selected)$/i)||o.warning('attribute "'+s+'" missed value!! "'+s+'" instead2!!'),n.add(s,s,t),t=a,c=1;break;case 5:o.warning('attribute space is required"'+s+'"!!');case 6:c=1,t=a;break;case 3:c=4,t=a;break;case 7:throw new Error("elements closed character '/' and '>' must be connected to")}}a++}}function c(e,t,n){for(var r=e.tagName,i=null,o=e.length;o--;){var s=e[o],a=s.qName,c=s.value;if((f=a.indexOf(":"))>0)var l=s.prefix=a.slice(0,f),u=a.slice(f+1),h="xmlns"===l&&u;else u=a,l=null,h="xmlns"===a&&"";s.localName=u,!1!==h&&(null==i&&(i={},d(n,n={})),n[h]=i[h]=c,s.uri="http://www.w3.org/2000/xmlns/",t.startPrefixMapping(h,c))}for(o=e.length;o--;){(l=(s=e[o]).prefix)&&("xml"===l&&(s.uri="http://www.w3.org/XML/1998/namespace"),"xmlns"!==l&&(s.uri=n[l||""]))}var f;(f=r.indexOf(":"))>0?(l=e.prefix=r.slice(0,f),u=e.localName=r.slice(f+1)):(l=null,u=e.localName=r);var p=e.uri=n[l||""];if(t.startElement(p,u,r,e),!e.closed)return e.currentNSMap=n,e.localNSMap=i,!0;if(t.endElement(p,u,r),i)for(l in i)t.endPrefixMapping(l)}function l(e,t,n,r,i){if(/^(?:script|textarea)$/i.test(n)){var o=e.indexOf("</"+n+">",t),s=e.substring(t+1,o);if(/[&<]/.test(s))return/^script$/i.test(n)?(i.characters(s,0,s.length),o):(s=s.replace(/&#?\w+;/g,r),i.characters(s,0,s.length),o)}return t+1}function u(e,t,n,r){var i=r[n];return null==i&&((i=e.lastIndexOf("</"+n+">"))<t&&(i=e.lastIndexOf("</"+n)),r[n]=i),i<t}function d(e,t){for(var n in e)t[n]=e[n]}function h(e,t,n,r){switch(e.charAt(t+2)){case"-":return"-"===e.charAt(t+3)?(i=e.indexOf("--\x3e",t+4))>t?(n.comment(e,t+4,i-t-4),i+3):(r.error("Unclosed comment"),-1):-1;default:if("CDATA["==e.substr(t+3,6)){var i=e.indexOf("]]>",t+9);return n.startCDATA(),n.characters(e,t+9,i-t-9),n.endCDATA(),i+3}var o=function(e,t){var n,r=[],i=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;i.lastIndex=t,i.exec(e);for(;n=i.exec(e);)if(r.push(n),n[1])return r}(e,t),s=o.length;if(s>1&&/!doctype/i.test(o[0][0])){var a=o[1][0],c=s>3&&/^public$/i.test(o[2][0])&&o[3][0],l=s>4&&o[4][0],u=o[s-1];return n.startDTD(a,c&&c.replace(/^(['"])(.*?)\1$/,"$2"),l&&l.replace(/^(['"])(.*?)\1$/,"$2")),n.endDTD(),u.index+u[0].length}}return-1}function f(e,t,n){var r=e.indexOf("?>",t);if(r){var i=e.substring(t,r).match(/^<\?(\S*)\s*([\s\S]*?)\s*$/);if(i){i[0].length;return n.processingInstruction(i[1],i[2]),r+2}return-1}return-1}function p(e){}function g(e,t){return e.__proto__=t,e}o.prototype={parse:function(e,t,n){var r=this.domBuilder;r.startDocument(),d(t,t={}),function(e,t,n,r,i){function o(e){var t=e.slice(1,-1);return t in n?n[t]:"#"===t.charAt(0)?function(e){if(e>65535){var t=55296+((e-=65536)>>10),n=56320+(1023&e);return String.fromCharCode(t,n)}return String.fromCharCode(e)}(parseInt(t.substr(1).replace("x","0x"))):(i.error("entity not found:"+e),e)}function d(t){if(t>S){var n=e.substring(S,t).replace(/&#?\w+;/g,o);b&&g(S),r.characters(n,0,t-S),S=t}}function g(t,n){for(;t>=v&&(n=_.exec(e));)m=n.index,v=m+n[0].length,b.lineNumber++;b.columnNumber=t-m+1}var m=0,v=0,_=/.*(?:\r\n?|\n)|.*$/g,b=r.locator,y=[{currentNSMap:t}],w={},S=0;for(;;){try{var x=e.indexOf("<",S);if(x<0){if(!e.substr(S).match(/^\s*$/)){var E=r.doc,A=E.createTextNode(e.substr(S));E.appendChild(A),r.currentElement=A}return}switch(x>S&&d(x),e.charAt(x+1)){case"/":var C=e.indexOf(">",x+3),j=e.substring(x+2,C),T=y.pop();C<0?(j=e.substring(x+2).replace(/[\s<].*/,""),i.error("end tag name: "+j+" is not complete:"+T.tagName),C=x+1+j.length):j.match(/\s</)&&(j=j.replace(/[\s<].*/,""),i.error("end tag name: "+j+" maybe not complete"),C=x+1+j.length);var O=T.localNSMap,k=T.tagName==j;if(k||T.tagName&&T.tagName.toLowerCase()==j.toLowerCase()){if(r.endElement(T.uri,T.localName,j),O)for(var N in O)r.endPrefixMapping(N);k||i.fatalError("end tag name: "+j+" is not match the current start tagName:"+T.tagName)}else y.push(T);C++;break;case"?":b&&g(x),C=f(e,x,r);break;case"!":b&&g(x),C=h(e,x,r,i);break;default:b&&g(x);var I=new p,M=y[y.length-1].currentNSMap,R=(C=a(e,x,I,M,o,i),I.length);if(!I.closed&&u(e,C,I.tagName,w)&&(I.closed=!0,n.nbsp||i.warning("unclosed xml attribute")),b&&R){for(var D=s(b,{}),P=0;P<R;P++){var L=I[P];g(L.offset),L.locator=s(b,{})}r.locator=D,c(I,r,M)&&y.push(I),r.locator=b}else c(I,r,M)&&y.push(I);"http://www.w3.org/1999/xhtml"!==I.uri||I.closed?C++:C=l(e,C,I.tagName,o,r)}}catch(e){i.error("element parse error: "+e),C=-1}C>S?S=C:d(Math.max(x,S)+1)}}(e,t,n,r,this.errorHandler),r.endDocument()}},p.prototype={setTagName:function(e){if(!i.test(e))throw new Error("invalid tagName:"+e);this.tagName=e},add:function(e,t,n){if(!i.test(e))throw new Error("invalid attribute:"+e);this[this.length++]={qName:e,value:t,offset:n}},length:0,getLocalName:function(e){return this[e].localName},getLocator:function(e){return this[e].locator},getQName:function(e){return this[e].qName},getURI:function(e){return this[e].uri},getValue:function(e){return this[e].value}},g({},g.prototype)instanceof g||(g=function(e,t){function n(){}for(t in n.prototype=t,n=new n,e)n[t]=e[t];return n}),t.XMLReader=o},function(e,t,n){"use strict";function r(e){const t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(e);return t<0?void 0:t}e.exports=function(e){if((e=(e=""+e).replace(/[ \t\n\f\r]/g,"")).length%4==0&&(e=e.replace(/==?$/,"")),e.length%4==1||/[^+/0-9A-Za-z]/.test(e))return null;let t="",n=0,i=0;for(let o=0;o<e.length;o++)n<<=6,n|=r(e[o]),i+=6,24===i&&(t+=String.fromCharCode((16711680&n)>>16),t+=String.fromCharCode((65280&n)>>8),t+=String.fromCharCode(255&n),n=i=0);return 12===i?(n>>=4,t+=String.fromCharCode(n)):18===i&&(n>>=2,t+=String.fromCharCode((65280&n)>>8),t+=String.fromCharCode(255&n)),t}},function(e,t,n){"use strict";function r(e){if(e>=0&&e<64)return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[e]}e.exports=function(e){let t;for(e=""+e,t=0;t<e.length;t++)if(e.charCodeAt(t)>255)return null;let n="";for(t=0;t<e.length;t+=3){const i=[void 0,void 0,void 0,void 0];i[0]=e.charCodeAt(t)>>2,i[1]=(3&e.charCodeAt(t))<<4,e.length>t+1&&(i[1]|=e.charCodeAt(t+1)>>4,i[2]=(15&e.charCodeAt(t+1))<<2),e.length>t+2&&(i[2]|=e.charCodeAt(t+2)>>6,i[3]=63&e.charCodeAt(t+2));for(let e=0;e<i.length;e++)void 0===i[e]?n+="=":n+=r(i[e])}return n}},function(e,t){e.exports=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o}},function(e,t,n){var r=n(334);e.exports=function(e){return e?(e=r(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},function(e,t,n){var r=n(20),i=n(48),o=/^\s+|\s+$/g,s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(o,"");var n=a.test(e);return n||c.test(e)?l(e.slice(2),n?2:8):s.test(e)?NaN:+e}},function(e,t,n){var r=n(49),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},function(e,t){var n=Object.prototype.toString;e.exports=function(e){return n.call(e)}},function(e,t,n){var r=n(97),i=n(338),o=n(350),s=n(16);e.exports=function(e,t){return(s(e)?r:i)(e,o(t))}},function(e,t,n){var r=n(339),i=n(349)(r);e.exports=i},function(e,t,n){var r=n(340),i=n(33);e.exports=function(e,t){return e&&r(e,t,i)}},function(e,t,n){var r=n(341)();e.exports=r},function(e,t){e.exports=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}}},function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},function(e,t,n){var r=n(25),i=n(23);e.exports=function(e){return i(e)&&"[object Arguments]"==r(e)}},function(e,t){e.exports=function(){return!1}},function(e,t,n){var r=n(25),i=n(71),o=n(23),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return o(e)&&i(e.length)&&!!s[r(e)]}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(96),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,n(46)(e))},function(e,t,n){var r=n(104)(Object.keys,Object);e.exports=r},function(e,t,n){var r=n(29);e.exports=function(e,t){return function(n,i){if(null==n)return n;if(!r(n))return e(n,i);for(var o=n.length,s=t?o:-1,a=Object(n);(t?s--:++s<o)&&!1!==i(a[s],s,a););return n}}},function(e,t,n){var r=n(38);e.exports=function(e){return"function"==typeof e?e:r}},function(e,t,n){var r=n(352),i=n(357),o=n(112),s=i((function(e,t){r(t,o(t),e)}));e.exports=s},function(e,t,n){var r=n(105),i=n(106);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,c=t.length;++a<c;){var l=t[a],u=o?o(n[l],e[l],l,n,e):void 0;void 0===u&&(u=e[l]),s?i(n,l,u):r(n,l,u)}return n}},function(e,t,n){var r=n(62),i=n(354),o=n(20),s=n(108),a=/^\[object .+?Constructor\]$/,c=Function.prototype,l=Object.prototype,u=c.toString,d=l.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(r(e)?h:a).test(s(e))}},function(e,t,n){var r,i=n(355),o=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!o&&o in e}},function(e,t,n){var r=n(11)["__core-js_shared__"];e.exports=r},function(e,t){e.exports=function(e,t){return null==e?void 0:e[t]}},function(e,t,n){var r=n(109),i=n(361);e.exports=function(e){return r((function(t,n){var r=-1,o=n.length,s=o>1?n[o-1]:void 0,a=o>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(o--,s):void 0,a&&i(n[0],n[1],a)&&(s=o<3?void 0:s,o=1),t=Object(t);++r<o;){var c=n[r];c&&e(t,c,r,s)}return t}))}},function(e,t,n){var r=n(72),i=Math.max;e.exports=function(e,t,n){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,s=-1,a=i(o.length-t,0),c=Array(a);++s<a;)c[s]=o[t+s];s=-1;for(var l=Array(t+1);++s<t;)l[s]=o[s];return l[t]=n(c),r(e,this,l)}}},function(e,t,n){var r=n(360),i=n(107),o=n(38),s=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:o;e.exports=s},function(e,t){e.exports=function(e){return function(){return e}}},function(e,t,n){var r=n(50),i=n(29),o=n(37),s=n(20);e.exports=function(e,t,n){if(!s(n))return!1;var a=typeof t;return!!("number"==a?i(n)&&o(t,n.length):"string"==a&&t in n)&&r(n[t],e)}},function(e,t,n){var r=n(20),i=n(103),o=n(363),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=i(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},function(e,t){e.exports=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},function(e,t){e.exports=function(e){return e!=e}},function(e,t){e.exports=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1}},function(e,t,n){var r=n(73);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},function(e,t,n){var r=n(115),i=n(369),o=n(370),s=n(118),a=n(383),c=n(122),l=n(384),u=n(125),d=n(126),h=n(70),f=Math.max;e.exports=function(e,t,n,p,g,m,v,_){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var y=p?p.length:0;if(y||(t&=-97,p=g=void 0),v=void 0===v?v:f(h(v),0),_=void 0===_?_:h(_),y-=g?g.length:0,64&t){var w=p,S=g;p=g=void 0}var x=b?void 0:c(e),E=[e,t,n,p,g,w,S,m,v,_];if(x&&l(E,x),e=E[0],t=E[1],n=E[2],p=E[3],g=E[4],!(_=E[9]=void 0===E[9]?b?0:e.length:f(E[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)A=8==t||16==t?o(e,t,_):32!=t&&33!=t||g.length?s.apply(void 0,E):a(e,t,n,p);else var A=i(e,t,n);return d((x?r:u)(A,E),e,t)}},function(e,t,n){var r=n(51),i=n(11);e.exports=function(e,t,n){var o=1&t,s=r(e);return function t(){var r=this&&this!==i&&this instanceof t?s:e;return r.apply(o?n:this,arguments)}}},function(e,t,n){var r=n(72),i=n(51),o=n(118),s=n(121),a=n(77),c=n(52),l=n(11);e.exports=function(e,t,n){var u=i(e);return function i(){for(var d=arguments.length,h=Array(d),f=d,p=a(i);f--;)h[f]=arguments[f];var g=d<3&&h[0]!==p&&h[d-1]!==p?[]:c(h,p);if((d-=g.length)<n)return s(e,t,o,i.placeholder,void 0,h,g,void 0,void 0,n-d);var m=this&&this!==l&&this instanceof i?u:e;return r(m,this,h)}}},function(e,t){e.exports=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}},function(e,t,n){var r=n(75),i=n(122),o=n(374),s=n(376);e.exports=function(e){var t=o(e),n=s[t];if("function"!=typeof n||!(t in r.prototype))return!1;if(e===n)return!0;var a=i(n);return!!a&&e===a[0]}},function(e,t){e.exports=function(){}},function(e,t,n){var r=n(375),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",n=r[t],o=i.call(r,t)?n.length:0;o--;){var s=n[o],a=s.func;if(null==a||a==e)return s.name}return t}},function(e,t){e.exports={}},function(e,t,n){var r=n(75),i=n(123),o=n(76),s=n(16),a=n(23),c=n(377),l=Object.prototype.hasOwnProperty;function u(e){if(a(e)&&!s(e)&&!(e instanceof r)){if(e instanceof i)return e;if(l.call(e,"__wrapped__"))return c(e)}return new i(e)}u.prototype=o.prototype,u.prototype.constructor=u,e.exports=u},function(e,t,n){var r=n(75),i=n(123),o=n(124);e.exports=function(e){if(e instanceof r)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},function(e,t){var n=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var t=e.match(n);return t?t[1].split(r):[]}},function(e,t){var n=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,t){var r=t.length;if(!r)return e;var i=r-1;return t[i]=(r>1?"& ":"")+t[i],t=t.join(r>2?", ":" "),e.replace(n,"{\n/* [wrapped with "+t+"] */\n")}},function(e,t,n){var r=n(97),i=n(381),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return r(o,(function(n){var r="_."+n[0];t&n[1]&&!i(e,r)&&e.push(r)})),e.sort()}},function(e,t,n){var r=n(113);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},function(e,t,n){var r=n(124),i=n(37),o=Math.min;e.exports=function(e,t){for(var n=e.length,s=o(t.length,n),a=r(e);s--;){var c=t[s];e[s]=i(c,n)?a[c]:void 0}return e}},function(e,t,n){var r=n(72),i=n(51),o=n(11);e.exports=function(e,t,n,s){var a=1&t,c=i(e);return function t(){for(var i=-1,l=arguments.length,u=-1,d=s.length,h=Array(d+l),f=this&&this!==o&&this instanceof t?c:e;++u<d;)h[u]=s[u];for(;l--;)h[u++]=arguments[++i];return r(f,a?n:this,h)}}},function(e,t,n){var r=n(119),i=n(120),o=n(52),s=Math.min;e.exports=function(e,t){var n=e[1],a=t[1],c=n|a,l=c<131,u=128==a&&8==n||128==a&&256==n&&e[7].length<=t[8]||384==a&&t[7].length<=t[8]&&8==n;if(!l&&!u)return e;1&a&&(e[2]=t[2],c|=1&n?0:4);var d=t[3];if(d){var h=e[3];e[3]=h?r(h,d,t[4]):d,e[4]=h?o(e[3],"__lodash_placeholder__"):t[4]}return(d=t[5])&&(h=e[5],e[5]=h?i(h,d,t[6]):d,e[6]=h?o(e[5],"__lodash_placeholder__"):t[6]),(d=t[7])&&(e[7]=d),128&a&&(e[8]=null==e[8]?t[8]:s(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},function(e,t,n){var r=n(386),i=n(427),o=n(38),s=n(16),a=n(436);e.exports=function(e){return"function"==typeof e?e:null==e?o:"object"==typeof e?s(e)?i(e[0],e[1]):r(e):a(e)}},function(e,t,n){var r=n(387),i=n(426),o=n(136);e.exports=function(e){var t=i(e);return 1==t.length&&t[0][2]?o(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},function(e,t,n){var r=n(127),i=n(128);e.exports=function(e,t,n,o){var s=n.length,a=s,c=!o;if(null==e)return!a;for(e=Object(e);s--;){var l=n[s];if(c&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++s<a;){var u=(l=n[s])[0],d=e[u],h=l[1];if(c&&l[2]){if(void 0===d&&!(u in e))return!1}else{var f=new r;if(o)var p=o(d,h,u,e,t,f);if(!(void 0===p?i(h,d,3,o,f):p))return!1}}return!0}},function(e,t){e.exports=function(){this.__data__=[],this.size=0}},function(e,t,n){var r=n(54),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():i.call(t,n,1),--this.size,!0)}},function(e,t,n){var r=n(54);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},function(e,t,n){var r=n(54);e.exports=function(e){return r(this.__data__,e)>-1}},function(e,t,n){var r=n(54);e.exports=function(e,t){var n=this.__data__,i=r(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this}},function(e,t,n){var r=n(53);e.exports=function(){this.__data__=new r,this.size=0}},function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},function(e,t){e.exports=function(e){return this.__data__.get(e)}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t,n){var r=n(53),i=n(78),o=n(79);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!i||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new o(s)}return n.set(e,t),this.size=n.size,this}},function(e,t,n){var r=n(399),i=n(53),o=n(78);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(e,t,n){var r=n(400),i=n(401),o=n(402),s=n(403),a=n(404);function c(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=o,c.prototype.has=s,c.prototype.set=a,e.exports=c},function(e,t,n){var r=n(55);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(e,t){e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},function(e,t,n){var r=n(55),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(t,e)?t[e]:void 0}},function(e,t,n){var r=n(55),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:i.call(t,e)}},function(e,t,n){var r=n(55);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},function(e,t,n){var r=n(56);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},function(e,t){e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},function(e,t,n){var r=n(56);e.exports=function(e){return r(this,e).get(e)}},function(e,t,n){var r=n(56);e.exports=function(e){return r(this,e).has(e)}},function(e,t,n){var r=n(56);e.exports=function(e,t){var n=r(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this}},function(e,t,n){var r=n(127),i=n(129),o=n(416),s=n(420),a=n(134),c=n(16),l=n(100),u=n(101),d="[object Object]",h=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,f,p,g){var m=c(e),v=c(t),_=m?"[object Array]":a(e),b=v?"[object Array]":a(t),y=(_="[object Arguments]"==_?d:_)==d,w=(b="[object Arguments]"==b?d:b)==d,S=_==b;if(S&&l(e)){if(!l(t))return!1;m=!0,y=!1}if(S&&!y)return g||(g=new r),m||u(e)?i(e,t,n,f,p,g):o(e,t,_,n,f,p,g);if(!(1&n)){var x=y&&h.call(e,"__wrapped__"),E=w&&h.call(t,"__wrapped__");if(x||E){var A=x?e.value():e,C=E?t.value():t;return g||(g=new r),p(A,C,n,f,g)}}return!!S&&(g||(g=new r),s(e,t,n,f,p,g))}},function(e,t,n){var r=n(79),i=n(412),o=n(413);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t<n;)this.add(e[t])}s.prototype.add=s.prototype.push=i,s.prototype.has=o,e.exports=s},function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},function(e,t){e.exports=function(e){return this.__data__.has(e)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},function(e,t){e.exports=function(e,t){return e.has(t)}},function(e,t,n){var r=n(49),i=n(417),o=n(50),s=n(129),a=n(418),c=n(419),l=r?r.prototype:void 0,u=l?l.valueOf:void 0;e.exports=function(e,t,n,r,l,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new i(e),new i(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return o(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var f=a;case"[object Set]":var p=1&r;if(f||(f=c),e.size!=t.size&&!p)return!1;var g=h.get(e);if(g)return g==t;r|=2,h.set(e,t);var m=s(f(e),f(t),r,l,d,h);return h.delete(e),m;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},function(e,t,n){var r=n(11).Uint8Array;e.exports=r},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},function(e,t,n){var r=n(421),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,o,s,a){var c=1&n,l=r(e),u=l.length;if(u!=r(t).length&&!c)return!1;for(var d=u;d--;){var h=l[d];if(!(c?h in t:i.call(t,h)))return!1}var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var g=!0;a.set(e,t),a.set(t,e);for(var m=c;++d<u;){var v=e[h=l[d]],_=t[h];if(o)var b=c?o(_,v,h,t,e,a):o(v,_,h,e,t,a);if(!(void 0===b?v===_||s(v,_,n,o,a):b)){g=!1;break}m||(m="constructor"==h)}if(g&&!m){var y=e.constructor,w=t.constructor;y==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof y&&y instanceof y&&"function"==typeof w&&w instanceof w||(g=!1)}return a.delete(e),a.delete(t),g}},function(e,t,n){var r=n(130),i=n(132),o=n(33);e.exports=function(e){return r(e,o,i)}},function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o}},function(e,t,n){var r=n(26)(n(11),"DataView");e.exports=r},function(e,t,n){var r=n(26)(n(11),"Promise");e.exports=r},function(e,t,n){var r=n(26)(n(11),"Set");e.exports=r},function(e,t,n){var r=n(135),i=n(33);e.exports=function(e){for(var t=i(e),n=t.length;n--;){var o=t[n],s=e[o];t[n]=[o,s,r(s)]}return t}},function(e,t,n){var r=n(128),i=n(428),o=n(433),s=n(81),a=n(135),c=n(136),l=n(39);e.exports=function(e,t){return s(e)&&a(t)?c(l(e),t):function(n){var s=i(n,e);return void 0===s&&s===t?o(n,e):r(t,s,3)}}},function(e,t,n){var r=n(80);e.exports=function(e,t,n){var i=null==e?void 0:r(e,t);return void 0===i?n:i}},function(e,t,n){var r=n(430),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,n,r,i){t.push(r?i.replace(o,"$1"):n||e)})),t}));e.exports=s},function(e,t,n){var r=n(431);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},function(e,t,n){var r=n(79);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(i.Cache||r),n}i.Cache=r,e.exports=i},function(e,t,n){var r=n(49),i=n(73),o=n(16),s=n(48),a=r?r.prototype:void 0,c=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(s(t))return c?c.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},function(e,t,n){var r=n(434),i=n(435);e.exports=function(e,t){return null!=e&&i(e,t,r)}},function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},function(e,t,n){var r=n(57),i=n(99),o=n(16),s=n(37),a=n(71),c=n(39);e.exports=function(e,t,n){for(var l=-1,u=(t=r(t,e)).length,d=!1;++l<u;){var h=c(t[l]);if(!(d=null!=e&&n(e,h)))break;e=e[h]}return d||++l!=u?d:!!(u=null==e?0:e.length)&&a(u)&&s(h,u)&&(o(e)||i(e))}},function(e,t,n){var r=n(138),i=n(437),o=n(81),s=n(39);e.exports=function(e){return o(e)?r(s(e)):i(e)}},function(e,t,n){var r=n(80);e.exports=function(e){return function(t){return r(t,e)}}},function(e,t,n){var r=n(80),i=n(439),o=n(57);e.exports=function(e,t,n){for(var s=-1,a=t.length,c={};++s<a;){var l=t[s],u=r(e,l);n(u,l)&&i(c,o(l,e),u)}return c}},function(e,t,n){var r=n(105),i=n(57),o=n(37),s=n(20),a=n(39);e.exports=function(e,t,n,c){if(!s(e))return e;for(var l=-1,u=(t=i(t,e)).length,d=u-1,h=e;null!=h&&++l<u;){var f=a(t[l]),p=n;if("__proto__"===f||"constructor"===f||"prototype"===f)return e;if(l!=d){var g=h[f];void 0===(p=c?c(g,f,h):void 0)&&(p=s(g)?g:o(t[l+1])?[]:{})}r(h,f,p),h=h[f]}return e}},function(e,t,n){var r=n(130),i=n(441),o=n(112);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(131),i=n(442),o=n(132),s=n(133),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},function(e,t,n){var r=n(104)(Object.getPrototypeOf,Object);e.exports=r},function(e,t,n){var r=n(444),i=n(445),o=n(446);e.exports=function(e){return i(e)?o(e):r(e)}},function(e,t,n){var r=n(138)("length");e.exports=r},function(e,t){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return n.test(e)}},function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^\\ud800-\\udfff]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+i+")"+"?",l="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[o,s,a].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),u="(?:"+[o+r+"?",r,s,a,n].join("|")+")",d=RegExp(i+"(?="+i+")|"+u+l,"g");e.exports=function(e){for(var t=d.lastIndex=0;d.test(e);)++t;return t}},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(448),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e,t,n){return t in e?(0,o.default)(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t,n){e.exports={default:n(449),__esModule:!0}},function(e,t,n){n(450);var r=n(19).Object;e.exports=function(e,t,n){return r.defineProperty(e,t,n)}},function(e,t,n){var r=n(30);r(r.S+r.F*!n(32),"Object",{defineProperty:n(40).f})},function(e,t,n){e.exports=!n(32)&&!n(82)((function(){return 7!=Object.defineProperty(n(83)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var r=n(41);e.exports=function(e,t){if(!r(e))return e;var n,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){e.exports={default:n(454),__esModule:!0}},function(e,t,n){n(455),e.exports=n(19).Object.keys},function(e,t,n){var r=n(141),i=n(142);n(460)("keys",(function(){return function(e){return i(r(e))}}))},function(e,t,n){var r=n(60),i=n(85),o=n(458)(!1),s=n(87)("IE_PROTO");e.exports=function(e,t){var n,a=i(e),c=0,l=[];for(n in a)n!=s&&r(a,n)&&l.push(n);for(;t.length>c;)r(a,n=t[c++])&&(~o(l,n)||l.push(n));return l}},function(e,t,n){var r=n(61);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},function(e,t,n){var r=n(85),i=n(143),o=n(459);e.exports=function(e){return function(t,n,s){var a,c=r(t),l=i(c.length),u=o(s,l);if(e&&n!=n){for(;l>u;)if((a=c[u++])!=a)return!0}else for(;l>u;u++)if((e||u in c)&&c[u]===n)return e||u||0;return!e&&-1}}},function(e,t,n){var r=n(86),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(e+t,0):o(e,t)}},function(e,t,n){var r=n(30),i=n(19),o=n(82);e.exports=function(e,t){var n=(i.Object||{})[e]||Object[e],s={};s[e]=t(n),r(r.S+r.F*o((function(){n(1)})),"Object",s)}},function(e,t,n){e.exports=n(462)},function(e,t,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,e.exports=n(463),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(e){r.regeneratorRuntime=void 0}},function(e,t){!function(t){"use strict";var n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag",c="object"==typeof e,l=t.regeneratorRuntime;if(l)c&&(e.exports=l);else{(l=t.regeneratorRuntime=c?e.exports:{}).wrap=g;var u={},d={};d[o]=function(){return this};var h=Object.getPrototypeOf,f=h&&h(h(C([])));f&&f!==n&&r.call(f,o)&&(d=f);var p=b.prototype=v.prototype=Object.create(d);_.prototype=p.constructor=b,b.constructor=_,b[a]=_.displayName="GeneratorFunction",l.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===_||"GeneratorFunction"===(t.displayName||t.name))},l.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,b):(e.__proto__=b,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(p),e},l.awrap=function(e){return{__await:e}},y(w.prototype),w.prototype[s]=function(){return this},l.AsyncIterator=w,l.async=function(e,t,n,r){var i=new w(g(e,t,n,r));return l.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(p),p[a]="Generator",p[o]=function(){return this},p.toString=function(){return"[object Generator]"},l.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=C,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return s.type="throw",s.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var a=r.call(o,"catchLoc"),c=r.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,u):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),u},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),u}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),u}}}function g(e,t,n,r){var i=t&&t.prototype instanceof v?t:v,o=Object.create(i.prototype),s=new A(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return j()}for(n.method=i,n.arg=o;;){var s=n.delegate;if(s){var a=S(s,n);if(a){if(a===u)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var c=m(e,t,n);if("normal"===c.type){if(r=n.done?"completed":"suspendedYield",c.arg===u)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r="completed",n.method="throw",n.arg=c.arg)}}}(e,n,s),o}function m(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}function v(){}function _(){}function b(){}function y(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function w(e){var t;this._invoke=function(n,i){function o(){return new Promise((function(t,o){!function t(n,i,o,s){var a=m(e[n],e,i);if("throw"!==a.type){var c=a.arg,l=c.value;return l&&"object"==typeof l&&r.call(l,"__await")?Promise.resolve(l.__await).then((function(e){t("next",e,o,s)}),(function(e){t("throw",e,o,s)})):Promise.resolve(l).then((function(e){c.value=e,o(c)}),s)}s(a.arg)}(n,i,t,o)}))}return t=t?t.then(o,o):o()}}function S(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,S(e,t),"throw"===t.method))return u;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return u}var r=m(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,u;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,u):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,u)}function x(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:j}}function j(){return{value:void 0,done:!0}}}(function(){return this}()||Function("return this")())},function(e,t,n){"use strict";t.__esModule=!0;var r,i=n(89),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(e){return function(){var t=e.apply(this,arguments);return new o.default((function(e,n){return function r(i,s){try{var a=t[i](s),c=a.value}catch(e){return void n(e)}if(!a.done)return o.default.resolve(c).then((function(e){r("next",e)}),(function(e){r("throw",e)}));e(c)}("next")}))}}},function(e,t,n){n(466),n(467),n(474),n(478),n(490),n(491),e.exports=n(19).Promise},function(e,t){},function(e,t,n){"use strict";var r=n(468)(!0);n(147)(String,"String",(function(e){this._t=String(e),this._i=0}),(function(){var e,t=this._t,n=this._i;return n>=t.length?{value:void 0,done:!0}:(e=r(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){var r=n(86),i=n(84);e.exports=function(e){return function(t,n){var o,s,a=String(i(t)),c=r(n),l=a.length;return c<0||c>=l?e?"":void 0:(o=a.charCodeAt(c))<55296||o>56319||c+1===l||(s=a.charCodeAt(c+1))<56320||s>57343?e?a.charAt(c):o:e?a.slice(c,c+2):s-56320+(o-55296<<10)+65536}}},function(e,t,n){e.exports=n(31)},function(e,t,n){"use strict";var r=n(471),i=n(140),o=n(90),s={};n(31)(s,n(17)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(s,{next:i(1,n)}),o(e,t+" Iterator")}},function(e,t,n){var r=n(27),i=n(472),o=n(146),s=n(87)("IE_PROTO"),a=function(){},c=function(){var e,t=n(83)("iframe"),r=o.length;for(t.style.display="none",n(148).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c.prototype[o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(a.prototype=r(e),n=new a,a.prototype=null,n[s]=e):n=c(),void 0===t?n:i(n,t)}},function(e,t,n){var r=n(40),i=n(27),o=n(142);e.exports=n(32)?Object.defineProperties:function(e,t){i(e);for(var n,s=o(t),a=s.length,c=0;a>c;)r.f(e,n=s[c++],t[n]);return e}},function(e,t,n){var r=n(60),i=n(141),o=n(87)("IE_PROTO"),s=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?s:null}},function(e,t,n){n(475);for(var r=n(13),i=n(31),o=n(42),s=n(17)("toStringTag"),a="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),c=0;c<a.length;c++){var l=a[c],u=r[l],d=u&&u.prototype;d&&!d[s]&&i(d,s,l),o[l]=o.Array}},function(e,t,n){"use strict";var r=n(476),i=n(477),o=n(42),s=n(85);e.exports=n(147)(Array,"Array",(function(e,t){this._t=s(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,i(1)):i(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},function(e,t){e.exports=function(){}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var r,i,o,s,a=n(88),c=n(13),l=n(58),u=n(149),d=n(30),h=n(41),f=n(59),p=n(479),g=n(480),m=n(150),v=n(151).set,_=n(485)(),b=n(91),y=n(152),w=n(486),S=n(153),x=c.TypeError,E=c.process,A=E&&E.versions,C=A&&A.v8||"",j=c.Promise,T="process"==u(E),O=function(){},k=i=b.f,N=!!function(){try{var e=j.resolve(1),t=(e.constructor={})[n(17)("species")]=function(e){e(O,O)};return(T||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof t&&0!==C.indexOf("6.6")&&-1===w.indexOf("Chrome/66")}catch(e){}}(),I=function(e){var t;return!(!h(e)||"function"!=typeof(t=e.then))&&t},M=function(e,t){if(!e._n){e._n=!0;var n=e._c;_((function(){for(var r=e._v,i=1==e._s,o=0,s=function(t){var n,o,s,a=i?t.ok:t.fail,c=t.resolve,l=t.reject,u=t.domain;try{a?(i||(2==e._h&&P(e),e._h=1),!0===a?n=r:(u&&u.enter(),n=a(r),u&&(u.exit(),s=!0)),n===t.promise?l(x("Promise-chain cycle")):(o=I(n))?o.call(n,c,l):c(n)):l(r)}catch(e){u&&!s&&u.exit(),l(e)}};n.length>o;)s(n[o++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){v.call(c,(function(){var t,n,r,i=e._v,o=D(e);if(o&&(t=y((function(){T?E.emit("unhandledRejection",i,e):(n=c.onunhandledrejection)?n({promise:e,reason:i}):(r=c.console)&&r.error&&r.error("Unhandled promise rejection",i)})),e._h=T||D(e)?2:1),e._a=void 0,o&&t.e)throw t.v}))},D=function(e){return 1!==e._h&&0===(e._a||e._c).length},P=function(e){v.call(c,(function(){var t;T?E.emit("rejectionHandled",e):(t=c.onrejectionhandled)&&t({promise:e,reason:e._v})}))},L=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),M(t,!0))},z=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw x("Promise can't be resolved itself");(t=I(e))?_((function(){var r={_w:n,_d:!1};try{t.call(e,l(z,r,1),l(L,r,1))}catch(e){L.call(r,e)}})):(n._v=e,n._s=1,M(n,!1))}catch(e){L.call({_w:n,_d:!1},e)}}};N||(j=function(e){p(this,j,"Promise","_h"),f(e),r.call(this);try{e(l(z,this,1),l(L,this,1))}catch(e){L.call(this,e)}},(r=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(487)(j.prototype,{then:function(e,t){var n=k(m(this,j));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=T?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&M(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),o=function(){var e=new r;this.promise=e,this.resolve=l(z,e,1),this.reject=l(L,e,1)},b.f=k=function(e){return e===j||e===s?new o(e):i(e)}),d(d.G+d.W+d.F*!N,{Promise:j}),n(90)(j,"Promise"),n(488)("Promise"),s=n(19).Promise,d(d.S+d.F*!N,"Promise",{reject:function(e){var t=k(this);return(0,t.reject)(e),t.promise}}),d(d.S+d.F*(a||!N),"Promise",{resolve:function(e){return S(a&&this===s?j:this,e)}}),d(d.S+d.F*!(N&&n(489)((function(e){j.all(e).catch(O)}))),"Promise",{all:function(e){var t=this,n=k(t),r=n.resolve,i=n.reject,o=y((function(){var n=[],o=0,s=1;g(e,!1,(function(e){var a=o++,c=!1;n.push(void 0),s++,t.resolve(e).then((function(e){c||(c=!0,n[a]=e,--s||r(n))}),i)})),--s||r(n)}));return o.e&&i(o.v),n.promise},race:function(e){var t=this,n=k(t),r=n.reject,i=y((function(){g(e,!1,(function(e){t.resolve(e).then(n.resolve,r)}))}));return i.e&&r(i.v),n.promise}})},function(e,t){e.exports=function(e,t,n,r){if(!(e instanceof t)||void 0!==r&&r in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var r=n(58),i=n(481),o=n(482),s=n(27),a=n(143),c=n(483),l={},u={};(t=e.exports=function(e,t,n,d,h){var f,p,g,m,v=h?function(){return e}:c(e),_=r(n,d,t?2:1),b=0;if("function"!=typeof v)throw TypeError(e+" is not iterable!");if(o(v)){for(f=a(e.length);f>b;b++)if((m=t?_(s(p=e[b])[0],p[1]):_(e[b]))===l||m===u)return m}else for(g=v.call(e);!(p=g.next()).done;)if((m=i(g,_,p.value,t))===l||m===u)return m}).BREAK=l,t.RETURN=u},function(e,t,n){var r=n(27);e.exports=function(e,t,n,i){try{return i?t(r(n)[0],n[1]):t(n)}catch(t){var o=e.return;throw void 0!==o&&r(o.call(e)),t}}},function(e,t,n){var r=n(42),i=n(17)("iterator"),o=Array.prototype;e.exports=function(e){return void 0!==e&&(r.Array===e||o[i]===e)}},function(e,t,n){var r=n(149),i=n(17)("iterator"),o=n(42);e.exports=n(19).getIteratorMethod=function(e){if(null!=e)return e[i]||e["@@iterator"]||o[r(e)]}},function(e,t){e.exports=function(e,t,n){var r=void 0===n;switch(t.length){case 0:return r?e():e.call(n);case 1:return r?e(t[0]):e.call(n,t[0]);case 2:return r?e(t[0],t[1]):e.call(n,t[0],t[1]);case 3:return r?e(t[0],t[1],t[2]):e.call(n,t[0],t[1],t[2]);case 4:return r?e(t[0],t[1],t[2],t[3]):e.call(n,t[0],t[1],t[2],t[3])}return e.apply(n,t)}},function(e,t,n){var r=n(13),i=n(151).set,o=r.MutationObserver||r.WebKitMutationObserver,s=r.process,a=r.Promise,c="process"==n(61)(s);e.exports=function(){var e,t,n,l=function(){var r,i;for(c&&(r=s.domain)&&r.exit();e;){i=e.fn,e=e.next;try{i()}catch(r){throw e?n():t=void 0,r}}t=void 0,r&&r.enter()};if(c)n=function(){s.nextTick(l)};else if(!o||r.navigator&&r.navigator.standalone)if(a&&a.resolve){var u=a.resolve(void 0);n=function(){u.then(l)}}else n=function(){i.call(r,l)};else{var d=!0,h=document.createTextNode("");new o(l).observe(h,{characterData:!0}),n=function(){h.data=d=!d}}return function(r){var i={fn:r,next:void 0};t&&(t.next=i),e||(e=i,n()),t=i}}},function(e,t,n){var r=n(13).navigator;e.exports=r&&r.userAgent||""},function(e,t,n){var r=n(31);e.exports=function(e,t,n){for(var i in t)n&&e[i]?e[i]=t[i]:r(e,i,t[i]);return e}},function(e,t,n){"use strict";var r=n(13),i=n(19),o=n(40),s=n(32),a=n(17)("species");e.exports=function(e){var t="function"==typeof i[e]?i[e]:r[e];s&&t&&!t[a]&&o.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t,n){var r=n(17)("iterator"),i=!1;try{var o=[7][r]();o.return=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!i)return!1;var n=!1;try{var o=[7],s=o[r]();s.next=function(){return{done:n=!0}},o[r]=function(){return s},e(o)}catch(e){}return n}},function(e,t,n){"use strict";var r=n(30),i=n(19),o=n(13),s=n(150),a=n(153);r(r.P+r.R,"Promise",{finally:function(e){var t=s(this,i.Promise||o.Promise),n="function"==typeof e;return this.then(n?function(n){return a(t,e()).then((function(){return n}))}:e,n?function(n){return a(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){"use strict";var r=n(30),i=n(91),o=n(152);r(r.S,"Promise",{try:function(e){var t=i.f(this),n=o(e);return(n.e?t.reject:t.resolve)(n.v),t.promise}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(89),o=(r=i)&&r.__esModule?r:{default:r};function s(){return window.browser&&browser.storage||window.chrome&&chrome.storage}t.getStorage=s,t.usePromise=function(e,t){if(function(){var e=s();try{return e&&e.local.get&&e.local.get()&&"function"==typeof e.local.get().then}catch(e){return!1}}())return e(t);return new o.default((function(n){e(t,(function(){n.apply(void 0,arguments)}))}))}},function(e,t,n){"use strict";n(68);var r=n(0);const i={};i.debug=r.e.LogLevel.DEBUG,i.info=r.e.LogLevel.INFO,i.warn=r.e.LogLevel.WARN,i.error=r.e.LogLevel.ERROR,i.fatal=r.e.LogLevel.FATAL,r.e.WorkerWebsocket=class extends r.e.Websocket{constructor(e){super(e),this._conn=e,this.worker=new SharedWorker(this._conn.options.worker,"Strophe XMPP Connection"),this.worker.onerror=e=>{var t;null===(t=console)||void 0===t||t.error(e),r.e.log(r.e.LogLevel.ERROR,"Shared Worker Error: ".concat(e))}}get socket(){return{send:e=>this.worker.port.postMessage(["send",e])}}_connect(){this._messageHandler=e=>this._onInitialMessage(e),this.worker.port.start(),this.worker.port.onmessage=e=>this._onWorkerMessage(e),this.worker.port.postMessage(["_connect",this._conn.service,this._conn.jid])}_attach(e){this._messageHandler=e=>this._onMessage(e),this._conn.connect_callback=e,this.worker.port.start(),this.worker.port.onmessage=e=>this._onWorkerMessage(e),this.worker.port.postMessage(["_attach",this._conn.service])}_attachCallback(e,t){e===r.e.Status.ATTACHED?(this._conn.jid=t,this._conn.authenticated=!0,this._conn.connected=!0,this._conn.restored=!0,this._conn._changeConnectStatus(r.e.Status.ATTACHED)):e===r.e.Status.ATTACHFAIL&&(this._conn.authenticated=!1,this._conn.connected=!1,this._conn.restored=!1,this._conn._changeConnectStatus(r.e.Status.ATTACHFAIL))}_disconnect(e,t){t&&this._conn.send(t);const n=Object(r.a)("close",{xmlns:r.e.NS.FRAMING});this._conn.xmlOutput(n.tree());const i=r.e.serialize(n);this._conn.rawOutput(i),this.worker.port.postMessage(["send",i]),this._conn._doDisconnect()}_onClose(e){this._conn.connected&&!this._conn.disconnecting?(r.e.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):e&&1006===e.code&&!this._conn.connected?(r.e.error("Websocket closed unexcectedly"),this._conn._changeConnectStatus(r.e.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._conn._doDisconnect()):r.e.debug("Websocket closed")}_closeSocket(){this.worker.port.postMessage(["_closeSocket"])}_replaceMessageHandler(){this._messageHandler=e=>this._onMessage(e)}_onWorkerMessage(e){const{data:t}=e,n=t[0];if("_onMessage"===n)this._messageHandler(t[1]);else if(n in this)try{this[n].apply(this,e.data.slice(1))}catch(e){r.e.log(r.e.LogLevel.ERROR,e)}else if("log"===n){const e=t[1],n=t[2];r.e.log(i[e],n)}else r.e.log(r.e.LogLevel.ERROR,"Found unhandled service worker message: ".concat(t))}}},function(e,t,n){var r={"./af/LC_MESSAGES/converse.po":[507,139],"./ar/LC_MESSAGES/converse.po":[508,140],"./bg/LC_MESSAGES/converse.po":[509,141],"./ca/LC_MESSAGES/converse.po":[510,142],"./cs/LC_MESSAGES/converse.po":[511,143],"./da/LC_MESSAGES/converse.po":[512,144],"./de/LC_MESSAGES/converse.po":[513,147],"./eo/LC_MESSAGES/converse.po":[514,148],"./es/LC_MESSAGES/converse.po":[515,149],"./eu/LC_MESSAGES/converse.po":[516,150],"./fi/LC_MESSAGES/converse.po":[517,151],"./fr/LC_MESSAGES/converse.po":[518,152],"./gl/LC_MESSAGES/converse.po":[519,153],"./he/LC_MESSAGES/converse.po":[520,154],"./hi/LC_MESSAGES/converse.po":[521,155],"./hu/LC_MESSAGES/converse.po":[522,156],"./id/LC_MESSAGES/converse.po":[523,157],"./it/LC_MESSAGES/converse.po":[524,158],"./ja/LC_MESSAGES/converse.po":[525,159],"./lt/LC_MESSAGES/converse.po":[526,160],"./mr/LC_MESSAGES/converse.po":[527,161],"./nb/LC_MESSAGES/converse.po":[528,162],"./nl/LC_MESSAGES/converse.po":[529,163],"./nl_BE/LC_MESSAGES/converse.po":[530,164],"./oc/LC_MESSAGES/converse.po":[531,165],"./pl/LC_MESSAGES/converse.po":[532,166],"./pt/LC_MESSAGES/converse.po":[533,167],"./pt_BR/LC_MESSAGES/converse.po":[534,168],"./ro/LC_MESSAGES/converse.po":[535,169],"./ru/LC_MESSAGES/converse.po":[536,170],"./sv/LC_MESSAGES/converse.po":[537,171],"./th/LC_MESSAGES/converse.po":[538,172],"./tr/LC_MESSAGES/converse.po":[539,173],"./uk/LC_MESSAGES/converse.po":[540,174],"./vi/LC_MESSAGES/converse.po":[541,175],"./zh_CN/LC_MESSAGES/converse.po":[542,176],"./zh_TW/LC_MESSAGES/converse.po":[543,177]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n.t(i,3)}))}i.keys=function(){return Object.keys(r)},i.id=494,e.exports=i},function(e,t,n){var r={"./af":[189,0],"./af.js":[189,0],"./ar":[196,1],"./ar-dz":[190,2],"./ar-dz.js":[190,2],"./ar-kw":[191,3],"./ar-kw.js":[191,3],"./ar-ly":[192,4],"./ar-ly.js":[192,4],"./ar-ma":[193,5],"./ar-ma.js":[193,5],"./ar-sa":[194,6],"./ar-sa.js":[194,6],"./ar-tn":[195,7],"./ar-tn.js":[195,7],"./ar.js":[196,1],"./az":[197,8],"./az.js":[197,8],"./be":[198,9],"./be.js":[198,9],"./bg":[199,10],"./bg.js":[199,10],"./bi":[200,11],"./bi.js":[200,11],"./bm":[201,12],"./bm.js":[201,12],"./bn":[202,13],"./bn.js":[202,13],"./bo":[203,14],"./bo.js":[203,14],"./br":[204,15],"./br.js":[204,15],"./bs":[205,16],"./bs.js":[205,16],"./ca":[206,17],"./ca.js":[206,17],"./cs":[207,18],"./cs.js":[207,18],"./cv":[208,19],"./cv.js":[208,19],"./cy":[209,20],"./cy.js":[209,20],"./da":[210,21],"./da.js":[210,21],"./de":[213,22],"./de-at":[211,23],"./de-at.js":[211,23],"./de-ch":[212,24],"./de-ch.js":[212,24],"./de.js":[213,22],"./dv":[214,25],"./dv.js":[214,25],"./el":[215,26],"./el.js":[215,26],"./en":[225,27],"./en-SG":[216,28],"./en-SG.js":[216,28],"./en-au":[217,29],"./en-au.js":[217,29],"./en-ca":[218,30],"./en-ca.js":[218,30],"./en-gb":[219,31],"./en-gb.js":[219,31],"./en-ie":[220,32],"./en-ie.js":[220,32],"./en-il":[221,33],"./en-il.js":[221,33],"./en-in":[222,34],"./en-in.js":[222,34],"./en-nz":[223,35],"./en-nz.js":[223,35],"./en-tt":[224,36],"./en-tt.js":[224,36],"./en.js":[225,27],"./eo":[226,37],"./eo.js":[226,37],"./es":[230,38],"./es-do":[227,39],"./es-do.js":[227,39],"./es-pr":[228,40],"./es-pr.js":[228,40],"./es-us":[229,41],"./es-us.js":[229,41],"./es.js":[230,38],"./et":[231,42],"./et.js":[231,42],"./eu":[232,43],"./eu.js":[232,43],"./fa":[233,44],"./fa.js":[233,44],"./fi":[234,45],"./fi.js":[234,45],"./fo":[235,46],"./fo.js":[235,46],"./fr":[238,47],"./fr-ca":[236,48],"./fr-ca.js":[236,48],"./fr-ch":[237,49],"./fr-ch.js":[237,49],"./fr.js":[238,47],"./fy":[239,50],"./fy.js":[239,50],"./ga":[240,51],"./ga.js":[240,51],"./gd":[241,52],"./gd.js":[241,52],"./gl":[242,53],"./gl.js":[242,53],"./gom-latn":[243,54],"./gom-latn.js":[243,54],"./gu":[244,55],"./gu.js":[244,55],"./he":[245,56],"./he.js":[245,56],"./hi":[246,57],"./hi.js":[246,57],"./hr":[247,58],"./hr.js":[247,58],"./ht":[248,59],"./ht.js":[248,59],"./hu":[249,60],"./hu.js":[249,60],"./hy-am":[250,61],"./hy-am.js":[250,61],"./id":[251,62],"./id.js":[251,62],"./index.d.ts":[544,145],"./is":[252,63],"./is.js":[252,63],"./it":[254,64],"./it-ch":[253,65],"./it-ch.js":[253,65],"./it.js":[254,64],"./ja":[255,66],"./ja.js":[255,66],"./jv":[256,67],"./jv.js":[256,67],"./ka":[257,68],"./ka.js":[257,68],"./kk":[258,69],"./kk.js":[258,69],"./km":[259,70],"./km.js":[259,70],"./kn":[260,71],"./kn.js":[260,71],"./ko":[261,72],"./ko.js":[261,72],"./ku":[262,73],"./ku.js":[262,73],"./ky":[263,74],"./ky.js":[263,74],"./lb":[264,75],"./lb.js":[264,75],"./lo":[265,76],"./lo.js":[265,76],"./lt":[266,77],"./lt.js":[266,77],"./lv":[267,78],"./lv.js":[267,78],"./me":[268,79],"./me.js":[268,79],"./mi":[269,80],"./mi.js":[269,80],"./mk":[270,81],"./mk.js":[270,81],"./ml":[271,82],"./ml.js":[271,82],"./mn":[272,83],"./mn.js":[272,83],"./mr":[273,84],"./mr.js":[273,84],"./ms":[275,85],"./ms-my":[274,86],"./ms-my.js":[274,86],"./ms.js":[275,85],"./mt":[276,87],"./mt.js":[276,87],"./my":[277,88],"./my.js":[277,88],"./nb":[278,89],"./nb.js":[278,89],"./ne":[279,90],"./ne.js":[279,90],"./nl":[281,91],"./nl-be":[280,92],"./nl-be.js":[280,92],"./nl.js":[281,91],"./nn":[282,93],"./nn.js":[282,93],"./oc-lnc":[283,94],"./oc-lnc.js":[283,94],"./pa-in":[284,95],"./pa-in.js":[284,95],"./pl":[285,96],"./pl.js":[285,96],"./pt":[287,97],"./pt-br":[286,98],"./pt-br.js":[286,98],"./pt.js":[287,97],"./ro":[288,99],"./ro.js":[288,99],"./ru":[289,100],"./ru.js":[289,100],"./rw":[290,101],"./rw.js":[290,101],"./sd":[291,102],"./sd.js":[291,102],"./se":[292,103],"./se.js":[292,103],"./si":[293,104],"./si.js":[293,104],"./sk":[294,105],"./sk.js":[294,105],"./sl":[295,106],"./sl.js":[295,106],"./sq":[296,107],"./sq.js":[296,107],"./sr":[298,108],"./sr-cyrl":[297,109],"./sr-cyrl.js":[297,109],"./sr.js":[298,108],"./ss":[299,110],"./ss.js":[299,110],"./sv":[300,111],"./sv.js":[300,111],"./sw":[301,112],"./sw.js":[301,112],"./ta":[302,113],"./ta.js":[302,113],"./te":[303,114],"./te.js":[303,114],"./tet":[304,115],"./tet.js":[304,115],"./tg":[305,116],"./tg.js":[305,116],"./th":[306,117],"./th.js":[306,117],"./tk":[307,118],"./tk.js":[307,118],"./tl-ph":[308,119],"./tl-ph.js":[308,119],"./tlh":[309,120],"./tlh.js":[309,120],"./tr":[310,121],"./tr.js":[310,121],"./types.d.ts":[545,146],"./tzl":[311,122],"./tzl.js":[311,122],"./tzm":[313,123],"./tzm-latn":[312,124],"./tzm-latn.js":[312,124],"./tzm.js":[313,123],"./ug-cn":[314,125],"./ug-cn.js":[314,125],"./uk":[315,126],"./uk.js":[315,126],"./ur":[316,127],"./ur.js":[316,127],"./uz":[318,128],"./uz-latn":[317,129],"./uz-latn.js":[317,129],"./uz.js":[318,128],"./vi":[319,130],"./vi.js":[319,130],"./x-pseudo":[320,131],"./x-pseudo.js":[320,131],"./yo":[321,132],"./yo.js":[321,132],"./zh":[325,133],"./zh-cn":[322,134],"./zh-cn.js":[322,134],"./zh-hk":[323,135],"./zh-hk.js":[323,135],"./zh-tw":[324,136],"./zh-tw.js":[324,136],"./zh.js":[325,133]};function i(e){if(!n.o(r,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],i=t[0];return n.e(t[1]).then((function(){return n.t(i,7)}))}i.keys=function(){return Object.keys(r)},i.id=495,e.exports=i},function(e,t,n){var r=n(497)({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});e.exports=r},function(e,t){e.exports=function(e){return function(t){return null==e?void 0:e[t]}}},function(e,t,n){"use strict";var r=n(9),i=n(2);i.d.Request=class{constructor(e,t,n,r){this.id=++i.d._requestId,this.xmlData=e,this.data=i.d.serialize(e),this.origFunc=t,this.func=t,this.rid=n,this.date=NaN,this.sends=r||0,this.abort=!1,this.dead=null,this.age=function(){if(!this.date)return 0;return(new Date-this.date)/1e3},this.timeDead=function(){if(!this.dead)return 0;return(new Date-this.dead)/1e3},this.xhr=this._newXHR()}getResponse(){let e=null;if(this.xhr.responseXML&&this.xhr.responseXML.documentElement){if(e=this.xhr.responseXML.documentElement,"parsererror"===e.tagName)throw i.d.error("invalid response received"),i.d.error("responseText: "+this.xhr.responseText),i.d.error("responseXML: "+i.d.serialize(this.xhr.responseXML)),new Error("parsererror")}else if(this.xhr.responseText){if(i.d.debug("Got responseText but no responseXML; attempting to parse it with DOMParser..."),e=(new r.a).parseFromString(this.xhr.responseText,"application/xml").documentElement,!e)throw new Error("Parsing produced null node");if(e.querySelector("parsererror")){i.d.error("invalid response received: "+e.querySelector("parsererror").textContent),i.d.error("responseText: "+this.xhr.responseText);const t=new Error;throw t.name=i.d.ErrorCondition.BAD_FORMAT,t}}return e}_newXHR(){let e=null;return window.XMLHttpRequest?(e=new XMLHttpRequest,e.overrideMimeType&&e.overrideMimeType("text/xml; charset=utf-8")):window.ActiveXObject&&(e=new ActiveXObject("Microsoft.XMLHTTP")),e.onreadystatechange=this.func.bind(null,this),e}},i.d.Bosh=class e{constructor(e){this._conn=e,this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.hold=1,this.wait=60,this.window=5,this.errors=0,this.inactivity=null,this.lastResponseHeaders=null,this._requests=[]}_buildBody(){const e=Object(i.a)("body",{rid:this.rid++,xmlns:i.d.NS.HTTPBIND});return null!==this.sid&&e.attrs({sid:this.sid}),this._conn.options.keepalive&&this._conn._sessionCachingSupported()&&this._cacheSession(),e}_reset(){this.rid=Math.floor(4294967295*Math.random()),this.sid=null,this.errors=0,this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)}_connect(e,t,n){this.wait=e||this.wait,this.hold=t||this.hold,this.errors=0;const r=this._buildBody().attrs({to:this._conn.domain,"xml:lang":"en",wait:this.wait,hold:this.hold,content:"text/xml; charset=utf-8",ver:"1.6","xmpp:version":"1.0","xmlns:xmpp":i.d.NS.BOSH});n&&r.attrs({route:n});const o=this._conn._connect_cb;this._requests.push(new i.d.Request(r.tree(),this._onRequestStateChange.bind(this,o.bind(this._conn)),r.tree().getAttribute("rid"))),this._throttledRequestHandler()}_attach(e,t,n,r,o,s,a){this._conn.jid=e,this.sid=t,this.rid=n,this._conn.connect_callback=r,this._conn.domain=i.d.getDomainFromJid(this._conn.jid),this._conn.authenticated=!0,this._conn.connected=!0,this.wait=o||this.wait,this.hold=s||this.hold,this.window=a||this.window,this._conn._changeConnectStatus(i.d.Status.ATTACHED,null)}_restore(e,t,n,r,o){const s=JSON.parse(window.sessionStorage.getItem("strophe-bosh-session"));if(!(null!=s&&s.rid&&s.sid&&s.jid&&(null==e||i.d.getBareJidFromJid(s.jid)===i.d.getBareJidFromJid(e)||null===i.d.getNodeFromJid(e)&&i.d.getDomainFromJid(s.jid)===e))){const e=new Error("_restore: no restoreable session.");throw e.name="StropheSessionError",e}this._conn.restored=!0,this._attach(s.jid,s.sid,s.rid,t,n,r,o)}_cacheSession(){this._conn.authenticated?this._conn.jid&&this.rid&&this.sid&&window.sessionStorage.setItem("strophe-bosh-session",JSON.stringify({jid:this._conn.jid,rid:this.rid,sid:this.sid})):window.sessionStorage.removeItem("strophe-bosh-session")}_connect_cb(e){const t=e.getAttribute("type");if(null!==t&&"terminate"===t){let t=e.getAttribute("condition");i.d.error("BOSH-Connection failed: "+t);const n=e.getElementsByTagName("conflict");return null!==t?("remote-stream-error"===t&&n.length>0&&(t="conflict"),this._conn._changeConnectStatus(i.d.Status.CONNFAIL,t)):this._conn._changeConnectStatus(i.d.Status.CONNFAIL,"unknown"),this._conn._doDisconnect(t),i.d.Status.CONNFAIL}this.sid||(this.sid=e.getAttribute("sid"));const n=e.getAttribute("requests");n&&(this.window=parseInt(n,10));const r=e.getAttribute("hold");r&&(this.hold=parseInt(r,10));const o=e.getAttribute("wait");o&&(this.wait=parseInt(o,10));const s=e.getAttribute("inactivity");s&&(this.inactivity=parseInt(s,10))}_disconnect(e){this._sendTerminate(e)}_doDisconnect(){this.sid=null,this.rid=Math.floor(4294967295*Math.random()),this._conn._sessionCachingSupported()&&window.sessionStorage.removeItem("strophe-bosh-session"),this._conn.nextValidRid(this.rid)}_emptyQueue(){return 0===this._requests.length}_callProtocolErrorHandlers(t){const n=e._getRequestStatus(t),r=this._conn.protocolErrorHandlers.HTTP[n];r&&r.call(this,n)}_hitError(e){this.errors++,i.d.warn("request errored, status: "+e+", number of errors: "+this.errors),this.errors>4&&this._conn._onDisconnectTimeout()}_no_auth_received(e){i.d.warn("Server did not yet offer a supported authentication mechanism. Sending a blank poll request."),e=e?e.bind(this._conn):this._conn._connect_cb.bind(this._conn);const t=this._buildBody();this._requests.push(new i.d.Request(t.tree(),this._onRequestStateChange.bind(this,e),t.tree().getAttribute("rid"))),this._throttledRequestHandler()}_onDisconnectTimeout(){this._abortAllRequests()}_abortAllRequests(){for(;this._requests.length>0;){const e=this._requests.pop();e.abort=!0,e.xhr.abort(),e.xhr.onreadystatechange=function(){}}}_onIdle(){const e=this._conn._data;if(this._conn.authenticated&&0===this._requests.length&&0===e.length&&!this._conn.disconnecting&&(i.d.debug("no requests during idle cycle, sending blank request"),e.push(null)),!this._conn.paused){if(this._requests.length<2&&e.length>0){const t=this._buildBody();for(let n=0;n<e.length;n++)null!==e[n]&&("restart"===e[n]?t.attrs({to:this._conn.domain,"xml:lang":"en","xmpp:restart":"true","xmlns:xmpp":i.d.NS.BOSH}):t.cnode(e[n]).up());delete this._conn._data,this._conn._data=[],this._requests.push(new i.d.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"))),this._throttledRequestHandler()}if(this._requests.length>0){const e=this._requests[0].age();null!==this._requests[0].dead&&this._requests[0].timeDead()>Math.floor(i.d.SECONDARY_TIMEOUT*this.wait)&&this._throttledRequestHandler(),e>Math.floor(i.d.TIMEOUT*this.wait)&&(i.d.warn("Request "+this._requests[0].id+" timed out, over "+Math.floor(i.d.TIMEOUT*this.wait)+" seconds since last activity"),this._throttledRequestHandler())}}}static _getRequestStatus(e,t){let n;if(4===e.xhr.readyState)try{n=e.xhr.status}catch(e){i.d.error("Caught an error while retrieving a request's status, reqStatus: "+n)}return void 0===n&&(n="number"==typeof t?t:0),n}_onRequestStateChange(t,n){if(i.d.debug("request id "+n.id+"."+n.sends+" state changed to "+n.xhr.readyState),n.abort)return void(n.abort=!1);if(4!==n.xhr.readyState)return;const r=e._getRequestStatus(n);if(this.lastResponseHeaders=n.xhr.getAllResponseHeaders(),this._conn.disconnecting&&r>=400)return this._hitError(r),void this._callProtocolErrorHandlers(n);const o=r>0&&r<500,s=n.sends>this._conn.maxRetries;if((o||s)&&(this._removeRequest(n),i.d.debug("request id "+n.id+" should now be removed")),200===r){const e=this._requests[0]===n;(this._requests[1]===n||e&&this._requests.length>0&&this._requests[0].age()>Math.floor(i.d.SECONDARY_TIMEOUT*this.wait))&&this._restartRequest(0),this._conn.nextValidRid(Number(n.rid)+1),i.d.debug("request id "+n.id+"."+n.sends+" got 200"),t(n),this.errors=0}else 0===r||r>=400&&r<600||r>=12e3?(i.d.error("request id "+n.id+"."+n.sends+" error "+r+" happened"),this._hitError(r),this._callProtocolErrorHandlers(n),r>=400&&r<500&&(this._conn._changeConnectStatus(i.d.Status.DISCONNECTING,null),this._conn._doDisconnect())):i.d.error("request id "+n.id+"."+n.sends+" error "+r+" happened");o||s?s&&!this._conn.connected&&this._conn._changeConnectStatus(i.d.Status.CONNFAIL,"giving-up"):this._throttledRequestHandler()}_processRequest(t){let n=this._requests[t];const r=e._getRequestStatus(n,-1);if(n.sends>this._conn.maxRetries)return void this._conn._onDisconnectTimeout();const o=n.age(),s=!isNaN(o)&&o>Math.floor(i.d.TIMEOUT*this.wait),a=null!==n.dead&&n.timeDead()>Math.floor(i.d.SECONDARY_TIMEOUT*this.wait),c=4===n.xhr.readyState&&(r<1||r>=500);if((s||a||c)&&(a&&i.d.error("Request ".concat(this._requests[t].id," timed out (secondary), restarting")),n.abort=!0,n.xhr.abort(),n.xhr.onreadystatechange=function(){},this._requests[t]=new i.d.Request(n.xmlData,n.origFunc,n.rid,n.sends),n=this._requests[t]),0===n.xhr.readyState){i.d.debug("request id "+n.id+"."+n.sends+" posting");try{const e=this._conn.options.contentType||"text/xml; charset=utf-8";n.xhr.open("POST",this._conn.service,!this._conn.options.sync),void 0!==n.xhr.setRequestHeader&&n.xhr.setRequestHeader("Content-Type",e),this._conn.options.withCredentials&&(n.xhr.withCredentials=!0)}catch(e){return i.d.error("XHR open failed: "+e.toString()),this._conn.connected||this._conn._changeConnectStatus(i.d.Status.CONNFAIL,"bad-service"),void this._conn.disconnect()}const e=()=>{if(n.date=new Date,this._conn.options.customHeaders){const e=this._conn.options.customHeaders;for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&n.xhr.setRequestHeader(t,e[t])}n.xhr.send(n.data)};if(n.sends>1){const t=1e3*Math.min(Math.floor(i.d.TIMEOUT*this.wait),Math.pow(n.sends,3));setTimeout((function(){e()}),t)}else e();n.sends++,this._conn.xmlOutput!==i.d.Connection.prototype.xmlOutput&&(n.xmlData.nodeName===this.strip&&n.xmlData.childNodes.length?this._conn.xmlOutput(n.xmlData.childNodes[0]):this._conn.xmlOutput(n.xmlData)),this._conn.rawOutput!==i.d.Connection.prototype.rawOutput&&this._conn.rawOutput(n.data)}else i.d.debug("_processRequest: "+(0===t?"first":"second")+" request has readyState of "+n.xhr.readyState)}_removeRequest(e){i.d.debug("removing request");for(let t=this._requests.length-1;t>=0;t--)e===this._requests[t]&&this._requests.splice(t,1);e.xhr.onreadystatechange=function(){},this._throttledRequestHandler()}_restartRequest(e){const t=this._requests[e];null===t.dead&&(t.dead=new Date),this._processRequest(e)}_reqToData(e){try{return e.getResponse()}catch(e){if("parsererror"!==e.message)throw e;this._conn.disconnect("strophe-parsererror")}}_sendTerminate(e){i.d.debug("_sendTerminate was called");const t=this._buildBody().attrs({type:"terminate"});e&&t.cnode(e.tree());const n=new i.d.Request(t.tree(),this._onRequestStateChange.bind(this,this._conn._dataRecv.bind(this._conn)),t.tree().getAttribute("rid"));this._requests.push(n),this._throttledRequestHandler()}_send(){clearTimeout(this._conn._idleTimeout),this._throttledRequestHandler(),this._conn._idleTimeout=setTimeout(()=>this._conn._onIdle(),100)}_sendRestart(){this._throttledRequestHandler(),clearTimeout(this._conn._idleTimeout)}_throttledRequestHandler(){this._requests?i.d.debug("_throttledRequestHandler called with "+this._requests.length+" requests"):i.d.debug("_throttledRequestHandler called with undefined requests"),this._requests&&0!==this._requests.length&&(this._requests.length>0&&this._processRequest(0),this._requests.length>1&&Math.abs(this._requests[0].rid-this._requests[1].rid)<this.window&&this._processRequest(1))}},i.d.Bosh.prototype.strip=null},function(e,t,n){"use strict";e.exports=function(){throw new Error("ws does not work in the browser. Browser clients must use the native WebSocket object")}},function(e,t,n){"use strict";n(158);var r=n(2);const i={};i.debug=r.d.LogLevel.DEBUG,i.info=r.d.LogLevel.INFO,i.warn=r.d.LogLevel.WARN,i.error=r.d.LogLevel.ERROR,i.fatal=r.d.LogLevel.FATAL,r.d.WorkerWebsocket=class extends r.d.Websocket{constructor(e){super(e),this._conn=e,this.worker=new SharedWorker(this._conn.options.worker,"Strophe XMPP Connection"),this.worker.onerror=e=>{var t;null===(t=console)||void 0===t||t.error(e),r.d.log(r.d.LogLevel.ERROR,"Shared Worker Error: ".concat(e))}}get socket(){return{send:e=>this.worker.port.postMessage(["send",e])}}_connect(){this._messageHandler=e=>this._onInitialMessage(e),this.worker.port.start(),this.worker.port.onmessage=e=>this._onWorkerMessage(e),this.worker.port.postMessage(["_connect",this._conn.service,this._conn.jid])}_attach(e){this._messageHandler=e=>this._onMessage(e),this._conn.connect_callback=e,this.worker.port.start(),this.worker.port.onmessage=e=>this._onWorkerMessage(e),this.worker.port.postMessage(["_attach",this._conn.service])}_attachCallback(e,t){e===r.d.Status.ATTACHED?(this._conn.jid=t,this._conn.authenticated=!0,this._conn.connected=!0,this._conn.restored=!0,this._conn._changeConnectStatus(r.d.Status.ATTACHED)):e===r.d.Status.ATTACHFAIL&&(this._conn.authenticated=!1,this._conn.connected=!1,this._conn.restored=!1,this._conn._changeConnectStatus(r.d.Status.ATTACHFAIL))}_disconnect(e,t){t&&this._conn.send(t);const n=Object(r.a)("close",{xmlns:r.d.NS.FRAMING});this._conn.xmlOutput(n.tree());const i=r.d.serialize(n);this._conn.rawOutput(i),this.worker.port.postMessage(["send",i]),this._conn._doDisconnect()}_onClose(e){this._conn.connected&&!this._conn.disconnecting?(r.d.error("Websocket closed unexpectedly"),this._conn._doDisconnect()):e&&1006===e.code&&!this._conn.connected?(r.d.error("Websocket closed unexcectedly"),this._conn._changeConnectStatus(r.d.Status.CONNFAIL,"The WebSocket connection could not be established or was disconnected."),this._conn._doDisconnect()):r.d.debug("Websocket closed")}_closeSocket(){this.worker.port.postMessage(["_closeSocket"])}_replaceMessageHandler(){this._messageHandler=e=>this._onMessage(e)}_onWorkerMessage(e){const{data:t}=e,n=t[0];if("_onMessage"===n)this._messageHandler(t[1]);else if(n in this)try{this[n].apply(this,e.data.slice(1))}catch(e){r.d.log(r.d.LogLevel.ERROR,e)}else if("log"===n){const e=t[1],n=t[2];r.d.log(i[e],n)}else r.d.log(r.d.LogLevel.ERROR,"Found unhandled service worker message: ".concat(t))}}},function(e,t,n){var r=n(502);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(504)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){(t=n(503)(!0)).push([e.i,"","",{version:3,sources:[],names:[],mappings:"",file:"converse.scss"}]),e.exports=t},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(s=r,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),c="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(c," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(o).concat([i]).join("\n")}var s,a,c;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o<this.length;o++){var s=this[o][0];null!=s&&(i[s]=!0)}for(var a=0;a<e.length;a++){var c=[].concat(e[a]);r&&i[c[0]]||(n&&(c[2]?c[2]="".concat(n," and ").concat(c[2]):c[2]=n),t.push(c))}},t}},function(e,t,n){var r,i,o={},s=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),a=function(e,t){return t?t.querySelector(e):document.querySelector(e)},c=function(e){var t={};return function(e,n){if("function"==typeof e)return e();if(void 0===t[e]){var r=a.call(this,e,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),l=null,u=0,d=[],h=n(505);function f(e,t){for(var n=0;n<e.length;n++){var r=e[n],i=o[r.id];if(i){i.refs++;for(var s=0;s<i.parts.length;s++)i.parts[s](r.parts[s]);for(;s<r.parts.length;s++)i.parts.push(b(r.parts[s],t))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(b(r.parts[s],t));o[r.id]={id:r.id,refs:1,parts:a}}}}function p(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],s=t.base?o[0]+t.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}function g(e,t){var n=c(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=d[d.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),d.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=c(e.insertAt.before,n);n.insertBefore(t,i)}}function m(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=d.indexOf(e);t>=0&&d.splice(t,1)}function v(e){var t=document.createElement("style");if(void 0===e.attrs.type&&(e.attrs.type="text/css"),void 0===e.attrs.nonce){var r=function(){0;return n.nc}();r&&(e.attrs.nonce=r)}return _(t,e.attrs),g(e,t),t}function _(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o="function"==typeof t.transform?t.transform(e.css):t.transform.default(e.css)))return function(){};e.css=o}if(t.singleton){var s=u++;n=l||(l=v(t)),r=S.bind(null,n,s,!1),i=S.bind(null,n,s,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",_(t,e.attrs),g(e,t),t}(t),r=E.bind(null,n,t),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(t),r=x.bind(null,n),i=function(){m(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=s()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return f(n,t),function(e){for(var r=[],i=0;i<n.length;i++){var s=n[i];(a=o[s.id]).refs--,r.push(a)}e&&f(p(e,t),t);for(i=0;i<r.length;i++){var a;if(0===(a=r[i]).refs){for(var c=0;c<a.parts.length;c++)a.parts[c]();delete o[a.id]}}}};var y,w=(y=[],function(e,t){return y[e]=t,y.filter(Boolean).join("\n")});function S(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var o=document.createTextNode(i),s=e.childNodes;s[t]&&e.removeChild(s[t]),s.length?e.insertBefore(o,s[t]):e.appendChild(o)}}function x(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}function E(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=h(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var s=new Blob([r],{type:"text/css"}),a=e.href;e.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},function(e,t,n){"use strict";n.r(t);var r=n(66),i=n.n(r),o=(n(327),n(68),n(22));var s=function(){this.__data__=[],this.size=0};var a=function(e,t){return e===t||e!=e&&t!=t};var c=function(e,t){for(var n=e.length;n--;)if(a(e[n][0],t))return n;return-1},l=Array.prototype.splice;var u=function(e){var t=this.__data__,n=c(t,e);return!(n<0)&&(n==t.length-1?t.pop():l.call(t,n,1),--this.size,!0)};var d=function(e){var t=this.__data__,n=c(t,e);return n<0?void 0:t[n][1]};var h=function(e){return c(this.__data__,e)>-1};var f=function(e,t){var n=this.__data__,r=c(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function p(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}p.prototype.clear=s,p.prototype.delete=u,p.prototype.get=d,p.prototype.has=h,p.prototype.set=f;var g=p;var m=function(){this.__data__=new g,this.size=0};var v=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n};var _=function(e){return this.__data__.get(e)};var b=function(e){return this.__data__.has(e)},y=n(6),w=y.a.Symbol,S=Object.prototype,x=S.hasOwnProperty,E=S.toString,A=w?w.toStringTag:void 0;var C=function(e){var t=x.call(e,A),n=e[A];try{e[A]=void 0;var r=!0}catch(e){}var i=E.call(e);return r&&(t?e[A]=n:delete e[A]),i},j=Object.prototype.toString;var T=function(e){return j.call(e)},O=w?w.toStringTag:void 0;var k=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O&&O in Object(e)?C(e):T(e)};var N=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};var I,M=function(e){if(!N(e))return!1;var t=k(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},R=y.a["__core-js_shared__"],D=(I=/[^.]+$/.exec(R&&R.keys&&R.keys.IE_PROTO||""))?"Symbol(src)_1."+I:"";var P=function(e){return!!D&&D in e},L=Function.prototype.toString;var z=function(e){if(null!=e){try{return L.call(e)}catch(e){}try{return e+""}catch(e){}}return""},F=/^\[object .+?Constructor\]$/,B=Function.prototype,q=Object.prototype,H=B.toString,U=q.hasOwnProperty,$=RegExp("^"+H.call(U).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var W=function(e){return!(!N(e)||P(e))&&(M(e)?$:F).test(z(e))};var G=function(e,t){return null==e?void 0:e[t]};var V=function(e,t){var n=G(e,t);return W(n)?n:void 0},J=V(y.a,"Map"),X=V(Object,"create");var Q=function(){this.__data__=X?X(null):{},this.size=0};var Y=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},K=Object.prototype.hasOwnProperty;var Z=function(e){var t=this.__data__;if(X){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return K.call(t,e)?t[e]:void 0},ee=Object.prototype.hasOwnProperty;var te=function(e){var t=this.__data__;return X?void 0!==t[e]:ee.call(t,e)};var ne=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=X&&void 0===t?"__lodash_hash_undefined__":t,this};function re(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}re.prototype.clear=Q,re.prototype.delete=Y,re.prototype.get=Z,re.prototype.has=te,re.prototype.set=ne;var ie=re;var oe=function(){this.size=0,this.__data__={hash:new ie,map:new(J||g),string:new ie}};var se=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var ae=function(e,t){var n=e.__data__;return se(t)?n["string"==typeof t?"string":"hash"]:n.map};var ce=function(e){var t=ae(this,e).delete(e);return this.size-=t?1:0,t};var le=function(e){return ae(this,e).get(e)};var ue=function(e){return ae(this,e).has(e)};var de=function(e,t){var n=ae(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function he(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}he.prototype.clear=oe,he.prototype.delete=ce,he.prototype.get=le,he.prototype.has=ue,he.prototype.set=de;var fe=he;var pe=function(e,t){var n=this.__data__;if(n instanceof g){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new fe(r)}return n.set(e,t),this.size=n.size,this};function ge(e){var t=this.__data__=new g(e);this.size=t.size}ge.prototype.clear=m,ge.prototype.delete=v,ge.prototype.get=_,ge.prototype.has=b,ge.prototype.set=pe;var me=ge;var ve=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e},_e=function(){try{var e=V(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();var be=function(e,t,n){"__proto__"==t&&_e?_e(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},ye=Object.prototype.hasOwnProperty;var we=function(e,t,n){var r=e[t];ye.call(e,t)&&a(r,n)&&(void 0!==n||t in e)||be(e,t,n)};var Se=function(e,t,n,r){var i=!n;n||(n={});for(var o=-1,s=t.length;++o<s;){var a=t[o],c=r?r(n[a],e[a],a,n,e):void 0;void 0===c&&(c=e[a]),i?be(n,a,c):we(n,a,c)}return n};var xe=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r};var Ee=function(e){return null!=e&&"object"==typeof e};var Ae=function(e){return Ee(e)&&"[object Arguments]"==k(e)},Ce=Object.prototype,je=Ce.hasOwnProperty,Te=Ce.propertyIsEnumerable,Oe=Ae(function(){return arguments}())?Ae:function(e){return Ee(e)&&je.call(e,"callee")&&!Te.call(e,"callee")},ke=Array.isArray,Ne=n(21),Ie=/^(?:0|[1-9]\d*)$/;var Me=function(e,t){var n=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==n||"symbol"!=n&&Ie.test(e))&&e>-1&&e%1==0&&e<t};var Re=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},De={};De["[object Float32Array]"]=De["[object Float64Array]"]=De["[object Int8Array]"]=De["[object Int16Array]"]=De["[object Int32Array]"]=De["[object Uint8Array]"]=De["[object Uint8ClampedArray]"]=De["[object Uint16Array]"]=De["[object Uint32Array]"]=!0,De["[object Arguments]"]=De["[object Array]"]=De["[object ArrayBuffer]"]=De["[object Boolean]"]=De["[object DataView]"]=De["[object Date]"]=De["[object Error]"]=De["[object Function]"]=De["[object Map]"]=De["[object Number]"]=De["[object Object]"]=De["[object RegExp]"]=De["[object Set]"]=De["[object String]"]=De["[object WeakMap]"]=!1;var Pe=function(e){return Ee(e)&&Re(e.length)&&!!De[k(e)]};var Le=function(e){return function(t){return e(t)}},ze=n(14),Fe=ze.a&&ze.a.isTypedArray,Be=Fe?Le(Fe):Pe,qe=Object.prototype.hasOwnProperty;var He=function(e,t){var n=ke(e),r=!n&&Oe(e),i=!n&&!r&&Object(Ne.a)(e),o=!n&&!r&&!i&&Be(e),s=n||r||i||o,a=s?xe(e.length,String):[],c=a.length;for(var l in e)!t&&!qe.call(e,l)||s&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Me(l,c))||a.push(l);return a},Ue=Object.prototype;var $e=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Ue)};var We=function(e,t){return function(n){return e(t(n))}},Ge=We(Object.keys,Object),Ve=Object.prototype.hasOwnProperty;var Je=function(e){if(!$e(e))return Ge(e);var t=[];for(var n in Object(e))Ve.call(e,n)&&"constructor"!=n&&t.push(n);return t};var Xe=function(e){return null!=e&&Re(e.length)&&!M(e)};var Qe=function(e){return Xe(e)?He(e):Je(e)};var Ye=function(e,t){return e&&Se(t,Qe(t),e)};var Ke=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},Ze=Object.prototype.hasOwnProperty;var et=function(e){if(!N(e))return Ke(e);var t=$e(e),n=[];for(var r in e)("constructor"!=r||!t&&Ze.call(e,r))&&n.push(r);return n};var tt=function(e){return Xe(e)?He(e,!0):et(e)};var nt=function(e,t){return e&&Se(t,tt(t),e)},rt=n(160);var it=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t};var ot=function(e,t){for(var n=-1,r=null==e?0:e.length,i=0,o=[];++n<r;){var s=e[n];t(s,n,e)&&(o[i++]=s)}return o};var st=function(){return[]},at=Object.prototype.propertyIsEnumerable,ct=Object.getOwnPropertySymbols,lt=ct?function(e){return null==e?[]:(e=Object(e),ot(ct(e),(function(t){return at.call(e,t)})))}:st;var ut=function(e,t){return Se(e,lt(e),t)};var dt=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},ht=We(Object.getPrototypeOf,Object),ft=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)dt(t,lt(e)),e=ht(e);return t}:st;var pt=function(e,t){return Se(e,ft(e),t)};var gt=function(e,t,n){var r=t(e);return ke(e)?r:dt(r,n(e))};var mt=function(e){return gt(e,Qe,lt)};var vt=function(e){return gt(e,tt,ft)},_t=V(y.a,"DataView"),bt=V(y.a,"Promise"),yt=V(y.a,"Set"),wt=V(y.a,"WeakMap"),St=z(_t),xt=z(J),Et=z(bt),At=z(yt),Ct=z(wt),jt=k;(_t&&"[object DataView]"!=jt(new _t(new ArrayBuffer(1)))||J&&"[object Map]"!=jt(new J)||bt&&"[object Promise]"!=jt(bt.resolve())||yt&&"[object Set]"!=jt(new yt)||wt&&"[object WeakMap]"!=jt(new wt))&&(jt=function(e){var t=k(e),n="[object Object]"==t?e.constructor:void 0,r=n?z(n):"";if(r)switch(r){case St:return"[object DataView]";case xt:return"[object Map]";case Et:return"[object Promise]";case At:return"[object Set]";case Ct:return"[object WeakMap]"}return t});var Tt=jt,Ot=Object.prototype.hasOwnProperty;var kt=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&Ot.call(e,"index")&&(n.index=e.index,n.input=e.input),n},Nt=y.a.Uint8Array;var It=function(e){var t=new e.constructor(e.byteLength);return new Nt(t).set(new Nt(e)),t};var Mt=function(e,t){var n=t?It(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)},Rt=/\w*$/;var Dt=function(e){var t=new e.constructor(e.source,Rt.exec(e));return t.lastIndex=e.lastIndex,t},Pt=w?w.prototype:void 0,Lt=Pt?Pt.valueOf:void 0;var zt=function(e){return Lt?Object(Lt.call(e)):{}};var Ft=function(e,t){var n=t?It(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)};var Bt=function(e,t,n){var r=e.constructor;switch(t){case"[object ArrayBuffer]":return It(e);case"[object Boolean]":case"[object Date]":return new r(+e);case"[object DataView]":return Mt(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return Ft(e,n);case"[object Map]":return new r;case"[object Number]":case"[object String]":return new r(e);case"[object RegExp]":return Dt(e);case"[object Set]":return new r;case"[object Symbol]":return zt(e)}},qt=Object.create,Ht=function(){function e(){}return function(t){if(!N(t))return{};if(qt)return qt(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();var Ut=function(e){return"function"!=typeof e.constructor||$e(e)?{}:Ht(ht(e))};var $t=function(e){return Ee(e)&&"[object Map]"==Tt(e)},Wt=ze.a&&ze.a.isMap,Gt=Wt?Le(Wt):$t;var Vt=function(e){return Ee(e)&&"[object Set]"==Tt(e)},Jt=ze.a&&ze.a.isSet,Xt=Jt?Le(Jt):Vt,Qt={};Qt["[object Arguments]"]=Qt["[object Array]"]=Qt["[object ArrayBuffer]"]=Qt["[object DataView]"]=Qt["[object Boolean]"]=Qt["[object Date]"]=Qt["[object Float32Array]"]=Qt["[object Float64Array]"]=Qt["[object Int8Array]"]=Qt["[object Int16Array]"]=Qt["[object Int32Array]"]=Qt["[object Map]"]=Qt["[object Number]"]=Qt["[object Object]"]=Qt["[object RegExp]"]=Qt["[object Set]"]=Qt["[object String]"]=Qt["[object Symbol]"]=Qt["[object Uint8Array]"]=Qt["[object Uint8ClampedArray]"]=Qt["[object Uint16Array]"]=Qt["[object Uint32Array]"]=!0,Qt["[object Error]"]=Qt["[object Function]"]=Qt["[object WeakMap]"]=!1;var Yt=function e(t,n,r,i,o,s){var a,c=1&n,l=2&n,u=4&n;if(r&&(a=o?r(t,i,o,s):r(t)),void 0!==a)return a;if(!N(t))return t;var d=ke(t);if(d){if(a=kt(t),!c)return it(t,a)}else{var h=Tt(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(Object(Ne.a)(t))return Object(rt.a)(t,c);if("[object Object]"==h||"[object Arguments]"==h||f&&!o){if(a=l||f?{}:Ut(t),!c)return l?pt(t,nt(a,t)):ut(t,Ye(a,t))}else{if(!Qt[h])return o?t:{};a=Bt(t,h,c)}}s||(s=new me);var p=s.get(t);if(p)return p;s.set(t,a),Xt(t)?t.forEach((function(i){a.add(e(i,n,r,i,t,s))})):Gt(t)&&t.forEach((function(i,o){a.set(o,e(i,n,r,o,t,s))}));var g=u?l?vt:mt:l?keysIn:Qe,m=d?void 0:g(t);return ve(m||t,(function(i,o){m&&(i=t[o=i]),we(a,o,e(i,n,r,o,t,s))})),a};var Kt=function(e){return Yt(e,5)};var Zt=function(e){return"string"==typeof e||!ke(e)&&Ee(e)&&"[object String]"==k(e)};var en=function(e,t){t&&e.then((function(e){t(null,e)}),(function(e){t(e)}))};function tn(){if(arguments.length&&"function"==typeof arguments[arguments.length-1])return arguments[arguments.length-1]}function nn(e){return"string"!=typeof e&&(console.warn("".concat(e," used as a key, but it is not a string.")),e=String(e)),e}var rn=function(e,t){e=e||[],t=t||{};try{return new Blob(e,t)}catch(i){if("TypeError"!==i.name)throw i;for(var n=new("undefined"!=typeof BlobBuilder?BlobBuilder:"undefined"!=typeof MSBlobBuilder?MSBlobBuilder:"undefined"!=typeof MozBlobBuilder?MozBlobBuilder:WebKitBlobBuilder),r=0;r<e.length;r+=1)n.append(e[r]);return n.getBlob(t.type)}},on="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",sn=/^~~local_forage_type~([^~]+)~/,an="__lfsc__:".length,cn=an+"arbf".length,ln=Object.prototype.toString;function un(e){var t,n,r,i,o,s=.75*e.length,a=e.length,c=0;"="===e[e.length-1]&&(s--,"="===e[e.length-2]&&s--);var l=new ArrayBuffer(s),u=new Uint8Array(l);for(t=0;t<a;t+=4)n=on.indexOf(e[t]),r=on.indexOf(e[t+1]),i=on.indexOf(e[t+2]),o=on.indexOf(e[t+3]),u[c++]=n<<2|r>>4,u[c++]=(15&r)<<4|i>>2,u[c++]=(3&i)<<6|63&o;return l}function dn(e){var t,n=new Uint8Array(e),r="";for(t=0;t<n.length;t+=3)r+=on[n[t]>>2],r+=on[(3&n[t])<<4|n[t+1]>>4],r+=on[(15&n[t+1])<<2|n[t+2]>>6],r+=on[63&n[t+2]];return n.length%3==2?r=r.substring(0,r.length-1)+"=":n.length%3==1&&(r=r.substring(0,r.length-2)+"=="),r}var hn={serialize:function(e,t){var n="";if(e&&(n=ln.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===ln.call(e.buffer))){var r,i="__lfsc__:";e instanceof ArrayBuffer?(r=e,i+="arbf"):(r=e.buffer,"[object Int8Array]"===n?i+="si08":"[object Uint8Array]"===n?i+="ui08":"[object Uint8ClampedArray]"===n?i+="uic8":"[object Int16Array]"===n?i+="si16":"[object Uint16Array]"===n?i+="ur16":"[object Int32Array]"===n?i+="si32":"[object Uint32Array]"===n?i+="ui32":"[object Float32Array]"===n?i+="fl32":"[object Float64Array]"===n?i+="fl64":t(new Error("Failed to get type for BinaryArray"))),t(i+dn(r))}else if("[object Blob]"===n){var o=new FileReader;o.onload=function(){var n="~~local_forage_type~"+e.type+"~"+dn(this.result);t("__lfsc__:blob"+n)},o.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}},deserialize:function(e){if("__lfsc__:"!==e.substring(0,an))return JSON.parse(e);var t,n=e.substring(cn),r=e.substring(an,cn);if("blob"===r&&sn.test(n)){var i=n.match(sn);t=i[1],n=n.substring(i[0].length)}var o=un(n);switch(r){case"arbf":return o;case"blob":return rn([o],{type:t});case"si08":return new Int8Array(o);case"ui08":return new Uint8Array(o);case"uic8":return new Uint8ClampedArray(o);case"si16":return new Int16Array(o);case"ur16":return new Uint16Array(o);case"si32":return new Int32Array(o);case"ui32":return new Uint32Array(o);case"fl32":return new Float32Array(o);case"fl64":return new Float64Array(o);default:throw new Error("Unkown type: "+r)}},stringToBuffer:un,bufferToString:dn};function fn(e,t){let n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}const pn={serializer:{serialize:hn.serialize,deserialize:hn.deserialize}};var gn={_driver:"sessionStorageWrapper",_initStorage:function(e){if(pn.keyPrefix=fn(e,this._defaultConfig),e)for(const t in e)pn[t]=e[t]},_support:function(){try{if(sessionStorage&&"setItem"in sessionStorage)return!0}catch(e){console.log(e)}return!1}(),iterate:function(e,t){const n=this.ready().then((function(){const t=pn.keyPrefix,n=t.length,r=sessionStorage.length;let i=1;for(let o=0;o<r;o++){const r=sessionStorage.key(o);if(0!==r.indexOf(t))continue;let s=sessionStorage.getItem(r);if(s&&(s=pn.serializer.deserialize(s)),s=e(s,r.substring(n),i++),void 0!==s)return s}}));return en(n,t),n},getItem:function(e,t){e=nn(e);const n=this.ready().then((function(){let t=sessionStorage.getItem(pn.keyPrefix+e);return t&&(t=pn.serializer.deserialize(t)),t}));return en(n,t),n},setItem:function(e,t,n){e=nn(e);const r=this.ready().then((function(){void 0===t&&(t=null);const n=t;return new Promise((function(r,i){pn.serializer.serialize(t,(function(t,o){if(o)i(o);else try{sessionStorage.setItem(pn.keyPrefix+e,t),r(n)}catch(e){"QuotaExceededError"!==e.name&&"NS_ERROR_DOM_QUOTA_REACHED"!==e.name||i(e),i(e)}}))}))}));return en(r,n),r},removeItem:function(e,t){e=nn(e);const n=this.ready().then((function(){sessionStorage.removeItem(pn.keyPrefix+e)}));return en(n,t),n},clear:function(e){const t=this.ready().then((function(){const e=pn.keyPrefix;for(let t=sessionStorage.length-1;t>=0;t--){const n=sessionStorage.key(t);0===n.indexOf(e)&&sessionStorage.removeItem(n)}}));return en(t,e),t},length:function(e){const t=this.keys().then((function(e){return e.length}));return en(t,e),t},key:function(e,t){const n=this.ready().then((function(){let t;try{t=sessionStorage.key(e)}catch(e){t=null}return t&&(t=t.substring(pn.keyPrefix.length)),t}));return en(n,t),n},keys:function(e){const t=this.ready().then((function(){const e=sessionStorage.length,t=[];for(let n=0;n<e;n++){const e=sessionStorage.key(n);0===e.indexOf(pn.keyPrefix)&&t.push(e.substring(pn.keyPrefix.length))}return t}));return en(t,e),t},dropInstance:function(e,t){if(t=tn.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){const t=this.config();e.name=e.name||t.name,e.storeName=e.storeName||t.storeName}const n=this;let r;return r=e.name?new Promise((function(t){e.storeName?t(fn(e,n._defaultConfig)):t("".concat(e.name,"/"))})).then((function(e){for(let t=sessionStorage.length-1;t>=0;t--){const n=sessionStorage.key(t);0===n.indexOf(e)&&sessionStorage.removeItem(n)}})):Promise.reject(new Error("Invalid arguments")),en(r,t),r}};const mn={};var vn={_driver:"noStorageWrapper",_initStorage:function(e){if(mn.keyPrefix=function(e,t){let n=e.name+"/";return e.storeName!==t.storeName&&(n+=e.storeName+"/"),n}(e,this._defaultConfig),e)for(const t in e)mn[t]=e[t]},_support:!0,iterate:function(e,t){const n=Promise.resolve();return en(n,t),n},getItem:function(e,t){const n=this.ready().then((function(){}));return en(n,t),n},setItem:function(e,t,n){const r=Promise.resolve(t);return en(r,n),r},removeItem:function(e,t){const n=Promise.resolve();return en(n,t),n},clear:function(e){const t=Promise.resolve();return en(t,e),t},length:function(e){const t=this.keys().then((function(e){return e.length}));return en(t,e),t},key:function(e,t){const n=this.ready().then((function(){return null}));return en(n,t),n},keys:function(e){const t=this.ready().then((function(){return[]}));return en(t,e),t},dropInstance:function(e,t){if(t=tn.apply(this,arguments),!(e="function"!=typeof e&&e||{}).name){const t=this.config();e.name=e.name||t.name,e.storeName=e.storeName||t.storeName}let n;return n=e.name?Promise.resolve():Promise.reject(new Error("Invalid arguments")),en(n,t),n}};function _n(){return(65536*(1+Math.random())|0).toString(16).substring(1)}class bn{constructor(e,t){if("local"===t&&!window.localStorage)throw new Error("Skeletor.storage: Environment does not support localStorage.");if("session"===t&&!window.sessionStorage)throw new Error("Skeletor.storage: Environment does not support sessionStorage.");Zt(t)?this.storeInitialized=this.initStore(t):(this.store=t,this.storeInitialized=Promise.resolve()),this.name=e}async initStore(e){if("session"===e)o.setDriver(gn._driver);else if("local"===e)await o.config({driver:o.LOCALSTORAGE});else if("in_memory"===e)o.setDriver(vn._driver);else if("indexed"!==e)throw new Error("Skeletor.storage: No storage type was specified");this.store=o}async clear(){await this.store.removeItem(this.name).catch(e=>console.error(e));const e=new RegExp("^".concat(this.name,"-")),t=(await this.store.keys()).filter(t=>e.test(t));await Promise.all(t.map(e=>this.store.removeItem(e).catch(e=>console.error(e))))}sync(e){const t=this;async function n(e,n,r){let i,o,s,a;const c=n.collection;["patch","update"].includes(e)&&(a=Kt(n.attributes)),await t.storeInitialized;try{const o=n.attributes;switch(e){case"read":i=void 0!==n.id?await t.find(n):await t.findAll();break;case"create":i=await t.create(n,r);break;case"patch":case"update":r.wait&&(n.attributes=a),s=t.update(n,r),r.wait&&(n.attributes=o),i=await s;break;case"delete":i=await t.destroy(n,c)}}catch(e){o=22===e.code&&0===t.getStorageSize()?"Private browsing is unsupported":e.message}if(i){if(r&&r.success){const t="read"===e?i:null;r.success(t,r)}}else o=o||"Record Not Found",r&&r.error&&r.error(o)}return n.__name__="localSync",n}removeCollectionReference(e,t){if(!t)return;const n=t.filter(t=>t.id!==e.id).map(e=>this.getItemName(e.id));return this.store.setItem(this.name,n)}addCollectionReference(e,t){if(!t)return;const n=t.map(e=>this.getItemName(e.id)),r=this.getItemName(e.id);return n.includes(r)||n.push(r),this.store.setItem(this.name,n)}async save(e,t={}){const n=this.getItemName(e.id),r=await this.store.setItem(n,e.toJSON());return await this.addCollectionReference(e,e.collection),r}create(e,t){return e.id||(e.id=_n()+_n()+"-"+_n()+"-"+_n()+"-"+_n()+"-"+_n()+_n()+_n(),e.set(e.idAttribute,e.id,t)),this.save(e)}update(e,t){return this.save(e,t)}find(e){return this.store.getItem(this.getItemName(e.id))}async findAll(){const e=await this.store.getItem(this.name);return e&&e.length?Promise.all(e.map(e=>this.store.getItem(e))):[]}async destroy(e,t){return await this.store.removeItem(this.getItemName(e.id)),await this.removeCollectionReference(e,t),e}getStorageSize(){return this.store.length}getItemName(e){return this.name+"-"+e}}bn.IN_MEMORY=vn._driver,bn.memoryStorageInitialized=o.defineDriver(vn),bn.sessionStorageInitialized=o.defineDriver(gn),bn.localForage=o;var yn=bn,wn=n(161),Sn=n.n(wn),xn=n(5),En=n.n(xn),An=Function.prototype,Cn=Object.prototype,jn=An.toString,Tn=Cn.hasOwnProperty,On=jn.call(Object);var kn=function(e){if(!Ee(e)||"[object Object]"!=k(e))return!1;var t=ht(e);if(null===t)return!0;var n=Tn.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&jn.call(n)==On};var Nn,In,Mn,Rn,Dn=function(e){return Ee(e)&&1===e.nodeType&&!kn(e)};const Pn={debug:0,info:1,warn:2,error:3,fatal:4},Ln=Object.assign({debug:(null===(Nn=console)||void 0===Nn?void 0:Nn.log)?console.log.bind(console):function(){},error:(null===(In=console)||void 0===In?void 0:In.log)?console.log.bind(console):function(){},info:(null===(Mn=console)||void 0===Mn?void 0:Mn.log)?console.log.bind(console):function(){},warn:(null===(Rn=console)||void 0===Rn?void 0:Rn.log)?console.log.bind(console):function(){}},console);var zn={setLogLevel(e){if(!["debug","info","warn","error","fatal"].includes(e))throw new Error("Invalid loglevel: ".concat(e));this.loglevel=e},log(e,t,n=""){if(Pn[t]<Pn[this.loglevel])return;"error"===t||"fatal"===t?n=n||"color: maroon":"debug"===t&&(n=n||"color: green"),e instanceof Error?e=e.stack:Dn(e)&&(e=e.outerHTML);const r=n?"%c":"";"error"===t?Ln.error("".concat(r," ERROR: ").concat(e),n):"warn"===t?Ln.warn("".concat(r," ").concat((new Date).toISOString()," WARNING: ").concat(e),n):"fatal"===t?Ln.error("".concat(r," FATAL: ").concat(e),n):"debug"===t?Ln.debug("".concat(r," ").concat((new Date).toISOString()," DEBUG: ").concat(e),n):Ln.info("".concat(r," ").concat((new Date).toISOString()," INFO: ").concat(e),n)},debug(e,t){this.log(e,"debug",t)},error(e,t){this.log(e,"error",t)},info(e,t){this.log(e,"info",t)},warn(e,t){this.log(e,"warn",t)},fatal(e,t){this.log(e,"fatal",t)}},Fn=n(162),Bn=n.n(Fn),qn=n(44),Hn=n.n(qn),Un=n(45),$n=n.n(Un),Wn=n(36),Gn=n.n(Wn),Vn=n(163),Jn=n.n(Vn),Xn=n(62),Qn=n.n(Xn),Yn=n(164),Kn=n.n(Yn),Zn=n(33),er=n.n(Zn),tr=n(93),nr=n.n(tr),rr=n(165),ir=n.n(rr),or=n(166),sr=n.n(or),ar=n(92),cr=n.n(ar);function lr(e,t){this.name=t,this.plugged=e,void 0===this.plugged.__super__?this.plugged.__super__={}:"string"==typeof this.plugged.__super__&&(this.plugged.__super__={__string__:this.plugged.__super__}),this.plugged.__super__[t]=this.plugged,this.plugins={},this.initialized_plugins=[]}$n()(lr.prototype,{wrappedOverride:function(e,t,n,r){return"function"==typeof n&&(void 0===this.__super__&&(this.__super__=r),this.__super__[e]=n.bind(this)),t.apply(this,Bn()(arguments,4))},_overrideAttribute:function(e,t){let n=t.overrides[e];if("function"==typeof n){let t={};t[this.name]=this.plugged;let r=nr()(this.wrappedOverride,e,n,this.plugged[e],t);this.plugged[e]=r}else this.plugged[e]=n},_extendObject:function(e,t){e.prototype.__super__||(e.prototype.__super__={},e.prototype.__super__[this.name]=this.plugged);let n=this;Hn()(t,(function(t,r){if("events"===r)e.prototype[r]=$n()(t,e.prototype[r]);else if("function"==typeof t){let i={};i[n.name]=n.plugged;let o=nr()(n.wrappedOverride,r,t,e.prototype[r],i);e.prototype[r]=o}else e.prototype[r]=t}))},loadPluginDependencies:function(e){Hn()(e.dependencies,t=>{let n=this.plugins[t];if(n){if(Gn()(n.dependencies,e.__name__))throw'Found a circular dependency between the plugins "'+e.__name__+'" and "'+t+'"';this.initializePlugin(n)}else this.throwUndefinedDependencyError('Could not find dependency "'+t+'" for the plugin "'+e.__name__+"\". If it's needed, make sure it's loaded by require.js")})},throwUndefinedDependencyError:function(e){if(this.plugged.strict_plugin_dependencies)throw e;console.warn?console.warn(e):console.log(e)},applyOverrides:function(e){Hn()(Object.keys(e.overrides||{}),t=>{let n=e.overrides[t];"object"==typeof n?void 0===this.plugged[t]?this.throwUndefinedDependencyError('Plugin "'.concat(e.__name__,'" tried to override "').concat(t,"\" but it's not found.")):this._extendObject(this.plugged[t],n):this._overrideAttribute(t,e)})},initializePlugin:function(e){Gn()(er()(this.allowed_plugins),e.__name__)&&(Gn()(this.initialized_plugins,e.__name__)||(Jn()(e.enabled)&&e.enabled||Qn()(e.enabled)&&e.enabled(this.plugged)||Kn()(e.enabled))&&($n()(e,this.properties),e.dependencies&&this.loadPluginDependencies(e),this.applyOverrides(e),"function"==typeof e.initialize&&e.initialize.bind(e)(this),this.initialized_plugins.push(e.__name__)))},registerPlugin:function(e,t){if(e in this.plugins)throw new Error("Error: Plugin name "+e+" is already taken");t.__name__=e,this.plugins[e]=t},initializePlugins:function(e={},t=[],n=[]){sr()(this.plugins)&&(this.properties=e,this.allowed_plugins=ir()(this.plugins,(function(e,r){return(!t.length||t.length&&Gn()(t,r))&&!Gn()(n,r)})),Hn()(cr()(this.allowed_plugins),this.initializePlugin.bind(this)))}});var ur={enable:function(e,t,n){void 0===n&&(n="pluginSocket"),void 0===t&&(t="plugged");let r={};return r[n]=new lr(e,t),$n()(e,r)}},dr=n(167),hr=n.n(dr),fr=n(168),pr=n.n(fr),gr=n(3),mr=n.n(gr),vr=n(0);var _r=function(e,t){var n=Ht(e);return null==t?n:Ye(n,t)};var br=function(e){return e};var yr=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)},wr=Math.max;var Sr=function(e,t,n){return t=wr(void 0===t?e.length-1:t,0),function(){for(var r=arguments,i=-1,o=wr(r.length-t,0),s=Array(o);++i<o;)s[i]=r[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=r[i];return a[t]=n(s),yr(e,this,a)}};var xr=function(e){return function(){return e}},Er=_e?function(e,t){return _e(e,"toString",{configurable:!0,enumerable:!1,value:xr(t),writable:!0})}:br,Ar=Date.now;var Cr=function(e){var t=0,n=0;return function(){var r=Ar(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Er);var jr=function(e,t){return Cr(Sr(e,t,br),e+"")};var Tr=function(e,t,n){if(!N(n))return!1;var r=typeof t;return!!("number"==r?Xe(n)&&Me(t,n.length):"string"==r&&t in n)&&a(n[t],e)};var Or=function(e){return jr((function(t,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,s&&Tr(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),t=Object(t);++r<i;){var a=n[r];a&&e(t,a,r,o)}return t}))}((function(e,t){Se(t,tt(t),e)})),kr=Object.prototype.hasOwnProperty;var Nr=function(e,t){return null!=e&&kr.call(e,t)};var Ir=function(e){return"symbol"==typeof e||Ee(e)&&"[object Symbol]"==k(e)},Mr=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Rr=/^\w*$/;var Dr=function(e,t){if(ke(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Ir(e))||(Rr.test(e)||!Mr.test(e)||null!=t&&e in Object(t))};function Pr(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=e.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Pr.Cache||fe),n}Pr.Cache=fe;var Lr=Pr;var zr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fr=/\\(\\)?/g,Br=function(e){var t=Lr(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(zr,(function(e,n,r,i){t.push(r?i.replace(Fr,"$1"):n||e)})),t}));var qr=function(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Hr=w?w.prototype:void 0,Ur=Hr?Hr.toString:void 0;var $r=function e(t){if("string"==typeof t)return t;if(ke(t))return qr(t,e)+"";if(Ir(t))return Ur?Ur.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n};var Wr=function(e){return null==e?"":$r(e)};var Gr=function(e,t){return ke(e)?e:Dr(e,t)?[e]:Br(Wr(e))};var Vr=function(e){if("string"==typeof e||Ir(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t};var Jr=function(e,t,n){for(var r=-1,i=(t=Gr(t,e)).length,o=!1;++r<i;){var s=Vr(t[r]);if(!(o=null!=e&&n(e,s)))break;e=e[s]}return o||++r!=i?o:!!(i=null==e?0:e.length)&&Re(i)&&Me(s,i)&&(ke(e)||Oe(e))};var Xr=function(e,t){return null!=e&&Jr(e,t,Nr)};var Qr=function(e,t,n){var r=-1,i=(t=Gr(t,e)).length;for(i||(i=1,e=void 0);++r<i;){var o=null==e?void 0:e[Vr(t[r])];void 0===o&&(r=i,o=n),e=M(o)?o.call(e):o}return e};Error;function Yr(e,t){const n=this;let r;return r=e&&Xr(e,"constructor")?e.constructor:function(){return n.apply(this,arguments)},Or(r,n,t),r.prototype=_r(n.prototype,e),r.prototype.constructor=r,r.__super__=n.prototype,r}function Kr(){const e={isResolved:!1,isPending:!0,isRejected:!1},t=new Promise((t,n)=>{e.resolve=t,e.reject=n});return Object.assign(t,e),t.then((function(e){return t.isResolved=!0,t.isPending=!1,t.isRejected=!1,e}),(function(e){throw t.isResolved=!1,t.isPending=!1,t.isRejected=!0,e})),t}function Zr(){throw new Error('A "url" property or function must be specified')}function ei(e,t){const n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger("error",e,r,t)}}const ti={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};function ni(e){const t=Qr(e,"browserStorage")||Qr(e.collection,"browserStorage");return t?t.sync():ri}function ri(e,t,n={}){const r={type:ti[e],dataType:"json"};n.url||(r.url=Qr(t,"url")||Zr()),null!=n.data||!t||"create"!==e&&"update"!==e&&"patch"!==e||(r.contentType="application/json",r.data=JSON.stringify(n.attrs||t.toJSON(n))),"GET"!==r.type&&(r.processData=!1);const i=n.error;n.error=function(e,t,r){n.textStatus=t,n.errorThrown=r,i&&i.call(n.context,e,t,r)};const o=n.xhr=function(){return fetch.apply(this,arguments)}(Or(r,n));return t.trigger("request",t,o,n),o}var ii=Object.prototype.hasOwnProperty;var oi=function(e){if(null==e)return!0;if(Xe(e)&&(ke(e)||"string"==typeof e||"function"==typeof e.splice||Object(Ne.a)(e)||Be(e)||Oe(e)))return!e.length;var t=Tt(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if($e(e))return!Je(e).length;for(var n in e)if(ii.call(e,n))return!1;return!0},si=/^\s+|\s+$/g,ai=/^[-+]0x[0-9a-f]+$/i,ci=/^0b[01]+$/i,li=/^0o[0-7]+$/i,ui=parseInt;var di=function(e){if("number"==typeof e)return e;if(Ir(e))return NaN;if(N(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=N(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(si,"");var n=ci.test(e);return n||li.test(e)?ui(e.slice(2),n?2:8):ai.test(e)?NaN:+e};var hi=function(e){return e?(e=di(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0};var fi=function(e){var t=hi(e),n=t%1;return t==t?n?t-n:t:0};var pi=function(e,t){var n;if("function"!=typeof t)throw new TypeError("Expected a function");return e=fi(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=void 0),n}};var gi=function(e){return pi(2,e)},mi=0;var vi=function(e){var t=++mi;return Wr(e)+t};const _i={},bi=/\s+/;let yi;const wi=function(e,t,n,r,i){let o,s=0;if(n&&"object"==typeof n){void 0!==r&&"context"in i&&void 0===i.context&&(i.context=r);for(o=Qe(n);s<o.length;s++)t=wi(e,t,o[s],n[o[s]],i)}else if(n&&bi.test(n))for(o=n.split(bi);s<o.length;s++)t=e(t,o[s],r,i);else t=e(t,n,r,i);return t};_i.on=function(e,t,n){if(this._events=wi(Si,this._events||{},e,t,{context:n,ctx:this,listening:yi}),yi){(this._listeners||(this._listeners={}))[yi.id]=yi,yi.interop=!1}return this},_i.listenTo=function(e,t,n){if(!e)return this;const r=e._listenId||(e._listenId=vi("l")),i=this._listeningTo||(this._listeningTo={});let o=yi=i[r];o||(this._listenId||(this._listenId=vi("l")),o=yi=i[r]=new Ti(this,e));const s=xi(e,t,n,this);if(yi=void 0,s)throw s;return o.interop&&o.on(t,n),this};const Si=function(e,t,n,r){if(n){const i=e[t]||(e[t]=[]),o=r.context,s=r.ctx,a=r.listening;a&&a.count++,i.push({callback:n,context:o,ctx:o||s,listening:a})}return e},xi=function(e,t,n,r){try{e.on(t,n,r)}catch(e){return e}};_i.off=function(e,t,n){return this._events?(this._events=wi(Ei,this._events,e,t,{context:n,listeners:this._listeners}),this):this},_i.stopListening=function(e,t,n){const r=this._listeningTo;if(!r)return this;const i=e?[e._listenId]:Qe(r);for(let e=0;e<i.length;e++){const o=r[i[e]];if(!o)break;o.obj.off(t,n,this),o.interop&&o.off(t,n)}return oi(r)&&(this._listeningTo=void 0),this};const Ei=function(e,t,n,r){if(!e)return;const i=r.context,o=r.listeners;let s,a=0;if(t||i||n){for(s=t?[t]:Qe(e);a<s.length;a++){const r=e[t=s[a]];if(!r)break;const o=[];for(let e=0;e<r.length;e++){const s=r[e];if(n&&n!==s.callback&&n!==s.callback._callback||i&&i!==s.context)o.push(s);else{const e=s.listening;e&&e.off(t,n)}}o.length?e[t]=o:delete e[t]}return e}for(s=Qe(o);a<s.length;a++)o[s[a]].cleanup()};_i.once=function(e,t,n){const r=wi(Ai,{},e,t,this.off.bind(this));return"string"==typeof e&&null==n&&(t=void 0),this.on(r,t,n)},_i.listenToOnce=function(e,t,n){const r=wi(Ai,{},t,n,this.stopListening.bind(this,e));return this.listenTo(e,r)};const Ai=function(e,t,n,r){if(n){const i=e[t]=gi((function(){r(t,i),n.apply(this,arguments)}));i._callback=n}return e};_i.trigger=function(e){if(!this._events)return this;const t=Math.max(0,arguments.length-1),n=Array(t);for(let e=0;e<t;e++)n[e]=arguments[e+1];return wi(Ci,this._events,e,void 0,n),this};const Ci=function(e,t,n,r){if(e){const n=e[t];let i=e.all;n&&i&&(i=i.slice()),n&&ji(n,r),i&&ji(i,[t].concat(r))}return e},ji=function(e,t){let n,r=-1;const i=e.length,o=t[0],s=t[1],a=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,s,a);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}},Ti=function(e,t){this.id=e._listenId,this.listener=e,this.obj=t,this.interop=!0,this.count=0,this._events=void 0};Ti.prototype.on=_i.on,Ti.prototype.off=function(e,t){let n;this.interop?(this._events=wi(Ei,this._events,e,t,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},Ti.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},_i.bind=_i.on,_i.unbind=_i.off;var Oi=function(e){return Yt(e,4)},ki=Object.prototype,Ni=ki.hasOwnProperty,Ii=jr((function(e,t){e=Object(e);var n=-1,r=t.length,i=r>2?t[2]:void 0;for(i&&Tr(t[0],t[1],i)&&(r=1);++n<r;)for(var o=t[n],s=tt(o),c=-1,l=s.length;++c<l;){var u=s[c],d=e[u];(void 0===d||a(d,ki[u])&&!Ni.call(e,u))&&(e[u]=o[u])}return e}));var Mi=function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)},Ri=jr((function(e,t){return Mi(e,1,t)}));var Di=function(e){return function(t){return null==e?void 0:e[t]}}({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"}),Pi=/[&<>"']/g,Li=RegExp(Pi.source);var zi=function(e){return(e=Wr(e))&&Li.test(e)?e.replace(Pi,Di):e};var Fi=function(e){return function(t,n,r){for(var i=-1,o=Object(t),s=r(t),a=s.length;a--;){var c=s[e?a:++i];if(!1===n(o[c],c,o))break}return t}},Bi=Fi();var qi=function(e,t){return e&&Bi(e,t,Qe)};var Hi=function(e,t,n,r){return qi(e,(function(e,i,o){t(r,n(e),i,o)})),r};var Ui=function(e,t){return function(n,r){return Hi(n,e,t(r),{})}},$i=Object.prototype.toString,Wi=Ui((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=$i.call(t)),e[t]=n}),xr(br));var Gi=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};var Vi=function(e){return this.__data__.has(e)};function Ji(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new fe;++t<n;)this.add(e[t])}Ji.prototype.add=Ji.prototype.push=Gi,Ji.prototype.has=Vi;var Xi=Ji;var Qi=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1};var Yi=function(e,t){return e.has(t)};var Ki=function(e,t,n,r,i,o){var s=1&n,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))return!1;var l=o.get(e);if(l&&o.get(t))return l==t;var u=-1,d=!0,h=2&n?new Xi:void 0;for(o.set(e,t),o.set(t,e);++u<a;){var f=e[u],p=t[u];if(r)var g=s?r(p,f,u,t,e,o):r(f,p,u,e,t,o);if(void 0!==g){if(g)continue;d=!1;break}if(h){if(!Qi(t,(function(e,t){if(!Yi(h,t)&&(f===e||i(f,e,n,r,o)))return h.push(t)}))){d=!1;break}}else if(f!==p&&!i(f,p,n,r,o)){d=!1;break}}return o.delete(e),o.delete(t),d};var Zi=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n};var eo=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},to=w?w.prototype:void 0,no=to?to.valueOf:void 0;var ro=function(e,t,n,r,i,o,s){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!o(new Nt(e),new Nt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var c=Zi;case"[object Set]":var l=1&r;if(c||(c=eo),e.size!=t.size&&!l)return!1;var u=s.get(e);if(u)return u==t;r|=2,s.set(e,t);var d=Ki(c(e),c(t),r,i,o,s);return s.delete(e),d;case"[object Symbol]":if(no)return no.call(e)==no.call(t)}return!1},io=Object.prototype.hasOwnProperty;var oo=function(e,t,n,r,i,o){var s=1&n,a=mt(e),c=a.length;if(c!=mt(t).length&&!s)return!1;for(var l=c;l--;){var u=a[l];if(!(s?u in t:io.call(t,u)))return!1}var d=o.get(e);if(d&&o.get(t))return d==t;var h=!0;o.set(e,t),o.set(t,e);for(var f=s;++l<c;){var p=e[u=a[l]],g=t[u];if(r)var m=s?r(g,p,u,t,e,o):r(p,g,u,e,t,o);if(!(void 0===m?p===g||i(p,g,n,r,o):m)){h=!1;break}f||(f="constructor"==u)}if(h&&!f){var v=e.constructor,_=t.constructor;v==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _||(h=!1)}return o.delete(e),o.delete(t),h},so=Object.prototype.hasOwnProperty;var ao=function(e,t,n,r,i,o){var s=ke(e),a=ke(t),c=s?"[object Array]":Tt(e),l=a?"[object Array]":Tt(t),u="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),d="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),h=c==l;if(h&&Object(Ne.a)(e)){if(!Object(Ne.a)(t))return!1;s=!0,u=!1}if(h&&!u)return o||(o=new me),s||Be(e)?Ki(e,t,n,r,i,o):ro(e,t,c,n,r,i,o);if(!(1&n)){var f=u&&so.call(e,"__wrapped__"),p=d&&so.call(t,"__wrapped__");if(f||p){var g=f?e.value():e,m=p?t.value():t;return o||(o=new me),i(g,m,n,r,o)}}return!!h&&(o||(o=new me),oo(e,t,n,r,i,o))};var co=function e(t,n,r,i,o){return t===n||(null==t||null==n||!Ee(t)&&!Ee(n)?t!=t&&n!=n:ao(t,n,r,i,e,o))};var lo=function(e,t){return co(e,t)};var uo=function(e,t,n,r){var i=n.length,o=i,s=!r;if(null==e)return!o;for(e=Object(e);i--;){var a=n[i];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++i<o;){var c=(a=n[i])[0],l=e[c],u=a[1];if(s&&a[2]){if(void 0===l&&!(c in e))return!1}else{var d=new me;if(r)var h=r(l,u,c,e,t,d);if(!(void 0===h?co(u,l,3,r,d):h))return!1}}return!0};var ho=function(e){return e==e&&!N(e)};var fo=function(e){for(var t=Qe(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,ho(i)]}return t};var po=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}};var go=function(e){var t=fo(e);return 1==t.length&&t[0][2]?po(t[0][0],t[0][1]):function(n){return n===e||uo(n,e,t)}};var mo=function(e,t){for(var n=0,r=(t=Gr(t,e)).length;null!=e&&n<r;)e=e[Vr(t[n++])];return n&&n==r?e:void 0};var vo=function(e,t,n){var r=null==e?void 0:mo(e,t);return void 0===r?n:r};var _o=function(e,t){return null!=e&&t in Object(e)};var bo=function(e,t){return null!=e&&Jr(e,t,_o)};var yo=function(e,t){return Dr(e)&&ho(t)?po(Vr(e),t):function(n){var r=vo(n,e);return void 0===r&&r===t?bo(n,e):co(t,r,3)}};var wo=function(e){return function(t){return null==t?void 0:t[e]}};var So=function(e){return function(t){return mo(t,e)}};var xo=function(e){return Dr(e)?wo(Vr(e)):So(e)};var Eo=function(e){return"function"==typeof e?e:null==e?br:"object"==typeof e?ke(e)?yo(e[0],e[1]):go(e):xo(e)};var Ao=function(e){return Eo("function"==typeof e?e:Yt(e,1))};var Co=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var jo=function(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(i);++r<i;)o[r]=e[r+t];return o};var To=function(e,t){return t.length<2?e:mo(e,jo(t,0,-1))};var Oo=function(e,t){return t=Gr(t,e),null==(e=To(e,t))||delete e[Vr(Co(t))]};var ko=function(e){return kn(e)?void 0:e},No=w?w.isConcatSpreadable:void 0;var Io=function(e){return ke(e)||Oe(e)||!!(No&&e&&e[No])};var Mo=function e(t,n,r,i,o){var s=-1,a=t.length;for(r||(r=Io),o||(o=[]);++s<a;){var c=t[s];n>0&&r(c)?n>1?e(c,n-1,r,i,o):dt(o,c):i||(o[o.length]=c)}return o};var Ro=function(e){return(null==e?0:e.length)?Mo(e,1):[]};var Do=function(e){return Cr(Sr(e,void 0,Ro),e+"")},Po=Do((function(e,t){var n={};if(null==e)return n;var r=!1;t=qr(t,(function(t){return t=Gr(t,e),r||(r=t.length>1),t})),Se(e,vt(e),n),r&&(n=Yt(n,7,ko));for(var i=t.length;i--;)Oo(n,t[i]);return n}));var Lo=function(e,t,n,r){if(!N(e))return e;for(var i=-1,o=(t=Gr(t,e)).length,s=o-1,a=e;null!=a&&++i<o;){var c=Vr(t[i]),l=n;if(i!=s){var u=a[c];void 0===(l=r?r(u,c,a):void 0)&&(l=N(u)?u:Me(t[i+1])?[]:{})}we(a,c,l),a=a[c]}return e};var zo=function(e,t,n){for(var r=-1,i=t.length,o={};++r<i;){var s=t[r],a=mo(e,s);n(a,s)&&Lo(o,Gr(s,e),a)}return o};var Fo=function(e,t){return zo(e,t,(function(t,n){return bo(e,n)}))},Bo=Do((function(e,t){return null==e?{}:Fo(e,t)}));const qo=function(e,t){let n=e||{};t||(t={}),this.preinitialize.apply(this,arguments),this.cid=vi(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(n=this.parse(n,t)||{});const r=Qr(this,"defaults");n=Ii(Or({},r,n),r),this.set(n,t),this.changed={},this.initialize.apply(this,arguments)};qo.extend=Yr,Object.assign(qo.prototype,_i,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(e){return Oi(this.attributes)},sync:function(e,t,n){return ni(this)(e,t,n)},get:function(e){return this.attributes[e]},keys:function(){return Object.keys(this.attributes)},values:function(){return Object.values(this.attributes)},pairs:function(){return this.entries()},entries:function(){return Object.entries(this.attributes)},invert:function(){return Wi(this.attributes)},pick:function(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),Bo(this.attributes,e)},omit:function(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),Po(this.attributes,e)},isEmpty:function(){return oi(this.attributes)},escape:function(e){return zi(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!Ao(e,this)(this.attributes)},set:function(e,t,n){if(null==e)return this;let r;if("object"==typeof e?(r=e,n=t):(r={})[e]=t,n||(n={}),!this._validate(r,n))return!1;const i=n.unset,o=n.silent,s=[],a=this._changing;this._changing=!0,a||(this._previousAttributes=Oi(this.attributes),this.changed={});const c=this.attributes,l=this.changed,u=this._previousAttributes;for(const e in r)t=r[e],lo(c[e],t)||s.push(e),lo(u[e],t)?delete l[e]:l[e]=t,i?delete c[e]:c[e]=t;if(this.idAttribute in r&&(this.id=this.get(this.idAttribute)),!o){s.length&&(this._pending=n);for(let e=0;e<s.length;e++)this.trigger("change:"+s[e],this,c[s[e]],n)}if(a)return this;if(!o)for(;this._pending;)n=this._pending,this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,Or({},t,{unset:!0}))},clear:function(e){const t={};for(const e in this.attributes)t[e]=void 0;return this.set(t,Or({},e,{unset:!0}))},hasChanged:function(e){return null==e?!oi(this.changed):Xr(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&Oi(this.changed);const t=this._changing?this._previousAttributes:this.attributes,n={};let r;for(const i in e){const o=e[i];lo(t[i],o)||(n[i]=o,r=!0)}return!!r&&n},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return Oi(this._previousAttributes)},fetch:function(e){e=Or({parse:!0},e);const t=this,n=e.success;return e.success=function(r){const i=e.parse?t.parse(r,e):r;if(!t.set(i,e))return!1;n&&n.call(e.context,t,r,e),t.trigger("sync",t,r,e)},ei(this,e),this.sync("read",this,e)},save:function(e,t,n){let r;null==e||"object"==typeof e?(r=e,n=t):(r={})[e]=t;const i=(n=Or({validate:!0,parse:!0},n)).wait,o=n.promise,s=o&&Kr();if(r&&!i){if(!this.set(r,n))return!1}else if(!this._validate(r,n))return!1;const a=this,c=n.success,l=n.error,u=this.attributes;n.success=function(e){a.attributes=u;let t=n.parse?a.parse(e,n):e;if(i&&(t=Or({},r,t)),t&&!a.set(t,n))return!1;c&&c.call(n.context,a,e,n),a.trigger("sync",a,e,n),o&&s.resolve()},n.error=function(e,t,n){l&&l.call(n.context,e,t,n),o&&s.reject(t)},ei(this,n),r&&i&&(this.attributes=Or({},u,r));const d=this.isNew()?"create":n.patch?"patch":"update";"patch"!==d||n.attrs||(n.attrs=r);const h=this.sync(d,this,n);return this.attributes=u,o?s:h},destroy:function(e){e=e?Oi(e):{};const t=this,n=e.success,r=e.wait,i=function(){t.stopListening(),t.trigger("destroy",t,t.collection,e)};e.success=function(o){r&&i(),n&&n.call(e.context,t,o,e),t.isNew()||t.trigger("sync",t,o,e)};let o=!1;return this.isNew()?Ri(e.success):(ei(this,e),o=this.sync("delete",this,e)),r||i(),o},url:function(){const e=Qr(this,"urlRoot")||Qr(this.collection,"url")||Zr();if(this.isNew())return e;const t=this.get(this.idAttribute);return e.replace(/[^\/]$/,"$&/")+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},Or({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=Or({},this.attributes,e);const n=this.validationError=this.validate(e,t)||null;return!n||(this.trigger("invalid",this,n,Or(t,{validationError:n})),!1)}});var Ho=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var o=e[t];o&&(i[r++]=o)}return i};
-/**
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description This is the core utilities module.
- */const Uo=vr.f.Strophe,$o={isTagEqual:function(e,t){if(e.nodeTree)return $o.isTagEqual(e.nodeTree,t);if(e instanceof Element)return Uo.isTagEqual(e,t);throw Error("isTagEqual called with value which isn't an element or Strophe.Builder instance")}},Wo=new DOMParser,Go=Wo.parseFromString("invalid","text/xml").getElementsByTagName("parsererror")[0].namespaceURI;
-/**
- * Clears the specified timeout and interval.
- * @method u#clearTimers
- * @param {number} timeout - Id if the timeout to clear.
- * @param {number} interval - Id of the interval to clear.
- * @private
- * @copyright Simen Bekkhus 2016
- * @license MIT
- */
-function Vo(e,t){clearTimeout(e),clearInterval(t)}
-/**
- * Creates a {@link Promise} that resolves if the passed in function returns a truthy value.
- * Rejects if it throws or does not return truthy within the given max_wait.
- * @method u#waitUntil
- * @param {Function} func - The function called every check_delay,
- *  and the result of which is the resolved value of the promise.
- * @param {number} [max_wait=300] - The time to wait before rejecting the promise.
- * @param {number} [check_delay=3] - The time to wait before each invocation of {func}.
- * @returns {Promise} A promise resolved with the value of func,
- *  or rejected with the exception thrown by it or it times out.
- * @copyright Simen Bekkhus 2016
- * @license MIT
- */$o.getJIDFromURI=function(e){return e.startsWith("xmpp:")&&e.endsWith("?join")?e.replace(/^xmpp:/,"").replace(/\?join$/,""):e},$o.toStanza=function(e){const t=Wo.parseFromString(e,"text/xml");if(t.getElementsByTagNameNS(Go,"parsererror").length)throw new Error("Parser Error: ".concat(e));return t.firstElementChild},$o.getLongestSubstring=function(e,t){return t.reduce((function(t,n){return e.startsWith(n)&&n.length>t.length?n:t}),"")},$o.prefixMentions=function(e){let t=e.get("message");return(e.get("references")||[]).sort((e,t)=>t.begin-e.begin).forEach(e=>{t="".concat(t.slice(0,e.begin),"@").concat(t.slice(e.begin))}),t},$o.isValidJID=function(e){return"string"==typeof e&&(2===Ho(e.split("@")).length&&!e.startsWith("@")&&!e.endsWith("@"))},$o.isValidMUCJID=function(e){return!e.startsWith("@")&&!e.endsWith("@")},$o.isSameBareJID=function(e,t){return"string"==typeof e&&"string"==typeof t&&Uo.getBareJidFromJid(e).toLowerCase()===Uo.getBareJidFromJid(t).toLowerCase()},$o.isSameDomain=function(e,t){return"string"==typeof e&&"string"==typeof t&&Uo.getDomainFromJid(e).toLowerCase()===Uo.getDomainFromJid(t).toLowerCase()},$o.isNewMessage=function(e){return e instanceof Element?!(mr()('result[xmlns="'.concat(Uo.NS.MAM,'"]'),e).length&&mr()('delay[xmlns="'.concat(Uo.NS.DELAY,'"]'),e).length):(e instanceof qo&&(e=e.attributes),!(e.is_delayed&&e.is_archived))},$o.shouldCreateMessage=function(e){return e.retracted||!$o.isEmptyMessage(e)},$o.shouldCreateGroupchatMessage=function(e){return e.nick&&($o.shouldCreateMessage(e)||e.is_tombstone)},$o.isEmptyMessage=function(e){return e instanceof qo&&(e=e.attributes),!(e.oob_url||e.file||e.is_encrypted&&e.plaintext||e.message)},$o.isOnlyChatStateNotification=function(e){return e instanceof Element?null===e.querySelector("body")&&(null!==e.querySelector("active")||null!==e.querySelector("composing")||null!==e.querySelector("inactive")||null!==e.querySelector("paused")||null!==e.querySelector("gone")):(e instanceof qo&&(e=e.attributes),e.chat_state&&$o.isEmptyMessage(e))},$o.isOnlyMessageDeliveryReceipt=function(e){return e instanceof Element?null===e.querySelector("body")&&null!==e.querySelector("received"):(e instanceof qo&&(e=e.attributes),e.received&&$o.isEmptyMessage(e))},$o.isChatRoom=function(e){return e&&"chatroom"===e.get("type")},$o.isErrorObject=function(e){return e instanceof Error},$o.isErrorStanza=function(e){return!!Dn(e)&&"error"===e.getAttribute("type")},$o.isForbiddenError=function(e){return!!Dn(e)&&mr()('error[type="auth"] forbidden[xmlns="'.concat(Uo.NS.STANZAS,'"]'),e).length>0},$o.isServiceUnavailableError=function(e){return!!Dn(e)&&mr()('error[type="cancel"] service-unavailable[xmlns="'.concat(Uo.NS.STANZAS,'"]'),e).length>0},$o.merge=function e(t,n){for(const r in n)N(t[r])?e(t[r],n[r]):t[r]=n[r]},$o.getOuterWidth=function(e,t=!1){let n=e.offsetWidth;if(!t)return n;const r=window.getComputedStyle(e);return n+=parseInt(r.marginLeft?r.marginLeft:0,10)+parseInt(r.marginRight?r.marginRight:0,10),n},$o.stringToElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.firstElementChild},$o.matchesSelector=function(e,t){const n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return!!n&&n.call(e,t)},$o.queryChildren=function(e,t){return Array.from(e.childNodes).filter(e=>$o.matchesSelector(e,t))},$o.contains=function(e,t){const n=(e,n)=>e.get(n).toLowerCase().includes(t.toLowerCase());return function(t){if("object"==typeof e)return Object.keys(e).reduce((e,r)=>e||n(t,r),!1);if("string"==typeof e)return n(t,e);throw new TypeError("contains: wrong attribute type. Must be string or array.")}},$o.isOfType=function(e,t){return t.get("type")==e},$o.isInstance=function(e,t){return t instanceof e},$o.getAttribute=function(e,t){return t.get(e)},$o.contains.not=function(e,t){return function(n){return!$o.contains(e,t)(n)}},$o.rootContains=function(e,t){return e!==document||e.contains?e.contains?e.contains(t):window.HTMLElement.prototype.contains.call(e,t):document.head.contains(t)||document.body.contains(t)},$o.createFragmentFromText=function(e){var t,n=document.createDocumentFragment(),r=document.createElement("body");for(r.innerHTML=e;t=r.firstChild;)n.appendChild(t);return n},$o.isPersistableModel=function(e){return e.collection&&e.collection.browserStorage},$o.getResolveablePromise=function(){const e={isResolved:!1,isPending:!0,isRejected:!1},t=new Promise((t,n)=>{e.resolve=t,e.reject=n});return Object.assign(t,e),t.then((function(e){return t.isResolved=!0,t.isPending=!1,t.isRejected=!1,e}),(function(e){throw t.isResolved=!1,t.isPending=!1,t.isRejected=!0,e})),t},$o.interpolate=function(e,t){return e.replace(/{{{([^{}]*)}}}/g,(e,n)=>{var r=t[n];return"string"==typeof r||"number"==typeof r?r:e})},$o.onMultipleEvents=function(e=[],t){let n=[];function r(r){n.push(r),e.length===n.length&&(t(n),n=[])}e.forEach(e=>e.object.on(e.event,r))},$o.safeSave=function(e,t,n){$o.isPersistableModel(e)?e.save(t,n):e.set(t,n)},$o.siblingIndex=function(e){for(var t=0;e=e.previousElementSibling;t++);return t},$o.getCurrentWord=function(e,t,n){t||(t=e.selectionEnd||void 0);let[r]=e.value.slice(0,t).split(/\s/).slice(-1);return n&&([r]=r.split(n).slice(-1)),r},$o.isMentionBoundary=e=>"@"!==e&&RegExp("(\\p{Z}|\\p{P})","u").test(e),$o.replaceCurrentWord=function(e,t){const n=e.selectionEnd||void 0,r=Co(e.value.slice(0,n).split(/\s/)),i=e.value,o=$o.isMentionBoundary(r[0])?r[0]:"";e.value=i.slice(0,n-r.length)+o+"".concat(t," ")+i.slice(n);const s=n-r.length+t.length+1;e.selectionEnd=o?s+1:s},$o.triggerEvent=function(e,t,n="Event",r=!0,i=!0){const o=document.createEvent(n);o.initEvent(t,r,i),e.dispatchEvent(o)},$o.getSelectValues=function(e){const t=[],n=e&&e.options;for(var r=0,i=n.length;r<i;r++){const e=n[r];e.selected&&t.push(e.value||e.text)}return t},$o.formatFingerprint=function(e){e=e.replace(/^05/,"");for(let t=1;t<8;t++){const n=8*t+t-1;e=e.slice(0,n)+" "+e.slice(n)}return e},$o.appendArrayBuffer=function(e,t){const n=new Uint8Array(e.byteLength+t.byteLength);return n.set(new Uint8Array(e),0),n.set(new Uint8Array(t),e.byteLength),n.buffer},$o.arrayBufferToHex=function(e){return Array.prototype.map.call(new Uint8Array(e),e=>("00"+e.toString(16)).slice(-2)).join("")},$o.arrayBufferToString=function(e){return new TextDecoder("utf-8").decode(e)},$o.stringToArrayBuffer=function(e){return new TextEncoder("utf-8").encode(e).buffer},$o.arrayBufferToBase64=function(e){return btoa(new Uint8Array(e).reduce((e,t)=>e+String.fromCharCode(t),""))},$o.base64ToArrayBuffer=function(e){const t=window.atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer},$o.getRandomInt=function(e){return Math.floor(Math.random()*Math.floor(e))},$o.placeCaretAtEnd=function(e){e!==document.activeElement&&e.focus();const t=2*e.value.length;setTimeout(()=>e.setSelectionRange(t,t),1),this.scrollTop=999999},$o.getUniqueId=function(e){const t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}));return"string"==typeof e||"number"==typeof e?t+":"+e:t},$o.waitUntil=function(e,t=300,n=3){try{const t=e();if(t)return Promise.resolve(t)}catch(e){return Promise.reject(e)}const r=$o.getResolveablePromise(),i=new Error;const o=setInterval((function(){try{const t=e();t&&(Vo(s,o),r.resolve(t))}catch(e){Vo(s,o),r.reject(e)}}),n);const s=setTimeout((function(){Vo(s,o);const e="Wait until promise timed out: \n\n".concat(i.stack);console.trace(),zn.error(e),r.reject(new Error(e))}),t);return r};var Jo=$o;const Xo=vr.f.Strophe,Qo=vr.f.$msg,{NS:Yo}=Xo;function Ko(e){const t=mr()('spoiler[xmlns="'.concat(Xo.NS.SPOILER,'"]'),e).pop();return{is_spoiler:!!t,spoiler_hint:null==t?void 0:t.textContent}}function Zo(e){const t=mr()('x[xmlns="'.concat(Xo.NS.OUTOFBAND,'"]'),e).pop();var n,r;return t?{oob_url:null===(n=t.querySelector("url"))||void 0===n?void 0:n.textContent,oob_desc:null===(r=t.querySelector("desc"))||void 0===r?void 0:r.textContent}:{}}function es(e,t){const n=mr()('replace[xmlns="'.concat(Xo.NS.MESSAGE_CORRECT,'"]'),e).pop();if(n){const e=n.getAttribute("id"),r=e;if(e){const n=mr()('delay[xmlns="'.concat(Xo.NS.DELAY,'"]'),t).pop();return{msgid:r,replace_id:e,edited:n?En()(n.getAttribute("stamp")).toISOString():(new Date).toISOString()}}}return{}}function ts(e,t){var n;const r=mr()('encrypted[xmlns="'.concat(Xo.NS.OMEMO,'"]'),e).pop(),i={is_encrypted:!!r};if(!r||Vc.settings.get("clear_cache_on_logout"))return i;const o=r.querySelector("header");i.encrypted={device_id:o.getAttribute("sid")};const s=null===(n=t.omemo_store)||void 0===n?void 0:n.get("device_id"),a=s&&mr()('key[rid="'.concat(s,'"]'),r).pop();var c;a&&Object.assign(i.encrypted,{iv:o.querySelector("iv").textContent,key:a.textContent,payload:(null===(c=r.querySelector("payload"))||void 0===c?void 0:c.textContent)||null,prekey:["true","1"].includes(a.getAttribute("prekey"))});return i}function ns(e,t){return"me"!==t.sender&&!t.is_carbon&&!t.is_archived&&mr()('request[xmlns="'.concat(Xo.NS.RECEIPTS,'"]'),e).length}function rs(e){const t=mr()('received[xmlns="'.concat(Xo.NS.RECEIPTS,'"]'),e).pop();return null==t?void 0:t.getAttribute("id")}function is(e){var t;return null===(t=mr()('\n        composing[xmlns="'.concat(Yo.CHATSTATES,'"],\n        paused[xmlns="').concat(Yo.CHATSTATES,'"],\n        inactive[xmlns="').concat(Yo.CHATSTATES,'"],\n        active[xmlns="').concat(Yo.CHATSTATES,'"],\n        gone[xmlns="').concat(Yo.CHATSTATES,'"]'),e).pop())||void 0===t?void 0:t.nodeName}function os(e){const t=Xo.NS.CARBONS;return mr()('message > received[xmlns="'.concat(t,'"]'),e).length>0||mr()('message > sent[xmlns="'.concat(t,'"]'),e).length>0}function ss(e,t){const n={},r=mr()('stanza-id[xmlns="'.concat(Xo.NS.SID,'"]'),e).reduce((e,t)=>(e["stanza_id ".concat(t.getAttribute("by"))]=t.getAttribute("id"),e),{});Object.assign(n,r);const i=mr()('message > result[xmlns="'.concat(Xo.NS.MAM,'"]'),t).pop();if(i){const e=t.getAttribute("from")||Uc.bare_jid;n["stanza_id ".concat(e)]=i.getAttribute("id")}const o=mr()('origin-id[xmlns="'.concat(Xo.NS.SID,'"]'),e).pop();return o&&(n.origin_id=o.getAttribute("id")),n}function as(e,t){const n=mr()('> apply-to[xmlns="'.concat(Xo.NS.FASTEN,'"]'),e).pop();if(n){const e=n.getAttribute("id");if(mr()('> retract[xmlns="'.concat(Xo.NS.RETRACT,'"]'),n).pop()){const n=mr()('delay[xmlns="'.concat(Xo.NS.DELAY,'"]'),t).pop();return{editable:!1,retracted:n?En()(n.getAttribute("stamp")).toISOString():(new Date).toISOString(),retracted_id:e}}}else{const t=mr()('> retracted[xmlns="'.concat(Xo.NS.RETRACT,'"]'),e).pop();if(t)return{editable:!1,is_tombstone:!0,retracted:t.getAttribute("stamp")}}return{}}function cs(e){var t;const n=null===(t=e.querySelector("body"))||void 0===t?void 0:t.textContent;return mr()('reference[xmlns="'.concat(Xo.NS.REFERENCE,'"]'),e).map(e=>{const t=e.getAttribute("begin"),r=e.getAttribute("end");return{begin:t,end:r,type:e.getAttribute("type"),value:n.slice(t,r),uri:e.getAttribute("uri")}})}function ls(e,t){Vc.send(Qo({to:e.getAttribute("from"),type:"error",id:e.getAttribute("id")}).c("error",{type:"cancel"}).c("not-allowed",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).up().c("text",{xmlns:"urn:ietf:params:xml:ns:xmpp-stanzas"}).t(t)),zn.warn("Rejecting message stanza with the following reason: ".concat(t)),zn.warn(e)}function us(e){if("error"===e.getAttribute("type")){const t=e.querySelector("error"),n=mr()('text[xmlns="'.concat(Xo.NS.STANZAS,'"]'),t).pop();return{is_error:!0,error_text:null==n?void 0:n.textContent,error_type:t.getAttribute("type"),error_condition:t.firstElementChild.nodeName}}return{}}class ds extends Error{constructor(e,t){super(e,t),this.name="StanzaParseError",this.stanza=t}}function hs(e){if(mr()('message > forwarded[xmlns="'.concat(Xo.NS.FORWARD,'"]'),e).length){ls(e,"Forwarded messages not part of an encapsulating protocol are not supported");const t=e.getAttribute("from");return new ds("Ignoring unencapsulated forwarded message from ".concat(t),e)}}const fs={isHeadline:e=>"headline"===e.getAttribute("type"),isServerMessage(e){const t=e.getAttribute("from");return!("error"===e.getAttribute("type")||!t||t.includes("@"))},getChatMarker:e=>mr()('\n            acknowledged[xmlns="'.concat(Xo.NS.MARKERS,'"],\n            displayed[xmlns="').concat(Xo.NS.MARKERS,'"],\n            received[xmlns="').concat(Xo.NS.MARKERS,'"]'),e).pop(),isArchived:e=>!!mr()('message > result[xmlns="'.concat(Xo.NS.MAM,'"]'),e).pop(),getAttributes:e=>e.getAttributeNames().reduce((t,n)=>(t[n]=Xo.xmlunescape(e.getAttribute(n)),t),{}),async parseMessage(e,t){var n,r,i,o,s,a;const c=hs(e);if(c)return c;let l=e.getAttribute("to");const u=Xo.getResourceFromJid(l);if(Vc.settings.get("filter_by_resource")&&u&&u!==t.resource)return new ds("Ignoring incoming message intended for a different resource: ".concat(l),e);const d=e;let h=e.getAttribute("from")||t.bare_jid;if(os(e)){if(h!==t.bare_jid)return ls(e,"Rejecting carbon from invalid JID"),new ds("Rejecting carbon from invalid JID ".concat(l),e);{const t='[xmlns="'.concat(Xo.NS.CARBONS,'"] > forwarded[xmlns="').concat(Xo.NS.FORWARD,'"] > message');l=(e=mr()(t,e).pop()).getAttribute("to"),h=e.getAttribute("from")}}const f=fs.isArchived(e);if(f){if(h!==t.bare_jid)return new ds("Invalid Stanza: alleged MAM message from ".concat(e.getAttribute("from")),e);{const t='[xmlns="'.concat(Xo.NS.MAM,'"] > forwarded[xmlns="').concat(Xo.NS.FORWARD,'"] > message');l=(e=mr()(t,e).pop()).getAttribute("to"),h=e.getAttribute("from")}}const p=Xo.getBareJidFromJid(h),g=p===t.bare_jid;if(g&&null===l)return new ds("Don't know how to handle message stanza without 'to' attribute. ".concat(e.outerHTML),e);const m=fs.isHeadline(e),v=fs.isServerMessage(e);let _,b;if(!m&&!v&&(b=g?Xo.getBareJidFromJid(l):p,_=await Vc.contacts.get(b),void 0===_&&!Vc.settings.get("allow_non_roster_messaging")))return zn.error(e),new ds("Blocking messaging with a JID not in our roster because allow_non_roster_messaging is false.",e);const y=mr()('delay[xmlns="'.concat(Xo.NS.DELAY,'"]'),d).pop(),w=fs.getChatMarker(e),S=(new Date).toISOString();let x=Object.assign({contact_jid:b,is_archived:f,is_headline:m,is_server_message:v,body:null===(n=e.querySelector("body"))||void 0===n||null===(r=n.textContent)||void 0===r?void 0:r.trim(),chat_state:is(e),from:Xo.getBareJidFromJid(e.getAttribute("from")),is_carbon:os(d),is_delayed:!!y,is_markable:!!mr()('markable[xmlns="'.concat(Xo.NS.MARKERS,'"]'),e).length,is_marker:!!w,is_unstyled:!!mr()('unstyled[xmlns="'.concat(Xo.NS.STYLING,'"]'),e).length,marker_id:w&&w.getAttribute("id"),msgid:e.getAttribute("id")||d.getAttribute("id"),nick:null===(i=_)||void 0===i||null===(o=i.attributes)||void 0===o?void 0:o.nickname,receipt_id:rs(e),received:(new Date).toISOString(),references:cs(e),sender:g?"me":"them",subject:null===(s=e.querySelector("subject"))||void 0===s?void 0:s.textContent,thread:null===(a=e.querySelector("thread"))||void 0===a?void 0:a.textContent,time:y?En()(y.getAttribute("stamp")).toISOString():S,to:e.getAttribute("to"),type:e.getAttribute("type")},us(e),Zo(e),Ko(e),es(e,d),ss(e,d),as(e,d),ts(e,t));if(x.is_archived){const n=d.getAttribute("from");if(n&&n!==t.bare_jid)return new ds("Invalid Stanza: Forged MAM message from ".concat(n),e)}return await Vc.emojis.initialize(),x=Object.assign({message:x.body||x.error,is_only_emojis:!!x.body&&Jo.isOnlyEmojis(x.body),is_valid_receipt_request:ns(e,x)},x),x.id=x.origin_id||x["stanza_id ".concat(x.from)]||Jo.getUniqueId(),Vc.hook("parseMessage",e,x)},async parseMUCMessage(e,t,n){var r,i,o,s,a;const c=hs(e);if(c)return c;const l='[xmlns="'.concat(Yo.MAM,'"] > forwarded[xmlns="').concat(Yo.FORWARD,'"] > message'),u=e;if(e=mr()(l,e).pop()||e,mr()('message > forwarded[xmlns="'.concat(Xo.NS.FORWARD,'"]'),e).length)return new ds("Invalid Stanza: Forged MAM groupchat message from ".concat(e.getAttribute("from")),e);const d=mr()('delay[xmlns="'.concat(Xo.NS.DELAY,'"]'),u).pop(),h=e.getAttribute("from"),f=Xo.unescapeNode(Xo.getResourceFromJid(h)),p=fs.getChatMarker(e),g=(new Date).toISOString();let m=Object.assign({from:h,nick:f,body:null===(r=e.querySelector("body"))||void 0===r||null===(i=r.textContent)||void 0===i?void 0:i.trim(),chat_state:is(e),from_muc:Xo.getBareJidFromJid(h),from_real_jid:null===(o=t.occupants.findOccupant({nick:f}))||void 0===o?void 0:o.get("jid"),is_archived:fs.isArchived(u),is_carbon:os(u),is_delayed:!!d,is_headline:fs.isHeadline(e),is_markable:!!mr()('markable[xmlns="'.concat(Xo.NS.MARKERS,'"]'),e).length,is_marker:!!p,is_unstyled:!!mr()('unstyled[xmlns="'.concat(Xo.NS.STYLING,'"]'),e).length,marker_id:p&&p.getAttribute("id"),msgid:e.getAttribute("id")||u.getAttribute("id"),receipt_id:rs(e),received:(new Date).toISOString(),references:cs(e),subject:null===(s=e.querySelector("subject"))||void 0===s?void 0:s.textContent,thread:null===(a=e.querySelector("thread"))||void 0===a?void 0:a.textContent,time:d?En()(d.getAttribute("stamp")).toISOString():g,to:e.getAttribute("to"),type:e.getAttribute("type")},us(e),Zo(e),Ko(e),es(e,u),ss(e,u),as(e,u),function(e){const t=mr()('apply-to[xmlns="'.concat(Xo.NS.FASTEN,'"]'),e).pop();if(t){const e=t.getAttribute("id"),r=mr()('moderated[xmlns="'.concat(Xo.NS.MODERATE,'"]'),t).pop();if(r){var n;if(mr()('retract[xmlns="'.concat(Xo.NS.RETRACT,'"]'),r).pop())return{editable:!1,moderated:"retracted",moderated_by:r.getAttribute("by"),moderated_id:e,moderation_reason:null===(n=r.querySelector("reason"))||void 0===n?void 0:n.textContent}}}else{const t=mr()('> moderated[xmlns="'.concat(Xo.NS.MODERATE,'"]'),e).pop();if(t){var r;if(mr()('retracted[xmlns="'.concat(Xo.NS.RETRACT,'"]'),t).pop())return{editable:!1,is_tombstone:!0,moderated_by:t.getAttribute("by"),retracted:t.getAttribute("stamp"),moderation_reason:null===(r=t.querySelector("reason"))||void 0===r?void 0:r.textContent}}}return{}}(e),ts(e,n));return await Vc.emojis.initialize(),m=Object.assign({is_only_emojis:!!m.body&&Jo.isOnlyEmojis(m.body),is_valid_receipt_request:ns(e,m),message:m.body||m.error,sender:m.nick===t.get("nick")?"me":"them"},m),m.is_archived&&u.getAttribute("from")!==m.from_muc?new ds("Invalid Stanza: Forged MAM message from ".concat(u.getAttribute("from")),e):m.is_archived&&u.getAttribute("from")!==t.get("jid")?new ds("Invalid Stanza: Forged MAM groupchat message from ".concat(e.getAttribute("from")),e):m.is_carbon?new ds("Invalid Stanza: MUC messages SHOULD NOT be XEP-0280 carbon copied",e):(m.id=m.origin_id||m["stanza_id ".concat(m.from_muc||m.from)]||Jo.getUniqueId(),Vc.hook("parseMUCMessage",e,m))},parseMUCPresence(e){const t=e.getAttribute("from"),n=e.getAttribute("type"),r={from:t,nick:Xo.getResourceFromJid(t),type:n,states:[],hats:[],show:"unavailable"!==n?"online":"offline"};return Array.from(e.children).forEach(e=>{if(e.matches("status"))r.status=e.textContent||null;else if(e.matches("show"))r.show=e.textContent||"online";else if(e.matches("x")&&e.getAttribute("xmlns")===Xo.NS.MUC_USER)Array.from(e.children).forEach(e=>{"item"===e.nodeName?(r.affiliation=e.getAttribute("affiliation"),r.role=e.getAttribute("role"),r.jid=e.getAttribute("jid"),r.nick=e.getAttribute("nick")||r.nick):"status"==e.nodeName&&e.getAttribute("code")&&r.states.push(e.getAttribute("code"))});else if(e.matches("x")&&e.getAttribute("xmlns")===Xo.NS.VCARDUPDATE){var t;r.image_hash=null===(t=e.querySelector("photo"))||void 0===t?void 0:t.textContent}else e.matches("hats")&&e.getAttribute("xmlns")===Xo.NS.MUC_HATS&&(r.hats=Array.from(e.children).map(e=>e.matches("hat")&&{title:e.getAttribute("title"),uri:e.getAttribute("uri")}))}),r}};var ps=fs;var gs=function(e,t,n,r){for(var i=-1,o=null==e?0:e.length;++i<o;){var s=e[i];t(r,s,n(s),e)}return r};var ms=function(e,t){return function(n,r){if(null==n)return n;if(!Xe(n))return e(n,r);for(var i=n.length,o=t?i:-1,s=Object(n);(t?o--:++o<i)&&!1!==r(s[o],o,s););return n}},vs=ms(qi);var _s=function(e,t,n,r){return vs(e,(function(e,i,o){t(r,e,n(e),o)})),r};var bs=function(e,t){return function(n,r){var i=ke(n)?gs:_s,o=t?t():{};return i(n,e,Eo(r,2),o)}},ys=Object.prototype.hasOwnProperty,ws=bs((function(e,t,n){ys.call(e,n)?++e[n]:be(e,n,1)}));var Ss=function(e,t,n,r){for(var i=e.length,o=n+(r?1:-1);r?o--:++o<i;)if(t(e[o],o,e))return o;return-1};var xs=function(e){return e!=e};var Es=function(e,t,n){for(var r=n-1,i=e.length;++r<i;)if(e[r]===t)return r;return-1};var As=function(e,t,n){return t==t?Es(e,t,n):Ss(e,xs,n)};var Cs=function(e,t){return!!(null==e?0:e.length)&&As(e,t,0)>-1};var js=function(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1};var Ts=function(e,t,n,r){var i=-1,o=Cs,s=!0,a=e.length,c=[],l=t.length;if(!a)return c;n&&(t=qr(t,Le(n))),r?(o=js,s=!1):t.length>=200&&(o=Yi,s=!1,t=new Xi(t));e:for(;++i<a;){var u=e[i],d=null==n?u:n(u);if(u=r||0!==u?u:0,s&&d==d){for(var h=l;h--;)if(t[h]===d)continue e;c.push(u)}else o(t,d,r)||c.push(u)}return c};var Os=function(e){return Ee(e)&&Xe(e)},ks=jr((function(e,t){return Os(e)?Ts(e,Mo(t,1,Os,!0)):[]}));var Ns=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0};var Is=function(e,t){var n=!0;return vs(e,(function(e,r,i){return n=!!t(e,r,i)})),n};var Ms=function(e,t,n){var r=ke(e)?Ns:Is;return n&&Tr(e,t,n)&&(t=void 0),r(e,Eo(t,3))},Rs=Math.max;var Ds=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fi(n);return i<0&&(i=Rs(r+i,0)),Ss(e,Eo(t,3),i)},Ps=Math.max,Ls=Math.min;var zs=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=fi(n),i=n<0?Ps(r+i,0):Ls(i,r-1)),Ss(e,Eo(t,3),i,!0)},Fs=Object.prototype.hasOwnProperty,Bs=bs((function(e,t,n){Fs.call(e,n)?e[n].push(t):be(e,n,[t])})),qs=Math.max;var Hs=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:fi(n);return i<0&&(i=qs(r+i,0)),As(e,t,i)},Us=bs((function(e,t,n){be(e,n,t)}));var $s=function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r},Ws=Math.max,Gs=Math.min;var Vs=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=fi(n))<0?Ws(r+i,0):Gs(i,r-1)),t==t?$s(e,t,i):Ss(e,xs,i,!0)};var Js=function(e,t){var n;return vs(e,(function(e,r,i){return!(n=t(e,r,i))})),!!n};var Xs=function(e,t,n){var r=ke(e)?Qi:Js;return n&&Tr(e,t,n)&&(t=void 0),r(e,Eo(t,3))};var Qs=function(e,t){var n=-1,r=Xe(e)?Array(e.length):[];return vs(e,(function(e,i,o){r[++n]=t(e,i,o)})),r};var Ys=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e};var Ks=function(e,t){if(e!==t){var n=void 0!==e,r=null===e,i=e==e,o=Ir(e),s=void 0!==t,a=null===t,c=t==t,l=Ir(t);if(!a&&!l&&!o&&e>t||o&&s&&c&&!a&&!l||r&&s&&c||!n&&c||!i)return 1;if(!r&&!o&&!l&&e<t||l&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!c)return-1}return 0};var Zs=function(e,t,n){for(var r=-1,i=e.criteria,o=t.criteria,s=i.length,a=n.length;++r<s;){var c=Ks(i[r],o[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return e.index-t.index};var ea=function(e,t,n){var r=-1;t=qr(t.length?t:[br],Le(Eo));var i=Qs(e,(function(e,n,i){return{criteria:qr(t,(function(t){return t(e)})),index:++r,value:e}}));return Ys(i,(function(e,t){return Zs(e,t,n)}))},ta=jr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&Tr(e,t[0],t[1])?t=[]:n>2&&Tr(t[0],t[1],t[2])&&(t=[t[0]]),ea(e,Mo(t,1),[])}));const na=Array.prototype.slice,ra=function(e,t){t||(t={}),this.preinitialize.apply(this,arguments),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,Or({silent:!0},t))};ra.extend=Yr;const ia={add:!0,remove:!0,merge:!0},oa={add:!0,remove:!1},sa=function(e,t,n){n=Math.min(Math.max(n,0),e.length);const r=Array(e.length-n),i=t.length;let o;for(o=0;o<r.length;o++)r[o]=e[o+n];for(o=0;o<i;o++)e[o+n]=t[o];for(o=0;o<r.length;o++)e[o+i+n]=r[o]};Object.assign(ra.prototype,_i,{model:qo,preinitialize:function(){},initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(e,t,n){return ni(this)(e,t,n)},add:function(e,t){return this.set(e,Or({merge:!1},t,oa))},remove:function(e,t){t=Or({},t);const n=!Array.isArray(e);e=n?[e]:e.slice();const r=this._removeModels(e,t);return!t.silent&&r.length&&(t.changes={added:[],merged:[],removed:r},this.trigger("update",this,t)),n?r[0]:r},set:function(e,t){if(null==e)return;(t=Or({},ia,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);const n=!Array.isArray(e);e=n?[e]:e.slice();let r=t.at;null!=r&&(r=+r),r>this.length&&(r=this.length),r<0&&(r+=this.length+1);const i=[],o=[],s=[],a=[],c={},l=t.add,u=t.merge,d=t.remove;let h=!1;const f=this.comparator&&null==r&&!1!==t.sort,p=Zt(this.comparator)?this.comparator:null;let g,m;for(m=0;m<e.length;m++){g=e[m];const n=this.get(g);if(n){if(u&&g!==n){let e=this._isModel(g)?g.attributes:g;t.parse&&(e=n.parse(e,t)),n.set(e,t),s.push(n),f&&!h&&(h=n.hasChanged(p))}c[n.cid]||(c[n.cid]=!0,i.push(n)),e[m]=n}else l&&(g=e[m]=this._prepareModel(g,t),g&&(o.push(g),this._addReference(g,t),c[g.cid]=!0,i.push(g)))}if(d){for(m=0;m<this.length;m++)g=this.models[m],c[g.cid]||a.push(g);a.length&&this._removeModels(a,t)}let v=!1;const _=!f&&l&&d;if(i.length&&_?(v=this.length!==i.length||Xs(this.models,(e,t)=>e!==i[t]),this.models.length=0,sa(this.models,i,0),this.length=this.models.length):o.length&&(f&&(h=!0),sa(this.models,o,null==r?this.length:r),this.length=this.models.length),h&&this.sort({silent:!0}),!t.silent){for(m=0;m<o.length;m++)null!=r&&(t.index=r+m),g=o[m],g.trigger("add",g,this,t);(h||v)&&this.trigger("sort",this,t),(o.length||a.length||s.length)&&(t.changes={added:o,removed:a,merged:s},this.trigger("update",this,t))}return n?e[0]:e},clearStore:async function(e={},t=(e=>e)){await Promise.all(this.models.filter(t).map(t=>new Promise(n=>{t.destroy(Object.assign(e,{success:n,error:(e,t)=>{console.error(t),n()}}))}))),await this.browserStorage.clear(),this.reset()},reset:function(e,t){t=t?Oi(t):{};for(let e=0;e<this.models.length;e++)this._removeReference(this.models[e],t);return t.previousModels=this.models,this._reset(),e=this.add(e,Or({silent:!0},t)),t.silent||this.trigger("reset",this,t),e},push:function(e,t){return this.add(e,Or({at:this.length},t))},pop:function(e){const t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,Or({at:0},t))},shift:function(e){const t=this.at(0);return this.remove(t,e)},slice:function(){return na.apply(this.models,arguments)},filter:function(e,t){return this.models.filter(M(e)?e:t=>t.matches(e),t)},every:function(e){return Ms(this.models.map(e=>e.attributes),e)},difference:function(e){return ks(this.models,e)},max:function(){return Math.max.apply(Math,this.models)},min:function(){return Math.min.apply(Math,this.models)},drop:function(e=1){return this.models.slice(e)},some:function(e){return Xs(this.models.map(e=>e.attributes),e)},sortBy:function(e){return ta(this.models,M(e)?e:t=>Zt(e)?t.get(e):t.matches(e))},isEmpty:function(){return oi(this.models)},keyBy:function(e){return Us(this.models,e)},each:function(e,t){return this.forEach(e,t)},forEach:function(e,t){return this.models.forEach(e,t)},includes:function(e){return this.models.includes(e)},size:function(){return this.models.length},countBy:function(e){return ws(this.models,M(e)?e:t=>Zt(e)?t.get(e):t.matches(e))},groupBy:function(e){return Bs(this.models,M(e)?e:t=>Zt(e)?t.get(e):t.matches(e))},indexOf:function(e){return Hs(this.models,e)},findLastIndex:function(e,t){return zs(this.models,M(e)?e:t=>Zt(e)?t.get(e):t.matches(e),t)},lastIndexOf:function(e){return Vs(this.models,e)},findIndex:function(e){return Ds(this.models,M(e)?e:t=>Zt(e)?t.get(e):t.matches(e))},last:function(){const e=null==this.models?0:this.models.length;return e?this.models[e-1]:void 0},head:function(){return this.models[0]},first:function(){return this.head()},map:function(e,t){return this.models.map(M(e)?e:t=>Zt(e)?t.get(e):t.matches(e),t)},reduce:function(e,t){return this.models.reduce(e,t||this.models[0])},reduceRight:function(e,t){return this.models.reduceRight(e,t||this.models[0])},toArray:function(){return Array.from(this.models)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(this._isModel(e)?e.attributes:e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?"find":"filter"](e)},findWhere:function(e){return this.where(e,!0)},find:function(e,t){const n=M(e)?e:t=>t.matches(e);return this.models.find(n,t)},sort:function(e){let t=this.comparator;if(!t)throw new Error("Cannot sort a set without a comparator");e||(e={});const n=t.length;return M(t)&&(t=t.bind(this)),1===n||Zt(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger("sort",this,e),this},pluck:function(e){return this.map(e+"")},fetch:function(e){const t=(e=Or({parse:!0},e)).success,n=this,r=e.promise&&Kr();return e.success=function(i){const o=e.reset?"reset":"set";n[o](i,e),t&&t.call(e.context,n,i,e),r&&r.resolve(),n.trigger("sync",n,i,e)},ei(this,e),r||this.sync("read",this,e)},create:function(e,t){const n=(t=t?Oi(t):{}).wait,r=t.promise,i=r&&Kr();if(!(e=this._prepareModel(e,t)))return!1;n||this.add(e,t);const o=this,s=t.success,a=t.error;return t.success=function(e,t,a){n&&o.add(e,a),s&&s.call(a.context,e,t,a),r&&i.resolve(e)},t.error=function(e,t,n){a&&a.call(n.context,e,t,n),r&&i.reject(t)},e.save(null,Object.assign(t,{promise:!1})),r?i:e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||"id"]},values:function(){return new ca(this,la)},keys:function(){return new ca(this,ua)},entries:function(){return new ca(this,da)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;(t=t?Oi(t):{}).collection=this;const n=new this.model(e,t);return n.validationError?(this.trigger("invalid",this,n.validationError,t),!1):n},_removeModels:function(e,t){const n=[];for(let r=0;r<e.length;r++){const i=this.get(e[r]);if(!i)continue;const o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];const s=this.modelId(i.attributes);null!=s&&delete this._byId[s],t.silent||(t.index=o,i.trigger("remove",i,this,t)),n.push(i),this._removeReference(i,t)}return n},_isModel:function(e){return e instanceof qo},_addReference:function(e,t){this._byId[e.cid]=e;const n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on("all",this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];const n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off("all",this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(("add"===e||"remove"===e)&&n!==this)return;if("destroy"===e&&this.remove(t,r),"change"===e){const e=this.modelId(t.previousAttributes()),n=this.modelId(t.attributes);e!==n&&(null!=e&&delete this._byId[e],null!=n&&(this._byId[n]=t))}}this.trigger.apply(this,arguments)}});const aa="function"==typeof Symbol&&Symbol.iterator;aa&&(ra.prototype[aa]=ra.prototype.values);const ca=function(e,t){this._collection=e,this._kind=t,this._index=0},la=1,ua=2,da=3;aa&&(ca.prototype[aa]=function(){return this}),ca.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){const e=this._collection.at(this._index);let t;if(this._index++,this._kind===la)t=e;else{const n=this._collection.modelId(e.attributes);t=this._kind===ua?n:[n,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var ha=n(43);class fa extends vr.e.Connection{constructor(e,t){super(e,t),this.debouncedReconnect=Object(ha.debounce)(this.reconnect,2e3)}static generateResource(){return"/converse.js-".concat(Math.floor(139749528*Math.random()).toString())}async bind(){await Vc.trigger("beforeResourceBinding",{synchronous:!0}),super.bind()}async onDomainDiscovered(e){const t=await e.text(),n=(new window.DOMParser).parseFromString(t,"text/xml").firstElementChild;if("XRD"!=n.nodeName||"http://docs.oasis-open.org/ns/xri/xrd-1.0"!=n.namespaceURI)return zn.warn("Could not discover XEP-0156 connection methods");const r=mr()('Link[rel="urn:xmpp:alt-connections:xbosh"]',n),i=mr()('Link[rel="urn:xmpp:alt-connections:websocket"]',n),o=r.map(e=>e.getAttribute("href")),s=i.map(e=>e.getAttribute("href"));0===o.length&&0===s.length?zn.warn("Neither BOSH nor WebSocket connection methods have been specified with XEP-0156."):(Vc.settings.set("websocket_url",s.pop()),Vc.settings.set("bosh_service_url",o.pop()),this.service=Vc.settings.get("websocket_url")||Vc.settings.get("bosh_service_url"),this.setProtocol())}async discoverConnectionMethods(e){const t={mode:"cors",headers:{Accept:"application/xrd+xml, text/xml"}},n="https://".concat(e,"/.well-known/host-meta");let r;try{r=await fetch(n,t)}catch(e){return zn.error("Failed to discover alternative connection methods at ".concat(n)),void zn.error(e)}r.status>=200&&r.status<400?await this.onDomainDiscovered(r):zn.warn("Could not discover XEP-0156 connection methods")}async connect(e,t,n){if(Vc.settings.get("discover_connection_methods")){const t=vr.e.getDomainFromJid(e);await this.discoverConnectionMethods(t)}super.connect(e,t,n||this.onConnectStatusChanged,59)}async reconnect(){const{__:e}=Uc;return zn.debug("RECONNECTING: the connection has dropped, attempting to reconnect."),this.setConnectionStatus(vr.e.Status.RECONNECTING,e("The connection has dropped, attempting to reconnect.")),Vc.trigger("will-reconnect"),this.reconnecting=!0,await Qc(),Vc.user.login()}async onConnected(e){delete this.reconnecting,this.flush(),await Uc.setUserJID(this.jid),await Vc.trigger("afterResourceBinding",e,{synchronous:!0}),e?Vc.trigger("reconnected"):Vc.trigger("connected")}setDisconnectionCause(e,t,n){void 0===e?(delete this.disconnection_cause,delete this.disconnection_reason):(void 0===this.disconnection_cause||n)&&(this.disconnection_cause=e,this.disconnection_reason=t)}setConnectionStatus(e,t){this.status=e,Uc.connfeedback.set({connection_status:e,message:t})}async finishDisconnection(){zn.debug("DISCONNECTED"),delete this.reconnecting,this.reset(),Qc(),await Kc(),delete Uc.connection,Vc.trigger("disconnected")}onDisconnected(){if(!Vc.settings.get("auto_reconnect"))return this.finishDisconnection();{const e=this.disconnection_reason;if(this.disconnection_cause===vr.e.Status.AUTHFAIL)return Vc.settings.get("credentials_url")||Vc.settings.get("authentication")===Uc.ANONYMOUS?Vc.connection.reconnect():this.finishDisconnection();if(this.disconnection_cause===Uc.LOGOUT||e===vr.e.ErrorCondition.NO_AUTH_MECH||"host-unknown"===e||"remote-connection-failed"===e)return this.finishDisconnection();Vc.connection.reconnect()}}onConnectStatusChanged(e,t){const{__:n}=Uc;var r;if(zn.debug("Status changed to: ".concat(Uc.CONNECTION_STATUS[e])),e===vr.e.Status.ATTACHFAIL)this.setConnectionStatus(e),null===(r=this.worker_attach_promise)||void 0===r||r.resolve(!1);else if(e===vr.e.Status.CONNECTED||e===vr.e.Status.ATTACHED){var i,o;if((null===(i=this.worker_attach_promise)||void 0===i?void 0:i.isResolved)&&this.status===vr.e.Status.ATTACHED)return;this.setConnectionStatus(e),null===(o=this.worker_attach_promise)||void 0===o||o.resolve(!0),Uc.send_initial_presence=!0,this.setDisconnectionCause(),this.reconnecting?(zn.debug(e===vr.e.Status.CONNECTED?"Reconnected":"Reattached"),this.onConnected(!0)):(zn.debug(e===vr.e.Status.CONNECTED?"Connected":"Attached"),this.restored&&(Uc.send_initial_presence=!1),this.onConnected())}else if(e===vr.e.Status.DISCONNECTED)this.setDisconnectionCause(e,t),this.onDisconnected();else if(e===vr.e.Status.BINDREQUIRED)this.bind();else if(e===vr.e.Status.ERROR)this.setConnectionStatus(e,n("An error occurred while connecting to the chat server."));else if(e===vr.e.Status.CONNECTING)this.setConnectionStatus(e);else if(e===vr.e.Status.AUTHENTICATING)this.setConnectionStatus(e);else if(e===vr.e.Status.AUTHFAIL)t||(t=n("Your XMPP address and/or password is incorrect. Please try again.")),this.setConnectionStatus(e,t),this.setDisconnectionCause(e,t,!0),this.onDisconnected();else if(e===vr.e.Status.CONNFAIL){var s;let r=t;"host-unknown"===t||"remote-connection-failed"==t?r=n("Sorry, we could not connect to the XMPP host with domain: %1$s",'"'.concat(vr.e.getDomainFromJid(this.jid),'"')):void 0!==t&&t===(null===vr.e||void 0===vr.e||null===(s=vr.e.ErrorCondition)||void 0===s?void 0:s.NO_AUTH_MECH)&&(r=n("The XMPP server did not offer a supported authentication mechanism")),this.setConnectionStatus(e,r),this.setDisconnectionCause(e,t)}else e===vr.e.Status.DISCONNECTING&&this.setDisconnectionCause(e,t)}isType(e){return"websocket"===e.toLowerCase()?this._proto instanceof vr.e.Websocket:"bosh"===e.toLowerCase()?vr.e.Bosh&&this._proto instanceof vr.e.Bosh:void 0}hasResumed(){var e;return(null===(e=Vc.settings.get("connection_options"))||void 0===e?void 0:e.worker)||this.isType("bosh")?Uc.connfeedback.get("connection_status")===vr.e.Status.ATTACHED:!this.do_bind}restoreWorkerSession(){return this.attach(this.onConnectStatusChanged),this.worker_attach_promise=Jo.getResolveablePromise(),this.worker_attach_promise}}class pa extends fa{constructor(e,t){super(e,t),this.sent_stanzas=[],this.IQ_stanzas=[],this.IQ_ids=[],this.features=vr.e.xmlHtmlNode('<stream:features xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client"><ver xmlns="urn:xmpp:features:rosterver"/><csi xmlns="urn:xmpp:csi:0"/><this xmlns="http://jabber.org/protocol/caps" ver="UwBpfJpEt3IoLYfWma/o/p3FFRo=" hash="sha-1" node="http://prosody.im"/><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><required/></bind><sm xmlns=\'urn:xmpp:sm:3\'/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"><optional/></session></stream:features>').firstChild,this._proto._processRequest=()=>{},this._proto._disconnect=()=>this._onDisconnectTimeout(),this._proto._onDisconnectTimeout=()=>{},this._proto._connect=()=>{this.connected=!0,this.mock=!0,this.jid="romeo@montague.lit/orchard",this._changeConnectStatus(vr.e.Status.BINDREQUIRED)}}_processRequest(){}sendIQ(e,t,n){Object(ha.isElement)(e)||(e=e.nodeTree),this.IQ_stanzas.push(e);const r=super.sendIQ(e,t,n);return this.IQ_ids.push(r),r}send(e){return Object(ha.isElement)(e)?this.sent_stanzas.push(e):this.sent_stanzas.push(e.nodeTree),super.send(e)}async bind(){await Vc.trigger("beforeResourceBinding",{synchronous:!0}),this.authenticated=!0,Uc.no_connection_on_bind||this._changeConnectStatus(vr.e.Status.CONNECTED)}}
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */const ga="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,ma=(e,t,n=null,r=null)=>{for(;t!==n;){const n=t.nextSibling;e.insertBefore(t,r),t=n}},va=(e,t,n=null)=>{for(;t!==n;){const n=t.nextSibling;e.removeChild(t),t=n}},_a=`{{lit-${String(Math.random()).slice(2)}}}`,ba=`\x3c!--${_a}--\x3e`,ya=new RegExp(`${_a}|${ba}`);class wa{constructor(e,t){this.parts=[],this.element=t;const n=[],r=[],i=document.createTreeWalker(t.content,133,null,!1);let o=0,s=-1,a=0;const{strings:c,values:{length:l}}=e;for(;a<l;){const e=i.nextNode();if(null!==e){if(s++,1===e.nodeType){if(e.hasAttributes()){const t=e.attributes,{length:n}=t;let r=0;for(let e=0;e<n;e++)Sa(t[e].name,"$lit$")&&r++;for(;r-- >0;){const t=c[a],n=Aa.exec(t)[2],r=n.toLowerCase()+"$lit$",i=e.getAttribute(r);e.removeAttribute(r);const o=i.split(ya);this.parts.push({type:"attribute",index:s,name:n,strings:o}),a+=o.length-1}}"TEMPLATE"===e.tagName&&(r.push(e),i.currentNode=e.content)}else if(3===e.nodeType){const t=e.data;if(t.indexOf(_a)>=0){const r=e.parentNode,i=t.split(ya),o=i.length-1;for(let t=0;t<o;t++){let n,o=i[t];if(""===o)n=Ea();else{const e=Aa.exec(o);null!==e&&Sa(e[2],"$lit$")&&(o=o.slice(0,e.index)+e[1]+e[2].slice(0,-"$lit$".length)+e[3]),n=document.createTextNode(o)}r.insertBefore(n,e),this.parts.push({type:"node",index:++s})}""===i[o]?(r.insertBefore(Ea(),e),n.push(e)):e.data=i[o],a+=o}}else if(8===e.nodeType)if(e.data===_a){const t=e.parentNode;null!==e.previousSibling&&s!==o||(s++,t.insertBefore(Ea(),e)),o=s,this.parts.push({type:"node",index:s}),null===e.nextSibling?e.data="":(n.push(e),s--),a++}else{let t=-1;for(;-1!==(t=e.data.indexOf(_a,t+1));)this.parts.push({type:"node",index:-1}),a++}}else i.currentNode=r.pop()}for(const e of n)e.parentNode.removeChild(e)}}const Sa=(e,t)=>{const n=e.length-t.length;return n>=0&&e.slice(n)===t},xa=e=>-1!==e.index,Ea=()=>document.createComment(""),Aa=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Ca(e,t){const{element:{content:n},parts:r}=e,i=document.createTreeWalker(n,133,null,!1);let o=Ta(r),s=r[o],a=-1,c=0;const l=[];let u=null;for(;i.nextNode();){a++;const e=i.currentNode;for(e.previousSibling===u&&(u=null),t.has(e)&&(l.push(e),null===u&&(u=e)),null!==u&&c++;void 0!==s&&s.index===a;)s.index=null!==u?-1:s.index-c,o=Ta(r,o),s=r[o]}l.forEach(e=>e.parentNode.removeChild(e))}const ja=e=>{let t=11===e.nodeType?0:1;const n=document.createTreeWalker(e,133,null,!1);for(;n.nextNode();)t++;return t},Ta=(e,t=-1)=>{for(let n=t+1;n<e.length;n++){const t=e[n];if(xa(t))return n}return-1};
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */
-const Oa=new WeakMap,ka=e=>(...t)=>{const n=e(...t);return Oa.set(n,!0),n},Na=e=>"function"==typeof e&&Oa.has(e),Ia={},Ma={};
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */
-class Ra{constructor(e,t,n){this.__parts=[],this.template=e,this.processor=t,this.options=n}update(e){let t=0;for(const n of this.__parts)void 0!==n&&n.setValue(e[t]),t++;for(const e of this.__parts)void 0!==e&&e.commit()}_clone(){const e=ga?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),t=[],n=this.template.parts,r=document.createTreeWalker(e,133,null,!1);let i,o=0,s=0,a=r.nextNode();for(;o<n.length;)if(i=n[o],xa(i)){for(;s<i.index;)s++,"TEMPLATE"===a.nodeName&&(t.push(a),r.currentNode=a.content),null===(a=r.nextNode())&&(r.currentNode=t.pop(),a=r.nextNode());if("node"===i.type){const e=this.processor.handleTextExpression(this.options);e.insertAfterNode(a.previousSibling),this.__parts.push(e)}else this.__parts.push(...this.processor.handleAttributeExpressions(a,i.name,i.strings,this.options));o++}else this.__parts.push(void 0),o++;return ga&&(document.adoptNode(e),customElements.upgrade(e)),e}}
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */const Da=` ${_a} `;class Pa{constructor(e,t,n,r){this.strings=e,this.values=t,this.type=n,this.processor=r}getHTML(){const e=this.strings.length-1;let t="",n=!1;for(let r=0;r<e;r++){const e=this.strings[r],i=e.lastIndexOf("\x3c!--");n=(i>-1||n)&&-1===e.indexOf("--\x3e",i+1);const o=Aa.exec(e);t+=null===o?e+(n?Da:ba):e.substr(0,o.index)+o[1]+o[2]+"$lit$"+o[3]+_a}return t+=this.strings[e],t}getTemplateElement(){const e=document.createElement("template");return e.innerHTML=this.getHTML(),e}}
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */
-const La=e=>null===e||!("object"==typeof e||"function"==typeof e),za=e=>Array.isArray(e)||!(!e||!e[Symbol.iterator]);class Fa{constructor(e,t,n){this.dirty=!0,this.element=e,this.name=t,this.strings=n,this.parts=[];for(let e=0;e<n.length-1;e++)this.parts[e]=this._createPart()}_createPart(){return new Ba(this)}_getValue(){const e=this.strings,t=e.length-1;let n="";for(let r=0;r<t;r++){n+=e[r];const t=this.parts[r];if(void 0!==t){const e=t.value;if(La(e)||!za(e))n+="string"==typeof e?e:String(e);else for(const t of e)n+="string"==typeof t?t:String(t)}}return n+=e[t],n}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class Ba{constructor(e){this.value=void 0,this.committer=e}setValue(e){e===Ia||La(e)&&e===this.value||(this.value=e,Na(e)||(this.committer.dirty=!0))}commit(){for(;Na(this.value);){const e=this.value;this.value=Ia,e(this)}this.value!==Ia&&this.committer.commit()}}class qa{constructor(e){this.value=void 0,this.__pendingValue=void 0,this.options=e}appendInto(e){this.startNode=e.appendChild(Ea()),this.endNode=e.appendChild(Ea())}insertAfterNode(e){this.startNode=e,this.endNode=e.nextSibling}appendIntoPart(e){e.__insert(this.startNode=Ea()),e.__insert(this.endNode=Ea())}insertAfterPart(e){e.__insert(this.startNode=Ea()),this.endNode=e.endNode,e.endNode=this.startNode}setValue(e){this.__pendingValue=e}commit(){if(null===this.startNode.parentNode)return;for(;Na(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Ia,e(this)}const e=this.__pendingValue;e!==Ia&&(La(e)?e!==this.value&&this.__commitText(e):e instanceof Pa?this.__commitTemplateResult(e):e instanceof Node?this.__commitNode(e):za(e)?this.__commitIterable(e):e===Ma?(this.value=Ma,this.clear()):this.__commitText(e))}__insert(e){this.endNode.parentNode.insertBefore(e,this.endNode)}__commitNode(e){this.value!==e&&(this.clear(),this.__insert(e),this.value=e)}__commitText(e){const t=this.startNode.nextSibling,n="string"==typeof(e=null==e?"":e)?e:String(e);t===this.endNode.previousSibling&&3===t.nodeType?t.data=n:this.__commitNode(document.createTextNode(n)),this.value=e}__commitTemplateResult(e){const t=this.options.templateFactory(e);if(this.value instanceof Ra&&this.value.template===t)this.value.update(e.values);else{const n=new Ra(t,e.processor,this.options),r=n._clone();n.update(e.values),this.__commitNode(r),this.value=n}}__commitIterable(e){Array.isArray(this.value)||(this.value=[],this.clear());const t=this.value;let n,r=0;for(const i of e)n=t[r],void 0===n&&(n=new qa(this.options),t.push(n),0===r?n.appendIntoPart(this):n.insertAfterPart(t[r-1])),n.setValue(i),n.commit(),r++;r<t.length&&(t.length=r,this.clear(n&&n.endNode))}clear(e=this.startNode){va(this.startNode.parentNode,e.nextSibling,this.endNode)}}class Ha{constructor(e,t,n){if(this.value=void 0,this.__pendingValue=void 0,2!==n.length||""!==n[0]||""!==n[1])throw new Error("Boolean attributes can only contain a single expression");this.element=e,this.name=t,this.strings=n}setValue(e){this.__pendingValue=e}commit(){for(;Na(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Ia,e(this)}if(this.__pendingValue===Ia)return;const e=!!this.__pendingValue;this.value!==e&&(e?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=e),this.__pendingValue=Ia}}class Ua extends Fa{constructor(e,t,n){super(e,t,n),this.single=2===n.length&&""===n[0]&&""===n[1]}_createPart(){return new $a(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class $a extends Ba{}let Wa=!1;(()=>{try{const e={get capture(){return Wa=!0,!1}};window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch(e){}})();class Ga{constructor(e,t,n){this.value=void 0,this.__pendingValue=void 0,this.element=e,this.eventName=t,this.eventContext=n,this.__boundHandleEvent=e=>this.handleEvent(e)}setValue(e){this.__pendingValue=e}commit(){for(;Na(this.__pendingValue);){const e=this.__pendingValue;this.__pendingValue=Ia,e(this)}if(this.__pendingValue===Ia)return;const e=this.__pendingValue,t=this.value,n=null==e||null!=t&&(e.capture!==t.capture||e.once!==t.once||e.passive!==t.passive),r=null!=e&&(null==t||n);n&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),r&&(this.__options=Va(e),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=e,this.__pendingValue=Ia}handleEvent(e){"function"==typeof this.value?this.value.call(this.eventContext||this.element,e):this.value.handleEvent(e)}}const Va=e=>e&&(Wa?{capture:e.capture,passive:e.passive,once:e.once}:e.capture)
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */;function Ja(e){let t=Xa.get(e.type);void 0===t&&(t={stringsArray:new WeakMap,keyString:new Map},Xa.set(e.type,t));let n=t.stringsArray.get(e.strings);if(void 0!==n)return n;const r=e.strings.join(_a);return n=t.keyString.get(r),void 0===n&&(n=new wa(e,e.getTemplateElement()),t.keyString.set(r,n)),t.stringsArray.set(e.strings,n),n}const Xa=new Map,Qa=new WeakMap,Ya=(e,t,n)=>{let r=Qa.get(t);void 0===r&&(va(t,t.firstChild),Qa.set(t,r=new qa(Object.assign({templateFactory:Ja},n))),r.appendInto(t)),r.setValue(e),r.commit()};
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */const Ka=new
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */
-class{handleAttributeExpressions(e,t,n,r){const i=t[0];if("."===i){return new Ua(e,t.slice(1),n).parts}return"@"===i?[new Ga(e,t.slice(1),r.eventContext)]:"?"===i?[new Ha(e,t.slice(1),n)]:new Fa(e,t,n).parts}handleTextExpression(e){return new qa(e)}};
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.2.1");const Za=(e,...t)=>new Pa(e,t,"html",Ka),ec=(e,t)=>`${e}--${t}`;let tc=!0;void 0===window.ShadyCSS?tc=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),tc=!1);const nc=e=>t=>{const n=ec(t.type,e);let r=Xa.get(n);void 0===r&&(r={stringsArray:new WeakMap,keyString:new Map},Xa.set(n,r));let i=r.stringsArray.get(t.strings);if(void 0!==i)return i;const o=t.strings.join(_a);if(i=r.keyString.get(o),void 0===i){const n=t.getTemplateElement();tc&&window.ShadyCSS.prepareTemplateDom(n,e),i=new wa(t,n),r.keyString.set(o,i)}return r.stringsArray.set(t.strings,i),i},rc=["html","svg"],ic=new Set,oc=(e,t,n)=>{ic.add(e);const r=n?n.element:document.createElement("template"),i=t.querySelectorAll("style"),{length:o}=i;if(0===o)return void window.ShadyCSS.prepareTemplateStyles(r,e);const s=document.createElement("style");for(let e=0;e<o;e++){const t=i[e];t.parentNode.removeChild(t),s.textContent+=t.textContent}(e=>{rc.forEach(t=>{const n=Xa.get(ec(t,e));void 0!==n&&n.keyString.forEach(e=>{const{element:{content:t}}=e,n=new Set;Array.from(t.querySelectorAll("style")).forEach(e=>{n.add(e)}),Ca(e,n)})})})(e);const a=r.content;n?function(e,t,n=null){const{element:{content:r},parts:i}=e;if(null==n)return void r.appendChild(t);const o=document.createTreeWalker(r,133,null,!1);let s=Ta(i),a=0,c=-1;for(;o.nextNode();){for(c++,o.currentNode===n&&(a=ja(t),n.parentNode.insertBefore(t,n));-1!==s&&i[s].index===c;){if(a>0){for(;-1!==s;)i[s].index+=a,s=Ta(i,s);return}s=Ta(i,s)}}}(n,s,a.firstChild):a.insertBefore(s,a.firstChild),window.ShadyCSS.prepareTemplateStyles(r,e);const c=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==c)t.insertBefore(c.cloneNode(!0),t.firstChild);else if(n){a.insertBefore(s,a.firstChild);const e=new Set;e.add(s),Ca(n,e)}};window.JSCompiler_renameProperty=(e,t)=>e;const sc={toAttribute(e,t){switch(t){case Boolean:return e?"":null;case Object:case Array:return null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){switch(t){case Boolean:return null!==e;case Number:return null===e?null:Number(e);case Object:case Array:return JSON.parse(e)}return e}},ac=(e,t)=>t!==e&&(t==t||e==e),cc={attribute:!0,type:String,converter:sc,reflect:!1,hasChanged:ac};class lc extends HTMLElement{constructor(){super(),this._updateState=0,this._instanceProperties=void 0,this._updatePromise=new Promise(e=>this._enableUpdatingResolver=e),this._changedProperties=new Map,this._reflectingProperties=void 0,this.initialize()}static get observedAttributes(){this.finalize();const e=[];return this._classProperties.forEach((t,n)=>{const r=this._attributeNameForProperty(n,t);void 0!==r&&(this._attributeToPropertyMap.set(r,n),e.push(r))}),e}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const e=Object.getPrototypeOf(this)._classProperties;void 0!==e&&e.forEach((e,t)=>this._classProperties.set(t,e))}}static createProperty(e,t=cc){if(this._ensureClassProperties(),this._classProperties.set(e,t),t.noAccessor||this.prototype.hasOwnProperty(e))return;const n="symbol"==typeof e?Symbol():"__"+e,r=this.getPropertyDescriptor(e,n,t);void 0!==r&&Object.defineProperty(this.prototype,e,r)}static getPropertyDescriptor(e,t,n){return{get(){return this[t]},set(n){const r=this[e];this[t]=n,this._requestUpdate(e,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this._classProperties&&this._classProperties.get(e)||cc}static finalize(){const e=Object.getPrototypeOf(this);if(e.hasOwnProperty("finalized")||e.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const e=this.properties,t=[...Object.getOwnPropertyNames(e),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e):[]];for(const n of t)this.createProperty(n,e[n])}}static _attributeNameForProperty(e,t){const n=t.attribute;return!1===n?void 0:"string"==typeof n?n:"string"==typeof e?e.toLowerCase():void 0}static _valueHasChanged(e,t,n=ac){return n(e,t)}static _propertyValueFromAttribute(e,t){const n=t.type,r=t.converter||sc,i="function"==typeof r?r:r.fromAttribute;return i?i(e,n):e}static _propertyValueToAttribute(e,t){if(void 0===t.reflect)return;const n=t.type,r=t.converter;return(r&&r.toAttribute||sc.toAttribute)(e,n)}initialize(){this._saveInstanceProperties(),this._requestUpdate()}_saveInstanceProperties(){this.constructor._classProperties.forEach((e,t)=>{if(this.hasOwnProperty(t)){const e=this[t];delete this[t],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(t,e)}})}_applyInstanceProperties(){this._instanceProperties.forEach((e,t)=>this[t]=e),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(e,t,n){t!==n&&this._attributeToProperty(e,n)}_propertyToAttribute(e,t,n=cc){const r=this.constructor,i=r._attributeNameForProperty(e,n);if(void 0!==i){const e=r._propertyValueToAttribute(t,n);if(void 0===e)return;this._updateState=8|this._updateState,null==e?this.removeAttribute(i):this.setAttribute(i,e),this._updateState=-9&this._updateState}}_attributeToProperty(e,t){if(8&this._updateState)return;const n=this.constructor,r=n._attributeToPropertyMap.get(e);if(void 0!==r){const e=n.getPropertyOptions(r);this._updateState=16|this._updateState,this[r]=n._propertyValueFromAttribute(t,e),this._updateState=-17&this._updateState}}_requestUpdate(e,t){let n=!0;if(void 0!==e){const r=this.constructor,i=r.getPropertyOptions(e);r._valueHasChanged(this[e],t,i.hasChanged)?(this._changedProperties.has(e)||this._changedProperties.set(e,t),!0!==i.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(e,i))):n=!1}!this._hasRequestedUpdate&&n&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(e,t){return this._requestUpdate(e,t),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(e){}const e=this.performUpdate();return null!=e&&await e,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){this._instanceProperties&&this._applyInstanceProperties();let e=!1;const t=this._changedProperties;try{e=this.shouldUpdate(t),e?this.update(t):this._markUpdated()}catch(t){throw e=!1,this._markUpdated(),t}e&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(t)),this.updated(t))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this._updatePromise}shouldUpdate(e){return!0}update(e){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach((e,t)=>this._propertyToAttribute(t,this[t],e)),this._reflectingProperties=void 0),this._markUpdated()}updated(e){}firstUpdated(e){}}lc.finalized=!0;
-/**
-@license
-Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
-This code may only be used under the BSD style license found at
-http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
-http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
-found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
-part of the polymer project is also subject to an additional IP rights grant
-found at http://polymer.github.io/PATENTS.txt
-*/
-const uc="adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dc=Symbol();class hc{constructor(e,t){if(t!==dc)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e}get styleSheet(){return void 0===this._styleSheet&&(uc?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const fc=(e,...t)=>{const n=t.reduce((t,n,r)=>t+(e=>{if(e instanceof hc)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but\n            take care to ensure page security.`)})(n)+e[r+1],e[0]);return new hc(n,dc)};
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */
-(window.litElementVersions||(window.litElementVersions=[])).push("2.3.1");const pc={};class gc extends lc{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const e=this.getStyles();if(void 0===e)this._styles=[];else if(Array.isArray(e)){const t=(e,n)=>e.reduceRight((e,n)=>Array.isArray(n)?t(n,e):(e.add(n),e),n),n=t(e,new Set),r=[];n.forEach(e=>r.unshift(e)),this._styles=r}else this._styles=[e]}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow({mode:"open"})}adoptStyles(){const e=this.constructor._styles;0!==e.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?uc?this.renderRoot.adoptedStyleSheets=e.map(e=>e.styleSheet):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(e.map(e=>e.cssText),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(e){const t=this.render();super.update(e),t!==pc&&this.constructor.render(t,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach(e=>{const t=document.createElement("style");t.textContent=e.cssText,this.renderRoot.appendChild(t)}))}render(){return pc}}gc.finalized=!0,gc.render=(e,t,n)=>{if(!n||"object"!=typeof n||!n.scopeName)throw new Error("The `scopeName` option is required.");const r=n.scopeName,i=Qa.has(t),o=tc&&11===t.nodeType&&!!t.host,s=o&&!ic.has(r),a=s?document.createDocumentFragment():t;if(Ya(e,a,Object.assign({templateFactory:nc(r)},n)),s){const e=Qa.get(a);Qa.delete(a);const n=e.value instanceof Ra?e.value.template:void 0;oc(r,a,n),va(t,t.firstChild),t.appendChild(a),Qa.set(t,e)}!i&&o&&window.ShadyCSS.styleElement(t.host)};class mc extends gc{constructor(){super(),Object.assign(this,_i)}createRenderRoot(){return this}disconnectedCallback(){super.disconnectedCallback(),this.stopListening()}}const vc=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)};vc.extend=Yr;const _c=/^[#\/]|\s+$/g,bc=/^\/+|\/+$/g,yc=/#.*$/;vc.started=!1,Object.assign(vc.prototype,_i,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,"$&/")===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+"/"===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,"%2525"))},getSearch:function(){const e=this.location.href.replace(/#.*/,"").match(/\?.+/);return e?e[0]:""},getHash:function(e){const t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:""},getPath:function(){const e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(_c,"")},start:function(e){if(vc.started)throw new Error("history has already been started");if(vc.started=!0,this.options=Or({root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=("/"+this.root+"/").replace(bc,"/"),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){const e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement("iframe"),this.iframe.src="javascript:0",this.iframe.style.display="none",this.iframe.tabIndex=-1;const e=document.body,t=e.insertBefore(this.iframe,e.firstChild).contentWindow;t.document.open(),t.document.close(),t.location.hash="#"+this.fragment}if(this._usePushState?addEventListener("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?addEventListener("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){this._usePushState?removeEventListener("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&removeEventListener("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),vc.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){let t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),Xs(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!vc.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||"");let n=this.root;""!==e&&"?"!==e.charAt(0)||(n=n.slice(0,-1)||"/");const r=n+e;e=e.replace(yc,"");const i=this.decodeFragment(e);if(this.fragment!==i){if(this.fragment=i,this._usePushState)this.history[t.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){const n=this.iframe.contentWindow;t.replace||(n.document.open(),n.document.close()),this._updateHash(n.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){const n=e.href.replace(/(javascript:|#).*$/,"");e.replace(n+"#"+t)}else e.hash="#"+t}});var wc=vc;var Sc=function(e){return Ee(e)&&"[object RegExp]"==k(e)},xc=ze.a&&ze.a.isRegExp,Ec=xc?Le(xc):Sc;const Ac=function(e={}){this.history=e.history||new wc,this.preinitialize.apply(this,arguments),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)};Ac.extend=Yr;const Cc=/\((.*?)\)/g,jc=/(\(\?)?:\w+/g,Tc=/\*\w+/g,Oc=/[\-{}\[\]+?.,\\\^$|#\s]/g;Object.assign(Ac.prototype,_i,{preinitialize:function(){},initialize:function(){},route:function(e,t,n){return Ec(e)||(e=this._routeToRegExp(e)),M(t)&&(n=t,t=""),n||(n=this[t]),this.history.route(e,r=>{const i=this._extractParameters(e,r);!1!==this.execute(n,i,t)&&(this.trigger.apply(this,["route:"+t].concat(i)),this.trigger("route",t,i),this.history.trigger("route",this,t,i))}),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,t){return this.history.navigate(e,t),this},_bindRoutes:function(){if(!this.routes)return;let e;this.routes=Qr(this,"routes");const t=Qe(this.routes);for(;null!=(e=t.pop());)this.route(e,this.routes[e])},_routeToRegExp:function(e){return e=e.replace(Oc,"\\$&").replace(Cc,"(?:$1)?").replace(jc,(function(e,t){return t?e:"([^/?]+)"})).replace(Tc,"([^?]*?)"),new RegExp("^"+e+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(e,t){const n=e.exec(t).slice(1);return n.map((function(e,t){return t===n.length-1?e||null:e?decodeURIComponent(e):null}))}});var kc=n(1),Nc=function(){return y.a.Date.now()},Ic=Math.max,Mc=Math.min;var Rc=function(e,t,n){var r,i,o,s,a,c,l=0,u=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function f(t){var n=r,o=i;return r=i=void 0,l=t,s=e.apply(o,n)}function p(e){return l=e,a=setTimeout(m,t),u?f(e):s}function g(e){var n=e-c;return void 0===c||n>=t||n<0||d&&e-l>=o}function m(){var e=Nc();if(g(e))return v(e);a=setTimeout(m,function(e){var n=t-(e-c);return d?Mc(n,o-(e-l)):n}(e))}function v(e){return a=void 0,h&&r?f(e):(r=i=void 0,s)}function _(){var e=Nc(),n=g(e);if(r=arguments,i=this,c=e,n){if(void 0===a)return p(c);if(d)return clearTimeout(a),a=setTimeout(m,t),f(c)}return void 0===a&&(a=setTimeout(m,t)),s}return t=di(t)||0,N(n)&&(u=!!n.leading,o=(d="maxWait"in n)?Ic(di(n.maxWait)||0,t):o,h="trailing"in n?!!n.trailing:h),_.cancel=function(){void 0!==a&&clearTimeout(a),l=0,r=c=i=a=void 0},_.flush=function(){return void 0===a?s:v(Nc())},_};var Dc=function(e,t,n){t=Gr(t,e);var r=null==(e=To(e,t))?e:e[Vr(Co(t))];return null==r?void 0:yr(r,e,n)},Pc=jr(Dc),Lc=n(94);
-/**
- * @module converse-core
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-En.a.extend(Sn.a),kc.e.addNamespace("CARBONS","urn:xmpp:carbons:2"),kc.e.addNamespace("CHATSTATES","http://jabber.org/protocol/chatstates"),kc.e.addNamespace("CSI","urn:xmpp:csi:0"),kc.e.addNamespace("DELAY","urn:xmpp:delay"),kc.e.addNamespace("FASTEN","urn:xmpp:fasten:0"),kc.e.addNamespace("FORWARD","urn:xmpp:forward:0"),kc.e.addNamespace("HINTS","urn:xmpp:hints"),kc.e.addNamespace("HTTPUPLOAD","urn:xmpp:http:upload:0"),kc.e.addNamespace("IDLE","urn:xmpp:idle:1"),kc.e.addNamespace("MAM","urn:xmpp:mam:2"),kc.e.addNamespace("MODERATE","urn:xmpp:message-moderate:0"),kc.e.addNamespace("NICK","http://jabber.org/protocol/nick"),kc.e.addNamespace("OMEMO","eu.siacs.conversations.axolotl"),kc.e.addNamespace("OUTOFBAND","jabber:x:oob"),kc.e.addNamespace("PUBSUB","http://jabber.org/protocol/pubsub"),kc.e.addNamespace("REGISTER","jabber:iq:register"),kc.e.addNamespace("RETRACT","urn:xmpp:message-retract:0"),kc.e.addNamespace("ROSTERX","http://jabber.org/protocol/rosterx"),kc.e.addNamespace("RSM","http://jabber.org/protocol/rsm"),kc.e.addNamespace("SID","urn:xmpp:sid:0"),kc.e.addNamespace("SPOILER","urn:xmpp:spoiler:0"),kc.e.addNamespace("STANZAS","urn:ietf:params:xml:ns:xmpp-stanzas"),kc.e.addNamespace("STYLING","urn:xmpp:styling:0"),kc.e.addNamespace("VCARD","vcard-temp"),kc.e.addNamespace("VCARDUPDATE","vcard-temp:x:update"),kc.e.addNamespace("XFORM","jabber:x:data");class zc extends Error{}const Fc=["converse-adhoc","converse-bookmarks","converse-bosh","converse-caps","converse-carbons","converse-chat","converse-chatboxes","converse-disco","converse-emoji","converse-headlines","converse-mam","converse-muc","converse-ping","converse-pubsub","converse-roster","converse-smacks","converse-status","converse-vcard"],Bc={allow_non_roster_messaging:!1,assets_path:"/dist",authentication:"login",auto_login:!1,auto_reconnect:!0,blacklisted_plugins:[],clear_cache_on_logout:!1,connection_options:{},credentials_url:null,discover_connection_methods:!0,geouri_regex:/https\:\/\/www.openstreetmap.org\/.*#map=[0-9]+\/([\-0-9.]+)\/([\-0-9.]+)\S*/g,geouri_replacement:"https://www.openstreetmap.org/?mlat=$1&mlon=$2#map=18/$1/$2",i18n:"en",idle_presence_timeout:300,jid:void 0,keepalive:!0,loglevel:"info",locales:["af","ar","bg","ca","cs","de","eo","es","eu","en","fi","fr","gl","he","hi","hu","id","it","ja","nb","nl","mr","oc","pl","pt","pt_BR","ro","ru","tr","uk","vi","zh_CN","zh_TW"],nickname:void 0,password:void 0,persistent_store:"localStorage",rid:void 0,root:window.document,sid:void 0,singleton:!1,strict_plugin_dependencies:!1,view_mode:"overlayed",websocket_url:void 0,whitelisted_plugins:[]},qc={};qc[kc.e.Status.ATTACHED]="ATTACHED",qc[kc.e.Status.AUTHENTICATING]="AUTHENTICATING",qc[kc.e.Status.AUTHFAIL]="AUTHFAIL",qc[kc.e.Status.CONNECTED]="CONNECTED",qc[kc.e.Status.CONNECTING]="CONNECTING",qc[kc.e.Status.CONNFAIL]="CONNFAIL",qc[kc.e.Status.DISCONNECTED]="DISCONNECTED",qc[kc.e.Status.DISCONNECTING]="DISCONNECTING",qc[kc.e.Status.ERROR]="ERROR",qc[kc.e.Status.RECONNECTING]="RECONNECTING",qc[kc.e.Status.REDIRECT]="REDIRECT";const Hc={initialize(){},__:(...e)=>Object(Lc.sprintf)(...e)},Uc={log:zn,CONNECTION_STATUS:qc,templates:{},promises:{initialized:Jo.getResolveablePromise()},STATUS_WEIGHTS:{offline:6,unavailable:5,xa:4,away:3,dnd:2,chat:1,online:1},ANONYMOUS:"anonymous",CLOSED:"closed",EXTERNAL:"external",LOGIN:"login",LOGOUT:"logout",OPENED:"opened",PREBIND:"prebind",STANZA_TIMEOUT:1e4,SUCCESS:"success",FAILURE:"failure",DEFAULT_IMAGE_TYPE:"image/svg+xml",DEFAULT_IMAGE:"UklGRjwNAABXRUJQVlA4TC8NAAAvA8FAELV4u21bT2pt2/j/v+AoZVndP5aQsPQoyXG+OvANFTsqbwKCQG4bSZKcjFcFI2f2CAoAABBuo7tcjKa2t9q2bdvWvHU2i9m2rXybzK5tfN2mbtNenLsJqDv/3/n/zv93/r+rNBSUUYF2277XPy/97gqZBF7SwwAMCkzmNiHzvKd/zQsSIPe4F47AAU2CgJso3J7N2yVJDj8v/Y0M4DQiYe+fA2/Ln4HsO4M2Ar/2Nuh8SZh74wKjCV3o3pb5Y3LZvr0nfIHe1zBjPKHiavgrIOsQ5EDgbXk95HL6pyB4KpOPRV/DlqmEjVVEsRpgwm7LBTivRI4C1EOy++prqNKeUE8wXrASxrCa0goaCmihj1GeZ5vv1ZTeGAMN1XjuaUjOqPY1IMqTsMg8SHLEZAqfrCWEbdyASSO9DDP+8bmg8Xt1IIS1kKeA0QI024d1klegvlbffE/zlo+s6fCJDZt5Tx+cdDzcf7EV25cOaPEGSZr58V39HWPuM4P4/MB0Ev5Drw0qpC8Yz5SZ4C0Zb21mvE5yejifTzx4rD4PGWdSv/AggOYkVKM/ATU28Q9+xudM0LTmLHtYT8EzG36XvJ4zAT/jCKg5ojYBzXUS2gnZfpGGM+QagLjQnAQWBmNAxPEXcZKwRC2VJGNjcuDAVOP6iBy2qz21LCfJM/9Oih1Dg1cgCZ141XDc0ZQE1m9V/dKTBAm9nCP4ugpgqvP6ec+5xTnJAqOqQp0XW9DQhW8NyR2NSWD+VmHCYLa0sRtDsDXlh+0zrSBhCLMq1Hi6TejGv4bldV0+ksDCsMCTyxsOold/dbnhLQWrQpXHIAk9BNTQxIn6JDBQGQUoiID1l68GQqpCmrvbhO5VDU9SWU1YPtYNxYHZBD6FNTwx4jNoQsPypqBNTZJfDAcHWjCS0IBb3VhcqU8CA+2BgSz3QEBDLbajADcYG2qTLfeQHRQPHEAAGlpxqBu9XyYX9j8MCSI2CSPHuuHHl2TzMSDQpiaBQ17d+N0hoWY/GB6oTLZcgDi1f0CHqSmR8yAJFQ9DATcmE/6hW9PGlMunzbRqfp/8Pg2ETx4mcEisKYIZA+JS8nj9oLH1FOrhkMw/hwG+zCY8gdoNObbssa0q8D8Jr/+Bryrs9q9P3aAukw0+g2DGnYS5RXUnG2H4hmpBxZIfyQarGgVA5Sm7j261eE+4PRsCK0YTHkOaAuu3QcBZ9j4xDD+Zfz7tOHPJdj2FA48TRlZDgN3bsEJETRF92hIkaXlOnjCYQhH5lS27BgDym4Q/KExjxu00zln4maeRO7NpbFYJ38/9D2dmE/ZWxxlKs4L0wWKSNV85TAJ+9+8c5MsaNFmz+1AQHmcdin2gYfa3/70izhqPDkhRRjNXsGUrKwkCGIQiW43IvOwvoPmaYbuhmbKPDtt1ntnc+yDyNKEelQ44sZIwxlLyxkEUquWGg2/JG6PJ17wDqtQnPDFC30ODloRb1w/sgBF9oOOssBVCtb4a/vUr4/cYdbg6DLdBs0O972HDTJ5ZXx3B4L2Hn4Bw7rqk6qik520ypxrfdYdiPeKcDn2PCHhhlYAuVRgxABqa0a3O6FwSBjGuzgQCBx7hfY9iRIGNZTfC4ICGHaMAzWCQ2a2bih3J4dJtBRt0SVHf41ByP+/2kDC+ajpuYC03qDWtPpKHbnP6kve+x4WEBlQ7QeRRwjekG3Y8Akm2PES64fcp4dGs09s+4ULf43bCbxQ7IQ0z4THYBsLhJsn+u+Fhl8D87fT+kxz6Hg8Svp87nU8JN6uR7WmktKHektO50/mUfPS9efKEXCdk+JR8XA1qIAnR2PKnAegjed51euJbMh8ikHiWwILWgArMseW6AdoyOR+GUlGeMIhRQ2HKffqP35tqzCtoKK/BROI+iClqKsjofEKu5u1z9g/DCS3aE36i1NT2cZGcZ8MJDEcShOwG6qLQM8LkZz2cCiM6QMM0SX8ObPfnAz48gWaLUQ2oIhc4YYwciG1m8++E1XkNKqVwCnHCMlexAtd0XHHlPnnm5NXIw6qeuLxLwjA3yMYF/ecdOSuGkiDcqFwNrEKGQ8wmCXzmmdo9zJOEOQ4jU4OrjoTBhJuW+yURxxpgVciTyGO6gMfqkac/51GAaQ+eKgiswZssts72P+i+1fQH0I38X/IuHGU/JlfAv2fg6Wl9GTDgFwk9HMEM7N95wPRnnXDF8MMFEk+SgDDIeXx/p/eL35mBbZLlYbgUrnxBkCQsfLMDF+hguq3nOL/A+kmSyxbXGjCFEkX8gp8kIMzwkzKScUAZPBDg2Gmx+tmT/MV3ZrZJMn+g6KcGTdUj6bx/T+OFKdqo4ipHKGXD4vOHqy9Pu0sa3/lAxmO1HiZVUHGjjL8sZsosUUM57teljQJ0HCpV/zwQBbw58EI/y13uj1Sf8XkErM7DZRwqawliI5d4f6CDAYYOqy01X48PM/RqFGCqw2YcHBRkUUN3uZzf5wVsTX0Q8Ojv3Myx3553NRxvkst16bcLOlUJb4/9Dg1aEm5fHXS7rkGHZPfV74gFDiJKRgFu+eMywE+9bnNJGMH8tj0wnMBEsccpjv0IEy5BuG3guQiaHQevDt/bwFLEQkIPlnXrsaA7YZH118X1NGiUMpfAIfdq4O378wXJZjlhgd3zXoYmV+Em8DlixPo3CHEDL5lzC50ehj2fQBJgjkMdBfi3CIXDrCThG059Cyxx9CRhgg2QquOfD9juALUd1EM7pCC0K4gUMwaa0Eci2F4FnZ3MJqGRIMNUe4w5xgWs2mDKA17i0mb3+LFpoSBhfOQGDi+t6gV/6pIwx27oPQrtFbxkyRvMqj1yFNOR8AzqpPk54TmUSS+bZDOfhDy/EobZg1qrKkx4tUzgcwud3oQjn0GSL06hXK3B4ctHeElmSE0iF25CM+qTjpdkT94kZPiUZMlPoiG3KhSpgJOA8BWnfmRY4ukGTZig+LNao8cp2KBJ4JFbEzGmIwnjmEx6ZCwJnacJRR78JGGR21gCtilI5H8noZfEP4ftQciwl7kkNBJ0qrbIUEBrGqlBdcI1IleSBA6ek/A4JAnXrkua8EbNWEI/pSi2qRP+NCRhnn3I9h7UeYQINIh5jWm1BYs37+GlccmGmkgMS2MISJ60uoyxTNyEWiwbsuQLoRBaVD3y6jlZ8vjYc6BwLQkcKt5HAdqiRyVs0AQh3cAJzWhNmPE3QXAJCLsnsWubyyWhBp0JM5qTexrgJWGey5s29U45nCRce+k3RN4nDJILqVoiQx7N2ySv7GT/Z7bsBmwCx3EkOf/SmnBj0iqhhYeIc6bs2HT62ObzgxI6k4SuBfIt6kDua8Iykb0GPNcT2IRVS7B4/sAFTeBwDxsUYCZ0YzAK0IwfUwm1mPM2oQpK03UpVCX3mFGTwCagqdB/BA2fNxhzifkk8GHgD25S1QU2aLgOvs+cqUt4vGqBLieYTIKEPyRCLhJYTSgzTNOGqgQOyfWY0IR603GePNYDy8k3Sk1XH5BjCTApowAQLnxGlIQZTj23AM+ThDrk+wwqDCYcrYnXpZNJwzYJw0/HUYCCzvuEISyq8V8/IKUIE+5ALrYjCWOLpsV3zi8FiVsJInYCNtTiNYGBdNUjpfQnCa3kIjOh1skrKn0GBZqTL6CGq0G48xI4CRweYn8NMwpQRdgh4QLYJuz5P6EH81GAIh5uDng14XnInoQqTOlKGMaxacHZhBWiqurqH8SSWywlgccbPA1qAOJOQjMKfQYiDxKGcRtDh2NMJkHMXxKhVFWdlskvjtUIjWcJPEqqChcWgojkJpKWYWFXVRTtE15CbyjsGE84f6qqui6JaH4+J2GKMnTHnhhOuD/rM0UKcHIhDQMMyaEeSRJGOIjGKEAjZN4lfITaNN8nvEamqtBnOGF7E6UJw89VhTQvEngUNEGdJUfIY1WospehJCA0zDFAn9RLAkzKKECvRYanSYAZeYGXhJUnnIBGAZqRojrhEbgGDGlNGMW1qgoVWhLONT0nu3VVFc4MJ3Rg3HCNwLMEBtSmui6EA4/gJIH3wjBwkidk+k1hCCvNSKi7/6jJEHiW8BelMShcSxCxF8zYB4yEWlTH3r6S2ceYYti1TLgJdQwNGpPv44QqaKRQiyTNsLbVd9GigiGECQJ6OYTOKEBrdoMEPvuRqjUaVAAnfEVlFKCRHVtQRFxA+XT62S4DUqMAjT+wEriUo6pgIf2KKIjZVK3Rfl/skt2BitkoQP8FiwmJbGULseh7mGqPGf0JMFVUcJXGZQKbwFGA5mfaQLPkD2eXK0TJ03NT4cdksqSG0xyFCS+hHb12BQYD4mZse8AEbPX1NcVwMpE5Cg2aUCTABp0I+70mXh2GAuZBJ7JARg1MiGxktAExTe/XD1uTgUikven8vphUV8ORRCuSBv4nH/zQqAVOlPONblp4wUZ0qz1G7IZBx3b/nGqPPqW8PzHID8qwW9cAXSCNMgpQqjtSj4/Qqvv3IyrILOrO/3f+v/P/nf/vQA0A",TIMEOUTS:{PAUSED:1e4,INACTIVE:9e4},INACTIVE:"inactive",ACTIVE:"active",COMPOSING:"composing",PAUSED:"paused",GONE:"gone",PRIVATE_CHAT_TYPE:"chatbox",CHATROOMS_TYPE:"chatroom",HEADLINES_TYPE:"headline",CONTROLBOX_TYPE:"controlbox",default_connection_options:{explicitResourceBinding:!0},router:new Ac,TimeoutError:zc,isTestEnv:()=>"montague.lit/http-bind"===Wc.bosh_service_url,__:(...e)=>Hc.__(...e),___:e=>e};let $c;Uc.VERSION_NAME="v7.0.3dev",Object.assign(Uc,_i),ur.enable(Uc,"_converse","pluggable");let Wc={};function Gc(){var e;if(!Uc.bare_jid){const e="No JID to fetch user settings for";throw zn.error(e),Error(e)}if(!(null===(e=$c)||void 0===e?void 0:e.fetched)){const e="converse.user-settings.".concat(Uc.bare_jid);$c=new qo({id:e}),$c.browserStorage=Xc(e),$c.fetched=$c.fetch({promise:!0})}return $c.fetched}const Vc=Uc.api={connection:{connected(){var e;return(null==Uc||null===(e=Uc.connection)||void 0===e?void 0:e.connected)&&!0},disconnect(){Uc.connection&&Uc.connection.disconnect()},async reconnect(){const e=Uc.connfeedback.get("connection_status");if(Vc.settings.get("authentication")===Uc.ANONYMOUS&&(await Qc(),await Kc()),e===kc.e.Status.CONNFAIL?Vc.connection.isType("websocket")&&Vc.settings.get("bosh_service_url")?(await Uc.setUserJID(Uc.bare_jid),Uc.connection._proto._doDisconnect(),Uc.connection._proto=new kc.e.Bosh(Uc.connection),Uc.connection.service=Vc.settings.get("bosh_service_url")):Vc.connection.isType("bosh")&&Vc.settings.get("websocket_url")&&(Vc.settings.get("authentication")===Uc.ANONYMOUS?await Uc.setUserJID(Vc.settings.get("jid")):await Uc.setUserJID(Uc.bare_jid),Uc.connection._proto._doDisconnect(),Uc.connection._proto=new kc.e.Websocket(Uc.connection),Uc.connection.service=Vc.settings.get("websocket_url")):e===kc.e.Status.AUTHFAIL&&Vc.settings.get("authentication")===Uc.ANONYMOUS&&await Uc.setUserJID(Vc.settings.get("jid")),!Uc.connection.reconnecting)return Uc.connection.reconnect();Uc.connection.debouncedReconnect()},isType:e=>Uc.connection.isType(e)},async trigger(e){if(!Uc._events)return;const t=Array.from(arguments),n=t.pop();if(n&&n.synchronous){const n=Uc._events[e]||[];await Promise.all(n.map(e=>e.callback.apply(e.ctx,t.splice(1))))}else Uc.trigger.apply(Uc,arguments);const r=Uc.promises[e];void 0!==r&&r.resolve()},hook(e,t,n){const r=Uc._events[e]||[];if(r.length){const e=r.reduce((e,n)=>e.then(e=>n.callback(t,e)),Promise.resolve(n));return e.catch(e=>{throw zn.error(e),e}),e}return n},user:{jid:()=>Uc.connection.jid,async login(e,t,n=!1){var r,i;if(e=e||Uc.jid,(!(null===(r=Uc.connection)||void 0===r?void 0:r.jid)||e&&!Jo.isSameDomain(Uc.connection.jid,e))&&await Uc.initConnection(),(null===(i=Vc.settings.get("connection_options"))||void 0===i?void 0:i.worker)&&await Uc.connection.restoreWorkerSession())return;e&&(e=await Uc.setUserJID(e));const o=Uc.pluggable.plugins["converse-bosh"];if(o&&o.enabled()){if(await Uc.restoreBOSHSession())return;if(Vc.settings.get("authentication")===Uc.PREBIND&&(!n||Vc.settings.get("auto_login")))return Uc.startNewPreboundBOSHSession()}t=t||Vc.settings.get("password"),async function(e,t){const{api:n}=Uc;n.settings.get("authentication")===Uc.LOGIN?e?Yc(e):Uc.api.settings.get("credentials_url")?Yc(await async function(){let e,t=0;for(;!e;){try{e=await nl(t)}catch(e){zn.error("Could not fetch login credentials"),zn.error(e)}t=2e3}return e}()):Uc.jid&&(Uc.api.settings.get("password")||Uc.connection.pass)?Yc():!Uc.isTestEnv()&&"credentials"in navigator?Yc(await async function(){try{const e=await navigator.credentials.get({password:!0});if(e&&"password"==e.type&&Jo.isValidJID(e.id))return await Uc.setUserJID(e.id),{jid:e.id,password:e.password}}catch(e){zn.error(e)}}()):!Uc.isTestEnv()&&zn.warn("attemptNonPreboundSession: Couldn't find credentials to log in with"):![Uc.ANONYMOUS,Uc.EXTERNAL].includes(Uc.api.settings.get("authentication"))||t&&!Uc.api.settings.get("auto_login")||Yc()}(e&&t?{jid:e,password:t}:null,n)},logout(){const e=Jo.getResolveablePromise(),t=()=>{Object.keys(Uc.promises).forEach(Jc),delete Uc.jid,Vc.trigger("logout"),e.resolve()};return Uc.connection.setDisconnectionCause(Uc.LOGOUT,void 0,!0),void 0!==Uc.connection?(Vc.listen.once("disconnected",()=>t()),Uc.connection.disconnect()):t(),e},settings:{getModel:async()=>(await Gc(),$c),get:async(e,t)=>(await Gc(),void 0===$c.get(e)?t:$c.get(e)),async set(e,t){if(await Gc(),N(e))return $c.save(e,{promise:!0});{const n={};return n[e]=t,$c.save(n,{promise:!0})}},async clear(){await Gc(),$c.clear()}}},settings:{extend(e){Jo.merge(Bc,e);const t=Object.keys(Bo(e,Object.keys(Bc))),n=Bo(Wc,t),r=Or(Bo(e,t),n);Jo.merge(Uc.settings,r),Jo.merge(Uc,r)},update(e){return zn.warn("The api.settings.update method has been deprecated and will be removed. Please use api.settings.extend instead."),this.extend(e)},get(e){if(Object.keys(Bc).includes(e))return Uc[e]},set(e,t){const n={};N(e)?(Or(Uc,Bo(e,Object.keys(Bc))),Or(Uc.settings,Bo(e,Object.keys(Bc)))):"string"==typeof e&&(n[e]=t,Or(Uc,Bo(n,Object.keys(Bc))),Or(Uc.settings,Bo(n,Object.keys(Bc))))}},promises:{add(e,t=!0){(e=Array.isArray(e)?e:[e]).forEach(e=>{const n=Jo.getResolveablePromise();n.replace=t,Uc.promises[e]=n})}},listen:{once:Uc.once.bind(Uc),on:Uc.on.bind(Uc),not:Uc.off.bind(Uc),stanza(e,t,n){M(t)?(n=t,t={}):t=t||{},Uc.connection.addHandler(n,t.ns,e,t.type,t.id,t.from,t)}},waitUntil(e){if(M(e))return Jo.waitUntil(e);{const t=Uc.promises[e];return void 0===t?null:t}},send:e=>Vc.connection.connected()?("string"==typeof e&&(e=Jo.toStanza(e)),"iq"===e.tagName?Vc.sendIQ(e):(Uc.connection.send(e),void Vc.trigger("send",e))):(zn.warn("Not sending stanza because we're not connected!"),void zn.warn(kc.e.serialize(e))),sendIQ(e,t=Uc.STANZA_TIMEOUT,n=!0){var r,i;let o;return e=null!==(r=null===(i=e)||void 0===i?void 0:i.nodeTree)&&void 0!==r?r:e,["get","set"].includes(e.getAttribute("type"))?(t=t||Uc.STANZA_TIMEOUT,n?(o=new Promise((n,r)=>Uc.connection.sendIQ(e,n,r,t)),o.catch(n=>{if(null===n)throw new zc("Timeout error after ".concat(t,"ms for the following IQ stanza: ").concat(kc.e.serialize(e)))})):o=new Promise(n=>Uc.connection.sendIQ(e,n,n,t))):(Uc.connection.sendIQ(e),o=Promise.resolve()),Vc.trigger("send",e),o}};function Jc(e){const t=Uc.promises[e];if(!t)throw new Error("Tried to replace non-existing promise: ".concat(e));if(t.replace){const n=Jo.getResolveablePromise();n.replace=t.replace,Uc.promises[e]=n}else zn.debug('Not replacing promise "'.concat(e,'"'))}function Xc(e,t){const n=Uc.storage[t||Uc.getDefaultStore()];return new yn(e,n)}async function Qc(){return await Uc.api.trigger("beforeTearDown",{synchronous:!0}),window.removeEventListener("click",Uc.onUserActivity),window.removeEventListener("focus",Uc.onUserActivity),window.removeEventListener("keypress",Uc.onUserActivity),window.removeEventListener("mousemove",Uc.onUserActivity),window.removeEventListener(Uc.unloadevent,Uc.onUserActivity),window.clearInterval(Uc.everySecondTrigger),Uc.api.trigger("afterTearDown"),Uc}function Yc(e){if([Uc.ANONYMOUS,Uc.EXTERNAL].includes(Uc.api.settings.get("authentication"))){if(!Uc.jid)throw new Error("Config Error: when using anonymous login you need to provide the server's domain via the 'jid' option. Either when calling converse.initialize, or when calling _converse.api.user.login.");Uc.connection.reconnecting||Uc.connection.reset(),Uc.connection.connect(Uc.jid.toLowerCase())}else if(Uc.api.settings.get("authentication")===Uc.LOGIN){var t;const n=e?e.password:(null===(t=Uc.connection)||void 0===t?void 0:t.pass)||Uc.api.settings.get("password");if(!n){if(Uc.api.settings.get("auto_login"))throw new Error("autoLogin: If you use auto_login and authentication='login' then you also need to provide a password.");return Uc.connection.setDisconnectionCause(kc.e.Status.AUTHFAIL,void 0,!0),void Uc.api.connection.disconnect()}Uc.connection.reconnecting||Uc.connection.reset(),Uc.connection.connect(Uc.jid,n)}}function Kc(){var e;return null===(e=Uc.session)||void 0===e||e.destroy(),delete Uc.session,Uc.shouldClearCache()&&Uc.api.user.settings.clear(),Uc.api.trigger("clearSession",{synchronous:!0})}async function Zc(e){var t;const n=Vc.settings.get("connection_options").worker,r=kc.e.getBareJidFromJid(e).toLowerCase(),i="converse.session-".concat(r);(null===(t=Uc.session)||void 0===t?void 0:t.get("id"))!==i?(Uc.session=new qo({id:i}),Uc.session.browserStorage=Xc(i,n?"persistent":"session"),await new Promise(e=>Uc.session.fetch({success:e,error:e})),!n&&Uc.session.get("active")&&(Uc.session.clear(),Uc.session.save({id:i})),el(e),function(){if("sessionStorage"===Vc.settings.get("persistent_store"))return;if("BrowserExtLocal"===Uc.api.settings.get("persistent_store"))return yn.localForage.defineDriver(pr.a).then(()=>yn.localForage.setDriver("webExtensionLocalStorage")),void(Uc.storage.persistent=yn.localForage);if("BrowserExtSync"===Uc.api.settings.get("persistent_store"))return yn.localForage.defineDriver(hr.a).then(()=>yn.localForage.setDriver("webExtensionSyncStorage")),void(Uc.storage.persistent=yn.localForage);const e={name:Uc.isTestEnv()?"converse-test-persistent":"converse-persistent",storeName:Uc.bare_jid};"localStorage"===Uc.api.settings.get("persistent_store")?(e.description="localStorage instance",e.driver=[yn.localForage.LOCALSTORAGE]):"IndexedDB"===Uc.api.settings.get("persistent_store")?(e.description="indexedDB instance",e.driver=[yn.localForage.INDEXEDDB]):"none"===Uc.api.settings.get("persistent_store")&&(e.description="in-memory instance",e.driver=[yn.IN_MEMORY]),Uc.storage.persistent=yn.localForage.createInstance(e)}(),Uc.api.trigger("userSessionInitialized")):el(e)}function el(e){e=Uc.session.get("jid")||e,Uc.api.settings.get("authentication")===Uc.ANONYMOUS||kc.e.getResourceFromJid(e)||(e=e.toLowerCase()+fa.generateResource()),Uc.jid=e,Uc.bare_jid=kc.e.getBareJidFromJid(e),Uc.resource=kc.e.getResourceFromJid(e),Uc.domain=kc.e.getDomainFromJid(e),Uc.session.save({jid:e,bare_jid:Uc.bare_jid,resource:Uc.resource,domain:Uc.domain,active:!0}),Uc.connection.jid=e}async function tl(){var e;await Vc.trigger("cleanup",{synchronous:!0}),Uc.router.history.stop(),document.removeEventListener("visibilitychange",Uc.saveWindowState),Vc.trigger("unregisteredGlobalEventHandlers"),null===(e=Uc.connection)||void 0===e||e.reset(),Uc.stopListening(),Uc.off(),Uc.promises.initialized.isResolved&&Vc.promises.add("initialized")}function nl(e=0){return new Promise(Rc((e,t)=>{const n=new XMLHttpRequest;n.open("GET",Vc.settings.get("credentials_url"),!0),n.setRequestHeader("Accept","application/json, text/javascript"),n.onload=()=>{if(n.status>=200&&n.status<400){const t=JSON.parse(n.responseText);Uc.setUserJID(t.jid).then(()=>{e({jid:t.jid,password:t.password})})}else t(new Error("".concat(n.status,": ").concat(n.responseText)))},n.onerror=t,n.send()},e))}Uc.isUniView=function(){return["mobile","fullscreen","embedded"].includes(Vc.settings.get("view_mode"))},Uc.getDefaultStore=function(){if(Uc.config.get("trusted")){return"sessionStorage"===Vc.settings.get("persistent_store")?"session":"persistent"}return"session"},Uc.createStore=Xc,Uc.shouldClearCache=()=>!Uc.config.get("trusted")||Vc.settings.get("clear_cache_on_logout")||Uc.isTestEnv(),Uc.initConnection=function(){const e=Uc.api;if(!e.settings.get("bosh_service_url")){if(e.settings.get("authentication")===Uc.PREBIND)throw new Error("authentication is set to 'prebind' but we don't have a BOSH connection");if(!e.settings.get("websocket_url"))throw new Error("initConnection: you must supply a value for either the bosh_service_url or websocket_url or both.")}const t=Uc.isTestEnv()?pa:fa;if(("WebSocket"in window||"MozWebSocket"in window)&&e.settings.get("websocket_url"))Uc.connection=new t(e.settings.get("websocket_url"),Object.assign(Uc.default_connection_options,e.settings.get("connection_options")));else{if(!e.settings.get("bosh_service_url"))throw new Error("initConnection: this browser does not support websockets and bosh_service_url wasn't specified.");Uc.connection=new t(e.settings.get("bosh_service_url"),Object.assign(Uc.default_connection_options,e.settings.get("connection_options"),{keepalive:e.settings.get("keepalive")}))}!function(){const e={};e[kc.e.LogLevel.DEBUG]="debug",e[kc.e.LogLevel.INFO]="info",e[kc.e.LogLevel.WARN]="warn",e[kc.e.LogLevel.ERROR]="error",e[kc.e.LogLevel.FATAL]="fatal",kc.e.log=(t,n)=>zn.log(n,e[t]),kc.e.error=e=>zn.error(e),Uc.connection.xmlInput=e=>zn.debug(e.outerHTML,"color: darkgoldenrod"),Uc.connection.xmlOutput=e=>zn.debug(e.outerHTML,"color: darkcyan")}(),e.trigger("connectionInitialized")},Uc.setUserJID=async function(e){return await Zc(e),Uc.api.trigger("setUserJID"),e},Uc.saveWindowState=function(e){let t;const n={focus:"visible",focusin:"visible",pageshow:"visible",blur:"hidden",focusout:"hidden",pagehide:"hidden"};t=(e=e||document.createEvent("Events")).type in n?n[e.type]:document.hidden?"hidden":"visible",Uc.windowState=t,Vc.trigger("windowStateChanged",{state:t})},Uc.ConnectionFeedback=qo.extend({defaults:{connection_status:kc.e.Status.DISCONNECTED,message:""},initialize(){this.on("change",()=>Vc.trigger("connfeedback",Uc.connfeedback))}});const rl=window.converse||{};Object.assign(rl,{CHAT_STATES:["active","composing","gone","inactive","paused"],keycodes:{TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESCAPE:27,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,FORWARD_SLASH:47,AT:50,META:91,META_RIGHT:93},async initialize(e){if(await tl(),"onpagehide"in window?Uc.unloadevent="pagehide":"onbeforeunload"in window?Uc.unloadevent="beforeunload":"onunload"in window&&(Uc.unloadevent="unload"),function(e){Uc.settings={},Wc=e;const t=Bo(e,Object.keys(Bc));Or(Uc.settings,Bc,t),Or(Uc,Bc,t)}(e),Uc.strict_plugin_dependencies=e.strict_plugin_dependencies,zn.setLogLevel(Vc.settings.get("loglevel")),Vc.settings.get("authentication")===Uc.ANONYMOUS&&Vc.settings.get("auto_login")&&!Vc.settings.get("jid"))throw new Error("Config Error: you need to provide the server's domain via the 'jid' option when using anonymous authentication with auto_login.");Uc.router.route(/^converse\?loglevel=(debug|info|warn|error|fatal)$/,"loglevel",e=>zn.setLogLevel(e)),Uc.connfeedback=new Uc.ConnectionFeedback,Uc.send_initial_presence=!0,await async function(){await yn.sessionStorageInitialized,Uc.storage={session:yn.localForage.createInstance({name:Uc.isTestEnv()?"converse-test-session":"converse-session",description:"sessionStorage instance",driver:["sessionStorageWrapper"]})}}(),await async function(){const e="converse.client-config";Uc.config=new qo({id:e,trusted:!0}),Uc.config.browserStorage=Xc(e,"session"),await new Promise(e=>Uc.config.fetch({success:e,error:e})),Uc.api.trigger("clientConfigInitialized")}(),await Hc.initialize(),function(){Uc.pluggable.initialized_plugins=[];const e=Fc.concat(Uc.api.settings.get("whitelisted_plugins"));Uc.api.settings.get("singleton")&&["converse-bookmarks","converse-controlbox","converse-headline","converse-register"].forEach(e=>Uc.api.settings.get("blacklisted_plugins").push(e)),Uc.pluggable.initializePlugins({_converse:Uc},e,Uc.api.settings.get("blacklisted_plugins")),Uc.api.trigger("pluginsInitialized")}(),document.addEventListener("visibilitychange",Uc.saveWindowState),Uc.saveWindowState({type:document.hidden?"blur":"focus"}),Vc.trigger("registeredGlobalEventHandlers"),!History.started&&Uc.router.history.start(),Vc.settings.get("idle_presence_timeout")>0&&Vc.listen.on("addClientFeatures",()=>Vc.disco.own.features.add(kc.e.NS.IDLE));const t=Uc.pluggable.plugins;if((Vc.settings.get("auto_login")||Vc.settings.get("keepalive")&&Pc(t["converse-bosh"],"enabled"))&&await Vc.user.login(null,null,!0),Vc.trigger("initialized"),Uc.isTestEnv())return Uc},plugins:{add(e,t){if(t.__name__=e,void 0!==Uc.pluggable.plugins[e])throw new TypeError('Error: plugin with name "'.concat(e,'" has already been ')+"registered!");Uc.pluggable.plugins[e]=t}},env:{$build:kc.a,$iq:kc.b,$msg:kc.c,$pres:kc.d,utils:Jo,Collection:ra,CustomElement:mc,Model:qo,Promise:Promise,Strophe:kc.e,dayjs:En.a,html:Za,log:zn,sizzle:mr.a,sprintf:Lc.sprintf,stanza_utils:ps,u:Jo}});const il=new CustomEvent("converse-loaded",{detail:{converse:rl}});window.dispatchEvent(il);const{Strophe:ol}=rl.env;let sl,al;ol.addNamespace("ADHOC","http://jabber.org/protocol/commands");const cl={adhoc:{async getCommands(e){let t=[];try{n=await al.disco.items(e,ol.NS.ADHOC),t=mr()('query[xmlns="'.concat(ol.NS.DISCO_ITEMS,'"][node="').concat(ol.NS.ADHOC,'"] item'),n).map(ps.getAttributes)}catch(t){null===t?zn.error("Error: timeout while fetching ad-hoc commands for ".concat(e)):(zn.error("Error while fetching ad-hoc commands for ".concat(e)),zn.error(t))}var n;return t}}};rl.plugins.add("converse-adhoc",{dependencies:["converse-disco"],initialize(){sl=this._converse,al=sl.api,Object.assign(al,cl)}});const ll=rl.env.utils;var ul=qo.extend({initialize(){this.rosterContactAdded=ll.getResolveablePromise()},async setRosterContact(e){const t=await Vc.contacts.get(e);t&&(this.contact=t,this.set("nickname",t.get("nickname")),this.rosterContactAdded.resolve())}}),dl=n(169),hl=n.n(dl);var fl=function(e){return function(t,n,r){var i=Object(t);if(!Xe(t)){var o=Eo(n,3);t=Qe(t),n=function(e){return o(i[e],e,i)}}var s=e(t,n,r);return s>-1?i[o?t[s]:s]:void 0}}(Ds);var pl=function(e,t){return e===t||uo(e,t,fo(t))};const{Strophe:gl,$msg:ml}=rl.env,vl=rl.env.utils;var _l=ul.extend({defaults(){return{bookmarked:!1,chat_state:void 0,hidden:Uc.isUniView()&&!Vc.settings.get("singleton"),message_type:"chat",nickname:void 0,num_unread:0,time_sent:new Date(0).toISOString(),time_opened:this.get("time_opened")||(new Date).getTime(),type:Uc.PRIVATE_CHAT_TYPE,url:""}},async initialize(){this.initialized=vl.getResolveablePromise(),ul.prototype.initialize.apply(this,arguments);const e=this.get("jid");e&&(this.set({box_id:"box-".concat(e)}),this.initNotifications(),this.initMessages(),this.get("type")===Uc.PRIVATE_CHAT_TYPE&&(this.presence=Uc.presences.findWhere({jid:e})||Uc.presences.create({jid:e}),await this.setRosterContact(e)),this.on("change:chat_state",this.sendChatState,this),await this.fetchMessages(),await Vc.trigger("chatBoxInitialized",this,{Synchronous:!0}),this.initialized.resolve())},getMessagesCollection:()=>new Uc.Messages,getMessagesCacheKey(){return"converse.messages-".concat(this.get("jid"),"-").concat(Uc.bare_jid)},initMessages(){this.messages=this.getMessagesCollection(),this.messages.fetched=vl.getResolveablePromise(),this.messages.fetched.then(()=>{Vc.trigger("afterMessagesFetched",this)}),this.messages.chatbox=this,this.messages.browserStorage=Uc.createStore(this.getMessagesCacheKey()),this.listenTo(this.messages,"change:upload",e=>{e.get("upload")===Uc.SUCCESS&&Vc.send(this.createMessageStanza(e))})},initNotifications(){this.notifications=new qo},afterMessagesFetched(){Vc.trigger("afterMessagesFetched",this)},fetchMessages(){if(this.messages.fetched_flag)return void zn.info("Not re-fetching messages for ".concat(this.get("jid")));this.messages.fetched_flag=!0;const e=this.messages.fetched.resolve;return this.messages.fetch({add:!0,success:()=>{this.afterMessagesFetched(),e()},error:()=>{this.afterMessagesFetched(),e()}}),this.messages.fetched},async handleErrorMessageStanza(e){const{__:t}=Uc,n=await ps.parseMessage(e,Uc);if(!await this.shouldShowErrorMessage(n))return;const r=this.getMessageReferencedByError(n);if(r){const e={error:n.error,error_condition:n.error_condition,error_text:n.error_text,error_type:n.error_type,editable:!1};n.msgid===r.get("retraction_id")?(e.retraction_id=void 0,n.error||("forbidden"===n.error_condition?e.error=t("You're not allowed to retract your message."):e.error=t("Sorry, an error occurred while trying to retract your message."))):n.error||("forbidden"===n.error_condition?e.error=t("You're not allowed to send a message."):e.error=t("Sorry, an error occurred while trying to send your message.")),r.save(e)}else this.createMessage(n)},queueMessage(e){return this.msg_chain=(this.msg_chain||this.messages.fetched).then(()=>this.onMessage(e)).catch(e=>zn.error(e)),this.msg_chain},async onMessage(e){if(e=await e,vl.isErrorObject(e))return e.stanza&&zn.error(e.stanza),zn.error(e.message);const t=this.getDuplicateMessage(e);if(t)this.updateMessage(t,e);else if(!this.handleReceipt(e)&&!this.handleChatMarker(e)&&!await this.handleRetraction(e)&&(this.setEditable(e,e.time),e.chat_state&&"them"===e.sender&&this.notifications.set("chat_state",e.chat_state),vl.shouldCreateMessage(e))){const t=this.handleCorrection(e)||await this.createMessage(e);this.notifications.set({chat_state:null}),this.handleUnreadMessage(t)}},async clearMessages(){try{await this.messages.clearStore()}catch(e){this.messages.trigger("reset"),zn.error(e)}finally{delete this.msg_chain,delete this.messages.fetched_flag,this.messages.fetched=vl.getResolveablePromise()}},async close(){try{await new Promise((e,t)=>this.destroy({success:e,error:(e,n)=>t(n)}))}catch(e){zn.error(e)}finally{Vc.settings.get("clear_messages_on_reconnection")&&await this.clearMessages()}},announceReconnection(){Vc.trigger("chatReconnected",this)},async onReconnection(){Vc.settings.get("clear_messages_on_reconnection")&&await this.clearMessages(),this.announceReconnection()},validate(e){if(!e.jid)return"Ignored ChatBox without JID";const t=Uc.auto_join_rooms.map(e=>N(e)?e.jid:e),n=Vc.settings.get("auto_join_private_chats").concat(t);if(Vc.settings.get("singleton")&&!n.includes(e.jid)&&!Vc.settings.get("auto_join_on_invite")){const t="".concat(e.jid," is not allowed because singleton is true and it's not being auto_joined");return zn.warn(t),t}},getDisplayName(){return this.contact?this.contact.getDisplayName():this.vcard?this.vcard.getDisplayName():this.get("jid")},async createMessageFromError(e){if(e instanceof Uc.TimeoutError){(await this.createMessage({type:"error",message:e.message,retry_event_id:e.retry_event_id})).error=e}},getOldestMessage(){for(let e=0;e<this.messages.length;e++){const t=this.messages.at(e);if(t.get("type")===this.get("message_type"))return t}},getMostRecentMessage(){for(let e=this.messages.length-1;e>=0;e--){const t=this.messages.at(e);if(t.get("type")===this.get("message_type"))return t}},getUpdatedMessageAttributes:(e,t)=>(({is_archived:e})=>({is_archived:e}))(t),updateMessage(e,t){const n=this.getUpdatedMessageAttributes(e,t);n&&e.save(n)},setChatState(e,t){return void 0!==this.chat_state_timeout&&(window.clearTimeout(this.chat_state_timeout),delete this.chat_state_timeout),e===Uc.COMPOSING?this.chat_state_timeout=window.setTimeout(this.setChatState.bind(this),Uc.TIMEOUTS.PAUSED,Uc.PAUSED):e===Uc.PAUSED&&(this.chat_state_timeout=window.setTimeout(this.setChatState.bind(this),Uc.TIMEOUTS.INACTIVE,Uc.INACTIVE)),this.set("chat_state",e,t),this},getMessageReferencedByError(e){const t=e.msgid;return t&&this.messages.models.find(e=>[e.get("msgid"),e.get("retraction_id")].includes(t))},shouldShowErrorMessage(e){if(this.getMessageReferencedByError(e)||e.body)return!0},isSameUser:(e,t)=>vl.isSameBareJID(e,t),findDanglingRetraction(e){if(!e.origin_id||!this.messages.length)return null;if(this.messages.last().get("time")>e.time){const t=Array.from(this.messages.models);return t.reverse(),t.find(({attributes:t})=>t.retracted_id===e.origin_id&&t.from===e.from&&!t.moderated_by)}},async handleRetraction(e){const t=["retracted","retracted_id","editable"];if(e.retracted){if(e.is_tombstone)return!1;const n=this.messages.findWhere({origin_id:e.retracted_id,from:e.from});return n?(n.save(Bo(e,t)),!0):(e.dangling_retraction=!0,await this.createMessage(e),!0)}{const n=this.findDanglingRetraction(e);if(n){const r=Bo(n.attributes,t),i=Object.assign({dangling_retraction:!1},e,r);return delete i.id,n.save(i),!0}}return!1},handleCorrection(e){if(!e.replace_id||!e.from)return;const t=this.messages.findWhere({msgid:e.replace_id,from:e.from});if(!t)return;const n=t.get("older_versions")||{};return e.time<t.get("time")&&t.get("edited")?(n[e.time]=e.message,t.save({older_versions:n})):(Object.keys(n).length?n[t.get("edited")]=t.get("message"):n[t.get("time")]=t.get("message"),delete(e=Object.assign(e,{older_versions:n})).id,e.time=t.get("time"),t.save(e)),t},getDuplicateMessage(e){const t=[...this.getStanzaIdQueryAttrs(e),this.getOriginIdQueryAttrs(e),this.getMessageBodyQueryAttrs(e)].filter(e=>e),n=this.messages.models;return fl(n,e=>t.reduce((t,n)=>t||pl(e.attributes,n),!1))},getOriginIdQueryAttrs:e=>e.origin_id&&{origin_id:e.origin_id,from:e.from},getStanzaIdQueryAttrs:e=>Object.keys(e).filter(e=>e.startsWith("stanza_id ")).map(t=>{const n=t.replace(/^stanza_id /,""),r={};return r["stanza_id ".concat(n)]=e[t],r}),getMessageBodyQueryAttrs(e){if(e.message&&e.msgid){const t={from:e.from,msgid:e.msgid};return e.is_encrypted||(t.message=e.message),t}},retractOwnMessage(e){this.sendRetractionMessage(e),e.save({retracted:(new Date).toISOString(),retracted_id:e.get("origin_id"),retraction_id:e.get("id"),is_ephemeral:!0,editable:!1})},sendRetractionMessage(e){const t=e.get("origin_id");if(!t)throw new Error("Can't retract message without a XEP-0359 Origin ID");const n=ml({id:vl.getUniqueId(),to:this.get("jid"),type:"chat"}).c("store",{xmlns:gl.NS.HINTS}).up().c("apply-to",{id:t,xmlns:gl.NS.FASTEN}).c("retract",{xmlns:gl.NS.RETRACT});return Uc.connection.send(n)},sendMarkerForMessage(e){if(null==e?void 0:e.get("is_markable")){const t=gl.getBareJidFromJid(e.get("from"));this.sendMarker(t,e.get("msgid"),"displayed",e.get("type"))}},sendMarker(e,t,n,r){const i=ml({from:Uc.connection.jid,id:vl.getUniqueId(),to:e,type:r||"chat"}).c(n,{xmlns:gl.NS.MARKERS,id:t});Vc.send(i)},handleChatMarker(e){if(gl.getBareJidFromJid(e.to)!==Uc.bare_jid)return!1;if(e.is_markable)return!this.contact||e.is_archived||e.is_carbon||this.sendMarker(e.from,e.msgid,"received"),!1;if(e.marker_id){const t=this.messages.findWhere({msgid:e.marker_id}),n="marker_".concat(e.marker);return t&&!t.get(n)&&t.save({field_name:(new Date).toISOString()}),!0}},sendReceiptStanza(e,t){const n=ml({from:Uc.connection.jid,id:vl.getUniqueId(),to:e,type:"chat"}).c("received",{xmlns:gl.NS.RECEIPTS,id:t}).up().c("store",{xmlns:gl.NS.HINTS}).up();Vc.send(n)},handleReceipt(e){if("them"===e.sender)if(e.is_valid_receipt_request)this.sendReceiptStanza(e.from,e.msgid);else if(e.receipt_id){const t=this.messages.findWhere({msgid:e.receipt_id});return t&&!t.get("received")&&t.save({received:(new Date).toISOString()}),!0}return!1},createMessageStanza(e){const t=ml({from:Uc.connection.jid,to:this.get("jid"),type:this.get("message_type"),id:e.get("edited")&&vl.getUniqueId()||e.get("msgid")}).c("body").t(e.get("message")).up().c(Uc.ACTIVE,{xmlns:gl.NS.CHATSTATES}).root();return"chat"===e.get("type")&&t.c("request",{xmlns:gl.NS.RECEIPTS}).root(),e.get("is_spoiler")&&(e.get("spoiler_hint")?t.c("spoiler",{xmlns:gl.NS.SPOILER},e.get("spoiler_hint")).root():t.c("spoiler",{xmlns:gl.NS.SPOILER}).root()),(e.get("references")||[]).forEach(e=>{const n={xmlns:gl.NS.REFERENCE,begin:e.begin,end:e.end,type:e.type};e.uri&&(n.uri=e.uri),t.c("reference",n).root()}),e.get("oob_url")&&t.c("x",{xmlns:gl.NS.OUTOFBAND}).c("url").t(e.get("oob_url")).root(),e.get("edited")&&t.c("replace",{xmlns:gl.NS.MESSAGE_CORRECT,id:e.get("msgid")}).root(),e.get("origin_id")&&t.c("origin-id",{xmlns:gl.NS.SID,id:e.get("origin_id")}).root(),t},getOutgoingMessageAttributes(e,t){const n=this.get("composing_spoiler"),r=vl.getUniqueId(),i=e?vl.httpToGeoUri(vl.shortnamesToUnicode(e),Uc):void 0;return{from:Uc.bare_jid,fullname:Uc.xmppstatus.get("fullname"),id:r,is_only_emojis:!!e&&vl.isOnlyEmojis(e),jid:this.get("jid"),message:i,msgid:r,nickname:this.get("nickname"),sender:"me",spoiler_hint:n?t:void 0,time:(new Date).toISOString(),type:this.get("message_type"),body:i,is_spoiler:n,origin_id:r}},setEditable(e,t){if(!e.is_headline&&!vl.isEmptyMessage(e)&&"me"===e.sender)if("all"===Vc.settings.get("allow_message_corrections"))e.editable=!(e.file||e.retracted||"oob_url"in e);else if("last"===Vc.settings.get("allow_message_corrections")&&t>this.get("time_sent")){this.set({time_sent:t});const n=this.messages.findWhere({editable:!0});n&&n.save({editable:!1}),e.editable=!(e.file||e.retracted||"oob_url"in e)}},async createMessage(e,t){return e.time=e.time||(new Date).toISOString(),await this.messages.fetched,this.messages.create(e,Object.assign({wait:!0,promise:!0},t))},async sendMessage(e,t){const n=this.getOutgoingMessageAttributes(e,t);let r=this.messages.findWhere("correcting");if(r){const e=r.get("older_versions")||{};e[r.get("time")]=r.get("message"),r.save({correcting:!1,edited:(new Date).toISOString(),message:n.message,older_versions:e,references:n.references,is_only_emojis:n.is_only_emojis,origin_id:vl.getUniqueId(),received:void 0})}else this.setEditable(n,(new Date).toISOString()),r=await this.createMessage(n);return Vc.send(this.createMessageStanza(r)),Vc.trigger("sendMessage",{chatbox:this,message:r}),r},sendChatState(){if(Vc.settings.get("send_chat_state_notifications")&&this.get("chat_state")){const e=Vc.settings.get("send_chat_state_notifications");if(Array.isArray(e)&&!e.includes(this.get("chat_state")))return;Vc.send(ml({id:vl.getUniqueId(),to:this.get("jid"),type:"chat"}).c(this.get("chat_state"),{xmlns:gl.NS.CHATSTATES}).up().c("no-store",{xmlns:gl.NS.HINTS}).up().c("no-permanent-store",{xmlns:gl.NS.HINTS}))}},async sendFiles(e){var t;const{__:n}=Uc,r=(await Vc.disco.features.get(gl.NS.HTTPUPLOAD,Uc.domain)).pop();if(!r)return void this.createMessage({message:n("Sorry, looks like file upload is not supported by your server."),type:"error",is_ephemeral:!0});const i=r.dataforms.where({FORM_TYPE:{value:gl.NS.HTTPUPLOAD,type:"hidden"}}).pop(),o=window.parseInt(null===(t=((null==i?void 0:i.attributes)||{})["max-file-size"])||void 0===t?void 0:t.value),s=null==r?void 0:r.id;s?Array.from(e).forEach(async e=>{if(!window.isNaN(o)&&window.parseInt(e.size)>o)return this.createMessage({message:n("The size of your file, %1$s, exceeds the maximum allowed by your server, which is %2$s.",e.name,hl()(o)),type:"error",is_ephemeral:!0});{const t=Object.assign(this.getOutgoingMessageAttributes(),{file:!0,progress:0,slot_request_url:s});this.setEditable(t,(new Date).toISOString());const n=await this.createMessage(t,{silent:!0});n.file=e,this.messages.trigger("add",n),n.getRequestSlotURL()}}):this.createMessage({message:n("Sorry, looks like file upload is not supported by your server."),type:"error",is_ephemeral:!0})},maybeShow(e){if(e){if(Uc.isUniView()){const e=e=>!e.get("hidden")&&e.get("jid")!==this.get("jid")&&"controlbox"!==e.get("id");Uc.chatboxes.filter(e).forEach(e=>vl.safeSave(e,{hidden:!0}))}vl.safeSave(this,{hidden:!1})}return Uc.isUniView()&&this.get("hidden")?void 0:this.trigger("show")},isHidden(){return Uc.isUniView()&&this.get("hidden")||this.isScrolledUp()||"hidden"===Uc.windowState},handleUnreadMessage(e){if((null==e?void 0:e.get("body"))&&vl.isNewMessage(e))if(this.isHidden()){const t={num_unread:this.get("num_unread")+1};0===this.get("num_unread")&&(t.first_unread_id=e.get("id")),this.save(t)}else this.sendMarkerForMessage(e)},clearUnreadMsgCounter(){this.get("num_unread")>0&&this.sendMarkerForMessage(this.messages.last()),vl.safeSave(this,{num_unread:0})},isScrolledUp(){return this.get("scrolled",!0)}});const bl=rl.env.utils,{Strophe:yl}=rl.env;var wl={defaults:()=>({msgid:bl.getUniqueId(),time:(new Date).toISOString(),is_ephemeral:!1}),async initialize(){this.checkValidity()&&(this.initialized=bl.getResolveablePromise(),"chat"===this.get("type")&&(ul.prototype.initialize.apply(this,arguments),this.setRosterContact(yl.getBareJidFromJid(this.get("from")))),this.get("file")&&this.on("change:put",this.uploadFile,this),this.setTimerForEphemeralMessage(),await Vc.trigger("messageInitialized",this,{Synchronous:!0}),this.initialized.resolve())},setTimerForEphemeralMessage(){const e=()=>{this.ephemeral_timer=window.setTimeout(this.safeDestroy.bind(this),1e4)};return this.isEphemeral()?(e(),!0):(this.on("change:is_ephemeral",()=>this.isEphemeral()?e():clearTimeout(this.ephemeral_timer)),!1)},checkValidity(){return 3!==Object.keys(this.attributes).length||(this.validationError="Empty message",this.safeDestroy(),!1)},mayBeRetracted(){return"me"===this.get("sender")&&["all","own"].includes(Vc.settings.get("allow_message_retraction"))},safeDestroy(){try{this.destroy()}catch(e){zn.error(e)}},isEphemeral(){return this.get("is_ephemeral")},getDisplayName(){return"groupchat"===this.get("type")?this.get("nick"):this.contact?this.contact.getDisplayName():this.vcard?this.vcard.getDisplayName():this.get("from")},getMessageText(){const{__:e}=Uc;return this.get("is_encrypted")?this.get("plaintext")||this.get("body")||e("Undecryptable OMEMO message"):this.get("message")},isMeCommand(){const e=this.getMessageText();return!!e&&e.startsWith("/me ")},sendSlotRequestStanza(){if(!this.file)return Promise.reject(new Error("file is undefined"));const e=rl.env.$iq({from:Uc.jid,to:this.get("slot_request_url"),type:"get"}).c("request",{xmlns:yl.NS.HTTPUPLOAD,filename:this.file.name,size:this.file.size,"content-type":this.file.type});return Vc.sendIQ(e)},async getRequestSlotURL(){const{__:e}=Uc;let t;try{t=await this.sendSlotRequestStanza()}catch(t){return zn.error(t),this.save({type:"error",message:e("Sorry, could not determine upload URL."),is_ephemeral:!0})}const n=t.querySelector("slot");if(!n)return this.save({type:"error",message:e("Sorry, could not determine file upload URL."),is_ephemeral:!0});this.save({get:n.querySelector("get").getAttribute("url"),put:n.querySelector("put").getAttribute("url")})},uploadFile(){const e=new XMLHttpRequest;e.onreadystatechange=()=>{e.readyState===XMLHttpRequest.DONE&&(zn.info("Status: "+e.status),200===e.status||201===e.status?this.save({upload:Uc.SUCCESS,oob_url:this.get("get"),message:this.get("get")}):e.onerror())},e.upload.addEventListener("progress",e=>{e.lengthComputable&&this.set("progress",e.loaded/e.total)},!1),e.onerror=()=>{const{__:t}=Uc;let n;n=e.responseText?t('Sorry, could not succesfully upload your file. Your server’s response: "%1$s"',e.responseText):t("Sorry, could not succesfully upload your file."),this.save({type:"error",upload:Uc.FAILURE,message:n,is_ephemeral:!0})},e.open("PUT",this.get("put"),!0),e.setRequestHeader("Content-type",this.file.type),e.send(this.file)}},Sl={chats:{async create(e,t){if("string"==typeof e){if(t&&!(null==t?void 0:t.fullname)){var n;const r=await Vc.contacts.get(e);t.fullname=null==r||null===(n=r.attributes)||void 0===n?void 0:n.fullname}const r=Vc.chats.get(e,t,!0);return r||void zn.error("Could not open chatbox for JID: "+e)}return Array.isArray(e)?Promise.all(e.forEach(async n=>{var r;const i=await Vc.contacts.get(e);return t.fullname=null==i||null===(r=i.attributes)||void 0===r?void 0:r.fullname,Vc.chats.get(n,t,!0).maybeShow()})):(zn.error("chats.create: You need to provide at least one JID"),null)},async open(e,t,n){if("string"==typeof e){const r=await Vc.chats.get(e,t,!0);return r?r.maybeShow(n):r}if(Array.isArray(e))return Promise.all(e.map(e=>Vc.chats.get(e,t,!0).then(e=>e&&e.maybeShow(n))).filter(e=>e));const r="chats.open: You need to provide at least one JID";throw zn.error(r),new Error(r)},async get(e,t={},n=!1){async function r(e){let r=await Vc.chatboxes.get(e);return!r&&n?r=await Vc.chatboxes.create(e,t,Uc.ChatBox):(r=r&&r.get("type")===Uc.PRIVATE_CHAT_TYPE?r:null,r&&Object.keys(t).length&&r.save(t)),r}if(void 0===e){return(await Vc.chatboxes.get()).filter(e=>e.get("type")===Uc.PRIVATE_CHAT_TYPE)}return"string"==typeof e?r(e):Promise.all(e.map(e=>r(e)))}}};
-/**
- * @module converse-chat
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:xl,sizzle:El,utils:Al}=rl.env,Cl=rl.env.utils;rl.plugins.add("converse-chat",{dependencies:["converse-chatboxes","converse-disco"],initialize(){Object.assign(Vc,Sl),Vc.settings.extend({allow_message_corrections:"all",allow_message_retraction:"all",allow_message_styling:!0,auto_join_private_chats:[],clear_messages_on_reconnection:!1,filter_by_resource:!1,send_chat_state_notifications:!0}),Uc.Message=ul.extend(wl),Uc.Messages=ra.extend({model:Uc.Message,comparator:"time"}),Uc.ChatBox=_l,Uc.handleMessageStanza=async function(e){if(ps.isServerMessage(e)){const t=e.getAttribute("from");return zn.info("handleMessageStanza: Ignoring incoming server message from JID: ".concat(t))}const t=await ps.parseMessage(e,Uc);if(Cl.isErrorObject(t))return t.stanza&&zn.error(t.stanza),zn.error(t.message);const n=!!El('body, encrypted[xmlns="'.concat(xl.NS.OMEMO,'"]'),e).length,r=await Vc.chats.get(t.contact_jid,{nickname:t.nick},n);await(null==r?void 0:r.queueMessage(t));const i={stanza:e,attrs:t,chatbox:r};Vc.trigger("message",i)},Uc.router.route("converse/chat?jid=:jid",(function(e){if(!Al.isValidJID(e))return zn.warn('Invalid JID "'.concat(e,'" provided in URL fragment'));Vc.chats.open(e)})),Vc.listen.on("chatBoxesFetched",(function(){Vc.settings.get("auto_join_private_chats").forEach(e=>{Uc.chatboxes.where({jid:e}).length||("string"==typeof e?Vc.chats.open(e):zn.error('Invalid jid criteria specified for "auto_join_private_chats"'))}),Vc.trigger("privateChatsAutoJoined")})),Vc.listen.on("presencesInitialized",(function(){Uc.connection.addHandler(e=>El('message > result[xmlns="'.concat(xl.NS.MAM,'"]'),e).pop()?(zn.warn('Received a MAM message with type "chat".'),!0):(Uc.handleMessageStanza(e),!0),null,"message","chat"),Uc.connection.addHandler(e=>(null!==e.getAttribute("type")||Uc.handleMessageStanza(e),!0),xl.NS.RECEIPTS,"message"),Uc.connection.addHandler(e=>(async function(e){const t=xl.getBareJidFromJid(e.getAttribute("from"));if(Al.isSameBareJID(t,Uc.bare_jid))return;const n=await Vc.chatboxes.get(t);null==n||n.handleErrorMessageStanza(e)}(e),!0),null,"message","error")})),Vc.listen.on("clearSession",async()=>{if(Uc.shouldClearCache()){await Promise.all(Uc.chatboxes.map(e=>e.messages&&e.messages.clearStore({silent:!0})));const e=e=>e.get("type")!==Uc.CONTROLBOX_TYPE;Uc.chatboxes.clearStore({silent:!0},e)}})}});
-/**
- * @module converse-disco
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description Converse plugin which add support for XEP-0030: Service Discovery
- */
-const{Strophe:jl,$iq:Tl,utils:Ol}=rl.env;rl.plugins.add("converse-disco",{initialize(){function e(){if(!Uc.stream_features){const e=jl.getBareJidFromJid(Uc.jid),t="converse.stream-features-".concat(e);Vc.promises.add("streamFeaturesAdded"),Uc.stream_features=new ra,Uc.stream_features.browserStorage=Uc.createStore(t,"session")}}function t(){Vc.trigger("streamFeaturesAdded")}Vc.promises.add("discoInitialized"),Vc.promises.add("streamFeaturesAdded"),Uc.DiscoEntity=qo.extend({idAttribute:"jid",initialize(e,t){this.waitUntilFeaturesDiscovered=Ol.getResolveablePromise(),this.dataforms=new ra;let n="converse.dataforms-".concat(this.get("jid"));this.dataforms.browserStorage=Uc.createStore(n,"session"),this.features=new ra,n="converse.features-".concat(this.get("jid")),this.features.browserStorage=Uc.createStore(n,"session"),this.listenTo(this.features,"add",this.onFeatureAdded),this.fields=new ra,n="converse.fields-".concat(this.get("jid")),this.fields.browserStorage=Uc.createStore(n,"session"),this.listenTo(this.fields,"add",this.onFieldAdded),this.identities=new ra,n="converse.identities-".concat(this.get("jid")),this.identities.browserStorage=Uc.createStore(n,"session"),this.fetchFeatures(t),this.items=new Uc.DiscoEntities,n="converse.disco-items-".concat(this.get("jid")),this.items.browserStorage=Uc.createStore(n,"session"),this.items.fetch()},async getIdentity(e,t){return await this.waitUntilFeaturesDiscovered,this.identities.findWhere({category:e,type:t})},async hasFeature(e){if(await this.waitUntilFeaturesDiscovered,this.features.findWhere({var:e}))return this},onFeatureAdded(e){e.entity=this,Vc.trigger("serviceDiscovered",e)},onFieldAdded(e){e.entity=this,Vc.trigger("discoExtensionFieldDiscovered",e)},async fetchFeatures(e){if(e.ignore_cache)this.queryInfo();else{const e=this.features.browserStorage.name,t=await this.features.browserStorage.store.getItem(e);t&&0===t.length||null===t?this.queryInfo():(this.features.fetch({add:!0,success:()=>{this.waitUntilFeaturesDiscovered.resolve(this),this.trigger("featuresDiscovered")}}),this.identities.fetch({add:!0}))}},async queryInfo(){let e;try{e=await Vc.disco.info(this.get("jid"),null)}catch(e){return null===e?zn.error("Timeout for disco#info query for ".concat(this.get("jid"))):zn.error(e),void this.waitUntilFeaturesDiscovered.resolve(this)}this.onInfo(e)},onDiscoItems(e){mr()('query[xmlns="'.concat(jl.NS.DISCO_ITEMS,'"] item'),e).forEach(e=>{if(e.getAttribute("node"))return;const t=e.getAttribute("jid");if(void 0===this.items.get(t)){const e=Uc.disco_entities.get(t);e?this.items.add(e):this.items.create({jid:t})}})},async queryForItems(){if(0===this.identities.where({category:"server"}).length)return;const e=await Vc.disco.items(this.get("jid"));this.onDiscoItems(e)},onInfo(e){Array.from(e.querySelectorAll("identity")).forEach(e=>{this.identities.create({category:e.getAttribute("category"),type:e.getAttribute("type"),name:e.getAttribute("name")})}),mr()('x[type="result"][xmlns="'.concat(jl.NS.XFORM,'"]'),e).forEach(e=>{const t={};mr()("field",e).forEach(e=>{var n;t[e.getAttribute("var")]={value:null===(n=e.querySelector("value"))||void 0===n?void 0:n.textContent,type:e.getAttribute("type")}}),this.dataforms.create(t)}),e.querySelector('feature[var="'.concat(jl.NS.DISCO_ITEMS,'"]'))&&this.queryForItems(),Array.from(e.querySelectorAll("feature")).forEach(t=>{this.features.create({var:t.getAttribute("var"),from:e.getAttribute("from")})}),mr()('x[type="result"][xmlns="jabber:x:data"] field',e).forEach(t=>{var n;this.fields.create({var:t.getAttribute("var"),value:null===(n=t.querySelector("value"))||void 0===n?void 0:n.textContent,from:e.getAttribute("from")})}),this.waitUntilFeaturesDiscovered.resolve(this),this.trigger("featuresDiscovered")}}),Uc.DiscoEntities=ra.extend({model:Uc.DiscoEntity,fetchEntities(){return new Promise((e,t)=>{this.fetch({add:!0,success:e,error(e,n){zn.error(n),t(new Error("Could not fetch disco entities"))}})})}});const n=this;function r(e){const t=e.getElementsByTagName("query")[0].getAttribute("node"),r={xmlns:jl.NS.DISCO_INFO};t&&(r.node=t);const i=Tl({type:"result",id:e.getAttribute("id")}),o=e.getAttribute("from");return null!==o&&i.attrs({to:o}),i.c("query",r),n._identities.forEach(e=>{const t={category:e.category,type:e.type};e.name&&(t.name=e.name),e.lang&&(t["xml:lang"]=e.lang),i.c("identity",t).up()}),n._features.forEach(e=>i.c("feature",{var:e}).up()),Vc.send(i.tree()),!0}async function i(){Vc.disco.own.identities.add("client","web","Converse"),Vc.disco.own.features.add(jl.NS.CHATSTATES),Vc.disco.own.features.add(jl.NS.DISCO_INFO),Vc.disco.own.features.add(jl.NS.ROSTERX),Vc.settings.get("message_carbons")&&Vc.disco.own.features.add(jl.NS.CARBONS),Vc.trigger("addClientFeatures"),Uc.connection.addHandler(r,jl.NS.DISCO_INFO,"iq","get",null,null),Uc.disco_entities=new Uc.DiscoEntities;const e="converse.disco-entities-".concat(Uc.bare_jid);Uc.disco_entities.browserStorage=Uc.createStore(e,"session");const t=await Uc.disco_entities.fetchEntities();0!==t.length&&t.get(Uc.domain)||Uc.disco_entities.create({jid:Uc.domain}),Vc.trigger("discoInitialized")}n._identities=[],n._features=[],Vc.listen.on("userSessionInitialized",async()=>{e(),Uc.connfeedback.get("connection_status")===jl.Status.ATTACHED&&(await new Promise((e,t)=>Uc.stream_features.fetch({success:e,error:t})),t())}),Vc.listen.on("beforeResourceBinding",(function(){e(),Array.from(Uc.connection.features.childNodes).forEach(e=>{Uc.stream_features.create({name:e.nodeName,xmlns:e.getAttribute("xmlns")})}),t()})),Vc.listen.on("reconnected",i),Vc.listen.on("connected",i),Vc.listen.on("beforeTearDown",async()=>{Vc.promises.add("streamFeaturesAdded"),Uc.stream_features&&(await Uc.stream_features.clearStore(),delete Uc.stream_features)}),Vc.listen.on("clearSession",()=>{Uc.shouldClearCache()&&Uc.disco_entities&&(Array.from(Uc.disco_entities.models).forEach(e=>e.features.clearStore()),Array.from(Uc.disco_entities.models).forEach(e=>e.identities.clearStore()),Array.from(Uc.disco_entities.models).forEach(e=>e.dataforms.clearStore()),Array.from(Uc.disco_entities.models).forEach(e=>e.fields.clearStore()),Uc.disco_entities.clearStore(),delete Uc.disco_entities)}),Object.assign(Vc,{disco:{stream:{async getFeature(e,t){if(await Vc.waitUntil("streamFeaturesAdded"),!e||!t)throw new Error("name and xmlns need to be provided when calling disco.stream.getFeature");if(void 0!==Uc.stream_features||Vc.connection.connected())return Uc.stream_features.findWhere({name:e,xmlns:t});{const n="Tried to get feature ".concat(e," ").concat(t," but _converse.stream_features has been torn down");zn.warn(n)}}},own:{identities:{add(e,t,r,i){for(var o=0;o<n._identities.length;o++)if(n._identities[o].category==e&&n._identities[o].type==t&&n._identities[o].name==r&&n._identities[o].lang==i)return!1;n._identities.push({category:e,type:t,name:r,lang:i})},clear(){n._identities=[]},get:()=>n._identities},features:{add(e){for(var t=0;t<n._features.length;t++)if(n._features[t]==e)return!1;n._features.push(e)},clear(){n._features=[]},get:()=>n._features}},info(e,t){const n={xmlns:jl.NS.DISCO_INFO};t&&(n.node=t);const r=Tl({from:Uc.connection.jid,to:e,type:"get"}).c("query",n);return Vc.sendIQ(r)},items(e,t){const n={xmlns:jl.NS.DISCO_ITEMS};return t&&(n.node=t),Vc.sendIQ(Tl({from:Uc.connection.jid,to:e,type:"get"}).c("query",n))},entities:{async get(e,t=!1){if(await Vc.waitUntil("discoInitialized"),!e)return Uc.disco_entities;if(void 0===Uc.disco_entities&&!Vc.connection.connected()){const t="Tried to look up entity ".concat(e," but _converse.disco_entities has been torn down");return void zn.warn(t)}const n=Uc.disco_entities.get(e);return n||!t?n:Vc.disco.entities.create(e)},create:(e,t)=>Uc.disco_entities.create({jid:e},t)},features:{async get(e,t){if(!t)throw new TypeError("You need to provide an entity JID");await Vc.waitUntil("discoInitialized");let n=await Vc.disco.entities.get(t,!0);if(void 0===Uc.disco_entities&&!Vc.connection.connected()){const n="Tried to get feature ".concat(e," for ").concat(t," but _converse.disco_entities has been torn down");return void zn.warn(n)}n=await n.waitUntilFeaturesDiscovered;const r=[...n.items.map(t=>t.hasFeature(e)),n.hasFeature(e)];return(await Promise.all(r)).filter(N)}},supports:async(e,t)=>(await Vc.disco.features.get(e,t)).length>0,async refresh(e){if(!e)throw new TypeError("api.disco.refresh: You need to provide an entity JID");await Vc.waitUntil("discoInitialized");let t=await Vc.disco.entities.get(e);return t?(t.features.reset(),t.fields.reset(),t.identities.reset(),t.waitUntilFeaturesDiscovered.isPending||(t.waitUntilFeaturesDiscovered=Ol.getResolveablePromise()),t.queryInfo()):t=await Vc.disco.entities.create(e,{ignore_cache:!0}),t.waitUntilFeaturesDiscovered},refreshFeatures:e=>Vc.refresh(e),async getFeatures(e){if(!e)throw new TypeError("api.disco.getFeatures: You need to provide an entity JID");await Vc.waitUntil("discoInitialized");let t=await Vc.disco.entities.get(e,!0);return t=await t.waitUntilFeaturesDiscovered,t.features},async getFields(e){if(!e)throw new TypeError("api.disco.getFields: You need to provide an entity JID");await Vc.waitUntil("discoInitialized");let t=await Vc.disco.entities.get(e,!0);return t=await t.waitUntilFeaturesDiscovered,t.fields},async getIdentity(e,t,n){const r=await Vc.disco.entities.get(n,!0);if(void 0!==r||Vc.connection.connected())return r.getIdentity(e,t);{const t="Tried to look up category ".concat(e," for ").concat(n," but _converse.disco_entities has been torn down");zn.warn(t)}}}})}});const kl=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|((\\s|^)(\\*\\\\0\\/\\*|\\*\\\\O\\/\\*|\\-___\\-|\\:'\\-\\)|'\\:\\-\\)|'\\:\\-D|\\>\\:\\-\\)|>\\:\\-\\)|'\\:\\-\\(|\\>\\:\\-\\(|>\\:\\-\\(|\\:'\\-\\(|O\\:\\-\\)|0\\:\\-3|0\\:\\-\\)|0;\\^\\)|O;\\-\\)|0;\\-\\)|O\\:\\-3|\\-__\\-|\\:\\-Þ|\\:\\-Þ|\\<\\/3|<\\/3|\\:'\\)|\\:\\-D|'\\:\\)|'\\=\\)|'\\:D|'\\=D|\\>\\:\\)|>\\:\\)|\\>;\\)|>;\\)|\\>\\=\\)|>\\=\\)|;\\-\\)|\\*\\-\\)|;\\-\\]|;\\^\\)|'\\:\\(|'\\=\\(|\\:\\-\\*|\\:\\^\\*|\\>\\:P|>\\:P|X\\-P|\\>\\:\\[|>\\:\\[|\\:\\-\\(|\\:\\-\\[|\\>\\:\\(|>\\:\\(|\\:'\\(|;\\-\\(|\\>\\.\\<|>\\.<|#\\-\\)|%\\-\\)|X\\-\\)|\\\\0\\/|\\\\O\\/|0\\:3|0\\:\\)|O\\:\\)|O\\=\\)|O\\:3|B\\-\\)|8\\-\\)|B\\-D|8\\-D|\\-_\\-|\\>\\:\\\\|>\\:\\\\|\\>\\:\\/|>\\:\\/|\\:\\-\\/|\\:\\-\\.|\\:\\-P|\\:Þ|\\:Þ|\\:\\-b|\\:\\-O|O_O|\\>\\:O|>\\:O|\\:\\-X|\\:\\-#|\\:\\-\\)|\\(y\\)|\\<3|<3|\\:D|\\=D|;\\)|\\*\\)|;\\]|;D|\\:\\*|\\=\\*|\\:\\(|\\:\\[|\\=\\(|\\:@|;\\(|D\\:|\\:\\$|\\=\\$|#\\)|%\\)|X\\)|B\\)|8\\)|\\:\\/|\\:\\\\|\\=\\/|\\=\\\\|\\:L|\\=L|\\:P|\\=P|\\:b|\\:O|\\:X|\\:#|\\=X|\\=#|\\:\\)|\\=\\]|\\=\\)|\\:\\])(?=\\s|$|[!,.?]))","gi"),Nl=/(?:\ud83d\udc68\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc68\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc68\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc68\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc68\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffc-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffd-\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb\udffc\udffe\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffd\udfff]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc68\ud83c[\udffb-\udffe]|\ud83d\udc69\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83d\udc69\ud83c[\udffb-\udffe]|\ud83e\uddd1\ud83c\udffb\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffc\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffd\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udffe\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\ud83c\udfff\u200d\ud83e\udd1d\u200d\ud83e\uddd1\ud83c[\udffb-\udfff]|\ud83e\uddd1\u200d\ud83e\udd1d\u200d\ud83e\uddd1|\ud83d\udc6b\ud83c[\udffb-\udfff]|\ud83d\udc6c\ud83c[\udffb-\udfff]|\ud83d\udc6d\ud83c[\udffb-\udfff]|\ud83d[\udc6b-\udc6d])|(?:\ud83d[\udc68\udc69]|\ud83e\uddd1)(?:\ud83c[\udffb-\udfff])?\u200d(?:\u2695\ufe0f|\u2696\ufe0f|\u2708\ufe0f|\ud83c[\udf3e\udf73\udf93\udfa4\udfa8\udfeb\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92]|\ud83e[\uddaf-\uddb3\uddbc\uddbd])|(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75]|\u26f9)((?:\ud83c[\udffb-\udfff]|\ufe0f)\u200d[\u2640\u2642]\ufe0f)|(?:\ud83c[\udfc3\udfc4\udfca]|\ud83d[\udc6e\udc71\udc73\udc77\udc81\udc82\udc86\udc87\ude45-\ude47\ude4b\ude4d\ude4e\udea3\udeb4-\udeb6]|\ud83e[\udd26\udd35\udd37-\udd39\udd3d\udd3e\uddb8\uddb9\uddcd-\uddcf\uddd6-\udddd])(?:\ud83c[\udffb-\udfff])?\u200d[\u2640\u2642]\ufe0f|(?:\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d\udc8b\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\u2764\ufe0f\u200d\ud83d\udc68|\ud83d\udc68\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc68\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc68\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\u2764\ufe0f\u200d\ud83d[\udc68\udc69]|\ud83d\udc69\u200d\ud83d\udc66\u200d\ud83d\udc66|\ud83d\udc69\u200d\ud83d\udc67\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83c\udff3\ufe0f\u200d\u26a7\ufe0f|\ud83c\udff3\ufe0f\u200d\ud83c\udf08|\ud83c\udff4\u200d\u2620\ufe0f|\ud83d\udc15\u200d\ud83e\uddba|\ud83d\udc41\u200d\ud83d\udde8|\ud83d\udc68\u200d\ud83d[\udc66\udc67]|\ud83d\udc69\u200d\ud83d[\udc66\udc67]|\ud83d\udc6f\u200d\u2640\ufe0f|\ud83d\udc6f\u200d\u2642\ufe0f|\ud83e\udd3c\u200d\u2640\ufe0f|\ud83e\udd3c\u200d\u2642\ufe0f|\ud83e\uddde\u200d\u2640\ufe0f|\ud83e\uddde\u200d\u2642\ufe0f|\ud83e\udddf\u200d\u2640\ufe0f|\ud83e\udddf\u200d\u2642\ufe0f)|[#*0-9]\ufe0f?\u20e3|(?:[©®\u2122\u265f]\ufe0f)|(?:\ud83c[\udc04\udd70\udd71\udd7e\udd7f\ude02\ude1a\ude2f\ude37\udf21\udf24-\udf2c\udf36\udf7d\udf96\udf97\udf99-\udf9b\udf9e\udf9f\udfcd\udfce\udfd4-\udfdf\udff3\udff5\udff7]|\ud83d[\udc3f\udc41\udcfd\udd49\udd4a\udd6f\udd70\udd73\udd76-\udd79\udd87\udd8a-\udd8d\udda5\udda8\uddb1\uddb2\uddbc\uddc2-\uddc4\uddd1-\uddd3\udddc-\uddde\udde1\udde3\udde8\uddef\uddf3\uddfa\udecb\udecd-\udecf\udee0-\udee5\udee9\udef0\udef3]|[\u203c\u2049\u2139\u2194-\u2199\u21a9\u21aa\u231a\u231b\u2328\u23cf\u23ed-\u23ef\u23f1\u23f2\u23f8-\u23fa\u24c2\u25aa\u25ab\u25b6\u25c0\u25fb-\u25fe\u2600-\u2604\u260e\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262a\u262e\u262f\u2638-\u263a\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267b\u267f\u2692-\u2697\u2699\u269b\u269c\u26a0\u26a1\u26a7\u26aa\u26ab\u26b0\u26b1\u26bd\u26be\u26c4\u26c5\u26c8\u26cf\u26d1\u26d3\u26d4\u26e9\u26ea\u26f0-\u26f5\u26f8\u26fa\u26fd\u2702\u2708\u2709\u270f\u2712\u2714\u2716\u271d\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u2764\u27a1\u2934\u2935\u2b05-\u2b07\u2b1b\u2b1c\u2b50\u2b55\u3030\u303d\u3297\u3299])(?:\ufe0f|(?!\ufe0e))|(?:(?:\ud83c[\udfcb\udfcc]|\ud83d[\udd74\udd75\udd90]|[\u261d\u26f7\u26f9\u270c\u270d])(?:\ufe0f|(?!\ufe0e))|(?:\ud83c[\udf85\udfc2-\udfc4\udfc7\udfca]|\ud83d[\udc42\udc43\udc46-\udc50\udc66-\udc69\udc6e\udc70-\udc78\udc7c\udc81-\udc83\udc85-\udc87\udcaa\udd7a\udd95\udd96\ude45-\ude47\ude4b-\ude4f\udea3\udeb4-\udeb6\udec0\udecc]|\ud83e[\udd0f\udd18-\udd1c\udd1e\udd1f\udd26\udd30-\udd39\udd3d\udd3e\uddb5\uddb6\uddb8\uddb9\uddbb\uddcd-\uddcf\uddd1-\udddd]|[\u270a\u270b]))(?:\ud83c[\udffb-\udfff])?|(?:\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc65\udb40\udc6e\udb40\udc67\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc73\udb40\udc63\udb40\udc74\udb40\udc7f|\ud83c\udff4\udb40\udc67\udb40\udc62\udb40\udc77\udb40\udc6c\udb40\udc73\udb40\udc7f|\ud83c\udde6\ud83c[\udde8-\uddec\uddee\uddf1\uddf2\uddf4\uddf6-\uddfa\uddfc\uddfd\uddff]|\ud83c\udde7\ud83c[\udde6\udde7\udde9-\uddef\uddf1-\uddf4\uddf6-\uddf9\uddfb\uddfc\uddfe\uddff]|\ud83c\udde8\ud83c[\udde6\udde8\udde9\uddeb-\uddee\uddf0-\uddf5\uddf7\uddfa-\uddff]|\ud83c\udde9\ud83c[\uddea\uddec\uddef\uddf0\uddf2\uddf4\uddff]|\ud83c\uddea\ud83c[\udde6\udde8\uddea\uddec\udded\uddf7-\uddfa]|\ud83c\uddeb\ud83c[\uddee-\uddf0\uddf2\uddf4\uddf7]|\ud83c\uddec\ud83c[\udde6\udde7\udde9-\uddee\uddf1-\uddf3\uddf5-\uddfa\uddfc\uddfe]|\ud83c\udded\ud83c[\uddf0\uddf2\uddf3\uddf7\uddf9\uddfa]|\ud83c\uddee\ud83c[\udde8-\uddea\uddf1-\uddf4\uddf6-\uddf9]|\ud83c\uddef\ud83c[\uddea\uddf2\uddf4\uddf5]|\ud83c\uddf0\ud83c[\uddea\uddec-\uddee\uddf2\uddf3\uddf5\uddf7\uddfc\uddfe\uddff]|\ud83c\uddf1\ud83c[\udde6-\udde8\uddee\uddf0\uddf7-\uddfb\uddfe]|\ud83c\uddf2\ud83c[\udde6\udde8-\udded\uddf0-\uddff]|\ud83c\uddf3\ud83c[\udde6\udde8\uddea-\uddec\uddee\uddf1\uddf4\uddf5\uddf7\uddfa\uddff]|\ud83c\uddf4\ud83c\uddf2|\ud83c\uddf5\ud83c[\udde6\uddea-\udded\uddf0-\uddf3\uddf7-\uddf9\uddfc\uddfe]|\ud83c\uddf6\ud83c\udde6|\ud83c\uddf7\ud83c[\uddea\uddf4\uddf8\uddfa\uddfc]|\ud83c\uddf8\ud83c[\udde6-\uddea\uddec-\uddf4\uddf7-\uddf9\uddfb\uddfd-\uddff]|\ud83c\uddf9\ud83c[\udde6\udde8\udde9\uddeb-\udded\uddef-\uddf4\uddf7\uddf9\uddfb\uddfc\uddff]|\ud83c\uddfa\ud83c[\udde6\uddec\uddf2\uddf3\uddf8\uddfe\uddff]|\ud83c\uddfb\ud83c[\udde6\udde8\uddea\uddec\uddee\uddf3\uddfa]|\ud83c\uddfc\ud83c[\uddeb\uddf8]|\ud83c\uddfd\ud83c\uddf0|\ud83c\uddfe\ud83c[\uddea\uddf9]|\ud83c\uddff\ud83c[\udde6\uddf2\uddfc]|\ud83c[\udccf\udd8e\udd91-\udd9a\udde6-\uddff\ude01\ude32-\ude36\ude38-\ude3a\ude50\ude51\udf00-\udf20\udf2d-\udf35\udf37-\udf7c\udf7e-\udf84\udf86-\udf93\udfa0-\udfc1\udfc5\udfc6\udfc8\udfc9\udfcf-\udfd3\udfe0-\udff0\udff4\udff8-\udfff]|\ud83d[\udc00-\udc3e\udc40\udc44\udc45\udc51-\udc65\udc6a\udc6f\udc79-\udc7b\udc7d-\udc80\udc84\udc88-\udca9\udcab-\udcfc\udcff-\udd3d\udd4b-\udd4e\udd50-\udd67\udda4\uddfb-\ude44\ude48-\ude4a\ude80-\udea2\udea4-\udeb3\udeb7-\udebf\udec1-\udec5\uded0-\uded2\uded5\udeeb\udeec\udef4-\udefa\udfe0-\udfeb]|\ud83e[\udd0d\udd0e\udd10-\udd17\udd1d\udd20-\udd25\udd27-\udd2f\udd3a\udd3c\udd3f-\udd45\udd47-\udd71\udd73-\udd76\udd7a-\udda2\udda5-\uddaa\uddae-\uddb4\uddb7\uddba\uddbc-\uddca\uddd0\uddde-\uddff\ude70-\ude73\ude78-\ude7a\ude80-\ude82\ude90-\ude95]|[\u23e9-\u23ec\u23f0\u23f3\u267e\u26ce\u2705\u2728\u274c\u274e\u2753-\u2755\u2795-\u2797\u27b0\u27bf\ue50a])|\ufe0f/g;function Il(){const e=Dl(['<img class="emoji"\n            draggable="false"\n            title="','"\n            alt="','"\n            src="','">']);return Il=function(){return e},e}function Ml(){const e=Dl(['<img class="emoji"\n                draggable="false"\n                title="','"\n                alt="','"\n                src="',"/72x72/",'.png"/>']);return Ml=function(){return e},e}function Rl(){const e=Dl(['<span title="','">',"</span>"]);return Rl=function(){return e},e}function Dl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
-/**
- * @module converse-emoji
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */const Pl=rl.env.utils;rl.emojis={initialized:!1,initialized_promise:Pl.getResolveablePromise()};const Ll={"*\\0/*":"1f646","*\\O/*":"1f646","-___-":"1f611",":'-)":"1f602","':-)":"1f605","':-D":"1f605",">:-)":"1f606","':-(":"1f613",">:-(":"1f620",":'-(":"1f622","O:-)":"1f607","0:-3":"1f607","0:-)":"1f607","0;^)":"1f607","O;-)":"1f607","0;-)":"1f607","O:-3":"1f607","-__-":"1f611",":-Þ":"1f61b","</3":"1f494",":')":"1f602",":-D":"1f603","':)":"1f605","'=)":"1f605","':D":"1f605","'=D":"1f605",">:)":"1f606",">;)":"1f606",">=)":"1f606",";-)":"1f609","*-)":"1f609",";-]":"1f609",";^)":"1f609","':(":"1f613","'=(":"1f613",":-*":"1f618",":^*":"1f618",">:P":"1f61c","X-P":"1f61c",">:[":"1f61e",":-(":"1f61e",":-[":"1f61e",">:(":"1f620",":'(":"1f622",";-(":"1f622",">.<":"1f623","#-)":"1f635","%-)":"1f635","X-)":"1f635","\\0/":"1f646","\\O/":"1f646","0:3":"1f607","0:)":"1f607","O:)":"1f607","O=)":"1f607","O:3":"1f607","B-)":"1f60e","8-)":"1f60e","B-D":"1f60e","8-D":"1f60e","-_-":"1f611",">:\\":"1f615",">:/":"1f615",":-/":"1f615",":-.":"1f615",":-P":"1f61b",":Þ":"1f61b",":-b":"1f61b",":-O":"1f62e",O_O:"1f62e",">:O":"1f62e",":-X":"1f636",":-#":"1f636",":-)":"1f642","(y)":"1f44d","<3":"2764",":D":"1f603","=D":"1f603",";)":"1f609","*)":"1f609",";]":"1f609",";D":"1f609",":*":"1f618","=*":"1f618",":(":"1f61e",":[":"1f61e","=(":"1f61e",":@":"1f620",";(":"1f622","D:":"1f628",":$":"1f633","=$":"1f633","#)":"1f635","%)":"1f635","X)":"1f635","B)":"1f60e","8)":"1f60e",":/":"1f615",":\\":"1f615","=/":"1f615","=\\":"1f615",":L":"1f615","=L":"1f615",":P":"1f61b","=P":"1f61b",":b":"1f61b",":O":"1f62e",":X":"1f636",":#":"1f636","=X":"1f636","=#":"1f636",":)":"1f642","=]":"1f642","=)":"1f642",":]":"1f642"};function zl(e){if(e.indexOf("-")>-1){const t=[],n=e.split("-");for(let e=0;e<n.length;e++){let r=parseInt(n[e],16);if(r>=65536&&r<=1114111){const e=Math.floor((r-65536)/1024)+55296,t=(r-65536)%1024+56320;r=String.fromCharCode(e)+String.fromCharCode(t)}else r=String.fromCharCode(r);t.push(r)}return t.join("")}return function(e){let t="string"==typeof e?parseInt(e,16):e;return t<65536?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}(e)}function Fl(){var e;return rl.emojis.toned||(rl.emojis.toned=(e=Object.values(rl.emojis.json.people).filter(e=>e.sn.includes("_tone")).map(e=>e.sn.replace(/_tone[1-5]/,"")),[...new Set(e)])),rl.emojis.toned}function Bl(e){return e.replace(kl,(e,t,n,r)=>{if(void 0===r||""===r||!(Pl.unescapeHTML(r)in Ll))return e;return r=Pl.unescapeHTML(r),n+zl(Ll[r].toUpperCase())})}function ql(e,t={unicode_only:!1,add_title_wrapper:!1}){const n=e.emoji,r=e.shortname;if(n){if(t.unicode_only)return n;if(Vc.settings.get("use_system_emojis"))return t.add_title_wrapper&&r?Za(Rl(),r,n):n;{const t=Vc.settings.get("emoji_image_path");return Za(Ml(),r,n,t,e.cp)}}return t.unicode_only?r:Za(Il(),r,r,rl.emojis.by_sn[r].url)}function Hl(e){if(!rl.emojis.initialized)throw new Error("getShortnameReferences called before emojis are initialized. To avoid this problem, first await the converse.emojis.initilaized_promise.");return[...e.matchAll(rl.emojis.shortnames_regex)].filter(e=>e[0].length>0).map(e=>{const t=rl.emojis.by_sn[e[0]].cp;return{cp:t,begin:e.index,end:e.index+e[0].length,shortname:e[0],emoji:t?zl(t):null}})}function Ul(e){const t=[];return function(e,t){const n=/\uFE0F/g,r=String.fromCharCode(8205);String(e).replace(Nl,(e,i,o)=>{const s=function(e){const t=[];let n=0,r=0;for(;r<e.length;){const i=e.charCodeAt(r++);n?(t.push((65536+(n-55296<<10)+(i-56320)).toString(16)),n=0):55296<=i&&i<=56319?n=i:t.push(i.toString(16))}return t.join("-")}(e.indexOf(r)<0?e.replace(n,""):e);s&&t(s,e,o)})}(e,(e,n,r)=>{var i;t.push({begin:r,cp:e,emoji:n,end:r+n.length,shortname:(null===(i=Pl.getEmojisByAtrribute("cp")[e])||void 0===i?void 0:i.sn)||""})}),t}rl.plugins.add("converse-emoji",{initialize(){const{___:e}=Uc;Vc.settings.extend({emoji_image_path:"https://twemoji.maxcdn.com/v/12.1.6/",emoji_categories:{smileys:":grinning:",people:":thumbsup:",activity:":soccer:",travel:":motorcycle:",objects:":bomb:",nature:":rainbow:",food:":hotdog:",symbols:":musical_note:",flags:":flag_ac:",custom:null},emoji_category_labels:{smileys:e("Smileys and emotions"),people:e("People"),activity:e("Activities"),travel:e("Travel"),objects:e("Objects"),nature:e("Animals and nature"),food:e("Food and drink"),symbols:e("Symbols"),flags:e("Flags"),custom:e("Stickers")}}),Uc.EmojiPicker=qo.extend({defaults:{current_category:"smileys",current_skintone:"",scroll_position:0}});const t={};Object.assign(Pl,{shortnamesToEmojis:(e,t={unicode_only:!1,add_title_wrapper:!1})=>function(e,t){let n=[e];return[...Hl(e),...Ul(e)].sort((e,t)=>t.begin-e.begin).forEach(e=>{const r=n.shift(),i=ql(e,t);n="string"==typeof i?[r.slice(0,e.begin)+i+r.slice(e.end),...n]:[r.slice(0,e.begin),i,r.slice(e.end),...n]}),n}(e=Bl(e),t),shortnamesToUnicode:e=>Pl.shortnamesToEmojis(e,{unicode_only:!0})[0],isOnlyEmojis(e){const t=e.trim().split(/\s+/);return!(0===t.length||t.length>3)&&t.filter(e=>{const t=Ul(Pl.shortnamesToUnicode(e));return 1===t.length&&(e===t[0].shortname||e===t[0].emoji)}).length===t.length},getEmojisByAtrribute(e){if(t[e])return t[e];if("category"===e)return rl.emojis.json;const n=rl.emojis.list.map(t=>t[e]).filter((e,t,n)=>n.indexOf(e)==t);return t[e]={},n.forEach(n=>t[e][n]=rl.emojis.list.find(t=>t[e]===n)),t[e]}}),Object.assign(Vc,{emojis:{async initialize(){if(!rl.emojis.initialized){rl.emojis.initialized=!0;const{default:e}=await n.e(137).then(n.t.bind(null,547,3));rl.emojis.json=e,rl.emojis.by_sn=Object.keys(e).reduce((t,n)=>Object.assign(t,e[n]),{}),rl.emojis.list=Object.values(rl.emojis.by_sn),rl.emojis.list.sort((e,t)=>e.sn<t.sn?-1:e.sn>t.sn?1:0),rl.emojis.shortnames=rl.emojis.list.map(e=>e.sn);const t=()=>rl.emojis.shortnames.map(e=>e.replace(/[+]/g,"\\$&")).join("|");rl.emojis.shortnames_regex=new RegExp(t(),"gi"),rl.emojis.toned=Fl(),rl.emojis.initialized_promise.resolve()}return rl.emojis.initialized_promise}}})}});var $l={initialize(){this.checkValidity()&&(this.get("file")&&this.on("change:put",this.uploadFile,this),this.setTimerForEphemeralMessage()||this.setOccupant(),Vc.trigger("chatRoomMessageInitialized",this))},mayBeModerated(){return["all","moderator"].includes(Vc.settings.get("allow_message_retraction"))&&this.collection.chatbox.canModerateMessages()},checkValidity(){const e=Uc.Message.prototype.checkValidity.call(this);return!e&&this.collection.chatbox.debouncedRejoin(),e},onOccupantRemoved(){var e;this.stopListening(this.occupant),delete this.occupant;const t=null==this||null===(e=this.collection)||void 0===e?void 0:e.chatbox;if(!t)return zn.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));this.listenTo(t.occupants,"add",this.onOccupantAdded)},onOccupantAdded(e){if(e.get("nick")===kc.e.getResourceFromJid(this.get("from"))){var t;this.occupant=e,this.trigger("occupantAdded"),this.listenTo(this.occupant,"destroy",this.onOccupantRemoved);const n=null==this||null===(t=this.collection)||void 0===t?void 0:t.chatbox;if(!n)return zn.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));this.stopListening(n.occupants,"add",this.onOccupantAdded)}},setOccupant(){var e;if("groupchat"!==this.get("type"))return;const t=null==this||null===(e=this.collection)||void 0===e?void 0:e.chatbox;if(!t)return zn.error("Could not get collection.chatbox for message: ".concat(JSON.stringify(this.toJSON())));const n=kc.e.getResourceFromJid(this.get("from"));if(this.occupant=t.occupants.findWhere({nick:n}),!this.occupant&&Vc.settings.get("muc_send_probes")){this.occupant=t.occupants.create({nick:n,type:"unavailable"});const e="".concat(t.get("jid"),"/").concat(n);Vc.user.presence.send("probe",e)}this.occupant?this.listenTo(this.occupant,"destroy",this.onOccupantRemoved):this.listenTo(t.occupants,"add",this.onOccupantAdded)}};
-/**
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description This is the MUC utilities module.
- */const{Strophe:Wl,sizzle:Gl}=rl.env;var Vl={computeAffiliationsDelta(e,t,n,r){const i=n.map(e=>e.jid),o=r.map(e=>e.jid);let s=ks(i,o).map(e=>n[Hs(i,e)]);return e||(s=s.concat(n.filter(e=>{const t=Hs(o,e.jid);return t>=0&&e.affiliation!==r[t].affiliation}))),t&&(s=s.concat(ks(o,i).map(e=>({jid:e,affiliation:"none"})))),s},parseMemberListIQ:e=>Gl('query[xmlns="'.concat(Wl.NS.MUC_ADMIN,'"] item'),e).map(e=>{const t={affiliation:e.getAttribute("affiliation")},n=e.getAttribute("jid");Jo.isValidJID(n)?t.jid=n:t.nick=n;const r=e.getAttribute("nick");return r&&(t.nick=r),e.getAttribute("role")&&(t.role=r),t})};
-/**
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description Pure functions to help functionally parse messages.
- * @todo Other parsing helpers can be made more abstract and placed here.
- */const Jl={},Xl=(e,t)=>e.replace(RegExp("\\"+t,"ig"),"\\"+t);Jl.escapeCharacters=e=>t=>e.split("").reduce(Xl,t),Jl.escapeRegexString=Jl.escapeCharacters("[\\^$.?*+(){}"),Jl.findFirstMatchInArray=e=>t=>{for(let n=0;n<e.length;n++)if(0===t.localeCompare(e[n],void 0,{sensitivity:"base"}))return e[n];return null};const Ql=([e,t],n,r)=>{let i=e,{begin:o,end:s}=n;const{value:a}=n;return o-=r,s=s-r-1,i="".concat(i.slice(0,o)).concat(a).concat(i.slice(s+1)),[i,[...t,{...n,begin:o,end:s}]]};Jl.reduceTextFromReferences=(e,t)=>t.reduce(Ql,[e,[]]);var Yl=Jl;
-/**
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description This is the form utilities module.
- */Jo.webForm2xForm=function(e){const t=e.getAttribute("name");if(!t)return null;let n;return n="checkbox"===e.getAttribute("type")?e.checked?1:0:"TEXTAREA"==e.tagName?e.value.split("\n").filter(e=>e.trim()):"SELECT"==e.tagName?Jo.getSelectValues(e):e.value,Jo.toStanza('\n        <field var="'.concat(t,'">\n            ').concat(n.constructor===Array?n.map(e=>"<value>".concat(e,"</value>")):"<value>".concat(n,"</value>"),"\n        </field>"))};var Kl=Jo;var Zl=function(e,t,n){for(var r=-1,i=e.length,o=t.length,s={};++r<i;){var a=r<o?t[r]:void 0;n(s,e[r],a)}return s};var eu=function(e,t){return Zl(e||[],t||[],we)},tu=Math.min;var nu=function(e,t,n){for(var r=n?js:Cs,i=e[0].length,o=e.length,s=o,a=Array(o),c=1/0,l=[];s--;){var u=e[s];s&&t&&(u=qr(u,Le(t))),c=tu(u.length,c),a[s]=!n&&(t||i>=120&&u.length>=120)?new Xi(s&&u):void 0}u=e[0];var d=-1,h=a[0];e:for(;++d<i&&l.length<c;){var f=u[d],p=t?t(f):f;if(f=n||0!==f?f:0,!(h?Yi(h,p):r(l,p,n))){for(s=o;--s;){var g=a[s];if(!(g?Yi(g,p):r(e[s],p,n)))continue e}h&&h.push(p),l.push(f)}}return l};var ru=function(e){return Os(e)?e:[]},iu=jr((function(e){var t=qr(e,ru);return t.length&&t[0]===e[0]?nu(t):[]}));const ou=["301","303","333","307","321","322"],su=qo.extend({defaults:()=>({connection_status:rl.ROOMSTATUS.DISCONNECTED})});var au={defaults(){return{num_unread_general:0,bookmarked:!1,chat_state:void 0,hidden:Uc.isUniView()&&!Vc.settings.get("singleton"),hidden_occupants:!!Vc.settings.get("hide_muc_participants"),message_type:"groupchat",name:"",num_unread:0,roomconfig:{},time_opened:this.get("time_opened")||(new Date).getTime(),time_sent:new Date(0).toISOString(),type:Uc.CHATROOMS_TYPE}},async initialize(){this.initialized=Kl.getResolveablePromise(),this.debouncedRejoin=Rc(this.rejoin,250),this.set("box_id","box-".concat(this.get("jid"))),this.initNotifications(),this.initMessages(),this.initOccupants(),this.initDiscoModels(),this.registerHandlers(),this.on("change:chat_state",this.sendChatState,this),await this.restoreSession(),this.session.on("change:connection_status",this.onConnectionStatusChanged,this),this.listenTo(this.occupants,"add",this.onOccupantAdded),this.listenTo(this.occupants,"remove",this.onOccupantRemoved),this.listenTo(this.occupants,"change:show",this.onOccupantShowChanged),this.listenTo(this.occupants,"change:affiliation",this.createAffiliationChangeMessage),this.listenTo(this.occupants,"change:role",this.createRoleChangeMessage),await this.restoreFromCache()||this.join(),await Vc.trigger("chatRoomInitialized",this,{Synchronous:!0}),this.initialized.resolve()},async restoreFromCache(){return this.session.get("connection_status")===rl.ROOMSTATUS.ENTERED&&await this.isJoined()?(await new Promise(e=>this.features.fetch({success:e,error:e})),await this.fetchOccupants().catch(e=>zn.error(e)),await this.fetchMessages().catch(e=>zn.error(e)),!0):(await this.clearCache(),!1)},async join(e,t){if(this.session.get("connection_status")===rl.ROOMSTATUS.ENTERED)return this;if(await this.refreshDiscoInfo(),!(e=await this.getAndPersistNickname(e)))return Kl.safeSave(this.session,{connection_status:rl.ROOMSTATUS.NICKNAME_REQUIRED}),Vc.settings.get("muc_show_logs_before_join")&&await this.fetchMessages(),this;const n=Object(kc.d)({from:Uc.connection.jid,to:this.getRoomJIDAndNick()}).c("x",{xmlns:kc.e.NS.MUC}).c("history",{maxstanzas:this.features.get("mam_enabled")?0:Vc.settings.get("muc_history_max_stanzas")}).up();return(t=t||this.get("password"))&&n.cnode(kc.e.xmlElement("password",[],t)),this.session.save("connection_status",rl.ROOMSTATUS.CONNECTING),Vc.send(n),this},async clearCache(){this.session.save("connection_status",rl.ROOMSTATUS.DISCONNECTED),this.occupants.length?this.occupants.filter(e=>!e.isMember()).forEach(e=>e.destroy()):this.occupants.clearStore(),Vc.settings.get("clear_messages_on_reconnection")&&await this.clearMessages()},onOccupantAdded(e){Uc.isInfoVisible(rl.MUC_TRAFFIC_STATES.ENTERED)&&this.session.get("connection_status")===rl.ROOMSTATUS.ENTERED&&"online"===e.get("show")&&this.updateNotifications(e.get("nick"),rl.MUC_TRAFFIC_STATES.ENTERED)},onOccupantRemoved(e){Uc.isInfoVisible(rl.MUC_TRAFFIC_STATES.EXITED)&&this.session.get("connection_status")===rl.ROOMSTATUS.ENTERED&&"online"===e.get("show")&&this.updateNotifications(e.get("nick"),rl.MUC_TRAFFIC_STATES.EXITED)},onOccupantShowChanged(e){e.get("states").includes("303")||("offline"===e.get("show")&&Uc.isInfoVisible(rl.MUC_TRAFFIC_STATES.EXITED)?this.updateNotifications(e.get("nick"),rl.MUC_TRAFFIC_STATES.EXITED):"online"===e.get("show")&&Uc.isInfoVisible(rl.MUC_TRAFFIC_STATES.ENTERED)&&this.updateNotifications(e.get("nick"),rl.MUC_TRAFFIC_STATES.ENTERED))},rejoin(){return this.clearCache(),this.join()},async onConnectionStatusChanged(){this.session.get("connection_status")===rl.ROOMSTATUS.ENTERED&&(await this.occupants.fetchMembers(),await this.fetchMessages(),Vc.trigger("enteredNewRoom",this),Vc.settings.get("auto_register_muc_nickname")&&await Vc.disco.supports(kc.e.NS.MUC_REGISTER,this.get("jid"))&&this.registerNickname())},async onReconnection(){this.registerHandlers(),await this.rejoin(),this.announceReconnection()},getMessagesCollection:()=>new Uc.ChatRoomMessages,restoreSession(){const e="muc.session-".concat(Uc.bare_jid,"-").concat(this.get("jid"));return this.session=new su({id:e}),this.session.browserStorage=Uc.createStore(e,"session"),new Promise(e=>this.session.fetch({success:e,error:e}))},initDiscoModels(){let e="converse.muc-features-".concat(Uc.bare_jid,"-").concat(this.get("jid"));this.features=new qo(Object.assign({id:e},eu(rl.ROOM_FEATURES,rl.ROOM_FEATURES.map(()=>!1)))),this.features.browserStorage=Uc.createStore(e,"session"),e="converse.muc-config-{_converse.bare_jid}-".concat(this.get("jid")),this.config=new qo,this.config.browserStorage=Uc.createStore(e,"session")},initOccupants(){this.occupants=new Uc.ChatRoomOccupants;const e="converse.occupants-".concat(Uc.bare_jid).concat(this.get("jid"));this.occupants.browserStorage=Uc.createStore(e,"session"),this.occupants.chatroom=this},fetchOccupants(){return this.occupants.fetched=new Promise(e=>{this.occupants.fetch({add:!0,silent:!0,success:e,error:e})}),this.occupants.fetched},handleAffiliationChangedMessage(e){const t=mr()('x[xmlns="'.concat(kc.e.NS.MUC_USER,'"] item'),e).pop();if(t){const n=e.getAttribute("from"),r=e.getAttribute("type"),i=t.getAttribute("affiliation"),o=t.getAttribute("jid"),s={from:n,type:r,affiliation:i,nick:kc.e.getNodeFromJid(o),states:[],show:"unavailable"==r?"offline":"online",role:t.getAttribute("role"),jid:kc.e.getBareJidFromJid(o),resource:kc.e.getResourceFromJid(o)},a=this.occupants.findOccupant({jid:s.jid});a?a.save(s):this.occupants.create(s)}},async handleErrorMessageStanza(e){const{__:t}=Uc,n=await ps.parseMUCMessage(e,this,Uc);if(!await this.shouldShowErrorMessage(n))return;const r=this.getMessageReferencedByError(n);if(r){const e={error:n.error,error_condition:n.error_condition,error_text:n.error_text,error_type:n.error_type,editable:!1};n.msgid===r.get("retraction_id")?(e.retraction_id=void 0,n.error||("forbidden"===n.error_condition?e.error=t("You're not allowed to retract your message."):"not-acceptable"===n.error_condition?e.error=t("Your retraction was not delivered because you're not present in the groupchat."):e.error=t("Sorry, an error occurred while trying to retract your message."))):n.error||("forbidden"===n.error_condition?e.error=t("Your message was not delivered because you weren't allowed to send it."):"not-acceptable"===n.error_condition?e.error=t("Your message was not delivered because you're not present in the groupchat."):e.error=t("Sorry, an error occurred while trying to send your message.")),r.save(e)}else this.createMessage(n)},async handleMessageStanza(e){if(ps.isArchived(e))return zn.warn('Received a MAM message with type "groupchat"');this.createInfoMessages(e),this.fetchFeaturesIfConfigurationChanged(e);const t=await ps.parseMUCMessage(e,this,Uc),n={stanza:e,attrs:t,chatbox:this};return Vc.trigger("message",n),t&&this.queueMessage(t)},registerHandlers(){const e=this.get("jid");this.removeHandlers(),this.presence_handler=Uc.connection.addHandler(e=>this.onPresence(e)||!0,null,"presence",null,null,e,{ignoreNamespaceFragment:!0,matchBareFromJid:!0}),this.message_handler=Uc.connection.addHandler(e=>!!this.handleMessageStanza(e)||!0,null,"message","groupchat",null,e,{matchBareFromJid:!0}),this.affiliation_message_handler=Uc.connection.addHandler(e=>this.handleAffiliationChangedMessage(e)||!0,kc.e.NS.MUC_USER,"message",null,null,e)},removeHandlers(){return this.message_handler&&(Uc.connection&&Uc.connection.deleteHandler(this.message_handler),delete this.message_handler),this.presence_handler&&(Uc.connection&&Uc.connection.deleteHandler(this.presence_handler),delete this.presence_handler),this.affiliation_message_handler&&(Uc.connection&&Uc.connection.deleteHandler(this.affiliation_message_handler),delete this.affiliation_message_handler),this},invitesAllowed(){return Vc.settings.get("allow_muc_invitations")&&(this.features.get("open")||"owner"===this.getOwnAffiliation())},getDisplayName(){const e=this.get("name");return e||("hidden"===Vc.settings.get("locked_muc_domain")?kc.e.getNodeFromJid(this.get("jid")):this.get("jid"))},sendTimedMessage(e){"function"==typeof e.tree&&(e=e.tree());let t=e.getAttribute("id");t||(t=this.getUniqueId("sendIQ"),e.setAttribute("id",t));const n=Kl.getResolveablePromise(),r=Uc.connection.addTimedHandler(Uc.STANZA_TIMEOUT,()=>(Uc.connection.deleteHandler(i),n.reject(new Uc.TimeoutError("Timeout Error: No response from server")),!1)),i=Uc.connection.addHandler(e=>{r&&Uc.connection.deleteTimedHandler(r),"groupchat"===e.getAttribute("type")?n.resolve(e):n.reject(e)},null,"message",["error","groupchat"],t);return Vc.send(e),n},async retractOwnMessage(e){const t=Uc.__,n=e.get("origin_id");if(!n)throw new Error("Can't retract message without a XEP-0359 Origin ID");const r=e.get("editable"),i=Object(kc.c)({id:Kl.getUniqueId(),to:this.get("jid"),type:"groupchat"}).c("store",{xmlns:kc.e.NS.HINTS}).up().c("apply-to",{id:n,xmlns:kc.e.NS.FASTEN}).c("retract",{xmlns:kc.e.NS.RETRACT});e.set({retracted:(new Date).toISOString(),retracted_id:n,retraction_id:i.nodeTree.getAttribute("id"),editable:!1});try{await this.sendTimedMessage(i)}catch(n){throw e.save({editable:r,error_type:"timeout",error:t("A timeout happened while while trying to retract your message."),retracted:void 0,retracted_id:void 0}),n}},async retractOtherMessage(e,t){const n=e.get("editable");e.save({moderated:"retracted",moderated_by:Uc.bare_jid,moderated_id:e.get("msgid"),moderation_reason:t,editable:!1});const r=await this.sendRetractionIQ(e,t);return(null===r||Kl.isErrorStanza(r))&&e.save({editable:n,moderated:void 0,moderated_by:void 0,moderated_id:void 0,moderation_reason:void 0}),r},sendRetractionIQ(e,t){const n=Object(kc.b)({to:this.get("jid"),type:"set"}).c("apply-to",{id:e.get("stanza_id ".concat(this.get("jid"))),xmlns:kc.e.NS.FASTEN}).c("moderate",{xmlns:kc.e.NS.MODERATE}).c("retract",{xmlns:kc.e.NS.RETRACT}).up().c("reason").t(t||"");return Vc.sendIQ(n,null,!1)},sendDestroyIQ(e,t){const n=Object(kc.a)("destroy");t&&n.attrs({jid:t});const r=Object(kc.b)({to:this.get("jid"),type:"set"}).c("query",{xmlns:kc.e.NS.MUC_OWNER}).cnode(n.node);return e&&e.length>0&&r.c("reason",e),Vc.sendIQ(r)},async leave(e){if(this.features.destroy(),this.occupants.clearStore(),Uc.disco_entities){const e=Uc.disco_entities.get(this.get("jid"));e&&await new Promise((t,n)=>e.destroy({success:t,error:n}))}Vc.connection.connected()&&Vc.user.presence.send("unavailable",this.getRoomJIDAndNick(),e),Kl.safeSave(this.session,{connection_status:rl.ROOMSTATUS.DISCONNECTED}),this.removeHandlers()},async close(){return await new Promise(e=>this.session.destroy({success:e,error:(t,n)=>{zn.error(n),e()}})),await new Promise(e=>this.features.destroy({success:e,error:(t,n)=>{zn.error(n),e()}})),Uc.ChatBox.prototype.close.call(this)},canModerateMessages(){const e=this.getOwnOccupant();return e&&e.isModerator()&&Vc.disco.supports(kc.e.NS.MODERATE,this.get("jid"))},getAllKnownNicknames(){return[...new Set([...this.occupants.map(e=>e.get("nick")),...this.messages.map(e=>e.get("nick"))])].filter(e=>e)},getAllKnownNicknamesRegex(){const e=this.getAllKnownNicknames().join("|"),t=Yl.escapeRegexString(e);return RegExp("(?:\\p{P}|\\p{Z}|^)@(".concat(t,")(?![\\w@-])"),"uig")},getOccupantByJID(e){return this.occupants.findOccupant({jid:e})},getOccupantByNickname(e){return this.occupants.findOccupant({nick:e})},parseTextForReferences(e){if(!e||!/(\p{P}|\p{Z}|^)([@][\w_-]+(?:\.\w+)*)/giu.test(e))return[e,[]];const t=Yl.findFirstMatchInArray(this.getAllKnownNicknames()),n=e=>{const t=this.get("jid"),n=this.getOccupant(e)||this.getOccupant(t),r=n&&n.get("jid")||"".concat(t,"/").concat(e);return encodeURI("xmpp:".concat(r))},r=this.getAllKnownNicknamesRegex(),i=[...e.matchAll(r)].filter(e=>!e[0].startsWith("/")).map(e=>{let r=e[0].indexOf("@");"@"===e[0][r+1]&&(r+=1);const i=e.index+r,o=i+e[0].length-r,s=t(e[1]);return{begin:i,end:o,value:s,type:"mention",uri:n(s)}}),[o,s]=Yl.reduceTextFromReferences(e,i);return[o,s]},getOutgoingMessageAttributes(e,t){const n=this.get("composing_spoiler"),[r,i]=this.parseTextForReferences(e),o=Kl.getUniqueId(),s=r?Kl.httpToGeoUri(Kl.shortnamesToUnicode(r),Uc):void 0;return{body:s,is_spoiler:n,origin_id:o,references:i,id:o,msgid:o,from:"".concat(this.get("jid"),"/").concat(this.get("nick")),fullname:this.get("nick"),is_only_emojis:!!r&&Kl.isOnlyEmojis(r),message:s,nick:this.get("nick"),sender:"me",spoiler_hint:n?t:void 0,type:"groupchat"}},getRoomJIDAndNick(){const e=this.get("nick");return kc.e.getBareJidFromJid(this.get("jid"))+(null!==e?"/".concat(e):"")},sendChatState(){if(!Vc.settings.get("send_chat_state_notifications")||!this.get("chat_state")||this.session.get("connection_status")!==rl.ROOMSTATUS.ENTERED||this.features.get("moderated")&&"visitor"===this.getOwnRole())return;const e=Vc.settings.get("send_chat_state_notifications");if(Array.isArray(e)&&!e.includes(this.get("chat_state")))return;const t=this.get("chat_state");t!==Uc.GONE&&Vc.send(Object(kc.c)({to:this.get("jid"),type:"groupchat"}).c(t,{xmlns:kc.e.NS.CHATSTATES}).up().c("no-store",{xmlns:kc.e.NS.HINTS}).up().c("no-permanent-store",{xmlns:kc.e.NS.HINTS}))},directInvite(e,t){this.features.get("membersonly")&&this.updateMemberLists([{jid:e,affiliation:"member",reason:t}]);const n={xmlns:"jabber:x:conference",jid:this.get("jid")};null!==t&&(n.reason=t),this.get("password")&&(n.password=this.get("password"));const r=Object(kc.c)({from:Uc.connection.jid,to:e,id:Kl.getUniqueId()}).c("x",n);Vc.send(r),Vc.trigger("roomInviteSent",{room:this,recipient:e,reason:t})},refreshDiscoInfo(){return Vc.disco.refresh(this.get("jid")).then(()=>this.getDiscoInfo()).catch(e=>zn.error(e))},getDiscoInfo(){return Vc.disco.getIdentity("conference","text",this.get("jid")).then(e=>this.save({name:null==e?void 0:e.get("name")})).then(()=>this.getDiscoInfoFields()).then(()=>this.getDiscoInfoFeatures()).catch(e=>zn.error(e))},async getDiscoInfoFields(){const e=(await Vc.disco.getFields(this.get("jid"))).reduce((e,t)=>{const n=t.get("var");return n&&n.startsWith("muc#roominfo_")&&(e[n.replace("muc#roominfo_","")]=t.get("value")),e},{});this.config.save(e)},async getDiscoInfoFeatures(){const e=await Vc.disco.getFeatures(this.get("jid")),t=Object.assign(eu(rl.ROOM_FEATURES,rl.ROOM_FEATURES.map(()=>!1)),{fetched:(new Date).toISOString()});e.each(e=>{const n=e.get("var");n.startsWith("muc_")?t[n.replace("muc_","")]=!0:n===kc.e.NS.MAM&&(t.mam_enabled=!0)}),this.features.save(t)},setAffiliation(e,t){return t=t.filter(t=>void 0===t.affiliation||t.affiliation===e),Promise.all(t.map(t=>this.sendAffiliationIQ(e,t)))},addFieldValue(e){const t=e.getAttribute("type");if("fixed"===t)return e;const n=e.getAttribute("var").replace("muc#roomconfig_",""),r=this.get("roomconfig");if(n in r){let i;switch(t){case"boolean":i=[r[n]?1:0];break;case"list-multi":i=r[n];break;default:i=[r[n]]}e.innerHTML=i.map(e=>Object(kc.a)("value").t(e)).join("")}return e},async autoConfigureChatRoom(){const e=await this.fetchRoomConfiguration(),t=mr()("field",e).map(e=>this.addFieldValue(e));if(t.length)return this.sendConfiguration(t)},fetchRoomConfiguration(){return Vc.sendIQ(Object(kc.b)({to:this.get("jid"),type:"get"}).c("query",{xmlns:kc.e.NS.MUC_OWNER}))},sendConfiguration(e=[]){const t=Object(kc.b)({to:this.get("jid"),type:"set"}).c("query",{xmlns:kc.e.NS.MUC_OWNER}).c("x",{xmlns:kc.e.NS.XFORM,type:"submit"});return e.forEach(e=>t.cnode(e).up()),Vc.sendIQ(t)},getOwnRole(){var e,t;return null===(e=this.getOwnOccupant())||void 0===e||null===(t=e.attributes)||void 0===t?void 0:t.role},getOwnAffiliation(){var e,t;return null===(e=this.getOwnOccupant())||void 0===e||null===(t=e.attributes)||void 0===t?void 0:t.affiliation},getOwnOccupant(){return this.occupants.findWhere({jid:Uc.bare_jid})},sendAffiliationIQ(e,t){const n=Object(kc.b)({to:this.get("jid"),type:"set"}).c("query",{xmlns:kc.e.NS.MUC_ADMIN}).c("item",{affiliation:t.affiliation||e,nick:t.nick,jid:t.jid});return void 0!==t.reason&&n.c("reason",t.reason),Vc.sendIQ(n)},setAffiliations(e){const t=[...new Set(e.map(e=>e.affiliation))];return Promise.all(t.map(t=>this.setAffiliation(t,e)))},setRole(e,t,n,r,i){const o=Object(kc.a)("item",{nick:e.get("nick"),role:t}),s=Object(kc.b)({to:this.get("jid"),type:"set"}).c("query",{xmlns:kc.e.NS.MUC_ADMIN}).cnode(o.node);return null!==n&&s.c("reason",n),Vc.sendIQ(s).then(r).catch(i)},getOccupant(e){return Kl.isValidJID(e)?this.getOccupantByJID(e):this.getOccupantByNickname(e)},getOccupantsWithRole(e){return this.getOccupantsSortedBy("nick").filter(t=>t.get("role")===e).map(e=>({jid:e.get("jid"),nick:e.get("nick"),role:e.get("role")}))},getOccupantsWithAffiliation(e){return this.getOccupantsSortedBy("nick").filter(t=>t.get("affiliation")===e).map(e=>({jid:e.get("jid"),nick:e.get("nick"),affiliation:e.get("affiliation")}))},getOccupantsSortedBy(e){return Array.from(this.occupants.models).sort((t,n)=>t.get(e)<n.get(e)?-1:t.get(e)>n.get(e)?1:0)},async getAffiliationList(e){const t=Object(kc.b)({to:this.get("jid"),type:"get"}).c("query",{xmlns:kc.e.NS.MUC_ADMIN}).c("item",{affiliation:e}),n=await Vc.sendIQ(t,null,!1);if(null===n){const t="Error: timeout while fetching ".concat(e," list for MUC ").concat(this.get("jid")),r=new Error(t);return zn.warn(t),zn.warn(n),r}if(Kl.isErrorStanza(n)){const t="Error: not allowed to fetch ".concat(e," list for MUC ").concat(this.get("jid")),r=new Error(t);return zn.warn(t),zn.warn(n),r}return Vl.parseMemberListIQ(n).filter(e=>e).sort((e,t)=>e.nick<t.nick?-1:e.nick>t.nick?1:0)},async updateMemberLists(e){const t=(await Promise.all(["member","admin","owner"].map(e=>this.getAffiliationList(e)))).reduce((e,t)=>Kl.isErrorObject(t)?e:[...t,...e],[]);await this.setAffiliations(Vl.computeAffiliationsDelta(!0,!1,e,t)),await this.occupants.fetchMembers()},async getAndPersistNickname(e){return(e=e||this.get("nick")||await this.getReservedNick()||Uc.getDefaultMUCNickname())&&this.save({nick:e},{silent:!0}),e},async getReservedNick(){const e=Object(kc.b)({to:this.get("jid"),from:Uc.connection.jid,type:"get"}).c("query",{xmlns:kc.e.NS.DISCO_INFO,node:"x-roomuser-item"}),t=await Vc.sendIQ(e,null,!1);if(Kl.isErrorObject(t))throw t;const n=t.querySelector('query[node="x-roomuser-item"] identity');return n?n.getAttribute("name"):null},async registerNickname(){const e=Uc.__,t=this.get("nick"),n=this.get("jid");let r,i;try{r=await Vc.sendIQ(Object(kc.b)({to:n,from:Uc.connection.jid,type:"get"}).c("query",{xmlns:kc.e.NS.MUC_REGISTER}))}catch(t){return mr()('not-allowed[xmlns="'.concat(kc.e.NS.STANZAS,'"]'),t).length?i=e("You're not allowed to register yourself in this groupchat."):mr()('registration-required[xmlns="'.concat(kc.e.NS.STANZAS,'"]'),t).length&&(i=e("You're not allowed to register in this groupchat because it's members-only.")),zn.error(t),i}const o=mr()("field required",r).map(e=>e.parentElement);if(o.length>1&&"muc#register_roomnick"!==o[0].getAttribute("var"))return zn.error("Can't register the user register in the groupchat ".concat(n," due to the required fields"));try{await Vc.sendIQ(Object(kc.b)({to:n,from:Uc.connection.jid,type:"set"}).c("query",{xmlns:kc.e.NS.MUC_REGISTER}).c("x",{xmlns:kc.e.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE"}).c("value").t("http://jabber.org/protocol/muc#register").up().up().c("field",{var:"muc#register_roomnick"}).c("value").t(t))}catch(t){return mr()('service-unavailable[xmlns="'.concat(kc.e.NS.STANZAS,'"]'),t).length?i=e("Can't register your nickname in this groupchat, it doesn't support registration."):mr()('bad-request[xmlns="'.concat(kc.e.NS.STANZAS,'"]'),t).length&&(i=e("Can't register your nickname in this groupchat, invalid data form supplied.")),zn.error(i),zn.error(t),i}},updateOccupantsOnPresence(e){var t,n;const r=ps.parseMUCPresence(e);if("error"===r.type||!r.jid&&!r.nick)return!0;const i=this.occupants.findOccupant(r);if("unavailable"===r.type&&i&&!r.states.includes(rl.MUC_NICK_CHANGED_CODE)&&!["admin","owner","member"].includes(r.affiliation))return i.set(r),void i.destroy();const o=r.jid||"",s=Object.assign(r,{jid:kc.e.getBareJidFromJid(o)||(null==i||null===(t=i.attributes)||void 0===t?void 0:t.jid),resource:kc.e.getResourceFromJid(o)||(null==i||null===(n=i.attributes)||void 0===n?void 0:n.resource)});i?i.save(s):this.occupants.create(s)},fetchFeaturesIfConfigurationChanged(e){const t=["104","170","171","172","173","174"];mr()("status",e).filter(e=>t.includes(e.getAttribute("status"))).length&&this.refreshDiscoInfo()},isSameUser(e,t){const n=kc.e.getBareJidFromJid(e),r=kc.e.getBareJidFromJid(t),i=kc.e.getResourceFromJid(e),o=kc.e.getResourceFromJid(t);if(Kl.isSameBareJID(e,t))return n!==this.get("jid")||i===o;return(n===this.get("jid")?this.occupants.findOccupant({nick:i}):this.occupants.findOccupant({jid:n}))===(r===this.get("jid")?this.occupants.findOccupant({nick:o}):this.occupants.findOccupant({jid:r}))},async isSubjectHidden(){return(await Vc.user.settings.get("mucs_with_hidden_subject",[])).includes(this.get("jid"))},async toggleSubjectHiddenState(){const e=this.get("jid"),t=await Vc.user.settings.get("mucs_with_hidden_subject",[]);t.includes(this.get("jid"))?Vc.user.settings.set("mucs_with_hidden_subject",t.filter(t=>t!==e)):Vc.user.settings.set("mucs_with_hidden_subject",[...t,e])},async handleSubjectChange(e){const t=Uc.__;if("string"==typeof e.subject&&!e.thread&&!e.message){const n=e.subject,r=e.nick;if(Kl.safeSave(this,{subject:{author:r,text:e.subject||""}}),!e.is_delayed&&r){const i=t(n?"Topic set by %1$s":"Topic cleared by %1$s",r),o=this.messages.last();(null==o?void 0:o.get("nick"))===e.nick&&"info"===(null==o?void 0:o.get("type"))&&(null==o?void 0:o.get("message"))===i||this.createMessage({message:i,nick:e.nick,type:"info"}),await this.isSubjectHidden()&&this.toggleSubjectHiddenState()}return!0}return!1},setSubject(e=""){Vc.send(Object(kc.c)({to:this.get("jid"),from:Uc.connection.jid,type:"groupchat"}).c("subject",{xmlns:"jabber:client"}).t(e).tree())},ignorableCSN(e){return e.chat_state&&!e.body&&(e.is_delayed||this.isOwnMessage(e))},isOwnMessage(e){let t;return t=Dn(e)?e.getAttribute("from"):e instanceof Uc.Message?e.get("from"):e.from,kc.e.getResourceFromJid(t)==this.get("nick")},getUpdatedMessageAttributes(e,t){const n=Uc.ChatBox.prototype.getUpdatedMessageAttributes.call(this,e,t);if(this.isOwnMessage(t)){const r=Object.keys(t).filter(e=>e.startsWith("stanza_id"));Object.assign(n,Bo(t,r)),e.get("received")||(n.received=(new Date).toISOString())}return n},async isJoined(){const e=this.get("jid"),t=Object(kc.b)({to:"".concat(e,"/").concat(this.get("nick")),type:"get"}).c("ping",{xmlns:kc.e.NS.PING});try{await Vc.sendIQ(t)}catch(t){return null===t?zn.warn("isJoined: Timeout error while checking whether we're joined to MUC: ".concat(e)):zn.warn("isJoined: Apparently we're no longer connected to MUC: ".concat(e)),!1}return!0},async rejoinIfNecessary(){if(!await this.isJoined())return this.rejoin(),!0},async shouldShowErrorMessage(e){return("not-acceptable"!==e.error_condition||!await this.rejoinIfNecessary())&&Uc.ChatBox.prototype.shouldShowErrorMessage.call(this,e)},findDanglingModeration(e){if(!this.messages.length)return null;if(this.messages.last().get("time")>e.time){const t=Array.from(this.messages.models),n=e["stanza_id ".concat(this.get("jid"))];return n?(t.reverse(),t.find(({attributes:e})=>"retracted"===e.moderated&&e.moderated_id===n&&e.moderated_by)):null}},async handleModeration(e){const t=["editable","moderated","moderated_by","moderated_id","moderation_reason"];if("retracted"===e.moderated){const n={};n["stanza_id ".concat(this.get("jid"))]=e.moderated_id;const r=this.messages.findWhere(n);return r?(r.save(Bo(e,t)),!0):(e.dangling_moderation=!0,await this.createMessage(e),!0)}{const n=this.findDanglingModeration(e);if(n){const r=Bo(n.attributes,t),i=Object.assign({dangling_moderation:!1},e,r);return delete i.id,n.save(i),!0}}return!1},removeNotification(e,t){const n=this.notifications.toJSON();(t=Array.isArray(t)?t:[t]).forEach(t=>{const r=Array.from(n[t]||[]);if(r.includes(e)){const n=r.indexOf(e);r.splice(n,1),this.notifications.set(t,Array.from(r))}})},updateNotifications(e,t){const n=this.notifications.toJSON(),r=n[t]||[];if(r.includes(e))return;const i=(i,o)=>(i[o]=o===t?[...r,e]:(n[o]||[]).filter(t=>t!==e),i),o=rl.CHAT_STATES.reduce(i,{}),s=rl.MUC_TRAFFIC_STATES_LIST.reduce(i,{}),a=rl.MUC_ROLE_CHANGES_LIST.reduce(i,{});this.notifications.set(Object.assign(o,s,a)),window.setTimeout(()=>this.removeNotification(e,t),1e4)},async onMessage(e){if(e=await e,Kl.isErrorObject(e))return e.stanza&&zn.error(e.stanza),zn.error(e.message);const t=this.getDuplicateMessage(e);if(t)return this.updateMessage(t,e);if(!(e.is_valid_receipt_request||e.is_marker||this.ignorableCSN(e))){if(await this.handleRetraction(e)||await this.handleModeration(e)||await this.handleSubjectChange(e))return this.removeNotification(e.nick,["composing","paused"]);if(this.setEditable(e,e.time),e.chat_state&&this.updateNotifications(e.nick,e.chat_state),Kl.shouldCreateGroupchatMessage(e)){const t=this.handleCorrection(e)||await this.createMessage(e);this.removeNotification(e.nick,["composing","paused"]),this.handleUnreadMessage(t)}}},handleModifyError(e){var t;const n=null===(t=e.querySelector("error text"))||void 0===t?void 0:t.textContent;if(n)if(this.session.get("connection_status")===rl.ROOMSTATUS.CONNECTING)this.setDisconnectionMessage(n);else{const e={type:"error",message:n,is_ephemeral:!0};this.createMessage(e)}},handleDisconnection(e){var t;const n=null!==e.querySelector("status[code='110']"),r=mr()('x[xmlns="'.concat(kc.e.NS.MUC_USER,'"]'),e).pop();if(!r)return;const i=mr()("status",r).map(e=>e.getAttribute("code")),o=iu(i,Object.keys(Uc.muc.disconnect_messages));if(!(n&&o.length>0))return;const s=r.querySelector("item"),a=s?null===(t=s.querySelector("reason"))||void 0===t?void 0:t.textContent:void 0,c=s?Pc(s.querySelector("actor"),"getAttribute","nick"):void 0,l=Uc.muc.disconnect_messages[o[0]];this.setDisconnectionMessage(l,a,c)},getActionInfoMessage(e,t,n){const r=Uc.__;return"301"===e?n?r("%1$s has been banned by %2$s",t,n):r("%1$s has been banned",t):"303"===e?r("%1$s's nickname has changed",t):"307"===e?n?r("%1$s has been kicked out by %2$s",t,n):r("%1$s has been kicked out",t):"321"===e?r("%1$s has been removed because of an affiliation change",t):"322"===e?r("%1$s has been removed for not being a member",t):void 0},createAffiliationChangeMessage(e){const t=Uc.__,n=e._previousAttributes.affiliation;if(!n)return;const r=e.get("affiliation");"admin"===n&&Uc.isInfoVisible(rl.AFFILIATION_CHANGES.EXADMIN)?this.createMessage({type:"info",message:t("%1$s is no longer an admin of this groupchat",e.get("nick"))}):"owner"===n&&Uc.isInfoVisible(rl.AFFILIATION_CHANGES.EXOWNER)?this.createMessage({type:"info",message:t("%1$s is no longer an owner of this groupchat",e.get("nick"))}):"outcast"===n&&Uc.isInfoVisible(rl.AFFILIATION_CHANGES.EXOUTCAST)&&this.createMessage({type:"info",message:t("%1$s is no longer banned from this groupchat",e.get("nick"))}),"none"===r&&"member"===n&&Uc.isInfoVisible(rl.AFFILIATION_CHANGES.EXMEMBER)&&this.createMessage({type:"info",message:t("%1$s is no longer a member of this groupchat",e.get("nick"))}),"member"===r&&Uc.isInfoVisible(rl.AFFILIATION_CHANGES.MEMBER)?this.createMessage({type:"info",message:t("%1$s is now a member of this groupchat",e.get("nick"))}):("admin"===r&&Uc.isInfoVisible(rl.AFFILIATION_CHANGES.ADMIN)||"owner"==r&&Uc.isInfoVisible(rl.AFFILIATION_CHANGES.OWNER))&&this.createMessage({type:"info",message:t("%1$s is now an %2$s of this groupchat",e.get("nick"),r)})},createRoleChangeMessage(e,t){if("none"===t||e.changed.affiliation)return;const n=e._previousAttributes.role;"moderator"===n&&Uc.isInfoVisible(rl.MUC_ROLE_CHANGES.DEOP)?this.updateNotifications(e.get("nick"),rl.MUC_ROLE_CHANGES.DEOP):"visitor"===n&&Uc.isInfoVisible(rl.MUC_ROLE_CHANGES.VOICE)&&this.updateNotifications(e.get("nick"),rl.MUC_ROLE_CHANGES.VOICE),"visitor"===e.get("role")&&Uc.isInfoVisible(rl.MUC_ROLE_CHANGES.MUTE)?this.updateNotifications(e.get("nick"),rl.MUC_ROLE_CHANGES.MUTE):"moderator"===e.get("role")&&!["owner","admin"].includes(e.get("affiliation"))&&Uc.isInfoVisible(rl.MUC_ROLE_CHANGES.OP)&&this.updateNotifications(e.get("nick"),rl.MUC_ROLE_CHANGES.OP)},createInfoMessage(e,t,n){const r=Uc.__,i={type:"info"};if(Uc.isInfoVisible(e)&&"110"!==e&&("100"!==e||n)){if(e in Uc.muc.info_messages)i.message=Uc.muc.info_messages[e];else if(!n&&ou.includes(e)){var o,s;const n=kc.e.getResourceFromJid(t.getAttribute("from")),r=t.querySelector('x[xmlns="'.concat(kc.e.NS.MUC_USER,'"] item'));i.actor=r?null===(o=r.querySelector("actor"))||void 0===o?void 0:o.getAttribute("nick"):void 0,i.reason=r?null===(s=r.querySelector("reason"))||void 0===s?void 0:s.textContent:void 0,i.message=this.getActionInfoMessage(e,n,i.actor)}else if(n&&e in Uc.muc.new_nickname_messages){let o;n&&"210"===e?o=kc.e.getResourceFromJid(t.getAttribute("from")):n&&"303"===e&&(o=t.querySelector('x[xmlns="'.concat(kc.e.NS.MUC_USER,'"] item')).getAttribute("nick")),this.save("nick",o),i.message=r(Uc.muc.new_nickname_messages[e],o)}if(i.message){if("201"===e&&this.messages.findWhere(i))return;if(e in Uc.muc.info_messages&&this.messages.length&&this.messages.pop().get("message")===i.message)return;this.createMessage(i)}}},createInfoMessages(e){const t=mr()('x[xmlns="'.concat(kc.e.NS.MUC_USER,'"] status'),e).map(e=>e.getAttribute("code"));t.includes("333")&&t.includes("307")&&t.splice(t.indexOf("307"),1);const n=t.includes("110");t.forEach(t=>this.createInfoMessage(t,e,n))},setDisconnectionMessage(e,t,n){this.save({disconnection_message:e,disconnection_reason:t,disconnection_actor:n}),this.session.save({connection_status:rl.ROOMSTATUS.DISCONNECTED})},onNicknameClash(e){const t=Uc.__;if(Vc.settings.get("muc_nickname_from_jid")){const t=e.getAttribute("from").split("/")[1];if(t===Uc.getDefaultMUCNickname())this.join(t+"-2");else{const e=t.lastIndexOf("-"),n=t.substring(e+1,t.length);this.join(t.substring(0,e+1)+String(Number(n)+1))}}else this.save({nickname_validation_message:t("The nickname you chose is reserved or currently in use, please choose a different one.")}),this.session.save({connection_status:rl.ROOMSTATUS.NICKNAME_REQUIRED})},onErrorPresence(e){var t;const n=Uc.__,r=e.querySelector("error"),i=r.getAttribute("type"),o=null===(t=mr()('text[xmlns="'.concat(kc.e.NS.STANZAS,'"]'),r).pop())||void 0===t?void 0:t.textContent;if("modify"===i)this.handleModifyError(e);else if("auth"===i){if(mr()('not-authorized[xmlns="'.concat(kc.e.NS.STANZAS,'"]'),r).length&&(this.save({password_validation_message:o||n("Password incorrect")}),this.session.save({connection_status:rl.ROOMSTATUS.PASSWORD_REQUIRED})),r.querySelector("registration-required")){const e=n("You are not on the member list of this groupchat.");this.setDisconnectionMessage(e,o)}else if(r.querySelector("forbidden")){const e=n("You have been banned from this groupchat.");this.setDisconnectionMessage(e,o)}}else if("cancel"===i)if(r.querySelector("not-allowed")){const e=n("You are not allowed to create new groupchats.");this.setDisconnectionMessage(e,o)}else if(r.querySelector("not-acceptable")){const e=n("Your nickname doesn't conform to this groupchat's policies.");this.setDisconnectionMessage(e,o)}else if(mr()('gone[xmlns="'.concat(kc.e.NS.STANZAS,'"]'),r).length){var s;const e=null===(s=mr()('gone[xmlns="'.concat(kc.e.NS.STANZAS,'"]'),r).pop())||void 0===s?void 0:s.textContent.replace(/^xmpp:/,"").replace(/\?join$/,"");this.save({moved_jid:e,destroyed_reason:o}),this.session.save({connection_status:rl.ROOMSTATUS.DESTROYED})}else if(r.querySelector("conflict"))this.onNicknameClash(e);else if(r.querySelector("item-not-found")){const e=n("This groupchat does not (yet) exist.");this.setDisconnectionMessage(e,o)}else if(r.querySelector("service-unavailable")){const e=n("This groupchat has reached its maximum number of participants.");this.setDisconnectionMessage(e,o)}else if(r.querySelector("remote-server-not-found")){const e=n("Remote server not found"),t=o?n('The explanation given is: "%1$s".',o):void 0;this.setDisconnectionMessage(e,t)}},onPresence(e){if("error"===e.getAttribute("type"))return this.onErrorPresence(e);this.createInfoMessages(e),e.querySelector("status[code='110']")?(this.onOwnPresence(e),"none"!==this.getOwnRole()&&this.session.get("connection_status")===rl.ROOMSTATUS.CONNECTING&&this.session.save("connection_status",rl.ROOMSTATUS.CONNECTED)):this.updateOccupantsOnPresence(e)},onOwnPresence(e){if("unavailable"!==e.getAttribute("type")){const t=this.session.get("connection_status");t!==rl.ROOMSTATUS.ENTERED?(this.session.save("connection_status",rl.ROOMSTATUS.ENTERED,{silent:!0}),this.updateOccupantsOnPresence(e),this.session.trigger("change:connection_status",this.session,t)):this.updateOccupantsOnPresence(e)}else this.updateOccupantsOnPresence(e);if("unavailable"===e.getAttribute("type"))this.handleDisconnection(e);else{if(e.querySelector("status[code='201']"))if(this.get("auto_configure"))this.autoConfigureChatRoom().then(()=>this.refreshDiscoInfo());else{if(!Vc.settings.get("muc_instant_rooms"))return void this.trigger("configurationNeeded");this.sendConfiguration().then(()=>this.refreshDiscoInfo())}else this.features.get("fetched")||("owner"===this.getOwnAffiliation()&&this.get("auto_configure")?this.autoConfigureChatRoom().then(()=>this.refreshDiscoInfo()):this.getDiscoInfo())}this.session.save({connection_status:rl.ROOMSTATUS.ENTERED})},isUserMentioned(e){const t=this.get("nick");if(e.get("references").length){return e.get("references").filter(e=>"mention"===e.type).map(e=>e.value).includes(t)}return new RegExp("\\b".concat(t,"\\b")).test(e.get("message"))},handleUnreadMessage(e){if((null==e?void 0:e.get("body"))&&Kl.isNewMessage(e))if(this.isHidden()){const t={num_unread_general:this.get("num_unread_general")+1};0===this.get("num_unread_general")&&(t.first_unread_id=e.get("id")),this.isUserMentioned(e)&&(t.num_unread=this.get("num_unread")+1),this.save(t)}else this.sendMarkerForMessage(e)},clearUnreadMsgCounter(){(this.get("num_unread_general")>0||this.get("num_unread")>0)&&this.sendMarkerForMessage(this.messages.last()),Kl.safeSave(this,{num_unread:0,num_unread_general:0})}};var cu=qo.extend({defaults:{hats:[],show:"offline",states:[]},initialize(e){this.set(Object.assign({id:Kl.getUniqueId()},e)),this.on("change:image_hash",this.onAvatarChanged,this)},onAvatarChanged(){const e=this.get("image_hash"),t=[];this.get("jid")&&t.push(Uc.vcards.findWhere({jid:this.get("jid")})),t.push(Uc.vcards.findWhere({jid:this.get("from")})),t.filter(e=>e).forEach(t=>{e&&t.get("image_hash")!==e&&Vc.vcard.update(t,!0)})},getDisplayName(){return this.get("nick")||this.get("jid")},isMember(){return["admin","owner","member"].includes(this.get("affiliation"))},isModerator(){return["admin","owner"].includes(this.get("affiliation"))||"moderator"===this.get("role")},isSelf(){return this.get("states").includes("110")}});const lu={moderator:1,participant:2,visitor:3,none:2};var uu=ra.extend({model:cu,comparator(e,t){const n=e.get("role")||"none",r=t.get("role")||"none";if(lu[n]===lu[r]){const n=e.getDisplayName().toLowerCase(),r=t.getDisplayName().toLowerCase();return n<r?-1:n>r?1:0}return lu[n]<lu[r]?-1:1},getAutoFetchedAffiliationLists(){const e=Vc.settings.get("muc_fetch_members");return Array.isArray(e)?e:e?["member","admin","owner"]:[]},async fetchMembers(){const e=this.getAutoFetchedAffiliationLists();if(0===e.length)return;const t=await Promise.all(e.map(e=>this.chatroom.getAffiliationList(e))),n=t.reduce((e,t)=>Kl.isErrorObject(t)?e:[...t,...e],[]),r=e.filter(n=>!Kl.isErrorObject(t[e.indexOf(n)])),i=n.map(e=>e.jid).filter(e=>void 0!==e),o=n.map(e=>!e.jid&&e.nick||void 0).filter(e=>void 0!==e);this.filter(e=>r.includes(e.get("affiliation"))&&!o.includes(e.get("nick"))&&!i.includes(e.get("jid"))).forEach(e=>{e.get("jid")!==Uc.bare_jid&&("offline"===e.get("show")?e.destroy():e.save("affiliation",null))}),n.forEach(e=>{const t=e.jid?this.findOccupant({jid:e.jid}):this.findOccupant({nick:e.nick});t?t.save(e):this.create(e)}),Vc.trigger("membersFetched")},findOccupant(e){const t=kc.e.getBareJidFromJid(e.jid);return t&&this.findWhere({jid:t})||this.findWhere({nick:e.nick})}}),du={rooms:{create(e,t={}){if(!(t="string"==typeof t?{nick:t}:t||{}).nick&&Vc.settings.get("muc_nickname_from_jid")&&(t.nick=kc.e.getNodeFromJid(Uc.bare_jid)),void 0===e)throw new TypeError("rooms.create: You need to provide at least one JID");return"string"==typeof e?Vc.rooms.get(Kl.getJIDFromURI(e),t,!0):e.map(e=>Vc.rooms.get(Kl.getJIDFromURI(e),t,!0))},async open(e,t={},n=!1){if(await Vc.waitUntil("chatBoxesFetched"),void 0===e){const e="rooms.open: You need to provide at least one JID";throw zn.error(e),new TypeError(e)}if("string"==typeof e){const r=await Vc.rooms.get(e,t,!0);return r&&r.maybeShow(n),r}{const r=await Promise.all(e.map(e=>Vc.rooms.get(e,t,!0)));return r.forEach(e=>e.maybeShow(n)),r}},async get(e,t={},n=!1){async function r(e){e=Kl.getJIDFromURI(e);let r=await Vc.chatboxes.get(e);return!r&&n?r=await Vc.chatboxes.create(e,t,Uc.ChatRoom):(r=r&&r.get("type")===Uc.CHATROOMS_TYPE?r:null,r&&Object.keys(t).length&&r.save(t)),r}if(void 0===e){return(await Vc.chatboxes.get()).filter(e=>e.get("type")===Uc.CHATROOMS_TYPE)}return"string"==typeof e?r(e):Promise.all(e.map(e=>r(e)))}}};
-/**
- * @module converse-muc
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description Implements the non-view logic for XEP-0045 Multi-User Chat
- */
-const hu=["moderator","participant","visitor"],fu=["owner","admin","member","outcast","none"];rl.AFFILIATION_CHANGES={OWNER:"owner",ADMIN:"admin",MEMBER:"member",EXADMIN:"exadmin",EXOWNER:"exowner",EXOUTCAST:"exoutcast",EXMEMBER:"exmember"},rl.AFFILIATION_CHANGES_LIST=Object.values(rl.AFFILIATION_CHANGES),rl.MUC_TRAFFIC_STATES={ENTERED:"entered",EXITED:"exited"},rl.MUC_TRAFFIC_STATES_LIST=Object.values(rl.MUC_TRAFFIC_STATES),rl.MUC_ROLE_CHANGES={OP:"op",DEOP:"deop",VOICE:"voice",MUTE:"mute"},rl.MUC_ROLE_CHANGES_LIST=Object.values(rl.MUC_ROLE_CHANGES),rl.MUC_INFO_CODES={visibility_changes:["100","102","103","172","173","174"],self:["110"],non_privacy_changes:["104","201"],muc_logging_changes:["170","171"],nickname_changes:["210","303"],disconnect_messages:["301","307","321","322","332","333"],affiliation_changes:[...rl.AFFILIATION_CHANGES_LIST],join_leave_events:[...rl.MUC_TRAFFIC_STATES_LIST],role_changes:[...rl.MUC_ROLE_CHANGES_LIST]};const{Strophe:pu,sizzle:gu}=rl.env;function mu(){return Uc.chatboxes.filter(e=>e.get("type")===Uc.CHATROOMS_TYPE).forEach(e=>e.session.save({connection_status:rl.ROOMSTATUS.DISCONNECTED}))}async function vu(e){if("visible"===e.state&&Vc.connection.connected()){(await Vc.rooms.get()).forEach(e=>e.rejoinIfNecessary())}}async function _u(e){if(!Kl.isValidMUCJID(e))return zn.warn('invalid jid "'.concat(e,'" provided in url fragment'));await Vc.waitUntil("roomsAutoJoined"),Vc.settings.get("allow_bookmarks")&&await Vc.waitUntil("bookmarksInitialized"),Vc.rooms.open(e)}async function bu(){await Promise.all(Vc.settings.get("auto_join_rooms").map(e=>"string"==typeof e?Uc.chatboxes.where({jid:e}).length?Promise.resolve():Vc.rooms.open(e):N(e)?Vc.rooms.open(e.jid,{...e}):(zn.error('Invalid muc criteria specified for "auto_join_rooms"'),Promise.resolve()))),Vc.trigger("roomsAutoJoined")}pu.addNamespace("MUC_ADMIN",pu.NS.MUC+"#admin"),pu.addNamespace("MUC_OWNER",pu.NS.MUC+"#owner"),pu.addNamespace("MUC_REGISTER","jabber:iq:register"),pu.addNamespace("MUC_ROOMCONF",pu.NS.MUC+"#roomconfig"),pu.addNamespace("MUC_USER",pu.NS.MUC+"#user"),pu.addNamespace("MUC_HATS","xmpp:prosody.im/protocol/hats:1"),rl.MUC_NICK_CHANGED_CODE="303",rl.ROOM_FEATURES=["passwordprotected","unsecured","hidden","publicroom","membersonly","open","persistent","temporary","nonanonymous","semianonymous","moderated","unmoderated","mam_enabled"],rl.ROOMSTATUS={CONNECTED:0,CONNECTING:1,NICKNAME_REQUIRED:2,PASSWORD_REQUIRED:3,DISCONNECTED:4,ENTERED:5,DESTROYED:6},rl.plugins.add("converse-muc",{dependencies:["converse-chatboxes","converse-chat","converse-disco","converse-controlbox"],overrides:{ChatBoxes:{model(e,t){const{_converse:n}=this.__super__;return e&&e.type==n.CHATROOMS_TYPE?new n.ChatRoom(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){const{__:e,___:t}=Uc;if(Vc.settings.extend({allow_muc:!0,allow_muc_invitations:!0,auto_join_on_invite:!1,auto_join_rooms:[],auto_register_muc_nickname:!1,hide_muc_participants:!1,locked_muc_domain:!1,muc_domain:void 0,muc_fetch_members:!0,muc_history_max_stanzas:void 0,muc_instant_rooms:!0,muc_nickname_from_jid:!1,muc_send_probes:!1,muc_show_info_messages:[...rl.MUC_INFO_CODES.visibility_changes,...rl.MUC_INFO_CODES.self,...rl.MUC_INFO_CODES.non_privacy_changes,...rl.MUC_INFO_CODES.muc_logging_changes,...rl.MUC_INFO_CODES.nickname_changes,...rl.MUC_INFO_CODES.disconnect_messages,...rl.MUC_INFO_CODES.affiliation_changes,...rl.MUC_INFO_CODES.join_leave_events,...rl.MUC_INFO_CODES.role_changes],muc_show_logs_before_join:!1}),Vc.promises.add(["roomsAutoJoined"]),Vc.settings.get("locked_muc_domain")&&"string"!=typeof Vc.settings.get("muc_domain"))throw new Error("Config Error: it makes no sense to set locked_muc_domain to true when muc_domain is not set");if(rl.env.muc_utils=Vl,Object.assign(Vc,du),Uc.muc={info_messages:{100:e("This groupchat is not anonymous"),102:e("This groupchat now shows unavailable members"),103:e("This groupchat does not show unavailable members"),104:e("The groupchat configuration has changed"),170:e("Groupchat logging is now enabled"),171:e("Groupchat logging is now disabled"),172:e("This groupchat is now no longer anonymous"),173:e("This groupchat is now semi-anonymous"),174:e("This groupchat is now fully-anonymous"),201:e("A new groupchat has been created")},new_nickname_messages:{210:t("Your nickname has been automatically set to %1$s"),303:t("Your nickname has been changed to %1$s")},disconnect_messages:{301:e("You have been banned from this groupchat"),333:e("You have exited this groupchat due to a technical problem"),307:e("You have been kicked from this groupchat"),321:e("You have been removed from this groupchat because of an affiliation change"),322:e("You have been removed from this groupchat because the groupchat has changed to members-only and you're not a member"),332:e("You have been removed from this groupchat because the service hosting it is being shut down")}},Uc.isInfoVisible=function(e){return!!Vc.settings.get("muc_show_info_messages").includes(e)},Uc.router.route("converse/room?jid=:jid",_u),Uc.ChatRoom=Uc.ChatBox.extend(au),Uc.ChatRoomMessage=Uc.Message.extend($l),Uc.ChatRoomOccupants=uu,Uc.ChatRoomOccupant=cu,Uc.getDefaultMUCNickname=function(){if(!Uc.xmppstatus)throw new Error("Can't call _converse.getDefaultMUCNickname before the statusInitialized has been fired.");const e=Uc.xmppstatus.getNickname();return e||(Vc.settings.get("muc_nickname_from_jid")?pu.unescapeNode(pu.getNodeFromJid(Uc.bare_jid)):void 0)},Uc.ChatRoomMessages=ra.extend({model:Uc.ChatRoomMessage,comparator:"time"}),Uc.RoomsPanelModel=qo.extend({defaults:function(){return{muc_domain:Vc.settings.get("muc_domain"),nick:Uc.getDefaultMUCNickname()}},setDomain(e){Vc.settings.get("locked_muc_domain")||this.save("muc_domain",pu.getDomainFromJid(e))}}),Uc.onDirectMUCInvitation=async function(t){const n=gu('x[xmlns="jabber:x:conference"]',t).pop(),r=pu.getBareJidFromJid(t.getAttribute("from")),i=n.getAttribute("jid"),o=n.getAttribute("reason");let s;if(Vc.settings.get("auto_join_on_invite"))s=!0;else{let t=Uc.roster.get(r);t=t?t.getDisplayName():r,s=o?confirm(e('%1$s has invited you to join a groupchat: %2$s, and left the following reason: "%3$s"',t,i,o)):confirm(e("%1$s has invited you to join a groupchat: %2$s",t,i))}if(!0===s){(await async function(e,t){t.type=Uc.CHATROOMS_TYPE,t.id=e;const n=await Vc.rooms.get(e,t,!0);return n.maybeShow(!0),n}(i,{password:n.getAttribute("password")})).session.get("connection_status")===rl.ROOMSTATUS.DISCONNECTED&&Uc.chatboxes.get(i).rejoin()}},Vc.settings.get("allow_muc_invitations")){const e=function(){Uc.connection.addHandler(e=>(Uc.onDirectMUCInvitation(e),!0),"jabber:x:conference","message")};Vc.listen.on("connected",e),Vc.listen.on("reconnected",e)}Vc.listen.on("beforeTearDown",()=>{Uc.chatboxes.where({type:Uc.CHATROOMS_TYPE}).forEach(e=>Kl.safeSave(e.session,{connection_status:rl.ROOMSTATUS.DISCONNECTED}))}),Vc.listen.on("windowStateChanged",vu),Vc.listen.on("addClientFeatures",()=>{Vc.settings.get("allow_muc")&&Vc.disco.own.features.add(pu.NS.MUC),Vc.settings.get("allow_muc_invitations")&&Vc.disco.own.features.add("jabber:x:conference")}),Vc.listen.on("chatBoxesFetched",bu),Vc.listen.on("beforeResourceBinding",()=>{Uc.connection.addHandler(e=>{const t=pu.getBareJidFromJid(e.getAttribute("from"));return Uc.chatboxes.get(t)||Vc.waitUntil("chatBoxesFetched").then(async()=>{const n=Uc.chatboxes.get(t);n&&(await n.initialized,n.message_handler.run(e))}),!0},null,"message","groupchat")}),Vc.listen.on("disconnected",mu),Vc.listen.on("statusInitialized",()=>{window.addEventListener(Uc.unloadevent,()=>{!Vc.connection.isType("websocket")||Vc.settings.get("enable_smacks")&&Uc.session.get("smacks_stream_id")||mu()})})}});
-/**
- * @module converse-bookmarks
- * @description
- * Converse.js plugin which adds views for bookmarks specified in XEP-0048.
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:yu,$iq:wu,sizzle:Su}=rl.env,xu=rl.env.utils;function Eu(e){return Su('event[xmlns="'.concat(yu.NS.PUBSUB,'#event"] items[node="').concat(yu.NS.BOOKMARKS,'"]'),e).length&&Vc.waitUntil("bookmarksInitialized").then(()=>Uc.bookmarks.createBookmarksFromStanza(e)).catch(e=>zn.fatal(e)),!0}yu.addNamespace("BOOKMARKS","storage:bookmarks"),rl.plugins.add("converse-bookmarks",{dependencies:["converse-chatboxes","converse-muc"],overrides:{ChatRoom:{getDisplayName(){const{_converse:e}=this.__super__;if(this.get("bookmarked")&&e.bookmarks){const t=e.bookmarks.findWhere({jid:this.get("jid")});if(t)return t.get("name")}return this.__super__.getDisplayName.apply(this,arguments)},getAndPersistNickname(e){const{_converse:t}=this.__super__;return e=e||t.getNicknameFromBookmark(this.get("jid")),this.__super__.getAndPersistNickname.call(this,e)}}},initialize(){const{__:e}=Uc;Vc.settings.extend({allow_bookmarks:!0,allow_public_bookmarks:!1,muc_respect_autojoin:!0}),Vc.promises.add("bookmarksInitialized"),Uc.getNicknameFromBookmark=function(e){if(!Uc.bookmarks||!Vc.settings.get("allow_bookmarks"))return null;const t=Uc.bookmarks.findWhere({jid:e});return t?t.get("nick"):void 0},Uc.Bookmark=qo.extend({idAttribute:"jid",getDisplayName(){return yu.xmlunescape(this.get("name"))}}),Uc.Bookmarks=ra.extend({model:Uc.Bookmark,comparator:e=>e.get("name").toLowerCase(),initialize(){this.on("add",e=>this.openBookmarkedRoom(e).then(e=>this.markRoomAsBookmarked(e)).catch(e=>zn.fatal(e))),this.on("remove",this.markRoomAsUnbookmarked,this),this.on("remove",this.sendBookmarkStanza,this);const e="converse.room-bookmarks".concat(Uc.bare_jid);this.fetched_flag=e+"fetched",this.browserStorage=Uc.createStore(e)},async openBookmarkedRoom(e){if(Vc.settings.get("muc_respect_autojoin")&&e.get("autojoin")){(await Vc.rooms.create(e.get("jid"),{nick:e.get("nick")})).maybeShow()}return e},fetchBookmarks(){const e=xu.getResolveablePromise();return window.sessionStorage.getItem(this.fetched_flag)?this.fetch({success:()=>e.resolve(),error:()=>e.resolve()}):this.fetchBookmarksFromServer(e),e},createBookmark(e){this.create(e),this.sendBookmarkStanza().catch(t=>this.onBookmarkError(t,e))},sendBookmarkStanza(){const e=wu({type:"set",from:Uc.connection.jid}).c("pubsub",{xmlns:yu.NS.PUBSUB}).c("publish",{node:yu.NS.BOOKMARKS}).c("item",{id:"current"}).c("storage",{xmlns:yu.NS.BOOKMARKS});return this.forEach(t=>{e.c("conference",{name:t.get("name"),autojoin:t.get("autojoin"),jid:t.get("jid")}).c("nick").t(t.get("nick")).up().up()}),e.up().up().up(),e.c("publish-options").c("x",{xmlns:yu.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t("http://jabber.org/protocol/pubsub#publish-options").up().up().c("field",{var:"pubsub#persist_items"}).c("value").t("true").up().up().c("field",{var:"pubsub#access_model"}).c("value").t("whitelist"),Vc.sendIQ(e)},onBookmarkError(t,n){zn.error("Error while trying to add bookmark"),zn.error(t),Vc.alert("error",e("Error"),[e("Sorry, something went wrong while trying to save your bookmark.")]),this.findWhere({jid:n.jid}).destroy()},fetchBookmarksFromServer(e){const t=wu({from:Uc.connection.jid,type:"get"}).c("pubsub",{xmlns:yu.NS.PUBSUB}).c("items",{node:yu.NS.BOOKMARKS});Vc.sendIQ(t).then(t=>this.onBookmarksReceived(e,t)).catch(t=>this.onBookmarksReceivedError(e,t))},markRoomAsBookmarked(e){const t=Uc.chatboxes.get(e.get("jid"));void 0!==t&&t.save("bookmarked",!0)},markRoomAsUnbookmarked(e){const t=Uc.chatboxes.get(e.get("jid"));void 0!==t&&t.save("bookmarked",!1)},createBookmarksFromStanza(e){const t=yu.NS.BOOKMARKS,n='items[node="'.concat(t,'"] item storage[xmlns="').concat(t,'"] conference');Su(n,e).forEach(e=>{var t;const n=e.getAttribute("jid"),r=this.get(n),i={jid:n,name:e.getAttribute("name")||n,autojoin:"true"===e.getAttribute("autojoin"),nick:(null===(t=e.querySelector("nick"))||void 0===t?void 0:t.textContent)||""};r?r.save(i):this.create(i)})},onBookmarksReceived(e,t){if(this.createBookmarksFromStanza(t),window.sessionStorage.setItem(this.fetched_flag,!0),void 0!==e)return e.resolve()},onBookmarksReceivedError(t,n){if(null===n)zn.error("Error: timeout while fetching bookmarks"),Vc.alert("error",e("Timeout Error"),[e("The server did not return your bookmarks within the allowed time. You can reload the page to request them again.")]);else{if(t)return n.querySelector('error[type="cancel"] item-not-found')?(window.sessionStorage.setItem(this.fetched_flag,!0),t.resolve()):(zn.error("Error while fetching bookmarks"),zn.error(n),t.reject(new Error("Could not fetch bookmarks")));zn.error("Error while fetching bookmarks"),zn.error(n)}},getUnopenedBookmarks(){return this.filter(e=>!Uc.chatboxes.get(e.get("jid")))}}),Uc.BookmarksList=qo.extend({defaults:{"toggle-state":Uc.OPENED}}),Uc.checkBookmarksSupport=async function(){const e=await Vc.disco.getIdentity("pubsub","pep",Uc.bare_jid);return Uc.allow_public_bookmarks?!!e:Vc.disco.supports(yu.NS.PUBSUB+"#publish-options",Uc.bare_jid)};const t=async function(){Vc.settings.get("allow_bookmarks")&&await Uc.checkBookmarksSupport()&&(Uc.bookmarks=new Uc.Bookmarks,await Uc.bookmarks.fetchBookmarks(),Vc.trigger("bookmarksInitialized"))};Vc.listen.on("addClientFeatures",()=>{Vc.settings.get("allow_bookmarks")&&Vc.disco.own.features.add(yu.NS.BOOKMARKS+"+notify")}),Vc.listen.on("clearSession",()=>{void 0!==Uc.bookmarks&&(Uc.bookmarks.clearStore({silent:!0}),window.sessionStorage.removeItem(Uc.bookmarks.fetched_flag),delete Uc.bookmarks)}),Vc.listen.on("reconnected",t),Vc.listen.on("connected",async()=>{const{connection:e}=Uc;e.addHandler(Eu,null,"message","headline",null,Uc.bare_jid),await Promise.all([Vc.waitUntil("chatBoxesFetched")]),t()})}});n(154);
-/**
- * @module converse-bosh
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description Converse.js plugin which add support for XEP-0206: XMPP Over BOSH
- */const{Strophe:Au}=rl.env;rl.plugins.add("converse-bosh",{enabled:()=>!Uc.api.settings.get("blacklisted_plugins").includes("converse-bosh"),initialize(){Vc.settings.extend({bosh_service_url:void 0,prebind_url:null}),Uc.startNewPreboundBOSHSession=function(){if(!Vc.settings.get("prebind_url"))throw new Error("startNewPreboundBOSHSession: If you use prebind then you MUST supply a prebind_url");const e=new XMLHttpRequest;e.open("GET",Vc.settings.get("prebind_url"),!0),e.setRequestHeader("Accept","application/json, text/javascript"),e.onload=async function(){if(e.status>=200&&e.status<400){const t=JSON.parse(e.responseText),n=await Uc.setUserJID(t.jid);Uc.connection.attach(n,t.sid,t.rid,Uc.connection.onConnectStatusChanged)}else e.onerror()},e.onerror=function(){delete Uc.connection,Vc.trigger("noResumeableBOSHSession",Uc)},e.send()},Uc.restoreBOSHSession=async function(){const e=(await async function(){const e="converse.bosh-session";if(Uc.bosh_session||(Uc.bosh_session=new qo({id:e}),Uc.bosh_session.browserStorage=Uc.createStore(e,"session"),await new Promise(e=>Uc.bosh_session.fetch({success:e,error:e}))),Uc.jid){if(Uc.bosh_session.get("jid")!==Uc.jid){const e=await Uc.setUserJID(Uc.jid);Uc.bosh_session.clear({silent:!0}),Uc.bosh_session.save({jid:e})}}else{const e=Uc.bosh_session.get("jid");e&&await Uc.setUserJID(e)}return Uc.bosh_session}()).get("jid");if(e&&Uc.connection._proto instanceof Au.Bosh)try{return Uc.connection.restore(e,Uc.connection.onConnectStatusChanged),!0}catch(t){return!Uc.isTestEnv()&&zn.warn("Could not restore session for jid: "+e+" Error message: "+t.message),!1}return!1},Vc.listen.on("clearSession",()=>{if(void 0===Uc.bosh_session){const e="converse.bosh-session";sessionStorage.removeItem(e),sessionStorage.removeItem("".concat(e,"-").concat(e))}else Uc.bosh_session.destroy(),delete Uc.bosh_session}),Vc.listen.on("setUserJID",()=>{void 0!==Uc.bosh_session&&Uc.bosh_session.save({jid:Uc.jid})}),Vc.listen.on("addClientFeatures",()=>Vc.disco.own.features.add(Au.NS.BOSH)),Object.assign(Vc,{tokens:{get:e=>void 0===Uc.connection?null:"rid"===e.toLowerCase()?Uc.connection.rid||Uc.connection._proto.rid:"sid"===e.toLowerCase()?Uc.connection.sid||Uc.connection._proto.sid:void 0}})}});var Cu=n(7);
-/**
- * @module converse-caps
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */const{Strophe:ju,$build:Tu}=rl.env;function Ou(e,t){return e.sort((e,n)=>e[t]>n[t]?-1:1)}function ku(e){const t=e.api.disco.own.identities.get(),n=e.api.disco.own.features.get();t.length>1&&(Ou(t,"category"),Ou(t,"type"),Ou(t,"lang"));let r=t.reduce((e,t)=>{var n;return"".concat(e).concat(t.category,"/").concat(t.type,"/").concat(null!==(n=null==t?void 0:t.lang)&&void 0!==n?n:"","/").concat(t.name,"<")},"");return n.sort(),r=n.reduce((e,t)=>"".concat(e).concat(t,"<"),r),Cu.a.b64_sha1(r)}
-/**
- * @module converse-carbons
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description Implements support for XEP-0280 Message Carbons
- */
-function Nu(e){var t,n;e&&(null===(n=Uc.session)||void 0===n||n.set({carbons_enabled:!1}));if(!Vc.settings.get("message_carbons")||(null===(t=Uc.session)||void 0===t?void 0:t.get("carbons_enabled")))return;const r=new kc.e.Builder("iq",{from:Uc.connection.jid,id:"enablecarbons",type:"set"}).c("enable",{xmlns:kc.e.NS.CARBONS});Uc.connection.addHandler(e=>{e.querySelectorAll("error").length>0?zn.warn("An error occurred while trying to enable message carbons."):(Uc.session.set({carbons_enabled:!0}),zn.debug("Message carbons have been enabled.")),Uc.session.save()},null,"iq",null,"enablecarbons"),Uc.connection.send(r)}ju.addNamespace("CAPS","http://jabber.org/protocol/caps"),rl.plugins.add("converse-caps",{overrides:{XMPPStatus:{constructPresence(){const e=this.__super__.constructPresence.apply(this,arguments);var t;return e.root().cnode((t=this.__super__._converse,Tu("c",{xmlns:ju.NS.CAPS,hash:"sha-1",node:"https://conversejs.org",ver:ku(t)}).nodeTree)),e}}}}),rl.plugins.add("converse-carbons",{initialize(){Vc.settings.extend({message_carbons:!0}),Vc.listen.on("afterResourceBinding",Nu)}});
-/**
- * @module converse-chatboxes
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:Iu}=rl.env;Iu.addNamespace("MESSAGE_CORRECT","urn:xmpp:message-correct:0"),Iu.addNamespace("RECEIPTS","urn:xmpp:receipts"),Iu.addNamespace("REFERENCE","urn:xmpp:reference:0"),Iu.addNamespace("MARKERS","urn:xmpp:chat-markers:0"),rl.plugins.add("converse-chatboxes",{dependencies:["converse-emoji","converse-roster","converse-vcard"],initialize(){async function e(e,t,n){let r;e=Iu.getBareJidFromJid(e.toLowerCase()),Object.assign(t,{jid:e,id:e});try{r=new n(t,{collection:Uc.chatboxes})}catch(e){return zn.error(e),null}return await r.initialized,r.isValid()?(Uc.chatboxes.add(r),r):(r.destroy(),null)}Vc.promises.add(["chatBoxesFetched","chatBoxesInitialized","privateChatsAutoJoined"]),Uc.ChatBoxes=ra.extend({comparator:"time_opened",model:(e,t)=>new Uc.ChatBox(e,t),onChatBoxesFetched(e){e.filter(e=>!e.isValid()).forEach(e=>e.destroy()),Vc.trigger("chatBoxesFetched")},onConnected(e){e||(this.browserStorage=Uc.createStore("converse.chatboxes-".concat(Uc.bare_jid)),this.fetch({add:!0,success:e=>this.onChatBoxesFetched(e)}))}}),Vc.listen.on("addClientFeatures",()=>{Vc.disco.own.features.add(Iu.NS.MESSAGE_CORRECT),Vc.disco.own.features.add(Iu.NS.HTTPUPLOAD),Vc.disco.own.features.add(Iu.NS.OUTOFBAND)}),Vc.listen.on("pluginsInitialized",()=>{Uc.chatboxes=new Uc.ChatBoxes,Vc.trigger("chatBoxesInitialized")}),Vc.listen.on("presencesInitialized",e=>Uc.chatboxes.onConnected(e)),Vc.listen.on("reconnected",()=>Uc.chatboxes.forEach(e=>e.onReconnection())),Object.assign(Vc,{chatboxes:{create:async(t=[],n={},r)=>(await Vc.waitUntil("chatBoxesFetched"),"string"==typeof t?e(t,n,r):Promise.all(t.map(t=>e(t,n,r)))),get:async e=>(await Vc.waitUntil("chatBoxesFetched"),void 0===e?Uc.chatboxes.models:"string"==typeof e?Uc.chatboxes.get(e.toLowerCase()):(e=e.map(e=>e.toLowerCase()),Uc.chatboxes.models.filter(t=>e.includes(t.get("jid")))))}})}}),rl.plugins.add("converse-headlines",{dependencies:["converse-chat"],overrides:{ChatBoxes:{model(e,t){const{_converse:n}=this.__super__;return e.type==n.HEADLINES_TYPE?new n.HeadlinesBox(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){function e(){Uc.connection.addHandler(e=>async function(e){if(ps.isHeadline(e)||ps.isServerMessage(e)){const t=e.getAttribute("from");if(t.includes("@")&&!Uc.roster.get(t)&&!Vc.settings.get("allow_non_roster_messaging"))return;if(null===e.querySelector("body"))return;const n=Uc.chatboxes.create({id:t,jid:t,type:Uc.HEADLINES_TYPE,from:t}),r=await ps.parseMessage(e,Uc);await n.createMessage(r),Vc.trigger("message",{chatbox:n,stanza:e,attrs:r})}}(e)||!0,null,"message")}Uc.HeadlinesBox=Uc.ChatBox.extend({defaults(){return{bookmarked:!1,hidden:["mobile","fullscreen"].includes(Vc.settings.get("view_mode")),message_type:"headline",num_unread:0,time_opened:this.get("time_opened")||(new Date).getTime(),type:Uc.HEADLINES_TYPE}},async initialize(){this.set({box_id:"box-".concat(this.get("jid"))}),this.initMessages(),await this.fetchMessages(),Vc.trigger("headlinesBoxInitialized",this)}}),Vc.listen.on("connected",e),Vc.listen.on("reconnected",e),Object.assign(Vc,{headlines:{async get(e,t={},n=!1){async function r(e){let r=await Vc.chatboxes.get(e);return!r&&n?r=await Vc.chatboxes.create(e,t,Uc.HeadlinesBox):(r=r&&r.get("type")===Uc.HEADLINES_TYPE?r:null,r&&Object.keys(t).length&&r.save(t)),r}if(void 0===e){return(await Vc.chatboxes.get()).filter(e=>e.get("type")===Uc.HEADLINES_TYPE)}return"string"==typeof e?r(e):Promise.all(e.map(e=>r(e)))}}})}});
-/**
- * @module converse-rsm
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description XEP-0059 Result Set Management
- *   Some code taken from the Strophe RSM plugin, licensed under the MIT License
- *   Copyright 2006-2017 Strophe (https://github.com/strophe/strophejs)
- */
-const{Strophe:Mu,$build:Ru}=rl.env;Mu.addNamespace("RSM","http://jabber.org/protocol/rsm");const Du=["after","before","index","max"],Pu=e=>Number(e),Lu=e=>e.toString(),zu={after:Lu,before:Lu,count:Pu,first:Lu,index:Pu,last:Lu,max:Pu},Fu=e=>void 0===e,Bu=Object.keys(zu);class qu{static getQueryParameters(e={}){return Bo(e,Du)}static parseXMLResult(e){const t={};for(var n=0;n<Bu.length;n++){const r=Bu[n],i=e.getElementsByTagName(r)[0];Fu(i)||null===i||(t[r]=zu[r](Mu.getText(i)),"first"==r&&(t.index=zu.index(i.getAttribute("index"))))}return t}constructor(e={}){this.query=qu.getQueryParameters(e),this.result=e.xml?qu.parseXMLResult(e.xml):{}}toXML(){const e=Ru("set",{xmlns:Mu.NS.RSM});return Du.reduce((e,t)=>Fu(this.query[t])?e:e.c(t).t((this.query[t]||"").toString()).up(),e).tree()}next(e,t){const n=Object.assign({},this.query,{after:this.result.last,before:t,max:e});return new qu(n)}previous(e,t){const n=Object.assign({},this.query,{after:t,before:this.result.first,max:e});return new qu(n)}}Uc.RSM_ATTRIBUTES=Bu,Uc.RSM=qu;
-/**
- * @module converse-mam
- * @description XEP-0313 Message Archive Management
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:Hu,$iq:Uu,dayjs:$u}=rl.env,{NS:Wu}=Hu,Gu=rl.env.utils,Vu={fetchNewestMessages(){if(this.disable_mam)return;const e=this.getMostRecentMessage();if(e&&!Vc.settings.get("clear_messages_on_reconnection")){const t=e.get("stanza_id ".concat(this.get("jid")));t?this.fetchArchivedMessages({after:t},"forwards"):this.fetchArchivedMessages({start:e.get("time")},"forwards")}else this.fetchArchivedMessages({before:""})},async handleMAMResult(e,t,n,r){await Vc.emojis.initialize();const i=this.get("type")===Uc.CHATROOMS_TYPE;e.messages=e.messages.map(e=>i?ps.parseMUCMessage(e,this,Uc):ps.parseMessage(e,Uc));const o={query:t,chatbox:this,messages:e.messages};if(await Vc.trigger("MAMResult",o,{synchronous:!0}),e.messages.forEach(e=>this.queueMessage(e)),e.error){const t=e.error.retry_event_id=Gu.getUniqueId();Vc.listen.once(t,()=>this.fetchArchivedMessages(n,r)),this.createMessageFromError(e.error)}},async fetchArchivedMessages(e={},t){if(this.disable_mam)return;const n=this.get("type")===Uc.CHATROOMS_TYPE,r=n?this.get("jid"):Uc.bare_jid;if(!await Vc.disco.supports(Wu.MAM,r))return;const i=Vc.settings.get("archived_messages_page_size"),o=Object.assign({groupchat:n,max:i,with:this.get("jid")},e),s=await Vc.archive.query(o);return await this.handleMAMResult(s,o,e,t),t&&s.rsm&&!s.complete?("forwards"===t?e=s.rsm.next(i,e.before).query:"backwards"===t&&(e=s.rsm.previous(i,e.after).query),this.fetchArchivedMessages(e,t)):void 0}};rl.plugins.add("converse-mam",{dependencies:["converse-disco","converse-muc"],initialize(){function e(e){Vc.settings.get("muc_show_logs_before_join")&&e.features.get("mam_enabled")&&!e.get("prejoin_mam_fetched")&&(e.fetchNewestMessages(),e.save({prejoin_mam_fetched:!0}))}Vc.settings.extend({archived_messages_page_size:"50",message_archiving:void 0,message_archiving_timeout:2e4}),Object.assign(Uc.ChatBox.prototype,Vu),Uc.onMAMError=function(e){(null==e?void 0:e.querySelectorAll("feature-not-implemented").length)?zn.warn("Message Archive Management (XEP-0313) not supported by ".concat(e.getAttribute("from"))):(zn.error("Error while trying to set archiving preferences for ".concat(e.getAttribute("from"),".")),zn.error(e))},Uc.onMAMPreferences=function(e,t){const n=mr()('prefs[xmlns="'.concat(Wu.MAM,'"]'),e).pop();if(n.getAttribute("default")!==Vc.settings.get("message_archiving")){const e=Uu({type:"set"}).c("prefs",{xmlns:Wu.MAM,default:Vc.settings.get("message_archiving")});Array.from(n.children).forEach(t=>e.cnode(t).up()),Vc.sendIQ(e).then(()=>t.save({preferences:{default:Vc.settings.get("message_archiving")}})).catch(Uc.onMAMError)}else t.save({preferences:{default:Vc.settings.get("message_archiving")}})},Vc.listen.on("addClientFeatures",()=>Vc.disco.own.features.add(Wu.MAM)),Vc.listen.on("serviceDiscovered",(function(e){const t=e.get("preferences")||{};e.get("var")===Wu.MAM&&void 0!==Vc.settings.get("message_archiving")&&t.default!==Vc.settings.get("message_archiving")&&Vc.sendIQ(Uu({type:"get"}).c("prefs",{xmlns:Wu.MAM})).then(t=>Uc.onMAMPreferences(t,e)).catch(Uc.onMAMError)})),Vc.listen.on("chatRoomViewInitialized",t=>{Vc.settings.get("muc_show_logs_before_join")&&(e(t.model),t.model.features.on("change:mam_enabled",()=>e(t.model)))}),Vc.listen.on("enteredNewRoom",e=>e.features.get("mam_enabled")&&e.fetchNewestMessages()),Vc.listen.on("chatReconnected",e=>{e.get("type")===Uc.PRIVATE_CHAT_TYPE&&e.fetchNewestMessages()}),Vc.listen.on("afterMessagesFetched",e=>{e.get("type")!==Uc.PRIVATE_CHAT_TYPE||Uc.connection.restored||e.fetchNewestMessages()}),Object.assign(Vc,{archive:{async query(e){if(!Vc.connection.connected())throw new Error("Can't call `api.archive.query` before having established an XMPP session");const t={type:"set"};if(e&&e.groupchat){if(!e.with)throw new Error('You need to specify a "with" value containing the chat room JID, when querying groupchat messages.');t.to=e.with}const n=t.to||Uc.bare_jid;if(!await Vc.disco.supports(Wu.MAM,n))return zn.warn("Did not fetch MAM archive for ".concat(n," because it doesn't support ").concat(Wu.MAM)),{messages:[]};const r=Gu.getUniqueId(),i=Uu(t).c("query",{xmlns:Wu.MAM,queryid:r});if(e){i.c("x",{xmlns:Wu.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t(Wu.MAM).up().up(),e.with&&!e.groupchat&&i.c("field",{var:"with"}).c("value").t(e.with).up().up(),["start","end"].forEach(t=>{if(e[t]){const n=$u(e[t]);if(!n.isValid())throw new TypeError("archive.query: invalid date provided for: ".concat(t));i.c("field",{var:t}).c("value").t(n.toISOString()).up().up()}}),i.up();const t=new qu(e);Object.keys(t.query).length&&i.cnode(t.toXML())}const o=[],s=Uc.connection.addHandler(t=>{const n=mr()('message > result[xmlns="'.concat(Wu.MAM,'"]'),t).pop();if(void 0===n||n.getAttribute("queryid")!==r)return!0;const i=t.getAttribute("from")||Uc.bare_jid;if(e.groupchat){if(i!==e.with)return zn.warn("Ignoring alleged groupchat MAM message from ".concat(t.getAttribute("from"))),!0}else if(i!==Uc.bare_jid)return zn.warn("Ignoring alleged MAM message from ".concat(t.getAttribute("from"))),!0;return o.push(t),!0},Wu.MAM);let a;const c=await Vc.sendIQ(i,Vc.settings.get("message_archiving_timeout"),!1);if(null===c){const{__:e}=Uc,t=e("Timeout while trying to fetch archived messages.");return zn.error(t),a=new Uc.TimeoutError(t),{messages:o,error:a}}if(Gu.isErrorStanza(c)){const{__:e}=Uc,t=e("An error occurred while querying for archived messages.");return zn.error(t),zn.error(c),a=new Error(t),{messages:o,error:a}}let l;Uc.connection.deleteHandler(s);const u=c&&mr()('fin[xmlns="'.concat(Wu.MAM,'"]'),c).pop(),d="true"===(null==u?void 0:u.getAttribute("complete")),h=mr()('set[xmlns="'.concat(Wu.RSM,'"]'),u).pop();return h&&(l=new qu({...e,xml:h})),{messages:o,rsm:l,complete:d}}}})}});
-/**
- * @module converse-ping
- * @description
- * Converse.js plugin which add support for application-level pings
- * as specified in XEP-0199 XMPP Ping.
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:Ju,$iq:Xu}=rl.env,Qu=rl.env.utils;Ju.addNamespace("PING","urn:xmpp:ping"),rl.plugins.add("converse-ping",{initialize(){let e;function t(t){e=new Date;const n=t.getAttribute("from"),r=t.getAttribute("id"),i=Xu({type:"result",to:n,id:r});return Uc.connection.sendIQ(i),!0}Vc.settings.extend({ping_interval:60}),setTimeout(()=>{if(Vc.settings.get("ping_interval")>0){const t=new Date;return e||(e=t),!((t-e)/1e3>Vc.settings.get("ping_interval"))||Vc.ping()}},1e3);const n=function(){void 0!==Uc.connection.disco&&Vc.disco.own.features.add(Ju.NS.PING),Uc.connection.addHandler(t,Ju.NS.PING,"iq","get"),Uc.connection.addHandler(()=>{if(Vc.settings.get("ping_interval")>0)return e=new Date,!0})};Vc.listen.on("connected",n),Vc.listen.on("reconnected",n),Vc.listen.on("windowStateChanged",(function(e){"visible"===e.state&&Vc.connection.connected()&&Vc.ping(null,5e3)})),Object.assign(Vc,{async ping(t,n){if(e=new Date,t=t||Ju.getDomainFromJid(Uc.bare_jid),Uc.connection){const e=Xu({type:"get",to:t,id:Qu.getUniqueId("ping")}).c("ping",{xmlns:Ju.NS.PING}),r=await Vc.sendIQ(e,n||1e4,!1);return null===r?(zn.warn("Timeout while pinging ".concat(t)),t===Ju.getDomainFromJid(Uc.bare_jid)&&Vc.connection.reconnect()):Qu.isErrorStanza(r)&&(zn.error("Error while pinging ".concat(t)),zn.error(r)),!0}return!1}})}});
-/**
- * @module converse-pubsub
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:Yu,$iq:Ku}=rl.env;Yu.addNamespace("PUBSUB_ERROR",Yu.NS.PUBSUB+"#errors"),rl.plugins.add("converse-pubsub",{dependencies:["converse-disco"],initialize(){Object.assign(Uc.api,{pubsub:{async publish(e,t,n,r,i=!0){const o=Ku({from:Uc.bare_jid,type:"set",to:e}).c("pubsub",{xmlns:Yu.NS.PUBSUB}).c("publish",{node:t}).cnode(n.tree()).up().up();r&&(e=e||Uc.bare_jid,await Vc.disco.supports(Yu.NS.PUBSUB+"#publish-options",e)?(o.c("publish-options").c("x",{xmlns:Yu.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE",type:"hidden"}).c("value").t("".concat(Yu.NS.PUBSUB,"#publish-options")).up().up(),Object.keys(r).forEach(e=>o.c("field",{var:e}).c("value").t(r[e]).up().up())):zn.warn("_converse.api.publish: ".concat(e," does not support #publish-options, ")+"so we didn't set them even though they were provided."));try{await Vc.sendIQ(o)}catch(e){if(!(e instanceof Element&&i&&e.querySelector('precondition-not-met[xmlns="'.concat(Yu.NS.PUBSUB_ERROR,'"]'))))throw e;{const e=o.nodeTree;e.querySelector("publish-options").outerHTML="",zn.warn("PubSub: Republishing without publish options. ".concat(e.outerHTML)),await Vc.sendIQ(e)}}}}})}});var Zu=function(e){return"number"==typeof e||Ee(e)&&"[object Number]"==k(e)};var ed=function(e){return Zu(e)&&e!=+e};
-/**
- * @module converse-status
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */const{Strophe:td,$build:nd,$pres:rd}=rl.env;rl.plugins.add("converse-status",{initialize(){function e(e){Vc.trigger("statusInitialized",e)}function t(t){if(t=void 0!==Uc.xmppstatus&&t)e(t);else{const n="converse.xmppstatus-".concat(Uc.bare_jid);Uc.xmppstatus=new Uc.XMPPStatus({id:n}),Uc.xmppstatus.browserStorage=Uc.createStore(n,"session"),Uc.xmppstatus.fetch({success:()=>e(t),error:()=>e(t),silent:!0})}}Vc.settings.extend({auto_away:0,auto_xa:0,csi_waiting_time:0,default_state:"online",priority:0}),Vc.promises.add(["statusInitialized"]),Uc.XMPPStatus=qo.extend({defaults:()=>({status:Vc.settings.get("default_state")}),initialize(){this.on("change",e=>{N(e.changed)&&("status"in e.changed||"status_message"in e.changed)&&Vc.user.presence.send(this.get("status"),null,this.get("status_message"))})},getNickname:()=>Uc.nickname,getFullname:()=>"",constructPresence(e,t=null,n){let r;e="string"==typeof e?e:this.get("status")||Vc.settings.get("default_state"),n="string"==typeof n?n:this.get("status_message");const i={to:t};"unavailable"===e||"probe"===e||"error"===e||"unsubscribe"===e||"unsubscribed"===e||"subscribe"===e||"subscribed"===e?(i.type=e,r=rd(i)):"offline"===e?(i.type="unavailable",r=rd(i)):r="online"===e?rd(i):rd(i).c("show").t(e).up(),n&&r.c("status").t(n).up();const o=Vc.settings.get("priority");if(r.c("priority").t(ed(Number(o))?0:o).up(),Uc.idle){const e=new Date;e.setSeconds(e.getSeconds()-Uc.idle_seconds),r.c("idle",{xmlns:td.NS.IDLE,since:e.toISOString()})}return r}}),Uc.sendCSI=function(e){Vc.send(nd(e,{xmlns:td.NS.CSI})),Uc.inactive=e===Uc.INACTIVE},Uc.onUserActivity=function(){var e;Uc.idle_seconds>0&&(Uc.idle_seconds=0),(null===(e=Uc.connection)||void 0===e?void 0:e.authenticated)&&(Uc.inactive&&Uc.sendCSI(Uc.ACTIVE),Uc.idle&&(Uc.idle=!1,Vc.user.presence.send()),!0===Uc.auto_changed_status&&(Uc.auto_changed_status=!1,Uc.xmppstatus.set("status",Vc.settings.get("default_state"))))},Uc.onEverySecond=function(){var e;if(!(null===(e=Uc.connection)||void 0===e?void 0:e.authenticated))return;const t=Uc.xmppstatus.get("status");Uc.idle_seconds++,Vc.settings.get("csi_waiting_time")>0&&Uc.idle_seconds>Vc.settings.get("csi_waiting_time")&&!Uc.inactive&&Uc.sendCSI(Uc.INACTIVE),Vc.settings.get("idle_presence_timeout")>0&&Uc.idle_seconds>Vc.settings.get("idle_presence_timeout")&&!Uc.idle&&(Uc.idle=!0,Vc.user.presence.send()),Vc.settings.get("auto_away")>0&&Uc.idle_seconds>Vc.settings.get("auto_away")&&"away"!==t&&"xa"!==t&&"dnd"!==t?(Uc.auto_changed_status=!0,Uc.xmppstatus.set("status","away")):Vc.settings.get("auto_xa")>0&&Uc.idle_seconds>Vc.settings.get("auto_xa")&&"xa"!==t&&"dnd"!==t&&(Uc.auto_changed_status=!0,Uc.xmppstatus.set("status","xa"))},Uc.registerIntervalHandler=function(){if(Vc.settings.get("auto_away")<1&&Vc.settings.get("auto_xa")<1&&Vc.settings.get("csi_waiting_time")<1&&Vc.settings.get("idle_presence_timeout")<1)return;Uc.idle_seconds=0,Uc.auto_changed_status=!1;const{unloadevent:e}=Uc;window.addEventListener("click",Uc.onUserActivity),window.addEventListener("focus",Uc.onUserActivity),window.addEventListener("keypress",Uc.onUserActivity),window.addEventListener("mousemove",Uc.onUserActivity),window.addEventListener(e,Uc.onUserActivity,{once:!0,passive:!0}),window.addEventListener(e,()=>{var e;return null===(e=Uc.session)||void 0===e?void 0:e.save("active",!1)}),Uc.everySecondTrigger=window.setInterval(Uc.onEverySecond,1e3)},Vc.listen.on("presencesInitialized",e=>{e||Uc.registerIntervalHandler()}),Vc.listen.on("clearSession",()=>{Uc.shouldClearCache()&&Uc.xmppstatus&&(Uc.xmppstatus.destroy(),delete Uc.xmppstatus,Vc.promises.add(["statusInitialized"]))}),Vc.listen.on("connected",()=>t(!1)),Vc.listen.on("reconnected",()=>t(!0)),Object.assign(Uc.api.user,{presence:{async send(e,t,n){await Vc.waitUntil("statusInitialized"),Vc.send(Uc.xmppstatus.constructPresence(e,t,n))}},status:{get:async()=>(await Vc.waitUntil("statusInitialized"),Uc.xmppstatus.get("status")),async set(e,t){const n={status:e};if(!Object.keys(Uc.STATUS_WEIGHTS).includes(e))throw new Error("Invalid availability value. See https://xmpp.org/rfcs/rfc3921.html#rfc.section.2.2.2.1");"string"==typeof t&&(n.status_message=t),await Vc.waitUntil("statusInitialized"),Uc.xmppstatus.save(n)},message:{get:async()=>(await Vc.waitUntil("statusInitialized"),Uc.xmppstatus.get("status_message")),async set(e){await Vc.waitUntil("statusInitialized"),Uc.xmppstatus.save({status_message:e})}}}})}});var id=function(e){return function(t){return null==e?void 0:mo(e,t)}};var od=function(e,t){for(var n,r=-1,i=e.length;++r<i;){var o=t(e[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n};var sd=function(e){return e&&e.length?od(e,br):0};
-/**
- * @module converse-roster
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */const{Strophe:ad,$iq:cd,$pres:ld,dayjs:ud,sizzle:dd}=rl.env,hd=rl.env.utils;rl.plugins.add("converse-roster",{dependencies:["converse-status"],initialize(){const{__:e}=Uc;Vc.settings.extend({allow_contact_requests:!0,auto_subscribe:!1,synchronize_availability:!0}),Vc.promises.add(["cachedRoster","roster","rosterContactsFetched","rosterGroupsFetched","rosterInitialized"]),Uc.HEADER_CURRENT_CONTACTS=e("My contacts"),Uc.HEADER_PENDING_CONTACTS=e("Pending contacts"),Uc.HEADER_REQUESTING_CONTACTS=e("Contact requests"),Uc.HEADER_UNGROUPED=e("Ungrouped"),Uc.HEADER_UNREAD=e("New messages");const t={};t[Uc.HEADER_UNREAD]=0,t[Uc.HEADER_REQUESTING_CONTACTS]=1,t[Uc.HEADER_CURRENT_CONTACTS]=2,t[Uc.HEADER_UNGROUPED]=3,t[Uc.HEADER_PENDING_CONTACTS]=4,Uc.registerPresenceHandler=function(){Uc.unregisterPresenceHandler(),Uc.presence_ref=Uc.connection.addHandler(e=>(Uc.roster.presenceHandler(e),!0),null,"presence",null)},Uc.rejectPresenceSubscription=function(e,t){const n=ld({to:e,type:"unsubscribed"});t&&""!==t&&n.c("status").t(t),Vc.send(n)},Uc.sendInitialPresence=function(){Uc.send_initial_presence&&Vc.user.presence.send()},Uc.populateRoster=async function(e=!1){e&&(Uc.send_initial_presence=!0);try{await Uc.rostergroups.fetchRosterGroups(),Vc.trigger("rosterGroupsFetched"),await Uc.roster.fetchRosterContacts(),Vc.trigger("rosterContactsFetched")}catch(e){zn.error(e)}finally{Uc.sendInitialPresence()}};const n=qo.extend({idAttribute:"name"}),r=ra.extend({model:n});function i(e){const t=Uc.roster&&Uc.roster.findWhere({jid:e.get("jid")});void 0!==t&&t.save({num_unread:e.get("num_unread")})}async function o(){Uc.presences&&await Uc.presences.clearStore()}Uc.Presence=qo.extend({defaults:{show:"offline"},initialize(){this.resources=new r;const e="converse.identities-".concat(this.get("jid"));this.resources.browserStorage=Uc.createStore(e,"session"),this.listenTo(this.resources,"update",this.onResourcesChanged),this.listenTo(this.resources,"change",this.onResourcesChanged)},onResourcesChanged(){var e;const t=this.getHighestPriorityResource(),n=(null==t||null===(e=t.attributes)||void 0===e?void 0:e.show)||"offline";this.get("show")!==n&&this.save({show:n})},getHighestPriorityResource(){return this.resources.sortBy(e=>"".concat(e.get("priority"),"-").concat(e.get("timestamp"))).reverse()[0]},addResource(e){const t=e.getAttribute("from"),n=ad.getResourceFromJid(t),r=dd('delay[xmlns="'.concat(ad.NS.DELAY,'"]'),e).pop(),i=id(e.querySelector("priority"))("textContent")||0,o=this.resources.get(n),s={name:n,priority:ed(parseInt(i,10))?0:parseInt(i,10),show:id(e.querySelector("show"))("textContent")||"online",timestamp:r?ud(r.getAttribute("stamp")).toISOString():(new Date).toISOString()};o?o.save(s):this.resources.create(s)},removeResource(e){const t=this.resources.get(e);t&&t.destroy()}}),Uc.Presences=ra.extend({model:Uc.Presence}),Uc.RosterContact=qo.extend({defaults:{chat_state:void 0,image:Uc.DEFAULT_IMAGE,image_type:Uc.DEFAULT_IMAGE_TYPE,num_unread:0,status:void 0},async initialize(e){this.initialized=hd.getResolveablePromise(),this.setPresence();const{jid:t}=e,n=ad.getBareJidFromJid(t).toLowerCase();e.jid=n,this.set(Object.assign({groups:[],id:n,jid:n,user_id:ad.getNodeFromJid(t)},e)),this.listenTo(this.presence,"change:show",()=>Vc.trigger("contactPresenceChanged",this)),this.listenTo(this.presence,"change:show",()=>this.trigger("presenceChanged")),await Vc.trigger("rosterContactInitialized",this,{Synchronous:!0}),this.initialized.resolve()},setPresence(){const e=this.get("jid");this.presence=Uc.presences.findWhere({jid:e})||Uc.presences.create({jid:e})},openChat(){const e=this.attributes;Vc.chats.open(e.jid,e,!0)},getFilterCriteria(){const e=this.get("nickname"),t=this.get("jid");let n=this.getDisplayName();return n=n.includes(t)?n:n.concat("   ".concat(t)),n=n.includes(e)?n:n.concat("   ".concat(e)),n.toLowerCase()},getDisplayName(){return this.get("nickname")?this.get("nickname"):this.get("jid")},getFullname(){return this.get("jid")},subscribe(e){const t=ld({to:this.get("jid"),type:"subscribe"});e&&""!==e&&t.c("status").t(e).up();const n=Uc.xmppstatus.getNickname()||Uc.xmppstatus.getFullname();return n&&t.c("nick",{xmlns:ad.NS.NICK}).t(n).up(),Vc.send(t),this.save("ask","subscribe"),this},ackSubscribe(){Vc.send(ld({type:"subscribe",to:this.get("jid")}))},ackUnsubscribe(){Vc.send(ld({type:"unsubscribe",to:this.get("jid")})),this.removeFromRoster(),this.destroy()},unauthorize(e){return Uc.rejectPresenceSubscription(this.get("jid"),e),this},authorize(e){const t=ld({to:this.get("jid"),type:"subscribed"});return e&&""!==e&&t.c("status").t(e),Vc.send(t),this},removeFromRoster(){const e=cd({type:"set"}).c("query",{xmlns:ad.NS.ROSTER}).c("item",{jid:this.get("jid"),subscription:"remove"});return Vc.sendIQ(e)}}),Uc.RosterContacts=ra.extend({model:Uc.RosterContact,comparator(e,t){const n=e.presence.get("show")||"offline",r=t.presence.get("show")||"offline";if(Uc.STATUS_WEIGHTS[n]===Uc.STATUS_WEIGHTS[r]){const n=e.getDisplayName().toLowerCase(),r=t.getDisplayName().toLowerCase();return n<r?-1:n>r?1:0}return Uc.STATUS_WEIGHTS[n]<Uc.STATUS_WEIGHTS[r]?-1:1},onConnected(){this.registerRosterHandler(),this.registerRosterXHandler()},registerRosterHandler(){Uc.connection.addHandler(e=>(Uc.roster.onRosterPush(e),!0),ad.NS.ROSTER,"iq","set")},registerRosterXHandler(){let e=0;Uc.connection.addHandler((function(t){return window.setTimeout((function(){Uc.connection.flush(),Uc.roster.subscribeToSuggestedItems.bind(Uc.roster)(t)}),e),e+=250*t.querySelectorAll("item").length,!0}),ad.NS.ROSTERX,"message",null)},async fetchRosterContacts(){const e=await new Promise((e,t)=>{this.fetch({add:!0,silent:!0,success:e,error:(e,n)=>t(n)})});if(hd.isErrorObject(e)&&(zn.error(e),Uc.session.set("roster_cached",!1),this.data.save("version",void 0)),!Uc.session.get("roster_cached"))return Uc.send_initial_presence=!0,Uc.roster.fetchFromServer();Vc.trigger("cachedRoster",e)},subscribeToSuggestedItems:e=>(Array.from(e.querySelectorAll("item")).forEach(e=>{"add"===e.getAttribute("action")&&Uc.roster.addAndSubscribe(e.getAttribute("jid"),Uc.xmppstatus.getNickname()||Uc.xmppstatus.getFullname())}),!0),isSelf:e=>hd.isSameBareJID(e,Uc.connection.jid),async addAndSubscribe(e,t,n,r,i){const o=await this.addContactToRoster(e,t,n,i);o instanceof Uc.RosterContact&&o.subscribe(r)},sendContactAddIQ(e,t,n){t=t||null;const r=cd({type:"set"}).c("query",{xmlns:ad.NS.ROSTER}).c("item",{jid:e,name:t});return n.forEach(e=>r.c("group").t(e).up()),Vc.sendIQ(r)},async addContactToRoster(t,n,r,i){await Vc.waitUntil("rosterContactsFetched"),r=r||[];try{await this.sendContactAddIQ(t,n,r)}catch(r){return zn.error(r),alert(e("Sorry, there was an error while trying to add %1$s as a contact.",n||t)),r}return this.create(Object.assign({ask:void 0,nickname:n,groups:r,jid:t,requesting:!1,subscription:"none"},i),{sort:!1})},async subscribeBack(e,t){const n=this.get(e);if(n instanceof Uc.RosterContact)n.authorize().subscribe();else{var r;const n=(null===(r=dd('nick[xmlns="'.concat(ad.NS.NICK,'"]'),t).pop())||void 0===r?void 0:r.textContent)||null,i=await this.addContactToRoster(e,n,[],{subscription:"from"});i instanceof Uc.RosterContact&&i.authorize().subscribe()}},getNumOnlineContacts(){const e=["offline","unavailable"];return sd(this.models.filter(t=>!e.includes(t.presence.get("show"))))},onRosterPush(e){const t=e.getAttribute("id"),n=e.getAttribute("from");if(n&&n!==Uc.bare_jid)return void zn.warn("Ignoring roster illegitimate roster push message from ".concat(e.getAttribute("from")));Vc.send(cd({type:"result",id:t,from:Uc.connection.jid}));const r=dd('query[xmlns="'.concat(ad.NS.ROSTER,'"]'),e).pop();this.data.save("version",r.getAttribute("ver"));const i=dd("item",r);if(i.length>1)throw zn.error(e),new Error('Roster push query may not contain more than one "item" element.');if(0===i.length)return zn.warn(e),void zn.warn('Received a roster push stanza without an "item" element.');this.updateContact(i.pop()),Vc.trigger("rosterPush",e)},rosterVersioningSupported(){return Vc.disco.stream.getFeature("ver","urn:xmpp:features:rosterver")&&this.data.get("version")},async fetchFromServer(){const e=cd({type:"get",id:hd.getUniqueId("roster")}).c("query",{xmlns:ad.NS.ROSTER});this.rosterVersioningSupported()&&e.attrs({ver:this.data.get("version")});const t=await Vc.sendIQ(e,null,!1);if("error"!==t.getAttribute("type")){const e=dd('query[xmlns="'.concat(ad.NS.ROSTER,'"]'),t).pop();if(e){dd("item",e).forEach(e=>this.updateContact(e)),this.data.save("version",e.getAttribute("ver"))}}else if(!hd.isServiceUnavailableError(t))return zn.error(t),void zn.error("Error while trying to fetch roster from the server");Uc.session.save("roster_cached",!0),Vc.trigger("roster",t)},updateContact(e){const t=e.getAttribute("jid"),n=this.get(t),r=e.getAttribute("subscription"),i=e.getAttribute("ask"),o=Array.from(e.getElementsByTagName("group")).map(e=>e.textContent);if(n){if("remove"===r)return n.destroy();n.save({subscription:r,ask:i,nickname:e.getAttribute("name"),requesting:null,groups:o})}else{if("none"===r&&null===i||"remove"===r)return;this.create({ask:i,nickname:e.getAttribute("name"),groups:o,jid:t,subscription:r},{sort:!1})}},createRequestingContact(e){var t;const n={jid:ad.getBareJidFromJid(e.getAttribute("from")),subscription:"none",ask:null,requesting:!0,nickname:(null===(t=dd('nick[xmlns="'.concat(ad.NS.NICK,'"]'),e).pop())||void 0===t?void 0:t.textContent)||null};Vc.trigger("contactRequest",this.create(n))},handleIncomingSubscription(t){const n=t.getAttribute("from"),r=ad.getBareJidFromJid(n),i=this.get(r);Vc.settings.get("allow_contact_requests")||Uc.rejectPresenceSubscription(n,e("This client does not allow presence subscriptions")),Vc.settings.get("auto_subscribe")?i&&"to"===i.get("subscription")?i.authorize():this.subscribeBack(r,t):i?("none"!==i.get("subscription")||"subscribe"===i.get("ask"))&&i.authorize():this.createRequestingContact(t)},handleOwnPresence(e){const t=e.getAttribute("from"),n=ad.getResourceFromJid(t),r=e.getAttribute("type");if(Uc.connection.jid!==t&&"unavailable"!==r&&(!0===Vc.settings.get("synchronize_availability")||Vc.settings.get("synchronize_availability")===n)){const t=id(e.querySelector("show"))("textContent")||"online";Uc.xmppstatus.save({status:t},{silent:!0});const n=id(e.querySelector("status"))("textContent");n&&Uc.xmppstatus.save({status_message:n})}Uc.jid===t&&"unavailable"===r&&Vc.user.presence.send()},presenceHandler(e){const t=e.getAttribute("type");if("error"===t)return!0;const n=e.getAttribute("from"),r=ad.getBareJidFromJid(n);if(this.isSelf(r))return this.handleOwnPresence(e);if(dd('query[xmlns="'.concat(ad.NS.MUC,'"]'),e).length)return;const i=id(e.querySelector("status"))("textContent"),o=this.get(r);if(o&&i!==o.get("status")&&o.save({status:i}),"subscribed"===t&&o)o.ackSubscribe();else if("unsubscribed"===t&&o)o.ackUnsubscribe();else{if("unsubscribe"===t)return;if("subscribe"===t)this.handleIncomingSubscription(e);else if("unavailable"===t&&o){const e=ad.getResourceFromJid(n);o.presence.removeResource(e)}else o&&o.presence.addResource(e)}}}),Uc.RosterGroup=qo.extend({initialize(t){this.set(Object.assign({description:e("Click to hide these contacts"),state:Uc.OPENED},t)),this.contacts=new Uc.RosterContacts}}),Uc.RosterGroups=ra.extend({model:Uc.RosterGroup,comparator(e,n){e=e.get("name"),n=n.get("name");const r=t,i=Object.keys(t),o=i.includes(e),s=i.includes(n);if(!o&&!s)return e.toLowerCase()<n.toLowerCase()?-1:e.toLowerCase()>n.toLowerCase()?1:0;if(o&&s)return r[e]<r[n]?-1:r[e]>r[n]?1:0;if(!o&&s){const e=Uc.HEADER_CURRENT_CONTACTS;return r[e]<r[n]?-1:r[e]>r[n]?1:0}if(o&&!s){const t=Uc.HEADER_CURRENT_CONTACTS;return r[e]<r[t]?-1:r[e]>r[t]?1:0}},fetchRosterGroups(){return new Promise(e=>{this.fetch({success:e,silent:!0})})}}),Uc.unregisterPresenceHandler=function(){void 0!==Uc.presence_ref&&(Uc.connection.deleteHandler(Uc.presence_ref),delete Uc.presence_ref)},Vc.listen.on("chatBoxesInitialized",()=>{Uc.chatboxes.on("change:num_unread",i),Uc.chatboxes.on("add",e=>{e.get("type")===Uc.PRIVATE_CHAT_TYPE&&e.setRosterContact(e.get("jid"))})}),Vc.listen.on("beforeTearDown",()=>Uc.unregisterPresenceHandler()),Vc.waitUntil("rosterContactsFetched").then(()=>{Uc.roster.on("add",e=>{const t=Uc.chatboxes.findWhere({jid:e.get("jid")});t&&t.setRosterContact(e.get("jid"))})}),Vc.listen.on("streamResumptionFailed",()=>Uc.session.set("roster_cached",!1)),Vc.listen.on("clearSession",async()=>{await o(),Uc.shouldClearCache()&&(Uc.rostergroups&&(await Uc.rostergroups.clearStore(),delete Uc.rostergroups),Uc.roster&&(Pc(Uc,"roster.data.destroy"),await Uc.roster.clearStore(),delete Uc.roster))}),Vc.listen.on("statusInitialized",async e=>{if(e)!Uc.connection.hasResumed()&&await o();else{Uc.presences=new Uc.Presences;const e="converse.presences-".concat(Uc.bare_jid);Uc.presences.browserStorage=Uc.createStore(e,"session"),Uc.presences.fetch()}Vc.trigger("presencesInitialized",e)}),Vc.listen.on("presencesInitialized",async e=>{e?Vc.trigger("rosterReadyAfterReconnection"):await async function(){await Vc.waitUntil("VCardsInitialized"),Uc.roster=new Uc.RosterContacts;let e="converse.contacts-".concat(Uc.bare_jid);Uc.roster.browserStorage=Uc.createStore(e),Uc.roster.data=new qo,e="converse-roster-model-".concat(Uc.bare_jid),Uc.roster.data.id=e,Uc.roster.data.browserStorage=Uc.createStore(e),Uc.roster.data.fetch(),e="converse.roster.groups".concat(Uc.bare_jid),Uc.rostergroups=new Uc.RosterGroups,Uc.rostergroups.browserStorage=Uc.createStore(e),Vc.trigger("rosterInitialized")}(),Uc.roster.onConnected(),Uc.registerPresenceHandler(),Uc.populateRoster(!Uc.connection.restored)}),Object.assign(Uc.api,{contacts:{async get(e){await Vc.waitUntil("rosterContactsFetched");const t=e=>Uc.roster.get(ad.getBareJidFromJid(e));if(void 0===e)e=Uc.roster.pluck("jid");else if("string"==typeof e)return t(e);return e.map(t)},async add(e,t){if(await Vc.waitUntil("rosterContactsFetched"),"string"!=typeof e||!e.includes("@"))throw new TypeError("contacts.add: invalid jid");return Uc.roster.addAndSubscribe(e,t)}}})}});
-/**
- * @module converse-smacks
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description Converse.js plugin which adds support for XEP-0198: Stream Management
- */
-const{Strophe:fd}=rl.env,pd=rl.env.utils;function gd(){return!(Vc.connection.isType("bosh")&&!Uc.isTestEnv())&&Vc.disco.stream.getFeature("sm",fd.NS.SM)}function md(e){if(!Uc.session.get("smacks_enabled"))return!0;const t=parseInt(e.getAttribute("h"),10),n=Uc.session.get("num_stanzas_handled_by_server"),r=t-n;if(r<0){const e="New reported stanza count lower than previous. "+"New: ".concat(t," - Previous: ").concat(n);zn.error(e)}const i=Uc.session.get("unacked_stanzas");if(r>i.length){const e="Higher reported acknowledge count than unacknowledged stanzas. "+"Reported Acknowledged Count: ".concat(r," -")+"Unacknowledged Stanza Count: ".concat(i.length," -")+"New: ".concat(t," - Previous: ").concat(n);zn.error(e)}return Uc.session.save({num_stanzas_handled_by_server:t,num_stanzas_since_last_ack:0,unacked_stanzas:i.slice(r)}),!0}function vd(){if(Uc.session.get("smacks_enabled")){const e=Uc.session.get("num_stanzas_handled"),t=pd.toStanza('<a xmlns="'.concat(fd.NS.SM,'" h="').concat(e,'"/>'));Vc.send(t)}return!0}function _d(e){if(Uc.session.get("smacks_enabled")&&(pd.isTagEqual(e,"iq")||pd.isTagEqual(e,"presence")||pd.isTagEqual(e,"message"))){const e=Uc.session.get("num_stanzas_handled");Uc.session.save("num_stanzas_handled",e+1)}return!0}function bd(){Uc.session.save({smacks_enabled:Uc.session.get("smacks_enabled")||!1,num_stanzas_handled:Uc.session.get("num_stanzas_handled")||0,num_stanzas_handled_by_server:Uc.session.get("num_stanzas_handled_by_server")||0,num_stanzas_since_last_ack:Uc.session.get("num_stanzas_since_last_ack")||0,unacked_stanzas:Uc.session.get("unacked_stanzas")||[]})}function yd(){Uc.session&&Uc.session.save({smacks_enabled:!1,num_stanzas_handled:0,num_stanzas_handled_by_server:0,num_stanzas_since_last_ack:0,unacked_stanzas:[]})}function wd(e){const t={smacks_enabled:!0};return["1","true"].includes(e.getAttribute("resume"))&&(t.smacks_stream_id=e.getAttribute("id")),Uc.session.save(t),!0}function Sd(e){return e.querySelector("item-not-found")?zn.warn("Could not resume previous SMACKS session, session id not found. A new session will be established."):(zn.error("Failed to enable stream management"),zn.error(e.outerHTML)),yd(),Vc.trigger("streamResumptionFailed"),!0}function xd(e){wd(e),md(e),function(){const e=Uc.session.get("unacked_stanzas");Uc.session.save("unacked_stanzas",[]),e.forEach(e=>Vc.send(e))}(),Uc.connection.do_bind=!1,Uc.connection.authenticated=!0,Uc.connection.restored=!0,Uc.connection._changeConnectStatus(fd.Status.CONNECTED,null)}async function Ed(){if(Vc.settings.get("enable_smacks")&&!Uc.session.get("smacks_enabled")&&await gd()){const e=pd.getResolveablePromise();Uc.connection._addSysHandler(t=>e.resolve(wd(t)),fd.NS.SM,"enabled"),Uc.connection._addSysHandler(t=>e.resolve(Sd(t)),fd.NS.SM,"failed");const t=Vc.connection.isType("websocket")||Uc.isTestEnv(),n=pd.toStanza('<enable xmlns="'.concat(fd.NS.SM,'" resume="').concat(t,'"/>'));Vc.send(n),Uc.connection.flush(),await e}}fd.addNamespace("SM","urn:xmpp:sm:3");const Ad=[];async function Cd(){if(!Vc.settings.get("enable_smacks"))return;if(!await gd())return;const e=Uc.connection;for(;Ad.length;)e.deleteHandler(Ad.pop());Ad.push(e.addHandler(_d)),Ad.push(e.addHandler(vd,fd.NS.SM,"r")),Ad.push(e.addHandler(md,fd.NS.SM,"a")),Uc.session.get("smacks_stream_id")?await async function(){const e=pd.getResolveablePromise();Uc.connection._addSysHandler(t=>e.resolve(xd(t)),fd.NS.SM,"resumed"),Uc.connection._addSysHandler(t=>e.resolve(Sd(t)),fd.NS.SM,"failed");const t=Uc.session.get("smacks_stream_id"),n=Uc.session.get("num_stanzas_handled"),r=pd.toStanza('<resume xmlns="'.concat(fd.NS.SM,'" h="').concat(n,'" previd="').concat(t,'"/>'));Vc.send(r),Uc.connection.flush(),await e}():yd()}function jd(e){if(Uc.session){if(Uc.session.get("smacks_enabled")&&(pd.isTagEqual(e,"iq")||pd.isTagEqual(e,"presence")||pd.isTagEqual(e,"message"))){const t=fd.serialize(e);Uc.session.save("unacked_stanzas",(Uc.session.get("unacked_stanzas")||[]).concat([t]));const n=Vc.settings.get("smacks_max_unacked_stanzas");if(n>0){const e=Uc.session.get("num_stanzas_since_last_ack")+1;e%n==0&&Vc.send(pd.toStanza('<r xmlns="'.concat(fd.NS.SM,'"/>'))),Uc.session.save({num_stanzas_since_last_ack:e})}}}else zn.warn("No _converse.session!")}rl.plugins.add("converse-smacks",{initialize(){Vc.settings.extend({enable_smacks:!0,smacks_max_unacked_stanzas:5}),Vc.listen.on("afterResourceBinding",Ed),Vc.listen.on("beforeResourceBinding",Cd),Vc.listen.on("send",jd),Vc.listen.on("userSessionInitialized",bd)}});
-/**
- * @module converse-vcard
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:Td,$iq:Od,dayjs:kd}=rl.env,Nd=rl.env.utils;rl.plugins.add("converse-vcard",{dependencies:["converse-status","converse-roster"],overrides:{XMPPStatus:{getNickname(){const{_converse:e}=this.__super__,t=this.__super__.getNickname.apply(this);return!t&&e.xmppstatus.vcard?e.xmppstatus.vcard.get("nickname"):t},getFullname(){const{_converse:e}=this.__super__,t=this.__super__.getFullname.apply(this);return!t&&e.xmppstatus.vcard?e.xmppstatus.vcard.get("fullname"):t}},RosterContact:{getDisplayName(){return!this.get("nickname")&&this.vcard?this.vcard.getDisplayName():this.__super__.getDisplayName.apply(this)},getFullname(){return this.vcard?this.vcard.get("fullname"):this.__super__.getFullname.apply(this)}}},initialize(){function e(e,t,n){const r=Od(t?{type:e,to:t}:{type:e});return n?r.cnode(n):r.c("vCard",{xmlns:Td.NS.VCARD}),r}async function t(t,n){const r=Td.getBareJidFromJid(n)===t.bare_jid?null:n;let i;try{i=await Vc.sendIQ(e("get",r))}catch(i){return{stanza:i,jid:n,vcard_error:(new Date).toISOString()}}return async function(e,t){const n=t.querySelector("vCard");let r={};var i,o,s,a,c,l,u;if(null!==n&&(r={stanza:t,fullname:null===(i=n.querySelector("FN"))||void 0===i?void 0:i.textContent,nickname:null===(o=n.querySelector("NICKNAME"))||void 0===o?void 0:o.textContent,image:null===(s=n.querySelector("PHOTO BINVAL"))||void 0===s?void 0:s.textContent,image_type:null===(a=n.querySelector("PHOTO TYPE"))||void 0===a?void 0:a.textContent,url:null===(c=n.querySelector("URL"))||void 0===c?void 0:c.textContent,role:null===(l=n.querySelector("ROLE"))||void 0===l?void 0:l.textContent,email:null===(u=n.querySelector("EMAIL USERID"))||void 0===u?void 0:u.textContent,vcard_updated:(new Date).toISOString(),vcard_error:void 0}),r.image){const e=Nd.base64ToArrayBuffer(r.image),t=await crypto.subtle.digest("SHA-1",e);r.image_hash=Nd.arrayBufferToHex(t)}return r}(0,i)}async function n(e){let t;if(e instanceof Uc.Message){if("error"===e.get("type"))return;t=e.get("from")}else t=e.get("jid");await Vc.waitUntil("VCardsInitialized"),e.vcard=Uc.vcards.findWhere({jid:t}),e.vcard||(e.vcard=Uc.vcards.create({jid:t})),e.vcard.on("change",()=>e.trigger("vcard:change"))}async function r(e){await Vc.waitUntil("VCardsInitialized"),["error","info"].includes(e.get("type"))||(e.vcard=function(e){var t;const n=null==e||null===(t=e.collection)||void 0===t?void 0:t.chatbox,r=Td.getResourceFromJid(e.get("from"));if(n&&n.get("nick")===r)return Uc.xmppstatus.vcard;{const t=e.occupant&&e.occupant.get("jid")||e.get("from");return t?Uc.vcards.findWhere({jid:t})||Uc.vcards.create({jid:t}):void zn.error("Could not assign VCard for message because no JID found! msgid: ".concat(e.get("msgid")))}}(e))}Vc.promises.add("VCardsInitialized"),Uc.VCard=qo.extend({defaults:{image:Uc.DEFAULT_IMAGE,image_type:Uc.DEFAULT_IMAGE_TYPE},set(e,t,n){let r;return"object"==typeof e?(r=e,n=t):(r={})[e]=t,"image"in r&&!r.image?(r.image=Uc.DEFAULT_IMAGE,r.image_type=Uc.DEFAULT_IMAGE_TYPE,qo.prototype.set.call(this,r,n)):qo.prototype.set.apply(this,arguments)},getDisplayName(){return this.get("nickname")||this.get("fullname")||this.get("jid")}}),Uc.VCards=ra.extend({model:Uc.VCard,initialize(){this.on("add",e=>e.get("jid")&&Vc.vcard.update(e))}}),Uc.initVCardCollection=async function(){Uc.vcards=new Uc.VCards,Uc.vcards.browserStorage=Uc.createStore("".concat(Uc.bare_jid,"-converse.vcards")),await new Promise(e=>{Uc.vcards.fetch({success:e,error:e},{silent:!0})});const e=Uc.vcards;if(Uc.session){const t=Uc.session.get("bare_jid");Uc.xmppstatus.vcard=e.findWhere({jid:t})||e.create({jid:t})}Vc.trigger("VCardsInitialized")},Vc.listen.on("chatBoxInitialized",e=>n(e)),Vc.listen.on("chatRoomInitialized",e=>n(e)),Vc.listen.on("chatRoomMessageInitialized",e=>r(e)),Vc.listen.on("addClientFeatures",()=>Vc.disco.own.features.add(Td.NS.VCARD)),Vc.listen.on("clearSession",()=>{Uc.shouldClearCache()&&(Vc.promises.add("VCardsInitialized"),Uc.vcards&&(Uc.vcards.clearStore(),delete Uc.vcards))}),Vc.listen.on("messageInitialized",e=>n(e)),Vc.listen.on("rosterContactInitialized",e=>n(e)),Vc.listen.on("statusInitialized",Uc.initVCardCollection),Object.assign(Uc.api,{vcard:{async set(t,n){if(!t)throw Error("No jid provided for the VCard data");const r=document.createElement("div"),i=Nd.toStanza('\n                        <vCard xmlns="vcard-temp">\n                            <FN>'.concat(n.fn,"</FN>\n                            <NICKNAME>").concat(n.nickname,"</NICKNAME>\n                            <URL>").concat(n.url,"</URL>\n                            <ROLE>").concat(n.role,"</ROLE>\n                            <EMAIL><INTERNET/><PREF/><USERID>").concat(n.email,"</USERID></EMAIL>\n                            <PHOTO>\n                                <TYPE>").concat(n.image_type,"</TYPE>\n                                <BINVAL>").concat(n.image,"</BINVAL>\n                            </PHOTO>\n                        </vCard>"),r);let o;try{o=await Vc.sendIQ(e("set",t,i))}catch(e){throw e}return await Vc.vcard.update(t,!0),o},get(e,n){if("string"==typeof e)return t(Uc,e);if(!n&&e.get("vcard_updated")&&kd(e.get("vcard_error")).isSame(new Date,"day"))return Promise.resolve({});{const n=e.get("jid");return n||zn.error("No JID to get vcard for"),t(Uc,n)}},async update(e,t){const n=await this.get(e,t);(e="string"==typeof e?Uc.vcards.findWhere({jid:e}):e)?(delete n.stanza,e.save(n)):zn.error("Could not find a VCard model for ".concat(e))}}})}});var Id=n(67),Md=n.n(Id);function Rd(e,t){return"string"==typeof e&&t.includes(e)}function Dd(e,t){return"string"!=typeof e||"en"!==e&&!t(e)?
-/**
- * @module i18n
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description This is the internationalization module
- */
-function(e){var t,n;if(window.navigator.userLanguage&&(t=Pd(window.navigator.userLanguage,e)),window.navigator.languages&&!t)for(n=0;n<window.navigator.languages.length&&!t;n++)t=Pd(window.navigator.languages[n],e);return window.navigator.browserLanguage&&!t&&(t=Pd(window.navigator.browserLanguage,e)),window.navigator.language&&!t&&(t=Pd(window.navigator.language,e)),window.navigator.systemLanguage&&!t&&(t=Pd(window.navigator.systemLanguage,e)),t||"en"}(t)||"en":e}function Pd(e,t){if(t(e))return e;var n=e.split("-")[0];return n!==e&&t(n)?n:void 0}let Ld;Object.assign(Hc,{getLocale:(e,t)=>Dd(e,e=>Rd(e,t)),translate(e){if(!Ld)return Md.a.sprintf.apply(Md.a,arguments);const t=Ld.translate(e);return arguments.length>1?t.fetch.apply(t,[].slice.call(arguments,1)):t.fetch()},async initialize(){if(Uc.isTestEnv())Uc.locale="en";else try{Uc.locale=Hc.getLocale(Vc.settings.get("i18n"),Vc.settings.get("locales")),await async function(e){const{api:t,locale:r}=e,i=r.toLowerCase().replace("_","-");if(!Rd(r,t.settings.get("locales"))||"en"===r)return;const{default:o}=await n(494)("./".concat(r,"/LC_MESSAGES/converse.po"));await n(495)("./".concat(i)),En.a.locale(Dd(i,e=>En.a.locale(e))),Ld=new Md.a(o)}(Uc)}catch(e){zn.fatal(e.message),Uc.locale="en"}},__:(...e)=>Hc.translate(...e)});const zd=Hc.__,Fd={};Vc.elements={registry:Fd,define:function(e,t){this.registry[e]=t},register:function(){Object.keys(Fd).forEach(e=>{customElements.get(e)||customElements.define(e,Fd[e])})}};
-/**
- * @module converse-autocomplete
- * @copyright Lea Verou and the Converse.js contributors
- * @description
- *  Converse.js plugin which started as a fork of Lea Verou's Awesomplete
- *  https://leaverou.github.io/awesomplete/
- * @license Mozilla Public License (MPLv2)
- */
-const Bd=rl.env.utils,qd=function(e,t){return RegExp(Wd.regExpEscape(t.trim()),"i").test(e)},Hd=function(e,t){return RegExp("^"+Wd.regExpEscape(t.trim()),"i").test(e)},Ud=function(e,t){const n=e.query.toLowerCase(),r=e.label.toLowerCase().indexOf(n),i=t.label.toLowerCase().indexOf(n);return r===i?function(e,t){return e.length!==t.length?e.length-t.length:e<t?-1:1}(e,t):(-1===r?1/0:r)<(-1===i?1/0:i)?-1:1},$d=(e,t)=>{t=t.trim();const n=document.createElement("li");n.setAttribute("aria-selected","false");const r=new RegExp("("+t+")","ig");return(t?e.split(r):[e]).forEach(e=>{if(t&&e.match(r)){const t=document.createElement("mark");t.textContent=e,n.appendChild(t)}else n.appendChild(document.createTextNode(e))}),n},Wd={getElement:(e,t)=>"string"==typeof e?(t||document).querySelector(e):e||null,bind(e,t){if(e)for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const r=t[n];n.split(/\s+/).forEach(t=>e.addEventListener(t,r))}},unbind(e,t){if(e)for(var n in t){if(!Object.prototype.hasOwnProperty.call(t,n))continue;const r=t[n];n.split(/\s+/).forEach(t=>e.removeEventListener(t,r))}},regExpEscape:e=>e.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&"),isMention:(e,t)=>t.includes(e[0])||Bd.isMentionBoundary(e[0])&&t.includes(e[1])};class Gd extends String{constructor(e,t){super();const n=Array.isArray(e)?{label:e[0],value:e[1]}:"object"==typeof e&&"label"in e&&"value"in e?e:{label:e,value:e};this.label=n.label||n.value,this.value=n.value,this.query=t}get lenth(){return this.label.length}toString(){return""+this.label}valueOf(){return this.toString()}}class Vd{constructor(e,t={}){this.is_opened=!1,Bd.hasClass("suggestion-box",e)?this.container=e:this.container=e.querySelector(".suggestion-box"),this.input=this.container.querySelector(".suggestion-box__input"),this.input.setAttribute("aria-autocomplete","list"),this.ul=this.container.querySelector(".suggestion-box__results"),this.status=this.container.querySelector(".suggestion-box__additions"),Object.assign(this,{match_current_word:!1,ac_triggers:[],include_triggers:[],min_chars:2,max_items:10,auto_evaluate:!0,auto_first:!1,data:e=>e,filter:qd,sort:!1!==t.sort&&Ud,item:$d},t),this.index=-1,this.bindEvents(),this.input.hasAttribute("list")?(this.list="#"+this.input.getAttribute("list"),this.input.removeAttribute("list")):this.list=this.input.getAttribute("data-list")||t.list||[]}bindEvents(){const e={blur:()=>this.close({reason:"blur"})};this.auto_evaluate&&(e.input=()=>this.evaluate()),this._events={input:e,form:{submit:()=>this.close({reason:"submit"})},ul:{mousedown:e=>this.onMouseDown(e),mouseover:e=>this.onMouseOver(e)}},Wd.bind(this.input,this._events.input),Wd.bind(this.input.form,this._events.form),Wd.bind(this.ul,this._events.ul)}set list(e){if(Array.isArray(e)||"function"==typeof e)this._list=e;else if("string"==typeof e&&e.includes(","))this._list=e.split(/\s*,\s*/);else{var t;const n=(null===(t=Wd.getElement(e))||void 0===t?void 0:t.children)||[];this._list=Array.from(n).filter(e=>!e.disabled).map(e=>{const t=e.textContent.trim(),n=e.value||t,r=e.label||t;return""!==n?{label:r,value:n}:null}).filter(e=>e)}document.activeElement===this.input&&this.evaluate()}get list(){return this._list}get selected(){return this.index>-1}get opened(){return this.is_opened}close(e){this.opened&&(this.ul.setAttribute("hidden",""),this.is_opened=!1,this.index=-1,this.trigger("suggestion-box-close",e||{}))}insertValue(e){this.match_current_word?Bd.replaceCurrentWord(this.input,e.value):this.input.value=e.value}open(){this.ul.removeAttribute("hidden"),this.is_opened=!0,this.auto_first&&-1===this.index&&this.goto(0),this.trigger("suggestion-box-open")}destroy(){Wd.unbind(this.input,this._events.input),Wd.unbind(this.input.form,this._events.form),this.input.removeAttribute("aria-autocomplete")}next(){const e=this.ul.children.length;this.goto(this.index<e-1?this.index+1:e?0:-1)}previous(){const e=this.ul.children.length,t=this.index-1;this.goto(this.selected&&-1!==t?t:e-1)}goto(e){const t=this.ul.children;this.selected&&t[this.index].setAttribute("aria-selected","false"),this.index=e,e>-1&&t.length>0&&(t[e].setAttribute("aria-selected","true"),t[e].focus(),this.status.textContent=t[e].textContent,this.ul.scrollTop=t[e].offsetTop-this.ul.clientHeight+t[e].clientHeight,this.trigger("suggestion-box-highlight",{text:this.suggestions[this.index]}))}select(e){if(e?this.index=Bd.siblingIndex(e):e=this.ul.children[this.index],e){const e=this.suggestions[this.index];this.insertValue(e),this.close({reason:"select"}),this.auto_completing=!1,this.trigger("suggestion-box-selectcomplete",{text:e})}}onMouseOver(e){const t=Bd.ancestor(e.target,"li");t&&this.goto(Array.prototype.slice.call(this.ul.children).indexOf(t))}onMouseDown(e){if(0!==e.button)return;const t=Bd.ancestor(e.target,"li");t&&(e.preventDefault(),this.select(t,e.target))}onKeyDown(e){if(this.opened){if([rl.keycodes.ENTER,rl.keycodes.TAB].includes(e.keyCode)&&this.selected)return e.preventDefault(),e.stopPropagation(),this.select(),!0;if(e.keyCode===rl.keycodes.ESCAPE)return this.close({reason:"esc"}),!0;if([rl.keycodes.UP_ARROW,rl.keycodes.DOWN_ARROW].includes(e.keyCode))return e.preventDefault(),e.stopPropagation(),this[e.keyCode===rl.keycodes.UP_ARROW?"previous":"next"](),!0}if(![rl.keycodes.SHIFT,rl.keycodes.META,rl.keycodes.META_RIGHT,rl.keycodes.ESCAPE,rl.keycodes.ALT].includes(e.keyCode))if(this.ac_triggers.includes(e.key))"Tab"===e.key&&e.preventDefault(),this.auto_completing=!0;else if("Backspace"===e.key){const t=Bd.getCurrentWord(e.target,e.target.selectionEnd-1);Wd.isMention(t,this.ac_triggers)&&(this.auto_completing=!0)}}async evaluate(e){const t=this.selected&&e&&(e.keyCode===rl.keycodes.UP_ARROW||e.keyCode===rl.keycodes.DOWN_ARROW);if(!this.auto_evaluate&&!this.auto_completing||t)return;const n="function"==typeof this._list?await this._list():this._list;if(0===n.length)return;let r=this.match_current_word?Bd.getCurrentWord(this.input):this.input.value;const i=Wd.isMention(r,this.ac_triggers);i&&(this.auto_completing=!0,this.include_triggers.includes(e.key)||(r=Bd.isMentionBoundary(r[0])?r.slice("2"):r.slice("1"))),(i||r.length)&&r.length>=this.min_chars?(this.index=-1,this.ul.innerHTML="",this.suggestions=n.map(e=>new Gd(this.data(e,r),r)).filter(e=>this.filter(e,r)),!1!==this.sort&&(this.suggestions=this.suggestions.sort(this.sort)),this.suggestions=this.suggestions.slice(0,this.max_items),this.suggestions.forEach(e=>this.ul.appendChild(this.item(e,r))),0===this.ul.children.length?this.close({reason:"nomatches"}):this.open()):(this.close({reason:"nomatches"}),i||(this.auto_completing=!1))}}function Jd(){const e=Qd(['\n        <div class="list-container list-container--bookmarks ','">\n            <a class="list-toggle bookmarks-toggle controlbox-padded"\n            title="','"\n            @click=','>\n\n                <span class="fa ','">\n                </span> ','</a>\n            <div class="items-list bookmarks rooms-list ','">\n            ',"\n            </div>\n        </div>\n    "]);return Jd=function(){return e},e}function Xd(){const e=Qd(['\n        <div class="list-item controlbox-padded room-item available-chatroom d-flex flex-row ','" data-room-jid="','">\n            <a class="list-item-link open-room w-100" data-room-jid="','"\n            title="','"\n            @click=',">",'</a>\n\n            <a class="list-item-action remove-bookmark fa fa-bookmark align-self-center ','"\n            data-room-jid="','"\n            data-bookmark-name="','"\n            title="','"\n            @click=',"></a>\n        </div>\n    "]);return Xd=function(){return e},e}function Qd(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.assign(Vd.prototype,_i),rl.plugins.add("converse-autocomplete",{initialize(){const e=this._converse;e.FILTER_CONTAINS=qd,e.FILTER_STARTSWITH=Hd,e.AutoComplete=Vd}});var Yd=e=>{const t=zd("Click to toggle the bookmarks list"),n=zd("Bookmarks");return Za(Jd(),e.hidden?"":"hidden",t,e.toggleBookmarksList,e.toggle_state===e._converse.OPENED?"fa-caret-down":"fa-caret-right",n,e.toggle_state!==e._converse.OPENED?"hidden":"",e.bookmarks.map(t=>(e=>{const t=zd("Unbookmark this groupchat"),n=zd("Click to open this groupchat");return Za(Xd(),e.is_hidden(e.bm)?"hidden":"",e.bm.get("jid"),e.bm.get("jid"),n,e.openRoom,e.bm.getDisplayName(),e.bm.get("bookmarked")?"button-on":"",e.bm.get("jid"),e.bm.getDisplayName(),t,e.removeBookmark)})(Object.assign({bm:t},e))))};function Kd(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n        <form class="converse-form chatroom-form" @submit=',">\n            <legend>",'</legend>\n            <fieldset class="form-group">\n                <label for="converse_muc_bookmark_name">','</label>\n                <input class="form-control" type="text" value="','" name="name" required="required" id="converse_muc_bookmark_name"/>\n            </fieldset>\n            <fieldset class="form-group">\n                <label for="converse_muc_bookmark_nick">','</label>\n                <input class="form-control" type="text" name="nick" value="','" id="converse_muc_bookmark_nick"/>\n            </fieldset>\n            <fieldset class="form-group form-check">\n                <input class="form-check-input" id="converse_muc_bookmark_autojoin" type="checkbox" name="autojoin"/>\n                <label class="form-check-label" for="converse_muc_bookmark_autojoin">','</label>\n            </fieldset>\n            <fieldset class="form-group">\n                <input class="btn btn-primary" type="submit" value="','">\n                <input class="btn btn-secondary button-cancel" type="button" value="','" @click=',">\n            </fieldset>\n        </form>\n    "]);return Kd=function(){return e},e}const Zd=/^\s*</,eh=("undefined"!=typeof Element&&Element.prototype,function(e){this.cid=vi("view"),this._domEvents=[],this.preinitialize.apply(this,arguments),Or(this,Bo(e,nh)),this._ensureElement(),this.initialize.apply(this,arguments)});eh.extend=Yr;const th=/^(\S+)\s*(.*)$/,nh=["model","collection","el","id","attributes","className","tagName","events"];Object.assign(eh.prototype,_i,{tagName:"div",$:function(e){return this.el.querySelectorAll(e)},preinitialize:function(){},initialize:function(){},render:function(){return M(this.beforeRender)&&this.beforeRender(),M(this.toHTML)&&Ya(this.toHTML(),this.el),M(this.afterRender)&&this.afterRender(),this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.undelegateEvents(),this.el.parentNode&&this.el.parentNode.removeChild(this.el)},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){if("string"==typeof e)if(Zd.test(e)){const t=document.createElement("div");t.innerHTML=e,this.el=t.firstChild}else this.el=document.querySelector(e);else e&&!Dn(e)&&e.length?this.el=e[0]:this.el=e},delegateEvents:function(e){if(e||(e=Qr(this,"events")),!e)return this;this.undelegateEvents();for(const t in e){let n=e[t];if(M(n)||(n=this[n]),!n)continue;const r=t.match(th);this.delegate(r[1],r[2],n.bind(this))}return this},delegate:function(e,t,n){const r=this.el;if(!r)return this;if("function"==typeof t&&(n=t,t=null),-1!==["focus","blur"].indexOf(e)){const r=this.el.querySelectorAll(t);for(let t=0,i=r.length;t<i;t++){const i=r[t];i.addEventListener(e,n,!1),this._domEvents.push({el:i,eventName:e,handler:n})}return n}const i=t?function(e){let i=e.target||e.srcElement;for(;i&&i!=r;i=i.parentNode)i.matches(t)&&(e.delegateTarget=i,n(e))}:n;return this.el.addEventListener(e,i,!1),this._domEvents.push({el:this.el,eventName:e,handler:i,listener:n,selector:t}),this},undelegateEvents:function(){if(this.el){for(let e=0,t=this._domEvents.length;e<t;e++){const t=this._domEvents[e];t.el.removeEventListener(t.eventName,t.handler,!1)}this._domEvents.length=0}return this},undelegate:function(e,t,n){if("function"==typeof t&&(n=t,t=null),this.el){const r=this._domEvents.slice();let i=r.length;for(;i--;){const o=r[i];!(o.eventName!==e||n&&o.listener!==n||t&&o.selector!==t)&&(o.el.removeEventListener(o.eventName,o.handler,!1),this._domEvents.splice(i,1))}}return this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(Qr(this,"el"));else{const e=Or({},Qr(this,"attributes"));this.id&&(e.id=Qr(this,"id")),this.className&&(e.class=Qr(this,"className")),this.setElement(this._createElement(Qr(this,"tagName"))),this._setAttributes(e)}},_setAttributes:function(e){for(const t in e)t in this.el?this.el[t]=e[t]:this.el.setAttribute(t,e[t])}});var rh=jr((function(e,t,n){var r=-1,i="function"==typeof t,o=Xe(e)?Array(e.length):[];return vs(e,(function(e){o[++r]=i?yr(t,e,n):Dc(e,t,n)})),o}));
-/**
- * @module converse-bookmark-views
- * @description Converse.js plugin which adds views for XEP-0048 bookmarks
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:ih}=rl.env,oh=rl.env.utils;rl.plugins.add("converse-bookmark-views",{dependencies:["converse-chatboxes","converse-muc","converse-muc-views"],initialize(){Vc.settings.extend({hide_open_bookmarks:!0}),Object.assign(Uc,{removeBookmarkViaEvent(e){e.preventDefault();const t=e.target.getAttribute("data-bookmark-name"),n=e.target.getAttribute("data-room-jid");confirm(zd('Are you sure you want to remove the bookmark "%1$s"?',t))&&rh(Uc.bookmarks.where({jid:n}),qo.prototype.destroy)},addBookmarkViaEvent(e){e.preventDefault();const t=e.target.getAttribute("data-room-jid");Vc.rooms.open(t,{bring_to_foreground:!0}),Uc.chatboxviews.get(t).renderBookmarkForm()}});const e={setBookmarkState(){if(void 0!==Uc.bookmarks){Uc.bookmarks.where({jid:this.model.get("jid")}).length?this.model.save("bookmarked",!0):this.model.save("bookmarked",!1)}},renderBookmarkForm(){if(this.hideChatRoomContents(),!this.bookmark_form){this.bookmark_form=new Uc.MUCBookmarkForm({model:this.model,chatroomview:this}),this.el.querySelector(".chatroom-body").insertAdjacentElement("beforeend",this.bookmark_form.el)}oh.showElement(this.bookmark_form.el)},toggleBookmark(e){null==e||e.preventDefault();const t=Uc.bookmarks.where({jid:this.model.get("jid")});t.length?t.forEach(e=>e.destroy()):this.renderBookmarkForm()}};Object.assign(Uc.ChatRoomView.prototype,e),Uc.MUCBookmarkForm=eh.extend({className:"muc-bookmark-form chatroom-form-container",initialize(e){this.chatroomview=e.chatroomview,this.render()},toHTML(){return(e=>{const t=zd("Bookmark this groupchat"),n=zd("Would you like this groupchat to be automatically joined upon startup?"),r=zd("Cancel"),i=zd("The name for this bookmark:"),o=zd("What should your nickname for this groupchat be?"),s=zd("Save");return Za(Kd(),e.onSubmit,t,i,e.name,o,e.nick||"",n,s,r,e.onCancel)})(Object.assign(this.model.toJSON(),{onCancel:e=>this.closeBookmarkForm(e),onSubmit:e=>this.onBookmarkFormSubmitted(e)}))},onBookmarkFormSubmitted(e){var t,n,r;e.preventDefault(),Uc.bookmarks.createBookmark({jid:this.model.get("jid"),autojoin:(null===(t=e.target.querySelector('input[name="autojoin"]'))||void 0===t?void 0:t.checked)||!1,name:null===(n=e.target.querySelector("input[name=name]"))||void 0===n?void 0:n.value,nick:null===(r=e.target.querySelector("input[name=nick]"))||void 0===r?void 0:r.value}),this.closeBookmarkForm(e)},closeBookmarkForm(e){e.preventDefault(),this.chatroomview.closeForm()}}),Uc.BookmarksView=eh.extend({tagName:"span",initialize(){this.listenTo(this.model,"add",this.render),this.listenTo(this.model,"remove",this.render),this.listenTo(Uc.chatboxes,"add",this.render),this.listenTo(Uc.chatboxes,"remove",this.render);const e="converse.room-bookmarks".concat(Uc.bare_jid,"-list-model");this.list_model=new Uc.BookmarksList({id:e}),this.list_model.browserStorage=Uc.createStore(e);const t=()=>{this.render(),this.insertIntoControlBox()};this.list_model.fetch({success:t,error:t})},toHTML(){return Yd({_converse:Uc,bookmarks:this.model,hidden:this.model.getUnopenedBookmarks().length&&!0,is_hidden:e=>!(!Vc.settings.get("hide_open_bookmarks")||!Uc.chatboxes.get(e.get("jid"))),openRoom:e=>this.openRoom(e),removeBookmark:e=>this.removeBookmark(e),toggleBookmarksList:e=>this.toggleBookmarksList(e),toggle_state:this.list_model.get("toggle-state")})},insertIntoControlBox(){const e=Uc.chatboxviews.get("controlbox");if(void 0!==e&&!oh.rootContains(Uc.root,this.el)){const t=e.el.querySelector(".list-container--bookmarks");t&&t.parentNode.replaceChild(this.el,t)}},openRoom(e){e.preventDefault();const t=e.target.textContent,n=e.target.getAttribute("data-room-jid"),r={name:t||ih.unescapeNode(ih.getNodeFromJid(n))||n};Vc.rooms.open(n,r,!0)},removeBookmark:Uc.removeBookmarkViaEvent,toggleBookmarksList(e){e&&e.preventDefault&&e.preventDefault();const t=e.target.matches(".fa")?e.target:e.target.querySelector(".fa");oh.hasClass("fa-caret-down",t)?(oh.slideIn(this.el.querySelector(".bookmarks")),this.list_model.save({"toggle-state":Uc.CLOSED}),t.classList.remove("fa-caret-down"),t.classList.add("fa-caret-right")):(t.classList.remove("fa-caret-right"),t.classList.add("fa-caret-down"),oh.slideOut(this.el.querySelector(".bookmarks")),this.list_model.save({"toggle-state":Uc.OPENED}))}});Vc.listen.on("getHeadingButtons",(e,t)=>{if(Uc.allow_bookmarks&&e.model.get("type")===Uc.CHATROOMS_TYPE){const n=e.model.get("bookmarked"),r={i18n_title:zd(n?"Unbookmark this groupchat":"Bookmark this groupchat"),i18n_text:zd(n?"Unbookmark":"Bookmark"),handler:t=>e.toggleBookmark(t),a_class:"toggle-bookmark",icon_class:"fa-bookmark",name:"bookmark"},i=t.map(e=>e.name).indexOf("details"),o=Uc.checkBookmarksSupport().then(e=>e?r:"");return i>-1?[...t.slice(0,i),o,...t.slice(i)]:[o,...t]}return t}),Vc.listen.on("bookmarksInitialized",(async function(){await Vc.waitUntil("roomsPanelRendered"),Uc.bookmarksview=new Uc.BookmarksView({model:Uc.bookmarks}),Vc.trigger("bookmarkViewsInitialized")})),Vc.listen.on("chatRoomViewInitialized",e=>e.setBookmarkState())}});var sh=n(35),ah=n.n(sh);function ch(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <audio controls src="','"></audio>\n    <a target="_blank" rel="noopener" href="','">',"</a>\n"]);return ch=function(){return e},e}function lh(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<a target="_blank" rel="noopener" href="','">',"</a>"]);return lh=function(){return e},e}var uh=e=>Za(lh(),e.url,e.label_download),dh=n(170),hh=n.n(dh),fh=n(171),ph=n.n(fh),gh=n(64),mh=n.n(gh),vh=n(172),_h=n.n(vh),bh=n(173),yh=n.n(bh),wh=n(174),Sh=n.n(wh),xh=n(65),Eh=n.n(xh);function Ah(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<a href="','"\n                class="chat-image__link"\n                target="_blank"\n                rel="noopener"\n            ><img class="chat-image img-thumbnail" src="','" @click='," @error="," @load=","/></a>"]);return Ah=function(){return e},e}const Ch=ka((e,t,n,r)=>i=>{i.setValue(Za(Ah(),t,e,r,(function(){const o=rl.env.utils;o.isURLWithImageExtension(e)?(i.setValue(o.convertUrlToHyperlink(t)),i.commit()):(i.setValue(Ch("".concat(e,".png"),t,n,r)),i.commit())}),n))});function jh(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["",""]);return jh=function(){return e},e}var Th=n(175),Oh=n.n(Th);function kh(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<video controls preload="metadata" src="','" style="max-height: 50vh"></video>']);return kh=function(){return e},e}function Nh(){const e=Mh(['<a target="_blank" rel="noopener" href="','">',"</a>"]);return Nh=function(){return e},e}function Ih(){const e=Mh(['\n            <a target="_blank"\n               rel="noopener"\n               @click=','\n               href="','">',"</a>"]);return Ih=function(){return e},e}function Mh(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
-/**
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description This is the DOM/HTML utilities module.
- */const Rh=["http","https","xmpp","mailto"];function Dh(e,t){return{"muc#roomconfig_lang":"language","muc#roomconfig_roomsecret":(null==t?void 0:t.new_password)?"new-password":"current-password"}[e]}const Ph={"text-private":"password","text-single":"text",fixed:"label",boolean:"checkbox",hidden:"hidden","jid-multi":"textarea","list-single":"dropdown","list-multi":"dropdown"};function Lh(e){try{return e instanceof ah.a?e:new ah.a(e)}catch(e){return zn.debug(e),null}}function zh(e,t){const n=Lh(t);if(null===n||!function(e){return"http:"===window.location.protocol||"https:"===window.location.protocol&&"https"===e.protocol().toLowerCase()}(n))return!1;const r=n.filename().toLowerCase();return!!e.filter(e=>r.endsWith(e)).length}function Fh(e){try{return decodeURI(e.filename())}catch(t){return zn.debug(t),e.filename()}}function Bh(e,t){const{__:n}=e;return r={url:t.toString(),label_download:n('Download audio file "%1$s"',Fh(t))},Za(ch(),r.url,r.url,r.label_download);var r}function qh(e){e.preventDefault(),Vc.rooms.open(e.target.href)}function Hh(e,t){e.classList.remove("visible"),M(t)&&t()}Jo.isAudioURL=e=>zh([".ogg",".mp3",".m4a"],e),Jo.isVideoURL=e=>zh([".mp4",".webm"],e),Jo.isURLWithImageExtension=e=>zh([".jpg",".jpeg",".png",".gif",".bmp",".tiff",".svg"],e),Jo.isImageURL=e=>{const t=Vc.settings.get("image_urls_regex");return(null==t?void 0:t.test(e))||Jo.isURLWithImageExtension(e)},Jo.isImageDomainAllowed=e=>{const t=Vc.settings.get("show_images_inline");if(!Array.isArray(t))return!0;try{const n=Lh(e).domain();return t.includes(n)}catch(e){return zn.debug(e),!0}},Jo.getOOBURLMarkup=function(e,t){const n=Lh(t);return null===n?t:Jo.isVideoURL(n)?(r={url:t},Za(kh(),r.url)):Jo.isAudioURL(n)?Bh(e,n):Jo.isImageURL(n)?function(e,t){const{__:n}=e;return uh({url:t.toString(),label_download:n('Download image file "%1$s"',Fh(t))})}(e,n):function(e,t){const{__:n}=e;return uh({url:t.toString(),label_download:n('Download file "%1$s"',Fh(t))})}(e,n);var r},Jo.applyDragResistance=function(e,t){if(void 0===e)return;if(void 0===t)return e;return e!==t&&Math.abs(e-t)<10?t:e},Jo.calculateElementHeight=function(e){return Array.from(e.children).reduce((e,t)=>e+t.offsetHeight,0)},Jo.getNextElement=function(e,t="*"){let n=e.nextElementSibling;for(;null!==n&&!mr.a.matchesSelector(n,t);)n=n.nextElementSibling;return n},Jo.getPreviousElement=function(e,t="*"){let n=e.previousElementSibling;for(;null!==n&&!mr.a.matchesSelector(n,t);)n=n.previousElementSibling;return n},Jo.getFirstChildElement=function(e,t="*"){let n=e.firstElementChild;for(;null!==n&&!mr.a.matchesSelector(n,t);)n=n.nextElementSibling;return n},Jo.getLastChildElement=function(e,t="*"){let n=e.lastElementChild;for(;null!==n&&!mr.a.matchesSelector(n,t);)n=n.previousElementSibling;return n},Jo.hasClass=function(e,t){return t instanceof Element&&t.classList.contains(e)},Jo.toggleClass=function(e,t){Jo.hasClass(e,t)?Jo.removeClass(e,t):Jo.addClass(e,t)},Jo.addClass=function(e,t){return t instanceof Element&&t.classList.add(e),t},Jo.removeClass=function(e,t){return t instanceof Element&&t.classList.remove(e),t},Jo.removeElement=function(e){return e instanceof Element&&e.parentNode&&e.parentNode.removeChild(e),e},Jo.getElementFromTemplateResult=function(e){const t=document.createElement("div");return Ya(e,t),t.firstElementChild},Jo.showElement=e=>{Jo.removeClass("collapsed",e),Jo.removeClass("hidden",e)},Jo.hideElement=function(e){return e instanceof Element&&e.classList.add("hidden"),e},Jo.ancestor=function(e,t){let n=e;for(;null!==n&&!mr.a.matchesSelector(n,t);)n=n.parentElement;return n},Jo.nextUntil=function(e,t){const n=[];let r=e.nextElementSibling;for(;null!==r&&!r.matches(t);)n.push(r),r=r.nextElementSibling;return n},Jo.unescapeHTML=function(e){var t=document.createElement("div");return t.innerHTML=e,t.innerText},Jo.escapeHTML=function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")},Jo.convertToImageTag=function(e,t,n){return r={url:e,onClick:n,onLoad:t},Za(jh(),Ch(r.url,r.url,r.onLoad,r.onClick));var r},Jo.convertURIoHyperlink=function(e,t){let n=e.normalize()._string;const r=e._parts.urn?n:e.readable(),i=t||r;return e._parts.protocol||n.startsWith("http://")||n.startsWith("https://")||(n="http://"+n),"xmpp"===e._parts.protocol&&"join"===e._parts.query?Za(Ih(),qh,n,i):Za(Nh(),n,i)},Jo.convertUrlToHyperlink=function(e){const t=RegExp("^w{3}.","ig").test(e)?"http://".concat(e):e,n=Lh(e);return null===n||!function(e){try{return!!new URL(e)}catch(e){return!1}}(t)||!function(e,t=Rh){return!!t.includes(e)}(n._parts.protocol)&&n._parts.protocol?e:this.convertURIoHyperlink(n,e)},Jo.filterQueryParamsFromURL=function(e){const t=Vc.settings.get("filter_url_query_params");return t?Lh(e).removeQuery(t).toString():e},Jo.addHyperlinks=function(e){const t=[],n={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|xmpp:|mailto:|www\.)/gi};try{ah.a.withinString(e,(e,n,r)=>(t.push({url:e,start:n,end:r}),e),n)}catch(t){return zn.debug(t),[e]}let r=[e];return t.length?t.sort((e,t)=>t.start-e.start).forEach(e=>{const t=r.shift(),n=t.slice(e.start,e.end);r=[t.slice(0,e.start),Jo.convertUrlToHyperlink(n),t.slice(e.end),...r]}):r=[e],r},Jo.httpToGeoUri=function(e,t){return e.replace(t.api.settings.get("geouri_regex"),"geo:$1,$2")},Jo.slideInAllElements=function(e,t=300){return Promise.all(Array.from(e).map(e=>Jo.slideIn(e,t)))},Jo.slideToggleElement=function(e,t){return Jo.hasClass("collapsed",e)||Jo.hasClass("hidden",e)?Jo.slideOut(e,t):Jo.slideIn(e,t)},Jo.slideOut=function(e,t=200){return new Promise((n,r)=>{if(!e){const e="An element needs to be passed in to slideOut";return zn.warn(e),void r(new Error(e))}const i=e.getAttribute("data-slider-marker");i&&(e.removeAttribute("data-slider-marker"),window.cancelAnimationFrame(i));const o=Jo.calculateElementHeight(e);if(window.converse_disable_effects)return e.style.height=o+"px",function(e){e.removeAttribute("data-slider-marker"),e.classList.remove("collapsed"),e.style.overflow="",e.style.height=""}(e),void n();if(!Jo.hasClass("collapsed",e)&&!Jo.hasClass("hidden",e))return void n();const s=t/17;let a=0;e.style.height="0",e.style.overflow="hidden",e.classList.remove("hidden"),e.classList.remove("collapsed"),e.setAttribute("data-slider-marker",window.requestAnimationFrame((function t(){a+=o/s,a<o?(e.style.height=a+"px",e.setAttribute("data-slider-marker",window.requestAnimationFrame(t))):(e.removeAttribute("data-slider-marker"),e.style.height=Jo.calculateElementHeight(e)+"px",e.style.overflow="",e.style.height="",n())})))})},Jo.slideIn=function(e,t=200){return new Promise((n,r)=>{if(!e){const e="An element needs to be passed in to slideIn";return zn.warn(e),r(new Error(e))}if(Jo.hasClass("collapsed",e))return n(e);if(window.converse_disable_effects)return e.classList.add("collapsed"),e.style.height="",n(e);const i=e.getAttribute("data-slider-marker");i&&(e.removeAttribute("data-slider-marker"),window.cancelAnimationFrame(i));const o=e.offsetHeight,s=t/17;let a=o;e.style.overflow="hidden",e.setAttribute("data-slider-marker",window.requestAnimationFrame((function t(){a-=o/s,a>0?(e.style.height=a+"px",e.setAttribute("data-slider-marker",window.requestAnimationFrame(t))):(e.removeAttribute("data-slider-marker"),e.classList.add("collapsed"),e.style.height="",n(e))})))})},Jo.isInDOM=function(e){return document.querySelector("body").contains(e)},Jo.isVisible=function(e){return null!==e&&(!Jo.hasClass("hidden",e)&&(e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0))},Jo.fadeIn=function(e,t){if(e||zn.warn("An element needs to be passed in to fadeIn"),window.converse_disable_effects)return e.classList.remove("hidden"),Hh(e,t);Jo.hasClass("hidden",e)?(e.classList.add("visible"),e.classList.remove("hidden"),e.addEventListener("webkitAnimationEnd",()=>Hh(e,t)),e.addEventListener("animationend",()=>Hh(e,t)),e.addEventListener("oanimationend",()=>Hh(e,t))):Hh(e,t)},Jo.xForm2webForm=function(e,t,n){if("list-single"===e.getAttribute("type")||"list-multi"===e.getAttribute("type")){const t=Jo.queryChildren(e,"value").map(e=>null==e?void 0:e.textContent),n=Jo.queryChildren(e,"option").map(n=>{var r;const i=null===(r=n.querySelector("value"))||void 0===r?void 0:r.textContent;return Oh()({value:i,label:n.getAttribute("label"),selected:t.includes(i),required:!!e.querySelector("required")})});return _h()({id:Jo.getUniqueId(),name:e.getAttribute("var"),label:e.getAttribute("label"),options:n.join(""),multiple:"list-multi"===e.getAttribute("type"),required:!!e.querySelector("required")})}if("fixed"===e.getAttribute("type")){var r;return'<p class="form-help">'+(null===(r=e.querySelector("value"))||void 0===r?void 0:r.textContent)+"</p>"}var i,o,s;if("jid-multi"===e.getAttribute("type"))return yh()({name:e.getAttribute("var"),label:e.getAttribute("label")||"",value:null===(i=e.querySelector("value"))||void 0===i?void 0:i.textContent,required:!!e.querySelector("required")});if("boolean"===e.getAttribute("type")){var a;const t=null===(a=e.querySelector("value"))||void 0===a?void 0:a.textContent;return ph()({id:Jo.getUniqueId(),name:e.getAttribute("var"),label:e.getAttribute("label")||"",checked:"1"===t||"true"===t?'checked="1"':"",required:!!e.querySelector("required")})}if("url"===e.getAttribute("var"))return Sh()({label:e.getAttribute("label")||"",value:null===(o=e.querySelector("value"))||void 0===o?void 0:o.textContent});if("username"===e.getAttribute("var"))return Eh()({domain:" @"+n.domain,name:e.getAttribute("var"),type:Ph[e.getAttribute("type")],label:e.getAttribute("label")||"",value:null===(s=e.querySelector("value"))||void 0===s?void 0:s.textContent,required:!!e.querySelector("required")});if("ocr"===e.getAttribute("var")){const n=e.querySelector("uri"),r=mr()('data[cid="'+n.textContent.replace(/^cid:/,"")+'"]',t)[0];return hh()({label:e.getAttribute("label"),name:e.getAttribute("var"),data:null==r?void 0:r.textContent,type:n.getAttribute("type"),required:!!e.querySelector("required")})}{var c;const t=e.getAttribute("var");return mh()({id:Jo.getUniqueId(),label:e.getAttribute("label")||"",name:t,fixed_username:null==n?void 0:n.fixed_username,autocomplete:Dh(t,n),placeholder:null,required:!!e.querySelector("required"),type:Ph[e.getAttribute("type")],value:null===(c=e.querySelector("value"))||void 0===c?void 0:c.textContent})}};var Uh=Jo;const{keycodes:$h}=rl;function Wh(e){let t=0;do{isNaN(e.offsetTop)||(t+=e.offsetTop)}while(e=e.offsetParent);return t}function Gh(e){let t=0;do{isNaN(e.offsetLeft)||(t+=e.offsetLeft)}while(e=e.offsetParent);return t}class Vh{static get DIRECTION(){return{down:"down",end:"end",home:"home",left:"left",right:"right",up:"up"}}static get DEFAULTS(){return{home:["".concat($h.SHIFT,"+").concat($h.UP_ARROW)],end:["".concat($h.SHIFT,"+").concat($h.DOWN_ARROW)],up:[$h.UP_ARROW],down:[$h.DOWN_ARROW],left:[$h.LEFT_ARROW,"".concat($h.SHIFT,"+").concat($h.TAB)],right:[$h.RIGHT_ARROW,$h.TAB],getSelector:null,jump_to_picked:null,jump_to_picked_direction:null,jump_to_picked_selector:"picked",onSelected:null,selected:"selected",selector:"li"}}static getClosestElement(e,t){return e.reduce((e,n)=>{const r=t(n);return r<e.distance?{distance:r,element:n}:e},{distance:1/0}).element}constructor(e,t){this.doc=window.document,this.container=e,this.scroll_container=t.scroll_container||e,this.options=Object.assign({},Vh.DEFAULTS,t),this.init()}init(){this.selected=null,this.keydownHandler=null,this.elements={},this.keys={},this.options.down.forEach(e=>this.keys[e]=Vh.DIRECTION.down),this.options.end.forEach(e=>this.keys[e]=Vh.DIRECTION.end),this.options.home.forEach(e=>this.keys[e]=Vh.DIRECTION.home),this.options.left.forEach(e=>this.keys[e]=Vh.DIRECTION.left),this.options.right.forEach(e=>this.keys[e]=Vh.DIRECTION.right),this.options.up.forEach(e=>this.keys[e]=Vh.DIRECTION.up)}enable(){this.getElements(),this.keydownHandler=e=>this.handleKeydown(e),this.doc.addEventListener("keydown",this.keydownHandler),this.enabled=!0}disable(){this.keydownHandler&&this.doc.removeEventListener("keydown",this.keydownHandler),this.unselect(),this.elements={},this.enabled=!1}destroy(){this.disable(),this.container.domNavigator&&delete this.container.domNavigator}getNextElement(e){let t;if(e===Vh.DIRECTION.home)t=this.getElements(e)[0];else if(e===Vh.DIRECTION.end)t=Array.from(this.getElements(e)).pop();else if(this.selected)if(e===Vh.DIRECTION.right){const n=this.getElements(e);t=n.slice(n.indexOf(this.selected))[1]}else if(e==Vh.DIRECTION.left){const n=this.getElements(e);t=n.slice(0,n.indexOf(this.selected)).pop()||this.selected}else if(e==Vh.DIRECTION.down){const e=this.selected.offsetLeft,n=this.selected.offsetTop+this.selected.offsetHeight,r=this.elementsAfter(0,n),i=t=>Math.abs(t.offsetLeft-e)+Math.abs(t.offsetTop-n);t=Vh.getClosestElement(r,i)}else{if(e!=Vh.DIRECTION.up)throw new Error("getNextElement: invalid direction value");{const e=this.selected.offsetLeft,n=this.selected.offsetTop-1,r=this.elementsBefore(1/0,n),i=t=>Math.abs(e-t.offsetLeft)+Math.abs(n-t.offsetTop);t=Vh.getClosestElement(r,i)}}else t=e===Vh.DIRECTION.right||e===Vh.DIRECTION.down?this.getElements(e)[1]:this.getElements(e)[0];return this.options.jump_to_picked&&t&&t.matches(this.options.jump_to_picked)&&e===this.options.jump_to_picked_direction&&(t=this.container.querySelector(this.options.jump_to_picked_selector)||t),t}select(e,t){e&&e!==this.selected&&(this.unselect(),t&&this.scrollTo(e,t),e.matches("input")?e.focus():Uh.addClass(this.options.selected,e),this.selected=e,this.options.onSelected&&this.options.onSelected(e))}unselect(){this.selected&&(Uh.removeClass(this.options.selected,this.selected),delete this.selected)}scrollTo(e,t){if(this.inScrollContainerViewport(e)){if(!function(e){const t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=window.innerHeight&&t.right<=window.innerWidth}(e))switch(t){case Vh.DIRECTION.left:document.body.scrollLeft=Gh(e)-document.body.offsetLeft;break;case Vh.DIRECTION.up:document.body.scrollTop=Wh(e)-document.body.offsetTop;break;case Vh.DIRECTION.right:document.body.scrollLeft=Gh(e)-document.body.offsetLeft-(document.documentElement.clientWidth-e.offsetWidth);break;case Vh.DIRECTION.down:document.body.scrollTop=Wh(e)-document.body.offsetTop-(document.documentElement.clientHeight-e.offsetHeight)}}else{const n=this.scroll_container;if(!n.contains(e))return;switch(t){case Vh.DIRECTION.left:n.scrollLeft=e.offsetLeft-n.offsetLeft,n.scrollTop=e.offsetTop-n.offsetTop;break;case Vh.DIRECTION.up:n.scrollTop=e.offsetTop-n.offsetTop;break;case Vh.DIRECTION.right:n.scrollLeft=e.offsetLeft-n.offsetLeft-(n.offsetWidth-e.offsetWidth),n.scrollTop=e.offsetTop-n.offsetTop-(n.offsetHeight-e.offsetHeight);break;case Vh.DIRECTION.down:n.scrollTop=e.offsetTop-n.offsetTop-(n.offsetHeight-e.offsetHeight)}}}inScrollContainerViewport(e){const t=this.scroll_container;return!(e.offsetLeft-t.scrollLeft<t.offsetLeft)&&(!(e.offsetTop-t.scrollTop<t.offsetTop)&&(!(e.offsetLeft+e.offsetWidth-t.scrollLeft>t.offsetLeft+t.offsetWidth)&&!(e.offsetTop+e.offsetHeight-t.scrollTop>t.offsetTop+t.offsetHeight)))}getElements(e){const t=this.options.getSelector?this.options.getSelector(e):this.options.selector;return this.elements[t]||(this.elements[t]=Array.from(this.container.querySelectorAll(t))),this.elements[t]}elementsAfter(e,t){return this.getElements(Vh.DIRECTION.down).filter(n=>n.offsetLeft>=e&&n.offsetTop>=t)}elementsBefore(e,t){return this.getElements(Vh.DIRECTION.up).filter(n=>n.offsetLeft<=e&&n.offsetTop<=t)}handleKeydown(e){const t=$h,n=e.shiftKey?this.keys["".concat(t.SHIFT,"+").concat(e.which)]:this.keys[e.which];if(n){e.preventDefault(),e.stopPropagation();const t=this.getNextElement(n,e);this.select(t,n)}}}var Jh=Vh;
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */const Xh=new WeakMap,Qh=ka((...e)=>t=>{let n=Xh.get(t);void 0===n&&(n={lastRenderedIndex:2147483647,values:[]},Xh.set(t,n));const r=n.values;let i=r.length;n.values=e;for(let o=0;o<e.length&&!(o>n.lastRenderedIndex);o++){const s=e[o];if(La(s)||"function"!=typeof s.then){t.setValue(s),n.lastRenderedIndex=o;break}o<i&&s===r[o]||(n.lastRenderedIndex=2147483647,i=0,Promise.resolve(s).then(e=>{const r=n.values.indexOf(s);r>-1&&r<n.lastRenderedIndex&&(n.lastRenderedIndex=r,t.setValue(e),t.commit())}))}});function Yh(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n            <div class="dropleft">\n                <button type="button" class="btn btn--transparent btn--standalone" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">\n                    <i class="',' only-icon"></i>\n                </button>\n                <div class="dropdown-menu">\n                    ',"\n                </div>\n            </div>\n        "]);return Yh=function(){return e},e}const Kh=rl.env.utils;class Zh extends mc{firstUpdated(){this.menu=this.querySelector(".dropdown-menu"),this.dropdown=this.firstElementChild,this.button=this.dropdown.querySelector("button"),this.dropdown.addEventListener("click",e=>this.toggleMenu(e)),this.dropdown.addEventListener("keyup",e=>this.handleKeyUp(e)),document.addEventListener("click",e=>!this.contains(e.composedPath()[0])&&this.hideMenu(e))}hideMenu(){var e,t;Kh.removeClass("show",this.menu),null===(e=this.button)||void 0===e||e.setAttribute("aria-expanded",!1),null===(t=this.button)||void 0===t||t.blur()}showMenu(){Kh.addClass("show",this.menu),this.button.setAttribute("aria-expanded",!0)}toggleMenu(e){e.preventDefault(),Kh.hasClass("show",this.menu)?this.hideMenu():this.showMenu()}handleKeyUp(e){e.keyCode===rl.keycodes.ESCAPE?this.hideMenu():e.keyCode===rl.keycodes.DOWN_ARROW&&this.navigator&&!this.navigator.enabled&&this.enableArrowNavigation(e)}}function ef(){const e=rf(['<converse-dropdown class="chat-msg__actions" .items=',"></converse-dropdown>"]);return ef=function(){return e},e}function tf(){const e=rf(['\n            <button class="chat-msg__action ','" @click=','>\n                <converse-icon class="','"\n                    path-prefix="','"\n                    color="var(--text-color-lighten-15-percent)"\n                    size="1em"></converse-icon>\n                ',"\n            </button>\n        "]);return tf=function(){return e},e}function nf(){const e=rf(["",""]);return nf=function(){return e},e}function rf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-dropdown",class extends Zh{static get properties(){return{icon_classes:{type:String},items:{type:Array}}}render(){const e=this.icon_classes||"fa fa-bars";return Za(Yh(),e,this.items.map(e=>Qh(e,"")))}hideMenu(){super.hideMenu(),this.navigator.disable()}firstUpdated(){super.firstUpdated(),this.initArrowNavigation()}initArrowNavigation(){if(!this.navigator){const e={selector:".dropdown-item",onSelected:e=>e.focus()};this.navigator=new Jh(this.menu,e)}}enableArrowNavigation(e){e&&(e.preventDefault(),e.stopPropagation()),this.navigator.enable(),this.navigator.select(this.menu.firstElementChild)}handleKeyUp(e){super.handleKeyUp(e),e.keyCode!==rl.keycodes.DOWN_ARROW||this.navigator.enabled||this.enableArrowNavigation(e)}});class of extends mc{static get properties(){return{chatview:{type:Object},model:{type:Object},editable:{type:Boolean},correcting:{type:Boolean},message_type:{type:String},is_retracted:{type:Boolean}}}render(){return Za(nf(),Qh(this.renderActions(),""))}static getActionsDropdownItem(e){return Za(tf(),e.button_class,e.handler,e.icon_class,Vc.settings.get("assets_path"),e.i18n_text)}onMessageEditButtonClicked(e){e.preventDefault(),this.chatview.onMessageEditButtonClicked(this.model)}onMessageRetractButtonClicked(e){e.preventDefault(),this.chatview.onMessageRetractButtonClicked(this.model)}async getActionButtons(){const e=[];this.editable&&e.push({i18n_text:this.correcting?zd("Cancel Editing"):zd("Edit"),handler:e=>this.onMessageEditButtonClicked(e),button_class:"chat-msg__action-edit",icon_class:"fa fa-pencil-alt",name:"edit"});const t="groupchat"===this.model.get("type")&&await this.model.mayBeModerated();return!this.is_retracted&&(this.model.mayBeRetracted()||t)&&e.push({i18n_text:zd("Retract"),handler:e=>this.onMessageRetractButtonClicked(e),button_class:"chat-msg__action-retract",icon_class:"fas fa-trash-alt",name:"retract"}),Vc.hook("getMessageActionButtons",this,e)}async renderActions(){const e=(await this.getActionButtons()).map(e=>of.getActionsDropdownItem(e));return e.length?Za(ef(),e):""}}Vc.elements.define("converse-message-actions",of);var sf=n(34),af=n.n(sf);function cf(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<div class="alert ','" role="alert"><p>',"</p></div>"]);return cf=function(){return e},e}const{sizzle:lf}=rl.env,uf=rl.env.utils;var df=eh.extend({className:"modal",persistent:!1,events:{"click  .nav-item .nav-link":"switchTab"},initialize(e){if(!this.id)throw new Error("Each modal class must have a unique id attribute");this.render(),Object.assign(this,e),this.el.setAttribute("tabindex","-1"),this.el.setAttribute("role","dialog"),this.el.setAttribute("aria-hidden","true");const t=this.el.querySelector(".modal-title").getAttribute("id");t&&this.el.setAttribute("aria-labelledby",t),this.insertIntoDOM();const n=af.a.Modal;this.modal=new n(this.el,{backdrop:!0,keyboard:!0}),this.el.addEventListener("hide.bs.modal",()=>this.onHide(),!1)},onHide(){uf.removeClass("selected",this.trigger_el),!this.persistent&&Vc.modal.remove(this)},insertIntoDOM(){Uc.chatboxviews.el.querySelector("#converse-modals").insertAdjacentElement("beforeEnd",this.el)},switchTab(e){e.stopPropagation(),e.preventDefault(),lf(".nav-link.active",this.el).forEach(e=>{uf.removeClass("active",this.el.querySelector(e.getAttribute("href"))),uf.removeClass("active",e)}),uf.addClass("active",e.target),uf.addClass("active",this.el.querySelector(e.target.getAttribute("href")))},alert(e,t="primary"){const n=this.el.querySelector(".modal-alert");if(null===n)return void zn.error("Could not find a .modal-alert element in the modal to show an alert message in!");var r;Ya((r={type:"alert-".concat(t),message:e},Za(cf(),r.type,r.message)),n);const i=n.firstElementChild;setTimeout(()=>{uf.addClass("fade-out",i),setTimeout(()=>uf.removeElement(i),600)},5e3)},show(e){e&&(e.preventDefault(),this.trigger_el=e.target,this.trigger_el.classList.add("selected")),this.modal.show()}});function hf(){const e=pf(['<button type="button" class="close" data-dismiss="modal" aria-label="','"><span aria-hidden="true">×</span></button>']);return hf=function(){return e},e}function ff(){const e=pf(['<button type="button" class="btn btn-secondary" data-dismiss="modal">',"</button>"]);return ff=function(){return e},e}function pf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const gf=Za(ff(),zd("Close")),mf=Za(hf(),zd("Close"));function vf(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n        <div class="modal-dialog fit-content" role="document">\n            <div class="modal-content fit-content">\n                <div class="modal-header">\n                    <h4 class="modal-title" id="message-versions-modal-label">','<a target="_blank" rel="noopener" href="','">',"</a></h4>\n                    ",'\n                </div>\n                <div class="modal-body modal-body--image fit-content">\n                    <img class="chat-image" src="','" @load=','>\n                </div>\n                <div class="modal-footer">',"</div>\n            </div>\n        </div>"]);return vf=function(){return e},e}var _f=df.extend({id:"image-modal",toHTML(){return e={src:this.src,onload:e=>e.target.parentElement.style.height="".concat(e.target.height,"px")},Za(vf(),zd("Image: "),e.src,e.src,mf,e.src,e.onload,gf);var e}});function bf(){const e=wf(["",""]);return bf=function(){return e},e}function yf(){const e=wf(["",""]);return yf=function(){return e},e}function wf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Sf=ka((e,t,n)=>r=>r.setValue(function(e,t,n){const r=new $f(e,t,n,!1);return Za(yf(),Qh(async function(e){return await e.addTemplates(),e.payload}(r),Za(bf(),r)))}(e,t,n)));function xf(){const e=Of(['<span class="styling-directive">*</span><b>','</b><span class="styling-directive">*</span>']);return xf=function(){return e},e}function Ef(){const e=Of(['<span class="styling-directive">~</span><del>','</del><span class="styling-directive">~</span>']);return Ef=function(){return e},e}function Af(){const e=Of(["<blockquote>","</blockquote>"]);return Af=function(){return e},e}function Cf(){const e=Of(['<div class="styling-directive">```</div><code class="block">','</code><div class="styling-directive">```</div>'],['<div class="styling-directive">\\`\\`\\`</div><code class="block">','</code><div class="styling-directive">\\`\\`\\`</div>']);return Cf=function(){return e},e}function jf(){const e=Of(['<span class="styling-directive">`</span><code>','</code><span class="styling-directive">`</span>'],['<span class="styling-directive">\\`</span><code>','</code><span class="styling-directive">\\`</span>']);return jf=function(){return e},e}function Tf(){const e=Of(['<span class="styling-directive">_</span><i>','</i><span class="styling-directive">_</span>']);return Tf=function(){return e},e}function Of(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
-/**
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- * @description Utility functions to help with parsing XEP-393 message styling hints
- * @todo Other parsing helpers can be made more abstract and placed here.
- */const kf=["*","_","~","`","```",">"],Nf={"*":{name:"strong",type:"span"},_:{name:"emphasis",type:"span"},"~":{name:"strike",type:"span"},"`":{name:"preformatted",type:"span"},"```":{name:"preformatted_block",type:"block"},">":{name:"quote",type:"block"}},If=["_",">","`","~"],Mf={emphasis:(e,t,n)=>Za(Tf(),Sf(e,t,n)),preformatted:e=>Za(jf(),e),preformatted_block:e=>Za(Cf(),e),quote:(e,t,n)=>Za(Af(),Sf(e,t,n)),strike:(e,t,n)=>Za(Ef(),Sf(e,t,n)),strong:(e,t,n)=>Za(xf(),Sf(e,t,n))};function Rf(e,t,n=!0){let r;if(!/(^```\s*\n|^```\s*$)/.test(e.slice(t))||0!==t&&"\n"!==e[t-1]&&">"!==e[t-1]){if(!kf.includes(e.slice(t,t+1)))return null;if(r=e.slice(t,t+1),!function(e,t,n,r){if(r){const r=RegExp(If.includes(e)?"^(\\p{L}|\\p{N})".concat(e):"^(\\p{L}|\\p{N})\\".concat(e),"u");if(n>1&&r.test(t.slice(n-1)))return!1;const i=Lf(e);if(i&&n>0&&"\n"!==t[n-1])return!1;if(!i&&e===t[n+1])return!1}else{const r=RegExp(If.includes(e)?"^".concat(e,"(\\p{L}|\\p{N})"):"^\\".concat(e,"(\\p{L}|\\p{N})"),"u");if(n<t.length-1&&r.test(t.slice(n)))return!1}return!0}(r,e,t,n))return null}else r=e.slice(t,t+3);return r}function Df(e,t,n){const r=Nf[e].type;return t===n.length||Rf(n,t,!1)===e||"span"===r&&"\n"===n[t]}function Pf(e,t){const n=Rf(e,t),r=n?function(e,t,n){if(!e)return 0;const r=n;if(n+=e.length,Lf(e))return(n+=t.slice(n).split(/\n[^>]/).shift().length)-r;if("span"===Nf[e].type){const r=t.slice(n+1).split("\n").shift();let i=0,o=r.indexOf(e);for(;-1!==o;){if(Df(e,n+1+o,t))return o+1+2*e.length;o=r.indexOf(e,i++)}return 0}{const r=t.slice(n+1);let i,o=r.indexOf(e);for(;-1!==o;){if(Df(e,n+1+o,t))return o+1+2*e.length;o=r.indexOf(e,i++)}return 0}}(n,e,t):0;return r>0?{d:n,length:r}:{}}const Lf=e=>[">","&gt;"].includes(e);function zf(e,t,n,r){const i=Mf[Nf[e].name];if(Lf(e)){return i(t.replace(/\n>/g,"\n").replace(/\n$/,""),n,r)}return i(t,n,r)}function Ff(){const e=qf(['<span class="mention">',"</span>"]);return Ff=function(){return e},e}function Bf(){const e=qf(['<span class="mention mention--self badge badge-info">',"</span>"]);return Bf=function(){return e},e}function qf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Hf=rl.env.utils,Uf=e=>"string"==typeof e;class $f extends String{constructor(e,t,n=0,r,i,o){super(e),this.model=t,this.offset=n,this.onImgClick=o,this.onImgLoad=i,this.references=[],this.show_images=r,this.payload=[]}addHyperlinks(e,t){const n=[];try{const t={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|xmpp:|mailto:|www\.)/gi};ah.a.withinString(e,(e,t,r)=>(n.push({url:e,start:t,end:r}),e),t)}catch(e){return void zn.debug(e)}n.forEach(n=>{const r=e.slice(n.start,n.end),i=Hf.filterQueryParamsFromURL(r);this.addTemplateResult(n.start+t,n.end+t,this.show_images&&Hf.isImageURL(r)&&Hf.isImageDomainAllowed(r)?Hf.convertToImageTag(i,this.onImgLoad,this.onImgClick):Hf.convertUrlToHyperlink(i))})}addMapURLs(e,t){const n=/geo:([\-0-9.]+),([\-0-9.]+)(?:,([\-0-9.]+))?(?:\?(.*))?/g,r=e.matchAll(n);for(const e of r)this.addTemplateResult(e.index+t,e.index+e[0].length+t,Hf.convertUrlToHyperlink(e[0].replace(n,Uc.geouri_replacement)))}addEmojis(e,t){[...Hl(e.toString()),...Ul(e.toString())].forEach(e=>{this.addTemplateResult(e.begin+t,e.end+t,ql(e,{add_title_wrapper:!0}))})}addMentions(e,t){var n;const r=t+this.offset;if(!this.model.collection)return void zn.debug("addMentions: ignoring dangling model");const i=this.model.collection.chatbox.get("nick");null===(n=this.model.get("references"))||void 0===n||n.forEach(n=>{const o=Number(n.begin)-r;if(o<0||o>=r+e.length)return;const s=Number(n.end)-r,a=e.slice(o,s);var c;a===i?this.addTemplateResult(o+t,s+t,(c={mention:a},Za(Bf(),c.mention))):this.addTemplateResult(o+t,s+t,(e=>Za(Ff(),e.mention))({mention:a}))})}addStyling(){if(this.model.get("is_unstyled")||!Vc.settings.get("allow_message_styling"))return;let e=0;const t=[];if(function(e){for(let t=0;t<kf.length;t++)if(e.includes(kf[t]))return!0}(this))for(;e<this.length;){const{d:n,length:r}=Pf(this,e);if(n&&r){const i=Lf(n),o=e+r,s=i?o:o-n.length;let a="```"===n?e+n.length+1:e+n.length;i&&" "===this[a]&&(a+=1);const c=a,l=this.slice(a,s);t.push({begin:e,template:zf(n,l,this.model,c),end:o}),e=o}e++}t.forEach(e=>this.addTemplateResult(e.begin,e.end,e.template))}trimMeMessage(){0===this.offset&&this.isMeCommand()&&(this.payload[0]=this.payload[0].substring(4))}addAnnotations(e){const t=this.marshall();let n=0;for(const r of t)r&&(Uf(r)?(e.call(this,r,n),n+=r.length):n=r.end)}async addTemplates(){await Vc.trigger("beforeMessageBodyTransformed",this,{Synchronous:!0}),this.addStyling(),this.addAnnotations(this.addMentions),this.addAnnotations(this.addHyperlinks),this.addAnnotations(this.addMapURLs),await Vc.emojis.initialize(),this.addAnnotations(this.addEmojis),await Vc.trigger("afterMessageBodyTransformed",this,{Synchronous:!0}),this.payload=this.marshall(),this.trimMeMessage(),this.payload=this.payload.map(e=>Uf(e)?e:e.template)}addTemplateResult(e,t,n){this.references.push({begin:e,end:t,template:n})}isMeCommand(){const e=this.toString();return!!e&&e.startsWith("/me ")}static replaceText(e){return Bl(e.replace(/\n\n+/g,"\n\n"))}marshall(){let e=[this.toString()];return this.references.sort((e,t)=>t.begin-e.begin).forEach(t=>{const n=e.shift();e=[n.slice(0,t.begin),t,n.slice(t.end),...e]}),e.reduce((e,t)=>Uf(t)?[...e,$f.replaceText(t)]:[...e,t],[])}}function Wf(){const e=Vf(["",""]);return Wf=function(){return e},e}function Gf(){const e=Vf(["",""]);return Gf=function(){return e},e}function Vf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Jf=rl.env.utils;class Xf{constructor(e){var t;this.model=e.model,this.component=e,this.chatview=null===(t=Jf.ancestor(this.component,"converse-chat-message"))||void 0===t?void 0:t.chatview,this.was_scrolled_up=this.chatview.model.get("scrolled"),this.text=this.component.model.getMessageText()}scrollDownOnImageLoad(){this.was_scrolled_up||this.chatview.scrollDown()}async transform(){const e=Vc.settings.get("show_images_inline"),t=new $f(this.text,this.model,0,e,()=>this.scrollDownOnImageLoad(),e=>this.component.showImageModal(e));return await t.addTemplates(),t.payload}render(){return Za(Gf(),Qh(this.transform(),Za(Wf(),this.text)))}}const Qf=ka(e=>t=>{var n;const r=new Xf(e);t.setValue(r.render());const i=e.model;null===(n=i.collection)||void 0===n||n.trigger("rendered",i)});function Yf(){const e=Zf(['<p class="older-msg"><time>',"</time>: ","</p>"]);return Yf=function(){return e},e}function Kf(){const e=Zf(['\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h4 class="modal-title" id="message-versions-modal-label">',"</h4>\n                ",'\n            </div>\n            <div class="modal-body">\n                <h4>Older versions</h4>\n                ',"\n                <hr/>\n                <h4>Current version</h4>\n                <p>",'</p>\n            </div>\n            <div class="modal-footer">',"</div>\n        </div>\n    </div>\n"]);return Kf=function(){return e},e}function Zf(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-chat-message-body",class extends mc{static get properties(){return{model:{type:Object},is_me_message:{type:Boolean},text:{type:String}}}showImageModal(e){e.preventDefault(),Vc.modal.create(_f,{src:e.target.src},e).show(e)}render(){return Qf(this)}});var ep=df.extend({id:"message-versions-modal",toHTML(){return e=this.model.toJSON(),Za(Kf(),zd("Message versions"),mf,Object.keys(e.older_versions).map(t=>Za(Yf(),En()(t).format("MMM D, YYYY, HH:mm:ss"),e.older_versions[t])),e.message,gf);var e}}),tp=n(176),np=n.n(tp);function rp(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <svg xmlns="http://www.w3.org/2000/svg" class="avatar ','" width="','" height="','">\n        <image width="','" height="','" preserveAspectRatio="xMidYMid meet" href="','"/>\n    </svg>']);return rp=function(){return e},e}var ip=e=>{return Za(rp(),e.classes,e.width,e.height,e.width,e.height,(t=e.image,n=e.image_type,t.startsWith("data:")?t:"data:".concat(n,";base64,").concat(t)));var t,n};const op=ka(e=>t=>{const n={classes:e.classes?"".concat(e.classes," avatar"):"avatar",height:e.width||36,image:e.image,image_type:e.image_type,width:e.height||36};t.setValue(ip(n))});function sp(){const e=dp(['\n                            <time timestamp="','" class="chat-msg__time">','</time>&nbsp;\n                            <span class="chat-msg__author">',"","</span>&nbsp;"]);return sp=function(){return e},e}function ap(){const e=dp(['<span class="fa fa-lock"></span>']);return ap=function(){return e},e}function cp(){const e=dp(['\n                    <span class="chat-msg__heading">\n                        <span class="chat-msg__author">',"</span>\n                        ","\n                        ","\n                    </span>"]);return cp=function(){return e},e}function lp(){const e=dp(['<div class="message separator"><hr class="separator"><span class="separator-text">',"</span></div>"]);return lp=function(){return e},e}function up(){const e=dp(["\n        ",'\n        <div class="message chat-msg ','"\n                data-isodate="','"\n                data-msgid="','"\n                data-from="','"\n                data-encrypted="','">\n\n            \x3c!-- Anchor to allow us to scroll the message into view --\x3e\n            <a id="','"></a>\n\n            ','\n            <div class="chat-msg__content chat-msg__content--'," ",'">\n\n                ','\n                <div class="chat-msg__body chat-msg__body--'," "," ",'">\n                    <div class="chat-msg__message">\n                        ',"\n                        ","\n                    </div>\n                    <converse-message-actions\n                        .chatview=","\n                        .model=",'\n                        ?correcting="','"\n                        ?editable="','"\n                        ?is_retracted="','"\n                        message_type="','"></converse-message-actions>\n                </div>\n            </div>\n        </div>']);return up=function(){return e},e}function dp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function hp(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['<span class="spinner fa fa-spinner centered ','"/>']);return hp=function(){return e},e}var fp=(e={})=>Za(hp(),e.classes||"");function pp(){const e=Op(['<span class="badge badge-secondary">',"</span>"]);return pp=function(){return e},e}function gp(){const e=Op(["\n            ",'\n            <time timestamp="','" class="chat-msg__time">',"</time>\n        "]);return gp=function(){return e},e}function mp(){const e=Op(['<div class="chat-msg__media">',"</div>"]);return mp=function(){return e},e}function vp(){const e=Op(['<i title="','" class="fa fa-edit chat-msg__edit-modal" @click=',"></i>"]);return vp=function(){return e},e}function _p(){const e=Op(['<span class="fa fa-check chat-msg__receipt"></span>']);return _p=function(){return e},e}function bp(){const e=Op(['<div class="chat-msg__subject">',"</div>"]);return bp=function(){return e},e}function yp(){const e=Op(["\n            ","\n            ",'\n            <span>\n                <converse-chat-message-body\n                    class="chat-msg__text '," ",'"\n                    .model="','"\n                    ?is_me_message="','"\n                    ?is_only_emojis="','"\n                    ?is_spoiler="','"\n                    ?is_spoiler_visible="','"\n                    text="','"></converse-chat-message-body>\n                ',"\n                ","\n            </span>\n            ",'\n            <div class="chat-msg__error">',"</div>\n        "]);return yp=function(){return e},e}function wp(){const e=Op(['\n            <div class="chat-msg__spoiler-hint">\n                <span class="spoiler-hint">','</span>\n                <a class="badge badge-info spoiler-toggle" href="#" @click=','>\n                    <i class="fa ','"></i>\n                    ',"\n                </a>\n            </div>\n        "]);return wp=function(){return e},e}function Sp(){const e=Op(['<q class="chat-msg--retracted__reason">',"</q>"]);return Sp=function(){return e},e}function xp(){const e=Op(["\n            <div>","</div>\n            ","\n        "]);return xp=function(){return e},e}function Ep(){const e=Op(['\n            <div class="message chat-msg">\n                ','\n                <div class="chat-msg__content">\n                    <span class="chat-msg__text">'," <strong>","</strong>, ",'</span>\n                    <progress value="','"/>\n                </div>\n            </div>']);return Ep=function(){return e},e}function Ap(){const e=Op(['<a class="retry" @click=',">","</a>"]);return Ap=function(){return e},e}function Cp(){const e=Op(['<q class="reason">',"</q>"]);return Cp=function(){return e},e}function jp(){const e=Op(['<q class="reason">',"</q>"]);return jp=function(){return e},e}function Tp(){const e=Op(['\n            <div class="message chat-info chat-','"\n                data-isodate="','"\n                data-type="','"\n                data-value="','">\n\n                <div class="chat-info__message">\n                    ',"\n                </div>\n                ","\n                ","\n                ","\n            </div>\n        "]);return Tp=function(){return e},e}function Op(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const{Strophe:kp}=rl.env,Np=rl.env.utils;class Ip extends mc{static get properties(){return{chatview:{type:Object},correcting:{type:Boolean},editable:{type:Boolean},edited:{type:String},error:{type:String},error_text:{type:String},from:{type:String},has_mentions:{type:Boolean},hats:{type:Array},is_delayed:{type:Boolean},is_encrypted:{type:Boolean},is_first_unread:{type:Boolean},is_me_message:{type:Boolean},is_only_emojis:{type:Boolean},is_retracted:{type:Boolean},is_spoiler:{type:Boolean},is_spoiler_visible:{type:Boolean},message_type:{type:String},model:{type:Object},moderated_by:{type:String},moderation_reason:{type:String},msgid:{type:String},occupant_affiliation:{type:String},occupant_role:{type:String},oob_url:{type:String},progress:{type:Number},reason:{type:String},received:{type:String},retractable:{type:Boolean},retry_event_id:{type:String},sender:{type:String},show_spinner:{type:Boolean},spoiler_hint:{type:String},subject:{type:String},time:{type:String},username:{type:String}}}render(){const e=Vc.settings.get("time_format");return this.pretty_time=En()(this.edited||this.time).format(e),this.show_spinner?fp():this.model.get("file")&&!this.model.get("oob_url")?this.renderFileProgress():["error","info"].includes(this.message_type)?this.renderInfoMessage():this.renderChatMessage()}connectedCallback(){super.connectedCallback(),this.listenTo(this.model,"change",e=>{const t=this.model.collection.chatbox;Object.assign(this,Jp(t,this.model)),Object.keys(e.changed).filter(e=>Object.keys(Ip.properties).includes(e)).forEach(t=>this[t]=e.changed[t])});const e=this.model.vcard;e&&this.listenTo(e,"change",()=>this.requestUpdate())}updated(){var e;(this.show_spinner||this.model.get("file")&&!this.model.get("oob_url")||["error","info"].includes(this.message_type))&&(null===(e=this.model.collection)||void 0===e||e.trigger("rendered",this.model))}renderInfoMessage(){const e=En()(this.model.get("time")).toISOString(),t=zd("Retry");return Za(Tp(),this.message_type,e,this.data_name,this.data_value,this.model.getMessageText(),this.reason?Za(jp(),this.reason):"",this.error_text?Za(Cp(),this.error_text):"",this.retry_event_id?Za(Ap(),this.onRetryClicked,t):"")}renderFileProgress(){const e=zd("Uploading file:"),t=this.model.file.name,n=np()(this.model.file.size);return Za(Ep(),op(this.getAvatarData()),e,t,n,this.progress)}renderChatMessage(){return(e=>{const t=zd("New messages");return Za(up(),e.is_first_unread?Za(lp(),t):"",e.getExtraMessageClasses(),e.time,e.msgid,e.from,e.is_encrypted,e.msgid,e.shouldShowAvatar()?op(e.getAvatarData()):"",e.sender,e.is_me_message?"chat-msg__content--action":"",e.is_me_message?"":Za(cp(),e.username,e.renderAvatarByline(),e.is_encrypted?Za(ap()):""),e.message_type,e.received?"chat-msg__body--received":"",e.is_delayed?"chat-msg__body--delayed":"",e.is_me_message?Za(sp(),e.edited||e.time,e.pretty_time,e.is_me_message?"**":"",e.username):"",e.is_retracted?e.renderRetraction():e.renderMessageText(),e.chatview,e.model,e.correcting,e.editable,e.is_retracted,e.message_type)})(this)}shouldShowAvatar(){return Vc.settings.get("show_message_avatar")&&!this.is_me_message&&"headline"!==this.type}getAvatarData(){var e,t;return{classes:"chat-msg__avatar",height:36,width:36,image:"data:"+((null===(e=this.model.vcard)||void 0===e?void 0:e.get("image_type"))||Uc.DEFAULT_IMAGE_TYPE)+";base64,"+((null===(t=this.model.vcard)||void 0===t?void 0:t.get("image"))||Uc.DEFAULT_IMAGE)}}async onRetryClicked(){this.show_spinner=!0,await Vc.trigger(this.retry_event_id,{synchronous:!0}),this.model.destroy(),this.parentElement.removeChild(this)}isFollowup(){const e=this.model.collection.models,t=e.indexOf(this.model),n=t?e[t-1]:null;if(null===n)return!1;const r=En()(this.time);return this.from===n.get("from")&&!this.is_me_message&&!n.isMeCommand()&&"info"!==this.message_type&&"info"!==n.get("type")&&r.isBefore(En()(n.get("time")).add(10,"minutes"))&&!!this.is_encrypted==!!n.get("is_encrypted")}getExtraMessageClasses(){const e=[this.isFollowup()?"chat-msg--followup":null,this.is_delayed?"delayed":null,this.is_me_message?"chat-msg--action":null,this.is_retracted?"chat-msg--retracted":null,this.message_type,this.shouldShowAvatar()?"chat-msg--with-avatar":null].map(e=>e);return"groupchat"===this.message_type&&(this.occupant_role&&e.push(this.occupant_role),this.occupant_affiliation&&e.push(this.occupant_affiliation),"them"===this.sender&&this.has_mentions&&e.push("mentioned")),this.correcting&&e.push("correcting"),e.filter(e=>e).join(" ")}getRetractionText(){if("groupchat"===this.message_type&&this.moderated_by){const e=this.moderated_by,t=this.model.collection.chatbox;this.model.mod||(this.model.mod=t.occupants.findOccupant({jid:e})||t.occupants.findOccupant({nick:kp.getResourceFromJid(e)}));const n=this.model.mod?this.model.mod.getDisplayName():"A moderator";return zd("%1$s has removed this message",n)}return zd("%1$s has removed this message",this.model.getDisplayName())}renderRetraction(){const e=this.is_retracted?this.getRetractionText():null;return Za(xp(),e,this.moderation_reason?Za(Sp(),this.moderation_reason):"")}renderMessageText(){const e=zd("This message has been edited"),t=zd("Show more"),n="groupchat"===this.message_type,r=zd("Show less"),i=Za(wp(),this.spoiler_hint,this.toggleSpoilerMessage,this.is_spoiler_visible?"fa-eye-slash":"fa-eye",this.is_spoiler_visible?r:t),o=this.is_spoiler?"spoiler ".concat(this.is_spoiler_visible?"":"hidden"):"";return Za(yp(),this.is_spoiler?i:"",this.subject?Za(bp(),this.subject):"",this.is_only_emojis?"chat-msg__text--larger":"",o,this.model,this.is_me_message,this.is_only_emojis,this.is_spoiler,this.is_spoiler_visible,this.model.getMessageText(),!this.received||this.is_me_message||n?"":Za(_p()),this.edited?Za(vp(),e,this.showMessageVersionsModal):"",this.oob_url?Za(mp(),Np.getOOBURLMarkup(Uc,this.oob_url)):"",this.error_text||this.error)}renderAvatarByline(){return Za(gp(),this.hats.map(e=>Za(pp(),e.title)),this.edited||this.time,this.pretty_time)}showUserModal(e){"me"===this.model.get("sender")?Uc.xmppstatusview.showProfileModal(e):"groupchat"===this.message_type?this.chatview.showOccupantDetailsModal(e,this.model):this.chatview.showUserDetailsModal(e,this.model)}showMessageVersionsModal(e){e.preventDefault(),void 0===this.message_versions_modal&&(this.message_versions_modal=new ep({model:this.model})),this.message_versions_modal.show(e)}toggleSpoilerMessage(e){null==e||e.preventDefault(),this.model.save({is_spoiler_visible:!this.model.get("is_spoiler_visible")})}}function Mp(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="message date-separator" data-isodate="','">\n        <hr class="separator"/>\n        <time class="separator-text" datetime="','"><span>',"</span></time>\n    </div>\n"]);return Mp=function(){return e},e}Vc.elements.define("converse-chat-message",Ip);
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */
-const Rp=(e,t)=>{const n=e.startNode.parentNode,r=void 0===t?e.endNode:t.startNode,i=n.insertBefore(Ea(),r);n.insertBefore(Ea(),r);const o=new qa(e.options);return o.insertAfterNode(i),o},Dp=(e,t)=>(e.setValue(t),e.commit(),e),Pp=(e,t,n)=>{const r=e.startNode.parentNode,i=n?n.startNode:e.endNode,o=t.endNode.nextSibling;o!==i&&ma(r,t.startNode,o,i)},Lp=e=>{va(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},zp=(e,t,n)=>{const r=new Map;for(let i=t;i<=n;i++)r.set(e[i],i);return r},Fp=new WeakMap,Bp=new WeakMap,qp=ka((e,t,n)=>{let r;return void 0===n?n=t:void 0!==t&&(r=t),t=>{if(!(t instanceof qa))throw new Error("repeat can only be used in text bindings");const i=Fp.get(t)||[],o=Bp.get(t)||[],s=[],a=[],c=[];let l,u,d=0;for(const t of e)c[d]=r?r(t,d):d,a[d]=n(t,d),d++;let h=0,f=i.length-1,p=0,g=a.length-1;for(;h<=f&&p<=g;)if(null===i[h])h++;else if(null===i[f])f--;else if(o[h]===c[p])s[p]=Dp(i[h],a[p]),h++,p++;else if(o[f]===c[g])s[g]=Dp(i[f],a[g]),f--,g--;else if(o[h]===c[g])s[g]=Dp(i[h],a[g]),Pp(t,i[h],s[g+1]),h++,g--;else if(o[f]===c[p])s[p]=Dp(i[f],a[p]),Pp(t,i[f],i[h]),f--,p++;else if(void 0===l&&(l=zp(c,p,g),u=zp(o,h,f)),l.has(o[h]))if(l.has(o[f])){const e=u.get(c[p]),n=void 0!==e?i[e]:null;if(null===n){const e=Rp(t,i[h]);Dp(e,a[p]),s[p]=e}else s[p]=Dp(n,a[p]),Pp(t,n,i[h]),i[e]=null;p++}else Lp(i[f]),f--;else Lp(i[h]),h++;for(;p<=g;){const e=Rp(t,s[g+1]);Dp(e,a[p]),s[p++]=e}for(;h<=f;){const e=i[h++];null!==e&&Lp(e)}Fp.set(t,s),Bp.set(t,c)}});function Hp(){const e=Wp(['<div class="empty-history-feedback form-help"><span>',"</span></div>"]);return Hp=function(){return e},e}function Up(){const e=Wp(["",""]);return Up=function(){return e},e}function $p(){const e=Wp(["\n    <converse-chat-message\n        .chatview=","\n        .hats=","\n        .model=","\n        ?correcting=","\n        ?editable=","\n        ?has_mentions=","\n        ?is_delayed=","\n        ?is_encrypted=","\n        ?is_first_unread=","\n        ?is_me_message=","\n        ?is_only_emojis=","\n        ?is_retracted=","\n        ?is_spoiler=","\n        ?is_spoiler_visible=","\n        ?retractable=","\n        edited=","\n        error=","\n        error_text=","\n        filename=","\n        filesize=","\n        from=","\n        message_type=","\n        moderated_by=","\n        moderation_reason=","\n        msgid=","\n        occupant_affiliation=","\n        occupant_role=","\n        oob_url=","\n        pretty_type=","\n        progress=","\n        reason=","\n        received=","\n        retry_event_id=","\n        sender=","\n        spoiler_hint=","\n        subject=","\n        time=","\n        username=","></converse-chat-message>\n"]);return $p=function(){return e},e}function Wp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const Gp=zd("No message history available.");function Vp(e){const t=e.collection.models,n=t.indexOf(e),r=t[n-1];if(!r||En()(e.get("time")).isAfter(En()(r.get("time")),"day")){const t=En()(e.get("time")).startOf("day");return i={type:"date",time:t.toISOString(),datestring:t.format("dddd MMM Do YYYY")},Za(Mp(),i.time,i.time,i.datestring)}var i}function Jp(e,t){return{has_mentions:"groupchat"===t.get("type")&&"them"===t.get("sender")&&e.isUserMentioned(t),hats:Uc.getHats(t),is_first_unread:e.get("first_unread_id")===t.get("id"),is_me_message:t.isMeCommand(),is_retracted:t.get("retracted")||"retracted"===t.get("moderated"),username:t.getDisplayName()}}Uc.getHats=function(e){if("groupchat"===e.get("type")){var t;const n=Vc.settings.get("muc_hats").filter(e=>e).map(e=>e.toLowerCase());let r=[];n.includes("vcard_roles")&&(r=e.vcard?e.vcard.get("role"):null,r=r?r.split(",").filter(e=>e).map(e=>({title:e})):[]);const i=[...e.occupant?[e.occupant.get("role")]:[],...e.occupant?[e.occupant.get("affiliation")]:[]].filter(e=>e).filter(e=>n.includes(e.toLowerCase())).map(e=>({title:e}));return[...n.includes("xep317")&&(null===(t=e.occupant)||void 0===t?void 0:t.get("hats"))||[],...r,...i]}return[]};Vc.elements.define("converse-message-history",class extends mc{static get properties(){return{chatview:{type:Object},messages:{type:Array}}}render(){const e=this.messages;return e.length?Za(Up(),qp(e,e=>e.get("id"),e=>this.renderMessage(e))):Za(Hp(),Gp)}renderMessage(e){if(e.get("dangling_retraction")||e.get("is_only_key"))return"";const t=Vp(e);var n;return[...t?[t]:[],(n=Object.assign(e.toJSON(),Jp(this.chatview.model,e),{chatview:this.chatview,model:e}),Za($p(),n.chatview,n.hats,n.model,n.correcting,n.editable,n.has_mentions,n.is_delayed,!!n.is_encrypted,n.is_first_unread,n.is_me_message,n.is_only_emojis,n.is_retracted,n.is_spoiler,n.is_spoiler_visible,n.retractable,n.edited||"",n.error||"",n.error_text||"",n.filename||"",n.filesize||"",n.from,n.type||"",n.moderated_by||"",n.moderation_reason||"",n.msgid,n.model.occupant?n.model.occupant.get("affiliation"):"",n.model.occupant?n.model.occupant.get("role"):"",n.oob_url||"",n.pretty_type,n.progress||0,n.reason||"",n.received||"",n.retry_event_id||"",n.sender,n.spoiler_hint||"",n.subject||"",n.time,n.username))]}});var Xp=n(18),Qp=n.n(Xp);
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */
-const Yp=new WeakMap,Kp=ka(e=>t=>{if(!(t instanceof qa))throw new Error("unsafeHTML can only be used in text bindings");const n=Yp.get(t);if(void 0!==n&&La(e)&&e===n.value&&t.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=e;const i=document.importNode(r.content,!0);t.setValue(i),Yp.set(t,{value:e,fragment:i})});function Zp(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n            <converse-message-history\n                .chatview=","\n                .messages=",'>\n            </converse-message-history>\n            <div class="chat-content__notifications">',"</div>\n        "]);return Zp=function(){return e},e}function eg(){const e=ng(['<svg .style="','"> <use href="','"> </use> </svg>']);return eg=function(){return e},e}function tg(){const e=ng(["\n            :host {\n                display: inline-block;\n                padding: 0;\n                margin: 0;\n            }\n        "]);return tg=function(){return e},e}function ng(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
-/**
- * @module icons.js
- * @copyright Alfredo Medrano Sánchez and the Converse.js contributors
- * @description
- *  Component inspired by the one from fa-icons
- *  https://github.com/obsidiansoft-io/fa-icons/blob/master/LICENSE
- * @license Mozilla Public License (MPLv2)
- */Vc.elements.define("converse-chat-content",class extends mc{static get properties(){return{chatview:{type:Object},messages:{type:Array},notifications:{type:String}}}render(){const e=Qp.a.filterXSS(this.notifications,{whiteList:{}});return Za(Zp(),this.chatview,this.messages,Kp(e))}});function rg(){const e=og(['<div class="message chat-','" data-isodate="','">',"</div>"]);return rg=function(){return e},e}function ig(){const e=og(['<converse-icon class="fas fa-times close-chat-help"\n                    @click=','\n                    path-prefix="','"\n                    size="1em"></converse-icon>']);return ig=function(){return e},e}function og(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}customElements.define("converse-icon",class extends mc{static get properties(){return{color:String,class_name:{attribute:"class"},style:String,size:String}}static get styles(){return fc(tg())}constructor(){super(),this.class_name="",this.style="",this.size="",this.color=""}getSource(){return"#icon-".concat(this.class_name.split(" ")[1].replace("fa-",""))}getStyles(){return"\n            ".concat(this.size?"width: ".concat(this.size,";"):"","\n            ").concat(this.size?"height: ".concat(this.size,";"):"","\n            ").concat(this.color?"fill: ".concat(this.color,";"):"","\n            ").concat(this.style,"\n        ")}render(){return Za(eg(),this.getStyles(),this.getSource())}});function sg(){const e=gg(["<converse-emoji-picker-content\n                .chatview=","\n                .model=",'\n                .search_results="','"\n                current_skintone="','"\n                query="','"></converse-emoji-picker-content>']);return sg=function(){return e},e}function ag(){const e=gg(['\n        <div class="emoji-picker__header">\n            <input class="form-control emoji-search" name="emoji-search" placeholder="','"\n                .value=',"\n                @keydown=","\n                @blur=","\n                @focus=",">\n            ","\n        </div>\n        ",'\n\n        <div class="emoji-skintone-picker">\n            <label>Skin tone</label>\n            <ul>',"</ul>\n        </div>"]);return ag=function(){return e},e}function cg(){const e=gg(['\n        <li data-skintone="','" class="emoji-skintone ','">\n            <a class="pick-skintone" href="#" data-skintone="','" @click=',">","</a>\n        </li>"]);return cg=function(){return e},e}function lg(){const e=gg(["\n        <span ?hidden=",' class="emoji-lists__container emoji-lists__container--browse">\n            ',"\n        </span>"]);return lg=function(){return e},e}function ug(){const e=gg(['\n        <a id="emoji-picker-','" class="emoji-category__heading" data-category="','">','</a>\n        <ul class="emoji-picker" data-category="','">\n            ',"\n        </ul>"]);return ug=function(){return e},e}function dg(){const e=gg(["\n        <span ?hidden=",' class="emoji-lists__container emojis-lists__container--search">\n        <a id="emoji-picker-search-results" class="emoji-category__heading">','</a>\n        <ul class="emoji-picker">\n            ',"\n        </ul>\n        </span>\n    "]);return dg=function(){return e},e}function hg(){const e=gg(['\n        <li class="emoji insert-emoji ','" data-emoji="','" title="','">\n            <a href="#" @click=',' data-emoji="','">',"</a>\n        </li>\n    "]);return hg=function(){return e},e}function fg(){const e=gg(["<ul>","</ul>"]);return fg=function(){return e},e}function pg(){const e=gg(['\n        <li data-category="','"\n            class="emoji-category '," ",'"\n            title="','">\n\n            <a class="pick-category"\n               @click=','\n               href="#emoji-picker-','"\n               data-category="','">'," </a>\n        </li>\n    "]);return pg=function(){return e},e}function gg(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-chat-help",class extends mc{static get properties(){return{chat_type:{type:String},messages:{type:Array},model:{type:Object},type:{type:String}}}render(){const e=(new Date).toISOString();return[Za(ig(),this.close,Vc.settings.get("assets_path")),...this.messages.map(t=>this.renderHelpMessage({isodate:e,markup:Qp.a.filterXSS(t,{whiteList:{strong:[]}})}))]}close(){this.model.set({show_help_messages:!1})}renderHelpMessage(e){return Za(rg(),this.type,e.isodate,Kp(e.markup))}});const mg=rl.env.utils,vg=e=>{const t=Vc.settings.get("emoji_categories");return Za(fg(),Object.keys(t).map(n=>t[n]?(e=>Za(pg(),e.category,e.category,e.current_category===e.category?"picked":"",zd(Uc.emoji_category_labels[e.category]),e.onCategoryPicked,e.category,e.category,e.emoji))(Object.assign({category:n,emoji:e.sn2Emoji(t[n])},e)):""))},_g=e=>Za(hg(),e.shouldBeHidden(e.emoji.sn)?"hidden":"",e.emoji.sn,e.emoji.sn,e.insertEmoji,e.emoji.sn,mg.shortnamesToEmojis(e.emoji.sn)),bg=e=>{const t=Vc.settings.get("emoji_categories");return Za(lg(),e.query,Object.keys(t).map(n=>t[n]?(e=>Za(ug(),e.category,e.category,zd(Vc.settings.get("emoji_category_labels")[e.category]),e.category,Object.values(rl.emojis.json[e.category]).map(t=>_g(Object.assign({emoji:t},e)))))(Object.assign({category:n},e)):""))},yg=e=>{const t=zd("Search");return Za(ag(),t,e.query||"",e.onSearchInputKeyDown,e.onSearchInputBlurred,e.onSearchInputFocus,e.query?"":vg(e),e.render_emojis?Za(sg(),e.chatview,e.model,e.search_results,e.current_skintone,e.query):"",["tone1","tone2","tone3","tone4","tone5"].map(t=>(e=>Za(cg(),e.skintone,e.current_skintone===e.skintone?"picked":"",e.skintone,e.onSkintonePicked,mg.shortnamesToEmojis(":"+e.skintone+":")))(Object.assign({skintone:t},e))))};function wg(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n          <div class="emoji-picker__lists">\n              ',"\n              ","\n          </div>\n      "]);return wg=function(){return e},e}function Sg(){const e=Eg(["\n                        <converse-emoji-picker\n                                .chatview=","\n                                .model=","\n                                ?render_emojis=",'\n                                current_category="','"\n                                current_skintone="','"\n                                query="','"\n                        ></converse-emoji-picker>']);return Sg=function(){return e},e}function xg(){const e=Eg(['\n            <div class="dropup">\n                <button class="toggle-emojis"\n                        title="','"\n                        data-toggle="dropdown"\n                        aria-haspopup="true"\n                        aria-expanded="false">\n                    <converse-icon\n                        class="fa fa-smile "\n                        path-prefix="','"\n                        size="1em"></converse-icon>\n                </button>\n                <div class="dropdown-menu">\n                    ',"\n                </div>\n            </div>"]);return xg=function(){return e},e}function Eg(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-emoji-picker-content",class extends mc{static get properties(){return{chatview:{type:Object},search_results:{type:Array},current_skintone:{type:String},model:{type:Object},query:{type:String}}}render(){const e={current_skintone:this.current_skintone,insertEmoji:e=>this.insertEmoji(e),query:this.query,search_results:this.search_results,shouldBeHidden:e=>this.shouldBeHidden(e)};return Za(wg(),(e=>{const t=zd("Search results");return Za(dg(),!e.query,t,e.search_results.map(t=>_g(Object.assign({emoji:t},e))))})(e),bg(e))}firstUpdated(){this.initIntersectionObserver()}initIntersectionObserver(){if(window.IntersectionObserver){if(this.observer)this.observer.disconnect();else{const e={root:this.querySelector(".emoji-picker__lists"),threshold:[.1]},t=e=>this.setCategoryOnVisibilityChange(e);this.observer=new IntersectionObserver(t,e)}mr()(".emoji-picker",this).forEach(e=>this.observer.observe(e))}}setCategoryOnVisibilityChange(e){const t=this.parentElement.navigator.selected,n=e.filter(e=>e.target.contains(t)).pop();let r;if(r=n||e.reduce((e,t)=>t.intersectionRatio>=((null==e?void 0:e.intersectionRatio)||0)?t:e,null),r&&r.isIntersecting){const e=r.target.getAttribute("data-category");e!==this.model.get("current_category")&&(this.parentElement.preserve_scroll=!0,this.model.save({current_category:e}))}}insertEmoji(e){e.preventDefault(),e.stopPropagation();const t="IMG"===e.target.nodeName?e.target.parentElement:e.target;this.parentElement.insertIntoTextArea(t.getAttribute("data-emoji"))}shouldBeHidden(e){if(e.includes("_tone")){if(!this.current_skintone||!e.includes(this.current_skintone))return!0}else if(this.current_skintone&&rl.emojis.toned.includes(e))return!0;return!(!this.query||Uc.FILTER_CONTAINS(e,this.query))}});const Ag=rl.env.utils;function Cg(){const e=Lg(["",""]);return Cg=function(){return e},e}function jg(){const e=Lg(['\n            <button class="toggle-compose-spoiler"\n                    title="','"\n                    @click=','>\n                <converse-icon class="fa ','"\n                         path-prefix="','"\n                         size="1em"></converse-icon>\n            </button>']);return jg=function(){return e},e}function Tg(){const e=Lg(['\n                <button title="','" @click=','>\n                    <converse-icon class="fa fa-paperclip"\n                        path-prefix="','"\n                        size="1em"></converse-icon>\n                </button>\n                <input type="file" @change=',' class="fileupload" multiple="" style="display:none"/>']);return Tg=function(){return e},e}function Og(){const e=Lg(['\n                <button class="toggle_occupants right"\n                        title="','"\n                        @click=','>\n                    <converse-icon class="fa ','"\n                             path-prefix="','" size="1em"></converse-icon>\n                </button>']);return Og=function(){return e},e}function kg(){const e=Lg(["",""]);return kg=function(){return e},e}function Ng(){const e=Lg(['<span class="right message-limit" title="','">',"</span>"]);return Ng=function(){return e},e}function Ig(){const e=Lg(['\n                <button class="toggle-call" @click=',' title="','">\n                    <converse-icon class="fa fa-phone" path-prefix="/dist" size="1em"></converse-icon>\n                </button>']);return Ig=function(){return e},e}function Mg(){const e=Lg(["<converse-emoji-dropdown .chatview=","></converse-dropdown>"]);return Mg=function(){return e},e}function Rg(){const e=Lg(['<button type="submit" class="btn send-button fa fa-paper-plane" title="','"></button>']);return Rg=function(){return e},e}function Dg(){const e=Lg(['<span class="toolbar-buttons">',"</span>"]);return Dg=function(){return e},e}function Pg(){const e=Lg(["\n            ","\n            ","\n        "]);return Pg=function(){return e},e}function Lg(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-emoji-dropdown",class extends Zh{static get properties(){return{chatview:{type:Object}}}constructor(){super(),this.render_emojis=!1}initModel(){return this.init_promise||(this.init_promise=(async()=>{await Vc.emojis.initialize();const e="converse.emoji-".concat(Uc.bare_jid,"-").concat(this.chatview.model.get("jid"));this.model=new Uc.EmojiPicker({id:e}),this.model.browserStorage=Uc.createStore(e),await new Promise(e=>this.model.fetch({success:e,error:e})),this.model.set({autocompleting:null,ac_position:null})})()),this.init_promise}render(){return Za(xg(),zd("Insert emojis"),Vc.settings.get("assets_path"),Qh(this.initModel().then(()=>Za(Sg(),this.chatview,this.model,this.render_emojis,this.model.get("current_category")||"",this.model.get("current_skintone")||"",this.model.get("query")||"")),""))}connectedCallback(){super.connectedCallback(),this.render_emojis=!1}toggleMenu(e){e.stopPropagation(),e.preventDefault(),Ag.hasClass("show",this.menu)?Ag.ancestor(e.target,".toggle-emojis")&&this.hideMenu():this.showMenu()}async showMenu(){await this.initModel(),this.render_emojis||(this.render_emojis=!0,await this.requestUpdate()),super.showMenu(),setTimeout(()=>{var e;return null===(e=this.querySelector(".emoji-search"))||void 0===e?void 0:e.focus()})}}),Vc.elements.define("converse-emoji-picker",class extends mc{static get properties(){return{chatview:{type:Object},current_category:{type:String,reflect:!0},current_skintone:{type:String,reflect:!0},model:{type:Object},query:{type:String,reflet:!0},render_emojis:{type:Boolean}}}firstUpdated(){this.listenTo(this.model,"change",e=>this.onModelChanged(e.changed)),this.initArrowNavigation()}constructor(){super(),this._search_results=[],this.debouncedFilter=Rc(e=>this.model.set({query:e.value}),250),this.registerEvents()}get search_results(){return this._search_results}set search_results(e){this._search_results=e,this.requestUpdate()}render(){return yg({chatview:this.chatview,current_category:this.current_category,current_skintone:this.current_skintone,model:this.model,onCategoryPicked:e=>this.chooseCategory(e),onSearchInputBlurred:e=>this.chatview.emitFocused(e),onSearchInputFocus:e=>this.onSearchInputFocus(e),onSearchInputKeyDown:e=>this.onKeyDown(e),onSkintonePicked:e=>this.chooseSkinTone(e),query:this.query,search_results:this.search_results,render_emojis:this.render_emojis,sn2Emoji:e=>Ag.shortnamesToEmojis(this.getTonedShortname(e))})}updated(e){e.has("query")&&this.updateSearchResults(e),e.has("current_category")&&this.setScrollPosition()}onModelChanged(e){"current_category"in e&&(this.current_category=e.current_category),"current_skintone"in e&&(this.current_skintone=e.current_skintone),"query"in e&&(this.query=e.query)}setScrollPosition(){if(this.preserve_scroll)return void(this.preserve_scroll=!1);const e=this.querySelector(".emoji-lists__container--browse"),t=this.querySelector("#emoji-picker-".concat(this.current_category));t&&(e.scrollTop=t.offsetTop-3*t.offsetHeight+4)}updateSearchResults(e){const t=e.get("query"),n=Uc.FILTER_CONTAINS;if(this.query){if(this.query===t)return this.search_results;t&&this.query.includes(t)?this.search_results=this.search_results.filter(e=>n(e.sn,this.query)):this.search_results=rl.emojis.list.filter(e=>n(e.sn,this.query))}else this.search_results.length&&(this.search_results=[]);this.requestUpdate()}registerEvents(){this.onGlobalKeyDown=e=>this._onGlobalKeyDown(e),document.querySelector("body").addEventListener("keydown",this.onGlobalKeyDown)}connectedCallback(){super.connectedCallback(),this.registerEvents()}disconnectedCallback(){document.querySelector("body").removeEventListener("keydown",this.onGlobalKeyDown),super.disconnectedCallback()}_onGlobalKeyDown(e){this.navigator&&(e.keyCode===rl.keycodes.ENTER&&this.navigator.selected&&Ag.isVisible(this)?this.onEnterPressed(e):e.keyCode===rl.keycodes.DOWN_ARROW&&!this.navigator.enabled&&Ag.isVisible(this)&&this.enableArrowNavigation(e))}setCategoryForElement(e){const t=this.current_category,n=(null==e?void 0:e.getAttribute("data-category"))||t;t!==n&&this.model.save({current_category:n})}insertIntoTextArea(e){this.chatview.onEmojiReceivedFromPicker(e),this.model.set({autocompleting:null,query:"",ac_position:null})}chooseSkinTone(e){e.preventDefault(),e.stopPropagation();const t=("IMG"===e.target.nodeName?e.target.parentElement:e.target).getAttribute("data-skintone").trim();this.current_skintone===t?this.model.save({current_skintone:""}):this.model.save({current_skintone:t})}chooseCategory(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();const t=e.target.matches("li")?e.target:Ag.ancestor(e.target,"li");this.setCategoryForElement(t),this.navigator.select(t),!this.navigator.enabled&&this.navigator.enable()}onKeyDown(e){if(e.keyCode===rl.keycodes.TAB)if(e.target.value){e.preventDefault();const t=rl.emojis.shortnames.find(t=>Uc.FILTER_CONTAINS(t,e.target.value));t&&this.model.set({query:t})}else this.navigator.enabled||this.enableArrowNavigation(e);else e.keyCode!==rl.keycodes.DOWN_ARROW||this.navigator.enabled?e.keyCode===rl.keycodes.ENTER?this.onEnterPressed(e):e.keyCode===rl.keycodes.ESCAPE?(Ag.ancestor(this,"converse-emoji-dropdown").hideMenu(),this.chatview.el.querySelector(".chat-textarea").focus(),e.stopPropagation(),e.preventDefault()):e.keyCode!==rl.keycodes.ENTER&&e.keyCode!==rl.keycodes.DOWN_ARROW&&this.debouncedFilter(e.target):this.enableArrowNavigation(e)}onEnterPressed(e){e.emoji_keypress_handled||(e.preventDefault(),e.stopPropagation(),e.emoji_keypress_handled=!0,rl.emojis.shortnames.includes(e.target.value)?this.insertIntoTextArea(e.target.value):1===this.search_results.length?this.insertIntoTextArea(this.search_results[0].sn):this.navigator.selected&&this.navigator.selected.matches(".insert-emoji")?this.insertIntoTextArea(this.navigator.selected.getAttribute("data-emoji")):this.navigator.selected&&this.navigator.selected.matches(".emoji-category")&&this.chooseCategory({target:this.navigator.selected}))}onSearchInputFocus(e){this.chatview.emitBlurred(e),this.disableArrowNavigation()}getTonedShortname(e){return rl.emojis.toned.includes(e)&&this.current_skintone?"".concat(e.slice(0,e.length-1),"_").concat(this.current_skintone,":"):e}initArrowNavigation(){if(!this.navigator){const e="li:not(.hidden):not(.emoji-skintone), .emoji-search",t={jump_to_picked:".emoji-category",jump_to_picked_selector:".emoji-category.picked",jump_to_picked_direction:Jh.DIRECTION.down,picked_selector:".picked",scroll_container:this.querySelector(".emoji-picker__lists"),getSelector:t=>{if(t===Jh.DIRECTION.down){const t=this.navigator.selected&&this.navigator.selected.getAttribute("data-category");return t?'ul[data-category="'.concat(t,'"] li:not(.hidden):not(.emoji-skintone), .emoji-search'):e}return e},onSelected:e=>{e.matches(".insert-emoji")&&this.setCategoryForElement(e.parentElement),e.matches(".insert-emoji, .emoji-category")&&e.firstElementChild.focus(),e.matches(".emoji-search")&&e.focus()}};this.navigator=new Jh(this,t)}}disableArrowNavigation(){this.navigator.disable()}enableArrowNavigation(e){var t,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e),this.disableArrowNavigation(),this.navigator.enable(),this.navigator.handleKeydown(e)}});const zg=rl.env.Strophe;window.customElements.define("converse-chat-toolbar",class extends mc{static get properties(){return{chatview:{type:Object},composing_spoiler:{type:Boolean},hidden_occupants:{type:Boolean},is_groupchat:{type:Boolean},message_limit:{type:Number},model:{type:Object},show_call_button:{type:Boolean},show_emoji_button:{type:Boolean},show_occupants_toggle:{type:Boolean},show_send_button:{type:Boolean},show_spoiler_button:{type:Boolean},show_toolbar:{type:Boolean}}}render(){const e=zd("Send the message");return Za(Pg(),this.show_toolbar?Za(Dg(),Qh(this.getButtons(),"")):"",this.show_send_button?Za(Rg(),e):"")}getButtons(){const e=[];if(this.show_emoji_button&&e.push(Za(Mg(),this.chatview)),this.show_call_button){const t=zd("Start a call");e.push(Za(Ig(),this.toggleCall,t))}const t=zd("Message characters remaining");Vc.settings.get("message_limit")&&e.push(Za(Ng(),t,this.message_limit)),this.show_spoiler_button&&e.push(this.getSpoilerButton());const n=Vc.disco.supports(zg.NS.HTTPUPLOAD,Uc.domain);if(e.push(Za(kg(),Qh(n.then(e=>this.getHTTPUploadButton(e)),""))),this.show_occupants_toggle){const t=zd("Hide participants"),n=zd("Show participants");e.push(Za(Og(),this.hidden_occupants?n:t,this.toggleOccupants,this.hidden_occupants?"fa-angle-double-left":"fa-angle-double-right",Vc.settings.get("assets_path")))}return Uc.api.hook("getToolbarButtons",this,e)}getHTTPUploadButton(e){if(e){const e=zd("Choose a file to send");return Za(Tg(),e,this.toggleFileUpload,Vc.settings.get("assets_path"),this.onFileSelection)}return""}getSpoilerButton(){const e=this.model;if(!this.is_groupchat&&0===e.presence.resources.length)return;let t;t=this.composing_spoiler?zd("Click to write as a normal (non-spoiler) message"):zd("Click to write your message as a spoiler");const n=Za(jg(),t,this.toggleComposeSpoilerMessage,this.composing_spoiler?"fa-eye-slash":"fa-eye",Vc.settings.get("assets_path"));if(this.is_groupchat)return n;{const t=e.get("jid"),r=Promise.all(e.presence.resources.map(e=>Vc.disco.supports(zg.NS.SPOILER,"".concat(t,"/").concat(e.get("name"))))).then(e=>e.reduce((e,t)=>e&&t,!0));return Za(Cg(),Qh(r.then(()=>n),""))}}toggleFileUpload(e){var t,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e),this.querySelector(".fileupload").click()}onFileSelection(e){this.model.sendFiles(e.target.files)}toggleComposeSpoilerMessage(e){var t,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e),this.model.set("composing_spoiler",!this.model.get("composing_spoiler"))}toggleOccupants(e){var t,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e),this.model.save({hidden_occupants:!this.model.get("hidden_occupants")})}toggleCall(e){var t,n;null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e),Vc.trigger("callButtonClicked",{connection:Uc.connection,model:this.model})}});class Fg extends HTMLElement{async connectedCallback(){await Vc.waitUntil("initialized"),rl.insertInto(this)}}customElements.define("converse-root",Fg);const Bg=rl.env.utils;var qg={renderAvatar(e){const t=(e=e||this.el).querySelector("canvas.avatar, svg.avatar");if(null!==t&&this.model.vcard){const e={classes:t.getAttribute("class"),width:t.getAttribute("width"),height:t.getAttribute("height"),image_type:this.model.vcard.get("image_type"),image:this.model.vcard.get("image")};t.outerHTML=Bg.getElementFromTemplateResult(ip(e)).outerHTML}}};function Hg(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="inner-content converse-brand row">\n        <div class="converse-brand__padding"></div>\n        <div class="converse-brand__heading">\n            <svg height="200px"\n                xmlns="http://www.w3.org/2000/svg"\n                xmlns:xlink="http://www.w3.org/1999/xlink"\n                viewBox="0 0 364 364"\n                version="1.1">\n                <title>Logo Converse</title>\n                <defs>\n                    <linearGradient id="gradient" x1="92.14" y1="27.64" x2="267.65" y2="331.62" gradientUnits="userSpaceOnUse">\n                        <stop offset="0" stop-color="#fff1d1"/>\n                        <stop offset="0.05" stop-color="#fae8c1"/>\n                        <stop offset="0.15" stop-color="#f0d5a1"/>\n                        <stop offset="0.27" stop-color="#e7c687"/>\n                        <stop offset="0.4" stop-color="#e1bb72"/>\n                        <stop offset="0.54" stop-color="#dcb264"/>\n                        <stop offset="0.71" stop-color="#daad5c"/>\n                        <stop offset="1" stop-color="#d9ac59"/>\n                    </linearGradient>\n                    <filter id="shadow">\n                        <feGaussianBlur in="SourceAlpha" stdDeviation="2.3" result="blur1"/>\n                        <feOffset in="blur1" dx="3" dy="3" result="blur2"/>\n                        <feColorMatrix in="blur2" type="matrix" result="blur3"\n                            values="1 0 0 0 0.1\n                                    0 1 0 0 0.1\n                                    0 0 1 0 0.1\n                                    0 0 0 1 0"/>\n                        <feMerge>\n                            <feMergeNode in="blur3"/>\n                            <feMergeNode in="SourceGraphic"/>\n                        </feMerge>\n                    </filter>\n                </defs>\n                <g filter="url(#shadow)">\n                    <path d="M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z" fill="#d9ac59"/>\n                    <path d="M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z" fill="url(#gradient)"/>\n                </g>\n            </svg>\n            <span class="converse-brand__text">\n                <span>converse<span class="subdued">.js</span></span>\n                <p class="byline">messaging freedom</p>\n            </span>\n        </div>\n    </div>']);return Hg=function(){return e},e}
-/**
- * @license
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
- * This code may only be used under the BSD style license found at
- * http://polymer.github.io/LICENSE.txt
- * The complete set of authors may be found at
- * http://polymer.github.io/AUTHORS.txt
- * The complete set of contributors may be found at
- * http://polymer.github.io/CONTRIBUTORS.txt
- * Code distributed by Google as part of the polymer project is also
- * subject to an additional IP rights grant found at
- * http://polymer.github.io/PATENTS.txt
- */
-const Ug=new WeakMap,$g=ka(e=>t=>{if(!(t instanceof qa))throw new Error("unsafeSVG can only be used in text bindings");const n=Ug.get(t);if(void 0!==n&&La(e)&&e===n.value&&t.value===n.fragment)return;const r=document.createElement("template");r.innerHTML=`<svg>${e}</svg>`;const i=r.content,o=i.firstChild;i.removeChild(o),ma(i,o.firstChild);const s=document.importNode(i,!0);t.setValue(s),Ug.set(t,{value:e,fragment:s})});function Wg(){const e=Vg(["",""]);return Wg=function(){return e},e}function Gg(){const e=Vg(["",""]);return Gg=function(){return e},e}function Vg(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Jg(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="converse-chatboxes row no-gutters"></div>\n    <div id="converse-modals" class="modals"></div>\n    <converse-fontawesome></converse-fontawesome>\n']);return Jg=function(){return e},e}window.customElements.define("converse-fontawesome",class extends mc{constructor(){super();const e=n.e(138).then(n.t.bind(null,548,7));this.data=e.then(e=>Za(Gg(),$g(e.default())))}render(){return Za(Wg(),Qh(this.data,""))}});var Xg=function(e,t,n){var r=null==e?0:e.length;return r?(t=n||void 0===t?1:fi(t),jo(e,t<0?0:t,r)):[]};var Qg=function(e,t){var n=[];return vs(e,(function(e,r,i){t(e,r,i)&&n.push(e)})),n};var Yg=function(e,t){return(ke(e)?ot:Qg)(e,Eo(t,3))};var Kg=function(e){return e&&e.length?e[0]:void 0};var Zg=function(e){return"function"==typeof e?e:br};var em=function(e,t){return(ke(e)?ve:vs)(e,Zg(t))};var tm=function(e,t){return qr(t,(function(t){return e[t]}))};var nm=function(e){return null==e?[]:tm(e,Qe(e))},rm=Math.max;var im=function(e,t,n,r){e=Xe(e)?e:nm(e),n=n&&!r?fi(n):0;var i=e.length;return n<0&&(n=rm(i+n,0)),Zt(e)?n<=i&&e.indexOf(t,n)>-1:!!i&&As(e,t,n)>-1};var om=function(e){return(null==e?0:e.length)?jo(e,0,-1):[]};var sm=function(e,t){return(ke(e)?qr:Qs)(e,Eo(t,3))};var am=function(e,t,n){for(var r=-1,i=e.length;++r<i;){var o=e[r],s=t(o);if(null!=s&&(void 0===a?s==s&&!Ir(s):n(s,a)))var a=s,c=o}return c};var cm=function(e,t){return e>t};var lm=function(e){return e&&e.length?am(e,br,cm):void 0};var um=function(e,t){return e<t};var dm=function(e){return e&&e.length?am(e,br,um):void 0};var hm=function(e,t,n,r){var i=-1,o=null==e?0:e.length;for(r&&o&&(n=e[++i]);++i<o;)n=t(n,e[i],i,e);return n};var fm=function(e,t,n,r,i){return i(e,(function(e,i,o){n=r?(r=!1,e):t(n,e,i,o)})),n};var pm=function(e,t,n){var r=ke(e)?hm:fm,i=arguments.length<3;return r(e,Eo(t,4),n,i,vs)};var gm=function(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n},mm=Fi(!0);var vm=ms((function(e,t){return e&&mm(e,t,Qe)}),!0);var _m=function(e,t,n){var r=ke(e)?gm:fm,i=arguments.length<3;return r(e,Eo(t,4),n,i,vm)};var bm=function(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}};var ym=function(e,t){return(ke(e)?ot:Qg)(e,bm(Eo(t,3)))};var wm=function(e,t){if("function"!=typeof e)throw new TypeError("Expected a function");return t=void 0===t?t:fi(t),jr(e,t)},Sm=Math.floor,xm=Math.random;var Em=function(e,t){return e+Sm(xm()*(t-e+1))};var Am=function(e){var t=e.length;return t?e[Em(0,t-1)]:void 0};var Cm=function(e){return Am(nm(e))};var jm=function(e){return(ke(e)?Am:Cm)(e)};var Tm=function(e,t){var n=-1,r=e.length,i=r-1;for(t=void 0===t?r:t;++n<t;){var o=Em(n,i),s=e[o];e[o]=e[n],e[n]=s}return e.length=t,e};var Om=function(e){return Tm(it(e))};var km=function(e){return Tm(nm(e))};var Nm=function(e){return(ke(e)?Om:km)(e)},Im=wo("length"),Mm=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var Rm=function(e){return Mm.test(e)},Dm="[\\ud800-\\udfff]",Pm="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Lm="\\ud83c[\\udffb-\\udfff]",zm="[^\\ud800-\\udfff]",Fm="(?:\\ud83c[\\udde6-\\uddff]){2}",Bm="[\\ud800-\\udbff][\\udc00-\\udfff]",qm="(?:"+Pm+"|"+Lm+")"+"?",Hm="[\\ufe0e\\ufe0f]?"+qm+("(?:\\u200d(?:"+[zm,Fm,Bm].join("|")+")[\\ufe0e\\ufe0f]?"+qm+")*"),Um="(?:"+[zm+Pm+"?",Pm,Fm,Bm,Dm].join("|")+")",$m=RegExp(Lm+"(?="+Lm+")|"+Um+Hm,"g");var Wm=function(e){for(var t=$m.lastIndex=0;$m.test(e);)++t;return t};var Gm=function(e){return Rm(e)?Wm(e):Im(e)};var Vm=function(e){if(null==e)return 0;if(Xe(e))return Zt(e)?Gm(e):e.length;var t=Tt(e);return"[object Map]"==t||"[object Set]"==t?e.size:Je(e).length};var Jm=function(e){var t=null==e?0:e.length;return t?jo(e,1,t):[]};var Xm=function(e,t,n){return e&&e.length?(t=n||void 0===t?1:fi(t),jo(e,0,t<0?0:t)):[]};var Qm=function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n};var Ym=function(e){return e.split("")},Km="[\\ud800-\\udfff]",Zm="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ev="[^\\ud800-\\udfff]",tv="(?:\\ud83c[\\udde6-\\uddff]){2}",nv="[\\ud800-\\udbff][\\udc00-\\udfff]",rv="(?:"+Zm+"|\\ud83c[\\udffb-\\udfff])"+"?",iv="[\\ufe0e\\ufe0f]?"+rv+("(?:\\u200d(?:"+[ev,tv,nv].join("|")+")[\\ufe0e\\ufe0f]?"+rv+")*"),ov="(?:"+[ev+Zm+"?",Zm,tv,nv,Km].join("|")+")",sv=RegExp("\\ud83c[\\udffb-\\udfff](?=\\ud83c[\\udffb-\\udfff])|"+ov+iv,"g");var av=function(e){return e.match(sv)||[]};var cv=function(e){return Rm(e)?av(e):Ym(e)},lv=w?w.iterator:void 0;var uv=function(e){if(!e)return[];if(Xe(e))return Zt(e)?cv(e):it(e);if(lv&&e[lv])return Qm(e[lv]());var t=Tt(e);return("[object Map]"==t?Zi:"[object Set]"==t?eo:nm)(e)},dv=jr((function(e,t){return Os(e)?Ts(e,t):[]}));
-/*!
- * Copyright (c) JC Brand <jc@opkode.com>
- */
-const hv=function(e){this.views={},this.keys=()=>Object.keys(this.views),this.getAll=()=>this.views,this.get=e=>this.views[e],this.xget=e=>this.keys().filter(t=>t!==e).reduce((e,t)=>(e[t]=this.views[t],e),{}),this.add=(e,t)=>(this.views[e]=t,t),this.remove=e=>{void 0===e&&(new eh).remove.apply(this);const t=this.views[e];if(t)return delete this.views[e],t.remove(),t},this.removeAll=()=>(this.keys().forEach(e=>this.remove(e)),this),eh.apply(this,Array.prototype.slice.apply(arguments))},fv={includes:im,difference:ks,drop:Xg,every:Ms,filter:Yg,find:fl,first:Kg,forEach:em,head:Kg,indexOf:Hs,initial:om,invoke:Pc,isEmpty:oi,last:Co,lastIndexOf:Vs,map:sm,max:lm,min:dm,reduce:pm,reduceRight:_m,reject:ym,rest:wm,sample:jm,shuffle:Nm,size:Vm,some:Xs,sortBy:ta,tail:Jm,take:Xm,toArray:uv,without:dv};Object.keys(fv).forEach(e=>{hv.prototype[e]=function(){const t=Array.prototype.slice.call(arguments);return t.unshift(this.views),fv[e].apply(this,t)}}),Object.assign(hv.prototype,eh.prototype),hv.extend=eh.extend;const pv=hv.extend({listItems:"model",sortEvent:"change",sortImmediatelyOnAdd:!1,listSelector:".ordered-items",ItemView:void 0,subviewIndex:"id",initialize(){this.sortEventually=Rc(()=>this.sortAndPositionAllItems(),100),this.items=vo(this,this.listItems),this.items.on("remove",this.removeView,this),this.items.on("reset",this.removeAll,this),this.items.on("add",(e,t)=>{this.sortImmediatelyOnAdd?this.sortAndPositionAllItems():this.sortEventually()}),this.sortEvent&&this.items.on(this.sortEvent,this.sortEventually,this)},createItemView(e){let t=this.get(e.get(this.subviewIndex));return t?(t.model=e,t.initialize()):(t=new this.ItemView({model:e}),this.add(e.get(this.subviewIndex),t)),t.render(),t},removeView(e){this.remove(e.get(this.subviewIndex))},sortAndPositionAllItems(){if(!this.items.length)return;this.items.sort();const e=this.el.querySelector(this.listSelector),t=document.createElement("div");e.parentNode.replaceChild(t,e),this.items.forEach(t=>{let n=this.get(t.get(this.subviewIndex));n||(n=this.createItemView(t)),e.insertAdjacentElement("beforeend",n.el)}),t.parentNode.replaceChild(e,t)}}),gv=rl.env.utils;var mv=hv.extend({_ensureElement(){if(this.el)this.setElement(Qr(this,"el"),!1);else{let e=Uc.root.querySelector("#conversejs");if(null===e){e=document.createElement("div"),e.setAttribute("id","conversejs"),gv.addClass("theme-".concat(Vc.settings.get("theme")),e);const t=Uc.root.querySelector("body");t?t.appendChild(e):Uc.root.appendChild(e)}this.setElement(e,!1)}},initialize(){this.listenTo(this.model,"destroy",this.removeChat);const e=document.getElementById("conversejs-bg");e&&!e.innerHTML.trim()&&Ya(Za(Hg()),e),document.querySelector("body").classList.add("converse-".concat(Vc.settings.get("view_mode"))),this.el.classList.add("converse-".concat(Vc.settings.get("view_mode"))),Vc.settings.get("singleton")&&this.el.classList.add("converse-singleton"),this.render()},render(){this._ensureElement(),Ya(Za(Jg()),this.el),this.row_el=this.el.querySelector(".row")},insertRowColumn(e){this.row_el.insertAdjacentElement("afterBegin",e)},removeChat(e){this.remove(e.get("id"))},closeAllChatBoxes(){return Promise.all(this.map(e=>e.close({name:"closeAllChatBoxes"})))}});
-/**
- * @module converse-chatboxviews
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */function vv(){Uc.chatboxviews=new Uc.ChatBoxViews({model:Uc.chatboxes}),Vc.trigger("chatBoxViewsInitialized")}function _v(){const e=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(e,"px"))}function bv(){const e=wv(["<p>","</p>"]);return bv=function(){return e},e}function yv(){const e=wv(['\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header ','">\n              <h5 class="modal-title">',"</h5>\n              ",'\n            </div>\n            <div class="modal-body">\n              <span class="modal-alert"></span>\n              ',"\n            </div>\n        </div>\n    </div>\n"]);return yv=function(){return e},e}function wv(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}rl.plugins.add("converse-chatboxviews",{dependencies:["converse-chatboxes","converse-vcard"],initialize(){Vc.elements.register(),Vc.promises.add(["chatBoxViewsInitialized"]),Vc.settings.extend({animate:!0,theme:"default"}),Uc.ViewWithAvatar=eh.extend(qg),Uc.ChatBoxViews=mv,Vc.listen.on("chatBoxesInitialized",vv),Vc.listen.on("cleanup",()=>delete Uc.chatboxviews),Vc.listen.on("clearSession",()=>Uc.chatboxviews.closeAllChatBoxes()),Vc.listen.on("chatBoxViewsInitialized",_v),window.addEventListener("resize",_v),Object.assign(rl,{insertInto(e){var t;const n=null===(t=Uc.chatboxviews)||void 0===t?void 0:t.el;if(n&&!e.contains(n))e.insertAdjacentElement("afterBegin",n),Vc.chatviews.get().filter(e=>"controlbox"!==e.model.get("id")).forEach(e=>e.maintainScrollTop());else if(!n)throw new Error("Cannot insert non-existing #conversejs element into the DOM")}})}});var Sv=df.extend({id:"alert-modal",initialize(){df.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render)},toHTML(){return e=Object.assign({__:zd},this.model.toJSON()),Za(yv(),e.level,e.title,mf,e.messages.map(e=>Za(bv(),e)));var e}});function xv(){const e=Cv(["<p>","</p>"]);return xv=function(){return e},e}function Ev(){const e=Cv(['\n    <div class="modal-dialog" role="document">\n      <div class="modal-content">\n        <div class="modal-header ','">\n          <h5 class="modal-title">','</h5>\n          <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n            <span aria-hidden="true">×</span>\n          </button>\n        </div>\n        <div class="modal-body">\n            <span class="modal-alert"></span>\n            <form class="converse-form converse-form--modal confirm" action="#">\n              <div class="form-group">\n                  ',"\n              </div>\n              ",'\n              <div class="form-group">\n                  <button type="submit" class="btn btn-primary">','</button>\n                  <input type="button" class="btn btn-secondary" data-dismiss="modal" value="','"/>\n              </div>\n          </form>\n        </div>\n      </div>\n    </div>\n']);return Ev=function(){return e},e}function Av(){const e=Cv(['\n    <div class="form-group">\n        <label>\n            ','\n            <input type="text"\n                name="','"\n                class="',' form-control form-control--labeled"\n                ?required="','"\n                placeholder="','" />\n        </label>\n    </div>\n']);return Av=function(){return e},e}function Cv(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var jv=e=>Za(Ev(),e.level||"",e.title,e.messages.map(e=>Za(xv(),e)),e.fields.map(e=>(e=>Za(Av(),e.label||"",e.name,e.challenge_failed?"error":"",e.required,e.placeholder))(e)),zd("OK"),zd("Cancel"));const Tv=rl.env.utils;var Ov=df.extend({id:"confirm-modal",events:{"submit .confirm":"onConfimation"},initialize(){this.confirmation=Tv.getResolveablePromise(),df.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.el.addEventListener("closed.bs.modal",()=>this.confirmation.reject(),!1)},toHTML(){return jv(this.model.toJSON())},afterRender(){this.close_handler_registered||(this.el.addEventListener("closed.bs.modal",()=>{this.confirmation.isResolved||this.confirmation.reject()},!1),this.close_handler_registered=!0)},onConfimation(e){e.preventDefault();const t=new FormData(e.target),n=(this.model.get("fields")||[]).map(e=>{const n=t.get(e.name).trim();return e.value=n,e.challenge&&(e.challenge_failed=n!==e.challenge),e});if(n.filter(e=>e.challenge_failed).length)return this.model.set("fields",n),void this.model.trigger("change");this.confirmation.resolve(n),this.modal.hide()}});
-/**
- * @module converse-modal
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */rl.env.BootstrapModal=df;let kv=[];const Nv={modal:{show(e,t,n){const r=this.get(e.id)||this.create(e,t);return r.show(n),r},get:e=>kv.filter(t=>t.id==e).pop(),create(e,t){const n=new e(t);return kv.push(n),n},remove(e){kv=kv.filter(t=>t!==e),e.remove()},removeAll(){kv.forEach(e=>e.remove()),kv=[]}},async confirm(e,t=[],n=[]){"string"==typeof t&&(t=[t]);const r=new qo({title:e,messages:t,fields:n,type:"confirm"}),i=new Ov({model:r});let o;i.show();try{o=await i.confirmation}catch(e){o=!1}return i.remove(),o},async prompt(e,t=[],n=""){"string"==typeof t&&(t=[t]);const r=new qo({title:e,messages:t,fields:[{name:"reason",placeholder:n}],type:"prompt"}),i=new Ov({model:r});let o;i.show();try{var s;o=null===(s=(await i.confirmation).pop())||void 0===s?void 0:s.value}catch(e){o=!1}return i.remove(),o},alert(e,t,n){let r;"string"==typeof n&&(n=[n]),"error"===e?r="alert-danger":"info"===e?r="alert-info":"warn"===e&&(r="alert-warning");const i=new qo({title:t,messages:n,level:r,type:"alert"});Vc.modal.show(Sv,{model:i})}};function Iv(){const e=Uv(["<p><label>",":</label> ","</p>"]);return Iv=function(){return e},e}function Mv(){const e=Uv(["<p><label>",':</label> <a href="mailto:','">',"</a></p>"]);return Mv=function(){return e},e}function Rv(){const e=Uv(["<p><label>",':</label> <a target="_blank" rel="noopener" href="','">',"</a></p>"]);return Rv=function(){return e},e}function Dv(){const e=Uv(["<p><label>",":</label> ","</p>"]);return Dv=function(){return e},e}function Pv(){const e=Uv(["<p><label>",":</label> ","</p>"]);return Pv=function(){return e},e}function Lv(){const e=Uv(['<div class="mb-4">',"</div>"]);return Lv=function(){return e},e}function zv(){const e=Uv(['\n        <div class="modal-dialog" role="document">\n            <div class="modal-content">\n                <div class="modal-header">\n                    <h5 class="modal-title" id="user-details-modal-label">',"</h5>\n                    ",'\n                </div>\n                <div class="modal-body">\n                    ',"\n                    ","\n                    <p><label>",':</label> <a href="xmpp:','">',"</a></p>\n                    ","\n                    ","\n                    ","\n                    ","\n\n                    ",'\n                </div>\n                <div class="modal-footer">\n                    ','\n                    <button type="button" class="btn btn-info refresh-contact"><i class="fa fa-refresh"> </i>',"</button>\n                    ","\n\n                </div>\n            </div>\n        </div>\n    "]);return zv=function(){return e},e}function Fv(){const e=Uv(['\n        <button type="button" @click="','" class="btn btn-danger remove-contact">\n            <i class="far fa-trash-alt"></i>',"\n        </button>\n    "]);return Fv=function(){return e},e}function Bv(){const e=Uv(['<li class="list-group-item"> '," </li>"]);return Bv=function(){return e},e}function qv(){const e=Uv(['\n        <hr/>\n        <ul class="list-group fingerprints">\n            <li class="list-group-item active">',"</li>\n            ","\n        </ul>\n    "]);return qv=function(){return e},e}function Hv(){const e=Uv(['\n            <li class="list-group-item">\n                <form class="fingerprint-trust">\n                <div class="btn-group btn-group-toggle">\n                    <label class="btn btn--small ','">\n                        <input type="radio" name="','" value="1" ?checked=',">",'\n                    </label>\n                    <label class="btn btn--small ','">\n                        <input type="radio" name="','" value="-1" ?checked=',">",'\n                    </label>\n                </div>\n                <code class="fingerprint">',"</code>\n                </form>\n            </li>\n        "]);return Hv=function(){return e},e}function Uv(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}rl.plugins.add("converse-modal",{initialize(){Vc.listen.on("disconnect",()=>{const e=document.querySelector("#converse-modals");e&&(e.innerHTML="")}),Vc.listen.on("clearSession",()=>Vc.modal.removeAll()),Object.assign(Uc.api,Nv)}});const $v=e=>{const t=zd("OMEMO Fingerprints"),n=zd("No OMEMO-enabled devices found"),r=e.view.devicelist.devices;return Za(qv(),t,r.length?r.map(t=>(e=>{const t=zd("Trusted"),n=zd("Untrusted");return e.device.get("bundle")&&e.device.get("bundle").fingerprint?Za(Hv(),-1!==e.device.get("trusted")?"btn-primary active":"btn-secondary",e.device.get("id"),-1!==e.device.get("trusted"),t,-1!==e.device.get("trusted")?"btn-primary active":"btn-secondary",e.device.get("id"),-1===e.device.get("trusted"),n,e.utils.formatFingerprint(e.device.get("bundle").fingerprint)):""})(Object.assign({device:t},e))):Za(Bv(),n))};var Wv=e=>{const t=zd("XMPP Address"),n=zd("Email"),r=zd("Full Name"),i=zd("Nickname"),o=zd("The User's Profile Image"),s=zd("Refresh"),a=zd("Role"),c=zd("URL"),l={alt_text:o,extra_classes:"mb-3",height:"120",width:"120"};return Za(zv(),e.display_name,mf,e.image?Za(Lv(),ip(Object.assign(e,l))):"",e.fullname?Za(Pv(),r,e.fullname):"",t,e.jid,e.jid,e.nickname?Za(Dv(),i,e.nickname):"",e.url?Za(Rv(),c,e.url,e.url):"",e.email?Za(Mv(),n,e.email,e.email):"",e.role?Za(Iv(),a,e.role):"",e._converse.pluggable.plugins["converse-omemo"].enabled(e._converse)?$v(e):"",gf,s,e.allow_contact_removal&&e.is_roster_contact?(e=>{const t=zd("Remove as contact");return Za(Fv(),e.removeContact,t)})(e):"")};const Gv=rl.env.utils;const Vv=df.extend({id:"user-details-modal",persistent:!0,events:{"click button.refresh-contact":"refreshContact","click .fingerprint-trust .btn input":"toggleDeviceTrust"},initialize(){df.prototype.initialize.apply(this,arguments),this.model.rosterContactAdded.then(()=>this.registerContactEventHandlers()),this.listenTo(this.model,"change",this.render),this.registerContactEventHandlers(),Vc.trigger("userDetailsModalInitialized",this.model)},toHTML(){var e;const t=null===(e=this.model)||void 0===e?void 0:e.vcard,n=t?t.toJSON():{};return Wv(Object.assign(this.model.toJSON(),n,{_converse:Uc,allow_contact_removal:Vc.settings.get("allow_contact_removal"),display_name:this.model.getDisplayName(),is_roster_contact:void 0!==this.model.contact,removeContact:e=>this.removeContact(e),view:this,utils:Gv}))},registerContactEventHandlers(){void 0!==this.model.contact&&(this.listenTo(this.model.contact,"change",this.render),this.listenTo(this.model.contact.vcard,"change",this.render),this.model.contact.on("destroy",()=>{delete this.model.contact,this.render()}))},async refreshContact(e){e&&e.preventDefault&&e.preventDefault();const t=this.el.querySelector(".fa-refresh");Gv.addClass("fa-spin",t);try{await Vc.vcard.update(this.model.contact.vcard,!0)}catch(e){zn.fatal(e),this.alert(zd("Sorry, something went wrong while trying to refresh"),"danger")}Gv.removeClass("fa-spin",t)},removeContact(e){if(e&&e.preventDefault&&e.preventDefault(),!Vc.settings.get("allow_contact_removal"))return;!0===confirm(zd("Are you sure you want to remove this contact?"))&&(setTimeout(()=>{var e;(e=this.model.contact).removeFromRoster(()=>e.destroy(),t=>{t&&zn.error(t),Vc.alert("error",zd("Error"),[zd("Sorry, there was an error while trying to remove %1$s as a contact.",e.getDisplayName())])})},1),this.modal.hide())}});Uc.UserDetailsModal=Vv;var Jv=Vv;function Xv(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="flyout box-flyout">\n        <div class="chat-head chat-head-chatbox row no-gutters"></div>\n        <div class="chat-body">\n            <div class="chat-content ','" aria-live="polite">\n                <div class="chat-content__messages" @scroll=','></div>\n                <div class="chat-content__help"></div>\n            </div>\n            <div class="bottom-panel">\n                <div class="message-form-container">\n            </div>\n        </div>\n    </div>\n']);return Xv=function(){return e},e}var Qv=e=>Za(Xv(),e.show_send_button?"chat-content-sendbutton":"",e.markScrolled);function Yv(){const e=i_(['<p class="chat-head__desc">',"</p>"]);return Yv=function(){return e},e}function Kv(){const e=i_(["<converse-dropdown .items=","></converse-dropdown>"]);return Kv=function(){return e},e}function Zv(){const e=i_(['<a class="user show-msg-author-modal" @click=',">","</a>"]);return Zv=function(){return e},e}function e_(){const e=i_(['<a class="show-msg-author-modal" @click=',">","</a>"]);return e_=function(){return e},e}function t_(){const e=i_(['<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>']);return t_=function(){return e},e}function n_(){const e=i_(['\n        <div class="chatbox-title ','">\n            <div class="chatbox-title--row">\n                ',"\n                ",'\n                <div class="chatbox-title__text" title="','">\n                    ','\n                </div>\n            </div>\n            <div class="chatbox-title__buttons row no-gutters">\n                ',"\n                ","\n            </div>\n        </div>\n        ","\n    "]);return n_=function(){return e},e}function r_(){const e=i_(['<span class="mr-2">',"</span>"]);return r_=function(){return e},e}function i_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function o_(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="new-msgs-indicator hidden">â–¼ ',' â–¼</div>\n    <form class="setNicknameButtonForm hidden">\n        <input type="submit" class="btn btn-primary" name="join" value="Join"/>\n    </form>\n    <form class="sendXMPPMessage">\n        <span class="chat-toolbar no-text-select"></span>\n        <input type="text" placeholder="','" value="','" class="',' spoiler-hint"/>\n\n        <div class="suggestion-box">\n            <ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>\n            <textarea\n                type="text"\n                class="chat-textarea suggestion-box__input\n                    ',"\n                    ",'"\n                placeholder="','">','</textarea>\n            <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n        </div>\n    </form>\n']);return o_=function(){return e},e}function s_(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n        <converse-chat-toolbar\n            .chatview=","\n            .model=",'\n            ?composing_spoiler="','"\n            ?hidden_occupants="','"\n            ?is_groupchat="','"\n            ?show_call_button="','"\n            ?show_emoji_button="','"\n            ?show_occupants_toggle="','"\n            ?show_send_button="','"\n            ?show_spoiler_button="','"\n            ?show_toolbar="','"\n            message_limit="','"\n        ></converse-chat-toolbar>\n    ']);return s_=function(){return e},e}function a_(){const e=d_(['\n            <a href="#" class="dropdown-item ','" @click=',' title="','"\n                ><i class="fa ','"></i>',"</a\n            >\n        "]);return a_=function(){return e},e}function c_(){const e=d_(['\n            <a\n                href="#"\n                class="chatbox-btn '," fa ",'"\n                @click=','\n                title="','"\n            ></a>\n        ']);return c_=function(){return e},e}function l_(){const e=d_(["\n                    <converse-chat-content .chatview="," .messages="," notifications=",">\n                    </converse-chat-content>\n                "]);return l_=function(){return e},e}function u_(){const e=d_(["\n                <converse-chat-help\n                    .model=","\n                    .messages=","\n                    ?hidden=",'\n                    type="info"\n                    chat_type="','"\n                ></converse-chat-help>\n            ']);return u_=function(){return e},e}function d_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const h_=rl.env.utils,{dayjs:f_}=rl.env;var p_=eh.extend({length:200,className:"chatbox hidden",is_chatroom:!1,events:{"click .chatbox-navback":"showControlBox","click .new-msgs-indicator":"viewUnreadMessages","click .send-button":"onFormSubmitted","click .toggle-clear":"clearMessages","input .chat-textarea":"inputChanged","keydown .chat-textarea":"onKeyDown","keyup .chat-textarea":"onKeyUp","paste .chat-textarea":"onPaste"},async initialize(){this.initDebounced(),this.listenTo(this.model,"change:composing_spoiler",this.renderMessageForm),this.listenTo(this.model,"change:hidden",e=>e.get("hidden")?this.hide():this.show()),this.listenTo(this.model,"change:status",this.onStatusMessageChanged),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"show",this.show),this.listenTo(this.model,"vcard:change",this.renderHeading),this.model.contact&&this.listenTo(this.model.contact,"destroy",this.renderHeading),this.model.rosterContactAdded&&this.model.rosterContactAdded.then(()=>{this.listenTo(this.model.contact,"change:nickname",this.renderHeading),this.renderHeading()}),this.listenTo(this.model.presence,"change:show",this.onPresenceChanged),this.render(),this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model.messages,"remove",this.renderChatHistory),this.listenTo(this.model.messages,"rendered",this.maybeScrollDown),this.listenTo(this.model.messages,"reset",this.renderChatHistory),this.listenTo(this.model.notifications,"change",this.renderNotifications),this.listenTo(this.model,"change:show_help_messages",this.renderHelpMessages),await this.model.messages.fetched,this.insertIntoDOM(),this.model.maybeShow(),this.scrollDown(),Vc.trigger("chatBoxViewInitialized",this)},initDebounced(){this.markScrolled=Rc(this._markScrolled,100),this.debouncedScrollDown=Rc(this.scrollDown,100),Vc.settings.get("debounced_content_rendering")?(this.renderChatHistory=Rc(()=>this.renderChatContent(!1),100),this.renderNotifications=Rc(()=>this.renderChatContent(!0),100)):(this.renderChatHistory=()=>this.renderChatContent(!1),this.renderNotifications=()=>this.renderChatContent(!0))},render(){const e=Qv(Object.assign(this.model.toJSON(),{markScrolled:e=>this.markScrolled(e)}));return Ya(e,this.el),this.content=this.el.querySelector(".chat-content"),this.notifications=this.el.querySelector(".chat-content__notifications"),this.msgs_container=this.el.querySelector(".chat-content__messages"),this.help_container=this.el.querySelector(".chat-content__help"),this.renderChatContent(),this.renderMessageForm(),this.renderHeading(),this},onMessageAdded(e){this.renderChatHistory(),h_.isNewMessage(e)&&("me"===e.get("sender")?this.model.set("scrolled",!1):this.model.get("scrolled",!0)&&this.showNewMessagesIndicator())},getNotifications(){return this.model.notifications.get("chat_state")===Uc.COMPOSING?zd("%1$s is typing",this.model.getDisplayName()):this.model.notifications.get("chat_state")===Uc.PAUSED?zd("%1$s has stopped typing",this.model.getDisplayName()):this.model.notifications.get("chat_state")===Uc.GONE?zd("%1$s has gone away",this.model.getDisplayName()):""},getHelpMessages:()=>["<strong>/clear</strong>: ".concat(zd("Remove messages")),"<strong>/close</strong>: ".concat(zd("Close this chat")),"<strong>/me</strong>: ".concat(zd("Write in the third person")),"<strong>/help</strong>: ".concat(zd("Show this menu"))],renderHelpMessages(){Ya(Za(u_(),this.model,this.getHelpMessages(),!this.model.get("show_help_messages"),this.model.get("type")),this.help_container)},renderChatContent(e=!1){this.tpl_chat_content||(this.tpl_chat_content=e=>Za(l_(),this,e.messages,e.notifications));const t=this.model.messages.models,n=e?t:Array.from(t);Ya(this.tpl_chat_content({messages:n,notifications:this.getNotifications()}),this.msgs_container)},renderToolbar(){if(!Vc.settings.get("show_toolbar"))return this;const e=Object.assign({model:this.model,chatview:this},this.model.toJSON(),this.getToolbarOptions());return Ya((e=>{const t=Vc.settings.get("message_limit"),n=Vc.settings.get("visible_toolbar_buttons").call,r=Vc.settings.get("visible_toolbar_buttons").emoji,i=Vc.settings.get("show_send_button"),o=Vc.settings.get("visible_toolbar_buttons").spoiler,s=Vc.settings.get("show_toolbar");return Za(s_(),e.chatview,e.model,e.composing_spoiler,e.hidden_occupants,e.is_groupchat,n,r,e.show_occupants_toggle,i,o,s,t)})(e),this.el.querySelector(".chat-toolbar")),Vc.trigger("renderToolbar",this),this},renderMessageForm(){var e,t;const n=this.el.querySelector(".message-form-container");var r;Ya((r=Object.assign(this.model.toJSON(),{hint_value:null===(e=this.el.querySelector(".spoiler-hint"))||void 0===e?void 0:e.value,label_message:this.model.get("composing_spoiler")?zd("Hidden message"):zd("Message"),label_spoiler_hint:zd("Optional hint"),message_value:null===(t=this.el.querySelector(".chat-textarea"))||void 0===t?void 0:t.value,show_send_button:Vc.settings.get("show_send_button"),show_toolbar:Vc.settings.get("show_toolbar"),unread_msgs:zd("You have unread messages")}),Za(o_(),r.unread_msgs,r.label_spoiler_hint||"",r.hint_value||"",r.composing_spoiler?"":"hidden",r.show_send_button?"chat-textarea-send-button":"",r.composing_spoile?"spoiler":"",r.label_message,r.message_value||"")),n),this.el.addEventListener("focusin",e=>this.emitFocused(e)),this.el.addEventListener("focusout",e=>this.emitBlurred(e)),this.renderToolbar()},showControlBox(){var e;null===(e=Uc.chatboxviews.get("controlbox"))||void 0===e||e.show(),this.hide()},showUserDetailsModal(e){e.preventDefault(),Vc.modal.show(Jv,{model:this.model},e)},onDragOver(e){e.preventDefault()},onDrop(e){0!=e.dataTransfer.files.length&&(e.preventDefault(),this.model.sendFiles(e.dataTransfer.files))},async renderHeading(){const e=await this.generateHeadingTemplate();Ya(e,this.el.querySelector(".chat-head-chatbox"))},async getHeadingStandaloneButton(e){const t=await e;return Za(c_(),t.a_class,t.icon_class,t.handler,t.i18n_title)},async getHeadingDropdownItem(e){const t=await e;return Za(a_(),t.a_class,t.handler,t.i18n_title,t.icon_class,t.i18n_text)},async generateHeadingTemplate(){var e;const t=null===(e=this.model)||void 0===e?void 0:e.vcard,n=t?t.toJSON():{},r=zd("The User's Profile Image"),i=Object.assign({alt_text:r,extra_classes:"",height:40,width:40},n),o=await this.getHeadingButtons(),s=o.filter(e=>e.standalone),a=o.filter(e=>!e.standalone);return(e=>{const t=Za(r_(),op(e.avatar_data));return Za(n_(),e.status?"":"chatbox-title--no-desc",Uc.api.settings.get("singleton")?"":Za(t_()),e.type!==Uc.HEADLINES_TYPE?Za(e_(),e.showUserDetailsModal,t):"",e.jid,e.type!==Uc.HEADLINES_TYPE?Za(Zv(),e.showUserDetailsModal,e.display_name):e.display_name,e.dropdown_btns.length?Za(Kv(),e.dropdown_btns):"",e.standalone_btns.length?(e=>e.standalone_btns.reverse().map(e=>Qh(e,"")))(e):"",e.status?Za(Yv(),e.status):"")})(Object.assign(this.model.toJSON(),{avatar_data:i,display_name:this.model.getDisplayName(),dropdown_btns:a.map(e=>this.getHeadingDropdownItem(e)),showUserDetailsModal:e=>this.showUserDetailsModal(e),standalone_btns:s.map(e=>this.getHeadingStandaloneButton(e))}))},getHeadingButtons(){const e=[{a_class:"show-user-details-modal",handler:e=>this.showUserDetailsModal(e),i18n_text:zd("Details"),i18n_title:zd("See more information about this person"),icon_class:"fa-id-card",name:"details",standalone:"overlayed"===Vc.settings.get("view_mode")}];return Vc.settings.get("singleton")||e.push({a_class:"close-chatbox-button",handler:e=>this.close(e),i18n_text:zd("Close"),i18n_title:zd("Close and end this conversation"),icon_class:"fa-times",name:"close",standalone:"overlayed"===Vc.settings.get("view_mode")}),Uc.api.hook("getHeadingButtons",this,e)},getToolbarOptions:()=>({}),maybeScrollDown(e){!(!(null==e?void 0:e.get("is_archived"))&&"me"===(null==e?void 0:e.get("sender")))&&this.model.get("scrolled")||this.model.isHidden()||this.debouncedScrollDown()},scrollDown(e){var t,n;if(null==e||null===(t=e.preventDefault)||void 0===t||t.call(e),null==e||null===(n=e.stopPropagation)||void 0===n||n.call(e),this.model.get("scrolled")&&h_.safeSave(this.model,{scrolled:!1,scrollTop:null}),this.msgs_container.scrollTo){const e=this.msgs_container.scrollTop?"smooth":"auto";this.msgs_container.scrollTo({top:this.msgs_container.scrollHeight,behavior:e})}else this.msgs_container.scrollTop=this.msgs_container.scrollHeight;this.onScrolledDown()},maintainScrollTop(){const e=this.model.get("scrollTop");e?this.msgs_container.scrollTop=e:this.scrollDown()},insertIntoDOM(){return Uc.chatboxviews.insertRowColumn(this.el),Vc.trigger("chatBoxInsertedIntoDOM",this),this},addSpinner(e=!1){if(null===this.el.querySelector(".spinner")){const t=h_.getElementFromTemplateResult(fp());e?(this.content.insertAdjacentElement("beforeend",t),this.scrollDown()):this.content.insertAdjacentElement("afterbegin",t)}},clearSpinner(){this.content.querySelectorAll(".spinner").forEach(h_.removeElement)},onStatusMessageChanged(e){this.renderHeading(),Vc.trigger("contactStatusMessageChanged",{contact:e.attributes,message:e.get("status")})},markFollowups(e){const t=e.getAttribute("data-from"),n=e.previousElementSibling,r=f_(e.getAttribute("data-isodate")),i=e.nextElementSibling;h_.hasClass("chat-msg--action",e)||h_.hasClass("chat-msg--action",n)||h_.hasClass("chat-info",e)||h_.hasClass("chat-info",n)||n.getAttribute("data-from")!==t||!r.isBefore(f_(n.getAttribute("data-isodate")).add(10,"minutes"))||e.getAttribute("data-encrypted")!==n.getAttribute("data-encrypted")||h_.addClass("chat-msg--followup",e),i&&(!h_.hasClass("chat-msg--action",e)&&h_.hasClass("chat-info",e)&&i.getAttribute("data-from")===t&&f_(i.getAttribute("data-isodate")).isBefore(r.add(10,"minutes"))&&e.getAttribute("data-encrypted")===i.getAttribute("data-encrypted")?h_.addClass("chat-msg--followup",i):h_.removeClass("chat-msg--followup",i))},parseMessageForCommands(e){const t=e.replace(/^\s*/,"").match(/^\/(.*)\s*$/);if(t){if("clear"===t[1])return this.clearMessages(),!0;if("close"===t[1])return this.close(),!0;if("help"===t[1])return this.model.set({show_help_messages:!0}),!0}},async onFormSubmitted(e){var t;e.preventDefault();const n=this.el.querySelector(".chat-textarea"),r=n.value.trim();if(Vc.settings.get("message_limit")&&r.length>Vc.settings.get("message_limit")||!r.replace(/\s/g,"").length)return;if(!Uc.connection.authenticated){const e=zd("Sorry, the connection has been lost, and your message could not be sent");return Vc.alert("error",zd("Error"),e),void Vc.connection.reconnect()}let i,o={};this.model.get("composing_spoiler")&&(o=this.el.querySelector("form.sendXMPPMessage input.spoiler-hint"),i=o.value),h_.addClass("disabled",n),n.setAttribute("disabled","disabled"),null===(t=this.el.querySelector("converse-emoji-dropdown"))||void 0===t||t.hideMenu();const s=this.parseMessageForCommands(r),a=s?null:await this.model.sendMessage(r,i);(s||a)&&(o.value="",n.value="",h_.removeClass("correcting",n),n.style.height="auto",this.updateCharCounter(n.value)),a&&Vc.trigger("messageSend",a),"overlayed"===Vc.settings.get("view_mode")&&(this.msgs_container.parentElement.style.display="none"),n.removeAttribute("disabled"),h_.removeClass("disabled",n),"overlayed"===Vc.settings.get("view_mode")&&(this.msgs_container.parentElement.style.display=""),this.model.setChatState(Uc.ACTIVE,{silent:!0}),n.focus()},updateCharCounter(e){if(Vc.settings.get("message_limit")){const t=this.el.querySelector(".message-limit"),n=Vc.settings.get("message_limit")-e.length;t.textContent=n,n<1?h_.addClass("error",t):h_.removeClass("error",t)}},onPaste(e){if(0!==e.clipboardData.files.length)return e.preventDefault(),void this.model.sendFiles(Array.from(e.clipboardData.files));this.updateCharCounter(e.clipboardData.getData("text/plain"))},autocompleteInPicker(e,t){const n=this.el.querySelector("converse-emoji-dropdown"),r=this.el.querySelector("converse-emoji-picker");if(r&&n)return r.model.set({ac_position:e.selectionStart,autocompleting:t,query:t}),n.showMenu(),!0},onEmojiReceivedFromPicker(e){const t=this.el.querySelector("converse-emoji-picker").model,n=t.get("autocompleting"),r=t.get("ac_position");this.insertIntoTextArea(e,n,!1,r)},onKeyUp(e){this.updateCharCounter(e.target.value)},onKeyDown(e){if(!e.ctrlKey){if(!e.shiftKey&&!e.altKey&&!e.metaKey)if(e.keyCode===rl.keycodes.TAB){const t=h_.getCurrentWord(e.target,null,/(:.*?:)/g);t.startsWith(":")&&this.autocompleteInPicker(e.target,t)&&(e.preventDefault(),e.stopPropagation())}else{if(e.keyCode===rl.keycodes.FORWARD_SLASH)return;if(e.keyCode===rl.keycodes.ESCAPE)return this.onEscapePressed(e);if(e.keyCode===rl.keycodes.ENTER)return this.onEnterPressed(e);if(e.keyCode!==rl.keycodes.UP_ARROW||e.target.selectionEnd){if(e.keyCode===rl.keycodes.DOWN_ARROW&&e.target.selectionEnd===e.target.value.length&&h_.hasClass("correcting",this.el.querySelector(".chat-textarea")))return this.editLaterMessage()}else{const e=this.el.querySelector(".chat-textarea");if(!e.value||h_.hasClass("correcting",e))return this.editEarlierMessage()}}[rl.keycodes.SHIFT,rl.keycodes.META,rl.keycodes.META_RIGHT,rl.keycodes.ESCAPE,rl.keycodes.ALT].includes(e.keyCode)||this.model.get("chat_state")!==Uc.COMPOSING&&this.model.setChatState(Uc.COMPOSING)}},getOwnMessages(){return this.model.messages.filter({sender:"me"})},onEnterPressed(e){return this.onFormSubmitted(e)},onEscapePressed(e){e.preventDefault();const t=this.model.messages.findLastIndex("correcting"),n=t>=0?this.model.messages.at(t):null;n&&n.save("correcting",!1),this.insertIntoTextArea("",!0,!1)},async onMessageRetractButtonClicked(e){if("me"!==e.get("sender"))return zn.error("onMessageRetractButtonClicked called for someone else's message!");const t=zd("Be aware that other XMPP/Jabber clients (and servers) may not yet support retractions and that this message may not be removed everywhere."),n=[zd("Are you sure you want to retract this message?")];Vc.settings.get("show_retraction_warning")&&(n[1]=t),await Vc.confirm(zd("Confirm"),n)&&this.model.retractOwnMessage(e)},onMessageEditButtonClicked(e){var t;const n=this.model.messages.findWhere("correcting"),r=null===(t=this.el.querySelector(".chat-textarea"))||void 0===t?void 0:t.value;(!r||n&&n.get("message")===r||confirm(zd("You have an unsent message which will be lost if you continue. Are you sure?")))&&(n!==e?(null==n||n.save("correcting",!1),e.save("correcting",!0),this.insertIntoTextArea(h_.prefixMentions(e),!0,!0)):(e.save("correcting",!1),this.insertIntoTextArea("",!0,!1)))},editLaterMessage(){let e,t=this.model.messages.findLastIndex("correcting");if(t>=0)for(this.model.messages.at(t).save("correcting",!1);t<this.model.messages.length-1;){t+=1;const n=this.model.messages.at(t);if(n.get("editable")){e=n;break}}e?(this.insertIntoTextArea(h_.prefixMentions(e),!0,!0),e.save("correcting",!0)):this.insertIntoTextArea("",!0,!1)},editEarlierMessage(){let e,t=this.model.messages.findLastIndex("correcting");if(t>=0)for(this.model.messages.at(t).save("correcting",!1);t>0;){t-=1;const n=this.model.messages.at(t);if(n.get("editable")){e=n;break}}e=e||this.getOwnMessages().reverse().find(e=>e.get("editable")),e&&(this.insertIntoTextArea(h_.prefixMentions(e),!0,!0),e.save("correcting",!0))},inputChanged(e){const t=e.target.scrollHeight+"px";e.target.style.height!=t&&(e.target.style.height="auto",e.target.style.height=t)},async clearMessages(e){return e&&e.preventDefault&&e.preventDefault(),!0===confirm(zd("Are you sure you want to clear the messages from this conversation?"))&&await this.model.clearMessages(),this},insertIntoTextArea(e,t=!1,n=!1,r){const i=this.el.querySelector(".chat-textarea");if(n?h_.addClass("correcting",i):h_.removeClass("correcting",i),t)i.value=r&&"string"==typeof t?i.value.replace(new RegExp(t,"g"),(n,i)=>i==r-t.length?e+" ":n):e;else{let t=i.value;t&&" "!==t[t.length-1]&&(t+=" "),i.value=t+e+" "}this.updateCharCounter(i.value),h_.placeCaretAtEnd(i)},onPresenceChanged(e){const t=e.get("show"),n=this.model.getDisplayName();let r;h_.isVisible(this.el)&&("offline"===t?r=zd("%1$s has gone offline",n):"away"===t?r=zd("%1$s has gone away",n):"dnd"===t?r=zd("%1$s is busy",n):"online"===t&&(r=zd("%1$s is online",n)),r&&this.model.createMessage({message:r,type:"info"}))},async close(e){return e&&e.preventDefault&&e.preventDefault(),Uc.router.history.getFragment()==="converse/chat?jid="+this.model.get("jid")&&Uc.router.navigate(""),Vc.connection.connected()&&(this.model.setChatState(Uc.INACTIVE),this.model.sendChatState()),await this.model.close(),this.remove(),Vc.trigger("chatBoxClosed",this),this},emitBlurred(e){this.el.contains(document.activeElement)||this.el.contains(e.relatedTarget)||Vc.trigger("chatBoxBlurred",this,e)},emitFocused(e){this.el.contains(e.relatedTarget)||Vc.trigger("chatBoxFocused",this,e)},focus(){const e=this.el.getElementsByClassName("chat-textarea")[0];return e&&document.activeElement!==e&&e.focus(),this},maybeFocus(){Vc.settings.get("auto_focus")&&this.focus()},hide(){return this.el.classList.add("hidden"),this},afterShown(){this.model.clearUnreadMsgCounter(),this.model.setChatState(Uc.ACTIVE),this.scrollDown(),this.maybeFocus()},show(){this.model.get("hidden")?zn.debug("Not showing chat ".concat(this.model.get("jid")," because it's set as hidden")):h_.isVisible(this.el)?this.maybeFocus():Vc.settings.get("animate")?h_.fadeIn(this.el,()=>this.afterShown()):(h_.showElement(this.el),this.afterShown())},showNewMessagesIndicator(){h_.showElement(this.el.querySelector(".new-msgs-indicator"))},hideNewMessagesIndicator(){const e=this.el.querySelector(".new-msgs-indicator");null!==e&&e.classList.add("hidden")},_markScrolled:function(e){let t=!0,n=null;this.msgs_container.scrollTop+this.msgs_container.clientHeight>=this.msgs_container.scrollHeight-62?(t=!1,this.onScrolledDown()):0===this.msgs_container.scrollTop?Vc.trigger("chatBoxScrolledUp",this):n=e.target.scrollTop,h_.safeSave(this.model,{scrolled:t,scrollTop:n})},viewUnreadMessages(){this.model.save({scrolled:!1,scrollTop:null}),this.scrollDown()},onScrolledDown(){if(this.hideNewMessagesIndicator(),!this.model.isHidden()){this.model.clearUnreadMsgCounter();const e=window.location.hash;e&&this.model.messages.get(e.slice(1))&&Uc.router.history.navigate()}Vc.trigger("chatBoxScrolledDown",{chatbox:this.model})},onWindowStateChanged(e){"visible"===e?this.model.isHidden()||this.model.get("num_unread",0)&&this.model.clearUnreadMsgCounter():"hidden"===e&&(this.model.setChatState(Uc.INACTIVE,{silent:!0}),this.model.sendChatState())}}),g_={chatviews:{get:e=>void 0===e?Object.values(Uc.chatboxviews.getAll()):"string"==typeof e?Uc.chatboxviews.get(e):e.map(e=>Uc.chatboxviews.get(e))}};
-/**
- * @module converse-chatview
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:m_}=rl.env;function v_(e){Uc.chatboxviews&&Uc.chatboxviews.forEach(t=>{"controlbox"!==t.model.get("id")&&t.onWindowStateChanged(e.state)})}function __(){const e=Uc.chatboxviews;Uc.chatboxes.on("add",async t=>{e.get(t.get("id"))||t.get("type")!==Uc.PRIVATE_CHAT_TYPE||(await t.initialized,e.add(t.get("id"),new Uc.ChatBoxView({model:t})))})}let b_;rl.plugins.add("converse-chatview",{dependencies:["converse-chatboxviews","converse-chat","converse-disco","converse-modal"],initialize(){Vc.settings.extend({auto_focus:!0,debounced_content_rendering:!0,filter_url_query_params:null,image_urls_regex:null,message_limit:0,muc_hats:["xep317"],show_images_inline:!0,show_message_avatar:!0,show_retraction_warning:!0,show_send_button:!0,show_toolbar:!0,time_format:"HH:mm",use_system_emojis:!0,visible_toolbar_buttons:{call:!1,clear:!0,emoji:!0,spoiler:!0}}),Object.assign(Vc,g_),Uc.ChatBoxView=p_,Vc.listen.on("chatBoxViewsInitialized",__),Vc.listen.on("windowStateChanged",v_),Vc.listen.on("connected",()=>Vc.disco.own.features.add(m_.NS.SPOILER))}});let y_=0;function w_(e){b_=e}function S_(){b_=null,y_=0}const x_=Symbol("haunted.phase"),E_=Symbol("haunted.hook"),A_=Symbol("haunted.update"),C_=Symbol("haunted.commit"),j_=Symbol("haunted.effects"),T_=Symbol("haunted.layoutEffects");class O_{constructor(e,t){this.update=e,this.host=t,this[E_]=new Map,this[j_]=[],this[T_]=[]}run(e){w_(this);let t=e();return S_(),t}_runEffects(e){let t=this[e];w_(this);for(let e of t)e.call(this);S_()}runEffects(){this._runEffects(j_)}runLayoutEffects(){this._runEffects(T_)}teardown(){this[E_].forEach(e=>{"function"==typeof e.teardown&&e.teardown()})}}const k_=Promise.resolve().then.bind(Promise.resolve());function N_(){let e,t=[];function n(){e=null;let n=t;t=[];for(var r=0,i=n.length;r<i;r++)n[r]()}return function(r){t.push(r),null==e&&(e=k_(n))}}const I_=N_(),M_=N_();class R_{constructor(e,t){this.renderer=e,this.host=t,this.state=new O_(this.update.bind(this),t),this[x_]=null,this._updateQueued=!1}update(){this._updateQueued||(I_(()=>{let e=this.handlePhase(A_);M_(()=>{this.handlePhase(C_,e),M_(()=>{this.handlePhase(j_)})}),this._updateQueued=!1}),this._updateQueued=!0)}handlePhase(e,t){switch(this[x_]=e,e){case C_:return this.commit(t),void this.runEffects(T_);case A_:return this.render();case j_:return this.runEffects(j_)}this[x_]=null}render(){return this.state.run(()=>this.renderer.call(this.host,this.host))}runEffects(e){this.state._runEffects(e)}teardown(){this.state.teardown()}}function D_(e){class t extends R_{constructor(e,t,n){super(e,n||t),this.frag=t}commit(t){e(t,this.frag)}}return function(e,n,r){const i=(r||n||{}).baseElement||HTMLElement,{observedAttributes:o=[],useShadowDOM:s=!0,shadowRootInit:a={}}=r||n||{};class c extends i{constructor(){super(),!1===s?this._scheduler=new t(e,this):(this.attachShadow({mode:"open",...a}),this._scheduler=new t(e,this.shadowRoot,this))}static get observedAttributes(){return e.observedAttributes||o||[]}connectedCallback(){this._scheduler.update()}disconnectedCallback(){this._scheduler.teardown()}attributeChangedCallback(e,t,n){if(t===n)return;let r=""===n||n;Reflect.set(this,((e="")=>e.replace(/-+([a-z])?/g,(e,t)=>t?t.toUpperCase():""))(e),r)}}const l=new Proxy(i.prototype,{getPrototypeOf:e=>e,set(e,t,n,r){let i;if(t in e){if(i=Object.getOwnPropertyDescriptor(e,t),i&&i.set)return i.set.call(r,n),!0;Reflect.set(e,t,n)}return i="symbol"==typeof t||"_"===t[0]?{enumerable:!0,configurable:!0,writable:!0,value:n}:function(e){let t=e;return Object.freeze({enumerable:!0,configurable:!0,get:()=>t,set(e){t=e,this._scheduler.update()}})}(n),Object.defineProperty(r,t,i),i.set&&i.set.call(r,n),!0}});return Object.setPrototypeOf(c.prototype,l),c}}class P_{constructor(e,t){this.id=e,this.state=t}}function L_(e,...t){let n=y_++,r=b_[E_],i=r.get(n);return i||(i=new e(n,b_,...t),r.set(n,i)),i.update(...t)}function z_(e){return L_.bind(null,e)}function F_(e){return z_(class extends P_{constructor(t,n,r,i){super(t,n),e(n,this)}update(e,t){this.callback=e,this.lastValues=this.values,this.values=t}call(){this.values&&!this.hasChanged()||this.run()}run(){this.teardown(),this._teardown=this.callback.call(this.state)}teardown(){"function"==typeof this._teardown&&this._teardown()}hasChanged(){return!this.lastValues||this.values.some((e,t)=>this.lastValues[t]!==e)}})}function B_(e,t){e[j_].push(t)}F_(B_);const q_=z_(class extends P_{constructor(e,t,n){super(e,t),this._updater=this._updater.bind(this),this._ranEffect=!1,this._unsubscribe=null,B_(t,this)}update(e){if(this.state.virtual)throw new Error("can't be used with virtual components");return this.Context!==e&&(this._subscribe(e),this.Context=e),this.value}call(){this._ranEffect||(this._ranEffect=!0,this._unsubscribe&&this._unsubscribe(),this._subscribe(this.Context),this.state.update())}_updater(e){this.value=e,this.state.update()}_subscribe(e){const t={Context:e,callback:this._updater};this.state.host.dispatchEvent(new CustomEvent("haunted.context",{detail:t,bubbles:!0,cancelable:!0,composed:!0}));const{unsubscribe:n,value:r}=t;this.value=n?r:e.defaultValue,this._unsubscribe=n}teardown(){this._unsubscribe&&this._unsubscribe()}});z_(class extends P_{constructor(e,t,n,r){super(e,t),this.value=n(),this.values=r}update(e,t){return this.hasChanged(t)&&(this.values=t,this.value=e()),this.value}hasChanged(e=[]){return e.some((e,t)=>this.values[t]!==e)}});F_((function(e,t){e[T_].push(t)})),z_(class extends P_{constructor(e,t,n){super(e,t),this.updater=this.updater.bind(this),"function"==typeof n&&(n=n()),this.makeArgs(n)}update(){return this.args}updater(e){if("function"==typeof e){const t=e,[n]=this.args;e=t(n)}this.makeArgs(e),this.state.update()}makeArgs(e){this.args=Object.freeze([e,this.updater])}}),z_(class extends P_{constructor(e,t,n,r,i){super(e,t),this.dispatch=this.dispatch.bind(this),this.currentState=void 0!==i?i(r):r}update(e){return this.reducer=e,[this.currentState,this.dispatch]}dispatch(e){this.currentState=this.reducer(this.currentState,e),this.state.update()}});const H_=Array.prototype.includes;const{component:U_,createContext:$_}=function({render:e}){const t=D_(e),n=function(e){return t=>{const n={Provider:class extends HTMLElement{constructor(){super(),this.listeners=new Set,this.addEventListener("haunted.context",this)}disconnectedCallback(){this.removeEventListener("haunted.context",this)}handleEvent(e){const{detail:t}=e;t.Context===n&&(t.value=this.value,t.unsubscribe=this.unsubscribe.bind(this,t.callback),this.listeners.add(t.callback),e.stopPropagation())}unsubscribe(e){this.listeners.delete(e)}set value(e){this._value=e;for(let t of this.listeners)t(e)}get value(){return this._value}},Consumer:e((function({render:e}){return e(q_(n))})),defaultValue:t};return n}}(t);return{component:t,createContext:n}}({render:Ya});!function(){const e=new WeakMap,t=new WeakMap;class n extends R_{constructor(e,t){super(e,t),this.state.virtual=!0}render(){return this.state.run(()=>this.renderer.apply(this.host,this.args))}commit(e){this.host.setValue(e),this.host.commit()}teardown(){super.teardown();let n=t.get(this);e.delete(n)}}}();function W_(){const e=J_(['\n            <p class="brand-subtitle">','</p>\n            <p class="brand-subtitle"><a target="_blank" rel="nofollow" href="https://conversejs.org">Open Source</a> XMPP chat client brought to you by <a target="_blank" rel="nofollow" href="https://opkode.com">Opkode</a> </p>\n            <p class="brand-subtitle"><a target="_blank" rel="nofollow" href="https://hosted.weblate.org/projects/conversejs/#languages">Translate</a> it into your own language</p>']);return W_=function(){return e},e}function G_(){const e=J_(['<p class="byline">messaging freedom</p>']);return G_=function(){return e},e}function V_(){const e=J_(['\n        <a class="brand-heading" href="https://conversejs.org" target="_blank" rel="noopener">\n            <span class="brand-name-wrapper ','">\n                <svg class="converse-svg-logo"\n                    xmlns:svg="http://www.w3.org/2000/svg"\n                    xmlns="http://www.w3.org/2000/svg"\n                    xmlns:xlink="http://www.w3.org/1999/xlink"\n                    viewBox="0 0 364 364">\n                    <title>Converse</title>\n                    <g class="cls-1" id="g904">\n                        <g data-name="Layer 2">\n                            <g data-name="Layer 7">\n                                <path\n                                    class="cls-3"\n                                    d="M221.46,103.71c0,18.83-29.36,18.83-29.12,0C192.1,84.88,221.46,84.88,221.46,103.71Z" />\n                                <path\n                                    class="cls-4"\n                                    d="M179.9,4.15A175.48,175.48,0,1,0,355.38,179.63,175.48,175.48,0,0,0,179.9,4.15Zm-40.79,264.5c-.23-17.82,27.58-17.82,27.58,0S138.88,286.48,139.11,268.65ZM218.6,168.24A79.65,79.65,0,0,1,205.15,174a12.76,12.76,0,0,0-6.29,4.65L167.54,222a1.36,1.36,0,0,1-2.46-.8v-35.8a2.58,2.58,0,0,0-3.06-2.53c-15.43,3-30.23,7.7-42.73,19.94-38.8,38-29.42,105.69,16.09,133.16a162.25,162.25,0,0,1-91.47-67.27C-3.86,182.26,34.5,47.25,138.37,25.66c46.89-9.75,118.25,5.16,123.73,62.83C265.15,120.64,246.56,152.89,218.6,168.24Z" />\n                            </g>\n                        </g>\n                    </g>\n                </svg>\n                <span class="brand-name">\n                    <span class="brand-name__text">converse<span class="subdued">.js</span></span>\n                    ',"\n                </span>\n            </span>\n        </a>\n        ","\n        "]);return V_=function(){return e},e}function J_(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-brand-heading",U_(e=>{const t="fullscreen"===Vc.settings.get("view_mode");return Za(V_(),t?"brand-name-wrapper--fullscreen":"",t?Za(G_()):"",t?Za(W_(),e.version_name):"")},{useShadowDOM:!1}));const{dayjs:X_}=rl.env;var Q_={defaults(){return{bookmarked:!1,box_id:"controlbox",chat_state:void 0,closed:!Vc.settings.get("show_controlbox_by_default"),num_unread:0,time_opened:this.get("time_opened")||(new Date).getTime(),type:Uc.CONTROLBOX_TYPE,url:""}},initialize(){"controlbox"===this.get("id")?this.set({time_opened:X_(0).valueOf()}):Uc.ChatBox.prototype.initialize.apply(this,arguments)},validate(e){return e.type===Uc.CONTROLBOX_TYPE?"embedded"===Vc.settings.get("view_mode")&&Vc.settings.get("singleton")?"Controlbox not relevant in embedded view mode":void 0:Uc.ChatBox.prototype.validate.call(this,e)},maybeShow(e){return e||"controlbox"!==this.get("id")?Uc.ChatBox.prototype.maybeShow.call(this,e):this},onReconnection:function(){}};var Y_=eh.extend({tagName:"div",className:"controlbox-pane",initialize(){Vc.trigger("controlBoxPaneInitialized",this)}}),K_=n(177),Z_=n.n(K_);function eb(){const e=new Uc.ControlBox({id:"controlbox"});return Uc.chatboxes.add(e)}const tb=rl.env.utils;var nb=eh.extend({tagName:"a",className:"toggle-controlbox hidden",id:"toggle-controlbox",events:{click:"onClick"},attributes:{href:"#"},initialize(){Uc.chatboxviews.insertRowColumn(this.render().el),Vc.waitUntil("initialized").then(this.render.bind(this)).catch(e=>zn.fatal(e))},render(){return this.el.innerHTML=Z_()({label_toggle:Vc.connection.connected()?zd("Chat Contacts"):zd("Toggle chat")}),this},hide(e){tb.isVisible(this.el)&&(tb.hideElement(this.el),e())},show(e){tb.isVisible(this.el)||tb.fadeIn(this.el,e)},showControlBox(){let e=Uc.chatboxes.get("controlbox");e||(e=eb()),Vc.connection.connected()?e.save({closed:!1}):e.trigger("show")},onClick(e){if(e.preventDefault(),tb.isVisible(Uc.root.querySelector("#controlbox"))){const e=Uc.chatboxes.get("controlbox");Vc.connection.connected?e.save({closed:!0}):e.trigger("hide")}else this.showControlBox()}});function rb(){const e=ob(['<a class="chatbox-btn close-chatbox-button fa fa-times"></a>']);return rb=function(){return e},e}function ib(){const e=ob(['\n    <div class="flyout box-flyout">\n        <div class="chat-head controlbox-head">\n            ','\n        </div>\n        <div class="controlbox-panes"></div>\n    </div>']);return ib=function(){return e},e}function ob(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const sb=rl.env.utils;var ab={tagName:"div",className:"chatbox",id:"controlbox",events:{"click a.close-chatbox-button":"close"},initialize(){void 0===Uc.controlboxtoggle&&(Uc.controlboxtoggle=new Uc.ControlBoxToggle),Uc.controlboxtoggle.el.insertAdjacentElement("afterend",this.el),this.listenTo(this.model,"change:connected",this.onConnected),this.listenTo(this.model,"destroy",this.hide),this.listenTo(this.model,"hide",this.hide),this.listenTo(this.model,"show",this.show),this.listenTo(this.model,"change:closed",this.ensureClosedState),this.render(),Vc.trigger("controlBoxInitialized",this)},render(){this.model.get("connected")&&void 0===this.model.get("closed")&&this.model.set("closed",!Vc.settings.get("show_controlbox_by_default"));const e=(t={sticky_controlbox:Vc.settings.get("sticky_controlbox"),...this.model.toJSON()},Za(ib(),t.sticky_controlbox?"":Za(rb())));var t;Ya(e,this.el),this.model.get("closed")?this.hide():this.show();const n=(null==Uc?void 0:Uc.connection)||{};return n.connected&&n.authenticated&&!n.disconnecting?this.model.get("connected")&&this.renderControlBoxPane():this.renderLoginPanel(),this},onConnected(){this.model.get("connected")&&this.render()},renderLoginPanel(){if(this.el.classList.add("logged-out"),this.loginpanel)this.loginpanel.render();else{this.loginpanel=new Uc.LoginPanel({model:new Uc.LoginPanelModel});const e=this.el.querySelector(".controlbox-panes");e.innerHTML="",e.appendChild(this.loginpanel.render().el)}return this.loginpanel.initPopovers(),this},renderControlBoxPane(){this.loginpanel&&(this.loginpanel.remove(),delete this.loginpanel),this.controlbox_pane&&sb.isVisible(this.controlbox_pane.el)||(this.el.classList.remove("logged-out"),this.controlbox_pane=new Uc.ControlBoxPane,this.el.querySelector(".controlbox-panes").insertAdjacentElement("afterBegin",this.controlbox_pane.el))},async close(e){if(e&&e.preventDefault&&e.preventDefault(),"closeAllChatBoxes"===(null==e?void 0:e.name)&&(Uc.disconnection_cause!==Uc.LOGOUT||Vc.settings.get("show_controlbox_by_default")))return;if(Vc.settings.get("sticky_controlbox"))return;const t=(null==Uc?void 0:Uc.connection)||{};return t.connected&&!t.disconnecting?await new Promise((e,t)=>this.model.save({closed:!0},{success:e,error:t,wait:!0})):this.model.trigger("hide"),Vc.trigger("controlBoxClosed",this),this},ensureClosedState(){this.model.get("closed")?this.hide():this.show()},hide(e){if(!Vc.settings.get("sticky_controlbox"))return sb.addClass("hidden",this.el),Vc.trigger("chatBoxClosed",this),Vc.connection.connected()||Uc.controlboxtoggle.render(),Uc.controlboxtoggle.show(e),this},onControlBoxToggleHidden(){this.model.set("closed",!1),this.el.classList.remove("hidden"),Vc.trigger("controlBoxOpened",this)},show(){return Uc.controlboxtoggle.hide(()=>this.onControlBoxToggleHidden()),this},showHelpMessages(){}};function cb(){const e=mb(['\n    <converse-brand-heading></converse-brand-heading>\n    <form id="converse-login" class="converse-form" method="post">\n        <div class="conn-feedback fade-in ','">\n            <p class="feedback-subject">','</p>\n            <p class="feedback-message ','">',"</p>\n        </div>\n        ","\n    </form>\n"]);return cb=function(){return e},e}function lb(){const e=mb(["<p>","</p>"]);return lb=function(){return e},e}function ub(){const e=mb(['<input class="btn btn-primary login-anon" type="submit" value="','">']);return ub=function(){return e},e}function db(){const e=mb(["\n        ","\n        ","\n        ","\n    "]);return db=function(){return e},e}function hb(){const e=mb(['\n        <div class="form-group">\n            <label for="converse-login-jid">',':</label>\n            <input id="converse-login-jid"\n                ?autofocus=','\n                required\n                class="form-control"\n                type="text"\n                name="jid"\n                placeholder="','"/>\n        </div>\n        ',"\n        ",'\n        <fieldset class="buttons">\n            <input class="btn btn-primary" type="submit" value="','"/>\n        </fieldset>\n        ',"\n    "]);return hb=function(){return e},e}function fb(){const e=mb(['\n        <fieldset class="switch-form">\n            <p>','</p>\n            <p><a class="register-account toggle-register-login" href="#converse/register">',"</a></p>\n        </fieldset>\n    "]);return fb=function(){return e},e}function pb(){const e=mb(['\n        <div class="form-group">\n            <label for="converse-login-password">','</label>\n            <input id="converse-login-password" class="form-control" required="required" type="password" name="password" placeholder="','"/>\n        </div>\n    ']);return pb=function(){return e},e}function gb(){const e=mb(['\n        <div class="form-group form-check login-trusted">\n            <input id="converse-login-trusted" type="checkbox" class="form-check-input" name="trusted" ?checked=','>\n            <label for="converse-login-trusted" class="form-check-label login-trusted__desc">','</label>\n            <i class="fa fa-info-circle" data-toggle="popover"\n                data-title="Trusted device?"\n                data-content="','"></i>\n        </div>\n    ']);return gb=function(){return e},e}function mb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const vb=e=>{const t=zd("Log in"),n=zd("XMPP Address");return Za(hb(),n,!!Vc.settings.get("auto_focus"),e.placeholder_username,e.authentication!==e.EXTERNAL?(()=>{const e=zd("Password");return Za(pb(),e,e)})():"",e.show_trust_checkbox?(e=>{const t=zd("To improve performance, we cache your data in this browser. Uncheck this box if this is a public computer or if you want your data to be deleted when you log out. It's important that you explicitly log out, otherwise not all cached data might be deleted. Please note, when using an untrusted device, OMEMO encryption is NOT available."),n=zd("This is a trusted device");return Za(gb(),e,n,t)})("off"!==e.show_trust_checkbox):"",t,Uc.allow_registration&&!Vc.settings.get("auto_login")&&Uc.pluggable.plugins["converse-register"].enabled(Uc)?(()=>{const e=zd("Create an account"),t=zd("Don't have a chat account?");return Za(fb(),t,e)})():"")};var _b=e=>Za(cb(),e.conn_feedback_subject?e.conn_feedback_class:"hidden",e.conn_feedback_subject,e.conn_feedback_message?"":"hidden",e.conn_feedback_message,"CONNECTING"===Uc.CONNECTION_STATUS[e.connection_status]?fp({classes:"hor_centered"}):(e=>{const t=zd("Disconnected"),n=zd("Click here to log in anonymously");return Za(db(),e.authentication==e.LOGIN||e.authentication==e.EXTERNAL?vb(e):"",e.authentication==e.ANONYMOUS?Za(ub(),n):"",e.authentication==e.PREBIND?Za(lb(),t):"")})(e));const bb=rl.env.utils,{Strophe:yb}=rl.env,wb=[0,1,2,3,4,7,10],Sb={0:"Error",1:"Connecting",2:"Connection failure",3:"Authenticating",4:"Authentication failure",5:"Connected",6:"Disconnected",7:"Disconnecting",8:"Attached",9:"Redirect",10:"Reconnecting"},xb={Error:"error",Connecting:"info","Connection failure":"error",Authenticating:"info","Authentication failure":"error",Connected:"info",Disconnected:"error",Disconnecting:"warn",Attached:"info",Redirect:"info",Reconnecting:"warn"},Eb=qo.extend({defaults:{errors:[]}}),Ab=eh.extend({tagName:"div",id:"converse-login-panel",className:"controlbox-pane fade-in row no-gutters",events:{"submit form#converse-login":"authenticate","change input":"validate"},initialize(){this.listenTo(this.model,"change",this.render),this.listenTo(Uc.connfeedback,"change",this.render),this.render()},toHTML(){const e=Uc.connfeedback.get("connection_status");let t,n;return wb.includes(e)&&(n=Sb[e],t=xb[n]),_b(Object.assign(this.model.toJSON(),{_converse:Uc,ANONYMOUS:Uc.ANONYMOUS,EXTERNAL:Uc.EXTERNAL,LOGIN:Uc.LOGIN,PREBIND:Uc.PREBIND,auto_login:Vc.settings.get("auto_login"),authentication:Vc.settings.get("authentication"),connection_status:e,conn_feedback_class:t,conn_feedback_subject:n,conn_feedback_message:Uc.connfeedback.get("message"),placeholder_username:(Vc.settings.get("locked_domain")||Vc.settings.get("default_domain"))&&zd("Username")||zd("user@domain"),show_trust_checkbox:Vc.settings.get("allow_user_trust_override")}))},initPopovers(){Array.from(this.el.querySelectorAll("[data-title]")).forEach(e=>{new af.a.Popover(e,{trigger:"mobile"===Vc.settings.get("view_mode")?"click":"hover",dismissible:"mobile"===Vc.settings.get("view_mode"),container:this.el.parentElement.parentElement.parentElement})})},validate(){const e=this.el.querySelector("form").querySelector("input[name=jid]");return!e.value||Vc.settings.get("locked_domain")||Vc.settings.get("default_domain")||bb.isValidJID(e.value)?(e.setCustomValidity(""),!0):(e.setCustomValidity(zd("Please enter a valid XMPP address")),!1)},authenticate(e){if(e&&e.preventDefault&&e.preventDefault(),Vc.settings.get("authentication")===Uc.ANONYMOUS)return this.connect(Uc.jid,null);if(!this.validate())return;const t=new FormData(e.target);Uc.config.save({trusted:!!t.get("trusted")});let n=t.get("jid");if(Vc.settings.get("locked_domain")){const e="@"+Vc.settings.get("locked_domain");n.endsWith(e)&&(n=n.substr(0,n.length-e.length)),n=yb.escapeNode(n)+e}else Vc.settings.get("default_domain")&&!n.includes("@")&&(n=n+"@"+Vc.settings.get("default_domain"));this.connect(n,t.get("password"))},connect(e,t){["converse/login","converse/register"].includes(Uc.router.history.getFragment())&&Uc.router.navigate("",{replace:!0}),Uc.connection&&Uc.connection.reset(),Vc.user.login(e,t)}});var Cb={controlbox:{async open(){await Vc.waitUntil("chatBoxesFetched");const e=await Vc.chatboxes.get("controlbox")||Vc.chatboxes.create("controlbox",{},Uc.Controlbox);return e.trigger("show"),e},get:()=>Uc.chatboxviews.get("controlbox")}};
-/**
- * @module converse-controlbox
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */const jb=rl.env.utils;function Tb(){Uc.chatboxes.on("add",e=>{if(e.get("type")===Uc.CONTROLBOX_TYPE){const t=Uc.chatboxviews,n=t.get(e.get("id"));n?(n.model=e,n.initialize()):t.add(e.get("id"),new Uc.ControlBoxView({model:e}))}})}function Ob(){const e=Uc.chatboxviews.get("controlbox");return e.model.set({connected:!1}),e}function kb(){const e=null==Uc?void 0:Uc.chatboxviews,t=e&&e.get("controlbox");t&&(jb.safeSave(t.model,{connected:!1}),(null==t?void 0:t.controlbox_pane)&&(t.controlbox_pane.remove(),delete t.controlbox_pane))}function Nb(){(Uc.chatboxes.get("controlbox")||eb()).save({connected:!0})}rl.plugins.add("converse-controlbox",{dependencies:["converse-modal","converse-chatboxes","converse-chat","converse-rosterview","converse-chatview"],enabled:e=>!e.api.settings.get("singleton"),overrides:{ChatBoxes:{model(e,t){const{_converse:n}=this.__super__;return e&&"controlbox"==e.id?new n.ControlBox(e,t):this.__super__.model.apply(this,arguments)}}},initialize(){Vc.settings.extend({allow_logout:!0,allow_user_trust_override:!0,default_domain:void 0,locked_domain:void 0,show_controlbox_by_default:!1,sticky_controlbox:!1}),Vc.promises.add("controlBoxInitialized"),Object.assign(Vc,Cb),Uc.ControlBox=Uc.ChatBox.extend(Q_),Uc.ControlBoxView=Uc.ChatBoxView.extend(ab),Uc.LoginPanelModel=Eb,Uc.LoginPanel=Ab,Uc.ControlBoxPane=Y_,Uc.ControlBoxToggle=nb,Vc.listen.on("chatBoxViewsInitialized",Tb),Vc.listen.on("chatBoxesFetched",Nb),Vc.listen.on("cleanup",()=>delete Uc.controlboxtoggle),Vc.listen.on("clearSession",kb),Vc.listen.on("disconnected",()=>Ob().renderLoginPanel()),Vc.listen.on("will-reconnect",Ob),Vc.waitUntil("chatBoxViewsInitialized").then(eb).catch(e=>zn.fatal(e))}});var Ib=n(178),Mb=n.n(Ib);
-/**
- * @module converse-dragresize
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const Rb=rl.env.utils;function Db(e,t){const n=t.el.querySelector(".box-flyout"),r=document.createElement("div");r.innerHTML=Mb()(),n.insertBefore(r,n.firstChild)}function Pb(){const e=zb(['<span class="message-count badge badge-light">',"</span>"]);return Pb=function(){return e},e}function Lb(){const e=zb(['\n        <div class="chat-head-',' chat-head row no-gutters">\n            <a class="restore-chat w-100 align-self-center" title="','" @click=',">\n                ","\n                ",'\n            </a>\n            <a class="chatbox-btn close-chatbox-button fa fa-times" @click=',"></a>\n        </div>"]);return Lb=function(){return e},e}function zb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}rl.plugins.add("converse-dragresize",{dependencies:["converse-chatview","converse-headlines-view","converse-muc-views"],enabled:e=>"overlayed"==e.api.settings.get("view_mode"),overrides:{ChatBox:{initialize(){const e=this.__super__.initialize.apply(this,arguments),t=this.get("height"),n=this.get("width");return("controlbox"===this.get("id")?e=>this.set(e):e=>this.save(e))({height:Rb.applyDragResistance(t,this.get("default_height")),width:Rb.applyDragResistance(n,this.get("default_width"))}),e}},ChatBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return Db(this.__super__._converse,this),this.setWidth(),e}},HeadlinesBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return Db(this.__super__._converse,this),this.setWidth(),e}},ControlBoxView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return Db(this.__super__._converse,this),this.setWidth(),e},renderLoginPanel(){const e=this.__super__.renderLoginPanel.apply(this,arguments);return this.initDragResize().setDimensions(),e},renderControlBoxPane(){const e=this.__super__.renderControlBoxPane.apply(this,arguments);return this.initDragResize().setDimensions(),e}},ChatRoomView:{events:{"mousedown .dragresize-top":"onStartVerticalResize","mousedown .dragresize-left":"onStartHorizontalResize","mousedown .dragresize-topleft":"onStartDiagonalResize"},render(){const e=this.__super__.render.apply(this,arguments);return Db(this.__super__._converse,this),this.setWidth(),e}}},initialize(){Vc.settings.extend({allow_dragresize:!0});const e={initDragResize(){var e;const t=this,n=Rc(()=>t.setDimensions());window.addEventListener("resize",t.debouncedSetDimensions),this.listenTo(this.model,"destroy",()=>window.removeEventListener("resize",n));const r=this.el.querySelector(".box-flyout"),i=window.getComputedStyle(r);if(void 0===this.model.get("height")){const e=parseInt(i.height.replace(/px$/,""),10),t=parseInt(i.width.replace(/px$/,""),10);this.model.set("height",e),this.model.set("default_height",e),this.model.set("width",t),this.model.set("default_width",t)}const o=i["min-width"],s=i["min-height"];return this.model.set("min_width",o.endsWith("px")?Number(o.replace(/px$/,"")):0),this.model.set("min_height",s.endsWith("px")?Number(s.replace(/px$/,"")):0),this.prev_pageY=0,this.prev_pageX=0,(null===(e=Uc.connection)||void 0===e?void 0:e.connected)&&(this.height=this.model.get("height"),this.width=this.model.get("width")),this},resizeChatBox(e){let t;0===Uc.resizing.direction.indexOf("top")&&(t=e.pageY-this.prev_pageY,t&&(this.height=this.height-t>(this.model.get("min_height")||0)?this.height-t:this.model.get("min_height"),this.prev_pageY=e.pageY,this.setChatBoxHeight(this.height))),Uc.resizing.direction.includes("left")&&(t=this.prev_pageX-e.pageX,t&&(this.width=this.width+t>(this.model.get("min_width")||0)?this.width+t:this.model.get("min_width"),this.prev_pageX=e.pageX,this.setChatBoxWidth(this.width)))},setWidth(){this.model.get("width")&&(this.el.style.width=this.model.get("width"))},setDimensions(){this.adjustToViewport(),this.setChatBoxHeight(this.model.get("height")),this.setChatBoxWidth(this.model.get("width"))},setChatBoxHeight(e){e=e?Rb.applyDragResistance(e,this.model.get("default_height"))+"px":"";const t=this.el.querySelector(".box-flyout");null!==t&&(t.style.height=e)},setChatBoxWidth(e){e=e?Rb.applyDragResistance(e,this.model.get("default_width"))+"px":"",this.el.style.width=e;const t=this.el.querySelector(".box-flyout");null!==t&&(t.style.width=e)},adjustToViewport(){const e=Math.max(document.documentElement.clientWidth,window.innerWidth||0),t=Math.max(document.documentElement.clientHeight,window.innerHeight||0);e<=480?(this.model.set("height",void 0),this.model.set("width",void 0)):e<=this.model.get("width")?this.model.set("width",void 0):t<=this.model.get("height")&&this.model.set("height",void 0)},onStartVerticalResize(e,t=!0){if(!Vc.settings.get("allow_dragresize"))return!0;e.preventDefault();const n=this.el.querySelector(".box-flyout"),r=window.getComputedStyle(n);this.height=parseInt(r.height.replace(/px$/,""),10),Uc.resizing={chatbox:this,direction:"top"},this.prev_pageY=e.pageY,t&&Vc.trigger("startVerticalResize",this)},onStartHorizontalResize(e,t=!0){if(!Vc.settings.get("allow_dragresize"))return!0;e.preventDefault();const n=this.el.querySelector(".box-flyout"),r=window.getComputedStyle(n);this.width=parseInt(r.width.replace(/px$/,""),10),Uc.resizing={chatbox:this,direction:"left"},this.prev_pageX=e.pageX,t&&Vc.trigger("startHorizontalResize",this)},onStartDiagonalResize(e){this.onStartHorizontalResize(e,!1),this.onStartVerticalResize(e,!1),Uc.resizing.direction="topleft",Vc.trigger("startDiagonalResize",this)}};function t(e){if(!Uc.resizing||!Vc.settings.get("allow_dragresize"))return!0;e.preventDefault(),Uc.resizing.chatbox.resizeChatBox(e)}function n(e){if(!Uc.resizing||!Vc.settings.get("allow_dragresize"))return!0;e.preventDefault();const t=Rb.applyDragResistance(Uc.resizing.chatbox.height,Uc.resizing.chatbox.model.get("default_height")),n=Rb.applyDragResistance(Uc.resizing.chatbox.width,Uc.resizing.chatbox.model.get("default_width"));Vc.connection.connected()?(Uc.resizing.chatbox.model.save({height:t}),Uc.resizing.chatbox.model.save({width:n})):(Uc.resizing.chatbox.model.set({height:t}),Uc.resizing.chatbox.model.set({width:n})),Uc.resizing=null}Object.assign(Uc.ChatBoxView.prototype,e),Rb.applyDragResistance=function(e,t){if(void 0===e)return;if(void 0===t)return e;return e!==t&&Math.abs(e-t)<10?t:e},Vc.listen.on("registeredGlobalEventHandlers",(function(){document.addEventListener("mousemove",t),document.addEventListener("mouseup",n)})),Vc.listen.on("unregisteredGlobalEventHandlers",(function(){document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)})),Vc.listen.on("beforeShowingChatView",e=>e.initDragResize().setDimensions())}}),
-/**
- * @module converse-singleton
- * @copyright JC Brand
- * @license Mozilla Public License (MPLv2)
- * @description A plugin which restricts Converse to only one chat.
- */
-rl.plugins.add("converse-singleton",{enabled:e=>e.api.settings.get("singleton"),initialize(){if(Vc.settings.extend({allow_logout:!1,allow_muc_invitations:!1,hide_muc_server:!0}),!Array.isArray(Vc.settings.get("auto_join_rooms"))&&!Array.isArray(Vc.settings.get("auto_join_private_chats")))throw new Error("converse-singleton: auto_join_rooms must be an Array");if(Vc.settings.get("auto_join_rooms").length>1||Vc.settings.get("auto_join_private_chats").length>1)throw new Error("It doesn't make sense to have singleton set to true and auto_join_rooms or auto_join_private_chats set to more then one, since only one chat room may be open at any time.")}}),
-/**
- * @module converse-fullscreen
- * @license Mozilla Public License (MPLv2)
- * @copyright 2020, the Converse.js contributors
- */
-rl.plugins.add("converse-fullscreen",{enabled:e=>e.isUniView(),initialize(){Vc.settings.extend({chatview_avatar_height:50,chatview_avatar_width:50,hide_open_bookmarks:!0,show_controlbox_by_default:!0,sticky_controlbox:!0})}}),
-/**
- * @module converse-mam-views
- * @description
- * Views for XEP-0313 Message Archive Management
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-rl.plugins.add("converse-mam-views",{dependencies:["converse-mam","converse-chatview","converse-muc-views"],initialize(){Vc.listen.on("chatBoxScrolledUp",async e=>{if(e.model.messages.length){const t=e.model.get("type")===Uc.CHATROOMS_TYPE,n=e.model.getOldestMessage();if(n){const r=t?e.model.get("jid"):Uc.bare_jid,i=n&&n.get("stanza_id ".concat(r));e.addSpinner(),i?await e.model.fetchArchivedMessages({before:i}):await e.model.fetchArchivedMessages({end:n.get("time")}),e.clearSpinner()}}})}});function Fb(){const e=qb(["<converse-minimized-chat\n                        .model=","\n                        title=","\n                        type=","\n                        num_unread=","></converse-minimized-chat>"]);return Fb=function(){return e},e}function Bb(){const e=qb(['<div id="minimized-chats" class="','">\n        <a id="toggle-minimized-chats" class="row no-gutters" @click=',">\n            "," ",'\n            <span class="unread-message-count ','" href="#">','</span>\n        </a>\n        <div class="flyout minimized-chats-flyout row no-gutters ','">\n            ',"\n        </div>\n    </div>"]);return Bb=function(){return e},e}function qb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-minimized-chat",class extends mc{static get properties(){return{model:{type:Object},title:{type:String},type:{type:String},num_unread:{type:Number}}}render(){return(e=>{const t=zd("Click to restore this chat");return Za(Lb(),e.type,t,e.restore,e.num_unread?Za(Pb(),e.num_unread):"",e.title,e.close)})({close:e=>this.close(e),num_unread:this.num_unread,restore:e=>this.restore(e),title:this.title,type:this.type})}close(e){null==e||e.preventDefault();const t=Uc.chatboxviews.get(this.model.get("id"));t?t.close():(this.model.destroy(),Vc.trigger("chatBoxClosed",this))}restore(e){null==e||e.preventDefault(),this.model.maximize()}});
-/**
- * @module converse-minimize
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{dayjs:Hb}=rl.env,Ub=rl.env.utils;function $b(){const e=Qb(['<span class="badge badge-secondary">',"</span>"]);return $b=function(){return e},e}function Wb(){const e=Qb(['<span class="badge badge-info">',"</span>"]);return Wb=function(){return e},e}function Gb(){const e=Qb(['<span class="badge badge-info">',"</span>"]);return Gb=function(){return e},e}function Vb(){const e=Qb(['<span class="badge badge-info">',"</span>"]);return Vb=function(){return e},e}function Jb(){const e=Qb(['<span class="badge badge-groupchat">',"</span>"]);return Jb=function(){return e},e}function Xb(){const e=Qb(['\n        <li class="occupant" id="','" title="','">\n            <div class="row no-gutters">\n                <div class="col-auto">\n                    <div class="occupant-status occupant-',' circle" title="','"></div>\n                </div>\n                <div class="col occupant-nick-badge">\n                    <span class="occupant-nick">','</span>\n                    <span class="occupant-badges">\n                        ',"\n                        ","\n                        ","\n                        ","\n                        ","\n                    </span>\n                </div>\n            </div>\n        </li>\n    "]);return Xb=function(){return e},e}function Qb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}rl.plugins.add("converse-minimize",{dependencies:["converse-chatview","converse-controlbox","converse-muc-views","converse-headlines-view","converse-dragresize"],enabled:e=>"overlayed"===e.api.settings.get("view_mode"),overrides:{ChatBox:{initialize(){this.__super__.initialize.apply(this,arguments),this.on("show",this.maximize,this),"controlbox"!==this.get("id")&&this.save({minimized:this.get("minimized")||!1,time_minimized:this.get("time_minimized")||Hb()})},maybeShow(e){return!e&&this.get("minimized")?this:this.__super__.maybeShow.apply(this,arguments)},isHidden(){return this.__super__.isHidden.call(this)||this.get("minimized")}},ChatBoxView:{show(){const{_converse:e}=this.__super__;return"overlayed"===e.api.settings.get("view_mode")&&this.model.get("minimized")?(this.model.minimize(),this):this.__super__.show.apply(this,arguments)},isNewMessageHidden(){return this.model.get("minimized")||this.__super__.isNewMessageHidden.apply(this,arguments)},setChatBoxHeight(e){if(!this.model.get("minimized"))return this.__super__.setChatBoxHeight.call(this,e)},setChatBoxWidth(e){if(!this.model.get("minimized"))return this.__super__.setChatBoxWidth.call(this,e)}}},initialize(){Vc.settings.extend({no_trimming:!1});const e={maximize(){Ub.safeSave(this,{minimized:!1,time_opened:(new Date).getTime()})},minimize(){Ub.safeSave(this,{minimized:!0,time_minimized:(new Date).toISOString()})}};Object.assign(Uc.ChatBox.prototype,e);const t={onMaximized(){const{_converse:e}=this.__super__;return this.insertIntoDOM(),this.model.isScrolledUp()||this.model.clearUnreadMsgCounter(),this.model.setChatState(e.ACTIVE),this.show(),Vc.trigger("chatBoxMaximized",this),this},onMinimized(e){const{_converse:t}=this.__super__;return e&&e.preventDefault&&e.preventDefault(),this.model.collection&&this.model.collection.browserStorage?this.model.save({scroll:this.content.scrollTop}):this.model.set({scroll:this.content.scrollTop}),this.model.setChatState(t.INACTIVE),this.hide(),Vc.trigger("chatBoxMinimized",this),this},minimize(e){return e&&e.preventDefault&&e.preventDefault(),this.model.minimize(),this},onMinimizedChanged(e){e.get("minimized")?this.onMinimized():this.onMaximized()}};Object.assign(Uc.ChatBoxView.prototype,t);const n={getChatBoxWidth(e){if("controlbox"===e.model.get("id")){const e=this.get("controlbox");return e&&Ub.isVisible(e.el)?Ub.getOuterWidth(e.el,!0):Ub.getOuterWidth(Uc.controlboxtoggle.el,!0)}return!e.model.get("minimized")&&Ub.isVisible(e.el)?Ub.getOuterWidth(e.el,!0):0},getShownChats(){return this.filter(e=>!e.model.get("minimized")&&!e.model.get("closed")&&Ub.isVisible(e.el))},getMinimizedWidth(){var e;const t=null===(e=Uc.minimized_chats)||void 0===e?void 0:e.el;return this.model.pluck("minimized").includes(!0)?Ub.getOuterWidth(t,!0):0},getBoxesWidth(e){const t=e?e.model.get("id"):null,n=e?Ub.getOuterWidth(e.el,!0):0;return Object.values(this.xget(t)).reduce((e,t)=>e+this.getChatBoxWidth(t),n)},async trimChats(e){var t;if(Vc.settings.get("no_trimming")||!Vc.connection.connected()||"overlayed"!==Vc.settings.get("view_mode"))return;const n=this.getShownChats();if(n.length<=1)return;const r=Ub.getOuterWidth(document.querySelector("body"),!0);if(this.getChatBoxWidth(n[0])!==r&&(await Vc.waitUntil("minimizedChatsInitialized"),null===(t=Uc.minimized_chats)||void 0===t?void 0:t.el))for(;this.getMinimizedWidth()+this.getBoxesWidth(e)>r;){const t=e?e.model.get("id"):null,n=this.getOldestMaximizedChat([t]);if(!n)break;{const e=this.get(n.get("id"));e&&e.hide(),n.minimize()}}},getOldestMaximizedChat(e){e.push("controlbox");let t=0,n=this.model.sort().at(t);for(;e.includes(n.get("id"))||!0===n.get("minimized");)if(t++,n=this.model.at(t),!n)return null;return n}};Object.assign(Uc.ChatBoxViews.prototype,n),Vc.promises.add("minimizedChatsInitialized"),Uc.MinimizedChatsToggle=qo.extend({defaults:{collapsed:!1}}),Uc.MinimizedChats=eh.extend({tagName:"span",async initialize(){await this.initToggle(),this.render(),this.listenTo(this.minchats,"change:collapsed",this.render),this.listenTo(this.model,"add",this.render),this.listenTo(this.model,"change:fullname",this.render),this.listenTo(this.model,"change:jid",this.render),this.listenTo(this.model,"change:minimized",this.render),this.listenTo(this.model,"change:name",this.render),this.listenTo(this.model,"change:num_unread",this.render),this.listenTo(this.model,"remove",this.render)},render(){const e=this.model.where({minimized:!0}),t=e.reduce((e,t)=>e+t.get("num_unread"),0),n=e.reduce((e,t)=>e+(t.get("minimized")?1:0),0),r={chats:e,num_unread:t,num_minimized:n,collapsed:this.minchats.get("collapsed")};var i;r.toggle=e=>this.toggle(e),Ya((i=r,Za(Bb(),i.chats.length?"":"hidden",i.toggle,i.num_minimized,zd("Minimized"),i.num_unread?"":"unread-message-count-hidden",i.num_unread,i.collapsed?"hidden":"",i.chats.map(e=>Za(Fb(),e,e.getDisplayName(),e.get("type"),e.get("num_unread"))))),this.el),this.el.parentElement||Uc.chatboxviews.insertRowColumn(this.el)},async initToggle(){const e="converse.minchatstoggle-".concat(Uc.bare_jid);this.minchats=new Uc.MinimizedChatsToggle({id:e}),this.minchats.browserStorage=Uc.createStore(e),await new Promise(e=>this.minchats.fetch({success:e,error:e}))},toggle(e){null==e||e.preventDefault(),this.minchats.save({collapsed:!this.minchats.get("collapsed")})}}),Vc.listen.on("chatBoxInsertedIntoDOM",e=>Uc.chatboxviews.trimChats(e)),Vc.listen.on("connected",()=>{return null===(e=Uc.minimized_chats)||void 0===e||e.remove(),Uc.minimized_chats=new Uc.MinimizedChats({model:Uc.chatboxes}),void Vc.trigger("minimizedChatsInitialized");var e}),Vc.listen.on("controlBoxOpened",e=>Uc.chatboxviews.trimChats(e)),Vc.listen.on("chatBoxViewInitialized",e=>e.listenTo(e.model,"change:minimized",e.onMinimizedChanged)),Vc.listen.on("chatRoomViewInitialized",e=>{e.listenTo(e.model,"change:minimized",e.onMinimizedChanged),e.model.get("minimized")&&e.hide()}),Vc.listen.on("getHeadingButtons",(e,t)=>e.model.get("type")===Uc.CHATROOMS_TYPE?function(e,t){const n={a_class:"toggle-chatbox-button",handler:t=>e.minimize(t),i18n_text:zd("Minimize"),i18n_title:zd("Minimize this groupchat"),icon_class:"fa-minus",name:"minimize",standalone:"overlayed"===Uc.api.settings.get("view_mode")},r=t.map(e=>e.name).indexOf("signout");return r>-1?[...t.slice(0,r),n,...t.slice(r)]:[n,...t]}(e,t):function(e,t){const n={a_class:"toggle-chatbox-button",handler:t=>e.minimize(t),i18n_text:zd("Minimize"),i18n_title:zd("Minimize this chat"),icon_class:"fa-minus",name:"minimize",standalone:"overlayed"===Uc.api.settings.get("view_mode")},r=t.map(e=>e.name).indexOf("close");return r>-1?[...t.slice(0,r),n,...t.slice(r)]:[n,...t]}(e,t));const r=Rc(()=>Uc.chatboxviews.trimChats(),250);Vc.listen.on("registeredGlobalEventHandlers",()=>window.addEventListener("resize",r)),Vc.listen.on("unregisteredGlobalEventHandlers",()=>window.removeEventListener("resize",r))}});var Yb=e=>{const t=zd("Owner"),n=zd("Admin"),r=zd("Member"),i=zd("Moderator"),o=zd("Visitor");return Za(Xb(),e.id,(e=>{const t=zd("This user is a moderator."),n=zd("This user can send messages in this groupchat."),r=zd("This user can NOT send messages in this groupchat."),i="".concat(e.jid," ")||!1;return"moderator"===e.role?"".concat(i).concat(t," ").concat(e.hint_occupant):"participant"===e.role?"".concat(i).concat(n," ").concat(e.hint_occupant):"visitor"===e.role?"".concat(i).concat(r," ").concat(e.hint_occupant):["visitor","participant","moderator"].includes(e.role)?void 0:"".concat(i).concat(e.hint_occupant)})(e),e.show,e.hint_show,e.nick||e.jid,"owner"===e.affiliation?Za(Jb(),t):"","admin"===e.affiliation?Za(Vb(),n):"","member"===e.affiliation?Za(Gb(),r):"","moderator"===e.role?Za(Wb(),i):"","visitor"===e.role?Za($b(),o):"")};function Kb(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n        <div class="occupants-header">\n            <i class="hide-occupants fa fa-times"></i>\n            <div class="occupants-header--title">\n                <span class="occupants-heading">','</span>\n            </div>\n        </div>\n        <div class="dragresize dragresize-occupants-left"></div>\n        <ul class="occupant-list">',"</ul>\n    "]);return Kb=function(){return e},e}const Zb={offline:"Offline",unavailable:"Unavailable",xa:"Extended Away",away:"Away",dnd:"Do not disturb",chat:"Chattty",online:"Online"};const ey=rl.env.utils;function ty(){const e=ry(['<p class="form-help">',"</p>"]);return ty=function(){return e},e}function ny(){const e=ry(['\n        <form class="converse-form chatroom-form" autocomplete="off" @submit=','>\n            <fieldset class="form-group">\n                <legend>',"</legend>\n                ","\n                \x3c!-- Fields are generated internally, with xForm2webForm --\x3e\n                ",'\n            </fieldset>\n            <fieldset>\n                <input type="submit" class="btn btn-primary" value="','">\n                <input type="button" class="btn btn-secondary button-cancel" value="','" @click=',">\n            </fieldset>\n        </form>\n    "]);return ny=function(){return e},e}function ry(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-muc-sidebar",class extends mc{static get properties(){return{chatroom:{type:Object},occupants:{type:Object}}}connectedCallback(){super.connectedCallback(),this.listenTo(this.occupants,"add",this.requestUpdate),this.listenTo(this.occupants,"remove",this.requestUpdate),this.listenTo(this.occupants,"change",this.requestUpdate)}render(){return(e=>{const t=e=>zd("Click to mention %1$s in your message.",e.get("nick")),n=zd("Participants"),r=e.occupants.map(e=>Yb(Object.assign({jid:"",hint_show:Zb[e.get("show")],hint_occupant:t(e)},e.toJSON())));return Za(Kb(),n,r)})(Object.assign(this.chatroom.toJSON(),{occupants:[...this.occupants.models]}))}shouldShow(){return!this.chatroom.get("hidden_occupants")&&this.chatroom.session.get("connection_status")===rl.ROOMSTATUS.ENTERED}setVisibility(){this.shouldShow()?ey.showElement(this):ey.hideElement(this)}});const{sizzle:iy}=rl.env,oy=rl.env.utils;var sy=eh.extend({className:"chatroom-form-container muc-config-form",initialize(e){this.chatroomview=e.chatroomview,this.listenTo(this.chatroomview.model.features,"change:passwordprotected",this.render),this.listenTo(this.chatroomview.model.features,"change:config_stanza",this.render),this.render()},toHTML(){var e,t;const n=oy.toStanza(this.model.get("config_stanza")),r=Vc.settings.get("roomconfig_whitelist");let i=iy("field",n);r.length&&(i=i.filter(e=>r.includes(e.getAttribute("var"))));const o={new_password:!this.model.features.get("passwordprotected"),fixed_username:this.model.get("jid")};return(e=>{const t=zd("Save"),n=zd("Cancel");return Za(ny(),e.submitConfigForm,e.title,e.title!==e.instructions?Za(ty(),e.instructions):"",e.fields.map(e=>Kp(e)),t,n,e.closeConfigForm)})({closeConfigForm:e=>this.closeConfigForm(e),fields:i.map(e=>oy.xForm2webForm(e,n,o)),instructions:null===(e=n.querySelector("instructions"))||void 0===e?void 0:e.textContent,submitConfigForm:e=>this.submitConfigForm(e),title:null===(t=n.querySelector("title"))||void 0===t?void 0:t.textContent})},async submitConfigForm(e){e.preventDefault();const t=iy(":input:not([type=button]):not([type=submit])",e.target).map(oy.webForm2xForm).filter(e=>e);try{await this.model.sendConfiguration(t)}catch(e){zn.error(e);const t=zd("Sorry, an error occurred while trying to submit the config form.")+" "+zd("Check your browser's developer console for details.");Vc.alert("error",zd("Error"),t)}await this.model.refreshDiscoInfo(),this.chatroomview.closeForm()},closeConfigForm(e){e.preventDefault(),this.chatroomview.closeForm()}});function ay(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n        <form class="converse-form chatroom-form converse-centered-form" @submit=','>\n            <fieldset class="form-group">\n                <label>','</label>\n                <p class="validation-message">','</p>\n                <input class="hidden-username" type="text" autocomplete="username" value="','"></input>\n                <input type="password"\n                    name="password"\n                    required="required"\n                    class="form-control ','"\n                    placeholder="','"/>\n            </fieldset>\n            <fieldset class="form-group">\n                <input class="btn btn-primary" type="submit" value="','"/>\n            </fieldset>\n        </form>\n    ']);return ay=function(){return e},e}var cy=eh.extend({className:"chatroom-form-container muc-password-form",initialize(e){this.chatroomview=e.chatroomview,this.listenTo(this.model,"change:validation_message",this.render),this.render()},toHTML(){return(e=>{const t=zd("This groupchat requires a password"),n=zd("Password: "),r=zd("Submit");return Za(ay(),e.submitPassword,t,e.validation_message,e.jid,e.validation_message?"error":"",n,r)})({jid:this.model.get("jid"),submitPassword:e=>this.submitPassword(e),validation_message:this.model.get("validation_message")})},submitPassword(e){e.preventDefault();const t=this.el.querySelector("input[type=password]").value;this.chatroomview.model.join(this.chatroomview.model.get("nick"),t),this.model.set("validation_message",null)}});function ly(){const e=dy(['<div class="error error-feedback">',"</div>"]);return ly=function(){return e},e}function uy(){const e=dy(['\n        <div class="modal-dialog" role="document">\n            <div class="modal-content">\n                <div class="modal-header">\n                    <h5 class="modal-title" id="add-chatroom-modal-label">',"</h5>\n                    ",'\n                </div>\n                <div class="modal-body">\n                    <span class="modal-alert"></span>\n                    <div class="suggestion-box room-invite">\n                        <form @submit=','>\n                            <div class="form-group">\n                                <label class="clearfix" for="invitee_jids">',":</label>\n                                ",'\n                                <input class="form-control suggestion-box__input"\n                                    required="required"\n                                    name="invitee_jids"\n                                    id="invitee_jids"\n                                    placeholder="','"\n                                    type="text"/>\n                                <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n                                <ul class="suggestion-box__results suggestion-box__results--below" hidden=""></ul>\n                            </div>\n                            <div class="form-group">\n                                <label>',':</label>\n                                <textarea class="form-control" name="reason"></textarea>\n                            </div>\n                            <div class="form-group">\n                                <button type="submit" class="btn btn-primary">',"</button>\n                            </div>\n                        </form>\n                    </div>\n                </div>\n            </div>\n        </div>\n    "]);return uy=function(){return e},e}function dy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const hy=rl.env.utils;var fy=df.extend({id:"muc-invite-modal",initialize(){df.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.initInviteWidget()},toHTML(){return(e=>{const t=zd("Invite"),n=zd("Invite someone to this groupchat"),r=zd("user@example.org"),i=zd("Please enter a valid XMPP address"),o=zd("XMPP Address"),s=zd("Optional reason for the invitation");return Za(uy(),n,mf,e.submitInviteForm,o,e.invalid_invite_jid?Za(ly(),i):"",r,s,t)})(Object.assign(this.model.toJSON(),{submitInviteForm:e=>this.submitInviteForm(e)}))},initInviteWidget(){this.invite_auto_complete&&this.invite_auto_complete.destroy();const e=Uc.roster.map(e=>({label:e.getDisplayName(),value:e.get("jid")})),t=this.el.querySelector(".suggestion-box").parentElement;this.invite_auto_complete=new Uc.AutoComplete(t,{min_chars:1,list:e})},submitInviteForm(e){e.preventDefault();const t=new FormData(e.target),n=t.get("invitee_jids"),r=t.get("reason");hy.isValidJID(n)?(this.chatroomview.model.directInvite(n,r),this.modal.hide()):this.model.set({invalid_invite_jid:!0})}});function py(){const e=Dy(['<li class="list-group-item">',"</li>"]);return py=function(){return e},e}function gy(){const e=Dy(['<li class="list-group-item"> '," </li>"]);return gy=function(){return e},e}function my(){const e=Dy(['<div class="row"><div class="col pt-2"><p class="helptext pb-3">',"</p></div></div>"]);return my=function(){return e},e}function vy(){const e=Dy(['<input class="form-control" .value="','" @keyup=',' type="text" name="filter" placeholder="','"/>']);return vy=function(){return e},e}function _y(){const e=Dy(['<li class="list-group-item">',"</li>"]);return _y=function(){return e},e}function by(){const e=Dy(['<li class="list-group-item">',"</li>"]);return by=function(){return e},e}function yy(){const e=Dy(['<li class="list-group-item"> '," </li>"]);return yy=function(){return e},e}function wy(){const e=Dy(['<div class="row"><div class="col pt-2"><p class="helptext pb-3">',"</p></div></div>"]);return wy=function(){return e},e}function Sy(){const e=Dy(['<input class="form-control" .value="','" @keyup=',' type="text" name="filter" placeholder="','"/>']);return Sy=function(){return e},e}function xy(){const e=Dy(['\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="converse-modtools-modal-label">',"</h5>\n                ",'\n            </div>\n            <div class="modal-body d-flex flex-column">\n                <span class="modal-alert"></span>\n\n                ','\n\n                <div class="tab-content">\n                    <div class="tab-pane tab-pane--columns ','" id="affiliations-tabpanel" role="tabpanel" aria-labelledby="affiliations-tab">\n                        <form class="converse-form query-affiliation" @submit=','>\n                            <p class="helptext pb-3">','</p>\n                            <div class="form-group">\n                                <label for="affiliation">\n                                    <strong>',':</strong>\n                                </label>\n                                <div class="row">\n                                    <div class="col">\n                                        <select class="custom-select select-affiliation" name="affiliation">\n                                            ','\n                                        </select>\n                                    </div>\n                                    <div class="col">\n                                        <input type="submit" class="btn btn-primary" name="users_with_affiliation" value="','"/>\n                                    </div>\n                                </div>\n                                <div class="row">\n                                    <div class="col mt-3">\n                                        ',"\n                                    </div>\n                                </div>\n\n                                ",'\n                            </div>\n                        </form>\n                        <div class="scrollable-container">\n                            <ul class="list-group list-group--users">\n                                ',"\n                                ","\n\n                                ",'\n                            </ul>\n                        </div>\n                    </div>\n\n                    <div class="tab-pane tab-pane--columns ','" id="roles-tabpanel" role="tabpanel" aria-labelledby="roles-tab">\n                        <form class="converse-form query-role" @submit=','>\n                            <p class="helptext pb-3">','</p>\n                            <div class="form-group">\n                                <label for="role"><strong>',':</strong></label>\n                                <div class="row">\n                                    <div class="col">\n                                        <select class="custom-select select-role" name="role">\n                                            ','\n                                        </select>\n                                    </div>\n                                    <div class="col">\n                                        <input type="submit" class="btn btn-primary" name="users_with_role" value="','"/>\n                                    </div>\n                                </div>\n                                <div class="row">\n                                    <div class="col mt-3">\n                                        ',"\n                                    </div>\n                                </div>\n\n                                ",'\n                            </div>\n                        </form>\n                        <div class="scrollable-container">\n                            <ul class="list-group list-group--users">\n                                ',"\n                                ","\n                                ","\n                            </ul>\n                        </div>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>"]);return xy=function(){return e},e}function Ey(){const e=Dy(['\n    <ul class="nav nav-pills justify-content-center">\n        <li role="presentation" class="nav-item">\n            <a class="nav-link active" id="affiliations-tab" href="#affiliations-tabpanel" aria-controls="affiliations-tabpanel" role="tab" data-toggle="tab" @click=','>Affiliations</a>\n        </li>\n        <li role="presentation" class="nav-item">\n            <a class="nav-link" id="roles-tab" href="#roles-tabpanel" aria-controls="roles-tabpanel" role="tab" data-toggle="tab" @click=',">Roles</a>\n        </li>\n    </ul>\n"]);return Ey=function(){return e},e}function Ay(){const e=Dy(['<a href="#" data-form="affiliation-form" class="toggle-form right fa fa-wrench" @click=',"></a>"]);return Ay=function(){return e},e}function Cy(){const e=Dy(['\n    <li class="list-group-item" data-nick="','">\n        <ul class="list-group">\n            <li class="list-group-item active">\n                <div><strong>JID:</strong> ','</div>\n            </li>\n            <li class="list-group-item">\n                <div><strong>Nickname:</strong> ','</div>\n            </li>\n            <li class="list-group-item">\n                <div><strong>Affiliation:</strong> '," ","</div>\n                ","\n            </li>\n        </ul>\n    </li>\n"]);return Cy=function(){return e},e}function jy(){const e=Dy(['<option value="','" ?selected=',">","</option>"]);return jy=function(){return e},e}function Ty(){const e=Dy(['\n        <form class="affiliation-form hidden" @submit=','>\n            <div class="form-group">\n                <input type="hidden" name="jid" value="','"/>\n                <input type="hidden" name="nick" value="','"/>\n                <div class="row">\n                    <div class="col">\n                        <label><strong>',':</strong></label>\n                        <select class="custom-select select-affiliation" name="affiliation">\n                            ','\n                        </select>\n                    </div>\n                    <div class="col">\n                        <label><strong>',':</strong></label>\n                        <input class="form-control" type="text" name="reason"/>\n                    </div>\n                </div>\n            </div>\n            <div class="form-group">\n                <input type="submit" class="btn btn-primary" name="change" value="','"/>\n            </div>\n        </form>\n    ']);return Ty=function(){return e},e}function Oy(){const e=Dy(['<a href="#" data-form="role-form" class="toggle-form right fa fa-wrench" @click=',"></a>"]);return Oy=function(){return e},e}function ky(){const e=Dy(['\n    <li class="list-group-item" data-nick="','">\n        <ul class="list-group">\n            <li class="list-group-item active">\n                <div><strong>JID:</strong> ','</div>\n            </li>\n            <li class="list-group-item">\n                <div><strong>Nickname:</strong> ','</div>\n            </li>\n            <li class="list-group-item">\n                <div><strong>Role:</strong> '," ","</div>\n                ","\n            </li>\n        </ul>\n    </li>\n"]);return ky=function(){return e},e}function Ny(){const e=Dy(['<option value="','" ?selected=',">","</option>"]);return Ny=function(){return e},e}function Iy(){const e=Dy(['\n        <form class="role-form hidden" @submit=','>\n            <div class="form-group">\n                <input type="hidden" name="jid" value="','"/>\n                <input type="hidden" name="nick" value="','"/>\n                <div class="row">\n                    <div class="col">\n                        <label><strong>',':</strong></label>\n                        <select class="custom-select select-role" name="role">\n                            ','\n                        </select>\n                    </div>\n                    <div class="col">\n                        <label><strong>',':</strong></label>\n                        <input class="form-control" type="text" name="reason"/>\n                    </div>\n                </div>\n            </div>\n            <div class="form-group">\n                <input type="submit" class="btn btn-primary" value="','"/>\n            </div>\n        </form>\n    ']);return Iy=function(){return e},e}function My(){const e=Dy(['\n    <option value="','"\n            ?selected=','\n            title="','">',"</option>\n"]);return My=function(){return e},e}function Ry(){const e=Dy(['\n    <option value="','"\n            ?selected=','\n            title="','">',"</option>\n"]);return Ry=function(){return e},e}function Dy(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Py(e){return"moderator"===e?zd("Moderators are privileged users who can change the roles of other users (except those with admin or owner affiliations."):"participant"===e?zd("The default role, implies that you can read and write messages."):"visitor"==e?zd("Visitors aren't allowed to write messages in a moderated multi-user chat."):void 0}function Ly(e){return"owner"===e?zd("Owner is the highest affiliation. Owners can modify roles and affiliations of all other users."):"admin"===e?zd("Admin is the 2nd highest affiliation. Admins can modify roles and affiliations of all other users except owners."):"outcast"===e?zd('To ban a user, you give them the affiliation of "outcast".'):void 0}const zy=e=>Za(ky(),e.item.nick,e.item.jid,e.item.nick,e.item.role,e.assignable_roles.length?Za(Oy(),e.toggleForm):"",e.assignable_roles.length?(e=>{const t=zd("Change role"),n=zd("New Role"),r=zd("Reason");return Za(Iy(),e.assignRole,e.item.jid,e.item.nick,n,e.assignable_roles.map(t=>Za(Ny(),t,t===e.item.role,t)),r,t)})(e):""),Fy=e=>Za(Cy(),e.item.nick,e.item.jid,e.item.nick,e.item.affiliation,e.assignable_affiliations.length?Za(Ay(),e.toggleForm):"",e.assignable_affiliations.length?(e=>{const t=zd("Change affiliation"),n=zd("New affiliation"),r=zd("Reason");return Za(Ty(),e.assignAffiliation,e.item.jid,e.item.nick,n,e.assignable_affiliations.map(t=>Za(jy(),t,t===e.item.affiliation,t)),r,t)})(e):"");var By=e=>{const t=zd("Affiliation"),n=zd("Moderator Tools"),r=zd("No users with that affiliation found."),i=zd("No users with that role found."),o=zd("Type here to filter the search results"),s=zd("Role"),a=zd("Show users"),c=zd("Roles are assigned to users to grant or deny them certain abilities in a multi-user chat. They're assigned either explicitly or implicitly as part of an affiliation. A role that's not due to an affiliation, is only valid for the duration of the user's session."),l=zd("An affiliation is a long-lived entitlement which typically implies a certain role and which grants privileges and responsibilities. For example admins and owners automatically have the moderator role."),u=e.queryable_roles.length&&e.queryable_affiliations.length;return Za(xy(),n,mf,u?(e=>Za(Ey(),e.switchTab,e.switchTab))(e):"",e.queryable_affiliations.length?"active":"",e.queryAffiliation,l,t,e.queryable_affiliations.map(t=>(e=>Za(My(),e.item||"",e.item===e.affiliation,Ly(e.item),e.item))(Object.assign({item:t},e))),a,Array.isArray(e.users_with_affiliation)&&e.users_with_affiliation.length>5?Za(Sy(),e.affiliations_filter,e.filterAffiliationResults,o):"",Ly(e.affiliation)?Za(wy(),Ly(e.affiliation)):"",e.loading_users_with_affiliation?Za(yy(),fp()):"",Array.isArray(e.users_with_affiliation)&&0===e.users_with_affiliation.length?Za(by(),r):"",e.users_with_affiliation instanceof Error?Za(_y(),e.users_with_affiliation.message):(e.users_with_affiliation||[]).map(t=>(t.nick||t.jid).match(new RegExp(e.affiliations_filter,"i"))?Fy(Object.assign({item:t},e)):""),!u&&e.queryable_roles.length?"active":"",e.queryRole,c,s,e.queryable_roles.map(t=>(e=>Za(Ry(),e.item||"",e.item===e.role,Py(e.item),e.item))(Object.assign({item:t},e))),a,Array.isArray(e.users_with_role)&&e.users_with_role.length>5?Za(vy(),e.roles_filter,e.filterRoleResults,o):"",Py(e.role)?Za(my(),Py(e.role)):"",e.loading_users_with_role?Za(gy(),fp()):"",e.users_with_role&&0===e.users_with_role.length?Za(py(),i):"",(e.users_with_role||[]).map(t=>t.nick.match(e.roles_filter)?zy(Object.assign({item:t},e)):""))};const{Strophe:qy}=rl.env,Hy=rl.env.utils;let Uy;var $y=df.extend({id:"converse-modtools-modal",persistent:!0,initialize(e){Uy=e._converse,this.chatroomview=e.chatroomview,df.prototype.initialize.apply(this,arguments),this.affiliations_filter="",this.roles_filter="",this.listenTo(this.model,"change:role",()=>{this.users_with_role=this.chatroomview.model.getOccupantsWithRole(this.model.get("role")),this.render()}),this.listenTo(this.model,"change:affiliation",async()=>{this.loading_users_with_affiliation=!0,this.users_with_affiliation=null,this.render();const e=this.chatroomview.model,t=this.model.get("affiliation");this.shouldFetchAffiliationsList()?this.users_with_affiliation=await e.getAffiliationList(t):this.users_with_affiliation=e.getOccupantsWithAffiliation(t),this.loading_users_with_affiliation=!1,this.render()})},toHTML(){const e=this.chatroomview.model.occupants.findWhere({jid:Uy.bare_jid});return By(Object.assign(this.model.toJSON(),{affiliations_filter:this.affiliations_filter,assignAffiliation:e=>this.assignAffiliation(e),assignRole:e=>this.assignRole(e),assignable_affiliations:this.getAssignableAffiliations(e),assignable_roles:this.getAssignableRoles(e),filterAffiliationResults:e=>this.filterAffiliationResults(e),filterRoleResults:e=>this.filterRoleResults(e),loading_users_with_affiliation:this.loading_users_with_affiliation,queryAffiliation:e=>this.queryAffiliation(e),queryRole:e=>this.queryRole(e),queryable_affiliations:fu.filter(e=>!Uy.modtools_disable_query.includes(e)),queryable_roles:hu.filter(e=>!Uy.modtools_disable_query.includes(e)),roles_filter:this.roles_filter,switchTab:e=>this.switchTab(e),toggleForm:e=>this.toggleForm(e),users_with_affiliation:this.users_with_affiliation,users_with_role:this.users_with_role}))},getAssignableAffiliations(e){let t=Vc.settings.get("modtools_disable_assign");return Array.isArray(t)||(t=t?fu:[]),"owner"===e.get("affiliation")?fu.filter(e=>!t.includes(e)):"admin"===e.get("affiliation")?fu.filter(e=>!["owner","admin",...t].includes(e)):[]},getAssignableRoles(e){let t=Vc.settings.get("modtools_disable_assign");return Array.isArray(t)||(t=t?hu:[]),"moderator"===e.get("role")?hu.filter(e=>!t.includes(e)):[]},shouldFetchAffiliationsList(){const e=this.model.get("affiliation");return"none"!==e&&!this.chatroomview.model.occupants.getAutoFetchedAffiliationLists().includes(e)},toggleForm(e){e.stopPropagation(),e.preventDefault();const t=e.target.getAttribute("data-form"),n=Hy.ancestor(e.target,".list-group-item").querySelector(".".concat(t));Hy.hasClass("hidden",n)?Hy.removeClass("hidden",n):Hy.addClass("hidden",n)},filterRoleResults(e){this.roles_filter=e.target.value,this.render()},filterAffiliationResults(e){this.affiliations_filter=e.target.value,this.render()},queryRole(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target).get("role");this.model.set({role:null},{silent:!0}),this.model.set({role:t})},queryAffiliation(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target).get("affiliation");this.model.set({affiliation:null},{silent:!0}),this.model.set({affiliation:t})},async assignAffiliation(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),n=t.get("affiliation"),r={jid:t.get("jid"),reason:t.get("reason")},i=this.model.get("affiliation");try{await this.chatroomview.model.setAffiliation(n,[r])}catch(e){return null===e?this.alert(zd("Timeout error while trying to set the affiliation"),"danger"):mr()('not-allowed[xmlns="'.concat(qy.NS.STANZAS,'"]'),e).length?this.alert(zd("Sorry, you're not allowed to make that change"),"danger"):this.alert(zd("Sorry, something went wrong while trying to set the affiliation"),"danger"),void zn.error(e)}this.alert(zd("Affiliation changed"),"primary"),await this.chatroomview.model.occupants.fetchMembers(),this.model.set({affiliation:null},{silent:!0}),this.model.set({affiliation:i})},assignRole(e){e.stopPropagation(),e.preventDefault();const t=new FormData(e.target),n=this.chatroomview.model.getOccupant(t.get("jid")||t.get("nick")),r=t.get("role"),i=t.get("reason"),o=this.model.get("role");this.chatroomview.model.setRole(n,r,i,()=>{this.alert(zd("Role changed"),"primary"),this.model.set({role:null},{silent:!0}),this.model.set({role:o})},e=>{mr()('not-allowed[xmlns="'.concat(qy.NS.STANZAS,'"]'),e).length?this.alert(zd("You're not allowed to make that change"),"danger"):(this.alert(zd("Sorry, something went wrong while trying to set the role"),"danger"),Hy.isErrorObject(e)&&zn.error(e))})}});function Wy(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n        <div class="modal-dialog" role="document">\n            <div class="modal-content">\n                <div class="modal-header">\n                    <h5 class="modal-title" id="user-details-modal-label">',"</h5>\n                    ",'\n                </div>\n                <div class="modal-body">\n                    ','\n                </div>\n                <div class="modal-footer">\n                    ',"\n                </div>\n            </div>\n        </div>\n    "]);return Wy=function(){return e},e}const Gy=df.extend({initialize(){df.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),Vc.trigger("occupantModalInitialized",this.model)},toHTML(){return e=Object.assign(this.model.toJSON(),{avatar_data:this.getAvatarData(),display_name:this.model.getDisplayName()}),Za(Wy(),e.display_name,mf,op(e.avatar_data),gf);var e},getAvatarData(){const e=Uc.vcards.findWhere({jid:this.model.get("jid")});return{classes:"chat-msg__avatar",height:120,width:120,image:"data:"+((null==e?void 0:e.get("image_type"))||Uc.DEFAULT_IMAGE_TYPE)+";base64,"+((null==e?void 0:e.get("image"))||Uc.DEFAULT_IMAGE)}}});Uc.OccupantModal=Gy;var Vy=Gy;function Jy(){const e=lw(['<li class="feature" ><span class="fa fa-database"></span>'," - <em>","</em></li>"]);return Jy=function(){return e},e}function Xy(){const e=lw(['<li class="feature" ><span class="fa fa-info-circle"></span>'," - <em>","</em></li>"]);return Xy=function(){return e},e}function Qy(){const e=lw(['<li class="feature" ><span class="fa fa-gavel"></span>'," - <em>","</em></li>"]);return Qy=function(){return e},e}function Yy(){const e=lw(['<li class="feature" ><span class="fa fa-user-secret"></span>'," - <em>","</em></li>"]);return Yy=function(){return e},e}function Ky(){const e=lw(['<li class="feature" ><span class="fa fa-id-card"></span>'," - <em>","</em></li>"]);return Ky=function(){return e},e}function Zy(){const e=lw(['<li class="feature" ><span class="fa fa-snowflake-o"></span>'," - <em>","</em></li>"]);return Zy=function(){return e},e}function ew(){const e=lw(['<li class="feature" ><span class="fa fa-save"></span>'," - <em>","</em></li>"]);return ew=function(){return e},e}function tw(){const e=lw(['<li class="feature" ><span class="fa fa-globe"></span>'," - <em>","</em></li>"]);return tw=function(){return e},e}function nw(){const e=lw(['<li class="feature" ><span class="fa fa-address-book"></span>'," - <em>","</em></li>"]);return nw=function(){return e},e}function rw(){const e=lw(['<li class="feature" ><span class="fa fa-eye"></span>'," - <em>","</em></li>"]);return rw=function(){return e},e}function iw(){const e=lw(['<li class="feature" ><span class="fa fa-eye-slash"></span>'," - <em>","</em></li>"]);return iw=function(){return e},e}function ow(){const e=lw(['<li class="feature" ><span class="fa fa-unlock"></span>'," - <em>","</em></li>"]);return ow=function(){return e},e}function sw(){const e=lw(['<li class="feature" ><span class="fa fa-lock"></span>'," - <em>","</em></li>"]);return sw=function(){return e},e}function aw(){const e=lw(['\n        <div class="modal-dialog" role="document">\n            <div class="modal-content">\n                <div class="modal-header">\n                    <h5 class="modal-title" id="muc-details-modal-label">',"</h5>\n                    ",'\n                </div>\n                <div class="modal-body">\n                    <span class="modal-alert"></span>\n                    <div class="room-info">\n                        <p class="room-info"><strong>',"</strong>: ",'</p>\n                        <p class="room-info"><strong>',"</strong>: ",'</p>\n                        <p class="room-info"><strong>',"</strong>: ","</p>\n                        ",'\n                        <p class="room-info"><strong>',"</strong>: ",'</p>\n                        <p class="room-info"><strong>','</strong>:\n                            <div class="chatroom-features">\n                            <ul class="features-list">\n                                ',"\n                                ","\n                                ","\n                                ","\n                                ","\n                                ","\n                                ","\n                                ","\n                                ","\n                                ","\n                                ","\n                                ","\n                                ",'\n                            </ul>\n                            </div>\n                        </p>\n                    </div>\n                </div>\n                <div class="modal-footer">',"</div>\n            </div>\n        </div>\n    "]);return aw=function(){return e},e}function cw(){const e=lw(['\n        <p class="room-info"><strong>',"</strong>: ",'</p>\n            <p class="room-info"><strong>',"</strong>: ","</p>\n    "]);return cw=function(){return e},e}function lw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var uw=e=>{const t=zd("Groupchat address (JID)"),n=zd("Message archiving"),r=zd("Messages are archived on the server"),i=zd("Description"),o=zd("Features"),s=zd("Hidden"),a=zd("This groupchat is not publicly searchable"),c=zd("This groupchat is restricted to members only"),l=zd("Members only"),u=zd("Moderated"),d=zd("Participants entering this groupchat need to request permission to write"),h=zd("Name"),f=zd("This groupchat does not require a password upon entry"),p=zd("No password required"),g=zd("Not anonymous"),m=zd("All other groupchat participants can see your XMPP address"),v=zd("Not moderated"),_=zd("Participants entering this groupchat can write right away"),b=zd("Online users"),y=zd("Open"),w=zd("Anyone can join this groupchat"),S=zd("This groupchat requires a password before entry"),x=zd("Password protected"),E=zd("Persistent"),A=zd("This groupchat persists even if it's unoccupied"),C=zd("Public"),j=zd("Semi-anonymous"),T=zd("Only moderators can see your XMPP address"),O=zd("Temporary"),k=zd("This groupchat will disappear once the last person leaves");return Za(aw(),e.display_name,mf,h,e.name,t,e.jid,i,e.config.description,e.subject?(e=>{const t=zd("Topic"),n=zd("Topic author");return Za(cw(),t,Kp(Qp.a.filterXSS(e.subject.text,{whiteList:{}})),n,e.subject&&e.subject.author)})(e):"",b,e.num_occupants,o,e.features.passwordprotected?Za(sw(),x,S):"",e.features.unsecured?Za(ow(),p,f):"",e.features.hidden?Za(iw(),s,a):"",e.features.public_room?Za(rw(),C,e.__("This groupchat is publicly searchable")):"",e.features.membersonly?Za(nw(),l,c):"",e.features.open?Za(tw(),y,w):"",e.features.persistent?Za(ew(),E,A):"",e.features.temporary?Za(Zy(),O,k):"",e.features.nonanonymous?Za(Ky(),g,m):"",e.features.semianonymous?Za(Yy(),j,T):"",e.features.moderated?Za(Qy(),u,d):"",e.features.unmoderated?Za(Xy(),v,_):"",e.features.mam_enabled?Za(Jy(),n,r):"",gf)},dw=df.extend({id:"muc-details-modal",initialize(){df.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render),this.listenTo(this.model.features,"change",this.render),this.listenTo(this.model.occupants,"add",this.render),this.listenTo(this.model.occupants,"change",this.render)},toHTML(){return uw(Object.assign(this.model.toJSON(),{config:this.model.config.toJSON(),display_name:zd("Groupchat info for %1$s",this.model.getDisplayName()),features:this.model.features.toJSON(),num_occupants:this.model.occupants.length}))}});function hw(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="flyout box-flyout">\n        <div class="chat-head chat-head-chatroom row no-gutters"></div>\n        <div class="chat-body chatroom-body row no-gutters">\n            <div class="chat-area col">\n                <div class="chat-content ','" aria-live="polite">\n                    <div class="chat-content__messages" @scroll=','></div>\n                    <div class="chat-content__help"></div>\n                </div>\n                <div class="bottom-panel"></div>\n            </div>\n            <div class="disconnect-container hidden"></div>\n            <converse-muc-sidebar class="occupants col-md-3 col-4 ','"\n                .occupants=',"\n                .chatroom=","></converse-muc-sidebar>\n        </div>\n    </div>\n"]);return hw=function(){return e},e}function fw(){const e=_w(['<p class="chat-head__desc" title="','">',"</p>"]);return fw=function(){return e},e}function pw(){const e=_w(["<converse-dropdown .items=","></converse-dropdown>"]);return pw=function(){return e},e}function gw(){const e=_w(['<i class="fa fa-bookmark chatbox-title__text--bookmarked" title="','"></i>']);return gw=function(){return e},e}function mw(){const e=_w(['<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>']);return mw=function(){return e},e}function vw(){const e=_w(['\n        <div class="chatbox-title ','">\n            ','\n            <div class="chatbox-title__text" title="','">',"\n                ",'\n            </div>\n            <div class="chatbox-title__buttons row no-gutters">\n                ',"\n                ","\n            </div>\n        </div>\n        ","\n    "]);return vw=function(){return e},e}function _w(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const bw=rl.env.utils;var yw=e=>{const t=zd("Hide the groupchat topic"),n=zd("This groupchat is bookmarked"),r=e.subject?bw.addHyperlinks(e.subject.text):"",i=r&&!e.subject_hidden;return Za(vw(),i?"":"chatbox-title--no-desc",e._converse.api.settings.get("singleton")?"":Za(mw()),"hidden"!==e._converse.locked_muc_domain?e.jid:"",e.title,e.bookmarked?Za(gw(),n):"",e.standalone_btns.length?(e=>e.standalone_btns.reverse().map(e=>Qh(e,"")))(e):"",e.dropdown_btns.length?Za(pw(),e.dropdown_btns):"",i?Za(fw(),t,r):"")};function ww(){const e=Ew(['<div class="muc-bottom-panel"></div>']);return ww=function(){return e},e}function Sw(){const e=Ew(['<div class="muc-bottom-panel">',"</div>"]);return Sw=function(){return e},e}function xw(){const e=Ew(['\n    <div class="emoji-picker__container dropup"></div>\n    <div class="message-form-container">']);return xw=function(){return e},e}function Ew(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Aw=e=>{const t=zd("You're not allowed to send messages in this room");return e.entered?e.can_edit?Za(xw()):Za(Sw(),t):Za(ww())};function Cw(){const e=Ow(['<p class="destroyed-reason">"','"</p>']);return Cw=function(){return e},e}function jw(){const e=Ow(['\n        <div class="alert alert-danger">\n            <h3 class="alert-heading disconnect-msg">',"</h3>\n            ","\n            ","\n        </div>"]);return jw=function(){return e},e}function Tw(){const e=Ow(['\n        <p class="moved-label">','</p>\n        <p class="moved-link"><a class="switch-chat" href="#">',"</a></p>"]);return Tw=function(){return e},e}function Ow(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var kw=(e,t)=>{const n=zd("This groupchat no longer exists");return Za(jw(),n,t?Za(Cw(),t):"",e?(e=>{const t=zd("The conversation has moved. Click below to enter.");return Za(Tw(),t,e)})(e):"")};function Nw(){const e=Mw(['<p class="disconnect-msg">',"</p>"]);return Nw=function(){return e},e}function Iw(){const e=Mw(['\n        <div class="alert alert-danger">\n            <h3 class="alert-heading disconnect-msg">',"</h3>\n            ","\n        </div>"]);return Iw=function(){return e},e}function Mw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function Rw(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n        <div class="chatroom-form-container muc-nickname-form">\n            <form class="converse-form chatroom-form converse-centered-form">\n                <fieldset class="form-group">\n                    <label>','</label>\n                    <p class="validation-message">','</p>\n                    <input type="text"\n                        required="required"\n                        name="nick"\n                        value="','"\n                        class="form-control ','"\n                        placeholder="','"/>\n                </fieldset>\n                <fieldset class="form-group">\n                    <input type="submit" class="btn btn-primary" name="join" value="','"/>\n                </fieldset>\n            </form>\n        </div>']);return Rw=function(){return e},e}const{Strophe:Dw,sizzle:Pw,$pres:Lw}=rl.env,zw=rl.env.utils,Fw=["owner"],Bw=["admin","ban","deop","destroy","member","op","revoke"],qw=["kick","mute","voice","modtools"],Hw=["nick"],Uw={deop:"participant",kick:"none",mute:"visitor",op:"moderator",voice:"participant"},$w={admin:"admin",ban:"outcast",member:"member",owner:"owner",revoke:"none"};var Ww={length:300,tagName:"div",className:"chatbox chatroom hidden",is_chatroom:!0,events:{"click .chatbox-navback":"showControlBox","click .hide-occupants":"hideOccupants","click .new-msgs-indicator":"viewUnreadMessages","click .occupant-nick":function(e){this.insertIntoTextArea(e.target.textContent)},"click .send-button":"onFormSubmitted","dragover .chat-textarea":"onDragOver","drop .chat-textarea":"onDrop","input .chat-textarea":"inputChanged","keydown .chat-textarea":"onKeyDown","keyup .chat-textarea":"onKeyUp","mousedown .dragresize-occupants-left":"onStartResizeOccupants","paste .chat-textarea":"onPaste","submit .muc-nickname-form":"submitNickname"},async initialize(){this.initDebounced(),this.listenTo(this.model,"change",Rc(()=>this.renderHeading(),250)),this.listenTo(this.model,"change:composing_spoiler",this.renderMessageForm),this.listenTo(this.model,"change:hidden",e=>e.get("hidden")?this.hide():this.show()),this.listenTo(this.model,"change:hidden_occupants",this.onSidebarToggle),this.listenTo(this.model,"configurationNeeded",this.getAndRenderConfigurationForm),this.listenTo(this.model,"destroy",this.hide),this.listenTo(this.model,"show",this.show),this.listenTo(this.model.features,"change:moderated",this.renderBottomPanel),this.listenTo(this.model.features,"change:open",this.renderHeading),this.listenTo(this.model.messages,"rendered",this.maybeScrollDown),this.listenTo(this.model.session,"change:connection_status",this.onConnectionStatusChanged),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),await this.render(),this.listenTo(this.model,"change:show_help_messages",this.renderHelpMessages),this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model.messages,"change",this.renderChatHistory),this.listenTo(this.model.messages,"remove",this.renderChatHistory),this.listenTo(this.model.messages,"reset",this.renderChatHistory),this.listenTo(this.model.notifications,"change",this.renderNotifications),this.model.occupants.forEach(e=>this.onOccupantAdded(e)),this.listenTo(this.model.occupants,"add",this.onOccupantAdded),this.listenTo(this.model.occupants,"change",this.renderChatHistory),this.listenTo(this.model.occupants,"change:affiliation",this.onOccupantAffiliationChanged),this.listenTo(this.model.occupants,"change:role",this.onOccupantRoleChanged),this.listenTo(this.model.occupants,"change:show",this.showJoinOrLeaveNotification),this.listenTo(this.model.occupants,"remove",this.onOccupantRemoved),this.renderChatContent(),this.insertIntoDOM();const e=await Uc.api.user.settings.getModel();this.listenTo(e,"change:mucs_with_hidden_subject",this.renderHeading),this.onConnectionStatusChanged(),this.model.maybeShow(),this.scrollDown(),Vc.trigger("chatRoomViewInitialized",this)},async render(){const e=!this.shouldShowSidebar();var t;this.el.setAttribute("id",this.model.get("box_id")),Ya((t={sidebar_hidden:e,model:this.model,occupants:this.model.occupants,show_sidebar:!this.model.get("hidden_occupants")&&this.model.session.get("connection_status")===rl.ROOMSTATUS.ENTERED,markScrolled:e=>this.markScrolled(e),muc_show_logs_before_join:Vc.settings.get("muc_show_logs_before_join"),show_send_button:Uc.show_send_button},Za(hw(),t.show_send_button?"chat-content-sendbutton":"",t.markScrolled,t.sidebar_hidden?"hidden":"",t.occupants,t.model)),this.el),this.notifications=this.el.querySelector(".chat-content__notifications"),this.content=this.el.querySelector(".chat-content"),this.msgs_container=this.el.querySelector(".chat-content__messages"),this.help_container=this.el.querySelector(".chat-content__help"),this.renderBottomPanel(),Vc.settings.get("muc_show_logs_before_join")||this.model.session.get("connection_status")===rl.ROOMSTATUS.ENTERED||this.showSpinner(),await this.renderHeading(),!this.model.get("hidden")&&this.show()},getNotifications(){const e=this.model.notifications.toJSON(),t=Vc.settings.get("muc_show_info_messages").filter(e=>rl.MUC_ROLE_CHANGES_LIST.includes(e)),n=Vc.settings.get("muc_show_info_messages").filter(e=>rl.MUC_TRAFFIC_STATES_LIST.includes(e));return[...rl.CHAT_STATES,...n,...t].reduce((t,n)=>{const r=e[n];if(!(null==r?void 0:r.length))return t;const i=r.map(e=>{var t;return(null===(t=this.model.getOccupant(e))||void 0===t?void 0:t.getDisplayName())||e});if(1===i.length){if("composing"===n)return"".concat(t).concat(zd("%1$s is typing",i[0]),"\n");if("paused"===n)return"".concat(t).concat(zd("%1$s has stopped typing",i[0]),"\n");if(n===Uc.GONE)return"".concat(t).concat(zd("%1$s has gone away",i[0]),"\n");if("entered"===n)return"".concat(t).concat(zd("%1$s has entered the groupchat",i[0]),"\n");if("exited"===n)return"".concat(t).concat(zd("%1$s has left the groupchat",i[0]),"\n");if("op"===n)return"".concat(t).concat(zd("%1$s is now a moderator",i[0]),"\n");if("deop"===n)return"".concat(t).concat(zd("%1$s is no longer a moderator",i[0]),"\n");if("voice"===n)return"".concat(t).concat(zd("%1$s has been given a voice",i[0]),"\n");if("mute"===n)return"".concat(t).concat(zd("%1$s has been muted",i[0]),"\n")}else if(i.length>1){let e;if(i.length>3)e="".concat(Array.from(i).slice(0,2).join(", ")," and others");else{const t=i.pop();e=zd("%1$s and %2$s",i.join(", "),t)}if("composing"===n)return"".concat(t).concat(zd("%1$s are typing",e),"\n");if("paused"===n)return"".concat(t).concat(zd("%1$s have stopped typing",e),"\n");if(n===Uc.GONE)return"".concat(t).concat(zd("%1$s have gone away",e),"\n");if("entered"===n)return"".concat(t).concat(zd("%1$s have entered the groupchat",e),"\n");if("exited"===n)return"".concat(t).concat(zd("%1$s have left the groupchat",e),"\n");if("op"===n)return"".concat(t).concat(zd("%1$s are now moderators",i[0]),"\n");if("deop"===n)return"".concat(t).concat(zd("%1$s are no longer moderators",i[0]),"\n");if("voice"===n)return"".concat(t).concat(zd("%1$s have been given voices",i[0]),"\n");if("mute"===n)return"".concat(t).concat(zd("%1$s have been muted",i[0]),"\n")}return t},"")},getHelpMessages(){const e=Vc.settings.get("muc_disable_slash_commands"),t=Array.isArray(e)?e:[];return["<strong>/admin</strong>: ".concat(zd("Change user's affiliation to admin")),"<strong>/ban</strong>: ".concat(zd("Ban user by changing their affiliation to outcast")),"<strong>/clear</strong>: ".concat(zd("Clear the chat area")),"<strong>/close</strong>: ".concat(zd("Close this groupchat")),"<strong>/deop</strong>: ".concat(zd("Change user role to participant")),"<strong>/destroy</strong>: ".concat(zd("Remove this groupchat")),"<strong>/help</strong>: ".concat(zd("Show this menu")),"<strong>/kick</strong>: ".concat(zd("Kick user from groupchat")),"<strong>/me</strong>: ".concat(zd("Write in 3rd person")),"<strong>/member</strong>: ".concat(zd("Grant membership to a user")),"<strong>/modtools</strong>: ".concat(zd("Opens up the moderator tools GUI")),"<strong>/mute</strong>: ".concat(zd("Remove user's ability to post messages")),"<strong>/nick</strong>: ".concat(zd("Change your nickname")),"<strong>/op</strong>: ".concat(zd("Grant moderator role to user")),"<strong>/owner</strong>: ".concat(zd("Grant ownership of this groupchat")),"<strong>/register</strong>: ".concat(zd("Register your nickname")),"<strong>/revoke</strong>: ".concat(zd("Revoke the user's current affiliation")),"<strong>/subject</strong>: ".concat(zd("Set groupchat subject")),"<strong>/topic</strong>: ".concat(zd("Set groupchat subject (alias for /subject)")),"<strong>/voice</strong>: ".concat(zd("Allow muted user to post messages"))].filter(e=>t.every(t=>!e.startsWith(t+"<",9))).filter(e=>this.getAllowedCommands().some(t=>e.startsWith(t+"<",9)))},async renderHeading(){const e=await this.generateHeadingTemplate();Ya(e,this.el.querySelector(".chat-head-chatroom"))},renderBottomPanel(){const e=this.el.querySelector(".bottom-panel"),t=this.model.session.get("connection_status")===rl.ROOMSTATUS.ENTERED,n=t&&!(this.model.features.get("moderated")&&"visitor"===this.model.getOwnRole());Ya(Aw({can_edit:n,entered:t}),e),t&&n&&(this.renderMessageForm(),this.initMentionAutoComplete())},onStartResizeOccupants(e){this.resizing=!0,this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseup",this.onMouseUp);const t=this.el.querySelector("converse-muc-sidebar"),n=window.getComputedStyle(t);this.width=parseInt(n.width.replace(/px$/,""),10),this.prev_pageX=e.pageX},onMouseMove(e){if(this.resizing){e.preventDefault();const t=this.prev_pageX-e.pageX;this.resizeSidebarView(t,e.pageX),this.prev_pageX=e.pageX}},onMouseUp(e){if(this.resizing){e.preventDefault(),this.resizing=!1,this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseup",this.onMouseUp);const t=this.el.querySelector("converse-muc-sidebar").getBoundingClientRect(),n={occupants_width:this.calculateSidebarWidth(t,0)};Uc.connection.connected?this.model.save(n):this.model.set(n)}},resizeSidebarView(e,t){const n=this.el.querySelector("converse-muc-sidebar"),r=n.getBoundingClientRect();if(this.is_minimum)this.is_minimum=r.left<t;else if(this.is_maximum)this.is_maximum=r.left>t;else{const t=this.calculateSidebarWidth(r,e);n.style.flex="0 0 "+t+"px"}},calculateSidebarWidth(e,t){let n=e.width+t;const r=this.el.clientWidth;return n<.2*r?(n=.2*r,this.is_minimum=!0):n>.75*r?(n=.75*r,this.is_maximum=!0):r-n<250?(n=r-250,this.is_maximum=!0):(this.is_maximum=!1,this.is_minimum=!1),n},getAutoCompleteList(){return this.model.getAllKnownNicknames().map(e=>({label:e,value:"@".concat(e)}))},getAutoCompleteListItem(e,t){t=t.trim();const n=document.createElement("li");if(n.setAttribute("aria-selected","false"),Vc.settings.get("muc_mention_autocomplete_show_avatar")){const t=document.createElement("img");let r="data:"+Uc.DEFAULT_IMAGE_TYPE+";base64,"+Uc.DEFAULT_IMAGE;if(Uc.vcards){const t=Uc.vcards.findWhere({nickname:e});t&&(r="data:"+t.get("image_type")+";base64,"+t.get("image"))}t.setAttribute("src",r),t.setAttribute("width","22"),t.setAttribute("class","avatar avatar-autocomplete"),n.appendChild(t)}const r=new RegExp("("+t+")","ig");return(t?e.split(r):[e]).forEach(e=>{if(t&&e.match(r)){const t=document.createElement("mark");t.textContent=e,n.appendChild(t)}else n.appendChild(document.createTextNode(e))}),n},initMentionAutoComplete(){this.mention_auto_complete=new Uc.AutoComplete(this.el,{auto_first:!0,auto_evaluate:!1,min_chars:Vc.settings.get("muc_mention_autocomplete_min_chars"),match_current_word:!0,list:()=>this.getAutoCompleteList(),filter:"contains"==Vc.settings.get("muc_mention_autocomplete_filter")?Uc.FILTER_CONTAINS:Uc.FILTER_STARTSWITH,ac_triggers:["Tab","@"],include_triggers:[],item:this.getAutoCompleteListItem}),this.mention_auto_complete.on("suggestion-box-selectcomplete",()=>this.auto_completing=!1)},submitNickname(e){e.preventDefault();const t=e.target.nick.value.trim();t&&this.model.join(t)},onKeyDown(e){if(!this.mention_auto_complete.onKeyDown(e))return Uc.ChatBoxView.prototype.onKeyDown.call(this,e)},onKeyUp(e){return this.mention_auto_complete.evaluate(e),Uc.ChatBoxView.prototype.onKeyUp.call(this,e)},async onMessageRetractButtonClicked(e){const t=zd("Be aware that other XMPP/Jabber clients (and servers) may not yet support retractions and that this message may not be removed everywhere.");if(e.mayBeRetracted()){const n=[zd("Are you sure you want to retract this message?")];Vc.settings.get("show_retraction_warning")&&(n[1]=t),await Vc.confirm(zd("Confirm"),n)&&this.model.retractOwnMessage(e)}else if(await e.mayBeModerated())if("me"===e.get("sender")){let n=[zd("Are you sure you want to retract this message?")];Vc.settings.get("show_retraction_warning")&&(n=[n[0],t,n[1]]),await Vc.confirm(zd("Confirm"),n)&&this.retractOtherMessage(e)}else{let n=[zd("You are about to retract this message."),zd("You may optionally include a message, explaining the reason for the retraction.")];Vc.settings.get("show_retraction_warning")&&(n=[n[0],t,n[1]]);const r=await Vc.prompt(zd("Message Retraction"),n,zd("Optional reason"));!1!==r&&this.retractOtherMessage(e,r)}else{const e=zd("Sorry, you're not allowed to retract this message");Vc.alert("error",zd("Error"),e)}},async retractOtherMessage(e,t){const n=await this.model.retractOtherMessage(e,t);if(null===n){const e=zd("A timeout occurred while trying to retract the message");Vc.alert("error",zd("Error"),e),zn(e,Dw.LogLevel.WARN)}else if(zw.isErrorStanza(n)){const e=zd("Sorry, you're not allowed to retract this message.");Vc.alert("error",zd("Error"),e),zn(e,Dw.LogLevel.WARN),zn(n,Dw.LogLevel.WARN)}},showModeratorToolsModal(e){if(!this.verifyRoles(["moderator"]))return;let t=Vc.modal.get($y.id);if(t)t.model.set("affiliation",e);else{const n=new qo({affiliation:e});t=Vc.modal.create($y,{model:n,_converse:Uc,chatroomview:this})}t.show()},showRoomDetailsModal(e){e.preventDefault(),Vc.modal.show(dw,{model:this.model},e)},showOccupantDetailsModal(e,t){e.preventDefault(),Vc.modal.show(Vy,{model:t.occupant},e)},showChatStateNotification(e){if("me"!==e.get("sender"))return Uc.ChatBoxView.prototype.showChatStateNotification.apply(this,arguments)},shouldShowSidebar(){return!this.model.get("hidden_occupants")&&this.model.session.get("connection_status")===rl.ROOMSTATUS.ENTERED},onSidebarToggle(){var e;this.renderToolbar(),null===(e=this.el.querySelector(".occupants"))||void 0===e||e.setVisibility()},onOccupantAffiliationChanged(e){e.get("jid")===Uc.bare_jid&&this.renderHeading()},onOccupantRoleChanged(e){e.get("jid")===Uc.bare_jid&&this.renderBottomPanel()},getHeadingButtons(e){const t=[];t.push({i18n_text:zd("Details"),i18n_title:zd("Show more information about this groupchat"),handler:e=>this.showRoomDetailsModal(e),a_class:"show-muc-details-modal",icon_class:"fa-info-circle",name:"details"}),"owner"===this.model.getOwnAffiliation()&&t.push({i18n_text:zd("Configure"),i18n_title:zd("Configure this groupchat"),handler:e=>this.getAndRenderConfigurationForm(e),a_class:"configure-chatroom-button",icon_class:"fa-wrench",name:"configure"}),this.model.invitesAllowed()&&t.push({i18n_text:zd("Invite"),i18n_title:zd("Invite someone to join this groupchat"),handler:e=>this.showInviteModal(e),a_class:"open-invite-modal",icon_class:"fa-user-plus",name:"invite"});const n=this.model.get("subject");if(n&&n.text&&t.push({i18n_text:zd(e?"Show topic":"Hide topic"),i18n_title:zd(e?"Show the topic message in the heading":"Hide the topic in the heading"),handler:e=>this.toggleTopic(e),a_class:"hide-topic",icon_class:"fa-minus-square",name:"toggle-topic"}),this.model.session.get("connection_status")===rl.ROOMSTATUS.ENTERED){const e=this.getAllowedCommands();e.includes("modtools")&&t.push({i18n_text:zd("Moderate"),i18n_title:zd("Moderate this groupchat"),handler:()=>this.showModeratorToolsModal(),a_class:"moderate-chatroom-button",icon_class:"fa-user-cog",name:"moderate"}),e.includes("destroy")&&t.push({i18n_text:zd("Destroy"),i18n_title:zd("Remove this groupchat"),handler:e=>this.destroy(e),a_class:"destroy-chatroom-button",icon_class:"fa-trash",name:"destroy"})}return Vc.settings.get("singleton")||t.push({i18n_text:zd("Leave"),i18n_title:zd("Leave and close this groupchat"),handler:async e=>{e.stopPropagation();const t=[zd("Are you sure you want to leave this groupchat?")];await Vc.confirm(zd("Confirm"),t)&&this.close(e)},a_class:"close-chatbox-button",standalone:"overlayed"===Vc.settings.get("view_mode"),icon_class:"fa-sign-out-alt",name:"signout"}),Uc.api.hook("getHeadingButtons",this,t)},async generateHeadingTemplate(){const e=await this.model.isSubjectHidden(),t=await this.getHeadingButtons(e),n=t.filter(e=>e.standalone),r=t.filter(e=>!e.standalone);return yw(Object.assign(this.model.toJSON(),{_converse:Uc,subject_hidden:e,dropdown_btns:r.map(e=>this.getHeadingDropdownItem(e)),standalone_btns:n.map(e=>this.getHeadingStandaloneButton(e)),title:this.model.getDisplayName()}))},toggleTopic(){this.model.toggleSubjectHiddenState()},showInviteModal(e){e.preventDefault(),Vc.modal.show(fy,{model:new qo,chatroomview:this},e)},afterShown(){zw.isPersistableModel(this.model)&&this.model.clearUnreadMsgCounter(),this.scrollDown()},onConnectionStatusChanged(){const e=this.model.session.get("connection_status");e===rl.ROOMSTATUS.NICKNAME_REQUIRED?this.renderNicknameForm():e===rl.ROOMSTATUS.PASSWORD_REQUIRED?this.renderPasswordForm():e===rl.ROOMSTATUS.CONNECTING?this.showSpinner():e===rl.ROOMSTATUS.ENTERED?(this.renderBottomPanel(),this.hideSpinner(),this.maybeFocus()):e===rl.ROOMSTATUS.DISCONNECTED?this.showDisconnectMessage():e===rl.ROOMSTATUS.DESTROYED&&this.showDestroyedMessage()},getToolbarOptions(){return Object.assign(Uc.ChatBoxView.prototype.getToolbarOptions.apply(this,arguments),{is_groupchat:!0,label_hide_occupants:zd("Hide the list of participants"),show_occupants_toggle:Uc.visible_toolbar_buttons.toggle_occupants})},async close(){return this.hide(),Uc.router.history.getFragment()==="converse/room?jid="+this.model.get("jid")&&Uc.router.navigate(""),await this.model.leave(),Uc.ChatBoxView.prototype.close.apply(this,arguments)},hideOccupants(e){e&&(e.preventDefault(),e.stopPropagation()),this.model.save({hidden_occupants:!0}),this.scrollDown()},verifyRoles(e,t,n=!0){if(!Array.isArray(e))throw new TypeError("roles must be an Array");if(!e.length)return!0;if(t=t||this.model.occupants.findWhere({jid:Uc.bare_jid})){const n=t.get("role");if(e.includes(n))return!0}if(n){const e=zd("Forbidden: you do not have the necessary role in order to do that.");this.model.createMessage({message:e,type:"error"})}return!1},verifyAffiliations(e,t,n=!0){if(!Array.isArray(e))throw new TypeError("affiliations must be an Array");if(!e.length)return!0;if(t=t||this.model.occupants.findWhere({jid:Uc.bare_jid})){const n=t.get("affiliation");if(e.includes(n))return!0}if(n){const e=zd("Forbidden: you do not have the necessary affiliation in order to do that.");this.model.createMessage({message:e,type:"error"})}return!1},validateRoleOrAffiliationChangeArgs(e,t){if(!t){const t=zd('Error: the "%1$s" command takes two arguments, the user\'s nickname and optionally a reason.',e);return this.model.createMessage({message:t,type:"error"}),!1}return!0},getNickOrJIDFromCommandArgs(e){if(zw.isValidJID(e.trim()))return e.trim();e.startsWith("@")||(e="@"+e);const[t,n]=this.model.parseTextForReferences(e);if(!n.length){const e=zd("Error: couldn't find a groupchat participant based on your arguments");return void this.model.createMessage({message:e,type:"error"})}if(n.length>1){const e=zd("Error: found multiple groupchat participant based on your arguments");return void this.model.createMessage({message:e,type:"error"})}const r=n.pop().value,i=e.split(r,2)[1];if(!i||i.startsWith(" "))return r;{const e=zd("Error: couldn't find a groupchat participant based on your arguments");this.model.createMessage({message:e,type:"error"})}},setAffiliation(e,t,n){const r=$w[e];if(!r)throw Error("ChatRoomView#setAffiliation called with invalid command: ".concat(e));if(!this.verifyAffiliations(n))return!1;if(!this.validateRoleOrAffiliationChangeArgs(e,t))return!1;const i=this.getNickOrJIDFromCommandArgs(t);if(!i)return!1;let o;const s=t.split(i,2)[1].trim(),a=this.model.getOccupant(i);if(a)o=a.get("jid");else{if(!zw.isValidJID(i)){const e=zd("Couldn't find a participant with that nickname. They might have left the groupchat.");return void this.model.createMessage({message:e,type:"error"})}o=i}const c={jid:o,reason:s};a&&Vc.settings.get("auto_register_muc_nickname")&&(c.nick=a.get("nick")),this.model.setAffiliation(r,[c]).then(()=>this.model.occupants.fetchMembers()).catch(e=>this.onCommandError(e))},getReason:e=>e.includes(",")?e.slice(e.indexOf(",")+1).trim():null,setRole(e,t,n=[],r=[]){const i=Uw[e];if(!i)throw Error("ChatRoomView#setRole called with invalid command: ".concat(e));if(!this.verifyAffiliations(n)||!this.verifyRoles(r))return!1;if(!this.validateRoleOrAffiliationChangeArgs(e,t))return!1;const o=this.getNickOrJIDFromCommandArgs(t);if(!o)return!1;const s=t.split(o,2)[1].trim(),a=this.model.getOccupant(o);return this.model.setRole(a,i,s,void 0,this.onCommandError.bind(this)),!0},onCommandError(e){zn.fatal(e);const t=zd("Sorry, an error happened while running the command.")+" "+zd("Check your browser's developer console for details.");this.model.createMessage({message:t,type:"error"})},getAllowedCommands(){let e=["clear","help","me","nick","register"];(this.model.config.get("changesubject")||["owner","admin"].includes(this.model.getOwnAffiliation()))&&(e=[...e,"subject","topic"]);const t=this.model.occupants.findWhere({jid:Uc.bare_jid});return this.verifyAffiliations(["owner"],t,!1)?e=e.concat(Fw).concat(Bw):this.verifyAffiliations(["admin"],t,!1)&&(e=e.concat(Bw)),this.verifyRoles(["moderator"],t,!1)?e=e.concat(qw).concat(Hw):this.verifyRoles(["visitor","participant","moderator"],t,!1)||(e=e.concat(Hw)),e.sort(),Array.isArray(Vc.settings.get("muc_disable_slash_commands"))?e.filter(e=>!Vc.settings.get("muc_disable_slash_commands").includes(e)):e},async destroy(){const e=[zd("Are you sure you want to destroy this groupchat?")];let t=[{name:"challenge",label:zd("Please enter the XMPP address of this groupchat to confirm"),challenge:this.model.get("jid"),placeholder:zd("name@example.org"),required:!0},{name:"reason",label:zd("Optional reason for destroying this groupchat"),placeholder:zd("Reason")},{name:"newjid",label:zd("Optional XMPP address for a new groupchat that replaces this one"),placeholder:zd("replacement@example.org")}];try{var n,r;t=await Vc.confirm(zd("Confirm"),e,t);const i=null===(n=t.filter(e=>"reason"===e.name).pop())||void 0===n?void 0:n.value,o=null===(r=t.filter(e=>"newjid"===e.name).pop())||void 0===r?void 0:r.value;return this.model.sendDestroyIQ(i,o).then(()=>this.close())}catch(e){zn.error(e)}},parseMessageForCommands(e){if(Vc.settings.get("muc_disable_slash_commands")&&!Array.isArray(Vc.settings.get("muc_disable_slash_commands")))return Uc.ChatBoxView.prototype.parseMessageForCommands.apply(this,arguments);const t=((e=e.replace(/^\s*/,"")).match(/^\/([a-zA-Z]*) ?/)||[""]).pop().toLowerCase();if(!t)return!1;const n=e.slice(("/"+t).length+1).trim();if(!this.getAllowedCommands().includes(t))return!1;switch(t){case"admin":this.setAffiliation(t,n,["owner"]);break;case"ban":this.setAffiliation(t,n,["admin","owner"]);break;case"modtools":this.showModeratorToolsModal(n);break;case"deop":this.setRole(t,n,["admin","owner"]);break;case"destroy":if(!this.verifyAffiliations(["owner"]))break;this.destroy().catch(e=>this.onCommandError(e));break;case"help":this.model.set({show_help_messages:!0});break;case"kick":case"mute":this.setRole(t,n,[],["moderator"]);break;case"member":this.setAffiliation(t,n,["admin","owner"]);break;case"nick":if(!this.verifyRoles(["visitor","participant","moderator"]))break;if(0===n.length){const e=zd('Your nickname is "%1$s"',this.model.get("nick"));this.model.createMessage({message:e,type:"error"})}else{const e=Dw.getBareJidFromJid(this.model.get("jid"));Vc.send(Lw({from:Uc.connection.jid,to:"".concat(e,"/").concat(n),id:zw.getUniqueId()}).tree())}break;case"owner":this.setAffiliation(t,n,["owner"]);break;case"op":this.setRole(t,n,["admin","owner"]);break;case"register":n.length>1?this.model.createMessage({message:zd("Error: invalid number of arguments"),type:"error"}):this.model.registerNickname().then(e=>{e&&this.model.createMessage({message:e,type:"error"})});break;case"revoke":this.setAffiliation(t,n,["admin","owner"]);break;case"topic":case"subject":this.model.setSubject(n);break;case"voice":this.setRole(t,n,[],["moderator"]);break;default:return Uc.ChatBoxView.prototype.parseMessageForCommands.apply(this,arguments)}return!0},renderConfigurationForm(e){if(this.hideChatRoomContents(),this.model.save("config_stanza",e.outerHTML),!this.config_form){this.config_form=new Uc.MUCConfigForm({model:this.model,chatroomview:this}),this.el.querySelector(".chatroom-body").insertAdjacentElement("beforeend",this.config_form.el)}zw.showElement(this.config_form.el)},renderNicknameForm(){const e=(e=>{const t=zd("Nickname"),n=zd("Enter groupchat"),r=Vc.settings.get("muc_show_logs_before_join")?zd("Choose a nickname to enter"):zd("Please choose your nickname");return Za(Rw(),r,e.nickname_validation_message,e.nick||"",e.nickname_validation_message?"error":"",t,n)})(this.model.toJSON());if(Vc.settings.get("muc_show_logs_before_join")){const t=this.el.querySelector(".muc-bottom-panel");Ya(e,t),zw.addClass("muc-bottom-panel--nickname",t)}else{const t=this.el.querySelector(".muc-nickname-form"),n=zw.getElementFromTemplateResult(e);if(t)Pw(".spinner",this.el).forEach(zw.removeElement),t.outerHTML=n.outerHTML;else{this.hideChatRoomContents(),this.el.querySelector(".chatroom-body").insertAdjacentElement("beforeend",n)}}zw.safeSave(this.model.session,{connection_status:rl.ROOMSTATUS.NICKNAME_REQUIRED})},closeForm(){Pw(".chatroom-form-container",this.el).forEach(e=>zw.addClass("hidden",e)),this.renderAfterTransition()},getAndRenderConfigurationForm(){this.config_form&&zw.isVisible(this.config_form.el)?this.closeForm():(this.showSpinner(),this.model.fetchRoomConfiguration().then(e=>this.renderConfigurationForm(e)).catch(e=>zn.error(e)))},hideChatRoomContents(){const e=this.el.querySelector(".chatroom-body");null!==e&&[].forEach.call(e.children,e=>e.classList.add("hidden"))},renderPasswordForm(){this.hideChatRoomContents();const e=this.model.get("password_validation_message");if(this.model.save("password_validation_message",void 0),this.password_form)this.password_form.model.set("validation_message",e);else{this.password_form=new Uc.MUCPasswordForm({model:new qo({validation_message:e}),chatroomview:this}),this.el.querySelector(".chatroom-body").insertAdjacentElement("beforeend",this.password_form.el)}zw.showElement(this.password_form.el),this.model.session.save("connection_status",rl.ROOMSTATUS.PASSWORD_REQUIRED)},showDestroyedMessage(){zw.hideElement(this.el.querySelector(".chat-area")),zw.hideElement(this.el.querySelector(".occupants")),Pw(".spinner",this.el).forEach(zw.removeElement);const e=this.model.get("destroyed_reason"),t=this.model.get("moved_jid");this.model.save({destroyed_reason:void 0,moved_jid:void 0});const n=this.el.querySelector(".disconnect-container");Ya(kw(t,e),n);const r=n.querySelector("a.switch-chat");r&&r.addEventListener("click",async e=>{e.preventDefault(),(await Vc.rooms.get(t,null,!0)).maybeShow(!0),this.model.destroy()}),zw.showElement(n)},showDisconnectMessage(){const e=this.model.get("disconnection_message");if(!e)return;zw.hideElement(this.el.querySelector(".chat-area")),zw.hideElement(this.el.querySelector(".occupants")),Pw(".spinner",this.el).forEach(zw.removeElement);const t=[e],n=this.model.get("disconnection_actor");n&&t.push(zd("This action was done by %1$s.",n));const r=this.model.get("disconnection_reason");r&&t.push(zd('The reason given is: "%1$s".',r)),this.model.save({disconnection_message:void 0,disconnection_reason:void 0,disconnection_actor:void 0});const i=this.el.querySelector(".disconnect-container");Ya((e=>Za(Iw(),e[0],e.slice(1).map(e=>Za(Nw(),e))))(t),i),zw.showElement(i)},onOccupantAdded(e){e.get("jid")===Uc.bare_jid&&(this.renderHeading(),this.renderBottomPanel())},getPreviousJoinOrLeaveNotification(e,t){const n=(new Date).toISOString().split("T")[0];for(;null!==e;){var r;if(!e.classList.contains("chat-info"))return;const i=e.getAttribute("data-isodate");if(i&&i.split("T")[0]!==n)return;const o=(null===(r=e)||void 0===r?void 0:r.dataset)||{};if(o.join===t||o.leave===t||o.leavejoin===t||o.joinleave===t)return e;e=e.previousElementSibling}},renderAfterTransition(){const e=this.model.session.get("connection_status");if(e==rl.ROOMSTATUS.NICKNAME_REQUIRED)this.renderNicknameForm();else if(e==rl.ROOMSTATUS.PASSWORD_REQUIRED)this.renderPasswordForm();else if(e==rl.ROOMSTATUS.ENTERED){var t;this.hideChatRoomContents(),zw.showElement(this.el.querySelector(".chat-area")),null===(t=this.el.querySelector(".occupants"))||void 0===t||t.setVisibility(),this.scrollDown()}},showSpinner(){Pw(".spinner",this.el).forEach(zw.removeElement),this.hideChatRoomContents(),this.el.querySelector(".chatroom-body").insertAdjacentElement("afterbegin",zw.getElementFromTemplateResult(fp()))},hideSpinner(){const e=this.el.querySelector(".spinner");return null!==e&&(zw.removeElement(e),this.renderAfterTransition()),this}},Gw={roomviews:{get(e){if(Array.isArray(e)){return Vc.chatviews.get(e).filter(e=>e.model.get("type")===Uc.CHATROOMS_TYPE)}{const t=Vc.chatviews.get(e);return t.model.get("type")===Uc.CHATROOMS_TYPE?t:null}},close(e){let t;return void 0===e?t=Uc.chatboxviews:"string"==typeof e?t=[Uc.chatboxviews.get(e)].filter(e=>e):Array.isArray(e)&&(t=e.map(e=>Uc.chatboxviews.get(e))),Promise.all(t.map(e=>e.is_chatroom&&e.model&&e.close()))}}};function Vw(){const e=Yw(['<div class="form-group">',"</div>"]);return Vw=function(){return e},e}function Jw(){const e=Yw(['<label class="roomid-policy-error">',"</label>"]);return Jw=function(){return e},e}function Xw(){const e=Yw(['\n        <div class="modal-dialog" role="document">\n            <div class="modal-content">\n                <div class="modal-header">\n                    <h5 class="modal-title" id="add-chatroom-modal-label">',"</h5>\n                    ",'\n                </div>\n                <div class="modal-body">\n                    <span class="modal-alert"></span>\n                    <form class="converse-form add-chatroom">\n                        <div class="form-group">\n                            <label for="chatroom">',":</label>\n                            ",'\n                            <input type="text" required="required" name="chatroom" class="form-control roomjid-input" placeholder="','"/>\n                        </div>\n                        ',"\n                        ",'\n                        <input type="submit" class="btn btn-primary" name="join" value="','" ?disabled=',">\n                    </form>\n                </div>\n            </div>\n        </div>\n    "]);return Xw=function(){return e},e}function Qw(){const e=Yw(['\n        <div class="form-group" >\n            <label for="nickname">',':</label>\n            <input type="text" title="','" required="required" name="nickname" value="','" class="form-control"/>\n        </div>\n    ']);return Qw=function(){return e},e}function Yw(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Kw=e=>{const t=zd("Join"),n=zd("Enter a new Groupchat");return Za(Xw(),n,mf,e.label_room_address,e.muc_roomid_policy_error_msg?Za(Jw(),e.muc_roomid_policy_error_msg):"",e.chatroom_placeholder,e.muc_roomid_policy_hint?Za(Vw(),Kp(Qp.a.filterXSS(e.muc_roomid_policy_hint,{whiteList:{b:[],br:[],em:[]}}))):"",e._converse.locked_muc_nickname?"":(e=>{const t=zd("Nickname"),n=zd("This field is required");return Za(Qw(),t,n,e.nick||"")})(e),t||"",e.muc_roomid_policy_error_msg)},Zw=n(24);const eS=rl.env.utils;var tS=df.extend({persistent:!0,id:"add-chatroom-modal",events:{"submit form.add-chatroom":"openChatRoom","keyup .roomjid-input":"checkRoomidPolicy","change .roomjid-input":"checkRoomidPolicy"},initialize(){df.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change:muc_domain",this.render),this.muc_roomid_policy_error_msg=null},toHTML(){let e="";if(!Vc.settings.get("locked_muc_domain")){const t=this.model.get("muc_domain")||Vc.settings.get("muc_domain");e=t?"name@".concat(t):zd("name@conference.example.org")}return Kw(Object.assign(this.model.toJSON(),{_converse:Uc,label_room_address:Vc.settings.get("muc_domain")?zd("Groupchat name"):zd("Groupchat address"),chatroom_placeholder:e,muc_roomid_policy_error_msg:this.muc_roomid_policy_error_msg,muc_roomid_policy_hint:Vc.settings.get("muc_roomid_policy_hint")}))},afterRender(){this.el.addEventListener("shown.bs.modal",()=>{this.el.querySelector('input[name="chatroom"]').focus()},!1)},parseRoomDataFromEvent(e){const t=new FormData(e),n=t.get("chatroom");let r;if(Vc.settings.get("locked_muc_nickname")){if(r=Uc.getDefaultMUCNickname(),!r)throw new Error("Using locked_muc_nickname but no nickname found!")}else r=t.get("nickname").trim();return{jid:n,nick:r}},openChatRoom(e){e.preventDefault();const t=this.parseRoomDataFromEvent(e.target);let n;""===t.nick&&(t.nick=void 0),Vc.settings.get("locked_muc_domain")||Vc.settings.get("muc_domain")&&!eS.isValidJID(t.jid)?n="".concat(Zw.b.escapeNode(t.jid),"@").concat(Vc.settings.get("muc_domain")):(n=t.jid,this.model.setDomain(n)),Vc.rooms.open(n,Object.assign(t,{jid:n}),!0),this.modal.hide(),e.target.reset()},checkRoomidPolicy(){if(Vc.settings.get("muc_roomid_policy")&&Vc.settings.get("muc_domain")){let e=this.el.querySelector(".roomjid-input").value;!rl.locked_muc_domain&&eS.isValidJID(e)||(e="".concat(Zw.b.escapeNode(e),"@").concat(Vc.settings.get("muc_domain")));const t=Zw.b.getNodeFromJid(e),n=Zw.b.getDomainFromJid(e);Vc.settings.get("muc_domain")!==n||Vc.settings.get("muc_roomid_policy").test(t)?this.muc_roomid_policy_error_msg=null:this.muc_roomid_policy_error_msg=zd("Groupchat id is invalid."),this.render()}}});function nS(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="d-flex controlbox-padded">\n        <span class="w-100 controlbox-heading controlbox-heading--groupchats">','</span>\n        <a class="controlbox-heading__btn show-list-muc-modal fa fa-list-ul" title="','" data-toggle="modal" data-target="#muc-list-modal"></a>\n        <a class="controlbox-heading__btn show-add-muc-modal fa fa-plus" title="','" data-toggle="modal" data-target="#add-chatrooms-modal"></a>\n    </div>\n    <div class="list-container list-container--openrooms hidden"></div>\n    <div class="list-container list-container--bookmarks hidden"></div>']);return nS=function(){return e},e}function rS(){const e=cS(['<li class="list-group-item active">',"</li>"]);return rS=function(){return e},e}function iS(){const e=cS(['<li class="list-group-item"> '," </li>"]);return iS=function(){return e},e}function oS(){const e=cS(['\n        <div class="modal-dialog" role="document">\n            <div class="modal-content">\n                <div class="modal-header">\n                    <h5 class="modal-title" id="muc-list-modal-label">',"</h5>\n                    ",'\n                </div>\n                <div class="modal-body d-flex flex-column">\n                    <span class="modal-alert"></span>\n                    ','\n                    <ul class="available-chatrooms list-group">\n                        ',"\n                        ","\n                        ",'\n                    </ul>\n                </div>\n                <div class="modal-footer">',"</div>\n            </div>\n        </div>\n    "]);return oS=function(){return e},e}function sS(){const e=cS(['\n        <li class="room-item list-group-item">\n            <div class="available-chatroom d-flex flex-row">\n                <a class="open-room available-room w-100"\n                @click=','\n                data-room-jid="','"\n                data-room-name="','"\n                title="','"\n                href="#">','</a>\n                <a class="right room-info icon-room-info"\n                @click=','\n                data-room-jid="','"\n                title="','"\n                href="#"></a>\n            </div>\n        </li>\n    ']);return sS=function(){return e},e}function aS(){const e=cS(['\n        <form class="converse-form list-chatrooms"\n            @submit=','>\n            <div class="form-group">\n                <label for="chatroom">',':</label>\n                <input type="text"\n                    @change=','\n                    value="','"\n                    required="required"\n                    name="server"\n                    class="form-control"\n                    placeholder="','"/>\n            </div>\n            <input type="submit" class="btn btn-primary" name="list" value="','"/>\n        </form>\n    ']);return aS=function(){return e},e}function cS(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var lS=e=>{const t=zd("Query for Groupchats");return Za(oS(),t,mf,e.show_form?(e=>{const t=zd("Show groupchats"),n=zd("Server address");return Za(aS(),e.submitForm,n,e.setDomainFromEvent,e.muc_domain||"",e.server_placeholder,t)})(e):"",e.loading_items?Za(iS(),fp()):"",e.feedback_text?Za(rS(),e.feedback_text):"",qp(e.items,e=>e.jid,t=>((e,t)=>{const n=zd("Show more information on this groupchat"),r=zd("Click to open this groupchat");return Za(sS(),e.openRoom,t.jid,t.name,r,t.name||t.jid,e.toggleRoomInfo,t.jid,n)})(e,t)),gf)},uS=n(179),dS=n.n(uS);const hS=rl.env.utils;function fS(e){const t=hS.ancestor(e.target,".room-item"),n=t.querySelector("div.room-info");n?(hS.slideIn(n).then(hS.removeElement),t.querySelector("a.room-info").classList.remove("selected")):(t.insertAdjacentElement("beforeend",hS.getElementFromTemplateResult(fp())),Vc.disco.info(e.target.getAttribute("data-room-jid"),null).then(e=>function(e,t){var n,r;e.querySelector("span.spinner").remove(),e.querySelector("a.room-info").classList.add("selected"),e.insertAdjacentHTML("beforeEnd",dS()({jid:t.getAttribute("from"),desc:null===(n=Kg(mr()('field[var="muc#roominfo_description"] value',t)))||void 0===n?void 0:n.textContent,occ:null===(r=Kg(mr()('field[var="muc#roominfo_occupants"] value',t)))||void 0===r?void 0:r.textContent,hidden:mr()('feature[var="muc_hidden"]',t).length,membersonly:mr()('feature[var="muc_membersonly"]',t).length,moderated:mr()('feature[var="muc_moderated"]',t).length,nonanonymous:mr()('feature[var="muc_nonanonymous"]',t).length,open:mr()('feature[var="muc_open"]',t).length,passwordprotected:mr()('feature[var="muc_passwordprotected"]',t).length,persistent:mr()('feature[var="muc_persistent"]',t).length,publicroom:mr()('feature[var="muc_publicroom"]',t).length,semianonymous:mr()('feature[var="muc_semianonymous"]',t).length,temporary:mr()('feature[var="muc_temporary"]',t).length,unmoderated:mr()('feature[var="muc_unmoderated"]',t).length,label_desc:zd("Description:"),label_jid:zd("Groupchat Address (JID):"),label_occ:zd("Participants:"),label_features:zd("Features:"),label_requires_auth:zd("Requires authentication"),label_hidden:zd("Hidden"),label_requires_invite:zd("Requires an invitation"),label_moderated:zd("Moderated"),label_non_anon:zd("Non-anonymous"),label_open_room:zd("Open"),label_permanent_room:zd("Permanent"),label_public:zd("Public"),label_semi_anon:zd("Semi-anonymous"),label_temp_room:zd("Temporary"),label_unmoderated:zd("Unmoderated")}))}(t,e)).catch(e=>zn.error(e)))}var pS=df.extend({id:"muc-list-modal",persistent:!0,initialize(){this.items=[],this.loading_items=!1,df.prototype.initialize.apply(this,arguments),Vc.settings.get("muc_domain")&&!this.model.get("muc_domain")&&this.model.save("muc_domain",Vc.settings.get("muc_domain")),this.listenTo(this.model,"change:muc_domain",this.onDomainChange),this.el.addEventListener("shown.bs.modal",()=>Vc.settings.get("locked_muc_domain")?this.updateRoomsList():this.el.querySelector('input[name="server"]').focus())},toHTML(){const e=this.model.get("muc_domain")||Vc.settings.get("muc_domain");return lS(Object.assign(this.model.toJSON(),{show_form:!Vc.settings.get("locked_muc_domain"),server_placeholder:e||zd("conference.example.org"),items:this.items,loading_items:this.loading_items,openRoom:e=>this.openRoom(e),setDomainFromEvent:e=>this.setDomainFromEvent(e),submitForm:e=>this.showRooms(e),toggleRoomInfo:e=>this.toggleRoomInfo(e)}))},openRoom(e){e.preventDefault();const t=e.target.getAttribute("data-room-jid"),n=e.target.getAttribute("data-room-name");this.modal.hide(),Vc.rooms.open(t,{name:n},!0)},toggleRoomInfo(e){e.preventDefault(),fS(e)},onDomainChange(){Vc.settings.get("auto_list_rooms")&&this.updateRoomsList()},onRoomsFound(e){this.loading_items=!1;const t=e?mr()("query item",e):[];return t.length?(this.model.set({feedback_text:zd("Groupchats found")},{silent:!0}),this.items=t.map(ps.getAttributes)):(this.items=[],this.model.set({feedback_text:zd("No groupchats found")},{silent:!0})),this.render(),!0},updateRoomsList(){const e=Object(Zw.a)({to:this.model.get("muc_domain"),from:Uc.connection.jid,type:"get"}).c("query",{xmlns:Zw.b.NS.DISCO_ITEMS});Vc.sendIQ(e).then(e=>this.onRoomsFound(e)).catch(()=>this.onRoomsFound())},showRooms(e){e.preventDefault(),this.loading_items=!0,this.render();const t=new FormData(e.target);this.model.setDomain(t.get("server")),this.updateRoomsList()},setDomainFromEvent(e){this.model.setDomain(e.target.value)},setNick(e){this.model.save({nick:e.target.value})}});const gS=rl.env.utils,mS=eh.extend({tagName:"div",className:"controlbox-section",id:"chatrooms",events:{"click a.controlbox-heading__btn.show-add-muc-modal":"showAddRoomModal","click a.controlbox-heading__btn.show-list-muc-modal":"showMUCListModal"},toHTML(){return e={heading_chatrooms:zd("Groupchats"),title_new_room:zd("Add a new groupchat"),title_list_rooms:zd("Query for groupchats")},Za(nS(),e.heading_chatrooms,e.title_list_rooms,e.title_new_room);var e},showAddRoomModal(e){Vc.modal.show(tS,{model:this.model},e)},showMUCListModal(e){Vc.modal.show(pS,{model:this.model},e)}}),vS={renderRoomsPanel(){if(this.roomspanel&&gS.isInDOM(this.roomspanel.el))return this.roomspanel;const e="converse.roomspanel".concat(Uc.bare_jid);return this.roomspanel=new Uc.RoomsPanel({model:new(Uc.RoomsPanelModel.extend({id:e,browserStorage:Uc.createStore(e)}))}),this.roomspanel.model.fetch(),this.el.querySelector(".controlbox-pane").insertAdjacentElement("beforeEnd",this.roomspanel.render().el),Vc.trigger("roomsPanelRendered"),this.roomspanel},getRoomsPanel(){return this.roomspanel&&gS.isInDOM(this.roomspanel.el)?this.roomspanel:this.renderRoomsPanel()}},{Strophe:_S}=rl.env;function bS(e,t){t.getRoomsPanel().model.save("muc_domain",_S.getDomainFromJid(e))}function yS(e){e.model.get("connected")&&(e.getRoomsPanel().model.get("muc_domain")||(void 0===Vc.settings.get("muc_domain")?function(e){function t(t){t&&t.get("var")===_S.NS.MUC&&t.entity.getIdentity("conference","text").then(n=>{n&&bS(t.get("from"),e)})}Vc.waitUntil("discoInitialized").then(()=>{Vc.listen.on("serviceDiscovered",t),Uc.disco_entities.each(e=>t(e.features.findWhere({var:_S.NS.MUC})))}).catch(e=>zn.error(e))}(e):bS(Vc.settings.get("muc_domain"),e)))}function wS(e){e.preventDefault(),Vc.rooms.open(e.target.href)}async function SS(e){const t=Uc.chatboxviews;if(!t.get(e.get("id"))&&e.get("type")===Uc.CHATROOMS_TYPE&&e.isValid())return await e.initialized,t.add(e.get("id"),new Uc.ChatRoomView({model:e}))}rl.plugins.add("converse-muc-views",{dependencies:["converse-autocomplete","converse-modal","converse-controlbox","converse-chatview"],overrides:{ControlBoxView:{renderControlBoxPane(){this.__super__.renderControlBoxPane.apply(this,arguments),Vc.settings.get("allow_muc")&&this.renderRoomsPanel()}}},initialize(){const{_converse:e}=this;Vc.promises.add(["roomsPanelRendered"]),Vc.settings.extend({auto_list_rooms:!1,cache_muc_messages:!0,locked_muc_nickname:!1,modtools_disable_query:[],modtools_disable_assign:!1,muc_disable_slash_commands:!1,muc_mention_autocomplete_filter:"contains",muc_mention_autocomplete_min_chars:0,muc_mention_autocomplete_show_avatar:!0,muc_roomid_policy:null,muc_roomid_policy_hint:null,roomconfig_whitelist:[],show_retraction_warning:!0,visible_toolbar_buttons:{toggle_occupants:!0}}),e.MUCConfigForm=sy,e.MUCPasswordForm=cy,e.ChatRoomView=e.ChatBoxView.extend(Ww),e.RoomsPanel=mS,e.ControlBoxView&&Object.assign(e.ControlBoxView.prototype,vS),Object.assign(e.api,Gw),Vc.listen.on("chatBoxViewsInitialized",()=>{e.chatboxviews.delegate("click","a.open-chatroom",wS),e.chatboxes.on("add",SS)}),Vc.listen.on("clearSession",()=>{const t=e.chatboxviews.get("controlbox");t&&t.roomspanel&&(t.roomspanel.model.destroy(),t.roomspanel.remove(),delete t.roomspanel)}),Vc.listen.on("controlBoxInitialized",e=>{Vc.settings.get("allow_muc")&&(yS(e),e.model.on("change:connected",()=>yS(e)))})}});var xS={className:"chatbox headlines hidden",events:{"click .close-chatbox-button":"close","click .toggle-chatbox-button":"minimize","keypress textarea.chat-textarea":"onKeyDown"},async initialize(){this.initDebounced(),this.model.disable_mam=!0,this.listenTo(this.model,"change:hidden",e=>e.get("hidden")?this.hide():this.show()),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"show",this.show),this.render(),this.listenTo(this.model.messages,"add",this.onMessageAdded),this.listenTo(this.model.messages,"remove",this.renderChatHistory),this.listenTo(this.model.messages,"rendered",this.maybeScrollDown),this.listenTo(this.model.messages,"reset",this.renderChatHistory),await this.model.messages.fetched,this.insertIntoDOM(),this.model.maybeShow(),this.scrollDown(),Vc.trigger("headlinesBoxViewInitialized",this)},render(){this.el.setAttribute("id",this.model.get("box_id"));const e=Qv(Object.assign(this.model.toJSON(),{info_close:"",label_personal_message:"",show_send_button:!1,show_toolbar:!1,unread_msgs:""}));return Ya(e,this.el),this.content=this.el.querySelector(".chat-content"),this.msgs_container=this.el.querySelector(".chat-content__messages"),this.renderChatContent(),this.renderHeading(),this},getNotifications:()=>[],getHeadingButtons(){const e=[];return Vc.settings.get("singleton")||e.push({a_class:"close-chatbox-button",handler:e=>this.close(e),i18n_text:zd("Close"),i18n_title:zd("Close these announcements"),icon_class:"fa-times",name:"close",standalone:"overlayed"===Vc.settings.get("view_mode")}),Uc.api.hook("getHeadingButtons",this,e)},renderMessageForm:function(){},afterShown:function(){}};function ES(){const e=CS(['\n    <div class="list-container list-container--headline ','">\n        <div class="items-list rooms-list headline-list">\n            ',"\n        </div>\n    </div>\n"]);return ES=function(){return e},e}function AS(){const e=CS(['\n    <div class="list-item controlbox-padded d-flex flex-row"\n        data-headline-jid="','">\n    <a class="list-item-link open-headline available-room w-100"\n        data-headline-jid="','"\n        title="','" href="#">',"</a>\n    </div>\n"]);return AS=function(){return e},e}function CS(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var jS=e=>Za(ES(),e.headlineboxes.length?"":"hidden",e.headlineboxes.map(t=>(e=>Za(AS(),e.headlinebox.get("jid"),e.headlinebox.get("jid"),e.open_title,e.headlinebox.get("jid")))(Object.assign({headlinebox:t},e))));function TS(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="d-flex controlbox-padded ','">\n        <span class="w-100 controlbox-heading controlbox-heading--headline">',"</span>\n    </div>\n    ","\n"]);return TS=function(){return e},e}const OS=rl.env.utils,kS=eh.extend({tagName:"div",className:"controlbox-section",id:"headline",events:{"click .open-headline":"openHeadline"},initialize(){this.listenTo(this.model,"add",this.renderIfHeadline),this.listenTo(this.model,"remove",this.renderIfHeadline),this.listenTo(this.model,"destroy",this.renderIfHeadline),this.render(),this.insertIntoDOM()},toHTML(){return e={heading_headline:zd("Announcements"),headlineboxes:this.model.filter(e=>e.get("type")===Uc.HEADLINES_TYPE),open_title:zd("Click to open this server message")},Za(TS(),e.headlineboxes.length?"":"hidden",e.heading_headline,jS(e));var e},renderIfHeadline(e){return e&&e.get("type")===Uc.HEADLINES_TYPE&&this.render()},openHeadline(e){e.preventDefault();const t=e.target.getAttribute("data-headline-jid");Uc.chatboxes.get(t).maybeShow(!0)},insertIntoDOM(){const e=Uc.chatboxviews.get("controlbox");e&&e.el.querySelector(".controlbox-pane").insertAdjacentElement("beforeEnd",this.el)}}),NS={renderHeadlinesPanel(){return this.headlinepanel&&OS.isInDOM(this.headlinepanel.el)||(this.headlinepanel=new Uc.HeadlinesPanel({model:Uc.chatboxes}),Vc.trigger("headlinesPanelRendered")),this.headlinepanel}};
-/**
- * @module converse-headlines-view
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-function IS(){const e=Uc.chatboxviews;Uc.chatboxes.on("add",t=>{e.get(t.get("id"))||t.get("type")!==Uc.HEADLINES_TYPE||e.add(t.get("id"),new Uc.HeadlinesBoxView({model:t}))})}rl.plugins.add("converse-headlines-view",{dependencies:["converse-headlines","converse-chatview"],overrides:{ControlBoxView:{renderControlBoxPane(){this.__super__.renderControlBoxPane.apply(this,arguments),this.renderHeadlinesPanel()}}},initialize(){Uc.ControlBoxView&&Object.assign(Uc.ControlBoxView.prototype,NS),Uc.HeadlinesBoxView=Uc.ChatBoxView.extend(xS),Uc.HeadlinesPanel=kS,Vc.listen.on("chatBoxViewsInitialized",IS)}});var MS=n(180),RS=n.n(MS);
-/**
- * @module converse-notification
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:DS}=rl.env,PS=rl.env.utils,LS="Notification"in window;let zS;function FS(){if(Vc.settings.get("show_tab_notifications")){var e;zS=null!==(e=zS)&&void 0!==e?e:new rl.env.Favico({type:"circle",animation:"pop"});const t=Uc.chatboxes.models.reduce((e,t)=>e+(t.get("num_unread")||0),0);zS.badge(t)}}function BS(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="changeStatusModalLabel">',"</h5>\n                ",'\n            </div>\n            <div class="modal-body">\n                <span class="modal-alert"></span>\n                <form class="converse-form set-xmpp-status" id="set-xmpp-status">\n                    <div class="form-group">\n                        <div class="custom-control custom-radio">\n                            <input ?checked=','\n                                type="radio" id="radio-online" value="online" name="chat_status" class="custom-control-input"/>\n                            <label class="custom-control-label" for="radio-online">\n                                <span class="fa fa-circle chat-status chat-status--online"></span>','</label>\n                        </div>\n                        <div class="custom-control custom-radio">\n                            <input ?checked=','\n                                type="radio" id="radio-busy" value="dnd" name="chat_status" class="custom-control-input"/>\n                            <label class="custom-control-label" for="radio-busy">\n                                <span class="fa fa-minus-circle  chat-status chat-status--busy"></span>','</label>\n                        </div>\n                        <div class="custom-control custom-radio">\n                            <input ?checked=','\n                                type="radio" id="radio-away" value="away" name="chat_status" class="custom-control-input"/>\n                            <label class="custom-control-label" for="radio-away">\n                                <span class="fa fa-circle chat-status chat-status--away"></span>','</label>\n                        </div>\n                        <div class="custom-control custom-radio">\n                            <input ?checked=','\n                                type="radio" id="radio-xa" value="xa" name="chat_status" class="custom-control-input"/>\n                            <label class="custom-control-label" for="radio-xa">\n                                <span class="far fa-circle chat-status chat-status--xa"></span>','</label>\n                        </div>\n                    </div>\n                    <div class="form-group">\n                        <div class="btn-group w-100">\n                            <input name="status_message" type="text" class="form-control"\n                                value="','" placeholder="','"/>\n                            <span class="clear-input fa fa-times ','"></span>\n                        </div>\n                    </div>\n                    <button type="submit" class="btn btn-primary">',"</button>\n                </form>\n            </div>\n        </div>\n    </div>\n"]);return BS=function(){return e},e}rl.env.Favico=RS.a,rl.plugins.add("converse-notification",{dependencies:["converse-chatboxes"],initialize(){Vc.settings.extend({chatstate_notification_blacklist:[],notification_delay:5e3,notification_icon:"logo/conversejs-filled.svg",notify_all_room_messages:!1,notify_nicknames_without_references:!1,play_sounds:!0,show_chat_state_notifications:!1,show_desktop_notifications:!0,show_tab_notifications:!0,sounds_path:Vc.settings.get("assets_path")+"/sounds/"}),Uc.shouldNotifyOfGroupMessage=function(e){if(!(null==e?void 0:e.body))return!1;const t=e.from,n=e.from_muc,r=Vc.settings.get("notify_all_room_messages"),i=Uc.chatboxes.get(n),o=DS.getResourceFromJid(t),s=o&&DS.unescapeNode(o)||"";let a=!1;const c=i.get("nick");Vc.settings.get("notify_nicknames_without_references")&&(a=new RegExp("\\b".concat(c,"\\b")).test(e.body));const l=e.references.map(e=>e.value).includes(c),u=s!==c,d=!0===r||Array.isArray(r)&&r.includes(n)||l||a;return u&&!!d},Uc.isMessageToHiddenChat=function(e){var t,n;return null!==(t=null===(n=Uc.chatboxes.get(e.from))||void 0===n?void 0:n.isHidden())&&void 0!==t&&t},Uc.shouldNotifyOfMessage=function(e){const{attrs:t,stanza:n}=e;if(!t||null!==n.querySelector("forwarded"))return!1;if("groupchat"===t.type)return Uc.shouldNotifyOfGroupMessage(t);if(t.is_headline)return Uc.isMessageToHiddenChat(t);const r=DS.getBareJidFromJid(t.from)===Uc.bare_jid;return!PS.isOnlyChatStateNotification(n)&&!PS.isOnlyMessageDeliveryReceipt(n)&&!r&&("all"===Vc.settings.get("show_desktop_notifications")||Uc.isMessageToHiddenChat(t))},Uc.playSoundNotification=function(){if(Vc.settings.get("play_sounds")&&void 0!==window.Audio){const e=new Audio(Vc.settings.get("sounds_path")+"msg_received.ogg"),t=e.canPlayType("audio/ogg");if("probably"===t)return e.play();const n=new Audio(Vc.settings.get("sounds_path")+"msg_received.mp3"),r=n.canPlayType("audio/mp3");"probably"===r?n.play():"maybe"===t?e.play():"maybe"===r&&n.play()}},Uc.areDesktopNotificationsEnabled=function(){return LS&&Vc.settings.get("show_desktop_notifications")&&"granted"===Notification.permission},Uc.showMessageNotification=function(e){const{attrs:t}=e;if(t.is_error)return;if(!Uc.areDesktopNotificationsEnabled())return;let n,r;const i=t.from,o=DS.getBareJidFromJid(i);if("headline"===t.type){if(o.includes("@")&&!Vc.settings.get("allow_non_roster_messaging"))return;n=zd("Notification from %1$s",o)}else if(o.includes("@"))if("groupchat"===t.type)n=zd("%1$s says",DS.getResourceFromJid(i));else{if(void 0===Uc.roster)return void zn.error("Could not send notification, because roster is undefined");if(r=Uc.roster.get(o),void 0!==r)n=zd("%1$s says",r.getDisplayName());else{if(!Vc.settings.get("allow_non_roster_messaging"))return;n=zd("%1$s says",o)}}else n=zd("Notification from %1$s",o);const s=t.is_encrypted?zd("Encrypted message received"):t.body;if(!s)return;const a=new Notification(n,{body:s,lang:Uc.locale,icon:Vc.settings.get("notification_icon"),requireInteraction:!Uc.notification_delay});Vc.settings.get("notification_delay")&&setTimeout(a.close.bind(a),Vc.settings.get("notification_delay")),a.onclick=function(e){e.preventDefault(),window.focus(),Uc.chatboxes.get(o).maybeShow(!0)},a.onclick.bind(Uc)},Uc.showChatStateNotification=function(e){if(Uc.chatstate_notification_blacklist.includes(e.jid))return;const t=e.chat_status;let n=null;if("offline"===t?n=zd("has gone offline"):"away"===t?n=zd("has gone away"):"dnd"===t?n=zd("is busy"):"online"===t&&(n=zd("has come online")),null===n)return;const r=new Notification(e.getDisplayName(),{body:n,lang:Uc.locale,icon:Uc.notification_icon});setTimeout(r.close.bind(r),5e3)},Uc.showContactRequestNotification=function(e){const t=new Notification(e.getDisplayName(),{body:zd("wants to be your contact"),lang:Uc.locale,icon:Uc.notification_icon});setTimeout(t.close.bind(t),5e3)},Uc.showFeedbackNotification=function(e){if("error"===e.klass||"warn"===e.klass){const t=new Notification(e.subject,{body:e.message,lang:Uc.locale,icon:Uc.notification_icon});setTimeout(t.close.bind(t),5e3)}},Uc.handleChatStateNotification=function(e){Uc.areDesktopNotificationsEnabled()&&Vc.settings.get("show_chat_state_notifications")&&Uc.showChatStateNotification(e)},Uc.handleMessageNotification=function(e){if(!Uc.shouldNotifyOfMessage(e))return!1;Vc.trigger("messageNotification",e),Uc.playSoundNotification(),Uc.showMessageNotification(e)},Uc.handleContactRequestNotification=function(e){Uc.areDesktopNotificationsEnabled(!0)&&Uc.showContactRequestNotification(e)},Uc.handleFeedback=function(e){Uc.areDesktopNotificationsEnabled(!0)&&Uc.showFeedbackNotification(e)},Uc.requestPermission=function(){LS&&!["denied","granted"].includes(Notification.permission)&&Notification.requestPermission()},Vc.listen.on("clearSession",()=>zS=null),Vc.waitUntil("chatBoxesInitialized").then(()=>Uc.chatboxes.on("change:num_unread",FS)),Vc.listen.on("pluginsInitialized",(function(){Vc.listen.on("contactRequest",Uc.handleContactRequestNotification),Vc.listen.on("contactPresenceChanged",Uc.handleChatStateNotification),Vc.listen.on("message",Uc.handleMessageNotification),Vc.listen.on("feedback",Uc.handleFeedback),Vc.listen.on("connected",Uc.requestPermission)}))}});const qS=rl.env.utils,HS=df.extend({id:"modal-status-change",events:{"submit form#set-xmpp-status":"onFormSubmitted","click .clear-input":"clearStatusMessage"},toHTML(){return e=Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{label_away:zd("Away"),label_busy:zd("Busy"),label_cancel:zd("Cancel"),label_close:zd("Close"),label_custom_status:zd("Custom status"),label_offline:zd("Offline"),label_online:zd("Online"),label_save:zd("Save"),label_xa:zd("Away for long"),modal_title:zd("Change chat status"),placeholder_status_message:zd("Personal status message")}),Za(BS(),e.modal_title,mf,"online"===e.status,e.label_online,"busy"===e.status,e.label_busy,"away"===e.status,e.label_away,"xa"===e.status,e.label_xa,e.status_message||"",e.placeholder_status_message,e.status_message?"":"hidden",e.label_save);var e},afterRender(){this.el.addEventListener("shown.bs.modal",()=>{this.el.querySelector('input[name="status_message"]').focus()},!1)},clearStatusMessage(e){e&&e.preventDefault&&(e.preventDefault(),qS.hideElement(this.el.querySelector(".clear-input"))),this.el.querySelector('input[name="status_message"]').value=""},onFormSubmitted(e){e.preventDefault();const t=new FormData(e.target);this.model.save({status_message:t.get("status_message"),status:t.get("chat_status")}),this.modal.hide()}});Uc.ChatStatusModal=HS;function US(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n            <a class="change-avatar" @click=',' title="','">\n                ',"\n            </a>\n            <input @change=",' class="hidden" name="image" type="file"/>\n        ']);return US=function(){return e},e}const $S=zd("Your avatar image");function WS(){const e=ZS(['\n        <div class="modal-dialog" role="document">\n            <div class="modal-content">\n                <div class="modal-header">\n                    <h5 class="modal-title" id="user-profile-modal-label">',"</h5>\n                    ",'\n                </div>\n                <div class="modal-body">\n                    <span class="modal-alert"></span>\n                    ','\n                    <div class="tab-content">\n                        <div class="tab-pane active" id="profile-tabpanel" role="tabpanel" aria-labelledby="profile-tab">\n                            <form class="converse-form converse-form--modal profile-form" action="#">\n                                <div class="row">\n                                    <div class="col-auto">\n                                        <converse-image-picker image="','" width="','" height="','"></converse-image-picker>\n                                    </div>\n                                    <div class="col">\n                                        <div class="form-group">\n                                            <label class="col-form-label">',":</label>\n                                            <div>",'</div>\n                                        </div>\n                                    </div>\n                                </div>\n                                <div class="form-group">\n                                    <label for="vcard-fullname" class="col-form-label">',':</label>\n                                    <input id="vcard-fullname" type="text" class="form-control" name="fn" value="','"/>\n                                </div>\n                                <div class="form-group">\n                                    <label for="vcard-nickname" class="col-form-label">',':</label>\n                                    <input id="vcard-nickname" type="text" class="form-control" name="nickname" value="','"/>\n                                </div>\n                                <div class="form-group">\n                                    <label for="vcard-url" class="col-form-label">',':</label>\n                                    <input id="vcard-url" type="url" class="form-control" name="url" value="','"/>\n                                </div>\n                                <div class="form-group">\n                                    <label for="vcard-email" class="col-form-label">',':</label>\n                                    <input id="vcard-email" type="email" class="form-control" name="email" value="','"/>\n                                </div>\n                                <div class="form-group">\n                                    <label for="vcard-role" class="col-form-label">',':</label>\n                                    <input id="vcard-role" type="text" class="form-control" name="role" value="','" aria-describedby="vcard-role-help"/>\n                                    <small id="vcard-role-help" class="form-text text-muted">','</small>\n                                </div>\n                                <hr/>\n                                <div class="form-group">\n                                    <button type="submit" class="save-form btn btn-primary">',"</button>\n                                </div>\n                            </form>\n                        </div>\n                        ","\n                    </div>\n                </div>\n            </div>\n        </div>\n    "]);return WS=function(){return e},e}function GS(){const e=ZS(['\n        <ul class="nav nav-pills justify-content-center">\n            <li role="presentation" class="nav-item">\n                <a class="nav-link active" id="profile-tab" href="#profile-tabpanel" aria-controls="profile-tabpanel" role="tab" data-toggle="tab">','</a>\n            </li>\n            <li role="presentation" class="nav-item">\n                <a class="nav-link" id="omemo-tab" href="#omemo-tabpanel" aria-controls="omemo-tabpanel" role="tab" data-toggle="tab">',"</a>\n            </li>\n        </ul>"]);return GS=function(){return e},e}function VS(){const e=ZS(['\n        <div class="tab-pane" id="omemo-tabpanel" role="tabpanel" aria-labelledby="omemo-tab">\n            <form class="converse-form fingerprint-removal">\n                <ul class="list-group fingerprints">\n                    <li class="list-group-item active">','</li>\n                    <li class="list-group-item">\n                        ','\n                    </li>\n                </ul>\n                <div class="form-group">\n                    <button type="button" class="generate-bundle btn btn-danger">',"</button>\n                </div>\n                ","\n            </form>\n        </div>"]);return VS=function(){return e},e}function JS(){const e=ZS(['\n        <ul class="list-group fingerprints">\n            <li class="list-group-item nopadding active">\n                <label>\n                    <input type="checkbox" class="select-all" title="','" aria-label="','"/>\n                    ',"\n                </label>\n            </li>\n            ",'\n        </ul>\n        <div class="form-group"><button type="submit" class="save-form btn btn-primary">',"</button></div>\n    "]);return JS=function(){return e},e}function XS(){const e=ZS(["\n    ","\n"]);return XS=function(){return e},e}function QS(){const e=ZS(['\n        <li class="fingerprint-removal-item list-group-item nopadding">\n            <label>\n            <input type="checkbox" value="','"\n                aria-label="','"/>\n            <span>',"</span>\n            </label>\n        </li>\n    "]);return QS=function(){return e},e}function YS(){const e=ZS(['\n        <li class="fingerprint-removal-item list-group-item nopadding">\n            <label>\n            <input type="checkbox" value="','"\n                aria-label="','"/>\n            <span class="fingerprint">',"</span>\n            </label>\n        </li>\n    "]);return YS=function(){return e},e}function KS(){const e=ZS(['\n    <span class="fingerprint">',"</span>"]);return KS=function(){return e},e}function ZS(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-image-picker",class extends mc{static get properties(){return{height:{type:Number},image:{type:String},width:{type:Number}}}render(){const e={height:this.height,image:this.image,width:this.width};return Za(US(),this.openFileSelection,$S,op(e),this.updateFilePreview)}openFileSelection(e){e.preventDefault(),this.querySelector('input[type="file"]').click()}updateFilePreview(e){const t=e.target.files[0],n=new FileReader;n.onloadend=()=>this.image=n.result,n.readAsDataURL(t)}});const ex=rl.env.utils,tx=e=>Za(XS(),e.device.get("bundle")&&e.device.get("bundle").fingerprint?(e=>{const t=zd("Checkbox for selecting the following fingerprint");return Za(YS(),e.device.get("id"),t,ex.formatFingerprint(e.device.get("bundle").fingerprint))})(e):(e=>{const t=zd("Device without a fingerprint"),n=zd("Checkbox for selecting the following device");return Za(QS(),e.device.get("id"),n,t)})(e)),nx=e=>{const t=zd("This device's OMEMO fingerprint"),n=zd("Generate new keys and fingerprint");return Za(VS(),t,e.view.current_device&&e.view.current_device.get("bundle")&&e.view.current_device.get("bundle").fingerprint?(e=>Za(KS(),ex.formatFingerprint(e.view.current_device.get("bundle").fingerprint)))(e):fp(),n,e.view.other_devices.length?(e=>{const t=zd("Other OMEMO-enabled devices"),n=zd("Checkbox to select fingerprints of all other OMEMO devices"),r=zd("Remove checked devices and close"),i=zd("Select all");return Za(JS(),i,n,t,e.view.other_devices.map(t=>tx(Object.assign({device:t},e))),r)})(e):"")};const rx=df.extend({id:"user-profile-modal",events:{"submit .profile-form":"onFormSubmitted"},initialize(){this.listenTo(this.model,"change",this.render),df.prototype.initialize.apply(this,arguments),Vc.trigger("profileModalInitialized",this.model)},toHTML(){return(e=>{const t=zd("Your Profile"),n=zd("Email"),r=zd("Full Name"),i=zd("XMPP Address (JID)"),o=zd("Nickname"),s=zd("Role"),a=zd("Save and close"),c=zd("Use commas to separate multiple roles. Your roles are shown next to your name on your chat messages."),l=zd("URL"),u=zd("OMEMO"),d=zd("Profile"),h=Za(GS(),d,u);return Za(WS(),t,mf,Uc.pluggable.plugins["converse-omemo"].enabled(Uc)&&h||"",e.image,e.width,e.height,i,e.jid,r,e.fullname||"",o,e.nickname||"",l,e.url||"",n,e.email||"",s,e.role||"",c,a,Uc.pluggable.plugins["converse-omemo"].enabled(Uc)&&nx(e)||"")})(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),this.getAvatarData(),{view:this}))},getAvatarData(){return{height:128,width:128,image:"data:"+this.model.vcard.get("image_type")+";base64,"+this.model.vcard.get("image")}},afterRender(){this.tabs=mr()(".nav-item .nav-link",this.el).map(e=>new af.a.Tab(e))},async setVCard(e){try{await Vc.vcard.set(Uc.bare_jid,e)}catch(e){return zn.fatal(e),void this.alert([zd("Sorry, an error happened while trying to save your profile data."),zd("You can check your browser's developer console for any error output.")].join(" "))}this.modal.hide()},onFormSubmitted(e){e.preventDefault();const t=new FileReader,n=new FormData(e.target),r=n.get("image"),i={fn:n.get("fn"),nickname:n.get("nickname"),role:n.get("role"),email:n.get("email"),url:n.get("url")};r.size?(t.onloadend=()=>{Object.assign(i,{image:btoa(t.result),image_type:r.type}),this.setVCard(i)},t.readAsBinaryString(r)):(Object.assign(i,{image:this.model.vcard.get("image"),image_type:this.model.vcard.get("image_type")}),this.setVCard(i))}});Uc.ProfileModal=rx;function ix(){const e=ux(['\n            <fieldset class="form-group">\n                <ul class="list-group">\n                    <li class="list-group-item active">',":</li>\n                    ","\n                </ul>\n            </fieldset>"]);return ix=function(){return e},e}function ox(){const e=ux(['<div class="alert alert-','" role="alert">',"</div>"]);return ox=function(){return e},e}function sx(){const e=ux(["\n        ",'\n        <form class="converse-form" @submit=','>\n            <fieldset class="form-group">\n                <label>\n                    ','\n                    <p class="form-help">','</p>\n                    <converse-autocomplete\n                        .getAutoCompleteList="','"\n                        placeholder="','"\n                        name="jid"/>\n                </label>\n            </fieldset>\n            <fieldset class="form-group">\n                <input type="submit" class="btn btn-primary" value="','">\n            </fieldset>\n            ',"\n\n        </form>\n    "]);return sx=function(){return e},e}function ax(){const e=ux(['\n    <li class="room-item list-group-item">\n        <div class="available-chatroom d-flex flex-row">\n            <a class="open-room available-room w-100"\n               @click=','\n               data-command-node="','"\n               data-command-jid="','"\n               data-command-name="','"\n               title="','"\n               href="#">',"</a>\n        </div>\n        ","\n    </li>\n"]);return ax=function(){return e},e}function cx(){const e=ux(['<div class="alert alert-','" role="alert">',"</div>"]);return cx=function(){return e},e}function lx(){const e=ux(["\n        <form @submit=",">\n            ",'\n            <fieldset class="form-group">\n                <input type="hidden" name="command_node" value="','"/>\n                <input type="hidden" name="command_jid" value="','"/>\n\n                <p class="form-help">',"</p>\n                \x3c!-- Fields are generated internally, with xForm2webForm --\x3e\n                ",'\n            </fieldset>\n            <fieldset>\n                <input type="submit" class="btn btn-primary" value="','">\n                <input type="button" class="btn btn-secondary button-cancel" value="','" @click=',">\n            </fieldset>\n        </form>\n    "]);return lx=function(){return e},e}function ux(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const{Strophe:dx,$iq:hx}=rl.env,fx=rl.env.utils,px=(e,t)=>Za(ax(),e.toggleCommandForm,t.node,t.jid,t.name,t.name,t.name||t.jid,t.node===e.showform?((e,t)=>{const n=zd("Hide"),r=zd("Execute");return Za(lx(),e.runCommand,t.alert?Za(cx(),t.alert_type,t.alert):"",t.node,t.jid,t.instructions,t.fields.map(e=>Kp(e)),r,n,e.hideCommandForm)})(e,t):"");async function gx(){const e=[...await Vc.rooms.get(),...await Vc.contacts.get()];return[...new Set(e.map(e=>dx.getDomainFromJid(e.get("jid"))))]}function mx(){const e=_x(['\n    <div class="modal-dialog" role="document">\n        <div class="modal-content">\n            <div class="modal-header">\n                <h5 class="modal-title" id="converse-modtools-modal-label">',"</h5>\n                ",'\n            </div>\n            <div class="modal-body">\n                ','\n\n                <div class="tab-content">\n                    <div class="tab-pane tab-pane--columns ','"\n                         id="about-tabpanel" role="tabpanel" aria-labelledby="about-tab">\n\n                        <span class="modal-alert"></span>\n                        <br/>\n                        <div class="container">\n                            <h6 class="brand-heading">Converse</h6>\n                            <p class="brand-subtitle">','</p>\n                            <p class="brand-subtitle">','</p>\n                            <p class="brand-subtitle">','</p>\n                        </div>\n                    </div>\n\n                    <div class="tab-pane tab-pane--columns ','"\n                         id="commands-tabpanel"\n                         role="tabpanel"\n                         aria-labelledby="commands-tab">\n                        <converse-adhoc-commands/>\n                    </div>\n                </div>\n            </div>\n        </div>\n    </div>\n']);return mx=function(){return e},e}function vx(){const e=_x(['\n        <ul class="nav nav-pills justify-content-center">\n            <li role="presentation" class="nav-item">\n                <a class="nav-link active" id="about-tab" href="#about-tabpanel" aria-controls="about-tabpanel" role="tab" data-toggle="tab" @click=',">",'</a>\n            </li>\n            <li role="presentation" class="nav-item">\n                <a class="nav-link" id="commands-tab" href="#commands-tabpanel" aria-controls="commands-tabpanel" role="tab" data-toggle="tab" @click=',">","</a>\n            </li>\n        </ul>\n    "]);return vx=function(){return e},e}function _x(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Vc.elements.define("converse-adhoc-commands",class extends mc{static get properties(){return{alert:{type:String},alert_type:{type:String},nonce:{type:String},showform:{type:String},view:{type:String}}}constructor(){super(),this.view="choose-service",this.showform="",this.commands=[]}render(){return(e=>{const t=zd("On which entity do you want to run commands?"),n=zd("Certain XMPP services and entities allow privileged users to execute ad-hoc commands on them."),r=zd("Commands found"),i=zd("List available commands"),o=zd("XMPP Address"),s=zd("No commands found");return Za(sx(),e.alert?Za(ox(),e.alert_type,e.alert):"",e.fetchCommands,t,n,gx,o,i,"list-commands"===e.view?Za(ix(),e.commands.length?r:s,e.commands.map(t=>px(e,t))):"")})({alert:this.alert,alert_type:this.alert_type,commands:this.commands,fetchCommands:e=>this.fetchCommands(e),hideCommandForm:e=>this.hideCommandForm(e),runCommand:e=>this.runCommand(e),showform:this.showform,toggleCommandForm:e=>this.toggleCommandForm(e),view:this.view})}async fetchCommands(e){e.preventDefault(),delete this.alert_type,delete this.alert;const t=new FormData(e.target).get("jid").trim();let n;try{n=await Vc.disco.supports(dx.NS.ADHOC,t)}catch(e){zn.error(e)}if(n)try{this.commands=await Vc.adhoc.getCommands(t),this.view="list-commands"}catch(e){return zn.error(e),this.alert_type="danger",this.alert=zd("Sorry, an error occurred while looking for commands on that entity."),this.commands=[],void zn.error(e)}else this.alert_type="danger",this.alert=zd("The specified entity doesn't support ad-hoc commands")}async toggleCommandForm(e){e.preventDefault();const t=e.target.getAttribute("data-command-node"),n=this.commands.filter(e=>e.node===t)[0];this.showform!==t&&await async function(e){const t=e.node,n=e.jid,r=hx({type:"set",to:n}).c("command",{xmlns:dx.NS.ADHOC,node:t,action:"execute"});try{var i;const t=await Vc.sendIQ(r),n=mr()('command[xmlns="'.concat(dx.NS.ADHOC,'"]'),t).pop();e.sessionid=n.getAttribute("sessionid"),e.instructions=null===(i=mr()('x[type="form"][xmlns="jabber:x:data"] instructions',n).pop())||void 0===i?void 0:i.textContent,e.fields=mr()('x[type="form"][xmlns="jabber:x:data"] field',n).map(e=>fx.xForm2webForm(e,n))}catch(t){null===t?zn.error("Error: timeout while trying to execute command for ".concat(n)):(zn.error("Error while trying to execute command for ".concat(n)),zn.error(t)),e.fields=[]}}(n),this.showform=t}hideCommandForm(e){e.preventDefault(),this.showform=""}async runCommand(e){e.preventDefault();const t=new FormData(e.target),n=t.get("command_jid").trim(),r=t.get("command_node").trim(),i=this.commands.filter(e=>e.node===r)[0],o=mr()(":input:not([type=button]):not([type=submit])",e.target).filter(e=>!["command_jid","command_node"].includes(e.getAttribute("name"))).map(fx.webForm2xForm).filter(e=>e),s=hx({to:n,type:"set"}).c("command",{sessionid:i.sessionid,node:i.node,xmlns:dx.NS.ADHOC}).c("x",{xmlns:dx.NS.XFORM,type:"submit"});let a;o.forEach(e=>s.cnode(e).up());try{a=await Vc.sendIQ(s)}catch(e){i.alert_type="danger",i.alert=zd("Sorry, an error occurred while trying to execute the command. See the developer console for details"),zn.error("Error while trying to execute an ad-hoc command"),zn.error(e)}var c;a?i.alert=null===(c=a.querySelector("note"))||void 0===c?void 0:c.textContent:i.alert="Done";i.alert_type="primary",this.nonce=fx.getUniqueId()}});var bx=e=>{const t=zd("Settings"),n=zd("%1$s Open Source %2$s XMPP chat client brought to you by %3$s Opkode %2$s",'<a target="_blank" rel="nofollow" href="https://conversejs.org">',"</a>",'<a target="_blank" rel="nofollow" href="https://opkode.com">'),r=zd("%1$s Translate %2$s it into your own language",'<a target="_blank" rel="nofollow" href="https://hosted.weblate.org/projects/conversejs/#languages">',"</a>"),i=Vc.settings.get("show_client_info"),o=Vc.settings.get("allow_adhoc_commands"),s=i&&o;return Za(mx(),t,mf,s?(e=>{const t=zd("About"),n=zd("Commands");return Za(vx(),e.switchTab,t,e.switchTab,n)})(e):"",i?"active":"",e.version_name,Kp(Qp.a.filterXSS(n,{whiteList:{a:[]}})),Kp(Qp.a.filterXSS(r,{whiteList:{a:[]}})),!i&&o?"active":"")};let yx;var wx=df.extend({id:"converse-client-info-modal",initialize(e){yx=e._converse,df.prototype.initialize.apply(this,arguments)},toHTML(){return bx(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{version_name:yx.VERSION_NAME}))}});function Sx(){const e=Ax(['<a class="controlbox-heading__btn logout fa fa-sign-out-alt align-self-center" title="','"></a>']);return Sx=function(){return e},e}function xx(){const e=Ax(['<a class="controlbox-heading__btn show-client-info fa fa-cog align-self-center" title="','" @click=',"></a>"]);return xx=function(){return e},e}function Ex(){const e=Ax(['\n    <div class="userinfo controlbox-padded">\n        <div class="controlbox-section profile d-flex">\n            <a class="show-profile" href="#">\n                <canvas class="avatar align-self-center" height="40" width="40"></canvas>\n            </a>\n            <span class="username w-100 align-self-center">',"</span>\n            ","\n            ",'\n        </div>\n        <div class="d-flex xmpp-status">\n            <a class="change-status" title="','" data-toggle="modal" data-target="#changeStatusModal">\n                <span class="',' w-100 align-self-center" data-value="','">\n                    <span class="\n                        ',"\n                        ","\n                        ","\n                        ","\n                        ",'"></span> ',"</span>\n            </a>\n        </div>\n    </div>\n"]);return Ex=function(){return e},e}function Ax(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
-/**
- * @module converse-profile
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-rl.plugins.add("converse-profile",{dependencies:["converse-status","converse-modal","converse-vcard","converse-chatboxviews"],initialize(){Vc.settings.extend({allow_adhoc_commands:!0,show_client_info:!0}),Uc.XMPPStatusView=Uc.ViewWithAvatar.extend({tagName:"div",events:{"click a.show-profile":"showProfileModal","click a.change-status":"showStatusChangeModal","click .logout":"logOut"},initialize(){this.listenTo(this.model,"change",this.render),this.listenTo(this.model.vcard,"change",this.render)},toHTML(){const e=this.model.get("status")||"offline";return(e=>{const t=zd("Log out"),n=zd("Click to change your chat status"),r=zd("Show details about this chat client"),i=Vc.settings.get("show_client_info")||Vc.settings.get("allow_adhoc_commands");return Za(Ex(),e.fullname,i?Za(xx(),r,e.showUserSettingsModal):"",Vc.settings.get("allow_logout")?Za(Sx(),t):"",n,e.chat_status,e.chat_status,"online"===e.chat_status&&"fa fa-circle chat-status chat-status--online","dnd"===e.chat_status&&"fa fa-minus-circle chat-status chat-status--busy","away"===e.chat_status&&"fa fa-circle chat-status chat-status--away","xa"===e.chat_status&&"far fa-circle chat-status chat-status--xa ","offline"===e.chat_status&&"fa fa-circle chat-status chat-status--offline",e.status_message)})(Object.assign(this.model.toJSON(),this.model.vcard.toJSON(),{chat_status:e,fullname:this.model.vcard.get("fullname")||Uc.bare_jid,showUserSettingsModal:e=>this.showUserSettingsModal(e),status_message:this.model.get("status_message")||zd("I am %1$s",this.getPrettyStatus(e))}))},afterRender(){this.renderAvatar()},showProfileModal(e){e.preventDefault(),Vc.modal.show(Uc.ProfileModal,{model:this.model},e)},showStatusChangeModal(e){e.preventDefault(),Vc.modal.show(Uc.ChatStatusModal,{model:this.model},e)},showUserSettingsModal(e){e.preventDefault(),Vc.modal.show(wx,{model:this.model,_converse:Uc},e)},logOut(e){e.preventDefault(),!0===confirm(zd("Are you sure you want to log out?"))&&Vc.user.logout()},getPrettyStatus:e=>"chat"===e?zd("online"):"dnd"===e?zd("busy"):"xa"===e?zd("away for long"):"away"===e?zd("away"):"offline"===e?zd("offline"):zd(e)||zd("online")}),Vc.listen.on("controlBoxPaneInitialized",async e=>{await Vc.waitUntil("VCardsInitialized"),Uc.xmppstatusview=new Uc.XMPPStatusView({model:Uc.xmppstatus}),e.el.insertAdjacentElement("afterBegin",Uc.xmppstatusview.render().el)})}});var Cx=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return dt(ke(n)?it(n):[n],Mo(t,1))},jx=Math.ceil,Tx=Math.max;var Ox=function(e,t,n,r){for(var i=-1,o=Tx(jx((t-e)/(n||1)),0),s=Array(o);o--;)s[r?o:++i]=e,e+=n;return s};var kx=function(e){return function(t,n,r){return r&&"number"!=typeof r&&Tr(t,n,r)&&(n=r=void 0),t=hi(t),void 0===n?(n=t,t=0):n=hi(n),r=void 0===r?t<n?1:-1:hi(r),Ox(t,n,r,e)}}();function Nx(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}
-/**
- * @module converse-omemo
- * @copyright The Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */(['\n        <button class="toggle-omemo"\n                title="','"\n                ?disabled=',"\n                @click=",'>\n        <converse-icon class="fa ','"\n                    path-prefix="','" size="1em"\n                    color="','"\n        ></converse-icon>\n        </button>']);return Nx=function(){return e},e}const{Strophe:Ix,sizzle:Mx,$build:Rx,$iq:Dx,$msg:Px}=rl.env,Lx=rl.env.utils;Ix.addNamespace("OMEMO_DEVICELIST",Ix.NS.OMEMO+".devicelist"),Ix.addNamespace("OMEMO_VERIFICATION",Ix.NS.OMEMO+".verification"),Ix.addNamespace("OMEMO_WHITELISTED",Ix.NS.OMEMO+".whitelisted"),Ix.addNamespace("OMEMO_BUNDLES",Ix.NS.OMEMO+".bundles");const zx={name:"AES-GCM",length:128};class Fx extends Error{constructor(e,t){super(e,t),this.name="IQError",this.iq=t}}function Bx(e,t){return t.is_encrypted&&t.encrypted.key?!0===t.encrypted.prekey?async function(e){const t=$x(e.from,parseInt(e.encrypted.device_id,10)),n=Lx.base64ToArrayBuffer(e.encrypted.key);let r;try{r=await t.decryptPreKeyWhisperMessage(n,"binary")}catch(t){return zn.error("".concat(t.name," ").concat(t.message)),Object.assign(e,Gx(t))}try{const t=await Wx(e,r);return await Uc.omemo_store.generateMissingPreKeys(),await Uc.omemo_store.publishBundle(),t?Object.assign(e,{plaintext:t}):Object.assign(e,{is_only_key:!0})}catch(t){return zn.error("".concat(t.name," ").concat(t.message)),Object.assign(e,Gx(t))}}(t):async function(e){const t=e.from_muc?e.from_real_jid:e.from;t||Object.assign(e,{error_text:zd("Sorry, could not decrypt a received OMEMO because we don't have the JID for that user."),error_type:"Decryption",is_ephemeral:!1,is_error:!0,type:"error"});const n=$x(t,parseInt(e.encrypted.device_id,10)),r=Lx.base64ToArrayBuffer(e.encrypted.key);try{const t=await n.decryptWhisperMessage(r,"binary"),i=await Wx(e,t);return Object.assign(e,{plaintext:i})}catch(t){return zn.error("".concat(t.name," ").concat(t.message)),Object.assign(e,Gx(t))}}(t):t}function qx(){Uc.chatboxes.on("add",e=>{tE(e),e.get("type")===Uc.CHATROOMS_TYPE&&(e.occupants.on("add",t=>async function(e,t){if(t.isSelf()||!e.features.get("nonanonymous")||!e.features.get("membersonly"))return;if(e.get("omemo_active")){await Uc.contactHasOMEMOSupport(t.get("jid"))||(e.createMessage({message:zd("%1$s doesn't appear to have a client that supports OMEMO. Encrypted chat will no longer be possible in this grouchat.",t.get("nick")),type:"error"}),e.save({omemo_active:!1,omemo_supported:!1}))}}(e,t)),e.features.on("change",()=>tE(e)))})}function Hx(e){e.listenTo(e.model.messages,"add",t=>{t.get("is_encrypted")&&!t.get("is_error")&&e.model.save("omemo_supported",!0)}),e.listenTo(e.model,"change:omemo_supported",()=>{var t;!e.model.get("omemo_supported")&&e.model.get("omemo_active")?e.model.set("omemo_active",!1):null===(t=e.el.querySelector("converse-chat-toolbar"))||void 0===t||t.requestUpdate()}),e.listenTo(e.model,"change:omemo_active",()=>{e.el.querySelector("converse-chat-toolbar").requestUpdate()})}const Ux=rl.env.omemo={async encryptMessage(e){const t=crypto.getRandomValues(new window.Uint8Array(12)),n=await crypto.subtle.generateKey(zx,!0,["encrypt","decrypt"]),r={name:"AES-GCM",iv:t,tagLength:128},i=await crypto.subtle.encrypt(r,n,Lx.stringToArrayBuffer(e)),o=i.byteLength-16,s=i.slice(0,o),a=i.slice(o),c=await crypto.subtle.exportKey("raw",n);return{key:c,tag:a,key_and_tag:Lx.appendArrayBuffer(c,a),payload:Lx.arrayBufferToBase64(s),iv:Lx.arrayBufferToBase64(t)}},async decryptMessage(e){const t=await crypto.subtle.importKey("raw",e.key,zx,!0,["encrypt","decrypt"]),n=Lx.appendArrayBuffer(Lx.base64ToArrayBuffer(e.payload),e.tag),r={name:"AES-GCM",iv:Lx.base64ToArrayBuffer(e.iv),tagLength:128};return Lx.arrayBufferToString(await crypto.subtle.decrypt(r,t,n))}};function $x(e,t){const n=new libsignal.SignalProtocolAddress(e,t);return new window.libsignal.SessionCipher(Uc.omemo_store,n)}async function Wx(e,t){const n=e.encrypted,r=Uc.devicelists.getDeviceList(e.from);await r._devices_promise;let i=r.get(n.device_id);if(i||(i=await r.devices.create({id:n.device_id,jid:e.from},{promise:!0})),n.payload){const e=t.slice(0,16),r=t.slice(16),o=await Ux.decryptMessage(Object.assign(n,{key:e,tag:r}));return i.save("active",!0),o}}function Gx(e){return"debug"===Vc.settings.get("loglevel")?{error_text:zd("Sorry, could not decrypt a received OMEMO message due to an error.")+" ".concat(e.name," ").concat(e.message),error_type:"Decryption",is_ephemeral:!0,is_error:!0,type:"error"}:{}}function Vx(e){const t=e.querySelector("signedPreKeyPublic"),n=e.querySelector("signedPreKeySignature"),r=Mx("prekeys > preKeyPublic",e).map(e=>({id:parseInt(e.getAttribute("preKeyId"),10),key:e.textContent}));return{identity_key:e.querySelector("identityKey").textContent.trim(),signed_prekey:{id:parseInt(t.getAttribute("signedPreKeyId"),10),public_key:t.textContent,signature:n.textContent},prekeys:r}}async function Jx(e){var t;if(null===(t=e.get("bundle"))||void 0===t?void 0:t.fingerprint)return;const n=await e.getBundle();n.fingerprint=Lx.arrayBufferToHex(Lx.base64ToArrayBuffer(n.identity_key)),e.save("bundle",n),e.trigger("change:bundle")}async function Xx(e){await Vc.waitUntil("OMEMOInitialized");const t=Uc.devicelists.get(e)||Uc.devicelists.create({jid:e});return await t.fetchDevices(),t.devices}async function Qx(e){if(!e.get("bundle"))return zn.error("Could not build an OMEMO session for device ".concat(e.get("id")," because we don't have its bundle")),null;const t=new libsignal.SignalProtocolAddress(e.get("jid"),e.get("id")),n=await Uc.omemo_store.loadSession(t.toString());if(n)return n;try{return await async function(e){const t=new libsignal.SignalProtocolAddress(e.get("jid"),e.get("id")),n=new libsignal.SessionBuilder(Uc.omemo_store,t),r=e.getRandomPreKey(),i=await e.getBundle();return n.processPreKey({registrationId:parseInt(e.get("id"),10),identityKey:Lx.base64ToArrayBuffer(i.identity_key),signedPreKey:{keyId:i.signed_prekey.id,publicKey:Lx.base64ToArrayBuffer(i.signed_prekey.public_key),signature:Lx.base64ToArrayBuffer(i.signed_prekey.signature)},preKey:{keyId:r.id,publicKey:Lx.base64ToArrayBuffer(r.key)}})}(e)}catch(t){return zn.error("Could not build an OMEMO session for device ".concat(e.get("id"))),zn.error(t),null}}function Yx(){Uc.connection.addHandler(e=>{try{Mx('event[xmlns="'.concat(Ix.NS.PUBSUB,'#event"]'),e).length&&(function(e){const t=Mx('items[node="'.concat(Ix.NS.OMEMO_DEVICELIST,'"]'),e).pop();if(!t)return;const n='item list[xmlns="'.concat(Ix.NS.OMEMO,'"] device'),r=Mx(n,t).map(e=>e.getAttribute("id")),i=e.getAttribute("from"),o=Uc.devicelists.getDeviceList(i),s=o.devices;ks(s.pluck("id"),r).forEach(e=>{i===Uc.bare_jid&&e===Uc.omemo_store.get("device_id")||s.get(e).save("active",!1)}),r.forEach(e=>{const t=s.get(e);t?t.save("active",!0):s.create({id:e,jid:i})}),Lx.isSameBareJID(i,Uc.bare_jid)&&o.publishCurrentDevice(r)}(e),function(e){const t=Mx("items",e).pop();if(!t||!t.getAttribute("node").startsWith(Ix.NS.OMEMO_BUNDLES))return;const n=t.getAttribute("node").split(":")[1],r=e.getAttribute("from"),i=Mx("item > bundle",t).pop(),o=Uc.devicelists.getDeviceList(r);(o.devices.get(n)||o.devices.create({id:n,jid:r})).save({bundle:Vx(i)})}(e))}catch(e){zn.error(e.message)}return!0},null,"message","headline")}function Kx(){if(void 0===Uc.omemo_store){const e="converse.omemosession-".concat(Uc.bare_jid);Uc.omemo_store=new Uc.OMEMOStore({id:e}),Uc.omemo_store.browserStorage=Uc.createStore(e)}return Uc.omemo_store.fetchSession()}async function Zx(){await new Promise((e,t)=>Uc.devicelists.fetch({success:e,error:(e,n)=>t(n)}));let e=Uc.devicelists.get(Uc.bare_jid);return e?e.fetchDevices():e=await Uc.devicelists.create({jid:Uc.bare_jid},{promise:!0}),e._devices_promise}async function eE(){if(!Uc.config.get("trusted")||Vc.settings.get("clear_cache_on_logout"))return void zn.warn("Not initializing OMEMO, since this browser is not trusted or clear_cache_on_logout is set to true");Uc.devicelists=new Uc.DeviceLists;const e="converse.devicelists-".concat(Uc.bare_jid);Uc.devicelists.browserStorage=Uc.createStore(e);try{await Zx(),await Kx(),await Uc.omemo_store.publishBundle()}catch(e){return zn.error("Could not initialize OMEMO support"),void zn.error(e)}Vc.trigger("OMEMOInitialized")}async function tE(e){let t;e.get("type")===Uc.CHATROOMS_TYPE?(await Vc.waitUntil("OMEMOInitialized"),t=e.features.get("nonanonymous")&&e.features.get("membersonly")):e.get("type")===Uc.PRIVATE_CHAT_TYPE&&(t=await Uc.contactHasOMEMOSupport(e.get("jid"))),e.set("omemo_supported",t),t&&Vc.settings.get("omemo_default")&&e.set("omemo_active",!0)}function nE(e){e.stopPropagation(),e.preventDefault();const t=Lx.ancestor(e.target,"converse-chat-toolbar");if(!t.model.get("omemo_supported")){let e;return e=t.model.get("type")===Uc.CHATROOMS_TYPE?[zd("Cannot use end-to-end encryption in this groupchat, either the groupchat has some anonymity or not all participants support OMEMO.")]:[zd("Cannot use end-to-end encryption because %1$s uses a client that doesn't support OMEMO.",t.model.contact.getDisplayName())],Vc.alert("error",zd("Error"),e)}t.model.save({omemo_active:!t.model.get("omemo_active")})}function rE(e,t){const n=e.model;let r;if(n.get("type")===Uc.CHATROOMS_TYPE&&n.get("omemo_supported")){const e=zd("Messages are being sent in plaintext"),t=zd("Messages are sent encrypted");r=n.get("omemo_active")?t:e}else r=zd("This groupchat needs to be members-only and non-anonymous in order to support OMEMO encrypted messages");return t.push(Za(Nx(),r,!n.get("omemo_supported"),nE,n.get("omemo_active")?"fa-lock":"fa-unlock",Vc.settings.get("assets_path"),n.get("omemo_active")?"var(--info-color)":"var(--error-color)")),t}const iE={encryptKey:(e,t)=>$x(t.get("jid"),t.get("id")).encrypt(e).then(e=>({payload:e,device:t})),handleMessageSendError(e){if("IQError"===e.name){this.save("omemo_supported",!1);const t=[];Mx('presence-subscription-required[xmlns="'.concat(Ix.NS.PUBSUB_ERROR,'"]'),e.iq).length?t.push(zd("Sorry, we're unable to send an encrypted message because %1$s requires you to be subscribed to their presence in order to see their OMEMO information",e.iq.getAttribute("from"))):Mx('remote-server-not-found[xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"]',e.iq).length?t.push(zd("Sorry, we're unable to send an encrypted message because the remote server for %1$s could not be found",e.iq.getAttribute("from"))):(t.push(zd("Unable to send an encrypted message due to an unexpected error.")),t.push(e.iq.outerHTML)),Vc.alert("error",zd("Error"),t),zn.error(e)}else{if(!e.user_facing)throw e;Vc.alert("error",zd("Error"),[e.message]),zn.error(e)}}};rl.plugins.add("converse-omemo",{enabled:e=>window.libsignal&&e.config.get("trusted")&&!Vc.settings.get("clear_cache_on_logout")&&!e.api.settings.get("blacklisted_plugins").includes("converse-omemo"),dependencies:["converse-chatview","converse-pubsub","converse-profile"],overrides:{ProfileModal:{events:{"change input.select-all":"selectAll","click .generate-bundle":"generateOMEMODeviceBundle","submit .fingerprint-removal":"removeSelectedFingerprints"},initialize(){return this.debouncedRender=Rc(this.render,50),this.devicelist=Uc.devicelists.get(Uc.bare_jid),this.listenTo(this.devicelist.devices,"change:bundle",this.debouncedRender),this.listenTo(this.devicelist.devices,"reset",this.debouncedRender),this.listenTo(this.devicelist.devices,"reset",this.debouncedRender),this.listenTo(this.devicelist.devices,"remove",this.debouncedRender),this.listenTo(this.devicelist.devices,"add",this.debouncedRender),this.__super__.initialize.apply(this,arguments)},beforeRender(){const e=Uc.omemo_store.get("device_id");if(e&&(this.current_device=this.devicelist.devices.get(e)),this.other_devices=this.devicelist.devices.filter(t=>t.get("id")!==e),this.__super__.beforeRender)return this.__super__.beforeRender.apply(this,arguments)},selectAll(e){let t=Lx.ancestor(e.target,"li");for(;t;)t.querySelector('input[type="checkbox"]').checked=e.target.checked,t=t.nextElementSibling},removeSelectedFingerprints(e){e.preventDefault(),e.stopPropagation(),e.target.querySelector(".select-all").checked=!1;const t=Mx('.fingerprint-removal-item input[type="checkbox"]:checked',e.target).map(e=>e.value);this.devicelist.removeOwnDevices(t).then(this.modal.hide).catch(e=>{zn.error(e),Uc.api.alert(Ix.LogLevel.ERROR,zd("Error"),[zd("Sorry, an error occurred while trying to remove the devices.")])})},generateOMEMODeviceBundle(e){e.preventDefault(),confirm(zd("Are you sure you want to generate new OMEMO keys? This will remove your old keys and all previously encrypted messages will no longer be decryptable on this device."))&&Vc.omemo.bundle.generate()}},UserDetailsModal:{events:{"click .fingerprint-trust .btn input":"toggleDeviceTrust"},initialize(){const e=this.model.get("jid");return this.devicelist=Uc.devicelists.getDeviceList(e),this.listenTo(this.devicelist.devices,"change:bundle",this.render),this.listenTo(this.devicelist.devices,"change:trusted",this.render),this.listenTo(this.devicelist.devices,"remove",this.render),this.listenTo(this.devicelist.devices,"add",this.render),this.listenTo(this.devicelist.devices,"reset",this.render),this.__super__.initialize.apply(this,arguments)},toggleDeviceTrust(e){const t=e.target;this.devicelist.devices.get(t.getAttribute("name")).save("trusted",parseInt(t.value,10))}},ChatBox:{async sendMessage(e,t){if(this.get("omemo_active")&&e){const n=this.getOutgoingMessageAttributes(e,t);let r,i;n.is_encrypted=!0,n.plaintext=n.message;try{const e=await Uc.getBundlesAndBuildSessions(this);r=await this.createMessage(n),i=await Uc.createOMEMOMessageStanza(this,r,e)}catch(e){return this.handleMessageSendError(e),null}return Uc.api.send(i),r}return this.__super__.sendMessage.apply(this,arguments)}}},initialize(){Vc.settings.extend({omemo_default:!1}),Vc.promises.add(["OMEMOInitialized"]),Uc.NUM_PREKEYS=100,Object.assign(Uc.ChatBox.prototype,iE),Uc.generateFingerprints=async function(e){const t=await Xx(e);return Promise.all(t.map(e=>Jx(e)))},Uc.getDeviceForContact=function(e,t){return Xx(e).then(e=>e.get(t))},Uc.contactHasOMEMOSupport=async function(e){return(await Xx(e)).length>0},Uc.getBundlesAndBuildSessions=async function(e){const t=zd("Sorry, no devices found to which we can send an OMEMO encrypted message.");let n;if(e.get("type")===Uc.CHATROOMS_TYPE){const t=await Promise.all(e.occupants.map(e=>Xx(e.get("jid"))));n=t.reduce((e,t)=>Cx(e,t.models),[])}else if(e.get("type")===Uc.PRIVATE_CHAT_TYPE){const r=await Xx(e.get("jid"));if(0===r.length){const e=new Error(t);throw e.user_facing=!0,e}const i=Uc.devicelists.get(Uc.bare_jid).devices;n=[...i.models,...r.models]}const r=Uc.omemo_store.get("device_id");n=n.filter(e=>e.get("id")!==r),await Promise.all(n.map(e=>e.getBundle()));const i=n.filter(e=>e).map(e=>Qx(e));if(await Promise.all(i),i.includes(null)&&(n=n.filter(e=>i[n.indexOf(e)]),0===n.length)){const e=new Error(t);throw e.user_facing=!0,e}return n},Uc.createOMEMOMessageStanza=function(e,t,n){const r=zd("This is an OMEMO encrypted message which your client doesn’t seem to support. Find more information on https://conversations.im/omemo");if(!t.get("message"))throw new Error("No message body to encrypt!");const i=Px({from:Uc.connection.jid,to:e.get("jid"),type:e.get("message_type"),id:t.get("msgid")}).c("body").t(r).up();return"chat"===t.get("type")&&i.c("request",{xmlns:Ix.NS.RECEIPTS}).up(),i.c("encrypted",{xmlns:Ix.NS.OMEMO}).c("header",{sid:Uc.omemo_store.get("device_id")}),Ux.encryptMessage(t.get("message")).then(t=>{const r=n.filter(e=>-1!=e.get("trusted")&&e.get("active")).map(n=>e.encryptKey(t.key_and_tag,n));return Promise.all(r).then(e=>function(e,t,n){for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const i=t[r].payload,o=t[r].device,s=3==parseInt(i.type,10);e.c("key",{rid:o.get("id")}).t(btoa(i.body)),s&&e.attrs({prekey:s}),e.up(),r==t.length-1&&e.c("iv").t(n).up().up()}return Promise.resolve(e)}(i,e,t.iv)).then(e=>(e.c("payload").t(t.payload).up().up(),e.c("store",{xmlns:Ix.NS.HINTS}),e))})},Uc.OMEMOStore=qo.extend({Direction:{SENDING:1,RECEIVING:2},getIdentityKeyPair(){const e=this.get("identity_keypair");return Promise.resolve({privKey:Lx.base64ToArrayBuffer(e.privKey),pubKey:Lx.base64ToArrayBuffer(e.pubKey)})},getLocalRegistrationId(){return Promise.resolve(parseInt(this.get("device_id"),10))},isTrustedIdentity(e,t,n){if(null==e)throw new Error("Can't check identity key for invalid key");if(!(t instanceof ArrayBuffer))throw new Error("Expected identity_key to be an ArrayBuffer");const r=this.get("identity_key"+e);return void 0===r?Promise.resolve(!0):Promise.resolve(Lx.arrayBufferToBase64(t)===r)},loadIdentityKey(e){if(null==e)throw new Error("Can't load identity_key for invalid identifier");return Promise.resolve(Lx.base64ToArrayBuffer(this.get("identity_key"+e)))},saveIdentity(e,t){if(null==e)throw new Error("Can't save identity_key for invalid identifier");const n=new libsignal.SignalProtocolAddress.fromString(e),r=this.get("identity_key"+n.getName()),i=Lx.arrayBufferToBase64(t);return this.save("identity_key"+n.getName(),i),r&&i!==r?Promise.resolve(!0):Promise.resolve(!1)},getPreKeys(){return this.get("prekeys")||{}},loadPreKey(e){const t=this.getPreKeys()[e];return t?Promise.resolve({privKey:Lx.base64ToArrayBuffer(t.privKey),pubKey:Lx.base64ToArrayBuffer(t.pubKey)}):Promise.resolve()},storePreKey(e,t){const n={};return n[e]={pubKey:Lx.arrayBufferToBase64(t.pubKey),privKey:Lx.arrayBufferToBase64(t.privKey)},this.save("prekeys",Object.assign(this.getPreKeys(),n)),Promise.resolve()},removePreKey(e){return this.save("prekeys",Po(this.getPreKeys(),e)),Promise.resolve()},loadSignedPreKey(e){const t=this.get("signed_prekey");return t?Promise.resolve({privKey:Lx.base64ToArrayBuffer(t.privKey),pubKey:Lx.base64ToArrayBuffer(t.pubKey)}):Promise.resolve()},storeSignedPreKey(e){if("object"!=typeof e)throw new Error("storeSignedPreKey: expected an object");return this.save("signed_prekey",{id:e.keyId,privKey:Lx.arrayBufferToBase64(e.keyPair.privKey),pubKey:Lx.arrayBufferToBase64(e.keyPair.pubKey),signature:Lx.arrayBufferToBase64(e.signature)}),Promise.resolve()},removeSignedPreKey(e){return this.get("signed_prekey").id===e&&(this.unset("signed_prekey"),this.save()),Promise.resolve()},loadSession(e){return Promise.resolve(this.get("session"+e))},storeSession(e,t){return Promise.resolve(this.save("session"+e,t))},removeSession(e){return Promise.resolve(this.unset("session"+e))},removeAllSessions(e){const t=Object.keys(this.attributes).filter(t=>!!t.startsWith("session"+e)&&t),n={};return t.forEach(e=>{n[e]=void 0}),this.save(n),Promise.resolve()},publishBundle(){const e=this.get("signed_prekey"),t="".concat(Ix.NS.OMEMO_BUNDLES,":").concat(this.get("device_id")),n=Rx("item").c("bundle",{xmlns:Ix.NS.OMEMO}).c("signedPreKeyPublic",{signedPreKeyId:e.id}).t(e.pubKey).up().c("signedPreKeySignature").t(e.signature).up().c("identityKey").t(this.get("identity_keypair").pubKey).up().c("prekeys");Object.values(this.get("prekeys")).forEach((e,t)=>n.c("preKeyPublic",{preKeyId:t}).t(e.pubKey).up());return Vc.pubsub.publish(null,t,n,{"pubsub#access_model":"open"},!1)},async generateMissingPreKeys(){const e=ks(rh(kx(0,Uc.NUM_PREKEYS),Number.prototype.toString),Object.keys(this.getPreKeys()));if(e.length<1)return zn.warn("No missing prekeys to generate for our own device"),Promise.resolve();(await Promise.all(e.map(e=>libsignal.KeyHelper.generatePreKey(parseInt(e,10))))).forEach(e=>this.storePreKey(e.keyId,e.keyPair));const t=Object.keys(this.getPreKeys()).map(e=>({id:e.keyId,key:Lx.arrayBufferToBase64(e.pubKey)})),n=Uc.devicelists.get(Uc.bare_jid).devices.get(this.get("device_id")),r=await n.getBundle();n.save("bundle",Object.assign(r,{prekeys:t}))},async generateBundle(){const e=await libsignal.KeyHelper.generateIdentityKeyPair(),t={},n=Lx.arrayBufferToBase64(e.pubKey),r=function(){const e=Uc.devicelists.get(Uc.bare_jid).devices.pluck("id");let t=libsignal.KeyHelper.generateRegistrationId(),n=0;for(;e.includes(t);)if(t=libsignal.KeyHelper.generateRegistrationId(),n++,10===n)throw new Error("Unable to generate a unique device ID");return t.toString()}();t.identity_key=n,t.device_id=r,this.save({device_id:r,identity_keypair:{privKey:Lx.arrayBufferToBase64(e.privKey),pubKey:n},identity_key:n});const i=await libsignal.KeyHelper.generateSignedPreKey(e,0);Uc.omemo_store.storeSignedPreKey(i),t.signed_prekey={id:i.keyId,public_key:Lx.arrayBufferToBase64(i.keyPair.privKey),signature:Lx.arrayBufferToBase64(i.signature)};const o=await Promise.all(kx(0,Uc.NUM_PREKEYS).map(e=>libsignal.KeyHelper.generatePreKey(e)));o.forEach(e=>Uc.omemo_store.storePreKey(e.keyId,e.keyPair));const s=Uc.devicelists.get(Uc.bare_jid),a=await s.devices.create({id:t.device_id,jid:Uc.bare_jid},{promise:!0}),c=o.map(e=>({id:e.keyId,key:Lx.arrayBufferToBase64(e.keyPair.pubKey)}));t.prekeys=c,a.save("bundle",t)},fetchSession(){return void 0===this._setup_promise&&(this._setup_promise=new Promise((e,t)=>{this.fetch({success:()=>{Uc.omemo_store.get("device_id")?e():this.generateBundle().then(e).catch(t)},error:(n,r)=>{zn.warn("Could not fetch OMEMO session from cache, we'll generate a new one."),zn.warn(r),this.generateBundle().then(e).catch(t)}})})),this._setup_promise}}),Uc.Device=qo.extend({defaults:{trusted:0,active:!0},getRandomPreKey(){const e=this.get("bundle");return e.prekeys[Lx.getRandomInt(e.prekeys.length)]},async fetchBundleFromServer(){const e=Dx({type:"get",from:Uc.bare_jid,to:this.get("jid")}).c("pubsub",{xmlns:Ix.NS.PUBSUB}).c("items",{node:"".concat(Ix.NS.OMEMO_BUNDLES,":").concat(this.get("id"))});let t;try{t=await Vc.sendIQ(e)}catch(t){return zn.error("Could not fetch bundle for device ".concat(this.get("id")," from ").concat(this.get("jid"))),zn.error(t),null}if(t.querySelector("error"))throw new Fx("Could not fetch bundle",t);const n=Mx('items[node="'.concat(Ix.NS.OMEMO_BUNDLES,":").concat(this.get("id"),'"]'),t).pop(),r=Vx(Mx('bundle[xmlns="'.concat(Ix.NS.OMEMO,'"]'),n).pop());return this.save("bundle",r),r},getBundle(){return this.get("bundle")?Promise.resolve(this.get("bundle"),this):this.fetchBundleFromServer()}}),Uc.Devices=ra.extend({model:Uc.Device}),Uc.DeviceList=qo.extend({idAttribute:"jid",initialize(){this.devices=new Uc.Devices;const e="converse.devicelist-".concat(Uc.bare_jid,"-").concat(this.get("jid"));this.devices.browserStorage=Uc.createStore(e),this.fetchDevices()},async onDevicesFound(e){if(0===e.length){let e;try{e=await this.fetchDevicesFromServer()}catch(e){null===e?zn.error("Timeout error while fetching devices for ".concat(this.get("jid"))):(zn.error("Could not fetch devices for ".concat(this.get("jid"))),zn.error(e)),this.destroy()}this.get("jid")===Uc.bare_jid&&await this.publishCurrentDevice(e)}},fetchDevices(){return void 0===this._devices_promise&&(this._devices_promise=new Promise(e=>{this.devices.fetch({success:t=>e(this.onDevicesFound(t)),error:(t,n)=>{zn.error(n),e()}})})),this._devices_promise},async getOwnDeviceId(){let e=Uc.omemo_store.get("device_id");return this.devices.findWhere({id:e})||(await Uc.omemo_store.generateBundle(),e=Uc.omemo_store.get("device_id")),e},async publishCurrentDevice(e){if(this.get("jid")===Uc.bare_jid){if(await Kx(),Uc.omemo_store)return e.includes(await this.getOwnDeviceId())?void 0:this.publishDevices();zn.warn("publishCurrentDevice: omemo_store is not defined, likely a timing issue")}},async fetchDevicesFromServer(){const e=Dx({type:"get",from:Uc.bare_jid,to:this.get("jid")}).c("pubsub",{xmlns:Ix.NS.PUBSUB}).c("items",{node:Ix.NS.OMEMO_DEVICELIST});let t;try{t=await Vc.sendIQ(e)}catch(e){return zn.error(e),[]}const n='list[xmlns="'.concat(Ix.NS.OMEMO,'"] device'),r=Mx(n,t).map(e=>e.getAttribute("id"));return await Promise.all(r.map(e=>this.devices.create({id:e,jid:this.get("jid")},{promise:!0}))),r},publishDevices(){const e=Rx("item",{id:"current"}).c("list",{xmlns:Ix.NS.OMEMO});this.devices.filter(e=>e.get("active")).forEach(t=>e.c("device",{id:t.get("id")}).up());return Vc.pubsub.publish(null,Ix.NS.OMEMO_DEVICELIST,e,{"pubsub#access_model":"open"},!1)},removeOwnDevices(e){if(this.get("jid")!==Uc.bare_jid)throw new Error("Cannot remove devices from someone else's device list");return e.forEach(e=>this.devices.get(e).destroy()),this.publishDevices()}}),Uc.DeviceLists=ra.extend({model:Uc.DeviceList,getDeviceList(e){return this.get(e)||this.create({jid:e})}}),Vc.waitUntil("chatBoxesInitialized").then(qx),Vc.listen.on("parseMessage",Bx),Vc.listen.on("parseMUCMessage",Bx),Vc.listen.on("chatBoxViewInitialized",Hx),Vc.listen.on("chatRoomViewInitialized",Hx),Vc.listen.on("connected",Yx),Vc.listen.on("getToolbarButtons",rE),Vc.listen.on("statusInitialized",eE),Vc.listen.on("addClientFeatures",()=>Vc.disco.own.features.add("".concat(Ix.NS.OMEMO_DEVICELIST,"+notify"))),Vc.listen.on("userDetailsModalInitialized",e=>{const t=e.get("jid");Uc.generateFingerprints(t).catch(e=>zn.error(e))}),Vc.listen.on("profileModalInitialized",()=>{Uc.generateFingerprints(Uc.bare_jid).catch(e=>zn.error(e))}),Vc.listen.on("afterTearDown",()=>delete Uc.omemo_store),Vc.listen.on("clearSession",()=>{Uc.shouldClearCache()&&Uc.devicelists&&(Uc.devicelists.clearStore(),delete Uc.devicelists)}),Object.assign(Uc.api,{omemo:{bundle:{generate:async()=>{const e=Uc.devicelists.get(Uc.bare_jid),t=Uc.omemo_store.get("device_id");if(t){const n=e.devices.get(t);Uc.omemo_store.unset(t),n&&await new Promise(e=>n.destroy({success:e,error:e})),e.devices.trigger("remove")}await Uc.omemo_store.generateBundle(),await e.publishDevices();const n=Jx(e.devices.get(Uc.omemo_store.get("device_id")));return await Uc.omemo_store.publishBundle(),n}}}})}});
-/**
- * @module converse-push
- * @description
- * Converse.js plugin which add support for registering
- * an "App Server" as defined in  XEP-0357
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:oE,$iq:sE}=rl.env;oE.addNamespace("PUSH","urn:xmpp:push:0"),rl.plugins.add("converse-push",{initialize(){async function e(e){e=e||Uc.bare_jid;const t=Uc.session.get("push_enabled")||[];if(t.includes(e))return;const n=Vc.settings.get("push_app_servers").filter(e=>!e.disable),r=Vc.settings.get("push_app_servers").filter(e=>e.disable),i=n.map(t=>async function(e,t){if(!t.jid||!t.node)return;if(!await Vc.disco.getIdentity("pubsub","push",t.jid))return zn.warn('Not enabling push the service "'.concat(t.jid,"\", it doesn't have the right disco identtiy."));const n=await Promise.all([Vc.disco.supports(oE.NS.PUSH,t.jid),Vc.disco.supports(oE.NS.PUSH,e)]);if(!n[0]&&!n[1])return void zn.warn('Not enabling push app server "'.concat(t.jid,'", no disco support from your server.'));const r=sE({type:"set"});return e!==Uc.bare_jid&&r.attrs({to:e}),r.c("enable",{xmlns:oE.NS.PUSH,jid:t.jid,node:t.node}),t.secret&&r.c("x",{xmlns:oE.NS.XFORM,type:"submit"}).c("field",{var:"FORM_TYPE"}).c("value").t("".concat(oE.NS.PUBSUB,"#publish-options")).up().up().c("field",{var:"secret"}).c("value").t(t.secret),Vc.sendIQ(r)}(e,t)),o=r.map(t=>async function(e,t){if(!t.jid)return;if(!await Vc.disco.supports(oE.NS.PUSH,e||Uc.bare_jid))return void zn.warn('Not disabling push app server "'.concat(t.jid,'", no disco support from your server.'));const n=sE({type:"set"});e!==Uc.bare_jid&&n.attrs({to:e}),n.c("disable",{xmlns:oE.NS.PUSH,jid:t.jid}),t.node&&n.attrs({node:t.node}),Vc.sendIQ(n).catch(e=>{zn.error("Could not disable push app server for ".concat(t.jid)),zn.error(e)})}(e,t));try{await Promise.all(i.concat(o))}catch(e){zn.error("Could not enable or disable push App Server"),e&&zn.error(e)}finally{t.push(e)}Uc.session.save("push_enabled",t)}function t(t){t.get("type")==Uc.CHATROOMS_TYPE&&e(oE.getDomainFromJid(t.get("jid")))}Vc.settings.extend({push_app_servers:[],enable_muc_push:!1}),Vc.listen.on("statusInitialized",()=>e()),Vc.settings.get("enable_muc_push")&&Vc.listen.on("chatBoxesInitialized",()=>Uc.chatboxes.on("add",t))}});var aE=n(181),cE=n.n(aE),lE=n(182),uE=n.n(lE),dE=n(183),hE=n.n(dE);
-/**
- * @module converse-register
- * @description
- * This is a Converse.js plugin which add support for in-band registration
- * as specified in XEP-0077.
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:fE,sizzle:pE,$iq:gE}=rl.env,mE=rl.env.utils;fE.addNamespace("REGISTER","jabber:iq:register");const vE=Object.keys(fE.Status).reduce((e,t)=>Math.max(e,fE.Status[t]),0);function _E(){const e=xE(['\n        <div class="list-container list-container--openrooms ','">\n            <a class="list-toggle open-rooms-toggle controlbox-padded" title="','" @click=','>\n            <span class="fa ','"></span> ','</a>\n            <div class="items-list rooms-list open-rooms-list ','">\n                ',"\n            </div>\n        </div>"]);return _E=function(){return e},e}function bE(){const e=xE(['\n        <div class="list-item controlbox-padded available-chatroom d-flex flex-row '," ",'"\n            data-room-jid="','">\n\n            ','\n            <a class="list-item-link open-room available-room w-100"\n            data-room-jid="','"\n            title="','"\n            @click=',">","</a>\n\n            ",'\n\n            <a class="list-item-action room-info fa fa-info-circle"\n            data-room-jid="','"\n            title="','"\n            @click=','></a>\n\n            <a class="list-item-action fa fa-sign-out-alt close-room"\n            data-room-jid="','"\n            data-room-name="','"\n            title="','"\n            @click=',"></a>\n        </div>"]);return bE=function(){return e},e}function yE(){const e=xE(['<span class="list-item-badge badge badge--muc msgs-indicator">',"</span>"]);return yE=function(){return e},e}function wE(){const e=xE(['\n            <a class="list-item-action fa fa-bookmark add-bookmark"\n               data-room-jid="','"\n               data-bookmark-name="','"\n               @click=','\n               title="','"></a>']);return wE=function(){return e},e}function SE(){const e=xE(['\n            <a class="list-item-action fa fa-bookmark remove-bookmark button-on"\n               data-room-jid="','"\n               data-bookmark-name="','"\n               @click=','\n               title="','"></a>']);return SE=function(){return e},e}function xE(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}fE.Status.REGIFAIL=vE+1,fE.Status.REGISTERED=vE+2,fE.Status.CONFLICT=vE+3,fE.Status.NOTACCEPTABLE=vE+5,rl.plugins.add("converse-register",{enabled:()=>!0,overrides:{ControlBoxView:{renderLoginPanel(){return this.__super__.renderLoginPanel.apply(this,arguments),this.renderRegistrationPanel(),this}}},initialize(){function e(e){Vc.waitUntil("controlBoxInitialized").then(()=>{Uc.chatboxes.get("controlbox").set({"active-form":e})}).catch(e=>zn.fatal(e))}Uc.CONNECTION_STATUS[fE.Status.REGIFAIL]="REGIFAIL",Uc.CONNECTION_STATUS[fE.Status.REGISTERED]="REGISTERED",Uc.CONNECTION_STATUS[fE.Status.CONFLICT]="CONFLICT",Uc.CONNECTION_STATUS[fE.Status.NOTACCEPTABLE]="NOTACCEPTABLE",Vc.settings.extend({allow_registration:!0,domain_placeholder:zd(" e.g. conversejs.org"),providers_link:"https://compliance.conversations.im/",registration_domain:""}),Object.assign(Uc.ControlBoxView.prototype,{showLoginOrRegisterForm(){this.registerpanel&&("register"==this.model.get("active-form")?(this.loginpanel.el.classList.add("hidden"),this.registerpanel.el.classList.remove("hidden")):(this.loginpanel.el.classList.remove("hidden"),this.registerpanel.el.classList.add("hidden")))},renderRegistrationPanel(){if(Vc.settings.get("allow_registration")){this.registerpanel=new Uc.RegisterPanel({model:this.model}),this.registerpanel.render(),this.registerpanel.el.classList.add("hidden");const e=this.el.querySelector("#converse-login-panel");e&&e.insertAdjacentElement("afterend",this.registerpanel.el),this.showLoginOrRegisterForm()}return this}}),Uc.router.route("converse/login",()=>e("login")),Uc.router.route("converse/register",()=>e("register")),Uc.RegisterPanel=eh.extend({tagName:"div",id:"converse-register-panel",className:"controlbox-pane fade-in",events:{"submit form#converse-register":"onFormSubmission","click .button-cancel":"renderProviderChoiceForm"},initialize(){this.reset(),Vc.listen.on("connectionInitialized",()=>this.registerHooks())},render(){return this.model.set("registration_form_rendered",!1),this.el.innerHTML=cE()({__:zd,default_domain:Vc.settings.get("registration_domain"),label_register:zd("Fetch registration form"),help_providers:zd("Tip: A list of public XMPP providers is available"),help_providers_link:zd("here"),href_providers:Vc.settings.get("providers_link"),domain_placeholder:Vc.settings.get("domain_placeholder")}),Vc.settings.get("registration_domain")&&this.fetchRegistrationForm(Vc.settings.get("registration_domain")),this},registerHooks(){const e=Uc.connection,t=e._connect_cb.bind(e);e._connect_cb=(e,n,r)=>{this._registering?this.getRegistrationFields(e,n)&&(this._registering=!1):t(e,n,r)}},getRegistrationFields(e,t){const n=Uc.connection;n.connected=!0;const r=n._proto._reqToData(e);if(!r)return;if(n._proto._connect_cb(r)===fE.Status.CONNFAIL)return this.showValidationError(zd("Sorry, we're unable to connect to your chosen provider.")),!1;const i=r.getElementsByTagName("register"),o=r.getElementsByTagName("mechanism");if(0===i.length&&0===o.length)return n._proto._no_auth_received(t),!1;if(0===i.length)return n._changeConnectStatus(fE.Status.REGIFAIL),this.showValidationError(zd("Sorry, the given provider does not support in band account registration. Please try with a different provider.")),!0;n._addSysHandler(this.onRegistrationFields.bind(this),null,"iq",null,null);const s=gE({type:"get"}).c("query",{xmlns:fE.NS.REGISTER}).tree();return s.setAttribute("id",n.getUniqueId("sendIQ")),n.send(s),n.connected=!1,!0},onRegistrationFields(e){return"error"===e.getAttribute("type")?(Uc.connection._changeConnectStatus(fE.Status.REGIFAIL,zd('Something went wrong while establishing a connection with "%1$s". Are you sure it exists?',this.domain)),!1):1!==e.getElementsByTagName("query").length?(Uc.connection._changeConnectStatus(fE.Status.REGIFAIL,"unknown"),!1):(this.setFields(e),this.model.get("registration_form_rendered")||this.renderRegistrationForm(e),!1)},reset(e){const t={fields:{},urls:[],title:"",instructions:"",registered:!1,_registering:!1,domain:null,form_type:null};Object.assign(this,t),e&&Object.assign(this,Bo(e,Object.keys(t)))},onFormSubmission(e){e&&e.preventDefault&&e.preventDefault(),null===e.target.querySelector("input[name=domain]")?this.submitRegistrationForm(e.target):this.onProviderChosen(e.target)},onProviderChosen(e){const t=e.querySelector("input[name=domain]"),n=null==t?void 0:t.value;n?(e.querySelector("input[type=submit]").classList.add("hidden"),this.fetchRegistrationForm(n.trim())):t.classList.add("error")},async fetchRegistrationForm(e){var t;return this.model.get("registration_form_rendered")||this.renderRegistrationRequest(),this.reset({domain:fE.getDomainFromJid(e),_registering:!0}),await Uc.initConnection(this.domain),null===(t=Uc.connection)||void 0===t||t.connect(this.domain,"",e=>this.onConnectStatusChanged(e)),!1},renderRegistrationRequest(){this.clearRegistrationForm().insertAdjacentHTML("beforeend",hE()({__:Uc.__,cancel:Vc.settings.get("registration_domain")}))},giveFeedback(e,t){let n=this.el.querySelector(".reg-feedback");null!==n&&n.parentNode.removeChild(n);const r=this.el.querySelector("form");r.insertAdjacentHTML("afterbegin",'<span class="reg-feedback"></span>'),n=r.querySelector(".reg-feedback"),n.textContent=e,t&&n.classList.add(t)},clearRegistrationForm(){const e=this.el.querySelector("form");return e.innerHTML="",this.model.set("registration_form_rendered",!1),e},showSpinner(){const e=this.el.querySelector("form");return Ya(fp(),e),this.model.set("registration_form_rendered",!1),this},onConnectStatusChanged(e){zn.debug("converse-register: onConnectStatusChanged"),[fE.Status.DISCONNECTED,fE.Status.CONNFAIL,fE.Status.REGIFAIL,fE.Status.NOTACCEPTABLE,fE.Status.CONFLICT].includes(e)?(zn.error("Problem during registration: Strophe.Status is ".concat(Uc.CONNECTION_STATUS[e])),this.abortRegistration()):e===fE.Status.REGISTERED&&(zn.debug("Registered successfully."),Uc.connection.reset(),this.showSpinner(),["converse/login","converse/register"].includes(Uc.router.history.getFragment())&&Uc.router.navigate("",{replace:!0}),this.fields.password&&this.fields.username?(Uc.connection.connect(this.fields.username.toLowerCase()+"@"+this.domain.toLowerCase(),this.fields.password,Uc.onConnectStatusChanged),this.giveFeedback(zd("Now logging you in"),"info")):(Uc.chatboxviews.get("controlbox").renderLoginPanel(),Uc.giveFeedback(zd("Registered successfully"))),this.reset())},renderLegacyRegistrationForm(e){Object.keys(this.fields).forEach(t=>{"username"===t?e.insertAdjacentHTML("beforeend",Eh()({domain:" @".concat(this.domain),name:t,type:"text",label:t,value:"",required:!0})):e.insertAdjacentHTML("beforeend",mh()({label:t,name:t,placeholder:t,required:!0,type:"password"===t||"email"===t?t:"text",value:""}))}),this.urls.forEach(t=>e.insertAdjacentHTML("afterend",'<a target="blank" rel="noopener" href="'+t+'">'+t+"</a>"))},renderRegistrationForm(e){const t=this.el.querySelector("form");t.innerHTML=uE()({__:zd,domain:this.domain,title:this.title,instructions:this.instructions,registration_domain:Vc.settings.get("registration_domain")});const n=t.querySelector("fieldset.buttons");"xform"===this.form_type?e.querySelectorAll("field").forEach(t=>{n.insertAdjacentHTML("beforebegin",Kl.xForm2webForm(t,e,{domain:this.domain}))}):this.renderLegacyRegistrationForm(t),this.fields||t.querySelector(".button-primary").classList.add("hidden"),t.classList.remove("hidden"),this.model.set("registration_form_rendered",!0)},showValidationError(e){const t=this.el.querySelector("form");let n=t.querySelector(".form-errors");if(null===n){n='<div class="form-errors hidden"></div>';const e=t.querySelector("p.instructions");null===e?t.insertAdjacentHTML("afterbegin",n):e.insertAdjacentHTML("afterend",n),n=t.querySelector(".form-errors")}else n.innerHTML="";n.insertAdjacentHTML("beforeend",'<p class="form-help error">'+e+"</p>"),n.classList.remove("hidden")},reportErrors(e){const t=e.querySelectorAll("error");if(t.forEach(e=>this.showValidationError(e.textContent)),!t.length){const e=zd("The provider rejected your registration attempt. Please check the values you entered for correctness.");this.showValidationError(e)}},renderProviderChoiceForm(e){e&&e.preventDefault&&e.preventDefault(),Uc.connection._proto._abortAllRequests(),Uc.connection.reset(),this.render()},abortRegistration(){Uc.connection._proto._abortAllRequests(),Uc.connection.reset(),this.model.get("registration_form_rendered")?Vc.settings.get("registration_domain")&&this.model.get("registration_form_rendered")&&this.fetchRegistrationForm(Vc.settings.get("registration_domain")):this.render()},submitRegistrationForm(e){if(Array.from(this.el.querySelectorAll("input.required")).reduce((e,t)=>""===t.value?(t.classList.add("error"),e+1):e,0))return;const t=pE(":input:not([type=button]):not([type=submit])",e),n=gE({type:"set",id:mE.getUniqueId()}).c("query",{xmlns:fE.NS.REGISTER});if("xform"===this.form_type){n.c("x",{xmlns:fE.NS.XFORM,type:"submit"}),t.map(e=>Kl.webForm2xForm(e)).filter(e=>e).forEach(e=>n.cnode(e).up())}else t.forEach(e=>n.c(e.getAttribute("name"),{},e.value));Uc.connection._addSysHandler(this._onRegisterIQ.bind(this),null,"iq",null,null),Uc.connection.send(n),this.setFields(n.tree())},setFields(e){const t=e.querySelector("query"),n=pE('x[xmlns="'.concat(fE.NS.XFORM,'"]'),t);n.length>0?this._setFieldsFromXForm(n.pop()):this._setFieldsFromLegacy(t)},_setFieldsFromLegacy(e){[].forEach.call(e.children,e=>{"instructions"!==e.tagName.toLowerCase()?"x"!==e.tagName.toLowerCase()?this.fields[e.tagName.toLowerCase()]=fE.getText(e):"jabber:x:oob"===e.getAttribute("xmlns")&&this.urls.concat(pE("url",e).map(e=>e.textContent)):this.instructions=fE.getText(e)}),this.form_type="legacy"},_setFieldsFromXForm(e){var t,n;this.title=null===(t=e.querySelector("title"))||void 0===t?void 0:t.textContent,this.instructions=null===(n=e.querySelector("instructions"))||void 0===n?void 0:n.textContent,e.querySelectorAll("field").forEach(e=>{const t=e.getAttribute("var");var n,r;t?this.fields[t.toLowerCase()]=null!==(n=null===(r=e.querySelector("value"))||void 0===r?void 0:r.textContent)&&void 0!==n?n:"":zn.warn("Found field we couldn't parse")}),this.form_type="xform"},_onRegisterIQ(e){if("error"===e.getAttribute("type")){zn.error("Registration failed."),this.reportErrors(e);let t=e.getElementsByTagName("error");if(1!==t.length)return Uc.connection._changeConnectStatus(fE.Status.REGIFAIL,"unknown"),!1;t=t[0].firstElementChild.tagName.toLowerCase(),"conflict"===t?Uc.connection._changeConnectStatus(fE.Status.CONFLICT,t):"not-acceptable"===t?Uc.connection._changeConnectStatus(fE.Status.NOTACCEPTABLE,t):Uc.connection._changeConnectStatus(fE.Status.REGIFAIL,t)}else Uc.connection._changeConnectStatus(fE.Status.REGISTERED,null);return!1}}),Vc.listen.on("controlBoxInitialized",e=>{e.model.on("change:active-form",e.showLoginOrRegisterForm,e)})}});const EE=e=>{const t=zd("Leave this groupchat");return Za(bE(),e.currently_open(e.room)?"open":"",e.room.get("num_unread_general")?"unread-msgs":"",e.room.get("jid"),e.room.get("num_unread")?(e=>Za(yE(),e.room.get("num_unread")))(e):"",e.room.get("jid"),zd("Click to open this groupchat"),e.openRoom,e.room.getDisplayName(),e.allow_bookmarks?(e=>{const t=zd("Bookmark this groupchat"),n=zd("Unbookmark this groupchat");return e.bookmarked?Za(SE(),e.room.get("jid"),e.room.getDisplayName(),e.removeBookmark,e.bookmarked?n:t):Za(wE(),e.room.get("jid"),e.room.getDisplayName(),e.addBookmark,e.bookmarked?n:t)})(e):"",e.room.get("jid"),zd("Show more information on this groupchat"),e.showRoomDetailsModal,e.room.get("jid"),e.room.getDisplayName(),t,e.closeRoom)};
-/**
- * @module converse-roomslist
- * @description
- *  Converse.js plugin which shows a list of currently open
- *  rooms in the "Rooms Panel" of the ControlBox.
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const{Strophe:AE}=rl.env,CE=rl.env.utils;function jE(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n        <div class="modal-dialog" role="document">\n            <div class="modal-content">\n                <div class="modal-header">\n                    <h5 class="modal-title" id="addContactModalLabel">',"</h5>\n                    ",'\n                </div>\n                <form class="converse-form add-xmpp-contact">\n                    <div class="modal-body">\n                        <span class="modal-alert"></span>\n                        <div class="form-group add-xmpp-contact__jid">\n                            <label class="clearfix" for="jid">',':</label>\n                            <div class="suggestion-box suggestion-box__jid">\n                                <ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>\n                                <input type="text" name="jid" ?required=','\n                                    value="','"\n                                    class="form-control suggestion-box__input"\n                                    placeholder="','"/>\n                                <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n                            </div>\n                        </div>\n                        <div class="form-group add-xmpp-contact__name">\n                            <label class="clearfix" for="name">',':</label>\n                            <div class="suggestion-box suggestion-box__name">\n                                <ul class="suggestion-box__results suggestion-box__results--above" hidden=""></ul>\n                                <input type="text" name="name" value="','"\n                                    class="form-control suggestion-box__input"\n                                    placeholder="','"/>\n                                <span class="suggestion-box__additions visually-hidden" role="status" aria-live="assertive" aria-relevant="additions"></span>\n                            </div>\n                        </div>\n                        <div class="form-group">\n                            <div class="invalid-feedback">','</div>\n                        </div>\n                        <button type="submit" class="btn btn-primary">',"</button>\n                    </div>\n                </form>\n            </div>\n        </div>\n    "]);return jE=function(){return e},e}rl.plugins.add("converse-roomslist",{dependencies:["converse-singleton","converse-controlbox","converse-muc","converse-bookmarks"],initialize(){Vc.promises.add("roomsListInitialized"),Uc.RoomsList=qo.extend({defaults:{"toggle-state":Uc.OPENED}}),Uc.RoomsListView=eh.extend({tagName:"span",initialize(){this.listenTo(this.model,"add",this.renderIfChatRoom),this.listenTo(this.model,"remove",this.renderIfChatRoom),this.listenTo(this.model,"destroy",this.renderIfChatRoom),this.listenTo(this.model,"change",this.renderIfRelevantChange);const e="converse.roomslist".concat(Uc.bare_jid);this.list_model=new Uc.RoomsList({id:e}),this.list_model.browserStorage=Uc.createStore(e),this.list_model.fetch(),this.render(),this.insertIntoControlBox()},renderIfChatRoom(e){CE.isChatRoom(e)&&this.render()},renderIfRelevantChange(e){const t=["bookmarked","hidden","name","num_unread","num_unread_general"],n=e.changed||{};CE.isChatRoom(e)&&Object.keys(n).filter(e=>t.includes(e)).length&&this.render()},toHTML(){return(e=>{const t=zd("Click to toggle the list of open groupchats");return Za(_E(),e.rooms.length?"":"hidden",t,e.toggleRoomsList,e.toggle_state===e._converse.OPENED?"fa-caret-down":"fa-caret-right",zd("Open Groupchats"),e.collapsed&&"collapsed",e.rooms.map(t=>EE(Object.assign({room:t},e))))})({_converse:Uc,addBookmark:e=>this.addBookmark(e),allow_bookmarks:Uc.allow_bookmarks&&Uc.bookmarks,closeRoom:e=>this.closeRoom(e),collapsed:this.list_model.get("toggle-state")!==Uc.OPENED,currently_open:e=>Uc.isUniView()&&!e.get("hidden"),openRoom:e=>this.openRoom(e),removeBookmark:e=>this.removeBookmark(e),rooms:this.model.filter(e=>e.get("type")===Uc.CHATROOMS_TYPE),showRoomDetailsModal:e=>this.showRoomDetailsModal(e),toggleRoomsList:e=>this.toggleRoomsList(e),toggle_state:this.list_model.get("toggle-state")})},insertIntoControlBox(){const e=Uc.chatboxviews.get("controlbox");if(void 0!==e&&!CE.rootContains(Uc.root,this.el)){const t=e.el.querySelector(".list-container--openrooms");t&&t.parentNode.replaceChild(this.el,t)}},showRoomDetailsModal(e){const t=e.target.getAttribute("data-room-jid"),n=Uc.chatboxes.get(t);e.preventDefault(),Vc.modal.show(dw,{model:n},e)},async openRoom(e){e.preventDefault();const t=e.target.textContent,n=e.target.getAttribute("data-room-jid"),r={name:t||AE.unescapeNode(AE.getNodeFromJid(n))||n};await Vc.rooms.open(n,r,!0),Vc.chatviews.get(n).maybeFocus()},closeRoom(e){e.preventDefault();const t=e.target.getAttribute("data-room-name"),n=e.target.getAttribute("data-room-jid");confirm(zd("Are you sure you want to leave the groupchat %1$s?",t))&&Uc.chatboxviews.get(n).close()},removeBookmark:Uc.removeBookmarkViaEvent,addBookmark:Uc.addBookmarkViaEvent,toggleRoomsList(e){e&&e.preventDefault&&e.preventDefault();const t=e.target.matches(".fa")?e.target:e.target.querySelector(".fa");t.classList.contains("fa-caret-down")?CE.slideIn(this.el.querySelector(".open-rooms-list")).then(()=>{this.list_model.save({"toggle-state":Uc.CLOSED}),t.classList.remove("fa-caret-down"),t.classList.add("fa-caret-right")}):CE.slideOut(this.el.querySelector(".open-rooms-list")).then(()=>{this.list_model.save({"toggle-state":Uc.OPENED}),t.classList.remove("fa-caret-right"),t.classList.add("fa-caret-down")})}});const e=function(){Uc.rooms_list_view=new Uc.RoomsListView({model:Uc.chatboxes}),Vc.trigger("roomsListInitialized")};Vc.listen.on("connected",async()=>{Uc.allow_bookmarks?await Vc.waitUntil("bookmarksInitialized"):await Promise.all([Vc.waitUntil("chatBoxesFetched"),Vc.waitUntil("roomsPanelRendered")]),e()}),Vc.listen.on("reconnected",e)}});const{Strophe:TE}=rl.env,OE=rl.env.utils,kE=df.extend({id:"add-contact-modal",events:{"submit form":"addContactFromForm"},initialize(){df.prototype.initialize.apply(this,arguments),this.listenTo(this.model,"change",this.render)},toHTML(){const e=Vc.settings.get("xhr_user_search_url")?zd("Contact name"):zd("Optional nickname");return(e=>{const t=zd("name@example.org"),n=zd("Add"),r=zd("Please enter a valid XMPP address"),i=zd("Add a Contact"),o=zd("XMPP Address"),s=zd("Nickname");return Za(jE(),i,mf,o,!e._converse.xhr_user_search_url,e.jid||"",t,s,e.nickname||"",s,r,n)})(Object.assign(this.model.toJSON(),{_converse:Uc,label_nickname:e}))},afterRender(){"string"==typeof Vc.settings.get("xhr_user_search_url")?this.initXHRAutoComplete():this.initJIDAutoComplete();const e=this.el.querySelector('input[name="jid"]');this.el.addEventListener("shown.bs.modal",()=>e.focus(),!1)},initJIDAutoComplete(){if(!Vc.settings.get("autocomplete_add_contact"))return;const e=this.el.querySelector(".suggestion-box__jid").parentElement;this.jid_auto_complete=new Uc.AutoComplete(e,{data:(e,t)=>"".concat(t.slice(0,t.indexOf("@")),"@").concat(e),filter:Uc.FILTER_STARTSWITH,list:[...new Set(Uc.roster.map(e=>TE.getDomainFromJid(e.get("jid"))))]})},initXHRAutoComplete(){if(!Vc.settings.get("autocomplete_add_contact"))return this.initXHRFetch();const e=this.el.querySelector(".suggestion-box__name").parentElement;this.name_auto_complete=new Uc.AutoComplete(e,{auto_evaluate:!1,filter:Uc.FILTER_STARTSWITH,list:[]});const t=new window.XMLHttpRequest;t.onload=()=>{if(t.responseText){const e=t.responseText;this.name_auto_complete.list=JSON.parse(e).map(e=>({label:e.fullname||e.jid,value:e.jid})),this.name_auto_complete.auto_completing=!0,this.name_auto_complete.evaluate()}};const n=this.el.querySelector('input[name="name"]');n.addEventListener("input",Rc(()=>{t.open("GET","".concat(Vc.settings.get("xhr_user_search_url"),"q=").concat(encodeURIComponent(n.value)),!0),t.send()},300)),this.name_auto_complete.on("suggestion-box-selectcomplete",e=>{this.el.querySelector('input[name="name"]').value=e.text.label,this.el.querySelector('input[name="jid"]').value=e.text.value})},initXHRFetch(){this.xhr=new window.XMLHttpRequest,this.xhr.onload=()=>{if(this.xhr.responseText){const e=this.xhr.responseText,t=JSON.parse(e).map(e=>({label:e.fullname||e.jid,value:e.jid}));if(1!==t.length){const e=this.el.querySelector(".invalid-feedback");return e.textContent=zd("Sorry, could not find a contact with that name"),void OE.addClass("d-block",e)}const n=t[0].value;if(this.validateSubmission(n)){const e=this.el.querySelector("form"),r=t[0].label;this.afterSubmission(e,n,r)}}}},validateSubmission(e){const t=this.el.querySelector(".invalid-feedback");return!e||Ho(e.split("@")).length<2?(OE.addClass("is-invalid",this.el.querySelector('input[name="jid"]')),OE.addClass("d-block",t),!1):Uc.roster.get(TE.getBareJidFromJid(e))?(t.textContent=zd("This contact has already been added"),OE.addClass("d-block",t),!1):(OE.removeClass("d-block",t),!0)},afterSubmission(e,t,n){Uc.roster.addAndSubscribe(t,n),this.model.clear(),this.modal.hide()},addContactFromForm(e){e.preventDefault();const t=new FormData(e.target),n=(t.get("jid")||"").trim();if(!n&&"string"==typeof Vc.settings.get("xhr_user_search_url")){const e=this.el.querySelector('input[name="name"]');return this.xhr.open("GET","".concat(Vc.settings.get("xhr_user_search_url"),"q=").concat(encodeURIComponent(e.value)),!0),void this.xhr.send()}this.validateSubmission(n)&&this.afterSubmission(e.target,n,t.get("name"))}});Uc.AddContactModal=kE;var NE=n(184),IE=n.n(NE),ME=n(185),RE=n.n(ME),DE=n(186),PE=n.n(DE),LE=n(187),zE=n.n(LE);function FE(){const e=function(e,t){t||(t=e.slice(0));return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(['\n    <form class="controlbox-padded roster-filter-form input-button-group ','"\n          @submit=','>\n        <div class="form-inline flex-nowrap">\n            <div class="filter-by d-flex flex-nowrap">\n                <span @click=',' class="fa fa-user ','" data-type="contacts" title="','"></span>\n                <span @click=',' class="fa fa-users ','" data-type="groups" title="','"></span>\n                <span @click=',' class="fa fa-circle ','" data-type="state" title="','"></span>\n            </div>\n            <div class="btn-group">\n                <input .value="','"\n                       @keydown=','\n                       class="roster-filter form-control ','"\n                       placeholder="','"/>\n                <span class="clear-input fa fa-times ','"\n                      @click=','>\n                </span>\n            </div>\n            <select class="form-control state-type ','"\n                    @change=','>\n                <option value="">',"</option>\n                <option ?selected=",' value="unread_messages">',"</option>\n                <option ?selected=",' value="online">',"</option>\n                <option ?selected=",' value="chat">',"</option>\n                <option ?selected=",' value="dnd">',"</option>\n                <option ?selected=",' value="away">',"</option>\n                <option ?selected=",' value="xa">',"</option>\n                <option ?selected=",' value="offline">',"</option>\n            </select>\n        </div>\n    </form>\n"]);return FE=function(){return e},e}var BE=n(188),qE=n.n(BE);
-/**
- * @module converse-rosterview
- * @copyright 2020, the Converse.js contributors
- * @license Mozilla Public License (MPLv2)
- */
-const HE=rl.env.utils;rl.plugins.add("converse-rosterview",{dependencies:["converse-roster","converse-modal","converse-chatboxviews"],initialize(){Vc.settings.extend({autocomplete_add_contact:!0,allow_chat_pending_contacts:!0,allow_contact_removal:!0,hide_offline_users:!1,roster_groups:!0,xhr_user_search_url:null}),Vc.promises.add("rosterViewInitialized");const e={dnd:zd("This contact is busy"),online:zd("This contact is online"),offline:zd("This contact is offline"),unavailable:zd("This contact is unavailable"),xa:zd("This contact is away for an extended period"),away:zd("This contact is away")};function t(){Vc.settings.get("authentication")!==Uc.ANONYMOUS&&(Uc.rosterview=new Uc.RosterView({model:Uc.rostergroups}),Uc.rosterview.render(),Vc.trigger("rosterViewInitialized"))}Uc.RosterFilter=qo.extend({initialize(){this.set({filter_text:"",filter_type:"contacts",chat_state:"online"})}}),Uc.RosterFilterView=eh.extend({tagName:"span",initialize(){this.listenTo(this.model,"change:filter_type",this.render),this.listenTo(this.model,"change:filter_text",this.render)},toHTML(){return e=Object.assign(this.model.toJSON(),{visible:this.shouldBeVisible(),placeholder:zd("Filter"),title_contact_filter:zd("Filter by contact name"),title_group_filter:zd("Filter by group name"),title_status_filter:zd("Filter by status"),label_any:zd("Any"),label_unread_messages:zd("Unread"),label_online:zd("Online"),label_chatty:zd("Chatty"),label_busy:zd("Busy"),label_away:zd("Away"),label_xa:zd("Extended Away"),label_offline:zd("Offline"),changeChatStateFilter:e=>this.changeChatStateFilter(e),changeTypeFilter:e=>this.changeTypeFilter(e),clearFilter:e=>this.clearFilter(e),liveFilter:e=>this.liveFilter(e),submitFilter:e=>this.submitFilter(e)}),Za(FE(),e.visible?"fade-in":"hidden",e.submitFilter,e.changeTypeFilter,"contacts"===e.filter_type?"selected":"",e.title_contact_filter,e.changeTypeFilter,"groups"===e.filter_type?"selected":"",e.title_group_filter,e.changeTypeFilter,"state"===e.filter_type?"selected":"",e.title_status_filter,e.filter_text||"",e.liveFilter,"state"===e.filter_type?"hidden":"",e.placeholder,e.filter_text&&"state"!==e.filter_type?"":"hidden",e.clearFilter,"state"!==e.filter_type?"hidden":"",e.changeChatStateFilter,e.label_any,"unread_messages"===e.chat_state,e.label_unread_messages,"online"===e.chat_state,e.label_online,"chat"===e.chat_state,e.label_chatty,"dnd"===e.chat_state,e.label_busy,"away"===e.chat_state,e.label_away,"xa"===e.chat_state,e.label_xa,"offline"===e.chat_state,e.label_offline);var e},changeChatStateFilter(e){e&&e.preventDefault(),this.model.save({chat_state:this.el.querySelector(".state-type").value})},changeTypeFilter(e){e&&e.preventDefault();const t=e.target.dataset.type;"state"===t?this.model.save({filter_type:t,chat_state:this.el.querySelector(".state-type").value}):this.model.save({filter_type:t,filter_text:this.el.querySelector(".roster-filter").value})},liveFilter:Rc((function(){this.model.save({filter_text:this.el.querySelector(".roster-filter").value})}),250),submitFilter(e){e&&e.preventDefault(),this.liveFilter()},isActive(){return"state"===this.model.get("filter_type")||this.model.get("filter_text")},shouldBeVisible(){return Uc.roster&&Uc.roster.length>=5||this.isActive()},clearFilter(e){e&&e.preventDefault(),this.model.save({filter_text:""})}}),Uc.RosterContactView=Uc.ViewWithAvatar.extend({tagName:"li",className:"list-item d-flex hidden controlbox-padded",events:{"click .accept-xmpp-request":"acceptRequest","click .decline-xmpp-request":"declineRequest","click .open-chat":"openChat","click .remove-xmpp-contact":"removeContact"},async initialize(){await this.model.initialized,this.debouncedRender=Rc(this.render,50),this.listenTo(this.model,"change",this.debouncedRender),this.listenTo(this.model,"destroy",this.remove),this.listenTo(this.model,"highlight",this.highlight),this.listenTo(this.model,"remove",this.remove),this.listenTo(this.model,"vcard:change",this.debouncedRender),this.listenTo(this.model.presence,"change:show",this.debouncedRender),this.render()},render(){if(!this.mayBeShown())return HE.hideElement(this.el),this;const t=this.model.get("ask"),n=this.model.presence.get("show"),r=this.model.get("requesting"),i=this.model.get("subscription"),o=this.model.get("jid");if(["current-xmpp-contact","pending-xmpp-contact","requesting-xmpp-contact"].concat(Object.keys(e)).forEach(e=>HE.removeClass(e,this.el)),this.el.classList.add(n),this.el.setAttribute("data-status",n),this.highlight(),Uc.isUniView()){const e=Uc.chatboxes.get(this.model.get("jid"));e&&(e.get("hidden")?this.el.classList.remove("open"):this.el.classList.add("open"))}if("subscribe"===t||"from"===i){const e=this.model.getDisplayName();this.el.classList.add("pending-xmpp-contact"),this.el.innerHTML=RE()(Object.assign(this.model.toJSON(),{display_name:e,desc_remove:zd("Click to remove %1$s as a contact",e),allow_chat_pending_contacts:Vc.settings.get("allow_chat_pending_contacts")}))}else if(!0===r){const e=this.model.getDisplayName();this.el.classList.add("requesting-xmpp-contact"),this.el.innerHTML=PE()(Object.assign(this.model.toJSON(),{display_name:e,desc_accept:zd("Click to accept the contact request from %1$s",e),desc_decline:zd("Click to decline the contact request from %1$s",e),allow_chat_pending_contacts:Vc.settings.get("allow_chat_pending_contacts")}))}else("both"===i||"to"===i||Uc.rosterview.isSelf(o))&&(this.el.classList.add("current-xmpp-contact"),this.el.classList.remove(dv(["both","to"],i)[0]),this.el.classList.add(i),this.renderRosterItem(this.model));return this},highlight(){if(Uc.isUniView()){const e=Uc.chatboxes.get(this.model.get("jid"));e&&e.get("hidden")||!e?this.el.classList.remove("open"):this.el.classList.add("open")}},renderRosterItem(t){const n=t.presence.get("show")||"offline";let r;r="online"===n?"fa fa-circle chat-status chat-status--online":"away"===n?"fa fa-circle chat-status chat-status--away":"xa"===n?"far fa-circle chat-status chat-status-xa":"dnd"===n?"fa fa-minus-circle chat-status chat-status--busy":"fa fa-times-circle chat-status chat-status--offline";const i=t.getDisplayName();return this.el.innerHTML=qE()(Object.assign(t.toJSON(),{show:n,display_name:i,status_icon:r,desc_status:e[n],desc_chat:zd("Click to chat with %1$s (XMPP address: %2$s)",i,t.get("jid")),desc_remove:zd("Click to remove %1$s as a contact",i),allow_contact_removal:Vc.settings.get("allow_contact_removal"),num_unread:t.get("num_unread")||0,classes:""})),this.renderAvatar(),this},mayBeShown(){const e=this.model.presence.get("show");return!Vc.settings.get("hide_offline_users")||"offline"!==e||("subscribe"===this.model.get("ask")||"from"===this.model.get("subscription")||!0===this.model.get("requesting"))},openChat(e){e&&e.preventDefault&&e.preventDefault(),this.model.openChat()},async removeContact(e){if(e&&e.preventDefault&&e.preventDefault(),Vc.settings.get("allow_contact_removal")&&confirm(zd("Are you sure you want to remove this contact?")))try{await this.model.removeFromRoster(),this.remove(),this.model.collection&&this.model.destroy()}catch(e){zn.error(e),Vc.alert("error",zd("Error"),[zd("Sorry, there was an error while trying to remove %1$s as a contact.",this.model.getDisplayName())])}},async acceptRequest(e){e&&e.preventDefault&&e.preventDefault(),await Uc.roster.sendContactAddIQ(this.model.get("jid"),this.model.getFullname(),[]),this.model.authorize().subscribe()},declineRequest(e){return e&&e.preventDefault&&e.preventDefault(),!0===confirm(zd("Are you sure you want to decline this contact request?"))&&this.model.unauthorize().destroy(),this}}),Uc.RosterGroupView=pv.extend({tagName:"div",className:"roster-group hidden",events:{"click a.group-toggle":"toggle"},sortImmediatelyOnAdd:!0,ItemView:Uc.RosterContactView,listItems:"model.contacts",listSelector:".roster-group-contacts",sortEvent:"presenceChanged",initialize(){pv.prototype.initialize.apply(this,arguments),this.model.get("name")===Uc.HEADER_UNREAD&&this.listenTo(this.model.contacts,"change:num_unread",e=>!this.model.get("unread_messages")&&this.removeContact(e)),this.model.get("name")===Uc.HEADER_REQUESTING_CONTACTS&&this.listenTo(this.model.contacts,"change:requesting",e=>!e.get("requesting")&&this.removeContact(e)),this.model.get("name")===Uc.HEADER_PENDING_CONTACTS&&this.listenTo(this.model.contacts,"change:subscription",e=>"from"!==e.get("subscription")&&this.removeContact(e)),this.listenTo(this.model.contacts,"remove",this.onRemove),this.listenTo(Uc.roster,"change:groups",this.onContactGroupChange),Uc.rosterview.on("rosterContactsFetchedAndProcessed",()=>this.sortAndPositionAllItems())},render(){return this.el.setAttribute("data-group",this.model.get("name")),this.el.innerHTML=IE()({label_group:this.model.get("name"),desc_group_toggle:this.model.get("description"),toggle_state:this.model.get("state"),_converse:Uc}),this.contacts_el=this.el.querySelector(".roster-group-contacts"),this},show(){return HE.showElement(this.el),this.model.get("state")===Uc.OPENED&&Object.values(this.getAll()).filter(e=>e.mayBeShown()).forEach(e=>HE.showElement(e.el)),this},collapse(){return HE.slideIn(this.contacts_el)},filterOutContacts(e=[]){let t=0;this.model.contacts.forEach(n=>{const r=this.get(n.get("id"));e.includes(n)?HE.hideElement(r.el):r.mayBeShown()&&(HE.showElement(r.el),t+=1)}),t?HE.showElement(this.el):HE.hideElement(this.el)},getFilterMatches(e,t){if(0===e.length)return[];e=e.toLowerCase();const n=this.model.contacts;if("state"===t){return[Uc.HEADER_REQUESTING_CONTACTS,Uc.HEADER_UNREAD].includes(this.model.get("name"))?[]:"unread_messages"===e?n.filter({num_unread:0}):"online"===e?n.filter(e=>["offline","unavailable"].includes(e.presence.get("show"))):n.filter(t=>!t.presence.get("show").includes(e))}return n.filter(t=>!t.getFilterCriteria().includes(e))},filter(e,t){null==e&&(e="state"===(t=t||Uc.rosterview.filter_view.model.get("filter_type"))?Uc.rosterview.filter_view.model.get("chat_state"):Uc.rosterview.filter_view.model.get("filter_text")),this.filterOutContacts(this.getFilterMatches(e,t))},async toggle(e){e&&e.preventDefault&&e.preventDefault();const t=e.target.matches(".fa")?e.target:e.target.querySelector(".fa");HE.hasClass("fa-caret-down",t)?(this.model.save({state:Uc.CLOSED}),await this.collapse(),t.classList.remove("fa-caret-down"),t.classList.add("fa-caret-right")):(t.classList.remove("fa-caret-right"),t.classList.add("fa-caret-down"),this.model.save({state:Uc.OPENED}),this.filter(),HE.showElement(this.el),HE.slideOut(this.contacts_el))},onContactGroupChange(e){const t=e.get("groups").includes(this.model.get("name")),n=e.get("id"),r=!this.get(n);t&&!r?this.items.trigger("add",e):t||this.removeContact(e)},removeContact(e){this.model.contacts.remove(e,{silent:!0}),this.onRemove(e)},onRemove(e){this.remove(e.get("jid")),0===this.model.contacts.length&&this.remove()}}),Uc.RosterView=pv.extend({tagName:"div",id:"converse-roster",className:"controlbox-section",ItemView:Uc.RosterGroupView,listItems:"model",listSelector:".roster-contacts",sortEvent:null,subviewIndex:"name",sortImmediatelyOnAdd:!0,events:{"click a.controlbox-heading__btn.add-contact":"showAddContactModal","click a.controlbox-heading__btn.sync-contacts":"syncContacts"},initialize(){pv.prototype.initialize.apply(this,arguments),this.listenTo(Uc.roster,"add",this.onContactAdded),this.listenTo(Uc.roster,"change:groups",this.onContactAdded),this.listenTo(Uc.roster,"change",this.onContactChange),this.listenTo(Uc.roster,"destroy",this.update),this.listenTo(Uc.roster,"remove",this.update),Uc.presences.on("change:show",()=>{this.update(),this.updateFilter()}),this.listenTo(this.model,"reset",this.reset),Vc.listen.on("rosterGroupsFetched",this.sortAndPositionAllItems.bind(this)),Vc.listen.on("rosterContactsFetched",()=>{Uc.roster.each(e=>this.addRosterContact(e,{silent:!0})),this.update(),this.updateFilter(),this.trigger("rosterContactsFetchedAndProcessed")}),this.createRosterFilter()},render(){this.el.innerHTML=zE()({allow_contact_requests:Uc.allow_contact_requests,heading_contacts:zd("Contacts"),title_add_contact:zd("Add a contact"),title_sync_contacts:zd("Re-sync your contacts")});const e=this.el.querySelector(".roster-filter-form");return this.el.replaceChild(this.filter_view.render().el,e),this.roster_el=this.el.querySelector(".roster-contacts"),this},showAddContactModal(e){Vc.modal.show(Uc.AddContactModal,{model:new qo},e)},createRosterFilter(){const e=new Uc.RosterFilter;e.id="_converse.rosterfilter-".concat(Uc.bare_jid),e.browserStorage=Uc.createStore(e.id),this.filter_view=new Uc.RosterFilterView({model:e}),this.listenTo(this.filter_view.model,"change",this.updateFilter),this.filter_view.model.fetch()},updateFilter:Rc((function(){const e=this.filter_view.model.get("filter_type");"state"===e?this.filter(this.filter_view.model.get("chat_state"),e):this.filter(this.filter_view.model.get("filter_text"),e)}),100),update(){return HE.isVisible(this.roster_el)||HE.showElement(this.roster_el),this.filter_view.render(),this},filter(e,t){const n=Object.values(this.getAll());n.forEach(e=>e.model.contacts.length>0&&e.show().filter("")),e=e.toLowerCase(),"groups"===t?n.forEach(t=>{t.model.get("name").toLowerCase().includes(e)?t.model.contacts.length>0&&HE.slideOut(t.el):HE.slideIn(t.el)}):n.forEach(n=>n.filter(e,t))},async syncContacts(e){e.preventDefault(),HE.addClass("fa-spin",e.target),Uc.roster.data.save("version",null),await Uc.roster.fetchFromServer(),Vc.user.presence.send(),HE.removeClass("fa-spin",e.target)},reset(){return this.removeAll(),this.render().update(),this},onContactAdded(e){this.addRosterContact(e),this.update(),this.updateFilter()},onContactChange(e){this.update(),Xr(e.changed,"subscription")&&("from"===e.changed.subscription?this.addContactToGroup(e,Uc.HEADER_PENDING_CONTACTS):["both","to"].includes(e.get("subscription"))&&this.addExistingContact(e)),Xr(e.changed,"num_unread")&&e.get("num_unread")&&this.addContactToGroup(e,Uc.HEADER_UNREAD),Xr(e.changed,"ask")&&"subscribe"===e.changed.ask&&this.addContactToGroup(e,Uc.HEADER_PENDING_CONTACTS),Xr(e.changed,"subscription")&&"true"===e.changed.requesting&&this.addContactToGroup(e,Uc.HEADER_REQUESTING_CONTACTS),this.updateFilter()},getGroup(e){const t=this.get(e);return t?t.model:this.model.create({name:e})},addContactToGroup(e,t,n){this.getGroup(t).contacts.add(e,n),this.sortAndPositionAllItems()},addExistingContact(e,t){let n;Vc.settings.get("roster_groups")?(n=e.get("groups"),n=0===n.length?[Uc.HEADER_UNGROUPED]:n):n=[Uc.HEADER_CURRENT_CONTACTS],e.get("num_unread")&&n.push(Uc.HEADER_UNREAD),n.forEach(n=>this.addContactToGroup(e,n,t))},isSelf:e=>HE.isSameBareJID(e,Uc.connection.jid),addRosterContact(e,t){const n=e.get("jid");if("both"===e.get("subscription")||"to"===e.get("subscription")||this.isSelf(n))this.addExistingContact(e,t);else{if(!Uc.allow_contact_requests)return void zn.debug("Not adding requesting or pending contact ".concat(n," ")+"because allow_contact_requests is false");"subscribe"===e.get("ask")||"from"===e.get("subscription")?this.addContactToGroup(e,Uc.HEADER_PENDING_CONTACTS,t):!0===e.get("requesting")&&this.addContactToGroup(e,Uc.HEADER_REQUESTING_CONTACTS,t)}return this}}),Vc.listen.on("chatBoxesInitialized",()=>{function e(e){const t=Uc.roster&&Uc.roster.findWhere({jid:e.get("jid")});void 0!==t&&t.trigger("highlight")}Uc.chatboxes.on("destroy",t=>e(t)),Uc.chatboxes.on("change:hidden",t=>e(t))}),Vc.listen.on("controlBoxInitialized",e=>{function t(){e.model.get("connected")&&Vc.settings.get("authentication")!==Uc.ANONYMOUS&&Vc.waitUntil("rosterViewInitialized").then(()=>e.controlbox_pane.el.insertAdjacentElement("beforeEnd",Uc.rosterview.el)).catch(e=>zn.fatal(e))}t(),e.model.on("change:connected",t)}),Vc.listen.on("rosterInitialized",t),Vc.listen.on("rosterReadyAfterReconnection",t),Vc.listen.on("afterTearDown",()=>{rl.rosterview&&(rl.rosterview.model.off().reset(),rl.rosterview.each(e=>e.removeAll().remove()),rl.rosterview.removeAll().remove(),delete rl.rosterview)})}});n(501);
-/**
- * @description Converse.js (A browser based XMPP chat client)
- * @copyright 2020, The Converse developers
- * @license Mozilla Public License (MPLv2)
- */const UE=["converse-autocomplete","converse-bookmark-views","converse-chatboxviews","converse-chatview","converse-controlbox","converse-dragresize","converse-fullscreen","converse-mam-views","converse-minimize","converse-modal","converse-muc-views","converse-headlines-view","converse-notification","converse-omemo","converse-profile","converse-push","converse-register","converse-roomslist","converse-rosterview","converse-singleton"];i.a.templateSettings={escape:/\{\{\{([\s\S]+?)\}\}\}/g,evaluate:/\{\[([\s\S]+?)\]\}/g,interpolate:/\{\{([\s\S]+?)\}\}/g,imports:{_:i.a}},rl.env._=i.a;const $E=rl.initialize;rl.initialize=function(e,t){return Array.isArray(e.whitelisted_plugins)?e.whitelisted_plugins=e.whitelisted_plugins.concat(UE):e.whitelisted_plugins=UE,$E(e,t)};t.default=rl}]);
-//# sourceMappingURL=converse.min.js.map
\ No newline at end of file
diff --git a/src/index.js b/src/index.js
index 2445d1b7d57503c718c258718eb3334a1b2e0e07..ed4f6ffa64669a31ce94f89e49248b0c768051c8 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,9 +1,4 @@
 import ComponentPath from './path.js';
 import { SolidXMPPChat } from './solid-xmpp-chat.js';
 
-let link = document.createElement('link');
-link.rel = 'stylesheet';
-link.href = `${ComponentPath}/dist/conversejs/fonts.css?min`;
-document.querySelector('head').append(link);
-
 export { SolidXMPPChat }
diff --git a/src/solid-xmpp-chat.js b/src/solid-xmpp-chat.js
index 9a3efd4788de98e6fbf14e52427d8e2dbfef6a53..9d88d84a1c6c2e5b541fca267a40f39cf330390e 100644
--- a/src/solid-xmpp-chat.js
+++ b/src/solid-xmpp-chat.js
@@ -77,10 +77,12 @@ export const SolidXMPPChat = {
           const user = await document.querySelector('sib-auth').getUser();
           const userProfile = await store.getData(user['@id'], this.context);
           const contactsURL = await userProfile['contacts.@id'];
-          store.post({
-            "contact": this.resource['@id'],
-            "@context": this.context
-          }, contactsURL);
+          try {
+            store.post({
+              "contact": this.resource['@id'],
+              "@context": this.context
+            }, contactsURL);
+          } catch (e) {}
         }
         await converse_sib.connected_deferred;
         converse_sib.service.plugins.sibChat.changeChat(